@digital8/lighting-illusions-ts-sdk 0.0.372 → 0.0.374
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/README.md +3 -2
- package/dist/apis/ProductApi.d.ts +12 -1
- package/dist/apis/ProductApi.js +46 -0
- package/dist/models/AssetResource.d.ts +7 -0
- package/dist/models/AssetResource.js +5 -0
- package/dist/models/ProductChildLiteResource.d.ts +1 -1
- package/dist/models/ProductChildLiteResource.js +3 -1
- package/dist/models/ProductChildResource.d.ts +1 -1
- package/dist/models/ProductChildResource.js +3 -1
- package/docs/AssetResource.md +2 -0
- package/docs/ProductApi.md +66 -0
- package/package.json +1 -1
- package/src/apis/ProductApi.ts +44 -0
- package/src/models/AssetResource.ts +17 -0
- package/src/models/ProductChildLiteResource.ts +3 -2
- package/src/models/ProductChildResource.ts +3 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @digital8/lighting-illusions-ts-sdk@0.0.
|
|
1
|
+
# @digital8/lighting-illusions-ts-sdk@0.0.374
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -81,6 +81,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
81
81
|
*ProductApi* | [**getAllProduct**](docs/ProductApi.md#getallproductoperation) | **POST** /admin-api/product/parent/all | Auto-generated: getAllProduct
|
|
82
82
|
*ProductApi* | [**getAllProductChild**](docs/ProductApi.md#getallproductchildoperation) | **POST** /admin-api/product/children/all | Auto-generated: getAllProductChild
|
|
83
83
|
*ProductApi* | [**indexProductChild**](docs/ProductApi.md#indexproductchildoperation) | **POST** /admin-api/product/children/list | Auto-generated: indexProductChild
|
|
84
|
+
*ProductApi* | [**showAssetsProductChild**](docs/ProductApi.md#showassetsproductchild) | **GET** /admin-api/product/children/{productChild}/assets | Auto-generated: showAssetsProductChild
|
|
84
85
|
*ProductApi* | [**showProduct**](docs/ProductApi.md#showproduct) | **GET** /admin-api/product/parent/{product} | Auto-generated: showProduct
|
|
85
86
|
*ProductApi* | [**showProductChild**](docs/ProductApi.md#showproductchild) | **GET** /admin-api/product/children/{productChild} | Auto-generated: showProductChild
|
|
86
87
|
*ProductApi* | [**storeProduct**](docs/ProductApi.md#storeproductoperation) | **POST** /admin-api/product/parent/create | Auto-generated: storeProduct
|
|
@@ -272,7 +273,7 @@ and is automatically generated by the
|
|
|
272
273
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
273
274
|
|
|
274
275
|
- API version: `1.0.0`
|
|
275
|
-
- Package version: `0.0.
|
|
276
|
+
- Package version: `0.0.374`
|
|
276
277
|
- Generator version: `7.17.0`
|
|
277
278
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
278
279
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GenericResponse, GetAllProductChildRequest, GetAllProductRequest, IndexProductChildRequest, PaginatedProductChildResourceResponse, ProductChildLiteResourceArrayResponse, ProductChildResource, ProductLiteResourceArrayResponse, ProductResource, StoreProductChildRequest, StoreProductRequest, UpdateProductChildRequest, UpdateProductRequest } from '../models/index';
|
|
13
|
+
import type { AssetResourceArrayResponse, GenericResponse, GetAllProductChildRequest, GetAllProductRequest, IndexProductChildRequest, PaginatedProductChildResourceResponse, ProductChildLiteResourceArrayResponse, ProductChildResource, ProductLiteResourceArrayResponse, ProductResource, StoreProductChildRequest, StoreProductRequest, UpdateProductChildRequest, UpdateProductRequest } from '../models/index';
|
|
14
14
|
export interface DestroyProductRequest {
|
|
15
15
|
product: number;
|
|
16
16
|
}
|
|
@@ -26,6 +26,9 @@ export interface GetAllProductChildOperationRequest {
|
|
|
26
26
|
export interface IndexProductChildOperationRequest {
|
|
27
27
|
indexProductChildRequest?: IndexProductChildRequest;
|
|
28
28
|
}
|
|
29
|
+
export interface ShowAssetsProductChildRequest {
|
|
30
|
+
productChild: number;
|
|
31
|
+
}
|
|
29
32
|
export interface ShowProductRequest {
|
|
30
33
|
product: number;
|
|
31
34
|
}
|
|
@@ -90,6 +93,14 @@ export declare class ProductApi extends runtime.BaseAPI {
|
|
|
90
93
|
* Auto-generated: indexProductChild
|
|
91
94
|
*/
|
|
92
95
|
indexProductChild(requestParameters?: IndexProductChildOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductChildResourceResponse>;
|
|
96
|
+
/**
|
|
97
|
+
* Auto-generated: showAssetsProductChild
|
|
98
|
+
*/
|
|
99
|
+
showAssetsProductChildRaw(requestParameters: ShowAssetsProductChildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssetResourceArrayResponse>>;
|
|
100
|
+
/**
|
|
101
|
+
* Auto-generated: showAssetsProductChild
|
|
102
|
+
*/
|
|
103
|
+
showAssetsProductChild(requestParameters: ShowAssetsProductChildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssetResourceArrayResponse>;
|
|
93
104
|
/**
|
|
94
105
|
* Auto-generated: showProduct
|
|
95
106
|
*/
|
package/dist/apis/ProductApi.js
CHANGED
|
@@ -302,6 +302,52 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
302
302
|
});
|
|
303
303
|
});
|
|
304
304
|
};
|
|
305
|
+
/**
|
|
306
|
+
* Auto-generated: showAssetsProductChild
|
|
307
|
+
*/
|
|
308
|
+
ProductApi.prototype.showAssetsProductChildRaw = function (requestParameters, initOverrides) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
310
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
311
|
+
return __generator(this, function (_a) {
|
|
312
|
+
switch (_a.label) {
|
|
313
|
+
case 0:
|
|
314
|
+
if (requestParameters['productChild'] == null) {
|
|
315
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling showAssetsProductChild().');
|
|
316
|
+
}
|
|
317
|
+
queryParameters = {};
|
|
318
|
+
headerParameters = {};
|
|
319
|
+
urlPath = "/admin-api/product/children/{productChild}/assets";
|
|
320
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
321
|
+
return [4 /*yield*/, this.request({
|
|
322
|
+
path: urlPath,
|
|
323
|
+
method: 'GET',
|
|
324
|
+
headers: headerParameters,
|
|
325
|
+
query: queryParameters,
|
|
326
|
+
}, initOverrides)];
|
|
327
|
+
case 1:
|
|
328
|
+
response = _a.sent();
|
|
329
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AssetResourceArrayResponseFromJSON)(jsonValue); })];
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Auto-generated: showAssetsProductChild
|
|
336
|
+
*/
|
|
337
|
+
ProductApi.prototype.showAssetsProductChild = function (requestParameters, initOverrides) {
|
|
338
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
339
|
+
var response;
|
|
340
|
+
return __generator(this, function (_a) {
|
|
341
|
+
switch (_a.label) {
|
|
342
|
+
case 0: return [4 /*yield*/, this.showAssetsProductChildRaw(requestParameters, initOverrides)];
|
|
343
|
+
case 1:
|
|
344
|
+
response = _a.sent();
|
|
345
|
+
return [4 /*yield*/, response.value()];
|
|
346
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
});
|
|
350
|
+
};
|
|
305
351
|
/**
|
|
306
352
|
* Auto-generated: showProduct
|
|
307
353
|
*/
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { OverlayTemplateLiteResource } from './OverlayTemplateLiteResource';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -57,6 +58,12 @@ export interface AssetResource {
|
|
|
57
58
|
* @memberof AssetResource
|
|
58
59
|
*/
|
|
59
60
|
assetFileId: number;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {Array<OverlayTemplateLiteResource>}
|
|
64
|
+
* @memberof AssetResource
|
|
65
|
+
*/
|
|
66
|
+
overlayTemplates: Array<OverlayTemplateLiteResource> | null;
|
|
60
67
|
}
|
|
61
68
|
/**
|
|
62
69
|
* Check if a given object implements the AssetResource interface.
|
|
@@ -18,6 +18,7 @@ exports.AssetResourceFromJSON = AssetResourceFromJSON;
|
|
|
18
18
|
exports.AssetResourceFromJSONTyped = AssetResourceFromJSONTyped;
|
|
19
19
|
exports.AssetResourceToJSON = AssetResourceToJSON;
|
|
20
20
|
exports.AssetResourceToJSONTyped = AssetResourceToJSONTyped;
|
|
21
|
+
var OverlayTemplateLiteResource_1 = require("./OverlayTemplateLiteResource");
|
|
21
22
|
/**
|
|
22
23
|
* Check if a given object implements the AssetResource interface.
|
|
23
24
|
*/
|
|
@@ -36,6 +37,8 @@ function instanceOfAssetResource(value) {
|
|
|
36
37
|
return false;
|
|
37
38
|
if (!('assetFileId' in value) || value['assetFileId'] === undefined)
|
|
38
39
|
return false;
|
|
40
|
+
if (!('overlayTemplates' in value) || value['overlayTemplates'] === undefined)
|
|
41
|
+
return false;
|
|
39
42
|
return true;
|
|
40
43
|
}
|
|
41
44
|
function AssetResourceFromJSON(json) {
|
|
@@ -53,6 +56,7 @@ function AssetResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
56
|
'altText': json['altText'],
|
|
54
57
|
'index': json['index'],
|
|
55
58
|
'assetFileId': json['assetFileId'],
|
|
59
|
+
'overlayTemplates': (json['overlayTemplates'] == null ? null : json['overlayTemplates'].map(OverlayTemplateLiteResource_1.OverlayTemplateLiteResourceFromJSON)),
|
|
56
60
|
};
|
|
57
61
|
}
|
|
58
62
|
function AssetResourceToJSON(json) {
|
|
@@ -71,5 +75,6 @@ function AssetResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
71
75
|
'altText': value['altText'],
|
|
72
76
|
'index': value['index'],
|
|
73
77
|
'assetFileId': value['assetFileId'],
|
|
78
|
+
'overlayTemplates': (value['overlayTemplates'] == null ? null : value['overlayTemplates'].map(OverlayTemplateLiteResource_1.OverlayTemplateLiteResourceToJSON)),
|
|
74
79
|
};
|
|
75
80
|
}
|
|
@@ -27,6 +27,8 @@ function instanceOfProductChildLiteResource(value) {
|
|
|
27
27
|
return false;
|
|
28
28
|
if (!('name' in value) || value['name'] === undefined)
|
|
29
29
|
return false;
|
|
30
|
+
if (!('modelNumber' in value) || value['modelNumber'] === undefined)
|
|
31
|
+
return false;
|
|
30
32
|
if (!('sku' in value) || value['sku'] === undefined)
|
|
31
33
|
return false;
|
|
32
34
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined)
|
|
@@ -45,7 +47,7 @@ function ProductChildLiteResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
47
|
return {
|
|
46
48
|
'id': json['id'],
|
|
47
49
|
'name': json['name'],
|
|
48
|
-
'modelNumber': json['modelNumber']
|
|
50
|
+
'modelNumber': json['modelNumber'],
|
|
49
51
|
'sku': json['sku'],
|
|
50
52
|
'netsuiteId': json['netsuiteId'],
|
|
51
53
|
'thumbnail': (0, AssetResource_1.AssetResourceFromJSON)(json['thumbnail']),
|
|
@@ -31,6 +31,8 @@ function instanceOfProductChildResource(value) {
|
|
|
31
31
|
return false;
|
|
32
32
|
if (!('allowOversell' in value) || value['allowOversell'] === undefined)
|
|
33
33
|
return false;
|
|
34
|
+
if (!('modelNumber' in value) || value['modelNumber'] === undefined)
|
|
35
|
+
return false;
|
|
34
36
|
if (!('weight' in value) || value['weight'] === undefined)
|
|
35
37
|
return false;
|
|
36
38
|
if (!('warranty' in value) || value['warranty'] === undefined)
|
|
@@ -82,7 +84,7 @@ function ProductChildResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
82
84
|
'id': json['id'],
|
|
83
85
|
'name': json['name'],
|
|
84
86
|
'allowOversell': json['allowOversell'],
|
|
85
|
-
'modelNumber': json['modelNumber']
|
|
87
|
+
'modelNumber': json['modelNumber'],
|
|
86
88
|
'weight': json['weight'],
|
|
87
89
|
'warranty': json['warranty'],
|
|
88
90
|
'stock': json['stock'],
|
package/docs/AssetResource.md
CHANGED
|
@@ -13,6 +13,7 @@ Name | Type
|
|
|
13
13
|
`altText` | string
|
|
14
14
|
`index` | number
|
|
15
15
|
`assetFileId` | number
|
|
16
|
+
`overlayTemplates` | [Array<OverlayTemplateLiteResource>](OverlayTemplateLiteResource.md)
|
|
16
17
|
|
|
17
18
|
## Example
|
|
18
19
|
|
|
@@ -28,6 +29,7 @@ const example = {
|
|
|
28
29
|
"altText": null,
|
|
29
30
|
"index": null,
|
|
30
31
|
"assetFileId": null,
|
|
32
|
+
"overlayTemplates": null,
|
|
31
33
|
} satisfies AssetResource
|
|
32
34
|
|
|
33
35
|
console.log(example)
|
package/docs/ProductApi.md
CHANGED
|
@@ -9,6 +9,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
9
9
|
| [**getAllProduct**](ProductApi.md#getallproductoperation) | **POST** /admin-api/product/parent/all | Auto-generated: getAllProduct |
|
|
10
10
|
| [**getAllProductChild**](ProductApi.md#getallproductchildoperation) | **POST** /admin-api/product/children/all | Auto-generated: getAllProductChild |
|
|
11
11
|
| [**indexProductChild**](ProductApi.md#indexproductchildoperation) | **POST** /admin-api/product/children/list | Auto-generated: indexProductChild |
|
|
12
|
+
| [**showAssetsProductChild**](ProductApi.md#showassetsproductchild) | **GET** /admin-api/product/children/{productChild}/assets | Auto-generated: showAssetsProductChild |
|
|
12
13
|
| [**showProduct**](ProductApi.md#showproduct) | **GET** /admin-api/product/parent/{product} | Auto-generated: showProduct |
|
|
13
14
|
| [**showProductChild**](ProductApi.md#showproductchild) | **GET** /admin-api/product/children/{productChild} | Auto-generated: showProductChild |
|
|
14
15
|
| [**storeProduct**](ProductApi.md#storeproductoperation) | **POST** /admin-api/product/parent/create | Auto-generated: storeProduct |
|
|
@@ -343,6 +344,71 @@ No authorization required
|
|
|
343
344
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
344
345
|
|
|
345
346
|
|
|
347
|
+
## showAssetsProductChild
|
|
348
|
+
|
|
349
|
+
> AssetResourceArrayResponse showAssetsProductChild(productChild)
|
|
350
|
+
|
|
351
|
+
Auto-generated: showAssetsProductChild
|
|
352
|
+
|
|
353
|
+
### Example
|
|
354
|
+
|
|
355
|
+
```ts
|
|
356
|
+
import {
|
|
357
|
+
Configuration,
|
|
358
|
+
ProductApi,
|
|
359
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
360
|
+
import type { ShowAssetsProductChildRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
361
|
+
|
|
362
|
+
async function example() {
|
|
363
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
364
|
+
const api = new ProductApi();
|
|
365
|
+
|
|
366
|
+
const body = {
|
|
367
|
+
// number | The id of the productChild
|
|
368
|
+
productChild: 56,
|
|
369
|
+
} satisfies ShowAssetsProductChildRequest;
|
|
370
|
+
|
|
371
|
+
try {
|
|
372
|
+
const data = await api.showAssetsProductChild(body);
|
|
373
|
+
console.log(data);
|
|
374
|
+
} catch (error) {
|
|
375
|
+
console.error(error);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Run the test
|
|
380
|
+
example().catch(console.error);
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Parameters
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
| Name | Type | Description | Notes |
|
|
387
|
+
|------------- | ------------- | ------------- | -------------|
|
|
388
|
+
| **productChild** | `number` | The id of the productChild | [Defaults to `undefined`] |
|
|
389
|
+
|
|
390
|
+
### Return type
|
|
391
|
+
|
|
392
|
+
[**AssetResourceArrayResponse**](AssetResourceArrayResponse.md)
|
|
393
|
+
|
|
394
|
+
### Authorization
|
|
395
|
+
|
|
396
|
+
No authorization required
|
|
397
|
+
|
|
398
|
+
### HTTP request headers
|
|
399
|
+
|
|
400
|
+
- **Content-Type**: Not defined
|
|
401
|
+
- **Accept**: `application/json`
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
### HTTP response details
|
|
405
|
+
| Status code | Description | Response headers |
|
|
406
|
+
|-------------|-------------|------------------|
|
|
407
|
+
| **200** | Successful resource response | - |
|
|
408
|
+
|
|
409
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
410
|
+
|
|
411
|
+
|
|
346
412
|
## showProduct
|
|
347
413
|
|
|
348
414
|
> ProductResource showProduct(product)
|
package/package.json
CHANGED
package/src/apis/ProductApi.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
AssetResourceArrayResponse,
|
|
18
19
|
GenericResponse,
|
|
19
20
|
GetAllProductChildRequest,
|
|
20
21
|
GetAllProductRequest,
|
|
@@ -30,6 +31,8 @@ import type {
|
|
|
30
31
|
UpdateProductRequest,
|
|
31
32
|
} from '../models/index';
|
|
32
33
|
import {
|
|
34
|
+
AssetResourceArrayResponseFromJSON,
|
|
35
|
+
AssetResourceArrayResponseToJSON,
|
|
33
36
|
GenericResponseFromJSON,
|
|
34
37
|
GenericResponseToJSON,
|
|
35
38
|
GetAllProductChildRequestFromJSON,
|
|
@@ -78,6 +81,10 @@ export interface IndexProductChildOperationRequest {
|
|
|
78
81
|
indexProductChildRequest?: IndexProductChildRequest;
|
|
79
82
|
}
|
|
80
83
|
|
|
84
|
+
export interface ShowAssetsProductChildRequest {
|
|
85
|
+
productChild: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
81
88
|
export interface ShowProductRequest {
|
|
82
89
|
product: number;
|
|
83
90
|
}
|
|
@@ -279,6 +286,43 @@ export class ProductApi extends runtime.BaseAPI {
|
|
|
279
286
|
return await response.value();
|
|
280
287
|
}
|
|
281
288
|
|
|
289
|
+
/**
|
|
290
|
+
* Auto-generated: showAssetsProductChild
|
|
291
|
+
*/
|
|
292
|
+
async showAssetsProductChildRaw(requestParameters: ShowAssetsProductChildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssetResourceArrayResponse>> {
|
|
293
|
+
if (requestParameters['productChild'] == null) {
|
|
294
|
+
throw new runtime.RequiredError(
|
|
295
|
+
'productChild',
|
|
296
|
+
'Required parameter "productChild" was null or undefined when calling showAssetsProductChild().'
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const queryParameters: any = {};
|
|
301
|
+
|
|
302
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
let urlPath = `/admin-api/product/children/{productChild}/assets`;
|
|
306
|
+
urlPath = urlPath.replace(`{${"productChild"}}`, encodeURIComponent(String(requestParameters['productChild'])));
|
|
307
|
+
|
|
308
|
+
const response = await this.request({
|
|
309
|
+
path: urlPath,
|
|
310
|
+
method: 'GET',
|
|
311
|
+
headers: headerParameters,
|
|
312
|
+
query: queryParameters,
|
|
313
|
+
}, initOverrides);
|
|
314
|
+
|
|
315
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AssetResourceArrayResponseFromJSON(jsonValue));
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Auto-generated: showAssetsProductChild
|
|
320
|
+
*/
|
|
321
|
+
async showAssetsProductChild(requestParameters: ShowAssetsProductChildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssetResourceArrayResponse> {
|
|
322
|
+
const response = await this.showAssetsProductChildRaw(requestParameters, initOverrides);
|
|
323
|
+
return await response.value();
|
|
324
|
+
}
|
|
325
|
+
|
|
282
326
|
/**
|
|
283
327
|
* Auto-generated: showProduct
|
|
284
328
|
*/
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { OverlayTemplateLiteResource } from './OverlayTemplateLiteResource';
|
|
17
|
+
import {
|
|
18
|
+
OverlayTemplateLiteResourceFromJSON,
|
|
19
|
+
OverlayTemplateLiteResourceFromJSONTyped,
|
|
20
|
+
OverlayTemplateLiteResourceToJSON,
|
|
21
|
+
OverlayTemplateLiteResourceToJSONTyped,
|
|
22
|
+
} from './OverlayTemplateLiteResource';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
@@ -61,6 +69,12 @@ export interface AssetResource {
|
|
|
61
69
|
* @memberof AssetResource
|
|
62
70
|
*/
|
|
63
71
|
assetFileId: number;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Array<OverlayTemplateLiteResource>}
|
|
75
|
+
* @memberof AssetResource
|
|
76
|
+
*/
|
|
77
|
+
overlayTemplates: Array<OverlayTemplateLiteResource> | null;
|
|
64
78
|
}
|
|
65
79
|
|
|
66
80
|
/**
|
|
@@ -74,6 +88,7 @@ export function instanceOfAssetResource(value: object): value is AssetResource {
|
|
|
74
88
|
if (!('altText' in value) || value['altText'] === undefined) return false;
|
|
75
89
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
76
90
|
if (!('assetFileId' in value) || value['assetFileId'] === undefined) return false;
|
|
91
|
+
if (!('overlayTemplates' in value) || value['overlayTemplates'] === undefined) return false;
|
|
77
92
|
return true;
|
|
78
93
|
}
|
|
79
94
|
|
|
@@ -94,6 +109,7 @@ export function AssetResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
94
109
|
'altText': json['altText'],
|
|
95
110
|
'index': json['index'],
|
|
96
111
|
'assetFileId': json['assetFileId'],
|
|
112
|
+
'overlayTemplates': (json['overlayTemplates'] == null ? null : (json['overlayTemplates'] as Array<any>).map(OverlayTemplateLiteResourceFromJSON)),
|
|
97
113
|
};
|
|
98
114
|
}
|
|
99
115
|
|
|
@@ -115,6 +131,7 @@ export function AssetResourceToJSONTyped(value?: AssetResource | null, ignoreDis
|
|
|
115
131
|
'altText': value['altText'],
|
|
116
132
|
'index': value['index'],
|
|
117
133
|
'assetFileId': value['assetFileId'],
|
|
134
|
+
'overlayTemplates': (value['overlayTemplates'] == null ? null : (value['overlayTemplates'] as Array<any>).map(OverlayTemplateLiteResourceToJSON)),
|
|
118
135
|
};
|
|
119
136
|
}
|
|
120
137
|
|
|
@@ -44,7 +44,7 @@ export interface ProductChildLiteResource {
|
|
|
44
44
|
* @type {string}
|
|
45
45
|
* @memberof ProductChildLiteResource
|
|
46
46
|
*/
|
|
47
|
-
modelNumber
|
|
47
|
+
modelNumber: string;
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
50
|
* @type {number}
|
|
@@ -71,6 +71,7 @@ export interface ProductChildLiteResource {
|
|
|
71
71
|
export function instanceOfProductChildLiteResource(value: object): value is ProductChildLiteResource {
|
|
72
72
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
73
73
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
74
|
+
if (!('modelNumber' in value) || value['modelNumber'] === undefined) return false;
|
|
74
75
|
if (!('sku' in value) || value['sku'] === undefined) return false;
|
|
75
76
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
76
77
|
if (!('thumbnail' in value) || value['thumbnail'] === undefined) return false;
|
|
@@ -89,7 +90,7 @@ export function ProductChildLiteResourceFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
89
90
|
|
|
90
91
|
'id': json['id'],
|
|
91
92
|
'name': json['name'],
|
|
92
|
-
'modelNumber': json['modelNumber']
|
|
93
|
+
'modelNumber': json['modelNumber'],
|
|
93
94
|
'sku': json['sku'],
|
|
94
95
|
'netsuiteId': json['netsuiteId'],
|
|
95
96
|
'thumbnail': AssetResourceFromJSON(json['thumbnail']),
|
|
@@ -64,7 +64,7 @@ export interface ProductChildResource {
|
|
|
64
64
|
* @type {string}
|
|
65
65
|
* @memberof ProductChildResource
|
|
66
66
|
*/
|
|
67
|
-
modelNumber
|
|
67
|
+
modelNumber: string;
|
|
68
68
|
/**
|
|
69
69
|
*
|
|
70
70
|
* @type {number}
|
|
@@ -212,6 +212,7 @@ export function instanceOfProductChildResource(value: object): value is ProductC
|
|
|
212
212
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
213
213
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
214
214
|
if (!('allowOversell' in value) || value['allowOversell'] === undefined) return false;
|
|
215
|
+
if (!('modelNumber' in value) || value['modelNumber'] === undefined) return false;
|
|
215
216
|
if (!('weight' in value) || value['weight'] === undefined) return false;
|
|
216
217
|
if (!('warranty' in value) || value['warranty'] === undefined) return false;
|
|
217
218
|
if (!('stock' in value) || value['stock'] === undefined) return false;
|
|
@@ -247,7 +248,7 @@ export function ProductChildResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
247
248
|
'id': json['id'],
|
|
248
249
|
'name': json['name'],
|
|
249
250
|
'allowOversell': json['allowOversell'],
|
|
250
|
-
'modelNumber': json['modelNumber']
|
|
251
|
+
'modelNumber': json['modelNumber'],
|
|
251
252
|
'weight': json['weight'],
|
|
252
253
|
'warranty': json['warranty'],
|
|
253
254
|
'stock': json['stock'],
|