@digital8/lighting-illusions-ts-sdk 0.0.1104 → 0.0.1106
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 +0 -10
- package/README.md +2 -8
- package/dist/apis/ProductApi.d.ts +1 -17
- package/dist/apis/ProductApi.js +0 -61
- package/dist/models/ProductChildResource.d.ts +6 -0
- package/dist/models/ProductChildResource.js +4 -0
- package/dist/models/StoreProductChildRequest.d.ts +2 -2
- package/dist/models/StoreProductChildRequest.js +2 -6
- package/dist/models/StoreProductChildRequestSitesInner.d.ts +2 -2
- package/dist/models/StoreProductChildRequestSitesInner.js +2 -6
- package/dist/models/UpdateProductChildRequest.d.ts +2 -2
- package/dist/models/UpdateProductChildRequest.js +2 -6
- package/dist/models/index.d.ts +0 -5
- package/dist/models/index.js +0 -5
- package/docs/ProductApi.md +0 -69
- package/docs/ProductChildResource.md +2 -0
- package/package.json +1 -1
- package/src/apis/ProductApi.ts +0 -59
- package/src/models/ProductChildResource.ts +9 -0
- package/src/models/StoreProductChildRequest.ts +4 -6
- package/src/models/StoreProductChildRequestSitesInner.ts +4 -6
- package/src/models/UpdateProductChildRequest.ts +4 -6
- package/src/models/index.ts +0 -5
- package/dist/models/ProductChildAttributeGroupedResource.d.ts +0 -51
- package/dist/models/ProductChildAttributeGroupedResource.js +0 -64
- package/dist/models/ProductChildAttributeGroupedResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductChildAttributeGroupedResourceArrayResponse.js +0 -50
- package/dist/models/ProductChildAttributeResource.d.ts +0 -69
- package/dist/models/ProductChildAttributeResource.js +0 -74
- package/dist/models/ProductChildAttributeResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductChildAttributeResourceArrayResponse.js +0 -50
- package/dist/models/ShowAttributesProductChildRequest.d.ts +0 -99
- package/dist/models/ShowAttributesProductChildRequest.js +0 -83
- package/docs/ProductChildAttributeGroupedResource.md +0 -40
- package/docs/ProductChildAttributeGroupedResourceArrayResponse.md +0 -34
- package/docs/ProductChildAttributeResource.md +0 -46
- package/docs/ProductChildAttributeResourceArrayResponse.md +0 -34
- package/docs/ShowAttributesProductChildRequest.md +0 -50
- package/src/models/ProductChildAttributeGroupedResource.ts +0 -101
- package/src/models/ProductChildAttributeGroupedResourceArrayResponse.ts +0 -73
- package/src/models/ProductChildAttributeResource.ts +0 -127
- package/src/models/ProductChildAttributeResourceArrayResponse.ts +0 -73
- package/src/models/ShowAttributesProductChildRequest.ts +0 -152
package/.openapi-generator/FILES
CHANGED
|
@@ -184,10 +184,6 @@ docs/ProductCategoryLiteResource.md
|
|
|
184
184
|
docs/ProductCategoryLiteResourceArrayResponse.md
|
|
185
185
|
docs/ProductCategoryResource.md
|
|
186
186
|
docs/ProductCategoryResourceArrayResponse.md
|
|
187
|
-
docs/ProductChildAttributeGroupedResource.md
|
|
188
|
-
docs/ProductChildAttributeGroupedResourceArrayResponse.md
|
|
189
|
-
docs/ProductChildAttributeResource.md
|
|
190
|
-
docs/ProductChildAttributeResourceArrayResponse.md
|
|
191
187
|
docs/ProductChildListResource.md
|
|
192
188
|
docs/ProductChildListResourceArrayResponse.md
|
|
193
189
|
docs/ProductChildLiteResource.md
|
|
@@ -229,7 +225,6 @@ docs/ProductTypeResource.md
|
|
|
229
225
|
docs/ProductTypeResourceArrayResponse.md
|
|
230
226
|
docs/SEOResource.md
|
|
231
227
|
docs/SEOResourceArrayResponse.md
|
|
232
|
-
docs/ShowAttributesProductChildRequest.md
|
|
233
228
|
docs/SiteApi.md
|
|
234
229
|
docs/SiteConfigResource.md
|
|
235
230
|
docs/SiteConfigResourceArrayResponse.md
|
|
@@ -500,10 +495,6 @@ src/models/ProductCategoryLiteResource.ts
|
|
|
500
495
|
src/models/ProductCategoryLiteResourceArrayResponse.ts
|
|
501
496
|
src/models/ProductCategoryResource.ts
|
|
502
497
|
src/models/ProductCategoryResourceArrayResponse.ts
|
|
503
|
-
src/models/ProductChildAttributeGroupedResource.ts
|
|
504
|
-
src/models/ProductChildAttributeGroupedResourceArrayResponse.ts
|
|
505
|
-
src/models/ProductChildAttributeResource.ts
|
|
506
|
-
src/models/ProductChildAttributeResourceArrayResponse.ts
|
|
507
498
|
src/models/ProductChildListResource.ts
|
|
508
499
|
src/models/ProductChildListResourceArrayResponse.ts
|
|
509
500
|
src/models/ProductChildLiteResource.ts
|
|
@@ -544,7 +535,6 @@ src/models/ProductTypeResource.ts
|
|
|
544
535
|
src/models/ProductTypeResourceArrayResponse.ts
|
|
545
536
|
src/models/SEOResource.ts
|
|
546
537
|
src/models/SEOResourceArrayResponse.ts
|
|
547
|
-
src/models/ShowAttributesProductChildRequest.ts
|
|
548
538
|
src/models/SiteConfigResource.ts
|
|
549
539
|
src/models/SiteConfigResourceArrayResponse.ts
|
|
550
540
|
src/models/SiteListResource.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @digital8/lighting-illusions-ts-sdk@0.0.
|
|
1
|
+
# @digital8/lighting-illusions-ts-sdk@0.0.1106
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -114,7 +114,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
114
114
|
*ProductApi* | [**indexProduct**](docs/ProductApi.md#indexproductoperation) | **POST** /admin-api/product/parent/list | Auto-generated: indexProduct
|
|
115
115
|
*ProductApi* | [**indexProductChild**](docs/ProductApi.md#indexproductchildoperation) | **POST** /admin-api/product/children/list | Auto-generated: indexProductChild
|
|
116
116
|
*ProductApi* | [**showAssetsProductChild**](docs/ProductApi.md#showassetsproductchild) | **GET** /admin-api/product/children/{productChild}/assets | Auto-generated: showAssetsProductChild
|
|
117
|
-
*ProductApi* | [**showAttributesProductChild**](docs/ProductApi.md#showattributesproductchildoperation) | **POST** /admin-api/product/children/{productChild}/attributes | Auto-generated: showAttributesProductChild
|
|
118
117
|
*ProductApi* | [**showProduct**](docs/ProductApi.md#showproduct) | **GET** /admin-api/product/parent/{product} | Auto-generated: showProduct
|
|
119
118
|
*ProductApi* | [**showProductChild**](docs/ProductApi.md#showproductchild) | **GET** /admin-api/product/children/{productChild} | Auto-generated: showProductChild
|
|
120
119
|
*ProductApi* | [**storeProduct**](docs/ProductApi.md#storeproductoperation) | **POST** /admin-api/product/parent/create | Auto-generated: storeProduct
|
|
@@ -344,10 +343,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
344
343
|
- [ProductCategoryLiteResourceArrayResponse](docs/ProductCategoryLiteResourceArrayResponse.md)
|
|
345
344
|
- [ProductCategoryResource](docs/ProductCategoryResource.md)
|
|
346
345
|
- [ProductCategoryResourceArrayResponse](docs/ProductCategoryResourceArrayResponse.md)
|
|
347
|
-
- [ProductChildAttributeGroupedResource](docs/ProductChildAttributeGroupedResource.md)
|
|
348
|
-
- [ProductChildAttributeGroupedResourceArrayResponse](docs/ProductChildAttributeGroupedResourceArrayResponse.md)
|
|
349
|
-
- [ProductChildAttributeResource](docs/ProductChildAttributeResource.md)
|
|
350
|
-
- [ProductChildAttributeResourceArrayResponse](docs/ProductChildAttributeResourceArrayResponse.md)
|
|
351
346
|
- [ProductChildListResource](docs/ProductChildListResource.md)
|
|
352
347
|
- [ProductChildListResourceArrayResponse](docs/ProductChildListResourceArrayResponse.md)
|
|
353
348
|
- [ProductChildLiteResource](docs/ProductChildLiteResource.md)
|
|
@@ -388,7 +383,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
388
383
|
- [ProductTypeResourceArrayResponse](docs/ProductTypeResourceArrayResponse.md)
|
|
389
384
|
- [SEOResource](docs/SEOResource.md)
|
|
390
385
|
- [SEOResourceArrayResponse](docs/SEOResourceArrayResponse.md)
|
|
391
|
-
- [ShowAttributesProductChildRequest](docs/ShowAttributesProductChildRequest.md)
|
|
392
386
|
- [SiteConfigResource](docs/SiteConfigResource.md)
|
|
393
387
|
- [SiteConfigResourceArrayResponse](docs/SiteConfigResourceArrayResponse.md)
|
|
394
388
|
- [SiteListResource](docs/SiteListResource.md)
|
|
@@ -480,7 +474,7 @@ and is automatically generated by the
|
|
|
480
474
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
481
475
|
|
|
482
476
|
- API version: `1.0.0`
|
|
483
|
-
- Package version: `0.0.
|
|
477
|
+
- Package version: `0.0.1106`
|
|
484
478
|
- Generator version: `7.20.0`
|
|
485
479
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
486
480
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AssetResourceArrayResponse, AttachAccessoriesProductChildRequest, AttachDocumentsProductChildRequest, DetachDocumentsProductChildRequest, GenericResponse, GetAllProductChildRequest, GetAllProductRequest, IndexProductChildRequest, IndexProductRequest, PaginatedProductChildListResourceResponse, PaginatedProductListResourceResponse,
|
|
13
|
+
import type { AssetResourceArrayResponse, AttachAccessoriesProductChildRequest, AttachDocumentsProductChildRequest, DetachDocumentsProductChildRequest, GenericResponse, GetAllProductChildRequest, GetAllProductRequest, IndexProductChildRequest, IndexProductRequest, PaginatedProductChildListResourceResponse, PaginatedProductListResourceResponse, ProductChildLiteResourceArrayResponse, ProductChildResource, ProductLiteResourceArrayResponse, ProductResource, StoreProductChildRequest, StoreProductRequest, UpdateProductChildRequest, UpdateProductRequest } from '../models/index';
|
|
14
14
|
export interface AttachAccessoriesProductChildOperationRequest {
|
|
15
15
|
productChild: number;
|
|
16
16
|
attachAccessoriesProductChildRequest?: AttachAccessoriesProductChildRequest;
|
|
@@ -64,10 +64,6 @@ export interface IndexProductChildOperationRequest {
|
|
|
64
64
|
export interface ShowAssetsProductChildRequest {
|
|
65
65
|
productChild: number;
|
|
66
66
|
}
|
|
67
|
-
export interface ShowAttributesProductChildOperationRequest {
|
|
68
|
-
productChild: number;
|
|
69
|
-
showAttributesProductChildRequest?: ShowAttributesProductChildRequest;
|
|
70
|
-
}
|
|
71
67
|
export interface ShowProductRequest {
|
|
72
68
|
product: number;
|
|
73
69
|
}
|
|
@@ -272,18 +268,6 @@ export declare class ProductApi extends runtime.BaseAPI {
|
|
|
272
268
|
* Auto-generated: showAssetsProductChild
|
|
273
269
|
*/
|
|
274
270
|
showAssetsProductChild(requestParameters: ShowAssetsProductChildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssetResourceArrayResponse>;
|
|
275
|
-
/**
|
|
276
|
-
* Creates request options for showAttributesProductChild without sending the request
|
|
277
|
-
*/
|
|
278
|
-
showAttributesProductChildRequestOpts(requestParameters: ShowAttributesProductChildOperationRequest): Promise<runtime.RequestOpts>;
|
|
279
|
-
/**
|
|
280
|
-
* Auto-generated: showAttributesProductChild
|
|
281
|
-
*/
|
|
282
|
-
showAttributesProductChildRaw(requestParameters: ShowAttributesProductChildOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductChildAttributeGroupedResource>>;
|
|
283
|
-
/**
|
|
284
|
-
* Auto-generated: showAttributesProductChild
|
|
285
|
-
*/
|
|
286
|
-
showAttributesProductChild(requestParameters: ShowAttributesProductChildOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductChildAttributeGroupedResource>;
|
|
287
271
|
/**
|
|
288
272
|
* Creates request options for showProduct without sending the request
|
|
289
273
|
*/
|
package/dist/apis/ProductApi.js
CHANGED
|
@@ -976,67 +976,6 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
976
976
|
});
|
|
977
977
|
});
|
|
978
978
|
};
|
|
979
|
-
/**
|
|
980
|
-
* Creates request options for showAttributesProductChild without sending the request
|
|
981
|
-
*/
|
|
982
|
-
ProductApi.prototype.showAttributesProductChildRequestOpts = function (requestParameters) {
|
|
983
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
984
|
-
var queryParameters, headerParameters, urlPath;
|
|
985
|
-
return __generator(this, function (_a) {
|
|
986
|
-
if (requestParameters['productChild'] == null) {
|
|
987
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling showAttributesProductChild().');
|
|
988
|
-
}
|
|
989
|
-
queryParameters = {};
|
|
990
|
-
headerParameters = {};
|
|
991
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
992
|
-
urlPath = "/admin-api/product/children/{productChild}/attributes";
|
|
993
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
994
|
-
return [2 /*return*/, {
|
|
995
|
-
path: urlPath,
|
|
996
|
-
method: 'POST',
|
|
997
|
-
headers: headerParameters,
|
|
998
|
-
query: queryParameters,
|
|
999
|
-
body: (0, index_1.ShowAttributesProductChildRequestToJSON)(requestParameters['showAttributesProductChildRequest']),
|
|
1000
|
-
}];
|
|
1001
|
-
});
|
|
1002
|
-
});
|
|
1003
|
-
};
|
|
1004
|
-
/**
|
|
1005
|
-
* Auto-generated: showAttributesProductChild
|
|
1006
|
-
*/
|
|
1007
|
-
ProductApi.prototype.showAttributesProductChildRaw = function (requestParameters, initOverrides) {
|
|
1008
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1009
|
-
var requestOptions, response;
|
|
1010
|
-
return __generator(this, function (_a) {
|
|
1011
|
-
switch (_a.label) {
|
|
1012
|
-
case 0: return [4 /*yield*/, this.showAttributesProductChildRequestOpts(requestParameters)];
|
|
1013
|
-
case 1:
|
|
1014
|
-
requestOptions = _a.sent();
|
|
1015
|
-
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
1016
|
-
case 2:
|
|
1017
|
-
response = _a.sent();
|
|
1018
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductChildAttributeGroupedResourceFromJSON)(jsonValue); })];
|
|
1019
|
-
}
|
|
1020
|
-
});
|
|
1021
|
-
});
|
|
1022
|
-
};
|
|
1023
|
-
/**
|
|
1024
|
-
* Auto-generated: showAttributesProductChild
|
|
1025
|
-
*/
|
|
1026
|
-
ProductApi.prototype.showAttributesProductChild = function (requestParameters, initOverrides) {
|
|
1027
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1028
|
-
var response;
|
|
1029
|
-
return __generator(this, function (_a) {
|
|
1030
|
-
switch (_a.label) {
|
|
1031
|
-
case 0: return [4 /*yield*/, this.showAttributesProductChildRaw(requestParameters, initOverrides)];
|
|
1032
|
-
case 1:
|
|
1033
|
-
response = _a.sent();
|
|
1034
|
-
return [4 /*yield*/, response.value()];
|
|
1035
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
1036
|
-
}
|
|
1037
|
-
});
|
|
1038
|
-
});
|
|
1039
|
-
};
|
|
1040
979
|
/**
|
|
1041
980
|
* Creates request options for showProduct without sending the request
|
|
1042
981
|
*/
|
|
@@ -180,6 +180,12 @@ export interface ProductChildResource {
|
|
|
180
180
|
* @memberof ProductChildResource
|
|
181
181
|
*/
|
|
182
182
|
thumbnail: AssetResource | null;
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* @type {object}
|
|
186
|
+
* @memberof ProductChildResource
|
|
187
|
+
*/
|
|
188
|
+
attributes: object;
|
|
183
189
|
/**
|
|
184
190
|
*
|
|
185
191
|
* @type {Array<ProductClassResource>}
|
|
@@ -73,6 +73,8 @@ function instanceOfProductChildResource(value) {
|
|
|
73
73
|
return false;
|
|
74
74
|
if (!('thumbnail' in value) || value['thumbnail'] === undefined)
|
|
75
75
|
return false;
|
|
76
|
+
if (!('attributes' in value) || value['attributes'] === undefined)
|
|
77
|
+
return false;
|
|
76
78
|
if (!('productClasses' in value) || value['productClasses'] === undefined)
|
|
77
79
|
return false;
|
|
78
80
|
if (!('productClassString' in value) || value['productClassString'] === undefined)
|
|
@@ -116,6 +118,7 @@ function ProductChildResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
116
118
|
'siteDetails': (json['siteDetails'] == null ? null : json['siteDetails'].map(ProductChildSiteDetailResource_1.ProductChildSiteDetailResourceFromJSON)),
|
|
117
119
|
'assets': (json['assets'] == null ? null : json['assets'].map(AssetResource_1.AssetResourceFromJSON)),
|
|
118
120
|
'thumbnail': (0, AssetResource_1.AssetResourceFromJSON)(json['thumbnail']),
|
|
121
|
+
'attributes': json['attributes'],
|
|
119
122
|
'productClasses': (json['productClasses'] == null ? null : json['productClasses'].map(ProductClassResource_1.ProductClassResourceFromJSON)),
|
|
120
123
|
'productClassString': json['productClassString'],
|
|
121
124
|
'isPrivilegedAdmin': json['isPrivilegedAdmin'],
|
|
@@ -157,6 +160,7 @@ function ProductChildResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
157
160
|
'siteDetails': (value['siteDetails'] == null ? null : value['siteDetails'].map(ProductChildSiteDetailResource_1.ProductChildSiteDetailResourceToJSON)),
|
|
158
161
|
'assets': (value['assets'] == null ? null : value['assets'].map(AssetResource_1.AssetResourceToJSON)),
|
|
159
162
|
'thumbnail': (0, AssetResource_1.AssetResourceToJSON)(value['thumbnail']),
|
|
163
|
+
'attributes': value['attributes'],
|
|
160
164
|
'productClasses': (value['productClasses'] == null ? null : value['productClasses'].map(ProductClassResource_1.ProductClassResourceToJSON)),
|
|
161
165
|
'productClassString': value['productClassString'],
|
|
162
166
|
'isPrivilegedAdmin': value['isPrivilegedAdmin'],
|
|
@@ -35,13 +35,13 @@ export interface StoreProductChildRequest {
|
|
|
35
35
|
* @type {string}
|
|
36
36
|
* @memberof StoreProductChildRequest
|
|
37
37
|
*/
|
|
38
|
-
sku
|
|
38
|
+
sku?: string;
|
|
39
39
|
/**
|
|
40
40
|
*
|
|
41
41
|
* @type {string}
|
|
42
42
|
* @memberof StoreProductChildRequest
|
|
43
43
|
*/
|
|
44
|
-
model
|
|
44
|
+
model?: string;
|
|
45
45
|
/**
|
|
46
46
|
*
|
|
47
47
|
* @type {Date}
|
|
@@ -29,10 +29,6 @@ function instanceOfStoreProductChildRequest(value) {
|
|
|
29
29
|
return false;
|
|
30
30
|
if (!('name' in value) || value['name'] === undefined)
|
|
31
31
|
return false;
|
|
32
|
-
if (!('sku' in value) || value['sku'] === undefined)
|
|
33
|
-
return false;
|
|
34
|
-
if (!('model' in value) || value['model'] === undefined)
|
|
35
|
-
return false;
|
|
36
32
|
if (!('isWarrantyOverridden' in value) || value['isWarrantyOverridden'] === undefined)
|
|
37
33
|
return false;
|
|
38
34
|
if (!('hideFromFrontend' in value) || value['hideFromFrontend'] === undefined)
|
|
@@ -61,8 +57,8 @@ function StoreProductChildRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
61
57
|
return {
|
|
62
58
|
'productId': json['product_id'],
|
|
63
59
|
'name': json['name'],
|
|
64
|
-
'sku': json['sku'],
|
|
65
|
-
'model': json['model'],
|
|
60
|
+
'sku': json['sku'] == null ? undefined : json['sku'],
|
|
61
|
+
'model': json['model'] == null ? undefined : json['model'],
|
|
66
62
|
'newArrivalStartDate': json['new_arrival_start_date'] == null ? undefined : (new Date(json['new_arrival_start_date'])),
|
|
67
63
|
'newArrivalEndDate': json['new_arrival_end_date'] == null ? undefined : (new Date(json['new_arrival_end_date'])),
|
|
68
64
|
'warranty': json['warranty'] == null ? undefined : json['warranty'],
|
|
@@ -56,13 +56,13 @@ export interface StoreProductChildRequestSitesInner {
|
|
|
56
56
|
* @type {number}
|
|
57
57
|
* @memberof StoreProductChildRequestSitesInner
|
|
58
58
|
*/
|
|
59
|
-
rrpPrice
|
|
59
|
+
rrpPrice?: number;
|
|
60
60
|
/**
|
|
61
61
|
*
|
|
62
62
|
* @type {number}
|
|
63
63
|
* @memberof StoreProductChildRequestSitesInner
|
|
64
64
|
*/
|
|
65
|
-
salePrice
|
|
65
|
+
salePrice?: number;
|
|
66
66
|
/**
|
|
67
67
|
*
|
|
68
68
|
* @type {string}
|
|
@@ -32,10 +32,6 @@ function instanceOfStoreProductChildRequestSitesInner(value) {
|
|
|
32
32
|
return false;
|
|
33
33
|
if (!('description' in value) || value['description'] === undefined)
|
|
34
34
|
return false;
|
|
35
|
-
if (!('rrpPrice' in value) || value['rrpPrice'] === undefined)
|
|
36
|
-
return false;
|
|
37
|
-
if (!('salePrice' in value) || value['salePrice'] === undefined)
|
|
38
|
-
return false;
|
|
39
35
|
if (!('slug' in value) || value['slug'] === undefined)
|
|
40
36
|
return false;
|
|
41
37
|
if (!('isSlugOverridden' in value) || value['isSlugOverridden'] === undefined)
|
|
@@ -58,8 +54,8 @@ function StoreProductChildRequestSitesInnerFromJSONTyped(json, ignoreDiscriminat
|
|
|
58
54
|
'displayName': json['display_name'] == null ? undefined : json['display_name'],
|
|
59
55
|
'isDisplayNameOverridden': json['is_display_name_overridden'],
|
|
60
56
|
'description': json['description'],
|
|
61
|
-
'rrpPrice': json['rrp_price'],
|
|
62
|
-
'salePrice': json['sale_price'],
|
|
57
|
+
'rrpPrice': json['rrp_price'] == null ? undefined : json['rrp_price'],
|
|
58
|
+
'salePrice': json['sale_price'] == null ? undefined : json['sale_price'],
|
|
63
59
|
'slug': json['slug'],
|
|
64
60
|
'isSlugOverridden': json['is_slug_overridden'],
|
|
65
61
|
'documents': json['documents'],
|
|
@@ -28,13 +28,13 @@ export interface UpdateProductChildRequest {
|
|
|
28
28
|
* @type {string}
|
|
29
29
|
* @memberof UpdateProductChildRequest
|
|
30
30
|
*/
|
|
31
|
-
sku
|
|
31
|
+
sku?: string;
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
34
|
* @type {string}
|
|
35
35
|
* @memberof UpdateProductChildRequest
|
|
36
36
|
*/
|
|
37
|
-
model
|
|
37
|
+
model?: string;
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
40
40
|
* @type {Date}
|
|
@@ -26,10 +26,6 @@ var StoreProductChildRequestSitesInner_1 = require("./StoreProductChildRequestSi
|
|
|
26
26
|
function instanceOfUpdateProductChildRequest(value) {
|
|
27
27
|
if (!('name' in value) || value['name'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
-
if (!('sku' in value) || value['sku'] === undefined)
|
|
30
|
-
return false;
|
|
31
|
-
if (!('model' in value) || value['model'] === undefined)
|
|
32
|
-
return false;
|
|
33
29
|
if (!('isWarrantyOverridden' in value) || value['isWarrantyOverridden'] === undefined)
|
|
34
30
|
return false;
|
|
35
31
|
if (!('hideFromFrontend' in value) || value['hideFromFrontend'] === undefined)
|
|
@@ -57,8 +53,8 @@ function UpdateProductChildRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
53
|
}
|
|
58
54
|
return {
|
|
59
55
|
'name': json['name'],
|
|
60
|
-
'sku': json['sku'],
|
|
61
|
-
'model': json['model'],
|
|
56
|
+
'sku': json['sku'] == null ? undefined : json['sku'],
|
|
57
|
+
'model': json['model'] == null ? undefined : json['model'],
|
|
62
58
|
'newArrivalStartDate': json['new_arrival_start_date'] == null ? undefined : (new Date(json['new_arrival_start_date'])),
|
|
63
59
|
'newArrivalEndDate': json['new_arrival_end_date'] == null ? undefined : (new Date(json['new_arrival_end_date'])),
|
|
64
60
|
'warranty': json['warranty'] == null ? undefined : json['warranty'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -171,10 +171,6 @@ export * from './ProductCategoryLiteResource';
|
|
|
171
171
|
export * from './ProductCategoryLiteResourceArrayResponse';
|
|
172
172
|
export * from './ProductCategoryResource';
|
|
173
173
|
export * from './ProductCategoryResourceArrayResponse';
|
|
174
|
-
export * from './ProductChildAttributeGroupedResource';
|
|
175
|
-
export * from './ProductChildAttributeGroupedResourceArrayResponse';
|
|
176
|
-
export * from './ProductChildAttributeResource';
|
|
177
|
-
export * from './ProductChildAttributeResourceArrayResponse';
|
|
178
174
|
export * from './ProductChildListResource';
|
|
179
175
|
export * from './ProductChildListResourceArrayResponse';
|
|
180
176
|
export * from './ProductChildLiteResource';
|
|
@@ -215,7 +211,6 @@ export * from './ProductTypeResource';
|
|
|
215
211
|
export * from './ProductTypeResourceArrayResponse';
|
|
216
212
|
export * from './SEOResource';
|
|
217
213
|
export * from './SEOResourceArrayResponse';
|
|
218
|
-
export * from './ShowAttributesProductChildRequest';
|
|
219
214
|
export * from './SiteConfigResource';
|
|
220
215
|
export * from './SiteConfigResourceArrayResponse';
|
|
221
216
|
export * from './SiteListResource';
|
package/dist/models/index.js
CHANGED
|
@@ -189,10 +189,6 @@ __exportStar(require("./ProductCategoryLiteResource"), exports);
|
|
|
189
189
|
__exportStar(require("./ProductCategoryLiteResourceArrayResponse"), exports);
|
|
190
190
|
__exportStar(require("./ProductCategoryResource"), exports);
|
|
191
191
|
__exportStar(require("./ProductCategoryResourceArrayResponse"), exports);
|
|
192
|
-
__exportStar(require("./ProductChildAttributeGroupedResource"), exports);
|
|
193
|
-
__exportStar(require("./ProductChildAttributeGroupedResourceArrayResponse"), exports);
|
|
194
|
-
__exportStar(require("./ProductChildAttributeResource"), exports);
|
|
195
|
-
__exportStar(require("./ProductChildAttributeResourceArrayResponse"), exports);
|
|
196
192
|
__exportStar(require("./ProductChildListResource"), exports);
|
|
197
193
|
__exportStar(require("./ProductChildListResourceArrayResponse"), exports);
|
|
198
194
|
__exportStar(require("./ProductChildLiteResource"), exports);
|
|
@@ -233,7 +229,6 @@ __exportStar(require("./ProductTypeResource"), exports);
|
|
|
233
229
|
__exportStar(require("./ProductTypeResourceArrayResponse"), exports);
|
|
234
230
|
__exportStar(require("./SEOResource"), exports);
|
|
235
231
|
__exportStar(require("./SEOResourceArrayResponse"), exports);
|
|
236
|
-
__exportStar(require("./ShowAttributesProductChildRequest"), exports);
|
|
237
232
|
__exportStar(require("./SiteConfigResource"), exports);
|
|
238
233
|
__exportStar(require("./SiteConfigResourceArrayResponse"), exports);
|
|
239
234
|
__exportStar(require("./SiteListResource"), exports);
|
package/docs/ProductApi.md
CHANGED
|
@@ -19,7 +19,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
19
19
|
| [**indexProduct**](ProductApi.md#indexproductoperation) | **POST** /admin-api/product/parent/list | Auto-generated: indexProduct |
|
|
20
20
|
| [**indexProductChild**](ProductApi.md#indexproductchildoperation) | **POST** /admin-api/product/children/list | Auto-generated: indexProductChild |
|
|
21
21
|
| [**showAssetsProductChild**](ProductApi.md#showassetsproductchild) | **GET** /admin-api/product/children/{productChild}/assets | Auto-generated: showAssetsProductChild |
|
|
22
|
-
| [**showAttributesProductChild**](ProductApi.md#showattributesproductchildoperation) | **POST** /admin-api/product/children/{productChild}/attributes | Auto-generated: showAttributesProductChild |
|
|
23
22
|
| [**showProduct**](ProductApi.md#showproduct) | **GET** /admin-api/product/parent/{product} | Auto-generated: showProduct |
|
|
24
23
|
| [**showProductChild**](ProductApi.md#showproductchild) | **GET** /admin-api/product/children/{productChild} | Auto-generated: showProductChild |
|
|
25
24
|
| [**storeProduct**](ProductApi.md#storeproductoperation) | **POST** /admin-api/product/parent/create | Auto-generated: storeProduct |
|
|
@@ -1028,74 +1027,6 @@ No authorization required
|
|
|
1028
1027
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1029
1028
|
|
|
1030
1029
|
|
|
1031
|
-
## showAttributesProductChild
|
|
1032
|
-
|
|
1033
|
-
> ProductChildAttributeGroupedResource showAttributesProductChild(productChild, showAttributesProductChildRequest)
|
|
1034
|
-
|
|
1035
|
-
Auto-generated: showAttributesProductChild
|
|
1036
|
-
|
|
1037
|
-
### Example
|
|
1038
|
-
|
|
1039
|
-
```ts
|
|
1040
|
-
import {
|
|
1041
|
-
Configuration,
|
|
1042
|
-
ProductApi,
|
|
1043
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
1044
|
-
import type { ShowAttributesProductChildOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
1045
|
-
|
|
1046
|
-
async function example() {
|
|
1047
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
1048
|
-
const api = new ProductApi();
|
|
1049
|
-
|
|
1050
|
-
const body = {
|
|
1051
|
-
// number | The id of the productChild
|
|
1052
|
-
productChild: 56,
|
|
1053
|
-
// ShowAttributesProductChildRequest (optional)
|
|
1054
|
-
showAttributesProductChildRequest: ...,
|
|
1055
|
-
} satisfies ShowAttributesProductChildOperationRequest;
|
|
1056
|
-
|
|
1057
|
-
try {
|
|
1058
|
-
const data = await api.showAttributesProductChild(body);
|
|
1059
|
-
console.log(data);
|
|
1060
|
-
} catch (error) {
|
|
1061
|
-
console.error(error);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
// Run the test
|
|
1066
|
-
example().catch(console.error);
|
|
1067
|
-
```
|
|
1068
|
-
|
|
1069
|
-
### Parameters
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
| Name | Type | Description | Notes |
|
|
1073
|
-
|------------- | ------------- | ------------- | -------------|
|
|
1074
|
-
| **productChild** | `number` | The id of the productChild | [Defaults to `undefined`] |
|
|
1075
|
-
| **showAttributesProductChildRequest** | [ShowAttributesProductChildRequest](ShowAttributesProductChildRequest.md) | | [Optional] |
|
|
1076
|
-
|
|
1077
|
-
### Return type
|
|
1078
|
-
|
|
1079
|
-
[**ProductChildAttributeGroupedResource**](ProductChildAttributeGroupedResource.md)
|
|
1080
|
-
|
|
1081
|
-
### Authorization
|
|
1082
|
-
|
|
1083
|
-
No authorization required
|
|
1084
|
-
|
|
1085
|
-
### HTTP request headers
|
|
1086
|
-
|
|
1087
|
-
- **Content-Type**: `application/json`
|
|
1088
|
-
- **Accept**: `application/json`
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
### HTTP response details
|
|
1092
|
-
| Status code | Description | Response headers |
|
|
1093
|
-
|-------------|-------------|------------------|
|
|
1094
|
-
| **200** | Successful resource response | - |
|
|
1095
|
-
|
|
1096
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
1030
|
## showProduct
|
|
1100
1031
|
|
|
1101
1032
|
> ProductResource showProduct(product)
|
|
@@ -33,6 +33,7 @@ Name | Type
|
|
|
33
33
|
`siteDetails` | [Array<ProductChildSiteDetailResource>](ProductChildSiteDetailResource.md)
|
|
34
34
|
`assets` | [Array<AssetResource>](AssetResource.md)
|
|
35
35
|
`thumbnail` | [AssetResource](AssetResource.md)
|
|
36
|
+
`attributes` | object
|
|
36
37
|
`productClasses` | [Array<ProductClassResource>](ProductClassResource.md)
|
|
37
38
|
`productClassString` | string
|
|
38
39
|
`isPrivilegedAdmin` | boolean
|
|
@@ -71,6 +72,7 @@ const example = {
|
|
|
71
72
|
"siteDetails": null,
|
|
72
73
|
"assets": null,
|
|
73
74
|
"thumbnail": null,
|
|
75
|
+
"attributes": null,
|
|
74
76
|
"productClasses": null,
|
|
75
77
|
"productClassString": null,
|
|
76
78
|
"isPrivilegedAdmin": null,
|
package/package.json
CHANGED
package/src/apis/ProductApi.ts
CHANGED
|
@@ -26,12 +26,10 @@ import type {
|
|
|
26
26
|
IndexProductRequest,
|
|
27
27
|
PaginatedProductChildListResourceResponse,
|
|
28
28
|
PaginatedProductListResourceResponse,
|
|
29
|
-
ProductChildAttributeGroupedResource,
|
|
30
29
|
ProductChildLiteResourceArrayResponse,
|
|
31
30
|
ProductChildResource,
|
|
32
31
|
ProductLiteResourceArrayResponse,
|
|
33
32
|
ProductResource,
|
|
34
|
-
ShowAttributesProductChildRequest,
|
|
35
33
|
StoreProductChildRequest,
|
|
36
34
|
StoreProductRequest,
|
|
37
35
|
UpdateProductChildRequest,
|
|
@@ -60,8 +58,6 @@ import {
|
|
|
60
58
|
PaginatedProductChildListResourceResponseToJSON,
|
|
61
59
|
PaginatedProductListResourceResponseFromJSON,
|
|
62
60
|
PaginatedProductListResourceResponseToJSON,
|
|
63
|
-
ProductChildAttributeGroupedResourceFromJSON,
|
|
64
|
-
ProductChildAttributeGroupedResourceToJSON,
|
|
65
61
|
ProductChildLiteResourceArrayResponseFromJSON,
|
|
66
62
|
ProductChildLiteResourceArrayResponseToJSON,
|
|
67
63
|
ProductChildResourceFromJSON,
|
|
@@ -70,8 +66,6 @@ import {
|
|
|
70
66
|
ProductLiteResourceArrayResponseToJSON,
|
|
71
67
|
ProductResourceFromJSON,
|
|
72
68
|
ProductResourceToJSON,
|
|
73
|
-
ShowAttributesProductChildRequestFromJSON,
|
|
74
|
-
ShowAttributesProductChildRequestToJSON,
|
|
75
69
|
StoreProductChildRequestFromJSON,
|
|
76
70
|
StoreProductChildRequestToJSON,
|
|
77
71
|
StoreProductRequestFromJSON,
|
|
@@ -150,11 +144,6 @@ export interface ShowAssetsProductChildRequest {
|
|
|
150
144
|
productChild: number;
|
|
151
145
|
}
|
|
152
146
|
|
|
153
|
-
export interface ShowAttributesProductChildOperationRequest {
|
|
154
|
-
productChild: number;
|
|
155
|
-
showAttributesProductChildRequest?: ShowAttributesProductChildRequest;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
147
|
export interface ShowProductRequest {
|
|
159
148
|
product: number;
|
|
160
149
|
}
|
|
@@ -875,54 +864,6 @@ export class ProductApi extends runtime.BaseAPI {
|
|
|
875
864
|
return await response.value();
|
|
876
865
|
}
|
|
877
866
|
|
|
878
|
-
/**
|
|
879
|
-
* Creates request options for showAttributesProductChild without sending the request
|
|
880
|
-
*/
|
|
881
|
-
async showAttributesProductChildRequestOpts(requestParameters: ShowAttributesProductChildOperationRequest): Promise<runtime.RequestOpts> {
|
|
882
|
-
if (requestParameters['productChild'] == null) {
|
|
883
|
-
throw new runtime.RequiredError(
|
|
884
|
-
'productChild',
|
|
885
|
-
'Required parameter "productChild" was null or undefined when calling showAttributesProductChild().'
|
|
886
|
-
);
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
const queryParameters: any = {};
|
|
890
|
-
|
|
891
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
892
|
-
|
|
893
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
let urlPath = `/admin-api/product/children/{productChild}/attributes`;
|
|
897
|
-
urlPath = urlPath.replace(`{${"productChild"}}`, encodeURIComponent(String(requestParameters['productChild'])));
|
|
898
|
-
|
|
899
|
-
return {
|
|
900
|
-
path: urlPath,
|
|
901
|
-
method: 'POST',
|
|
902
|
-
headers: headerParameters,
|
|
903
|
-
query: queryParameters,
|
|
904
|
-
body: ShowAttributesProductChildRequestToJSON(requestParameters['showAttributesProductChildRequest']),
|
|
905
|
-
};
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* Auto-generated: showAttributesProductChild
|
|
910
|
-
*/
|
|
911
|
-
async showAttributesProductChildRaw(requestParameters: ShowAttributesProductChildOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductChildAttributeGroupedResource>> {
|
|
912
|
-
const requestOptions = await this.showAttributesProductChildRequestOpts(requestParameters);
|
|
913
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
914
|
-
|
|
915
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ProductChildAttributeGroupedResourceFromJSON(jsonValue));
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
/**
|
|
919
|
-
* Auto-generated: showAttributesProductChild
|
|
920
|
-
*/
|
|
921
|
-
async showAttributesProductChild(requestParameters: ShowAttributesProductChildOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductChildAttributeGroupedResource> {
|
|
922
|
-
const response = await this.showAttributesProductChildRaw(requestParameters, initOverrides);
|
|
923
|
-
return await response.value();
|
|
924
|
-
}
|
|
925
|
-
|
|
926
867
|
/**
|
|
927
868
|
* Creates request options for showProduct without sending the request
|
|
928
869
|
*/
|
|
@@ -203,6 +203,12 @@ export interface ProductChildResource {
|
|
|
203
203
|
* @memberof ProductChildResource
|
|
204
204
|
*/
|
|
205
205
|
thumbnail: AssetResource | null;
|
|
206
|
+
/**
|
|
207
|
+
*
|
|
208
|
+
* @type {object}
|
|
209
|
+
* @memberof ProductChildResource
|
|
210
|
+
*/
|
|
211
|
+
attributes: object;
|
|
206
212
|
/**
|
|
207
213
|
*
|
|
208
214
|
* @type {Array<ProductClassResource>}
|
|
@@ -251,6 +257,7 @@ export function instanceOfProductChildResource(value: object): value is ProductC
|
|
|
251
257
|
if (!('siteDetails' in value) || value['siteDetails'] === undefined) return false;
|
|
252
258
|
if (!('assets' in value) || value['assets'] === undefined) return false;
|
|
253
259
|
if (!('thumbnail' in value) || value['thumbnail'] === undefined) return false;
|
|
260
|
+
if (!('attributes' in value) || value['attributes'] === undefined) return false;
|
|
254
261
|
if (!('productClasses' in value) || value['productClasses'] === undefined) return false;
|
|
255
262
|
if (!('productClassString' in value) || value['productClassString'] === undefined) return false;
|
|
256
263
|
if (!('isPrivilegedAdmin' in value) || value['isPrivilegedAdmin'] === undefined) return false;
|
|
@@ -294,6 +301,7 @@ export function ProductChildResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
294
301
|
'siteDetails': (json['siteDetails'] == null ? null : (json['siteDetails'] as Array<any>).map(ProductChildSiteDetailResourceFromJSON)),
|
|
295
302
|
'assets': (json['assets'] == null ? null : (json['assets'] as Array<any>).map(AssetResourceFromJSON)),
|
|
296
303
|
'thumbnail': AssetResourceFromJSON(json['thumbnail']),
|
|
304
|
+
'attributes': json['attributes'],
|
|
297
305
|
'productClasses': (json['productClasses'] == null ? null : (json['productClasses'] as Array<any>).map(ProductClassResourceFromJSON)),
|
|
298
306
|
'productClassString': json['productClassString'],
|
|
299
307
|
'isPrivilegedAdmin': json['isPrivilegedAdmin'],
|
|
@@ -338,6 +346,7 @@ export function ProductChildResourceToJSONTyped(value?: ProductChildResource | n
|
|
|
338
346
|
'siteDetails': (value['siteDetails'] == null ? null : (value['siteDetails'] as Array<any>).map(ProductChildSiteDetailResourceToJSON)),
|
|
339
347
|
'assets': (value['assets'] == null ? null : (value['assets'] as Array<any>).map(AssetResourceToJSON)),
|
|
340
348
|
'thumbnail': AssetResourceToJSON(value['thumbnail']),
|
|
349
|
+
'attributes': value['attributes'],
|
|
341
350
|
'productClasses': (value['productClasses'] == null ? null : (value['productClasses'] as Array<any>).map(ProductClassResourceToJSON)),
|
|
342
351
|
'productClassString': value['productClassString'],
|
|
343
352
|
'isPrivilegedAdmin': value['isPrivilegedAdmin'],
|