@epam/ai-dial-chat-api-client 1.4.0-dev.12 → 1.4.0-dev.124

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.
@@ -10,15 +10,37 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { PublishCatalogEntityDto, PublishHistoryEntryDto, PublishResultDto, PublishRulesResultDto, UnpublishAccessDto, UnpublishCatalogEntityDto, UnpublishResultDto } from '../models/index';
13
+ import type { ApplicationValuesDependenciesRequestDto, CopyCatalogEntityToOrgUnitDto, PublishCatalogEntityDto, PublishHistoryEntryDto, PublishResultDto, PublishRulesResultDto, PublishTargetCheckDto, ResourceDependenciesResultDto, ResourceIdResponseDto, UnpublishAccessDto, UnpublishCatalogEntityDto, UnpublishResultDto, VersionStatusEntryDto } from '../models/index';
14
+ export interface CopyCatalogEntityToOrgUnitRequest {
15
+ entityType: CopyCatalogEntityToOrgUnitEntityTypeEnum;
16
+ entityId: string;
17
+ copyCatalogEntityToOrgUnitDto: CopyCatalogEntityToOrgUnitDto;
18
+ }
19
+ export interface GetApplicationValuesPublishDependenciesRequest {
20
+ applicationValuesDependenciesRequestDto: ApplicationValuesDependenciesRequestDto;
21
+ }
22
+ export interface GetCatalogPublishDependenciesRequest {
23
+ entityType: GetCatalogPublishDependenciesEntityTypeEnum;
24
+ entityId: string;
25
+ }
14
26
  export interface GetCatalogPublishHistoryRequest {
15
27
  entityType: GetCatalogPublishHistoryEntityTypeEnum;
16
28
  entityId: string;
17
29
  }
30
+ export interface GetCatalogPublishTargetRequest {
31
+ entityType: GetCatalogPublishTargetEntityTypeEnum;
32
+ entityId: string;
33
+ folderPath: string;
34
+ version?: string;
35
+ }
18
36
  export interface GetCatalogUnpublishAccessRequest {
19
37
  entityType: GetCatalogUnpublishAccessEntityTypeEnum;
20
38
  entityId: string;
21
39
  }
40
+ export interface GetCatalogVersionStatusesRequest {
41
+ entityType: GetCatalogVersionStatusesEntityTypeEnum;
42
+ entityId: string;
43
+ }
22
44
  export interface GetPublishRulesRequest {
23
45
  folderPath: string;
24
46
  }
@@ -36,6 +58,36 @@ export interface UnpublishCatalogEntityRequest {
36
58
  *
37
59
  */
38
60
  export declare class PublishApi extends runtime.BaseAPI {
61
+ /**
62
+ * 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. 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. 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. Answers 403 while the `features.orgUnitsEnabled` flag is off.
63
+ * Copy an own catalog entity into an org-unit folder
64
+ */
65
+ copyCatalogEntityToOrgUnitRaw(requestParameters: CopyCatalogEntityToOrgUnitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResourceIdResponseDto>>;
66
+ /**
67
+ * 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. 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. 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. Answers 403 while the `features.orgUnitsEnabled` flag is off.
68
+ * Copy an own catalog entity into an org-unit folder
69
+ */
70
+ copyCatalogEntityToOrgUnit(requestParameters: CopyCatalogEntityToOrgUnitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResourceIdResponseDto>;
71
+ /**
72
+ * 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.
73
+ * List the private dependencies of unsaved application values
74
+ */
75
+ getApplicationValuesPublishDependenciesRaw(requestParameters: GetApplicationValuesPublishDependenciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResourceDependenciesResultDto>>;
76
+ /**
77
+ * 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.
78
+ * List the private dependencies of unsaved application values
79
+ */
80
+ getApplicationValuesPublishDependencies(requestParameters: GetApplicationValuesPublishDependenciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResourceDependenciesResultDto>;
81
+ /**
82
+ * 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.
83
+ * List the private dependencies of a catalog entity
84
+ */
85
+ getCatalogPublishDependenciesRaw(requestParameters: GetCatalogPublishDependenciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResourceDependenciesResultDto>>;
86
+ /**
87
+ * 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.
88
+ * List the private dependencies of a catalog entity
89
+ */
90
+ getCatalogPublishDependencies(requestParameters: GetCatalogPublishDependenciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResourceDependenciesResultDto>;
39
91
  /**
40
92
  * Returns every folder this catalog entity has been published to, most recent first, derived from DIAL Core\'s Publication API (`getPublications`) — never from chat-api-side storage.
41
93
  * Get publish history for a catalog entity
@@ -46,6 +98,16 @@ export declare class PublishApi extends runtime.BaseAPI {
46
98
  * Get publish history for a catalog entity
47
99
  */
48
100
  getCatalogPublishHistory(requestParameters: GetCatalogPublishHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublishHistoryEntryDto>>;
101
+ /**
102
+ * 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.
103
+ * Check whether the published copy of an entity would land on a taken path
104
+ */
105
+ getCatalogPublishTargetRaw(requestParameters: GetCatalogPublishTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublishTargetCheckDto>>;
106
+ /**
107
+ * 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.
108
+ * Check whether the published copy of an entity would land on a taken path
109
+ */
110
+ getCatalogPublishTarget(requestParameters: GetCatalogPublishTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishTargetCheckDto>;
49
111
  /**
50
112
  * 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`.
51
113
  * Check whether the caller may request removal of a catalog entity
@@ -56,6 +118,16 @@ export declare class PublishApi extends runtime.BaseAPI {
56
118
  * Check whether the caller may request removal of a catalog entity
57
119
  */
58
120
  getCatalogUnpublishAccess(requestParameters: GetCatalogUnpublishAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnpublishAccessDto>;
121
+ /**
122
+ * 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.
123
+ * Get the publication status of every version of an entity
124
+ */
125
+ getCatalogVersionStatusesRaw(requestParameters: GetCatalogVersionStatusesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<VersionStatusEntryDto>>>;
126
+ /**
127
+ * 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.
128
+ * Get the publication status of every version of an entity
129
+ */
130
+ getCatalogVersionStatuses(requestParameters: GetCatalogVersionStatusesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<VersionStatusEntryDto>>;
59
131
  /**
60
132
  * Returns the exact requested folder\'s own access-restriction rules by proxying DIAL Core\'s `getPublicationRules` — ancestor-folder rules in the underlying response are discarded, never returned.
61
133
  * Get a destination folder\'s already-configured access rules
@@ -67,12 +139,12 @@ export declare class PublishApi extends runtime.BaseAPI {
67
139
  */
68
140
  getPublishRules(requestParameters: GetPublishRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishRulesResultDto>;
69
141
  /**
70
- * 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.
142
+ * 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.
71
143
  * Publish a catalog entity to an Organization folder
72
144
  */
73
145
  publishCatalogEntityRaw(requestParameters: PublishCatalogEntityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublishResultDto>>;
74
146
  /**
75
- * 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.
147
+ * 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.
76
148
  * Publish a catalog entity to an Organization folder
77
149
  */
78
150
  publishCatalogEntity(requestParameters: PublishCatalogEntityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishResultDto>;
@@ -87,6 +159,30 @@ export declare class PublishApi extends runtime.BaseAPI {
87
159
  */
88
160
  unpublishCatalogEntity(requestParameters: UnpublishCatalogEntityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnpublishResultDto>;
89
161
  }
162
+ /**
163
+ * @export
164
+ */
165
+ export declare const CopyCatalogEntityToOrgUnitEntityTypeEnum: {
166
+ readonly Model: "model";
167
+ readonly Toolset: "toolset";
168
+ readonly Application: "application";
169
+ readonly Prompt: "prompt";
170
+ readonly Skill: "skill";
171
+ readonly Project: "project";
172
+ };
173
+ export type CopyCatalogEntityToOrgUnitEntityTypeEnum = (typeof CopyCatalogEntityToOrgUnitEntityTypeEnum)[keyof typeof CopyCatalogEntityToOrgUnitEntityTypeEnum];
174
+ /**
175
+ * @export
176
+ */
177
+ export declare const GetCatalogPublishDependenciesEntityTypeEnum: {
178
+ readonly Model: "model";
179
+ readonly Toolset: "toolset";
180
+ readonly Application: "application";
181
+ readonly Prompt: "prompt";
182
+ readonly Skill: "skill";
183
+ readonly Project: "project";
184
+ };
185
+ export type GetCatalogPublishDependenciesEntityTypeEnum = (typeof GetCatalogPublishDependenciesEntityTypeEnum)[keyof typeof GetCatalogPublishDependenciesEntityTypeEnum];
90
186
  /**
91
187
  * @export
92
188
  */
@@ -99,6 +195,18 @@ export declare const GetCatalogPublishHistoryEntityTypeEnum: {
99
195
  readonly Project: "project";
100
196
  };
101
197
  export type GetCatalogPublishHistoryEntityTypeEnum = (typeof GetCatalogPublishHistoryEntityTypeEnum)[keyof typeof GetCatalogPublishHistoryEntityTypeEnum];
198
+ /**
199
+ * @export
200
+ */
201
+ export declare const GetCatalogPublishTargetEntityTypeEnum: {
202
+ readonly Model: "model";
203
+ readonly Toolset: "toolset";
204
+ readonly Application: "application";
205
+ readonly Prompt: "prompt";
206
+ readonly Skill: "skill";
207
+ readonly Project: "project";
208
+ };
209
+ export type GetCatalogPublishTargetEntityTypeEnum = (typeof GetCatalogPublishTargetEntityTypeEnum)[keyof typeof GetCatalogPublishTargetEntityTypeEnum];
102
210
  /**
103
211
  * @export
104
212
  */
@@ -111,6 +219,18 @@ export declare const GetCatalogUnpublishAccessEntityTypeEnum: {
111
219
  readonly Project: "project";
112
220
  };
113
221
  export type GetCatalogUnpublishAccessEntityTypeEnum = (typeof GetCatalogUnpublishAccessEntityTypeEnum)[keyof typeof GetCatalogUnpublishAccessEntityTypeEnum];
222
+ /**
223
+ * @export
224
+ */
225
+ export declare const GetCatalogVersionStatusesEntityTypeEnum: {
226
+ readonly Model: "model";
227
+ readonly Toolset: "toolset";
228
+ readonly Application: "application";
229
+ readonly Prompt: "prompt";
230
+ readonly Skill: "skill";
231
+ readonly Project: "project";
232
+ };
233
+ export type GetCatalogVersionStatusesEntityTypeEnum = (typeof GetCatalogVersionStatusesEntityTypeEnum)[keyof typeof GetCatalogVersionStatusesEntityTypeEnum];
114
234
  /**
115
235
  * @export
116
236
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PublishApi.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/PublishApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,sCAAsC,CAAC;IACnD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gCAAgC;IAC/C,UAAU,EAAE,uCAAuC,CAAC;IACpD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,UAAU,EAAE,kCAAkC,CAAC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB,EAAE,uBAAuB,CAAC;CAClD;AAED,MAAM,WAAW,6BAA6B;IAC5C,UAAU,EAAE,oCAAoC,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB,EAAE,yBAAyB,CAAC;CACtD;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,OAAO,CAAC,OAAO;IAC7C;;;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,KAAK,CAAC,sBAAsB,CAAC,CAAC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C,CAAC,CAAC,MAAM,OAAO,sCAAsC,CAAC,CAAC;AACvG;;GAEG;AACH,eAAO,MAAM,qCAAqC;;;;;;;CAOxC,CAAC;AACX,MAAM,MAAM,qCAAqC,GAC/C,CAAC,OAAO,qCAAqC,CAAC,CAAC,MAAM,OAAO,qCAAqC,CAAC,CAAC;AACrG;;GAEG;AACH,eAAO,MAAM,uCAAuC;;;;;;;CAO1C,CAAC;AACX,MAAM,MAAM,uCAAuC,GACjD,CAAC,OAAO,uCAAuC,CAAC,CAAC,MAAM,OAAO,uCAAuC,CAAC,CAAC;AACzG;;GAEG;AACH,eAAO,MAAM,uCAAuC;;;;;;;CAO1C,CAAC;AACX,MAAM,MAAM,uCAAuC,GACjD,CAAC,OAAO,uCAAuC,CAAC,CAAC,MAAM,OAAO,uCAAuC,CAAC,CAAC;AACzG;;GAEG;AACH,eAAO,MAAM,kCAAkC;;;;;;;CAOrC,CAAC;AACX,MAAM,MAAM,kCAAkC,GAC5C,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,OAAO,kCAAkC,CAAC,CAAC;AAC/F;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;;;;CAOvC,CAAC;AACX,MAAM,MAAM,oCAAoC,GAC9C,CAAC,OAAO,oCAAoC,CAAC,CAAC,MAAM,OAAO,oCAAoC,CAAC,CAAC"}
@@ -13,12 +13,131 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.UnpublishCatalogEntityEntityTypeEnum = exports.PublishCatalogEntityEntityTypeEnum = exports.GetCatalogUnpublishAccessEntityTypeEnum = exports.GetCatalogPublishHistoryEntityTypeEnum = 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
+ /**
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. 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. 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. Answers 403 while the `features.orgUnitsEnabled` flag is off.
24
+ * Copy an own catalog entity into an org-unit folder
25
+ */
26
+ async copyCatalogEntityToOrgUnitRaw(requestParameters, initOverrides) {
27
+ if (requestParameters['entityType'] == null) {
28
+ throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling copyCatalogEntityToOrgUnit().');
29
+ }
30
+ if (requestParameters['entityId'] == null) {
31
+ throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling copyCatalogEntityToOrgUnit().');
32
+ }
33
+ if (requestParameters['copyCatalogEntityToOrgUnitDto'] == null) {
34
+ throw new runtime.RequiredError('copyCatalogEntityToOrgUnitDto', 'Required parameter "copyCatalogEntityToOrgUnitDto" was null or undefined when calling copyCatalogEntityToOrgUnit().');
35
+ }
36
+ const queryParameters = {};
37
+ const headerParameters = {};
38
+ headerParameters['Content-Type'] = 'application/json';
39
+ if (this.configuration && this.configuration.accessToken) {
40
+ const token = this.configuration.accessToken;
41
+ const tokenString = await token('bearer', []);
42
+ if (tokenString) {
43
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
44
+ }
45
+ }
46
+ let urlPath = `/api/v1/catalog/{entityType}/{entityId}/copy-to-org-unit`;
47
+ urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
48
+ urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
49
+ const response = await this.request({
50
+ path: urlPath,
51
+ method: 'POST',
52
+ headers: headerParameters,
53
+ query: queryParameters,
54
+ body: requestParameters['copyCatalogEntityToOrgUnitDto'],
55
+ }, initOverrides);
56
+ return new runtime.JSONApiResponse(response);
57
+ }
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. 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. 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. Answers 403 while the `features.orgUnitsEnabled` flag is off.
60
+ * Copy an own catalog entity into an org-unit folder
61
+ */
62
+ async copyCatalogEntityToOrgUnit(requestParameters, initOverrides) {
63
+ const response = await this.copyCatalogEntityToOrgUnitRaw(requestParameters, initOverrides);
64
+ return await response.value();
65
+ }
66
+ /**
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.
104
+ * List the private dependencies of a catalog entity
105
+ */
106
+ async getCatalogPublishDependenciesRaw(requestParameters, initOverrides) {
107
+ if (requestParameters['entityType'] == null) {
108
+ throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getCatalogPublishDependencies().');
109
+ }
110
+ if (requestParameters['entityId'] == null) {
111
+ throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getCatalogPublishDependencies().');
112
+ }
113
+ const queryParameters = {};
114
+ const headerParameters = {};
115
+ if (this.configuration && this.configuration.accessToken) {
116
+ const token = this.configuration.accessToken;
117
+ const tokenString = await token('bearer', []);
118
+ if (tokenString) {
119
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
120
+ }
121
+ }
122
+ let urlPath = `/api/v1/catalog/{entityType}/{entityId}/publish-dependencies`;
123
+ urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
124
+ urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
125
+ const response = await this.request({
126
+ path: urlPath,
127
+ method: 'GET',
128
+ headers: headerParameters,
129
+ query: queryParameters,
130
+ }, initOverrides);
131
+ return new runtime.JSONApiResponse(response);
132
+ }
133
+ /**
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.
135
+ * List the private dependencies of a catalog entity
136
+ */
137
+ async getCatalogPublishDependencies(requestParameters, initOverrides) {
138
+ const response = await this.getCatalogPublishDependenciesRaw(requestParameters, initOverrides);
139
+ return await response.value();
140
+ }
22
141
  /**
23
142
  * Returns every folder this catalog entity has been published to, most recent first, derived from DIAL Core\'s Publication API (`getPublications`) — never from chat-api-side storage.
24
143
  * Get publish history for a catalog entity
@@ -58,6 +177,54 @@ class PublishApi extends runtime.BaseAPI {
58
177
  const response = await this.getCatalogPublishHistoryRaw(requestParameters, initOverrides);
59
178
  return await response.value();
60
179
  }
180
+ /**
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
183
+ */
184
+ async getCatalogPublishTargetRaw(requestParameters, initOverrides) {
185
+ if (requestParameters['entityType'] == null) {
186
+ throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getCatalogPublishTarget().');
187
+ }
188
+ if (requestParameters['entityId'] == null) {
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().');
193
+ }
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
+ }
201
+ const headerParameters = {};
202
+ if (this.configuration && this.configuration.accessToken) {
203
+ const token = this.configuration.accessToken;
204
+ const tokenString = await token('bearer', []);
205
+ if (tokenString) {
206
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
207
+ }
208
+ }
209
+ let urlPath = `/api/v1/catalog/{entityType}/{entityId}/publish-target`;
210
+ urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
211
+ urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
212
+ const response = await this.request({
213
+ path: urlPath,
214
+ method: 'GET',
215
+ headers: headerParameters,
216
+ query: queryParameters,
217
+ }, initOverrides);
218
+ return new runtime.JSONApiResponse(response);
219
+ }
220
+ /**
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
223
+ */
224
+ async getCatalogPublishTarget(requestParameters, initOverrides) {
225
+ const response = await this.getCatalogPublishTargetRaw(requestParameters, initOverrides);
226
+ return await response.value();
227
+ }
61
228
  /**
62
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`.
63
230
  * Check whether the caller may request removal of a catalog entity
@@ -97,6 +264,45 @@ class PublishApi extends runtime.BaseAPI {
97
264
  const response = await this.getCatalogUnpublishAccessRaw(requestParameters, initOverrides);
98
265
  return await response.value();
99
266
  }
267
+ /**
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
270
+ */
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().');
274
+ }
275
+ if (requestParameters['entityId'] == null) {
276
+ throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getCatalogVersionStatuses().');
277
+ }
278
+ const queryParameters = {};
279
+ const headerParameters = {};
280
+ if (this.configuration && this.configuration.accessToken) {
281
+ const token = this.configuration.accessToken;
282
+ const tokenString = await token('bearer', []);
283
+ if (tokenString) {
284
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
285
+ }
286
+ }
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'])));
290
+ const response = await this.request({
291
+ path: urlPath,
292
+ method: 'GET',
293
+ headers: headerParameters,
294
+ query: queryParameters,
295
+ }, initOverrides);
296
+ return new runtime.JSONApiResponse(response);
297
+ }
298
+ /**
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
301
+ */
302
+ async getCatalogVersionStatuses(requestParameters, initOverrides) {
303
+ const response = await this.getCatalogVersionStatusesRaw(requestParameters, initOverrides);
304
+ return await response.value();
305
+ }
100
306
  /**
101
307
  * Returns the exact requested folder\'s own access-restriction rules by proxying DIAL Core\'s `getPublicationRules` — ancestor-folder rules in the underlying response are discarded, never returned.
102
308
  * Get a destination folder\'s already-configured access rules
@@ -135,7 +341,7 @@ class PublishApi extends runtime.BaseAPI {
135
341
  return await response.value();
136
342
  }
137
343
  /**
138
- * 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.
344
+ * 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.
139
345
  * Publish a catalog entity to an Organization folder
140
346
  */
141
347
  async publishCatalogEntityRaw(requestParameters, initOverrides) {
@@ -171,7 +377,7 @@ class PublishApi extends runtime.BaseAPI {
171
377
  return new runtime.JSONApiResponse(response);
172
378
  }
173
379
  /**
174
- * 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.
380
+ * 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.
175
381
  * Publish a catalog entity to an Organization folder
176
382
  */
177
383
  async publishCatalogEntity(requestParameters, initOverrides) {
@@ -224,6 +430,28 @@ class PublishApi extends runtime.BaseAPI {
224
430
  }
225
431
  }
226
432
  exports.PublishApi = PublishApi;
433
+ /**
434
+ * @export
435
+ */
436
+ exports.CopyCatalogEntityToOrgUnitEntityTypeEnum = {
437
+ Model: 'model',
438
+ Toolset: 'toolset',
439
+ Application: 'application',
440
+ Prompt: 'prompt',
441
+ Skill: 'skill',
442
+ Project: 'project',
443
+ };
444
+ /**
445
+ * @export
446
+ */
447
+ exports.GetCatalogPublishDependenciesEntityTypeEnum = {
448
+ Model: 'model',
449
+ Toolset: 'toolset',
450
+ Application: 'application',
451
+ Prompt: 'prompt',
452
+ Skill: 'skill',
453
+ Project: 'project',
454
+ };
227
455
  /**
228
456
  * @export
229
457
  */
@@ -235,6 +463,17 @@ exports.GetCatalogPublishHistoryEntityTypeEnum = {
235
463
  Skill: 'skill',
236
464
  Project: 'project',
237
465
  };
466
+ /**
467
+ * @export
468
+ */
469
+ exports.GetCatalogPublishTargetEntityTypeEnum = {
470
+ Model: 'model',
471
+ Toolset: 'toolset',
472
+ Application: 'application',
473
+ Prompt: 'prompt',
474
+ Skill: 'skill',
475
+ Project: 'project',
476
+ };
238
477
  /**
239
478
  * @export
240
479
  */
@@ -246,6 +485,17 @@ exports.GetCatalogUnpublishAccessEntityTypeEnum = {
246
485
  Skill: 'skill',
247
486
  Project: 'project',
248
487
  };
488
+ /**
489
+ * @export
490
+ */
491
+ exports.GetCatalogVersionStatusesEntityTypeEnum = {
492
+ Model: 'model',
493
+ Toolset: 'toolset',
494
+ Application: 'application',
495
+ Prompt: 'prompt',
496
+ Skill: 'skill',
497
+ Project: 'project',
498
+ };
249
499
  /**
250
500
  * @export
251
501
  */
@@ -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, whose row policy confines the rows to the caller; a caller whose ADAS view is not row-restricted 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, whose row policy confines the rows to the caller; a caller whose ADAS view is not row-restricted 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,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,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;;GAEG;AACH,qBAAa,OAAQ,SAAQ,OAAO,CAAC,OAAO;IAC1C;;;OAGG;IACG,gBAAgB,CACpB,iBAAiB,EAAE,oBAAoB,EACvC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,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