@digital8/lighting-illusions-ts-sdk 0.0.1907 → 0.0.1908
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 +1 -1
- package/dist/models/AddressResource.js +3 -1
- 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/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/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +2 -6
- 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/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/docs/CartCouponLiteResource.md +38 -0
- package/docs/CartCouponLiteResourceArrayResponse.md +34 -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/StoreSpecialDateFrontendResource.md +1 -1
- package/package.json +1 -1
- package/src/models/AddressFrontendResource.ts +5 -5
- package/src/models/AddressResource.ts +3 -2
- package/src/models/CartCouponLiteResource.ts +84 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -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/StoreFrontendResource.ts +4 -6
- package/src/models/StoreResource.ts +2 -3
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- package/src/models/index.ts +6 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendLineItemResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`quantity` | number
|
|
11
|
+
`productPrice` | number
|
|
12
|
+
`subtotalAmount` | number
|
|
13
|
+
`totalAmount` | number
|
|
14
|
+
`productChild` | [ProductChildCartLiteResource](ProductChildCartLiteResource.md)
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { FrontendLineItemResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"id": null,
|
|
24
|
+
"quantity": null,
|
|
25
|
+
"productPrice": null,
|
|
26
|
+
"subtotalAmount": null,
|
|
27
|
+
"totalAmount": null,
|
|
28
|
+
"productChild": null,
|
|
29
|
+
} satisfies FrontendLineItemResource
|
|
30
|
+
|
|
31
|
+
console.log(example)
|
|
32
|
+
|
|
33
|
+
// Convert the instance to a JSON string
|
|
34
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
35
|
+
console.log(exampleJSON)
|
|
36
|
+
|
|
37
|
+
// Parse the JSON string back to an object
|
|
38
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResource
|
|
39
|
+
console.log(exampleParsed)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendLineItemResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { FrontendLineItemResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies FrontendLineItemResourceArrayResponse
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResourceArrayResponse
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`model` | string
|
|
13
13
|
`modelNumber` | string
|
|
14
14
|
`name` | string
|
|
15
|
+
`slug` | string
|
|
15
16
|
`stock` | number
|
|
16
17
|
`salePrice` | number
|
|
17
18
|
`thumbnail` | [AssetLiteResource](AssetLiteResource.md)
|
|
@@ -30,6 +31,7 @@ const example = {
|
|
|
30
31
|
"model": null,
|
|
31
32
|
"modelNumber": null,
|
|
32
33
|
"name": null,
|
|
34
|
+
"slug": null,
|
|
33
35
|
"stock": null,
|
|
34
36
|
"salePrice": null,
|
|
35
37
|
"thumbnail": null,
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof AddressFrontendResource
|
|
26
26
|
*/
|
|
27
|
-
company
|
|
27
|
+
company: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -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}
|
|
@@ -73,8 +73,8 @@ export interface AddressFrontendResource {
|
|
|
73
73
|
* Check if a given object implements the AddressFrontendResource interface.
|
|
74
74
|
*/
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
|
+
if (!('company' in value) || value['company'] === undefined) return false;
|
|
76
77
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
77
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
78
78
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
79
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
80
80
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -93,9 +93,9 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
93
93
|
}
|
|
94
94
|
return {
|
|
95
95
|
|
|
96
|
-
'company': json['company']
|
|
96
|
+
'company': json['company'],
|
|
97
97
|
'line1': json['line1'],
|
|
98
|
-
'line2': json['line2'],
|
|
98
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
99
99
|
'postcode': json['postcode'],
|
|
100
100
|
'suburb': json['suburb'],
|
|
101
101
|
'country': json['country'],
|
|
@@ -36,7 +36,7 @@ export interface AddressResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressResource
|
|
38
38
|
*/
|
|
39
|
-
addresseeName
|
|
39
|
+
addresseeName: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -97,6 +97,7 @@ 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 (!('addressee' in value) || value['addressee'] === undefined) return false;
|
|
101
102
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
102
103
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
@@ -119,7 +120,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
119
120
|
|
|
120
121
|
'id': json['id'] == null ? undefined : json['id'],
|
|
121
122
|
'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
|
|
122
|
-
'addresseeName': json['addressee_name']
|
|
123
|
+
'addresseeName': json['addressee_name'],
|
|
123
124
|
'company': json['company'] == null ? undefined : json['company'],
|
|
124
125
|
'addressee': json['addressee'],
|
|
125
126
|
'line1': json['line_1'],
|
|
@@ -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
|
+
|
|
@@ -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
|
+
|
|
@@ -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
|
+
|