@lwshen/vault-hub-ts-fetch-client 0.20250716.150014 → 0.20250717.123824
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 +4 -4
- package/README.md +2 -2
- package/dist/apis/VaultApi.d.ts +74 -0
- package/dist/apis/{ConfigurationApi.js → VaultApi.js} +49 -49
- package/dist/apis/index.d.ts +1 -1
- package/dist/apis/index.js +1 -1
- package/dist/models/CreateVaultRequest.d.ts +56 -0
- package/dist/models/{CreateConfigurationRequest.js → CreateVaultRequest.js} +13 -13
- package/dist/models/UpdateVaultRequest.d.ts +50 -0
- package/dist/models/{UpdateConfigurationRequest.js → UpdateVaultRequest.js} +13 -13
- package/dist/models/Vault.d.ts +74 -0
- package/dist/models/{ConfigurationItem.js → Vault.js} +13 -13
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +3 -3
- package/package.json +1 -1
- package/src/apis/VaultApi.ts +231 -0
- package/src/apis/index.ts +1 -1
- package/src/models/{CreateConfigurationRequest.ts → CreateVaultRequest.ts} +17 -17
- package/src/models/{UpdateConfigurationRequest.ts → UpdateVaultRequest.ts} +15 -15
- package/src/models/{ConfigurationItem.ts → Vault.ts} +21 -21
- package/src/models/index.ts +3 -3
- package/dist/apis/ConfigurationApi.d.ts +0 -74
- package/dist/models/ConfigurationItem.d.ts +0 -74
- package/dist/models/CreateConfigurationRequest.d.ts +0 -56
- package/dist/models/UpdateConfigurationRequest.d.ts +0 -50
- package/src/apis/ConfigurationApi.ts +0 -231
package/src/models/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './CreateConfigurationRequest';
|
|
3
|
+
export * from './CreateVaultRequest';
|
|
5
4
|
export * from './GetUserResponse';
|
|
6
5
|
export * from './HealthCheckResponse';
|
|
7
6
|
export * from './LoginRequest';
|
|
8
7
|
export * from './LoginResponse';
|
|
9
8
|
export * from './SignupRequest';
|
|
10
9
|
export * from './SignupResponse';
|
|
11
|
-
export * from './
|
|
10
|
+
export * from './UpdateVaultRequest';
|
|
11
|
+
export * from './Vault';
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vault Hub Server
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import * as runtime from '../runtime';
|
|
13
|
-
import type { ConfigurationItem, CreateConfigurationRequest, UpdateConfigurationRequest } from '../models/index';
|
|
14
|
-
export interface CreateConfigurationOperationRequest {
|
|
15
|
-
createConfigurationRequest: CreateConfigurationRequest;
|
|
16
|
-
}
|
|
17
|
-
export interface DeleteConfigurationRequest {
|
|
18
|
-
id: number;
|
|
19
|
-
}
|
|
20
|
-
export interface GetConfigurationRequest {
|
|
21
|
-
id: number;
|
|
22
|
-
}
|
|
23
|
-
export interface GetConfigurationsRequest {
|
|
24
|
-
category?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface UpdateConfigurationOperationRequest {
|
|
27
|
-
id: number;
|
|
28
|
-
updateConfigurationRequest: UpdateConfigurationRequest;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
export declare class ConfigurationApi extends runtime.BaseAPI {
|
|
34
|
-
/**
|
|
35
|
-
* Create a new configuration
|
|
36
|
-
*/
|
|
37
|
-
createConfigurationRaw(requestParameters: CreateConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>>;
|
|
38
|
-
/**
|
|
39
|
-
* Create a new configuration
|
|
40
|
-
*/
|
|
41
|
-
createConfiguration(createConfigurationRequest: CreateConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem>;
|
|
42
|
-
/**
|
|
43
|
-
* Delete a configuration
|
|
44
|
-
*/
|
|
45
|
-
deleteConfigurationRaw(requestParameters: DeleteConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
46
|
-
/**
|
|
47
|
-
* Delete a configuration
|
|
48
|
-
*/
|
|
49
|
-
deleteConfiguration(id: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Get a specific configuration by ID
|
|
52
|
-
*/
|
|
53
|
-
getConfigurationRaw(requestParameters: GetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>>;
|
|
54
|
-
/**
|
|
55
|
-
* Get a specific configuration by ID
|
|
56
|
-
*/
|
|
57
|
-
getConfiguration(id: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem>;
|
|
58
|
-
/**
|
|
59
|
-
* Get all configurations for the current user
|
|
60
|
-
*/
|
|
61
|
-
getConfigurationsRaw(requestParameters: GetConfigurationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ConfigurationItem>>>;
|
|
62
|
-
/**
|
|
63
|
-
* Get all configurations for the current user
|
|
64
|
-
*/
|
|
65
|
-
getConfigurations(category?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConfigurationItem>>;
|
|
66
|
-
/**
|
|
67
|
-
* Update a configuration
|
|
68
|
-
*/
|
|
69
|
-
updateConfigurationRaw(requestParameters: UpdateConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>>;
|
|
70
|
-
/**
|
|
71
|
-
* Update a configuration
|
|
72
|
-
*/
|
|
73
|
-
updateConfiguration(id: number, updateConfigurationRequest: UpdateConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem>;
|
|
74
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vault Hub Server
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
|
-
* @interface ConfigurationItem
|
|
16
|
-
*/
|
|
17
|
-
export interface ConfigurationItem {
|
|
18
|
-
/**
|
|
19
|
-
* Unique identifier for the config
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof ConfigurationItem
|
|
22
|
-
*/
|
|
23
|
-
uniqueId: string;
|
|
24
|
-
/**
|
|
25
|
-
* ID of the user who owns this configuration
|
|
26
|
-
* @type {number}
|
|
27
|
-
* @memberof ConfigurationItem
|
|
28
|
-
*/
|
|
29
|
-
userId?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Human-readable name
|
|
32
|
-
* @type {string}
|
|
33
|
-
* @memberof ConfigurationItem
|
|
34
|
-
*/
|
|
35
|
-
name: string;
|
|
36
|
-
/**
|
|
37
|
-
* Encrypted value
|
|
38
|
-
* @type {string}
|
|
39
|
-
* @memberof ConfigurationItem
|
|
40
|
-
*/
|
|
41
|
-
value: string;
|
|
42
|
-
/**
|
|
43
|
-
* Human-readable description
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof ConfigurationItem
|
|
46
|
-
*/
|
|
47
|
-
description?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Category/type of config
|
|
50
|
-
* @type {string}
|
|
51
|
-
* @memberof ConfigurationItem
|
|
52
|
-
*/
|
|
53
|
-
category?: string;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @type {Date}
|
|
57
|
-
* @memberof ConfigurationItem
|
|
58
|
-
*/
|
|
59
|
-
createdAt?: Date;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @type {Date}
|
|
63
|
-
* @memberof ConfigurationItem
|
|
64
|
-
*/
|
|
65
|
-
updatedAt?: Date;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Check if a given object implements the ConfigurationItem interface.
|
|
69
|
-
*/
|
|
70
|
-
export declare function instanceOfConfigurationItem(value: object): value is ConfigurationItem;
|
|
71
|
-
export declare function ConfigurationItemFromJSON(json: any): ConfigurationItem;
|
|
72
|
-
export declare function ConfigurationItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigurationItem;
|
|
73
|
-
export declare function ConfigurationItemToJSON(json: any): ConfigurationItem;
|
|
74
|
-
export declare function ConfigurationItemToJSONTyped(value?: ConfigurationItem | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vault Hub Server
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
|
-
* @interface CreateConfigurationRequest
|
|
16
|
-
*/
|
|
17
|
-
export interface CreateConfigurationRequest {
|
|
18
|
-
/**
|
|
19
|
-
* Unique identifier for the config
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof CreateConfigurationRequest
|
|
22
|
-
*/
|
|
23
|
-
uniqueId: string;
|
|
24
|
-
/**
|
|
25
|
-
* Human-readable name
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof CreateConfigurationRequest
|
|
28
|
-
*/
|
|
29
|
-
name: string;
|
|
30
|
-
/**
|
|
31
|
-
* Value to be encrypted and stored
|
|
32
|
-
* @type {string}
|
|
33
|
-
* @memberof CreateConfigurationRequest
|
|
34
|
-
*/
|
|
35
|
-
value: string;
|
|
36
|
-
/**
|
|
37
|
-
* Human-readable description
|
|
38
|
-
* @type {string}
|
|
39
|
-
* @memberof CreateConfigurationRequest
|
|
40
|
-
*/
|
|
41
|
-
description?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Category/type of config
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof CreateConfigurationRequest
|
|
46
|
-
*/
|
|
47
|
-
category?: string;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Check if a given object implements the CreateConfigurationRequest interface.
|
|
51
|
-
*/
|
|
52
|
-
export declare function instanceOfCreateConfigurationRequest(value: object): value is CreateConfigurationRequest;
|
|
53
|
-
export declare function CreateConfigurationRequestFromJSON(json: any): CreateConfigurationRequest;
|
|
54
|
-
export declare function CreateConfigurationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateConfigurationRequest;
|
|
55
|
-
export declare function CreateConfigurationRequestToJSON(json: any): CreateConfigurationRequest;
|
|
56
|
-
export declare function CreateConfigurationRequestToJSONTyped(value?: CreateConfigurationRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vault Hub Server
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
|
-
* @interface UpdateConfigurationRequest
|
|
16
|
-
*/
|
|
17
|
-
export interface UpdateConfigurationRequest {
|
|
18
|
-
/**
|
|
19
|
-
* Human-readable name
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof UpdateConfigurationRequest
|
|
22
|
-
*/
|
|
23
|
-
name?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Value to be encrypted and stored
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof UpdateConfigurationRequest
|
|
28
|
-
*/
|
|
29
|
-
value?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Human-readable description
|
|
32
|
-
* @type {string}
|
|
33
|
-
* @memberof UpdateConfigurationRequest
|
|
34
|
-
*/
|
|
35
|
-
description?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Category/type of config
|
|
38
|
-
* @type {string}
|
|
39
|
-
* @memberof UpdateConfigurationRequest
|
|
40
|
-
*/
|
|
41
|
-
category?: string;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Check if a given object implements the UpdateConfigurationRequest interface.
|
|
45
|
-
*/
|
|
46
|
-
export declare function instanceOfUpdateConfigurationRequest(value: object): value is UpdateConfigurationRequest;
|
|
47
|
-
export declare function UpdateConfigurationRequestFromJSON(json: any): UpdateConfigurationRequest;
|
|
48
|
-
export declare function UpdateConfigurationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateConfigurationRequest;
|
|
49
|
-
export declare function UpdateConfigurationRequestToJSON(json: any): UpdateConfigurationRequest;
|
|
50
|
-
export declare function UpdateConfigurationRequestToJSONTyped(value?: UpdateConfigurationRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Vault Hub Server
|
|
5
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
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
|
-
ConfigurationItem,
|
|
19
|
-
CreateConfigurationRequest,
|
|
20
|
-
UpdateConfigurationRequest,
|
|
21
|
-
} from '../models/index';
|
|
22
|
-
import {
|
|
23
|
-
ConfigurationItemFromJSON,
|
|
24
|
-
ConfigurationItemToJSON,
|
|
25
|
-
CreateConfigurationRequestFromJSON,
|
|
26
|
-
CreateConfigurationRequestToJSON,
|
|
27
|
-
UpdateConfigurationRequestFromJSON,
|
|
28
|
-
UpdateConfigurationRequestToJSON,
|
|
29
|
-
} from '../models/index';
|
|
30
|
-
|
|
31
|
-
export interface CreateConfigurationOperationRequest {
|
|
32
|
-
createConfigurationRequest: CreateConfigurationRequest;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface DeleteConfigurationRequest {
|
|
36
|
-
id: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface GetConfigurationRequest {
|
|
40
|
-
id: number;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface GetConfigurationsRequest {
|
|
44
|
-
category?: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface UpdateConfigurationOperationRequest {
|
|
48
|
-
id: number;
|
|
49
|
-
updateConfigurationRequest: UpdateConfigurationRequest;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
export class ConfigurationApi extends runtime.BaseAPI {
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Create a new configuration
|
|
59
|
-
*/
|
|
60
|
-
async createConfigurationRaw(requestParameters: CreateConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>> {
|
|
61
|
-
if (requestParameters['createConfigurationRequest'] == null) {
|
|
62
|
-
throw new runtime.RequiredError(
|
|
63
|
-
'createConfigurationRequest',
|
|
64
|
-
'Required parameter "createConfigurationRequest" was null or undefined when calling createConfiguration().'
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const queryParameters: any = {};
|
|
69
|
-
|
|
70
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
71
|
-
|
|
72
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
73
|
-
|
|
74
|
-
const response = await this.request({
|
|
75
|
-
path: `/api/configurations`,
|
|
76
|
-
method: 'POST',
|
|
77
|
-
headers: headerParameters,
|
|
78
|
-
query: queryParameters,
|
|
79
|
-
body: CreateConfigurationRequestToJSON(requestParameters['createConfigurationRequest']),
|
|
80
|
-
}, initOverrides);
|
|
81
|
-
|
|
82
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ConfigurationItemFromJSON(jsonValue));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Create a new configuration
|
|
87
|
-
*/
|
|
88
|
-
async createConfiguration(createConfigurationRequest: CreateConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem> {
|
|
89
|
-
const response = await this.createConfigurationRaw({ createConfigurationRequest: createConfigurationRequest }, initOverrides);
|
|
90
|
-
return await response.value();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Delete a configuration
|
|
95
|
-
*/
|
|
96
|
-
async deleteConfigurationRaw(requestParameters: DeleteConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
97
|
-
if (requestParameters['id'] == null) {
|
|
98
|
-
throw new runtime.RequiredError(
|
|
99
|
-
'id',
|
|
100
|
-
'Required parameter "id" was null or undefined when calling deleteConfiguration().'
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const queryParameters: any = {};
|
|
105
|
-
|
|
106
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
107
|
-
|
|
108
|
-
const response = await this.request({
|
|
109
|
-
path: `/api/configurations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
110
|
-
method: 'DELETE',
|
|
111
|
-
headers: headerParameters,
|
|
112
|
-
query: queryParameters,
|
|
113
|
-
}, initOverrides);
|
|
114
|
-
|
|
115
|
-
return new runtime.VoidApiResponse(response);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Delete a configuration
|
|
120
|
-
*/
|
|
121
|
-
async deleteConfiguration(id: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
122
|
-
await this.deleteConfigurationRaw({ id: id }, initOverrides);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Get a specific configuration by ID
|
|
127
|
-
*/
|
|
128
|
-
async getConfigurationRaw(requestParameters: GetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>> {
|
|
129
|
-
if (requestParameters['id'] == null) {
|
|
130
|
-
throw new runtime.RequiredError(
|
|
131
|
-
'id',
|
|
132
|
-
'Required parameter "id" was null or undefined when calling getConfiguration().'
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const queryParameters: any = {};
|
|
137
|
-
|
|
138
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
139
|
-
|
|
140
|
-
const response = await this.request({
|
|
141
|
-
path: `/api/configurations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
142
|
-
method: 'GET',
|
|
143
|
-
headers: headerParameters,
|
|
144
|
-
query: queryParameters,
|
|
145
|
-
}, initOverrides);
|
|
146
|
-
|
|
147
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ConfigurationItemFromJSON(jsonValue));
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Get a specific configuration by ID
|
|
152
|
-
*/
|
|
153
|
-
async getConfiguration(id: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem> {
|
|
154
|
-
const response = await this.getConfigurationRaw({ id: id }, initOverrides);
|
|
155
|
-
return await response.value();
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Get all configurations for the current user
|
|
160
|
-
*/
|
|
161
|
-
async getConfigurationsRaw(requestParameters: GetConfigurationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ConfigurationItem>>> {
|
|
162
|
-
const queryParameters: any = {};
|
|
163
|
-
|
|
164
|
-
if (requestParameters['category'] != null) {
|
|
165
|
-
queryParameters['category'] = requestParameters['category'];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
169
|
-
|
|
170
|
-
const response = await this.request({
|
|
171
|
-
path: `/api/configurations`,
|
|
172
|
-
method: 'GET',
|
|
173
|
-
headers: headerParameters,
|
|
174
|
-
query: queryParameters,
|
|
175
|
-
}, initOverrides);
|
|
176
|
-
|
|
177
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ConfigurationItemFromJSON));
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Get all configurations for the current user
|
|
182
|
-
*/
|
|
183
|
-
async getConfigurations(category?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConfigurationItem>> {
|
|
184
|
-
const response = await this.getConfigurationsRaw({ category: category }, initOverrides);
|
|
185
|
-
return await response.value();
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Update a configuration
|
|
190
|
-
*/
|
|
191
|
-
async updateConfigurationRaw(requestParameters: UpdateConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>> {
|
|
192
|
-
if (requestParameters['id'] == null) {
|
|
193
|
-
throw new runtime.RequiredError(
|
|
194
|
-
'id',
|
|
195
|
-
'Required parameter "id" was null or undefined when calling updateConfiguration().'
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
if (requestParameters['updateConfigurationRequest'] == null) {
|
|
200
|
-
throw new runtime.RequiredError(
|
|
201
|
-
'updateConfigurationRequest',
|
|
202
|
-
'Required parameter "updateConfigurationRequest" was null or undefined when calling updateConfiguration().'
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const queryParameters: any = {};
|
|
207
|
-
|
|
208
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
209
|
-
|
|
210
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
211
|
-
|
|
212
|
-
const response = await this.request({
|
|
213
|
-
path: `/api/configurations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
214
|
-
method: 'PUT',
|
|
215
|
-
headers: headerParameters,
|
|
216
|
-
query: queryParameters,
|
|
217
|
-
body: UpdateConfigurationRequestToJSON(requestParameters['updateConfigurationRequest']),
|
|
218
|
-
}, initOverrides);
|
|
219
|
-
|
|
220
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ConfigurationItemFromJSON(jsonValue));
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Update a configuration
|
|
225
|
-
*/
|
|
226
|
-
async updateConfiguration(id: number, updateConfigurationRequest: UpdateConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem> {
|
|
227
|
-
const response = await this.updateConfigurationRaw({ id: id, updateConfigurationRequest: updateConfigurationRequest }, initOverrides);
|
|
228
|
-
return await response.value();
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
}
|