@digital8/lighting-illusions-ts-sdk 0.0.2267 → 0.0.2268
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 +10 -0
- package/README.md +7 -2
- package/dist/apis/ProductClassApi.d.ts +34 -0
- package/dist/apis/ProductClassApi.js +139 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/CategoryAutomationFieldType.d.ts +2 -0
- package/dist/models/CategoryAutomationFieldType.js +3 -1
- package/dist/models/CreateProductCategoryRequestAutomationRulesInner.d.ts +2 -0
- package/dist/models/CreateProductCategoryRequestAutomationRulesInner.js +3 -1
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/FrontendCartResource.d.ts +0 -18
- package/dist/models/FrontendCartResource.js +0 -12
- package/dist/models/OrderFulfillmentResource.d.ts +2 -2
- package/dist/models/OrderFulfillmentResource.js +4 -4
- package/dist/models/PaginatedProductClassLiteResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedProductClassLiteResourceResponse.js +57 -0
- package/dist/models/ProductClassLiteResource.d.ts +44 -0
- package/dist/models/ProductClassLiteResource.js +57 -0
- package/dist/models/ProductClassLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductClassLiteResourceArrayResponse.js +50 -0
- package/dist/models/ProductClassResource.d.ts +2 -2
- package/dist/models/SearchAllProductClassesRequest.d.ts +78 -0
- package/dist/models/SearchAllProductClassesRequest.js +74 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +1 -3
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/FrontendCartResource.md +0 -6
- package/docs/PaginatedProductClassLiteResourceResponse.md +36 -0
- package/docs/ProductClassApi.md +74 -0
- package/docs/ProductClassLiteResource.md +38 -0
- package/docs/ProductClassLiteResourceArrayResponse.md +34 -0
- package/docs/ProductClassResource.md +1 -1
- package/docs/SearchAllProductClassesRequest.md +44 -0
- package/package.json +1 -1
- package/src/apis/ProductClassApi.ts +76 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +3 -2
- package/src/models/CategoryAutomationFieldType.ts +3 -1
- package/src/models/CreateProductCategoryRequestAutomationRulesInner.ts +3 -1
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/FrontendCartResource.ts +0 -27
- package/src/models/OrderFulfillmentResource.ts +5 -5
- package/src/models/PaginatedProductClassLiteResourceResponse.ts +90 -0
- package/src/models/ProductClassLiteResource.ts +83 -0
- package/src/models/ProductClassLiteResourceArrayResponse.ts +73 -0
- package/src/models/ProductClassResource.ts +2 -2
- package/src/models/SearchAllProductClassesRequest.ts +125 -0
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +3 -2
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# ProductClassApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**getAllProductClass**](ProductClassApi.md#getallproductclass) | **POST** /admin-api/product-class/all | Auto-generated: getAllProductClass |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## getAllProductClass
|
|
12
|
+
|
|
13
|
+
> ProductClassLiteResourceArrayResponse getAllProductClass(searchAllProductClassesRequest)
|
|
14
|
+
|
|
15
|
+
Auto-generated: getAllProductClass
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {
|
|
21
|
+
Configuration,
|
|
22
|
+
ProductClassApi,
|
|
23
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
24
|
+
import type { GetAllProductClassRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
25
|
+
|
|
26
|
+
async function example() {
|
|
27
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
28
|
+
const api = new ProductClassApi();
|
|
29
|
+
|
|
30
|
+
const body = {
|
|
31
|
+
// SearchAllProductClassesRequest (optional)
|
|
32
|
+
searchAllProductClassesRequest: ...,
|
|
33
|
+
} satisfies GetAllProductClassRequest;
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const data = await api.getAllProductClass(body);
|
|
37
|
+
console.log(data);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Run the test
|
|
44
|
+
example().catch(console.error);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Parameters
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
| Name | Type | Description | Notes |
|
|
51
|
+
|------------- | ------------- | ------------- | -------------|
|
|
52
|
+
| **searchAllProductClassesRequest** | [SearchAllProductClassesRequest](SearchAllProductClassesRequest.md) | | [Optional] |
|
|
53
|
+
|
|
54
|
+
### Return type
|
|
55
|
+
|
|
56
|
+
[**ProductClassLiteResourceArrayResponse**](ProductClassLiteResourceArrayResponse.md)
|
|
57
|
+
|
|
58
|
+
### Authorization
|
|
59
|
+
|
|
60
|
+
No authorization required
|
|
61
|
+
|
|
62
|
+
### HTTP request headers
|
|
63
|
+
|
|
64
|
+
- **Content-Type**: `application/json`
|
|
65
|
+
- **Accept**: `application/json`
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### HTTP response details
|
|
69
|
+
| Status code | Description | Response headers |
|
|
70
|
+
|-------------|-------------|------------------|
|
|
71
|
+
| **200** | Successful resource response | - |
|
|
72
|
+
|
|
73
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
74
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ProductClassLiteResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`name` | string
|
|
11
|
+
`pathString` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ProductClassLiteResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"id": null,
|
|
21
|
+
"name": null,
|
|
22
|
+
"pathString": null,
|
|
23
|
+
} satisfies ProductClassLiteResource
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as ProductClassLiteResource
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ProductClassLiteResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<ProductClassLiteResource>](ProductClassLiteResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ProductClassLiteResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies ProductClassLiteResourceArrayResponse
|
|
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 ProductClassLiteResourceArrayResponse
|
|
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
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
# SearchAllProductClassesRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`search` | string
|
|
10
|
+
`sortBy` | string
|
|
11
|
+
`sortDirection` | string
|
|
12
|
+
`relatedId` | number
|
|
13
|
+
`relatedType` | string
|
|
14
|
+
`includesRelations` | boolean
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { SearchAllProductClassesRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"search": null,
|
|
24
|
+
"sortBy": null,
|
|
25
|
+
"sortDirection": null,
|
|
26
|
+
"relatedId": null,
|
|
27
|
+
"relatedType": null,
|
|
28
|
+
"includesRelations": null,
|
|
29
|
+
} satisfies SearchAllProductClassesRequest
|
|
30
|
+
|
|
31
|
+
console.log(example)
|
|
32
|
+
|
|
33
|
+
// Convert the instance to a JSON string
|
|
34
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
35
|
+
console.log(exampleJSON)
|
|
36
|
+
|
|
37
|
+
// Parse the JSON string back to an object
|
|
38
|
+
const exampleParsed = JSON.parse(exampleJSON) as SearchAllProductClassesRequest
|
|
39
|
+
console.log(exampleParsed)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
43
|
+
|
|
44
|
+
|
package/package.json
CHANGED
|
@@ -0,0 +1,76 @@
|
|
|
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 * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type ProductClassLiteResourceArrayResponse,
|
|
18
|
+
ProductClassLiteResourceArrayResponseFromJSON,
|
|
19
|
+
ProductClassLiteResourceArrayResponseToJSON,
|
|
20
|
+
} from '../models/ProductClassLiteResourceArrayResponse';
|
|
21
|
+
import {
|
|
22
|
+
type SearchAllProductClassesRequest,
|
|
23
|
+
SearchAllProductClassesRequestFromJSON,
|
|
24
|
+
SearchAllProductClassesRequestToJSON,
|
|
25
|
+
} from '../models/SearchAllProductClassesRequest';
|
|
26
|
+
|
|
27
|
+
export interface GetAllProductClassRequest {
|
|
28
|
+
searchAllProductClassesRequest?: SearchAllProductClassesRequest;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export class ProductClassApi extends runtime.BaseAPI {
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Creates request options for getAllProductClass without sending the request
|
|
38
|
+
*/
|
|
39
|
+
async getAllProductClassRequestOpts(requestParameters: GetAllProductClassRequest): Promise<runtime.RequestOpts> {
|
|
40
|
+
const queryParameters: any = {};
|
|
41
|
+
|
|
42
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
43
|
+
|
|
44
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
let urlPath = `/admin-api/product-class/all`;
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
path: urlPath,
|
|
51
|
+
method: 'POST',
|
|
52
|
+
headers: headerParameters,
|
|
53
|
+
query: queryParameters,
|
|
54
|
+
body: SearchAllProductClassesRequestToJSON(requestParameters['searchAllProductClassesRequest']),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Auto-generated: getAllProductClass
|
|
60
|
+
*/
|
|
61
|
+
async getAllProductClassRaw(requestParameters: GetAllProductClassRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductClassLiteResourceArrayResponse>> {
|
|
62
|
+
const requestOptions = await this.getAllProductClassRequestOpts(requestParameters);
|
|
63
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
64
|
+
|
|
65
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductClassLiteResourceArrayResponseFromJSON(jsonValue));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Auto-generated: getAllProductClass
|
|
70
|
+
*/
|
|
71
|
+
async getAllProductClass(requestParameters: GetAllProductClassRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductClassLiteResourceArrayResponse> {
|
|
72
|
+
const response = await this.getAllProductClassRaw(requestParameters, initOverrides);
|
|
73
|
+
return await response.value();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './PageApi';
|
|
|
20
20
|
export * from './PageComponentApi';
|
|
21
21
|
export * from './ProductApi';
|
|
22
22
|
export * from './ProductCategoryApi';
|
|
23
|
+
export * from './ProductClassApi';
|
|
23
24
|
export * from './ProductRangeApi';
|
|
24
25
|
export * from './ProductRegistrationApi';
|
|
25
26
|
export * from './ProductTypeApi';
|
|
@@ -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}
|
|
@@ -75,6 +75,7 @@ export interface AddressFrontendResource {
|
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
76
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
77
77
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
78
79
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
80
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
80
81
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -95,7 +96,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
95
96
|
|
|
96
97
|
'company': json['company'],
|
|
97
98
|
'line1': json['line1'],
|
|
98
|
-
'line2': json['line2']
|
|
99
|
+
'line2': json['line2'],
|
|
99
100
|
'postcode': json['postcode'],
|
|
100
101
|
'suburb': json['suburb'],
|
|
101
102
|
'country': json['country'],
|
|
@@ -60,7 +60,7 @@ export interface AddressResource {
|
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof AddressResource
|
|
62
62
|
*/
|
|
63
|
-
line2
|
|
63
|
+
line2: string;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
@@ -100,6 +100,7 @@ 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;
|
|
103
104
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
104
105
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
105
106
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -124,7 +125,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
124
125
|
'addresseeName': json['addresseeName'],
|
|
125
126
|
'company': json['company'],
|
|
126
127
|
'line1': json['line1'],
|
|
127
|
-
'line2': json['line2']
|
|
128
|
+
'line2': json['line2'],
|
|
128
129
|
'postcode': json['postcode'],
|
|
129
130
|
'suburb': json['suburb'],
|
|
130
131
|
'country': json['country'],
|
|
@@ -24,7 +24,9 @@ export const CategoryAutomationFieldType = {
|
|
|
24
24
|
Attribute: 'attribute',
|
|
25
25
|
Tag: 'tag',
|
|
26
26
|
Supplier: 'supplier',
|
|
27
|
-
Label: 'label'
|
|
27
|
+
Label: 'label',
|
|
28
|
+
ProductType: 'product_type',
|
|
29
|
+
ProductClass: 'product_class'
|
|
28
30
|
} as const;
|
|
29
31
|
export type CategoryAutomationFieldType = typeof CategoryAutomationFieldType[keyof typeof CategoryAutomationFieldType];
|
|
30
32
|
|
|
@@ -68,7 +68,9 @@ export const CreateProductCategoryRequestAutomationRulesInnerFieldTypeEnum = {
|
|
|
68
68
|
Attribute: 'attribute',
|
|
69
69
|
Tag: 'tag',
|
|
70
70
|
Supplier: 'supplier',
|
|
71
|
-
Label: 'label'
|
|
71
|
+
Label: 'label',
|
|
72
|
+
ProductType: 'product_type',
|
|
73
|
+
ProductClass: 'product_class'
|
|
72
74
|
} as const;
|
|
73
75
|
export type CreateProductCategoryRequestAutomationRulesInnerFieldTypeEnum = typeof CreateProductCategoryRequestAutomationRulesInnerFieldTypeEnum[keyof typeof CreateProductCategoryRequestAutomationRulesInnerFieldTypeEnum];
|
|
74
76
|
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload?: string | null;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,7 +106,6 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
|
|
|
106
106
|
if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
|
|
107
107
|
if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
|
|
108
108
|
if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
|
|
109
|
-
if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
|
|
110
109
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
111
110
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
112
111
|
return true;
|
|
@@ -129,7 +128,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
129
128
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
130
129
|
'endpoint': json['endpoint'],
|
|
131
130
|
'responseCode': json['responseCode'],
|
|
132
|
-
'requestPayload': json['requestPayload'],
|
|
131
|
+
'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
|
|
133
132
|
'responsePayload': json['responsePayload'],
|
|
134
133
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
135
134
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
@@ -120,12 +120,6 @@ export interface FrontendCartResource {
|
|
|
120
120
|
* @memberof FrontendCartResource
|
|
121
121
|
*/
|
|
122
122
|
subtotal: number;
|
|
123
|
-
/**
|
|
124
|
-
*
|
|
125
|
-
* @type {number}
|
|
126
|
-
* @memberof FrontendCartResource
|
|
127
|
-
*/
|
|
128
|
-
subtotalAfterDiscounts: number;
|
|
129
123
|
/**
|
|
130
124
|
*
|
|
131
125
|
* @type {number}
|
|
@@ -156,18 +150,6 @@ export interface FrontendCartResource {
|
|
|
156
150
|
* @memberof FrontendCartResource
|
|
157
151
|
*/
|
|
158
152
|
transitInsurance: number;
|
|
159
|
-
/**
|
|
160
|
-
*
|
|
161
|
-
* @type {number}
|
|
162
|
-
* @memberof FrontendCartResource
|
|
163
|
-
*/
|
|
164
|
-
deliveryShippingQuote: number;
|
|
165
|
-
/**
|
|
166
|
-
*
|
|
167
|
-
* @type {number}
|
|
168
|
-
* @memberof FrontendCartResource
|
|
169
|
-
*/
|
|
170
|
-
transitInsuranceQuote: number;
|
|
171
153
|
/**
|
|
172
154
|
*
|
|
173
155
|
* @type {number}
|
|
@@ -195,14 +177,11 @@ export function instanceOfFrontendCartResource(value: object): value is Frontend
|
|
|
195
177
|
if (!('lineItems' in value) || value['lineItems'] === undefined) return false;
|
|
196
178
|
if (!('coupons' in value) || value['coupons'] === undefined) return false;
|
|
197
179
|
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
198
|
-
if (!('subtotalAfterDiscounts' in value) || value['subtotalAfterDiscounts'] === undefined) return false;
|
|
199
180
|
if (!('promotionalDiscount' in value) || value['promotionalDiscount'] === undefined) return false;
|
|
200
181
|
if (!('couponSubtotalDiscount' in value) || value['couponSubtotalDiscount'] === undefined) return false;
|
|
201
182
|
if (!('couponShippingDiscount' in value) || value['couponShippingDiscount'] === undefined) return false;
|
|
202
183
|
if (!('shipping' in value) || value['shipping'] === undefined) return false;
|
|
203
184
|
if (!('transitInsurance' in value) || value['transitInsurance'] === undefined) return false;
|
|
204
|
-
if (!('deliveryShippingQuote' in value) || value['deliveryShippingQuote'] === undefined) return false;
|
|
205
|
-
if (!('transitInsuranceQuote' in value) || value['transitInsuranceQuote'] === undefined) return false;
|
|
206
185
|
if (!('gst' in value) || value['gst'] === undefined) return false;
|
|
207
186
|
if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
|
|
208
187
|
return true;
|
|
@@ -230,14 +209,11 @@ export function FrontendCartResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
230
209
|
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(FrontendLineItemResourceFromJSON)),
|
|
231
210
|
'coupons': ((json['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerFromJSON)),
|
|
232
211
|
'subtotal': json['subtotal'],
|
|
233
|
-
'subtotalAfterDiscounts': json['subtotalAfterDiscounts'],
|
|
234
212
|
'promotionalDiscount': json['promotionalDiscount'],
|
|
235
213
|
'couponSubtotalDiscount': json['couponSubtotalDiscount'],
|
|
236
214
|
'couponShippingDiscount': json['couponShippingDiscount'],
|
|
237
215
|
'shipping': json['shipping'],
|
|
238
216
|
'transitInsurance': json['transitInsurance'],
|
|
239
|
-
'deliveryShippingQuote': json['deliveryShippingQuote'],
|
|
240
|
-
'transitInsuranceQuote': json['transitInsuranceQuote'],
|
|
241
217
|
'gst': json['gst'],
|
|
242
218
|
'grandTotal': json['grandTotal'],
|
|
243
219
|
};
|
|
@@ -266,14 +242,11 @@ export function FrontendCartResourceToJSONTyped(value?: FrontendCartResource | n
|
|
|
266
242
|
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(FrontendLineItemResourceToJSON)),
|
|
267
243
|
'coupons': ((value['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerToJSON)),
|
|
268
244
|
'subtotal': value['subtotal'],
|
|
269
|
-
'subtotalAfterDiscounts': value['subtotalAfterDiscounts'],
|
|
270
245
|
'promotionalDiscount': value['promotionalDiscount'],
|
|
271
246
|
'couponSubtotalDiscount': value['couponSubtotalDiscount'],
|
|
272
247
|
'couponShippingDiscount': value['couponShippingDiscount'],
|
|
273
248
|
'shipping': value['shipping'],
|
|
274
249
|
'transitInsurance': value['transitInsurance'],
|
|
275
|
-
'deliveryShippingQuote': value['deliveryShippingQuote'],
|
|
276
|
-
'transitInsuranceQuote': value['transitInsuranceQuote'],
|
|
277
250
|
'gst': value['gst'],
|
|
278
251
|
'grandTotal': value['grandTotal'],
|
|
279
252
|
};
|
|
@@ -50,7 +50,7 @@ export interface OrderFulfillmentResource {
|
|
|
50
50
|
* @type {string}
|
|
51
51
|
* @memberof OrderFulfillmentResource
|
|
52
52
|
*/
|
|
53
|
-
trackingNumber
|
|
53
|
+
trackingNumber?: string | null;
|
|
54
54
|
/**
|
|
55
55
|
*
|
|
56
56
|
* @type {string}
|
|
@@ -62,7 +62,7 @@ export interface OrderFulfillmentResource {
|
|
|
62
62
|
* @type {string}
|
|
63
63
|
* @memberof OrderFulfillmentResource
|
|
64
64
|
*/
|
|
65
|
-
trackingCompany
|
|
65
|
+
trackingCompany: string;
|
|
66
66
|
/**
|
|
67
67
|
*
|
|
68
68
|
* @type {string}
|
|
@@ -102,8 +102,8 @@ export function instanceOfOrderFulfillmentResource(value: object): value is Orde
|
|
|
102
102
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
103
103
|
if (!('orderId' in value) || value['orderId'] === undefined) return false;
|
|
104
104
|
if (!('dateShipped' in value) || value['dateShipped'] === undefined) return false;
|
|
105
|
-
if (!('trackingNumber' in value) || value['trackingNumber'] === undefined) return false;
|
|
106
105
|
if (!('trackingUrl' in value) || value['trackingUrl'] === undefined) return false;
|
|
106
|
+
if (!('trackingCompany' in value) || value['trackingCompany'] === undefined) return false;
|
|
107
107
|
if (!('docnum' in value) || value['docnum'] === undefined) return false;
|
|
108
108
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
109
109
|
if (!('orderFulfillmentLineItems' in value) || value['orderFulfillmentLineItems'] === undefined) return false;
|
|
@@ -123,9 +123,9 @@ export function OrderFulfillmentResourceFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
123
123
|
'id': json['id'],
|
|
124
124
|
'orderId': json['orderId'],
|
|
125
125
|
'dateShipped': (new Date(json['dateShipped'])),
|
|
126
|
-
'trackingNumber': json['trackingNumber'],
|
|
126
|
+
'trackingNumber': json['trackingNumber'] == null ? undefined : json['trackingNumber'],
|
|
127
127
|
'trackingUrl': json['trackingUrl'],
|
|
128
|
-
'trackingCompany': json['trackingCompany']
|
|
128
|
+
'trackingCompany': json['trackingCompany'],
|
|
129
129
|
'docnum': json['docnum'],
|
|
130
130
|
'netsuiteId': json['netsuiteId'],
|
|
131
131
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { PagingMetadata } from './PagingMetadata';
|
|
17
|
+
import {
|
|
18
|
+
PagingMetadataFromJSON,
|
|
19
|
+
PagingMetadataFromJSONTyped,
|
|
20
|
+
PagingMetadataToJSON,
|
|
21
|
+
PagingMetadataToJSONTyped,
|
|
22
|
+
} from './PagingMetadata';
|
|
23
|
+
import type { ProductClassLiteResource } from './ProductClassLiteResource';
|
|
24
|
+
import {
|
|
25
|
+
ProductClassLiteResourceFromJSON,
|
|
26
|
+
ProductClassLiteResourceFromJSONTyped,
|
|
27
|
+
ProductClassLiteResourceToJSON,
|
|
28
|
+
ProductClassLiteResourceToJSONTyped,
|
|
29
|
+
} from './ProductClassLiteResource';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PaginatedProductClassLiteResourceResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface PaginatedProductClassLiteResourceResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<ProductClassLiteResource>}
|
|
40
|
+
* @memberof PaginatedProductClassLiteResourceResponse
|
|
41
|
+
*/
|
|
42
|
+
data: Array<ProductClassLiteResource>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {PagingMetadata}
|
|
46
|
+
* @memberof PaginatedProductClassLiteResourceResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: PagingMetadata;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the PaginatedProductClassLiteResourceResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfPaginatedProductClassLiteResourceResponse(value: object): value is PaginatedProductClassLiteResourceResponse {
|
|
55
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
56
|
+
if (!('meta' in value) || value['meta'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function PaginatedProductClassLiteResourceResponseFromJSON(json: any): PaginatedProductClassLiteResourceResponse {
|
|
61
|
+
return PaginatedProductClassLiteResourceResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function PaginatedProductClassLiteResourceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedProductClassLiteResourceResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': ((json['data'] as Array<any>).map(ProductClassLiteResourceFromJSON)),
|
|
71
|
+
'meta': PagingMetadataFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function PaginatedProductClassLiteResourceResponseToJSON(json: any): PaginatedProductClassLiteResourceResponse {
|
|
76
|
+
return PaginatedProductClassLiteResourceResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function PaginatedProductClassLiteResourceResponseToJSONTyped(value?: PaginatedProductClassLiteResourceResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': ((value['data'] as Array<any>).map(ProductClassLiteResourceToJSON)),
|
|
87
|
+
'meta': PagingMetadataToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|