@digital8/lighting-illusions-ts-sdk 0.0.530 → 0.0.532
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 +42 -24
- package/README.md +30 -14
- package/dist/apis/ProductCategoryApi.d.ts +105 -0
- package/dist/apis/ProductCategoryApi.js +445 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/CategoryAutomationComparisonType.d.ts +29 -0
- package/dist/models/CategoryAutomationComparisonType.js +55 -0
- package/dist/models/CategoryAutomationConditionType.d.ts +25 -0
- package/dist/models/CategoryAutomationConditionType.js +51 -0
- package/dist/models/CategoryAutomationFieldType.d.ts +30 -0
- package/dist/models/CategoryAutomationFieldType.js +56 -0
- package/dist/models/CategoryAutomationRuleResource.d.ts +68 -0
- package/dist/models/CategoryAutomationRuleResource.js +67 -0
- package/dist/models/CategoryAutomationRuleResourceArrayResponse.d.ts +33 -0
- package/dist/models/CategoryAutomationRuleResourceArrayResponse.js +50 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/GetAllProductCategoryRequest.d.ts +115 -0
- package/dist/models/GetAllProductCategoryRequest.js +94 -0
- package/dist/models/IndexProductCategoryRequest.d.ts +127 -0
- package/dist/models/IndexProductCategoryRequest.js +98 -0
- package/dist/models/PaginatedProductCategoryListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedProductCategoryListResourceResponse.js +57 -0
- package/dist/models/PaginatedProductCategoryResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedProductCategoryResourceResponse.js +57 -0
- package/dist/models/ProductCategoryHierarchyResource.d.ts +62 -0
- package/dist/models/ProductCategoryHierarchyResource.js +69 -0
- package/dist/models/ProductCategoryHierarchyResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductCategoryHierarchyResourceArrayResponse.js +50 -0
- package/dist/models/ProductCategoryListResource.d.ts +75 -0
- package/dist/models/ProductCategoryListResource.js +78 -0
- package/dist/models/ProductCategoryListResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductCategoryListResourceArrayResponse.js +50 -0
- package/dist/models/ProductCategoryLiteResource.d.ts +38 -0
- package/dist/models/ProductCategoryLiteResource.js +53 -0
- package/dist/models/ProductCategoryLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductCategoryLiteResourceArrayResponse.js +50 -0
- package/dist/models/ProductCategoryResource.d.ts +107 -0
- package/dist/models/ProductCategoryResource.js +96 -0
- package/dist/models/ProductCategoryResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductCategoryResourceArrayResponse.js +50 -0
- package/dist/models/StoreProductCategoryRequest.d.ts +105 -0
- package/dist/models/StoreProductCategoryRequest.js +86 -0
- package/dist/models/StoreProductCategoryRequestAutomationRulesInner.d.ts +62 -0
- package/dist/models/StoreProductCategoryRequestAutomationRulesInner.js +63 -0
- package/dist/models/UpdateProductCategoryRequest.d.ts +105 -0
- package/dist/models/UpdateProductCategoryRequest.js +74 -0
- package/dist/models/index.d.ts +20 -12
- package/dist/models/index.js +20 -12
- package/docs/{ProductSortBy.md → CategoryAutomationComparisonType.md} +4 -4
- package/docs/{ProductStatus.md → CategoryAutomationConditionType.md} +4 -4
- package/docs/{ProductRating.md → CategoryAutomationFieldType.md} +4 -4
- package/docs/CategoryAutomationRuleResource.md +46 -0
- package/docs/CategoryAutomationRuleResourceArrayResponse.md +34 -0
- package/docs/GetAllProductCategoryRequest.md +52 -0
- package/docs/IndexProductCategoryRequest.md +56 -0
- package/docs/{PaginatedProductSearchResultResourceResponse.md → PaginatedProductCategoryListResourceResponse.md} +5 -5
- package/docs/PaginatedProductCategoryResourceResponse.md +36 -0
- package/docs/ProductCategoryApi.md +534 -0
- package/docs/{ProductAggregationResource.md → ProductCategoryHierarchyResource.md} +16 -12
- package/docs/ProductCategoryHierarchyResourceArrayResponse.md +34 -0
- package/docs/ProductCategoryListResource.md +48 -0
- package/docs/{ProductSearchResultResourceArrayResponse.md → ProductCategoryListResourceArrayResponse.md} +5 -5
- package/docs/ProductCategoryLiteResource.md +36 -0
- package/docs/{ProductSearchResponseResourceArrayResponse.md → ProductCategoryLiteResourceArrayResponse.md} +5 -5
- package/docs/ProductCategoryResource.md +58 -0
- package/docs/{ProductAggregationResourceArrayResponse.md → ProductCategoryResourceArrayResponse.md} +5 -5
- package/docs/StoreProductCategoryRequest.md +58 -0
- package/docs/StoreProductCategoryRequestAutomationRulesInner.md +44 -0
- package/docs/UpdateProductCategoryRequest.md +58 -0
- package/package.json +1 -1
- package/src/apis/ProductCategoryApi.ts +363 -0
- package/src/apis/index.ts +1 -0
- package/src/models/CategoryAutomationComparisonType.ts +57 -0
- package/src/models/CategoryAutomationConditionType.ts +53 -0
- package/src/models/CategoryAutomationFieldType.ts +58 -0
- package/src/models/CategoryAutomationRuleResource.ts +116 -0
- package/src/models/CategoryAutomationRuleResourceArrayResponse.ts +73 -0
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/GetAllProductCategoryRequest.ts +171 -0
- package/src/models/IndexProductCategoryRequest.ts +187 -0
- package/src/models/PaginatedProductCategoryListResourceResponse.ts +90 -0
- package/src/models/PaginatedProductCategoryResourceResponse.ts +90 -0
- package/src/models/ProductCategoryHierarchyResource.ts +110 -0
- package/src/models/ProductCategoryHierarchyResourceArrayResponse.ts +73 -0
- package/src/models/ProductCategoryListResource.ts +136 -0
- package/src/models/ProductCategoryListResourceArrayResponse.ts +73 -0
- package/src/models/ProductCategoryLiteResource.ts +74 -0
- package/src/models/ProductCategoryLiteResourceArrayResponse.ts +73 -0
- package/src/models/ProductCategoryResource.ts +193 -0
- package/src/models/ProductCategoryResourceArrayResponse.ts +73 -0
- package/src/models/StoreProductCategoryRequest.ts +175 -0
- package/src/models/StoreProductCategoryRequestAutomationRulesInner.ts +107 -0
- package/src/models/UpdateProductCategoryRequest.ts +169 -0
- package/src/models/index.ts +20 -12
- package/dist/models/PaginatedProductSearchResultResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedProductSearchResultResourceResponse.js +0 -57
- package/dist/models/ProductAggregationResource.d.ts +0 -50
- package/dist/models/ProductAggregationResource.js +0 -63
- package/dist/models/ProductAggregationResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductAggregationResourceArrayResponse.js +0 -50
- package/dist/models/ProductRating.d.ts +0 -26
- package/dist/models/ProductRating.js +0 -52
- package/dist/models/ProductSearchResponseResource.d.ts +0 -54
- package/dist/models/ProductSearchResponseResource.js +0 -67
- package/dist/models/ProductSearchResponseResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductSearchResponseResourceArrayResponse.js +0 -50
- package/dist/models/ProductSearchResponseResourceMeta.d.ts +0 -50
- package/dist/models/ProductSearchResponseResourceMeta.js +0 -63
- package/dist/models/ProductSearchResponseResourcePriceInfo.d.ts +0 -50
- package/dist/models/ProductSearchResponseResourcePriceInfo.js +0 -63
- package/dist/models/ProductSearchResultResource.d.ts +0 -116
- package/dist/models/ProductSearchResultResource.js +0 -105
- package/dist/models/ProductSearchResultResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductSearchResultResourceArrayResponse.js +0 -50
- package/dist/models/ProductSortBy.d.ts +0 -32
- package/dist/models/ProductSortBy.js +0 -58
- package/dist/models/ProductStatus.d.ts +0 -24
- package/dist/models/ProductStatus.js +0 -50
- package/docs/ProductSearchResponseResource.md +0 -40
- package/docs/ProductSearchResponseResourceMeta.md +0 -40
- package/docs/ProductSearchResponseResourcePriceInfo.md +0 -40
- package/docs/ProductSearchResultResource.md +0 -62
- package/src/models/PaginatedProductSearchResultResourceResponse.ts +0 -90
- package/src/models/ProductAggregationResource.ts +0 -93
- package/src/models/ProductAggregationResourceArrayResponse.ts +0 -73
- package/src/models/ProductRating.ts +0 -54
- package/src/models/ProductSearchResponseResource.ts +0 -122
- package/src/models/ProductSearchResponseResourceArrayResponse.ts +0 -73
- package/src/models/ProductSearchResponseResourceMeta.ts +0 -93
- package/src/models/ProductSearchResponseResourcePriceInfo.ts +0 -93
- package/src/models/ProductSearchResultResource.ts +0 -191
- package/src/models/ProductSearchResultResourceArrayResponse.ts +0 -73
- package/src/models/ProductSortBy.ts +0 -60
- package/src/models/ProductStatus.ts +0 -52
|
@@ -0,0 +1,363 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
GenericResponse,
|
|
19
|
+
GetAllProductCategoryRequest,
|
|
20
|
+
IndexProductCategoryRequest,
|
|
21
|
+
PaginatedProductCategoryListResourceResponse,
|
|
22
|
+
ProductCategoryHierarchyResourceArrayResponse,
|
|
23
|
+
ProductCategoryLiteResourceArrayResponse,
|
|
24
|
+
ProductCategoryResource,
|
|
25
|
+
StoreProductCategoryRequest,
|
|
26
|
+
UpdateProductCategoryRequest,
|
|
27
|
+
} from '../models/index';
|
|
28
|
+
import {
|
|
29
|
+
GenericResponseFromJSON,
|
|
30
|
+
GenericResponseToJSON,
|
|
31
|
+
GetAllProductCategoryRequestFromJSON,
|
|
32
|
+
GetAllProductCategoryRequestToJSON,
|
|
33
|
+
IndexProductCategoryRequestFromJSON,
|
|
34
|
+
IndexProductCategoryRequestToJSON,
|
|
35
|
+
PaginatedProductCategoryListResourceResponseFromJSON,
|
|
36
|
+
PaginatedProductCategoryListResourceResponseToJSON,
|
|
37
|
+
ProductCategoryHierarchyResourceArrayResponseFromJSON,
|
|
38
|
+
ProductCategoryHierarchyResourceArrayResponseToJSON,
|
|
39
|
+
ProductCategoryLiteResourceArrayResponseFromJSON,
|
|
40
|
+
ProductCategoryLiteResourceArrayResponseToJSON,
|
|
41
|
+
ProductCategoryResourceFromJSON,
|
|
42
|
+
ProductCategoryResourceToJSON,
|
|
43
|
+
StoreProductCategoryRequestFromJSON,
|
|
44
|
+
StoreProductCategoryRequestToJSON,
|
|
45
|
+
UpdateProductCategoryRequestFromJSON,
|
|
46
|
+
UpdateProductCategoryRequestToJSON,
|
|
47
|
+
} from '../models/index';
|
|
48
|
+
|
|
49
|
+
export interface DestroyProductCategoryRequest {
|
|
50
|
+
productCategory: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface GetAllProductCategoryOperationRequest {
|
|
54
|
+
getAllProductCategoryRequest?: GetAllProductCategoryRequest;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface GetChildrenProductCategoryRequest {
|
|
58
|
+
productCategory: number;
|
|
59
|
+
indexProductCategoryRequest?: IndexProductCategoryRequest;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface IndexProductCategoryOperationRequest {
|
|
63
|
+
indexProductCategoryRequest?: IndexProductCategoryRequest;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ShowProductCategoryRequest {
|
|
67
|
+
productCategory: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface StoreProductCategoryOperationRequest {
|
|
71
|
+
storeProductCategoryRequest?: StoreProductCategoryRequest;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface UpdateProductCategoryOperationRequest {
|
|
75
|
+
productCategory: number;
|
|
76
|
+
updateProductCategoryRequest?: UpdateProductCategoryRequest;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
export class ProductCategoryApi extends runtime.BaseAPI {
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Auto-generated: destroyProductCategory
|
|
86
|
+
*/
|
|
87
|
+
async destroyProductCategoryRaw(requestParameters: DestroyProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
88
|
+
if (requestParameters['productCategory'] == null) {
|
|
89
|
+
throw new runtime.RequiredError(
|
|
90
|
+
'productCategory',
|
|
91
|
+
'Required parameter "productCategory" was null or undefined when calling destroyProductCategory().'
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const queryParameters: any = {};
|
|
96
|
+
|
|
97
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
let urlPath = `/admin-api/product-category/{productCategory}/delete`;
|
|
101
|
+
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
102
|
+
|
|
103
|
+
const response = await this.request({
|
|
104
|
+
path: urlPath,
|
|
105
|
+
method: 'DELETE',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
}, initOverrides);
|
|
109
|
+
|
|
110
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Auto-generated: destroyProductCategory
|
|
115
|
+
*/
|
|
116
|
+
async destroyProductCategory(requestParameters: DestroyProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
117
|
+
const response = await this.destroyProductCategoryRaw(requestParameters, initOverrides);
|
|
118
|
+
return await response.value();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Auto-generated: getAllProductCategory
|
|
123
|
+
*/
|
|
124
|
+
async getAllProductCategoryRaw(requestParameters: GetAllProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryLiteResourceArrayResponse>> {
|
|
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/all`;
|
|
133
|
+
|
|
134
|
+
const response = await this.request({
|
|
135
|
+
path: urlPath,
|
|
136
|
+
method: 'POST',
|
|
137
|
+
headers: headerParameters,
|
|
138
|
+
query: queryParameters,
|
|
139
|
+
body: GetAllProductCategoryRequestToJSON(requestParameters['getAllProductCategoryRequest']),
|
|
140
|
+
}, initOverrides);
|
|
141
|
+
|
|
142
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryLiteResourceArrayResponseFromJSON(jsonValue));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Auto-generated: getAllProductCategory
|
|
147
|
+
*/
|
|
148
|
+
async getAllProductCategory(requestParameters: GetAllProductCategoryOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryLiteResourceArrayResponse> {
|
|
149
|
+
const response = await this.getAllProductCategoryRaw(requestParameters, initOverrides);
|
|
150
|
+
return await response.value();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Auto-generated: getChildrenProductCategory
|
|
155
|
+
*/
|
|
156
|
+
async getChildrenProductCategoryRaw(requestParameters: GetChildrenProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedProductCategoryListResourceResponse>> {
|
|
157
|
+
if (requestParameters['productCategory'] == null) {
|
|
158
|
+
throw new runtime.RequiredError(
|
|
159
|
+
'productCategory',
|
|
160
|
+
'Required parameter "productCategory" was null or undefined when calling getChildrenProductCategory().'
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const queryParameters: any = {};
|
|
165
|
+
|
|
166
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
167
|
+
|
|
168
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
let urlPath = `/admin-api/product-category/{productCategory}/children`;
|
|
172
|
+
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
173
|
+
|
|
174
|
+
const response = await this.request({
|
|
175
|
+
path: urlPath,
|
|
176
|
+
method: 'GET',
|
|
177
|
+
headers: headerParameters,
|
|
178
|
+
query: queryParameters,
|
|
179
|
+
body: IndexProductCategoryRequestToJSON(requestParameters['indexProductCategoryRequest']),
|
|
180
|
+
}, initOverrides);
|
|
181
|
+
|
|
182
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProductCategoryListResourceResponseFromJSON(jsonValue));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Auto-generated: getChildrenProductCategory
|
|
187
|
+
*/
|
|
188
|
+
async getChildrenProductCategory(requestParameters: GetChildrenProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductCategoryListResourceResponse> {
|
|
189
|
+
const response = await this.getChildrenProductCategoryRaw(requestParameters, initOverrides);
|
|
190
|
+
return await response.value();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Auto-generated: getHierarchyProductCategory
|
|
195
|
+
*/
|
|
196
|
+
async getHierarchyProductCategoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryHierarchyResourceArrayResponse>> {
|
|
197
|
+
const queryParameters: any = {};
|
|
198
|
+
|
|
199
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
let urlPath = `/admin-api/product-category/hierarchy`;
|
|
203
|
+
|
|
204
|
+
const response = await this.request({
|
|
205
|
+
path: urlPath,
|
|
206
|
+
method: 'GET',
|
|
207
|
+
headers: headerParameters,
|
|
208
|
+
query: queryParameters,
|
|
209
|
+
}, initOverrides);
|
|
210
|
+
|
|
211
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryHierarchyResourceArrayResponseFromJSON(jsonValue));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Auto-generated: getHierarchyProductCategory
|
|
216
|
+
*/
|
|
217
|
+
async getHierarchyProductCategory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryHierarchyResourceArrayResponse> {
|
|
218
|
+
const response = await this.getHierarchyProductCategoryRaw(initOverrides);
|
|
219
|
+
return await response.value();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Auto-generated: indexProductCategory
|
|
224
|
+
*/
|
|
225
|
+
async indexProductCategoryRaw(requestParameters: IndexProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedProductCategoryListResourceResponse>> {
|
|
226
|
+
const queryParameters: any = {};
|
|
227
|
+
|
|
228
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
229
|
+
|
|
230
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
let urlPath = `/admin-api/product-category/list`;
|
|
234
|
+
|
|
235
|
+
const response = await this.request({
|
|
236
|
+
path: urlPath,
|
|
237
|
+
method: 'POST',
|
|
238
|
+
headers: headerParameters,
|
|
239
|
+
query: queryParameters,
|
|
240
|
+
body: IndexProductCategoryRequestToJSON(requestParameters['indexProductCategoryRequest']),
|
|
241
|
+
}, initOverrides);
|
|
242
|
+
|
|
243
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProductCategoryListResourceResponseFromJSON(jsonValue));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Auto-generated: indexProductCategory
|
|
248
|
+
*/
|
|
249
|
+
async indexProductCategory(requestParameters: IndexProductCategoryOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductCategoryListResourceResponse> {
|
|
250
|
+
const response = await this.indexProductCategoryRaw(requestParameters, initOverrides);
|
|
251
|
+
return await response.value();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Auto-generated: showProductCategory
|
|
256
|
+
*/
|
|
257
|
+
async showProductCategoryRaw(requestParameters: ShowProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryResource>> {
|
|
258
|
+
if (requestParameters['productCategory'] == null) {
|
|
259
|
+
throw new runtime.RequiredError(
|
|
260
|
+
'productCategory',
|
|
261
|
+
'Required parameter "productCategory" was null or undefined when calling showProductCategory().'
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const queryParameters: any = {};
|
|
266
|
+
|
|
267
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
let urlPath = `/admin-api/product-category/{productCategory}`;
|
|
271
|
+
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
272
|
+
|
|
273
|
+
const response = await this.request({
|
|
274
|
+
path: urlPath,
|
|
275
|
+
method: 'GET',
|
|
276
|
+
headers: headerParameters,
|
|
277
|
+
query: queryParameters,
|
|
278
|
+
}, initOverrides);
|
|
279
|
+
|
|
280
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryResourceFromJSON(jsonValue));
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Auto-generated: showProductCategory
|
|
285
|
+
*/
|
|
286
|
+
async showProductCategory(requestParameters: ShowProductCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource> {
|
|
287
|
+
const response = await this.showProductCategoryRaw(requestParameters, initOverrides);
|
|
288
|
+
return await response.value();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Auto-generated: storeProductCategory
|
|
293
|
+
*/
|
|
294
|
+
async storeProductCategoryRaw(requestParameters: StoreProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryResource>> {
|
|
295
|
+
const queryParameters: any = {};
|
|
296
|
+
|
|
297
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
298
|
+
|
|
299
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
let urlPath = `/admin-api/product-category/create`;
|
|
303
|
+
|
|
304
|
+
const response = await this.request({
|
|
305
|
+
path: urlPath,
|
|
306
|
+
method: 'POST',
|
|
307
|
+
headers: headerParameters,
|
|
308
|
+
query: queryParameters,
|
|
309
|
+
body: StoreProductCategoryRequestToJSON(requestParameters['storeProductCategoryRequest']),
|
|
310
|
+
}, initOverrides);
|
|
311
|
+
|
|
312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryResourceFromJSON(jsonValue));
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Auto-generated: storeProductCategory
|
|
317
|
+
*/
|
|
318
|
+
async storeProductCategory(requestParameters: StoreProductCategoryOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource> {
|
|
319
|
+
const response = await this.storeProductCategoryRaw(requestParameters, initOverrides);
|
|
320
|
+
return await response.value();
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Auto-generated: updateProductCategory
|
|
325
|
+
*/
|
|
326
|
+
async updateProductCategoryRaw(requestParameters: UpdateProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCategoryResource>> {
|
|
327
|
+
if (requestParameters['productCategory'] == null) {
|
|
328
|
+
throw new runtime.RequiredError(
|
|
329
|
+
'productCategory',
|
|
330
|
+
'Required parameter "productCategory" was null or undefined when calling updateProductCategory().'
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const queryParameters: any = {};
|
|
335
|
+
|
|
336
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
337
|
+
|
|
338
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
let urlPath = `/admin-api/product-category/{productCategory}/update`;
|
|
342
|
+
urlPath = urlPath.replace(`{${"productCategory"}}`, encodeURIComponent(String(requestParameters['productCategory'])));
|
|
343
|
+
|
|
344
|
+
const response = await this.request({
|
|
345
|
+
path: urlPath,
|
|
346
|
+
method: 'PUT',
|
|
347
|
+
headers: headerParameters,
|
|
348
|
+
query: queryParameters,
|
|
349
|
+
body: UpdateProductCategoryRequestToJSON(requestParameters['updateProductCategoryRequest']),
|
|
350
|
+
}, initOverrides);
|
|
351
|
+
|
|
352
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCategoryResourceFromJSON(jsonValue));
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Auto-generated: updateProductCategory
|
|
357
|
+
*/
|
|
358
|
+
async updateProductCategory(requestParameters: UpdateProductCategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCategoryResource> {
|
|
359
|
+
const response = await this.updateProductCategoryRaw(requestParameters, initOverrides);
|
|
360
|
+
return await response.value();
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './ExternalApiLogApi';
|
|
|
7
7
|
export * from './GoogleCategoryApi';
|
|
8
8
|
export * from './OverlayTemplateApi';
|
|
9
9
|
export * from './ProductApi';
|
|
10
|
+
export * from './ProductCategoryApi';
|
|
10
11
|
export * from './ProductChildSiteDetailApi';
|
|
11
12
|
export * from './ProductTypeApi';
|
|
12
13
|
export * from './SiteApi';
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CategoryAutomationComparisonType = {
|
|
21
|
+
Greater: 'greater',
|
|
22
|
+
Less: 'less',
|
|
23
|
+
Equal: 'equal',
|
|
24
|
+
NotEqual: 'notEqual',
|
|
25
|
+
Contains: 'contains',
|
|
26
|
+
NotContains: 'notContains'
|
|
27
|
+
} as const;
|
|
28
|
+
export type CategoryAutomationComparisonType = typeof CategoryAutomationComparisonType[keyof typeof CategoryAutomationComparisonType];
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export function instanceOfCategoryAutomationComparisonType(value: any): boolean {
|
|
32
|
+
for (const key in CategoryAutomationComparisonType) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(CategoryAutomationComparisonType, key)) {
|
|
34
|
+
if (CategoryAutomationComparisonType[key as keyof typeof CategoryAutomationComparisonType] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function CategoryAutomationComparisonTypeFromJSON(json: any): CategoryAutomationComparisonType {
|
|
43
|
+
return CategoryAutomationComparisonTypeFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CategoryAutomationComparisonTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryAutomationComparisonType {
|
|
47
|
+
return json as CategoryAutomationComparisonType;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CategoryAutomationComparisonTypeToJSON(value?: CategoryAutomationComparisonType | null): any {
|
|
51
|
+
return value as any;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function CategoryAutomationComparisonTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CategoryAutomationComparisonType {
|
|
55
|
+
return value as CategoryAutomationComparisonType;
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CategoryAutomationConditionType = {
|
|
21
|
+
And: 'and',
|
|
22
|
+
Or: 'or'
|
|
23
|
+
} as const;
|
|
24
|
+
export type CategoryAutomationConditionType = typeof CategoryAutomationConditionType[keyof typeof CategoryAutomationConditionType];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfCategoryAutomationConditionType(value: any): boolean {
|
|
28
|
+
for (const key in CategoryAutomationConditionType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(CategoryAutomationConditionType, key)) {
|
|
30
|
+
if (CategoryAutomationConditionType[key as keyof typeof CategoryAutomationConditionType] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function CategoryAutomationConditionTypeFromJSON(json: any): CategoryAutomationConditionType {
|
|
39
|
+
return CategoryAutomationConditionTypeFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function CategoryAutomationConditionTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryAutomationConditionType {
|
|
43
|
+
return json as CategoryAutomationConditionType;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CategoryAutomationConditionTypeToJSON(value?: CategoryAutomationConditionType | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CategoryAutomationConditionTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CategoryAutomationConditionType {
|
|
51
|
+
return value as CategoryAutomationConditionType;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CategoryAutomationFieldType = {
|
|
21
|
+
Price: 'price',
|
|
22
|
+
Name: 'name',
|
|
23
|
+
VariantName: 'variant_name',
|
|
24
|
+
Attribute: 'attribute',
|
|
25
|
+
Tag: 'tag',
|
|
26
|
+
Supplier: 'supplier',
|
|
27
|
+
Label: 'label'
|
|
28
|
+
} as const;
|
|
29
|
+
export type CategoryAutomationFieldType = typeof CategoryAutomationFieldType[keyof typeof CategoryAutomationFieldType];
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export function instanceOfCategoryAutomationFieldType(value: any): boolean {
|
|
33
|
+
for (const key in CategoryAutomationFieldType) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(CategoryAutomationFieldType, key)) {
|
|
35
|
+
if (CategoryAutomationFieldType[key as keyof typeof CategoryAutomationFieldType] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function CategoryAutomationFieldTypeFromJSON(json: any): CategoryAutomationFieldType {
|
|
44
|
+
return CategoryAutomationFieldTypeFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function CategoryAutomationFieldTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryAutomationFieldType {
|
|
48
|
+
return json as CategoryAutomationFieldType;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CategoryAutomationFieldTypeToJSON(value?: CategoryAutomationFieldType | null): any {
|
|
52
|
+
return value as any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CategoryAutomationFieldTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CategoryAutomationFieldType {
|
|
56
|
+
return value as CategoryAutomationFieldType;
|
|
57
|
+
}
|
|
58
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
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 CategoryAutomationRuleResource
|
|
20
|
+
*/
|
|
21
|
+
export interface CategoryAutomationRuleResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CategoryAutomationRuleResource
|
|
26
|
+
*/
|
|
27
|
+
id?: number | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {object}
|
|
31
|
+
* @memberof CategoryAutomationRuleResource
|
|
32
|
+
*/
|
|
33
|
+
fieldType: object;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {object}
|
|
37
|
+
* @memberof CategoryAutomationRuleResource
|
|
38
|
+
*/
|
|
39
|
+
comparisonType: object;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof CategoryAutomationRuleResource
|
|
44
|
+
*/
|
|
45
|
+
groupId?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof CategoryAutomationRuleResource
|
|
50
|
+
*/
|
|
51
|
+
relatedId?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof CategoryAutomationRuleResource
|
|
56
|
+
*/
|
|
57
|
+
value: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof CategoryAutomationRuleResource
|
|
62
|
+
*/
|
|
63
|
+
valueId?: string | null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the CategoryAutomationRuleResource interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfCategoryAutomationRuleResource(value: object): value is CategoryAutomationRuleResource {
|
|
70
|
+
if (!('fieldType' in value) || value['fieldType'] === undefined) return false;
|
|
71
|
+
if (!('comparisonType' in value) || value['comparisonType'] === undefined) return false;
|
|
72
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function CategoryAutomationRuleResourceFromJSON(json: any): CategoryAutomationRuleResource {
|
|
77
|
+
return CategoryAutomationRuleResourceFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function CategoryAutomationRuleResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryAutomationRuleResource {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
87
|
+
'fieldType': json['fieldType'],
|
|
88
|
+
'comparisonType': json['comparisonType'],
|
|
89
|
+
'groupId': json['groupId'] == null ? undefined : json['groupId'],
|
|
90
|
+
'relatedId': json['relatedId'] == null ? undefined : json['relatedId'],
|
|
91
|
+
'value': json['value'],
|
|
92
|
+
'valueId': json['valueId'] == null ? undefined : json['valueId'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function CategoryAutomationRuleResourceToJSON(json: any): CategoryAutomationRuleResource {
|
|
97
|
+
return CategoryAutomationRuleResourceToJSONTyped(json, false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function CategoryAutomationRuleResourceToJSONTyped(value?: CategoryAutomationRuleResource | null, ignoreDiscriminator: boolean = false): any {
|
|
101
|
+
if (value == null) {
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
|
|
107
|
+
'id': value['id'],
|
|
108
|
+
'fieldType': value['fieldType'],
|
|
109
|
+
'comparisonType': value['comparisonType'],
|
|
110
|
+
'groupId': value['groupId'],
|
|
111
|
+
'relatedId': value['relatedId'],
|
|
112
|
+
'value': value['value'],
|
|
113
|
+
'valueId': value['valueId'],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|