@digital8/lighting-illusions-ts-sdk 0.0.568 → 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.
- package/.openapi-generator/FILES +4 -4
- package/README.md +6 -4
- package/dist/apis/ProductCategoryApi.d.ts +27 -3
- package/dist/apis/ProductCategoryApi.js +97 -1
- package/dist/models/AttachProductsProductCategoryRequest.d.ts +32 -0
- package/dist/models/AttachProductsProductCategoryRequest.js +51 -0
- package/dist/models/DetachProductsProductCategoryRequest.d.ts +32 -0
- package/dist/models/DetachProductsProductCategoryRequest.js +51 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/PreviewAutomationRulesProductCategoryRequest.d.ts +2 -2
- package/dist/models/ProductCategoryListResource.d.ts +0 -6
- package/dist/models/ProductCategoryListResource.js +0 -4
- package/dist/models/ProductRating.d.ts +0 -1
- package/dist/models/ProductRating.js +1 -2
- package/dist/models/ProductSearchResultResource.d.ts +0 -6
- package/dist/models/ProductSearchResultResource.js +0 -4
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +2 -2
- package/docs/{PreviewAutomationRulesResource.md → AttachProductsProductCategoryRequest.md} +6 -8
- package/docs/{PreviewAutomationRulesResourceArrayResponse.md → DetachProductsProductCategoryRequest.md} +6 -6
- package/docs/PreviewAutomationRulesProductCategoryRequest.md +1 -1
- package/docs/ProductCategoryApi.md +141 -3
- package/docs/ProductCategoryListResource.md +0 -2
- package/docs/ProductSearchResultResource.md +0 -2
- package/package.json +1 -1
- package/src/apis/ProductCategoryApi.ts +99 -6
- package/src/models/AttachProductsProductCategoryRequest.ts +66 -0
- package/src/models/DetachProductsProductCategoryRequest.ts +66 -0
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/PreviewAutomationRulesProductCategoryRequest.ts +2 -2
- package/src/models/ProductCategoryListResource.ts +0 -9
- package/src/models/ProductRating.ts +1 -2
- package/src/models/ProductSearchResultResource.ts +0 -9
- package/src/models/index.ts +2 -2
- package/dist/models/PreviewAutomationRulesResource.d.ts +0 -38
- package/dist/models/PreviewAutomationRulesResource.js +0 -55
- package/dist/models/PreviewAutomationRulesResourceArrayResponse.d.ts +0 -33
- package/dist/models/PreviewAutomationRulesResourceArrayResponse.js +0 -50
- package/src/models/PreviewAutomationRulesResource.ts +0 -75
- package/src/models/PreviewAutomationRulesResourceArrayResponse.ts +0 -73
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# AttachProductsProductCategoryRequest
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`
|
|
10
|
-
`tooComplex` | boolean
|
|
9
|
+
`productChildSiteDetailIds` | Array<number>
|
|
11
10
|
|
|
12
11
|
## Example
|
|
13
12
|
|
|
14
13
|
```typescript
|
|
15
|
-
import type {
|
|
14
|
+
import type { AttachProductsProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
15
|
|
|
17
16
|
// TODO: Update the object below with actual values
|
|
18
17
|
const example = {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
} satisfies PreviewAutomationRulesResource
|
|
18
|
+
"productChildSiteDetailIds": null,
|
|
19
|
+
} satisfies AttachProductsProductCategoryRequest
|
|
22
20
|
|
|
23
21
|
console.log(example)
|
|
24
22
|
|
|
@@ -27,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
27
25
|
console.log(exampleJSON)
|
|
28
26
|
|
|
29
27
|
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as AttachProductsProductCategoryRequest
|
|
31
29
|
console.log(exampleParsed)
|
|
32
30
|
```
|
|
33
31
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# DetachProductsProductCategoryRequest
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`
|
|
9
|
+
`productChildSiteDetailIds` | Array<number>
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import type {
|
|
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
|
-
"
|
|
19
|
-
} satisfies
|
|
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
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as DetachProductsProductCategoryRequest
|
|
29
29
|
console.log(exampleParsed)
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -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
|
-
>
|
|
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
|
-
[**
|
|
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** |
|
|
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
|
@@ -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<
|
|
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) =>
|
|
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<
|
|
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
|
+
|
|
@@ -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']),
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
export interface PreviewAutomationRulesProductCategoryRequest {
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
|
-
* @type {
|
|
32
|
+
* @type {string}
|
|
33
33
|
* @memberof PreviewAutomationRulesProductCategoryRequest
|
|
34
34
|
*/
|
|
35
|
-
siteId:
|
|
35
|
+
siteId: string;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @type {string}
|