@digital8/lighting-illusions-ts-sdk 0.0.437 → 0.0.439
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 +2 -0
- package/README.md +7 -3
- package/dist/apis/AttributeApi.d.ts +3 -3
- package/dist/apis/AttributeApi.js +2 -2
- package/dist/apis/TagApi.d.ts +36 -1
- package/dist/apis/TagApi.js +144 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/LinkProductChildrenTagRequest.d.ts +32 -0
- package/dist/models/LinkProductChildrenTagRequest.js +51 -0
- package/dist/models/ProductChildRelationResource.d.ts +1 -1
- package/dist/models/ProductChildRelationResource.js +4 -2
- package/dist/models/UpdateModelAttributeRequest.d.ts +1 -1
- package/dist/models/UpdateModelAttributeRequest.js +1 -3
- package/dist/models/UpdateProductChildRequest.d.ts +2 -2
- package/dist/models/UpdateProductChildRequest.js +4 -8
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/AttributeApi.md +3 -3
- package/docs/LinkProductChildrenTagRequest.md +34 -0
- package/docs/ProductChildRelationResource.md +2 -2
- package/docs/TagApi.md +204 -0
- package/package.json +1 -1
- package/src/apis/AttributeApi.ts +7 -7
- package/src/apis/TagApi.ts +142 -0
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/LinkProductChildrenTagRequest.ts +66 -0
- package/src/models/ProductChildRelationResource.ts +4 -3
- package/src/models/UpdateModelAttributeRequest.ts +2 -3
- package/src/models/UpdateProductChildRequest.ts +6 -8
- package/src/models/index.ts +1 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# LinkProductChildrenTagRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`productChildIds` | Array<number>
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { LinkProductChildrenTagRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"productChildIds": null,
|
|
19
|
+
} satisfies LinkProductChildrenTagRequest
|
|
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 LinkProductChildrenTagRequest
|
|
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
|
+
|
|
@@ -8,7 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | number
|
|
10
10
|
`name` | string
|
|
11
|
-
`
|
|
11
|
+
`model` | string
|
|
12
12
|
`sku` | number
|
|
13
13
|
`netsuiteId` | number
|
|
14
14
|
`thumbnail` | [AssetResource](AssetResource.md)
|
|
@@ -23,7 +23,7 @@ import type { ProductChildRelationResource } from '@digital8/lighting-illusions-
|
|
|
23
23
|
const example = {
|
|
24
24
|
"id": null,
|
|
25
25
|
"name": null,
|
|
26
|
-
"
|
|
26
|
+
"model": null,
|
|
27
27
|
"sku": null,
|
|
28
28
|
"netsuiteId": null,
|
|
29
29
|
"thumbnail": null,
|
package/docs/TagApi.md
CHANGED
|
@@ -6,9 +6,12 @@ All URIs are relative to *http://localhost/api*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**destroyTag**](TagApi.md#destroytag) | **DELETE** /admin-api/tag/{tag}/delete | Auto-generated: destroyTag |
|
|
8
8
|
| [**getAllTag**](TagApi.md#getalltag) | **POST** /admin-api/tag/all | Auto-generated: getAllTag |
|
|
9
|
+
| [**getProductsTag**](TagApi.md#getproductstag) | **GET** /admin-api/tag/{tag}/products | Auto-generated: getProductsTag |
|
|
9
10
|
| [**indexTag**](TagApi.md#indextagoperation) | **POST** /admin-api/tag/list | Auto-generated: indexTag |
|
|
11
|
+
| [**linkProductChildrenTag**](TagApi.md#linkproductchildrentagoperation) | **POST** /admin-api/tag/{tag}/link-product-children | Auto-generated: linkProductChildrenTag |
|
|
10
12
|
| [**showTag**](TagApi.md#showtag) | **GET** /admin-api/tag/{tag} | Auto-generated: showTag |
|
|
11
13
|
| [**storeTag**](TagApi.md#storetagoperation) | **POST** /admin-api/tag/create | Auto-generated: storeTag |
|
|
14
|
+
| [**unlinkProductChildTag**](TagApi.md#unlinkproductchildtag) | **POST** /admin-api/tag/{tag}/remove-product-child/{productChild} | Auto-generated: unlinkProductChildTag |
|
|
12
15
|
| [**updateTag**](TagApi.md#updatetagoperation) | **PUT** /admin-api/tag/{tag}/update | Auto-generated: updateTag |
|
|
13
16
|
|
|
14
17
|
|
|
@@ -143,6 +146,71 @@ No authorization required
|
|
|
143
146
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
144
147
|
|
|
145
148
|
|
|
149
|
+
## getProductsTag
|
|
150
|
+
|
|
151
|
+
> TagResource getProductsTag(tag)
|
|
152
|
+
|
|
153
|
+
Auto-generated: getProductsTag
|
|
154
|
+
|
|
155
|
+
### Example
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
import {
|
|
159
|
+
Configuration,
|
|
160
|
+
TagApi,
|
|
161
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
162
|
+
import type { GetProductsTagRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
163
|
+
|
|
164
|
+
async function example() {
|
|
165
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
166
|
+
const api = new TagApi();
|
|
167
|
+
|
|
168
|
+
const body = {
|
|
169
|
+
// number | The id of the tag
|
|
170
|
+
tag: 56,
|
|
171
|
+
} satisfies GetProductsTagRequest;
|
|
172
|
+
|
|
173
|
+
try {
|
|
174
|
+
const data = await api.getProductsTag(body);
|
|
175
|
+
console.log(data);
|
|
176
|
+
} catch (error) {
|
|
177
|
+
console.error(error);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Run the test
|
|
182
|
+
example().catch(console.error);
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Parameters
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
| Name | Type | Description | Notes |
|
|
189
|
+
|------------- | ------------- | ------------- | -------------|
|
|
190
|
+
| **tag** | `number` | The id of the tag | [Defaults to `undefined`] |
|
|
191
|
+
|
|
192
|
+
### Return type
|
|
193
|
+
|
|
194
|
+
[**TagResource**](TagResource.md)
|
|
195
|
+
|
|
196
|
+
### Authorization
|
|
197
|
+
|
|
198
|
+
No authorization required
|
|
199
|
+
|
|
200
|
+
### HTTP request headers
|
|
201
|
+
|
|
202
|
+
- **Content-Type**: Not defined
|
|
203
|
+
- **Accept**: `application/json`
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
### HTTP response details
|
|
207
|
+
| Status code | Description | Response headers |
|
|
208
|
+
|-------------|-------------|------------------|
|
|
209
|
+
| **200** | Successful resource response | - |
|
|
210
|
+
|
|
211
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
212
|
+
|
|
213
|
+
|
|
146
214
|
## indexTag
|
|
147
215
|
|
|
148
216
|
> PaginatedTagResourceResponse indexTag(indexTagRequest)
|
|
@@ -208,6 +276,74 @@ No authorization required
|
|
|
208
276
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
209
277
|
|
|
210
278
|
|
|
279
|
+
## linkProductChildrenTag
|
|
280
|
+
|
|
281
|
+
> TagResource linkProductChildrenTag(tag, linkProductChildrenTagRequest)
|
|
282
|
+
|
|
283
|
+
Auto-generated: linkProductChildrenTag
|
|
284
|
+
|
|
285
|
+
### Example
|
|
286
|
+
|
|
287
|
+
```ts
|
|
288
|
+
import {
|
|
289
|
+
Configuration,
|
|
290
|
+
TagApi,
|
|
291
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
292
|
+
import type { LinkProductChildrenTagOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
293
|
+
|
|
294
|
+
async function example() {
|
|
295
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
296
|
+
const api = new TagApi();
|
|
297
|
+
|
|
298
|
+
const body = {
|
|
299
|
+
// number | The id of the tag
|
|
300
|
+
tag: 56,
|
|
301
|
+
// LinkProductChildrenTagRequest (optional)
|
|
302
|
+
linkProductChildrenTagRequest: ...,
|
|
303
|
+
} satisfies LinkProductChildrenTagOperationRequest;
|
|
304
|
+
|
|
305
|
+
try {
|
|
306
|
+
const data = await api.linkProductChildrenTag(body);
|
|
307
|
+
console.log(data);
|
|
308
|
+
} catch (error) {
|
|
309
|
+
console.error(error);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// Run the test
|
|
314
|
+
example().catch(console.error);
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Parameters
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
| Name | Type | Description | Notes |
|
|
321
|
+
|------------- | ------------- | ------------- | -------------|
|
|
322
|
+
| **tag** | `number` | The id of the tag | [Defaults to `undefined`] |
|
|
323
|
+
| **linkProductChildrenTagRequest** | [LinkProductChildrenTagRequest](LinkProductChildrenTagRequest.md) | | [Optional] |
|
|
324
|
+
|
|
325
|
+
### Return type
|
|
326
|
+
|
|
327
|
+
[**TagResource**](TagResource.md)
|
|
328
|
+
|
|
329
|
+
### Authorization
|
|
330
|
+
|
|
331
|
+
No authorization required
|
|
332
|
+
|
|
333
|
+
### HTTP request headers
|
|
334
|
+
|
|
335
|
+
- **Content-Type**: `application/json`
|
|
336
|
+
- **Accept**: `application/json`
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
### HTTP response details
|
|
340
|
+
| Status code | Description | Response headers |
|
|
341
|
+
|-------------|-------------|------------------|
|
|
342
|
+
| **200** | Successful resource response | - |
|
|
343
|
+
|
|
344
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
345
|
+
|
|
346
|
+
|
|
211
347
|
## showTag
|
|
212
348
|
|
|
213
349
|
> TagResource showTag(tag)
|
|
@@ -338,6 +474,74 @@ No authorization required
|
|
|
338
474
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
339
475
|
|
|
340
476
|
|
|
477
|
+
## unlinkProductChildTag
|
|
478
|
+
|
|
479
|
+
> ProductChildRelationResourceArrayResponse unlinkProductChildTag(tag, productChild)
|
|
480
|
+
|
|
481
|
+
Auto-generated: unlinkProductChildTag
|
|
482
|
+
|
|
483
|
+
### Example
|
|
484
|
+
|
|
485
|
+
```ts
|
|
486
|
+
import {
|
|
487
|
+
Configuration,
|
|
488
|
+
TagApi,
|
|
489
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
490
|
+
import type { UnlinkProductChildTagRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
491
|
+
|
|
492
|
+
async function example() {
|
|
493
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
494
|
+
const api = new TagApi();
|
|
495
|
+
|
|
496
|
+
const body = {
|
|
497
|
+
// number | The id of the tag
|
|
498
|
+
tag: 56,
|
|
499
|
+
// number | The id of the productChild
|
|
500
|
+
productChild: 56,
|
|
501
|
+
} satisfies UnlinkProductChildTagRequest;
|
|
502
|
+
|
|
503
|
+
try {
|
|
504
|
+
const data = await api.unlinkProductChildTag(body);
|
|
505
|
+
console.log(data);
|
|
506
|
+
} catch (error) {
|
|
507
|
+
console.error(error);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// Run the test
|
|
512
|
+
example().catch(console.error);
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
### Parameters
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
| Name | Type | Description | Notes |
|
|
519
|
+
|------------- | ------------- | ------------- | -------------|
|
|
520
|
+
| **tag** | `number` | The id of the tag | [Defaults to `undefined`] |
|
|
521
|
+
| **productChild** | `number` | The id of the productChild | [Defaults to `undefined`] |
|
|
522
|
+
|
|
523
|
+
### Return type
|
|
524
|
+
|
|
525
|
+
[**ProductChildRelationResourceArrayResponse**](ProductChildRelationResourceArrayResponse.md)
|
|
526
|
+
|
|
527
|
+
### Authorization
|
|
528
|
+
|
|
529
|
+
No authorization required
|
|
530
|
+
|
|
531
|
+
### HTTP request headers
|
|
532
|
+
|
|
533
|
+
- **Content-Type**: Not defined
|
|
534
|
+
- **Accept**: `application/json`
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
### HTTP response details
|
|
538
|
+
| Status code | Description | Response headers |
|
|
539
|
+
|-------------|-------------|------------------|
|
|
540
|
+
| **200** | Successful resource response | - |
|
|
541
|
+
|
|
542
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
543
|
+
|
|
544
|
+
|
|
341
545
|
## updateTag
|
|
342
546
|
|
|
343
547
|
> TagResource updateTag(tag, updateTagRequest)
|
package/package.json
CHANGED
package/src/apis/AttributeApi.ts
CHANGED
|
@@ -23,8 +23,8 @@ import type {
|
|
|
23
23
|
GetAllAttributeRequest,
|
|
24
24
|
IndexAttributeRequest,
|
|
25
25
|
LinkProductTypeAttributeRequest,
|
|
26
|
+
ModelAttributeResourceArrayResponse,
|
|
26
27
|
PaginatedAttributeResourceResponse,
|
|
27
|
-
ProductChildResource,
|
|
28
28
|
StoreAttributeRequest,
|
|
29
29
|
StoreAttributeValueRequest,
|
|
30
30
|
UpdateAttributeRequest,
|
|
@@ -49,10 +49,10 @@ import {
|
|
|
49
49
|
IndexAttributeRequestToJSON,
|
|
50
50
|
LinkProductTypeAttributeRequestFromJSON,
|
|
51
51
|
LinkProductTypeAttributeRequestToJSON,
|
|
52
|
+
ModelAttributeResourceArrayResponseFromJSON,
|
|
53
|
+
ModelAttributeResourceArrayResponseToJSON,
|
|
52
54
|
PaginatedAttributeResourceResponseFromJSON,
|
|
53
55
|
PaginatedAttributeResourceResponseToJSON,
|
|
54
|
-
ProductChildResourceFromJSON,
|
|
55
|
-
ProductChildResourceToJSON,
|
|
56
56
|
StoreAttributeRequestFromJSON,
|
|
57
57
|
StoreAttributeRequestToJSON,
|
|
58
58
|
StoreAttributeValueRequestFromJSON,
|
|
@@ -617,7 +617,7 @@ export class AttributeApi extends runtime.BaseAPI {
|
|
|
617
617
|
/**
|
|
618
618
|
* Auto-generated: updateModelAttribute
|
|
619
619
|
*/
|
|
620
|
-
async updateModelAttributeRaw(requestParameters: UpdateModelAttributeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
620
|
+
async updateModelAttributeRaw(requestParameters: UpdateModelAttributeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelAttributeResourceArrayResponse>> {
|
|
621
621
|
if (requestParameters['modelAttribute'] == null) {
|
|
622
622
|
throw new runtime.RequiredError(
|
|
623
623
|
'modelAttribute',
|
|
@@ -637,19 +637,19 @@ export class AttributeApi extends runtime.BaseAPI {
|
|
|
637
637
|
|
|
638
638
|
const response = await this.request({
|
|
639
639
|
path: urlPath,
|
|
640
|
-
method: '
|
|
640
|
+
method: 'PUT',
|
|
641
641
|
headers: headerParameters,
|
|
642
642
|
query: queryParameters,
|
|
643
643
|
body: UpdateModelAttributeRequestToJSON(requestParameters['updateModelAttributeRequest']),
|
|
644
644
|
}, initOverrides);
|
|
645
645
|
|
|
646
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
646
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ModelAttributeResourceArrayResponseFromJSON(jsonValue));
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
/**
|
|
650
650
|
* Auto-generated: updateModelAttribute
|
|
651
651
|
*/
|
|
652
|
-
async updateModelAttribute(requestParameters: UpdateModelAttributeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
652
|
+
async updateModelAttribute(requestParameters: UpdateModelAttributeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelAttributeResourceArrayResponse> {
|
|
653
653
|
const response = await this.updateModelAttributeRaw(requestParameters, initOverrides);
|
|
654
654
|
return await response.value();
|
|
655
655
|
}
|
package/src/apis/TagApi.ts
CHANGED
|
@@ -17,7 +17,9 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
GenericResponse,
|
|
19
19
|
IndexTagRequest,
|
|
20
|
+
LinkProductChildrenTagRequest,
|
|
20
21
|
PaginatedTagResourceResponse,
|
|
22
|
+
ProductChildRelationResourceArrayResponse,
|
|
21
23
|
StoreTagRequest,
|
|
22
24
|
TagLiteResourceArrayResponse,
|
|
23
25
|
TagResource,
|
|
@@ -28,8 +30,12 @@ import {
|
|
|
28
30
|
GenericResponseToJSON,
|
|
29
31
|
IndexTagRequestFromJSON,
|
|
30
32
|
IndexTagRequestToJSON,
|
|
33
|
+
LinkProductChildrenTagRequestFromJSON,
|
|
34
|
+
LinkProductChildrenTagRequestToJSON,
|
|
31
35
|
PaginatedTagResourceResponseFromJSON,
|
|
32
36
|
PaginatedTagResourceResponseToJSON,
|
|
37
|
+
ProductChildRelationResourceArrayResponseFromJSON,
|
|
38
|
+
ProductChildRelationResourceArrayResponseToJSON,
|
|
33
39
|
StoreTagRequestFromJSON,
|
|
34
40
|
StoreTagRequestToJSON,
|
|
35
41
|
TagLiteResourceArrayResponseFromJSON,
|
|
@@ -48,10 +54,19 @@ export interface GetAllTagRequest {
|
|
|
48
54
|
indexTagRequest?: IndexTagRequest;
|
|
49
55
|
}
|
|
50
56
|
|
|
57
|
+
export interface GetProductsTagRequest {
|
|
58
|
+
tag: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
51
61
|
export interface IndexTagOperationRequest {
|
|
52
62
|
indexTagRequest?: IndexTagRequest;
|
|
53
63
|
}
|
|
54
64
|
|
|
65
|
+
export interface LinkProductChildrenTagOperationRequest {
|
|
66
|
+
tag: number;
|
|
67
|
+
linkProductChildrenTagRequest?: LinkProductChildrenTagRequest;
|
|
68
|
+
}
|
|
69
|
+
|
|
55
70
|
export interface ShowTagRequest {
|
|
56
71
|
tag: number;
|
|
57
72
|
}
|
|
@@ -60,6 +75,11 @@ export interface StoreTagOperationRequest {
|
|
|
60
75
|
storeTagRequest?: StoreTagRequest;
|
|
61
76
|
}
|
|
62
77
|
|
|
78
|
+
export interface UnlinkProductChildTagRequest {
|
|
79
|
+
tag: number;
|
|
80
|
+
productChild: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
63
83
|
export interface UpdateTagOperationRequest {
|
|
64
84
|
tag: number;
|
|
65
85
|
updateTagRequest?: UpdateTagRequest;
|
|
@@ -139,6 +159,43 @@ export class TagApi extends runtime.BaseAPI {
|
|
|
139
159
|
return await response.value();
|
|
140
160
|
}
|
|
141
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Auto-generated: getProductsTag
|
|
164
|
+
*/
|
|
165
|
+
async getProductsTagRaw(requestParameters: GetProductsTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResource>> {
|
|
166
|
+
if (requestParameters['tag'] == null) {
|
|
167
|
+
throw new runtime.RequiredError(
|
|
168
|
+
'tag',
|
|
169
|
+
'Required parameter "tag" was null or undefined when calling getProductsTag().'
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const queryParameters: any = {};
|
|
174
|
+
|
|
175
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
let urlPath = `/admin-api/tag/{tag}/products`;
|
|
179
|
+
urlPath = urlPath.replace(`{${"tag"}}`, encodeURIComponent(String(requestParameters['tag'])));
|
|
180
|
+
|
|
181
|
+
const response = await this.request({
|
|
182
|
+
path: urlPath,
|
|
183
|
+
method: 'GET',
|
|
184
|
+
headers: headerParameters,
|
|
185
|
+
query: queryParameters,
|
|
186
|
+
}, initOverrides);
|
|
187
|
+
|
|
188
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TagResourceFromJSON(jsonValue));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Auto-generated: getProductsTag
|
|
193
|
+
*/
|
|
194
|
+
async getProductsTag(requestParameters: GetProductsTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResource> {
|
|
195
|
+
const response = await this.getProductsTagRaw(requestParameters, initOverrides);
|
|
196
|
+
return await response.value();
|
|
197
|
+
}
|
|
198
|
+
|
|
142
199
|
/**
|
|
143
200
|
* Auto-generated: indexTag
|
|
144
201
|
*/
|
|
@@ -171,6 +228,46 @@ export class TagApi extends runtime.BaseAPI {
|
|
|
171
228
|
return await response.value();
|
|
172
229
|
}
|
|
173
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Auto-generated: linkProductChildrenTag
|
|
233
|
+
*/
|
|
234
|
+
async linkProductChildrenTagRaw(requestParameters: LinkProductChildrenTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResource>> {
|
|
235
|
+
if (requestParameters['tag'] == null) {
|
|
236
|
+
throw new runtime.RequiredError(
|
|
237
|
+
'tag',
|
|
238
|
+
'Required parameter "tag" was null or undefined when calling linkProductChildrenTag().'
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const queryParameters: any = {};
|
|
243
|
+
|
|
244
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
245
|
+
|
|
246
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
let urlPath = `/admin-api/tag/{tag}/link-product-children`;
|
|
250
|
+
urlPath = urlPath.replace(`{${"tag"}}`, encodeURIComponent(String(requestParameters['tag'])));
|
|
251
|
+
|
|
252
|
+
const response = await this.request({
|
|
253
|
+
path: urlPath,
|
|
254
|
+
method: 'POST',
|
|
255
|
+
headers: headerParameters,
|
|
256
|
+
query: queryParameters,
|
|
257
|
+
body: LinkProductChildrenTagRequestToJSON(requestParameters['linkProductChildrenTagRequest']),
|
|
258
|
+
}, initOverrides);
|
|
259
|
+
|
|
260
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TagResourceFromJSON(jsonValue));
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Auto-generated: linkProductChildrenTag
|
|
265
|
+
*/
|
|
266
|
+
async linkProductChildrenTag(requestParameters: LinkProductChildrenTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResource> {
|
|
267
|
+
const response = await this.linkProductChildrenTagRaw(requestParameters, initOverrides);
|
|
268
|
+
return await response.value();
|
|
269
|
+
}
|
|
270
|
+
|
|
174
271
|
/**
|
|
175
272
|
* Auto-generated: showTag
|
|
176
273
|
*/
|
|
@@ -240,6 +337,51 @@ export class TagApi extends runtime.BaseAPI {
|
|
|
240
337
|
return await response.value();
|
|
241
338
|
}
|
|
242
339
|
|
|
340
|
+
/**
|
|
341
|
+
* Auto-generated: unlinkProductChildTag
|
|
342
|
+
*/
|
|
343
|
+
async unlinkProductChildTagRaw(requestParameters: UnlinkProductChildTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductChildRelationResourceArrayResponse>> {
|
|
344
|
+
if (requestParameters['tag'] == null) {
|
|
345
|
+
throw new runtime.RequiredError(
|
|
346
|
+
'tag',
|
|
347
|
+
'Required parameter "tag" was null or undefined when calling unlinkProductChildTag().'
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (requestParameters['productChild'] == null) {
|
|
352
|
+
throw new runtime.RequiredError(
|
|
353
|
+
'productChild',
|
|
354
|
+
'Required parameter "productChild" was null or undefined when calling unlinkProductChildTag().'
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const queryParameters: any = {};
|
|
359
|
+
|
|
360
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
let urlPath = `/admin-api/tag/{tag}/remove-product-child/{productChild}`;
|
|
364
|
+
urlPath = urlPath.replace(`{${"tag"}}`, encodeURIComponent(String(requestParameters['tag'])));
|
|
365
|
+
urlPath = urlPath.replace(`{${"productChild"}}`, encodeURIComponent(String(requestParameters['productChild'])));
|
|
366
|
+
|
|
367
|
+
const response = await this.request({
|
|
368
|
+
path: urlPath,
|
|
369
|
+
method: 'POST',
|
|
370
|
+
headers: headerParameters,
|
|
371
|
+
query: queryParameters,
|
|
372
|
+
}, initOverrides);
|
|
373
|
+
|
|
374
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductChildRelationResourceArrayResponseFromJSON(jsonValue));
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Auto-generated: unlinkProductChildTag
|
|
379
|
+
*/
|
|
380
|
+
async unlinkProductChildTag(requestParameters: UnlinkProductChildTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductChildRelationResourceArrayResponse> {
|
|
381
|
+
const response = await this.unlinkProductChildTagRaw(requestParameters, initOverrides);
|
|
382
|
+
return await response.value();
|
|
383
|
+
}
|
|
384
|
+
|
|
243
385
|
/**
|
|
244
386
|
* Auto-generated: updateTag
|
|
245
387
|
*/
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload: string;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,6 +106,7 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
|
|
|
106
106
|
if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
|
|
107
107
|
if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
|
|
108
108
|
if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
|
|
109
|
+
if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
|
|
109
110
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
110
111
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
111
112
|
return true;
|
|
@@ -128,7 +129,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
128
129
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
129
130
|
'endpoint': json['endpoint'],
|
|
130
131
|
'responseCode': json['responseCode'],
|
|
131
|
-
'requestPayload': json['requestPayload']
|
|
132
|
+
'requestPayload': json['requestPayload'],
|
|
132
133
|
'responsePayload': json['responsePayload'],
|
|
133
134
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
134
135
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface LinkProductChildrenTagRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface LinkProductChildrenTagRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {Array<number>}
|
|
25
|
+
* @memberof LinkProductChildrenTagRequest
|
|
26
|
+
*/
|
|
27
|
+
productChildIds: Array<number>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the LinkProductChildrenTagRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfLinkProductChildrenTagRequest(value: object): value is LinkProductChildrenTagRequest {
|
|
34
|
+
if (!('productChildIds' in value) || value['productChildIds'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function LinkProductChildrenTagRequestFromJSON(json: any): LinkProductChildrenTagRequest {
|
|
39
|
+
return LinkProductChildrenTagRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function LinkProductChildrenTagRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkProductChildrenTagRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'productChildIds': json['product_child_ids'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function LinkProductChildrenTagRequestToJSON(json: any): LinkProductChildrenTagRequest {
|
|
53
|
+
return LinkProductChildrenTagRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function LinkProductChildrenTagRequestToJSONTyped(value?: LinkProductChildrenTagRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'product_child_ids': value['productChildIds'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -44,7 +44,7 @@ export interface ProductChildRelationResource {
|
|
|
44
44
|
* @type {string}
|
|
45
45
|
* @memberof ProductChildRelationResource
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
model: string;
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
50
|
* @type {number}
|
|
@@ -77,6 +77,7 @@ export interface ProductChildRelationResource {
|
|
|
77
77
|
export function instanceOfProductChildRelationResource(value: object): value is ProductChildRelationResource {
|
|
78
78
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
79
79
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
80
|
+
if (!('model' in value) || value['model'] === undefined) return false;
|
|
80
81
|
if (!('sku' in value) || value['sku'] === undefined) return false;
|
|
81
82
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
82
83
|
if (!('thumbnail' in value) || value['thumbnail'] === undefined) return false;
|
|
@@ -96,7 +97,7 @@ export function ProductChildRelationResourceFromJSONTyped(json: any, ignoreDiscr
|
|
|
96
97
|
|
|
97
98
|
'id': json['id'],
|
|
98
99
|
'name': json['name'],
|
|
99
|
-
'
|
|
100
|
+
'model': json['model'],
|
|
100
101
|
'sku': json['sku'],
|
|
101
102
|
'netsuiteId': json['netsuiteId'],
|
|
102
103
|
'thumbnail': AssetResourceFromJSON(json['thumbnail']),
|
|
@@ -117,7 +118,7 @@ export function ProductChildRelationResourceToJSONTyped(value?: ProductChildRela
|
|
|
117
118
|
|
|
118
119
|
'id': value['id'],
|
|
119
120
|
'name': value['name'],
|
|
120
|
-
'
|
|
121
|
+
'model': value['model'],
|
|
121
122
|
'sku': value['sku'],
|
|
122
123
|
'netsuiteId': value['netsuiteId'],
|
|
123
124
|
'thumbnail': AssetResourceToJSON(value['thumbnail']),
|