@opusdns/api 1.70.0 → 1.72.0

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "@opusdns/api-spec-ts-generator": "^1.2.0"
4
4
  },
5
5
  "name": "@opusdns/api",
6
- "version": "1.70.0",
6
+ "version": "1.72.0",
7
7
  "description": "TypeScript types for the OpusDNS OpenAPI specification",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -1,4 +1,5 @@
1
1
  import type {
2
+ AiUsageGranularity,
2
3
  AllocationMethodType,
3
4
  AssignablePublicRole,
4
5
  AttributeType,
@@ -116,6 +117,18 @@ import type {
116
117
  ZoneSortField,
117
118
  } from './schemas';
118
119
 
120
+ export const AI_USAGE_GRANULARITY = {
121
+ DAY: "day",
122
+ WEEK: "week",
123
+ MONTH: "month",
124
+ } as const satisfies Record<string, AiUsageGranularity>;
125
+
126
+ export const AI_USAGE_GRANULARITY_VALUES = [
127
+ 'day',
128
+ 'week',
129
+ 'month',
130
+ ] as const satisfies ReadonlyArray<AiUsageGranularity>;
131
+
119
132
  export const ALLOCATION_METHOD_TYPE = {
120
133
  FCFS: "fcfs",
121
134
  AUCTION: "auction",
@@ -1,4 +1,8 @@
1
1
  import type {
2
+ AiUsageModelBreakdown,
3
+ AiUsageSeries,
4
+ AiUsageSummary,
5
+ AiUsageTimeBucket,
2
6
  AllowedNumberOfNameserverBase,
3
7
  AttributeCondition,
4
8
  BillingMetadata,
@@ -418,6 +422,52 @@ import type {
418
422
  DomainAvailabilityCheck,
419
423
  } from './schemas';
420
424
 
425
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_CACHE_READ_TOKENS = 'cache_read_tokens' satisfies keyof AiUsageModelBreakdown;
426
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_CACHE_WRITE_TOKENS = 'cache_write_tokens' satisfies keyof AiUsageModelBreakdown;
427
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_INPUT_TOKENS = 'input_tokens' satisfies keyof AiUsageModelBreakdown;
428
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_MODEL = 'model' satisfies keyof AiUsageModelBreakdown;
429
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_OUTPUT_TOKENS = 'output_tokens' satisfies keyof AiUsageModelBreakdown;
430
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_REQUEST_COUNT = 'request_count' satisfies keyof AiUsageModelBreakdown;
431
+
432
+ export const KEYS_AI_USAGE_MODEL_BREAKDOWN = [
433
+ KEY_AI_USAGE_MODEL_BREAKDOWN_CACHE_READ_TOKENS,
434
+ KEY_AI_USAGE_MODEL_BREAKDOWN_CACHE_WRITE_TOKENS,
435
+ KEY_AI_USAGE_MODEL_BREAKDOWN_INPUT_TOKENS,
436
+ KEY_AI_USAGE_MODEL_BREAKDOWN_MODEL,
437
+ KEY_AI_USAGE_MODEL_BREAKDOWN_OUTPUT_TOKENS,
438
+ KEY_AI_USAGE_MODEL_BREAKDOWN_REQUEST_COUNT,
439
+ ] as const satisfies (keyof AiUsageModelBreakdown)[];
440
+
441
+ export const KEY_AI_USAGE_SERIES_BUCKETS = 'buckets' satisfies keyof AiUsageSeries;
442
+ export const KEY_AI_USAGE_SERIES_END_DATE = 'end_date' satisfies keyof AiUsageSeries;
443
+ export const KEY_AI_USAGE_SERIES_GRANULARITY = 'granularity' satisfies keyof AiUsageSeries;
444
+ export const KEY_AI_USAGE_SERIES_START_DATE = 'start_date' satisfies keyof AiUsageSeries;
445
+
446
+ export const KEYS_AI_USAGE_SERIES = [
447
+ KEY_AI_USAGE_SERIES_BUCKETS,
448
+ KEY_AI_USAGE_SERIES_END_DATE,
449
+ KEY_AI_USAGE_SERIES_GRANULARITY,
450
+ KEY_AI_USAGE_SERIES_START_DATE,
451
+ ] as const satisfies (keyof AiUsageSeries)[];
452
+
453
+ export const KEY_AI_USAGE_SUMMARY_BY_MODEL = 'by_model' satisfies keyof AiUsageSummary;
454
+ export const KEY_AI_USAGE_SUMMARY_END_DATE = 'end_date' satisfies keyof AiUsageSummary;
455
+ export const KEY_AI_USAGE_SUMMARY_START_DATE = 'start_date' satisfies keyof AiUsageSummary;
456
+
457
+ export const KEYS_AI_USAGE_SUMMARY = [
458
+ KEY_AI_USAGE_SUMMARY_BY_MODEL,
459
+ KEY_AI_USAGE_SUMMARY_END_DATE,
460
+ KEY_AI_USAGE_SUMMARY_START_DATE,
461
+ ] as const satisfies (keyof AiUsageSummary)[];
462
+
463
+ export const KEY_AI_USAGE_TIME_BUCKET_BY_MODEL = 'by_model' satisfies keyof AiUsageTimeBucket;
464
+ export const KEY_AI_USAGE_TIME_BUCKET_PERIOD_START = 'period_start' satisfies keyof AiUsageTimeBucket;
465
+
466
+ export const KEYS_AI_USAGE_TIME_BUCKET = [
467
+ KEY_AI_USAGE_TIME_BUCKET_BY_MODEL,
468
+ KEY_AI_USAGE_TIME_BUCKET_PERIOD_START,
469
+ ] as const satisfies (keyof AiUsageTimeBucket)[];
470
+
421
471
  export const KEY_ALLOWED_NUMBER_OF_NAMESERVER_BASE_MAX = 'max' satisfies keyof AllowedNumberOfNameserverBase;
422
472
  export const KEY_ALLOWED_NUMBER_OF_NAMESERVER_BASE_MIN = 'min' satisfies keyof AllowedNumberOfNameserverBase;
423
473
 
@@ -2388,6 +2438,7 @@ export const KEY_DOMAIN_STATUS_TAGS = 'status_tags' satisfies keyof Domain;
2388
2438
  export const KEY_DOMAIN_TAGS = 'tags' satisfies keyof Domain;
2389
2439
  export const KEY_DOMAIN_TLD = 'tld' satisfies keyof Domain;
2390
2440
  export const KEY_DOMAIN_TRANSFER_LOCK = 'transfer_lock' satisfies keyof Domain;
2441
+ export const KEY_DOMAIN_TRANSFERRED_ON = 'transferred_on' satisfies keyof Domain;
2391
2442
  export const KEY_DOMAIN_UPDATED_ON = 'updated_on' satisfies keyof Domain;
2392
2443
  export const KEY_DOMAIN_VERIFICATION_REQUIRED = 'verification_required' satisfies keyof Domain;
2393
2444
 
@@ -2416,6 +2467,7 @@ export const KEYS_DOMAIN = [
2416
2467
  KEY_DOMAIN_TAGS,
2417
2468
  KEY_DOMAIN_TLD,
2418
2469
  KEY_DOMAIN_TRANSFER_LOCK,
2470
+ KEY_DOMAIN_TRANSFERRED_ON,
2419
2471
  KEY_DOMAIN_UPDATED_ON,
2420
2472
  KEY_DOMAIN_VERIFICATION_REQUIRED,
2421
2473
  ] as const satisfies (keyof Domain)[];
@@ -798,6 +798,16 @@ export type POST_Organizations_Request = {
798
798
  };
799
799
  export type POST_Organizations_Request_Body = POST_Organizations_Request['requestBody'];
800
800
 
801
+ export type GET_OrganizationsAiUsage_Request = {
802
+ parameters: operations['get_ai_usage_series_v1_organizations_ai_usage_get']['parameters'];
803
+ };
804
+ export type GET_OrganizationsAiUsage_Request_Query = GET_OrganizationsAiUsage_Request['parameters']['query'];
805
+
806
+ export type GET_OrganizationsAiUsageSummary_Request = {
807
+ parameters: operations['get_ai_usage_summary_v1_organizations_ai_usage_summary_get']['parameters'];
808
+ };
809
+ export type GET_OrganizationsAiUsageSummary_Request_Query = GET_OrganizationsAiUsageSummary_Request['parameters']['query'];
810
+
801
811
  export type GET_OrganizationsAttributes_Request = {
802
812
  parameters: operations['get_current_organization_attributes_v1_organizations_attributes_get']['parameters'];
803
813
  };
@@ -1,4 +1,6 @@
1
1
  import type {
2
+ AiUsageSeries,
3
+ AiUsageSummary,
2
4
  BillingTransaction,
3
5
  ClaimsNotices,
4
6
  ClearVanityNameserverSetDefaultRes,
@@ -643,6 +645,20 @@ export type GET_Organizations_Response_401 = Problem;
643
645
  export type GET_Organizations_Response_403 = Problem;
644
646
  export type GET_Organizations_Response_422 = HTTPValidationError;
645
647
 
648
+ export type GET_OrganizationsAiUsage_Response = GET_OrganizationsAiUsage_Response_200 | GET_OrganizationsAiUsage_Response_401 | GET_OrganizationsAiUsage_Response_403 | GET_OrganizationsAiUsage_Response_422;
649
+
650
+ export type GET_OrganizationsAiUsage_Response_200 = AiUsageSeries;
651
+ export type GET_OrganizationsAiUsage_Response_401 = Problem;
652
+ export type GET_OrganizationsAiUsage_Response_403 = Problem;
653
+ export type GET_OrganizationsAiUsage_Response_422 = HTTPValidationError;
654
+
655
+ export type GET_OrganizationsAiUsageSummary_Response = GET_OrganizationsAiUsageSummary_Response_200 | GET_OrganizationsAiUsageSummary_Response_401 | GET_OrganizationsAiUsageSummary_Response_403 | GET_OrganizationsAiUsageSummary_Response_422;
656
+
657
+ export type GET_OrganizationsAiUsageSummary_Response_200 = AiUsageSummary;
658
+ export type GET_OrganizationsAiUsageSummary_Response_401 = Problem;
659
+ export type GET_OrganizationsAiUsageSummary_Response_403 = Problem;
660
+ export type GET_OrganizationsAiUsageSummary_Response_422 = HTTPValidationError;
661
+
646
662
  export type GET_OrganizationsAttributes_Response = GET_OrganizationsAttributes_Response_200 | GET_OrganizationsAttributes_Response_401 | GET_OrganizationsAttributes_Response_403 | GET_OrganizationsAttributes_Response_422;
647
663
 
648
664
  export type GET_OrganizationsAttributes_Response_200 = OrganizationAttribute2[];
@@ -1,5 +1,10 @@
1
1
  import { components } from '../schema';
2
2
 
3
+ export type AiUsageGranularity = components['schemas']['AiUsageGranularity'];
4
+ export type AiUsageModelBreakdown = components['schemas']['AiUsageModelBreakdown'];
5
+ export type AiUsageSeries = components['schemas']['AiUsageSeriesResponse'];
6
+ export type AiUsageSummary = components['schemas']['AiUsageSummaryResponse'];
7
+ export type AiUsageTimeBucket = components['schemas']['AiUsageTimeBucket'];
3
8
  export type AllocationMethodType = components['schemas']['AllocationMethodType'];
4
9
  export type AllowedNumberOfNameserverBase = components['schemas']['AllowedNumberOfNameserverBase'];
5
10
  export type AssignablePublicRole = components['schemas']['AssignablePublicRole'];
package/src/openapi.yaml CHANGED
@@ -15,6 +15,106 @@ components:
15
15
  - rfc3339
16
16
  type: string
17
17
  schemas:
18
+ AiUsageGranularity:
19
+ enum:
20
+ - day
21
+ - week
22
+ - month
23
+ title: AiUsageGranularity
24
+ type: string
25
+ AiUsageModelBreakdown:
26
+ description: 'Public per-model AI token usage. Deliberately excludes billing-gateway''s
27
+
28
+ internal COGS fields (cost_amount, per-million rates, has_rate).'
29
+ properties:
30
+ cache_read_tokens:
31
+ title: Cache Read Tokens
32
+ type: integer
33
+ cache_write_tokens:
34
+ title: Cache Write Tokens
35
+ type: integer
36
+ input_tokens:
37
+ title: Input Tokens
38
+ type: integer
39
+ model:
40
+ title: Model
41
+ type: string
42
+ output_tokens:
43
+ title: Output Tokens
44
+ type: integer
45
+ request_count:
46
+ title: Request Count
47
+ type: integer
48
+ required:
49
+ - model
50
+ - input_tokens
51
+ - output_tokens
52
+ - cache_read_tokens
53
+ - cache_write_tokens
54
+ - request_count
55
+ title: AiUsageModelBreakdown
56
+ type: object
57
+ AiUsageSeriesResponse:
58
+ properties:
59
+ buckets:
60
+ items:
61
+ $ref: '#/components/schemas/AiUsageTimeBucket'
62
+ title: Buckets
63
+ type: array
64
+ end_date:
65
+ format: date
66
+ title: End Date
67
+ type: string
68
+ granularity:
69
+ $ref: '#/components/schemas/AiUsageGranularity'
70
+ start_date:
71
+ format: date
72
+ title: Start Date
73
+ type: string
74
+ required:
75
+ - granularity
76
+ - start_date
77
+ - end_date
78
+ - buckets
79
+ title: AiUsageSeriesResponse
80
+ type: object
81
+ AiUsageSummaryResponse:
82
+ properties:
83
+ by_model:
84
+ items:
85
+ $ref: '#/components/schemas/AiUsageModelBreakdown'
86
+ title: By Model
87
+ type: array
88
+ end_date:
89
+ format: date
90
+ title: End Date
91
+ type: string
92
+ start_date:
93
+ format: date
94
+ title: Start Date
95
+ type: string
96
+ required:
97
+ - start_date
98
+ - end_date
99
+ - by_model
100
+ title: AiUsageSummaryResponse
101
+ type: object
102
+ AiUsageTimeBucket:
103
+ properties:
104
+ by_model:
105
+ items:
106
+ $ref: '#/components/schemas/AiUsageModelBreakdown'
107
+ title: By Model
108
+ type: array
109
+ period_start:
110
+ format: date
111
+ title: Period Start
112
+ type: string
113
+ required:
114
+ - period_start
115
+ - by_model
116
+ title: AiUsageTimeBucket
117
+ type: object
18
118
  AllocationMethodType:
19
119
  enum:
20
120
  - fcfs
@@ -5201,6 +5301,13 @@ components:
5201
5301
  description: Whether the domain is locked for transfer
5202
5302
  title: Transfer Lock
5203
5303
  type: boolean
5304
+ transferred_on:
5305
+ anyOf:
5306
+ - format: date-time
5307
+ type: string
5308
+ - type: 'null'
5309
+ description: When the domain was last transferred to us
5310
+ title: Transferred On
5204
5311
  updated_on:
5205
5312
  description: The date/time the entry was last updated on
5206
5313
  format: date-time
@@ -14148,7 +14255,7 @@ info:
14148
14255
  \n\n"
14149
14256
  summary: OpusDNS - your gateway to a seamless domain management experience.
14150
14257
  title: OpusDNS API
14151
- version: 2026-07-21-001849
14258
+ version: 2026-07-21-194842
14152
14259
  x-logo:
14153
14260
  altText: OpusDNS API Reference
14154
14261
  url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
@@ -26811,6 +26918,164 @@ paths:
26811
26918
  summary: Create an organization
26812
26919
  tags:
26813
26920
  - organization
26921
+ /v1/organizations/ai-usage:
26922
+ get:
26923
+ description: Retrieves the current organization's AI token usage as a time series,
26924
+ bucketed by the requested granularity and broken down per model. Reports token
26925
+ counts and request volumes only.
26926
+ operationId: get_ai_usage_series_v1_organizations_ai_usage_get
26927
+ parameters:
26928
+ - in: query
26929
+ name: start_date
26930
+ required: true
26931
+ schema:
26932
+ format: date
26933
+ title: Start Date
26934
+ type: string
26935
+ - in: query
26936
+ name: end_date
26937
+ required: true
26938
+ schema:
26939
+ format: date
26940
+ title: End Date
26941
+ type: string
26942
+ - in: query
26943
+ name: model
26944
+ required: false
26945
+ schema:
26946
+ anyOf:
26947
+ - type: string
26948
+ - type: 'null'
26949
+ title: Model
26950
+ - in: query
26951
+ name: granularity
26952
+ required: false
26953
+ schema:
26954
+ $ref: '#/components/schemas/AiUsageGranularity'
26955
+ default: day
26956
+ - $ref: '#/components/parameters/DatetimeFormatHeader'
26957
+ responses:
26958
+ '200':
26959
+ content:
26960
+ application/json:
26961
+ schema:
26962
+ $ref: '#/components/schemas/AiUsageSeriesResponse'
26963
+ description: Successful Response
26964
+ '401':
26965
+ content:
26966
+ application/problem+json:
26967
+ example:
26968
+ code: ERROR_AUTHENTICATION
26969
+ detail: Additional error context.
26970
+ status: 401
26971
+ title: Authentication Error
26972
+ type: authentication
26973
+ schema:
26974
+ $ref: '#/components/schemas/Problem'
26975
+ description: Unauthorized
26976
+ '403':
26977
+ content:
26978
+ application/problem+json:
26979
+ example:
26980
+ code: ERROR_PERMISSION_DENIED
26981
+ detail: Insufficient permissions to perform this action
26982
+ status: 403
26983
+ title: Permission Denied
26984
+ type: permission-denied
26985
+ schema:
26986
+ $ref: '#/components/schemas/Problem'
26987
+ description: Forbidden
26988
+ '422':
26989
+ content:
26990
+ application/problem+json:
26991
+ schema:
26992
+ $ref: '#/components/schemas/HTTPValidationError'
26993
+ description: Validation Error
26994
+ security:
26995
+ - OAuth2PasswordBearer: []
26996
+ - APIKeyHeader: []
26997
+ summary: AI usage over time
26998
+ tags:
26999
+ - organization
27000
+ - ai_usage
27001
+ x-required-permissions:
27002
+ - organization:read
27003
+ /v1/organizations/ai-usage/summary:
27004
+ get:
27005
+ description: Retrieves the current organization's total AI token usage over
27006
+ a date range, broken down per model. Reports token counts and request volumes
27007
+ only.
27008
+ operationId: get_ai_usage_summary_v1_organizations_ai_usage_summary_get
27009
+ parameters:
27010
+ - in: query
27011
+ name: start_date
27012
+ required: true
27013
+ schema:
27014
+ format: date
27015
+ title: Start Date
27016
+ type: string
27017
+ - in: query
27018
+ name: end_date
27019
+ required: true
27020
+ schema:
27021
+ format: date
27022
+ title: End Date
27023
+ type: string
27024
+ - in: query
27025
+ name: model
27026
+ required: false
27027
+ schema:
27028
+ anyOf:
27029
+ - type: string
27030
+ - type: 'null'
27031
+ title: Model
27032
+ - $ref: '#/components/parameters/DatetimeFormatHeader'
27033
+ responses:
27034
+ '200':
27035
+ content:
27036
+ application/json:
27037
+ schema:
27038
+ $ref: '#/components/schemas/AiUsageSummaryResponse'
27039
+ description: Successful Response
27040
+ '401':
27041
+ content:
27042
+ application/problem+json:
27043
+ example:
27044
+ code: ERROR_AUTHENTICATION
27045
+ detail: Additional error context.
27046
+ status: 401
27047
+ title: Authentication Error
27048
+ type: authentication
27049
+ schema:
27050
+ $ref: '#/components/schemas/Problem'
27051
+ description: Unauthorized
27052
+ '403':
27053
+ content:
27054
+ application/problem+json:
27055
+ example:
27056
+ code: ERROR_PERMISSION_DENIED
27057
+ detail: Insufficient permissions to perform this action
27058
+ status: 403
27059
+ title: Permission Denied
27060
+ type: permission-denied
27061
+ schema:
27062
+ $ref: '#/components/schemas/Problem'
27063
+ description: Forbidden
27064
+ '422':
27065
+ content:
27066
+ application/problem+json:
27067
+ schema:
27068
+ $ref: '#/components/schemas/HTTPValidationError'
27069
+ description: Validation Error
27070
+ security:
27071
+ - OAuth2PasswordBearer: []
27072
+ - APIKeyHeader: []
27073
+ summary: AI usage summary
27074
+ tags:
27075
+ - organization
27076
+ - ai_usage
27077
+ x-required-permissions:
27078
+ - organization:read
26814
27079
  /v1/organizations/attributes:
26815
27080
  get:
26816
27081
  description: Retrieves a list of organization attributes for the current organization
@@ -31053,12 +31318,89 @@ tags:
31053
31318
  - description: Endpoints for creating new Tags
31054
31319
  name: tag
31055
31320
  x-displayName: Tags
31321
+ - description: 'Endpoints for reporting your organization''s AI usage.
31322
+
31323
+
31324
+ These endpoints expose the AI token consumption incurred by your organization''s
31325
+ use of OpusDNS AI features, so you can monitor usage over time and per model.
31326
+ Usage is reported as token counts and request volumes only.
31327
+
31328
+
31329
+ ### Endpoints
31330
+
31331
+
31332
+ | Method | Path | Description |
31333
+
31334
+ |--------|------|-------------|
31335
+
31336
+ | `GET` | `/v1/organizations/ai-usage` | Token usage as a time series, bucketed
31337
+ by granularity and broken down per model |
31338
+
31339
+ | `GET` | `/v1/organizations/ai-usage/summary` | Token usage totals over a date
31340
+ range, broken down per model |
31341
+
31342
+
31343
+ The reporting organization is taken from the authentication token; usage is always
31344
+ scoped to the calling organization.
31345
+
31346
+
31347
+ ### Query Parameters
31348
+
31349
+
31350
+ | Parameter | Description |
31351
+
31352
+ |-----------|-------------|
31353
+
31354
+ | `start_date` | Inclusive start date (`YYYY-MM-DD`) |
31355
+
31356
+ | `end_date` | Inclusive end date (`YYYY-MM-DD`) |
31357
+
31358
+ | `granularity` | Time-bucket size for the series endpoint: `day` (default), `week`,
31359
+ or `month` |
31360
+
31361
+ | `model` | Optional filter to a single model |
31362
+
31363
+
31364
+ `start_date` must be on or before `end_date`, otherwise the request is rejected
31365
+ with `422 Unprocessable Content`.
31366
+
31367
+
31368
+ ### Reported Metrics
31369
+
31370
+
31371
+ Each per-model breakdown reports token counts and request volume:
31372
+
31373
+
31374
+ | Field | Description |
31375
+
31376
+ |-------|-------------|
31377
+
31378
+ | `model` | The AI model the usage was recorded against |
31379
+
31380
+ | `input_tokens` | Prompt (input) tokens consumed |
31381
+
31382
+ | `output_tokens` | Generated (output) tokens |
31383
+
31384
+ | `cache_read_tokens` | Tokens served from prompt cache |
31385
+
31386
+ | `cache_write_tokens` | Tokens written to prompt cache |
31387
+
31388
+ | `request_count` | Number of requests |
31389
+
31390
+
31391
+ Usage is scoped to your billing organization and requires the organization `view`
31392
+ permission.
31393
+
31394
+ '
31395
+ name: ai_usage
31396
+ x-displayName: AI usage
31056
31397
  x-tagGroups:
31057
31398
  - name: Account management
31058
31399
  tags:
31059
31400
  - authentication
31060
31401
  - user
31061
31402
  - organization
31403
+ - ai_usage
31062
31404
  - name: Domains
31063
31405
  tags:
31064
31406
  - domain
package/src/schema.d.ts CHANGED
@@ -1925,6 +1925,46 @@ export interface paths {
1925
1925
  patch?: never;
1926
1926
  trace?: never;
1927
1927
  };
1928
+ "/v1/organizations/ai-usage": {
1929
+ parameters: {
1930
+ query?: never;
1931
+ header?: never;
1932
+ path?: never;
1933
+ cookie?: never;
1934
+ };
1935
+ /**
1936
+ * AI usage over time
1937
+ * @description Retrieves the current organization's AI token usage as a time series, bucketed by the requested granularity and broken down per model. Reports token counts and request volumes only.
1938
+ */
1939
+ get: operations["get_ai_usage_series_v1_organizations_ai_usage_get"];
1940
+ put?: never;
1941
+ post?: never;
1942
+ delete?: never;
1943
+ options?: never;
1944
+ head?: never;
1945
+ patch?: never;
1946
+ trace?: never;
1947
+ };
1948
+ "/v1/organizations/ai-usage/summary": {
1949
+ parameters: {
1950
+ query?: never;
1951
+ header?: never;
1952
+ path?: never;
1953
+ cookie?: never;
1954
+ };
1955
+ /**
1956
+ * AI usage summary
1957
+ * @description Retrieves the current organization's total AI token usage over a date range, broken down per model. Reports token counts and request volumes only.
1958
+ */
1959
+ get: operations["get_ai_usage_summary_v1_organizations_ai_usage_summary_get"];
1960
+ put?: never;
1961
+ post?: never;
1962
+ delete?: never;
1963
+ options?: never;
1964
+ head?: never;
1965
+ patch?: never;
1966
+ trace?: never;
1967
+ };
1928
1968
  "/v1/organizations/attributes": {
1929
1969
  parameters: {
1930
1970
  query?: never;
@@ -2832,6 +2872,71 @@ export interface paths {
2832
2872
  export type webhooks = Record<string, never>;
2833
2873
  export interface components {
2834
2874
  schemas: {
2875
+ /**
2876
+ * AiUsageGranularity
2877
+ * @enum {string}
2878
+ */
2879
+ AiUsageGranularity: "day" | "week" | "month";
2880
+ /**
2881
+ * AiUsageModelBreakdown
2882
+ * @description Public per-model AI token usage. Deliberately excludes billing-gateway's
2883
+ * internal COGS fields (cost_amount, per-million rates, has_rate).
2884
+ */
2885
+ AiUsageModelBreakdown: {
2886
+ /** Cache Read Tokens */
2887
+ cache_read_tokens: number;
2888
+ /** Cache Write Tokens */
2889
+ cache_write_tokens: number;
2890
+ /** Input Tokens */
2891
+ input_tokens: number;
2892
+ /** Model */
2893
+ model: string;
2894
+ /** Output Tokens */
2895
+ output_tokens: number;
2896
+ /** Request Count */
2897
+ request_count: number;
2898
+ };
2899
+ /** AiUsageSeriesResponse */
2900
+ AiUsageSeriesResponse: {
2901
+ /** Buckets */
2902
+ buckets: components["schemas"]["AiUsageTimeBucket"][];
2903
+ /**
2904
+ * End Date
2905
+ * Format: date
2906
+ */
2907
+ end_date: string;
2908
+ granularity: components["schemas"]["AiUsageGranularity"];
2909
+ /**
2910
+ * Start Date
2911
+ * Format: date
2912
+ */
2913
+ start_date: string;
2914
+ };
2915
+ /** AiUsageSummaryResponse */
2916
+ AiUsageSummaryResponse: {
2917
+ /** By Model */
2918
+ by_model: components["schemas"]["AiUsageModelBreakdown"][];
2919
+ /**
2920
+ * End Date
2921
+ * Format: date
2922
+ */
2923
+ end_date: string;
2924
+ /**
2925
+ * Start Date
2926
+ * Format: date
2927
+ */
2928
+ start_date: string;
2929
+ };
2930
+ /** AiUsageTimeBucket */
2931
+ AiUsageTimeBucket: {
2932
+ /** By Model */
2933
+ by_model: components["schemas"]["AiUsageModelBreakdown"][];
2934
+ /**
2935
+ * Period Start
2936
+ * Format: date
2937
+ */
2938
+ period_start: string;
2939
+ };
2835
2940
  /**
2836
2941
  * AllocationMethodType
2837
2942
  * @enum {string}
@@ -6216,6 +6321,11 @@ export interface components {
6216
6321
  * @default false
6217
6322
  */
6218
6323
  transfer_lock: boolean;
6324
+ /**
6325
+ * Transferred On
6326
+ * @description When the domain was last transferred to us
6327
+ */
6328
+ transferred_on?: Date | null;
6219
6329
  /**
6220
6330
  * Updated On
6221
6331
  * Format: date-time
@@ -22082,6 +22192,149 @@ export interface operations {
22082
22192
  };
22083
22193
  };
22084
22194
  };
22195
+ get_ai_usage_series_v1_organizations_ai_usage_get: {
22196
+ parameters: {
22197
+ query: {
22198
+ start_date: string;
22199
+ end_date: string;
22200
+ model?: string | null;
22201
+ granularity?: components["schemas"]["AiUsageGranularity"];
22202
+ };
22203
+ header?: {
22204
+ /**
22205
+ * @description Opt in to RFC 3339 datetime serialization. When set to `rfc3339`, response datetimes are normalized to UTC and serialized with a `Z` suffix. This is opt-in until the announced default cutover date, after which RFC 3339 becomes the default and this header is accepted as a no-op. Any other value or omission uses the current default serialization.
22206
+ * @example rfc3339
22207
+ */
22208
+ "X-Datetime-Format"?: components["parameters"]["DatetimeFormatHeader"];
22209
+ };
22210
+ path?: never;
22211
+ cookie?: never;
22212
+ };
22213
+ requestBody?: never;
22214
+ responses: {
22215
+ /** @description Successful Response */
22216
+ 200: {
22217
+ headers: {
22218
+ [name: string]: unknown;
22219
+ };
22220
+ content: {
22221
+ "application/json": components["schemas"]["AiUsageSeriesResponse"];
22222
+ };
22223
+ };
22224
+ /** @description Unauthorized */
22225
+ 401: {
22226
+ headers: {
22227
+ [name: string]: unknown;
22228
+ };
22229
+ content: {
22230
+ /** @example {
22231
+ * "code": "ERROR_AUTHENTICATION",
22232
+ * "detail": "Additional error context.",
22233
+ * "status": 401,
22234
+ * "title": "Authentication Error",
22235
+ * "type": "authentication"
22236
+ * } */
22237
+ "application/problem+json": components["schemas"]["Problem"];
22238
+ };
22239
+ };
22240
+ /** @description Forbidden */
22241
+ 403: {
22242
+ headers: {
22243
+ [name: string]: unknown;
22244
+ };
22245
+ content: {
22246
+ /** @example {
22247
+ * "code": "ERROR_PERMISSION_DENIED",
22248
+ * "detail": "Insufficient permissions to perform this action",
22249
+ * "status": 403,
22250
+ * "title": "Permission Denied",
22251
+ * "type": "permission-denied"
22252
+ * } */
22253
+ "application/problem+json": components["schemas"]["Problem"];
22254
+ };
22255
+ };
22256
+ /** @description Validation Error */
22257
+ 422: {
22258
+ headers: {
22259
+ [name: string]: unknown;
22260
+ };
22261
+ content: {
22262
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
22263
+ };
22264
+ };
22265
+ };
22266
+ };
22267
+ get_ai_usage_summary_v1_organizations_ai_usage_summary_get: {
22268
+ parameters: {
22269
+ query: {
22270
+ start_date: string;
22271
+ end_date: string;
22272
+ model?: string | null;
22273
+ };
22274
+ header?: {
22275
+ /**
22276
+ * @description Opt in to RFC 3339 datetime serialization. When set to `rfc3339`, response datetimes are normalized to UTC and serialized with a `Z` suffix. This is opt-in until the announced default cutover date, after which RFC 3339 becomes the default and this header is accepted as a no-op. Any other value or omission uses the current default serialization.
22277
+ * @example rfc3339
22278
+ */
22279
+ "X-Datetime-Format"?: components["parameters"]["DatetimeFormatHeader"];
22280
+ };
22281
+ path?: never;
22282
+ cookie?: never;
22283
+ };
22284
+ requestBody?: never;
22285
+ responses: {
22286
+ /** @description Successful Response */
22287
+ 200: {
22288
+ headers: {
22289
+ [name: string]: unknown;
22290
+ };
22291
+ content: {
22292
+ "application/json": components["schemas"]["AiUsageSummaryResponse"];
22293
+ };
22294
+ };
22295
+ /** @description Unauthorized */
22296
+ 401: {
22297
+ headers: {
22298
+ [name: string]: unknown;
22299
+ };
22300
+ content: {
22301
+ /** @example {
22302
+ * "code": "ERROR_AUTHENTICATION",
22303
+ * "detail": "Additional error context.",
22304
+ * "status": 401,
22305
+ * "title": "Authentication Error",
22306
+ * "type": "authentication"
22307
+ * } */
22308
+ "application/problem+json": components["schemas"]["Problem"];
22309
+ };
22310
+ };
22311
+ /** @description Forbidden */
22312
+ 403: {
22313
+ headers: {
22314
+ [name: string]: unknown;
22315
+ };
22316
+ content: {
22317
+ /** @example {
22318
+ * "code": "ERROR_PERMISSION_DENIED",
22319
+ * "detail": "Insufficient permissions to perform this action",
22320
+ * "status": 403,
22321
+ * "title": "Permission Denied",
22322
+ * "type": "permission-denied"
22323
+ * } */
22324
+ "application/problem+json": components["schemas"]["Problem"];
22325
+ };
22326
+ };
22327
+ /** @description Validation Error */
22328
+ 422: {
22329
+ headers: {
22330
+ [name: string]: unknown;
22331
+ };
22332
+ content: {
22333
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
22334
+ };
22335
+ };
22336
+ };
22337
+ };
22085
22338
  get_current_organization_attributes_v1_organizations_attributes_get: {
22086
22339
  parameters: {
22087
22340
  query?: {