@product-live/api-sdk 2.13.0 → 2.20.0
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 +74 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/ItemApi.md +125 -0
- package/apis/ItemApi.ts +197 -0
- package/dist/apis/DataFactoryFileApi.d.ts +15 -15
- package/dist/apis/DataFactoryFileApi.js +358 -358
- package/dist/apis/DefaultApi.d.ts +11 -11
- package/dist/apis/DefaultApi.js +171 -171
- package/dist/apis/ItemApi.d.ts +13 -0
- package/dist/apis/ItemApi.js +249 -0
- package/dist/apis/ItemApi.js.map +1 -0
- package/dist/apis/JobApi.d.ts +21 -21
- package/dist/apis/JobApi.js +546 -546
- package/dist/apis/JobExecutionApi.d.ts +16 -16
- package/dist/apis/JobExecutionApi.js +338 -338
- package/dist/apis/TaskApi.d.ts +24 -24
- package/dist/apis/TaskApi.js +608 -608
- package/dist/apis/TaskExecutionApi.d.ts +13 -13
- package/dist/apis/TaskExecutionApi.js +258 -258
- package/dist/apis/VariableApi.d.ts +22 -22
- package/dist/apis/VariableApi.js +528 -528
- package/dist/apis/baseapi.d.ts +18 -18
- package/dist/apis/baseapi.js +45 -45
- package/dist/apis/exception.d.ts +10 -10
- package/dist/apis/exception.js +31 -31
- package/dist/auth/auth.d.ts +42 -42
- package/dist/auth/auth.js +44 -44
- package/dist/configuration.d.ts +18 -18
- package/dist/configuration.js +21 -21
- package/dist/http/http.d.ts +82 -82
- package/dist/http/http.js +228 -228
- package/dist/http/isomorphic-fetch.d.ts +5 -5
- package/dist/http/isomorphic-fetch.js +33 -33
- package/dist/index.d.ts +10 -10
- package/dist/index.js +35 -34
- package/dist/index.js.map +1 -1
- package/dist/middleware.d.ts +16 -16
- package/dist/middleware.js +17 -17
- package/dist/models/CreateJobDto.d.ts +30 -30
- package/dist/models/CreateJobDto.js +81 -81
- package/dist/models/CreateJobExecutionDto.d.ts +21 -21
- package/dist/models/CreateJobExecutionDto.js +33 -33
- package/dist/models/CreateTaskDto.d.ts +21 -21
- package/dist/models/CreateTaskDto.js +45 -45
- package/dist/models/CreateVariableDto.d.ts +22 -22
- package/dist/models/CreateVariableDto.js +45 -45
- package/dist/models/FileDto.d.ts +23 -23
- package/dist/models/FileDto.js +51 -51
- package/dist/models/FindVariablesRequest.d.ts +23 -24
- package/dist/models/FindVariablesRequest.js +45 -45
- package/dist/models/FindVariablesRequest.js.map +1 -1
- package/dist/models/GetFiles200Response.d.ts +21 -21
- package/dist/models/GetFiles200Response.js +33 -33
- package/dist/models/GetItems200Response.d.ts +21 -0
- package/dist/models/GetItems200Response.js +34 -0
- package/dist/models/GetItems200Response.js.map +1 -0
- package/dist/models/GetJobExecutionById400Response.d.ts +17 -17
- package/dist/models/GetJobExecutionById400Response.js +21 -21
- package/dist/models/GetJobExecutions200Response.d.ts +21 -21
- package/dist/models/GetJobExecutions200Response.js +33 -33
- package/dist/models/GetJobs200Response.d.ts +21 -21
- package/dist/models/GetJobs200Response.js +33 -33
- package/dist/models/GetTasks200Response.d.ts +21 -21
- package/dist/models/GetTasks200Response.js +33 -33
- package/dist/models/GetVariables200Response.d.ts +21 -21
- package/dist/models/GetVariables200Response.js +33 -33
- package/dist/models/HighOrderQuery.d.ts +19 -20
- package/dist/models/HighOrderQuery.js +27 -27
- package/dist/models/HighOrderQuery.js.map +1 -1
- package/dist/models/ItemDto.d.ts +28 -0
- package/dist/models/ItemDto.js +64 -0
- package/dist/models/ItemDto.js.map +1 -0
- package/dist/models/{Query.d.ts → ItemFieldDTO.d.ts} +19 -18
- package/dist/models/ItemFieldDTO.js +34 -0
- package/dist/models/ItemFieldDTO.js.map +1 -0
- package/dist/models/ItemFieldFile.d.ts +18 -0
- package/dist/models/ItemFieldFile.js +22 -0
- package/dist/models/ItemFieldFile.js.map +1 -0
- package/dist/models/ItemFieldFileData.d.ts +18 -0
- package/dist/models/ItemFieldFileData.js +28 -0
- package/dist/models/ItemFieldFileData.js.map +1 -0
- package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.d.ts +18 -0
- package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.js +22 -0
- package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.js.map +1 -0
- package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.d.ts +19 -0
- package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.js +34 -0
- package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.js.map +1 -0
- package/dist/models/ItemFieldSimpleNumber.d.ts +18 -0
- package/dist/models/ItemFieldSimpleNumber.js +28 -0
- package/dist/models/ItemFieldSimpleNumber.js.map +1 -0
- package/dist/models/ItemFieldSimpleString.d.ts +17 -0
- package/dist/models/ItemFieldSimpleString.js +22 -0
- package/dist/models/ItemFieldSimpleString.js.map +1 -0
- package/dist/models/ItemFieldSimpleStringArray.d.ts +17 -0
- package/dist/models/ItemFieldSimpleStringArray.js +22 -0
- package/dist/models/ItemFieldSimpleStringArray.js.map +1 -0
- package/dist/models/ItemMetadataDTO.d.ts +23 -0
- package/dist/models/ItemMetadataDTO.js +58 -0
- package/dist/models/ItemMetadataDTO.js.map +1 -0
- package/dist/models/JobDto.d.ts +35 -35
- package/dist/models/JobDto.js +105 -105
- package/dist/models/JobExecutionDto.d.ts +33 -33
- package/dist/models/JobExecutionDto.js +87 -87
- package/dist/models/LowOrderQuery.d.ts +22 -22
- package/dist/models/LowOrderQuery.js +39 -39
- package/dist/models/LowOrderQueryValue.d.ts +16 -16
- package/dist/models/LowOrderQueryValue.js +14 -14
- package/dist/models/ObjectSerializer.d.ts +45 -34
- package/dist/models/ObjectSerializer.js +346 -312
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/PatchTaskExecutionDto.d.ts +22 -22
- package/dist/models/PatchTaskExecutionDto.js +33 -33
- package/dist/models/Query1.d.ts +23 -0
- package/dist/models/Query1.js +46 -0
- package/dist/models/Query1.js.map +1 -0
- package/dist/models/TaskDto.d.ts +26 -26
- package/dist/models/TaskDto.js +69 -69
- package/dist/models/TaskExecutionDto.d.ts +30 -30
- package/dist/models/TaskExecutionDto.js +63 -63
- package/dist/models/UpdateJobDto.d.ts +31 -31
- package/dist/models/UpdateJobDto.js +87 -87
- package/dist/models/UpdateTaskDto.d.ts +22 -22
- package/dist/models/UpdateTaskDto.js +51 -51
- package/dist/models/UpdateVariableDto.d.ts +23 -23
- package/dist/models/UpdateVariableDto.js +51 -51
- package/dist/models/VariableDto.d.ts +27 -27
- package/dist/models/VariableDto.js +69 -69
- package/dist/models/all.d.ts +36 -25
- package/dist/models/all.js +52 -41
- package/dist/models/all.js.map +1 -1
- package/dist/rxjsStub.d.ts +10 -10
- package/dist/rxjsStub.js +32 -32
- package/dist/servers.d.ts +17 -17
- package/dist/servers.js +31 -31
- package/dist/types/ObjectParamAPI.d.ts +187 -171
- package/dist/types/ObjectParamAPI.js +159 -144
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +109 -98
- package/dist/types/ObservableAPI.js +757 -699
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +92 -83
- package/dist/types/PromiseAPI.js +179 -163
- package/dist/types/PromiseAPI.js.map +1 -1
- package/dist/util.d.ts +2 -2
- package/dist/util.js +28 -28
- package/index.ts +1 -1
- package/models/CreateJobDto.ts +1 -1
- package/models/CreateJobExecutionDto.ts +1 -1
- package/models/CreateTaskDto.ts +1 -1
- package/models/CreateVariableDto.ts +1 -1
- package/models/FileDto.ts +1 -1
- package/models/FindVariablesRequest.ts +10 -12
- package/models/GetFiles200Response.ts +1 -1
- package/models/GetItems200Response.ts +53 -0
- package/models/GetJobExecutionById400Response.ts +1 -1
- package/models/GetJobExecutions200Response.ts +1 -1
- package/models/GetJobs200Response.ts +1 -1
- package/models/GetTasks200Response.ts +1 -1
- package/models/GetVariables200Response.ts +1 -1
- package/models/HighOrderQuery.ts +3 -4
- package/models/ItemDto.ts +86 -0
- package/models/ItemFieldDTO.ts +49 -0
- package/models/{Query.ts → ItemFieldFile.ts} +8 -10
- package/models/ItemFieldFileData.ts +42 -0
- package/models/ItemFieldMultipleSelectWithCommentAndQuantity.ts +36 -0
- package/models/ItemFieldMultipleSelectWithCommentAndQuantityData.ts +49 -0
- package/models/ItemFieldSimpleNumber.ts +42 -0
- package/models/ItemFieldSimpleString.ts +35 -0
- package/models/ItemFieldSimpleStringArray.ts +35 -0
- package/models/ItemMetadataDTO.ts +77 -0
- package/models/JobDto.ts +1 -1
- package/models/JobExecutionDto.ts +1 -1
- package/models/LowOrderQuery.ts +2 -2
- package/models/LowOrderQueryValue.ts +1 -1
- package/models/ObjectSerializer.ts +39 -5
- package/models/PatchTaskExecutionDto.ts +1 -1
- package/models/Query1.ts +69 -0
- package/models/TaskDto.ts +1 -1
- package/models/TaskExecutionDto.ts +1 -1
- package/models/UpdateJobDto.ts +1 -1
- package/models/UpdateTaskDto.ts +1 -1
- package/models/UpdateVariableDto.ts +1 -1
- package/models/VariableDto.ts +1 -1
- package/models/all.ts +12 -1
- package/package.json +2 -2
- package/tsconfig.json +28 -0
- package/types/ObjectParamAPI.ts +64 -1
- package/types/ObservableAPI.ts +77 -1
- package/types/PromiseAPI.ts +50 -1
- package/dist/models/Query.js +0 -22
- package/dist/models/Query.js.map +0 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.openapi-generator-ignore
|
|
3
|
+
DataFactoryFileApi.md
|
|
4
|
+
DefaultApi.md
|
|
5
|
+
ItemApi.md
|
|
6
|
+
JobApi.md
|
|
7
|
+
JobExecutionApi.md
|
|
8
|
+
README.md
|
|
9
|
+
TaskApi.md
|
|
10
|
+
TaskExecutionApi.md
|
|
11
|
+
VariableApi.md
|
|
12
|
+
apis/DataFactoryFileApi.ts
|
|
13
|
+
apis/DefaultApi.ts
|
|
14
|
+
apis/ItemApi.ts
|
|
15
|
+
apis/JobApi.ts
|
|
16
|
+
apis/JobExecutionApi.ts
|
|
17
|
+
apis/TaskApi.ts
|
|
18
|
+
apis/TaskExecutionApi.ts
|
|
19
|
+
apis/VariableApi.ts
|
|
20
|
+
apis/baseapi.ts
|
|
21
|
+
apis/exception.ts
|
|
22
|
+
auth/auth.ts
|
|
23
|
+
configuration.ts
|
|
24
|
+
git_push.sh
|
|
25
|
+
http/http.ts
|
|
26
|
+
http/isomorphic-fetch.ts
|
|
27
|
+
index.ts
|
|
28
|
+
middleware.ts
|
|
29
|
+
models/CreateJobDto.ts
|
|
30
|
+
models/CreateJobExecutionDto.ts
|
|
31
|
+
models/CreateTaskDto.ts
|
|
32
|
+
models/CreateVariableDto.ts
|
|
33
|
+
models/FileDto.ts
|
|
34
|
+
models/FindVariablesRequest.ts
|
|
35
|
+
models/GetFiles200Response.ts
|
|
36
|
+
models/GetItems200Response.ts
|
|
37
|
+
models/GetJobExecutionById400Response.ts
|
|
38
|
+
models/GetJobExecutions200Response.ts
|
|
39
|
+
models/GetJobs200Response.ts
|
|
40
|
+
models/GetTasks200Response.ts
|
|
41
|
+
models/GetVariables200Response.ts
|
|
42
|
+
models/HighOrderQuery.ts
|
|
43
|
+
models/ItemDto.ts
|
|
44
|
+
models/ItemFieldDTO.ts
|
|
45
|
+
models/ItemFieldFile.ts
|
|
46
|
+
models/ItemFieldFileData.ts
|
|
47
|
+
models/ItemFieldMultipleSelectWithCommentAndQuantity.ts
|
|
48
|
+
models/ItemFieldMultipleSelectWithCommentAndQuantityData.ts
|
|
49
|
+
models/ItemFieldSimpleNumber.ts
|
|
50
|
+
models/ItemFieldSimpleString.ts
|
|
51
|
+
models/ItemFieldSimpleStringArray.ts
|
|
52
|
+
models/ItemMetadataDTO.ts
|
|
53
|
+
models/JobDto.ts
|
|
54
|
+
models/JobExecutionDto.ts
|
|
55
|
+
models/LowOrderQuery.ts
|
|
56
|
+
models/LowOrderQueryValue.ts
|
|
57
|
+
models/ObjectSerializer.ts
|
|
58
|
+
models/PatchTaskExecutionDto.ts
|
|
59
|
+
models/Query1.ts
|
|
60
|
+
models/TaskDto.ts
|
|
61
|
+
models/TaskExecutionDto.ts
|
|
62
|
+
models/UpdateJobDto.ts
|
|
63
|
+
models/UpdateTaskDto.ts
|
|
64
|
+
models/UpdateVariableDto.ts
|
|
65
|
+
models/VariableDto.ts
|
|
66
|
+
models/all.ts
|
|
67
|
+
package.json
|
|
68
|
+
rxjsStub.ts
|
|
69
|
+
servers.ts
|
|
70
|
+
tsconfig.json
|
|
71
|
+
types/ObjectParamAPI.ts
|
|
72
|
+
types/ObservableAPI.ts
|
|
73
|
+
types/PromiseAPI.ts
|
|
74
|
+
util.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6.6.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/ItemApi.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# .ItemApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**getItemById**](ItemApi.md#getItemById) | **GET** /v1/items/{id} | (Experimental) - Get a Item by id
|
|
8
|
+
[**getItems**](ItemApi.md#getItems) | **GET** /v1/items | (Experimental) - Get a list of Item
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# **getItemById**
|
|
12
|
+
> ItemDto getItemById()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { } from '';
|
|
20
|
+
import * as fs from 'fs';
|
|
21
|
+
|
|
22
|
+
const configuration = .createConfiguration();
|
|
23
|
+
const apiInstance = new .ItemApi(configuration);
|
|
24
|
+
|
|
25
|
+
let body:.ItemApiGetItemByIdRequest = {
|
|
26
|
+
// string
|
|
27
|
+
id: "id_example",
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
apiInstance.getItemById(body).then((data:any) => {
|
|
31
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
32
|
+
}).catch((error:any) => console.error(error));
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Parameters
|
|
37
|
+
|
|
38
|
+
Name | Type | Description | Notes
|
|
39
|
+
------------- | ------------- | ------------- | -------------
|
|
40
|
+
**id** | [**string**] | | defaults to undefined
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Return type
|
|
44
|
+
|
|
45
|
+
**ItemDto**
|
|
46
|
+
|
|
47
|
+
### Authorization
|
|
48
|
+
|
|
49
|
+
[ApiKeyAuthQuery](README.md#ApiKeyAuthQuery), [ApiKeyAuthHeader](README.md#ApiKeyAuthHeader)
|
|
50
|
+
|
|
51
|
+
### HTTP request headers
|
|
52
|
+
|
|
53
|
+
- **Content-Type**: Not defined
|
|
54
|
+
- **Accept**: application/json
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### HTTP response details
|
|
58
|
+
| Status code | Description | Response headers |
|
|
59
|
+
|-------------|-------------|------------------|
|
|
60
|
+
**200** | Item with request id successfully retrieved | - |
|
|
61
|
+
**400** | Bad Request - Malformed syntax | - |
|
|
62
|
+
**401** | Unauthorized | - |
|
|
63
|
+
**404** | Not found | - |
|
|
64
|
+
|
|
65
|
+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
66
|
+
|
|
67
|
+
# **getItems**
|
|
68
|
+
> GetItems200Response getItems()
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Example
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { } from '';
|
|
76
|
+
import * as fs from 'fs';
|
|
77
|
+
|
|
78
|
+
const configuration = .createConfiguration();
|
|
79
|
+
const apiInstance = new .ItemApi(configuration);
|
|
80
|
+
|
|
81
|
+
let body:.ItemApiGetItemsRequest = {
|
|
82
|
+
// number (optional)
|
|
83
|
+
size: 10,
|
|
84
|
+
// number (optional)
|
|
85
|
+
page: 0,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
apiInstance.getItems(body).then((data:any) => {
|
|
89
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
90
|
+
}).catch((error:any) => console.error(error));
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Parameters
|
|
95
|
+
|
|
96
|
+
Name | Type | Description | Notes
|
|
97
|
+
------------- | ------------- | ------------- | -------------
|
|
98
|
+
**size** | [**number**] | | (optional) defaults to 10
|
|
99
|
+
**page** | [**number**] | | (optional) defaults to 0
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
### Return type
|
|
103
|
+
|
|
104
|
+
**GetItems200Response**
|
|
105
|
+
|
|
106
|
+
### Authorization
|
|
107
|
+
|
|
108
|
+
[ApiKeyAuthQuery](README.md#ApiKeyAuthQuery), [ApiKeyAuthHeader](README.md#ApiKeyAuthHeader)
|
|
109
|
+
|
|
110
|
+
### HTTP request headers
|
|
111
|
+
|
|
112
|
+
- **Content-Type**: Not defined
|
|
113
|
+
- **Accept**: application/json
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
### HTTP response details
|
|
117
|
+
| Status code | Description | Response headers |
|
|
118
|
+
|-------------|-------------|------------------|
|
|
119
|
+
**200** | Get a list of Item | - |
|
|
120
|
+
**400** | Bad Request - Malformed syntax | - |
|
|
121
|
+
**401** | Unauthorized | - |
|
|
122
|
+
|
|
123
|
+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
124
|
+
|
|
125
|
+
|
package/apis/ItemApi.ts
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// TODO: better import syntax?
|
|
2
|
+
import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi';
|
|
3
|
+
import {Configuration} from '../configuration';
|
|
4
|
+
import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http';
|
|
5
|
+
import * as FormData from "form-data";
|
|
6
|
+
import { URLSearchParams } from 'url';
|
|
7
|
+
import {ObjectSerializer} from '../models/ObjectSerializer';
|
|
8
|
+
import {ApiException} from './exception';
|
|
9
|
+
import {canConsumeForm, isCodeInRange} from '../util';
|
|
10
|
+
import {SecurityAuthentication} from '../auth/auth';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import { GetItems200Response } from '../models/GetItems200Response';
|
|
14
|
+
import { GetJobExecutionById400Response } from '../models/GetJobExecutionById400Response';
|
|
15
|
+
import { ItemDto } from '../models/ItemDto';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* no description
|
|
19
|
+
*/
|
|
20
|
+
export class ItemApiRequestFactory extends BaseAPIRequestFactory {
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* (Experimental) - Get a Item by id
|
|
24
|
+
* @param id
|
|
25
|
+
*/
|
|
26
|
+
public async getItemById(id: string, _options?: Configuration): Promise<RequestContext> {
|
|
27
|
+
let _config = _options || this.configuration;
|
|
28
|
+
|
|
29
|
+
// verify required parameter 'id' is not null or undefined
|
|
30
|
+
if (id === null || id === undefined) {
|
|
31
|
+
throw new RequiredError("ItemApi", "getItemById", "id");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// Path Params
|
|
36
|
+
const localVarPath = '/v1/items/{id}'
|
|
37
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
38
|
+
|
|
39
|
+
// Make Request Context
|
|
40
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
41
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
45
|
+
// Apply auth methods
|
|
46
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
47
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
48
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
49
|
+
}
|
|
50
|
+
// Apply auth methods
|
|
51
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
52
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
53
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
57
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
58
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return requestContext;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* (Experimental) - Get a list of Item
|
|
66
|
+
* @param size
|
|
67
|
+
* @param page
|
|
68
|
+
*/
|
|
69
|
+
public async getItems(size?: number, page?: number, _options?: Configuration): Promise<RequestContext> {
|
|
70
|
+
let _config = _options || this.configuration;
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
// Path Params
|
|
75
|
+
const localVarPath = '/v1/items';
|
|
76
|
+
|
|
77
|
+
// Make Request Context
|
|
78
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
79
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
80
|
+
|
|
81
|
+
// Query Params
|
|
82
|
+
if (size !== undefined) {
|
|
83
|
+
requestContext.setQueryParam("size", ObjectSerializer.serialize(size, "number", ""));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Query Params
|
|
87
|
+
if (page !== undefined) {
|
|
88
|
+
requestContext.setQueryParam("page", ObjectSerializer.serialize(page, "number", ""));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
93
|
+
// Apply auth methods
|
|
94
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
95
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
96
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
97
|
+
}
|
|
98
|
+
// Apply auth methods
|
|
99
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
100
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
101
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
105
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
106
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return requestContext;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export class ItemApiResponseProcessor {
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
118
|
+
* to the expected objects
|
|
119
|
+
*
|
|
120
|
+
* @params response Response returned by the server for a request to getItemById
|
|
121
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
122
|
+
*/
|
|
123
|
+
public async getItemById(response: ResponseContext): Promise<ItemDto > {
|
|
124
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
125
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
126
|
+
const body: ItemDto = ObjectSerializer.deserialize(
|
|
127
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
128
|
+
"ItemDto", ""
|
|
129
|
+
) as ItemDto;
|
|
130
|
+
return body;
|
|
131
|
+
}
|
|
132
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
133
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
134
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
135
|
+
"GetJobExecutionById400Response", ""
|
|
136
|
+
) as GetJobExecutionById400Response;
|
|
137
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
138
|
+
}
|
|
139
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
140
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
141
|
+
}
|
|
142
|
+
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
143
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Not found", undefined, response.headers);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
147
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
148
|
+
const body: ItemDto = ObjectSerializer.deserialize(
|
|
149
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
150
|
+
"ItemDto", ""
|
|
151
|
+
) as ItemDto;
|
|
152
|
+
return body;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
160
|
+
* to the expected objects
|
|
161
|
+
*
|
|
162
|
+
* @params response Response returned by the server for a request to getItems
|
|
163
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
164
|
+
*/
|
|
165
|
+
public async getItems(response: ResponseContext): Promise<GetItems200Response > {
|
|
166
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
167
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
168
|
+
const body: GetItems200Response = ObjectSerializer.deserialize(
|
|
169
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
170
|
+
"GetItems200Response", ""
|
|
171
|
+
) as GetItems200Response;
|
|
172
|
+
return body;
|
|
173
|
+
}
|
|
174
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
175
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
176
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
177
|
+
"GetJobExecutionById400Response", ""
|
|
178
|
+
) as GetJobExecutionById400Response;
|
|
179
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
180
|
+
}
|
|
181
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
182
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
186
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
187
|
+
const body: GetItems200Response = ObjectSerializer.deserialize(
|
|
188
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
189
|
+
"GetItems200Response", ""
|
|
190
|
+
) as GetItems200Response;
|
|
191
|
+
return body;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
-
import { Configuration } from '../configuration';
|
|
3
|
-
import { RequestContext, ResponseContext, HttpFile } from '../http/http';
|
|
4
|
-
import { FileDto } from '../models/FileDto';
|
|
5
|
-
import { GetFiles200Response } from '../models/GetFiles200Response';
|
|
6
|
-
export declare class DataFactoryFileApiRequestFactory extends BaseAPIRequestFactory {
|
|
7
|
-
getFileById(id: string, _options?: Configuration): Promise<RequestContext>;
|
|
8
|
-
getFiles(size?: number, page?: number, _options?: Configuration): Promise<RequestContext>;
|
|
9
|
-
uploadFile(file: HttpFile, _options?: Configuration): Promise<RequestContext>;
|
|
10
|
-
}
|
|
11
|
-
export declare class DataFactoryFileApiResponseProcessor {
|
|
12
|
-
getFileById(response: ResponseContext): Promise<FileDto>;
|
|
13
|
-
getFiles(response: ResponseContext): Promise<GetFiles200Response>;
|
|
14
|
-
uploadFile(response: ResponseContext): Promise<FileDto>;
|
|
15
|
-
}
|
|
1
|
+
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
+
import { Configuration } from '../configuration';
|
|
3
|
+
import { RequestContext, ResponseContext, HttpFile } from '../http/http';
|
|
4
|
+
import { FileDto } from '../models/FileDto';
|
|
5
|
+
import { GetFiles200Response } from '../models/GetFiles200Response';
|
|
6
|
+
export declare class DataFactoryFileApiRequestFactory extends BaseAPIRequestFactory {
|
|
7
|
+
getFileById(id: string, _options?: Configuration): Promise<RequestContext>;
|
|
8
|
+
getFiles(size?: number, page?: number, _options?: Configuration): Promise<RequestContext>;
|
|
9
|
+
uploadFile(file: HttpFile, _options?: Configuration): Promise<RequestContext>;
|
|
10
|
+
}
|
|
11
|
+
export declare class DataFactoryFileApiResponseProcessor {
|
|
12
|
+
getFileById(response: ResponseContext): Promise<FileDto>;
|
|
13
|
+
getFiles(response: ResponseContext): Promise<GetFiles200Response>;
|
|
14
|
+
uploadFile(response: ResponseContext): Promise<FileDto>;
|
|
15
|
+
}
|