@oxy.so/contracts 5.8.0 → 6.0.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.
Files changed (219) hide show
  1. package/dist/cjs/accountAccess.js +6 -5
  2. package/dist/cjs/accountEmail.js +13 -5
  3. package/dist/cjs/accountGraph.js +10 -9
  4. package/dist/cjs/accountName.js +3 -2
  5. package/dist/cjs/agency.js +91 -34
  6. package/dist/cjs/agentKeys.js +21 -17
  7. package/dist/cjs/appAssertions.js +14 -13
  8. package/dist/cjs/applicationRoles.js +19 -12
  9. package/dist/cjs/civic.js +10 -9
  10. package/dist/cjs/client/check.js +61 -53
  11. package/dist/cjs/consoleOnboarding.js +9 -4
  12. package/dist/cjs/contentClaims.js +23 -14
  13. package/dist/cjs/deviceDirectory.js +11 -9
  14. package/dist/cjs/deviceSession.js +27 -25
  15. package/dist/cjs/email/messages.js +20 -18
  16. package/dist/cjs/emailAgentContext.js +11 -9
  17. package/dist/cjs/externalIdentity.js +15 -11
  18. package/dist/cjs/federationInstanceFetch.js +12 -7
  19. package/dist/cjs/identity.js +19 -17
  20. package/dist/cjs/identityLink.js +6 -4
  21. package/dist/cjs/identityProof.js +6 -4
  22. package/dist/cjs/inboxPush.js +5 -4
  23. package/dist/cjs/index.js +15 -6
  24. package/dist/cjs/inference/accountBilling.js +35 -33
  25. package/dist/cjs/inference/aliaModelRelease.js +9 -7
  26. package/dist/cjs/inference/attribution.js +14 -12
  27. package/dist/cjs/inference/catalogue.js +35 -29
  28. package/dist/cjs/inference/economics.js +24 -19
  29. package/dist/cjs/inference/embeddings.js +9 -7
  30. package/dist/cjs/inference/entitlement.js +17 -15
  31. package/dist/cjs/inference/errors.js +15 -8
  32. package/dist/cjs/inference/identifiers.js +33 -21
  33. package/dist/cjs/inference/inbox.js +37 -35
  34. package/dist/cjs/inference/modelDocumentation.js +16 -14
  35. package/dist/cjs/inference/money.js +5 -4
  36. package/dist/cjs/inference/priceVersion.js +10 -5
  37. package/dist/cjs/inference/providerConnection.js +21 -14
  38. package/dist/cjs/inference/realtime.js +88 -47
  39. package/dist/cjs/inference/request.js +27 -25
  40. package/dist/cjs/inference/routingPolicy.js +12 -10
  41. package/dist/cjs/inference/streamEvents.js +22 -16
  42. package/dist/cjs/inference/usage.js +32 -15
  43. package/dist/cjs/keyRecovery.js +8 -6
  44. package/dist/cjs/keyRotation.js +5 -4
  45. package/dist/cjs/linkedAccounts.js +22 -18
  46. package/dist/cjs/moderationReputation.js +29 -27
  47. package/dist/cjs/notifications.js +25 -9
  48. package/dist/cjs/numberChecks.js +45 -0
  49. package/dist/cjs/oauth.js +14 -12
  50. package/dist/cjs/organizations.js +23 -21
  51. package/dist/cjs/products/access.js +10 -8
  52. package/dist/cjs/products/billing.js +10 -8
  53. package/dist/cjs/products/checkout.js +22 -10
  54. package/dist/cjs/products/plans.js +15 -10
  55. package/dist/cjs/protocol.js +6 -5
  56. package/dist/cjs/recommendations.js +27 -19
  57. package/dist/cjs/reputation.js +15 -13
  58. package/dist/cjs/safety.js +43 -27
  59. package/dist/cjs/serviceToken.js +81 -2
  60. package/dist/cjs/sessionRevocation.js +8 -6
  61. package/dist/cjs/signIn.js +42 -24
  62. package/dist/cjs/stickers.js +19 -15
  63. package/dist/cjs/stringChecks.js +70 -0
  64. package/dist/cjs/transparency.js +14 -12
  65. package/dist/cjs/updates.js +24 -22
  66. package/dist/cjs/userInvalidation.js +7 -5
  67. package/dist/cjs/userResponse.js +8 -7
  68. package/dist/cjs/username.js +7 -6
  69. package/dist/esm/accountAccess.js +4 -3
  70. package/dist/esm/accountEmail.js +13 -5
  71. package/dist/esm/accountGraph.js +8 -7
  72. package/dist/esm/accountName.js +3 -2
  73. package/dist/esm/agency.js +90 -33
  74. package/dist/esm/agentKeys.js +21 -17
  75. package/dist/esm/appAssertions.js +11 -10
  76. package/dist/esm/applicationRoles.js +16 -9
  77. package/dist/esm/civic.js +8 -7
  78. package/dist/esm/client/check.js +61 -53
  79. package/dist/esm/consoleOnboarding.js +7 -2
  80. package/dist/esm/contentClaims.js +23 -14
  81. package/dist/esm/deviceDirectory.js +11 -9
  82. package/dist/esm/deviceSession.js +27 -25
  83. package/dist/esm/email/messages.js +18 -16
  84. package/dist/esm/emailAgentContext.js +11 -9
  85. package/dist/esm/externalIdentity.js +15 -11
  86. package/dist/esm/federationInstanceFetch.js +10 -5
  87. package/dist/esm/identity.js +17 -15
  88. package/dist/esm/identityLink.js +6 -4
  89. package/dist/esm/identityProof.js +6 -4
  90. package/dist/esm/inboxPush.js +3 -2
  91. package/dist/esm/index.js +4 -2
  92. package/dist/esm/inference/accountBilling.js +33 -31
  93. package/dist/esm/inference/aliaModelRelease.js +7 -5
  94. package/dist/esm/inference/attribution.js +14 -12
  95. package/dist/esm/inference/catalogue.js +33 -27
  96. package/dist/esm/inference/economics.js +22 -17
  97. package/dist/esm/inference/embeddings.js +9 -7
  98. package/dist/esm/inference/entitlement.js +15 -13
  99. package/dist/esm/inference/errors.js +13 -6
  100. package/dist/esm/inference/identifiers.js +31 -19
  101. package/dist/esm/inference/inbox.js +37 -35
  102. package/dist/esm/inference/modelDocumentation.js +14 -12
  103. package/dist/esm/inference/money.js +3 -2
  104. package/dist/esm/inference/priceVersion.js +8 -3
  105. package/dist/esm/inference/providerConnection.js +19 -12
  106. package/dist/esm/inference/realtime.js +85 -44
  107. package/dist/esm/inference/request.js +25 -23
  108. package/dist/esm/inference/routingPolicy.js +9 -7
  109. package/dist/esm/inference/streamEvents.js +20 -14
  110. package/dist/esm/inference/usage.js +30 -13
  111. package/dist/esm/keyRecovery.js +8 -6
  112. package/dist/esm/keyRotation.js +5 -4
  113. package/dist/esm/linkedAccounts.js +20 -16
  114. package/dist/esm/moderationReputation.js +27 -25
  115. package/dist/esm/notifications.js +23 -7
  116. package/dist/esm/numberChecks.js +41 -0
  117. package/dist/esm/oauth.js +14 -12
  118. package/dist/esm/organizations.js +23 -21
  119. package/dist/esm/products/access.js +10 -8
  120. package/dist/esm/products/billing.js +10 -8
  121. package/dist/esm/products/checkout.js +22 -10
  122. package/dist/esm/products/plans.js +15 -10
  123. package/dist/esm/protocol.js +4 -3
  124. package/dist/esm/recommendations.js +25 -17
  125. package/dist/esm/reputation.js +13 -11
  126. package/dist/esm/safety.js +43 -27
  127. package/dist/esm/serviceToken.js +80 -1
  128. package/dist/esm/sessionRevocation.js +6 -4
  129. package/dist/esm/signIn.js +42 -24
  130. package/dist/esm/stickers.js +17 -13
  131. package/dist/esm/stringChecks.js +63 -0
  132. package/dist/esm/transparency.js +14 -12
  133. package/dist/esm/updates.js +22 -20
  134. package/dist/esm/userInvalidation.js +4 -2
  135. package/dist/esm/userResponse.js +4 -3
  136. package/dist/esm/username.js +3 -2
  137. package/dist/types/accountAccess.d.ts +29 -70
  138. package/dist/types/accountEmail.d.ts +2 -14
  139. package/dist/types/accountGraph.d.ts +179 -171
  140. package/dist/types/accountName.d.ts +1 -1
  141. package/dist/types/accountSubject.d.ts +20 -93
  142. package/dist/types/agency.d.ts +528 -2924
  143. package/dist/types/agentKeys.d.ts +48 -421
  144. package/dist/types/appAssertions.d.ts +56 -210
  145. package/dist/types/applicationRoles.d.ts +30 -276
  146. package/dist/types/avatarCharacter.d.ts +1 -1
  147. package/dist/types/civic.d.ts +1 -13
  148. package/dist/types/client/agentKeys.d.ts +18 -18
  149. package/dist/types/client/appAssertions.d.ts +3 -3
  150. package/dist/types/client/check.d.ts +13 -13
  151. package/dist/types/client/deviceDirectory.d.ts +51 -51
  152. package/dist/types/client/deviceSession.d.ts +14 -14
  153. package/dist/types/client/organizations.d.ts +25 -25
  154. package/dist/types/client/products.d.ts +33 -33
  155. package/dist/types/client/recommendations.d.ts +2 -2
  156. package/dist/types/client/safety.d.ts +45 -45
  157. package/dist/types/client/sessionStatus.d.ts +4 -4
  158. package/dist/types/client/signIn.d.ts +1 -1
  159. package/dist/types/commonsSignIn.d.ts +4 -1
  160. package/dist/types/consoleOnboarding.d.ts +24 -44
  161. package/dist/types/contentClaims.d.ts +24 -180
  162. package/dist/types/deviceDirectory.d.ts +109 -1040
  163. package/dist/types/deviceSession.d.ts +36 -298
  164. package/dist/types/email/messages.d.ts +212 -1793
  165. package/dist/types/emailAgentContext.d.ts +10 -194
  166. package/dist/types/externalIdentity.d.ts +121 -615
  167. package/dist/types/federationInstanceFetch.d.ts +3 -32
  168. package/dist/types/identity.d.ts +15 -92
  169. package/dist/types/identityLink.d.ts +6 -84
  170. package/dist/types/identityProof.d.ts +5 -17
  171. package/dist/types/inboxPush.d.ts +1 -9
  172. package/dist/types/index.d.ts +5 -3
  173. package/dist/types/inference/accountBilling.d.ts +151 -488
  174. package/dist/types/inference/aliaModelRelease.d.ts +42 -439
  175. package/dist/types/inference/attribution.d.ts +75 -104
  176. package/dist/types/inference/catalogue.d.ts +417 -1599
  177. package/dist/types/inference/economics.d.ts +69 -276
  178. package/dist/types/inference/embeddings.d.ts +110 -406
  179. package/dist/types/inference/entitlement.d.ts +80 -335
  180. package/dist/types/inference/errors.d.ts +90 -102
  181. package/dist/types/inference/identifiers.d.ts +12 -4
  182. package/dist/types/inference/inbox.d.ts +105 -420
  183. package/dist/types/inference/modelDocumentation.d.ts +201 -1390
  184. package/dist/types/inference/money.d.ts +65 -32
  185. package/dist/types/inference/priceVersion.d.ts +53 -120
  186. package/dist/types/inference/providerConnection.d.ts +253 -710
  187. package/dist/types/inference/realtime.d.ts +954 -6825
  188. package/dist/types/inference/request.d.ts +300 -2572
  189. package/dist/types/inference/routingPolicy.d.ts +95 -503
  190. package/dist/types/inference/streamEvents.d.ts +253 -721
  191. package/dist/types/inference/usage.d.ts +317 -950
  192. package/dist/types/keyRecovery.d.ts +3 -51
  193. package/dist/types/keyRotation.d.ts +3 -38
  194. package/dist/types/linkedAccounts.d.ts +50 -236
  195. package/dist/types/moderationReputation.d.ts +81 -14
  196. package/dist/types/notifications.d.ts +19 -51
  197. package/dist/types/numberChecks.d.ts +9 -0
  198. package/dist/types/oauth.d.ts +101 -809
  199. package/dist/types/organizations.d.ts +268 -921
  200. package/dist/types/oxyRecordTypes.d.ts +11 -1
  201. package/dist/types/products/access.d.ts +125 -775
  202. package/dist/types/products/billing.d.ts +67 -503
  203. package/dist/types/products/checkout.d.ts +16 -69
  204. package/dist/types/products/plans.d.ts +33 -366
  205. package/dist/types/recommendations.d.ts +76 -389
  206. package/dist/types/reputation.d.ts +37 -5
  207. package/dist/types/safety.d.ts +408 -2048
  208. package/dist/types/serviceToken.d.ts +247 -7
  209. package/dist/types/sessionRevocation.d.ts +2 -17
  210. package/dist/types/sessionStatus.d.ts +27 -115
  211. package/dist/types/signIn.d.ts +53 -553
  212. package/dist/types/stickers.d.ts +67 -819
  213. package/dist/types/stringChecks.d.ts +16 -0
  214. package/dist/types/transparency.d.ts +14 -302
  215. package/dist/types/updates.d.ts +60 -316
  216. package/dist/types/userInvalidation.d.ts +4 -13
  217. package/dist/types/userResponse.d.ts +302 -2400
  218. package/dist/types/username.d.ts +3 -3
  219. package/package.json +2 -2
@@ -29,14 +29,21 @@
29
29
  import { z } from 'zod';
30
30
  /** How a request is treated economically. The first entry is the default. */
31
31
  export declare const INFERENCE_ECONOMIC_TREATMENTS: readonly ["commercial", "internal_metered"];
32
- export declare const inferenceEconomicTreatmentSchema: z.ZodEnum<["commercial", "internal_metered"]>;
32
+ export declare const inferenceEconomicTreatmentSchema: z.ZodEnum<{
33
+ commercial: "commercial";
34
+ internal_metered: "internal_metered";
35
+ }>;
33
36
  /**
34
37
  * Where an upstream attempt's cost came from, exactly as Kaana's operator feed
35
38
  * states it: an exact provider billing fact, a versioned rate-card estimate, or
36
39
  * nothing known. `unknown` carries no amount, so it cannot be summed as free.
37
40
  */
38
41
  export declare const PROVIDER_COST_SOURCES: readonly ["provider_reported", "rate_card", "unknown"];
39
- export declare const providerCostSourceSchema: z.ZodEnum<["provider_reported", "rate_card", "unknown"]>;
42
+ export declare const providerCostSourceSchema: z.ZodEnum<{
43
+ unknown: "unknown";
44
+ provider_reported: "provider_reported";
45
+ rate_card: "rate_card";
46
+ }>;
40
47
  /**
41
48
  * What one cost centre consumed over a window under one economic treatment.
42
49
  *
@@ -45,201 +52,51 @@ export declare const providerCostSourceSchema: z.ZodEnum<["provider_reported", "
45
52
  */
46
53
  export declare const costCenterUsageSchema: z.ZodObject<{
47
54
  schemaVersion: z.ZodLiteral<1>;
48
- /** `null` for usage booked to an account with no cost centre above it. */
49
55
  costCenter: z.ZodNullable<z.ZodObject<{
50
56
  schemaVersion: z.ZodLiteral<1>;
51
- accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
57
+ accountId: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
52
58
  slug: z.ZodString;
53
59
  label: z.ZodString;
54
- status: z.ZodEnum<["active", "retired"]>;
60
+ status: z.ZodEnum<{
61
+ active: "active";
62
+ retired: "retired";
63
+ }>;
55
64
  createdAt: z.ZodString;
56
65
  updatedAt: z.ZodString;
57
- }, "strict", z.ZodTypeAny, {
58
- status: "active" | "retired";
59
- accountId: string & z.BRAND<"OxyAccountId">;
60
- createdAt: string;
61
- updatedAt: string;
62
- schemaVersion: 1;
63
- label: string;
64
- slug: string;
65
- }, {
66
- status: "active" | "retired";
67
- accountId: string;
68
- createdAt: string;
69
- updatedAt: string;
70
- schemaVersion: 1;
71
- label: string;
72
- slug: string;
73
- }>>;
74
- treatment: z.ZodEnum<["commercial", "internal_metered"]>;
66
+ }, z.core.$strict>>;
67
+ treatment: z.ZodEnum<{
68
+ commercial: "commercial";
69
+ internal_metered: "internal_metered";
70
+ }>;
75
71
  currency: z.ZodString;
76
72
  periodStart: z.ZodString;
77
73
  periodEnd: z.ZodString;
78
- /** Requests settled in the window (completed, failed, cancelled or partial). */
79
74
  requestCount: z.ZodNumber;
80
- /** Requests admitted and not yet settled when the report was read. */
81
75
  inFlightCount: z.ZodNumber;
82
- /** Expired admissions with no authoritative terminal usage; never called in-flight. */
83
76
  expiredCount: z.ZodDefault<z.ZodNumber>;
84
- /** Metered units, by unit name, summed over the settled requests. */
85
77
  units: z.ZodRecord<z.ZodString, z.ZodNumber>;
86
- /** The published tariff at each request's pinned price version. Not a cost. */
87
78
  tariff: z.ZodObject<{
88
- /** Sum of the rows whose amount is known, in `currency`. */
89
- amount: z.ZodBranded<z.ZodString, "ExactDecimal">;
90
- /** Rows (requests or attempts) whose amount is known. */
79
+ amount: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
91
80
  knownCount: z.ZodNumber;
92
- /** Rows that exist and have NO amount. Never folded into `amount` as zero. */
93
81
  unknownCount: z.ZodNumber;
94
- }, "strict", z.ZodTypeAny, {
95
- amount: string & z.BRAND<"ExactDecimal">;
96
- knownCount: number;
97
- unknownCount: number;
98
- }, {
99
- amount: string;
100
- knownCount: number;
101
- unknownCount: number;
102
- }>;
103
- /** Upstream cost evidence, reported or estimated, per attempt including failed failovers. */
82
+ }, z.core.$strict>;
104
83
  providerCost: z.ZodObject<{
105
- /** Sum of the rows whose amount is known, in `currency`. */
106
- amount: z.ZodBranded<z.ZodString, "ExactDecimal">;
107
- /** Rows (requests or attempts) whose amount is known. */
84
+ amount: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
108
85
  knownCount: z.ZodNumber;
109
- /** Rows that exist and have NO amount. Never folded into `amount` as zero. */
110
86
  unknownCount: z.ZodNumber;
111
- } & {
112
- /** Attempts with a known subtotal and incomplete upstream cost coverage. */
113
87
  partialCount: z.ZodDefault<z.ZodNumber>;
114
- /** Requests with no ingested provider-cost attempt yet; never measured zero. */
115
88
  missingRequestCount: z.ZodDefault<z.ZodNumber>;
116
- /** Attempts priced in a different currency, excluded without currency conversion. */
117
89
  otherCurrencyCount: z.ZodDefault<z.ZodNumber>;
118
- /** Amount stated by the provider; this is not a copy of its invoice. */
119
- providerReportedAmount: z.ZodDefault<z.ZodBranded<z.ZodString, "ExactDecimal">>;
90
+ providerReportedAmount: z.ZodPrefault<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
120
91
  providerReportedCount: z.ZodDefault<z.ZodNumber>;
121
- /** Amount estimated from Kaana's immutable rate card, never described as invoiced. */
122
- estimatedAmount: z.ZodDefault<z.ZodBranded<z.ZodString, "ExactDecimal">>;
92
+ estimatedAmount: z.ZodPrefault<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
123
93
  estimatedCount: z.ZodDefault<z.ZodNumber>;
124
- }, "strict", z.ZodTypeAny, {
125
- amount: string & z.BRAND<"ExactDecimal">;
126
- knownCount: number;
127
- unknownCount: number;
128
- partialCount: number;
129
- missingRequestCount: number;
130
- otherCurrencyCount: number;
131
- providerReportedAmount: string & z.BRAND<"ExactDecimal">;
132
- providerReportedCount: number;
133
- estimatedAmount: string & z.BRAND<"ExactDecimal">;
134
- estimatedCount: number;
135
- }, {
136
- amount: string;
137
- knownCount: number;
138
- unknownCount: number;
139
- partialCount?: number | undefined;
140
- missingRequestCount?: number | undefined;
141
- otherCurrencyCount?: number | undefined;
142
- providerReportedAmount?: string | undefined;
143
- providerReportedCount?: number | undefined;
144
- estimatedAmount?: string | undefined;
145
- estimatedCount?: number | undefined;
146
- }>;
147
- /**
148
- * What customers were actually charged, from settled receipts only. A
149
- * request with no receipt was not charged — an internal one by
150
- * construction, a shadow-metered one because charging is off.
151
- */
94
+ }, z.core.$strict>;
152
95
  customerCharge: z.ZodObject<{
153
- amount: z.ZodBranded<z.ZodString, "ExactDecimal">;
96
+ amount: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
154
97
  receiptCount: z.ZodNumber;
155
- }, "strict", z.ZodTypeAny, {
156
- amount: string & z.BRAND<"ExactDecimal">;
157
- receiptCount: number;
158
- }, {
159
- amount: string;
160
- receiptCount: number;
161
- }>;
162
- }, "strict", z.ZodTypeAny, {
163
- schemaVersion: 1;
164
- currency: string;
165
- periodEnd: string;
166
- units: Record<string, number>;
167
- periodStart: string;
168
- costCenter: {
169
- status: "active" | "retired";
170
- accountId: string & z.BRAND<"OxyAccountId">;
171
- createdAt: string;
172
- updatedAt: string;
173
- schemaVersion: 1;
174
- label: string;
175
- slug: string;
176
- } | null;
177
- requestCount: number;
178
- treatment: "commercial" | "internal_metered";
179
- inFlightCount: number;
180
- expiredCount: number;
181
- tariff: {
182
- amount: string & z.BRAND<"ExactDecimal">;
183
- knownCount: number;
184
- unknownCount: number;
185
- };
186
- providerCost: {
187
- amount: string & z.BRAND<"ExactDecimal">;
188
- knownCount: number;
189
- unknownCount: number;
190
- partialCount: number;
191
- missingRequestCount: number;
192
- otherCurrencyCount: number;
193
- providerReportedAmount: string & z.BRAND<"ExactDecimal">;
194
- providerReportedCount: number;
195
- estimatedAmount: string & z.BRAND<"ExactDecimal">;
196
- estimatedCount: number;
197
- };
198
- customerCharge: {
199
- amount: string & z.BRAND<"ExactDecimal">;
200
- receiptCount: number;
201
- };
202
- }, {
203
- schemaVersion: 1;
204
- currency: string;
205
- periodEnd: string;
206
- units: Record<string, number>;
207
- periodStart: string;
208
- costCenter: {
209
- status: "active" | "retired";
210
- accountId: string;
211
- createdAt: string;
212
- updatedAt: string;
213
- schemaVersion: 1;
214
- label: string;
215
- slug: string;
216
- } | null;
217
- requestCount: number;
218
- treatment: "commercial" | "internal_metered";
219
- inFlightCount: number;
220
- tariff: {
221
- amount: string;
222
- knownCount: number;
223
- unknownCount: number;
224
- };
225
- providerCost: {
226
- amount: string;
227
- knownCount: number;
228
- unknownCount: number;
229
- partialCount?: number | undefined;
230
- missingRequestCount?: number | undefined;
231
- otherCurrencyCount?: number | undefined;
232
- providerReportedAmount?: string | undefined;
233
- providerReportedCount?: number | undefined;
234
- estimatedAmount?: string | undefined;
235
- estimatedCount?: number | undefined;
236
- };
237
- customerCharge: {
238
- amount: string;
239
- receiptCount: number;
240
- };
241
- expiredCount?: number | undefined;
242
- }>;
98
+ }, z.core.$strict>;
99
+ }, z.core.$strict>;
243
100
  export type InferenceEconomicTreatment = z.infer<typeof inferenceEconomicTreatmentSchema>;
244
101
  export type ProviderCostSource = z.infer<typeof providerCostSourceSchema>;
245
102
  export type CostCenterUsage = z.infer<typeof costCenterUsageSchema>;
@@ -254,123 +111,59 @@ export declare const meteredGenerationSchema: z.ZodObject<{
254
111
  applicationId: z.ZodString;
255
112
  credentialId: z.ZodString;
256
113
  delegatedUserId: z.ZodOptional<z.ZodString>;
257
- environment: z.ZodEnum<["development", "staging", "production"]>;
114
+ environment: z.ZodEnum<{
115
+ development: "development";
116
+ staging: "staging";
117
+ production: "production";
118
+ }>;
258
119
  economicTreatment: z.ZodLiteral<"internal_metered">;
259
120
  economicPolicyVersion: z.ZodString;
260
- outcome: z.ZodEnum<["completed", "partial", "cancelled", "failed"]>;
261
- usageSource: z.ZodEnum<["provider_reported", "oxy_measured", "estimated"]>;
121
+ outcome: z.ZodEnum<{
122
+ failed: "failed";
123
+ completed: "completed";
124
+ cancelled: "cancelled";
125
+ partial: "partial";
126
+ }>;
127
+ usageSource: z.ZodEnum<{
128
+ provider_reported: "provider_reported";
129
+ oxy_measured: "oxy_measured";
130
+ estimated: "estimated";
131
+ }>;
262
132
  units: z.ZodArray<z.ZodObject<{
263
- unit: z.ZodEnum<["input_tokens", "cached_input_tokens", "output_tokens", "reasoning_tokens", "requests", "images", "audio_input_milliseconds", "audio_output_milliseconds", "video_milliseconds", "characters", "embeddings", "audio_input_tokens", "cached_audio_input_tokens", "audio_output_tokens", "session_milliseconds", "input_transcription_milliseconds"]>;
133
+ unit: z.ZodEnum<{
134
+ input_tokens: "input_tokens";
135
+ cached_input_tokens: "cached_input_tokens";
136
+ output_tokens: "output_tokens";
137
+ reasoning_tokens: "reasoning_tokens";
138
+ requests: "requests";
139
+ images: "images";
140
+ audio_input_milliseconds: "audio_input_milliseconds";
141
+ audio_output_milliseconds: "audio_output_milliseconds";
142
+ video_milliseconds: "video_milliseconds";
143
+ characters: "characters";
144
+ embeddings: "embeddings";
145
+ audio_input_tokens: "audio_input_tokens";
146
+ cached_audio_input_tokens: "cached_audio_input_tokens";
147
+ audio_output_tokens: "audio_output_tokens";
148
+ session_milliseconds: "session_milliseconds";
149
+ input_transcription_milliseconds: "input_transcription_milliseconds";
150
+ }>;
264
151
  quantity: z.ZodNumber;
265
- }, "strict", z.ZodTypeAny, {
266
- unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
267
- quantity: number;
268
- }, {
269
- unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
270
- quantity: number;
271
- }>, "many">;
152
+ }, z.core.$strict>>;
272
153
  resolvedModelReference: z.ZodString;
273
154
  servingProvider: z.ZodString;
274
- tariff: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
155
+ tariff: z.ZodDiscriminatedUnion<[z.ZodObject<{
275
156
  status: z.ZodLiteral<"quoted">;
276
- amount: z.ZodBranded<z.ZodString, "ExactDecimal">;
157
+ amount: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
277
158
  currency: z.ZodString;
278
159
  priceVersionId: z.ZodString;
279
- }, "strict", z.ZodTypeAny, {
280
- status: "quoted";
281
- currency: string;
282
- amount: string & z.BRAND<"ExactDecimal">;
283
- priceVersionId: string;
284
- }, {
285
- status: "quoted";
286
- currency: string;
287
- amount: string;
288
- priceVersionId: string;
289
- }>, z.ZodObject<{
160
+ }, z.core.$strict>, z.ZodObject<{
290
161
  status: z.ZodLiteral<"unpriced">;
291
162
  priceVersionId: z.ZodNullable<z.ZodString>;
292
- }, "strict", z.ZodTypeAny, {
293
- status: "unpriced";
294
- priceVersionId: string | null;
295
- }, {
296
- status: "unpriced";
297
- priceVersionId: string | null;
298
- }>]>;
163
+ }, z.core.$strict>], "status">;
299
164
  customerCharge: z.ZodObject<{
300
165
  status: z.ZodLiteral<"not_charged">;
301
- }, "strict", z.ZodTypeAny, {
302
- status: "not_charged";
303
- }, {
304
- status: "not_charged";
305
- }>;
166
+ }, z.core.$strict>;
306
167
  settledAt: z.ZodString;
307
- }, "strict", z.ZodTypeAny, {
308
- environment: "development" | "staging" | "production";
309
- kind: "metered_usage";
310
- schemaVersion: 2;
311
- applicationId: string;
312
- credentialId: string;
313
- requestId: string;
314
- settledAt: string;
315
- outcome: "failed" | "completed" | "cancelled" | "partial";
316
- resolvedModelReference: string;
317
- servingProvider: string;
318
- units: {
319
- unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
320
- quantity: number;
321
- }[];
322
- usageSource: "provider_reported" | "oxy_measured" | "estimated";
323
- tariff: {
324
- status: "quoted";
325
- currency: string;
326
- amount: string & z.BRAND<"ExactDecimal">;
327
- priceVersionId: string;
328
- } | {
329
- status: "unpriced";
330
- priceVersionId: string | null;
331
- };
332
- customerCharge: {
333
- status: "not_charged";
334
- };
335
- meteredUsageId: string;
336
- economicTreatment: "internal_metered";
337
- economicPolicyVersion: string;
338
- generationId?: string | undefined;
339
- parentRequestId?: string | undefined;
340
- delegatedUserId?: string | undefined;
341
- }, {
342
- environment: "development" | "staging" | "production";
343
- kind: "metered_usage";
344
- schemaVersion: 2;
345
- applicationId: string;
346
- credentialId: string;
347
- requestId: string;
348
- settledAt: string;
349
- outcome: "failed" | "completed" | "cancelled" | "partial";
350
- resolvedModelReference: string;
351
- servingProvider: string;
352
- units: {
353
- unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
354
- quantity: number;
355
- }[];
356
- usageSource: "provider_reported" | "oxy_measured" | "estimated";
357
- tariff: {
358
- status: "quoted";
359
- currency: string;
360
- amount: string;
361
- priceVersionId: string;
362
- } | {
363
- status: "unpriced";
364
- priceVersionId: string | null;
365
- };
366
- customerCharge: {
367
- status: "not_charged";
368
- };
369
- meteredUsageId: string;
370
- economicTreatment: "internal_metered";
371
- economicPolicyVersion: string;
372
- generationId?: string | undefined;
373
- parentRequestId?: string | undefined;
374
- delegatedUserId?: string | undefined;
375
- }>;
168
+ }, z.core.$strict>;
376
169
  export type MeteredGeneration = z.infer<typeof meteredGenerationSchema>;