@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.
- package/generated/src/apis/ApplicationsApi.d.ts.map +1 -1
- package/generated/src/apis/ConversationsApi.d.ts +14 -1
- package/generated/src/apis/ConversationsApi.d.ts.map +1 -1
- package/generated/src/apis/ConversationsApi.js +37 -0
- package/generated/src/apis/ModelsApi.d.ts +28 -5
- package/generated/src/apis/ModelsApi.d.ts.map +1 -1
- package/generated/src/apis/ModelsApi.js +70 -4
- package/generated/src/apis/OfflineCredentialsApi.d.ts +2 -2
- package/generated/src/apis/OfflineCredentialsApi.js +2 -2
- package/generated/src/apis/OrgUnitsApi.d.ts +29 -0
- package/generated/src/apis/OrgUnitsApi.d.ts.map +1 -0
- package/generated/src/apis/OrgUnitsApi.js +54 -0
- package/generated/src/apis/ProjectsApi.d.ts +6 -6
- package/generated/src/apis/ProjectsApi.js +6 -6
- package/generated/src/apis/PublishApi.d.ts +123 -3
- package/generated/src/apis/PublishApi.d.ts.map +1 -1
- package/generated/src/apis/PublishApi.js +253 -3
- package/generated/src/apis/UserApi.d.ts +16 -1
- package/generated/src/apis/UserApi.d.ts.map +1 -1
- package/generated/src/apis/UserApi.js +43 -0
- package/generated/src/apis/index.d.ts +1 -0
- package/generated/src/apis/index.d.ts.map +1 -1
- package/generated/src/apis/index.js +1 -0
- package/generated/src/models/index.d.ts +1253 -5
- package/generated/src/models/index.d.ts.map +1 -1
- package/generated/src/models/index.js +199 -2
- package/package.json +2 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
|
@@ -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,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Y,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);
|