@digital8/lighting-illusions-ts-sdk 0.0.569 → 0.0.571

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.
Files changed (38) hide show
  1. package/.openapi-generator/FILES +4 -4
  2. package/README.md +4 -6
  3. package/dist/apis/ProductCategoryApi.d.ts +3 -27
  4. package/dist/apis/ProductCategoryApi.js +1 -97
  5. package/dist/models/PreviewAutomationRulesProductCategoryRequest.d.ts +2 -2
  6. package/dist/models/PreviewAutomationRulesResource.d.ts +38 -0
  7. package/dist/models/PreviewAutomationRulesResource.js +55 -0
  8. package/dist/models/PreviewAutomationRulesResourceArrayResponse.d.ts +33 -0
  9. package/dist/models/PreviewAutomationRulesResourceArrayResponse.js +50 -0
  10. package/dist/models/ProductCategoryListResource.d.ts +6 -0
  11. package/dist/models/ProductCategoryListResource.js +4 -0
  12. package/dist/models/ProductRating.d.ts +1 -0
  13. package/dist/models/ProductRating.js +2 -1
  14. package/dist/models/ProductSearchResultResource.d.ts +6 -0
  15. package/dist/models/ProductSearchResultResource.js +4 -0
  16. package/dist/models/index.d.ts +2 -2
  17. package/dist/models/index.js +2 -2
  18. package/docs/PreviewAutomationRulesProductCategoryRequest.md +1 -1
  19. package/docs/{AttachProductsProductCategoryRequest.md → PreviewAutomationRulesResource.md} +8 -6
  20. package/docs/{DetachProductsProductCategoryRequest.md → PreviewAutomationRulesResourceArrayResponse.md} +6 -6
  21. package/docs/ProductCategoryApi.md +3 -141
  22. package/docs/ProductCategoryListResource.md +2 -0
  23. package/docs/ProductSearchResultResource.md +2 -0
  24. package/package.json +1 -1
  25. package/src/apis/ProductCategoryApi.ts +6 -99
  26. package/src/models/PreviewAutomationRulesProductCategoryRequest.ts +2 -2
  27. package/src/models/PreviewAutomationRulesResource.ts +75 -0
  28. package/src/models/PreviewAutomationRulesResourceArrayResponse.ts +73 -0
  29. package/src/models/ProductCategoryListResource.ts +9 -0
  30. package/src/models/ProductRating.ts +2 -1
  31. package/src/models/ProductSearchResultResource.ts +9 -0
  32. package/src/models/index.ts +2 -2
  33. package/dist/models/AttachProductsProductCategoryRequest.d.ts +0 -32
  34. package/dist/models/AttachProductsProductCategoryRequest.js +0 -51
  35. package/dist/models/DetachProductsProductCategoryRequest.d.ts +0 -32
  36. package/dist/models/DetachProductsProductCategoryRequest.js +0 -51
  37. package/src/models/AttachProductsProductCategoryRequest.ts +0 -66
  38. package/src/models/DetachProductsProductCategoryRequest.ts +0 -66
@@ -1,22 +1,24 @@
1
1
 
2
- # AttachProductsProductCategoryRequest
2
+ # PreviewAutomationRulesResource
3
3
 
4
4
 
5
5
  ## Properties
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `productChildSiteDetailIds` | Array<number>
9
+ `count` | number
10
+ `tooComplex` | boolean
10
11
 
11
12
  ## Example
12
13
 
13
14
  ```typescript
14
- import type { AttachProductsProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
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
- "productChildSiteDetailIds": null,
19
- } satisfies AttachProductsProductCategoryRequest
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 AttachProductsProductCategoryRequest
30
+ const exampleParsed = JSON.parse(exampleJSON) as PreviewAutomationRulesResource
29
31
  console.log(exampleParsed)
30
32
  ```
31
33
 
@@ -1,22 +1,22 @@
1
1
 
2
- # DetachProductsProductCategoryRequest
2
+ # PreviewAutomationRulesResourceArrayResponse
3
3
 
4
4
 
5
5
  ## Properties
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `productChildSiteDetailIds` | Array<number>
9
+ `data` | [Array<PreviewAutomationRulesResource>](PreviewAutomationRulesResource.md)
10
10
 
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import type { DetachProductsProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
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
- "productChildSiteDetailIds": null,
19
- } satisfies DetachProductsProductCategoryRequest
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 DetachProductsProductCategoryRequest
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
- > GenericResponse previewAutomationRulesProductCategory(previewAutomationRulesProductCategoryRequest)
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
- [**GenericResponse**](GenericResponse.md)
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** | \\JsonResponse<array{count: int}> | - |
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.569",
3
+ "version": "0.0.571",
4
4
  "description": "OpenAPI client for @digital8/lighting-illusions-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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<GenericResponse>> {
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) => GenericResponseFromJSON(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<GenericResponse> {
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
  }
@@ -29,10 +29,10 @@ import {
29
29
  export interface PreviewAutomationRulesProductCategoryRequest {
30
30
  /**
31
31
  *
32
- * @type {string}
32
+ * @type {number}
33
33
  * @memberof PreviewAutomationRulesProductCategoryRequest
34
34
  */
35
- siteId: string;
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
+
@@ -0,0 +1,73 @@
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 { PreviewAutomationRulesResource } from './PreviewAutomationRulesResource';
17
+ import {
18
+ PreviewAutomationRulesResourceFromJSON,
19
+ PreviewAutomationRulesResourceFromJSONTyped,
20
+ PreviewAutomationRulesResourceToJSON,
21
+ PreviewAutomationRulesResourceToJSONTyped,
22
+ } from './PreviewAutomationRulesResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PreviewAutomationRulesResourceArrayResponse
28
+ */
29
+ export interface PreviewAutomationRulesResourceArrayResponse {
30
+ /**
31
+ *
32
+ * @type {Array<PreviewAutomationRulesResource>}
33
+ * @memberof PreviewAutomationRulesResourceArrayResponse
34
+ */
35
+ data?: Array<PreviewAutomationRulesResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the PreviewAutomationRulesResourceArrayResponse interface.
40
+ */
41
+ export function instanceOfPreviewAutomationRulesResourceArrayResponse(value: object): value is PreviewAutomationRulesResourceArrayResponse {
42
+ return true;
43
+ }
44
+
45
+ export function PreviewAutomationRulesResourceArrayResponseFromJSON(json: any): PreviewAutomationRulesResourceArrayResponse {
46
+ return PreviewAutomationRulesResourceArrayResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PreviewAutomationRulesResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewAutomationRulesResourceArrayResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(PreviewAutomationRulesResourceFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function PreviewAutomationRulesResourceArrayResponseToJSON(json: any): PreviewAutomationRulesResourceArrayResponse {
60
+ return PreviewAutomationRulesResourceArrayResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function PreviewAutomationRulesResourceArrayResponseToJSONTyped(value?: PreviewAutomationRulesResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(PreviewAutomationRulesResourceToJSON)),
71
+ };
72
+ }
73
+
@@ -63,6 +63,12 @@ export interface ProductCategoryListResource {
63
63
  * @memberof ProductCategoryListResource
64
64
  */
65
65
  hasChildren: boolean;
66
+ /**
67
+ *
68
+ * @type {boolean}
69
+ * @memberof ProductCategoryListResource
70
+ */
71
+ isParent: boolean;
66
72
  /**
67
73
  *
68
74
  * @type {number}
@@ -86,6 +92,7 @@ export function instanceOfProductCategoryListResource(value: object): value is P
86
92
  if (!('isDisabled' in value) || value['isDisabled'] === undefined) return false;
87
93
  if (!('isAutomated' in value) || value['isAutomated'] === undefined) return false;
88
94
  if (!('hasChildren' in value) || value['hasChildren'] === undefined) return false;
95
+ if (!('isParent' in value) || value['isParent'] === undefined) return false;
89
96
  if (!('productCount' in value) || value['productCount'] === undefined) return false;
90
97
  if (!('site' in value) || value['site'] === undefined) return false;
91
98
  return true;
@@ -107,6 +114,7 @@ export function ProductCategoryListResourceFromJSONTyped(json: any, ignoreDiscri
107
114
  'isDisabled': json['isDisabled'],
108
115
  'isAutomated': json['isAutomated'],
109
116
  'hasChildren': json['hasChildren'],
117
+ 'isParent': json['isParent'],
110
118
  'productCount': json['productCount'],
111
119
  'site': SiteLiteResourceFromJSON(json['site']),
112
120
  };
@@ -129,6 +137,7 @@ export function ProductCategoryListResourceToJSONTyped(value?: ProductCategoryLi
129
137
  'isDisabled': value['isDisabled'],
130
138
  'isAutomated': value['isAutomated'],
131
139
  'hasChildren': value['hasChildren'],
140
+ 'isParent': value['isParent'],
132
141
  'productCount': value['productCount'],
133
142
  'site': SiteLiteResourceToJSON(value['site']),
134
143
  };
@@ -20,7 +20,8 @@
20
20
  export const ProductRating = {
21
21
  _5: '5',
22
22
  _4: '4',
23
- _3: '3'
23
+ _3: '3',
24
+ _2: '2'
24
25
  } as const;
25
26
  export type ProductRating = typeof ProductRating[keyof typeof ProductRating];
26
27