@digital8/lighting-illusions-ts-sdk 0.0.2091 → 0.0.2092
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 +14 -18
- package/README.md +9 -12
- package/dist/apis/OrdersApi.d.ts +0 -17
- package/dist/apis/OrdersApi.js +0 -60
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +1 -3
- package/dist/models/AdminOrderResource.d.ts +3 -16
- package/dist/models/AdminOrderResource.js +3 -12
- 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/FrontendCartResource.d.ts +138 -0
- package/dist/models/FrontendCartResource.js +119 -0
- package/dist/models/FrontendCartResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendCartResourceArrayResponse.js +50 -0
- package/dist/models/FrontendCartResourceCouponsInner.d.ts +56 -0
- package/dist/models/FrontendCartResourceCouponsInner.js +57 -0
- package/dist/models/FrontendLineItemResource.d.ts +81 -0
- package/dist/models/FrontendLineItemResource.js +82 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.js +50 -0
- package/dist/models/ProductChildLineItemLiteResource.d.ts +18 -0
- package/dist/models/ProductChildLineItemLiteResource.js +12 -0
- package/dist/models/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +4 -4
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +1 -3
- package/dist/models/index.d.ts +7 -9
- package/dist/models/index.js +7 -9
- package/docs/AdminOrderResource.md +1 -5
- package/docs/{AdminOrderLineItemResourceArrayResponse.md → CartCouponLiteResource.md} +14 -6
- package/docs/{OrderFulfillmentLineItemResourceArrayResponse.md → CartCouponLiteResourceArrayResponse.md} +5 -5
- package/docs/FrontendCartResource.md +68 -0
- package/docs/{OrderStatusId.md → FrontendCartResourceArrayResponse.md} +6 -4
- package/docs/{OrderFulfillmentLineItemResource.md → FrontendCartResourceCouponsInner.md} +12 -8
- package/docs/{AdminOrderLineItemResource.md → FrontendLineItemResource.md} +14 -18
- package/docs/{OrderFulfillmentResourceArrayResponse.md → FrontendLineItemResourceArrayResponse.md} +5 -5
- package/docs/OrdersApi.md +0 -66
- package/docs/ProductChildLineItemLiteResource.md +6 -0
- package/docs/StoreSpecialDateResource.md +1 -1
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +0 -54
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +2 -3
- package/src/models/AdminOrderResource.ts +11 -36
- package/src/models/CartCouponLiteResource.ts +102 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/FrontendCartResource.ts +246 -0
- package/src/models/FrontendCartResourceArrayResponse.ts +73 -0
- package/src/models/FrontendCartResourceCouponsInner.ts +97 -0
- package/src/models/FrontendLineItemResource.ts +145 -0
- package/src/models/FrontendLineItemResourceArrayResponse.ts +73 -0
- package/src/models/ProductChildLineItemLiteResource.ts +27 -0
- package/src/models/StoreFrontendResource.ts +5 -5
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreSpecialDateResource.ts +3 -4
- package/src/models/index.ts +7 -9
- package/dist/models/AdminOrderLineItemResource.d.ts +0 -93
- package/dist/models/AdminOrderLineItemResource.js +0 -90
- package/dist/models/AdminOrderLineItemResourceArrayResponse.d.ts +0 -33
- package/dist/models/AdminOrderLineItemResourceArrayResponse.js +0 -50
- package/dist/models/OrderFulfillmentLineItemResource.d.ts +0 -45
- package/dist/models/OrderFulfillmentLineItemResource.js +0 -60
- package/dist/models/OrderFulfillmentLineItemResourceArrayResponse.d.ts +0 -33
- package/dist/models/OrderFulfillmentLineItemResourceArrayResponse.js +0 -50
- package/dist/models/OrderFulfillmentResource.d.ts +0 -86
- package/dist/models/OrderFulfillmentResource.js +0 -81
- package/dist/models/OrderFulfillmentResourceArrayResponse.d.ts +0 -33
- package/dist/models/OrderFulfillmentResourceArrayResponse.js +0 -50
- package/dist/models/OrderStatusId.d.ts +0 -37
- package/dist/models/OrderStatusId.js +0 -63
- package/dist/models/PaginatedOrderFulfillmentResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedOrderFulfillmentResourceResponse.js +0 -57
- package/dist/models/SearchOrderFulfillmentsRequest.d.ts +0 -120
- package/dist/models/SearchOrderFulfillmentsRequest.js +0 -88
- package/docs/OrderFulfillmentResource.md +0 -52
- package/docs/PaginatedOrderFulfillmentResourceResponse.md +0 -36
- package/docs/SearchOrderFulfillmentsRequest.md +0 -58
- package/src/models/AdminOrderLineItemResource.ts +0 -163
- package/src/models/AdminOrderLineItemResourceArrayResponse.ts +0 -73
- package/src/models/OrderFulfillmentLineItemResource.ts +0 -92
- package/src/models/OrderFulfillmentLineItemResourceArrayResponse.ts +0 -73
- package/src/models/OrderFulfillmentResource.ts +0 -144
- package/src/models/OrderFulfillmentResourceArrayResponse.ts +0 -73
- package/src/models/OrderStatusId.ts +0 -65
- package/src/models/PaginatedOrderFulfillmentResourceResponse.ts +0 -90
- package/src/models/SearchOrderFulfillmentsRequest.ts +0 -181
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# FrontendLineItemResource
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
@@ -9,34 +9,30 @@ Name | Type
|
|
|
9
9
|
`id` | number
|
|
10
10
|
`quantity` | number
|
|
11
11
|
`productPrice` | number
|
|
12
|
-
`
|
|
13
|
-
`
|
|
14
|
-
`
|
|
15
|
-
`
|
|
16
|
-
`
|
|
12
|
+
`subtotalAmount` | number
|
|
13
|
+
`totalAmount` | number
|
|
14
|
+
`promotionalSaving` | number
|
|
15
|
+
`isAvailable` | boolean
|
|
16
|
+
`isInStock` | boolean
|
|
17
17
|
`productChild` | [ProductChildLineItemLiteResource](ProductChildLineItemLiteResource.md)
|
|
18
|
-
`quantityFulfilled` | number
|
|
19
|
-
`returnsQuantity` | number
|
|
20
18
|
|
|
21
19
|
## Example
|
|
22
20
|
|
|
23
21
|
```typescript
|
|
24
|
-
import type {
|
|
22
|
+
import type { FrontendLineItemResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
25
23
|
|
|
26
24
|
// TODO: Update the object below with actual values
|
|
27
25
|
const example = {
|
|
28
26
|
"id": null,
|
|
29
27
|
"quantity": null,
|
|
30
28
|
"productPrice": null,
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
29
|
+
"subtotalAmount": null,
|
|
30
|
+
"totalAmount": null,
|
|
31
|
+
"promotionalSaving": null,
|
|
32
|
+
"isAvailable": null,
|
|
33
|
+
"isInStock": null,
|
|
36
34
|
"productChild": null,
|
|
37
|
-
|
|
38
|
-
"returnsQuantity": null,
|
|
39
|
-
} satisfies AdminOrderLineItemResource
|
|
35
|
+
} satisfies FrontendLineItemResource
|
|
40
36
|
|
|
41
37
|
console.log(example)
|
|
42
38
|
|
|
@@ -45,7 +41,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
45
41
|
console.log(exampleJSON)
|
|
46
42
|
|
|
47
43
|
// Parse the JSON string back to an object
|
|
48
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
44
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResource
|
|
49
45
|
console.log(exampleParsed)
|
|
50
46
|
```
|
|
51
47
|
|
package/docs/{OrderFulfillmentResourceArrayResponse.md → FrontendLineItemResourceArrayResponse.md}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# FrontendLineItemResourceArrayResponse
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`data` | [Array<
|
|
9
|
+
`data` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import type {
|
|
14
|
+
import type { FrontendLineItemResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
18
|
"data": null,
|
|
19
|
-
} satisfies
|
|
19
|
+
} satisfies FrontendLineItemResourceArrayResponse
|
|
20
20
|
|
|
21
21
|
console.log(example)
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
25
25
|
console.log(exampleJSON)
|
|
26
26
|
|
|
27
27
|
// Parse the JSON string back to an object
|
|
28
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResourceArrayResponse
|
|
29
29
|
console.log(exampleParsed)
|
|
30
30
|
```
|
|
31
31
|
|
package/docs/OrdersApi.md
CHANGED
|
@@ -4,7 +4,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
| [**allOrderFulfillment**](OrdersApi.md#allorderfulfillment) | **POST** /admin-api/orders/fulfillments/all | Auto-generated: allOrderFulfillment |
|
|
8
7
|
| [**attachCouponOrder**](OrdersApi.md#attachcouponorder) | **POST** /admin-api/orders/{order}/coupons/attach | Auto-generated: attachCouponOrder |
|
|
9
8
|
| [**attachItemOrder**](OrdersApi.md#attachitemorder) | **POST** /admin-api/orders/{order}/line-items/attach | Auto-generated: attachItemOrder |
|
|
10
9
|
| [**destroyOrder**](OrdersApi.md#destroyorder) | **DELETE** /admin-api/orders/{order}/delete | Auto-generated: destroyOrder |
|
|
@@ -20,71 +19,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
|
|
23
|
-
## allOrderFulfillment
|
|
24
|
-
|
|
25
|
-
> PaginatedOrderFulfillmentResourceResponse allOrderFulfillment(searchOrderFulfillmentsRequest)
|
|
26
|
-
|
|
27
|
-
Auto-generated: allOrderFulfillment
|
|
28
|
-
|
|
29
|
-
### Example
|
|
30
|
-
|
|
31
|
-
```ts
|
|
32
|
-
import {
|
|
33
|
-
Configuration,
|
|
34
|
-
OrdersApi,
|
|
35
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
36
|
-
import type { AllOrderFulfillmentRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
37
|
-
|
|
38
|
-
async function example() {
|
|
39
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
40
|
-
const api = new OrdersApi();
|
|
41
|
-
|
|
42
|
-
const body = {
|
|
43
|
-
// SearchOrderFulfillmentsRequest (optional)
|
|
44
|
-
searchOrderFulfillmentsRequest: ...,
|
|
45
|
-
} satisfies AllOrderFulfillmentRequest;
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
const data = await api.allOrderFulfillment(body);
|
|
49
|
-
console.log(data);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
console.error(error);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Run the test
|
|
56
|
-
example().catch(console.error);
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Parameters
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
| Name | Type | Description | Notes |
|
|
63
|
-
|------------- | ------------- | ------------- | -------------|
|
|
64
|
-
| **searchOrderFulfillmentsRequest** | [SearchOrderFulfillmentsRequest](SearchOrderFulfillmentsRequest.md) | | [Optional] |
|
|
65
|
-
|
|
66
|
-
### Return type
|
|
67
|
-
|
|
68
|
-
[**PaginatedOrderFulfillmentResourceResponse**](PaginatedOrderFulfillmentResourceResponse.md)
|
|
69
|
-
|
|
70
|
-
### Authorization
|
|
71
|
-
|
|
72
|
-
No authorization required
|
|
73
|
-
|
|
74
|
-
### HTTP request headers
|
|
75
|
-
|
|
76
|
-
- **Content-Type**: `application/json`
|
|
77
|
-
- **Accept**: `application/json`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
### HTTP response details
|
|
81
|
-
| Status code | Description | Response headers |
|
|
82
|
-
|-------------|-------------|------------------|
|
|
83
|
-
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\OrderFulfillmentResource[]>> | - |
|
|
84
|
-
|
|
85
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
86
|
-
|
|
87
|
-
|
|
88
22
|
## attachCouponOrder
|
|
89
23
|
|
|
90
24
|
> AdminOrderResource attachCouponOrder(order, attachCouponRequest)
|
|
@@ -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,
|
package/package.json
CHANGED
package/src/apis/OrdersApi.ts
CHANGED
|
@@ -48,11 +48,6 @@ import {
|
|
|
48
48
|
OrderStatusWithCountResourceArrayResponseFromJSON,
|
|
49
49
|
OrderStatusWithCountResourceArrayResponseToJSON,
|
|
50
50
|
} from '../models/OrderStatusWithCountResourceArrayResponse';
|
|
51
|
-
import {
|
|
52
|
-
type PaginatedOrderFulfillmentResourceResponse,
|
|
53
|
-
PaginatedOrderFulfillmentResourceResponseFromJSON,
|
|
54
|
-
PaginatedOrderFulfillmentResourceResponseToJSON,
|
|
55
|
-
} from '../models/PaginatedOrderFulfillmentResourceResponse';
|
|
56
51
|
import {
|
|
57
52
|
type PaginatedOrderListResourceResponse,
|
|
58
53
|
PaginatedOrderListResourceResponseFromJSON,
|
|
@@ -63,11 +58,6 @@ import {
|
|
|
63
58
|
SearchAllOrdersRequestFromJSON,
|
|
64
59
|
SearchAllOrdersRequestToJSON,
|
|
65
60
|
} from '../models/SearchAllOrdersRequest';
|
|
66
|
-
import {
|
|
67
|
-
type SearchOrderFulfillmentsRequest,
|
|
68
|
-
SearchOrderFulfillmentsRequestFromJSON,
|
|
69
|
-
SearchOrderFulfillmentsRequestToJSON,
|
|
70
|
-
} from '../models/SearchOrderFulfillmentsRequest';
|
|
71
61
|
import {
|
|
72
62
|
type SearchOrdersRequest,
|
|
73
63
|
SearchOrdersRequestFromJSON,
|
|
@@ -84,10 +74,6 @@ import {
|
|
|
84
74
|
UpdateOrderRequestToJSON,
|
|
85
75
|
} from '../models/UpdateOrderRequest';
|
|
86
76
|
|
|
87
|
-
export interface AllOrderFulfillmentRequest {
|
|
88
|
-
searchOrderFulfillmentsRequest?: SearchOrderFulfillmentsRequest;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
77
|
export interface AttachCouponOrderRequest {
|
|
92
78
|
order: number;
|
|
93
79
|
attachCouponRequest?: AttachCouponRequest;
|
|
@@ -144,46 +130,6 @@ export interface UpdateOrderOperationRequest {
|
|
|
144
130
|
*/
|
|
145
131
|
export class OrdersApi extends runtime.BaseAPI {
|
|
146
132
|
|
|
147
|
-
/**
|
|
148
|
-
* Creates request options for allOrderFulfillment without sending the request
|
|
149
|
-
*/
|
|
150
|
-
async allOrderFulfillmentRequestOpts(requestParameters: AllOrderFulfillmentRequest): Promise<runtime.RequestOpts> {
|
|
151
|
-
const queryParameters: any = {};
|
|
152
|
-
|
|
153
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
154
|
-
|
|
155
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
let urlPath = `/admin-api/orders/fulfillments/all`;
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
path: urlPath,
|
|
162
|
-
method: 'POST',
|
|
163
|
-
headers: headerParameters,
|
|
164
|
-
query: queryParameters,
|
|
165
|
-
body: SearchOrderFulfillmentsRequestToJSON(requestParameters['searchOrderFulfillmentsRequest']),
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Auto-generated: allOrderFulfillment
|
|
171
|
-
*/
|
|
172
|
-
async allOrderFulfillmentRaw(requestParameters: AllOrderFulfillmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOrderFulfillmentResourceResponse>> {
|
|
173
|
-
const requestOptions = await this.allOrderFulfillmentRequestOpts(requestParameters);
|
|
174
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
175
|
-
|
|
176
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOrderFulfillmentResourceResponseFromJSON(jsonValue));
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Auto-generated: allOrderFulfillment
|
|
181
|
-
*/
|
|
182
|
-
async allOrderFulfillment(requestParameters: AllOrderFulfillmentRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOrderFulfillmentResourceResponse> {
|
|
183
|
-
const response = await this.allOrderFulfillmentRaw(requestParameters, initOverrides);
|
|
184
|
-
return await response.value();
|
|
185
|
-
}
|
|
186
|
-
|
|
187
133
|
/**
|
|
188
134
|
* Creates request options for attachCouponOrder without sending the request
|
|
189
135
|
*/
|
|
@@ -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'],
|
|
@@ -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}
|
|
@@ -100,7 +100,6 @@ export function instanceOfAddressResource(value: object): value is AddressResour
|
|
|
100
100
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
101
101
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
102
102
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
103
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
104
103
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
105
104
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
106
105
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -125,7 +124,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
125
124
|
'addresseeName': json['addresseeName'],
|
|
126
125
|
'company': json['company'],
|
|
127
126
|
'line1': json['line1'],
|
|
128
|
-
'line2': json['line2'],
|
|
127
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
129
128
|
'postcode': json['postcode'],
|
|
130
129
|
'suburb': json['suburb'],
|
|
131
130
|
'country': json['country'],
|
|
@@ -20,13 +20,6 @@ import {
|
|
|
20
20
|
DiscountResourceToJSON,
|
|
21
21
|
DiscountResourceToJSONTyped,
|
|
22
22
|
} from './DiscountResource';
|
|
23
|
-
import type { OrderFulfillmentResource } from './OrderFulfillmentResource';
|
|
24
|
-
import {
|
|
25
|
-
OrderFulfillmentResourceFromJSON,
|
|
26
|
-
OrderFulfillmentResourceFromJSONTyped,
|
|
27
|
-
OrderFulfillmentResourceToJSON,
|
|
28
|
-
OrderFulfillmentResourceToJSONTyped,
|
|
29
|
-
} from './OrderFulfillmentResource';
|
|
30
23
|
import type { SiteLiteResource } from './SiteLiteResource';
|
|
31
24
|
import {
|
|
32
25
|
SiteLiteResourceFromJSON,
|
|
@@ -34,6 +27,13 @@ import {
|
|
|
34
27
|
SiteLiteResourceToJSON,
|
|
35
28
|
SiteLiteResourceToJSONTyped,
|
|
36
29
|
} from './SiteLiteResource';
|
|
30
|
+
import type { LineItemListResource } from './LineItemListResource';
|
|
31
|
+
import {
|
|
32
|
+
LineItemListResourceFromJSON,
|
|
33
|
+
LineItemListResourceFromJSONTyped,
|
|
34
|
+
LineItemListResourceToJSON,
|
|
35
|
+
LineItemListResourceToJSONTyped,
|
|
36
|
+
} from './LineItemListResource';
|
|
37
37
|
import type { TransactionLiteResource } from './TransactionLiteResource';
|
|
38
38
|
import {
|
|
39
39
|
TransactionLiteResourceFromJSON,
|
|
@@ -41,13 +41,6 @@ import {
|
|
|
41
41
|
TransactionLiteResourceToJSON,
|
|
42
42
|
TransactionLiteResourceToJSONTyped,
|
|
43
43
|
} from './TransactionLiteResource';
|
|
44
|
-
import type { AdminOrderLineItemResource } from './AdminOrderLineItemResource';
|
|
45
|
-
import {
|
|
46
|
-
AdminOrderLineItemResourceFromJSON,
|
|
47
|
-
AdminOrderLineItemResourceFromJSONTyped,
|
|
48
|
-
AdminOrderLineItemResourceToJSON,
|
|
49
|
-
AdminOrderLineItemResourceToJSONTyped,
|
|
50
|
-
} from './AdminOrderLineItemResource';
|
|
51
44
|
import type { OrderStatusLiteResource } from './OrderStatusLiteResource';
|
|
52
45
|
import {
|
|
53
46
|
OrderStatusLiteResourceFromJSON,
|
|
@@ -283,18 +276,6 @@ export interface AdminOrderResource {
|
|
|
283
276
|
* @memberof AdminOrderResource
|
|
284
277
|
*/
|
|
285
278
|
site: SiteLiteResource | null;
|
|
286
|
-
/**
|
|
287
|
-
*
|
|
288
|
-
* @type {object}
|
|
289
|
-
* @memberof AdminOrderResource
|
|
290
|
-
*/
|
|
291
|
-
fulfillmentsCount: object;
|
|
292
|
-
/**
|
|
293
|
-
*
|
|
294
|
-
* @type {OrderFulfillmentResource}
|
|
295
|
-
* @memberof AdminOrderResource
|
|
296
|
-
*/
|
|
297
|
-
latestFulfillment: OrderFulfillmentResource | null;
|
|
298
279
|
/**
|
|
299
280
|
*
|
|
300
281
|
* @type {CustomerResource}
|
|
@@ -315,10 +296,10 @@ export interface AdminOrderResource {
|
|
|
315
296
|
status: OrderStatusLiteResource | null;
|
|
316
297
|
/**
|
|
317
298
|
*
|
|
318
|
-
* @type {Array<
|
|
299
|
+
* @type {Array<LineItemListResource>}
|
|
319
300
|
* @memberof AdminOrderResource
|
|
320
301
|
*/
|
|
321
|
-
lineItems: Array<
|
|
302
|
+
lineItems: Array<LineItemListResource> | null;
|
|
322
303
|
/**
|
|
323
304
|
*
|
|
324
305
|
* @type {Array<CartCouponResource>}
|
|
@@ -387,8 +368,6 @@ export function instanceOfAdminOrderResource(value: object): value is AdminOrder
|
|
|
387
368
|
if (!('totalOutstanding' in value) || value['totalOutstanding'] === undefined) return false;
|
|
388
369
|
if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined) return false;
|
|
389
370
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
390
|
-
if (!('fulfillmentsCount' in value) || value['fulfillmentsCount'] === undefined) return false;
|
|
391
|
-
if (!('latestFulfillment' in value) || value['latestFulfillment'] === undefined) return false;
|
|
392
371
|
if (!('customer' in value) || value['customer'] === undefined) return false;
|
|
393
372
|
if (!('admin' in value) || value['admin'] === undefined) return false;
|
|
394
373
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -443,12 +422,10 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
443
422
|
'totalOutstanding': json['totalOutstanding'],
|
|
444
423
|
'insuranceEstimate': json['insuranceEstimate'],
|
|
445
424
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
446
|
-
'fulfillmentsCount': json['fulfillmentsCount'],
|
|
447
|
-
'latestFulfillment': OrderFulfillmentResourceFromJSON(json['latestFulfillment']),
|
|
448
425
|
'customer': CustomerResourceFromJSON(json['customer']),
|
|
449
426
|
'admin': LiAdminUserLiteResourceFromJSON(json['admin']),
|
|
450
427
|
'status': OrderStatusLiteResourceFromJSON(json['status']),
|
|
451
|
-
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(
|
|
428
|
+
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(LineItemListResourceFromJSON)),
|
|
452
429
|
'coupons': (json['coupons'] == null ? null : (json['coupons'] as Array<any>).map(CartCouponResourceFromJSON)),
|
|
453
430
|
'discounts': (json['discounts'] == null ? null : (json['discounts'] as Array<any>).map(DiscountResourceFromJSON)),
|
|
454
431
|
'transactions': (json['transactions'] == null ? null : (json['transactions'] as Array<any>).map(TransactionLiteResourceFromJSON)),
|
|
@@ -500,12 +477,10 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
|
|
|
500
477
|
'totalOutstanding': value['totalOutstanding'],
|
|
501
478
|
'insuranceEstimate': value['insuranceEstimate'],
|
|
502
479
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
503
|
-
'fulfillmentsCount': value['fulfillmentsCount'],
|
|
504
|
-
'latestFulfillment': OrderFulfillmentResourceToJSON(value['latestFulfillment']),
|
|
505
480
|
'customer': CustomerResourceToJSON(value['customer']),
|
|
506
481
|
'admin': LiAdminUserLiteResourceToJSON(value['admin']),
|
|
507
482
|
'status': OrderStatusLiteResourceToJSON(value['status']),
|
|
508
|
-
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(
|
|
483
|
+
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
|
|
509
484
|
'coupons': (value['coupons'] == null ? null : (value['coupons'] as Array<any>).map(CartCouponResourceToJSON)),
|
|
510
485
|
'discounts': (value['discounts'] == null ? null : (value['discounts'] as Array<any>).map(DiscountResourceToJSON)),
|
|
511
486
|
'transactions': (value['transactions'] == null ? null : (value['transactions'] as Array<any>).map(TransactionLiteResourceToJSON)),
|
|
@@ -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
|
+
|