@digital8/lighting-illusions-ts-sdk 0.0.531 → 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.
Files changed (96) hide show
  1. package/.openapi-generator/FILES +42 -0
  2. package/README.md +30 -2
  3. package/dist/apis/ProductCategoryApi.d.ts +105 -0
  4. package/dist/apis/ProductCategoryApi.js +445 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/models/CategoryAutomationComparisonType.d.ts +29 -0
  8. package/dist/models/CategoryAutomationComparisonType.js +55 -0
  9. package/dist/models/CategoryAutomationConditionType.d.ts +25 -0
  10. package/dist/models/CategoryAutomationConditionType.js +51 -0
  11. package/dist/models/CategoryAutomationFieldType.d.ts +30 -0
  12. package/dist/models/CategoryAutomationFieldType.js +56 -0
  13. package/dist/models/CategoryAutomationRuleResource.d.ts +68 -0
  14. package/dist/models/CategoryAutomationRuleResource.js +67 -0
  15. package/dist/models/CategoryAutomationRuleResourceArrayResponse.d.ts +33 -0
  16. package/dist/models/CategoryAutomationRuleResourceArrayResponse.js +50 -0
  17. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  18. package/dist/models/ExternalApiLogResource.js +3 -1
  19. package/dist/models/GetAllProductCategoryRequest.d.ts +115 -0
  20. package/dist/models/GetAllProductCategoryRequest.js +94 -0
  21. package/dist/models/IndexProductCategoryRequest.d.ts +127 -0
  22. package/dist/models/IndexProductCategoryRequest.js +98 -0
  23. package/dist/models/PaginatedProductCategoryListResourceResponse.d.ts +40 -0
  24. package/dist/models/PaginatedProductCategoryListResourceResponse.js +57 -0
  25. package/dist/models/PaginatedProductCategoryResourceResponse.d.ts +40 -0
  26. package/dist/models/PaginatedProductCategoryResourceResponse.js +57 -0
  27. package/dist/models/ProductCategoryHierarchyResource.d.ts +62 -0
  28. package/dist/models/ProductCategoryHierarchyResource.js +69 -0
  29. package/dist/models/ProductCategoryHierarchyResourceArrayResponse.d.ts +33 -0
  30. package/dist/models/ProductCategoryHierarchyResourceArrayResponse.js +50 -0
  31. package/dist/models/ProductCategoryListResource.d.ts +75 -0
  32. package/dist/models/ProductCategoryListResource.js +78 -0
  33. package/dist/models/ProductCategoryListResourceArrayResponse.d.ts +33 -0
  34. package/dist/models/ProductCategoryListResourceArrayResponse.js +50 -0
  35. package/dist/models/ProductCategoryLiteResource.d.ts +38 -0
  36. package/dist/models/ProductCategoryLiteResource.js +53 -0
  37. package/dist/models/ProductCategoryLiteResourceArrayResponse.d.ts +33 -0
  38. package/dist/models/ProductCategoryLiteResourceArrayResponse.js +50 -0
  39. package/dist/models/ProductCategoryResource.d.ts +107 -0
  40. package/dist/models/ProductCategoryResource.js +96 -0
  41. package/dist/models/ProductCategoryResourceArrayResponse.d.ts +33 -0
  42. package/dist/models/ProductCategoryResourceArrayResponse.js +50 -0
  43. package/dist/models/StoreProductCategoryRequest.d.ts +105 -0
  44. package/dist/models/StoreProductCategoryRequest.js +86 -0
  45. package/dist/models/StoreProductCategoryRequestAutomationRulesInner.d.ts +62 -0
  46. package/dist/models/StoreProductCategoryRequestAutomationRulesInner.js +63 -0
  47. package/dist/models/UpdateProductCategoryRequest.d.ts +105 -0
  48. package/dist/models/UpdateProductCategoryRequest.js +74 -0
  49. package/dist/models/index.d.ts +20 -0
  50. package/dist/models/index.js +20 -0
  51. package/docs/CategoryAutomationComparisonType.md +32 -0
  52. package/docs/CategoryAutomationConditionType.md +32 -0
  53. package/docs/CategoryAutomationFieldType.md +32 -0
  54. package/docs/CategoryAutomationRuleResource.md +46 -0
  55. package/docs/CategoryAutomationRuleResourceArrayResponse.md +34 -0
  56. package/docs/GetAllProductCategoryRequest.md +52 -0
  57. package/docs/IndexProductCategoryRequest.md +56 -0
  58. package/docs/PaginatedProductCategoryListResourceResponse.md +36 -0
  59. package/docs/PaginatedProductCategoryResourceResponse.md +36 -0
  60. package/docs/ProductCategoryApi.md +534 -0
  61. package/docs/ProductCategoryHierarchyResource.md +44 -0
  62. package/docs/ProductCategoryHierarchyResourceArrayResponse.md +34 -0
  63. package/docs/ProductCategoryListResource.md +48 -0
  64. package/docs/ProductCategoryListResourceArrayResponse.md +34 -0
  65. package/docs/ProductCategoryLiteResource.md +36 -0
  66. package/docs/ProductCategoryLiteResourceArrayResponse.md +34 -0
  67. package/docs/ProductCategoryResource.md +58 -0
  68. package/docs/ProductCategoryResourceArrayResponse.md +34 -0
  69. package/docs/StoreProductCategoryRequest.md +58 -0
  70. package/docs/StoreProductCategoryRequestAutomationRulesInner.md +44 -0
  71. package/docs/UpdateProductCategoryRequest.md +58 -0
  72. package/package.json +1 -1
  73. package/src/apis/ProductCategoryApi.ts +363 -0
  74. package/src/apis/index.ts +1 -0
  75. package/src/models/CategoryAutomationComparisonType.ts +57 -0
  76. package/src/models/CategoryAutomationConditionType.ts +53 -0
  77. package/src/models/CategoryAutomationFieldType.ts +58 -0
  78. package/src/models/CategoryAutomationRuleResource.ts +116 -0
  79. package/src/models/CategoryAutomationRuleResourceArrayResponse.ts +73 -0
  80. package/src/models/ExternalApiLogResource.ts +3 -2
  81. package/src/models/GetAllProductCategoryRequest.ts +171 -0
  82. package/src/models/IndexProductCategoryRequest.ts +187 -0
  83. package/src/models/PaginatedProductCategoryListResourceResponse.ts +90 -0
  84. package/src/models/PaginatedProductCategoryResourceResponse.ts +90 -0
  85. package/src/models/ProductCategoryHierarchyResource.ts +110 -0
  86. package/src/models/ProductCategoryHierarchyResourceArrayResponse.ts +73 -0
  87. package/src/models/ProductCategoryListResource.ts +136 -0
  88. package/src/models/ProductCategoryListResourceArrayResponse.ts +73 -0
  89. package/src/models/ProductCategoryLiteResource.ts +74 -0
  90. package/src/models/ProductCategoryLiteResourceArrayResponse.ts +73 -0
  91. package/src/models/ProductCategoryResource.ts +193 -0
  92. package/src/models/ProductCategoryResourceArrayResponse.ts +73 -0
  93. package/src/models/StoreProductCategoryRequest.ts +175 -0
  94. package/src/models/StoreProductCategoryRequestAutomationRulesInner.ts +107 -0
  95. package/src/models/UpdateProductCategoryRequest.ts +169 -0
  96. package/src/models/index.ts +20 -0
@@ -0,0 +1,36 @@
1
+
2
+ # ProductCategoryLiteResource
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | number
10
+ `name` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { ProductCategoryLiteResource } from '@digital8/lighting-illusions-ts-sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "id": null,
20
+ "name": null,
21
+ } satisfies ProductCategoryLiteResource
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as ProductCategoryLiteResource
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,34 @@
1
+
2
+ # ProductCategoryLiteResourceArrayResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<ProductCategoryLiteResource>](ProductCategoryLiteResource.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { ProductCategoryLiteResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "data": null,
19
+ } satisfies ProductCategoryLiteResourceArrayResponse
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 ProductCategoryLiteResourceArrayResponse
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,58 @@
1
+
2
+ # ProductCategoryResource
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | number
10
+ `siteId` | number
11
+ `name` | string
12
+ `slug` | string
13
+ `parentId` | string
14
+ `isDisabled` | boolean
15
+ `isAutomated` | boolean
16
+ `index` | number
17
+ `automatedConditionType` | string
18
+ `thumbnail` | [AssetResource](AssetResource.md)
19
+ `automationRules` | object
20
+ `parent` | [ProductCategoryLiteResource](ProductCategoryLiteResource.md)
21
+ `site` | [SiteLiteResource](SiteLiteResource.md)
22
+
23
+ ## Example
24
+
25
+ ```typescript
26
+ import type { ProductCategoryResource } from '@digital8/lighting-illusions-ts-sdk'
27
+
28
+ // TODO: Update the object below with actual values
29
+ const example = {
30
+ "id": null,
31
+ "siteId": null,
32
+ "name": null,
33
+ "slug": null,
34
+ "parentId": null,
35
+ "isDisabled": null,
36
+ "isAutomated": null,
37
+ "index": null,
38
+ "automatedConditionType": null,
39
+ "thumbnail": null,
40
+ "automationRules": null,
41
+ "parent": null,
42
+ "site": null,
43
+ } satisfies ProductCategoryResource
44
+
45
+ console.log(example)
46
+
47
+ // Convert the instance to a JSON string
48
+ const exampleJSON: string = JSON.stringify(example)
49
+ console.log(exampleJSON)
50
+
51
+ // Parse the JSON string back to an object
52
+ const exampleParsed = JSON.parse(exampleJSON) as ProductCategoryResource
53
+ console.log(exampleParsed)
54
+ ```
55
+
56
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
57
+
58
+
@@ -0,0 +1,34 @@
1
+
2
+ # ProductCategoryResourceArrayResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<ProductCategoryResource>](ProductCategoryResource.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { ProductCategoryResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "data": null,
19
+ } satisfies ProductCategoryResourceArrayResponse
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 ProductCategoryResourceArrayResponse
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,58 @@
1
+
2
+ # StoreProductCategoryRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `siteId` | string
10
+ `name` | string
11
+ `slug` | string
12
+ `parentId` | string
13
+ `isDisabled` | boolean
14
+ `hideFromFrontend` | boolean
15
+ `isAutomated` | boolean
16
+ `index` | number
17
+ `automatedConditionType` | string
18
+ `automationRules` | [Array<StoreProductCategoryRequestAutomationRulesInner>](StoreProductCategoryRequestAutomationRulesInner.md)
19
+ `altText` | string
20
+ `mimeType` | string
21
+ `fileId` | number
22
+
23
+ ## Example
24
+
25
+ ```typescript
26
+ import type { StoreProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
27
+
28
+ // TODO: Update the object below with actual values
29
+ const example = {
30
+ "siteId": null,
31
+ "name": null,
32
+ "slug": null,
33
+ "parentId": null,
34
+ "isDisabled": null,
35
+ "hideFromFrontend": null,
36
+ "isAutomated": null,
37
+ "index": null,
38
+ "automatedConditionType": null,
39
+ "automationRules": null,
40
+ "altText": null,
41
+ "mimeType": null,
42
+ "fileId": null,
43
+ } satisfies StoreProductCategoryRequest
44
+
45
+ console.log(example)
46
+
47
+ // Convert the instance to a JSON string
48
+ const exampleJSON: string = JSON.stringify(example)
49
+ console.log(exampleJSON)
50
+
51
+ // Parse the JSON string back to an object
52
+ const exampleParsed = JSON.parse(exampleJSON) as StoreProductCategoryRequest
53
+ console.log(exampleParsed)
54
+ ```
55
+
56
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
57
+
58
+
@@ -0,0 +1,44 @@
1
+
2
+ # StoreProductCategoryRequestAutomationRulesInner
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `fieldType` | string
10
+ `comparisonType` | string
11
+ `groupId` | number
12
+ `relatedId` | string
13
+ `value` | string
14
+ `valueId` | number
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { StoreProductCategoryRequestAutomationRulesInner } from '@digital8/lighting-illusions-ts-sdk'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "fieldType": null,
24
+ "comparisonType": null,
25
+ "groupId": null,
26
+ "relatedId": null,
27
+ "value": null,
28
+ "valueId": null,
29
+ } satisfies StoreProductCategoryRequestAutomationRulesInner
30
+
31
+ console.log(example)
32
+
33
+ // Convert the instance to a JSON string
34
+ const exampleJSON: string = JSON.stringify(example)
35
+ console.log(exampleJSON)
36
+
37
+ // Parse the JSON string back to an object
38
+ const exampleParsed = JSON.parse(exampleJSON) as StoreProductCategoryRequestAutomationRulesInner
39
+ console.log(exampleParsed)
40
+ ```
41
+
42
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
43
+
44
+
@@ -0,0 +1,58 @@
1
+
2
+ # UpdateProductCategoryRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `siteId` | string
10
+ `name` | string
11
+ `slug` | string
12
+ `parentId` | string
13
+ `isDisabled` | boolean
14
+ `hideFromFrontend` | boolean
15
+ `isAutomated` | boolean
16
+ `index` | number
17
+ `automatedConditionType` | string
18
+ `automationRules` | [Array<StoreProductCategoryRequestAutomationRulesInner>](StoreProductCategoryRequestAutomationRulesInner.md)
19
+ `altText` | string
20
+ `mimeType` | string
21
+ `fileId` | number
22
+
23
+ ## Example
24
+
25
+ ```typescript
26
+ import type { UpdateProductCategoryRequest } from '@digital8/lighting-illusions-ts-sdk'
27
+
28
+ // TODO: Update the object below with actual values
29
+ const example = {
30
+ "siteId": null,
31
+ "name": null,
32
+ "slug": null,
33
+ "parentId": null,
34
+ "isDisabled": null,
35
+ "hideFromFrontend": null,
36
+ "isAutomated": null,
37
+ "index": null,
38
+ "automatedConditionType": null,
39
+ "automationRules": null,
40
+ "altText": null,
41
+ "mimeType": null,
42
+ "fileId": null,
43
+ } satisfies UpdateProductCategoryRequest
44
+
45
+ console.log(example)
46
+
47
+ // Convert the instance to a JSON string
48
+ const exampleJSON: string = JSON.stringify(example)
49
+ console.log(exampleJSON)
50
+
51
+ // Parse the JSON string back to an object
52
+ const exampleParsed = JSON.parse(exampleJSON) as UpdateProductCategoryRequest
53
+ console.log(exampleParsed)
54
+ ```
55
+
56
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
57
+
58
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.531",
3
+ "version": "0.0.532",
4
4
  "description": "OpenAPI client for @digital8/lighting-illusions-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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
+ }