mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-28 00:45:03 +00:00
Compare commits
2 Commits
feat/load3
...
update-ing
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
283d23e21b | ||
|
|
2bac957e09 |
@@ -356,10 +356,7 @@ export type {
|
||||
GetModelFoldersResponse,
|
||||
GetModelFoldersResponses,
|
||||
GetModelPreviewData,
|
||||
GetModelPreviewError,
|
||||
GetModelPreviewErrors,
|
||||
GetModelPreviewResponse,
|
||||
GetModelPreviewResponses,
|
||||
GetModelsInFolderData,
|
||||
GetModelsInFolderError,
|
||||
GetModelsInFolderErrors,
|
||||
@@ -389,8 +386,21 @@ export type {
|
||||
GetNodeReplacementsErrors,
|
||||
GetNodeReplacementsResponse,
|
||||
GetNodeReplacementsResponses,
|
||||
GetOpenapiSpecData,
|
||||
GetOpenapiSpecResponses,
|
||||
GetOAuthAuthorizationServerData,
|
||||
GetOAuthAuthorizationServerError,
|
||||
GetOAuthAuthorizationServerErrors,
|
||||
GetOAuthAuthorizationServerResponse,
|
||||
GetOAuthAuthorizationServerResponses,
|
||||
GetOAuthAuthorizeData,
|
||||
GetOAuthAuthorizeError,
|
||||
GetOAuthAuthorizeErrors,
|
||||
GetOAuthAuthorizeResponse,
|
||||
GetOAuthAuthorizeResponses,
|
||||
GetOAuthProtectedResourceData,
|
||||
GetOAuthProtectedResourceError,
|
||||
GetOAuthProtectedResourceErrors,
|
||||
GetOAuthProtectedResourceResponse,
|
||||
GetOAuthProtectedResourceResponses,
|
||||
GetPaymentPortalData,
|
||||
GetPaymentPortalError,
|
||||
GetPaymentPortalErrors,
|
||||
@@ -427,11 +437,11 @@ export type {
|
||||
GetSecretErrors,
|
||||
GetSecretResponse,
|
||||
GetSecretResponses,
|
||||
GetSettingByKeyData,
|
||||
GetSettingByKeyError,
|
||||
GetSettingByKeyErrors,
|
||||
GetSettingByKeyResponse,
|
||||
GetSettingByKeyResponses,
|
||||
GetSettingByIdData,
|
||||
GetSettingByIdError,
|
||||
GetSettingByIdErrors,
|
||||
GetSettingByIdResponse,
|
||||
GetSettingByIdResponses,
|
||||
GetStaticExtensionsData,
|
||||
GetStaticExtensionsErrors,
|
||||
GetStaticExtensionsResponses,
|
||||
@@ -447,6 +457,7 @@ export type {
|
||||
GetTaskResponses,
|
||||
GetTemplateProxyData,
|
||||
GetTemplateProxyErrors,
|
||||
GetTemplateProxyResponses,
|
||||
GetUserData,
|
||||
GetUserdataData,
|
||||
GetUserdataError,
|
||||
@@ -534,6 +545,11 @@ export type {
|
||||
ImportPublishedAssetsResponse,
|
||||
ImportPublishedAssetsResponse2,
|
||||
ImportPublishedAssetsResponses,
|
||||
InsertDynamicConfigData,
|
||||
InsertDynamicConfigError,
|
||||
InsertDynamicConfigErrors,
|
||||
InsertDynamicConfigResponse,
|
||||
InsertDynamicConfigResponses,
|
||||
InterruptJobData,
|
||||
InterruptJobError,
|
||||
InterruptJobErrors,
|
||||
@@ -642,6 +658,17 @@ export type {
|
||||
MoveUserdataFileResponse,
|
||||
MoveUserdataFileResponses,
|
||||
NodeInfo,
|
||||
OAuthAuthorizationServerMetadata,
|
||||
OAuthAuthorizeRedirectResponse,
|
||||
OAuthConsentChallenge,
|
||||
OAuthConsentChallengeWorkspace,
|
||||
OAuthProtectedResourceMetadata,
|
||||
OAuthRegisterBadRequestResponse,
|
||||
OAuthRegisterError,
|
||||
OAuthRegisterRequest,
|
||||
OAuthRegisterResponse,
|
||||
OAuthTokenError,
|
||||
OAuthTokenResponse,
|
||||
PaginationInfo,
|
||||
PartnerUsageRequest,
|
||||
PartnerUsageResponse,
|
||||
@@ -663,6 +690,21 @@ export type {
|
||||
PostMonitoringTasksSubpathData,
|
||||
PostMonitoringTasksSubpathErrors,
|
||||
PostMonitoringTasksSubpathResponses,
|
||||
PostOAuthAuthorizeData,
|
||||
PostOAuthAuthorizeError,
|
||||
PostOAuthAuthorizeErrors,
|
||||
PostOAuthAuthorizeResponse,
|
||||
PostOAuthAuthorizeResponses,
|
||||
PostOAuthRegisterData,
|
||||
PostOAuthRegisterError,
|
||||
PostOAuthRegisterErrors,
|
||||
PostOAuthRegisterResponse,
|
||||
PostOAuthRegisterResponses,
|
||||
PostOAuthTokenData,
|
||||
PostOAuthTokenError,
|
||||
PostOAuthTokenErrors,
|
||||
PostOAuthTokenResponse,
|
||||
PostOAuthTokenResponses,
|
||||
PostPprofSymbolData,
|
||||
PostPprofSymbolResponses,
|
||||
PostUserdataFileData,
|
||||
@@ -799,11 +841,11 @@ export type {
|
||||
UpdateSecretRequest,
|
||||
UpdateSecretResponse,
|
||||
UpdateSecretResponses,
|
||||
UpdateSettingByKeyData,
|
||||
UpdateSettingByKeyError,
|
||||
UpdateSettingByKeyErrors,
|
||||
UpdateSettingByKeyResponse,
|
||||
UpdateSettingByKeyResponses,
|
||||
UpdateSettingByIdData,
|
||||
UpdateSettingByIdError,
|
||||
UpdateSettingByIdErrors,
|
||||
UpdateSettingByIdResponse,
|
||||
UpdateSettingByIdResponses,
|
||||
UpdateSubscriptionCacheData,
|
||||
UpdateSubscriptionCacheError,
|
||||
UpdateSubscriptionCacheErrors,
|
||||
|
||||
752
packages/ingest-types/src/types.gen.ts
generated
752
packages/ingest-types/src/types.gen.ts
generated
@@ -1382,6 +1382,250 @@ export type JwkKey = {
|
||||
y: string
|
||||
}
|
||||
|
||||
/**
|
||||
* RFC 6749 §5.2 error response.
|
||||
*/
|
||||
export type OAuthTokenError = {
|
||||
/**
|
||||
* RFC 6749 §5.2 error code: invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, invalid_scope.
|
||||
*/
|
||||
error: string
|
||||
/**
|
||||
* Human-readable, no leak of internal storage state.
|
||||
*/
|
||||
error_description?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* RFC 6749 §5.1 successful token response.
|
||||
*/
|
||||
export type OAuthTokenResponse = {
|
||||
/**
|
||||
* Resource-bound Cloud JWT (audience matches the protected resource).
|
||||
*/
|
||||
access_token: string
|
||||
token_type: 'Bearer'
|
||||
/**
|
||||
* Access token lifetime in seconds.
|
||||
*/
|
||||
expires_in: number
|
||||
/**
|
||||
* Opaque refresh token. Rotates on every successful refresh; presenting an already-rotated token revokes the entire family.
|
||||
*/
|
||||
refresh_token: string
|
||||
/**
|
||||
* Space-delimited scopes granted with this token.
|
||||
*/
|
||||
scope: string
|
||||
}
|
||||
|
||||
/**
|
||||
* One workspace option presented in the OAuth consent challenge. Promoted to a named schema so the generated Go type is referenceable in handlers and tests rather than re-declared as an anonymous struct at every callsite.
|
||||
*
|
||||
*/
|
||||
export type OAuthConsentChallengeWorkspace = {
|
||||
id: string
|
||||
name: string
|
||||
type: 'personal' | 'team'
|
||||
role: 'owner' | 'member'
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect target produced after a JSON consent submission. The frontend must navigate the browser to this URL so custom-scheme client callbacks work without relying on fetch-visible 302 headers.
|
||||
*/
|
||||
export type OAuthAuthorizeRedirectResponse = {
|
||||
/**
|
||||
* OAuth client redirect URI with either code+state for allow, or error+state for deny.
|
||||
*/
|
||||
redirect_url: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Server-side state describing the OAuth consent decision the user is being asked to make. Returned by GET /oauth/authorize when a valid Cloud session exists; the frontend renders the consent UI from this payload and POSTs the decision back. Browser never sees the original OAuth params on resume.
|
||||
*
|
||||
*/
|
||||
export type OAuthConsentChallenge = {
|
||||
/**
|
||||
* Opaque server-side identifier for the authorization-request row. Carried back unchanged in the consent submission.
|
||||
*/
|
||||
oauth_request_id: string
|
||||
/**
|
||||
* Per-row CSRF token bound to this authorization request (not to the session). Must be echoed back on POST.
|
||||
*/
|
||||
csrf_token: string
|
||||
/**
|
||||
* Human-readable name of the OAuth client requesting authorization, from oauth_clients.display_name.
|
||||
*/
|
||||
client_display_name: string
|
||||
/**
|
||||
* Human-readable name of the protected resource, from oauth_resources.display_name.
|
||||
*/
|
||||
resource_display_name: string
|
||||
/**
|
||||
* Scopes the client is requesting for this resource. The frontend should present these for the user to approve.
|
||||
*/
|
||||
scopes: Array<string>
|
||||
/**
|
||||
* Workspaces the user can select from. Membership is re-checked on POST.
|
||||
*/
|
||||
workspaces: Array<OAuthConsentChallengeWorkspace>
|
||||
}
|
||||
|
||||
/**
|
||||
* OAuth 2.1 protected-resource metadata (RFC 9728).
|
||||
*/
|
||||
export type OAuthProtectedResourceMetadata = {
|
||||
resource: string
|
||||
authorization_servers: Array<string>
|
||||
scopes_supported: Array<string>
|
||||
bearer_methods_supported?: Array<string>
|
||||
}
|
||||
|
||||
/**
|
||||
* RFC 7591 §3.2.2 error response.
|
||||
*/
|
||||
export type OAuthRegisterError = {
|
||||
error: 'invalid_redirect_uri' | 'invalid_client_metadata'
|
||||
error_description?: string | null
|
||||
}
|
||||
|
||||
/**
|
||||
* Union of the two 400 shapes /oauth/register can emit. `OAuthRegisterError` is the handler-shaped RFC 7591 §3.2.2 error; `BindingErrorResponse` is the strict-server binding-layer error fired when the request body fails OpenAPI-schema validation before the handler runs.
|
||||
*
|
||||
*/
|
||||
export type OAuthRegisterBadRequestResponse =
|
||||
| OAuthRegisterError
|
||||
| BindingErrorResponse
|
||||
|
||||
/**
|
||||
* Error shape returned when request binding or validation fails before the handler runs.
|
||||
*/
|
||||
export type BindingErrorResponse = {
|
||||
message: string
|
||||
}
|
||||
|
||||
/**
|
||||
* RFC 7591 §3.2.1 successful registration response.
|
||||
*/
|
||||
export type OAuthRegisterResponse = {
|
||||
/**
|
||||
* Server-generated client_id. Always carries the `comfy-dyn-` prefix.
|
||||
*/
|
||||
client_id: string
|
||||
/**
|
||||
* Unix timestamp (seconds) when the client was registered.
|
||||
*/
|
||||
client_id_issued_at: number
|
||||
client_name?: string
|
||||
redirect_uris: Array<string>
|
||||
grant_types: Array<string>
|
||||
response_types: Array<string>
|
||||
token_endpoint_auth_method: 'none'
|
||||
application_type: 'native' | 'web'
|
||||
}
|
||||
|
||||
/**
|
||||
* RFC 7591 §2 client metadata document. Only the fields the server honors are listed; presence of `scope` or `resource_grants` in the request is rejected (`invalid_client_metadata`) because those are server-owned for dynamic clients. `additionalProperties: false` mirrors the runtime middleware that rejects any unknown metadata key.
|
||||
*
|
||||
*/
|
||||
export type OAuthRegisterRequest = {
|
||||
/**
|
||||
* 1–5 redirect URIs. Validated against `application_type` policy.
|
||||
*/
|
||||
redirect_uris: Array<string>
|
||||
/**
|
||||
* Human-readable name shown in the consent UI. Reserved-name list rejects impersonation of major MCP clients.
|
||||
*/
|
||||
client_name?: string
|
||||
/**
|
||||
* RFC 7591 §2 application_type. **REQUIRED** — clients MUST declare intent; the server does not default this field. `native` for desktop / CLI / MCP-spec-strict clients (loopback redirects); `web` for hosted clients (HTTPS only, host must be allowlisted). A missing or explicitly empty `application_type` rejects with `invalid_client_metadata`. The realistic MCP-client population is overwhelmingly native/loopback — requiring explicit declaration avoids silently bouncing those clients off the web HTTPS policy.
|
||||
*
|
||||
*/
|
||||
application_type: 'native' | 'web'
|
||||
/**
|
||||
* Public clients only this phase — must be `none` if present. The server forces `none` regardless.
|
||||
*/
|
||||
token_endpoint_auth_method?: 'none'
|
||||
/**
|
||||
* Optional. Defaults to `["authorization_code","refresh_token"]`.
|
||||
*/
|
||||
grant_types?: Array<'authorization_code' | 'refresh_token'>
|
||||
/**
|
||||
* Optional. Defaults to `["code"]`.
|
||||
*/
|
||||
response_types?: Array<'code'>
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Dynamic clients do not pick scopes — the server assigns scopes from the active MCP resource's published list. Sending `scope` in the registration body is treated as a privilege-escalation attempt and returns `invalid_client_metadata`. The field is documented here so clients see a well-defined error rather than silent drop.
|
||||
*
|
||||
*/
|
||||
scope?: string | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Same reason as `scope`. The set of resources and scopes a dynamic client may request is server-policy, not request-driven.
|
||||
*
|
||||
*/
|
||||
resource_grants?: {
|
||||
[key: string]: Array<string>
|
||||
} | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
client_uri?: string | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
logo_uri?: string | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
tos_uri?: string | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
policy_uri?: string | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
software_id?: string | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
software_version?: string | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
contacts?: Array<string> | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
jwks?: {
|
||||
[key: string]: unknown
|
||||
} | null
|
||||
/**
|
||||
* **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase.
|
||||
*/
|
||||
jwks_uri?: string | null
|
||||
}
|
||||
|
||||
/**
|
||||
* OAuth 2.1 authorization-server metadata (RFC 8414).
|
||||
*/
|
||||
export type OAuthAuthorizationServerMetadata = {
|
||||
issuer: string
|
||||
authorization_endpoint: string
|
||||
token_endpoint: string
|
||||
jwks_uri: string
|
||||
/**
|
||||
* RFC 7591 §3.1 Dynamic Client Registration endpoint. Advertised so MCP-spec-compliant clients can auto-discover and self-register without operator involvement. Present only when DCR is enabled.
|
||||
*
|
||||
*/
|
||||
registration_endpoint?: string
|
||||
response_types_supported: Array<string>
|
||||
grant_types_supported: Array<string>
|
||||
code_challenge_methods_supported: Array<string>
|
||||
token_endpoint_auth_methods_supported: Array<string>
|
||||
scopes_supported?: Array<string>
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON Web Key Set containing the public keys used to verify Cloud JWTs.
|
||||
*/
|
||||
@@ -1531,6 +1775,10 @@ export type WorkspaceApiKeyInfo = {
|
||||
* User-provided label
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* User-provided description of the key's purpose. Limit is byte-based (UTF-8 encoding); 5000 bytes equals 5000 ASCII characters or fewer multi-byte characters.
|
||||
*/
|
||||
description: string
|
||||
/**
|
||||
* First 8 chars after prefix for display
|
||||
*/
|
||||
@@ -1565,6 +1813,10 @@ export type CreateWorkspaceApiKeyResponse = {
|
||||
* User-provided label
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* User-provided description of the key's purpose. Limit is byte-based (UTF-8 encoding); 5000 bytes equals 5000 ASCII characters or fewer multi-byte characters.
|
||||
*/
|
||||
description: string
|
||||
/**
|
||||
* The full plaintext API key (only shown once)
|
||||
*/
|
||||
@@ -1591,6 +1843,10 @@ export type CreateWorkspaceApiKeyRequest = {
|
||||
* User-provided label for the key
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* User-provided description of the key's purpose. Limit is byte-based (UTF-8 encoding); 5000 bytes equals 5000 ASCII characters or fewer multi-byte characters.
|
||||
*/
|
||||
description?: string
|
||||
/**
|
||||
* Optional expiration timestamp
|
||||
*/
|
||||
@@ -2270,6 +2526,12 @@ export type ListAssetsResponse = {
|
||||
* Whether more assets are available beyond this page
|
||||
*/
|
||||
has_more: boolean
|
||||
/**
|
||||
* Opaque cursor to pass as the `after` query parameter to fetch the
|
||||
* next page. Omitted from the response when there are no more results.
|
||||
*
|
||||
*/
|
||||
next_cursor?: string
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2284,6 +2546,10 @@ export type Asset = {
|
||||
* Name of the asset file
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* Display name of the asset. Mirrors name for backwards compatibility.
|
||||
*/
|
||||
display_name?: string | null
|
||||
/**
|
||||
* Blake3 hash of the asset content
|
||||
*/
|
||||
@@ -2360,6 +2626,10 @@ export type AssetUpdated = {
|
||||
* Updated name of the asset
|
||||
*/
|
||||
name?: string
|
||||
/**
|
||||
* Display name of the asset. Mirrors name for backwards compatibility.
|
||||
*/
|
||||
display_name?: string | null
|
||||
/**
|
||||
* Blake3 hash of the asset content
|
||||
*/
|
||||
@@ -3035,13 +3305,6 @@ export type ExportDownloadUrlResponse = {
|
||||
expires_at?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Error shape returned when request binding or validation fails before the handler runs.
|
||||
*/
|
||||
export type BindingErrorResponse = {
|
||||
message: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Standard error response with a machine-readable code and human-readable message.
|
||||
*/
|
||||
@@ -3124,6 +3387,12 @@ export type ListAssetsResponseWritable = {
|
||||
* Whether more assets are available beyond this page
|
||||
*/
|
||||
has_more: boolean
|
||||
/**
|
||||
* Opaque cursor to pass as the `after` query parameter to fetch the
|
||||
* next page. Omitted from the response when there are no more results.
|
||||
*
|
||||
*/
|
||||
next_cursor?: string
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3138,6 +3407,10 @@ export type AssetWritable = {
|
||||
* Name of the asset file
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* Display name of the asset. Mirrors name for backwards compatibility.
|
||||
*/
|
||||
display_name?: string | null
|
||||
/**
|
||||
* Blake3 hash of the asset content
|
||||
*/
|
||||
@@ -3507,50 +3780,6 @@ export type GetModelsInFolderResponses = {
|
||||
export type GetModelsInFolderResponse =
|
||||
GetModelsInFolderResponses[keyof GetModelsInFolderResponses]
|
||||
|
||||
export type GetModelPreviewData = {
|
||||
body?: never
|
||||
path: {
|
||||
/**
|
||||
* The folder name containing the model
|
||||
*/
|
||||
folder: string
|
||||
/**
|
||||
* The path index (usually 0 for cloud service)
|
||||
*/
|
||||
path_index: number
|
||||
/**
|
||||
* The model filename (with or without .webp extension)
|
||||
*/
|
||||
filename: string
|
||||
}
|
||||
query?: never
|
||||
url: '/api/experiment/models/preview/{folder}/{path_index}/{filename}'
|
||||
}
|
||||
|
||||
export type GetModelPreviewErrors = {
|
||||
/**
|
||||
* Model not found or preview not available
|
||||
*/
|
||||
404: ErrorResponse
|
||||
/**
|
||||
* Internal server error
|
||||
*/
|
||||
500: ErrorResponse
|
||||
}
|
||||
|
||||
export type GetModelPreviewError =
|
||||
GetModelPreviewErrors[keyof GetModelPreviewErrors]
|
||||
|
||||
export type GetModelPreviewResponses = {
|
||||
/**
|
||||
* Success - Model preview image
|
||||
*/
|
||||
200: Blob | File
|
||||
}
|
||||
|
||||
export type GetModelPreviewResponse =
|
||||
GetModelPreviewResponses[keyof GetModelPreviewResponses]
|
||||
|
||||
export type GetLegacyHistoryData = {
|
||||
body?: never
|
||||
path?: never
|
||||
@@ -4012,10 +4241,6 @@ export type ListAssetsData = {
|
||||
* Sort order
|
||||
*/
|
||||
order?: 'asc' | 'desc'
|
||||
/**
|
||||
* Filter assets by job IDs (prompt IDs)
|
||||
*/
|
||||
job_ids?: Array<string>
|
||||
/**
|
||||
* Whether to include public/shared assets in results
|
||||
*/
|
||||
@@ -4024,6 +4249,17 @@ export type ListAssetsData = {
|
||||
* Filter assets by exact content hash
|
||||
*/
|
||||
asset_hash?: string
|
||||
/**
|
||||
* Opaque cursor for keyset pagination. Pass the `next_cursor` value
|
||||
* from the previous response to fetch the next page. When provided,
|
||||
* `offset` is ignored. Cursor pagination is only supported with
|
||||
* `sort` values `created_at`, `updated_at`, `name`, or `size`;
|
||||
* requests combining `after` with other sort fields return 400.
|
||||
* The cursor must have been minted under the same `sort` value used
|
||||
* in the follow-up request.
|
||||
*
|
||||
*/
|
||||
after?: string
|
||||
}
|
||||
url: '/api/assets'
|
||||
}
|
||||
@@ -4122,10 +4358,6 @@ export type UploadAssetErrors = {
|
||||
export type UploadAssetError = UploadAssetErrors[keyof UploadAssetErrors]
|
||||
|
||||
export type UploadAssetResponses = {
|
||||
/**
|
||||
* Asset already exists (returned existing asset)
|
||||
*/
|
||||
200: AssetCreated
|
||||
/**
|
||||
* Asset created successfully
|
||||
*/
|
||||
@@ -4188,10 +4420,6 @@ export type CreateAssetFromHashError =
|
||||
CreateAssetFromHashErrors[keyof CreateAssetFromHashErrors]
|
||||
|
||||
export type CreateAssetFromHashResponses = {
|
||||
/**
|
||||
* Asset reference already exists (returned existing)
|
||||
*/
|
||||
200: AssetCreated
|
||||
/**
|
||||
* Asset reference created successfully
|
||||
*/
|
||||
@@ -5345,19 +5573,19 @@ export type UpdateMultipleSettingsResponses = {
|
||||
export type UpdateMultipleSettingsResponse =
|
||||
UpdateMultipleSettingsResponses[keyof UpdateMultipleSettingsResponses]
|
||||
|
||||
export type GetSettingByKeyData = {
|
||||
export type GetSettingByIdData = {
|
||||
body?: never
|
||||
path: {
|
||||
/**
|
||||
* Setting key to retrieve
|
||||
* Setting id to retrieve
|
||||
*/
|
||||
key: string
|
||||
id: string
|
||||
}
|
||||
query?: never
|
||||
url: '/api/settings/{key}'
|
||||
url: '/api/settings/{id}'
|
||||
}
|
||||
|
||||
export type GetSettingByKeyErrors = {
|
||||
export type GetSettingByIdErrors = {
|
||||
/**
|
||||
* Unauthorized
|
||||
*/
|
||||
@@ -5368,10 +5596,10 @@ export type GetSettingByKeyErrors = {
|
||||
404: ErrorResponse
|
||||
}
|
||||
|
||||
export type GetSettingByKeyError =
|
||||
GetSettingByKeyErrors[keyof GetSettingByKeyErrors]
|
||||
export type GetSettingByIdError =
|
||||
GetSettingByIdErrors[keyof GetSettingByIdErrors]
|
||||
|
||||
export type GetSettingByKeyResponses = {
|
||||
export type GetSettingByIdResponses = {
|
||||
/**
|
||||
* Setting value response
|
||||
*/
|
||||
@@ -5383,25 +5611,25 @@ export type GetSettingByKeyResponses = {
|
||||
}
|
||||
}
|
||||
|
||||
export type GetSettingByKeyResponse =
|
||||
GetSettingByKeyResponses[keyof GetSettingByKeyResponses]
|
||||
export type GetSettingByIdResponse =
|
||||
GetSettingByIdResponses[keyof GetSettingByIdResponses]
|
||||
|
||||
export type UpdateSettingByKeyData = {
|
||||
export type UpdateSettingByIdData = {
|
||||
/**
|
||||
* New value for the setting
|
||||
*/
|
||||
body: unknown
|
||||
path: {
|
||||
/**
|
||||
* Setting key to update
|
||||
* Setting id to update
|
||||
*/
|
||||
key: string
|
||||
id: string
|
||||
}
|
||||
query?: never
|
||||
url: '/api/settings/{key}'
|
||||
url: '/api/settings/{id}'
|
||||
}
|
||||
|
||||
export type UpdateSettingByKeyErrors = {
|
||||
export type UpdateSettingByIdErrors = {
|
||||
/**
|
||||
* Invalid request
|
||||
*/
|
||||
@@ -5412,10 +5640,10 @@ export type UpdateSettingByKeyErrors = {
|
||||
401: ErrorResponse
|
||||
}
|
||||
|
||||
export type UpdateSettingByKeyError =
|
||||
UpdateSettingByKeyErrors[keyof UpdateSettingByKeyErrors]
|
||||
export type UpdateSettingByIdError =
|
||||
UpdateSettingByIdErrors[keyof UpdateSettingByIdErrors]
|
||||
|
||||
export type UpdateSettingByKeyResponses = {
|
||||
export type UpdateSettingByIdResponses = {
|
||||
/**
|
||||
* Updated setting value response
|
||||
*/
|
||||
@@ -5427,8 +5655,8 @@ export type UpdateSettingByKeyResponses = {
|
||||
}
|
||||
}
|
||||
|
||||
export type UpdateSettingByKeyResponse =
|
||||
UpdateSettingByKeyResponses[keyof UpdateSettingByKeyResponses]
|
||||
export type UpdateSettingByIdResponse =
|
||||
UpdateSettingByIdResponses[keyof UpdateSettingByIdResponses]
|
||||
|
||||
export type SubmitFeedbackData = {
|
||||
body: FeedbackRequest
|
||||
@@ -5916,40 +6144,6 @@ export type UploadMaskResponses = {
|
||||
* Type of upload (e.g., "output")
|
||||
*/
|
||||
type?: string
|
||||
/**
|
||||
* Additional metadata for mask detection and re-editing
|
||||
*/
|
||||
metadata?: {
|
||||
/**
|
||||
* Whether this file is a mask
|
||||
*/
|
||||
is_mask?: boolean
|
||||
/**
|
||||
* Hash of the original unmasked image
|
||||
*/
|
||||
original_hash?: string
|
||||
/**
|
||||
* Type of mask (e.g., "painted_masked")
|
||||
*/
|
||||
mask_type?: string
|
||||
/**
|
||||
* Related mask layer files (if available)
|
||||
*/
|
||||
related_files?: {
|
||||
/**
|
||||
* Hash of the mask layer
|
||||
*/
|
||||
mask?: string
|
||||
/**
|
||||
* Hash of the paint layer
|
||||
*/
|
||||
paint?: string
|
||||
/**
|
||||
* Hash of the painted image
|
||||
*/
|
||||
painted?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6117,6 +6311,229 @@ export type GetJwksResponses = {
|
||||
|
||||
export type GetJwksResponse = GetJwksResponses[keyof GetJwksResponses]
|
||||
|
||||
export type GetOAuthAuthorizationServerData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/.well-known/oauth-authorization-server'
|
||||
}
|
||||
|
||||
export type GetOAuthAuthorizationServerErrors = {
|
||||
/**
|
||||
* OAuth disabled
|
||||
*/
|
||||
404: ErrorResponse
|
||||
}
|
||||
|
||||
export type GetOAuthAuthorizationServerError =
|
||||
GetOAuthAuthorizationServerErrors[keyof GetOAuthAuthorizationServerErrors]
|
||||
|
||||
export type GetOAuthAuthorizationServerResponses = {
|
||||
/**
|
||||
* Authorization-server metadata
|
||||
*/
|
||||
200: OAuthAuthorizationServerMetadata
|
||||
}
|
||||
|
||||
export type GetOAuthAuthorizationServerResponse =
|
||||
GetOAuthAuthorizationServerResponses[keyof GetOAuthAuthorizationServerResponses]
|
||||
|
||||
export type GetOAuthProtectedResourceData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/.well-known/oauth-protected-resource'
|
||||
}
|
||||
|
||||
export type GetOAuthProtectedResourceErrors = {
|
||||
/**
|
||||
* OAuth disabled or no active resource configured
|
||||
*/
|
||||
404: ErrorResponse
|
||||
}
|
||||
|
||||
export type GetOAuthProtectedResourceError =
|
||||
GetOAuthProtectedResourceErrors[keyof GetOAuthProtectedResourceErrors]
|
||||
|
||||
export type GetOAuthProtectedResourceResponses = {
|
||||
/**
|
||||
* Protected-resource metadata
|
||||
*/
|
||||
200: OAuthProtectedResourceMetadata
|
||||
}
|
||||
|
||||
export type GetOAuthProtectedResourceResponse =
|
||||
GetOAuthProtectedResourceResponses[keyof GetOAuthProtectedResourceResponses]
|
||||
|
||||
export type GetOAuthAuthorizeData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: {
|
||||
response_type?: string
|
||||
client_id?: string
|
||||
redirect_uri?: string
|
||||
scope?: string
|
||||
/**
|
||||
* RFC 6749 §10.12 marks `state` as RECOMMENDED. Our hardening makes
|
||||
* it REQUIRED on the initial-entry path (omitted only on the resume
|
||||
* path where `oauth_request_id` is supplied instead). This parameter
|
||||
* is `required: false` at the spec level only because the operation
|
||||
* is dual-mode (initial entry vs. resume); the runtime parser
|
||||
* (services/ingest/server/implementation/oauth/protocol/request.go)
|
||||
* rejects empty `state` on the initial-entry path with a stable
|
||||
* `invalid_request` 400.
|
||||
*
|
||||
*/
|
||||
state?: string
|
||||
code_challenge?: string
|
||||
code_challenge_method?: string
|
||||
resource?: string
|
||||
oauth_request_id?: string
|
||||
}
|
||||
url: '/oauth/authorize'
|
||||
}
|
||||
|
||||
export type GetOAuthAuthorizeErrors = {
|
||||
/**
|
||||
* Invalid authorize request (pre-redirect failure — unknown client, redirect mismatch, malformed params)
|
||||
*/
|
||||
400: ErrorResponse
|
||||
/**
|
||||
* OAuth disabled
|
||||
*/
|
||||
404: ErrorResponse
|
||||
}
|
||||
|
||||
export type GetOAuthAuthorizeError =
|
||||
GetOAuthAuthorizeErrors[keyof GetOAuthAuthorizeErrors]
|
||||
|
||||
export type GetOAuthAuthorizeResponses = {
|
||||
/**
|
||||
* Consent challenge payload (cookie present, email verified). Frontend renders the consent UI from this payload and POSTs back to /oauth/authorize.
|
||||
*
|
||||
*/
|
||||
200: OAuthConsentChallenge
|
||||
}
|
||||
|
||||
export type GetOAuthAuthorizeResponse =
|
||||
GetOAuthAuthorizeResponses[keyof GetOAuthAuthorizeResponses]
|
||||
|
||||
export type PostOAuthAuthorizeData = {
|
||||
body: {
|
||||
oauth_request_id: string
|
||||
csrf_token: string
|
||||
decision: 'allow' | 'deny'
|
||||
workspace_id: string
|
||||
}
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/oauth/authorize'
|
||||
}
|
||||
|
||||
export type PostOAuthAuthorizeErrors = {
|
||||
/**
|
||||
* Bad request (CSRF mismatch, expired/consumed request, inaccessible workspace)
|
||||
*/
|
||||
400: ErrorResponse
|
||||
/**
|
||||
* Scope broadening on consent re-grant — fresh consent flow required
|
||||
*/
|
||||
403: ErrorResponse
|
||||
/**
|
||||
* OAuth disabled
|
||||
*/
|
||||
404: ErrorResponse
|
||||
}
|
||||
|
||||
export type PostOAuthAuthorizeError =
|
||||
PostOAuthAuthorizeErrors[keyof PostOAuthAuthorizeErrors]
|
||||
|
||||
export type PostOAuthAuthorizeResponses = {
|
||||
/**
|
||||
* Redirect URL for the frontend to navigate to (allow → with code+state; deny → with error+state)
|
||||
*/
|
||||
200: OAuthAuthorizeRedirectResponse
|
||||
}
|
||||
|
||||
export type PostOAuthAuthorizeResponse =
|
||||
PostOAuthAuthorizeResponses[keyof PostOAuthAuthorizeResponses]
|
||||
|
||||
export type PostOAuthTokenData = {
|
||||
body: {
|
||||
grant_type: 'authorization_code' | 'refresh_token'
|
||||
client_id: string
|
||||
code?: string
|
||||
redirect_uri?: string
|
||||
code_verifier?: string
|
||||
refresh_token?: string
|
||||
scope?: string
|
||||
client_secret?: string
|
||||
}
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/oauth/token'
|
||||
}
|
||||
|
||||
export type PostOAuthTokenErrors = {
|
||||
/**
|
||||
* RFC 6749 §5.2 error
|
||||
*/
|
||||
400: OAuthTokenError
|
||||
/**
|
||||
* OAuth disabled
|
||||
*/
|
||||
404: ErrorResponse
|
||||
}
|
||||
|
||||
export type PostOAuthTokenError =
|
||||
PostOAuthTokenErrors[keyof PostOAuthTokenErrors]
|
||||
|
||||
export type PostOAuthTokenResponses = {
|
||||
/**
|
||||
* New token pair
|
||||
*/
|
||||
200: OAuthTokenResponse
|
||||
}
|
||||
|
||||
export type PostOAuthTokenResponse =
|
||||
PostOAuthTokenResponses[keyof PostOAuthTokenResponses]
|
||||
|
||||
export type PostOAuthRegisterData = {
|
||||
body: OAuthRegisterRequest
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/oauth/register'
|
||||
}
|
||||
|
||||
export type PostOAuthRegisterErrors = {
|
||||
/**
|
||||
* Bad request. Two shapes possible: `OAuthRegisterError` (RFC 7591 §3.2.2, emitted by the handler for invalid client metadata, missing application_type, reserved client_name, etc.) OR `BindingErrorResponse` (emitted by the strict-server binding layer when the request body fails OpenAPI-schema validation — malformed JSON, missing required fields, `additionalProperties: false` violations).
|
||||
*
|
||||
*/
|
||||
400: OAuthRegisterBadRequestResponse
|
||||
/**
|
||||
* OAuth disabled
|
||||
*/
|
||||
404: ErrorResponse
|
||||
/**
|
||||
* No active MCP resource is configured — DCR cannot mint a usable client until ops seeds an active oauth_resources row.
|
||||
*/
|
||||
503: ErrorResponse
|
||||
}
|
||||
|
||||
export type PostOAuthRegisterError =
|
||||
PostOAuthRegisterErrors[keyof PostOAuthRegisterErrors]
|
||||
|
||||
export type PostOAuthRegisterResponses = {
|
||||
/**
|
||||
* Registered. Body echoes the metadata RFC 7591 §3.2.1 requires.
|
||||
*/
|
||||
201: OAuthRegisterResponse
|
||||
}
|
||||
|
||||
export type PostOAuthRegisterResponse =
|
||||
PostOAuthRegisterResponses[keyof PostOAuthRegisterResponses]
|
||||
|
||||
export type ListWorkspacesData = {
|
||||
body?: never
|
||||
path?: never
|
||||
@@ -6679,7 +7096,7 @@ export type CreateWorkspaceApiKeyErrors = {
|
||||
*/
|
||||
401: ErrorResponse
|
||||
/**
|
||||
* Not a workspace member or personal workspace
|
||||
* Not a workspace member
|
||||
*/
|
||||
403: ErrorResponse
|
||||
/**
|
||||
@@ -7140,6 +7557,51 @@ export type UpdateSubscriptionCacheResponses = {
|
||||
export type UpdateSubscriptionCacheResponse =
|
||||
UpdateSubscriptionCacheResponses[keyof UpdateSubscriptionCacheResponses]
|
||||
|
||||
export type InsertDynamicConfigData = {
|
||||
/**
|
||||
* A valid dynamicconfig.Config JSON object.
|
||||
*/
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/admin/api/dynamic-config'
|
||||
}
|
||||
|
||||
export type InsertDynamicConfigErrors = {
|
||||
/**
|
||||
* Invalid or missing request body
|
||||
*/
|
||||
400: ErrorResponse
|
||||
/**
|
||||
* Database insert failed
|
||||
*/
|
||||
500: ErrorResponse
|
||||
}
|
||||
|
||||
export type InsertDynamicConfigError =
|
||||
InsertDynamicConfigErrors[keyof InsertDynamicConfigErrors]
|
||||
|
||||
export type InsertDynamicConfigResponses = {
|
||||
/**
|
||||
* Config inserted successfully
|
||||
*/
|
||||
201: {
|
||||
/**
|
||||
* The database ID of the newly inserted config row.
|
||||
*/
|
||||
id?: number
|
||||
/**
|
||||
* Human-readable success message.
|
||||
*/
|
||||
message?: string
|
||||
}
|
||||
}
|
||||
|
||||
export type InsertDynamicConfigResponse =
|
||||
InsertDynamicConfigResponses[keyof InsertDynamicConfigResponses]
|
||||
|
||||
export type SyncApiKeyData = {
|
||||
body: SyncApiKeyRequest
|
||||
path?: never
|
||||
@@ -8888,9 +9350,20 @@ export type GetTemplateProxyData = {
|
||||
|
||||
export type GetTemplateProxyErrors = {
|
||||
/**
|
||||
* Template not found
|
||||
* Template not found.
|
||||
*/
|
||||
404: unknown
|
||||
/**
|
||||
* Workflow templates version not available.
|
||||
*/
|
||||
503: unknown
|
||||
}
|
||||
|
||||
export type GetTemplateProxyResponses = {
|
||||
/**
|
||||
* Template file content streamed from GCS.
|
||||
*/
|
||||
200: unknown
|
||||
}
|
||||
|
||||
export type GetHealthData = {
|
||||
@@ -8918,20 +9391,6 @@ export type GetHealthResponses = {
|
||||
|
||||
export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses]
|
||||
|
||||
export type GetOpenapiSpecData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/openapi'
|
||||
}
|
||||
|
||||
export type GetOpenapiSpecResponses = {
|
||||
/**
|
||||
* OpenAPI specification document
|
||||
*/
|
||||
200: unknown
|
||||
}
|
||||
|
||||
export type GetMonitoringTasksData = {
|
||||
body?: never
|
||||
path?: never
|
||||
@@ -9194,6 +9653,33 @@ export type PostCustomNodeProxyResponses = {
|
||||
200: unknown
|
||||
}
|
||||
|
||||
export type GetModelPreviewData = {
|
||||
body?: never
|
||||
path: {
|
||||
/**
|
||||
* The folder name containing the model.
|
||||
*/
|
||||
folder: string
|
||||
/**
|
||||
* The path index (usually 0 for cloud service).
|
||||
*/
|
||||
path_index: number
|
||||
/**
|
||||
* The model filename (with or without .webp extension).
|
||||
*/
|
||||
filename: string
|
||||
}
|
||||
query?: never
|
||||
url: '/api/experiment/models/preview/{folder}/{path_index}/{filename}'
|
||||
}
|
||||
|
||||
export type GetModelPreviewErrors = {
|
||||
/**
|
||||
* Preview not available on Cloud
|
||||
*/
|
||||
404: unknown
|
||||
}
|
||||
|
||||
export type GetLegacyPromptByIdData = {
|
||||
body?: never
|
||||
path: {
|
||||
|
||||
350
packages/ingest-types/src/zod.gen.ts
generated
350
packages/ingest-types/src/zod.gen.ts
generated
@@ -879,6 +879,153 @@ export const zJwkKey = z.object({
|
||||
y: z.string()
|
||||
})
|
||||
|
||||
/**
|
||||
* RFC 6749 §5.2 error response.
|
||||
*/
|
||||
export const zOAuthTokenError = z.object({
|
||||
error: z.string(),
|
||||
error_description: z.string().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* RFC 6749 §5.1 successful token response.
|
||||
*/
|
||||
export const zOAuthTokenResponse = z.object({
|
||||
access_token: z.string(),
|
||||
token_type: z.enum(['Bearer']),
|
||||
expires_in: z.number().int(),
|
||||
refresh_token: z.string(),
|
||||
scope: z.string()
|
||||
})
|
||||
|
||||
/**
|
||||
* One workspace option presented in the OAuth consent challenge. Promoted to a named schema so the generated Go type is referenceable in handlers and tests rather than re-declared as an anonymous struct at every callsite.
|
||||
*
|
||||
*/
|
||||
export const zOAuthConsentChallengeWorkspace = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
type: z.enum(['personal', 'team']),
|
||||
role: z.enum(['owner', 'member'])
|
||||
})
|
||||
|
||||
/**
|
||||
* Redirect target produced after a JSON consent submission. The frontend must navigate the browser to this URL so custom-scheme client callbacks work without relying on fetch-visible 302 headers.
|
||||
*/
|
||||
export const zOAuthAuthorizeRedirectResponse = z.object({
|
||||
redirect_url: z.string().url()
|
||||
})
|
||||
|
||||
/**
|
||||
* Server-side state describing the OAuth consent decision the user is being asked to make. Returned by GET /oauth/authorize when a valid Cloud session exists; the frontend renders the consent UI from this payload and POSTs the decision back. Browser never sees the original OAuth params on resume.
|
||||
*
|
||||
*/
|
||||
export const zOAuthConsentChallenge = z.object({
|
||||
oauth_request_id: z.string().uuid(),
|
||||
csrf_token: z.string(),
|
||||
client_display_name: z.string(),
|
||||
resource_display_name: z.string(),
|
||||
scopes: z.array(z.string()),
|
||||
workspaces: z.array(zOAuthConsentChallengeWorkspace)
|
||||
})
|
||||
|
||||
/**
|
||||
* OAuth 2.1 protected-resource metadata (RFC 9728).
|
||||
*/
|
||||
export const zOAuthProtectedResourceMetadata = z.object({
|
||||
resource: z.string().url(),
|
||||
authorization_servers: z.array(z.string().url()),
|
||||
scopes_supported: z.array(z.string()),
|
||||
bearer_methods_supported: z.array(z.string()).optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* RFC 7591 §3.2.2 error response.
|
||||
*/
|
||||
export const zOAuthRegisterError = z.object({
|
||||
error: z.enum(['invalid_redirect_uri', 'invalid_client_metadata']),
|
||||
error_description: z.string().nullish()
|
||||
})
|
||||
|
||||
/**
|
||||
* Error shape returned when request binding or validation fails before the handler runs.
|
||||
*/
|
||||
export const zBindingErrorResponse = z.object({
|
||||
message: z.string()
|
||||
})
|
||||
|
||||
/**
|
||||
* Union of the two 400 shapes /oauth/register can emit. `OAuthRegisterError` is the handler-shaped RFC 7591 §3.2.2 error; `BindingErrorResponse` is the strict-server binding-layer error fired when the request body fails OpenAPI-schema validation before the handler runs.
|
||||
*
|
||||
*/
|
||||
export const zOAuthRegisterBadRequestResponse = z.union([
|
||||
zOAuthRegisterError,
|
||||
zBindingErrorResponse
|
||||
])
|
||||
|
||||
/**
|
||||
* RFC 7591 §3.2.1 successful registration response.
|
||||
*/
|
||||
export const zOAuthRegisterResponse = z.object({
|
||||
client_id: z.string(),
|
||||
client_id_issued_at: z.coerce
|
||||
.bigint()
|
||||
.min(BigInt('-9223372036854775808'), {
|
||||
message: 'Invalid value: Expected int64 to be >= -9223372036854775808'
|
||||
})
|
||||
.max(BigInt('9223372036854775807'), {
|
||||
message: 'Invalid value: Expected int64 to be <= 9223372036854775807'
|
||||
}),
|
||||
client_name: z.string().optional(),
|
||||
redirect_uris: z.array(z.string()),
|
||||
grant_types: z.array(z.string()),
|
||||
response_types: z.array(z.string()),
|
||||
token_endpoint_auth_method: z.enum(['none']),
|
||||
application_type: z.enum(['native', 'web'])
|
||||
})
|
||||
|
||||
/**
|
||||
* RFC 7591 §2 client metadata document. Only the fields the server honors are listed; presence of `scope` or `resource_grants` in the request is rejected (`invalid_client_metadata`) because those are server-owned for dynamic clients. `additionalProperties: false` mirrors the runtime middleware that rejects any unknown metadata key.
|
||||
*
|
||||
*/
|
||||
export const zOAuthRegisterRequest = z.object({
|
||||
redirect_uris: z.array(z.string()).min(1).max(5),
|
||||
client_name: z.string().max(100).optional(),
|
||||
application_type: z.enum(['native', 'web']),
|
||||
token_endpoint_auth_method: z.enum(['none']).optional(),
|
||||
grant_types: z
|
||||
.array(z.enum(['authorization_code', 'refresh_token']))
|
||||
.optional(),
|
||||
response_types: z.array(z.enum(['code'])).optional(),
|
||||
scope: z.string().nullish(),
|
||||
resource_grants: z.record(z.array(z.string())).nullish(),
|
||||
client_uri: z.string().nullish(),
|
||||
logo_uri: z.string().nullish(),
|
||||
tos_uri: z.string().nullish(),
|
||||
policy_uri: z.string().nullish(),
|
||||
software_id: z.string().nullish(),
|
||||
software_version: z.string().nullish(),
|
||||
contacts: z.array(z.string()).nullish(),
|
||||
jwks: z.record(z.unknown()).nullish(),
|
||||
jwks_uri: z.string().nullish()
|
||||
})
|
||||
|
||||
/**
|
||||
* OAuth 2.1 authorization-server metadata (RFC 8414).
|
||||
*/
|
||||
export const zOAuthAuthorizationServerMetadata = z.object({
|
||||
issuer: z.string().url(),
|
||||
authorization_endpoint: z.string().url(),
|
||||
token_endpoint: z.string().url(),
|
||||
jwks_uri: z.string().url(),
|
||||
registration_endpoint: z.string().url().optional(),
|
||||
response_types_supported: z.array(z.string()),
|
||||
grant_types_supported: z.array(z.string()),
|
||||
code_challenge_methods_supported: z.array(z.string()),
|
||||
token_endpoint_auth_methods_supported: z.array(z.string()),
|
||||
scopes_supported: z.array(z.string()).optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* JSON Web Key Set containing the public keys used to verify Cloud JWTs.
|
||||
*/
|
||||
@@ -940,6 +1087,7 @@ export const zWorkspaceApiKeyInfo = z.object({
|
||||
workspace_id: z.string(),
|
||||
user_id: z.string(),
|
||||
name: z.string(),
|
||||
description: z.string().max(5000),
|
||||
key_prefix: z.string(),
|
||||
expires_at: z.string().datetime().optional(),
|
||||
last_used_at: z.string().datetime().optional(),
|
||||
@@ -960,6 +1108,7 @@ export const zListWorkspaceApiKeysResponse = z.object({
|
||||
export const zCreateWorkspaceApiKeyResponse = z.object({
|
||||
id: z.string().uuid(),
|
||||
name: z.string(),
|
||||
description: z.string().max(5000),
|
||||
key: z.string(),
|
||||
key_prefix: z.string(),
|
||||
expires_at: z.string().datetime().optional(),
|
||||
@@ -971,6 +1120,7 @@ export const zCreateWorkspaceApiKeyResponse = z.object({
|
||||
*/
|
||||
export const zCreateWorkspaceApiKeyRequest = z.object({
|
||||
name: z.string(),
|
||||
description: z.string().max(5000).optional(),
|
||||
expires_at: z.string().datetime().optional()
|
||||
})
|
||||
|
||||
@@ -1353,6 +1503,7 @@ export const zListTagsResponse = z.object({
|
||||
export const zAsset = z.object({
|
||||
id: z.string().uuid(),
|
||||
name: z.string(),
|
||||
display_name: z.string().nullish(),
|
||||
asset_hash: z
|
||||
.string()
|
||||
.regex(/^blake3:[a-f0-9]{64}$/)
|
||||
@@ -1385,7 +1536,8 @@ export const zAsset = z.object({
|
||||
export const zListAssetsResponse = z.object({
|
||||
assets: z.array(zAsset),
|
||||
total: z.number().int(),
|
||||
has_more: z.boolean()
|
||||
has_more: z.boolean(),
|
||||
next_cursor: z.string().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -1394,6 +1546,7 @@ export const zListAssetsResponse = z.object({
|
||||
export const zAssetUpdated = z.object({
|
||||
id: z.string().uuid(),
|
||||
name: z.string().optional(),
|
||||
display_name: z.string().nullish(),
|
||||
asset_hash: z
|
||||
.string()
|
||||
.regex(/^blake3:[a-f0-9]{64}$/)
|
||||
@@ -1753,13 +1906,6 @@ export const zExportDownloadUrlResponse = z.object({
|
||||
expires_at: z.string().datetime().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Error shape returned when request binding or validation fails before the handler runs.
|
||||
*/
|
||||
export const zBindingErrorResponse = z.object({
|
||||
message: z.string()
|
||||
})
|
||||
|
||||
/**
|
||||
* Standard error response with a machine-readable code and human-readable message.
|
||||
*/
|
||||
@@ -1796,6 +1942,7 @@ export const zPromptRequest = z.object({
|
||||
export const zAssetWritable = z.object({
|
||||
id: z.string().uuid(),
|
||||
name: z.string(),
|
||||
display_name: z.string().nullish(),
|
||||
asset_hash: z
|
||||
.string()
|
||||
.regex(/^blake3:[a-f0-9]{64}$/)
|
||||
@@ -1827,7 +1974,8 @@ export const zAssetWritable = z.object({
|
||||
export const zListAssetsResponseWritable = z.object({
|
||||
assets: z.array(zAssetWritable),
|
||||
total: z.number().int(),
|
||||
has_more: z.boolean()
|
||||
has_more: z.boolean(),
|
||||
next_cursor: z.string().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -1961,21 +2109,6 @@ export const zGetModelsInFolderData = z.object({
|
||||
*/
|
||||
export const zGetModelsInFolderResponse = z.array(zModelFile)
|
||||
|
||||
export const zGetModelPreviewData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.object({
|
||||
folder: z.string(),
|
||||
path_index: z.number().int(),
|
||||
filename: z.string()
|
||||
}),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Success - Model preview image
|
||||
*/
|
||||
export const zGetModelPreviewResponse = z.string()
|
||||
|
||||
export const zGetLegacyHistoryData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
@@ -2132,9 +2265,9 @@ export const zListAssetsData = z.object({
|
||||
.enum(['name', 'created_at', 'updated_at', 'size', 'last_access_time'])
|
||||
.optional(),
|
||||
order: z.enum(['asc', 'desc']).optional(),
|
||||
job_ids: z.array(z.string().uuid()).optional(),
|
||||
include_public: z.boolean().optional().default(true),
|
||||
asset_hash: z.string().optional()
|
||||
asset_hash: z.string().optional(),
|
||||
after: z.string().optional()
|
||||
})
|
||||
.optional()
|
||||
})
|
||||
@@ -2157,7 +2290,7 @@ export const zUploadAssetData = z.object({
|
||||
})
|
||||
|
||||
/**
|
||||
* Asset already exists (returned existing asset)
|
||||
* Asset created successfully
|
||||
*/
|
||||
export const zUploadAssetResponse = zAssetCreated
|
||||
|
||||
@@ -2174,7 +2307,7 @@ export const zCreateAssetFromHashData = z.object({
|
||||
})
|
||||
|
||||
/**
|
||||
* Asset reference already exists (returned existing)
|
||||
* Asset reference created successfully
|
||||
*/
|
||||
export const zCreateAssetFromHashResponse = zAssetCreated
|
||||
|
||||
@@ -2509,10 +2642,10 @@ export const zUpdateMultipleSettingsData = z.object({
|
||||
*/
|
||||
export const zUpdateMultipleSettingsResponse = z.record(z.unknown())
|
||||
|
||||
export const zGetSettingByKeyData = z.object({
|
||||
export const zGetSettingByIdData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.object({
|
||||
key: z.string()
|
||||
id: z.string()
|
||||
}),
|
||||
query: z.never().optional()
|
||||
})
|
||||
@@ -2520,14 +2653,14 @@ export const zGetSettingByKeyData = z.object({
|
||||
/**
|
||||
* Setting value response
|
||||
*/
|
||||
export const zGetSettingByKeyResponse = z.object({
|
||||
export const zGetSettingByIdResponse = z.object({
|
||||
value: z.unknown().optional()
|
||||
})
|
||||
|
||||
export const zUpdateSettingByKeyData = z.object({
|
||||
export const zUpdateSettingByIdData = z.object({
|
||||
body: z.unknown(),
|
||||
path: z.object({
|
||||
key: z.string()
|
||||
id: z.string()
|
||||
}),
|
||||
query: z.never().optional()
|
||||
})
|
||||
@@ -2535,7 +2668,7 @@ export const zUpdateSettingByKeyData = z.object({
|
||||
/**
|
||||
* Updated setting value response
|
||||
*/
|
||||
export const zUpdateSettingByKeyResponse = z.object({
|
||||
export const zUpdateSettingByIdResponse = z.object({
|
||||
value: z.unknown().optional()
|
||||
})
|
||||
|
||||
@@ -2691,21 +2824,7 @@ export const zUploadMaskData = z.object({
|
||||
export const zUploadMaskResponse = z.object({
|
||||
name: z.string().optional(),
|
||||
subfolder: z.string().optional(),
|
||||
type: z.string().optional(),
|
||||
metadata: z
|
||||
.object({
|
||||
is_mask: z.boolean().optional(),
|
||||
original_hash: z.string().optional(),
|
||||
mask_type: z.string().optional(),
|
||||
related_files: z
|
||||
.object({
|
||||
mask: z.string().optional(),
|
||||
paint: z.string().optional(),
|
||||
painted: z.string().optional()
|
||||
})
|
||||
.optional()
|
||||
})
|
||||
.optional()
|
||||
type: z.string().optional()
|
||||
})
|
||||
|
||||
export const zGetLogsData = z.object({
|
||||
@@ -2774,6 +2893,101 @@ export const zGetJwksData = z.object({
|
||||
*/
|
||||
export const zGetJwksResponse = zJwksResponse
|
||||
|
||||
export const zGetOAuthAuthorizationServerData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Authorization-server metadata
|
||||
*/
|
||||
export const zGetOAuthAuthorizationServerResponse =
|
||||
zOAuthAuthorizationServerMetadata
|
||||
|
||||
export const zGetOAuthProtectedResourceData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Protected-resource metadata
|
||||
*/
|
||||
export const zGetOAuthProtectedResourceResponse =
|
||||
zOAuthProtectedResourceMetadata
|
||||
|
||||
export const zGetOAuthAuthorizeData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
query: z
|
||||
.object({
|
||||
response_type: z.string().optional(),
|
||||
client_id: z.string().optional(),
|
||||
redirect_uri: z.string().optional(),
|
||||
scope: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
code_challenge: z.string().optional(),
|
||||
code_challenge_method: z.string().optional(),
|
||||
resource: z.string().optional(),
|
||||
oauth_request_id: z.string().optional()
|
||||
})
|
||||
.optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Consent challenge payload (cookie present, email verified). Frontend renders the consent UI from this payload and POSTs back to /oauth/authorize.
|
||||
*
|
||||
*/
|
||||
export const zGetOAuthAuthorizeResponse = zOAuthConsentChallenge
|
||||
|
||||
export const zPostOAuthAuthorizeData = z.object({
|
||||
body: z.object({
|
||||
oauth_request_id: z.string().uuid(),
|
||||
csrf_token: z.string(),
|
||||
decision: z.enum(['allow', 'deny']),
|
||||
workspace_id: z.string()
|
||||
}),
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Redirect URL for the frontend to navigate to (allow → with code+state; deny → with error+state)
|
||||
*/
|
||||
export const zPostOAuthAuthorizeResponse = zOAuthAuthorizeRedirectResponse
|
||||
|
||||
export const zPostOAuthTokenData = z.object({
|
||||
body: z.object({
|
||||
grant_type: z.enum(['authorization_code', 'refresh_token']),
|
||||
client_id: z.string(),
|
||||
code: z.string().optional(),
|
||||
redirect_uri: z.string().optional(),
|
||||
code_verifier: z.string().optional(),
|
||||
refresh_token: z.string().optional(),
|
||||
scope: z.string().optional(),
|
||||
client_secret: z.string().optional()
|
||||
}),
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* New token pair
|
||||
*/
|
||||
export const zPostOAuthTokenResponse = zOAuthTokenResponse
|
||||
|
||||
export const zPostOAuthRegisterData = z.object({
|
||||
body: zOAuthRegisterRequest,
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Registered. Body echoes the metadata RFC 7591 §3.2.1 requires.
|
||||
*/
|
||||
export const zPostOAuthRegisterResponse = zOAuthRegisterResponse
|
||||
|
||||
export const zListWorkspacesData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
@@ -3078,6 +3292,28 @@ export const zUpdateSubscriptionCacheResponse = z.object({
|
||||
status: z.string().optional()
|
||||
})
|
||||
|
||||
export const zInsertDynamicConfigData = z.object({
|
||||
body: z.record(z.unknown()),
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Config inserted successfully
|
||||
*/
|
||||
export const zInsertDynamicConfigResponse = z.object({
|
||||
id: z.coerce
|
||||
.bigint()
|
||||
.min(BigInt('-9223372036854775808'), {
|
||||
message: 'Invalid value: Expected int64 to be >= -9223372036854775808'
|
||||
})
|
||||
.max(BigInt('9223372036854775807'), {
|
||||
message: 'Invalid value: Expected int64 to be <= 9223372036854775807'
|
||||
})
|
||||
.optional(),
|
||||
message: z.string().optional()
|
||||
})
|
||||
|
||||
export const zSyncApiKeyData = z.object({
|
||||
body: zSyncApiKeyRequest,
|
||||
path: z.never().optional(),
|
||||
@@ -3671,12 +3907,6 @@ export const zGetHealthData = z.object({
|
||||
*/
|
||||
export const zGetHealthResponse = z.string()
|
||||
|
||||
export const zGetOpenapiSpecData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
export const zGetMonitoringTasksData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
@@ -3757,6 +3987,16 @@ export const zPostCustomNodeProxyData = z.object({
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
export const zGetModelPreviewData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.object({
|
||||
folder: z.string(),
|
||||
path_index: z.number().int(),
|
||||
filename: z.string()
|
||||
}),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
export const zGetLegacyPromptByIdData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.object({
|
||||
|
||||
Reference in New Issue
Block a user