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

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 +6 -4
  3. package/dist/apis/ProductCategoryApi.d.ts +27 -3
  4. package/dist/apis/ProductCategoryApi.js +97 -1
  5. package/dist/models/AttachProductsProductCategoryRequest.d.ts +32 -0
  6. package/dist/models/AttachProductsProductCategoryRequest.js +51 -0
  7. package/dist/models/DetachProductsProductCategoryRequest.d.ts +32 -0
  8. package/dist/models/DetachProductsProductCategoryRequest.js +51 -0
  9. package/dist/models/PreviewAutomationRulesProductCategoryRequest.d.ts +2 -2
  10. package/dist/models/ProductCategoryListResource.d.ts +0 -6
  11. package/dist/models/ProductCategoryListResource.js +0 -4
  12. package/dist/models/ProductRating.d.ts +0 -1
  13. package/dist/models/ProductRating.js +1 -2
  14. package/dist/models/ProductSearchResultResource.d.ts +0 -6
  15. package/dist/models/ProductSearchResultResource.js +0 -4
  16. package/dist/models/index.d.ts +2 -2
  17. package/dist/models/index.js +2 -2
  18. package/docs/{PreviewAutomationRulesResource.md → AttachProductsProductCategoryRequest.md} +6 -8
  19. package/docs/{PreviewAutomationRulesResourceArrayResponse.md → DetachProductsProductCategoryRequest.md} +6 -6
  20. package/docs/PreviewAutomationRulesProductCategoryRequest.md +1 -1
  21. package/docs/ProductCategoryApi.md +141 -3
  22. package/docs/ProductCategoryListResource.md +0 -2
  23. package/docs/ProductSearchResultResource.md +0 -2
  24. package/package.json +1 -1
  25. package/src/apis/ProductCategoryApi.ts +99 -6
  26. package/src/models/AttachProductsProductCategoryRequest.ts +66 -0
  27. package/src/models/DetachProductsProductCategoryRequest.ts +66 -0
  28. package/src/models/PreviewAutomationRulesProductCategoryRequest.ts +2 -2
  29. package/src/models/ProductCategoryListResource.ts +0 -9
  30. package/src/models/ProductRating.ts +1 -2
  31. package/src/models/ProductSearchResultResource.ts +0 -9
  32. package/src/models/index.ts +2 -2
  33. package/dist/models/PreviewAutomationRulesResource.d.ts +0 -38
  34. package/dist/models/PreviewAutomationRulesResource.js +0 -55
  35. package/dist/models/PreviewAutomationRulesResourceArrayResponse.d.ts +0 -33
  36. package/dist/models/PreviewAutomationRulesResourceArrayResponse.js +0 -50
  37. package/src/models/PreviewAutomationRulesResource.ts +0 -75
  38. package/src/models/PreviewAutomationRulesResourceArrayResponse.ts +0 -73
@@ -1,22 +1,22 @@
1
1
 
2
- # PreviewAutomationRulesResourceArrayResponse
2
+ # DetachProductsProductCategoryRequest
3
3
 
4
4
 
5
5
  ## Properties
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `data` | [Array<PreviewAutomationRulesResource>](PreviewAutomationRulesResource.md)
9
+ `productChildSiteDetailIds` | Array<number>
10
10
 
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import type { PreviewAutomationRulesResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
14
+ import type { DetachProductsProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
15
15
 
16
16
  // TODO: Update the object below with actual values
17
17
  const example = {
18
- "data": null,
19
- } satisfies PreviewAutomationRulesResourceArrayResponse
18
+ "productChildSiteDetailIds": null,
19
+ } satisfies DetachProductsProductCategoryRequest
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 PreviewAutomationRulesResourceArrayResponse
28
+ const exampleParsed = JSON.parse(exampleJSON) as DetachProductsProductCategoryRequest
29
29
  console.log(exampleParsed)
30
30
  ```
31
31
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `siteId` | number
9
+ `siteId` | string
10
10
  `automatedConditionType` | string
11
11
  `automationRules` | [Array<StoreProductCategoryRequestAutomationRulesInner>](StoreProductCategoryRequestAutomationRulesInner.md)
12
12
 
@@ -4,7 +4,9 @@ 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 |
7
8
  | [**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 |
8
10
  | [**getAllProductCategory**](ProductCategoryApi.md#getallproductcategoryoperation) | **POST** /admin-api/product-category/all | Auto-generated: getAllProductCategory |
9
11
  | [**getChildrenProductCategory**](ProductCategoryApi.md#getchildrenproductcategory) | **GET** /admin-api/product-category/{productCategory}/children | Auto-generated: getChildrenProductCategory |
10
12
  | [**getHierarchyProductCategory**](ProductCategoryApi.md#gethierarchyproductcategory) | **GET** /admin-api/product-category/hierarchy | Auto-generated: getHierarchyProductCategory |
@@ -16,6 +18,74 @@ All URIs are relative to *http://localhost/api*
16
18
 
17
19
 
18
20
 
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
+
19
89
  ## destroyProductCategory
20
90
 
21
91
  > GenericResponse destroyProductCategory(productCategory)
@@ -81,6 +151,74 @@ No authorization required
81
151
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
82
152
 
83
153
 
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
+
84
222
  ## getAllProductCategory
85
223
 
86
224
  > ProductCategoryLiteResourceArrayResponse getAllProductCategory(getAllProductCategoryRequest)
@@ -338,7 +476,7 @@ No authorization required
338
476
 
339
477
  ## previewAutomationRulesProductCategory
340
478
 
341
- > PreviewAutomationRulesResource previewAutomationRulesProductCategory(previewAutomationRulesProductCategoryRequest)
479
+ > GenericResponse previewAutomationRulesProductCategory(previewAutomationRulesProductCategoryRequest)
342
480
 
343
481
  Auto-generated: previewAutomationRulesProductCategory
344
482
 
@@ -381,7 +519,7 @@ example().catch(console.error);
381
519
 
382
520
  ### Return type
383
521
 
384
- [**PreviewAutomationRulesResource**](PreviewAutomationRulesResource.md)
522
+ [**GenericResponse**](GenericResponse.md)
385
523
 
386
524
  ### Authorization
387
525
 
@@ -396,7 +534,7 @@ No authorization required
396
534
  ### HTTP response details
397
535
  | Status code | Description | Response headers |
398
536
  |-------------|-------------|------------------|
399
- | **200** | Successful resource response | - |
537
+ | **200** | \\JsonResponse<array{count: int}> | - |
400
538
 
401
539
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
402
540
 
@@ -12,7 +12,6 @@ Name | Type
12
12
  `isDisabled` | boolean
13
13
  `isAutomated` | boolean
14
14
  `hasChildren` | boolean
15
- `isParent` | boolean
16
15
  `productCount` | number
17
16
  `site` | [SiteLiteResource](SiteLiteResource.md)
18
17
 
@@ -29,7 +28,6 @@ const example = {
29
28
  "isDisabled": null,
30
29
  "isAutomated": null,
31
30
  "hasChildren": null,
32
- "isParent": null,
33
31
  "productCount": null,
34
32
  "site": null,
35
33
  } satisfies ProductCategoryListResource
@@ -18,7 +18,6 @@ Name | Type
18
18
  `labelDetails` | Array<number>
19
19
  `categories` | Array<object>
20
20
  `supplierName` | string
21
- `supplierLogo` | string
22
21
  `supplierId` | number
23
22
  `availability` | string
24
23
  `wishlisted` | boolean
@@ -42,7 +41,6 @@ const example = {
42
41
  "labelDetails": null,
43
42
  "categories": null,
44
43
  "supplierName": null,
45
- "supplierLogo": null,
46
44
  "supplierId": null,
47
45
  "availability": null,
48
46
  "wishlisted": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.567",
3
+ "version": "0.0.569",
4
4
  "description": "OpenAPI client for @digital8/lighting-illusions-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -15,12 +15,13 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ AttachProductsProductCategoryRequest,
19
+ DetachProductsProductCategoryRequest,
18
20
  GenericResponse,
19
21
  GetAllProductCategoryRequest,
20
22
  IndexProductCategoryRequest,
21
23
  PaginatedProductCategoryListResourceResponse,
22
24
  PreviewAutomationRulesProductCategoryRequest,
23
- PreviewAutomationRulesResource,
24
25
  ProductCategoryHierarchyResourceArrayResponse,
25
26
  ProductCategoryLiteResourceArrayResponse,
26
27
  ProductCategoryResource,
@@ -28,6 +29,10 @@ import type {
28
29
  UpdateProductCategoryRequest,
29
30
  } from '../models/index';
30
31
  import {
32
+ AttachProductsProductCategoryRequestFromJSON,
33
+ AttachProductsProductCategoryRequestToJSON,
34
+ DetachProductsProductCategoryRequestFromJSON,
35
+ DetachProductsProductCategoryRequestToJSON,
31
36
  GenericResponseFromJSON,
32
37
  GenericResponseToJSON,
33
38
  GetAllProductCategoryRequestFromJSON,
@@ -38,8 +43,6 @@ import {
38
43
  PaginatedProductCategoryListResourceResponseToJSON,
39
44
  PreviewAutomationRulesProductCategoryRequestFromJSON,
40
45
  PreviewAutomationRulesProductCategoryRequestToJSON,
41
- PreviewAutomationRulesResourceFromJSON,
42
- PreviewAutomationRulesResourceToJSON,
43
46
  ProductCategoryHierarchyResourceArrayResponseFromJSON,
44
47
  ProductCategoryHierarchyResourceArrayResponseToJSON,
45
48
  ProductCategoryLiteResourceArrayResponseFromJSON,
@@ -52,10 +55,20 @@ import {
52
55
  UpdateProductCategoryRequestToJSON,
53
56
  } from '../models/index';
54
57
 
58
+ export interface AttachProductsProductCategoryOperationRequest {
59
+ productCategory: number;
60
+ attachProductsProductCategoryRequest?: AttachProductsProductCategoryRequest;
61
+ }
62
+
55
63
  export interface DestroyProductCategoryRequest {
56
64
  productCategory: number;
57
65
  }
58
66
 
67
+ export interface DetachProductsProductCategoryOperationRequest {
68
+ productCategory: number;
69
+ detachProductsProductCategoryRequest?: DetachProductsProductCategoryRequest;
70
+ }
71
+
59
72
  export interface GetAllProductCategoryOperationRequest {
60
73
  getAllProductCategoryRequest?: GetAllProductCategoryRequest;
61
74
  }
@@ -91,6 +104,46 @@ export interface UpdateProductCategoryOperationRequest {
91
104
  */
92
105
  export class ProductCategoryApi extends runtime.BaseAPI {
93
106
 
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
+
94
147
  /**
95
148
  * Auto-generated: destroyProductCategory
96
149
  */
@@ -128,6 +181,46 @@ export class ProductCategoryApi extends runtime.BaseAPI {
128
181
  return await response.value();
129
182
  }
130
183
 
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
+
131
224
  /**
132
225
  * Auto-generated: getAllProductCategory
133
226
  */
@@ -264,7 +357,7 @@ export class ProductCategoryApi extends runtime.BaseAPI {
264
357
  /**
265
358
  * Auto-generated: previewAutomationRulesProductCategory
266
359
  */
267
- async previewAutomationRulesProductCategoryRaw(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PreviewAutomationRulesResource>> {
360
+ async previewAutomationRulesProductCategoryRaw(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
268
361
  const queryParameters: any = {};
269
362
 
270
363
  const headerParameters: runtime.HTTPHeaders = {};
@@ -282,13 +375,13 @@ export class ProductCategoryApi extends runtime.BaseAPI {
282
375
  body: PreviewAutomationRulesProductCategoryRequestToJSON(requestParameters['previewAutomationRulesProductCategoryRequest']),
283
376
  }, initOverrides);
284
377
 
285
- return new runtime.JSONApiResponse(response, (jsonValue) => PreviewAutomationRulesResourceFromJSON(jsonValue));
378
+ return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
286
379
  }
287
380
 
288
381
  /**
289
382
  * Auto-generated: previewAutomationRulesProductCategory
290
383
  */
291
- async previewAutomationRulesProductCategory(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PreviewAutomationRulesResource> {
384
+ async previewAutomationRulesProductCategory(requestParameters: PreviewAutomationRulesProductCategoryOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
292
385
  const response = await this.previewAutomationRulesProductCategoryRaw(requestParameters, initOverrides);
293
386
  return await response.value();
294
387
  }
@@ -0,0 +1,66 @@
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 AttachProductsProductCategoryRequest
20
+ */
21
+ export interface AttachProductsProductCategoryRequest {
22
+ /**
23
+ *
24
+ * @type {Array<number>}
25
+ * @memberof AttachProductsProductCategoryRequest
26
+ */
27
+ productChildSiteDetailIds: Array<number>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the AttachProductsProductCategoryRequest interface.
32
+ */
33
+ export function instanceOfAttachProductsProductCategoryRequest(value: object): value is AttachProductsProductCategoryRequest {
34
+ if (!('productChildSiteDetailIds' in value) || value['productChildSiteDetailIds'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function AttachProductsProductCategoryRequestFromJSON(json: any): AttachProductsProductCategoryRequest {
39
+ return AttachProductsProductCategoryRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AttachProductsProductCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachProductsProductCategoryRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'productChildSiteDetailIds': json['product_child_site_detail_ids'],
49
+ };
50
+ }
51
+
52
+ export function AttachProductsProductCategoryRequestToJSON(json: any): AttachProductsProductCategoryRequest {
53
+ return AttachProductsProductCategoryRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function AttachProductsProductCategoryRequestToJSONTyped(value?: AttachProductsProductCategoryRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'product_child_site_detail_ids': value['productChildSiteDetailIds'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,66 @@
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 DetachProductsProductCategoryRequest
20
+ */
21
+ export interface DetachProductsProductCategoryRequest {
22
+ /**
23
+ *
24
+ * @type {Array<number>}
25
+ * @memberof DetachProductsProductCategoryRequest
26
+ */
27
+ productChildSiteDetailIds: Array<number>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the DetachProductsProductCategoryRequest interface.
32
+ */
33
+ export function instanceOfDetachProductsProductCategoryRequest(value: object): value is DetachProductsProductCategoryRequest {
34
+ if (!('productChildSiteDetailIds' in value) || value['productChildSiteDetailIds'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function DetachProductsProductCategoryRequestFromJSON(json: any): DetachProductsProductCategoryRequest {
39
+ return DetachProductsProductCategoryRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function DetachProductsProductCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetachProductsProductCategoryRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'productChildSiteDetailIds': json['product_child_site_detail_ids'],
49
+ };
50
+ }
51
+
52
+ export function DetachProductsProductCategoryRequestToJSON(json: any): DetachProductsProductCategoryRequest {
53
+ return DetachProductsProductCategoryRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function DetachProductsProductCategoryRequestToJSONTyped(value?: DetachProductsProductCategoryRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'product_child_site_detail_ids': value['productChildSiteDetailIds'],
64
+ };
65
+ }
66
+
@@ -29,10 +29,10 @@ import {
29
29
  export interface PreviewAutomationRulesProductCategoryRequest {
30
30
  /**
31
31
  *
32
- * @type {number}
32
+ * @type {string}
33
33
  * @memberof PreviewAutomationRulesProductCategoryRequest
34
34
  */
35
- siteId: number;
35
+ siteId: string;
36
36
  /**
37
37
  *
38
38
  * @type {string}
@@ -63,12 +63,6 @@ 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;
72
66
  /**
73
67
  *
74
68
  * @type {number}
@@ -92,7 +86,6 @@ export function instanceOfProductCategoryListResource(value: object): value is P
92
86
  if (!('isDisabled' in value) || value['isDisabled'] === undefined) return false;
93
87
  if (!('isAutomated' in value) || value['isAutomated'] === undefined) return false;
94
88
  if (!('hasChildren' in value) || value['hasChildren'] === undefined) return false;
95
- if (!('isParent' in value) || value['isParent'] === undefined) return false;
96
89
  if (!('productCount' in value) || value['productCount'] === undefined) return false;
97
90
  if (!('site' in value) || value['site'] === undefined) return false;
98
91
  return true;
@@ -114,7 +107,6 @@ export function ProductCategoryListResourceFromJSONTyped(json: any, ignoreDiscri
114
107
  'isDisabled': json['isDisabled'],
115
108
  'isAutomated': json['isAutomated'],
116
109
  'hasChildren': json['hasChildren'],
117
- 'isParent': json['isParent'],
118
110
  'productCount': json['productCount'],
119
111
  'site': SiteLiteResourceFromJSON(json['site']),
120
112
  };
@@ -137,7 +129,6 @@ export function ProductCategoryListResourceToJSONTyped(value?: ProductCategoryLi
137
129
  'isDisabled': value['isDisabled'],
138
130
  'isAutomated': value['isAutomated'],
139
131
  'hasChildren': value['hasChildren'],
140
- 'isParent': value['isParent'],
141
132
  'productCount': value['productCount'],
142
133
  'site': SiteLiteResourceToJSON(value['site']),
143
134
  };
@@ -20,8 +20,7 @@
20
20
  export const ProductRating = {
21
21
  _5: '5',
22
22
  _4: '4',
23
- _3: '3',
24
- _2: '2'
23
+ _3: '3'
25
24
  } as const;
26
25
  export type ProductRating = typeof ProductRating[keyof typeof ProductRating];
27
26
 
@@ -91,12 +91,6 @@ export interface ProductSearchResultResource {
91
91
  * @memberof ProductSearchResultResource
92
92
  */
93
93
  supplierName: string;
94
- /**
95
- *
96
- * @type {string}
97
- * @memberof ProductSearchResultResource
98
- */
99
- supplierLogo: string;
100
94
  /**
101
95
  *
102
96
  * @type {number}
@@ -132,7 +126,6 @@ export function instanceOfProductSearchResultResource(value: object): value is P
132
126
  if (!('labelDetails' in value) || value['labelDetails'] === undefined) return false;
133
127
  if (!('categories' in value) || value['categories'] === undefined) return false;
134
128
  if (!('supplierName' in value) || value['supplierName'] === undefined) return false;
135
- if (!('supplierLogo' in value) || value['supplierLogo'] === undefined) return false;
136
129
  if (!('supplierId' in value) || value['supplierId'] === undefined) return false;
137
130
  if (!('availability' in value) || value['availability'] === undefined) return false;
138
131
  if (!('wishlisted' in value) || value['wishlisted'] === undefined) return false;
@@ -161,7 +154,6 @@ export function ProductSearchResultResourceFromJSONTyped(json: any, ignoreDiscri
161
154
  'labelDetails': json['labelDetails'],
162
155
  'categories': json['categories'],
163
156
  'supplierName': json['supplierName'],
164
- 'supplierLogo': json['supplierLogo'],
165
157
  'supplierId': json['supplierId'],
166
158
  'availability': json['availability'],
167
159
  'wishlisted': json['wishlisted'],
@@ -191,7 +183,6 @@ export function ProductSearchResultResourceToJSONTyped(value?: ProductSearchResu
191
183
  'labelDetails': value['labelDetails'],
192
184
  'categories': value['categories'],
193
185
  'supplierName': value['supplierName'],
194
- 'supplierLogo': value['supplierLogo'],
195
186
  'supplierId': value['supplierId'],
196
187
  'availability': value['availability'],
197
188
  'wishlisted': value['wishlisted'],