@oxy.so/contracts 5.8.0 → 6.1.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 (231) 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/campaignAttribution.js +28 -0
  10. package/dist/cjs/civic.js +10 -9
  11. package/dist/cjs/client/campaignAttribution.js +14 -0
  12. package/dist/cjs/client/check.js +61 -53
  13. package/dist/cjs/client/index.js +7 -1
  14. package/dist/cjs/client/language.js +7 -0
  15. package/dist/cjs/consoleOnboarding.js +9 -4
  16. package/dist/cjs/contentClaims.js +23 -14
  17. package/dist/cjs/deviceDirectory.js +11 -9
  18. package/dist/cjs/deviceSession.js +27 -25
  19. package/dist/cjs/email/messages.js +20 -18
  20. package/dist/cjs/emailAgentContext.js +11 -9
  21. package/dist/cjs/externalIdentity.js +15 -11
  22. package/dist/cjs/federationInstanceFetch.js +12 -7
  23. package/dist/cjs/identity.js +19 -17
  24. package/dist/cjs/identityLink.js +6 -4
  25. package/dist/cjs/identityProof.js +6 -4
  26. package/dist/cjs/inboxPush.js +5 -4
  27. package/dist/cjs/index.js +17 -6
  28. package/dist/cjs/inference/accountBilling.js +35 -33
  29. package/dist/cjs/inference/aliaModelRelease.js +9 -7
  30. package/dist/cjs/inference/attribution.js +14 -12
  31. package/dist/cjs/inference/catalogue.js +35 -29
  32. package/dist/cjs/inference/economics.js +24 -19
  33. package/dist/cjs/inference/embeddings.js +9 -7
  34. package/dist/cjs/inference/entitlement.js +17 -15
  35. package/dist/cjs/inference/errors.js +15 -8
  36. package/dist/cjs/inference/identifiers.js +33 -21
  37. package/dist/cjs/inference/inbox.js +37 -35
  38. package/dist/cjs/inference/modelDocumentation.js +16 -14
  39. package/dist/cjs/inference/money.js +5 -4
  40. package/dist/cjs/inference/priceVersion.js +10 -5
  41. package/dist/cjs/inference/providerConnection.js +21 -14
  42. package/dist/cjs/inference/realtime.js +88 -47
  43. package/dist/cjs/inference/request.js +27 -25
  44. package/dist/cjs/inference/routingPolicy.js +12 -10
  45. package/dist/cjs/inference/streamEvents.js +22 -16
  46. package/dist/cjs/inference/usage.js +32 -15
  47. package/dist/cjs/keyRecovery.js +8 -6
  48. package/dist/cjs/keyRotation.js +5 -4
  49. package/dist/cjs/linkedAccounts.js +22 -18
  50. package/dist/cjs/moderationReputation.js +29 -27
  51. package/dist/cjs/notifications.js +25 -9
  52. package/dist/cjs/numberChecks.js +45 -0
  53. package/dist/cjs/oauth.js +14 -12
  54. package/dist/cjs/organizations.js +23 -21
  55. package/dist/cjs/products/access.js +10 -8
  56. package/dist/cjs/products/billing.js +10 -8
  57. package/dist/cjs/products/checkout.js +22 -10
  58. package/dist/cjs/products/plans.js +15 -10
  59. package/dist/cjs/protocol.js +6 -5
  60. package/dist/cjs/recommendations.js +27 -19
  61. package/dist/cjs/reputation.js +15 -13
  62. package/dist/cjs/safety.js +43 -27
  63. package/dist/cjs/serviceToken.js +81 -2
  64. package/dist/cjs/sessionRevocation.js +8 -6
  65. package/dist/cjs/signIn.js +50 -24
  66. package/dist/cjs/stickers.js +19 -15
  67. package/dist/cjs/stringChecks.js +70 -0
  68. package/dist/cjs/transparency.js +14 -12
  69. package/dist/cjs/updates.js +24 -22
  70. package/dist/cjs/userInvalidation.js +7 -5
  71. package/dist/cjs/userResponse.js +8 -7
  72. package/dist/cjs/username.js +7 -6
  73. package/dist/esm/accountAccess.js +4 -3
  74. package/dist/esm/accountEmail.js +13 -5
  75. package/dist/esm/accountGraph.js +8 -7
  76. package/dist/esm/accountName.js +3 -2
  77. package/dist/esm/agency.js +90 -33
  78. package/dist/esm/agentKeys.js +21 -17
  79. package/dist/esm/appAssertions.js +11 -10
  80. package/dist/esm/applicationRoles.js +16 -9
  81. package/dist/esm/campaignAttribution.js +25 -0
  82. package/dist/esm/civic.js +8 -7
  83. package/dist/esm/client/campaignAttribution.js +10 -0
  84. package/dist/esm/client/check.js +61 -53
  85. package/dist/esm/client/index.js +2 -0
  86. package/dist/esm/client/language.js +4 -0
  87. package/dist/esm/consoleOnboarding.js +7 -2
  88. package/dist/esm/contentClaims.js +23 -14
  89. package/dist/esm/deviceDirectory.js +11 -9
  90. package/dist/esm/deviceSession.js +27 -25
  91. package/dist/esm/email/messages.js +18 -16
  92. package/dist/esm/emailAgentContext.js +11 -9
  93. package/dist/esm/externalIdentity.js +15 -11
  94. package/dist/esm/federationInstanceFetch.js +10 -5
  95. package/dist/esm/identity.js +17 -15
  96. package/dist/esm/identityLink.js +6 -4
  97. package/dist/esm/identityProof.js +6 -4
  98. package/dist/esm/inboxPush.js +3 -2
  99. package/dist/esm/index.js +5 -2
  100. package/dist/esm/inference/accountBilling.js +33 -31
  101. package/dist/esm/inference/aliaModelRelease.js +7 -5
  102. package/dist/esm/inference/attribution.js +14 -12
  103. package/dist/esm/inference/catalogue.js +33 -27
  104. package/dist/esm/inference/economics.js +22 -17
  105. package/dist/esm/inference/embeddings.js +9 -7
  106. package/dist/esm/inference/entitlement.js +15 -13
  107. package/dist/esm/inference/errors.js +13 -6
  108. package/dist/esm/inference/identifiers.js +31 -19
  109. package/dist/esm/inference/inbox.js +37 -35
  110. package/dist/esm/inference/modelDocumentation.js +14 -12
  111. package/dist/esm/inference/money.js +3 -2
  112. package/dist/esm/inference/priceVersion.js +8 -3
  113. package/dist/esm/inference/providerConnection.js +19 -12
  114. package/dist/esm/inference/realtime.js +85 -44
  115. package/dist/esm/inference/request.js +25 -23
  116. package/dist/esm/inference/routingPolicy.js +9 -7
  117. package/dist/esm/inference/streamEvents.js +20 -14
  118. package/dist/esm/inference/usage.js +30 -13
  119. package/dist/esm/keyRecovery.js +8 -6
  120. package/dist/esm/keyRotation.js +5 -4
  121. package/dist/esm/linkedAccounts.js +20 -16
  122. package/dist/esm/moderationReputation.js +27 -25
  123. package/dist/esm/notifications.js +23 -7
  124. package/dist/esm/numberChecks.js +41 -0
  125. package/dist/esm/oauth.js +14 -12
  126. package/dist/esm/organizations.js +23 -21
  127. package/dist/esm/products/access.js +10 -8
  128. package/dist/esm/products/billing.js +10 -8
  129. package/dist/esm/products/checkout.js +22 -10
  130. package/dist/esm/products/plans.js +15 -10
  131. package/dist/esm/protocol.js +4 -3
  132. package/dist/esm/recommendations.js +25 -17
  133. package/dist/esm/reputation.js +13 -11
  134. package/dist/esm/safety.js +43 -27
  135. package/dist/esm/serviceToken.js +80 -1
  136. package/dist/esm/sessionRevocation.js +6 -4
  137. package/dist/esm/signIn.js +50 -24
  138. package/dist/esm/stickers.js +17 -13
  139. package/dist/esm/stringChecks.js +63 -0
  140. package/dist/esm/transparency.js +14 -12
  141. package/dist/esm/updates.js +22 -20
  142. package/dist/esm/userInvalidation.js +4 -2
  143. package/dist/esm/userResponse.js +4 -3
  144. package/dist/esm/username.js +3 -2
  145. package/dist/types/accountAccess.d.ts +29 -70
  146. package/dist/types/accountEmail.d.ts +2 -14
  147. package/dist/types/accountGraph.d.ts +179 -171
  148. package/dist/types/accountName.d.ts +1 -1
  149. package/dist/types/accountSubject.d.ts +20 -93
  150. package/dist/types/agency.d.ts +528 -2924
  151. package/dist/types/agentKeys.d.ts +48 -421
  152. package/dist/types/appAssertions.d.ts +56 -210
  153. package/dist/types/applicationRoles.d.ts +30 -276
  154. package/dist/types/avatarCharacter.d.ts +1 -1
  155. package/dist/types/campaignAttribution.d.ts +10 -0
  156. package/dist/types/civic.d.ts +1 -13
  157. package/dist/types/client/agentKeys.d.ts +18 -18
  158. package/dist/types/client/appAssertions.d.ts +3 -3
  159. package/dist/types/client/campaignAttribution.d.ts +12 -0
  160. package/dist/types/client/check.d.ts +13 -13
  161. package/dist/types/client/deviceDirectory.d.ts +51 -51
  162. package/dist/types/client/deviceSession.d.ts +14 -14
  163. package/dist/types/client/index.d.ts +3 -0
  164. package/dist/types/client/language.d.ts +2 -0
  165. package/dist/types/client/organizations.d.ts +25 -25
  166. package/dist/types/client/products.d.ts +33 -33
  167. package/dist/types/client/recommendations.d.ts +2 -2
  168. package/dist/types/client/safety.d.ts +45 -45
  169. package/dist/types/client/sessionStatus.d.ts +4 -4
  170. package/dist/types/client/signIn.d.ts +1 -1
  171. package/dist/types/commonsSignIn.d.ts +4 -1
  172. package/dist/types/consoleOnboarding.d.ts +24 -44
  173. package/dist/types/contentClaims.d.ts +24 -180
  174. package/dist/types/deviceDirectory.d.ts +109 -1040
  175. package/dist/types/deviceSession.d.ts +36 -298
  176. package/dist/types/email/messages.d.ts +212 -1793
  177. package/dist/types/emailAgentContext.d.ts +10 -194
  178. package/dist/types/externalIdentity.d.ts +121 -615
  179. package/dist/types/federationInstanceFetch.d.ts +3 -32
  180. package/dist/types/identity.d.ts +15 -92
  181. package/dist/types/identityLink.d.ts +6 -84
  182. package/dist/types/identityProof.d.ts +5 -17
  183. package/dist/types/inboxPush.d.ts +1 -9
  184. package/dist/types/index.d.ts +7 -3
  185. package/dist/types/inference/accountBilling.d.ts +151 -488
  186. package/dist/types/inference/aliaModelRelease.d.ts +42 -439
  187. package/dist/types/inference/attribution.d.ts +75 -104
  188. package/dist/types/inference/catalogue.d.ts +417 -1599
  189. package/dist/types/inference/economics.d.ts +69 -276
  190. package/dist/types/inference/embeddings.d.ts +110 -406
  191. package/dist/types/inference/entitlement.d.ts +80 -335
  192. package/dist/types/inference/errors.d.ts +90 -102
  193. package/dist/types/inference/identifiers.d.ts +12 -4
  194. package/dist/types/inference/inbox.d.ts +105 -420
  195. package/dist/types/inference/modelDocumentation.d.ts +201 -1390
  196. package/dist/types/inference/money.d.ts +65 -32
  197. package/dist/types/inference/priceVersion.d.ts +53 -120
  198. package/dist/types/inference/providerConnection.d.ts +253 -710
  199. package/dist/types/inference/realtime.d.ts +954 -6825
  200. package/dist/types/inference/request.d.ts +300 -2572
  201. package/dist/types/inference/routingPolicy.d.ts +95 -503
  202. package/dist/types/inference/streamEvents.d.ts +253 -721
  203. package/dist/types/inference/usage.d.ts +317 -950
  204. package/dist/types/keyRecovery.d.ts +3 -51
  205. package/dist/types/keyRotation.d.ts +3 -38
  206. package/dist/types/linkedAccounts.d.ts +50 -236
  207. package/dist/types/moderationReputation.d.ts +81 -14
  208. package/dist/types/notifications.d.ts +19 -51
  209. package/dist/types/numberChecks.d.ts +9 -0
  210. package/dist/types/oauth.d.ts +101 -809
  211. package/dist/types/organizations.d.ts +268 -921
  212. package/dist/types/oxyRecordTypes.d.ts +11 -1
  213. package/dist/types/products/access.d.ts +125 -775
  214. package/dist/types/products/billing.d.ts +67 -503
  215. package/dist/types/products/checkout.d.ts +16 -69
  216. package/dist/types/products/plans.d.ts +33 -366
  217. package/dist/types/recommendations.d.ts +76 -389
  218. package/dist/types/reputation.d.ts +37 -5
  219. package/dist/types/safety.d.ts +408 -2048
  220. package/dist/types/serviceToken.d.ts +247 -7
  221. package/dist/types/sessionRevocation.d.ts +2 -17
  222. package/dist/types/sessionStatus.d.ts +27 -115
  223. package/dist/types/signIn.d.ts +62 -553
  224. package/dist/types/stickers.d.ts +67 -819
  225. package/dist/types/stringChecks.d.ts +16 -0
  226. package/dist/types/transparency.d.ts +14 -302
  227. package/dist/types/updates.d.ts +60 -316
  228. package/dist/types/userInvalidation.d.ts +4 -13
  229. package/dist/types/userResponse.d.ts +302 -2400
  230. package/dist/types/username.d.ts +3 -3
  231. package/package.json +6 -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>;