@oxy.so/contracts 5.7.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 (227) 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/client/consoleOnboarding.js +24 -0
  12. package/dist/cjs/client/index.js +7 -3
  13. package/dist/cjs/client/safety.js +9 -1
  14. package/dist/cjs/consoleOnboarding.js +56 -0
  15. package/dist/cjs/contentClaims.js +23 -14
  16. package/dist/cjs/deviceDirectory.js +11 -9
  17. package/dist/cjs/deviceSession.js +27 -25
  18. package/dist/cjs/email/messages.js +20 -18
  19. package/dist/cjs/emailAgentContext.js +11 -9
  20. package/dist/cjs/externalIdentity.js +15 -11
  21. package/dist/cjs/federationInstanceFetch.js +12 -7
  22. package/dist/cjs/identity.js +19 -17
  23. package/dist/cjs/identityLink.js +6 -4
  24. package/dist/cjs/identityProof.js +6 -4
  25. package/dist/cjs/inboxPush.js +5 -4
  26. package/dist/cjs/index.js +16 -6
  27. package/dist/cjs/inference/accountBilling.js +35 -33
  28. package/dist/cjs/inference/aliaModelRelease.js +9 -7
  29. package/dist/cjs/inference/attribution.js +14 -12
  30. package/dist/cjs/inference/catalogue.js +35 -29
  31. package/dist/cjs/inference/economics.js +24 -19
  32. package/dist/cjs/inference/embeddings.js +9 -7
  33. package/dist/cjs/inference/entitlement.js +17 -15
  34. package/dist/cjs/inference/errors.js +15 -8
  35. package/dist/cjs/inference/identifiers.js +33 -21
  36. package/dist/cjs/inference/inbox.js +37 -35
  37. package/dist/cjs/inference/modelDocumentation.js +16 -14
  38. package/dist/cjs/inference/money.js +5 -4
  39. package/dist/cjs/inference/priceVersion.js +10 -5
  40. package/dist/cjs/inference/providerConnection.js +21 -14
  41. package/dist/cjs/inference/realtime.js +88 -47
  42. package/dist/cjs/inference/request.js +27 -25
  43. package/dist/cjs/inference/routingPolicy.js +12 -10
  44. package/dist/cjs/inference/streamEvents.js +22 -16
  45. package/dist/cjs/inference/usage.js +32 -15
  46. package/dist/cjs/keyRecovery.js +8 -6
  47. package/dist/cjs/keyRotation.js +5 -4
  48. package/dist/cjs/linkedAccounts.js +22 -18
  49. package/dist/cjs/moderationReputation.js +29 -27
  50. package/dist/cjs/notifications.js +25 -9
  51. package/dist/cjs/numberChecks.js +45 -0
  52. package/dist/cjs/oauth.js +14 -12
  53. package/dist/cjs/organizations.js +23 -21
  54. package/dist/cjs/products/access.js +10 -8
  55. package/dist/cjs/products/billing.js +10 -8
  56. package/dist/cjs/products/checkout.js +22 -10
  57. package/dist/cjs/products/plans.js +15 -10
  58. package/dist/cjs/protocol.js +6 -5
  59. package/dist/cjs/recommendations.js +27 -19
  60. package/dist/cjs/reputation.js +15 -13
  61. package/dist/cjs/safety.js +46 -29
  62. package/dist/cjs/serviceToken.js +81 -2
  63. package/dist/cjs/sessionRevocation.js +8 -6
  64. package/dist/cjs/signIn.js +42 -24
  65. package/dist/cjs/stickers.js +19 -15
  66. package/dist/cjs/stringChecks.js +70 -0
  67. package/dist/cjs/transparency.js +14 -12
  68. package/dist/cjs/updates.js +24 -22
  69. package/dist/cjs/userInvalidation.js +7 -5
  70. package/dist/cjs/userResponse.js +8 -7
  71. package/dist/cjs/username.js +7 -6
  72. package/dist/esm/accountAccess.js +4 -3
  73. package/dist/esm/accountEmail.js +13 -5
  74. package/dist/esm/accountGraph.js +8 -7
  75. package/dist/esm/accountName.js +3 -2
  76. package/dist/esm/agency.js +90 -33
  77. package/dist/esm/agentKeys.js +21 -17
  78. package/dist/esm/appAssertions.js +11 -10
  79. package/dist/esm/applicationRoles.js +16 -9
  80. package/dist/esm/civic.js +8 -7
  81. package/dist/esm/client/check.js +61 -53
  82. package/dist/esm/client/consoleOnboarding.js +21 -0
  83. package/dist/esm/client/index.js +2 -1
  84. package/dist/esm/client/safety.js +8 -0
  85. package/dist/esm/consoleOnboarding.js +51 -0
  86. package/dist/esm/contentClaims.js +23 -14
  87. package/dist/esm/deviceDirectory.js +11 -9
  88. package/dist/esm/deviceSession.js +27 -25
  89. package/dist/esm/email/messages.js +18 -16
  90. package/dist/esm/emailAgentContext.js +11 -9
  91. package/dist/esm/externalIdentity.js +15 -11
  92. package/dist/esm/federationInstanceFetch.js +10 -5
  93. package/dist/esm/identity.js +17 -15
  94. package/dist/esm/identityLink.js +6 -4
  95. package/dist/esm/identityProof.js +6 -4
  96. package/dist/esm/inboxPush.js +3 -2
  97. package/dist/esm/index.js +5 -2
  98. package/dist/esm/inference/accountBilling.js +33 -31
  99. package/dist/esm/inference/aliaModelRelease.js +7 -5
  100. package/dist/esm/inference/attribution.js +14 -12
  101. package/dist/esm/inference/catalogue.js +33 -27
  102. package/dist/esm/inference/economics.js +22 -17
  103. package/dist/esm/inference/embeddings.js +9 -7
  104. package/dist/esm/inference/entitlement.js +15 -13
  105. package/dist/esm/inference/errors.js +13 -6
  106. package/dist/esm/inference/identifiers.js +31 -19
  107. package/dist/esm/inference/inbox.js +37 -35
  108. package/dist/esm/inference/modelDocumentation.js +14 -12
  109. package/dist/esm/inference/money.js +3 -2
  110. package/dist/esm/inference/priceVersion.js +8 -3
  111. package/dist/esm/inference/providerConnection.js +19 -12
  112. package/dist/esm/inference/realtime.js +85 -44
  113. package/dist/esm/inference/request.js +25 -23
  114. package/dist/esm/inference/routingPolicy.js +9 -7
  115. package/dist/esm/inference/streamEvents.js +20 -14
  116. package/dist/esm/inference/usage.js +30 -13
  117. package/dist/esm/keyRecovery.js +8 -6
  118. package/dist/esm/keyRotation.js +5 -4
  119. package/dist/esm/linkedAccounts.js +20 -16
  120. package/dist/esm/moderationReputation.js +27 -25
  121. package/dist/esm/notifications.js +23 -7
  122. package/dist/esm/numberChecks.js +41 -0
  123. package/dist/esm/oauth.js +14 -12
  124. package/dist/esm/organizations.js +23 -21
  125. package/dist/esm/products/access.js +10 -8
  126. package/dist/esm/products/billing.js +10 -8
  127. package/dist/esm/products/checkout.js +22 -10
  128. package/dist/esm/products/plans.js +15 -10
  129. package/dist/esm/protocol.js +4 -3
  130. package/dist/esm/recommendations.js +25 -17
  131. package/dist/esm/reputation.js +13 -11
  132. package/dist/esm/safety.js +45 -29
  133. package/dist/esm/serviceToken.js +80 -1
  134. package/dist/esm/sessionRevocation.js +6 -4
  135. package/dist/esm/signIn.js +42 -24
  136. package/dist/esm/stickers.js +17 -13
  137. package/dist/esm/stringChecks.js +63 -0
  138. package/dist/esm/transparency.js +14 -12
  139. package/dist/esm/updates.js +22 -20
  140. package/dist/esm/userInvalidation.js +4 -2
  141. package/dist/esm/userResponse.js +4 -3
  142. package/dist/esm/username.js +3 -2
  143. package/dist/types/accountAccess.d.ts +29 -70
  144. package/dist/types/accountEmail.d.ts +2 -14
  145. package/dist/types/accountGraph.d.ts +179 -171
  146. package/dist/types/accountName.d.ts +1 -1
  147. package/dist/types/accountSubject.d.ts +20 -93
  148. package/dist/types/agency.d.ts +528 -2924
  149. package/dist/types/agentKeys.d.ts +48 -421
  150. package/dist/types/appAssertions.d.ts +56 -210
  151. package/dist/types/applicationRoles.d.ts +30 -276
  152. package/dist/types/avatarCharacter.d.ts +1 -1
  153. package/dist/types/civic.d.ts +1 -13
  154. package/dist/types/client/agentKeys.d.ts +18 -18
  155. package/dist/types/client/appAssertions.d.ts +3 -3
  156. package/dist/types/client/check.d.ts +13 -13
  157. package/dist/types/client/consoleOnboarding.d.ts +16 -0
  158. package/dist/types/client/deviceDirectory.d.ts +51 -51
  159. package/dist/types/client/deviceSession.d.ts +14 -14
  160. package/dist/types/client/index.d.ts +2 -1
  161. package/dist/types/client/organizations.d.ts +25 -25
  162. package/dist/types/client/products.d.ts +33 -33
  163. package/dist/types/client/recommendations.d.ts +2 -2
  164. package/dist/types/client/safety.d.ts +53 -45
  165. package/dist/types/client/sessionStatus.d.ts +4 -4
  166. package/dist/types/client/signIn.d.ts +1 -1
  167. package/dist/types/commonsSignIn.d.ts +4 -1
  168. package/dist/types/consoleOnboarding.d.ts +57 -0
  169. package/dist/types/contentClaims.d.ts +24 -180
  170. package/dist/types/deviceDirectory.d.ts +109 -1040
  171. package/dist/types/deviceSession.d.ts +36 -298
  172. package/dist/types/email/messages.d.ts +212 -1793
  173. package/dist/types/emailAgentContext.d.ts +10 -194
  174. package/dist/types/externalIdentity.d.ts +121 -615
  175. package/dist/types/federationInstanceFetch.d.ts +3 -32
  176. package/dist/types/identity.d.ts +15 -92
  177. package/dist/types/identityLink.d.ts +6 -84
  178. package/dist/types/identityProof.d.ts +5 -17
  179. package/dist/types/inboxPush.d.ts +1 -9
  180. package/dist/types/index.d.ts +6 -3
  181. package/dist/types/inference/accountBilling.d.ts +151 -488
  182. package/dist/types/inference/aliaModelRelease.d.ts +42 -439
  183. package/dist/types/inference/attribution.d.ts +75 -104
  184. package/dist/types/inference/catalogue.d.ts +417 -1599
  185. package/dist/types/inference/economics.d.ts +69 -276
  186. package/dist/types/inference/embeddings.d.ts +110 -406
  187. package/dist/types/inference/entitlement.d.ts +80 -335
  188. package/dist/types/inference/errors.d.ts +90 -102
  189. package/dist/types/inference/identifiers.d.ts +12 -4
  190. package/dist/types/inference/inbox.d.ts +105 -420
  191. package/dist/types/inference/modelDocumentation.d.ts +201 -1390
  192. package/dist/types/inference/money.d.ts +65 -32
  193. package/dist/types/inference/priceVersion.d.ts +53 -120
  194. package/dist/types/inference/providerConnection.d.ts +253 -710
  195. package/dist/types/inference/realtime.d.ts +954 -6825
  196. package/dist/types/inference/request.d.ts +300 -2572
  197. package/dist/types/inference/routingPolicy.d.ts +95 -503
  198. package/dist/types/inference/streamEvents.d.ts +253 -721
  199. package/dist/types/inference/usage.d.ts +317 -950
  200. package/dist/types/keyRecovery.d.ts +3 -51
  201. package/dist/types/keyRotation.d.ts +3 -38
  202. package/dist/types/linkedAccounts.d.ts +50 -236
  203. package/dist/types/moderationReputation.d.ts +81 -14
  204. package/dist/types/notifications.d.ts +19 -51
  205. package/dist/types/numberChecks.d.ts +9 -0
  206. package/dist/types/oauth.d.ts +101 -809
  207. package/dist/types/organizations.d.ts +268 -921
  208. package/dist/types/oxyRecordTypes.d.ts +11 -1
  209. package/dist/types/products/access.d.ts +125 -775
  210. package/dist/types/products/billing.d.ts +67 -503
  211. package/dist/types/products/checkout.d.ts +16 -69
  212. package/dist/types/products/plans.d.ts +33 -366
  213. package/dist/types/recommendations.d.ts +76 -389
  214. package/dist/types/reputation.d.ts +37 -5
  215. package/dist/types/safety.d.ts +410 -2050
  216. package/dist/types/serviceToken.d.ts +247 -7
  217. package/dist/types/sessionRevocation.d.ts +2 -17
  218. package/dist/types/sessionStatus.d.ts +27 -115
  219. package/dist/types/signIn.d.ts +53 -553
  220. package/dist/types/stickers.d.ts +67 -819
  221. package/dist/types/stringChecks.d.ts +16 -0
  222. package/dist/types/transparency.d.ts +14 -302
  223. package/dist/types/updates.d.ts +60 -316
  224. package/dist/types/userInvalidation.d.ts +4 -13
  225. package/dist/types/userResponse.d.ts +302 -2400
  226. package/dist/types/username.d.ts +3 -3
  227. package/package.json +3 -4
@@ -44,7 +44,36 @@ import { z } from 'zod';
44
44
  * error tells them to go and top up an account that is not the one at fault.
45
45
  */
46
46
  export declare const INFERENCE_ERROR_CODES: readonly ["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "provider_billing_refused", "service_unavailable", "internal_error"];
47
- export declare const inferenceErrorCodeSchema: z.ZodEnum<["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "provider_billing_refused", "service_unavailable", "internal_error"]>;
47
+ export declare const inferenceErrorCodeSchema: z.ZodEnum<{
48
+ rate_limited: "rate_limited";
49
+ internal_error: "internal_error";
50
+ service_unavailable: "service_unavailable";
51
+ cancelled: "cancelled";
52
+ invalid_request: "invalid_request";
53
+ authentication_failed: "authentication_failed";
54
+ permission_denied: "permission_denied";
55
+ insufficient_scope: "insufficient_scope";
56
+ model_not_found: "model_not_found";
57
+ unsupported_modality: "unsupported_modality";
58
+ context_length_exceeded: "context_length_exceeded";
59
+ request_too_large: "request_too_large";
60
+ output_limit_exceeded: "output_limit_exceeded";
61
+ idempotency_conflict: "idempotency_conflict";
62
+ insufficient_balance: "insufficient_balance";
63
+ spending_limit_exceeded: "spending_limit_exceeded";
64
+ quota_exceeded: "quota_exceeded";
65
+ byok_credential_invalid: "byok_credential_invalid";
66
+ policy_violation: "policy_violation";
67
+ commercial_permission_denied: "commercial_permission_denied";
68
+ no_route_available: "no_route_available";
69
+ upstream_content_filtered: "upstream_content_filtered";
70
+ deployment_unavailable: "deployment_unavailable";
71
+ provider_error: "provider_error";
72
+ provider_timeout: "provider_timeout";
73
+ provider_overloaded: "provider_overloaded";
74
+ provider_credential_invalid: "provider_credential_invalid";
75
+ provider_billing_refused: "provider_billing_refused";
76
+ }>;
48
77
  /**
49
78
  * Codes for which an identical retried request cannot succeed.
50
79
  *
@@ -98,7 +127,7 @@ export declare const NON_RETRYABLE_INFERENCE_ERROR_CODES: readonly ["invalid_req
98
127
  * marker, no issued-token prefix and no placeholder beside it is bytes that look
99
128
  * like a request id, and refusing those means refusing request ids.
100
129
  */
101
- export declare const safeErrorTextSchema: z.ZodEffects<z.ZodString, string, string>;
130
+ export declare const safeErrorTextSchema: z.ZodString;
102
131
  /**
103
132
  * A coarse classification of an upstream failure (ADR 0010's `upstreamCategory`).
104
133
  *
@@ -107,7 +136,17 @@ export declare const safeErrorTextSchema: z.ZodEffects<z.ZodString, string, stri
107
136
  * was, in a vocabulary that is the same across every provider, so a client can
108
137
  * branch on it without knowing who served the request.
109
138
  */
110
- export declare const upstreamErrorCategorySchema: z.ZodEnum<["rate_limit", "quota", "timeout", "overloaded", "server_error", "content_filter", "invalid_request", "authentication", "unknown"]>;
139
+ export declare const upstreamErrorCategorySchema: z.ZodEnum<{
140
+ unknown: "unknown";
141
+ authentication: "authentication";
142
+ invalid_request: "invalid_request";
143
+ rate_limit: "rate_limit";
144
+ quota: "quota";
145
+ timeout: "timeout";
146
+ overloaded: "overloaded";
147
+ server_error: "server_error";
148
+ content_filter: "content_filter";
149
+ }>;
111
150
  /**
112
151
  * What the upstream provider said, reduced to the four fields a customer can
113
152
  * act on.
@@ -119,23 +158,10 @@ export declare const upstreamErrorCategorySchema: z.ZodEnum<["rate_limit", "quot
119
158
  */
120
159
  export declare const providerErrorPassthroughSchema: z.ZodObject<{
121
160
  provider: z.ZodString;
122
- /** The upstream HTTP status, when the upstream spoke HTTP. */
123
161
  status: z.ZodOptional<z.ZodNumber>;
124
- /** The upstream's own error code, verbatim and uninterpreted. */
125
162
  code: z.ZodOptional<z.ZodString>;
126
- /** The upstream's message, subject to the same credential refusal. */
127
- message: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
128
- }, "strict", z.ZodTypeAny, {
129
- provider: string;
130
- code?: string | undefined;
131
- message?: string | undefined;
132
- status?: number | undefined;
133
- }, {
134
- provider: string;
135
- code?: string | undefined;
136
- message?: string | undefined;
137
- status?: number | undefined;
138
- }>;
163
+ message: z.ZodOptional<z.ZodString>;
164
+ }, z.core.$strict>;
139
165
  /**
140
166
  * The error body every inference surface returns and every stream error event
141
167
  * carries.
@@ -143,99 +169,61 @@ export declare const providerErrorPassthroughSchema: z.ZodObject<{
143
169
  * `requestId` is always present — an error a customer cannot correlate with a
144
170
  * log line is an error they have to reproduce to report.
145
171
  */
146
- export declare const inferenceErrorSchema: z.ZodEffects<z.ZodObject<{
147
- /** See `version.ts`: this shape appears alone on the wire, so it is versioned. */
172
+ export declare const inferenceErrorSchema: z.ZodObject<{
148
173
  schemaVersion: z.ZodLiteral<1>;
149
- code: z.ZodEnum<["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "provider_billing_refused", "service_unavailable", "internal_error"]>;
150
- message: z.ZodEffects<z.ZodString, string, string>;
174
+ code: z.ZodEnum<{
175
+ rate_limited: "rate_limited";
176
+ internal_error: "internal_error";
177
+ service_unavailable: "service_unavailable";
178
+ cancelled: "cancelled";
179
+ invalid_request: "invalid_request";
180
+ authentication_failed: "authentication_failed";
181
+ permission_denied: "permission_denied";
182
+ insufficient_scope: "insufficient_scope";
183
+ model_not_found: "model_not_found";
184
+ unsupported_modality: "unsupported_modality";
185
+ context_length_exceeded: "context_length_exceeded";
186
+ request_too_large: "request_too_large";
187
+ output_limit_exceeded: "output_limit_exceeded";
188
+ idempotency_conflict: "idempotency_conflict";
189
+ insufficient_balance: "insufficient_balance";
190
+ spending_limit_exceeded: "spending_limit_exceeded";
191
+ quota_exceeded: "quota_exceeded";
192
+ byok_credential_invalid: "byok_credential_invalid";
193
+ policy_violation: "policy_violation";
194
+ commercial_permission_denied: "commercial_permission_denied";
195
+ no_route_available: "no_route_available";
196
+ upstream_content_filtered: "upstream_content_filtered";
197
+ deployment_unavailable: "deployment_unavailable";
198
+ provider_error: "provider_error";
199
+ provider_timeout: "provider_timeout";
200
+ provider_overloaded: "provider_overloaded";
201
+ provider_credential_invalid: "provider_credential_invalid";
202
+ provider_billing_refused: "provider_billing_refused";
203
+ }>;
204
+ message: z.ZodString;
151
205
  retryable: z.ZodBoolean;
152
206
  requestId: z.ZodString;
153
- /** How long to wait before retrying. Only meaningful when `retryable`. */
154
207
  retryAfterMs: z.ZodOptional<z.ZodNumber>;
155
- /** The request field at fault, for `invalid_request`. */
156
208
  param: z.ZodOptional<z.ZodString>;
157
- /** Present only when an upstream provider was reached and failed. */
158
- upstreamCategory: z.ZodOptional<z.ZodEnum<["rate_limit", "quota", "timeout", "overloaded", "server_error", "content_filter", "invalid_request", "authentication", "unknown"]>>;
209
+ upstreamCategory: z.ZodOptional<z.ZodEnum<{
210
+ unknown: "unknown";
211
+ authentication: "authentication";
212
+ invalid_request: "invalid_request";
213
+ rate_limit: "rate_limit";
214
+ quota: "quota";
215
+ timeout: "timeout";
216
+ overloaded: "overloaded";
217
+ server_error: "server_error";
218
+ content_filter: "content_filter";
219
+ }>>;
159
220
  providerError: z.ZodOptional<z.ZodObject<{
160
221
  provider: z.ZodString;
161
- /** The upstream HTTP status, when the upstream spoke HTTP. */
162
222
  status: z.ZodOptional<z.ZodNumber>;
163
- /** The upstream's own error code, verbatim and uninterpreted. */
164
223
  code: z.ZodOptional<z.ZodString>;
165
- /** The upstream's message, subject to the same credential refusal. */
166
- message: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
167
- }, "strict", z.ZodTypeAny, {
168
- provider: string;
169
- code?: string | undefined;
170
- message?: string | undefined;
171
- status?: number | undefined;
172
- }, {
173
- provider: string;
174
- code?: string | undefined;
175
- message?: string | undefined;
176
- status?: number | undefined;
177
- }>>;
178
- }, "strip", z.ZodTypeAny, {
179
- code: "rate_limited" | "internal_error" | "service_unavailable" | "cancelled" | "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "provider_billing_refused";
180
- message: string;
181
- schemaVersion: 1;
182
- requestId: string;
183
- retryable: boolean;
184
- retryAfterMs?: number | undefined;
185
- param?: string | undefined;
186
- upstreamCategory?: "unknown" | "authentication" | "invalid_request" | "rate_limit" | "quota" | "timeout" | "overloaded" | "server_error" | "content_filter" | undefined;
187
- providerError?: {
188
- provider: string;
189
- code?: string | undefined;
190
- message?: string | undefined;
191
- status?: number | undefined;
192
- } | undefined;
193
- }, {
194
- code: "rate_limited" | "internal_error" | "service_unavailable" | "cancelled" | "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "provider_billing_refused";
195
- message: string;
196
- schemaVersion: 1;
197
- requestId: string;
198
- retryable: boolean;
199
- retryAfterMs?: number | undefined;
200
- param?: string | undefined;
201
- upstreamCategory?: "unknown" | "authentication" | "invalid_request" | "rate_limit" | "quota" | "timeout" | "overloaded" | "server_error" | "content_filter" | undefined;
202
- providerError?: {
203
- provider: string;
204
- code?: string | undefined;
205
- message?: string | undefined;
206
- status?: number | undefined;
207
- } | undefined;
208
- }>, {
209
- code: "rate_limited" | "internal_error" | "service_unavailable" | "cancelled" | "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "provider_billing_refused";
210
- message: string;
211
- schemaVersion: 1;
212
- requestId: string;
213
- retryable: boolean;
214
- retryAfterMs?: number | undefined;
215
- param?: string | undefined;
216
- upstreamCategory?: "unknown" | "authentication" | "invalid_request" | "rate_limit" | "quota" | "timeout" | "overloaded" | "server_error" | "content_filter" | undefined;
217
- providerError?: {
218
- provider: string;
219
- code?: string | undefined;
220
- message?: string | undefined;
221
- status?: number | undefined;
222
- } | undefined;
223
- }, {
224
- code: "rate_limited" | "internal_error" | "service_unavailable" | "cancelled" | "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "provider_billing_refused";
225
- message: string;
226
- schemaVersion: 1;
227
- requestId: string;
228
- retryable: boolean;
229
- retryAfterMs?: number | undefined;
230
- param?: string | undefined;
231
- upstreamCategory?: "unknown" | "authentication" | "invalid_request" | "rate_limit" | "quota" | "timeout" | "overloaded" | "server_error" | "content_filter" | undefined;
232
- providerError?: {
233
- provider: string;
234
- code?: string | undefined;
235
- message?: string | undefined;
236
- status?: number | undefined;
237
- } | undefined;
238
- }>;
224
+ message: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strict>>;
226
+ }, z.core.$strip>;
239
227
  export type InferenceErrorCode = z.infer<typeof inferenceErrorCodeSchema>;
240
228
  export type UpstreamErrorCategory = z.infer<typeof upstreamErrorCategorySchema>;
241
229
  export type ProviderErrorPassthrough = z.infer<typeof providerErrorPassthroughSchema>;
@@ -29,7 +29,7 @@ import { z } from 'zod';
29
29
  * of a header, a JWT claim or a request body — is not assignable to it; the
30
30
  * only way to obtain one is to parse a value through this schema.
31
31
  */
32
- export declare const oxyAccountIdSchema: z.ZodBranded<z.ZodString, "OxyAccountId">;
32
+ export declare const oxyAccountIdSchema: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
33
33
  /**
34
34
  * A delegated end-user identity (Alia's `X-Oxy-User-Id`), branded with a
35
35
  * DIFFERENT brand from {@link oxyAccountIdSchema} so the two cannot be
@@ -40,7 +40,7 @@ export declare const oxyAccountIdSchema: z.ZodBranded<z.ZodString, "OxyAccountId
40
40
  * a billing principal, never an access-control principal, and its presence
41
41
  * never changes which account is charged.
42
42
  */
43
- export declare const delegatedUserIdSchema: z.ZodBranded<z.ZodString, "DelegatedUserId">;
43
+ export declare const delegatedUserIdSchema: z.core.$ZodBranded<z.ZodString, "DelegatedUserId", "out">;
44
44
  /**
45
45
  * An Oxy `Application._id`. Not branded: no invariant in this contract turns on
46
46
  * confusing it with another id, and brand inflation costs every producer a
@@ -84,7 +84,11 @@ export declare const generationIdSchema: z.ZodString;
84
84
  */
85
85
  export declare const idempotencyKeySchema: z.ZodString;
86
86
  /** Credential environments. A credential is issued into exactly one of them. */
87
- export declare const inferenceEnvironmentSchema: z.ZodEnum<["development", "staging", "production"]>;
87
+ export declare const inferenceEnvironmentSchema: z.ZodEnum<{
88
+ development: "development";
89
+ staging: "staging";
90
+ production: "production";
91
+ }>;
88
92
  /**
89
93
  * An instant, as an ISO 8601 string in UTC (`2026-08-15T09:41:00.000Z`).
90
94
  *
@@ -194,5 +198,9 @@ export type ModelId = z.infer<typeof modelIdSchema>;
194
198
  * (`normalizedUsageReportSchema.fundingTier`). No key id, label or price
195
199
  * travels with it.
196
200
  */
197
- export declare const inferenceFundingTierSchema: z.ZodEnum<["free", "credit", "paid"]>;
201
+ export declare const inferenceFundingTierSchema: z.ZodEnum<{
202
+ free: "free";
203
+ credit: "credit";
204
+ paid: "paid";
205
+ }>;
198
206
  export type InferenceFundingTier = z.infer<typeof inferenceFundingTierSchema>;