@digital8/lighting-illusions-ts-sdk 0.0.586 → 0.0.588
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/README.md +3 -2
- package/dist/apis/ProductCategoryApi.d.ts +11 -0
- package/dist/apis/ProductCategoryApi.js +46 -0
- package/dist/models/GetAllDocumentRequest.d.ts +0 -6
- package/dist/models/GetAllDocumentRequest.js +0 -2
- package/dist/models/GetAllProductChildRequest.d.ts +1 -1
- package/dist/models/GetAllProductChildRequest.js +3 -3
- package/dist/models/IndexDocumentRequest.d.ts +0 -6
- package/dist/models/IndexDocumentRequest.js +0 -2
- package/dist/models/IndexProductChildRequest.d.ts +1 -1
- package/dist/models/IndexProductChildRequest.js +3 -3
- package/docs/GetAllDocumentRequest.md +0 -2
- package/docs/IndexDocumentRequest.md +0 -2
- package/docs/ProductCategoryApi.md +66 -0
- package/package.json +1 -1
- package/src/apis/ProductCategoryApi.ts +41 -0
- package/src/models/GetAllDocumentRequest.ts +0 -8
- package/src/models/GetAllProductChildRequest.ts +3 -3
- package/src/models/IndexDocumentRequest.ts +0 -8
- package/src/models/IndexProductChildRequest.ts +3 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @digital8/lighting-illusions-ts-sdk@0.0.
|
|
1
|
+
# @digital8/lighting-illusions-ts-sdk@0.0.588
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -108,6 +108,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
108
108
|
*ProductApi* | [**updateProduct**](docs/ProductApi.md#updateproductoperation) | **PUT** /admin-api/product/parent/{product}/update | Auto-generated: updateProduct
|
|
109
109
|
*ProductApi* | [**updateProductChild**](docs/ProductApi.md#updateproductchildoperation) | **PUT** /admin-api/product/children/{productChild}/update | Auto-generated: updateProductChild
|
|
110
110
|
*ProductCategoryApi* | [**attachProductsProductCategory**](docs/ProductCategoryApi.md#attachproductsproductcategoryoperation) | **POST** /admin-api/product-category/{productCategory}/attach-products | Auto-generated: attachProductsProductCategory
|
|
111
|
+
*ProductCategoryApi* | [**bulkDetachProductsProductCategory**](docs/ProductCategoryApi.md#bulkdetachproductsproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/bulk-detach-products | Auto-generated: bulkDetachProductsProductCategory
|
|
111
112
|
*ProductCategoryApi* | [**destroyProductCategory**](docs/ProductCategoryApi.md#destroyproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/delete | Auto-generated: destroyProductCategory
|
|
112
113
|
*ProductCategoryApi* | [**detachProductsProductCategory**](docs/ProductCategoryApi.md#detachproductsproductcategoryoperation) | **POST** /admin-api/product-category/{productCategory}/detach-products | Auto-generated: detachProductsProductCategory
|
|
113
114
|
*ProductCategoryApi* | [**getAllProductCategory**](docs/ProductCategoryApi.md#getallproductcategoryoperation) | **POST** /admin-api/product-category/all | Auto-generated: getAllProductCategory
|
|
@@ -414,7 +415,7 @@ and is automatically generated by the
|
|
|
414
415
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
415
416
|
|
|
416
417
|
- API version: `1.0.0`
|
|
417
|
-
- Package version: `0.0.
|
|
418
|
+
- Package version: `0.0.588`
|
|
418
419
|
- Generator version: `7.18.0`
|
|
419
420
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
420
421
|
|
|
@@ -15,6 +15,9 @@ export interface AttachProductsProductCategoryOperationRequest {
|
|
|
15
15
|
productCategory: number;
|
|
16
16
|
attachProductsProductCategoryRequest?: AttachProductsProductCategoryRequest;
|
|
17
17
|
}
|
|
18
|
+
export interface BulkDetachProductsProductCategoryRequest {
|
|
19
|
+
productCategory: number;
|
|
20
|
+
}
|
|
18
21
|
export interface DestroyProductCategoryRequest {
|
|
19
22
|
productCategory: number;
|
|
20
23
|
}
|
|
@@ -57,6 +60,14 @@ export declare class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
57
60
|
* Auto-generated: attachProductsProductCategory
|
|
58
61
|
*/
|
|
59
62
|
attachProductsProductCategory(requestParameters: AttachProductsProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource>;
|
|
63
|
+
/**
|
|
64
|
+
* Auto-generated: bulkDetachProductsProductCategory
|
|
65
|
+
*/
|
|
66
|
+
bulkDetachProductsProductCategoryRaw(requestParameters: BulkDetachProductsProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>>;
|
|
67
|
+
/**
|
|
68
|
+
* Auto-generated: bulkDetachProductsProductCategory
|
|
69
|
+
*/
|
|
70
|
+
bulkDetachProductsProductCategory(requestParameters: BulkDetachProductsProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse>;
|
|
60
71
|
/**
|
|
61
72
|
* Auto-generated: destroyProductCategory
|
|
62
73
|
*/
|
|
@@ -123,6 +123,52 @@ var ProductCategoryApi = /** @class */ (function (_super) {
|
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
|
+
/**
|
|
127
|
+
* Auto-generated: bulkDetachProductsProductCategory
|
|
128
|
+
*/
|
|
129
|
+
ProductCategoryApi.prototype.bulkDetachProductsProductCategoryRaw = function (requestParameters, initOverrides) {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
132
|
+
return __generator(this, function (_a) {
|
|
133
|
+
switch (_a.label) {
|
|
134
|
+
case 0:
|
|
135
|
+
if (requestParameters['productCategory'] == null) {
|
|
136
|
+
throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling bulkDetachProductsProductCategory().');
|
|
137
|
+
}
|
|
138
|
+
queryParameters = {};
|
|
139
|
+
headerParameters = {};
|
|
140
|
+
urlPath = "/admin-api/product-category/{productCategory}/bulk-detach-products";
|
|
141
|
+
urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
|
|
142
|
+
return [4 /*yield*/, this.request({
|
|
143
|
+
path: urlPath,
|
|
144
|
+
method: 'DELETE',
|
|
145
|
+
headers: headerParameters,
|
|
146
|
+
query: queryParameters,
|
|
147
|
+
}, initOverrides)];
|
|
148
|
+
case 1:
|
|
149
|
+
response = _a.sent();
|
|
150
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GenericResponseFromJSON)(jsonValue); })];
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Auto-generated: bulkDetachProductsProductCategory
|
|
157
|
+
*/
|
|
158
|
+
ProductCategoryApi.prototype.bulkDetachProductsProductCategory = function (requestParameters, initOverrides) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
160
|
+
var response;
|
|
161
|
+
return __generator(this, function (_a) {
|
|
162
|
+
switch (_a.label) {
|
|
163
|
+
case 0: return [4 /*yield*/, this.bulkDetachProductsProductCategoryRaw(requestParameters, initOverrides)];
|
|
164
|
+
case 1:
|
|
165
|
+
response = _a.sent();
|
|
166
|
+
return [4 /*yield*/, response.value()];
|
|
167
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
};
|
|
126
172
|
/**
|
|
127
173
|
* Auto-generated: destroyProductCategory
|
|
128
174
|
*/
|
|
@@ -62,7 +62,6 @@ function GetAllDocumentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
62
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
63
63
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
64
64
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
65
|
-
'sitesId': json['sites-id'] == null ? undefined : json['sites-id'],
|
|
66
65
|
};
|
|
67
66
|
}
|
|
68
67
|
function GetAllDocumentRequestToJSON(json) {
|
|
@@ -80,6 +79,5 @@ function GetAllDocumentRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
80
79
|
'related_id': value['relatedId'],
|
|
81
80
|
'related_type': value['relatedType'],
|
|
82
81
|
'includes_relations': value['includesRelations'],
|
|
83
|
-
'sites-id': value['sitesId'],
|
|
84
82
|
};
|
|
85
83
|
}
|
|
@@ -81,7 +81,7 @@ export declare const GetAllProductChildRequestSortByEnum: {
|
|
|
81
81
|
readonly SiteDetailsSlug: "siteDetails-slug";
|
|
82
82
|
readonly Sku: "sku";
|
|
83
83
|
readonly Model: "model";
|
|
84
|
-
readonly NetsuiteSyncNetsuiteId: "
|
|
84
|
+
readonly NetsuiteSyncNetsuiteId: "netsuite_sync-netsuite_id";
|
|
85
85
|
readonly NewArrivalStartDate: "new_arrival_start_date";
|
|
86
86
|
readonly NewArrivalEndDate: "new_arrival_end_date";
|
|
87
87
|
readonly CreatedAt: "created_at";
|
|
@@ -30,7 +30,7 @@ exports.GetAllProductChildRequestSortByEnum = {
|
|
|
30
30
|
SiteDetailsSlug: 'siteDetails-slug',
|
|
31
31
|
Sku: 'sku',
|
|
32
32
|
Model: 'model',
|
|
33
|
-
NetsuiteSyncNetsuiteId: '
|
|
33
|
+
NetsuiteSyncNetsuiteId: 'netsuite_sync-netsuite_id',
|
|
34
34
|
NewArrivalStartDate: 'new_arrival_start_date',
|
|
35
35
|
NewArrivalEndDate: 'new_arrival_end_date',
|
|
36
36
|
CreatedAt: 'created_at',
|
|
@@ -74,7 +74,7 @@ function GetAllProductChildRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
74
74
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
75
75
|
'siteDetailsSiteId': json['siteDetails-site_id'] == null ? undefined : json['siteDetails-site_id'],
|
|
76
76
|
'isDisabled': json['is_disabled'] == null ? undefined : json['is_disabled'],
|
|
77
|
-
'netsuiteSyncHasNetsuiteId': json['
|
|
77
|
+
'netsuiteSyncHasNetsuiteId': json['netsuite_sync-has_netsuite_id'] == null ? undefined : json['netsuite_sync-has_netsuite_id'],
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
function GetAllProductChildRequestToJSON(json) {
|
|
@@ -94,6 +94,6 @@ function GetAllProductChildRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
94
94
|
'includes_relations': value['includesRelations'],
|
|
95
95
|
'siteDetails-site_id': value['siteDetailsSiteId'],
|
|
96
96
|
'is_disabled': value['isDisabled'],
|
|
97
|
-
'
|
|
97
|
+
'netsuite_sync-has_netsuite_id': value['netsuiteSyncHasNetsuiteId'],
|
|
98
98
|
};
|
|
99
99
|
}
|
|
@@ -61,7 +61,6 @@ function IndexDocumentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
61
61
|
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
62
62
|
'perPage': json['per_page'] == null ? undefined : json['per_page'],
|
|
63
63
|
'page': json['page'] == null ? undefined : json['page'],
|
|
64
|
-
'sitesId': json['sites-id'] == null ? undefined : json['sites-id'],
|
|
65
64
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
66
65
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
67
66
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
@@ -81,7 +80,6 @@ function IndexDocumentRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
81
80
|
'sortDirection': value['sortDirection'],
|
|
82
81
|
'per_page': value['perPage'],
|
|
83
82
|
'page': value['page'],
|
|
84
|
-
'sites-id': value['sitesId'],
|
|
85
83
|
'related_id': value['relatedId'],
|
|
86
84
|
'related_type': value['relatedType'],
|
|
87
85
|
'includes_relations': value['includesRelations'],
|
|
@@ -93,7 +93,7 @@ export declare const IndexProductChildRequestSortByEnum: {
|
|
|
93
93
|
readonly SiteDetailsSlug: "siteDetails-slug";
|
|
94
94
|
readonly Sku: "sku";
|
|
95
95
|
readonly Model: "model";
|
|
96
|
-
readonly NetsuiteSyncNetsuiteId: "
|
|
96
|
+
readonly NetsuiteSyncNetsuiteId: "netsuite_sync-netsuite_id";
|
|
97
97
|
readonly NewArrivalStartDate: "new_arrival_start_date";
|
|
98
98
|
readonly NewArrivalEndDate: "new_arrival_end_date";
|
|
99
99
|
readonly CreatedAt: "created_at";
|
|
@@ -30,7 +30,7 @@ exports.IndexProductChildRequestSortByEnum = {
|
|
|
30
30
|
SiteDetailsSlug: 'siteDetails-slug',
|
|
31
31
|
Sku: 'sku',
|
|
32
32
|
Model: 'model',
|
|
33
|
-
NetsuiteSyncNetsuiteId: '
|
|
33
|
+
NetsuiteSyncNetsuiteId: 'netsuite_sync-netsuite_id',
|
|
34
34
|
NewArrivalStartDate: 'new_arrival_start_date',
|
|
35
35
|
NewArrivalEndDate: 'new_arrival_end_date',
|
|
36
36
|
CreatedAt: 'created_at',
|
|
@@ -81,7 +81,7 @@ function IndexProductChildRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
81
|
'page': json['page'] == null ? undefined : json['page'],
|
|
82
82
|
'siteDetailsSiteId': json['siteDetails-site_id'] == null ? undefined : json['siteDetails-site_id'],
|
|
83
83
|
'isDisabled': json['is_disabled'] == null ? undefined : json['is_disabled'],
|
|
84
|
-
'netsuiteSyncHasNetsuiteId': json['
|
|
84
|
+
'netsuiteSyncHasNetsuiteId': json['netsuite_sync-has_netsuite_id'] == null ? undefined : json['netsuite_sync-has_netsuite_id'],
|
|
85
85
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
86
86
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
87
87
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
@@ -103,7 +103,7 @@ function IndexProductChildRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
103
103
|
'page': value['page'],
|
|
104
104
|
'siteDetails-site_id': value['siteDetailsSiteId'],
|
|
105
105
|
'is_disabled': value['isDisabled'],
|
|
106
|
-
'
|
|
106
|
+
'netsuite_sync-has_netsuite_id': value['netsuiteSyncHasNetsuiteId'],
|
|
107
107
|
'related_id': value['relatedId'],
|
|
108
108
|
'related_type': value['relatedType'],
|
|
109
109
|
'includes_relations': value['includesRelations'],
|
|
@@ -12,7 +12,6 @@ Name | Type
|
|
|
12
12
|
`relatedId` | number
|
|
13
13
|
`relatedType` | string
|
|
14
14
|
`includesRelations` | boolean
|
|
15
|
-
`sitesId` | Array<string>
|
|
16
15
|
|
|
17
16
|
## Example
|
|
18
17
|
|
|
@@ -27,7 +26,6 @@ const example = {
|
|
|
27
26
|
"relatedId": null,
|
|
28
27
|
"relatedType": null,
|
|
29
28
|
"includesRelations": null,
|
|
30
|
-
"sitesId": null,
|
|
31
29
|
} satisfies GetAllDocumentRequest
|
|
32
30
|
|
|
33
31
|
console.log(example)
|
|
@@ -11,7 +11,6 @@ Name | Type
|
|
|
11
11
|
`sortDirection` | string
|
|
12
12
|
`perPage` | number
|
|
13
13
|
`page` | number
|
|
14
|
-
`sitesId` | Array<string>
|
|
15
14
|
`relatedId` | number
|
|
16
15
|
`relatedType` | string
|
|
17
16
|
`includesRelations` | boolean
|
|
@@ -28,7 +27,6 @@ const example = {
|
|
|
28
27
|
"sortDirection": null,
|
|
29
28
|
"perPage": null,
|
|
30
29
|
"page": null,
|
|
31
|
-
"sitesId": null,
|
|
32
30
|
"relatedId": null,
|
|
33
31
|
"relatedType": null,
|
|
34
32
|
"includesRelations": null,
|
|
@@ -5,6 +5,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
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 |
|
|
8
9
|
| [**destroyProductCategory**](ProductCategoryApi.md#destroyproductcategory) | **DELETE** /admin-api/product-category/{productCategory}/delete | Auto-generated: destroyProductCategory |
|
|
9
10
|
| [**detachProductsProductCategory**](ProductCategoryApi.md#detachproductsproductcategoryoperation) | **POST** /admin-api/product-category/{productCategory}/detach-products | Auto-generated: detachProductsProductCategory |
|
|
10
11
|
| [**getAllProductCategory**](ProductCategoryApi.md#getallproductcategoryoperation) | **POST** /admin-api/product-category/all | Auto-generated: getAllProductCategory |
|
|
@@ -86,6 +87,71 @@ No authorization required
|
|
|
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)
|
|
87
88
|
|
|
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
|
+
|
|
89
155
|
## destroyProductCategory
|
|
90
156
|
|
|
91
157
|
> GenericResponse destroyProductCategory(productCategory)
|
package/package.json
CHANGED
|
@@ -63,6 +63,10 @@ export interface AttachProductsProductCategoryOperationRequest {
|
|
|
63
63
|
attachProductsProductCategoryRequest?: AttachProductsProductCategoryRequest;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
export interface BulkDetachProductsProductCategoryRequest {
|
|
67
|
+
productCategory: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
66
70
|
export interface DestroyProductCategoryRequest {
|
|
67
71
|
productCategory: number;
|
|
68
72
|
}
|
|
@@ -147,6 +151,43 @@ export class ProductCategoryApi extends runtime.BaseAPI {
|
|
|
147
151
|
return await response.value();
|
|
148
152
|
}
|
|
149
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
|
+
|
|
150
191
|
/**
|
|
151
192
|
* Auto-generated: destroyProductCategory
|
|
152
193
|
*/
|
|
@@ -55,12 +55,6 @@ 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>;
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
|
|
@@ -117,7 +111,6 @@ export function GetAllDocumentRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
117
111
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
118
112
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
119
113
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
120
|
-
'sitesId': json['sites-id'] == null ? undefined : json['sites-id'],
|
|
121
114
|
};
|
|
122
115
|
}
|
|
123
116
|
|
|
@@ -138,7 +131,6 @@ export function GetAllDocumentRequestToJSONTyped(value?: GetAllDocumentRequest |
|
|
|
138
131
|
'related_id': value['relatedId'],
|
|
139
132
|
'related_type': value['relatedType'],
|
|
140
133
|
'includes_relations': value['includesRelations'],
|
|
141
|
-
'sites-id': value['sitesId'],
|
|
142
134
|
};
|
|
143
135
|
}
|
|
144
136
|
|
|
@@ -87,7 +87,7 @@ export const GetAllProductChildRequestSortByEnum = {
|
|
|
87
87
|
SiteDetailsSlug: 'siteDetails-slug',
|
|
88
88
|
Sku: 'sku',
|
|
89
89
|
Model: 'model',
|
|
90
|
-
NetsuiteSyncNetsuiteId: '
|
|
90
|
+
NetsuiteSyncNetsuiteId: 'netsuite_sync-netsuite_id',
|
|
91
91
|
NewArrivalStartDate: 'new_arrival_start_date',
|
|
92
92
|
NewArrivalEndDate: 'new_arrival_end_date',
|
|
93
93
|
CreatedAt: 'created_at',
|
|
@@ -141,7 +141,7 @@ export function GetAllProductChildRequestFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
141
141
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
142
142
|
'siteDetailsSiteId': json['siteDetails-site_id'] == null ? undefined : json['siteDetails-site_id'],
|
|
143
143
|
'isDisabled': json['is_disabled'] == null ? undefined : json['is_disabled'],
|
|
144
|
-
'netsuiteSyncHasNetsuiteId': json['
|
|
144
|
+
'netsuiteSyncHasNetsuiteId': json['netsuite_sync-has_netsuite_id'] == null ? undefined : json['netsuite_sync-has_netsuite_id'],
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -164,7 +164,7 @@ export function GetAllProductChildRequestToJSONTyped(value?: GetAllProductChildR
|
|
|
164
164
|
'includes_relations': value['includesRelations'],
|
|
165
165
|
'siteDetails-site_id': value['siteDetailsSiteId'],
|
|
166
166
|
'is_disabled': value['isDisabled'],
|
|
167
|
-
'
|
|
167
|
+
'netsuite_sync-has_netsuite_id': value['netsuiteSyncHasNetsuiteId'],
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
|
|
@@ -49,12 +49,6 @@ export interface IndexDocumentRequest {
|
|
|
49
49
|
* @memberof IndexDocumentRequest
|
|
50
50
|
*/
|
|
51
51
|
page?: number;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @type {Array<string>}
|
|
55
|
-
* @memberof IndexDocumentRequest
|
|
56
|
-
*/
|
|
57
|
-
sitesId?: Array<string>;
|
|
58
52
|
/**
|
|
59
53
|
*
|
|
60
54
|
* @type {number}
|
|
@@ -128,7 +122,6 @@ export function IndexDocumentRequestFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
128
122
|
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
129
123
|
'perPage': json['per_page'] == null ? undefined : json['per_page'],
|
|
130
124
|
'page': json['page'] == null ? undefined : json['page'],
|
|
131
|
-
'sitesId': json['sites-id'] == null ? undefined : json['sites-id'],
|
|
132
125
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
133
126
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
134
127
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
@@ -151,7 +144,6 @@ export function IndexDocumentRequestToJSONTyped(value?: IndexDocumentRequest | n
|
|
|
151
144
|
'sortDirection': value['sortDirection'],
|
|
152
145
|
'per_page': value['perPage'],
|
|
153
146
|
'page': value['page'],
|
|
154
|
-
'sites-id': value['sitesId'],
|
|
155
147
|
'related_id': value['relatedId'],
|
|
156
148
|
'related_type': value['relatedType'],
|
|
157
149
|
'includes_relations': value['includesRelations'],
|
|
@@ -99,7 +99,7 @@ export const IndexProductChildRequestSortByEnum = {
|
|
|
99
99
|
SiteDetailsSlug: 'siteDetails-slug',
|
|
100
100
|
Sku: 'sku',
|
|
101
101
|
Model: 'model',
|
|
102
|
-
NetsuiteSyncNetsuiteId: '
|
|
102
|
+
NetsuiteSyncNetsuiteId: 'netsuite_sync-netsuite_id',
|
|
103
103
|
NewArrivalStartDate: 'new_arrival_start_date',
|
|
104
104
|
NewArrivalEndDate: 'new_arrival_end_date',
|
|
105
105
|
CreatedAt: 'created_at',
|
|
@@ -160,7 +160,7 @@ export function IndexProductChildRequestFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
160
160
|
'page': json['page'] == null ? undefined : json['page'],
|
|
161
161
|
'siteDetailsSiteId': json['siteDetails-site_id'] == null ? undefined : json['siteDetails-site_id'],
|
|
162
162
|
'isDisabled': json['is_disabled'] == null ? undefined : json['is_disabled'],
|
|
163
|
-
'netsuiteSyncHasNetsuiteId': json['
|
|
163
|
+
'netsuiteSyncHasNetsuiteId': json['netsuite_sync-has_netsuite_id'] == null ? undefined : json['netsuite_sync-has_netsuite_id'],
|
|
164
164
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
165
165
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
166
166
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
@@ -185,7 +185,7 @@ export function IndexProductChildRequestToJSONTyped(value?: IndexProductChildReq
|
|
|
185
185
|
'page': value['page'],
|
|
186
186
|
'siteDetails-site_id': value['siteDetailsSiteId'],
|
|
187
187
|
'is_disabled': value['isDisabled'],
|
|
188
|
-
'
|
|
188
|
+
'netsuite_sync-has_netsuite_id': value['netsuiteSyncHasNetsuiteId'],
|
|
189
189
|
'related_id': value['relatedId'],
|
|
190
190
|
'related_type': value['relatedType'],
|
|
191
191
|
'includes_relations': value['includesRelations'],
|