@digital8/lighting-illusions-ts-sdk 0.0.948 → 0.0.949
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 +2 -3
- package/dist/apis/ProductCategoryApi.d.ts +1 -13
- package/dist/apis/ProductCategoryApi.js +0 -48
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/docs/ProductCategoryApi.md +0 -69
- package/package.json +1 -1
- package/src/apis/ProductCategoryApi.ts +0 -48
- package/src/models/ExternalApiLogResource.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.949
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -122,7 +122,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
122
122
|
*ProductCategoryApi* | [**bulkDetachProductsProductCategory**](docs/ProductCategoryApi.md#bulkdetachproductsproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/bulk-detach-products | Auto-generated: bulkDetachProductsProductCategory
|
|
123
123
|
*ProductCategoryApi* | [**destroyProductCategory**](docs/ProductCategoryApi.md#destroyproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/delete | Auto-generated: destroyProductCategory
|
|
124
124
|
*ProductCategoryApi* | [**detachProductsProductCategory**](docs/ProductCategoryApi.md#detachproductsproductcategoryoperation) | **POST** /admin-api/product-category/{productCategory}/detach-products | Auto-generated: detachProductsProductCategory
|
|
125
|
-
*ProductCategoryApi* | [**getAllChildrenProductCategory**](docs/ProductCategoryApi.md#getallchildrenproductcategory) | **POST** /admin-api/product-category/{productCategory}/children/all | Auto-generated: getAllChildrenProductCategory
|
|
126
125
|
*ProductCategoryApi* | [**getAllProductCategory**](docs/ProductCategoryApi.md#getallproductcategoryoperation) | **POST** /admin-api/product-category/all | Auto-generated: getAllProductCategory
|
|
127
126
|
*ProductCategoryApi* | [**getChildrenProductCategory**](docs/ProductCategoryApi.md#getchildrenproductcategory) | **GET** /admin-api/product-category/{productCategory}/children | Auto-generated: getChildrenProductCategory
|
|
128
127
|
*ProductCategoryApi* | [**getHierarchyProductCategory**](docs/ProductCategoryApi.md#gethierarchyproductcategoryoperation) | **POST** /admin-api/product-category/hierarchy | Auto-generated: getHierarchyProductCategory
|
|
@@ -465,7 +464,7 @@ and is automatically generated by the
|
|
|
465
464
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
466
465
|
|
|
467
466
|
- API version: `1.0.0`
|
|
468
|
-
- Package version: `0.0.
|
|
467
|
+
- Package version: `0.0.949`
|
|
469
468
|
- Generator version: `7.19.0`
|
|
470
469
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
471
470
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AttachProductsProductCategoryRequest, DetachProductsProductCategoryRequest, GenericResponse, GetAllProductCategoryRequest, GetHierarchyProductCategoryRequest, IndexProductCategoryRequest, PaginatedProductCategoryListResourceResponse, PreviewAutomationRulesProductCategoryRequest, PreviewAutomationRulesResource, ProductCategoryHierarchyResourceArrayResponse,
|
|
13
|
+
import type { AttachProductsProductCategoryRequest, DetachProductsProductCategoryRequest, GenericResponse, GetAllProductCategoryRequest, GetHierarchyProductCategoryRequest, IndexProductCategoryRequest, PaginatedProductCategoryListResourceResponse, PreviewAutomationRulesProductCategoryRequest, PreviewAutomationRulesResource, ProductCategoryHierarchyResourceArrayResponse, ProductCategoryLiteResourceArrayResponse, ProductCategoryResource, StoreProductCategoryRequest, UpdateProductCategoryRequest } from '../models/index';
|
|
14
14
|
export interface AttachProductsProductCategoryOperationRequest {
|
|
15
15
|
productCategory: number;
|
|
16
16
|
attachProductsProductCategoryRequest?: AttachProductsProductCategoryRequest;
|
|
@@ -25,10 +25,6 @@ export interface DetachProductsProductCategoryOperationRequest {
|
|
|
25
25
|
productCategory: number;
|
|
26
26
|
detachProductsProductCategoryRequest?: DetachProductsProductCategoryRequest;
|
|
27
27
|
}
|
|
28
|
-
export interface GetAllChildrenProductCategoryRequest {
|
|
29
|
-
productCategory: number;
|
|
30
|
-
getAllProductCategoryRequest?: GetAllProductCategoryRequest;
|
|
31
|
-
}
|
|
32
28
|
export interface GetAllProductCategoryOperationRequest {
|
|
33
29
|
getAllProductCategoryRequest?: GetAllProductCategoryRequest;
|
|
34
30
|
}
|
|
@@ -91,14 +87,6 @@ export declare class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
91
87
|
* Auto-generated: detachProductsProductCategory
|
|
92
88
|
*/
|
|
93
89
|
detachProductsProductCategory(requestParameters: DetachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource>;
|
|
94
|
-
/**
|
|
95
|
-
* Auto-generated: getAllChildrenProductCategory
|
|
96
|
-
*/
|
|
97
|
-
getAllChildrenProductCategoryRaw(requestParameters: GetAllChildrenProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryListResourceArrayResponse>>;
|
|
98
|
-
/**
|
|
99
|
-
* Auto-generated: getAllChildrenProductCategory
|
|
100
|
-
*/
|
|
101
|
-
getAllChildrenProductCategory(requestParameters: GetAllChildrenProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryListResourceArrayResponse>;
|
|
102
90
|
/**
|
|
103
91
|
* Auto-generated: getAllProductCategory
|
|
104
92
|
*/
|
|
@@ -263,54 +263,6 @@ var ProductCategoryApi = /** @class */ (function (_super) {
|
|
|
263
263
|
});
|
|
264
264
|
});
|
|
265
265
|
};
|
|
266
|
-
/**
|
|
267
|
-
* Auto-generated: getAllChildrenProductCategory
|
|
268
|
-
*/
|
|
269
|
-
ProductCategoryApi.prototype.getAllChildrenProductCategoryRaw = function (requestParameters, initOverrides) {
|
|
270
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
271
|
-
var queryParameters, headerParameters, urlPath, response;
|
|
272
|
-
return __generator(this, function (_a) {
|
|
273
|
-
switch (_a.label) {
|
|
274
|
-
case 0:
|
|
275
|
-
if (requestParameters['productCategory'] == null) {
|
|
276
|
-
throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling getAllChildrenProductCategory().');
|
|
277
|
-
}
|
|
278
|
-
queryParameters = {};
|
|
279
|
-
headerParameters = {};
|
|
280
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
281
|
-
urlPath = "/admin-api/product-category/{productCategory}/children/all";
|
|
282
|
-
urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
|
|
283
|
-
return [4 /*yield*/, this.request({
|
|
284
|
-
path: urlPath,
|
|
285
|
-
method: 'POST',
|
|
286
|
-
headers: headerParameters,
|
|
287
|
-
query: queryParameters,
|
|
288
|
-
body: (0, index_1.GetAllProductCategoryRequestToJSON)(requestParameters['getAllProductCategoryRequest']),
|
|
289
|
-
}, initOverrides)];
|
|
290
|
-
case 1:
|
|
291
|
-
response = _a.sent();
|
|
292
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryListResourceArrayResponseFromJSON)(jsonValue); })];
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
});
|
|
296
|
-
};
|
|
297
|
-
/**
|
|
298
|
-
* Auto-generated: getAllChildrenProductCategory
|
|
299
|
-
*/
|
|
300
|
-
ProductCategoryApi.prototype.getAllChildrenProductCategory = function (requestParameters, initOverrides) {
|
|
301
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
302
|
-
var response;
|
|
303
|
-
return __generator(this, function (_a) {
|
|
304
|
-
switch (_a.label) {
|
|
305
|
-
case 0: return [4 /*yield*/, this.getAllChildrenProductCategoryRaw(requestParameters, initOverrides)];
|
|
306
|
-
case 1:
|
|
307
|
-
response = _a.sent();
|
|
308
|
-
return [4 /*yield*/, response.value()];
|
|
309
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
});
|
|
313
|
-
};
|
|
314
266
|
/**
|
|
315
267
|
* Auto-generated: getAllProductCategory
|
|
316
268
|
*/
|
|
@@ -37,6 +37,8 @@ function instanceOfExternalApiLogResource(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('responseCode' in value) || value['responseCode'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
+
if (!('requestPayload' in value) || value['requestPayload'] === undefined)
|
|
41
|
+
return false;
|
|
40
42
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined)
|
|
41
43
|
return false;
|
|
42
44
|
if (!('site' in value) || value['site'] === undefined)
|
|
@@ -58,7 +60,7 @@ function ExternalApiLogResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
58
60
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
59
61
|
'endpoint': json['endpoint'],
|
|
60
62
|
'responseCode': json['responseCode'],
|
|
61
|
-
'requestPayload': json['requestPayload']
|
|
63
|
+
'requestPayload': json['requestPayload'],
|
|
62
64
|
'responsePayload': json['responsePayload'],
|
|
63
65
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
64
66
|
'site': (0, SiteLiteResource_1.SiteLiteResourceFromJSON)(json['site']),
|
|
@@ -8,7 +8,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
8
8
|
| [**bulkDetachProductsProductCategory**](ProductCategoryApi.md#bulkdetachproductsproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/bulk-detach-products | Auto-generated: bulkDetachProductsProductCategory |
|
|
9
9
|
| [**destroyProductCategory**](ProductCategoryApi.md#destroyproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/delete | Auto-generated: destroyProductCategory |
|
|
10
10
|
| [**detachProductsProductCategory**](ProductCategoryApi.md#detachproductsproductcategoryoperation) | **POST** /admin-api/product-category/{productCategory}/detach-products | Auto-generated: detachProductsProductCategory |
|
|
11
|
-
| [**getAllChildrenProductCategory**](ProductCategoryApi.md#getallchildrenproductcategory) | **POST** /admin-api/product-category/{productCategory}/children/all | Auto-generated: getAllChildrenProductCategory |
|
|
12
11
|
| [**getAllProductCategory**](ProductCategoryApi.md#getallproductcategoryoperation) | **POST** /admin-api/product-category/all | Auto-generated: getAllProductCategory |
|
|
13
12
|
| [**getChildrenProductCategory**](ProductCategoryApi.md#getchildrenproductcategory) | **GET** /admin-api/product-category/{productCategory}/children | Auto-generated: getChildrenProductCategory |
|
|
14
13
|
| [**getHierarchyProductCategory**](ProductCategoryApi.md#gethierarchyproductcategoryoperation) | **POST** /admin-api/product-category/hierarchy | Auto-generated: getHierarchyProductCategory |
|
|
@@ -286,74 +285,6 @@ No authorization required
|
|
|
286
285
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
287
286
|
|
|
288
287
|
|
|
289
|
-
## getAllChildrenProductCategory
|
|
290
|
-
|
|
291
|
-
> ProductCategoryListResourceArrayResponse getAllChildrenProductCategory(productCategory, getAllProductCategoryRequest)
|
|
292
|
-
|
|
293
|
-
Auto-generated: getAllChildrenProductCategory
|
|
294
|
-
|
|
295
|
-
### Example
|
|
296
|
-
|
|
297
|
-
```ts
|
|
298
|
-
import {
|
|
299
|
-
Configuration,
|
|
300
|
-
ProductCategoryApi,
|
|
301
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
302
|
-
import type { GetAllChildrenProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
303
|
-
|
|
304
|
-
async function example() {
|
|
305
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
306
|
-
const api = new ProductCategoryApi();
|
|
307
|
-
|
|
308
|
-
const body = {
|
|
309
|
-
// number | The id of the productCategory
|
|
310
|
-
productCategory: 56,
|
|
311
|
-
// GetAllProductCategoryRequest (optional)
|
|
312
|
-
getAllProductCategoryRequest: ...,
|
|
313
|
-
} satisfies GetAllChildrenProductCategoryRequest;
|
|
314
|
-
|
|
315
|
-
try {
|
|
316
|
-
const data = await api.getAllChildrenProductCategory(body);
|
|
317
|
-
console.log(data);
|
|
318
|
-
} catch (error) {
|
|
319
|
-
console.error(error);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
// Run the test
|
|
324
|
-
example().catch(console.error);
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
### Parameters
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
| Name | Type | Description | Notes |
|
|
331
|
-
|------------- | ------------- | ------------- | -------------|
|
|
332
|
-
| **productCategory** | `number` | The id of the productCategory | [Defaults to `undefined`] |
|
|
333
|
-
| **getAllProductCategoryRequest** | [GetAllProductCategoryRequest](GetAllProductCategoryRequest.md) | | [Optional] |
|
|
334
|
-
|
|
335
|
-
### Return type
|
|
336
|
-
|
|
337
|
-
[**ProductCategoryListResourceArrayResponse**](ProductCategoryListResourceArrayResponse.md)
|
|
338
|
-
|
|
339
|
-
### Authorization
|
|
340
|
-
|
|
341
|
-
No authorization required
|
|
342
|
-
|
|
343
|
-
### HTTP request headers
|
|
344
|
-
|
|
345
|
-
- **Content-Type**: `application/json`
|
|
346
|
-
- **Accept**: `application/json`
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
### HTTP response details
|
|
350
|
-
| Status code | Description | Response headers |
|
|
351
|
-
|-------------|-------------|------------------|
|
|
352
|
-
| **200** | Successful resource response | - |
|
|
353
|
-
|
|
354
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
355
|
-
|
|
356
|
-
|
|
357
288
|
## getAllProductCategory
|
|
358
289
|
|
|
359
290
|
> ProductCategoryLiteResourceArrayResponse getAllProductCategory(getAllProductCategoryRequest)
|
package/package.json
CHANGED
|
@@ -25,7 +25,6 @@ import type {
|
|
|
25
25
|
PreviewAutomationRulesProductCategoryRequest,
|
|
26
26
|
PreviewAutomationRulesResource,
|
|
27
27
|
ProductCategoryHierarchyResourceArrayResponse,
|
|
28
|
-
ProductCategoryListResourceArrayResponse,
|
|
29
28
|
ProductCategoryLiteResourceArrayResponse,
|
|
30
29
|
ProductCategoryResource,
|
|
31
30
|
StoreProductCategoryRequest,
|
|
@@ -52,8 +51,6 @@ import {
|
|
|
52
51
|
PreviewAutomationRulesResourceToJSON,
|
|
53
52
|
ProductCategoryHierarchyResourceArrayResponseFromJSON,
|
|
54
53
|
ProductCategoryHierarchyResourceArrayResponseToJSON,
|
|
55
|
-
ProductCategoryListResourceArrayResponseFromJSON,
|
|
56
|
-
ProductCategoryListResourceArrayResponseToJSON,
|
|
57
54
|
ProductCategoryLiteResourceArrayResponseFromJSON,
|
|
58
55
|
ProductCategoryLiteResourceArrayResponseToJSON,
|
|
59
56
|
ProductCategoryResourceFromJSON,
|
|
@@ -82,11 +79,6 @@ export interface DetachProductsProductCategoryOperationRequest {
|
|
|
82
79
|
detachProductsProductCategoryRequest?: DetachProductsProductCategoryRequest;
|
|
83
80
|
}
|
|
84
81
|
|
|
85
|
-
export interface GetAllChildrenProductCategoryRequest {
|
|
86
|
-
productCategory: number;
|
|
87
|
-
getAllProductCategoryRequest?: GetAllProductCategoryRequest;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
82
|
export interface GetAllProductCategoryOperationRequest {
|
|
91
83
|
getAllProductCategoryRequest?: GetAllProductCategoryRequest;
|
|
92
84
|
}
|
|
@@ -280,46 +272,6 @@ export class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
280
272
|
return await response.value();
|
|
281
273
|
}
|
|
282
274
|
|
|
283
|
-
/**
|
|
284
|
-
* Auto-generated: getAllChildrenProductCategory
|
|
285
|
-
*/
|
|
286
|
-
async getAllChildrenProductCategoryRaw(requestParameters: GetAllChildrenProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryListResourceArrayResponse>> {
|
|
287
|
-
if (requestParameters['productCategory'] == null) {
|
|
288
|
-
throw new runtime.RequiredError(
|
|
289
|
-
'productCategory',
|
|
290
|
-
'Required parameter "productCategory" was null or undefined when calling getAllChildrenProductCategory().'
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
const queryParameters: any = {};
|
|
295
|
-
|
|
296
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
297
|
-
|
|
298
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
let urlPath = `/admin-api/product-category/{productCategory}/children/all`;
|
|
302
|
-
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
303
|
-
|
|
304
|
-
const response = await this.request({
|
|
305
|
-
path: urlPath,
|
|
306
|
-
method: 'POST',
|
|
307
|
-
headers: headerParameters,
|
|
308
|
-
query: queryParameters,
|
|
309
|
-
body: GetAllProductCategoryRequestToJSON(requestParameters['getAllProductCategoryRequest']),
|
|
310
|
-
}, initOverrides);
|
|
311
|
-
|
|
312
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryListResourceArrayResponseFromJSON(jsonValue));
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Auto-generated: getAllChildrenProductCategory
|
|
317
|
-
*/
|
|
318
|
-
async getAllChildrenProductCategory(requestParameters: GetAllChildrenProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryListResourceArrayResponse> {
|
|
319
|
-
const response = await this.getAllChildrenProductCategoryRaw(requestParameters, initOverrides);
|
|
320
|
-
return await response.value();
|
|
321
|
-
}
|
|
322
|
-
|
|
323
275
|
/**
|
|
324
276
|
* Auto-generated: getAllProductCategory
|
|
325
277
|
*/
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload: string;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,6 +106,7 @@ 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;
|
|
109
110
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
110
111
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
111
112
|
return true;
|
|
@@ -128,7 +129,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
128
129
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
129
130
|
'endpoint': json['endpoint'],
|
|
130
131
|
'responseCode': json['responseCode'],
|
|
131
|
-
'requestPayload': json['requestPayload']
|
|
132
|
+
'requestPayload': json['requestPayload'],
|
|
132
133
|
'responsePayload': json['responsePayload'],
|
|
133
134
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
134
135
|
'site': SiteLiteResourceFromJSON(json['site']),
|