@epam/ai-dial-chat-api-client 1.4.0-rc.1 → 1.4.0-rc.10
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/DeploymentsApi.d.ts +2 -2
- package/generated/src/apis/DeploymentsApi.js +2 -2
- package/generated/src/apis/ModelsApi.d.ts +4 -4
- package/generated/src/apis/ModelsApi.js +4 -4
- package/generated/src/apis/ThemesApi.d.ts +11 -1
- package/generated/src/apis/ThemesApi.d.ts.map +1 -1
- package/generated/src/apis/ThemesApi.js +24 -0
- package/generated/src/apis/UserApi.d.ts +14 -1
- package/generated/src/apis/UserApi.d.ts.map +1 -1
- package/generated/src/apis/UserApi.js +37 -0
- package/generated/src/models/index.d.ts +248 -8
- package/generated/src/models/index.d.ts.map +1 -1
- package/generated/src/models/index.js +11 -2
- package/package.json +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
|
@@ -42,12 +42,12 @@ export declare class DeploymentsApi extends runtime.BaseAPI {
|
|
|
42
42
|
*/
|
|
43
43
|
getDeploymentConfiguration(requestParameters: GetDeploymentConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeploymentConfigurationDto>;
|
|
44
44
|
/**
|
|
45
|
-
* Fetches the full per-entity payload for a model, application, or toolset by id (dispatching to DIAL Core\'s getModel/getApplication/getToolset based on the resolved deployment type) and maps it into a frontend-safe DeploymentDetailsDto. Results are cached server-side for 60 seconds per user; the response sets Cache-Control to private, no-store so browsers and intermediaries never reuse a stale copy after the active user or toolset credentials change.
|
|
45
|
+
* Fetches the full per-entity payload for a model, application, or toolset by id (dispatching to DIAL Core\'s getModel/getApplication/getToolset based on the resolved deployment type) and maps it into a frontend-safe DeploymentDetailsDto. Generation API capabilities include declared Anthropic Messages support without exposing interface settings. Results are cached server-side for 60 seconds per user; the response sets Cache-Control to private, no-store so browsers and intermediaries never reuse a stale copy after the active user or toolset credentials change.
|
|
46
46
|
* Get full details for a single deployment
|
|
47
47
|
*/
|
|
48
48
|
getDeploymentDetailsRaw(requestParameters: GetDeploymentDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeploymentDetailsDto>>;
|
|
49
49
|
/**
|
|
50
|
-
* Fetches the full per-entity payload for a model, application, or toolset by id (dispatching to DIAL Core\'s getModel/getApplication/getToolset based on the resolved deployment type) and maps it into a frontend-safe DeploymentDetailsDto. Results are cached server-side for 60 seconds per user; the response sets Cache-Control to private, no-store so browsers and intermediaries never reuse a stale copy after the active user or toolset credentials change.
|
|
50
|
+
* Fetches the full per-entity payload for a model, application, or toolset by id (dispatching to DIAL Core\'s getModel/getApplication/getToolset based on the resolved deployment type) and maps it into a frontend-safe DeploymentDetailsDto. Generation API capabilities include declared Anthropic Messages support without exposing interface settings. Results are cached server-side for 60 seconds per user; the response sets Cache-Control to private, no-store so browsers and intermediaries never reuse a stale copy after the active user or toolset credentials change.
|
|
51
51
|
* Get full details for a single deployment
|
|
52
52
|
*/
|
|
53
53
|
getDeploymentDetails(requestParameters: GetDeploymentDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeploymentDetailsDto>;
|
|
@@ -55,7 +55,7 @@ class DeploymentsApi extends runtime.BaseAPI {
|
|
|
55
55
|
return await response.value();
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Fetches the full per-entity payload for a model, application, or toolset by id (dispatching to DIAL Core\'s getModel/getApplication/getToolset based on the resolved deployment type) and maps it into a frontend-safe DeploymentDetailsDto. Results are cached server-side for 60 seconds per user; the response sets Cache-Control to private, no-store so browsers and intermediaries never reuse a stale copy after the active user or toolset credentials change.
|
|
58
|
+
* Fetches the full per-entity payload for a model, application, or toolset by id (dispatching to DIAL Core\'s getModel/getApplication/getToolset based on the resolved deployment type) and maps it into a frontend-safe DeploymentDetailsDto. Generation API capabilities include declared Anthropic Messages support without exposing interface settings. Results are cached server-side for 60 seconds per user; the response sets Cache-Control to private, no-store so browsers and intermediaries never reuse a stale copy after the active user or toolset credentials change.
|
|
59
59
|
* Get full details for a single deployment
|
|
60
60
|
*/
|
|
61
61
|
async getDeploymentDetailsRaw(requestParameters, initOverrides) {
|
|
@@ -82,7 +82,7 @@ class DeploymentsApi extends runtime.BaseAPI {
|
|
|
82
82
|
return new runtime.JSONApiResponse(response);
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* Fetches the full per-entity payload for a model, application, or toolset by id (dispatching to DIAL Core\'s getModel/getApplication/getToolset based on the resolved deployment type) and maps it into a frontend-safe DeploymentDetailsDto. Results are cached server-side for 60 seconds per user; the response sets Cache-Control to private, no-store so browsers and intermediaries never reuse a stale copy after the active user or toolset credentials change.
|
|
85
|
+
* Fetches the full per-entity payload for a model, application, or toolset by id (dispatching to DIAL Core\'s getModel/getApplication/getToolset based on the resolved deployment type) and maps it into a frontend-safe DeploymentDetailsDto. Generation API capabilities include declared Anthropic Messages support without exposing interface settings. Results are cached server-side for 60 seconds per user; the response sets Cache-Control to private, no-store so browsers and intermediaries never reuse a stale copy after the active user or toolset credentials change.
|
|
86
86
|
* Get full details for a single deployment
|
|
87
87
|
*/
|
|
88
88
|
async getDeploymentDetails(requestParameters, initOverrides) {
|
|
@@ -32,22 +32,22 @@ export declare class ModelsApi extends runtime.BaseAPI {
|
|
|
32
32
|
*/
|
|
33
33
|
getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DialModelDto>;
|
|
34
34
|
/**
|
|
35
|
-
* Returns one model from the cached model catalog, without a separate DIAL Core call. A model hidden from the catalog key answers 404, never 403, so its existence is not revealed. A model omitted through HIDDEN_ENTITY_TAGS also answers 404.
|
|
35
|
+
* Returns one model from the cached model catalog, without a separate DIAL Core call. Includes the same normalized supportedInterfaces metadata as the list entry. A model hidden from the catalog key answers 404, never 403, so its existence is not revealed. A model omitted through HIDDEN_ENTITY_TAGS also answers 404.
|
|
36
36
|
* Get a model from the catalog
|
|
37
37
|
*/
|
|
38
38
|
getModelCatalogEntryRaw(requestParameters: GetModelCatalogEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelCatalogEntryDto>>;
|
|
39
39
|
/**
|
|
40
|
-
* Returns one model from the cached model catalog, without a separate DIAL Core call. A model hidden from the catalog key answers 404, never 403, so its existence is not revealed. A model omitted through HIDDEN_ENTITY_TAGS also answers 404.
|
|
40
|
+
* Returns one model from the cached model catalog, without a separate DIAL Core call. Includes the same normalized supportedInterfaces metadata as the list entry. A model hidden from the catalog key answers 404, never 403, so its existence is not revealed. A model omitted through HIDDEN_ENTITY_TAGS also answers 404.
|
|
41
41
|
* Get a model from the catalog
|
|
42
42
|
*/
|
|
43
43
|
getModelCatalogEntry(requestParameters: GetModelCatalogEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelCatalogEntryDto>;
|
|
44
44
|
/**
|
|
45
|
-
* Returns the DIAL Core models visible to the server-side MODEL_CATALOG_API_KEY, including models the caller\'s own roles cannot access. Display data only: GET /api/v1/models still decides what the user can use, and Core invocation settings (defaults, responses_defaults, max_retry_attempts, tokenizer_model) are omitted. Models whose description_keywords contain a HIDDEN_ENTITY_TAGS tag are omitted, as in the Chat Catalog. One server-side cache entry, shared by all users, is kept for 5 minutes.
|
|
45
|
+
* Returns the DIAL Core models visible to the server-side MODEL_CATALOG_API_KEY, including models the caller\'s own roles cannot access. Display data only: GET /api/v1/models still decides what the user can use, and Core invocation settings (defaults, responses_defaults, max_retry_attempts, tokenizer_model) are omitted. supportedInterfaces contains normalized advertised API names, without interface defaults or headers. Models whose description_keywords contain a HIDDEN_ENTITY_TAGS tag are omitted, as in the Chat Catalog. One server-side cache entry, shared by all users, is kept for 5 minutes.
|
|
46
46
|
* List the model catalog
|
|
47
47
|
*/
|
|
48
48
|
listModelCatalogRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelCatalogListResponseDto>>;
|
|
49
49
|
/**
|
|
50
|
-
* Returns the DIAL Core models visible to the server-side MODEL_CATALOG_API_KEY, including models the caller\'s own roles cannot access. Display data only: GET /api/v1/models still decides what the user can use, and Core invocation settings (defaults, responses_defaults, max_retry_attempts, tokenizer_model) are omitted. Models whose description_keywords contain a HIDDEN_ENTITY_TAGS tag are omitted, as in the Chat Catalog. One server-side cache entry, shared by all users, is kept for 5 minutes.
|
|
50
|
+
* Returns the DIAL Core models visible to the server-side MODEL_CATALOG_API_KEY, including models the caller\'s own roles cannot access. Display data only: GET /api/v1/models still decides what the user can use, and Core invocation settings (defaults, responses_defaults, max_retry_attempts, tokenizer_model) are omitted. supportedInterfaces contains normalized advertised API names, without interface defaults or headers. Models whose description_keywords contain a HIDDEN_ENTITY_TAGS tag are omitted, as in the Chat Catalog. One server-side cache entry, shared by all users, is kept for 5 minutes.
|
|
51
51
|
* List the model catalog
|
|
52
52
|
*/
|
|
53
53
|
listModelCatalog(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelCatalogListResponseDto>;
|
|
@@ -55,7 +55,7 @@ class ModelsApi extends runtime.BaseAPI {
|
|
|
55
55
|
return await response.value();
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Returns one model from the cached model catalog, without a separate DIAL Core call. A model hidden from the catalog key answers 404, never 403, so its existence is not revealed. A model omitted through HIDDEN_ENTITY_TAGS also answers 404.
|
|
58
|
+
* Returns one model from the cached model catalog, without a separate DIAL Core call. Includes the same normalized supportedInterfaces metadata as the list entry. A model hidden from the catalog key answers 404, never 403, so its existence is not revealed. A model omitted through HIDDEN_ENTITY_TAGS also answers 404.
|
|
59
59
|
* Get a model from the catalog
|
|
60
60
|
*/
|
|
61
61
|
async getModelCatalogEntryRaw(requestParameters, initOverrides) {
|
|
@@ -82,7 +82,7 @@ class ModelsApi extends runtime.BaseAPI {
|
|
|
82
82
|
return new runtime.JSONApiResponse(response);
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* Returns one model from the cached model catalog, without a separate DIAL Core call. A model hidden from the catalog key answers 404, never 403, so its existence is not revealed. A model omitted through HIDDEN_ENTITY_TAGS also answers 404.
|
|
85
|
+
* Returns one model from the cached model catalog, without a separate DIAL Core call. Includes the same normalized supportedInterfaces metadata as the list entry. A model hidden from the catalog key answers 404, never 403, so its existence is not revealed. A model omitted through HIDDEN_ENTITY_TAGS also answers 404.
|
|
86
86
|
* Get a model from the catalog
|
|
87
87
|
*/
|
|
88
88
|
async getModelCatalogEntry(requestParameters, initOverrides) {
|
|
@@ -90,7 +90,7 @@ class ModelsApi extends runtime.BaseAPI {
|
|
|
90
90
|
return await response.value();
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Returns the DIAL Core models visible to the server-side MODEL_CATALOG_API_KEY, including models the caller\'s own roles cannot access. Display data only: GET /api/v1/models still decides what the user can use, and Core invocation settings (defaults, responses_defaults, max_retry_attempts, tokenizer_model) are omitted. Models whose description_keywords contain a HIDDEN_ENTITY_TAGS tag are omitted, as in the Chat Catalog. One server-side cache entry, shared by all users, is kept for 5 minutes.
|
|
93
|
+
* Returns the DIAL Core models visible to the server-side MODEL_CATALOG_API_KEY, including models the caller\'s own roles cannot access. Display data only: GET /api/v1/models still decides what the user can use, and Core invocation settings (defaults, responses_defaults, max_retry_attempts, tokenizer_model) are omitted. supportedInterfaces contains normalized advertised API names, without interface defaults or headers. Models whose description_keywords contain a HIDDEN_ENTITY_TAGS tag are omitted, as in the Chat Catalog. One server-side cache entry, shared by all users, is kept for 5 minutes.
|
|
94
94
|
* List the model catalog
|
|
95
95
|
*/
|
|
96
96
|
async listModelCatalogRaw(initOverrides) {
|
|
@@ -113,7 +113,7 @@ class ModelsApi extends runtime.BaseAPI {
|
|
|
113
113
|
return new runtime.JSONApiResponse(response);
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* Returns the DIAL Core models visible to the server-side MODEL_CATALOG_API_KEY, including models the caller\'s own roles cannot access. Display data only: GET /api/v1/models still decides what the user can use, and Core invocation settings (defaults, responses_defaults, max_retry_attempts, tokenizer_model) are omitted. Models whose description_keywords contain a HIDDEN_ENTITY_TAGS tag are omitted, as in the Chat Catalog. One server-side cache entry, shared by all users, is kept for 5 minutes.
|
|
116
|
+
* Returns the DIAL Core models visible to the server-side MODEL_CATALOG_API_KEY, including models the caller\'s own roles cannot access. Display data only: GET /api/v1/models still decides what the user can use, and Core invocation settings (defaults, responses_defaults, max_retry_attempts, tokenizer_model) are omitted. supportedInterfaces contains normalized advertised API names, without interface defaults or headers. Models whose description_keywords contain a HIDDEN_ENTITY_TAGS tag are omitted, as in the Chat Catalog. One server-side cache entry, shared by all users, is kept for 5 minutes.
|
|
117
117
|
* List the model catalog
|
|
118
118
|
*/
|
|
119
119
|
async listModelCatalog(initOverrides) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ThemeConfigResponseDto } from '../models/index';
|
|
13
|
+
import type { ThemeCatalogDto, ThemeConfigResponseDto } from '../models/index';
|
|
14
14
|
export interface GetThemeIconRequest {
|
|
15
15
|
iconName: string;
|
|
16
16
|
}
|
|
@@ -18,6 +18,16 @@ export interface GetThemeIconRequest {
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
export declare class ThemesApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the configured themes and shared images in canonical camelCase, normalized from the themes host\'s config.json. Malformed themes and values are dropped; keys Chat does not read (Model Garden and admin images, topicColors, authColors) are omitted. Use this instead of the legacy getThemes passthrough. Results are cached for 5 minutes.
|
|
23
|
+
* Get the canonical theme catalog
|
|
24
|
+
*/
|
|
25
|
+
getThemeCatalogRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ThemeCatalogDto>>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the configured themes and shared images in canonical camelCase, normalized from the themes host\'s config.json. Malformed themes and values are dropped; keys Chat does not read (Model Garden and admin images, topicColors, authColors) are omitted. Use this instead of the legacy getThemes passthrough. Results are cached for 5 minutes.
|
|
28
|
+
* Get the canonical theme catalog
|
|
29
|
+
*/
|
|
30
|
+
getThemeCatalog(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ThemeCatalogDto>;
|
|
21
31
|
/**
|
|
22
32
|
* Fetches a theme icon as SVG or PNG content from the external themes service. The icon name is validated to prevent path traversal attacks - only alphanumeric characters, dashes, underscores, and dots are allowed. Results are cached for 5 minutes.
|
|
23
33
|
* Get theme icon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemesApi.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/ThemesApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemesApi.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/ThemesApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,OAAO,CAAC,OAAO;IAC5C;;;OAGG;IACG,kBAAkB,CACtB,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAoBhD;;;OAGG;IACG,eAAe,CACnB,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,eAAe,CAAC;IAK3B;;;OAGG;IACG,eAAe,CACnB,iBAAiB,EAAE,mBAAmB,EACtC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAmCvC;;;OAGG;IACG,YAAY,CAChB,iBAAiB,EAAE,mBAAmB,EACtC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,MAAM,CAAC;IAQlB;;;OAGG;IACG,YAAY,CAChB,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAoBvD;;;OAGG;IACG,SAAS,CACb,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,sBAAsB,CAAC;CAInC"}
|
|
@@ -19,6 +19,30 @@ const runtime = require("../runtime");
|
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
class ThemesApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Returns the configured themes and shared images in canonical camelCase, normalized from the themes host\'s config.json. Malformed themes and values are dropped; keys Chat does not read (Model Garden and admin images, topicColors, authColors) are omitted. Use this instead of the legacy getThemes passthrough. Results are cached for 5 minutes.
|
|
24
|
+
* Get the canonical theme catalog
|
|
25
|
+
*/
|
|
26
|
+
async getThemeCatalogRaw(initOverrides) {
|
|
27
|
+
const queryParameters = {};
|
|
28
|
+
const headerParameters = {};
|
|
29
|
+
let urlPath = `/api/v1/themes`;
|
|
30
|
+
const response = await this.request({
|
|
31
|
+
path: urlPath,
|
|
32
|
+
method: 'GET',
|
|
33
|
+
headers: headerParameters,
|
|
34
|
+
query: queryParameters,
|
|
35
|
+
}, initOverrides);
|
|
36
|
+
return new runtime.JSONApiResponse(response);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns the configured themes and shared images in canonical camelCase, normalized from the themes host\'s config.json. Malformed themes and values are dropped; keys Chat does not read (Model Garden and admin images, topicColors, authColors) are omitted. Use this instead of the legacy getThemes passthrough. Results are cached for 5 minutes.
|
|
40
|
+
* Get the canonical theme catalog
|
|
41
|
+
*/
|
|
42
|
+
async getThemeCatalog(initOverrides) {
|
|
43
|
+
const response = await this.getThemeCatalogRaw(initOverrides);
|
|
44
|
+
return await response.value();
|
|
45
|
+
}
|
|
22
46
|
/**
|
|
23
47
|
* Fetches a theme icon as SVG or PNG content from the external themes service. The icon name is validated to prevent path traversal attacks - only alphanumeric characters, dashes, underscores, and dots are allowed. Results are cached for 5 minutes.
|
|
24
48
|
* Get theme icon
|
|
@@ -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 } from '../models/index';
|
|
13
|
+
import type { UsageHistoryPeriod, UserLimitStatsResponseDto, UserUsageHistoryResponseDto, UserUsageTotalsResponseDto } from '../models/index';
|
|
14
14
|
export interface GetUserLimitsRequest {
|
|
15
15
|
deploymentTypes?: Array<GetUserLimitsDeploymentTypesEnum>;
|
|
16
16
|
}
|
|
@@ -22,6 +22,9 @@ export interface GetUserUsageHistoryRequest {
|
|
|
22
22
|
costObject?: string;
|
|
23
23
|
policy?: string;
|
|
24
24
|
}
|
|
25
|
+
export interface GetUserUsageTotalsRequest {
|
|
26
|
+
period: UsageHistoryPeriod;
|
|
27
|
+
}
|
|
25
28
|
/**
|
|
26
29
|
*
|
|
27
30
|
*/
|
|
@@ -56,6 +59,16 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
56
59
|
* Get the caller\'s own usage history for the current UTC day, week or month
|
|
57
60
|
*/
|
|
58
61
|
getUserUsageHistory(requestParameters: GetUserUsageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserUsageHistoryResponseDto>;
|
|
62
|
+
/**
|
|
63
|
+
* 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
|
+
* Get the caller\'s budget-paid spend for the current UTC period and the same time of the previous one
|
|
65
|
+
*/
|
|
66
|
+
getUserUsageTotalsRaw(requestParameters: GetUserUsageTotalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserUsageTotalsResponseDto>>;
|
|
67
|
+
/**
|
|
68
|
+
* 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.
|
|
69
|
+
* Get the caller\'s budget-paid spend for the current UTC period and the same time of the previous one
|
|
70
|
+
*/
|
|
71
|
+
getUserUsageTotals(requestParameters: GetUserUsageTotalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserUsageTotalsResponseDto>;
|
|
59
72
|
}
|
|
60
73
|
/**
|
|
61
74
|
* @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,
|
|
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,eAAe,CAAC,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,mBAAmB;IAClC,eAAe,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,OAAO,CAAC,OAAO;IAC1C;;;OAGG;IACG,gBAAgB,CACpB,iBAAiB,EAAE,oBAAoB,EACvC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;IAiC1D;;;OAGG;IACG,aAAa,CACjB,iBAAiB,GAAE,oBAAyB,EAC5C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,yBAAyB,CAAC;IAQrC;;;OAGG;IACG,eAAe,CACnB,iBAAiB,EAAE,mBAAmB,EACtC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;IAiC1D;;;OAGG;IACG,YAAY,CAChB,iBAAiB,GAAE,mBAAwB,EAC3C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,yBAAyB,CAAC;IAQrC;;;OAGG;IACG,sBAAsB,CAC1B,iBAAiB,EAAE,0BAA0B,EAC7C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAgD5D;;;OAGG;IACG,mBAAmB,CACvB,iBAAiB,EAAE,0BAA0B,EAC7C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,2BAA2B,CAAC;IAQvC;;;OAGG;IACG,qBAAqB,CACzB,iBAAiB,EAAE,yBAAyB,EAC5C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAwC3D;;;OAGG;IACG,kBAAkB,CACtB,iBAAiB,EAAE,yBAAyB,EAC5C,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,0BAA0B,CAAC;CAOvC;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"}
|
|
@@ -130,6 +130,43 @@ class UserApi extends runtime.BaseAPI {
|
|
|
130
130
|
const response = await this.getUserUsageHistoryRaw(requestParameters, initOverrides);
|
|
131
131
|
return await response.value();
|
|
132
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* 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
|
+
* Get the caller\'s budget-paid spend for the current UTC period and the same time of the previous one
|
|
136
|
+
*/
|
|
137
|
+
async getUserUsageTotalsRaw(requestParameters, initOverrides) {
|
|
138
|
+
if (requestParameters['period'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('period', 'Required parameter "period" was null or undefined when calling getUserUsageTotals().');
|
|
140
|
+
}
|
|
141
|
+
const queryParameters = {};
|
|
142
|
+
if (requestParameters['period'] != null) {
|
|
143
|
+
queryParameters['period'] = requestParameters['period'];
|
|
144
|
+
}
|
|
145
|
+
const headerParameters = {};
|
|
146
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
147
|
+
const token = this.configuration.accessToken;
|
|
148
|
+
const tokenString = await token('bearer', []);
|
|
149
|
+
if (tokenString) {
|
|
150
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
let urlPath = `/api/v1/user/usage/totals`;
|
|
154
|
+
const response = await this.request({
|
|
155
|
+
path: urlPath,
|
|
156
|
+
method: 'GET',
|
|
157
|
+
headers: headerParameters,
|
|
158
|
+
query: queryParameters,
|
|
159
|
+
}, initOverrides);
|
|
160
|
+
return new runtime.JSONApiResponse(response);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* 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.
|
|
164
|
+
* Get the caller\'s budget-paid spend for the current UTC period and the same time of the previous one
|
|
165
|
+
*/
|
|
166
|
+
async getUserUsageTotals(requestParameters, initOverrides) {
|
|
167
|
+
const response = await this.getUserUsageTotalsRaw(requestParameters, initOverrides);
|
|
168
|
+
return await response.value();
|
|
169
|
+
}
|
|
133
170
|
}
|
|
134
171
|
exports.UserApi = UserApi;
|
|
135
172
|
/**
|