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

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,34 @@
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 { 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 GetCatalogPublishDependenciesRequest {
20
+ entityType: GetCatalogPublishDependenciesEntityTypeEnum;
21
+ entityId: string;
22
+ }
14
23
  export interface GetCatalogPublishHistoryRequest {
15
24
  entityType: GetCatalogPublishHistoryEntityTypeEnum;
16
25
  entityId: string;
17
26
  }
27
+ export interface GetCatalogPublishTargetRequest {
28
+ entityType: GetCatalogPublishTargetEntityTypeEnum;
29
+ entityId: string;
30
+ folderPath: string;
31
+ version?: string;
32
+ }
18
33
  export interface GetCatalogUnpublishAccessRequest {
19
34
  entityType: GetCatalogUnpublishAccessEntityTypeEnum;
20
35
  entityId: string;
21
36
  }
37
+ export interface GetCatalogVersionStatusesRequest {
38
+ entityType: GetCatalogVersionStatusesEntityTypeEnum;
39
+ entityId: string;
40
+ }
22
41
  export interface GetPublishRulesRequest {
23
42
  folderPath: string;
24
43
  }
@@ -36,6 +55,26 @@ export interface UnpublishCatalogEntityRequest {
36
55
  *
37
56
  */
38
57
  export declare class PublishApi extends runtime.BaseAPI {
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.
60
+ * Copy an own catalog entity into an org-unit folder
61
+ */
62
+ copyCatalogEntityToOrgUnitRaw(requestParameters: CopyCatalogEntityToOrgUnitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResourceIdResponseDto>>;
63
+ /**
64
+ * 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.
65
+ * Copy an own catalog entity into an org-unit folder
66
+ */
67
+ copyCatalogEntityToOrgUnit(requestParameters: CopyCatalogEntityToOrgUnitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResourceIdResponseDto>;
68
+ /**
69
+ * 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.
70
+ * List the private dependencies of a catalog entity
71
+ */
72
+ getCatalogPublishDependenciesRaw(requestParameters: GetCatalogPublishDependenciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResourceDependenciesResultDto>>;
73
+ /**
74
+ * 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.
75
+ * List the private dependencies of a catalog entity
76
+ */
77
+ getCatalogPublishDependencies(requestParameters: GetCatalogPublishDependenciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResourceDependenciesResultDto>;
39
78
  /**
40
79
  * 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
80
  * Get publish history for a catalog entity
@@ -46,6 +85,16 @@ export declare class PublishApi extends runtime.BaseAPI {
46
85
  * Get publish history for a catalog entity
47
86
  */
48
87
  getCatalogPublishHistory(requestParameters: GetCatalogPublishHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublishHistoryEntryDto>>;
88
+ /**
89
+ * 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.
90
+ * Check whether the published copy of an entity would land on a taken path
91
+ */
92
+ getCatalogPublishTargetRaw(requestParameters: GetCatalogPublishTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublishTargetCheckDto>>;
93
+ /**
94
+ * 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.
95
+ * Check whether the published copy of an entity would land on a taken path
96
+ */
97
+ getCatalogPublishTarget(requestParameters: GetCatalogPublishTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishTargetCheckDto>;
49
98
  /**
50
99
  * 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
100
  * Check whether the caller may request removal of a catalog entity
@@ -56,6 +105,16 @@ export declare class PublishApi extends runtime.BaseAPI {
56
105
  * Check whether the caller may request removal of a catalog entity
57
106
  */
58
107
  getCatalogUnpublishAccess(requestParameters: GetCatalogUnpublishAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnpublishAccessDto>;
108
+ /**
109
+ * 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.
110
+ * Get the publication status of every version of an entity
111
+ */
112
+ getCatalogVersionStatusesRaw(requestParameters: GetCatalogVersionStatusesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<VersionStatusEntryDto>>>;
113
+ /**
114
+ * 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.
115
+ * Get the publication status of every version of an entity
116
+ */
117
+ getCatalogVersionStatuses(requestParameters: GetCatalogVersionStatusesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<VersionStatusEntryDto>>;
59
118
  /**
60
119
  * 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
120
  * Get a destination folder\'s already-configured access rules
@@ -67,12 +126,12 @@ export declare class PublishApi extends runtime.BaseAPI {
67
126
  */
68
127
  getPublishRules(requestParameters: GetPublishRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishRulesResultDto>;
69
128
  /**
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.
129
+ * 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
130
  * Publish a catalog entity to an Organization folder
72
131
  */
73
132
  publishCatalogEntityRaw(requestParameters: PublishCatalogEntityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublishResultDto>>;
74
133
  /**
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.
134
+ * 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
135
  * Publish a catalog entity to an Organization folder
77
136
  */
78
137
  publishCatalogEntity(requestParameters: PublishCatalogEntityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishResultDto>;
@@ -87,6 +146,30 @@ export declare class PublishApi extends runtime.BaseAPI {
87
146
  */
88
147
  unpublishCatalogEntity(requestParameters: UnpublishCatalogEntityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnpublishResultDto>;
89
148
  }
149
+ /**
150
+ * @export
151
+ */
152
+ export declare const CopyCatalogEntityToOrgUnitEntityTypeEnum: {
153
+ readonly Model: "model";
154
+ readonly Toolset: "toolset";
155
+ readonly Application: "application";
156
+ readonly Prompt: "prompt";
157
+ readonly Skill: "skill";
158
+ readonly Project: "project";
159
+ };
160
+ export type CopyCatalogEntityToOrgUnitEntityTypeEnum = (typeof CopyCatalogEntityToOrgUnitEntityTypeEnum)[keyof typeof CopyCatalogEntityToOrgUnitEntityTypeEnum];
161
+ /**
162
+ * @export
163
+ */
164
+ export declare const GetCatalogPublishDependenciesEntityTypeEnum: {
165
+ readonly Model: "model";
166
+ readonly Toolset: "toolset";
167
+ readonly Application: "application";
168
+ readonly Prompt: "prompt";
169
+ readonly Skill: "skill";
170
+ readonly Project: "project";
171
+ };
172
+ export type GetCatalogPublishDependenciesEntityTypeEnum = (typeof GetCatalogPublishDependenciesEntityTypeEnum)[keyof typeof GetCatalogPublishDependenciesEntityTypeEnum];
90
173
  /**
91
174
  * @export
92
175
  */
@@ -99,6 +182,18 @@ export declare const GetCatalogPublishHistoryEntityTypeEnum: {
99
182
  readonly Project: "project";
100
183
  };
101
184
  export type GetCatalogPublishHistoryEntityTypeEnum = (typeof GetCatalogPublishHistoryEntityTypeEnum)[keyof typeof GetCatalogPublishHistoryEntityTypeEnum];
185
+ /**
186
+ * @export
187
+ */
188
+ export declare const GetCatalogPublishTargetEntityTypeEnum: {
189
+ readonly Model: "model";
190
+ readonly Toolset: "toolset";
191
+ readonly Application: "application";
192
+ readonly Prompt: "prompt";
193
+ readonly Skill: "skill";
194
+ readonly Project: "project";
195
+ };
196
+ export type GetCatalogPublishTargetEntityTypeEnum = (typeof GetCatalogPublishTargetEntityTypeEnum)[keyof typeof GetCatalogPublishTargetEntityTypeEnum];
102
197
  /**
103
198
  * @export
104
199
  */
@@ -111,6 +206,18 @@ export declare const GetCatalogUnpublishAccessEntityTypeEnum: {
111
206
  readonly Project: "project";
112
207
  };
113
208
  export type GetCatalogUnpublishAccessEntityTypeEnum = (typeof GetCatalogUnpublishAccessEntityTypeEnum)[keyof typeof GetCatalogUnpublishAccessEntityTypeEnum];
209
+ /**
210
+ * @export
211
+ */
212
+ export declare const GetCatalogVersionStatusesEntityTypeEnum: {
213
+ readonly Model: "model";
214
+ readonly Toolset: "toolset";
215
+ readonly Application: "application";
216
+ readonly Prompt: "prompt";
217
+ readonly Skill: "skill";
218
+ readonly Project: "project";
219
+ };
220
+ export type GetCatalogVersionStatusesEntityTypeEnum = (typeof GetCatalogVersionStatusesEntityTypeEnum)[keyof typeof GetCatalogVersionStatusesEntityTypeEnum];
114
221
  /**
115
222
  * @export
116
223
  */
@@ -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,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O,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,95 @@
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. 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. 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 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
+ * List the private dependencies of a catalog entity
69
+ */
70
+ async getCatalogPublishDependenciesRaw(requestParameters, initOverrides) {
71
+ if (requestParameters['entityType'] == null) {
72
+ throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getCatalogPublishDependencies().');
73
+ }
74
+ if (requestParameters['entityId'] == null) {
75
+ throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getCatalogPublishDependencies().');
76
+ }
77
+ const queryParameters = {};
78
+ const headerParameters = {};
79
+ if (this.configuration && this.configuration.accessToken) {
80
+ const token = this.configuration.accessToken;
81
+ const tokenString = await token('bearer', []);
82
+ if (tokenString) {
83
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
84
+ }
85
+ }
86
+ let urlPath = `/api/v1/catalog/{entityType}/{entityId}/publish-dependencies`;
87
+ urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
88
+ urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
89
+ const response = await this.request({
90
+ path: urlPath,
91
+ method: 'GET',
92
+ headers: headerParameters,
93
+ query: queryParameters,
94
+ }, initOverrides);
95
+ return new runtime.JSONApiResponse(response);
96
+ }
97
+ /**
98
+ * 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
+ * List the private dependencies of a catalog entity
100
+ */
101
+ async getCatalogPublishDependencies(requestParameters, initOverrides) {
102
+ const response = await this.getCatalogPublishDependenciesRaw(requestParameters, initOverrides);
103
+ return await response.value();
104
+ }
22
105
  /**
23
106
  * 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
107
  * Get publish history for a catalog entity
@@ -58,6 +141,54 @@ class PublishApi extends runtime.BaseAPI {
58
141
  const response = await this.getCatalogPublishHistoryRaw(requestParameters, initOverrides);
59
142
  return await response.value();
60
143
  }
144
+ /**
145
+ * 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.
146
+ * Check whether the published copy of an entity would land on a taken path
147
+ */
148
+ async getCatalogPublishTargetRaw(requestParameters, initOverrides) {
149
+ if (requestParameters['entityType'] == null) {
150
+ throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getCatalogPublishTarget().');
151
+ }
152
+ if (requestParameters['entityId'] == null) {
153
+ throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getCatalogPublishTarget().');
154
+ }
155
+ if (requestParameters['folderPath'] == null) {
156
+ throw new runtime.RequiredError('folderPath', 'Required parameter "folderPath" was null or undefined when calling getCatalogPublishTarget().');
157
+ }
158
+ const queryParameters = {};
159
+ if (requestParameters['folderPath'] != null) {
160
+ queryParameters['folderPath'] = requestParameters['folderPath'];
161
+ }
162
+ if (requestParameters['version'] != null) {
163
+ queryParameters['version'] = requestParameters['version'];
164
+ }
165
+ const headerParameters = {};
166
+ if (this.configuration && this.configuration.accessToken) {
167
+ const token = this.configuration.accessToken;
168
+ const tokenString = await token('bearer', []);
169
+ if (tokenString) {
170
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
171
+ }
172
+ }
173
+ let urlPath = `/api/v1/catalog/{entityType}/{entityId}/publish-target`;
174
+ urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
175
+ urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
176
+ const response = await this.request({
177
+ path: urlPath,
178
+ method: 'GET',
179
+ headers: headerParameters,
180
+ query: queryParameters,
181
+ }, initOverrides);
182
+ return new runtime.JSONApiResponse(response);
183
+ }
184
+ /**
185
+ * 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.
186
+ * Check whether the published copy of an entity would land on a taken path
187
+ */
188
+ async getCatalogPublishTarget(requestParameters, initOverrides) {
189
+ const response = await this.getCatalogPublishTargetRaw(requestParameters, initOverrides);
190
+ return await response.value();
191
+ }
61
192
  /**
62
193
  * 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
194
  * Check whether the caller may request removal of a catalog entity
@@ -97,6 +228,45 @@ class PublishApi extends runtime.BaseAPI {
97
228
  const response = await this.getCatalogUnpublishAccessRaw(requestParameters, initOverrides);
98
229
  return await response.value();
99
230
  }
231
+ /**
232
+ * 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.
233
+ * Get the publication status of every version of an entity
234
+ */
235
+ async getCatalogVersionStatusesRaw(requestParameters, initOverrides) {
236
+ if (requestParameters['entityType'] == null) {
237
+ throw new runtime.RequiredError('entityType', 'Required parameter "entityType" was null or undefined when calling getCatalogVersionStatuses().');
238
+ }
239
+ if (requestParameters['entityId'] == null) {
240
+ throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getCatalogVersionStatuses().');
241
+ }
242
+ const queryParameters = {};
243
+ const headerParameters = {};
244
+ if (this.configuration && this.configuration.accessToken) {
245
+ const token = this.configuration.accessToken;
246
+ const tokenString = await token('bearer', []);
247
+ if (tokenString) {
248
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
249
+ }
250
+ }
251
+ let urlPath = `/api/v1/catalog/{entityType}/{entityId}/version-statuses`;
252
+ urlPath = urlPath.replace(`{${'entityType'}}`, encodeURIComponent(String(requestParameters['entityType'])));
253
+ urlPath = urlPath.replace(`{${'entityId'}}`, encodeURIComponent(String(requestParameters['entityId'])));
254
+ const response = await this.request({
255
+ path: urlPath,
256
+ method: 'GET',
257
+ headers: headerParameters,
258
+ query: queryParameters,
259
+ }, initOverrides);
260
+ return new runtime.JSONApiResponse(response);
261
+ }
262
+ /**
263
+ * 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.
264
+ * Get the publication status of every version of an entity
265
+ */
266
+ async getCatalogVersionStatuses(requestParameters, initOverrides) {
267
+ const response = await this.getCatalogVersionStatusesRaw(requestParameters, initOverrides);
268
+ return await response.value();
269
+ }
100
270
  /**
101
271
  * 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
272
  * Get a destination folder\'s already-configured access rules
@@ -135,7 +305,7 @@ class PublishApi extends runtime.BaseAPI {
135
305
  return await response.value();
136
306
  }
137
307
  /**
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.
308
+ * 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
309
  * Publish a catalog entity to an Organization folder
140
310
  */
141
311
  async publishCatalogEntityRaw(requestParameters, initOverrides) {
@@ -171,7 +341,7 @@ class PublishApi extends runtime.BaseAPI {
171
341
  return new runtime.JSONApiResponse(response);
172
342
  }
173
343
  /**
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.
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.
175
345
  * Publish a catalog entity to an Organization folder
176
346
  */
177
347
  async publishCatalogEntity(requestParameters, initOverrides) {
@@ -224,6 +394,28 @@ class PublishApi extends runtime.BaseAPI {
224
394
  }
225
395
  }
226
396
  exports.PublishApi = PublishApi;
397
+ /**
398
+ * @export
399
+ */
400
+ exports.CopyCatalogEntityToOrgUnitEntityTypeEnum = {
401
+ Model: 'model',
402
+ Toolset: 'toolset',
403
+ Application: 'application',
404
+ Prompt: 'prompt',
405
+ Skill: 'skill',
406
+ Project: 'project',
407
+ };
408
+ /**
409
+ * @export
410
+ */
411
+ exports.GetCatalogPublishDependenciesEntityTypeEnum = {
412
+ Model: 'model',
413
+ Toolset: 'toolset',
414
+ Application: 'application',
415
+ Prompt: 'prompt',
416
+ Skill: 'skill',
417
+ Project: 'project',
418
+ };
227
419
  /**
228
420
  * @export
229
421
  */
@@ -235,6 +427,17 @@ exports.GetCatalogPublishHistoryEntityTypeEnum = {
235
427
  Skill: 'skill',
236
428
  Project: 'project',
237
429
  };
430
+ /**
431
+ * @export
432
+ */
433
+ exports.GetCatalogPublishTargetEntityTypeEnum = {
434
+ Model: 'model',
435
+ Toolset: 'toolset',
436
+ Application: 'application',
437
+ Prompt: 'prompt',
438
+ Skill: 'skill',
439
+ Project: 'project',
440
+ };
238
441
  /**
239
442
  * @export
240
443
  */
@@ -246,6 +449,17 @@ exports.GetCatalogUnpublishAccessEntityTypeEnum = {
246
449
  Skill: 'skill',
247
450
  Project: 'project',
248
451
  };
452
+ /**
453
+ * @export
454
+ */
455
+ exports.GetCatalogVersionStatusesEntityTypeEnum = {
456
+ Model: 'model',
457
+ Toolset: 'toolset',
458
+ Application: 'application',
459
+ Prompt: 'prompt',
460
+ Skill: 'skill',
461
+ Project: 'project',
462
+ };
249
463
  /**
250
464
  * @export
251
465
  */
@@ -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,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;CAOtC;AAED;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;CAGnC,CAAC;AACX,MAAM,MAAM,gCAAgC,G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C,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, 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.
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, 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.
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
  /**
@@ -12,6 +12,7 @@ export * from './FilesApi';
12
12
  export * from './HealthApi';
13
13
  export * from './ModelsApi';
14
14
  export * from './OfflineCredentialsApi';
15
+ export * from './OrgUnitsApi';
15
16
  export * from './ProjectsApi';
16
17
  export * from './PromptsApi';
17
18
  export * from './PublishApi';
@@ -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,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,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"}
@@ -17,6 +17,7 @@ tslib_1.__exportStar(require("./FilesApi"), exports);
17
17
  tslib_1.__exportStar(require("./HealthApi"), exports);
18
18
  tslib_1.__exportStar(require("./ModelsApi"), exports);
19
19
  tslib_1.__exportStar(require("./OfflineCredentialsApi"), exports);
20
+ tslib_1.__exportStar(require("./OrgUnitsApi"), exports);
20
21
  tslib_1.__exportStar(require("./ProjectsApi"), exports);
21
22
  tslib_1.__exportStar(require("./PromptsApi"), exports);
22
23
  tslib_1.__exportStar(require("./PublishApi"), exports);