@digital8/lighting-illusions-ts-sdk 0.0.590 → 0.0.592
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 -0
- package/README.md +7 -2
- package/dist/apis/ProductCategoryApi.d.ts +36 -1
- package/dist/apis/ProductCategoryApi.js +142 -0
- 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/GetAllDocumentRequest.d.ts +6 -0
- package/dist/models/GetAllDocumentRequest.js +2 -0
- package/dist/models/GetAllProductChildRequest.d.ts +1 -1
- package/dist/models/GetAllProductChildRequest.js +3 -3
- package/dist/models/IndexDocumentRequest.d.ts +6 -0
- package/dist/models/IndexDocumentRequest.js +2 -0
- package/dist/models/IndexProductChildRequest.d.ts +3 -1
- package/dist/models/IndexProductChildRequest.js +5 -3
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/AttachProductsProductCategoryRequest.md +34 -0
- package/docs/DetachProductsProductCategoryRequest.md +34 -0
- package/docs/GetAllDocumentRequest.md +2 -0
- package/docs/IndexDocumentRequest.md +2 -0
- package/docs/ProductCategoryApi.md +204 -0
- package/package.json +1 -1
- package/src/apis/ProductCategoryApi.ts +137 -0
- package/src/models/AttachProductsProductCategoryRequest.ts +66 -0
- package/src/models/DetachProductsProductCategoryRequest.ts +66 -0
- package/src/models/GetAllDocumentRequest.ts +8 -0
- package/src/models/GetAllProductChildRequest.ts +3 -3
- package/src/models/IndexDocumentRequest.ts +8 -0
- package/src/models/IndexProductChildRequest.ts +5 -3
- package/src/models/index.ts +2 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# AttachProductsProductCategoryRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`productChildIds` | Array<number>
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { AttachProductsProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"productChildIds": null,
|
|
19
|
+
} satisfies AttachProductsProductCategoryRequest
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as AttachProductsProductCategoryRequest
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# DetachProductsProductCategoryRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`productChildIds` | Array<number>
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { DetachProductsProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"productChildIds": null,
|
|
19
|
+
} satisfies DetachProductsProductCategoryRequest
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as DetachProductsProductCategoryRequest
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`relatedId` | number
|
|
13
13
|
`relatedType` | string
|
|
14
14
|
`includesRelations` | boolean
|
|
15
|
+
`sitesId` | Array<string>
|
|
15
16
|
|
|
16
17
|
## Example
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ const example = {
|
|
|
26
27
|
"relatedId": null,
|
|
27
28
|
"relatedType": null,
|
|
28
29
|
"includesRelations": null,
|
|
30
|
+
"sitesId": null,
|
|
29
31
|
} satisfies GetAllDocumentRequest
|
|
30
32
|
|
|
31
33
|
console.log(example)
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`sortDirection` | string
|
|
12
12
|
`perPage` | number
|
|
13
13
|
`page` | number
|
|
14
|
+
`sitesId` | Array<string>
|
|
14
15
|
`relatedId` | number
|
|
15
16
|
`relatedType` | string
|
|
16
17
|
`includesRelations` | boolean
|
|
@@ -27,6 +28,7 @@ const example = {
|
|
|
27
28
|
"sortDirection": null,
|
|
28
29
|
"perPage": null,
|
|
29
30
|
"page": null,
|
|
31
|
+
"sitesId": null,
|
|
30
32
|
"relatedId": null,
|
|
31
33
|
"relatedType": null,
|
|
32
34
|
"includesRelations": null,
|
|
@@ -4,7 +4,10 @@ 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
|
+
| [**bulkDetachProductsProductCategory**](ProductCategoryApi.md#bulkdetachproductsproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/bulk-detach-products | Auto-generated: bulkDetachProductsProductCategory |
|
|
7
9
|
| [**destroyProductCategory**](ProductCategoryApi.md#destroyproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/delete | Auto-generated: destroyProductCategory |
|
|
10
|
+
| [**detachProductsProductCategory**](ProductCategoryApi.md#detachproductsproductcategoryoperation) | **POST** /admin-api/product-category/{productCategory}/detach-products | Auto-generated: detachProductsProductCategory |
|
|
8
11
|
| [**getAllProductCategory**](ProductCategoryApi.md#getallproductcategoryoperation) | **POST** /admin-api/product-category/all | Auto-generated: getAllProductCategory |
|
|
9
12
|
| [**getChildrenProductCategory**](ProductCategoryApi.md#getchildrenproductcategory) | **GET** /admin-api/product-category/{productCategory}/children | Auto-generated: getChildrenProductCategory |
|
|
10
13
|
| [**getHierarchyProductCategory**](ProductCategoryApi.md#gethierarchyproductcategory) | **GET** /admin-api/product-category/hierarchy | Auto-generated: getHierarchyProductCategory |
|
|
@@ -16,6 +19,139 @@ All URIs are relative to *http://localhost/api*
|
|
|
16
19
|
|
|
17
20
|
|
|
18
21
|
|
|
22
|
+
## attachProductsProductCategory
|
|
23
|
+
|
|
24
|
+
> ProductCategoryResource attachProductsProductCategory(productCategory, attachProductsProductCategoryRequest)
|
|
25
|
+
|
|
26
|
+
Auto-generated: attachProductsProductCategory
|
|
27
|
+
|
|
28
|
+
### Example
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import {
|
|
32
|
+
Configuration,
|
|
33
|
+
ProductCategoryApi,
|
|
34
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
35
|
+
import type { AttachProductsProductCategoryOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
36
|
+
|
|
37
|
+
async function example() {
|
|
38
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
39
|
+
const api = new ProductCategoryApi();
|
|
40
|
+
|
|
41
|
+
const body = {
|
|
42
|
+
// number | The id of the productCategory
|
|
43
|
+
productCategory: 56,
|
|
44
|
+
// AttachProductsProductCategoryRequest (optional)
|
|
45
|
+
attachProductsProductCategoryRequest: ...,
|
|
46
|
+
} satisfies AttachProductsProductCategoryOperationRequest;
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
const data = await api.attachProductsProductCategory(body);
|
|
50
|
+
console.log(data);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.error(error);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Run the test
|
|
57
|
+
example().catch(console.error);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
| Name | Type | Description | Notes |
|
|
64
|
+
|------------- | ------------- | ------------- | -------------|
|
|
65
|
+
| **productCategory** | `number` | The id of the productCategory | [Defaults to `undefined`] |
|
|
66
|
+
| **attachProductsProductCategoryRequest** | [AttachProductsProductCategoryRequest](AttachProductsProductCategoryRequest.md) | | [Optional] |
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
[**ProductCategoryResource**](ProductCategoryResource.md)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
No authorization required
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: `application/json`
|
|
79
|
+
- **Accept**: `application/json`
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### HTTP response details
|
|
83
|
+
| Status code | Description | Response headers |
|
|
84
|
+
|-------------|-------------|------------------|
|
|
85
|
+
| **200** | Successful resource response | - |
|
|
86
|
+
|
|
87
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## bulkDetachProductsProductCategory
|
|
91
|
+
|
|
92
|
+
> GenericResponse bulkDetachProductsProductCategory(productCategory)
|
|
93
|
+
|
|
94
|
+
Auto-generated: bulkDetachProductsProductCategory
|
|
95
|
+
|
|
96
|
+
### Example
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import {
|
|
100
|
+
Configuration,
|
|
101
|
+
ProductCategoryApi,
|
|
102
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
103
|
+
import type { BulkDetachProductsProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
104
|
+
|
|
105
|
+
async function example() {
|
|
106
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
107
|
+
const api = new ProductCategoryApi();
|
|
108
|
+
|
|
109
|
+
const body = {
|
|
110
|
+
// number | The id of the productCategory
|
|
111
|
+
productCategory: 56,
|
|
112
|
+
} satisfies BulkDetachProductsProductCategoryRequest;
|
|
113
|
+
|
|
114
|
+
try {
|
|
115
|
+
const data = await api.bulkDetachProductsProductCategory(body);
|
|
116
|
+
console.log(data);
|
|
117
|
+
} catch (error) {
|
|
118
|
+
console.error(error);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Run the test
|
|
123
|
+
example().catch(console.error);
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Parameters
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
| Name | Type | Description | Notes |
|
|
130
|
+
|------------- | ------------- | ------------- | -------------|
|
|
131
|
+
| **productCategory** | `number` | The id of the productCategory | [Defaults to `undefined`] |
|
|
132
|
+
|
|
133
|
+
### Return type
|
|
134
|
+
|
|
135
|
+
[**GenericResponse**](GenericResponse.md)
|
|
136
|
+
|
|
137
|
+
### Authorization
|
|
138
|
+
|
|
139
|
+
No authorization required
|
|
140
|
+
|
|
141
|
+
### HTTP request headers
|
|
142
|
+
|
|
143
|
+
- **Content-Type**: Not defined
|
|
144
|
+
- **Accept**: `application/json`
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### HTTP response details
|
|
148
|
+
| Status code | Description | Response headers |
|
|
149
|
+
|-------------|-------------|------------------|
|
|
150
|
+
| **200** | \\JsonResponse | - |
|
|
151
|
+
|
|
152
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
153
|
+
|
|
154
|
+
|
|
19
155
|
## destroyProductCategory
|
|
20
156
|
|
|
21
157
|
> GenericResponse destroyProductCategory(productCategory)
|
|
@@ -81,6 +217,74 @@ No authorization required
|
|
|
81
217
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
82
218
|
|
|
83
219
|
|
|
220
|
+
## detachProductsProductCategory
|
|
221
|
+
|
|
222
|
+
> ProductCategoryResource detachProductsProductCategory(productCategory, detachProductsProductCategoryRequest)
|
|
223
|
+
|
|
224
|
+
Auto-generated: detachProductsProductCategory
|
|
225
|
+
|
|
226
|
+
### Example
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
import {
|
|
230
|
+
Configuration,
|
|
231
|
+
ProductCategoryApi,
|
|
232
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
233
|
+
import type { DetachProductsProductCategoryOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
234
|
+
|
|
235
|
+
async function example() {
|
|
236
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
237
|
+
const api = new ProductCategoryApi();
|
|
238
|
+
|
|
239
|
+
const body = {
|
|
240
|
+
// number | The id of the productCategory
|
|
241
|
+
productCategory: 56,
|
|
242
|
+
// DetachProductsProductCategoryRequest (optional)
|
|
243
|
+
detachProductsProductCategoryRequest: ...,
|
|
244
|
+
} satisfies DetachProductsProductCategoryOperationRequest;
|
|
245
|
+
|
|
246
|
+
try {
|
|
247
|
+
const data = await api.detachProductsProductCategory(body);
|
|
248
|
+
console.log(data);
|
|
249
|
+
} catch (error) {
|
|
250
|
+
console.error(error);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Run the test
|
|
255
|
+
example().catch(console.error);
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Parameters
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
| Name | Type | Description | Notes |
|
|
262
|
+
|------------- | ------------- | ------------- | -------------|
|
|
263
|
+
| **productCategory** | `number` | The id of the productCategory | [Defaults to `undefined`] |
|
|
264
|
+
| **detachProductsProductCategoryRequest** | [DetachProductsProductCategoryRequest](DetachProductsProductCategoryRequest.md) | | [Optional] |
|
|
265
|
+
|
|
266
|
+
### Return type
|
|
267
|
+
|
|
268
|
+
[**ProductCategoryResource**](ProductCategoryResource.md)
|
|
269
|
+
|
|
270
|
+
### Authorization
|
|
271
|
+
|
|
272
|
+
No authorization required
|
|
273
|
+
|
|
274
|
+
### HTTP request headers
|
|
275
|
+
|
|
276
|
+
- **Content-Type**: `application/json`
|
|
277
|
+
- **Accept**: `application/json`
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
### HTTP response details
|
|
281
|
+
| Status code | Description | Response headers |
|
|
282
|
+
|-------------|-------------|------------------|
|
|
283
|
+
| **200** | Successful resource response | - |
|
|
284
|
+
|
|
285
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
286
|
+
|
|
287
|
+
|
|
84
288
|
## getAllProductCategory
|
|
85
289
|
|
|
86
290
|
> ProductCategoryLiteResourceArrayResponse getAllProductCategory(getAllProductCategoryRequest)
|
package/package.json
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
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,
|
|
@@ -28,6 +30,10 @@ import type {
|
|
|
28
30
|
UpdateProductCategoryRequest,
|
|
29
31
|
} from '../models/index';
|
|
30
32
|
import {
|
|
33
|
+
AttachProductsProductCategoryRequestFromJSON,
|
|
34
|
+
AttachProductsProductCategoryRequestToJSON,
|
|
35
|
+
DetachProductsProductCategoryRequestFromJSON,
|
|
36
|
+
DetachProductsProductCategoryRequestToJSON,
|
|
31
37
|
GenericResponseFromJSON,
|
|
32
38
|
GenericResponseToJSON,
|
|
33
39
|
GetAllProductCategoryRequestFromJSON,
|
|
@@ -52,10 +58,24 @@ import {
|
|
|
52
58
|
UpdateProductCategoryRequestToJSON,
|
|
53
59
|
} from '../models/index';
|
|
54
60
|
|
|
61
|
+
export interface AttachProductsProductCategoryOperationRequest {
|
|
62
|
+
productCategory: number;
|
|
63
|
+
attachProductsProductCategoryRequest?: AttachProductsProductCategoryRequest;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface BulkDetachProductsProductCategoryRequest {
|
|
67
|
+
productCategory: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
55
70
|
export interface DestroyProductCategoryRequest {
|
|
56
71
|
productCategory: number;
|
|
57
72
|
}
|
|
58
73
|
|
|
74
|
+
export interface DetachProductsProductCategoryOperationRequest {
|
|
75
|
+
productCategory: number;
|
|
76
|
+
detachProductsProductCategoryRequest?: DetachProductsProductCategoryRequest;
|
|
77
|
+
}
|
|
78
|
+
|
|
59
79
|
export interface GetAllProductCategoryOperationRequest {
|
|
60
80
|
getAllProductCategoryRequest?: GetAllProductCategoryRequest;
|
|
61
81
|
}
|
|
@@ -91,6 +111,83 @@ export interface UpdateProductCategoryOperationRequest {
|
|
|
91
111
|
*/
|
|
92
112
|
export class ProductCategoryApi extends runtime.BaseAPI {
|
|
93
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Auto-generated: attachProductsProductCategory
|
|
116
|
+
*/
|
|
117
|
+
async attachProductsProductCategoryRaw(requestParameters: AttachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryResource>> {
|
|
118
|
+
if (requestParameters['productCategory'] == null) {
|
|
119
|
+
throw new runtime.RequiredError(
|
|
120
|
+
'productCategory',
|
|
121
|
+
'Required parameter "productCategory" was null or undefined when calling attachProductsProductCategory().'
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const queryParameters: any = {};
|
|
126
|
+
|
|
127
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
128
|
+
|
|
129
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
let urlPath = `/admin-api/product-category/{productCategory}/attach-products`;
|
|
133
|
+
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
134
|
+
|
|
135
|
+
const response = await this.request({
|
|
136
|
+
path: urlPath,
|
|
137
|
+
method: 'POST',
|
|
138
|
+
headers: headerParameters,
|
|
139
|
+
query: queryParameters,
|
|
140
|
+
body: AttachProductsProductCategoryRequestToJSON(requestParameters['attachProductsProductCategoryRequest']),
|
|
141
|
+
}, initOverrides);
|
|
142
|
+
|
|
143
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryResourceFromJSON(jsonValue));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Auto-generated: attachProductsProductCategory
|
|
148
|
+
*/
|
|
149
|
+
async attachProductsProductCategory(requestParameters: AttachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource> {
|
|
150
|
+
const response = await this.attachProductsProductCategoryRaw(requestParameters, initOverrides);
|
|
151
|
+
return await response.value();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Auto-generated: bulkDetachProductsProductCategory
|
|
156
|
+
*/
|
|
157
|
+
async bulkDetachProductsProductCategoryRaw(requestParameters: BulkDetachProductsProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
158
|
+
if (requestParameters['productCategory'] == null) {
|
|
159
|
+
throw new runtime.RequiredError(
|
|
160
|
+
'productCategory',
|
|
161
|
+
'Required parameter "productCategory" was null or undefined when calling bulkDetachProductsProductCategory().'
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const queryParameters: any = {};
|
|
166
|
+
|
|
167
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
let urlPath = `/admin-api/product-category/{productCategory}/bulk-detach-products`;
|
|
171
|
+
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
172
|
+
|
|
173
|
+
const response = await this.request({
|
|
174
|
+
path: urlPath,
|
|
175
|
+
method: 'DELETE',
|
|
176
|
+
headers: headerParameters,
|
|
177
|
+
query: queryParameters,
|
|
178
|
+
}, initOverrides);
|
|
179
|
+
|
|
180
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Auto-generated: bulkDetachProductsProductCategory
|
|
185
|
+
*/
|
|
186
|
+
async bulkDetachProductsProductCategory(requestParameters: BulkDetachProductsProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
187
|
+
const response = await this.bulkDetachProductsProductCategoryRaw(requestParameters, initOverrides);
|
|
188
|
+
return await response.value();
|
|
189
|
+
}
|
|
190
|
+
|
|
94
191
|
/**
|
|
95
192
|
* Auto-generated: destroyProductCategory
|
|
96
193
|
*/
|
|
@@ -128,6 +225,46 @@ export class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
128
225
|
return await response.value();
|
|
129
226
|
}
|
|
130
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Auto-generated: detachProductsProductCategory
|
|
230
|
+
*/
|
|
231
|
+
async detachProductsProductCategoryRaw(requestParameters: DetachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryResource>> {
|
|
232
|
+
if (requestParameters['productCategory'] == null) {
|
|
233
|
+
throw new runtime.RequiredError(
|
|
234
|
+
'productCategory',
|
|
235
|
+
'Required parameter "productCategory" was null or undefined when calling detachProductsProductCategory().'
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const queryParameters: any = {};
|
|
240
|
+
|
|
241
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
242
|
+
|
|
243
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
let urlPath = `/admin-api/product-category/{productCategory}/detach-products`;
|
|
247
|
+
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
248
|
+
|
|
249
|
+
const response = await this.request({
|
|
250
|
+
path: urlPath,
|
|
251
|
+
method: 'POST',
|
|
252
|
+
headers: headerParameters,
|
|
253
|
+
query: queryParameters,
|
|
254
|
+
body: DetachProductsProductCategoryRequestToJSON(requestParameters['detachProductsProductCategoryRequest']),
|
|
255
|
+
}, initOverrides);
|
|
256
|
+
|
|
257
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryResourceFromJSON(jsonValue));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Auto-generated: detachProductsProductCategory
|
|
262
|
+
*/
|
|
263
|
+
async detachProductsProductCategory(requestParameters: DetachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource> {
|
|
264
|
+
const response = await this.detachProductsProductCategoryRaw(requestParameters, initOverrides);
|
|
265
|
+
return await response.value();
|
|
266
|
+
}
|
|
267
|
+
|
|
131
268
|
/**
|
|
132
269
|
* Auto-generated: getAllProductCategory
|
|
133
270
|
*/
|
|
@@ -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
|
+
productChildIds: 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 (!('productChildIds' in value) || value['productChildIds'] === 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
|
+
'productChildIds': json['product_child_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_ids': value['productChildIds'],
|
|
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
|
+
productChildIds: 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 (!('productChildIds' in value) || value['productChildIds'] === 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
|
+
'productChildIds': json['product_child_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_ids': value['productChildIds'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -55,6 +55,12 @@ export interface GetAllDocumentRequest {
|
|
|
55
55
|
* @memberof GetAllDocumentRequest
|
|
56
56
|
*/
|
|
57
57
|
includesRelations?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof GetAllDocumentRequest
|
|
62
|
+
*/
|
|
63
|
+
sitesId?: Array<string>;
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
|
|
@@ -111,6 +117,7 @@ export function GetAllDocumentRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
111
117
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
112
118
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
113
119
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
120
|
+
'sitesId': json['sites-id'] == null ? undefined : json['sites-id'],
|
|
114
121
|
};
|
|
115
122
|
}
|
|
116
123
|
|
|
@@ -131,6 +138,7 @@ export function GetAllDocumentRequestToJSONTyped(value?: GetAllDocumentRequest |
|
|
|
131
138
|
'related_id': value['relatedId'],
|
|
132
139
|
'related_type': value['relatedType'],
|
|
133
140
|
'includes_relations': value['includesRelations'],
|
|
141
|
+
'sites-id': value['sitesId'],
|
|
134
142
|
};
|
|
135
143
|
}
|
|
136
144
|
|