@digital8/lighting-illusions-ts-sdk 0.0.2017 → 0.0.2018
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 +16 -0
- package/README.md +10 -2
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- 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 +7 -12
- package/dist/models/CreateCartRequest.js +4 -7
- package/dist/models/CreateCartRequestCustomer.d.ts +50 -0
- package/dist/models/CreateCartRequestCustomer.js +55 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/FrontendCartResource.d.ts +138 -0
- package/dist/models/FrontendCartResource.js +119 -0
- package/dist/models/FrontendCartResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendCartResourceArrayResponse.js +50 -0
- package/dist/models/FrontendCartResourceCouponsInner.d.ts +56 -0
- package/dist/models/FrontendCartResourceCouponsInner.js +57 -0
- package/dist/models/FrontendLineItemResource.d.ts +75 -0
- package/dist/models/FrontendLineItemResource.js +78 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.js +50 -0
- package/dist/models/ProductChildCartLiteResource.d.ts +18 -0
- package/dist/models/ProductChildCartLiteResource.js +12 -0
- package/dist/models/SearchCartsRequest.d.ts +15 -6
- package/dist/models/SearchCartsRequest.js +11 -3
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +1 -3
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/UpdateCartRequest.d.ts +7 -18
- package/dist/models/UpdateCartRequest.js +3 -6
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/docs/CartCouponLiteResource.md +42 -0
- package/docs/CartCouponLiteResourceArrayResponse.md +34 -0
- package/docs/CreateCartRequest.md +2 -4
- package/docs/CreateCartRequestCustomer.md +40 -0
- package/docs/FrontendCartResource.md +68 -0
- package/docs/FrontendCartResourceArrayResponse.md +34 -0
- package/docs/FrontendCartResourceCouponsInner.md +42 -0
- package/docs/FrontendLineItemResource.md +48 -0
- package/docs/FrontendLineItemResourceArrayResponse.md +34 -0
- package/docs/ProductChildCartLiteResource.md +6 -0
- package/docs/SearchCartsRequest.md +2 -2
- package/docs/UpdateCartRequest.md +2 -6
- package/package.json +1 -1
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/CartCouponLiteResource.ts +102 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/CreateCartRequest.ts +16 -18
- package/src/models/CreateCartRequestCustomer.ts +89 -0
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/FrontendCartResource.ts +246 -0
- package/src/models/FrontendCartResourceArrayResponse.ts +73 -0
- package/src/models/FrontendCartResourceCouponsInner.ts +97 -0
- package/src/models/FrontendLineItemResource.ts +136 -0
- package/src/models/FrontendLineItemResourceArrayResponse.ts +73 -0
- package/src/models/ProductChildCartLiteResource.ts +27 -0
- package/src/models/SearchCartsRequest.ts +18 -8
- package/src/models/StoreFrontendResource.ts +2 -3
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/UpdateCartRequest.ts +15 -24
- package/src/models/index.ts +8 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendCartResourceCouponsInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`code` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`discount` | number
|
|
13
|
+
`appliesTo` | string
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { FrontendCartResourceCouponsInner } from '@digital8/lighting-illusions-ts-sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"id": null,
|
|
23
|
+
"code": null,
|
|
24
|
+
"name": null,
|
|
25
|
+
"discount": null,
|
|
26
|
+
"appliesTo": null,
|
|
27
|
+
} satisfies FrontendCartResourceCouponsInner
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendCartResourceCouponsInner
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
`isAvailable` | boolean
|
|
15
|
+
`isInStock` | boolean
|
|
16
|
+
`productChild` | [ProductChildCartLiteResource](ProductChildCartLiteResource.md)
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { FrontendLineItemResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"id": null,
|
|
26
|
+
"quantity": null,
|
|
27
|
+
"productPrice": null,
|
|
28
|
+
"subtotalAmount": null,
|
|
29
|
+
"totalAmount": null,
|
|
30
|
+
"isAvailable": null,
|
|
31
|
+
"isInStock": null,
|
|
32
|
+
"productChild": null,
|
|
33
|
+
} satisfies FrontendLineItemResource
|
|
34
|
+
|
|
35
|
+
console.log(example)
|
|
36
|
+
|
|
37
|
+
// Convert the instance to a JSON string
|
|
38
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
39
|
+
console.log(exampleJSON)
|
|
40
|
+
|
|
41
|
+
// Parse the JSON string back to an object
|
|
42
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResource
|
|
43
|
+
console.log(exampleParsed)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
47
|
+
|
|
48
|
+
|
|
@@ -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,9 @@ Name | Type
|
|
|
12
12
|
`model` | string
|
|
13
13
|
`modelNumber` | string
|
|
14
14
|
`name` | string
|
|
15
|
+
`parentName` | string
|
|
16
|
+
`variantName` | string
|
|
17
|
+
`slug` | string
|
|
15
18
|
`stock` | number
|
|
16
19
|
`salePrice` | number
|
|
17
20
|
`thumbnail` | [AssetLiteResource](AssetLiteResource.md)
|
|
@@ -30,6 +33,9 @@ const example = {
|
|
|
30
33
|
"model": null,
|
|
31
34
|
"modelNumber": null,
|
|
32
35
|
"name": null,
|
|
36
|
+
"parentName": null,
|
|
37
|
+
"variantName": null,
|
|
38
|
+
"slug": null,
|
|
33
39
|
"stock": null,
|
|
34
40
|
"salePrice": null,
|
|
35
41
|
"thumbnail": null,
|
|
@@ -13,7 +13,6 @@ Name | Type
|
|
|
13
13
|
`page` | number
|
|
14
14
|
`siteId` | Array<string>
|
|
15
15
|
`source` | Array<string>
|
|
16
|
-
`status` | Array<string>
|
|
17
16
|
`beforeCreatedAt` | Date
|
|
18
17
|
`afterCreatedAt` | Date
|
|
19
18
|
`beforeExpiryDate` | Date
|
|
@@ -23,6 +22,7 @@ Name | Type
|
|
|
23
22
|
`relatedId` | number
|
|
24
23
|
`relatedType` | string
|
|
25
24
|
`includesRelations` | boolean
|
|
25
|
+
`status` | Array<string>
|
|
26
26
|
|
|
27
27
|
## Example
|
|
28
28
|
|
|
@@ -38,7 +38,6 @@ const example = {
|
|
|
38
38
|
"page": null,
|
|
39
39
|
"siteId": null,
|
|
40
40
|
"source": null,
|
|
41
|
-
"status": null,
|
|
42
41
|
"beforeCreatedAt": null,
|
|
43
42
|
"afterCreatedAt": null,
|
|
44
43
|
"beforeExpiryDate": null,
|
|
@@ -48,6 +47,7 @@ const example = {
|
|
|
48
47
|
"relatedId": null,
|
|
49
48
|
"relatedType": null,
|
|
50
49
|
"includesRelations": null,
|
|
50
|
+
"status": null,
|
|
51
51
|
} satisfies SearchCartsRequest
|
|
52
52
|
|
|
53
53
|
console.log(example)
|
|
@@ -6,12 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`token` | string
|
|
10
|
-
`sessionToken` | string
|
|
11
|
-
`paymentToken` | string
|
|
12
9
|
`customerId` | number
|
|
13
10
|
`source` | string
|
|
14
11
|
`guestEmail` | string
|
|
12
|
+
`customer` | [CreateCartRequestCustomer](CreateCartRequestCustomer.md)
|
|
15
13
|
`shippingType` | string
|
|
16
14
|
`shippingSubtotal` | number
|
|
17
15
|
`overrideShipping` | boolean
|
|
@@ -31,12 +29,10 @@ import type { UpdateCartRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
|
31
29
|
|
|
32
30
|
// TODO: Update the object below with actual values
|
|
33
31
|
const example = {
|
|
34
|
-
"token": null,
|
|
35
|
-
"sessionToken": null,
|
|
36
|
-
"paymentToken": null,
|
|
37
32
|
"customerId": null,
|
|
38
33
|
"source": null,
|
|
39
34
|
"guestEmail": null,
|
|
35
|
+
"customer": null,
|
|
40
36
|
"shippingType": null,
|
|
41
37
|
"shippingSubtotal": null,
|
|
42
38
|
"overrideShipping": 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 | null;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -73,7 +73,6 @@ 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;
|
|
77
76
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
77
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
78
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
@@ -93,7 +92,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
93
92
|
}
|
|
94
93
|
return {
|
|
95
94
|
|
|
96
|
-
'company': json['company'],
|
|
95
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
97
96
|
'line1': json['line1'],
|
|
98
97
|
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
99
98
|
'postcode': json['postcode'],
|
|
@@ -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
|
+
|
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
CreateCartRequestShippingAddressToJSON,
|
|
28
28
|
CreateCartRequestShippingAddressToJSONTyped,
|
|
29
29
|
} from './CreateCartRequestShippingAddress';
|
|
30
|
+
import type { CreateCartRequestCustomer } from './CreateCartRequestCustomer';
|
|
31
|
+
import {
|
|
32
|
+
CreateCartRequestCustomerFromJSON,
|
|
33
|
+
CreateCartRequestCustomerFromJSONTyped,
|
|
34
|
+
CreateCartRequestCustomerToJSON,
|
|
35
|
+
CreateCartRequestCustomerToJSONTyped,
|
|
36
|
+
} from './CreateCartRequestCustomer';
|
|
30
37
|
|
|
31
38
|
/**
|
|
32
39
|
*
|
|
@@ -39,7 +46,7 @@ export interface CreateCartRequest {
|
|
|
39
46
|
* @type {number}
|
|
40
47
|
* @memberof CreateCartRequest
|
|
41
48
|
*/
|
|
42
|
-
customerId
|
|
49
|
+
customerId?: number | null;
|
|
43
50
|
/**
|
|
44
51
|
*
|
|
45
52
|
* @type {number}
|
|
@@ -51,25 +58,19 @@ export interface CreateCartRequest {
|
|
|
51
58
|
* @type {string}
|
|
52
59
|
* @memberof CreateCartRequest
|
|
53
60
|
*/
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @type {string}
|
|
58
|
-
* @memberof CreateCartRequest
|
|
59
|
-
*/
|
|
60
|
-
sessionToken?: string;
|
|
61
|
+
sessionToken?: string | null;
|
|
61
62
|
/**
|
|
62
63
|
*
|
|
63
64
|
* @type {string}
|
|
64
65
|
* @memberof CreateCartRequest
|
|
65
66
|
*/
|
|
66
|
-
paymentToken?: string;
|
|
67
|
+
paymentToken?: string | null;
|
|
67
68
|
/**
|
|
68
69
|
*
|
|
69
70
|
* @type {string}
|
|
70
71
|
* @memberof CreateCartRequest
|
|
71
72
|
*/
|
|
72
|
-
guestEmail?: string;
|
|
73
|
+
guestEmail?: string | null;
|
|
73
74
|
/**
|
|
74
75
|
*
|
|
75
76
|
* @type {CreateCartRequestSourceEnum}
|
|
@@ -84,10 +85,10 @@ export interface CreateCartRequest {
|
|
|
84
85
|
items?: Array<CreateCartRequestItemsInner>;
|
|
85
86
|
/**
|
|
86
87
|
*
|
|
87
|
-
* @type {
|
|
88
|
+
* @type {CreateCartRequestCustomer}
|
|
88
89
|
* @memberof CreateCartRequest
|
|
89
90
|
*/
|
|
90
|
-
|
|
91
|
+
customer?: CreateCartRequestCustomer;
|
|
91
92
|
/**
|
|
92
93
|
*
|
|
93
94
|
* @type {CreateCartRequestShippingTypeEnum}
|
|
@@ -183,7 +184,6 @@ export type CreateCartRequestShippingTypeEnum = typeof CreateCartRequestShipping
|
|
|
183
184
|
* Check if a given object implements the CreateCartRequest interface.
|
|
184
185
|
*/
|
|
185
186
|
export function instanceOfCreateCartRequest(value: object): value is CreateCartRequest {
|
|
186
|
-
if (!('customerId' in value) || value['customerId'] === undefined) return false;
|
|
187
187
|
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
188
188
|
if (!('source' in value) || value['source'] === undefined) return false;
|
|
189
189
|
return true;
|
|
@@ -199,15 +199,14 @@ export function CreateCartRequestFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
199
199
|
}
|
|
200
200
|
return {
|
|
201
201
|
|
|
202
|
-
'customerId': json['customer_id'],
|
|
202
|
+
'customerId': json['customer_id'] == null ? undefined : json['customer_id'],
|
|
203
203
|
'siteId': json['site_id'],
|
|
204
|
-
'token': json['token'] == null ? undefined : json['token'],
|
|
205
204
|
'sessionToken': json['session_token'] == null ? undefined : json['session_token'],
|
|
206
205
|
'paymentToken': json['payment_token'] == null ? undefined : json['payment_token'],
|
|
207
206
|
'guestEmail': json['guest_email'] == null ? undefined : json['guest_email'],
|
|
208
207
|
'source': json['source'],
|
|
209
208
|
'items': json['items'] == null ? undefined : ((json['items'] as Array<any>).map(CreateCartRequestItemsInnerFromJSON)),
|
|
210
|
-
'
|
|
209
|
+
'customer': json['customer'] == null ? undefined : CreateCartRequestCustomerFromJSON(json['customer']),
|
|
211
210
|
'shippingType': json['shipping_type'] == null ? undefined : json['shipping_type'],
|
|
212
211
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
213
212
|
'overrideShipping': json['override_shipping'] == null ? undefined : json['override_shipping'],
|
|
@@ -235,13 +234,12 @@ export function CreateCartRequestToJSONTyped(value?: CreateCartRequest | null, i
|
|
|
235
234
|
|
|
236
235
|
'customer_id': value['customerId'],
|
|
237
236
|
'site_id': value['siteId'],
|
|
238
|
-
'token': value['token'],
|
|
239
237
|
'session_token': value['sessionToken'],
|
|
240
238
|
'payment_token': value['paymentToken'],
|
|
241
239
|
'guest_email': value['guestEmail'],
|
|
242
240
|
'source': value['source'],
|
|
243
241
|
'items': value['items'] == null ? undefined : ((value['items'] as Array<any>).map(CreateCartRequestItemsInnerToJSON)),
|
|
244
|
-
'
|
|
242
|
+
'customer': CreateCartRequestCustomerToJSON(value['customer']),
|
|
245
243
|
'shipping_type': value['shippingType'],
|
|
246
244
|
'shipping_subtotal': value['shippingSubtotal'],
|
|
247
245
|
'override_shipping': value['overrideShipping'],
|
|
@@ -0,0 +1,89 @@
|
|
|
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 CreateCartRequestCustomer
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateCartRequestCustomer {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateCartRequestCustomer
|
|
26
|
+
*/
|
|
27
|
+
firstName?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateCartRequestCustomer
|
|
32
|
+
*/
|
|
33
|
+
lastName?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CreateCartRequestCustomer
|
|
38
|
+
*/
|
|
39
|
+
email?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof CreateCartRequestCustomer
|
|
44
|
+
*/
|
|
45
|
+
phone?: string | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the CreateCartRequestCustomer interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfCreateCartRequestCustomer(value: object): value is CreateCartRequestCustomer {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CreateCartRequestCustomerFromJSON(json: any): CreateCartRequestCustomer {
|
|
56
|
+
return CreateCartRequestCustomerFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CreateCartRequestCustomerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCartRequestCustomer {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'firstName': json['first_name'] == null ? undefined : json['first_name'],
|
|
66
|
+
'lastName': json['last_name'] == null ? undefined : json['last_name'],
|
|
67
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
68
|
+
'phone': json['phone'] == null ? undefined : json['phone'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CreateCartRequestCustomerToJSON(json: any): CreateCartRequestCustomer {
|
|
73
|
+
return CreateCartRequestCustomerToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function CreateCartRequestCustomerToJSONTyped(value?: CreateCartRequestCustomer | null, ignoreDiscriminator: boolean = false): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'first_name': value['firstName'],
|
|
84
|
+
'last_name': value['lastName'],
|
|
85
|
+
'email': value['email'],
|
|
86
|
+
'phone': value['phone'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload?: string | null;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,7 +106,6 @@ 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;
|
|
110
109
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
111
110
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
112
111
|
return true;
|
|
@@ -129,7 +128,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
129
128
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
130
129
|
'endpoint': json['endpoint'],
|
|
131
130
|
'responseCode': json['responseCode'],
|
|
132
|
-
'requestPayload': json['requestPayload'],
|
|
131
|
+
'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
|
|
133
132
|
'responsePayload': json['responsePayload'],
|
|
134
133
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
135
134
|
'site': SiteLiteResourceFromJSON(json['site']),
|