@digital8/lighting-illusions-ts-sdk 0.0.484 → 0.0.486
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 -4
- package/README.md +7 -6
- package/dist/apis/DocumentApi.d.ts +24 -1
- package/dist/apis/DocumentApi.js +96 -2
- package/dist/models/GetAllDocumentRequest.d.ts +26 -0
- package/dist/models/GetAllDocumentRequest.js +14 -1
- package/dist/models/GetAllProductChildRequest.d.ts +1 -0
- package/dist/models/GetAllProductChildRequest.js +2 -1
- package/dist/models/IndexDocumentRequest.d.ts +26 -0
- package/dist/models/IndexDocumentRequest.js +14 -1
- package/dist/models/IndexExternalApiLogRequest.d.ts +0 -6
- package/dist/models/IndexExternalApiLogRequest.js +0 -2
- package/dist/models/IndexProductChildRequest.d.ts +1 -0
- package/dist/models/IndexProductChildRequest.js +1 -0
- package/dist/models/ProductChildSiteDetailResource.d.ts +2 -8
- package/dist/models/ProductChildSiteDetailResource.js +4 -4
- package/dist/models/UpdateDocumentRequest.d.ts +44 -0
- package/dist/models/UpdateDocumentRequest.js +57 -0
- package/dist/models/index.d.ts +1 -2
- package/dist/models/index.js +1 -2
- package/docs/DocumentApi.md +137 -2
- package/docs/GetAllDocumentRequest.md +6 -0
- package/docs/IndexDocumentRequest.md +6 -0
- package/docs/IndexExternalApiLogRequest.md +0 -2
- package/docs/ProductChildSiteDetailResource.md +2 -4
- package/docs/{ProductRating.md → UpdateDocumentRequest.md} +10 -4
- package/package.json +1 -1
- package/src/apis/DocumentApi.ts +91 -2
- package/src/models/GetAllDocumentRequest.ts +33 -0
- package/src/models/GetAllProductChildRequest.ts +2 -1
- package/src/models/IndexDocumentRequest.ts +33 -0
- package/src/models/IndexExternalApiLogRequest.ts +0 -8
- package/src/models/IndexProductChildRequest.ts +1 -0
- package/src/models/ProductChildSiteDetailResource.ts +5 -12
- package/src/models/UpdateDocumentRequest.ts +83 -0
- package/src/models/index.ts +1 -2
- package/dist/models/ProductRating.d.ts +0 -26
- package/dist/models/ProductRating.js +0 -52
- package/dist/models/ProductSortBy.d.ts +0 -32
- package/dist/models/ProductSortBy.js +0 -58
- package/docs/ProductSortBy.md +0 -32
- package/src/models/ProductRating.ts +0 -54
- package/src/models/ProductSortBy.ts +0 -60
package/dist/models/index.d.ts
CHANGED
|
@@ -124,10 +124,8 @@ export * from './ProductListResource';
|
|
|
124
124
|
export * from './ProductListResourceArrayResponse';
|
|
125
125
|
export * from './ProductLiteResource';
|
|
126
126
|
export * from './ProductLiteResourceArrayResponse';
|
|
127
|
-
export * from './ProductRating';
|
|
128
127
|
export * from './ProductResource';
|
|
129
128
|
export * from './ProductResourceArrayResponse';
|
|
130
|
-
export * from './ProductSortBy';
|
|
131
129
|
export * from './ProductTypeListResource';
|
|
132
130
|
export * from './ProductTypeListResourceArrayResponse';
|
|
133
131
|
export * from './ProductTypeLiteResource';
|
|
@@ -185,6 +183,7 @@ export * from './TagResourceArrayResponse';
|
|
|
185
183
|
export * from './TagType';
|
|
186
184
|
export * from './UpdateAttributeRequest';
|
|
187
185
|
export * from './UpdateAttributeValueRequest';
|
|
186
|
+
export * from './UpdateDocumentRequest';
|
|
188
187
|
export * from './UpdateFilterOrderAttributeRequest';
|
|
189
188
|
export * from './UpdateFilterOrderAttributeRequestValuesInner';
|
|
190
189
|
export * from './UpdateModelAttributeRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -142,10 +142,8 @@ __exportStar(require("./ProductListResource"), exports);
|
|
|
142
142
|
__exportStar(require("./ProductListResourceArrayResponse"), exports);
|
|
143
143
|
__exportStar(require("./ProductLiteResource"), exports);
|
|
144
144
|
__exportStar(require("./ProductLiteResourceArrayResponse"), exports);
|
|
145
|
-
__exportStar(require("./ProductRating"), exports);
|
|
146
145
|
__exportStar(require("./ProductResource"), exports);
|
|
147
146
|
__exportStar(require("./ProductResourceArrayResponse"), exports);
|
|
148
|
-
__exportStar(require("./ProductSortBy"), exports);
|
|
149
147
|
__exportStar(require("./ProductTypeListResource"), exports);
|
|
150
148
|
__exportStar(require("./ProductTypeListResourceArrayResponse"), exports);
|
|
151
149
|
__exportStar(require("./ProductTypeLiteResource"), exports);
|
|
@@ -203,6 +201,7 @@ __exportStar(require("./TagResourceArrayResponse"), exports);
|
|
|
203
201
|
__exportStar(require("./TagType"), exports);
|
|
204
202
|
__exportStar(require("./UpdateAttributeRequest"), exports);
|
|
205
203
|
__exportStar(require("./UpdateAttributeValueRequest"), exports);
|
|
204
|
+
__exportStar(require("./UpdateDocumentRequest"), exports);
|
|
206
205
|
__exportStar(require("./UpdateFilterOrderAttributeRequest"), exports);
|
|
207
206
|
__exportStar(require("./UpdateFilterOrderAttributeRequestValuesInner"), exports);
|
|
208
207
|
__exportStar(require("./UpdateModelAttributeRequest"), exports);
|
package/docs/DocumentApi.md
CHANGED
|
@@ -5,12 +5,14 @@ All URIs are relative to *http://localhost/api*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**attachDocumentablesDocument**](DocumentApi.md#attachdocumentablesdocumentoperation) | **POST** /admin-api/document/{document}/attach-documentables | Auto-generated: attachDocumentablesDocument |
|
|
8
|
-
| [**destroyDocument**](DocumentApi.md#destroydocument) | **DELETE** /admin-api/document/{document} | Auto-generated: destroyDocument |
|
|
8
|
+
| [**destroyDocument**](DocumentApi.md#destroydocument) | **DELETE** /admin-api/document/{document}/delete | Auto-generated: destroyDocument |
|
|
9
9
|
| [**detachDocumentablesDocument**](DocumentApi.md#detachdocumentablesdocumentoperation) | **POST** /admin-api/document/{document}/detach-documentables | Auto-generated: detachDocumentablesDocument |
|
|
10
10
|
| [**getAllDocument**](DocumentApi.md#getalldocumentoperation) | **POST** /admin-api/document/all | Auto-generated: getAllDocument |
|
|
11
11
|
| [**indexDocument**](DocumentApi.md#indexdocumentoperation) | **POST** /admin-api/document/list | Auto-generated: indexDocument |
|
|
12
|
-
| [**
|
|
12
|
+
| [**showDocument**](DocumentApi.md#showdocument) | **GET** /admin-api/document/{document} | Auto-generated: showDocument |
|
|
13
|
+
| [**storeDocument**](DocumentApi.md#storedocumentoperation) | **POST** /admin-api/document/create | Auto-generated: storeDocument |
|
|
13
14
|
| [**storeDocumentFile**](DocumentApi.md#storedocumentfileoperation) | **POST** /admin-api/document/files | Auto-generated: storeDocumentFile |
|
|
15
|
+
| [**updateDocument**](DocumentApi.md#updatedocumentoperation) | **PUT** /admin-api/document/{document}/update | Auto-generated: updateDocument |
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
|
|
@@ -345,6 +347,71 @@ No authorization required
|
|
|
345
347
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
346
348
|
|
|
347
349
|
|
|
350
|
+
## showDocument
|
|
351
|
+
|
|
352
|
+
> DocumentResource showDocument(document)
|
|
353
|
+
|
|
354
|
+
Auto-generated: showDocument
|
|
355
|
+
|
|
356
|
+
### Example
|
|
357
|
+
|
|
358
|
+
```ts
|
|
359
|
+
import {
|
|
360
|
+
Configuration,
|
|
361
|
+
DocumentApi,
|
|
362
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
363
|
+
import type { ShowDocumentRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
364
|
+
|
|
365
|
+
async function example() {
|
|
366
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
367
|
+
const api = new DocumentApi();
|
|
368
|
+
|
|
369
|
+
const body = {
|
|
370
|
+
// number | The id of the document
|
|
371
|
+
document: 56,
|
|
372
|
+
} satisfies ShowDocumentRequest;
|
|
373
|
+
|
|
374
|
+
try {
|
|
375
|
+
const data = await api.showDocument(body);
|
|
376
|
+
console.log(data);
|
|
377
|
+
} catch (error) {
|
|
378
|
+
console.error(error);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// Run the test
|
|
383
|
+
example().catch(console.error);
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Parameters
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
| Name | Type | Description | Notes |
|
|
390
|
+
|------------- | ------------- | ------------- | -------------|
|
|
391
|
+
| **document** | `number` | The id of the document | [Defaults to `undefined`] |
|
|
392
|
+
|
|
393
|
+
### Return type
|
|
394
|
+
|
|
395
|
+
[**DocumentResource**](DocumentResource.md)
|
|
396
|
+
|
|
397
|
+
### Authorization
|
|
398
|
+
|
|
399
|
+
No authorization required
|
|
400
|
+
|
|
401
|
+
### HTTP request headers
|
|
402
|
+
|
|
403
|
+
- **Content-Type**: Not defined
|
|
404
|
+
- **Accept**: `application/json`
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
### HTTP response details
|
|
408
|
+
| Status code | Description | Response headers |
|
|
409
|
+
|-------------|-------------|------------------|
|
|
410
|
+
| **200** | Successful resource response | - |
|
|
411
|
+
|
|
412
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
413
|
+
|
|
414
|
+
|
|
348
415
|
## storeDocument
|
|
349
416
|
|
|
350
417
|
> DocumentResource storeDocument(storeDocumentRequest)
|
|
@@ -474,3 +541,71 @@ No authorization required
|
|
|
474
541
|
|
|
475
542
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
476
543
|
|
|
544
|
+
|
|
545
|
+
## updateDocument
|
|
546
|
+
|
|
547
|
+
> DocumentResource updateDocument(document, updateDocumentRequest)
|
|
548
|
+
|
|
549
|
+
Auto-generated: updateDocument
|
|
550
|
+
|
|
551
|
+
### Example
|
|
552
|
+
|
|
553
|
+
```ts
|
|
554
|
+
import {
|
|
555
|
+
Configuration,
|
|
556
|
+
DocumentApi,
|
|
557
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
558
|
+
import type { UpdateDocumentOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
559
|
+
|
|
560
|
+
async function example() {
|
|
561
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
562
|
+
const api = new DocumentApi();
|
|
563
|
+
|
|
564
|
+
const body = {
|
|
565
|
+
// number | The id of the document
|
|
566
|
+
document: 56,
|
|
567
|
+
// UpdateDocumentRequest (optional)
|
|
568
|
+
updateDocumentRequest: ...,
|
|
569
|
+
} satisfies UpdateDocumentOperationRequest;
|
|
570
|
+
|
|
571
|
+
try {
|
|
572
|
+
const data = await api.updateDocument(body);
|
|
573
|
+
console.log(data);
|
|
574
|
+
} catch (error) {
|
|
575
|
+
console.error(error);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
// Run the test
|
|
580
|
+
example().catch(console.error);
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### Parameters
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
| Name | Type | Description | Notes |
|
|
587
|
+
|------------- | ------------- | ------------- | -------------|
|
|
588
|
+
| **document** | `number` | The id of the document | [Defaults to `undefined`] |
|
|
589
|
+
| **updateDocumentRequest** | [UpdateDocumentRequest](UpdateDocumentRequest.md) | | [Optional] |
|
|
590
|
+
|
|
591
|
+
### Return type
|
|
592
|
+
|
|
593
|
+
[**DocumentResource**](DocumentResource.md)
|
|
594
|
+
|
|
595
|
+
### Authorization
|
|
596
|
+
|
|
597
|
+
No authorization required
|
|
598
|
+
|
|
599
|
+
### HTTP request headers
|
|
600
|
+
|
|
601
|
+
- **Content-Type**: `application/json`
|
|
602
|
+
- **Accept**: `application/json`
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
### HTTP response details
|
|
606
|
+
| Status code | Description | Response headers |
|
|
607
|
+
|-------------|-------------|------------------|
|
|
608
|
+
| **200** | Successful resource response | - |
|
|
609
|
+
|
|
610
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
611
|
+
|
|
@@ -9,6 +9,9 @@ Name | Type
|
|
|
9
9
|
`search` | string
|
|
10
10
|
`sortBy` | string
|
|
11
11
|
`sortDirection` | string
|
|
12
|
+
`relatedId` | number
|
|
13
|
+
`relatedType` | string
|
|
14
|
+
`includesRelations` | boolean
|
|
12
15
|
|
|
13
16
|
## Example
|
|
14
17
|
|
|
@@ -20,6 +23,9 @@ const example = {
|
|
|
20
23
|
"search": null,
|
|
21
24
|
"sortBy": null,
|
|
22
25
|
"sortDirection": null,
|
|
26
|
+
"relatedId": null,
|
|
27
|
+
"relatedType": null,
|
|
28
|
+
"includesRelations": null,
|
|
23
29
|
} satisfies GetAllDocumentRequest
|
|
24
30
|
|
|
25
31
|
console.log(example)
|
|
@@ -11,6 +11,9 @@ Name | Type
|
|
|
11
11
|
`sortDirection` | string
|
|
12
12
|
`perPage` | number
|
|
13
13
|
`page` | number
|
|
14
|
+
`relatedId` | number
|
|
15
|
+
`relatedType` | string
|
|
16
|
+
`includesRelations` | boolean
|
|
14
17
|
|
|
15
18
|
## Example
|
|
16
19
|
|
|
@@ -24,6 +27,9 @@ const example = {
|
|
|
24
27
|
"sortDirection": null,
|
|
25
28
|
"perPage": null,
|
|
26
29
|
"page": null,
|
|
30
|
+
"relatedId": null,
|
|
31
|
+
"relatedType": null,
|
|
32
|
+
"includesRelations": null,
|
|
27
33
|
} satisfies IndexDocumentRequest
|
|
28
34
|
|
|
29
35
|
console.log(example)
|
|
@@ -17,7 +17,6 @@ Name | Type
|
|
|
17
17
|
`externalApiLoggableType` | Array<string>
|
|
18
18
|
`externalApiLoggableId` | Array<string>
|
|
19
19
|
`siteId` | Array<string>
|
|
20
|
-
`productChildId` | Array<string>
|
|
21
20
|
`relatedId` | number
|
|
22
21
|
`relatedType` | string
|
|
23
22
|
`includesRelations` | boolean
|
|
@@ -40,7 +39,6 @@ const example = {
|
|
|
40
39
|
"externalApiLoggableType": null,
|
|
41
40
|
"externalApiLoggableId": null,
|
|
42
41
|
"siteId": null,
|
|
43
|
-
"productChildId": null,
|
|
44
42
|
"relatedId": null,
|
|
45
43
|
"relatedType": null,
|
|
46
44
|
"includesRelations": null,
|
|
@@ -16,8 +16,7 @@ Name | Type
|
|
|
16
16
|
`salePrice` | number
|
|
17
17
|
`isDisabled` | boolean
|
|
18
18
|
`seo` | [SEOResource](SEOResource.md)
|
|
19
|
-
`
|
|
20
|
-
`omnisendSyncStatus` | string
|
|
19
|
+
`documents` | object
|
|
21
20
|
|
|
22
21
|
## Example
|
|
23
22
|
|
|
@@ -36,8 +35,7 @@ const example = {
|
|
|
36
35
|
"salePrice": null,
|
|
37
36
|
"isDisabled": null,
|
|
38
37
|
"seo": null,
|
|
39
|
-
"
|
|
40
|
-
"omnisendSyncStatus": null,
|
|
38
|
+
"documents": null,
|
|
41
39
|
} satisfies ProductChildSiteDetailResource
|
|
42
40
|
|
|
43
41
|
console.log(example)
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# UpdateDocumentRequest
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`documentFileId` | string
|
|
11
|
+
`siteIds` | Array<string>
|
|
9
12
|
|
|
10
13
|
## Example
|
|
11
14
|
|
|
12
15
|
```typescript
|
|
13
|
-
import type {
|
|
16
|
+
import type { UpdateDocumentRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
14
17
|
|
|
15
18
|
// TODO: Update the object below with actual values
|
|
16
19
|
const example = {
|
|
17
|
-
|
|
20
|
+
"name": null,
|
|
21
|
+
"documentFileId": null,
|
|
22
|
+
"siteIds": null,
|
|
23
|
+
} satisfies UpdateDocumentRequest
|
|
18
24
|
|
|
19
25
|
console.log(example)
|
|
20
26
|
|
|
@@ -23,7 +29,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
23
29
|
console.log(exampleJSON)
|
|
24
30
|
|
|
25
31
|
// Parse the JSON string back to an object
|
|
26
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateDocumentRequest
|
|
27
33
|
console.log(exampleParsed)
|
|
28
34
|
```
|
|
29
35
|
|
package/package.json
CHANGED
package/src/apis/DocumentApi.ts
CHANGED
|
@@ -26,6 +26,7 @@ import type {
|
|
|
26
26
|
PaginatedDocumentResourceResponse,
|
|
27
27
|
StoreDocumentFileRequest,
|
|
28
28
|
StoreDocumentRequest,
|
|
29
|
+
UpdateDocumentRequest,
|
|
29
30
|
} from '../models/index';
|
|
30
31
|
import {
|
|
31
32
|
AttachDocumentablesDocumentRequestFromJSON,
|
|
@@ -50,6 +51,8 @@ import {
|
|
|
50
51
|
StoreDocumentFileRequestToJSON,
|
|
51
52
|
StoreDocumentRequestFromJSON,
|
|
52
53
|
StoreDocumentRequestToJSON,
|
|
54
|
+
UpdateDocumentRequestFromJSON,
|
|
55
|
+
UpdateDocumentRequestToJSON,
|
|
53
56
|
} from '../models/index';
|
|
54
57
|
|
|
55
58
|
export interface AttachDocumentablesDocumentOperationRequest {
|
|
@@ -74,6 +77,10 @@ export interface IndexDocumentOperationRequest {
|
|
|
74
77
|
indexDocumentRequest?: IndexDocumentRequest;
|
|
75
78
|
}
|
|
76
79
|
|
|
80
|
+
export interface ShowDocumentRequest {
|
|
81
|
+
document: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
77
84
|
export interface StoreDocumentOperationRequest {
|
|
78
85
|
storeDocumentRequest?: StoreDocumentRequest;
|
|
79
86
|
}
|
|
@@ -82,6 +89,11 @@ export interface StoreDocumentFileOperationRequest {
|
|
|
82
89
|
storeDocumentFileRequest?: StoreDocumentFileRequest;
|
|
83
90
|
}
|
|
84
91
|
|
|
92
|
+
export interface UpdateDocumentOperationRequest {
|
|
93
|
+
document: number;
|
|
94
|
+
updateDocumentRequest?: UpdateDocumentRequest;
|
|
95
|
+
}
|
|
96
|
+
|
|
85
97
|
/**
|
|
86
98
|
*
|
|
87
99
|
*/
|
|
@@ -143,7 +155,7 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
143
155
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
144
156
|
|
|
145
157
|
|
|
146
|
-
let urlPath = `/admin-api/document/{document}`;
|
|
158
|
+
let urlPath = `/admin-api/document/{document}/delete`;
|
|
147
159
|
urlPath = urlPath.replace(`{${"document"}}`, encodeURIComponent(String(requestParameters['document'])));
|
|
148
160
|
|
|
149
161
|
const response = await this.request({
|
|
@@ -268,6 +280,43 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
268
280
|
return await response.value();
|
|
269
281
|
}
|
|
270
282
|
|
|
283
|
+
/**
|
|
284
|
+
* Auto-generated: showDocument
|
|
285
|
+
*/
|
|
286
|
+
async showDocumentRaw(requestParameters: ShowDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResource>> {
|
|
287
|
+
if (requestParameters['document'] == null) {
|
|
288
|
+
throw new runtime.RequiredError(
|
|
289
|
+
'document',
|
|
290
|
+
'Required parameter "document" was null or undefined when calling showDocument().'
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const queryParameters: any = {};
|
|
295
|
+
|
|
296
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
let urlPath = `/admin-api/document/{document}`;
|
|
300
|
+
urlPath = urlPath.replace(`{${"document"}}`, encodeURIComponent(String(requestParameters['document'])));
|
|
301
|
+
|
|
302
|
+
const response = await this.request({
|
|
303
|
+
path: urlPath,
|
|
304
|
+
method: 'GET',
|
|
305
|
+
headers: headerParameters,
|
|
306
|
+
query: queryParameters,
|
|
307
|
+
}, initOverrides);
|
|
308
|
+
|
|
309
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentResourceFromJSON(jsonValue));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Auto-generated: showDocument
|
|
314
|
+
*/
|
|
315
|
+
async showDocument(requestParameters: ShowDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResource> {
|
|
316
|
+
const response = await this.showDocumentRaw(requestParameters, initOverrides);
|
|
317
|
+
return await response.value();
|
|
318
|
+
}
|
|
319
|
+
|
|
271
320
|
/**
|
|
272
321
|
* Auto-generated: storeDocument
|
|
273
322
|
*/
|
|
@@ -279,7 +328,7 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
279
328
|
headerParameters['Content-Type'] = 'application/json';
|
|
280
329
|
|
|
281
330
|
|
|
282
|
-
let urlPath = `/admin-api/document`;
|
|
331
|
+
let urlPath = `/admin-api/document/create`;
|
|
283
332
|
|
|
284
333
|
const response = await this.request({
|
|
285
334
|
path: urlPath,
|
|
@@ -332,4 +381,44 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
332
381
|
return await response.value();
|
|
333
382
|
}
|
|
334
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Auto-generated: updateDocument
|
|
386
|
+
*/
|
|
387
|
+
async updateDocumentRaw(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResource>> {
|
|
388
|
+
if (requestParameters['document'] == null) {
|
|
389
|
+
throw new runtime.RequiredError(
|
|
390
|
+
'document',
|
|
391
|
+
'Required parameter "document" was null or undefined when calling updateDocument().'
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const queryParameters: any = {};
|
|
396
|
+
|
|
397
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
398
|
+
|
|
399
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
let urlPath = `/admin-api/document/{document}/update`;
|
|
403
|
+
urlPath = urlPath.replace(`{${"document"}}`, encodeURIComponent(String(requestParameters['document'])));
|
|
404
|
+
|
|
405
|
+
const response = await this.request({
|
|
406
|
+
path: urlPath,
|
|
407
|
+
method: 'PUT',
|
|
408
|
+
headers: headerParameters,
|
|
409
|
+
query: queryParameters,
|
|
410
|
+
body: UpdateDocumentRequestToJSON(requestParameters['updateDocumentRequest']),
|
|
411
|
+
}, initOverrides);
|
|
412
|
+
|
|
413
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentResourceFromJSON(jsonValue));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Auto-generated: updateDocument
|
|
418
|
+
*/
|
|
419
|
+
async updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResource> {
|
|
420
|
+
const response = await this.updateDocumentRaw(requestParameters, initOverrides);
|
|
421
|
+
return await response.value();
|
|
422
|
+
}
|
|
423
|
+
|
|
335
424
|
}
|
|
@@ -37,6 +37,24 @@ export interface GetAllDocumentRequest {
|
|
|
37
37
|
* @memberof GetAllDocumentRequest
|
|
38
38
|
*/
|
|
39
39
|
sortDirection?: GetAllDocumentRequestSortDirectionEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof GetAllDocumentRequest
|
|
44
|
+
*/
|
|
45
|
+
relatedId?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof GetAllDocumentRequest
|
|
50
|
+
*/
|
|
51
|
+
relatedType?: GetAllDocumentRequestRelatedTypeEnum;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof GetAllDocumentRequest
|
|
56
|
+
*/
|
|
57
|
+
includesRelations?: boolean;
|
|
40
58
|
}
|
|
41
59
|
|
|
42
60
|
|
|
@@ -60,6 +78,15 @@ export const GetAllDocumentRequestSortDirectionEnum = {
|
|
|
60
78
|
} as const;
|
|
61
79
|
export type GetAllDocumentRequestSortDirectionEnum = typeof GetAllDocumentRequestSortDirectionEnum[keyof typeof GetAllDocumentRequestSortDirectionEnum];
|
|
62
80
|
|
|
81
|
+
/**
|
|
82
|
+
* @export
|
|
83
|
+
*/
|
|
84
|
+
export const GetAllDocumentRequestRelatedTypeEnum = {
|
|
85
|
+
ProductChild: 'productChild',
|
|
86
|
+
ProductRangeSite: 'productRangeSite'
|
|
87
|
+
} as const;
|
|
88
|
+
export type GetAllDocumentRequestRelatedTypeEnum = typeof GetAllDocumentRequestRelatedTypeEnum[keyof typeof GetAllDocumentRequestRelatedTypeEnum];
|
|
89
|
+
|
|
63
90
|
|
|
64
91
|
/**
|
|
65
92
|
* Check if a given object implements the GetAllDocumentRequest interface.
|
|
@@ -81,6 +108,9 @@ export function GetAllDocumentRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
81
108
|
'search': json['search'] == null ? undefined : json['search'],
|
|
82
109
|
'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
|
|
83
110
|
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
111
|
+
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
112
|
+
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
113
|
+
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
84
114
|
};
|
|
85
115
|
}
|
|
86
116
|
|
|
@@ -98,6 +128,9 @@ export function GetAllDocumentRequestToJSONTyped(value?: GetAllDocumentRequest |
|
|
|
98
128
|
'search': value['search'],
|
|
99
129
|
'sortBy': value['sortBy'],
|
|
100
130
|
'sortDirection': value['sortDirection'],
|
|
131
|
+
'related_id': value['relatedId'],
|
|
132
|
+
'related_type': value['relatedType'],
|
|
133
|
+
'includes_relations': value['includesRelations'],
|
|
101
134
|
};
|
|
102
135
|
}
|
|
103
136
|
|
|
@@ -123,7 +123,8 @@ export type GetAllProductChildRequestSortDirectionEnum = typeof GetAllProductChi
|
|
|
123
123
|
export const GetAllProductChildRequestRelatedTypeEnum = {
|
|
124
124
|
OverlayTemplate: 'overlayTemplate',
|
|
125
125
|
Supplier: 'supplier',
|
|
126
|
-
Tag: 'tag'
|
|
126
|
+
Tag: 'tag',
|
|
127
|
+
Document: 'document'
|
|
127
128
|
} as const;
|
|
128
129
|
export type GetAllProductChildRequestRelatedTypeEnum = typeof GetAllProductChildRequestRelatedTypeEnum[keyof typeof GetAllProductChildRequestRelatedTypeEnum];
|
|
129
130
|
|
|
@@ -49,6 +49,24 @@ export interface IndexDocumentRequest {
|
|
|
49
49
|
* @memberof IndexDocumentRequest
|
|
50
50
|
*/
|
|
51
51
|
page?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof IndexDocumentRequest
|
|
56
|
+
*/
|
|
57
|
+
relatedId?: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof IndexDocumentRequest
|
|
62
|
+
*/
|
|
63
|
+
relatedType?: IndexDocumentRequestRelatedTypeEnum;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
* @memberof IndexDocumentRequest
|
|
68
|
+
*/
|
|
69
|
+
includesRelations?: boolean;
|
|
52
70
|
}
|
|
53
71
|
|
|
54
72
|
|
|
@@ -72,6 +90,15 @@ export const IndexDocumentRequestSortDirectionEnum = {
|
|
|
72
90
|
} as const;
|
|
73
91
|
export type IndexDocumentRequestSortDirectionEnum = typeof IndexDocumentRequestSortDirectionEnum[keyof typeof IndexDocumentRequestSortDirectionEnum];
|
|
74
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const IndexDocumentRequestRelatedTypeEnum = {
|
|
97
|
+
ProductChild: 'productChild',
|
|
98
|
+
ProductRangeSite: 'productRangeSite'
|
|
99
|
+
} as const;
|
|
100
|
+
export type IndexDocumentRequestRelatedTypeEnum = typeof IndexDocumentRequestRelatedTypeEnum[keyof typeof IndexDocumentRequestRelatedTypeEnum];
|
|
101
|
+
|
|
75
102
|
|
|
76
103
|
/**
|
|
77
104
|
* Check if a given object implements the IndexDocumentRequest interface.
|
|
@@ -95,6 +122,9 @@ export function IndexDocumentRequestFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
95
122
|
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
96
123
|
'perPage': json['per_page'] == null ? undefined : json['per_page'],
|
|
97
124
|
'page': json['page'] == null ? undefined : json['page'],
|
|
125
|
+
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
126
|
+
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
127
|
+
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
98
128
|
};
|
|
99
129
|
}
|
|
100
130
|
|
|
@@ -114,6 +144,9 @@ export function IndexDocumentRequestToJSONTyped(value?: IndexDocumentRequest | n
|
|
|
114
144
|
'sortDirection': value['sortDirection'],
|
|
115
145
|
'per_page': value['perPage'],
|
|
116
146
|
'page': value['page'],
|
|
147
|
+
'related_id': value['relatedId'],
|
|
148
|
+
'related_type': value['relatedType'],
|
|
149
|
+
'includes_relations': value['includesRelations'],
|
|
117
150
|
};
|
|
118
151
|
}
|
|
119
152
|
|
|
@@ -85,12 +85,6 @@ export interface IndexExternalApiLogRequest {
|
|
|
85
85
|
* @memberof IndexExternalApiLogRequest
|
|
86
86
|
*/
|
|
87
87
|
siteId?: Array<string>;
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @type {Array<string>}
|
|
91
|
-
* @memberof IndexExternalApiLogRequest
|
|
92
|
-
*/
|
|
93
|
-
productChildId?: Array<string>;
|
|
94
88
|
/**
|
|
95
89
|
*
|
|
96
90
|
* @type {number}
|
|
@@ -164,7 +158,6 @@ export function IndexExternalApiLogRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
164
158
|
'externalApiLoggableType': json['external_api_loggable_type'] == null ? undefined : json['external_api_loggable_type'],
|
|
165
159
|
'externalApiLoggableId': json['external_api_loggable_id'] == null ? undefined : json['external_api_loggable_id'],
|
|
166
160
|
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
167
|
-
'productChildId': json['product_child_id'] == null ? undefined : json['product_child_id'],
|
|
168
161
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
169
162
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
170
163
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
@@ -193,7 +186,6 @@ export function IndexExternalApiLogRequestToJSONTyped(value?: IndexExternalApiLo
|
|
|
193
186
|
'external_api_loggable_type': value['externalApiLoggableType'],
|
|
194
187
|
'external_api_loggable_id': value['externalApiLoggableId'],
|
|
195
188
|
'site_id': value['siteId'],
|
|
196
|
-
'product_child_id': value['productChildId'],
|
|
197
189
|
'related_id': value['relatedId'],
|
|
198
190
|
'related_type': value['relatedType'],
|
|
199
191
|
'includes_relations': value['includesRelations'],
|