@digital8/lighting-illusions-ts-sdk 0.0.2031 → 0.0.2032
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 +8 -0
- package/README.md +7 -2
- package/dist/apis/ProductApi.d.ts +16 -0
- package/dist/apis/ProductApi.js +59 -0
- 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 +1 -3
- package/dist/models/AddressResource.d.ts +7 -1
- package/dist/models/AddressResource.js +5 -1
- package/dist/models/AdminNoteResource.d.ts +0 -12
- package/dist/models/AdminNoteResource.js +0 -8
- package/dist/models/AdminOrderResource.d.ts +3 -3
- package/dist/models/AdminOrderResource.js +3 -3
- package/dist/models/CartResource.d.ts +3 -3
- package/dist/models/CartResource.js +3 -3
- package/dist/models/CustomerListResource.d.ts +0 -7
- package/dist/models/CustomerListResource.js +0 -5
- package/dist/models/PaginatedTransactionListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedTransactionListResourceResponse.js +57 -0
- package/dist/models/SkuSearchProductChildRequest.d.ts +38 -0
- package/dist/models/SkuSearchProductChildRequest.js +55 -0
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/TransactionListResource.d.ts +116 -0
- package/dist/models/TransactionListResource.js +97 -0
- package/dist/models/TransactionListResourceArrayResponse.d.ts +33 -0
- package/dist/models/TransactionListResourceArrayResponse.js +50 -0
- package/dist/models/TransactionLiteResource.d.ts +6 -0
- package/dist/models/TransactionLiteResource.js +2 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/AddressResource.md +2 -0
- package/docs/AdminNoteResource.md +0 -4
- package/docs/AdminOrderResource.md +1 -1
- package/docs/CartResource.md +1 -1
- package/docs/CustomerListResource.md +0 -2
- package/docs/PaginatedTransactionListResourceResponse.md +36 -0
- package/docs/ProductApi.md +66 -0
- package/docs/SkuSearchProductChildRequest.md +36 -0
- package/docs/TransactionListResource.md +62 -0
- package/docs/TransactionListResourceArrayResponse.md +34 -0
- package/docs/TransactionLiteResource.md +2 -0
- package/docs/TransactionsApi.md +3 -3
- package/package.json +1 -1
- package/src/apis/ProductApi.ts +49 -0
- package/src/apis/TransactionsApi.ts +7 -7
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +11 -2
- package/src/models/AdminNoteResource.ts +0 -18
- package/src/models/AdminOrderResource.ts +11 -11
- package/src/models/CartResource.ts +11 -11
- package/src/models/CustomerListResource.ts +0 -16
- package/src/models/PaginatedTransactionListResourceResponse.ts +90 -0
- package/src/models/SkuSearchProductChildRequest.ts +75 -0
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/TransactionListResource.ts +187 -0
- package/src/models/TransactionListResourceArrayResponse.ts +73 -0
- package/src/models/TransactionLiteResource.ts +8 -0
- package/src/models/index.ts +4 -0
package/docs/ProductApi.md
CHANGED
|
@@ -22,6 +22,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
22
22
|
| [**showAttributesProductChild**](ProductApi.md#showattributesproductchild) | **POST** /admin-api/product/children/{productChild}/attributes | Auto-generated: showAttributesProductChild |
|
|
23
23
|
| [**showProduct**](ProductApi.md#showproduct) | **GET** /admin-api/product/parent/{product} | Auto-generated: showProduct |
|
|
24
24
|
| [**showProductChild**](ProductApi.md#showproductchild) | **GET** /admin-api/product/children/{productChild} | Auto-generated: showProductChild |
|
|
25
|
+
| [**skuSearchProductChild**](ProductApi.md#skusearchproductchildoperation) | **POST** /admin-api/product/children/sku-search | Auto-generated: skuSearchProductChild |
|
|
25
26
|
| [**storeProduct**](ProductApi.md#storeproduct) | **POST** /admin-api/product/parent/create | Auto-generated: storeProduct |
|
|
26
27
|
| [**storeProductChild**](ProductApi.md#storeproductchild) | **POST** /admin-api/product/children/create | Auto-generated: storeProductChild |
|
|
27
28
|
| [**updateProduct**](ProductApi.md#updateproductoperation) | **PUT** /admin-api/product/parent/{product}/update | Auto-generated: updateProduct |
|
|
@@ -1229,6 +1230,71 @@ No authorization required
|
|
|
1229
1230
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1230
1231
|
|
|
1231
1232
|
|
|
1233
|
+
## skuSearchProductChild
|
|
1234
|
+
|
|
1235
|
+
> ProductChildResource skuSearchProductChild(skuSearchProductChildRequest)
|
|
1236
|
+
|
|
1237
|
+
Auto-generated: skuSearchProductChild
|
|
1238
|
+
|
|
1239
|
+
### Example
|
|
1240
|
+
|
|
1241
|
+
```ts
|
|
1242
|
+
import {
|
|
1243
|
+
Configuration,
|
|
1244
|
+
ProductApi,
|
|
1245
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
1246
|
+
import type { SkuSearchProductChildOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
1247
|
+
|
|
1248
|
+
async function example() {
|
|
1249
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
1250
|
+
const api = new ProductApi();
|
|
1251
|
+
|
|
1252
|
+
const body = {
|
|
1253
|
+
// SkuSearchProductChildRequest (optional)
|
|
1254
|
+
skuSearchProductChildRequest: ...,
|
|
1255
|
+
} satisfies SkuSearchProductChildOperationRequest;
|
|
1256
|
+
|
|
1257
|
+
try {
|
|
1258
|
+
const data = await api.skuSearchProductChild(body);
|
|
1259
|
+
console.log(data);
|
|
1260
|
+
} catch (error) {
|
|
1261
|
+
console.error(error);
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
// Run the test
|
|
1266
|
+
example().catch(console.error);
|
|
1267
|
+
```
|
|
1268
|
+
|
|
1269
|
+
### Parameters
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
| Name | Type | Description | Notes |
|
|
1273
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1274
|
+
| **skuSearchProductChildRequest** | [SkuSearchProductChildRequest](SkuSearchProductChildRequest.md) | | [Optional] |
|
|
1275
|
+
|
|
1276
|
+
### Return type
|
|
1277
|
+
|
|
1278
|
+
[**ProductChildResource**](ProductChildResource.md)
|
|
1279
|
+
|
|
1280
|
+
### Authorization
|
|
1281
|
+
|
|
1282
|
+
No authorization required
|
|
1283
|
+
|
|
1284
|
+
### HTTP request headers
|
|
1285
|
+
|
|
1286
|
+
- **Content-Type**: `application/json`
|
|
1287
|
+
- **Accept**: `application/json`
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
### HTTP response details
|
|
1291
|
+
| Status code | Description | Response headers |
|
|
1292
|
+
|-------------|-------------|------------------|
|
|
1293
|
+
| **200** | Successful resource response | - |
|
|
1294
|
+
|
|
1295
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1296
|
+
|
|
1297
|
+
|
|
1232
1298
|
## storeProduct
|
|
1233
1299
|
|
|
1234
1300
|
> ProductResource storeProduct(createProductRequest)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# SkuSearchProductChildRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`sku` | string
|
|
10
|
+
`siteId` | number
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { SkuSearchProductChildRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"sku": null,
|
|
20
|
+
"siteId": null,
|
|
21
|
+
} satisfies SkuSearchProductChildRequest
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as SkuSearchProductChildRequest
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
# TransactionListResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`paymentSource` | string
|
|
11
|
+
`paymentMethod` | string
|
|
12
|
+
`type` | string
|
|
13
|
+
`status` | string
|
|
14
|
+
`totalAmount` | number
|
|
15
|
+
`surcharge` | number
|
|
16
|
+
`refundedAmount` | number
|
|
17
|
+
`unrefundedAmount` | number
|
|
18
|
+
`reference` | string
|
|
19
|
+
`description` | string
|
|
20
|
+
`extendedData` | string
|
|
21
|
+
`riskScore` | string
|
|
22
|
+
`fraudDecision` | string
|
|
23
|
+
`createdAt` | Date
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import type { TransactionListResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
29
|
+
|
|
30
|
+
// TODO: Update the object below with actual values
|
|
31
|
+
const example = {
|
|
32
|
+
"id": null,
|
|
33
|
+
"paymentSource": null,
|
|
34
|
+
"paymentMethod": null,
|
|
35
|
+
"type": null,
|
|
36
|
+
"status": null,
|
|
37
|
+
"totalAmount": null,
|
|
38
|
+
"surcharge": null,
|
|
39
|
+
"refundedAmount": null,
|
|
40
|
+
"unrefundedAmount": null,
|
|
41
|
+
"reference": null,
|
|
42
|
+
"description": null,
|
|
43
|
+
"extendedData": null,
|
|
44
|
+
"riskScore": null,
|
|
45
|
+
"fraudDecision": null,
|
|
46
|
+
"createdAt": null,
|
|
47
|
+
} satisfies TransactionListResource
|
|
48
|
+
|
|
49
|
+
console.log(example)
|
|
50
|
+
|
|
51
|
+
// Convert the instance to a JSON string
|
|
52
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
53
|
+
console.log(exampleJSON)
|
|
54
|
+
|
|
55
|
+
// Parse the JSON string back to an object
|
|
56
|
+
const exampleParsed = JSON.parse(exampleJSON) as TransactionListResource
|
|
57
|
+
console.log(exampleParsed)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
61
|
+
|
|
62
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# TransactionListResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<TransactionListResource>](TransactionListResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { TransactionListResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies TransactionListResourceArrayResponse
|
|
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 TransactionListResourceArrayResponse
|
|
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
|
+
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
+
`id` | number
|
|
9
10
|
`paymentSource` | string
|
|
10
11
|
`paymentMethod` | string
|
|
11
12
|
`paymentMethodThumbnail` | string
|
|
@@ -24,6 +25,7 @@ import type { TransactionLiteResource } from '@digital8/lighting-illusions-ts-sd
|
|
|
24
25
|
|
|
25
26
|
// TODO: Update the object below with actual values
|
|
26
27
|
const example = {
|
|
28
|
+
"id": null,
|
|
27
29
|
"paymentSource": null,
|
|
28
30
|
"paymentMethod": null,
|
|
29
31
|
"paymentMethodThumbnail": null,
|
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
|
+
> PaginatedTransactionListResourceResponse 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
|
+
[**PaginatedTransactionListResourceResponse**](PaginatedTransactionListResourceResponse.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<\\TransactionListResource[]>> | - |
|
|
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
|
|
package/package.json
CHANGED
package/src/apis/ProductApi.ts
CHANGED
|
@@ -118,6 +118,11 @@ 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';
|
|
121
126
|
import {
|
|
122
127
|
type UpdateProductChildRequest,
|
|
123
128
|
UpdateProductChildRequestFromJSON,
|
|
@@ -211,6 +216,10 @@ export interface ShowProductChildRequest {
|
|
|
211
216
|
productChild: number;
|
|
212
217
|
}
|
|
213
218
|
|
|
219
|
+
export interface SkuSearchProductChildOperationRequest {
|
|
220
|
+
skuSearchProductChildRequest?: SkuSearchProductChildRequest;
|
|
221
|
+
}
|
|
222
|
+
|
|
214
223
|
export interface StoreProductRequest {
|
|
215
224
|
createProductRequest?: CreateProductRequest;
|
|
216
225
|
}
|
|
@@ -1064,6 +1073,46 @@ export class ProductApi extends runtime.BaseAPI {
|
|
|
1064
1073
|
return await response.value();
|
|
1065
1074
|
}
|
|
1066
1075
|
|
|
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
|
+
|
|
1067
1116
|
/**
|
|
1068
1117
|
* Creates request options for storeProduct without sending the request
|
|
1069
1118
|
*/
|
|
@@ -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 PaginatedTransactionListResourceResponse,
|
|
23
|
+
PaginatedTransactionListResourceResponseFromJSON,
|
|
24
|
+
PaginatedTransactionListResourceResponseToJSON,
|
|
25
|
+
} from '../models/PaginatedTransactionListResourceResponse';
|
|
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<PaginatedTransactionListResourceResponse>> {
|
|
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) => PaginatedTransactionListResourceResponseFromJSON(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<PaginatedTransactionListResourceResponse> {
|
|
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 | null;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -74,7 +74,6 @@ 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;
|
|
78
77
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
78
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
80
79
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -95,7 +94,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
95
94
|
|
|
96
95
|
'company': json['company'] == null ? undefined : json['company'],
|
|
97
96
|
'line1': json['line1'],
|
|
98
|
-
'line2': json['line2'],
|
|
97
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
99
98
|
'postcode': json['postcode'],
|
|
100
99
|
'suburb': json['suburb'],
|
|
101
100
|
'country': json['country'],
|
|
@@ -25,6 +25,12 @@ 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;
|
|
28
34
|
/**
|
|
29
35
|
*
|
|
30
36
|
* @type {number}
|
|
@@ -54,7 +60,7 @@ export interface AddressResource {
|
|
|
54
60
|
* @type {string}
|
|
55
61
|
* @memberof AddressResource
|
|
56
62
|
*/
|
|
57
|
-
line2
|
|
63
|
+
line2: string;
|
|
58
64
|
/**
|
|
59
65
|
*
|
|
60
66
|
* @type {string}
|
|
@@ -93,6 +99,7 @@ export interface AddressResource {
|
|
|
93
99
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
94
100
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
95
101
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
102
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
96
103
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
97
104
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
98
105
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -112,11 +119,12 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
112
119
|
return {
|
|
113
120
|
|
|
114
121
|
'id': json['id'] == null ? undefined : json['id'],
|
|
122
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
115
123
|
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
116
124
|
'addresseeName': json['addresseeName'],
|
|
117
125
|
'company': json['company'] == null ? undefined : json['company'],
|
|
118
126
|
'line1': json['line1'],
|
|
119
|
-
'line2': json['line2']
|
|
127
|
+
'line2': json['line2'],
|
|
120
128
|
'postcode': json['postcode'],
|
|
121
129
|
'suburb': json['suburb'],
|
|
122
130
|
'country': json['country'],
|
|
@@ -137,6 +145,7 @@ export function AddressResourceToJSONTyped(value?: AddressResource | null, ignor
|
|
|
137
145
|
return {
|
|
138
146
|
|
|
139
147
|
'id': value['id'],
|
|
148
|
+
'type': value['type'],
|
|
140
149
|
'sourceAddressId': value['sourceAddressId'],
|
|
141
150
|
'addresseeName': value['addresseeName'],
|
|
142
151
|
'company': value['company'],
|
|
@@ -33,18 +33,6 @@ 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;
|
|
48
36
|
/**
|
|
49
37
|
*
|
|
50
38
|
* @type {string}
|
|
@@ -76,8 +64,6 @@ export interface AdminNoteResource {
|
|
|
76
64
|
*/
|
|
77
65
|
export function instanceOfAdminNoteResource(value: object): value is AdminNoteResource {
|
|
78
66
|
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;
|
|
81
67
|
if (!('note' in value) || value['note'] === undefined) return false;
|
|
82
68
|
if (!('admin' in value) || value['admin'] === undefined) return false;
|
|
83
69
|
return true;
|
|
@@ -94,8 +80,6 @@ export function AdminNoteResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
94
80
|
return {
|
|
95
81
|
|
|
96
82
|
'id': json['id'],
|
|
97
|
-
'orderId': json['orderId'],
|
|
98
|
-
'adminId': json['adminId'],
|
|
99
83
|
'note': json['note'],
|
|
100
84
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
101
85
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
@@ -115,8 +99,6 @@ export function AdminNoteResourceToJSONTyped(value?: AdminNoteResource | null, i
|
|
|
115
99
|
return {
|
|
116
100
|
|
|
117
101
|
'id': value['id'],
|
|
118
|
-
'orderId': value['orderId'],
|
|
119
|
-
'adminId': value['adminId'],
|
|
120
102
|
'note': value['note'],
|
|
121
103
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
122
104
|
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
@@ -55,6 +55,13 @@ 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';
|
|
58
65
|
import type { LiAdminUserLiteResource } from './LiAdminUserLiteResource';
|
|
59
66
|
import {
|
|
60
67
|
LiAdminUserLiteResourceFromJSON,
|
|
@@ -69,13 +76,6 @@ import {
|
|
|
69
76
|
OmnisendSyncLiteResourceToJSON,
|
|
70
77
|
OmnisendSyncLiteResourceToJSONTyped,
|
|
71
78
|
} 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 {CustomerResource}
|
|
300
300
|
* @memberof AdminOrderResource
|
|
301
301
|
*/
|
|
302
|
-
customer:
|
|
302
|
+
customer: CustomerResource | 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': CustomerResourceFromJSON(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': CustomerResourceToJSON(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)),
|
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
LineItemListResourceToJSON,
|
|
28
28
|
LineItemListResourceToJSONTyped,
|
|
29
29
|
} from './LineItemListResource';
|
|
30
|
+
import type { CustomerResource } from './CustomerResource';
|
|
31
|
+
import {
|
|
32
|
+
CustomerResourceFromJSON,
|
|
33
|
+
CustomerResourceFromJSONTyped,
|
|
34
|
+
CustomerResourceToJSON,
|
|
35
|
+
CustomerResourceToJSONTyped,
|
|
36
|
+
} from './CustomerResource';
|
|
30
37
|
import type { LiAdminUserLiteResource } from './LiAdminUserLiteResource';
|
|
31
38
|
import {
|
|
32
39
|
LiAdminUserLiteResourceFromJSON,
|
|
@@ -34,13 +41,6 @@ import {
|
|
|
34
41
|
LiAdminUserLiteResourceToJSON,
|
|
35
42
|
LiAdminUserLiteResourceToJSONTyped,
|
|
36
43
|
} from './LiAdminUserLiteResource';
|
|
37
|
-
import type { CustomerListResource } from './CustomerListResource';
|
|
38
|
-
import {
|
|
39
|
-
CustomerListResourceFromJSON,
|
|
40
|
-
CustomerListResourceFromJSONTyped,
|
|
41
|
-
CustomerListResourceToJSON,
|
|
42
|
-
CustomerListResourceToJSONTyped,
|
|
43
|
-
} from './CustomerListResource';
|
|
44
44
|
import type { AddressResource } from './AddressResource';
|
|
45
45
|
import {
|
|
46
46
|
AddressResourceFromJSON,
|
|
@@ -165,10 +165,10 @@ export interface CartResource {
|
|
|
165
165
|
site: SiteLiteResource | null;
|
|
166
166
|
/**
|
|
167
167
|
*
|
|
168
|
-
* @type {
|
|
168
|
+
* @type {CustomerResource}
|
|
169
169
|
* @memberof CartResource
|
|
170
170
|
*/
|
|
171
|
-
customer:
|
|
171
|
+
customer: CustomerResource | null;
|
|
172
172
|
/**
|
|
173
173
|
*
|
|
174
174
|
* @type {Array<LineItemListResource>}
|
|
@@ -321,7 +321,7 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
321
321
|
'useAsBillingAddress': json['useAsBillingAddress'],
|
|
322
322
|
'admin': LiAdminUserLiteResourceFromJSON(json['admin']),
|
|
323
323
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
324
|
-
'customer':
|
|
324
|
+
'customer': CustomerResourceFromJSON(json['customer']),
|
|
325
325
|
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(LineItemListResourceFromJSON)),
|
|
326
326
|
'coupons': json['coupons'],
|
|
327
327
|
'shippingAddress': AddressResourceFromJSON(json['shippingAddress']),
|
|
@@ -369,7 +369,7 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
|
|
|
369
369
|
'useAsBillingAddress': value['useAsBillingAddress'],
|
|
370
370
|
'admin': LiAdminUserLiteResourceToJSON(value['admin']),
|
|
371
371
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
372
|
-
'customer':
|
|
372
|
+
'customer': CustomerResourceToJSON(value['customer']),
|
|
373
373
|
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
|
|
374
374
|
'coupons': value['coupons'],
|
|
375
375
|
'shippingAddress': AddressResourceToJSON(value['shippingAddress']),
|
|
@@ -20,13 +20,6 @@ import {
|
|
|
20
20
|
SiteLiteResourceToJSON,
|
|
21
21
|
SiteLiteResourceToJSONTyped,
|
|
22
22
|
} from './SiteLiteResource';
|
|
23
|
-
import type { LiAddressResource } from './LiAddressResource';
|
|
24
|
-
import {
|
|
25
|
-
LiAddressResourceFromJSON,
|
|
26
|
-
LiAddressResourceFromJSONTyped,
|
|
27
|
-
LiAddressResourceToJSON,
|
|
28
|
-
LiAddressResourceToJSONTyped,
|
|
29
|
-
} from './LiAddressResource';
|
|
30
23
|
|
|
31
24
|
/**
|
|
32
25
|
*
|
|
@@ -70,12 +63,6 @@ export interface CustomerListResource {
|
|
|
70
63
|
* @memberof CustomerListResource
|
|
71
64
|
*/
|
|
72
65
|
site: SiteLiteResource | null;
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
* @type {Array<LiAddressResource>}
|
|
76
|
-
* @memberof CustomerListResource
|
|
77
|
-
*/
|
|
78
|
-
addresses: Array<LiAddressResource> | null;
|
|
79
66
|
}
|
|
80
67
|
|
|
81
68
|
/**
|
|
@@ -87,7 +74,6 @@ export function instanceOfCustomerListResource(value: object): value is Customer
|
|
|
87
74
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
88
75
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
89
76
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
90
|
-
if (!('addresses' in value) || value['addresses'] === undefined) return false;
|
|
91
77
|
return true;
|
|
92
78
|
}
|
|
93
79
|
|
|
@@ -107,7 +93,6 @@ export function CustomerListResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
107
93
|
'email': json['email'],
|
|
108
94
|
'phone': json['phone'],
|
|
109
95
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
110
|
-
'addresses': (json['addresses'] == null ? null : (json['addresses'] as Array<any>).map(LiAddressResourceFromJSON)),
|
|
111
96
|
};
|
|
112
97
|
}
|
|
113
98
|
|
|
@@ -128,7 +113,6 @@ export function CustomerListResourceToJSONTyped(value?: CustomerListResource | n
|
|
|
128
113
|
'email': value['email'],
|
|
129
114
|
'phone': value['phone'],
|
|
130
115
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
131
|
-
'addresses': (value['addresses'] == null ? null : (value['addresses'] as Array<any>).map(LiAddressResourceToJSON)),
|
|
132
116
|
};
|
|
133
117
|
}
|
|
134
118
|
|