@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.
- package/dist/cjs/accountAccess.js +6 -5
- package/dist/cjs/accountEmail.js +13 -5
- package/dist/cjs/accountGraph.js +10 -9
- package/dist/cjs/accountName.js +3 -2
- package/dist/cjs/agency.js +91 -34
- package/dist/cjs/agentKeys.js +21 -17
- package/dist/cjs/appAssertions.js +14 -13
- package/dist/cjs/applicationRoles.js +19 -12
- package/dist/cjs/civic.js +10 -9
- package/dist/cjs/client/check.js +61 -53
- package/dist/cjs/client/consoleOnboarding.js +24 -0
- package/dist/cjs/client/index.js +7 -3
- package/dist/cjs/client/safety.js +9 -1
- package/dist/cjs/consoleOnboarding.js +56 -0
- package/dist/cjs/contentClaims.js +23 -14
- package/dist/cjs/deviceDirectory.js +11 -9
- package/dist/cjs/deviceSession.js +27 -25
- package/dist/cjs/email/messages.js +20 -18
- package/dist/cjs/emailAgentContext.js +11 -9
- package/dist/cjs/externalIdentity.js +15 -11
- package/dist/cjs/federationInstanceFetch.js +12 -7
- package/dist/cjs/identity.js +19 -17
- package/dist/cjs/identityLink.js +6 -4
- package/dist/cjs/identityProof.js +6 -4
- package/dist/cjs/inboxPush.js +5 -4
- package/dist/cjs/index.js +16 -6
- package/dist/cjs/inference/accountBilling.js +35 -33
- package/dist/cjs/inference/aliaModelRelease.js +9 -7
- package/dist/cjs/inference/attribution.js +14 -12
- package/dist/cjs/inference/catalogue.js +35 -29
- package/dist/cjs/inference/economics.js +24 -19
- package/dist/cjs/inference/embeddings.js +9 -7
- package/dist/cjs/inference/entitlement.js +17 -15
- package/dist/cjs/inference/errors.js +15 -8
- package/dist/cjs/inference/identifiers.js +33 -21
- package/dist/cjs/inference/inbox.js +37 -35
- package/dist/cjs/inference/modelDocumentation.js +16 -14
- package/dist/cjs/inference/money.js +5 -4
- package/dist/cjs/inference/priceVersion.js +10 -5
- package/dist/cjs/inference/providerConnection.js +21 -14
- package/dist/cjs/inference/realtime.js +88 -47
- package/dist/cjs/inference/request.js +27 -25
- package/dist/cjs/inference/routingPolicy.js +12 -10
- package/dist/cjs/inference/streamEvents.js +22 -16
- package/dist/cjs/inference/usage.js +32 -15
- package/dist/cjs/keyRecovery.js +8 -6
- package/dist/cjs/keyRotation.js +5 -4
- package/dist/cjs/linkedAccounts.js +22 -18
- package/dist/cjs/moderationReputation.js +29 -27
- package/dist/cjs/notifications.js +25 -9
- package/dist/cjs/numberChecks.js +45 -0
- package/dist/cjs/oauth.js +14 -12
- package/dist/cjs/organizations.js +23 -21
- package/dist/cjs/products/access.js +10 -8
- package/dist/cjs/products/billing.js +10 -8
- package/dist/cjs/products/checkout.js +22 -10
- package/dist/cjs/products/plans.js +15 -10
- package/dist/cjs/protocol.js +6 -5
- package/dist/cjs/recommendations.js +27 -19
- package/dist/cjs/reputation.js +15 -13
- package/dist/cjs/safety.js +46 -29
- package/dist/cjs/serviceToken.js +81 -2
- package/dist/cjs/sessionRevocation.js +8 -6
- package/dist/cjs/signIn.js +42 -24
- package/dist/cjs/stickers.js +19 -15
- package/dist/cjs/stringChecks.js +70 -0
- package/dist/cjs/transparency.js +14 -12
- package/dist/cjs/updates.js +24 -22
- package/dist/cjs/userInvalidation.js +7 -5
- package/dist/cjs/userResponse.js +8 -7
- package/dist/cjs/username.js +7 -6
- package/dist/esm/accountAccess.js +4 -3
- package/dist/esm/accountEmail.js +13 -5
- package/dist/esm/accountGraph.js +8 -7
- package/dist/esm/accountName.js +3 -2
- package/dist/esm/agency.js +90 -33
- package/dist/esm/agentKeys.js +21 -17
- package/dist/esm/appAssertions.js +11 -10
- package/dist/esm/applicationRoles.js +16 -9
- package/dist/esm/civic.js +8 -7
- package/dist/esm/client/check.js +61 -53
- package/dist/esm/client/consoleOnboarding.js +21 -0
- package/dist/esm/client/index.js +2 -1
- package/dist/esm/client/safety.js +8 -0
- package/dist/esm/consoleOnboarding.js +51 -0
- package/dist/esm/contentClaims.js +23 -14
- package/dist/esm/deviceDirectory.js +11 -9
- package/dist/esm/deviceSession.js +27 -25
- package/dist/esm/email/messages.js +18 -16
- package/dist/esm/emailAgentContext.js +11 -9
- package/dist/esm/externalIdentity.js +15 -11
- package/dist/esm/federationInstanceFetch.js +10 -5
- package/dist/esm/identity.js +17 -15
- package/dist/esm/identityLink.js +6 -4
- package/dist/esm/identityProof.js +6 -4
- package/dist/esm/inboxPush.js +3 -2
- package/dist/esm/index.js +5 -2
- package/dist/esm/inference/accountBilling.js +33 -31
- package/dist/esm/inference/aliaModelRelease.js +7 -5
- package/dist/esm/inference/attribution.js +14 -12
- package/dist/esm/inference/catalogue.js +33 -27
- package/dist/esm/inference/economics.js +22 -17
- package/dist/esm/inference/embeddings.js +9 -7
- package/dist/esm/inference/entitlement.js +15 -13
- package/dist/esm/inference/errors.js +13 -6
- package/dist/esm/inference/identifiers.js +31 -19
- package/dist/esm/inference/inbox.js +37 -35
- package/dist/esm/inference/modelDocumentation.js +14 -12
- package/dist/esm/inference/money.js +3 -2
- package/dist/esm/inference/priceVersion.js +8 -3
- package/dist/esm/inference/providerConnection.js +19 -12
- package/dist/esm/inference/realtime.js +85 -44
- package/dist/esm/inference/request.js +25 -23
- package/dist/esm/inference/routingPolicy.js +9 -7
- package/dist/esm/inference/streamEvents.js +20 -14
- package/dist/esm/inference/usage.js +30 -13
- package/dist/esm/keyRecovery.js +8 -6
- package/dist/esm/keyRotation.js +5 -4
- package/dist/esm/linkedAccounts.js +20 -16
- package/dist/esm/moderationReputation.js +27 -25
- package/dist/esm/notifications.js +23 -7
- package/dist/esm/numberChecks.js +41 -0
- package/dist/esm/oauth.js +14 -12
- package/dist/esm/organizations.js +23 -21
- package/dist/esm/products/access.js +10 -8
- package/dist/esm/products/billing.js +10 -8
- package/dist/esm/products/checkout.js +22 -10
- package/dist/esm/products/plans.js +15 -10
- package/dist/esm/protocol.js +4 -3
- package/dist/esm/recommendations.js +25 -17
- package/dist/esm/reputation.js +13 -11
- package/dist/esm/safety.js +45 -29
- package/dist/esm/serviceToken.js +80 -1
- package/dist/esm/sessionRevocation.js +6 -4
- package/dist/esm/signIn.js +42 -24
- package/dist/esm/stickers.js +17 -13
- package/dist/esm/stringChecks.js +63 -0
- package/dist/esm/transparency.js +14 -12
- package/dist/esm/updates.js +22 -20
- package/dist/esm/userInvalidation.js +4 -2
- package/dist/esm/userResponse.js +4 -3
- package/dist/esm/username.js +3 -2
- package/dist/types/accountAccess.d.ts +29 -70
- package/dist/types/accountEmail.d.ts +2 -14
- package/dist/types/accountGraph.d.ts +179 -171
- package/dist/types/accountName.d.ts +1 -1
- package/dist/types/accountSubject.d.ts +20 -93
- package/dist/types/agency.d.ts +528 -2924
- package/dist/types/agentKeys.d.ts +48 -421
- package/dist/types/appAssertions.d.ts +56 -210
- package/dist/types/applicationRoles.d.ts +30 -276
- package/dist/types/avatarCharacter.d.ts +1 -1
- package/dist/types/civic.d.ts +1 -13
- package/dist/types/client/agentKeys.d.ts +18 -18
- package/dist/types/client/appAssertions.d.ts +3 -3
- package/dist/types/client/check.d.ts +13 -13
- package/dist/types/client/consoleOnboarding.d.ts +16 -0
- package/dist/types/client/deviceDirectory.d.ts +51 -51
- package/dist/types/client/deviceSession.d.ts +14 -14
- package/dist/types/client/index.d.ts +2 -1
- package/dist/types/client/organizations.d.ts +25 -25
- package/dist/types/client/products.d.ts +33 -33
- package/dist/types/client/recommendations.d.ts +2 -2
- package/dist/types/client/safety.d.ts +53 -45
- package/dist/types/client/sessionStatus.d.ts +4 -4
- package/dist/types/client/signIn.d.ts +1 -1
- package/dist/types/commonsSignIn.d.ts +4 -1
- package/dist/types/consoleOnboarding.d.ts +57 -0
- package/dist/types/contentClaims.d.ts +24 -180
- package/dist/types/deviceDirectory.d.ts +109 -1040
- package/dist/types/deviceSession.d.ts +36 -298
- package/dist/types/email/messages.d.ts +212 -1793
- package/dist/types/emailAgentContext.d.ts +10 -194
- package/dist/types/externalIdentity.d.ts +121 -615
- package/dist/types/federationInstanceFetch.d.ts +3 -32
- package/dist/types/identity.d.ts +15 -92
- package/dist/types/identityLink.d.ts +6 -84
- package/dist/types/identityProof.d.ts +5 -17
- package/dist/types/inboxPush.d.ts +1 -9
- package/dist/types/index.d.ts +6 -3
- package/dist/types/inference/accountBilling.d.ts +151 -488
- package/dist/types/inference/aliaModelRelease.d.ts +42 -439
- package/dist/types/inference/attribution.d.ts +75 -104
- package/dist/types/inference/catalogue.d.ts +417 -1599
- package/dist/types/inference/economics.d.ts +69 -276
- package/dist/types/inference/embeddings.d.ts +110 -406
- package/dist/types/inference/entitlement.d.ts +80 -335
- package/dist/types/inference/errors.d.ts +90 -102
- package/dist/types/inference/identifiers.d.ts +12 -4
- package/dist/types/inference/inbox.d.ts +105 -420
- package/dist/types/inference/modelDocumentation.d.ts +201 -1390
- package/dist/types/inference/money.d.ts +65 -32
- package/dist/types/inference/priceVersion.d.ts +53 -120
- package/dist/types/inference/providerConnection.d.ts +253 -710
- package/dist/types/inference/realtime.d.ts +954 -6825
- package/dist/types/inference/request.d.ts +300 -2572
- package/dist/types/inference/routingPolicy.d.ts +95 -503
- package/dist/types/inference/streamEvents.d.ts +253 -721
- package/dist/types/inference/usage.d.ts +317 -950
- package/dist/types/keyRecovery.d.ts +3 -51
- package/dist/types/keyRotation.d.ts +3 -38
- package/dist/types/linkedAccounts.d.ts +50 -236
- package/dist/types/moderationReputation.d.ts +81 -14
- package/dist/types/notifications.d.ts +19 -51
- package/dist/types/numberChecks.d.ts +9 -0
- package/dist/types/oauth.d.ts +101 -809
- package/dist/types/organizations.d.ts +268 -921
- package/dist/types/oxyRecordTypes.d.ts +11 -1
- package/dist/types/products/access.d.ts +125 -775
- package/dist/types/products/billing.d.ts +67 -503
- package/dist/types/products/checkout.d.ts +16 -69
- package/dist/types/products/plans.d.ts +33 -366
- package/dist/types/recommendations.d.ts +76 -389
- package/dist/types/reputation.d.ts +37 -5
- package/dist/types/safety.d.ts +410 -2050
- package/dist/types/serviceToken.d.ts +247 -7
- package/dist/types/sessionRevocation.d.ts +2 -17
- package/dist/types/sessionStatus.d.ts +27 -115
- package/dist/types/signIn.d.ts +53 -553
- package/dist/types/stickers.d.ts +67 -819
- package/dist/types/stringChecks.d.ts +16 -0
- package/dist/types/transparency.d.ts +14 -302
- package/dist/types/updates.d.ts +60 -316
- package/dist/types/userInvalidation.d.ts +4 -13
- package/dist/types/userResponse.d.ts +302 -2400
- package/dist/types/username.d.ts +3 -3
- 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<
|
|
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.
|
|
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<
|
|
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
|
-
|
|
127
|
-
|
|
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.
|
|
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<
|
|
150
|
-
|
|
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
|
-
|
|
158
|
-
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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<
|
|
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<
|
|
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>;
|