@epam/ai-dial-chat-api-client 1.4.0-rc.12 → 1.4.0-rc.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated/src/apis/PublishApi.d.ts +14 -1
- package/generated/src/apis/PublishApi.d.ts.map +1 -1
- package/generated/src/apis/PublishApi.js +37 -0
- package/generated/src/apis/UserApi.d.ts +39 -1
- package/generated/src/apis/UserApi.d.ts.map +1 -1
- package/generated/src/apis/UserApi.js +110 -0
- package/generated/src/models/index.d.ts +584 -12
- package/generated/src/models/index.d.ts.map +1 -1
- package/generated/src/models/index.js +20 -1
- package/package.json +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ApplicationValuesDependenciesRequestDto, CopyCatalogEntityToOrgUnitDto, PublishCatalogEntityDto, PublishHistoryEntryDto, PublishResultDto, PublishTargetCheckDto, ResourceDependenciesResultDto, ResourceIdResponseDto, UnpublishAccessDto, UnpublishCatalogEntityDto, UnpublishResultDto, VersionStatusEntryDto } from '../models/index';
|
|
13
|
+
import type { ApplicationValuesDependenciesRequestDto, CopyCatalogEntityToOrgUnitDto, PublishCatalogEntityDto, PublishHistoryEntryDto, PublishResultDto, PublishRulesResultDto, PublishTargetCheckDto, ResourceDependenciesResultDto, ResourceIdResponseDto, UnpublishAccessDto, UnpublishCatalogEntityDto, UnpublishResultDto, VersionStatusEntryDto } from '../models/index';
|
|
14
14
|
export interface CopyCatalogEntityToOrgUnitRequest {
|
|
15
15
|
entityType: CopyCatalogEntityToOrgUnitEntityTypeEnum;
|
|
16
16
|
entityId: string;
|
|
@@ -41,6 +41,9 @@ export interface GetCatalogVersionStatusesRequest {
|
|
|
41
41
|
entityType: GetCatalogVersionStatusesEntityTypeEnum;
|
|
42
42
|
entityId: string;
|
|
43
43
|
}
|
|
44
|
+
export interface GetPublishRulesRequest {
|
|
45
|
+
folderPath: string;
|
|
46
|
+
}
|
|
44
47
|
export interface PublishCatalogEntityRequest {
|
|
45
48
|
entityType: PublishCatalogEntityEntityTypeEnum;
|
|
46
49
|
entityId: string;
|
|
@@ -125,6 +128,16 @@ export declare class PublishApi extends runtime.BaseAPI {
|
|
|
125
128
|
* Get the publication status of every version of an entity
|
|
126
129
|
*/
|
|
127
130
|
getCatalogVersionStatuses(requestParameters: GetCatalogVersionStatusesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<VersionStatusEntryDto>>;
|
|
131
|
+
/**
|
|
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. Answers 403 while the `features.orgUnitsEnabled` flag is on: org units replace access rules.
|
|
133
|
+
* Get a destination folder\'s already-configured access rules
|
|
134
|
+
*/
|
|
135
|
+
getPublishRulesRaw(requestParameters: GetPublishRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublishRulesResultDto>>;
|
|
136
|
+
/**
|
|
137
|
+
* 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. Answers 403 while the `features.orgUnitsEnabled` flag is on: org units replace access rules.
|
|
138
|
+
* Get a destination folder\'s already-configured access rules
|
|
139
|
+
*/
|
|
140
|
+
getPublishRules(requestParameters: GetPublishRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishRulesResultDto>;
|
|
128
141
|
/**
|
|
129
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.
|
|
130
143
|
* Publish a catalog entity to an Organization folder
|
|
@@ -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,uCAAuC,EACvC,6BAA6B,EAE7B,uBAAuB,EAEvB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,6BAA6B,EAC7B,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,iCAAiC;IAChD,UAAU,EAAE,wCAAwC,CAAC;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,6BAA6B,EAAE,6BAA6B,CAAC;CAC9D;AAED,MAAM,WAAW,8CAA8C;IAC7D,uCAAuC,EAAE,uCAAuC,CAAC;CAClF;AAED,MAAM,WAAW,oCAAoC;IACnD,UAAU,EAAE,2CAA2C,CAAC;IACxD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,sCAAsC,CAAC;IACnD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,8BAA8B;IAC7C,UAAU,EAAE,qCAAqC,CAAC;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,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;;;;;CAO9C,CAAC;AACX,MAAM,MAAM,2CAA2C,GACrD,CAAC,OAAO,2CAA2C,CAAC,CAAC,MAAM,OAAO,2CAA2C,CAAC,CAAC;AACjH;;GAEG;AACH,eAAO,MAAM,sCAAsC;;;;;;;CAOzC,CAAC;AACX,MAAM,MAAM,sCAAsC,GAChD,CAAC,OAAO,sCAAsC,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"}
|
|
@@ -303,6 +303,43 @@ class PublishApi extends runtime.BaseAPI {
|
|
|
303
303
|
const response = await this.getCatalogVersionStatusesRaw(requestParameters, initOverrides);
|
|
304
304
|
return await response.value();
|
|
305
305
|
}
|
|
306
|
+
/**
|
|
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. Answers 403 while the `features.orgUnitsEnabled` flag is on: org units replace access rules.
|
|
308
|
+
* Get a destination folder\'s already-configured access rules
|
|
309
|
+
*/
|
|
310
|
+
async getPublishRulesRaw(requestParameters, initOverrides) {
|
|
311
|
+
if (requestParameters['folderPath'] == null) {
|
|
312
|
+
throw new runtime.RequiredError('folderPath', 'Required parameter "folderPath" was null or undefined when calling getPublishRules().');
|
|
313
|
+
}
|
|
314
|
+
const queryParameters = {};
|
|
315
|
+
if (requestParameters['folderPath'] != null) {
|
|
316
|
+
queryParameters['folderPath'] = requestParameters['folderPath'];
|
|
317
|
+
}
|
|
318
|
+
const headerParameters = {};
|
|
319
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
320
|
+
const token = this.configuration.accessToken;
|
|
321
|
+
const tokenString = await token('bearer', []);
|
|
322
|
+
if (tokenString) {
|
|
323
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
let urlPath = `/api/v1/publish/rules`;
|
|
327
|
+
const response = await this.request({
|
|
328
|
+
path: urlPath,
|
|
329
|
+
method: 'GET',
|
|
330
|
+
headers: headerParameters,
|
|
331
|
+
query: queryParameters,
|
|
332
|
+
}, initOverrides);
|
|
333
|
+
return new runtime.JSONApiResponse(response);
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* 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. Answers 403 while the `features.orgUnitsEnabled` flag is on: org units replace access rules.
|
|
337
|
+
* Get a destination folder\'s already-configured access rules
|
|
338
|
+
*/
|
|
339
|
+
async getPublishRules(requestParameters, initOverrides) {
|
|
340
|
+
const response = await this.getPublishRulesRaw(requestParameters, initOverrides);
|
|
341
|
+
return await response.value();
|
|
342
|
+
}
|
|
306
343
|
/**
|
|
307
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.
|
|
308
345
|
* Publish a catalog entity to an Organization folder
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { UsageHistoryPeriod, UserLimitStatsResponseDto, UserUsageHistoryResponseDto, UserUsageTotalsResponseDto } from '../models/index';
|
|
13
|
+
import type { DefaultBudgetResponseDto, UpdateDefaultBudgetRequestDto, UsageHistoryPeriod, UserBudgetsResponseDto, UserLimitStatsResponseDto, UserUsageHistoryResponseDto, UserUsageSessionsResponseDto, UserUsageTotalsResponseDto } from '../models/index';
|
|
14
14
|
export interface GetUserLimitsRequest {
|
|
15
15
|
deploymentTypes?: Array<GetUserLimitsDeploymentTypesEnum>;
|
|
16
16
|
}
|
|
@@ -22,13 +22,31 @@ export interface GetUserUsageHistoryRequest {
|
|
|
22
22
|
costObject?: string;
|
|
23
23
|
policy?: string;
|
|
24
24
|
}
|
|
25
|
+
export interface GetUserUsageSessionsRequest {
|
|
26
|
+
period: UsageHistoryPeriod;
|
|
27
|
+
costObject?: string;
|
|
28
|
+
policy?: string;
|
|
29
|
+
}
|
|
25
30
|
export interface GetUserUsageTotalsRequest {
|
|
26
31
|
period: UsageHistoryPeriod;
|
|
27
32
|
}
|
|
33
|
+
export interface PutUserDefaultBudgetRequest {
|
|
34
|
+
updateDefaultBudgetRequestDto: UpdateDefaultBudgetRequestDto;
|
|
35
|
+
}
|
|
28
36
|
/**
|
|
29
37
|
*
|
|
30
38
|
*/
|
|
31
39
|
export declare class UserApi extends runtime.BaseAPI {
|
|
40
|
+
/**
|
|
41
|
+
* Returns every budget instance the caller can indicate to DIAL Core with the `X-DIAL-BUDGET` header, with its caps and current spend, the caller\'s default budget, and DIAL Core\'s budget-selection flags. Values are forwarded from DIAL Core as received: nothing is filtered, re-ordered or reformatted, and `resetsAt` is passed through unchanged. A window `total` at or above 2^53 is the unlimited sentinel. Answers an empty `budgets` list when DIAL Core has spending limits off. Proxies GET /v1/user/budgets using the caller\'s session access token. Not cached — every request hits DIAL Core for real-time spend.
|
|
42
|
+
* List the spending budgets the signed-in user holds
|
|
43
|
+
*/
|
|
44
|
+
getUserBudgetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserBudgetsResponseDto>>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns every budget instance the caller can indicate to DIAL Core with the `X-DIAL-BUDGET` header, with its caps and current spend, the caller\'s default budget, and DIAL Core\'s budget-selection flags. Values are forwarded from DIAL Core as received: nothing is filtered, re-ordered or reformatted, and `resetsAt` is passed through unchanged. A window `total` at or above 2^53 is the unlimited sentinel. Answers an empty `budgets` list when DIAL Core has spending limits off. Proxies GET /v1/user/budgets using the caller\'s session access token. Not cached — every request hits DIAL Core for real-time spend.
|
|
47
|
+
* List the spending budgets the signed-in user holds
|
|
48
|
+
*/
|
|
49
|
+
getUserBudgets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserBudgetsResponseDto>;
|
|
32
50
|
/**
|
|
33
51
|
* Returns rate-limit and calendar-period usage statistics for every deployment of the requested kinds visible to the caller, plus the caller\'s global cost-budget figures. `deploymentTypes` selects models and/or applications; when omitted, the server-configured default kinds are reported. A deployment\'s cost includes the cost of deployments it called, so per-deployment cost figures overlap and are not additive. The day, week, and month stats cover the current UTC day, week, and month; each may carry a `resetsAt` instant, which the response forwards verbatim from DIAL Core. Proxies GET /v1/user/limits using the caller\'s session access token. Not cached — every request hits DIAL Core for real-time usage data.
|
|
34
52
|
* Get aggregate usage limits for every visible deployment
|
|
@@ -59,6 +77,16 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
59
77
|
* Get the caller\'s own usage history for the current UTC day, week or month
|
|
60
78
|
*/
|
|
61
79
|
getUserUsageHistory(requestParameters: GetUserUsageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserUsageHistoryResponseDto>;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the signed-in user\'s sessions from DIAL Analytics (ADAS) for the current UTC day, ISO week (Monday start) or month, from its start to the request time: a chat conversation or a coding-agent session, keyed by the client\'s own session id from the `usage_client_identity` enrichment of the recommended ADAS catalog. Each session has its first and latest request, turns, model calls and spend; the window has totals over every session, the calls without a session id, and the distinct sessions per UTC date. A session counts the priced model calls at every depth of the call chain (`deployment_price`), so its figures differ from the usage history, which counts root spans. At most the 100 latest sessions are listed, and `truncated` says whether more exist. With `costObject` and `policy` (a `budgets` entry of `GET /user/limits`), every figure is narrowed to the model calls that budget paid for. The BFF forwards the caller\'s session access token to ADAS, and every query keeps only the caller\'s own rows (`user_hash = caller.user_hash`). Without the session columns in DIAL Analytics the answer is `sessions_unsupported`; when ADAS cannot answer, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
82
|
+
* Get the caller\'s own sessions for the current UTC day, week or month
|
|
83
|
+
*/
|
|
84
|
+
getUserUsageSessionsRaw(requestParameters: GetUserUsageSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserUsageSessionsResponseDto>>;
|
|
85
|
+
/**
|
|
86
|
+
* Returns the signed-in user\'s sessions from DIAL Analytics (ADAS) for the current UTC day, ISO week (Monday start) or month, from its start to the request time: a chat conversation or a coding-agent session, keyed by the client\'s own session id from the `usage_client_identity` enrichment of the recommended ADAS catalog. Each session has its first and latest request, turns, model calls and spend; the window has totals over every session, the calls without a session id, and the distinct sessions per UTC date. A session counts the priced model calls at every depth of the call chain (`deployment_price`), so its figures differ from the usage history, which counts root spans. At most the 100 latest sessions are listed, and `truncated` says whether more exist. With `costObject` and `policy` (a `budgets` entry of `GET /user/limits`), every figure is narrowed to the model calls that budget paid for. The BFF forwards the caller\'s session access token to ADAS, and every query keeps only the caller\'s own rows (`user_hash = caller.user_hash`). Without the session columns in DIAL Analytics the answer is `sessions_unsupported`; when ADAS cannot answer, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
87
|
+
* Get the caller\'s own sessions for the current UTC day, week or month
|
|
88
|
+
*/
|
|
89
|
+
getUserUsageSessions(requestParameters: GetUserUsageSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserUsageSessionsResponseDto>;
|
|
62
90
|
/**
|
|
63
91
|
* Returns the signed-in user\'s spend and request count from DIAL Analytics (ADAS) across all of their budgets, for the current UTC day, ISO week (Monday start) or month from its start to the request time (`current`), and for the previous day, week or month over the same elapsed time, cut at its own end (`previous`): on 20 October, 1–20 October and 1–20 September; on 31 March, all of February. Only model calls a budget paid for count (`budget_outcome` `paid`, as DIAL Core logs the charged budget, ai-dial-core#2308), each at its own price, so calls charged to no budget and rows written before Core logged the budget are not counted. Without budget columns in DIAL Analytics the answer is `budget_unsupported`. The BFF forwards the caller\'s session access token to ADAS, and both queries keep only the caller\'s own rows (`user_hash = caller.user_hash`). When ADAS cannot answer, or either window fails, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
64
92
|
* Get the caller\'s budget-paid spend for the current UTC period and the same time of the previous one
|
|
@@ -69,6 +97,16 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
69
97
|
* Get the caller\'s budget-paid spend for the current UTC period and the same time of the previous one
|
|
70
98
|
*/
|
|
71
99
|
getUserUsageTotals(requestParameters: GetUserUsageTotalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserUsageTotalsResponseDto>;
|
|
100
|
+
/**
|
|
101
|
+
* Sets the default budget to the given `<costObject>/<id>`, or clears it when `budget` is `null`. DIAL Core charges the default when a call names no budget and the default lies in the call\'s cost object. The id must be a budget the caller holds; DIAL Core answers 400 otherwise and its message is passed through. Proxies PUT /v1/user/budgets/default using the caller\'s session access token. Returns `{ \"budget\": null }` when the default is cleared.
|
|
102
|
+
* Set or clear the signed-in user\'s default budget
|
|
103
|
+
*/
|
|
104
|
+
putUserDefaultBudgetRaw(requestParameters: PutUserDefaultBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefaultBudgetResponseDto>>;
|
|
105
|
+
/**
|
|
106
|
+
* Sets the default budget to the given `<costObject>/<id>`, or clears it when `budget` is `null`. DIAL Core charges the default when a call names no budget and the default lies in the call\'s cost object. The id must be a budget the caller holds; DIAL Core answers 400 otherwise and its message is passed through. Proxies PUT /v1/user/budgets/default using the caller\'s session access token. Returns `{ \"budget\": null }` when the default is cleared.
|
|
107
|
+
* Set or clear the signed-in user\'s default budget
|
|
108
|
+
*/
|
|
109
|
+
putUserDefaultBudget(requestParameters: PutUserDefaultBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DefaultBudgetResponseDto>;
|
|
72
110
|
}
|
|
73
111
|
/**
|
|
74
112
|
* @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,EACV,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oBAAoB;IACnC,e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AM,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"}
|
|
@@ -19,6 +19,37 @@ const runtime = require("../runtime");
|
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
class UserApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Returns every budget instance the caller can indicate to DIAL Core with the `X-DIAL-BUDGET` header, with its caps and current spend, the caller\'s default budget, and DIAL Core\'s budget-selection flags. Values are forwarded from DIAL Core as received: nothing is filtered, re-ordered or reformatted, and `resetsAt` is passed through unchanged. A window `total` at or above 2^53 is the unlimited sentinel. Answers an empty `budgets` list when DIAL Core has spending limits off. Proxies GET /v1/user/budgets using the caller\'s session access token. Not cached — every request hits DIAL Core for real-time spend.
|
|
24
|
+
* List the spending budgets the signed-in user holds
|
|
25
|
+
*/
|
|
26
|
+
async getUserBudgetsRaw(initOverrides) {
|
|
27
|
+
const queryParameters = {};
|
|
28
|
+
const headerParameters = {};
|
|
29
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
30
|
+
const token = this.configuration.accessToken;
|
|
31
|
+
const tokenString = await token('bearer', []);
|
|
32
|
+
if (tokenString) {
|
|
33
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
let urlPath = `/api/v1/user/budgets`;
|
|
37
|
+
const response = await this.request({
|
|
38
|
+
path: urlPath,
|
|
39
|
+
method: 'GET',
|
|
40
|
+
headers: headerParameters,
|
|
41
|
+
query: queryParameters,
|
|
42
|
+
}, initOverrides);
|
|
43
|
+
return new runtime.JSONApiResponse(response);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns every budget instance the caller can indicate to DIAL Core with the `X-DIAL-BUDGET` header, with its caps and current spend, the caller\'s default budget, and DIAL Core\'s budget-selection flags. Values are forwarded from DIAL Core as received: nothing is filtered, re-ordered or reformatted, and `resetsAt` is passed through unchanged. A window `total` at or above 2^53 is the unlimited sentinel. Answers an empty `budgets` list when DIAL Core has spending limits off. Proxies GET /v1/user/budgets using the caller\'s session access token. Not cached — every request hits DIAL Core for real-time spend.
|
|
47
|
+
* List the spending budgets the signed-in user holds
|
|
48
|
+
*/
|
|
49
|
+
async getUserBudgets(initOverrides) {
|
|
50
|
+
const response = await this.getUserBudgetsRaw(initOverrides);
|
|
51
|
+
return await response.value();
|
|
52
|
+
}
|
|
22
53
|
/**
|
|
23
54
|
* Returns rate-limit and calendar-period usage statistics for every deployment of the requested kinds visible to the caller, plus the caller\'s global cost-budget figures. `deploymentTypes` selects models and/or applications; when omitted, the server-configured default kinds are reported. A deployment\'s cost includes the cost of deployments it called, so per-deployment cost figures overlap and are not additive. The day, week, and month stats cover the current UTC day, week, and month; each may carry a `resetsAt` instant, which the response forwards verbatim from DIAL Core. Proxies GET /v1/user/limits using the caller\'s session access token. Not cached — every request hits DIAL Core for real-time usage data.
|
|
24
55
|
* Get aggregate usage limits for every visible deployment
|
|
@@ -130,6 +161,49 @@ class UserApi extends runtime.BaseAPI {
|
|
|
130
161
|
const response = await this.getUserUsageHistoryRaw(requestParameters, initOverrides);
|
|
131
162
|
return await response.value();
|
|
132
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Returns the signed-in user\'s sessions from DIAL Analytics (ADAS) for the current UTC day, ISO week (Monday start) or month, from its start to the request time: a chat conversation or a coding-agent session, keyed by the client\'s own session id from the `usage_client_identity` enrichment of the recommended ADAS catalog. Each session has its first and latest request, turns, model calls and spend; the window has totals over every session, the calls without a session id, and the distinct sessions per UTC date. A session counts the priced model calls at every depth of the call chain (`deployment_price`), so its figures differ from the usage history, which counts root spans. At most the 100 latest sessions are listed, and `truncated` says whether more exist. With `costObject` and `policy` (a `budgets` entry of `GET /user/limits`), every figure is narrowed to the model calls that budget paid for. The BFF forwards the caller\'s session access token to ADAS, and every query keeps only the caller\'s own rows (`user_hash = caller.user_hash`). Without the session columns in DIAL Analytics the answer is `sessions_unsupported`; when ADAS cannot answer, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
166
|
+
* Get the caller\'s own sessions for the current UTC day, week or month
|
|
167
|
+
*/
|
|
168
|
+
async getUserUsageSessionsRaw(requestParameters, initOverrides) {
|
|
169
|
+
if (requestParameters['period'] == null) {
|
|
170
|
+
throw new runtime.RequiredError('period', 'Required parameter "period" was null or undefined when calling getUserUsageSessions().');
|
|
171
|
+
}
|
|
172
|
+
const queryParameters = {};
|
|
173
|
+
if (requestParameters['period'] != null) {
|
|
174
|
+
queryParameters['period'] = requestParameters['period'];
|
|
175
|
+
}
|
|
176
|
+
if (requestParameters['costObject'] != null) {
|
|
177
|
+
queryParameters['costObject'] = requestParameters['costObject'];
|
|
178
|
+
}
|
|
179
|
+
if (requestParameters['policy'] != null) {
|
|
180
|
+
queryParameters['policy'] = requestParameters['policy'];
|
|
181
|
+
}
|
|
182
|
+
const headerParameters = {};
|
|
183
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
184
|
+
const token = this.configuration.accessToken;
|
|
185
|
+
const tokenString = await token('bearer', []);
|
|
186
|
+
if (tokenString) {
|
|
187
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
let urlPath = `/api/v1/user/usage/sessions`;
|
|
191
|
+
const response = await this.request({
|
|
192
|
+
path: urlPath,
|
|
193
|
+
method: 'GET',
|
|
194
|
+
headers: headerParameters,
|
|
195
|
+
query: queryParameters,
|
|
196
|
+
}, initOverrides);
|
|
197
|
+
return new runtime.JSONApiResponse(response);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Returns the signed-in user\'s sessions from DIAL Analytics (ADAS) for the current UTC day, ISO week (Monday start) or month, from its start to the request time: a chat conversation or a coding-agent session, keyed by the client\'s own session id from the `usage_client_identity` enrichment of the recommended ADAS catalog. Each session has its first and latest request, turns, model calls and spend; the window has totals over every session, the calls without a session id, and the distinct sessions per UTC date. A session counts the priced model calls at every depth of the call chain (`deployment_price`), so its figures differ from the usage history, which counts root spans. At most the 100 latest sessions are listed, and `truncated` says whether more exist. With `costObject` and `policy` (a `budgets` entry of `GET /user/limits`), every figure is narrowed to the model calls that budget paid for. The BFF forwards the caller\'s session access token to ADAS, and every query keeps only the caller\'s own rows (`user_hash = caller.user_hash`). Without the session columns in DIAL Analytics the answer is `sessions_unsupported`; when ADAS cannot answer, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
201
|
+
* Get the caller\'s own sessions for the current UTC day, week or month
|
|
202
|
+
*/
|
|
203
|
+
async getUserUsageSessions(requestParameters, initOverrides) {
|
|
204
|
+
const response = await this.getUserUsageSessionsRaw(requestParameters, initOverrides);
|
|
205
|
+
return await response.value();
|
|
206
|
+
}
|
|
133
207
|
/**
|
|
134
208
|
* Returns the signed-in user\'s spend and request count from DIAL Analytics (ADAS) across all of their budgets, for the current UTC day, ISO week (Monday start) or month from its start to the request time (`current`), and for the previous day, week or month over the same elapsed time, cut at its own end (`previous`): on 20 October, 1–20 October and 1–20 September; on 31 March, all of February. Only model calls a budget paid for count (`budget_outcome` `paid`, as DIAL Core logs the charged budget, ai-dial-core#2308), each at its own price, so calls charged to no budget and rows written before Core logged the budget are not counted. Without budget columns in DIAL Analytics the answer is `budget_unsupported`. The BFF forwards the caller\'s session access token to ADAS, and both queries keep only the caller\'s own rows (`user_hash = caller.user_hash`). When ADAS cannot answer, or either window fails, the response is still `200`, with `available: false` and a `reason`. Not cached.
|
|
135
209
|
* Get the caller\'s budget-paid spend for the current UTC period and the same time of the previous one
|
|
@@ -167,6 +241,42 @@ class UserApi extends runtime.BaseAPI {
|
|
|
167
241
|
const response = await this.getUserUsageTotalsRaw(requestParameters, initOverrides);
|
|
168
242
|
return await response.value();
|
|
169
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* Sets the default budget to the given `<costObject>/<id>`, or clears it when `budget` is `null`. DIAL Core charges the default when a call names no budget and the default lies in the call\'s cost object. The id must be a budget the caller holds; DIAL Core answers 400 otherwise and its message is passed through. Proxies PUT /v1/user/budgets/default using the caller\'s session access token. Returns `{ \"budget\": null }` when the default is cleared.
|
|
246
|
+
* Set or clear the signed-in user\'s default budget
|
|
247
|
+
*/
|
|
248
|
+
async putUserDefaultBudgetRaw(requestParameters, initOverrides) {
|
|
249
|
+
if (requestParameters['updateDefaultBudgetRequestDto'] == null) {
|
|
250
|
+
throw new runtime.RequiredError('updateDefaultBudgetRequestDto', 'Required parameter "updateDefaultBudgetRequestDto" was null or undefined when calling putUserDefaultBudget().');
|
|
251
|
+
}
|
|
252
|
+
const queryParameters = {};
|
|
253
|
+
const headerParameters = {};
|
|
254
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
255
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
256
|
+
const token = this.configuration.accessToken;
|
|
257
|
+
const tokenString = await token('bearer', []);
|
|
258
|
+
if (tokenString) {
|
|
259
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
let urlPath = `/api/v1/user/budgets/default`;
|
|
263
|
+
const response = await this.request({
|
|
264
|
+
path: urlPath,
|
|
265
|
+
method: 'PUT',
|
|
266
|
+
headers: headerParameters,
|
|
267
|
+
query: queryParameters,
|
|
268
|
+
body: requestParameters['updateDefaultBudgetRequestDto'],
|
|
269
|
+
}, initOverrides);
|
|
270
|
+
return new runtime.JSONApiResponse(response);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Sets the default budget to the given `<costObject>/<id>`, or clears it when `budget` is `null`. DIAL Core charges the default when a call names no budget and the default lies in the call\'s cost object. The id must be a budget the caller holds; DIAL Core answers 400 otherwise and its message is passed through. Proxies PUT /v1/user/budgets/default using the caller\'s session access token. Returns `{ \"budget\": null }` when the default is cleared.
|
|
274
|
+
* Set or clear the signed-in user\'s default budget
|
|
275
|
+
*/
|
|
276
|
+
async putUserDefaultBudget(requestParameters, initOverrides) {
|
|
277
|
+
const response = await this.putUserDefaultBudgetRaw(requestParameters, initOverrides);
|
|
278
|
+
return await response.value();
|
|
279
|
+
}
|
|
170
280
|
}
|
|
171
281
|
exports.UserApi = UserApi;
|
|
172
282
|
/**
|