@digital8/lighting-illusions-ts-sdk 0.0.542 → 0.0.543
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 +2 -0
- package/README.md +4 -2
- package/dist/apis/ProductCategoryApi.d.ts +12 -1
- package/dist/apis/ProductCategoryApi.js +45 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/PreviewAutomationRulesProductCategoryRequest.d.ts +53 -0
- package/dist/models/PreviewAutomationRulesProductCategoryRequest.js +68 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/PreviewAutomationRulesProductCategoryRequest.md +38 -0
- package/docs/ProductCategoryApi.md +66 -0
- package/package.json +1 -1
- package/src/apis/ProductCategoryApi.ts +39 -0
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/PreviewAutomationRulesProductCategoryRequest.ts +103 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -132,6 +132,7 @@ docs/PaginatedTagListResourceResponse.md
|
|
|
132
132
|
docs/PaginatedTagLiteResourceResponse.md
|
|
133
133
|
docs/PaginatedTagResourceResponse.md
|
|
134
134
|
docs/PagingMetadata.md
|
|
135
|
+
docs/PreviewAutomationRulesProductCategoryRequest.md
|
|
135
136
|
docs/ProductAggregationResource.md
|
|
136
137
|
docs/ProductAggregationResourceArrayResponse.md
|
|
137
138
|
docs/ProductApi.md
|
|
@@ -394,6 +395,7 @@ src/models/PaginatedTagListResourceResponse.ts
|
|
|
394
395
|
src/models/PaginatedTagLiteResourceResponse.ts
|
|
395
396
|
src/models/PaginatedTagResourceResponse.ts
|
|
396
397
|
src/models/PagingMetadata.ts
|
|
398
|
+
src/models/PreviewAutomationRulesProductCategoryRequest.ts
|
|
397
399
|
src/models/ProductAggregationResource.ts
|
|
398
400
|
src/models/ProductAggregationResourceArrayResponse.ts
|
|
399
401
|
src/models/ProductCategoryHierarchyResource.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.543
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -112,6 +112,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
112
112
|
*ProductCategoryApi* | [**getChildrenProductCategory**](docs/ProductCategoryApi.md#getchildrenproductcategory) | **GET** /admin-api/product-category/{productCategory}/children | Auto-generated: getChildrenProductCategory
|
|
113
113
|
*ProductCategoryApi* | [**getHierarchyProductCategory**](docs/ProductCategoryApi.md#gethierarchyproductcategory) | **GET** /admin-api/product-category/hierarchy | Auto-generated: getHierarchyProductCategory
|
|
114
114
|
*ProductCategoryApi* | [**indexProductCategory**](docs/ProductCategoryApi.md#indexproductcategoryoperation) | **POST** /admin-api/product-category/list | Auto-generated: indexProductCategory
|
|
115
|
+
*ProductCategoryApi* | [**previewAutomationRulesProductCategory**](docs/ProductCategoryApi.md#previewautomationrulesproductcategoryoperation) | **POST** /admin-api/product-category/preview-automation-rules | Auto-generated: previewAutomationRulesProductCategory
|
|
115
116
|
*ProductCategoryApi* | [**showProductCategory**](docs/ProductCategoryApi.md#showproductcategory) | **GET** /admin-api/product-category/{productCategory} | Auto-generated: showProductCategory
|
|
116
117
|
*ProductCategoryApi* | [**storeProductCategory**](docs/ProductCategoryApi.md#storeproductcategoryoperation) | **POST** /admin-api/product-category/create | Auto-generated: storeProductCategory
|
|
117
118
|
*ProductCategoryApi* | [**updateProductCategory**](docs/ProductCategoryApi.md#updateproductcategoryoperation) | **PUT** /admin-api/product-category/{productCategory}/update | Auto-generated: updateProductCategory
|
|
@@ -278,6 +279,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
278
279
|
- [PaginatedTagLiteResourceResponse](docs/PaginatedTagLiteResourceResponse.md)
|
|
279
280
|
- [PaginatedTagResourceResponse](docs/PaginatedTagResourceResponse.md)
|
|
280
281
|
- [PagingMetadata](docs/PagingMetadata.md)
|
|
282
|
+
- [PreviewAutomationRulesProductCategoryRequest](docs/PreviewAutomationRulesProductCategoryRequest.md)
|
|
281
283
|
- [ProductAggregationResource](docs/ProductAggregationResource.md)
|
|
282
284
|
- [ProductAggregationResourceArrayResponse](docs/ProductAggregationResourceArrayResponse.md)
|
|
283
285
|
- [ProductCategoryHierarchyResource](docs/ProductCategoryHierarchyResource.md)
|
|
@@ -406,7 +408,7 @@ and is automatically generated by the
|
|
|
406
408
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
407
409
|
|
|
408
410
|
- API version: `1.0.0`
|
|
409
|
-
- Package version: `0.0.
|
|
411
|
+
- Package version: `0.0.543`
|
|
410
412
|
- Generator version: `7.18.0`
|
|
411
413
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
412
414
|
|
|
@@ -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, GetAllProductCategoryRequest, IndexProductCategoryRequest, PaginatedProductCategoryListResourceResponse, ProductCategoryHierarchyResourceArrayResponse, ProductCategoryLiteResourceArrayResponse, ProductCategoryResource, StoreProductCategoryRequest, UpdateProductCategoryRequest } from '../models/index';
|
|
13
|
+
import type { GenericResponse, GetAllProductCategoryRequest, IndexProductCategoryRequest, PaginatedProductCategoryListResourceResponse, PreviewAutomationRulesProductCategoryRequest, ProductCategoryHierarchyResourceArrayResponse, ProductCategoryLiteResourceArrayResponse, ProductCategoryResource, StoreProductCategoryRequest, UpdateProductCategoryRequest } from '../models/index';
|
|
14
14
|
export interface DestroyProductCategoryRequest {
|
|
15
15
|
productCategory: number;
|
|
16
16
|
}
|
|
@@ -24,6 +24,9 @@ export interface GetChildrenProductCategoryRequest {
|
|
|
24
24
|
export interface IndexProductCategoryOperationRequest {
|
|
25
25
|
indexProductCategoryRequest?: IndexProductCategoryRequest;
|
|
26
26
|
}
|
|
27
|
+
export interface PreviewAutomationRulesProductCategoryOperationRequest {
|
|
28
|
+
previewAutomationRulesProductCategoryRequest?: PreviewAutomationRulesProductCategoryRequest;
|
|
29
|
+
}
|
|
27
30
|
export interface ShowProductCategoryRequest {
|
|
28
31
|
productCategory: number;
|
|
29
32
|
}
|
|
@@ -78,6 +81,14 @@ export declare class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
78
81
|
* Auto-generated: indexProductCategory
|
|
79
82
|
*/
|
|
80
83
|
indexProductCategory(requestParameters?: IndexProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductCategoryListResourceResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Auto-generated: previewAutomationRulesProductCategory
|
|
86
|
+
*/
|
|
87
|
+
previewAutomationRulesProductCategoryRaw(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>>;
|
|
88
|
+
/**
|
|
89
|
+
* Auto-generated: previewAutomationRulesProductCategory
|
|
90
|
+
*/
|
|
91
|
+
previewAutomationRulesProductCategory(requestParameters?: PreviewAutomationRulesProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse>;
|
|
81
92
|
/**
|
|
82
93
|
* Auto-generated: showProductCategory
|
|
83
94
|
*/
|
|
@@ -301,6 +301,51 @@ var ProductCategoryApi = /** @class */ (function (_super) {
|
|
|
301
301
|
});
|
|
302
302
|
});
|
|
303
303
|
};
|
|
304
|
+
/**
|
|
305
|
+
* Auto-generated: previewAutomationRulesProductCategory
|
|
306
|
+
*/
|
|
307
|
+
ProductCategoryApi.prototype.previewAutomationRulesProductCategoryRaw = function (requestParameters, initOverrides) {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
309
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
310
|
+
return __generator(this, function (_a) {
|
|
311
|
+
switch (_a.label) {
|
|
312
|
+
case 0:
|
|
313
|
+
queryParameters = {};
|
|
314
|
+
headerParameters = {};
|
|
315
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
316
|
+
urlPath = "/admin-api/product-category/preview-automation-rules";
|
|
317
|
+
return [4 /*yield*/, this.request({
|
|
318
|
+
path: urlPath,
|
|
319
|
+
method: 'POST',
|
|
320
|
+
headers: headerParameters,
|
|
321
|
+
query: queryParameters,
|
|
322
|
+
body: (0, index_1.PreviewAutomationRulesProductCategoryRequestToJSON)(requestParameters['previewAutomationRulesProductCategoryRequest']),
|
|
323
|
+
}, initOverrides)];
|
|
324
|
+
case 1:
|
|
325
|
+
response = _a.sent();
|
|
326
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GenericResponseFromJSON)(jsonValue); })];
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* Auto-generated: previewAutomationRulesProductCategory
|
|
333
|
+
*/
|
|
334
|
+
ProductCategoryApi.prototype.previewAutomationRulesProductCategory = function () {
|
|
335
|
+
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
336
|
+
var response;
|
|
337
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
338
|
+
return __generator(this, function (_a) {
|
|
339
|
+
switch (_a.label) {
|
|
340
|
+
case 0: return [4 /*yield*/, this.previewAutomationRulesProductCategoryRaw(requestParameters, initOverrides)];
|
|
341
|
+
case 1:
|
|
342
|
+
response = _a.sent();
|
|
343
|
+
return [4 /*yield*/, response.value()];
|
|
344
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
};
|
|
304
349
|
/**
|
|
305
350
|
* Auto-generated: showProductCategory
|
|
306
351
|
*/
|
|
@@ -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']),
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { StoreProductCategoryRequestAutomationRulesInner } from './StoreProductCategoryRequestAutomationRulesInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PreviewAutomationRulesProductCategoryRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface PreviewAutomationRulesProductCategoryRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof PreviewAutomationRulesProductCategoryRequest
|
|
23
|
+
*/
|
|
24
|
+
siteId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof PreviewAutomationRulesProductCategoryRequest
|
|
29
|
+
*/
|
|
30
|
+
automatedConditionType: PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Array<StoreProductCategoryRequestAutomationRulesInner>}
|
|
34
|
+
* @memberof PreviewAutomationRulesProductCategoryRequest
|
|
35
|
+
*/
|
|
36
|
+
automationRules: Array<StoreProductCategoryRequestAutomationRulesInner>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @export
|
|
40
|
+
*/
|
|
41
|
+
export declare const PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum: {
|
|
42
|
+
readonly And: "and";
|
|
43
|
+
readonly Or: "or";
|
|
44
|
+
};
|
|
45
|
+
export type PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum = typeof PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum[keyof typeof PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum];
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the PreviewAutomationRulesProductCategoryRequest interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfPreviewAutomationRulesProductCategoryRequest(value: object): value is PreviewAutomationRulesProductCategoryRequest;
|
|
50
|
+
export declare function PreviewAutomationRulesProductCategoryRequestFromJSON(json: any): PreviewAutomationRulesProductCategoryRequest;
|
|
51
|
+
export declare function PreviewAutomationRulesProductCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewAutomationRulesProductCategoryRequest;
|
|
52
|
+
export declare function PreviewAutomationRulesProductCategoryRequestToJSON(json: any): PreviewAutomationRulesProductCategoryRequest;
|
|
53
|
+
export declare function PreviewAutomationRulesProductCategoryRequestToJSONTyped(value?: PreviewAutomationRulesProductCategoryRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfPreviewAutomationRulesProductCategoryRequest = instanceOfPreviewAutomationRulesProductCategoryRequest;
|
|
18
|
+
exports.PreviewAutomationRulesProductCategoryRequestFromJSON = PreviewAutomationRulesProductCategoryRequestFromJSON;
|
|
19
|
+
exports.PreviewAutomationRulesProductCategoryRequestFromJSONTyped = PreviewAutomationRulesProductCategoryRequestFromJSONTyped;
|
|
20
|
+
exports.PreviewAutomationRulesProductCategoryRequestToJSON = PreviewAutomationRulesProductCategoryRequestToJSON;
|
|
21
|
+
exports.PreviewAutomationRulesProductCategoryRequestToJSONTyped = PreviewAutomationRulesProductCategoryRequestToJSONTyped;
|
|
22
|
+
var StoreProductCategoryRequestAutomationRulesInner_1 = require("./StoreProductCategoryRequestAutomationRulesInner");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum = {
|
|
27
|
+
And: 'and',
|
|
28
|
+
Or: 'or'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the PreviewAutomationRulesProductCategoryRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfPreviewAutomationRulesProductCategoryRequest(value) {
|
|
34
|
+
if (!('siteId' in value) || value['siteId'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('automatedConditionType' in value) || value['automatedConditionType'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('automationRules' in value) || value['automationRules'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
function PreviewAutomationRulesProductCategoryRequestFromJSON(json) {
|
|
43
|
+
return PreviewAutomationRulesProductCategoryRequestFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function PreviewAutomationRulesProductCategoryRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'siteId': json['site_id'],
|
|
51
|
+
'automatedConditionType': json['automated_condition_type'],
|
|
52
|
+
'automationRules': (json['automation_rules'].map(StoreProductCategoryRequestAutomationRulesInner_1.StoreProductCategoryRequestAutomationRulesInnerFromJSON)),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function PreviewAutomationRulesProductCategoryRequestToJSON(json) {
|
|
56
|
+
return PreviewAutomationRulesProductCategoryRequestToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function PreviewAutomationRulesProductCategoryRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
59
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'site_id': value['siteId'],
|
|
65
|
+
'automated_condition_type': value['automatedConditionType'],
|
|
66
|
+
'automation_rules': (value['automationRules'].map(StoreProductCategoryRequestAutomationRulesInner_1.StoreProductCategoryRequestAutomationRulesInnerToJSON)),
|
|
67
|
+
};
|
|
68
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -122,6 +122,7 @@ export * from './PaginatedTagListResourceResponse';
|
|
|
122
122
|
export * from './PaginatedTagLiteResourceResponse';
|
|
123
123
|
export * from './PaginatedTagResourceResponse';
|
|
124
124
|
export * from './PagingMetadata';
|
|
125
|
+
export * from './PreviewAutomationRulesProductCategoryRequest';
|
|
125
126
|
export * from './ProductAggregationResource';
|
|
126
127
|
export * from './ProductAggregationResourceArrayResponse';
|
|
127
128
|
export * from './ProductCategoryHierarchyResource';
|
package/dist/models/index.js
CHANGED
|
@@ -140,6 +140,7 @@ __exportStar(require("./PaginatedTagListResourceResponse"), exports);
|
|
|
140
140
|
__exportStar(require("./PaginatedTagLiteResourceResponse"), exports);
|
|
141
141
|
__exportStar(require("./PaginatedTagResourceResponse"), exports);
|
|
142
142
|
__exportStar(require("./PagingMetadata"), exports);
|
|
143
|
+
__exportStar(require("./PreviewAutomationRulesProductCategoryRequest"), exports);
|
|
143
144
|
__exportStar(require("./ProductAggregationResource"), exports);
|
|
144
145
|
__exportStar(require("./ProductAggregationResourceArrayResponse"), exports);
|
|
145
146
|
__exportStar(require("./ProductCategoryHierarchyResource"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# PreviewAutomationRulesProductCategoryRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`siteId` | string
|
|
10
|
+
`automatedConditionType` | string
|
|
11
|
+
`automationRules` | [Array<StoreProductCategoryRequestAutomationRulesInner>](StoreProductCategoryRequestAutomationRulesInner.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { PreviewAutomationRulesProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"siteId": null,
|
|
21
|
+
"automatedConditionType": null,
|
|
22
|
+
"automationRules": null,
|
|
23
|
+
} satisfies PreviewAutomationRulesProductCategoryRequest
|
|
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 PreviewAutomationRulesProductCategoryRequest
|
|
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
|
+
|
|
@@ -9,6 +9,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
9
9
|
| [**getChildrenProductCategory**](ProductCategoryApi.md#getchildrenproductcategory) | **GET** /admin-api/product-category/{productCategory}/children | Auto-generated: getChildrenProductCategory |
|
|
10
10
|
| [**getHierarchyProductCategory**](ProductCategoryApi.md#gethierarchyproductcategory) | **GET** /admin-api/product-category/hierarchy | Auto-generated: getHierarchyProductCategory |
|
|
11
11
|
| [**indexProductCategory**](ProductCategoryApi.md#indexproductcategoryoperation) | **POST** /admin-api/product-category/list | Auto-generated: indexProductCategory |
|
|
12
|
+
| [**previewAutomationRulesProductCategory**](ProductCategoryApi.md#previewautomationrulesproductcategoryoperation) | **POST** /admin-api/product-category/preview-automation-rules | Auto-generated: previewAutomationRulesProductCategory |
|
|
12
13
|
| [**showProductCategory**](ProductCategoryApi.md#showproductcategory) | **GET** /admin-api/product-category/{productCategory} | Auto-generated: showProductCategory |
|
|
13
14
|
| [**storeProductCategory**](ProductCategoryApi.md#storeproductcategoryoperation) | **POST** /admin-api/product-category/create | Auto-generated: storeProductCategory |
|
|
14
15
|
| [**updateProductCategory**](ProductCategoryApi.md#updateproductcategoryoperation) | **PUT** /admin-api/product-category/{productCategory}/update | Auto-generated: updateProductCategory |
|
|
@@ -335,6 +336,71 @@ No authorization required
|
|
|
335
336
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
336
337
|
|
|
337
338
|
|
|
339
|
+
## previewAutomationRulesProductCategory
|
|
340
|
+
|
|
341
|
+
> GenericResponse previewAutomationRulesProductCategory(previewAutomationRulesProductCategoryRequest)
|
|
342
|
+
|
|
343
|
+
Auto-generated: previewAutomationRulesProductCategory
|
|
344
|
+
|
|
345
|
+
### Example
|
|
346
|
+
|
|
347
|
+
```ts
|
|
348
|
+
import {
|
|
349
|
+
Configuration,
|
|
350
|
+
ProductCategoryApi,
|
|
351
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
352
|
+
import type { PreviewAutomationRulesProductCategoryOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
353
|
+
|
|
354
|
+
async function example() {
|
|
355
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
356
|
+
const api = new ProductCategoryApi();
|
|
357
|
+
|
|
358
|
+
const body = {
|
|
359
|
+
// PreviewAutomationRulesProductCategoryRequest (optional)
|
|
360
|
+
previewAutomationRulesProductCategoryRequest: ...,
|
|
361
|
+
} satisfies PreviewAutomationRulesProductCategoryOperationRequest;
|
|
362
|
+
|
|
363
|
+
try {
|
|
364
|
+
const data = await api.previewAutomationRulesProductCategory(body);
|
|
365
|
+
console.log(data);
|
|
366
|
+
} catch (error) {
|
|
367
|
+
console.error(error);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// Run the test
|
|
372
|
+
example().catch(console.error);
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### Parameters
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
| Name | Type | Description | Notes |
|
|
379
|
+
|------------- | ------------- | ------------- | -------------|
|
|
380
|
+
| **previewAutomationRulesProductCategoryRequest** | [PreviewAutomationRulesProductCategoryRequest](PreviewAutomationRulesProductCategoryRequest.md) | | [Optional] |
|
|
381
|
+
|
|
382
|
+
### Return type
|
|
383
|
+
|
|
384
|
+
[**GenericResponse**](GenericResponse.md)
|
|
385
|
+
|
|
386
|
+
### Authorization
|
|
387
|
+
|
|
388
|
+
No authorization required
|
|
389
|
+
|
|
390
|
+
### HTTP request headers
|
|
391
|
+
|
|
392
|
+
- **Content-Type**: `application/json`
|
|
393
|
+
- **Accept**: `application/json`
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
### HTTP response details
|
|
397
|
+
| Status code | Description | Response headers |
|
|
398
|
+
|-------------|-------------|------------------|
|
|
399
|
+
| **200** | \\JsonResponse<array{count: int}> | - |
|
|
400
|
+
|
|
401
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
402
|
+
|
|
403
|
+
|
|
338
404
|
## showProductCategory
|
|
339
405
|
|
|
340
406
|
> ProductCategoryResource showProductCategory(productCategory)
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
GetAllProductCategoryRequest,
|
|
20
20
|
IndexProductCategoryRequest,
|
|
21
21
|
PaginatedProductCategoryListResourceResponse,
|
|
22
|
+
PreviewAutomationRulesProductCategoryRequest,
|
|
22
23
|
ProductCategoryHierarchyResourceArrayResponse,
|
|
23
24
|
ProductCategoryLiteResourceArrayResponse,
|
|
24
25
|
ProductCategoryResource,
|
|
@@ -34,6 +35,8 @@ import {
|
|
|
34
35
|
IndexProductCategoryRequestToJSON,
|
|
35
36
|
PaginatedProductCategoryListResourceResponseFromJSON,
|
|
36
37
|
PaginatedProductCategoryListResourceResponseToJSON,
|
|
38
|
+
PreviewAutomationRulesProductCategoryRequestFromJSON,
|
|
39
|
+
PreviewAutomationRulesProductCategoryRequestToJSON,
|
|
37
40
|
ProductCategoryHierarchyResourceArrayResponseFromJSON,
|
|
38
41
|
ProductCategoryHierarchyResourceArrayResponseToJSON,
|
|
39
42
|
ProductCategoryLiteResourceArrayResponseFromJSON,
|
|
@@ -63,6 +66,10 @@ export interface IndexProductCategoryOperationRequest {
|
|
|
63
66
|
indexProductCategoryRequest?: IndexProductCategoryRequest;
|
|
64
67
|
}
|
|
65
68
|
|
|
69
|
+
export interface PreviewAutomationRulesProductCategoryOperationRequest {
|
|
70
|
+
previewAutomationRulesProductCategoryRequest?: PreviewAutomationRulesProductCategoryRequest;
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
export interface ShowProductCategoryRequest {
|
|
67
74
|
productCategory: number;
|
|
68
75
|
}
|
|
@@ -251,6 +258,38 @@ export class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
251
258
|
return await response.value();
|
|
252
259
|
}
|
|
253
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Auto-generated: previewAutomationRulesProductCategory
|
|
263
|
+
*/
|
|
264
|
+
async previewAutomationRulesProductCategoryRaw(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
265
|
+
const queryParameters: any = {};
|
|
266
|
+
|
|
267
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
268
|
+
|
|
269
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
let urlPath = `/admin-api/product-category/preview-automation-rules`;
|
|
273
|
+
|
|
274
|
+
const response = await this.request({
|
|
275
|
+
path: urlPath,
|
|
276
|
+
method: 'POST',
|
|
277
|
+
headers: headerParameters,
|
|
278
|
+
query: queryParameters,
|
|
279
|
+
body: PreviewAutomationRulesProductCategoryRequestToJSON(requestParameters['previewAutomationRulesProductCategoryRequest']),
|
|
280
|
+
}, initOverrides);
|
|
281
|
+
|
|
282
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Auto-generated: previewAutomationRulesProductCategory
|
|
287
|
+
*/
|
|
288
|
+
async previewAutomationRulesProductCategory(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
289
|
+
const response = await this.previewAutomationRulesProductCategoryRaw(requestParameters, initOverrides);
|
|
290
|
+
return await response.value();
|
|
291
|
+
}
|
|
292
|
+
|
|
254
293
|
/**
|
|
255
294
|
* Auto-generated: showProductCategory
|
|
256
295
|
*/
|
|
@@ -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']),
|
|
@@ -0,0 +1,103 @@
|
|
|
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 { StoreProductCategoryRequestAutomationRulesInner } from './StoreProductCategoryRequestAutomationRulesInner';
|
|
17
|
+
import {
|
|
18
|
+
StoreProductCategoryRequestAutomationRulesInnerFromJSON,
|
|
19
|
+
StoreProductCategoryRequestAutomationRulesInnerFromJSONTyped,
|
|
20
|
+
StoreProductCategoryRequestAutomationRulesInnerToJSON,
|
|
21
|
+
StoreProductCategoryRequestAutomationRulesInnerToJSONTyped,
|
|
22
|
+
} from './StoreProductCategoryRequestAutomationRulesInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PreviewAutomationRulesProductCategoryRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface PreviewAutomationRulesProductCategoryRequest {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PreviewAutomationRulesProductCategoryRequest
|
|
34
|
+
*/
|
|
35
|
+
siteId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof PreviewAutomationRulesProductCategoryRequest
|
|
40
|
+
*/
|
|
41
|
+
automatedConditionType: PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Array<StoreProductCategoryRequestAutomationRulesInner>}
|
|
45
|
+
* @memberof PreviewAutomationRulesProductCategoryRequest
|
|
46
|
+
*/
|
|
47
|
+
automationRules: Array<StoreProductCategoryRequestAutomationRulesInner>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
export const PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum = {
|
|
55
|
+
And: 'and',
|
|
56
|
+
Or: 'or'
|
|
57
|
+
} as const;
|
|
58
|
+
export type PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum = typeof PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum[keyof typeof PreviewAutomationRulesProductCategoryRequestAutomatedConditionTypeEnum];
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Check if a given object implements the PreviewAutomationRulesProductCategoryRequest interface.
|
|
63
|
+
*/
|
|
64
|
+
export function instanceOfPreviewAutomationRulesProductCategoryRequest(value: object): value is PreviewAutomationRulesProductCategoryRequest {
|
|
65
|
+
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
66
|
+
if (!('automatedConditionType' in value) || value['automatedConditionType'] === undefined) return false;
|
|
67
|
+
if (!('automationRules' in value) || value['automationRules'] === undefined) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function PreviewAutomationRulesProductCategoryRequestFromJSON(json: any): PreviewAutomationRulesProductCategoryRequest {
|
|
72
|
+
return PreviewAutomationRulesProductCategoryRequestFromJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function PreviewAutomationRulesProductCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewAutomationRulesProductCategoryRequest {
|
|
76
|
+
if (json == null) {
|
|
77
|
+
return json;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'siteId': json['site_id'],
|
|
82
|
+
'automatedConditionType': json['automated_condition_type'],
|
|
83
|
+
'automationRules': ((json['automation_rules'] as Array<any>).map(StoreProductCategoryRequestAutomationRulesInnerFromJSON)),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function PreviewAutomationRulesProductCategoryRequestToJSON(json: any): PreviewAutomationRulesProductCategoryRequest {
|
|
88
|
+
return PreviewAutomationRulesProductCategoryRequestToJSONTyped(json, false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function PreviewAutomationRulesProductCategoryRequestToJSONTyped(value?: PreviewAutomationRulesProductCategoryRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
92
|
+
if (value == null) {
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'site_id': value['siteId'],
|
|
99
|
+
'automated_condition_type': value['automatedConditionType'],
|
|
100
|
+
'automation_rules': ((value['automationRules'] as Array<any>).map(StoreProductCategoryRequestAutomationRulesInnerToJSON)),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -124,6 +124,7 @@ export * from './PaginatedTagListResourceResponse';
|
|
|
124
124
|
export * from './PaginatedTagLiteResourceResponse';
|
|
125
125
|
export * from './PaginatedTagResourceResponse';
|
|
126
126
|
export * from './PagingMetadata';
|
|
127
|
+
export * from './PreviewAutomationRulesProductCategoryRequest';
|
|
127
128
|
export * from './ProductAggregationResource';
|
|
128
129
|
export * from './ProductAggregationResourceArrayResponse';
|
|
129
130
|
export * from './ProductCategoryHierarchyResource';
|