@epam/ai-dial-chat-api-client 1.5.0-dev.8 → 1.5.0-dev.80

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.
@@ -2625,6 +2625,12 @@ export interface ConversationMessageCustomContentDto {
2625
2625
  * @memberof ConversationMessageCustomContentDto
2626
2626
  */
2627
2627
  configurationValue?: object;
2628
+ /**
2629
+ * Legacy field: the JSON schema `configuration_value` was submitted against, which the earlier DIAL Chat stored on user messages. Conversation reads return it as stored. A completion request accepts it and does not copy it onto the user message it creates; creating a conversation stores it on the first message as given.
2630
+ * @type {object}
2631
+ * @memberof ConversationMessageCustomContentDto
2632
+ */
2633
+ configurationSchema?: object;
2628
2634
  /**
2629
2635
  * Key-value map of form field values submitted via an embedded form widget.
2630
2636
  * @type {object}
@@ -3651,7 +3657,7 @@ export interface CreateProjectResponseDto {
3651
3657
  */
3652
3658
  export interface CreatePromptDto {
3653
3659
  /**
3654
- * Prompt name. Must not contain a forward slash.
3660
+ * Prompt name. At most 255 UTF-8 bytes, no leading or trailing whitespace, and none of : ; , = / \ { } % & " ? # or control characters; not . or ..
3655
3661
  * @type {string}
3656
3662
  * @memberof CreatePromptDto
3657
3663
  */
@@ -3682,7 +3688,7 @@ export interface CreatePromptDto {
3682
3688
  */
3683
3689
  export interface CreatePromptFolderDto {
3684
3690
  /**
3685
- * Folder name. Must not contain a forward slash.
3691
+ * Folder name. At most 255 UTF-8 bytes, no leading or trailing whitespace, and none of : ; , = / \ { } % & " ? # or control characters; not . or ..
3686
3692
  * @type {string}
3687
3693
  * @memberof CreatePromptFolderDto
3688
3694
  */
@@ -4434,6 +4440,12 @@ export interface DeploymentFeaturesDetailsDto {
4434
4440
  * @memberof DeploymentFeaturesDetailsDto
4435
4441
  */
4436
4442
  responsesApi?: boolean;
4443
+ /**
4444
+ * Supports Anthropic Messages, derived from DIAL Core declared-interface metadata
4445
+ * @type {boolean}
4446
+ * @memberof DeploymentFeaturesDetailsDto
4447
+ */
4448
+ anthropicMessages?: boolean;
4437
4449
  /**
4438
4450
  * Supports custom skills in chat requests
4439
4451
  * @type {boolean}
@@ -6801,6 +6813,12 @@ export interface MessageCustomContentDto {
6801
6813
  * @memberof MessageCustomContentDto
6802
6814
  */
6803
6815
  configurationValue?: object;
6816
+ /**
6817
+ * Legacy field: the JSON schema `configuration_value` was submitted against, which the earlier DIAL Chat stored on user messages. Conversation reads return it as stored. A completion request accepts it and does not copy it onto the user message it creates; creating a conversation stores it on the first message as given.
6818
+ * @type {object}
6819
+ * @memberof MessageCustomContentDto
6820
+ */
6821
+ configurationSchema?: object;
6804
6822
  /**
6805
6823
  * Key-value map of form field values submitted via an embedded form widget.
6806
6824
  * @type {object}
@@ -7065,6 +7083,12 @@ export interface ModelCatalogEntryDto {
7065
7083
  * @memberof ModelCatalogEntryDto
7066
7084
  */
7067
7085
  catalogProperties?: ModelCatalogPropertiesDto;
7086
+ /**
7087
+ * Normalized supported API names from DIAL Core declarations, with legacy OpenAI fallback when metadata is unavailable; no interface defaults or headers
7088
+ * @type {Array<string>}
7089
+ * @memberof ModelCatalogEntryDto
7090
+ */
7091
+ supportedInterfaces?: Array<string>;
7068
7092
  }
7069
7093
  /**
7070
7094
  *
@@ -8840,7 +8864,7 @@ export interface RenameItemResultDto {
8840
8864
  */
8841
8865
  export interface RenamePromptFolderDto {
8842
8866
  /**
8843
- * New folder name. Must not contain a forward slash.
8867
+ * New folder name. At most 255 UTF-8 bytes, no leading or trailing whitespace, and none of : ; , = / \ { } % & " ? # or control characters; not . or ..
8844
8868
  * @type {string}
8845
8869
  * @memberof RenamePromptFolderDto
8846
8870
  */
@@ -10001,6 +10025,101 @@ export declare const TextRefinementPurpose: {
10001
10025
  readonly ProjectInstructions: "project-instructions";
10002
10026
  };
10003
10027
  export type TextRefinementPurpose = (typeof TextRefinementPurpose)[keyof typeof TextRefinementPurpose];
10028
+ /**
10029
+ *
10030
+ * @export
10031
+ * @interface ThemeCatalogDto
10032
+ */
10033
+ export interface ThemeCatalogDto {
10034
+ /**
10035
+ * Every valid configured theme, in configuration order.
10036
+ * @type {Array<ThemeCatalogThemeDto>}
10037
+ * @memberof ThemeCatalogDto
10038
+ */
10039
+ themes: Array<ThemeCatalogThemeDto>;
10040
+ /**
10041
+ * Global images shared by every theme.
10042
+ * @type {ThemeCatalogImagesDto}
10043
+ * @memberof ThemeCatalogDto
10044
+ */
10045
+ images: ThemeCatalogImagesDto;
10046
+ }
10047
+ /**
10048
+ *
10049
+ * @export
10050
+ * @interface ThemeCatalogImagesDto
10051
+ */
10052
+ export interface ThemeCatalogImagesDto {
10053
+ /**
10054
+ * Logo file name for light themes. From `chat-logo-light`.
10055
+ * @type {string}
10056
+ * @memberof ThemeCatalogImagesDto
10057
+ */
10058
+ chatLogoLight?: string;
10059
+ /**
10060
+ * Logo file name for the dark theme. From `chat-logo-dark`.
10061
+ * @type {string}
10062
+ * @memberof ThemeCatalogImagesDto
10063
+ */
10064
+ chatLogoDark?: string;
10065
+ /**
10066
+ * Favicon file name. From `chat-favicon`.
10067
+ * @type {string}
10068
+ * @memberof ThemeCatalogImagesDto
10069
+ */
10070
+ chatFavicon?: string;
10071
+ /**
10072
+ * Fallback add-on icon file name. From `default-addon`.
10073
+ * @type {string}
10074
+ * @memberof ThemeCatalogImagesDto
10075
+ */
10076
+ defaultAddon?: string;
10077
+ /**
10078
+ * Fallback model icon file name. From `default-model`.
10079
+ * @type {string}
10080
+ * @memberof ThemeCatalogImagesDto
10081
+ */
10082
+ defaultModel?: string;
10083
+ /**
10084
+ * Legacy favicon file name. From `favicon`.
10085
+ * @type {string}
10086
+ * @memberof ThemeCatalogImagesDto
10087
+ */
10088
+ favicon?: string;
10089
+ }
10090
+ /**
10091
+ *
10092
+ * @export
10093
+ * @interface ThemeCatalogThemeDto
10094
+ */
10095
+ export interface ThemeCatalogThemeDto {
10096
+ /**
10097
+ * Unique theme ID. Duplicates are dropped; the first wins.
10098
+ * @type {string}
10099
+ * @memberof ThemeCatalogThemeDto
10100
+ */
10101
+ id: string;
10102
+ /**
10103
+ * Human-readable theme name shown in the theme picker.
10104
+ * @type {string}
10105
+ * @memberof ThemeCatalogThemeDto
10106
+ */
10107
+ displayName: string;
10108
+ /**
10109
+ * CSS custom-property values keyed by token name (without the `--` prefix). Token names are not camel-cased.
10110
+ * @type {{ [key: string]: string; }}
10111
+ * @memberof ThemeCatalogThemeDto
10112
+ */
10113
+ colors: {
10114
+ [key: string]: string;
10115
+ };
10116
+ /**
10117
+ * Theme logo file name, usable with GET /api/themes/icon. From the legacy `app-logo` key.
10118
+ * @type {string}
10119
+ * @memberof ThemeCatalogThemeDto
10120
+ */
10121
+ appLogo?: string;
10122
+ }
10004
10123
  /**
10005
10124
  *
10006
10125
  * @export
@@ -10954,7 +11073,7 @@ export interface UpdateProjectResponseDto {
10954
11073
  */
10955
11074
  export interface UpdatePromptDto {
10956
11075
  /**
10957
- * New display name. Must not contain a forward slash.
11076
+ * New display name. At most 255 UTF-8 bytes, no leading or trailing whitespace, and none of : ; , = / \ { } % & " ? # or control characters; not . or ..
10958
11077
  * @type {string}
10959
11078
  * @memberof UpdatePromptDto
10960
11079
  */
@@ -11214,6 +11333,16 @@ export interface UploadArchiveResponseDto {
11214
11333
  */
11215
11334
  results: Array<UploadArchiveEntryResultDto>;
11216
11335
  }
11336
+ /**
11337
+ * How the budget's paid model calls are grouped, from the server setting ANALYTICS_BUDGET_BREAKDOWN. `model`: `byModel` names the model that served each call. `root`: `byModel` names the deployment or route the user called (`root_deployment`), and `unattributed` holds the calls whose rows have no root. `root_nested`: as `root`, and every named root lists the models that served it in `servedBy`. Always sent by this server with `budget`; optional so that a client also reads a server without it.
11338
+ * @export
11339
+ */
11340
+ export declare const UsageHistoryBudgetBreakdown: {
11341
+ readonly Model: "model";
11342
+ readonly Root: "root";
11343
+ readonly RootNested: "root_nested";
11344
+ };
11345
+ export type UsageHistoryBudgetBreakdown = (typeof UsageHistoryBudgetBreakdown)[keyof typeof UsageHistoryBudgetBreakdown];
11217
11346
  /**
11218
11347
  *
11219
11348
  * @export
@@ -11232,6 +11361,12 @@ export interface UsageHistoryBudgetDto {
11232
11361
  * @memberof UsageHistoryBudgetDto
11233
11362
  */
11234
11363
  policy: string;
11364
+ /**
11365
+ * How the budget's paid model calls are grouped, from the server setting ANALYTICS_BUDGET_BREAKDOWN. `model`: `byModel` names the model that served each call. `root`: `byModel` names the deployment or route the user called (`root_deployment`), and `unattributed` holds the calls whose rows have no root. `root_nested`: as `root`, and every named root lists the models that served it in `servedBy`. Always sent by this server with `budget`; optional so that a client also reads a server without it.
11366
+ * @type {UsageHistoryBudgetBreakdown}
11367
+ * @memberof UsageHistoryBudgetDto
11368
+ */
11369
+ breakdown?: UsageHistoryBudgetBreakdown;
11235
11370
  }
11236
11371
  /**
11237
11372
  *
@@ -11252,7 +11387,7 @@ export interface UsageHistoryClientEntryDto {
11252
11387
  */
11253
11388
  spend: number;
11254
11389
  /**
11255
- * Number from this client. Without `budget`, user requests (root spans); with `budget`, model calls the budget paid for.
11390
+ * Number from this client. Without `budget`, priced user requests (root spans with a price); with `budget`, priced model calls the budget paid for. Failed and refused calls, and calls to a model without pricing, carry no price and are not counted.
11256
11391
  * @type {number}
11257
11392
  * @memberof UsageHistoryClientEntryDto
11258
11393
  */
@@ -11277,13 +11412,13 @@ export interface UsageHistoryDailyEntryDto {
11277
11412
  */
11278
11413
  spend: number;
11279
11414
  /**
11280
- * Number on that date. Without `budget`, user requests (root spans); with `budget`, model calls the budget paid for.
11415
+ * Number on that date. Without `budget`, priced user requests (root spans with a price); with `budget`, priced model calls the budget paid for. Failed and refused calls, and calls to a model without pricing, carry no price and are not counted.
11281
11416
  * @type {number}
11282
11417
  * @memberof UsageHistoryDailyEntryDto
11283
11418
  */
11284
11419
  requests: number;
11285
11420
  /**
11286
- * That date's spend per deployment, keyed by the deployment names of the top-level `byModel` (including `other`). Keys with no spend and no requests on that date are omitted, so a date without usage has an empty object.
11421
+ * That date's spend per entry, keyed by the `deployment` names of the top-level `byModel` (including `other` and `unattributed`). Keys with no spend and no requests on that date are omitted, so a date without usage has an empty object.
11287
11422
  * @type {{ [key: string]: number; }}
11288
11423
  * @memberof UsageHistoryDailyEntryDto
11289
11424
  */
@@ -11298,7 +11433,7 @@ export interface UsageHistoryDailyEntryDto {
11298
11433
  */
11299
11434
  export interface UsageHistoryModelEntryDto {
11300
11435
  /**
11301
- * Root deployment the user called (with `budget`: the model the budget paid for), or `other` for the remainder beyond the top 10 by spend.
11436
+ * Without `budget`: the root deployment the user called. With `budget` and `breakdown` `model`: the model the budget paid for. With `breakdown` `root` or `root_nested`: the deployment or route the user called (DIAL Core's `root_deployment`). Reserved names: `other` holds the remainder beyond the top 10 by spend; `unattributed` (budget with a root breakdown only, always last) holds the paid calls whose rows carry no root, for example rows written before DIAL Core recorded it. In a root breakdown a real root named `other` or `unattributed` is never listed by name: it is counted in `other`, so both names always mean the remainder and the calls without a root.
11302
11437
  * @type {string}
11303
11438
  * @memberof UsageHistoryModelEntryDto
11304
11439
  */
@@ -11310,11 +11445,17 @@ export interface UsageHistoryModelEntryDto {
11310
11445
  */
11311
11446
  spend: number;
11312
11447
  /**
11313
- * Number for this deployment. Without `budget`, user requests (root spans); with `budget`, model calls the budget paid for.
11448
+ * Number for this entry. Without `budget`, priced user requests (root spans with a price); with `budget`, priced model calls the budget paid for. Failed and refused calls, and calls to a model without pricing, carry no price and are not counted. With a root breakdown, the paid model calls under this root, wherever they sit in its call chain.
11314
11449
  * @type {number}
11315
11450
  * @memberof UsageHistoryModelEntryDto
11316
11451
  */
11317
11452
  requests: number;
11453
+ /**
11454
+ * Present only with `budget` and `breakdown` `root_nested`, on every named root (never on `other` or `unattributed`). The models that served the paid calls of this root in the window, by spend descending, then requests descending, then name. Their exact spend and requests sum to this entry's, except for paid calls ingested between the two DIAL Analytics reads, which can make them sum slightly above it. Each spend is rounded on its own, so the rounded values may differ from this entry's by up to 0.0000005 each. When the served-by read returns its limit of 1000 (root, model) pairs, the lowest-spend pairs may be cut, and a final `other` entry holds what the listed models leave of this entry.
11455
+ * @type {Array<UsageHistoryServedByEntryDto>}
11456
+ * @memberof UsageHistoryModelEntryDto
11457
+ */
11458
+ servedBy?: Array<UsageHistoryServedByEntryDto>;
11318
11459
  }
11319
11460
  /**
11320
11461
  *
@@ -11326,6 +11467,56 @@ export declare const UsageHistoryPeriod: {
11326
11467
  readonly Month: "month";
11327
11468
  };
11328
11469
  export type UsageHistoryPeriod = (typeof UsageHistoryPeriod)[keyof typeof UsageHistoryPeriod];
11470
+ /**
11471
+ *
11472
+ * @export
11473
+ * @interface UsageHistoryServedByEntryDto
11474
+ */
11475
+ export interface UsageHistoryServedByEntryDto {
11476
+ /**
11477
+ * Model that served the root's paid calls, or `other` for the difference when the served-by read of the window returned its limit of 1000 (root, model) pairs.
11478
+ * @type {string}
11479
+ * @memberof UsageHistoryServedByEntryDto
11480
+ */
11481
+ deployment: string;
11482
+ /**
11483
+ * Spend in USD, rounded to 6 decimal places (half away from zero). Without `budget`, summed from the root span's chain-inclusive price: a call to an application includes the models it called. With `budget`, summed from the own price of the model calls that budget paid for.
11484
+ * @type {number}
11485
+ * @memberof UsageHistoryServedByEntryDto
11486
+ */
11487
+ spend: number;
11488
+ /**
11489
+ * Number of model calls the budget paid for, of this model under the root.
11490
+ * @type {number}
11491
+ * @memberof UsageHistoryServedByEntryDto
11492
+ */
11493
+ requests: number;
11494
+ }
11495
+ /**
11496
+ *
11497
+ * @export
11498
+ * @interface UsageHistoryTokensDto
11499
+ */
11500
+ export interface UsageHistoryTokensDto {
11501
+ /**
11502
+ * Prompt (input) tokens. Summed over the caller's chat-completion rows of the window (DIAL Analytics `event_kind` `llm_call`) at every depth of the call chain: unlike `totals`, it includes the model calls an application made, plus the usage the application reports itself on its own row (DIAL Core adds no model tokens to it). With `budget`, only that budget's paid chat-completion calls. DIAL Core accounts them the OpenAI way: this number includes `cached` and `cacheCreation`, so `cached / prompt` is the cache hit rate. Rows whose provider reported no cache counters add only to this number, so that rate is a lower bound.
11503
+ * @type {number}
11504
+ * @memberof UsageHistoryTokensDto
11505
+ */
11506
+ prompt: number;
11507
+ /**
11508
+ * Prompt tokens the provider served from its cache (cache reads), a part of `prompt`. A row whose provider reported no cache counters adds 0.
11509
+ * @type {number}
11510
+ * @memberof UsageHistoryTokensDto
11511
+ */
11512
+ cached: number;
11513
+ /**
11514
+ * Prompt tokens the provider wrote to its cache (cache writes), a part of `prompt`. A row whose provider reported no cache counters adds 0, and rows written by DIAL Core older than 0.47 never report it.
11515
+ * @type {number}
11516
+ * @memberof UsageHistoryTokensDto
11517
+ */
11518
+ cacheCreation: number;
11519
+ }
11329
11520
  /**
11330
11521
  *
11331
11522
  * @export
@@ -11339,14 +11530,14 @@ export interface UsageHistoryTotalsDto {
11339
11530
  */
11340
11531
  spend: number;
11341
11532
  /**
11342
- * Number in the window. Without `budget`, user requests (root spans); with `budget`, model calls the budget paid for.
11533
+ * Number in the window. Without `budget`, priced user requests (root spans with a price); with `budget`, priced model calls the budget paid for. Failed and refused calls, and calls to a model without pricing, carry no price and are not counted.
11343
11534
  * @type {number}
11344
11535
  * @memberof UsageHistoryTotalsDto
11345
11536
  */
11346
11537
  requests: number;
11347
11538
  }
11348
11539
  /**
11349
- * Present only when `available` is `false`. `not_configured`: ANALYTICS_URL is unset. `forbidden`: DIAL Analytics refused the caller's token, the caller cannot read the usage log, or DIAL Analytics cannot run the own-rows filter (no query caller values, or `user_hash` hidden from the caller). `unavailable`: timeout, network error or server error. `budget_unsupported`: `costObject` and `policy` were given, but the caller's DIAL Analytics schema of the usage log has no budget columns.
11540
+ * Present only when `available` is `false`. `not_configured`: ANALYTICS_URL is unset. `forbidden`: DIAL Analytics refused the caller's token, the caller cannot read the usage log, or DIAL Analytics cannot run the own-rows filter (no query caller values, or `user_hash` hidden from the caller). `unavailable`: timeout, network error, server error, or, with `budget` and a root breakdown, a caller schema of the usage log without `root_deployment` (needs DIAL Analytics 0.25). `budget_unsupported`: `costObject` and `policy` were given, but the caller's DIAL Analytics schema of the usage log has no budget columns.
11350
11541
  * @export
11351
11542
  */
11352
11543
  export declare const UsageHistoryUnavailableReason: {
@@ -11381,6 +11572,37 @@ export interface UsageHistoryWindowDto {
11381
11572
  */
11382
11573
  to: string;
11383
11574
  }
11575
+ /**
11576
+ *
11577
+ * @export
11578
+ * @interface UsageTotalsWindowDto
11579
+ */
11580
+ export interface UsageTotalsWindowDto {
11581
+ /**
11582
+ * Inclusive window start, ISO-8601 UTC with milliseconds.
11583
+ * @type {string}
11584
+ * @memberof UsageTotalsWindowDto
11585
+ */
11586
+ from: string;
11587
+ /**
11588
+ * Exclusive window end, ISO-8601 UTC with milliseconds. `current`: the request time. `previous`: its start plus the time elapsed in `current`, or the start of `current` when the previous period is shorter.
11589
+ * @type {string}
11590
+ * @memberof UsageTotalsWindowDto
11591
+ */
11592
+ to: string;
11593
+ /**
11594
+ * Spend in USD that budgets paid in the window, summed from each paid model call's own price and rounded once to 6 decimal places (half away from zero). Only priced model calls a budget paid for count (`budget_outcome` `paid` with a `deployment_price`, whatever the cost object and policy). Failed calls, calls charged to no budget, and rows written before DIAL Core logged the charged budget are not counted.
11595
+ * @type {number}
11596
+ * @memberof UsageTotalsWindowDto
11597
+ */
11598
+ spend: number;
11599
+ /**
11600
+ * Number of model calls budgets paid for in the window. Only priced model calls a budget paid for count (`budget_outcome` `paid` with a `deployment_price`, whatever the cost object and policy). Failed calls, calls charged to no budget, and rows written before DIAL Core logged the charged budget are not counted.
11601
+ * @type {number}
11602
+ * @memberof UsageTotalsWindowDto
11603
+ */
11604
+ requests: number;
11605
+ }
11384
11606
  /**
11385
11607
  *
11386
11608
  * @export
@@ -11533,19 +11755,19 @@ export interface UserProfileDto {
11533
11755
  */
11534
11756
  export interface UserUsageHistoryResponseDto {
11535
11757
  /**
11536
- * Whether DIAL Analytics answered. `true`: `period`, `currency`, `totals`, `daily` and `byModel` are present (and `byClient` when the client-identity enrichment is available). `false`: only `reason` is present.
11758
+ * Whether DIAL Analytics answered. `true`: `period`, `currency`, `totals`, `daily` and `byModel` are present (and `byClient` when the client-identity enrichment is available, `latestRequestAt` when the window has a counted row, `tokens` when the token totals were read). `false`: only `reason` is present.
11537
11759
  * @type {boolean}
11538
11760
  * @memberof UserUsageHistoryResponseDto
11539
11761
  */
11540
11762
  available: boolean;
11541
11763
  /**
11542
- * Present only when `available` is `false`. `not_configured`: ANALYTICS_URL is unset. `forbidden`: DIAL Analytics refused the caller's token, the caller cannot read the usage log, or DIAL Analytics cannot run the own-rows filter (no query caller values, or `user_hash` hidden from the caller). `unavailable`: timeout, network error or server error. `budget_unsupported`: `costObject` and `policy` were given, but the caller's DIAL Analytics schema of the usage log has no budget columns.
11764
+ * Present only when `available` is `false`. `not_configured`: ANALYTICS_URL is unset. `forbidden`: DIAL Analytics refused the caller's token, the caller cannot read the usage log, or DIAL Analytics cannot run the own-rows filter (no query caller values, or `user_hash` hidden from the caller). `unavailable`: timeout, network error, server error, or, with `budget` and a root breakdown, a caller schema of the usage log without `root_deployment` (needs DIAL Analytics 0.25). `budget_unsupported`: `costObject` and `policy` were given, but the caller's DIAL Analytics schema of the usage log has no budget columns.
11543
11765
  * @type {UsageHistoryUnavailableReason}
11544
11766
  * @memberof UserUsageHistoryResponseDto
11545
11767
  */
11546
11768
  reason?: UsageHistoryUnavailableReason;
11547
11769
  /**
11548
- * Present only when `available` is `true` and the request named a budget: every figure is then that budget's, from the model calls it paid for. Rows written before DIAL Core logged the charged budget carry none and are not counted.
11770
+ * Present only when `available` is `true` and the request named a budget: every figure is then that budget's, from the model calls it paid for, grouped as `breakdown` says. Rows written before DIAL Core logged the charged budget carry none and are not counted.
11549
11771
  * @type {UsageHistoryBudgetDto}
11550
11772
  * @memberof UserUsageHistoryResponseDto
11551
11773
  */
@@ -11556,6 +11778,12 @@ export interface UserUsageHistoryResponseDto {
11556
11778
  * @memberof UserUsageHistoryResponseDto
11557
11779
  */
11558
11780
  period?: UsageHistoryWindowDto;
11781
+ /**
11782
+ * Present only when `available` is `true` and the window has a counted row: the `request_time` of the latest row that `totals` counts, in the same scope (without `budget` the latest priced root span, with `budget` the latest priced model call that budget paid for), ISO-8601 UTC with milliseconds. It is the time of the latest counted request, not an ingest watermark: DIAL Analytics stores a call minutes after it is made (usually 1 to 11, rarely up to a day), so calls newer than this may exist and appear on a later request. Absent when no row is counted.
11783
+ * @type {string}
11784
+ * @memberof UserUsageHistoryResponseDto
11785
+ */
11786
+ latestRequestAt?: string;
11559
11787
  /**
11560
11788
  * Present only when `available` is `true`. Always `USD`: DIAL Analytics prices carry no currency.
11561
11789
  * @type {string}
@@ -11568,6 +11796,12 @@ export interface UserUsageHistoryResponseDto {
11568
11796
  * @memberof UserUsageHistoryResponseDto
11569
11797
  */
11570
11798
  totals?: UsageHistoryTotalsDto;
11799
+ /**
11800
+ * Present only when `available` is `true` and the token totals were read: the caller's DIAL Analytics schema of the usage log lists `prompt_tokens`, `cached_prompt_tokens`, `cache_creation_tokens` and `event_kind`, and their query succeeded. Otherwise absent, not zero-filled; the other fields do not depend on it. Rows written by DIAL Core older than 0.47, and applications that copy their models' usage into their own report, are counted twice.
11801
+ * @type {UsageHistoryTokensDto}
11802
+ * @memberof UserUsageHistoryResponseDto
11803
+ */
11804
+ tokens?: UsageHistoryTokensDto;
11571
11805
  /**
11572
11806
  * Present only when `available` is `true`. One entry per UTC date of the window, ascending, zero-filled.
11573
11807
  * @type {Array<UsageHistoryDailyEntryDto>}
@@ -11575,7 +11809,7 @@ export interface UserUsageHistoryResponseDto {
11575
11809
  */
11576
11810
  daily?: Array<UsageHistoryDailyEntryDto>;
11577
11811
  /**
11578
- * Present only when `available` is `true`. Root deployments by spend descending, at most 10, followed by one `other` entry with the remainder when more than 10 have usage. When the request named a budget, the entries are the models whose calls that budget paid for, including models called by an application or other deployment, not root deployments.
11812
+ * Present only when `available` is `true`. Root deployments by spend descending, at most 10, followed by one `other` entry with the remainder when more than 10 have usage. When the request named a budget, the entries are the models whose calls that budget paid for, including models called by an application or other deployment (`breakdown` `model`), or the deployments or routes the user called (`root`, `root_nested`), then `other`, then `unattributed` for paid calls without a root.
11579
11813
  * @type {Array<UsageHistoryModelEntryDto>}
11580
11814
  * @memberof UserUsageHistoryResponseDto
11581
11815
  */
@@ -11587,6 +11821,49 @@ export interface UserUsageHistoryResponseDto {
11587
11821
  */
11588
11822
  byClient?: Array<UsageHistoryClientEntryDto>;
11589
11823
  }
11824
+ /**
11825
+ *
11826
+ * @export
11827
+ * @interface UserUsageTotalsResponseDto
11828
+ */
11829
+ export interface UserUsageTotalsResponseDto {
11830
+ /**
11831
+ * Whether DIAL Analytics answered. `true`: `period`, `currency`, `current` and `previous` are present. `false`: only `reason` is present.
11832
+ * @type {boolean}
11833
+ * @memberof UserUsageTotalsResponseDto
11834
+ */
11835
+ available: boolean;
11836
+ /**
11837
+ * Present only when `available` is `false`. `not_configured`: ANALYTICS_URL is unset. `forbidden`: DIAL Analytics refused the caller's token, the caller cannot read the usage log, or DIAL Analytics cannot run the own-rows filter. `unavailable`: timeout, network error, server error or an unexpected response, for either window. `budget_unsupported`: the caller's DIAL Analytics schema of the usage log has no budget columns.
11838
+ * @type {UsageHistoryUnavailableReason}
11839
+ * @memberof UserUsageTotalsResponseDto
11840
+ */
11841
+ reason?: UsageHistoryUnavailableReason;
11842
+ /**
11843
+ * Present only when `available` is `true`. The requested period.
11844
+ * @type {UsageHistoryPeriod}
11845
+ * @memberof UserUsageTotalsResponseDto
11846
+ */
11847
+ period?: UsageHistoryPeriod;
11848
+ /**
11849
+ * Present only when `available` is `true`. Always `USD`: DIAL Analytics prices carry no currency.
11850
+ * @type {string}
11851
+ * @memberof UserUsageTotalsResponseDto
11852
+ */
11853
+ currency?: string;
11854
+ /**
11855
+ * Present only when `available` is `true`. The current UTC day, ISO week (Monday start) or month, from its start to the request time.
11856
+ * @type {UsageTotalsWindowDto}
11857
+ * @memberof UserUsageTotalsResponseDto
11858
+ */
11859
+ current?: UsageTotalsWindowDto;
11860
+ /**
11861
+ * Present only when `available` is `true`, always together with `current`. The previous day, ISO week or month over the same elapsed time, cut at its own end.
11862
+ * @type {UsageTotalsWindowDto}
11863
+ * @memberof UserUsageTotalsResponseDto
11864
+ */
11865
+ previous?: UsageTotalsWindowDto;
11866
+ }
11590
11867
  /**
11591
11868
  *
11592
11869
  * @export