@epam/ai-dial-chat-api-client 1.0.0-rc.4
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/generated/src/apis/AppConfigApi.d.ts +30 -0
- package/generated/src/apis/AppConfigApi.d.ts.map +1 -0
- package/generated/src/apis/AppConfigApi.js +52 -0
- package/generated/src/apis/ApplicationsApi.d.ts +96 -0
- package/generated/src/apis/ApplicationsApi.d.ts.map +1 -0
- package/generated/src/apis/ApplicationsApi.js +189 -0
- package/generated/src/apis/AuthApi.d.ts +65 -0
- package/generated/src/apis/AuthApi.d.ts.map +1 -0
- package/generated/src/apis/AuthApi.js +146 -0
- package/generated/src/apis/ChatApi.d.ts +30 -0
- package/generated/src/apis/ChatApi.d.ts.map +1 -0
- package/generated/src/apis/ChatApi.js +51 -0
- package/generated/src/apis/ClientChannelApi.d.ts +59 -0
- package/generated/src/apis/ClientChannelApi.d.ts.map +1 -0
- package/generated/src/apis/ClientChannelApi.js +113 -0
- package/generated/src/apis/ConversationsApi.d.ts +231 -0
- package/generated/src/apis/ConversationsApi.d.ts.map +1 -0
- package/generated/src/apis/ConversationsApi.js +527 -0
- package/generated/src/apis/DeploymentsApi.d.ts +81 -0
- package/generated/src/apis/DeploymentsApi.d.ts.map +1 -0
- package/generated/src/apis/DeploymentsApi.js +146 -0
- package/generated/src/apis/ExternalServicesApi.d.ts +63 -0
- package/generated/src/apis/ExternalServicesApi.d.ts.map +1 -0
- package/generated/src/apis/ExternalServicesApi.js +130 -0
- package/generated/src/apis/FilesApi.d.ts +224 -0
- package/generated/src/apis/FilesApi.d.ts.map +1 -0
- package/generated/src/apis/FilesApi.js +570 -0
- package/generated/src/apis/HealthApi.d.ts +29 -0
- package/generated/src/apis/HealthApi.d.ts.map +1 -0
- package/generated/src/apis/HealthApi.js +48 -0
- package/generated/src/apis/ModelsApi.d.ts +42 -0
- package/generated/src/apis/ModelsApi.d.ts.map +1 -0
- package/generated/src/apis/ModelsApi.js +76 -0
- package/generated/src/apis/PromptsApi.d.ts +139 -0
- package/generated/src/apis/PromptsApi.d.ts.map +1 -0
- package/generated/src/apis/PromptsApi.js +333 -0
- package/generated/src/apis/PublishApi.d.ts +79 -0
- package/generated/src/apis/PublishApi.d.ts.map +1 -0
- package/generated/src/apis/PublishApi.js +139 -0
- package/generated/src/apis/RateApi.d.ts +32 -0
- package/generated/src/apis/RateApi.d.ts.map +1 -0
- package/generated/src/apis/RateApi.js +52 -0
- package/generated/src/apis/ScheduledTasksApi.d.ts +126 -0
- package/generated/src/apis/ScheduledTasksApi.d.ts.map +1 -0
- package/generated/src/apis/ScheduledTasksApi.js +249 -0
- package/generated/src/apis/ShareApi.d.ts +71 -0
- package/generated/src/apis/ShareApi.d.ts.map +1 -0
- package/generated/src/apis/ShareApi.js +139 -0
- package/generated/src/apis/ThemesApi.d.ts +42 -0
- package/generated/src/apis/ThemesApi.d.ts.map +1 -0
- package/generated/src/apis/ThemesApi.js +83 -0
- package/generated/src/apis/ToolsetsApi.d.ts +110 -0
- package/generated/src/apis/ToolsetsApi.d.ts.map +1 -0
- package/generated/src/apis/ToolsetsApi.js +231 -0
- package/generated/src/apis/TranscriptionApi.d.ts +30 -0
- package/generated/src/apis/TranscriptionApi.d.ts.map +1 -0
- package/generated/src/apis/TranscriptionApi.js +51 -0
- package/generated/src/apis/UserConfigApi.d.ts +71 -0
- package/generated/src/apis/UserConfigApi.d.ts.map +1 -0
- package/generated/src/apis/UserConfigApi.js +150 -0
- package/generated/src/apis/index.d.ts +21 -0
- package/generated/src/apis/index.d.ts.map +1 -0
- package/generated/src/apis/index.js +25 -0
- package/generated/src/index.d.ts +4 -0
- package/generated/src/index.d.ts.map +1 -0
- package/generated/src/index.js +8 -0
- package/generated/src/models/index.d.ts +6282 -0
- package/generated/src/models/index.d.ts.map +1 -0
- package/generated/src/models/index.js +328 -0
- package/generated/src/runtime.d.ts +182 -0
- package/generated/src/runtime.d.ts.map +1 -0
- package/generated/src/runtime.js +347 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -0
- package/index.js +4 -0
- package/package.json +26 -0
- package/tsconfig.lib.tsbuildinfo +1 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Chat API
|
|
6
|
+
* REST API for the chat application. Provides endpoints for theme configuration, authentication, and management. All endpoints return appropriate HTTP status codes (200, 400, 401, 403, 404, 502, 503) with descriptive error messages.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ListScheduledTasksSortEnum = exports.ScheduledTasksApi = void 0;
|
|
17
|
+
const tslib_1 = require("tslib");
|
|
18
|
+
const runtime = tslib_1.__importStar(require("../runtime"));
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class ScheduledTasksApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Creates a DIAL Scheduler schedule that runs a chat completion on the given model and prompt, using the OAuth external-service id configured via SCHEDULER_SERVICE_ID. Invalidates the scheduled tasks list cache on success.
|
|
25
|
+
* Create a scheduled task
|
|
26
|
+
*/
|
|
27
|
+
async createScheduledTaskRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['createScheduledTaskBodyDto'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('createScheduledTaskBodyDto', 'Required parameter "createScheduledTaskBodyDto" was null or undefined when calling createScheduledTask().');
|
|
30
|
+
}
|
|
31
|
+
const queryParameters = {};
|
|
32
|
+
const headerParameters = {};
|
|
33
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
34
|
+
let urlPath = `/api/v1/scheduled-tasks`;
|
|
35
|
+
const response = await this.request({
|
|
36
|
+
path: urlPath,
|
|
37
|
+
method: 'POST',
|
|
38
|
+
headers: headerParameters,
|
|
39
|
+
query: queryParameters,
|
|
40
|
+
body: requestParameters['createScheduledTaskBodyDto'],
|
|
41
|
+
}, initOverrides);
|
|
42
|
+
return new runtime.JSONApiResponse(response);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a DIAL Scheduler schedule that runs a chat completion on the given model and prompt, using the OAuth external-service id configured via SCHEDULER_SERVICE_ID. Invalidates the scheduled tasks list cache on success.
|
|
46
|
+
* Create a scheduled task
|
|
47
|
+
*/
|
|
48
|
+
async createScheduledTask(requestParameters, initOverrides) {
|
|
49
|
+
const response = await this.createScheduledTaskRaw(requestParameters, initOverrides);
|
|
50
|
+
return await response.value();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Returns a single DIAL Scheduler schedule by id, proxying DIAL Scheduler using the session user\'s access token. Not cached.
|
|
54
|
+
* Get a scheduled task by id
|
|
55
|
+
*/
|
|
56
|
+
async getScheduledTaskRaw(requestParameters, initOverrides) {
|
|
57
|
+
if (requestParameters['scheduleId'] == null) {
|
|
58
|
+
throw new runtime.RequiredError('scheduleId', 'Required parameter "scheduleId" was null or undefined when calling getScheduledTask().');
|
|
59
|
+
}
|
|
60
|
+
const queryParameters = {};
|
|
61
|
+
const headerParameters = {};
|
|
62
|
+
let urlPath = `/api/v1/scheduled-tasks/{scheduleId}`;
|
|
63
|
+
urlPath = urlPath.replace(`{${'scheduleId'}}`, encodeURIComponent(String(requestParameters['scheduleId'])));
|
|
64
|
+
const response = await this.request({
|
|
65
|
+
path: urlPath,
|
|
66
|
+
method: 'GET',
|
|
67
|
+
headers: headerParameters,
|
|
68
|
+
query: queryParameters,
|
|
69
|
+
}, initOverrides);
|
|
70
|
+
return new runtime.JSONApiResponse(response);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns a single DIAL Scheduler schedule by id, proxying DIAL Scheduler using the session user\'s access token. Not cached.
|
|
74
|
+
* Get a scheduled task by id
|
|
75
|
+
*/
|
|
76
|
+
async getScheduledTask(requestParameters, initOverrides) {
|
|
77
|
+
const response = await this.getScheduledTaskRaw(requestParameters, initOverrides);
|
|
78
|
+
return await response.value();
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Returns the paginated run history for a single DIAL Scheduler schedule, proxying DIAL Scheduler using the session user\'s access token. Always requests upstream ordering of created_at desc explicitly. Not cached.
|
|
82
|
+
* List a scheduled task run history
|
|
83
|
+
*/
|
|
84
|
+
async listScheduledTaskRunsRaw(requestParameters, initOverrides) {
|
|
85
|
+
if (requestParameters['scheduleId'] == null) {
|
|
86
|
+
throw new runtime.RequiredError('scheduleId', 'Required parameter "scheduleId" was null or undefined when calling listScheduledTaskRuns().');
|
|
87
|
+
}
|
|
88
|
+
const queryParameters = {};
|
|
89
|
+
if (requestParameters['limit'] != null) {
|
|
90
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
91
|
+
}
|
|
92
|
+
if (requestParameters['offset'] != null) {
|
|
93
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
94
|
+
}
|
|
95
|
+
const headerParameters = {};
|
|
96
|
+
let urlPath = `/api/v1/scheduled-tasks/{scheduleId}/runs`;
|
|
97
|
+
urlPath = urlPath.replace(`{${'scheduleId'}}`, encodeURIComponent(String(requestParameters['scheduleId'])));
|
|
98
|
+
const response = await this.request({
|
|
99
|
+
path: urlPath,
|
|
100
|
+
method: 'GET',
|
|
101
|
+
headers: headerParameters,
|
|
102
|
+
query: queryParameters,
|
|
103
|
+
}, initOverrides);
|
|
104
|
+
return new runtime.JSONApiResponse(response);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Returns the paginated run history for a single DIAL Scheduler schedule, proxying DIAL Scheduler using the session user\'s access token. Always requests upstream ordering of created_at desc explicitly. Not cached.
|
|
108
|
+
* List a scheduled task run history
|
|
109
|
+
*/
|
|
110
|
+
async listScheduledTaskRuns(requestParameters, initOverrides) {
|
|
111
|
+
const response = await this.listScheduledTaskRunsRaw(requestParameters, initOverrides);
|
|
112
|
+
return await response.value();
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns the DIAL Scheduler schedules visible to the authenticated session user. Proxies the DIAL Scheduler routed-deployment API using the session access token. Results are cached server-side for 30 seconds per user.
|
|
116
|
+
* List scheduled tasks
|
|
117
|
+
*/
|
|
118
|
+
async listScheduledTasksRaw(requestParameters, initOverrides) {
|
|
119
|
+
const queryParameters = {};
|
|
120
|
+
if (requestParameters['limit'] != null) {
|
|
121
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
122
|
+
}
|
|
123
|
+
if (requestParameters['offset'] != null) {
|
|
124
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
125
|
+
}
|
|
126
|
+
if (requestParameters['search'] != null) {
|
|
127
|
+
queryParameters['search'] = requestParameters['search'];
|
|
128
|
+
}
|
|
129
|
+
if (requestParameters['sort'] != null) {
|
|
130
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
131
|
+
}
|
|
132
|
+
const headerParameters = {};
|
|
133
|
+
let urlPath = `/api/v1/scheduled-tasks`;
|
|
134
|
+
const response = await this.request({
|
|
135
|
+
path: urlPath,
|
|
136
|
+
method: 'GET',
|
|
137
|
+
headers: headerParameters,
|
|
138
|
+
query: queryParameters,
|
|
139
|
+
}, initOverrides);
|
|
140
|
+
return new runtime.JSONApiResponse(response);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Returns the DIAL Scheduler schedules visible to the authenticated session user. Proxies the DIAL Scheduler routed-deployment API using the session access token. Results are cached server-side for 30 seconds per user.
|
|
144
|
+
* List scheduled tasks
|
|
145
|
+
*/
|
|
146
|
+
async listScheduledTasks(requestParameters = {}, initOverrides) {
|
|
147
|
+
const response = await this.listScheduledTasksRaw(requestParameters, initOverrides);
|
|
148
|
+
return await response.value();
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Pauses a DIAL Scheduler schedule for the authenticated session user. Invalidates the scheduled tasks list cache on success.
|
|
152
|
+
* Pause a scheduled task
|
|
153
|
+
*/
|
|
154
|
+
async pauseScheduledTaskRaw(requestParameters, initOverrides) {
|
|
155
|
+
if (requestParameters['scheduleId'] == null) {
|
|
156
|
+
throw new runtime.RequiredError('scheduleId', 'Required parameter "scheduleId" was null or undefined when calling pauseScheduledTask().');
|
|
157
|
+
}
|
|
158
|
+
const queryParameters = {};
|
|
159
|
+
const headerParameters = {};
|
|
160
|
+
let urlPath = `/api/v1/scheduled-tasks/{scheduleId}/pause`;
|
|
161
|
+
urlPath = urlPath.replace(`{${'scheduleId'}}`, encodeURIComponent(String(requestParameters['scheduleId'])));
|
|
162
|
+
const response = await this.request({
|
|
163
|
+
path: urlPath,
|
|
164
|
+
method: 'POST',
|
|
165
|
+
headers: headerParameters,
|
|
166
|
+
query: queryParameters,
|
|
167
|
+
}, initOverrides);
|
|
168
|
+
return new runtime.JSONApiResponse(response);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Pauses a DIAL Scheduler schedule for the authenticated session user. Invalidates the scheduled tasks list cache on success.
|
|
172
|
+
* Pause a scheduled task
|
|
173
|
+
*/
|
|
174
|
+
async pauseScheduledTask(requestParameters, initOverrides) {
|
|
175
|
+
const response = await this.pauseScheduledTaskRaw(requestParameters, initOverrides);
|
|
176
|
+
return await response.value();
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Resumes a paused DIAL Scheduler schedule for the authenticated session user. Invalidates the scheduled tasks list cache on success.
|
|
180
|
+
* Resume a scheduled task
|
|
181
|
+
*/
|
|
182
|
+
async resumeScheduledTaskRaw(requestParameters, initOverrides) {
|
|
183
|
+
if (requestParameters['scheduleId'] == null) {
|
|
184
|
+
throw new runtime.RequiredError('scheduleId', 'Required parameter "scheduleId" was null or undefined when calling resumeScheduledTask().');
|
|
185
|
+
}
|
|
186
|
+
const queryParameters = {};
|
|
187
|
+
const headerParameters = {};
|
|
188
|
+
let urlPath = `/api/v1/scheduled-tasks/{scheduleId}/resume`;
|
|
189
|
+
urlPath = urlPath.replace(`{${'scheduleId'}}`, encodeURIComponent(String(requestParameters['scheduleId'])));
|
|
190
|
+
const response = await this.request({
|
|
191
|
+
path: urlPath,
|
|
192
|
+
method: 'POST',
|
|
193
|
+
headers: headerParameters,
|
|
194
|
+
query: queryParameters,
|
|
195
|
+
}, initOverrides);
|
|
196
|
+
return new runtime.JSONApiResponse(response);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Resumes a paused DIAL Scheduler schedule for the authenticated session user. Invalidates the scheduled tasks list cache on success.
|
|
200
|
+
* Resume a scheduled task
|
|
201
|
+
*/
|
|
202
|
+
async resumeScheduledTask(requestParameters, initOverrides) {
|
|
203
|
+
const response = await this.resumeScheduledTaskRaw(requestParameters, initOverrides);
|
|
204
|
+
return await response.value();
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Updates an existing DIAL Scheduler schedule for the authenticated session user. Invalidates the scheduled tasks list cache on success.
|
|
208
|
+
* Update a scheduled task
|
|
209
|
+
*/
|
|
210
|
+
async updateScheduledTaskRaw(requestParameters, initOverrides) {
|
|
211
|
+
if (requestParameters['scheduleId'] == null) {
|
|
212
|
+
throw new runtime.RequiredError('scheduleId', 'Required parameter "scheduleId" was null or undefined when calling updateScheduledTask().');
|
|
213
|
+
}
|
|
214
|
+
if (requestParameters['updateScheduledTaskBodyDto'] == null) {
|
|
215
|
+
throw new runtime.RequiredError('updateScheduledTaskBodyDto', 'Required parameter "updateScheduledTaskBodyDto" was null or undefined when calling updateScheduledTask().');
|
|
216
|
+
}
|
|
217
|
+
const queryParameters = {};
|
|
218
|
+
const headerParameters = {};
|
|
219
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
220
|
+
let urlPath = `/api/v1/scheduled-tasks/{scheduleId}`;
|
|
221
|
+
urlPath = urlPath.replace(`{${'scheduleId'}}`, encodeURIComponent(String(requestParameters['scheduleId'])));
|
|
222
|
+
const response = await this.request({
|
|
223
|
+
path: urlPath,
|
|
224
|
+
method: 'PUT',
|
|
225
|
+
headers: headerParameters,
|
|
226
|
+
query: queryParameters,
|
|
227
|
+
body: requestParameters['updateScheduledTaskBodyDto'],
|
|
228
|
+
}, initOverrides);
|
|
229
|
+
return new runtime.JSONApiResponse(response);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Updates an existing DIAL Scheduler schedule for the authenticated session user. Invalidates the scheduled tasks list cache on success.
|
|
233
|
+
* Update a scheduled task
|
|
234
|
+
*/
|
|
235
|
+
async updateScheduledTask(requestParameters, initOverrides) {
|
|
236
|
+
const response = await this.updateScheduledTaskRaw(requestParameters, initOverrides);
|
|
237
|
+
return await response.value();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
exports.ScheduledTasksApi = ScheduledTasksApi;
|
|
241
|
+
/**
|
|
242
|
+
* @export
|
|
243
|
+
*/
|
|
244
|
+
exports.ListScheduledTasksSortEnum = {
|
|
245
|
+
FirstToRun: 'firstToRun',
|
|
246
|
+
LastToRun: 'lastToRun',
|
|
247
|
+
Newest: 'newest',
|
|
248
|
+
NameAz: 'nameAZ',
|
|
249
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat API
|
|
3
|
+
* REST API for the chat application. Provides endpoints for theme configuration, authentication, and management. All endpoints return appropriate HTTP status codes (200, 400, 401, 403, 404, 502, 503) with descriptive error messages.
|
|
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 { AcceptInvitationResponseDto, CreateShareLinkDto, DiscardSharedCatalogItemDto, DiscardSharedCatalogItemResponseDto, RevokeSharedAccessDto, RevokeSharedAccessResponseDto, ShareLinkResponseDto } from '../models/index';
|
|
14
|
+
export interface AcceptInvitationRequest {
|
|
15
|
+
invitationId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateShareLinkRequest {
|
|
18
|
+
createShareLinkDto: CreateShareLinkDto;
|
|
19
|
+
}
|
|
20
|
+
export interface DiscardSharedCatalogItemRequest {
|
|
21
|
+
discardSharedCatalogItemDto: DiscardSharedCatalogItemDto;
|
|
22
|
+
}
|
|
23
|
+
export interface RevokeSharedAccessRequest {
|
|
24
|
+
revokeSharedAccessDto: RevokeSharedAccessDto;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class ShareApi extends runtime.BaseAPI {
|
|
30
|
+
/**
|
|
31
|
+
* Accepts a share invitation via DIAL Core, granting the authenticated user the invitation\'s access level, and returns the shared entity\'s identifier so the frontend can navigate to it.
|
|
32
|
+
* Accept a share invitation
|
|
33
|
+
*/
|
|
34
|
+
acceptInvitationRaw(requestParameters: AcceptInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptInvitationResponseDto>>;
|
|
35
|
+
/**
|
|
36
|
+
* Accepts a share invitation via DIAL Core, granting the authenticated user the invitation\'s access level, and returns the shared entity\'s identifier so the frontend can navigate to it.
|
|
37
|
+
* Accept a share invitation
|
|
38
|
+
*/
|
|
39
|
+
acceptInvitation(requestParameters: AcceptInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptInvitationResponseDto>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a share link for a DIAL Core resource (catalog entity — agent, application, skill, toolset, or model — conversation, or prompt) by proxying DIAL Core\'s resource-sharing API. Returns the share URL, access level, and expiry.
|
|
42
|
+
* Create a share link
|
|
43
|
+
*/
|
|
44
|
+
createShareLinkRaw(requestParameters: CreateShareLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShareLinkResponseDto>>;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a share link for a DIAL Core resource (catalog entity — agent, application, skill, toolset, or model — conversation, or prompt) by proxying DIAL Core\'s resource-sharing API. Returns the share URL, access level, and expiry.
|
|
47
|
+
* Create a share link
|
|
48
|
+
*/
|
|
49
|
+
createShareLink(requestParameters: CreateShareLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShareLinkResponseDto>;
|
|
50
|
+
/**
|
|
51
|
+
* Discards the authenticated user\'s own access to a shared catalog entity (application or toolset) or conversation, via DIAL Core\'s discardSharedResources operation. Only affects the caller\'s own access — removing access for everyone else is a separate operation.
|
|
52
|
+
* Discard a shared catalog resource or conversation
|
|
53
|
+
*/
|
|
54
|
+
discardSharedCatalogItemRaw(requestParameters: DiscardSharedCatalogItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DiscardSharedCatalogItemResponseDto>>;
|
|
55
|
+
/**
|
|
56
|
+
* Discards the authenticated user\'s own access to a shared catalog entity (application or toolset) or conversation, via DIAL Core\'s discardSharedResources operation. Only affects the caller\'s own access — removing access for everyone else is a separate operation.
|
|
57
|
+
* Discard a shared catalog resource or conversation
|
|
58
|
+
*/
|
|
59
|
+
discardSharedCatalogItem(requestParameters: DiscardSharedCatalogItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DiscardSharedCatalogItemResponseDto>;
|
|
60
|
+
/**
|
|
61
|
+
* Revokes every outstanding share grant on a catalog entity (application or toolset) or conversation the caller owns, via DIAL Core\'s revokeSharedResources operation. Affects all recipients at once — DIAL Core cannot target a single recipient. Discarding only the caller\'s own access to a resource shared with them is a separate operation.
|
|
62
|
+
* Revoke all shared access to an owned resource
|
|
63
|
+
*/
|
|
64
|
+
revokeSharedAccessRaw(requestParameters: RevokeSharedAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RevokeSharedAccessResponseDto>>;
|
|
65
|
+
/**
|
|
66
|
+
* Revokes every outstanding share grant on a catalog entity (application or toolset) or conversation the caller owns, via DIAL Core\'s revokeSharedResources operation. Affects all recipients at once — DIAL Core cannot target a single recipient. Discarding only the caller\'s own access to a resource shared with them is a separate operation.
|
|
67
|
+
* Revoke all shared access to an owned resource
|
|
68
|
+
*/
|
|
69
|
+
revokeSharedAccess(requestParameters: RevokeSharedAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RevokeSharedAccessResponseDto>;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=ShareApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareApi.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/ShareApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EACV,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,mCAAmC,EACnC,qBAAqB,EACrB,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,MAAM,WAAW,+BAA+B;IAC9C,2BAA2B,EAAE,2BAA2B,CAAC;CAC1D;AAED,MAAM,WAAW,yBAAyB;IACxC,qBAAqB,EAAE,qBAAqB,CAAC;CAC9C;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,OAAO,CAAC,OAAO;IAC3C;;;OAGG;IACG,mBAAmB,CACvB,iBAAiB,EAAE,uBAAuB,EAC1C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;IA+B5D;;;OAGG;IACG,gBAAgB,CACpB,iBAAiB,EAAE,uBAAuB,EAC1C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,2BAA2B,CAAC;IAQvC;;;OAGG;IACG,kBAAkB,CACtB,iBAAiB,EAAE,sBAAsB,EACzC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IA8BrD;;;OAGG;IACG,eAAe,CACnB,iBAAiB,EAAE,sBAAsB,EACzC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,oBAAoB,CAAC;IAQhC;;;OAGG;IACG,2BAA2B,CAC/B,iBAAiB,EAAE,+BAA+B,EAClD,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,mCAAmC,CAAC,CAAC;IAgCpE;;;OAGG;IACG,wBAAwB,CAC5B,iBAAiB,EAAE,+BAA+B,EAClD,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,mCAAmC,CAAC;IAQ/C;;;OAGG;IACG,qBAAqB,CACzB,iBAAiB,EAAE,yBAAyB,EAC5C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAAC;IA8B9D;;;OAGG;IACG,kBAAkB,CACtB,iBAAiB,EAAE,yBAAyB,EAC5C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,6BAA6B,CAAC;CAO1C"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Chat API
|
|
6
|
+
* REST API for the chat application. Provides endpoints for theme configuration, authentication, and management. All endpoints return appropriate HTTP status codes (200, 400, 401, 403, 404, 502, 503) with descriptive error messages.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ShareApi = void 0;
|
|
17
|
+
const tslib_1 = require("tslib");
|
|
18
|
+
const runtime = tslib_1.__importStar(require("../runtime"));
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class ShareApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Accepts a share invitation via DIAL Core, granting the authenticated user the invitation\'s access level, and returns the shared entity\'s identifier so the frontend can navigate to it.
|
|
25
|
+
* Accept a share invitation
|
|
26
|
+
*/
|
|
27
|
+
async acceptInvitationRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['invitationId'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('invitationId', 'Required parameter "invitationId" was null or undefined when calling acceptInvitation().');
|
|
30
|
+
}
|
|
31
|
+
const queryParameters = {};
|
|
32
|
+
const headerParameters = {};
|
|
33
|
+
let urlPath = `/api/v1/share/invitations/{invitationId}`;
|
|
34
|
+
urlPath = urlPath.replace(`{${'invitationId'}}`, encodeURIComponent(String(requestParameters['invitationId'])));
|
|
35
|
+
const response = await this.request({
|
|
36
|
+
path: urlPath,
|
|
37
|
+
method: 'GET',
|
|
38
|
+
headers: headerParameters,
|
|
39
|
+
query: queryParameters,
|
|
40
|
+
}, initOverrides);
|
|
41
|
+
return new runtime.JSONApiResponse(response);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Accepts a share invitation via DIAL Core, granting the authenticated user the invitation\'s access level, and returns the shared entity\'s identifier so the frontend can navigate to it.
|
|
45
|
+
* Accept a share invitation
|
|
46
|
+
*/
|
|
47
|
+
async acceptInvitation(requestParameters, initOverrides) {
|
|
48
|
+
const response = await this.acceptInvitationRaw(requestParameters, initOverrides);
|
|
49
|
+
return await response.value();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Creates a share link for a DIAL Core resource (catalog entity — agent, application, skill, toolset, or model — conversation, or prompt) by proxying DIAL Core\'s resource-sharing API. Returns the share URL, access level, and expiry.
|
|
53
|
+
* Create a share link
|
|
54
|
+
*/
|
|
55
|
+
async createShareLinkRaw(requestParameters, initOverrides) {
|
|
56
|
+
if (requestParameters['createShareLinkDto'] == null) {
|
|
57
|
+
throw new runtime.RequiredError('createShareLinkDto', 'Required parameter "createShareLinkDto" was null or undefined when calling createShareLink().');
|
|
58
|
+
}
|
|
59
|
+
const queryParameters = {};
|
|
60
|
+
const headerParameters = {};
|
|
61
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
62
|
+
let urlPath = `/api/v1/share`;
|
|
63
|
+
const response = await this.request({
|
|
64
|
+
path: urlPath,
|
|
65
|
+
method: 'POST',
|
|
66
|
+
headers: headerParameters,
|
|
67
|
+
query: queryParameters,
|
|
68
|
+
body: requestParameters['createShareLinkDto'],
|
|
69
|
+
}, initOverrides);
|
|
70
|
+
return new runtime.JSONApiResponse(response);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Creates a share link for a DIAL Core resource (catalog entity — agent, application, skill, toolset, or model — conversation, or prompt) by proxying DIAL Core\'s resource-sharing API. Returns the share URL, access level, and expiry.
|
|
74
|
+
* Create a share link
|
|
75
|
+
*/
|
|
76
|
+
async createShareLink(requestParameters, initOverrides) {
|
|
77
|
+
const response = await this.createShareLinkRaw(requestParameters, initOverrides);
|
|
78
|
+
return await response.value();
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Discards the authenticated user\'s own access to a shared catalog entity (application or toolset) or conversation, via DIAL Core\'s discardSharedResources operation. Only affects the caller\'s own access — removing access for everyone else is a separate operation.
|
|
82
|
+
* Discard a shared catalog resource or conversation
|
|
83
|
+
*/
|
|
84
|
+
async discardSharedCatalogItemRaw(requestParameters, initOverrides) {
|
|
85
|
+
if (requestParameters['discardSharedCatalogItemDto'] == null) {
|
|
86
|
+
throw new runtime.RequiredError('discardSharedCatalogItemDto', 'Required parameter "discardSharedCatalogItemDto" was null or undefined when calling discardSharedCatalogItem().');
|
|
87
|
+
}
|
|
88
|
+
const queryParameters = {};
|
|
89
|
+
const headerParameters = {};
|
|
90
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
91
|
+
let urlPath = `/api/v1/share/discard`;
|
|
92
|
+
const response = await this.request({
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
body: requestParameters['discardSharedCatalogItemDto'],
|
|
98
|
+
}, initOverrides);
|
|
99
|
+
return new runtime.JSONApiResponse(response);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Discards the authenticated user\'s own access to a shared catalog entity (application or toolset) or conversation, via DIAL Core\'s discardSharedResources operation. Only affects the caller\'s own access — removing access for everyone else is a separate operation.
|
|
103
|
+
* Discard a shared catalog resource or conversation
|
|
104
|
+
*/
|
|
105
|
+
async discardSharedCatalogItem(requestParameters, initOverrides) {
|
|
106
|
+
const response = await this.discardSharedCatalogItemRaw(requestParameters, initOverrides);
|
|
107
|
+
return await response.value();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Revokes every outstanding share grant on a catalog entity (application or toolset) or conversation the caller owns, via DIAL Core\'s revokeSharedResources operation. Affects all recipients at once — DIAL Core cannot target a single recipient. Discarding only the caller\'s own access to a resource shared with them is a separate operation.
|
|
111
|
+
* Revoke all shared access to an owned resource
|
|
112
|
+
*/
|
|
113
|
+
async revokeSharedAccessRaw(requestParameters, initOverrides) {
|
|
114
|
+
if (requestParameters['revokeSharedAccessDto'] == null) {
|
|
115
|
+
throw new runtime.RequiredError('revokeSharedAccessDto', 'Required parameter "revokeSharedAccessDto" was null or undefined when calling revokeSharedAccess().');
|
|
116
|
+
}
|
|
117
|
+
const queryParameters = {};
|
|
118
|
+
const headerParameters = {};
|
|
119
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
120
|
+
let urlPath = `/api/v1/share/revoke`;
|
|
121
|
+
const response = await this.request({
|
|
122
|
+
path: urlPath,
|
|
123
|
+
method: 'POST',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
body: requestParameters['revokeSharedAccessDto'],
|
|
127
|
+
}, initOverrides);
|
|
128
|
+
return new runtime.JSONApiResponse(response);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Revokes every outstanding share grant on a catalog entity (application or toolset) or conversation the caller owns, via DIAL Core\'s revokeSharedResources operation. Affects all recipients at once — DIAL Core cannot target a single recipient. Discarding only the caller\'s own access to a resource shared with them is a separate operation.
|
|
132
|
+
* Revoke all shared access to an owned resource
|
|
133
|
+
*/
|
|
134
|
+
async revokeSharedAccess(requestParameters, initOverrides) {
|
|
135
|
+
const response = await this.revokeSharedAccessRaw(requestParameters, initOverrides);
|
|
136
|
+
return await response.value();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.ShareApi = ShareApi;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat API
|
|
3
|
+
* REST API for the chat application. Provides endpoints for theme configuration, authentication, and management. All endpoints return appropriate HTTP status codes (200, 400, 401, 403, 404, 502, 503) with descriptive error messages.
|
|
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 { ThemeConfigResponseDto } from '../models/index';
|
|
14
|
+
export interface GetThemeIconRequest {
|
|
15
|
+
iconName: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class ThemesApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Fetches a theme icon as SVG or PNG content from the external themes service. The icon name is validated to prevent path traversal attacks - only alphanumeric characters, dashes, underscores, and dots are allowed. Results are cached for 5 minutes.
|
|
23
|
+
* Get theme icon
|
|
24
|
+
*/
|
|
25
|
+
getThemeIconRaw(requestParameters: GetThemeIconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
26
|
+
/**
|
|
27
|
+
* Fetches a theme icon as SVG or PNG content from the external themes service. The icon name is validated to prevent path traversal attacks - only alphanumeric characters, dashes, underscores, and dots are allowed. Results are cached for 5 minutes.
|
|
28
|
+
* Get theme icon
|
|
29
|
+
*/
|
|
30
|
+
getThemeIcon(requestParameters: GetThemeIconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Fetches the complete theme configuration from the external themes service. Returns a JSON object containing all available themes with their properties, colors, and icon references. Results are cached for 5 minutes.
|
|
33
|
+
* Get themes configuration
|
|
34
|
+
*/
|
|
35
|
+
getThemesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ThemeConfigResponseDto>>;
|
|
36
|
+
/**
|
|
37
|
+
* Fetches the complete theme configuration from the external themes service. Returns a JSON object containing all available themes with their properties, colors, and icon references. Results are cached for 5 minutes.
|
|
38
|
+
* Get themes configuration
|
|
39
|
+
*/
|
|
40
|
+
getThemes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ThemeConfigResponseDto>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=ThemesApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemesApi.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/ThemesApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,OAAO,CAAC,OAAO;IAC5C;;;OAGG;IACG,eAAe,CACnB,iBAAiB,EAAE,mBAAmB,EACtC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAmCvC;;;OAGG;IACG,YAAY,CAChB,iBAAiB,EAAE,mBAAmB,EACtC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,MAAM,CAAC;IAQlB;;;OAGG;IACG,YAAY,CAChB,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAoBvD;;;OAGG;IACG,SAAS,CACb,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,sBAAsB,CAAC;CAInC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Chat API
|
|
6
|
+
* REST API for the chat application. Provides endpoints for theme configuration, authentication, and management. All endpoints return appropriate HTTP status codes (200, 400, 401, 403, 404, 502, 503) with descriptive error messages.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ThemesApi = void 0;
|
|
17
|
+
const tslib_1 = require("tslib");
|
|
18
|
+
const runtime = tslib_1.__importStar(require("../runtime"));
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class ThemesApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Fetches a theme icon as SVG or PNG content from the external themes service. The icon name is validated to prevent path traversal attacks - only alphanumeric characters, dashes, underscores, and dots are allowed. Results are cached for 5 minutes.
|
|
25
|
+
* Get theme icon
|
|
26
|
+
*/
|
|
27
|
+
async getThemeIconRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['iconName'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('iconName', 'Required parameter "iconName" was null or undefined when calling getThemeIcon().');
|
|
30
|
+
}
|
|
31
|
+
const queryParameters = {};
|
|
32
|
+
if (requestParameters['iconName'] != null) {
|
|
33
|
+
queryParameters['iconName'] = requestParameters['iconName'];
|
|
34
|
+
}
|
|
35
|
+
const headerParameters = {};
|
|
36
|
+
let urlPath = `/api/themes/icon`;
|
|
37
|
+
const response = await this.request({
|
|
38
|
+
path: urlPath,
|
|
39
|
+
method: 'GET',
|
|
40
|
+
headers: headerParameters,
|
|
41
|
+
query: queryParameters,
|
|
42
|
+
}, initOverrides);
|
|
43
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
44
|
+
return new runtime.JSONApiResponse(response);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return new runtime.TextApiResponse(response);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Fetches a theme icon as SVG or PNG content from the external themes service. The icon name is validated to prevent path traversal attacks - only alphanumeric characters, dashes, underscores, and dots are allowed. Results are cached for 5 minutes.
|
|
52
|
+
* Get theme icon
|
|
53
|
+
*/
|
|
54
|
+
async getThemeIcon(requestParameters, initOverrides) {
|
|
55
|
+
const response = await this.getThemeIconRaw(requestParameters, initOverrides);
|
|
56
|
+
return await response.value();
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Fetches the complete theme configuration from the external themes service. Returns a JSON object containing all available themes with their properties, colors, and icon references. Results are cached for 5 minutes.
|
|
60
|
+
* Get themes configuration
|
|
61
|
+
*/
|
|
62
|
+
async getThemesRaw(initOverrides) {
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
const headerParameters = {};
|
|
65
|
+
let urlPath = `/api/themes`;
|
|
66
|
+
const response = await this.request({
|
|
67
|
+
path: urlPath,
|
|
68
|
+
method: 'GET',
|
|
69
|
+
headers: headerParameters,
|
|
70
|
+
query: queryParameters,
|
|
71
|
+
}, initOverrides);
|
|
72
|
+
return new runtime.JSONApiResponse(response);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Fetches the complete theme configuration from the external themes service. Returns a JSON object containing all available themes with their properties, colors, and icon references. Results are cached for 5 minutes.
|
|
76
|
+
* Get themes configuration
|
|
77
|
+
*/
|
|
78
|
+
async getThemes(initOverrides) {
|
|
79
|
+
const response = await this.getThemesRaw(initOverrides);
|
|
80
|
+
return await response.value();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.ThemesApi = ThemesApi;
|