@epam/ai-dial-chat-api-client 1.4.0-dev.96 → 1.4.0-rc.1
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/ContentSourcesApi.d.ts +60 -0
- package/generated/src/apis/ContentSourcesApi.d.ts.map +1 -0
- package/generated/src/apis/ContentSourcesApi.js +140 -0
- package/generated/src/apis/ProjectsApi.d.ts +6 -6
- package/generated/src/apis/ProjectsApi.js +6 -6
- package/generated/src/apis/PublishApi.d.ts +48 -20
- package/generated/src/apis/PublishApi.d.ts.map +1 -1
- package/generated/src/apis/PublishApi.js +98 -40
- package/generated/src/apis/UserApi.d.ts +16 -1
- package/generated/src/apis/UserApi.d.ts.map +1 -1
- package/generated/src/apis/UserApi.js +43 -0
- package/generated/src/apis/index.d.ts +1 -0
- package/generated/src/apis/index.d.ts.map +1 -1
- package/generated/src/apis/index.js +1 -0
- package/generated/src/models/index.d.ts +697 -61
- package/generated/src/models/index.d.ts.map +1 -1
- package/generated/src/models/index.js +90 -10
- package/package.json +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.UnpublishCatalogEntityEntityTypeEnum = exports.PublishCatalogEntityEntityTypeEnum = exports.GetCatalogVersionStatusesEntityTypeEnum = exports.GetCatalogUnpublishAccessEntityTypeEnum = exports.GetCatalogPublishHistoryEntityTypeEnum = exports.GetCatalogPublishDependenciesEntityTypeEnum = exports.CopyCatalogEntityToOrgUnitEntityTypeEnum = exports.PublishApi = void 0;
|
|
16
|
+
exports.UnpublishCatalogEntityEntityTypeEnum = exports.PublishCatalogEntityEntityTypeEnum = exports.GetCatalogVersionStatusesEntityTypeEnum = exports.GetCatalogUnpublishAccessEntityTypeEnum = exports.GetCatalogPublishTargetEntityTypeEnum = exports.GetCatalogPublishHistoryEntityTypeEnum = exports.GetCatalogPublishDependenciesEntityTypeEnum = exports.CopyCatalogEntityToOrgUnitEntityTypeEnum = exports.PublishApi = void 0;
|
|
17
17
|
const runtime = require("../runtime");
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
class PublishApi extends runtime.BaseAPI {
|
|
22
22
|
/**
|
|
23
|
-
* Copies a catalog entity of the caller\'s own bucket into `folderPath` of the public bucket under the same name, by proxying DIAL Core\'s resource copy. No publication request is created: DIAL Core decides whether the caller may write into the folder and applies its per-type rules to the copy, and its 403 and 409 are returned as they are. Applications, toolsets, prompts and skills are supported; other types answer 400. A target that already exists answers 409: the copy never overwrites. Answers 403 while the `features.orgUnitsEnabled` flag is off.
|
|
23
|
+
* Copies a catalog entity of the caller\'s own bucket into `folderPath` of the public bucket under the same name (or, when `version` is given, under the name a publication of that version would use), by proxying DIAL Core\'s resource copy. No publication request is created: DIAL Core decides whether the caller may write into the folder and applies its per-type rules to the copy, and its 403 and 409 are returned as they are. Applications, toolsets, prompts and skills are supported; other types answer 400. A target that already exists answers 409: the copy never overwrites. An application is copied together with its first-level private dependencies (in the caller\'s own bucket, written under a `.{application}.deps` folder next to it) and its uploaded icon, and refers to the copies; a dependency already copied is reused, and an icon that cannot be copied is dropped from the shared copy. A `publications` right is not checked here: DIAL Core does not enforce it on a copy. Before the first copy the caller must hold `write` in the folder\'s org unit on the namespace of the application and of every dependency to copy, otherwise the answer is 403 naming the missing namespaces and nothing is written. An application that refers to a folder of files, or whose application dependency to be copied does, is written only for a DIAL admin, because DIAL Core copies such an application only for one; every other caller gets 422 with `code` `folderReferenceNeedsRequest` and nothing is written, and has to use a publication request. Answers 403 while the `features.orgUnitsEnabled` flag is off.
|
|
24
24
|
* Copy an own catalog entity into an org-unit folder
|
|
25
25
|
*/
|
|
26
26
|
async copyCatalogEntityToOrgUnitRaw(requestParameters, initOverrides) {
|
|
@@ -56,7 +56,7 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
56
56
|
return new runtime.JSONApiResponse(response);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Copies a catalog entity of the caller\'s own bucket into `folderPath` of the public bucket under the same name, by proxying DIAL Core\'s resource copy. No publication request is created: DIAL Core decides whether the caller may write into the folder and applies its per-type rules to the copy, and its 403 and 409 are returned as they are. Applications, toolsets, prompts and skills are supported; other types answer 400. A target that already exists answers 409: the copy never overwrites. Answers 403 while the `features.orgUnitsEnabled` flag is off.
|
|
59
|
+
* Copies a catalog entity of the caller\'s own bucket into `folderPath` of the public bucket under the same name (or, when `version` is given, under the name a publication of that version would use), by proxying DIAL Core\'s resource copy. No publication request is created: DIAL Core decides whether the caller may write into the folder and applies its per-type rules to the copy, and its 403 and 409 are returned as they are. Applications, toolsets, prompts and skills are supported; other types answer 400. A target that already exists answers 409: the copy never overwrites. An application is copied together with its first-level private dependencies (in the caller\'s own bucket, written under a `.{application}.deps` folder next to it) and its uploaded icon, and refers to the copies; a dependency already copied is reused, and an icon that cannot be copied is dropped from the shared copy. A `publications` right is not checked here: DIAL Core does not enforce it on a copy. Before the first copy the caller must hold `write` in the folder\'s org unit on the namespace of the application and of every dependency to copy, otherwise the answer is 403 naming the missing namespaces and nothing is written. An application that refers to a folder of files, or whose application dependency to be copied does, is written only for a DIAL admin, because DIAL Core copies such an application only for one; every other caller gets 422 with `code` `folderReferenceNeedsRequest` and nothing is written, and has to use a publication request. Answers 403 while the `features.orgUnitsEnabled` flag is off.
|
|
60
60
|
* Copy an own catalog entity into an org-unit folder
|
|
61
61
|
*/
|
|
62
62
|
async copyCatalogEntityToOrgUnit(requestParameters, initOverrides) {
|
|
@@ -64,7 +64,43 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
64
64
|
return await response.value();
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
* Returns the
|
|
67
|
+
* Returns the references in the given application property values that are not in the public bucket and travel with the application when it is written into an org unit: the caller’s own resources and files; resources in another user’s bucket are left out. Unlike the entity route it reads no application from DIAL Core, only the application type schema, so it works before the first save. The list is advisory: when it cannot be resolved the response is an empty list rather than an error.
|
|
68
|
+
* List the private dependencies of unsaved application values
|
|
69
|
+
*/
|
|
70
|
+
async getApplicationValuesPublishDependenciesRaw(requestParameters, initOverrides) {
|
|
71
|
+
if (requestParameters['applicationValuesDependenciesRequestDto'] == null) {
|
|
72
|
+
throw new runtime.RequiredError('applicationValuesDependenciesRequestDto', 'Required parameter "applicationValuesDependenciesRequestDto" was null or undefined when calling getApplicationValuesPublishDependencies().');
|
|
73
|
+
}
|
|
74
|
+
const queryParameters = {};
|
|
75
|
+
const headerParameters = {};
|
|
76
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
77
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
78
|
+
const token = this.configuration.accessToken;
|
|
79
|
+
const tokenString = await token('bearer', []);
|
|
80
|
+
if (tokenString) {
|
|
81
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
let urlPath = `/api/v1/catalog/application-values/publish-dependencies`;
|
|
85
|
+
const response = await this.request({
|
|
86
|
+
path: urlPath,
|
|
87
|
+
method: 'POST',
|
|
88
|
+
headers: headerParameters,
|
|
89
|
+
query: queryParameters,
|
|
90
|
+
body: requestParameters['applicationValuesDependenciesRequestDto'],
|
|
91
|
+
}, initOverrides);
|
|
92
|
+
return new runtime.JSONApiResponse(response);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Returns the references in the given application property values that are not in the public bucket and travel with the application when it is written into an org unit: the caller’s own resources and files; resources in another user’s bucket are left out. Unlike the entity route it reads no application from DIAL Core, only the application type schema, so it works before the first save. The list is advisory: when it cannot be resolved the response is an empty list rather than an error.
|
|
96
|
+
* List the private dependencies of unsaved application values
|
|
97
|
+
*/
|
|
98
|
+
async getApplicationValuesPublishDependencies(requestParameters, initOverrides) {
|
|
99
|
+
const response = await this.getApplicationValuesPublishDependenciesRaw(requestParameters, initOverrides);
|
|
100
|
+
return await response.value();
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Returns the direct references of a catalog entity (Toolset, Application, Prompt, Skill or Project) that are not in the public bucket. For an application, publishing carries the listed skills, prompts, toolsets and applications along with it; for other kinds the publisher has to publish them separately before the published copy reaches its audience. Resources that publishing already carries along (the application icon and its declared files) are not listed, and a dependency’s own dependencies are not followed. The list is advisory: when it cannot be resolved the response is an empty list rather than an error. Kinds that reference no other resource always return an empty list.
|
|
68
104
|
* List the private dependencies of a catalog entity
|
|
69
105
|
*/
|
|
70
106
|
async getCatalogPublishDependenciesRaw(requestParameters, initOverrides) {
|
|
@@ -95,7 +131,7 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
95
131
|
return new runtime.JSONApiResponse(response);
|
|
96
132
|
}
|
|
97
133
|
/**
|
|
98
|
-
* Returns the direct references of a catalog entity (Toolset, Application, Prompt, Skill or Project) that are not in the public bucket,
|
|
134
|
+
* Returns the direct references of a catalog entity (Toolset, Application, Prompt, Skill or Project) that are not in the public bucket. For an application, publishing carries the listed skills, prompts, toolsets and applications along with it; for other kinds the publisher has to publish them separately before the published copy reaches its audience. Resources that publishing already carries along (the application icon and its declared files) are not listed, and a dependency’s own dependencies are not followed. The list is advisory: when it cannot be resolved the response is an empty list rather than an error. Kinds that reference no other resource always return an empty list.
|
|
99
135
|
* List the private dependencies of a catalog entity
|
|
100
136
|
*/
|
|
101
137
|
async getCatalogPublishDependencies(requestParameters, initOverrides) {
|
|
@@ -142,17 +178,26 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
142
178
|
return await response.value();
|
|
143
179
|
}
|
|
144
180
|
/**
|
|
145
|
-
*
|
|
146
|
-
* Check whether the
|
|
181
|
+
* Derives the path a publish of this entity into `folderPath` (and `version`) would create, exactly as the publish endpoint does, and reads that path\'s metadata with the caller\'s own token. Creates nothing. `taken: false` means no resource was found, not that none is there: a copy hidden from the caller by access rules, or one still pending approval, is not detected, and another publication can land before the caller submits. The publish endpoint answers `409` `target-exists` for those cases.
|
|
182
|
+
* Check whether the published copy of an entity would land on a taken path
|
|
147
183
|
*/
|
|
148
|
-
async
|
|
184
|
+
async getCatalogPublishTargetRaw(requestParameters, initOverrides) {
|
|
149
185
|
if (requestParameters['entityType'] == null) {
|
|
150
|
-
throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling
|
|
186
|
+
throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getCatalogPublishTarget().');
|
|
151
187
|
}
|
|
152
188
|
if (requestParameters['entityId'] == null) {
|
|
153
|
-
throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling
|
|
189
|
+
throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getCatalogPublishTarget().');
|
|
190
|
+
}
|
|
191
|
+
if (requestParameters['folderPath'] == null) {
|
|
192
|
+
throw new runtime.RequiredError('folderPath', 'Required parameter "folderPath" was null or undefined when calling getCatalogPublishTarget().');
|
|
154
193
|
}
|
|
155
194
|
const queryParameters = {};
|
|
195
|
+
if (requestParameters['folderPath'] != null) {
|
|
196
|
+
queryParameters['folderPath'] = requestParameters['folderPath'];
|
|
197
|
+
}
|
|
198
|
+
if (requestParameters['version'] != null) {
|
|
199
|
+
queryParameters['version'] = requestParameters['version'];
|
|
200
|
+
}
|
|
156
201
|
const headerParameters = {};
|
|
157
202
|
if (this.configuration && this.configuration.accessToken) {
|
|
158
203
|
const token = this.configuration.accessToken;
|
|
@@ -161,7 +206,7 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
161
206
|
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
162
207
|
}
|
|
163
208
|
}
|
|
164
|
-
let urlPath = `/api/v1/catalog/{entityType}/{entityId}/
|
|
209
|
+
let urlPath = `/api/v1/catalog/{entityType}/{entityId}/publish-target`;
|
|
165
210
|
urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
|
|
166
211
|
urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
|
|
167
212
|
const response = await this.request({
|
|
@@ -173,23 +218,23 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
173
218
|
return new runtime.JSONApiResponse(response);
|
|
174
219
|
}
|
|
175
220
|
/**
|
|
176
|
-
*
|
|
177
|
-
* Check whether the
|
|
221
|
+
* Derives the path a publish of this entity into `folderPath` (and `version`) would create, exactly as the publish endpoint does, and reads that path\'s metadata with the caller\'s own token. Creates nothing. `taken: false` means no resource was found, not that none is there: a copy hidden from the caller by access rules, or one still pending approval, is not detected, and another publication can land before the caller submits. The publish endpoint answers `409` `target-exists` for those cases.
|
|
222
|
+
* Check whether the published copy of an entity would land on a taken path
|
|
178
223
|
*/
|
|
179
|
-
async
|
|
180
|
-
const response = await this.
|
|
224
|
+
async getCatalogPublishTarget(requestParameters, initOverrides) {
|
|
225
|
+
const response = await this.getCatalogPublishTargetRaw(requestParameters, initOverrides);
|
|
181
226
|
return await response.value();
|
|
182
227
|
}
|
|
183
228
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
229
|
+
* Reports whether the session user may submit an unpublish request for this entity: true for an administrator, for an entity in their own bucket, and for the publisher of a public copy (the bucket holding the live publication that created it). It reveals only the caller’s own permission, never who published the entity, and creates nothing. A negative answer is a 200 with `canUnpublish: false`.
|
|
230
|
+
* Check whether the caller may request removal of a catalog entity
|
|
186
231
|
*/
|
|
187
|
-
async
|
|
232
|
+
async getCatalogUnpublishAccessRaw(requestParameters, initOverrides) {
|
|
188
233
|
if (requestParameters['entityType'] == null) {
|
|
189
|
-
throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling
|
|
234
|
+
throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getCatalogUnpublishAccess().');
|
|
190
235
|
}
|
|
191
236
|
if (requestParameters['entityId'] == null) {
|
|
192
|
-
throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling
|
|
237
|
+
throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getCatalogUnpublishAccess().');
|
|
193
238
|
}
|
|
194
239
|
const queryParameters = {};
|
|
195
240
|
const headerParameters = {};
|
|
@@ -200,7 +245,7 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
200
245
|
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
201
246
|
}
|
|
202
247
|
}
|
|
203
|
-
let urlPath = `/api/v1/catalog/{entityType}/{entityId}/
|
|
248
|
+
let urlPath = `/api/v1/catalog/{entityType}/{entityId}/unpublish-access`;
|
|
204
249
|
urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
|
|
205
250
|
urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
|
|
206
251
|
const response = await this.request({
|
|
@@ -212,25 +257,25 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
212
257
|
return new runtime.JSONApiResponse(response);
|
|
213
258
|
}
|
|
214
259
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
260
|
+
* Reports whether the session user may submit an unpublish request for this entity: true for an administrator, for an entity in their own bucket, and for the publisher of a public copy (the bucket holding the live publication that created it). It reveals only the caller’s own permission, never who published the entity, and creates nothing. A negative answer is a 200 with `canUnpublish: false`.
|
|
261
|
+
* Check whether the caller may request removal of a catalog entity
|
|
217
262
|
*/
|
|
218
|
-
async
|
|
219
|
-
const response = await this.
|
|
263
|
+
async getCatalogUnpublishAccess(requestParameters, initOverrides) {
|
|
264
|
+
const response = await this.getCatalogUnpublishAccessRaw(requestParameters, initOverrides);
|
|
220
265
|
return await response.value();
|
|
221
266
|
}
|
|
222
267
|
/**
|
|
223
|
-
* Returns the
|
|
224
|
-
* Get
|
|
268
|
+
* Returns one entry per saved version of the application or toolset (same owner, folder and base name) with its publication status: `not-published`, `in-review`, `published` (with its folders and publisher) or `unknown` for a resource owned by another user. Derived from the caller’s own publications in DIAL Core, read once per request, and never from chat-api-side storage. Only applications and toolsets have versions.
|
|
269
|
+
* Get the publication status of every version of an entity
|
|
225
270
|
*/
|
|
226
|
-
async
|
|
227
|
-
if (requestParameters['
|
|
228
|
-
throw new runtime.RequiredError('
|
|
271
|
+
async getCatalogVersionStatusesRaw(requestParameters, initOverrides) {
|
|
272
|
+
if (requestParameters['entityType'] == null) {
|
|
273
|
+
throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getCatalogVersionStatuses().');
|
|
229
274
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
queryParameters['folderPath'] = requestParameters['folderPath'];
|
|
275
|
+
if (requestParameters['entityId'] == null) {
|
|
276
|
+
throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getCatalogVersionStatuses().');
|
|
233
277
|
}
|
|
278
|
+
const queryParameters = {};
|
|
234
279
|
const headerParameters = {};
|
|
235
280
|
if (this.configuration && this.configuration.accessToken) {
|
|
236
281
|
const token = this.configuration.accessToken;
|
|
@@ -239,7 +284,9 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
239
284
|
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
240
285
|
}
|
|
241
286
|
}
|
|
242
|
-
let urlPath = `/api/v1/
|
|
287
|
+
let urlPath = `/api/v1/catalog/{entityType}/{entityId}/version-statuses`;
|
|
288
|
+
urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
|
|
289
|
+
urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
|
|
243
290
|
const response = await this.request({
|
|
244
291
|
path: urlPath,
|
|
245
292
|
method: 'GET',
|
|
@@ -249,15 +296,15 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
249
296
|
return new runtime.JSONApiResponse(response);
|
|
250
297
|
}
|
|
251
298
|
/**
|
|
252
|
-
* Returns the
|
|
253
|
-
* Get
|
|
299
|
+
* Returns one entry per saved version of the application or toolset (same owner, folder and base name) with its publication status: `not-published`, `in-review`, `published` (with its folders and publisher) or `unknown` for a resource owned by another user. Derived from the caller’s own publications in DIAL Core, read once per request, and never from chat-api-side storage. Only applications and toolsets have versions.
|
|
300
|
+
* Get the publication status of every version of an entity
|
|
254
301
|
*/
|
|
255
|
-
async
|
|
256
|
-
const response = await this.
|
|
302
|
+
async getCatalogVersionStatuses(requestParameters, initOverrides) {
|
|
303
|
+
const response = await this.getCatalogVersionStatusesRaw(requestParameters, initOverrides);
|
|
257
304
|
return await response.value();
|
|
258
305
|
}
|
|
259
306
|
/**
|
|
260
|
-
* Publishes a catalog entity (Toolset, Application, Prompt, or Skill) to a folder under the Organization/public bucket by proxying DIAL Core\'s Publication API (`createPublication`). This endpoint keeps no publish records of its own — DIAL Core is the sole source of truth. The optional `author` sets the publication\'s displayed author (the catalog\'s **Hosted by** value); when it is omitted or blank the caller\'s own session display name is used, as it always was. The optional `publishCredentials` flag asks Core to copy the publisher\'s own credential for the entity onto the published copy, so members of the organization use it without authorising individually; it is forwarded unchanged and changes no authorization — Core still derives the actor from the bearer token, enforces target-folder write access, and holds the publication PENDING until an administrator approves it.
|
|
307
|
+
* Publishes a catalog entity (Toolset, Application, Prompt, or Skill) to a folder under the Organization/public bucket by proxying DIAL Core\'s Publication API (`createPublication`). This endpoint keeps no publish records of its own — DIAL Core is the sole source of truth. The optional `author` sets the publication\'s displayed author (the catalog\'s **Hosted by** value); when it is omitted or blank the caller\'s own session display name is used, as it always was. The optional `publishCredentials` flag asks Core to copy the publisher\'s own credential for the entity onto the published copy, so members of the organization use it without authorising individually; it is forwarded unchanged and changes no authorization — Core still derives the actor from the bearer token, enforces target-folder write access, and holds the publication PENDING until an administrator approves it. Publishing an application also publishes its first-level private dependencies (skills, prompts, toolsets, applications) in the same DIAL Core request, so the published application works for other users; a temporary copy of the application, with its references rewritten, is the request\'s source and is deleted when the call returns. The author\'s own application is never modified.
|
|
261
308
|
* Publish a catalog entity to an Organization folder
|
|
262
309
|
*/
|
|
263
310
|
async publishCatalogEntityRaw(requestParameters, initOverrides) {
|
|
@@ -293,7 +340,7 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
293
340
|
return new runtime.JSONApiResponse(response);
|
|
294
341
|
}
|
|
295
342
|
/**
|
|
296
|
-
* Publishes a catalog entity (Toolset, Application, Prompt, or Skill) to a folder under the Organization/public bucket by proxying DIAL Core\'s Publication API (`createPublication`). This endpoint keeps no publish records of its own — DIAL Core is the sole source of truth. The optional `author` sets the publication\'s displayed author (the catalog\'s **Hosted by** value); when it is omitted or blank the caller\'s own session display name is used, as it always was. The optional `publishCredentials` flag asks Core to copy the publisher\'s own credential for the entity onto the published copy, so members of the organization use it without authorising individually; it is forwarded unchanged and changes no authorization — Core still derives the actor from the bearer token, enforces target-folder write access, and holds the publication PENDING until an administrator approves it.
|
|
343
|
+
* Publishes a catalog entity (Toolset, Application, Prompt, or Skill) to a folder under the Organization/public bucket by proxying DIAL Core\'s Publication API (`createPublication`). This endpoint keeps no publish records of its own — DIAL Core is the sole source of truth. The optional `author` sets the publication\'s displayed author (the catalog\'s **Hosted by** value); when it is omitted or blank the caller\'s own session display name is used, as it always was. The optional `publishCredentials` flag asks Core to copy the publisher\'s own credential for the entity onto the published copy, so members of the organization use it without authorising individually; it is forwarded unchanged and changes no authorization — Core still derives the actor from the bearer token, enforces target-folder write access, and holds the publication PENDING until an administrator approves it. Publishing an application also publishes its first-level private dependencies (skills, prompts, toolsets, applications) in the same DIAL Core request, so the published application works for other users; a temporary copy of the application, with its references rewritten, is the request\'s source and is deleted when the call returns. The author\'s own application is never modified.
|
|
297
344
|
* Publish a catalog entity to an Organization folder
|
|
298
345
|
*/
|
|
299
346
|
async publishCatalogEntity(requestParameters, initOverrides) {
|
|
@@ -379,6 +426,17 @@ exports.GetCatalogPublishHistoryEntityTypeEnum = {
|
|
|
379
426
|
Skill: 'skill',
|
|
380
427
|
Project: 'project',
|
|
381
428
|
};
|
|
429
|
+
/**
|
|
430
|
+
* @export
|
|
431
|
+
*/
|
|
432
|
+
exports.GetCatalogPublishTargetEntityTypeEnum = {
|
|
433
|
+
Model: 'model',
|
|
434
|
+
Toolset: 'toolset',
|
|
435
|
+
Application: 'application',
|
|
436
|
+
Prompt: 'prompt',
|
|
437
|
+
Skill: 'skill',
|
|
438
|
+
Project: 'project',
|
|
439
|
+
};
|
|
382
440
|
/**
|
|
383
441
|
* @export
|
|
384
442
|
*/
|
|
@@ -10,13 +10,18 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { UserLimitStatsResponseDto } from '../models/index';
|
|
13
|
+
import type { UsageHistoryPeriod, UserLimitStatsResponseDto, UserUsageHistoryResponseDto } from '../models/index';
|
|
14
14
|
export interface GetUserLimitsRequest {
|
|
15
15
|
deploymentTypes?: Array<GetUserLimitsDeploymentTypesEnum>;
|
|
16
16
|
}
|
|
17
17
|
export interface GetUserUsageRequest {
|
|
18
18
|
deploymentTypes?: Array<GetUserUsageDeploymentTypesEnum>;
|
|
19
19
|
}
|
|
20
|
+
export interface GetUserUsageHistoryRequest {
|
|
21
|
+
period: UsageHistoryPeriod;
|
|
22
|
+
costObject?: string;
|
|
23
|
+
policy?: string;
|
|
24
|
+
}
|
|
20
25
|
/**
|
|
21
26
|
*
|
|
22
27
|
*/
|
|
@@ -41,6 +46,16 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
41
46
|
* Get usage limits for deployments used in the current calendar periods
|
|
42
47
|
*/
|
|
43
48
|
getUserUsage(requestParameters?: GetUserUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserLimitStatsResponseDto>;
|
|
49
|
+
/**
|
|
50
|
+
* Returns the signed-in user\'s spend and request counts from DIAL Analytics (ADAS) for the current UTC day, ISO week (Monday start) or month, from its start to the request time: totals, one zero-filled entry per UTC date, the top 10 root deployments by spend plus an `other` remainder, and the split by client type when the `usage_client_identity` enrichment is available. Each user request counts once (root spans only), with its chain-inclusive price. With `costObject` and `policy` (a `budgets` entry of `GET /user/limits`), every figure is narrowed to the model calls that budget paid for, each at its own price, as DIAL Core logs the charged budget (ai-dial-core#2308); without budget columns in DIAL Analytics the answer is `budget_unsupported`. The BFF forwards the caller\'s session access token to ADAS, and every query keeps only the caller\'s own rows (`user_hash = caller.user_hash`, resolved by ADAS from the token), on top of the ADAS row policies, so an ADAS administrator also sees only their own usage; a caller who cannot read the usage log, an ADAS without query caller values, or a column policy that hides `user_hash` from the caller gets `forbidden`. When ADAS cannot answer, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
51
|
+
* Get the caller\'s own usage history for the current UTC day, week or month
|
|
52
|
+
*/
|
|
53
|
+
getUserUsageHistoryRaw(requestParameters: GetUserUsageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserUsageHistoryResponseDto>>;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the signed-in user\'s spend and request counts from DIAL Analytics (ADAS) for the current UTC day, ISO week (Monday start) or month, from its start to the request time: totals, one zero-filled entry per UTC date, the top 10 root deployments by spend plus an `other` remainder, and the split by client type when the `usage_client_identity` enrichment is available. Each user request counts once (root spans only), with its chain-inclusive price. With `costObject` and `policy` (a `budgets` entry of `GET /user/limits`), every figure is narrowed to the model calls that budget paid for, each at its own price, as DIAL Core logs the charged budget (ai-dial-core#2308); without budget columns in DIAL Analytics the answer is `budget_unsupported`. The BFF forwards the caller\'s session access token to ADAS, and every query keeps only the caller\'s own rows (`user_hash = caller.user_hash`, resolved by ADAS from the token), on top of the ADAS row policies, so an ADAS administrator also sees only their own usage; a caller who cannot read the usage log, an ADAS without query caller values, or a column policy that hides `user_hash` from the caller gets `forbidden`. When ADAS cannot answer, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
56
|
+
* Get the caller\'s own usage history for the current UTC day, week or month
|
|
57
|
+
*/
|
|
58
|
+
getUserUsageHistory(requestParameters: GetUserUsageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserUsageHistoryResponseDto>;
|
|
44
59
|
}
|
|
45
60
|
/**
|
|
46
61
|
* @export
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserApi.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/UserApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"UserApi.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/UserApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,mBAAmB;IAClC,eAAe,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,OAAO,CAAC,OAAO;IAC1C;;;OAGG;IACG,gBAAgB,CACpB,iBAAiB,EAAE,oBAAoB,EACvC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;IAiC1D;;;OAGG;IACG,aAAa,CACjB,iBAAiB,GAAE,oBAAyB,EAC5C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,yBAAyB,CAAC;IAQrC;;;OAGG;IACG,eAAe,CACnB,iBAAiB,EAAE,mBAAmB,EACtC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;IAiC1D;;;OAGG;IACG,YAAY,CAChB,iBAAiB,GAAE,mBAAwB,EAC3C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,yBAAyB,CAAC;IAQrC;;;OAGG;IACG,sBAAsB,CAC1B,iBAAiB,EAAE,0BAA0B,EAC7C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAgD5D;;;OAGG;IACG,mBAAmB,CACvB,iBAAiB,EAAE,0BAA0B,EAC7C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,2BAA2B,CAAC;CAOxC;AAED;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;CAGnC,CAAC;AACX,MAAM,MAAM,gCAAgC,GAC1C,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,OAAO,gCAAgC,CAAC,CAAC;AAC3F;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;CAGlC,CAAC;AACX,MAAM,MAAM,+BAA+B,GACzC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,OAAO,+BAA+B,CAAC,CAAC"}
|
|
@@ -87,6 +87,49 @@ class UserApi extends runtime.BaseAPI {
|
|
|
87
87
|
const response = await this.getUserUsageRaw(requestParameters, initOverrides);
|
|
88
88
|
return await response.value();
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Returns the signed-in user\'s spend and request counts from DIAL Analytics (ADAS) for the current UTC day, ISO week (Monday start) or month, from its start to the request time: totals, one zero-filled entry per UTC date, the top 10 root deployments by spend plus an `other` remainder, and the split by client type when the `usage_client_identity` enrichment is available. Each user request counts once (root spans only), with its chain-inclusive price. With `costObject` and `policy` (a `budgets` entry of `GET /user/limits`), every figure is narrowed to the model calls that budget paid for, each at its own price, as DIAL Core logs the charged budget (ai-dial-core#2308); without budget columns in DIAL Analytics the answer is `budget_unsupported`. The BFF forwards the caller\'s session access token to ADAS, and every query keeps only the caller\'s own rows (`user_hash = caller.user_hash`, resolved by ADAS from the token), on top of the ADAS row policies, so an ADAS administrator also sees only their own usage; a caller who cannot read the usage log, an ADAS without query caller values, or a column policy that hides `user_hash` from the caller gets `forbidden`. When ADAS cannot answer, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
92
|
+
* Get the caller\'s own usage history for the current UTC day, week or month
|
|
93
|
+
*/
|
|
94
|
+
async getUserUsageHistoryRaw(requestParameters, initOverrides) {
|
|
95
|
+
if (requestParameters['period'] == null) {
|
|
96
|
+
throw new runtime.RequiredError('period', 'Required parameter "period" was null or undefined when calling getUserUsageHistory().');
|
|
97
|
+
}
|
|
98
|
+
const queryParameters = {};
|
|
99
|
+
if (requestParameters['period'] != null) {
|
|
100
|
+
queryParameters['period'] = requestParameters['period'];
|
|
101
|
+
}
|
|
102
|
+
if (requestParameters['costObject'] != null) {
|
|
103
|
+
queryParameters['costObject'] = requestParameters['costObject'];
|
|
104
|
+
}
|
|
105
|
+
if (requestParameters['policy'] != null) {
|
|
106
|
+
queryParameters['policy'] = requestParameters['policy'];
|
|
107
|
+
}
|
|
108
|
+
const headerParameters = {};
|
|
109
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
110
|
+
const token = this.configuration.accessToken;
|
|
111
|
+
const tokenString = await token('bearer', []);
|
|
112
|
+
if (tokenString) {
|
|
113
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
let urlPath = `/api/v1/user/usage/history`;
|
|
117
|
+
const response = await this.request({
|
|
118
|
+
path: urlPath,
|
|
119
|
+
method: 'GET',
|
|
120
|
+
headers: headerParameters,
|
|
121
|
+
query: queryParameters,
|
|
122
|
+
}, initOverrides);
|
|
123
|
+
return new runtime.JSONApiResponse(response);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Returns the signed-in user\'s spend and request counts from DIAL Analytics (ADAS) for the current UTC day, ISO week (Monday start) or month, from its start to the request time: totals, one zero-filled entry per UTC date, the top 10 root deployments by spend plus an `other` remainder, and the split by client type when the `usage_client_identity` enrichment is available. Each user request counts once (root spans only), with its chain-inclusive price. With `costObject` and `policy` (a `budgets` entry of `GET /user/limits`), every figure is narrowed to the model calls that budget paid for, each at its own price, as DIAL Core logs the charged budget (ai-dial-core#2308); without budget columns in DIAL Analytics the answer is `budget_unsupported`. The BFF forwards the caller\'s session access token to ADAS, and every query keeps only the caller\'s own rows (`user_hash = caller.user_hash`, resolved by ADAS from the token), on top of the ADAS row policies, so an ADAS administrator also sees only their own usage; a caller who cannot read the usage log, an ADAS without query caller values, or a column policy that hides `user_hash` from the caller gets `forbidden`. When ADAS cannot answer, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
127
|
+
* Get the caller\'s own usage history for the current UTC day, week or month
|
|
128
|
+
*/
|
|
129
|
+
async getUserUsageHistory(requestParameters, initOverrides) {
|
|
130
|
+
const response = await this.getUserUsageHistoryRaw(requestParameters, initOverrides);
|
|
131
|
+
return await response.value();
|
|
132
|
+
}
|
|
90
133
|
}
|
|
91
134
|
exports.UserApi = UserApi;
|
|
92
135
|
/**
|
|
@@ -4,6 +4,7 @@ export * from './AuthApi';
|
|
|
4
4
|
export * from './CelebrationsApi';
|
|
5
5
|
export * from './ChatApi';
|
|
6
6
|
export * from './ClientChannelApi';
|
|
7
|
+
export * from './ContentSourcesApi';
|
|
7
8
|
export * from './ConversationsApi';
|
|
8
9
|
export * from './CustomApiApi';
|
|
9
10
|
export * from './DeploymentsApi';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/index.ts"],"names":[],"mappings":"AAEA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/index.ts"],"names":[],"mappings":"AAEA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
|
|
@@ -9,6 +9,7 @@ tslib_1.__exportStar(require("./AuthApi"), exports);
|
|
|
9
9
|
tslib_1.__exportStar(require("./CelebrationsApi"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./ChatApi"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./ClientChannelApi"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./ContentSourcesApi"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./ConversationsApi"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./CustomApiApi"), exports);
|
|
14
15
|
tslib_1.__exportStar(require("./DeploymentsApi"), exports);
|