@digital8/lighting-illusions-ts-sdk 0.0.569 → 0.0.570
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 +4 -4
- package/README.md +4 -6
- package/dist/apis/ProductCategoryApi.d.ts +3 -27
- package/dist/apis/ProductCategoryApi.js +1 -97
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/PreviewAutomationRulesProductCategoryRequest.d.ts +2 -2
- package/dist/models/PreviewAutomationRulesResource.d.ts +38 -0
- package/dist/models/PreviewAutomationRulesResource.js +55 -0
- package/dist/models/PreviewAutomationRulesResourceArrayResponse.d.ts +33 -0
- package/dist/models/PreviewAutomationRulesResourceArrayResponse.js +50 -0
- package/dist/models/ProductCategoryListResource.d.ts +6 -0
- package/dist/models/ProductCategoryListResource.js +4 -0
- package/dist/models/ProductRating.d.ts +1 -0
- package/dist/models/ProductRating.js +2 -1
- package/dist/models/ProductSearchResultResource.d.ts +6 -0
- package/dist/models/ProductSearchResultResource.js +4 -0
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +2 -2
- package/docs/PreviewAutomationRulesProductCategoryRequest.md +1 -1
- package/docs/{AttachProductsProductCategoryRequest.md → PreviewAutomationRulesResource.md} +8 -6
- package/docs/{DetachProductsProductCategoryRequest.md → PreviewAutomationRulesResourceArrayResponse.md} +6 -6
- package/docs/ProductCategoryApi.md +3 -141
- package/docs/ProductCategoryListResource.md +2 -0
- package/docs/ProductSearchResultResource.md +2 -0
- package/package.json +1 -1
- package/src/apis/ProductCategoryApi.ts +6 -99
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/PreviewAutomationRulesProductCategoryRequest.ts +2 -2
- package/src/models/PreviewAutomationRulesResource.ts +75 -0
- package/src/models/PreviewAutomationRulesResourceArrayResponse.ts +73 -0
- package/src/models/ProductCategoryListResource.ts +9 -0
- package/src/models/ProductRating.ts +2 -1
- package/src/models/ProductSearchResultResource.ts +9 -0
- package/src/models/index.ts +2 -2
- package/dist/models/AttachProductsProductCategoryRequest.d.ts +0 -32
- package/dist/models/AttachProductsProductCategoryRequest.js +0 -51
- package/dist/models/DetachProductsProductCategoryRequest.d.ts +0 -32
- package/dist/models/DetachProductsProductCategoryRequest.js +0 -51
- package/src/models/AttachProductsProductCategoryRequest.ts +0 -66
- package/src/models/DetachProductsProductCategoryRequest.ts +0 -66
package/dist/models/index.js
CHANGED
|
@@ -30,7 +30,6 @@ __exportStar(require("./AttachDocumentablesDocumentRequestDocumentablesInner"),
|
|
|
30
30
|
__exportStar(require("./AttachDocumentsProductChildSiteDetailRequest"), exports);
|
|
31
31
|
__exportStar(require("./AttachDocumentsProductChildSiteDetailRequestDocumentsInner"), exports);
|
|
32
32
|
__exportStar(require("./AttachProductTypeAttributeRequest"), exports);
|
|
33
|
-
__exportStar(require("./AttachProductsProductCategoryRequest"), exports);
|
|
34
33
|
__exportStar(require("./AttributeFieldType"), exports);
|
|
35
34
|
__exportStar(require("./AttributeListResource"), exports);
|
|
36
35
|
__exportStar(require("./AttributeListResourceArrayResponse"), exports);
|
|
@@ -56,7 +55,6 @@ __exportStar(require("./DetachAssetableOverlayTemplateRequest"), exports);
|
|
|
56
55
|
__exportStar(require("./DetachDocumentablesDocumentRequest"), exports);
|
|
57
56
|
__exportStar(require("./DetachDocumentablesDocumentRequestDocumentablesInner"), exports);
|
|
58
57
|
__exportStar(require("./DetachDocumentsProductChildSiteDetailRequest"), exports);
|
|
59
|
-
__exportStar(require("./DetachProductsProductCategoryRequest"), exports);
|
|
60
58
|
__exportStar(require("./DocumentFileForUploadResource"), exports);
|
|
61
59
|
__exportStar(require("./DocumentFileForUploadResourceArrayResponse"), exports);
|
|
62
60
|
__exportStar(require("./DocumentLiteResource"), exports);
|
|
@@ -143,6 +141,8 @@ __exportStar(require("./PaginatedTagLiteResourceResponse"), exports);
|
|
|
143
141
|
__exportStar(require("./PaginatedTagResourceResponse"), exports);
|
|
144
142
|
__exportStar(require("./PagingMetadata"), exports);
|
|
145
143
|
__exportStar(require("./PreviewAutomationRulesProductCategoryRequest"), exports);
|
|
144
|
+
__exportStar(require("./PreviewAutomationRulesResource"), exports);
|
|
145
|
+
__exportStar(require("./PreviewAutomationRulesResourceArrayResponse"), exports);
|
|
146
146
|
__exportStar(require("./ProductAggregationResource"), exports);
|
|
147
147
|
__exportStar(require("./ProductAggregationResourceArrayResponse"), exports);
|
|
148
148
|
__exportStar(require("./ProductCategoryHierarchyResource"), exports);
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# PreviewAutomationRulesResource
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`
|
|
9
|
+
`count` | number
|
|
10
|
+
`tooComplex` | boolean
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
13
14
|
```typescript
|
|
14
|
-
import type {
|
|
15
|
+
import type { PreviewAutomationRulesResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
16
|
|
|
16
17
|
// TODO: Update the object below with actual values
|
|
17
18
|
const example = {
|
|
18
|
-
"
|
|
19
|
-
|
|
19
|
+
"count": null,
|
|
20
|
+
"tooComplex": null,
|
|
21
|
+
} satisfies PreviewAutomationRulesResource
|
|
20
22
|
|
|
21
23
|
console.log(example)
|
|
22
24
|
|
|
@@ -25,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
25
27
|
console.log(exampleJSON)
|
|
26
28
|
|
|
27
29
|
// Parse the JSON string back to an object
|
|
28
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as PreviewAutomationRulesResource
|
|
29
31
|
console.log(exampleParsed)
|
|
30
32
|
```
|
|
31
33
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# PreviewAutomationRulesResourceArrayResponse
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`
|
|
9
|
+
`data` | [Array<PreviewAutomationRulesResource>](PreviewAutomationRulesResource.md)
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import type {
|
|
14
|
+
import type { PreviewAutomationRulesResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
|
-
"
|
|
19
|
-
} satisfies
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies PreviewAutomationRulesResourceArrayResponse
|
|
20
20
|
|
|
21
21
|
console.log(example)
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
25
25
|
console.log(exampleJSON)
|
|
26
26
|
|
|
27
27
|
// Parse the JSON string back to an object
|
|
28
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as PreviewAutomationRulesResourceArrayResponse
|
|
29
29
|
console.log(exampleParsed)
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -4,9 +4,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
| [**attachProductsProductCategory**](ProductCategoryApi.md#attachproductsproductcategoryoperation) | **POST** /admin-api/product-category/{productCategory}/attach-products | Auto-generated: attachProductsProductCategory |
|
|
8
7
|
| [**destroyProductCategory**](ProductCategoryApi.md#destroyproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/delete | Auto-generated: destroyProductCategory |
|
|
9
|
-
| [**detachProductsProductCategory**](ProductCategoryApi.md#detachproductsproductcategoryoperation) | **POST** /admin-api/product-category/{productCategory}/detach-products | Auto-generated: detachProductsProductCategory |
|
|
10
8
|
| [**getAllProductCategory**](ProductCategoryApi.md#getallproductcategoryoperation) | **POST** /admin-api/product-category/all | Auto-generated: getAllProductCategory |
|
|
11
9
|
| [**getChildrenProductCategory**](ProductCategoryApi.md#getchildrenproductcategory) | **GET** /admin-api/product-category/{productCategory}/children | Auto-generated: getChildrenProductCategory |
|
|
12
10
|
| [**getHierarchyProductCategory**](ProductCategoryApi.md#gethierarchyproductcategory) | **GET** /admin-api/product-category/hierarchy | Auto-generated: getHierarchyProductCategory |
|
|
@@ -18,74 +16,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
18
16
|
|
|
19
17
|
|
|
20
18
|
|
|
21
|
-
## attachProductsProductCategory
|
|
22
|
-
|
|
23
|
-
> ProductCategoryResource attachProductsProductCategory(productCategory, attachProductsProductCategoryRequest)
|
|
24
|
-
|
|
25
|
-
Auto-generated: attachProductsProductCategory
|
|
26
|
-
|
|
27
|
-
### Example
|
|
28
|
-
|
|
29
|
-
```ts
|
|
30
|
-
import {
|
|
31
|
-
Configuration,
|
|
32
|
-
ProductCategoryApi,
|
|
33
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
34
|
-
import type { AttachProductsProductCategoryOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
35
|
-
|
|
36
|
-
async function example() {
|
|
37
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
38
|
-
const api = new ProductCategoryApi();
|
|
39
|
-
|
|
40
|
-
const body = {
|
|
41
|
-
// number | The id of the productCategory
|
|
42
|
-
productCategory: 56,
|
|
43
|
-
// AttachProductsProductCategoryRequest (optional)
|
|
44
|
-
attachProductsProductCategoryRequest: ...,
|
|
45
|
-
} satisfies AttachProductsProductCategoryOperationRequest;
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
const data = await api.attachProductsProductCategory(body);
|
|
49
|
-
console.log(data);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
console.error(error);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Run the test
|
|
56
|
-
example().catch(console.error);
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Parameters
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
| Name | Type | Description | Notes |
|
|
63
|
-
|------------- | ------------- | ------------- | -------------|
|
|
64
|
-
| **productCategory** | `number` | The id of the productCategory | [Defaults to `undefined`] |
|
|
65
|
-
| **attachProductsProductCategoryRequest** | [AttachProductsProductCategoryRequest](AttachProductsProductCategoryRequest.md) | | [Optional] |
|
|
66
|
-
|
|
67
|
-
### Return type
|
|
68
|
-
|
|
69
|
-
[**ProductCategoryResource**](ProductCategoryResource.md)
|
|
70
|
-
|
|
71
|
-
### Authorization
|
|
72
|
-
|
|
73
|
-
No authorization required
|
|
74
|
-
|
|
75
|
-
### HTTP request headers
|
|
76
|
-
|
|
77
|
-
- **Content-Type**: `application/json`
|
|
78
|
-
- **Accept**: `application/json`
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
### HTTP response details
|
|
82
|
-
| Status code | Description | Response headers |
|
|
83
|
-
|-------------|-------------|------------------|
|
|
84
|
-
| **200** | Successful resource response | - |
|
|
85
|
-
|
|
86
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
87
|
-
|
|
88
|
-
|
|
89
19
|
## destroyProductCategory
|
|
90
20
|
|
|
91
21
|
> GenericResponse destroyProductCategory(productCategory)
|
|
@@ -151,74 +81,6 @@ No authorization required
|
|
|
151
81
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
152
82
|
|
|
153
83
|
|
|
154
|
-
## detachProductsProductCategory
|
|
155
|
-
|
|
156
|
-
> ProductCategoryResource detachProductsProductCategory(productCategory, detachProductsProductCategoryRequest)
|
|
157
|
-
|
|
158
|
-
Auto-generated: detachProductsProductCategory
|
|
159
|
-
|
|
160
|
-
### Example
|
|
161
|
-
|
|
162
|
-
```ts
|
|
163
|
-
import {
|
|
164
|
-
Configuration,
|
|
165
|
-
ProductCategoryApi,
|
|
166
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
167
|
-
import type { DetachProductsProductCategoryOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
168
|
-
|
|
169
|
-
async function example() {
|
|
170
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
171
|
-
const api = new ProductCategoryApi();
|
|
172
|
-
|
|
173
|
-
const body = {
|
|
174
|
-
// number | The id of the productCategory
|
|
175
|
-
productCategory: 56,
|
|
176
|
-
// DetachProductsProductCategoryRequest (optional)
|
|
177
|
-
detachProductsProductCategoryRequest: ...,
|
|
178
|
-
} satisfies DetachProductsProductCategoryOperationRequest;
|
|
179
|
-
|
|
180
|
-
try {
|
|
181
|
-
const data = await api.detachProductsProductCategory(body);
|
|
182
|
-
console.log(data);
|
|
183
|
-
} catch (error) {
|
|
184
|
-
console.error(error);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// Run the test
|
|
189
|
-
example().catch(console.error);
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
### Parameters
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
| Name | Type | Description | Notes |
|
|
196
|
-
|------------- | ------------- | ------------- | -------------|
|
|
197
|
-
| **productCategory** | `number` | The id of the productCategory | [Defaults to `undefined`] |
|
|
198
|
-
| **detachProductsProductCategoryRequest** | [DetachProductsProductCategoryRequest](DetachProductsProductCategoryRequest.md) | | [Optional] |
|
|
199
|
-
|
|
200
|
-
### Return type
|
|
201
|
-
|
|
202
|
-
[**ProductCategoryResource**](ProductCategoryResource.md)
|
|
203
|
-
|
|
204
|
-
### Authorization
|
|
205
|
-
|
|
206
|
-
No authorization required
|
|
207
|
-
|
|
208
|
-
### HTTP request headers
|
|
209
|
-
|
|
210
|
-
- **Content-Type**: `application/json`
|
|
211
|
-
- **Accept**: `application/json`
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
### HTTP response details
|
|
215
|
-
| Status code | Description | Response headers |
|
|
216
|
-
|-------------|-------------|------------------|
|
|
217
|
-
| **200** | Successful resource response | - |
|
|
218
|
-
|
|
219
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
220
|
-
|
|
221
|
-
|
|
222
84
|
## getAllProductCategory
|
|
223
85
|
|
|
224
86
|
> ProductCategoryLiteResourceArrayResponse getAllProductCategory(getAllProductCategoryRequest)
|
|
@@ -476,7 +338,7 @@ No authorization required
|
|
|
476
338
|
|
|
477
339
|
## previewAutomationRulesProductCategory
|
|
478
340
|
|
|
479
|
-
>
|
|
341
|
+
> PreviewAutomationRulesResource previewAutomationRulesProductCategory(previewAutomationRulesProductCategoryRequest)
|
|
480
342
|
|
|
481
343
|
Auto-generated: previewAutomationRulesProductCategory
|
|
482
344
|
|
|
@@ -519,7 +381,7 @@ example().catch(console.error);
|
|
|
519
381
|
|
|
520
382
|
### Return type
|
|
521
383
|
|
|
522
|
-
[**
|
|
384
|
+
[**PreviewAutomationRulesResource**](PreviewAutomationRulesResource.md)
|
|
523
385
|
|
|
524
386
|
### Authorization
|
|
525
387
|
|
|
@@ -534,7 +396,7 @@ No authorization required
|
|
|
534
396
|
### HTTP response details
|
|
535
397
|
| Status code | Description | Response headers |
|
|
536
398
|
|-------------|-------------|------------------|
|
|
537
|
-
| **200** |
|
|
399
|
+
| **200** | Successful resource response | - |
|
|
538
400
|
|
|
539
401
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
540
402
|
|
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`isDisabled` | boolean
|
|
13
13
|
`isAutomated` | boolean
|
|
14
14
|
`hasChildren` | boolean
|
|
15
|
+
`isParent` | boolean
|
|
15
16
|
`productCount` | number
|
|
16
17
|
`site` | [SiteLiteResource](SiteLiteResource.md)
|
|
17
18
|
|
|
@@ -28,6 +29,7 @@ const example = {
|
|
|
28
29
|
"isDisabled": null,
|
|
29
30
|
"isAutomated": null,
|
|
30
31
|
"hasChildren": null,
|
|
32
|
+
"isParent": null,
|
|
31
33
|
"productCount": null,
|
|
32
34
|
"site": null,
|
|
33
35
|
} satisfies ProductCategoryListResource
|
|
@@ -18,6 +18,7 @@ Name | Type
|
|
|
18
18
|
`labelDetails` | Array<number>
|
|
19
19
|
`categories` | Array<object>
|
|
20
20
|
`supplierName` | string
|
|
21
|
+
`supplierLogo` | string
|
|
21
22
|
`supplierId` | number
|
|
22
23
|
`availability` | string
|
|
23
24
|
`wishlisted` | boolean
|
|
@@ -41,6 +42,7 @@ const example = {
|
|
|
41
42
|
"labelDetails": null,
|
|
42
43
|
"categories": null,
|
|
43
44
|
"supplierName": null,
|
|
45
|
+
"supplierLogo": null,
|
|
44
46
|
"supplierId": null,
|
|
45
47
|
"availability": null,
|
|
46
48
|
"wishlisted": null,
|
package/package.json
CHANGED
|
@@ -15,13 +15,12 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
-
AttachProductsProductCategoryRequest,
|
|
19
|
-
DetachProductsProductCategoryRequest,
|
|
20
18
|
GenericResponse,
|
|
21
19
|
GetAllProductCategoryRequest,
|
|
22
20
|
IndexProductCategoryRequest,
|
|
23
21
|
PaginatedProductCategoryListResourceResponse,
|
|
24
22
|
PreviewAutomationRulesProductCategoryRequest,
|
|
23
|
+
PreviewAutomationRulesResource,
|
|
25
24
|
ProductCategoryHierarchyResourceArrayResponse,
|
|
26
25
|
ProductCategoryLiteResourceArrayResponse,
|
|
27
26
|
ProductCategoryResource,
|
|
@@ -29,10 +28,6 @@ import type {
|
|
|
29
28
|
UpdateProductCategoryRequest,
|
|
30
29
|
} from '../models/index';
|
|
31
30
|
import {
|
|
32
|
-
AttachProductsProductCategoryRequestFromJSON,
|
|
33
|
-
AttachProductsProductCategoryRequestToJSON,
|
|
34
|
-
DetachProductsProductCategoryRequestFromJSON,
|
|
35
|
-
DetachProductsProductCategoryRequestToJSON,
|
|
36
31
|
GenericResponseFromJSON,
|
|
37
32
|
GenericResponseToJSON,
|
|
38
33
|
GetAllProductCategoryRequestFromJSON,
|
|
@@ -43,6 +38,8 @@ import {
|
|
|
43
38
|
PaginatedProductCategoryListResourceResponseToJSON,
|
|
44
39
|
PreviewAutomationRulesProductCategoryRequestFromJSON,
|
|
45
40
|
PreviewAutomationRulesProductCategoryRequestToJSON,
|
|
41
|
+
PreviewAutomationRulesResourceFromJSON,
|
|
42
|
+
PreviewAutomationRulesResourceToJSON,
|
|
46
43
|
ProductCategoryHierarchyResourceArrayResponseFromJSON,
|
|
47
44
|
ProductCategoryHierarchyResourceArrayResponseToJSON,
|
|
48
45
|
ProductCategoryLiteResourceArrayResponseFromJSON,
|
|
@@ -55,20 +52,10 @@ import {
|
|
|
55
52
|
UpdateProductCategoryRequestToJSON,
|
|
56
53
|
} from '../models/index';
|
|
57
54
|
|
|
58
|
-
export interface AttachProductsProductCategoryOperationRequest {
|
|
59
|
-
productCategory: number;
|
|
60
|
-
attachProductsProductCategoryRequest?: AttachProductsProductCategoryRequest;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
55
|
export interface DestroyProductCategoryRequest {
|
|
64
56
|
productCategory: number;
|
|
65
57
|
}
|
|
66
58
|
|
|
67
|
-
export interface DetachProductsProductCategoryOperationRequest {
|
|
68
|
-
productCategory: number;
|
|
69
|
-
detachProductsProductCategoryRequest?: DetachProductsProductCategoryRequest;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
59
|
export interface GetAllProductCategoryOperationRequest {
|
|
73
60
|
getAllProductCategoryRequest?: GetAllProductCategoryRequest;
|
|
74
61
|
}
|
|
@@ -104,46 +91,6 @@ export interface UpdateProductCategoryOperationRequest {
|
|
|
104
91
|
*/
|
|
105
92
|
export class ProductCategoryApi extends runtime.BaseAPI {
|
|
106
93
|
|
|
107
|
-
/**
|
|
108
|
-
* Auto-generated: attachProductsProductCategory
|
|
109
|
-
*/
|
|
110
|
-
async attachProductsProductCategoryRaw(requestParameters: AttachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryResource>> {
|
|
111
|
-
if (requestParameters['productCategory'] == null) {
|
|
112
|
-
throw new runtime.RequiredError(
|
|
113
|
-
'productCategory',
|
|
114
|
-
'Required parameter "productCategory" was null or undefined when calling attachProductsProductCategory().'
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const queryParameters: any = {};
|
|
119
|
-
|
|
120
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
121
|
-
|
|
122
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
let urlPath = `/admin-api/product-category/{productCategory}/attach-products`;
|
|
126
|
-
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
127
|
-
|
|
128
|
-
const response = await this.request({
|
|
129
|
-
path: urlPath,
|
|
130
|
-
method: 'POST',
|
|
131
|
-
headers: headerParameters,
|
|
132
|
-
query: queryParameters,
|
|
133
|
-
body: AttachProductsProductCategoryRequestToJSON(requestParameters['attachProductsProductCategoryRequest']),
|
|
134
|
-
}, initOverrides);
|
|
135
|
-
|
|
136
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryResourceFromJSON(jsonValue));
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Auto-generated: attachProductsProductCategory
|
|
141
|
-
*/
|
|
142
|
-
async attachProductsProductCategory(requestParameters: AttachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource> {
|
|
143
|
-
const response = await this.attachProductsProductCategoryRaw(requestParameters, initOverrides);
|
|
144
|
-
return await response.value();
|
|
145
|
-
}
|
|
146
|
-
|
|
147
94
|
/**
|
|
148
95
|
* Auto-generated: destroyProductCategory
|
|
149
96
|
*/
|
|
@@ -181,46 +128,6 @@ export class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
181
128
|
return await response.value();
|
|
182
129
|
}
|
|
183
130
|
|
|
184
|
-
/**
|
|
185
|
-
* Auto-generated: detachProductsProductCategory
|
|
186
|
-
*/
|
|
187
|
-
async detachProductsProductCategoryRaw(requestParameters: DetachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryResource>> {
|
|
188
|
-
if (requestParameters['productCategory'] == null) {
|
|
189
|
-
throw new runtime.RequiredError(
|
|
190
|
-
'productCategory',
|
|
191
|
-
'Required parameter "productCategory" was null or undefined when calling detachProductsProductCategory().'
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
const queryParameters: any = {};
|
|
196
|
-
|
|
197
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
198
|
-
|
|
199
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
let urlPath = `/admin-api/product-category/{productCategory}/detach-products`;
|
|
203
|
-
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
204
|
-
|
|
205
|
-
const response = await this.request({
|
|
206
|
-
path: urlPath,
|
|
207
|
-
method: 'POST',
|
|
208
|
-
headers: headerParameters,
|
|
209
|
-
query: queryParameters,
|
|
210
|
-
body: DetachProductsProductCategoryRequestToJSON(requestParameters['detachProductsProductCategoryRequest']),
|
|
211
|
-
}, initOverrides);
|
|
212
|
-
|
|
213
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryResourceFromJSON(jsonValue));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Auto-generated: detachProductsProductCategory
|
|
218
|
-
*/
|
|
219
|
-
async detachProductsProductCategory(requestParameters: DetachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource> {
|
|
220
|
-
const response = await this.detachProductsProductCategoryRaw(requestParameters, initOverrides);
|
|
221
|
-
return await response.value();
|
|
222
|
-
}
|
|
223
|
-
|
|
224
131
|
/**
|
|
225
132
|
* Auto-generated: getAllProductCategory
|
|
226
133
|
*/
|
|
@@ -357,7 +264,7 @@ export class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
357
264
|
/**
|
|
358
265
|
* Auto-generated: previewAutomationRulesProductCategory
|
|
359
266
|
*/
|
|
360
|
-
async previewAutomationRulesProductCategoryRaw(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
267
|
+
async previewAutomationRulesProductCategoryRaw(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PreviewAutomationRulesResource>> {
|
|
361
268
|
const queryParameters: any = {};
|
|
362
269
|
|
|
363
270
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -375,13 +282,13 @@ export class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
375
282
|
body: PreviewAutomationRulesProductCategoryRequestToJSON(requestParameters['previewAutomationRulesProductCategoryRequest']),
|
|
376
283
|
}, initOverrides);
|
|
377
284
|
|
|
378
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
285
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PreviewAutomationRulesResourceFromJSON(jsonValue));
|
|
379
286
|
}
|
|
380
287
|
|
|
381
288
|
/**
|
|
382
289
|
* Auto-generated: previewAutomationRulesProductCategory
|
|
383
290
|
*/
|
|
384
|
-
async previewAutomationRulesProductCategory(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
291
|
+
async previewAutomationRulesProductCategory(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PreviewAutomationRulesResource> {
|
|
385
292
|
const response = await this.previewAutomationRulesProductCategoryRaw(requestParameters, initOverrides);
|
|
386
293
|
return await response.value();
|
|
387
294
|
}
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload?: string | null;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,7 +106,6 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
|
|
|
106
106
|
if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
|
|
107
107
|
if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
|
|
108
108
|
if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
|
|
109
|
-
if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
|
|
110
109
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
111
110
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
112
111
|
return true;
|
|
@@ -129,7 +128,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
129
128
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
130
129
|
'endpoint': json['endpoint'],
|
|
131
130
|
'responseCode': json['responseCode'],
|
|
132
|
-
'requestPayload': json['requestPayload'],
|
|
131
|
+
'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
|
|
133
132
|
'responsePayload': json['responsePayload'],
|
|
134
133
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
135
134
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
export interface PreviewAutomationRulesProductCategoryRequest {
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
|
-
* @type {
|
|
32
|
+
* @type {number}
|
|
33
33
|
* @memberof PreviewAutomationRulesProductCategoryRequest
|
|
34
34
|
*/
|
|
35
|
-
siteId:
|
|
35
|
+
siteId: number;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @type {string}
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface PreviewAutomationRulesResource
|
|
20
|
+
*/
|
|
21
|
+
export interface PreviewAutomationRulesResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PreviewAutomationRulesResource
|
|
26
|
+
*/
|
|
27
|
+
count: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof PreviewAutomationRulesResource
|
|
32
|
+
*/
|
|
33
|
+
tooComplex: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the PreviewAutomationRulesResource interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfPreviewAutomationRulesResource(value: object): value is PreviewAutomationRulesResource {
|
|
40
|
+
if (!('count' in value) || value['count'] === undefined) return false;
|
|
41
|
+
if (!('tooComplex' in value) || value['tooComplex'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function PreviewAutomationRulesResourceFromJSON(json: any): PreviewAutomationRulesResource {
|
|
46
|
+
return PreviewAutomationRulesResourceFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function PreviewAutomationRulesResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewAutomationRulesResource {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'count': json['count'],
|
|
56
|
+
'tooComplex': json['too_complex'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function PreviewAutomationRulesResourceToJSON(json: any): PreviewAutomationRulesResource {
|
|
61
|
+
return PreviewAutomationRulesResourceToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function PreviewAutomationRulesResourceToJSONTyped(value?: PreviewAutomationRulesResource | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'count': value['count'],
|
|
72
|
+
'too_complex': value['tooComplex'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|