@digital8/lighting-illusions-ts-sdk 0.0.2034 → 0.0.2036
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 -8
- package/README.md +12 -7
- package/dist/apis/OrdersApi.d.ts +15 -0
- package/dist/apis/OrdersApi.js +59 -0
- package/dist/apis/ProductApi.d.ts +0 -16
- package/dist/apis/ProductApi.js +0 -59
- package/dist/apis/TransactionsApi.d.ts +3 -3
- package/dist/apis/TransactionsApi.js +2 -2
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AddressResource.d.ts +1 -7
- package/dist/models/AddressResource.js +1 -5
- package/dist/models/AdminNoteResource.d.ts +12 -0
- package/dist/models/AdminNoteResource.js +8 -0
- package/dist/models/AdminOrderResource.d.ts +3 -3
- package/dist/models/AdminOrderResource.js +3 -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/CartResource.d.ts +3 -3
- package/dist/models/CartResource.js +3 -3
- package/dist/models/CreateTransactionRequest.d.ts +0 -6
- package/dist/models/CreateTransactionRequest.js +0 -2
- package/dist/models/CustomerListResource.d.ts +7 -0
- package/dist/models/CustomerListResource.js +5 -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 +168 -0
- package/dist/models/FrontendOrderResource.js +137 -0
- package/dist/models/FrontendOrderResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendOrderResourceArrayResponse.js +50 -0
- 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/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +6 -2
- package/dist/models/StoreListResource.d.ts +2 -2
- package/dist/models/StoreListResource.js +6 -2
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +3 -1
- package/dist/models/TransactionLiteResource.d.ts +0 -12
- package/dist/models/TransactionLiteResource.js +0 -4
- package/dist/models/UpdateOrderRequest.d.ts +0 -6
- package/dist/models/UpdateOrderRequest.js +0 -2
- package/dist/models/index.d.ts +9 -4
- package/dist/models/index.js +9 -4
- package/docs/AddressResource.md +0 -2
- package/docs/AdminNoteResource.md +4 -0
- package/docs/AdminOrderResource.md +1 -1
- package/docs/CartCouponLiteResource.md +42 -0
- package/docs/{TransactionListResourceArrayResponse.md → CartCouponLiteResourceArrayResponse.md} +5 -5
- package/docs/CartResource.md +1 -1
- package/docs/CreateTransactionRequest.md +0 -2
- package/docs/CustomerListResource.md +2 -0
- package/docs/FrontendCartResource.md +70 -0
- package/docs/{SkuSearchProductChildRequest.md → FrontendCartResourceArrayResponse.md} +6 -8
- package/docs/FrontendCartResourceCouponsInner.md +42 -0
- package/docs/FrontendLineItemResource.md +50 -0
- package/docs/{PaginatedTransactionListResourceResponse.md → FrontendLineItemResourceArrayResponse.md} +5 -7
- package/docs/FrontendOrderResource.md +78 -0
- package/docs/FrontendOrderResourceArrayResponse.md +34 -0
- package/docs/OrdersApi.md +66 -0
- package/docs/ProductApi.md +0 -66
- package/docs/ProductChildLineItemLiteResource.md +6 -0
- package/docs/StoreSpecialDateResource.md +1 -1
- package/docs/TransactionLiteResource.md +0 -4
- package/docs/TransactionsApi.md +3 -3
- package/docs/UpdateOrderRequest.md +0 -2
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +49 -0
- package/src/apis/ProductApi.ts +0 -49
- package/src/apis/TransactionsApi.ts +7 -7
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +2 -11
- package/src/models/AdminNoteResource.ts +18 -0
- package/src/models/AdminOrderResource.ts +11 -11
- package/src/models/CartCouponLiteResource.ts +102 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/CartResource.ts +11 -11
- package/src/models/CreateTransactionRequest.ts +0 -8
- package/src/models/CustomerListResource.ts +16 -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 +290 -0
- package/src/models/FrontendOrderResourceArrayResponse.ts +73 -0
- package/src/models/PaymentSource.ts +2 -1
- package/src/models/ProductChildLineItemLiteResource.ts +27 -0
- package/src/models/StoreFrontendResource.ts +6 -4
- package/src/models/StoreListResource.ts +6 -4
- package/src/models/StoreResource.ts +2 -3
- package/src/models/StoreSpecialDateResource.ts +4 -3
- package/src/models/TransactionLiteResource.ts +0 -16
- package/src/models/UpdateOrderRequest.ts +0 -8
- package/src/models/index.ts +9 -4
- package/dist/models/PaginatedTransactionListResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedTransactionListResourceResponse.js +0 -57
- package/dist/models/SkuSearchProductChildRequest.d.ts +0 -38
- package/dist/models/SkuSearchProductChildRequest.js +0 -55
- package/dist/models/TransactionListResource.d.ts +0 -116
- package/dist/models/TransactionListResource.js +0 -97
- package/dist/models/TransactionListResourceArrayResponse.d.ts +0 -33
- package/dist/models/TransactionListResourceArrayResponse.js +0 -50
- package/docs/TransactionListResource.md +0 -62
- package/src/models/PaginatedTransactionListResourceResponse.ts +0 -90
- package/src/models/SkuSearchProductChildRequest.ts +0 -75
- package/src/models/TransactionListResource.ts +0 -187
- package/src/models/TransactionListResourceArrayResponse.ts +0 -73
|
@@ -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,
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`id` | number
|
|
10
9
|
`paymentSource` | string
|
|
11
10
|
`paymentMethod` | string
|
|
12
11
|
`paymentMethodThumbnail` | string
|
|
@@ -16,7 +15,6 @@ Name | Type
|
|
|
16
15
|
`surcharge` | number
|
|
17
16
|
`totalAmount` | number
|
|
18
17
|
`reference` | string
|
|
19
|
-
`description` | string
|
|
20
18
|
`createdAt` | Date
|
|
21
19
|
|
|
22
20
|
## Example
|
|
@@ -26,7 +24,6 @@ import type { TransactionLiteResource } from '@digital8/lighting-illusions-ts-sd
|
|
|
26
24
|
|
|
27
25
|
// TODO: Update the object below with actual values
|
|
28
26
|
const example = {
|
|
29
|
-
"id": null,
|
|
30
27
|
"paymentSource": null,
|
|
31
28
|
"paymentMethod": null,
|
|
32
29
|
"paymentMethodThumbnail": null,
|
|
@@ -36,7 +33,6 @@ const example = {
|
|
|
36
33
|
"surcharge": null,
|
|
37
34
|
"totalAmount": null,
|
|
38
35
|
"reference": null,
|
|
39
|
-
"description": null,
|
|
40
36
|
"createdAt": null,
|
|
41
37
|
} satisfies TransactionLiteResource
|
|
42
38
|
|
package/docs/TransactionsApi.md
CHANGED
|
@@ -12,7 +12,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
12
12
|
|
|
13
13
|
## indexTransaction
|
|
14
14
|
|
|
15
|
-
>
|
|
15
|
+
> PaginatedTransactionResourceResponse indexTransaction(searchTransactionsRequest)
|
|
16
16
|
|
|
17
17
|
Auto-generated: indexTransaction
|
|
18
18
|
|
|
@@ -55,7 +55,7 @@ example().catch(console.error);
|
|
|
55
55
|
|
|
56
56
|
### Return type
|
|
57
57
|
|
|
58
|
-
[**
|
|
58
|
+
[**PaginatedTransactionResourceResponse**](PaginatedTransactionResourceResponse.md)
|
|
59
59
|
|
|
60
60
|
### Authorization
|
|
61
61
|
|
|
@@ -70,7 +70,7 @@ No authorization required
|
|
|
70
70
|
### HTTP response details
|
|
71
71
|
| Status code | Description | Response headers |
|
|
72
72
|
|-------------|-------------|------------------|
|
|
73
|
-
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\
|
|
73
|
+
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\TransactionResource[]>> | - |
|
|
74
74
|
|
|
75
75
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
76
76
|
|
|
@@ -15,7 +15,6 @@ Name | Type
|
|
|
15
15
|
`insuranceAmount` | number
|
|
16
16
|
`includeInsurance` | boolean
|
|
17
17
|
`overrideInsurance` | boolean
|
|
18
|
-
`useAsBillingAddress` | boolean
|
|
19
18
|
`shippingAddressId` | number
|
|
20
19
|
`billingAddressId` | number
|
|
21
20
|
`shippingAddress` | [CreateCartRequestShippingAddress](CreateCartRequestShippingAddress.md)
|
|
@@ -37,7 +36,6 @@ const example = {
|
|
|
37
36
|
"insuranceAmount": null,
|
|
38
37
|
"includeInsurance": null,
|
|
39
38
|
"overrideInsurance": null,
|
|
40
|
-
"useAsBillingAddress": null,
|
|
41
39
|
"shippingAddressId": null,
|
|
42
40
|
"billingAddressId": null,
|
|
43
41
|
"shippingAddress": null,
|
package/package.json
CHANGED
package/src/apis/OrdersApi.ts
CHANGED
|
@@ -106,6 +106,10 @@ export interface IndexOrderRequest {
|
|
|
106
106
|
searchOrdersRequest?: SearchOrdersRequest;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
export interface PdfOrderRequest {
|
|
110
|
+
order: number;
|
|
111
|
+
}
|
|
112
|
+
|
|
109
113
|
export interface SendPaymentLinkOrderRequest {
|
|
110
114
|
order: number;
|
|
111
115
|
}
|
|
@@ -452,6 +456,51 @@ export class OrdersApi extends runtime.BaseAPI {
|
|
|
452
456
|
return await response.value();
|
|
453
457
|
}
|
|
454
458
|
|
|
459
|
+
/**
|
|
460
|
+
* Creates request options for pdfOrder without sending the request
|
|
461
|
+
*/
|
|
462
|
+
async pdfOrderRequestOpts(requestParameters: PdfOrderRequest): Promise<runtime.RequestOpts> {
|
|
463
|
+
if (requestParameters['order'] == null) {
|
|
464
|
+
throw new runtime.RequiredError(
|
|
465
|
+
'order',
|
|
466
|
+
'Required parameter "order" was null or undefined when calling pdfOrder().'
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
const queryParameters: any = {};
|
|
471
|
+
|
|
472
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
let urlPath = `/admin-api/orders/{order}/pdf`;
|
|
476
|
+
urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
|
|
477
|
+
|
|
478
|
+
return {
|
|
479
|
+
path: urlPath,
|
|
480
|
+
method: 'POST',
|
|
481
|
+
headers: headerParameters,
|
|
482
|
+
query: queryParameters,
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Auto-generated: pdfOrder
|
|
488
|
+
*/
|
|
489
|
+
async pdfOrderRaw(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
490
|
+
const requestOptions = await this.pdfOrderRequestOpts(requestParameters);
|
|
491
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
492
|
+
|
|
493
|
+
return new runtime.BlobApiResponse(response);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Auto-generated: pdfOrder
|
|
498
|
+
*/
|
|
499
|
+
async pdfOrder(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
500
|
+
const response = await this.pdfOrderRaw(requestParameters, initOverrides);
|
|
501
|
+
return await response.value();
|
|
502
|
+
}
|
|
503
|
+
|
|
455
504
|
/**
|
|
456
505
|
* Creates request options for sendPaymentLinkOrder without sending the request
|
|
457
506
|
*/
|
package/src/apis/ProductApi.ts
CHANGED
|
@@ -118,11 +118,6 @@ import {
|
|
|
118
118
|
ShowProductChildAssetsRequestFromJSON,
|
|
119
119
|
ShowProductChildAssetsRequestToJSON,
|
|
120
120
|
} from '../models/ShowProductChildAssetsRequest';
|
|
121
|
-
import {
|
|
122
|
-
type SkuSearchProductChildRequest,
|
|
123
|
-
SkuSearchProductChildRequestFromJSON,
|
|
124
|
-
SkuSearchProductChildRequestToJSON,
|
|
125
|
-
} from '../models/SkuSearchProductChildRequest';
|
|
126
121
|
import {
|
|
127
122
|
type UpdateProductChildRequest,
|
|
128
123
|
UpdateProductChildRequestFromJSON,
|
|
@@ -216,10 +211,6 @@ export interface ShowProductChildRequest {
|
|
|
216
211
|
productChild: number;
|
|
217
212
|
}
|
|
218
213
|
|
|
219
|
-
export interface SkuSearchProductChildOperationRequest {
|
|
220
|
-
skuSearchProductChildRequest?: SkuSearchProductChildRequest;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
214
|
export interface StoreProductRequest {
|
|
224
215
|
createProductRequest?: CreateProductRequest;
|
|
225
216
|
}
|
|
@@ -1073,46 +1064,6 @@ export class ProductApi extends runtime.BaseAPI {
|
|
|
1073
1064
|
return await response.value();
|
|
1074
1065
|
}
|
|
1075
1066
|
|
|
1076
|
-
/**
|
|
1077
|
-
* Creates request options for skuSearchProductChild without sending the request
|
|
1078
|
-
*/
|
|
1079
|
-
async skuSearchProductChildRequestOpts(requestParameters: SkuSearchProductChildOperationRequest): Promise<runtime.RequestOpts> {
|
|
1080
|
-
const queryParameters: any = {};
|
|
1081
|
-
|
|
1082
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1083
|
-
|
|
1084
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
let urlPath = `/admin-api/product/children/sku-search`;
|
|
1088
|
-
|
|
1089
|
-
return {
|
|
1090
|
-
path: urlPath,
|
|
1091
|
-
method: 'POST',
|
|
1092
|
-
headers: headerParameters,
|
|
1093
|
-
query: queryParameters,
|
|
1094
|
-
body: SkuSearchProductChildRequestToJSON(requestParameters['skuSearchProductChildRequest']),
|
|
1095
|
-
};
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
/**
|
|
1099
|
-
* Auto-generated: skuSearchProductChild
|
|
1100
|
-
*/
|
|
1101
|
-
async skuSearchProductChildRaw(requestParameters: SkuSearchProductChildOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductChildResource>> {
|
|
1102
|
-
const requestOptions = await this.skuSearchProductChildRequestOpts(requestParameters);
|
|
1103
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
1104
|
-
|
|
1105
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ProductChildResourceFromJSON(jsonValue));
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* Auto-generated: skuSearchProductChild
|
|
1110
|
-
*/
|
|
1111
|
-
async skuSearchProductChild(requestParameters: SkuSearchProductChildOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductChildResource> {
|
|
1112
|
-
const response = await this.skuSearchProductChildRaw(requestParameters, initOverrides);
|
|
1113
|
-
return await response.value();
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
1067
|
/**
|
|
1117
1068
|
* Creates request options for storeProduct without sending the request
|
|
1118
1069
|
*/
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
CreateTransactionRequestToJSON,
|
|
20
20
|
} from '../models/CreateTransactionRequest';
|
|
21
21
|
import {
|
|
22
|
-
type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} from '../models/
|
|
22
|
+
type PaginatedTransactionResourceResponse,
|
|
23
|
+
PaginatedTransactionResourceResponseFromJSON,
|
|
24
|
+
PaginatedTransactionResourceResponseToJSON,
|
|
25
|
+
} from '../models/PaginatedTransactionResourceResponse';
|
|
26
26
|
import {
|
|
27
27
|
type RefundTransactionRequest,
|
|
28
28
|
RefundTransactionRequestFromJSON,
|
|
@@ -87,17 +87,17 @@ export class TransactionsApi extends runtime.BaseAPI {
|
|
|
87
87
|
/**
|
|
88
88
|
* Auto-generated: indexTransaction
|
|
89
89
|
*/
|
|
90
|
-
async indexTransactionRaw(requestParameters: IndexTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
90
|
+
async indexTransactionRaw(requestParameters: IndexTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTransactionResourceResponse>> {
|
|
91
91
|
const requestOptions = await this.indexTransactionRequestOpts(requestParameters);
|
|
92
92
|
const response = await this.request(requestOptions, initOverrides);
|
|
93
93
|
|
|
94
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
94
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTransactionResourceResponseFromJSON(jsonValue));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Auto-generated: indexTransaction
|
|
99
99
|
*/
|
|
100
|
-
async indexTransaction(requestParameters: IndexTransactionRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
100
|
+
async indexTransaction(requestParameters: IndexTransactionRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTransactionResourceResponse> {
|
|
101
101
|
const response = await this.indexTransactionRaw(requestParameters, initOverrides);
|
|
102
102
|
return await response.value();
|
|
103
103
|
}
|
|
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressFrontendResource
|
|
38
38
|
*/
|
|
39
|
-
line2
|
|
39
|
+
line2: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -74,6 +74,7 @@ export interface AddressFrontendResource {
|
|
|
74
74
|
*/
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
76
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
77
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
77
78
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
78
79
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
79
80
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -94,7 +95,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
94
95
|
|
|
95
96
|
'company': json['company'] == null ? undefined : json['company'],
|
|
96
97
|
'line1': json['line1'],
|
|
97
|
-
'line2': json['line2']
|
|
98
|
+
'line2': json['line2'],
|
|
98
99
|
'postcode': json['postcode'],
|
|
99
100
|
'suburb': json['suburb'],
|
|
100
101
|
'country': json['country'],
|
|
@@ -25,12 +25,6 @@ export interface AddressResource {
|
|
|
25
25
|
* @memberof AddressResource
|
|
26
26
|
*/
|
|
27
27
|
id?: number | null;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof AddressResource
|
|
32
|
-
*/
|
|
33
|
-
type?: string | null;
|
|
34
28
|
/**
|
|
35
29
|
*
|
|
36
30
|
* @type {number}
|
|
@@ -42,7 +36,7 @@ export interface AddressResource {
|
|
|
42
36
|
* @type {string}
|
|
43
37
|
* @memberof AddressResource
|
|
44
38
|
*/
|
|
45
|
-
addresseeName
|
|
39
|
+
addresseeName?: string | null;
|
|
46
40
|
/**
|
|
47
41
|
*
|
|
48
42
|
* @type {string}
|
|
@@ -97,7 +91,6 @@ export interface AddressResource {
|
|
|
97
91
|
* Check if a given object implements the AddressResource interface.
|
|
98
92
|
*/
|
|
99
93
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
100
|
-
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
101
94
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
102
95
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
103
96
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
@@ -119,9 +112,8 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
119
112
|
return {
|
|
120
113
|
|
|
121
114
|
'id': json['id'] == null ? undefined : json['id'],
|
|
122
|
-
'type': json['type'] == null ? undefined : json['type'],
|
|
123
115
|
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
124
|
-
'addresseeName': json['addresseeName'],
|
|
116
|
+
'addresseeName': json['addresseeName'] == null ? undefined : json['addresseeName'],
|
|
125
117
|
'company': json['company'],
|
|
126
118
|
'line1': json['line1'],
|
|
127
119
|
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
@@ -145,7 +137,6 @@ export function AddressResourceToJSONTyped(value?: AddressResource | null, ignor
|
|
|
145
137
|
return {
|
|
146
138
|
|
|
147
139
|
'id': value['id'],
|
|
148
|
-
'type': value['type'],
|
|
149
140
|
'sourceAddressId': value['sourceAddressId'],
|
|
150
141
|
'addresseeName': value['addresseeName'],
|
|
151
142
|
'company': value['company'],
|
|
@@ -33,6 +33,18 @@ export interface AdminNoteResource {
|
|
|
33
33
|
* @memberof AdminNoteResource
|
|
34
34
|
*/
|
|
35
35
|
id: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof AdminNoteResource
|
|
40
|
+
*/
|
|
41
|
+
orderId: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof AdminNoteResource
|
|
46
|
+
*/
|
|
47
|
+
adminId: number;
|
|
36
48
|
/**
|
|
37
49
|
*
|
|
38
50
|
* @type {string}
|
|
@@ -64,6 +76,8 @@ export interface AdminNoteResource {
|
|
|
64
76
|
*/
|
|
65
77
|
export function instanceOfAdminNoteResource(value: object): value is AdminNoteResource {
|
|
66
78
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
79
|
+
if (!('orderId' in value) || value['orderId'] === undefined) return false;
|
|
80
|
+
if (!('adminId' in value) || value['adminId'] === undefined) return false;
|
|
67
81
|
if (!('note' in value) || value['note'] === undefined) return false;
|
|
68
82
|
if (!('admin' in value) || value['admin'] === undefined) return false;
|
|
69
83
|
return true;
|
|
@@ -80,6 +94,8 @@ export function AdminNoteResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
80
94
|
return {
|
|
81
95
|
|
|
82
96
|
'id': json['id'],
|
|
97
|
+
'orderId': json['orderId'],
|
|
98
|
+
'adminId': json['adminId'],
|
|
83
99
|
'note': json['note'],
|
|
84
100
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
85
101
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
@@ -99,6 +115,8 @@ export function AdminNoteResourceToJSONTyped(value?: AdminNoteResource | null, i
|
|
|
99
115
|
return {
|
|
100
116
|
|
|
101
117
|
'id': value['id'],
|
|
118
|
+
'orderId': value['orderId'],
|
|
119
|
+
'adminId': value['adminId'],
|
|
102
120
|
'note': value['note'],
|
|
103
121
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
104
122
|
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
@@ -55,13 +55,6 @@ import {
|
|
|
55
55
|
CartCouponResourceToJSON,
|
|
56
56
|
CartCouponResourceToJSONTyped,
|
|
57
57
|
} from './CartCouponResource';
|
|
58
|
-
import type { CustomerResource } from './CustomerResource';
|
|
59
|
-
import {
|
|
60
|
-
CustomerResourceFromJSON,
|
|
61
|
-
CustomerResourceFromJSONTyped,
|
|
62
|
-
CustomerResourceToJSON,
|
|
63
|
-
CustomerResourceToJSONTyped,
|
|
64
|
-
} from './CustomerResource';
|
|
65
58
|
import type { LiAdminUserLiteResource } from './LiAdminUserLiteResource';
|
|
66
59
|
import {
|
|
67
60
|
LiAdminUserLiteResourceFromJSON,
|
|
@@ -76,6 +69,13 @@ import {
|
|
|
76
69
|
OmnisendSyncLiteResourceToJSON,
|
|
77
70
|
OmnisendSyncLiteResourceToJSONTyped,
|
|
78
71
|
} from './OmnisendSyncLiteResource';
|
|
72
|
+
import type { CustomerListResource } from './CustomerListResource';
|
|
73
|
+
import {
|
|
74
|
+
CustomerListResourceFromJSON,
|
|
75
|
+
CustomerListResourceFromJSONTyped,
|
|
76
|
+
CustomerListResourceToJSON,
|
|
77
|
+
CustomerListResourceToJSONTyped,
|
|
78
|
+
} from './CustomerListResource';
|
|
79
79
|
import type { AddressResource } from './AddressResource';
|
|
80
80
|
import {
|
|
81
81
|
AddressResourceFromJSON,
|
|
@@ -296,10 +296,10 @@ export interface AdminOrderResource {
|
|
|
296
296
|
site: SiteLiteResource | null;
|
|
297
297
|
/**
|
|
298
298
|
*
|
|
299
|
-
* @type {
|
|
299
|
+
* @type {CustomerListResource}
|
|
300
300
|
* @memberof AdminOrderResource
|
|
301
301
|
*/
|
|
302
|
-
customer:
|
|
302
|
+
customer: CustomerListResource | null;
|
|
303
303
|
/**
|
|
304
304
|
*
|
|
305
305
|
* @type {LiAdminUserLiteResource}
|
|
@@ -446,7 +446,7 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
446
446
|
'shippingEstimate': json['shippingEstimate'],
|
|
447
447
|
'insuranceEstimate': json['insuranceEstimate'],
|
|
448
448
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
449
|
-
'customer':
|
|
449
|
+
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
450
450
|
'admin': LiAdminUserLiteResourceFromJSON(json['admin']),
|
|
451
451
|
'status': OrderStatusLiteResourceFromJSON(json['status']),
|
|
452
452
|
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(LineItemListResourceFromJSON)),
|
|
@@ -504,7 +504,7 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
|
|
|
504
504
|
'shippingEstimate': value['shippingEstimate'],
|
|
505
505
|
'insuranceEstimate': value['insuranceEstimate'],
|
|
506
506
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
507
|
-
'customer':
|
|
507
|
+
'customer': CustomerListResourceToJSON(value['customer']),
|
|
508
508
|
'admin': LiAdminUserLiteResourceToJSON(value['admin']),
|
|
509
509
|
'status': OrderStatusLiteResourceToJSON(value['status']),
|
|
510
510
|
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
|
|
@@ -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
|
+
|