From b3c34dd24c86c1cb90172b6b02eb109de25dbf98 Mon Sep 17 00:00:00 2001 From: mattmillerai <7741082+mattmillerai@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:45:16 +0000 Subject: [PATCH 1/2] [chore] Update Ingest API types from cloud@a2cc539 --- packages/ingest-types/src/index.ts | 1025 +- packages/ingest-types/src/types.gen.ts | 18056 +++++++++++------------ packages/ingest-types/src/zod.gen.ts | 6354 ++++---- 3 files changed, 11008 insertions(+), 14427 deletions(-) diff --git a/packages/ingest-types/src/index.ts b/packages/ingest-types/src/index.ts index 84d3d936a67..7126ba00dd8 100644 --- a/packages/ingest-types/src/index.ts +++ b/packages/ingest-types/src/index.ts @@ -1,1026 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export type { - AcceptInviteResponse, - AcceptWorkspaceInviteData, - AcceptWorkspaceInviteError, - AcceptWorkspaceInviteErrors, - AcceptWorkspaceInviteResponse, - AcceptWorkspaceInviteResponses, - AddAssetTagsData, - AddAssetTagsError, - AddAssetTagsErrors, - AddAssetTagsResponse, - AddAssetTagsResponses, - AdminDeleteHubWorkflowData, - AdminDeleteHubWorkflowError, - AdminDeleteHubWorkflowErrors, - AdminDeleteHubWorkflowResponse, - AdminDeleteHubWorkflowResponses, - Asset, - AssetCreated, - AssetCreatedWritable, - AssetDownloadResponse, - AssetInfo, - AssetMetadataResponse, - AssetTagHistogramResponse, - AssetUpdated, - AssetWritable, - BillingBalanceResponse, - BillingEvent, - BillingEventsResponse, - BillingOpStatusResponse, - BillingPlansResponse, - BillingStatus, - BillingStatusResponse, - BulkRevokeApiKeysResponse, - BulkRevokeWorkspaceMemberApiKeysData, - BulkRevokeWorkspaceMemberApiKeysError, - BulkRevokeWorkspaceMemberApiKeysErrors, - BulkRevokeWorkspaceMemberApiKeysResponse, - BulkRevokeWorkspaceMemberApiKeysResponses, - CancelAssetSeedData, - CancelAssetSeedResponse, - CancelAssetSeedResponses, - CancelJobData, - CancelJobError, - CancelJobErrors, - CancelJobResponse, - CancelJobResponses, - CancelJobsData, - CancelJobsError, - CancelJobsErrors, - CancelJobsResponse, - CancelJobsResponses, - CancelSubscriptionData, - CancelSubscriptionError, - CancelSubscriptionErrors, - CancelSubscriptionRequest, - CancelSubscriptionResponse, - CancelSubscriptionResponse2, - CancelSubscriptionResponses, - CheckAssetByHashData, - CheckAssetByHashError, - CheckAssetByHashErrors, - CheckAssetByHashResponses, - CheckHubUsernameData, - CheckHubUsernameError, - CheckHubUsernameErrors, - CheckHubUsernameResponse, - CheckHubUsernameResponses, - ClientOptions, - CreateAssetData, - CreateAssetDownloadData, - CreateAssetDownloadError, - CreateAssetDownloadErrors, - CreateAssetDownloadResponse, - CreateAssetDownloadResponses, - CreateAssetError, - CreateAssetErrors, - CreateAssetExportData, - CreateAssetExportError, - CreateAssetExportErrors, - CreateAssetExportResponse, - CreateAssetExportResponses, - CreateAssetFromHashData, - CreateAssetFromHashError, - CreateAssetFromHashErrors, - CreateAssetFromHashResponse, - CreateAssetFromHashResponses, - CreateAssetResponse, - CreateAssetResponses, - CreateDeletionRequestData, - CreateDeletionRequestError, - CreateDeletionRequestErrors, - CreateDeletionRequestResponse, - CreateDeletionRequestResponses, - CreateDesktopLoginCodeData, - CreateDesktopLoginCodeError, - CreateDesktopLoginCodeErrors, - CreateDesktopLoginCodeResponse, - CreateDesktopLoginCodeResponses, - CreateHubAssetUploadUrlData, - CreateHubAssetUploadUrlError, - CreateHubAssetUploadUrlErrors, - CreateHubAssetUploadUrlResponse, - CreateHubAssetUploadUrlResponses, - CreateHubProfileData, - CreateHubProfileError, - CreateHubProfileErrors, - CreateHubProfileRequest, - CreateHubProfileResponse, - CreateHubProfileResponses, - CreateInviteRequest, - CreateSecretData, - CreateSecretError, - CreateSecretErrors, - CreateSecretRequest, - CreateSecretResponse, - CreateSecretResponses, - CreateSessionData, - CreateSessionError, - CreateSessionErrors, - CreateSessionResponse, - CreateSessionResponse2, - CreateSessionResponses, - CreateTopupData, - CreateTopupError, - CreateTopupErrors, - CreateTopupRequest, - CreateTopupResponse, - CreateTopupResponse2, - CreateTopupResponses, - CreateWorkflowData, - CreateWorkflowError, - CreateWorkflowErrors, - CreateWorkflowRequest, - CreateWorkflowResponse, - CreateWorkflowResponses, - CreateWorkflowVersionData, - CreateWorkflowVersionError, - CreateWorkflowVersionErrors, - CreateWorkflowVersionRequest, - CreateWorkflowVersionResponse, - CreateWorkflowVersionResponses, - CreateWorkspaceApiKeyData, - CreateWorkspaceApiKeyError, - CreateWorkspaceApiKeyErrors, - CreateWorkspaceApiKeyRequest, - CreateWorkspaceApiKeyResponse, - CreateWorkspaceApiKeyResponse2, - CreateWorkspaceApiKeyResponses, - CreateWorkspaceData, - CreateWorkspaceError, - CreateWorkspaceErrors, - CreateWorkspaceInviteData, - CreateWorkspaceInviteError, - CreateWorkspaceInviteErrors, - CreateWorkspaceInviteResponse, - CreateWorkspaceInviteResponses, - CreateWorkspaceRequest, - CreateWorkspaceResponse, - CreateWorkspaceResponses, - DeleteAssetData, - DeleteAssetError, - DeleteAssetErrors, - DeleteAssetResponse, - DeleteAssetResponses, - DeleteHubWorkflowData, - DeleteHubWorkflowError, - DeleteHubWorkflowErrors, - DeleteHubWorkflowResponse, - DeleteHubWorkflowResponses, - DeleteMonitoringTasksSubpathData, - DeleteMonitoringTasksSubpathErrors, - DeleteMonitoringTasksSubpathResponses, - DeleteSecretData, - DeleteSecretError, - DeleteSecretErrors, - DeleteSecretResponse, - DeleteSecretResponses, - DeleteSessionData, - DeleteSessionError, - DeleteSessionErrors, - DeleteSessionResponse, - DeleteSessionResponse2, - DeleteSessionResponses, - DeleteUserdataFileData, - DeleteUserdataFileError, - DeleteUserdataFileErrors, - DeleteUserdataFileResponse, - DeleteUserdataFileResponses, - DeleteWorkflowData, - DeleteWorkflowError, - DeleteWorkflowErrors, - DeleteWorkflowResponse, - DeleteWorkflowResponses, - DeleteWorkspaceData, - DeleteWorkspaceError, - DeleteWorkspaceErrors, - DeleteWorkspaceResponse, - DeleteWorkspaceResponses, - DeletionRequest, - DeletionStatus, - DesktopLoginCodeCreateRequest, - DesktopLoginCodeCreateResponse, - DesktopLoginCodeExchangeRequest, - DesktopLoginCodeExchangeResponse, - DesktopLoginCodeRedeemRequest, - DesktopLoginCodeRedeemResponse, - DownloadExportData, - DownloadExportError, - DownloadExportErrors, - DownloadExportResponse, - DownloadExportResponses, - EnsureWorkspaceBillingLegacySnapshot, - EnsureWorkspaceBillingProvisionedData, - EnsureWorkspaceBillingProvisionedError, - EnsureWorkspaceBillingProvisionedErrors, - EnsureWorkspaceBillingProvisionedRequest, - EnsureWorkspaceBillingProvisionedResponse, - EnsureWorkspaceBillingProvisionedResponse2, - EnsureWorkspaceBillingProvisionedResponses, - ErrorResponse, - ExchangeDesktopLoginCodeData, - ExchangeDesktopLoginCodeError, - ExchangeDesktopLoginCodeErrors, - ExchangeDesktopLoginCodeResponse, - ExchangeDesktopLoginCodeResponses, - ExchangeTokenData, - ExchangeTokenError, - ExchangeTokenErrors, - ExchangeTokenRequest, - ExchangeTokenResponse, - ExchangeTokenResponse2, - ExchangeTokenResponses, - ExecutePromptData, - ExecutePromptError, - ExecutePromptErrors, - ExecutePromptResponse, - ExecutePromptResponses, - ExecutionError, - ExportDownloadUrlResponse, - FeedbackRequest, - FeedbackResponse, - FeedbackResponseWritable, - ForkWorkflowData, - ForkWorkflowError, - ForkWorkflowErrors, - ForkWorkflowRequest, - ForkWorkflowResponse, - ForkWorkflowResponses, - FreeMemoryData, - FreeMemoryResponses, - GetAllSettingsData, - GetAllSettingsError, - GetAllSettingsErrors, - GetAllSettingsResponse, - GetAllSettingsResponses, - GetApiViewVideoAliasData, - GetApiViewVideoAliasErrors, - GetApiViewVideoAliasResponses, - GetAssetByIdData, - GetAssetByIdError, - GetAssetByIdErrors, - GetAssetByIdResponse, - GetAssetByIdResponses, - GetAssetContentData, - GetAssetContentError, - GetAssetContentErrors, - GetAssetContentResponse, - GetAssetContentResponses, - GetAssetSeedStatusData, - GetAssetSeedStatusResponse, - GetAssetSeedStatusResponses, - GetAssetTagHistogramData, - GetAssetTagHistogramError, - GetAssetTagHistogramErrors, - GetAssetTagHistogramResponse, - GetAssetTagHistogramResponses, - GetBillingBalanceData, - GetBillingBalanceError, - GetBillingBalanceErrors, - GetBillingBalanceResponse, - GetBillingBalanceResponses, - GetBillingEventsData, - GetBillingEventsError, - GetBillingEventsErrors, - GetBillingEventsResponse, - GetBillingEventsResponses, - GetBillingOpStatusData, - GetBillingOpStatusError, - GetBillingOpStatusErrors, - GetBillingOpStatusResponse, - GetBillingOpStatusResponses, - GetBillingPlansData, - GetBillingPlansError, - GetBillingPlansErrors, - GetBillingPlansResponse, - GetBillingPlansResponses, - GetBillingStatusData, - GetBillingStatusError, - GetBillingStatusErrors, - GetBillingStatusResponse, - GetBillingStatusResponses, - GetCustomNodeProxyData, - GetCustomNodeProxyErrors, - GetCustomNodeProxyResponses, - GetDeletionRequestData, - GetDeletionRequestError, - GetDeletionRequestErrors, - GetDeletionRequestResponse, - GetDeletionRequestResponses, - GetEmbeddingsData, - GetEmbeddingsResponse, - GetEmbeddingsResponses, - GetExtensionsData, - GetExtensionsResponse, - GetExtensionsResponses, - GetFeaturesData, - GetFeaturesResponse, - GetFeaturesResponses, - GetFilesData, - GetFilesError, - GetFilesErrors, - GetFilesResponse, - GetFilesResponses, - GetGlobalSubgraphData, - GetGlobalSubgraphError, - GetGlobalSubgraphErrors, - GetGlobalSubgraphResponse, - GetGlobalSubgraphResponses, - GetGlobalSubgraphsData, - GetGlobalSubgraphsError, - GetGlobalSubgraphsErrors, - GetGlobalSubgraphsResponse, - GetGlobalSubgraphsResponses, - GetHealthData, - GetHealthError, - GetHealthErrors, - GetHealthResponse, - GetHealthResponses, - GetHistoryData, - GetHistoryError, - GetHistoryErrors, - GetHistoryEventsData, - GetHistoryEventsError, - GetHistoryEventsErrors, - GetHistoryEventsResponse, - GetHistoryEventsResponses, - GetHistoryForPromptData, - GetHistoryForPromptError, - GetHistoryForPromptErrors, - GetHistoryForPromptResponse, - GetHistoryForPromptResponses, - GetHistoryResponse, - GetHistoryResponses, - GetHubProfileByUsernameData, - GetHubProfileByUsernameError, - GetHubProfileByUsernameErrors, - GetHubProfileByUsernameResponse, - GetHubProfileByUsernameResponses, - GetHubWorkflowData, - GetHubWorkflowError, - GetHubWorkflowErrors, - GetHubWorkflowResponse, - GetHubWorkflowResponses, - GetI18nData, - GetI18nResponse, - GetI18nResponses, - GetInternalFolderPathsData, - GetInternalFolderPathsResponse, - GetInternalFolderPathsResponses, - GetInternalLogsData, - GetInternalLogsRawData, - GetInternalLogsRawResponse, - GetInternalLogsRawResponses, - GetInternalLogsResponse, - GetInternalLogsResponses, - GetJobDetailData, - GetJobDetailError, - GetJobDetailErrors, - GetJobDetailResponse, - GetJobDetailResponses, - GetJobStatusData, - GetJobStatusError, - GetJobStatusErrors, - GetJobStatusResponse, - GetJobStatusResponses, - GetJwksData, - GetJwksResponse, - GetJwksResponses, - GetLegacyHistoryByIdData, - GetLegacyHistoryByIdErrors, - GetLegacyHistoryData, - GetLegacyHistoryErrors, - GetLegacyJobByIdData, - GetLegacyJobByIdErrors, - GetLegacyJobOutputsData, - GetLegacyJobOutputsErrors, - GetLegacyModelsByFolderData, - GetLegacyModelsByFolderErrors, - GetLegacyModelsData, - GetLegacyModelsErrors, - GetLegacyObjectInfoByNodeClassData, - GetLegacyObjectInfoByNodeClassErrors, - GetLegacyPromptByIdData, - GetLegacyPromptByIdErrors, - GetLegacyUserdataV2Data, - GetLegacyUserdataV2Errors, - GetLegacyViewMetadataData, - GetLegacyViewMetadataErrors, - GetLogsData, - GetLogsError, - GetLogsErrors, - GetLogsResponse, - GetLogsResponses, - GetMaskLayersData, - GetMaskLayersError, - GetMaskLayersErrors, - GetMaskLayersResponse, - GetMaskLayersResponses, - GetModelFoldersData, - GetModelFoldersError, - GetModelFoldersErrors, - GetModelFoldersResponse, - GetModelFoldersResponses, - GetModelPreviewData, - GetModelPreviewErrors, - GetModelsInFolderData, - GetModelsInFolderError, - GetModelsInFolderErrors, - GetModelsInFolderResponse, - GetModelsInFolderResponses, - GetMonitoringTasksData, - GetMonitoringTasksErrors, - GetMonitoringTasksResponses, - GetMonitoringTasksSubpathData, - GetMonitoringTasksSubpathErrors, - GetMonitoringTasksSubpathResponses, - GetMyHubProfileData, - GetMyHubProfileError, - GetMyHubProfileErrors, - GetMyHubProfileResponse, - GetMyHubProfileResponses, - GetNodeByIdData, - GetNodeByIdErrors, - GetNodeByIdResponses, - GetNodeInfoData, - GetNodeInfoResponse, - GetNodeInfoResponses, - GetNodeInfoSchemaData, - GetNodeInfoSchemaResponses, - GetNodeReplacementsData, - GetNodeReplacementsError, - GetNodeReplacementsErrors, - GetNodeReplacementsResponse, - GetNodeReplacementsResponses, - GetOAuthAuthorizationServerData, - GetOAuthAuthorizationServerError, - GetOAuthAuthorizationServerErrors, - GetOAuthAuthorizationServerResponse, - GetOAuthAuthorizationServerResponses, - GetOAuthAuthorizeData, - GetOAuthAuthorizeError, - GetOAuthAuthorizeErrors, - GetOAuthAuthorizeResponse, - GetOAuthAuthorizeResponses, - GetOAuthProtectedResourceByPathData, - GetOAuthProtectedResourceByPathError, - GetOAuthProtectedResourceByPathErrors, - GetOAuthProtectedResourceByPathResponse, - GetOAuthProtectedResourceByPathResponses, - GetOAuthProtectedResourceData, - GetOAuthProtectedResourceError, - GetOAuthProtectedResourceErrors, - GetOAuthProtectedResourceResponse, - GetOAuthProtectedResourceResponses, - GetPaymentPortalData, - GetPaymentPortalError, - GetPaymentPortalErrors, - GetPaymentPortalResponse, - GetPaymentPortalResponses, - GetPprofData, - GetPprofProfileData, - GetPprofProfileResponses, - GetPprofResponses, - GetPprofTraceData, - GetPprofTraceResponses, - GetPromptInfoData, - GetPromptInfoError, - GetPromptInfoErrors, - GetPromptInfoResponse, - GetPromptInfoResponses, - GetPublishedWorkflowData, - GetPublishedWorkflowError, - GetPublishedWorkflowErrors, - GetPublishedWorkflowResponse, - GetPublishedWorkflowResponses, - GetQueueInfoData, - GetQueueInfoError, - GetQueueInfoErrors, - GetQueueInfoResponse, - GetQueueInfoResponses, - GetRemoteAssetMetadataData, - GetRemoteAssetMetadataError, - GetRemoteAssetMetadataErrors, - GetRemoteAssetMetadataResponse, - GetRemoteAssetMetadataResponses, - GetSecretData, - GetSecretError, - GetSecretErrors, - GetSecretResponse, - GetSecretResponses, - GetSettingByIdData, - GetSettingByIdError, - GetSettingByIdErrors, - GetSettingByIdResponse, - GetSettingByIdResponses, - GetStaticExtensionsData, - GetStaticExtensionsErrors, - GetStaticExtensionsResponses, - GetSystemStatsData, - GetSystemStatsError, - GetSystemStatsErrors, - GetSystemStatsResponse, - GetSystemStatsResponses, - GetTaskData, - GetTaskError, - GetTaskErrors, - GetTaskResponse, - GetTaskResponses, - GetTemplateProxyData, - GetTemplateProxyErrors, - GetTemplateProxyResponses, - GetUserData, - GetUserdataData, - GetUserdataError, - GetUserdataErrors, - GetUserdataFileData, - GetUserdataFileError, - GetUserdataFileErrors, - GetUserdataFilePublishData, - GetUserdataFilePublishError, - GetUserdataFilePublishErrors, - GetUserdataFilePublishResponse, - GetUserdataFilePublishResponses, - GetUserdataFileResponse, - GetUserdataFileResponses, - GetUserdataResponse, - GetUserDataResponseFull, - GetUserDataResponseFullFile, - GetUserdataResponses, - GetUserError, - GetUserErrors, - GetUserResponse, - GetUserResponses, - GetUsersInfoData, - GetUsersInfoError, - GetUsersInfoErrors, - GetUsersInfoResponse, - GetUsersInfoResponses, - GetVhsQueryVideoData, - GetVhsQueryVideoError, - GetVhsQueryVideoErrors, - GetVhsQueryVideoResponse, - GetVhsQueryVideoResponses, - GetVhsViewAudioData, - GetVhsViewAudioErrors, - GetVhsViewAudioResponses, - GetVhsViewVideoData, - GetVhsViewVideoErrors, - GetVhsViewVideoResponses, - GetViewCompatAliasData, - GetViewCompatAliasErrors, - GetViewCompatAliasResponses, - GetWebsocketData, - GetWebsocketErrors, - GetWorkflowContentData, - GetWorkflowContentError, - GetWorkflowContentErrors, - GetWorkflowContentResponse, - GetWorkflowContentResponses, - GetWorkflowData, - GetWorkflowError, - GetWorkflowErrors, - GetWorkflowResponse, - GetWorkflowResponses, - GetWorkflowTemplatesData, - GetWorkflowTemplatesResponse, - GetWorkflowTemplatesResponses, - GetWorkspaceData, - GetWorkspaceError, - GetWorkspaceErrors, - GetWorkspaceResponse, - GetWorkspaceResponses, - GlobalSubgraphData, - GlobalSubgraphInfo, - HistoryDetailEntry, - HistoryDetailResponse, - HistoryEntry, - HistoryEventRequest, - HistoryManageRequest, - HistoryResponse, - HubAssetUploadUrlRequest, - HubAssetUploadUrlResponse, - HubLabelInfo, - HubLabelListResponse, - HubProfile, - HubProfileSummary, - HubUsernameCheckResponse, - HubWorkflowDetail, - HubWorkflowListResponse, - HubWorkflowStatus, - HubWorkflowSummary, - HubWorkflowTemplateEntry, - ImportPublishedAssetsData, - ImportPublishedAssetsError, - ImportPublishedAssetsErrors, - ImportPublishedAssetsRequest, - ImportPublishedAssetsResponse, - ImportPublishedAssetsResponse2, - ImportPublishedAssetsResponses, - InsertDynamicConfigData, - InsertDynamicConfigError, - InsertDynamicConfigErrors, - InsertDynamicConfigResponse, - InsertDynamicConfigResponses, - InterruptJobData, - InterruptJobError, - InterruptJobErrors, - InterruptJobResponses, - JobCancelResponse, - JobDetailResponse, - JobEntry, - JobsCancelRequest, - JobsCancelResponse, - JobsListResponse, - JobStatusResponse, - JwkKey, - JwksResponse, - LabelRef, - LeaveWorkspaceData, - LeaveWorkspaceError, - LeaveWorkspaceErrors, - LeaveWorkspaceResponse, - LeaveWorkspaceResponses, - ListAssetsData, - ListAssetsError, - ListAssetsErrors, - ListAssetsResponse, - ListAssetsResponse2, - ListAssetsResponses, - ListAssetsResponseWritable, - ListHubLabelsData, - ListHubLabelsError, - ListHubLabelsErrors, - ListHubLabelsResponse, - ListHubLabelsResponses, - ListHubWorkflowIndexData, - ListHubWorkflowIndexError, - ListHubWorkflowIndexErrors, - ListHubWorkflowIndexResponse, - ListHubWorkflowIndexResponses, - ListHubWorkflowsData, - ListHubWorkflowsError, - ListHubWorkflowsErrors, - ListHubWorkflowsResponse, - ListHubWorkflowsResponses, - ListInvitesResponse, - ListJobsData, - ListJobsError, - ListJobsErrors, - ListJobsResponse, - ListJobsResponses, - ListLinkedFirebaseUidsData, - ListLinkedFirebaseUidsError, - ListLinkedFirebaseUidsErrors, - ListLinkedFirebaseUidsRequest, - ListLinkedFirebaseUidsResponse, - ListLinkedFirebaseUidsResponse2, - ListLinkedFirebaseUidsResponses, - ListMembersResponse, - ListSecretProvidersData, - ListSecretProvidersError, - ListSecretProvidersErrors, - ListSecretProvidersResponse, - ListSecretProvidersResponses, - ListSecretsData, - ListSecretsError, - ListSecretsErrors, - ListSecretsResponse, - ListSecretsResponses, - ListTagsData, - ListTagsError, - ListTagsErrors, - ListTagsResponse, - ListTagsResponse2, - ListTagsResponses, - ListTasksData, - ListTasksError, - ListTasksErrors, - ListTasksResponse, - ListTasksResponses, - ListWorkflowsData, - ListWorkflowsError, - ListWorkflowsErrors, - ListWorkflowsResponse, - ListWorkflowsResponses, - ListWorkspaceApiKeysData, - ListWorkspaceApiKeysError, - ListWorkspaceApiKeysErrors, - ListWorkspaceApiKeysResponse, - ListWorkspaceApiKeysResponse2, - ListWorkspaceApiKeysResponses, - ListWorkspaceInvitesData, - ListWorkspaceInvitesError, - ListWorkspaceInvitesErrors, - ListWorkspaceInvitesResponse, - ListWorkspaceInvitesResponses, - ListWorkspaceMembersData, - ListWorkspaceMembersError, - ListWorkspaceMembersErrors, - ListWorkspaceMembersResponse, - ListWorkspaceMembersResponses, - ListWorkspacesData, - ListWorkspacesError, - ListWorkspacesErrors, - ListWorkspacesResponse, - ListWorkspacesResponse2, - ListWorkspacesResponses, - LogsResponse, - ManageHistoryData, - ManageHistoryError, - ManageHistoryErrors, - ManageHistoryResponses, - ManageQueueData, - ManageQueueError, - ManageQueueErrors, - ManageQueueResponse, - ManageQueueResponses, - Member, - ModelFile, - ModelFolder, - MoveUserdataFileData, - MoveUserdataFileError, - MoveUserdataFileErrors, - MoveUserdataFileResponse, - MoveUserdataFileResponses, - NodeInfo, - OAuthAuthorizationServerMetadata, - OAuthAuthorizeRedirectResponse, - OAuthConsentChallenge, - OAuthConsentChallengeWorkspace, - OAuthProtectedResourceMetadata, - OAuthRegisterBadRequestResponse, - OAuthRegisterError, - OAuthRegisterRequest, - OAuthRegisterResponse, - OAuthTokenError, - OAuthTokenResponse, - PaginationInfo, - PartnerUsageRequest, - PartnerUsageResponse, - PaymentPortalRequest, - PaymentPortalResponse, - PendingInvite, - Plan, - PlanAvailability, - PlanAvailabilityReason, - PlanSeatSummary, - PostAssetsFromWorkflowData, - PostAssetsFromWorkflowError, - PostAssetsFromWorkflowErrors, - PostAssetsFromWorkflowResponse, - PostAssetsFromWorkflowResponses, - PostCustomNodeProxyData, - PostCustomNodeProxyErrors, - PostCustomNodeProxyResponses, - PostMonitoringTasksSubpathData, - PostMonitoringTasksSubpathErrors, - PostMonitoringTasksSubpathResponses, - PostOAuthAuthorizeData, - PostOAuthAuthorizeError, - PostOAuthAuthorizeErrors, - PostOAuthAuthorizeResponse, - PostOAuthAuthorizeResponses, - PostOAuthRegisterData, - PostOAuthRegisterError, - PostOAuthRegisterErrors, - PostOAuthRegisterResponse, - PostOAuthRegisterResponses, - PostOAuthTokenData, - PostOAuthTokenError, - PostOAuthTokenErrors, - PostOAuthTokenResponse, - PostOAuthTokenResponses, - PostPprofSymbolData, - PostPprofSymbolResponses, - PostUserdataFileData, - PostUserdataFileError, - PostUserdataFileErrors, - PostUserdataFilePublishData, - PostUserdataFilePublishError, - PostUserdataFilePublishErrors, - PostUserdataFilePublishResponse, - PostUserdataFilePublishResponses, - PostUserdataFileResponse, - PostUserdataFileResponses, - PreviewPlanInfo, - PreviewSubscribeData, - PreviewSubscribeError, - PreviewSubscribeErrors, - PreviewSubscribeRequest, - PreviewSubscribeResponse, - PreviewSubscribeResponse2, - PreviewSubscribeResponses, - PromptErrorResponse, - PromptInfo, - PromptRequest, - PromptResponse, - PruneAssetsData, - PruneAssetsResponse, - PruneAssetsResponses, - PublishedWorkflowDetail, - PublishHubWorkflowData, - PublishHubWorkflowError, - PublishHubWorkflowErrors, - PublishHubWorkflowRequest, - PublishHubWorkflowResponse, - PublishHubWorkflowResponses, - PublishWorkflowAssetsRequest, - QueueInfo, - QueueManageRequest, - QueueManageResponse, - RedeemDesktopLoginCodeData, - RedeemDesktopLoginCodeError, - RedeemDesktopLoginCodeErrors, - RedeemDesktopLoginCodeResponse, - RedeemDesktopLoginCodeResponses, - ReleaseDeletionHoldData, - ReleaseDeletionHoldError, - ReleaseDeletionHoldErrors, - ReleaseDeletionHoldResponse, - ReleaseDeletionHoldResponses, - ReleaseHoldResponse, - RemoveAssetTagsData, - RemoveAssetTagsError, - RemoveAssetTagsErrors, - RemoveAssetTagsResponse, - RemoveAssetTagsResponses, - RemoveWorkspaceMemberData, - RemoveWorkspaceMemberError, - RemoveWorkspaceMemberErrors, - RemoveWorkspaceMemberResponse, - RemoveWorkspaceMemberResponses, - ReportHistoryEventData, - ReportHistoryEventError, - ReportHistoryEventErrors, - ReportHistoryEventResponse, - ReportHistoryEventResponses, - ReportPartnerUsageData, - ReportPartnerUsageError, - ReportPartnerUsageErrors, - ReportPartnerUsageResponse, - ReportPartnerUsageResponses, - ResubscribeData, - ResubscribeError, - ResubscribeErrors, - ResubscribeRequest, - ResubscribeResponse, - ResubscribeResponse2, - ResubscribeResponses, - RevokeWorkspaceApiKeyData, - RevokeWorkspaceApiKeyError, - RevokeWorkspaceApiKeyErrors, - RevokeWorkspaceApiKeyResponse, - RevokeWorkspaceApiKeyResponses, - RevokeWorkspaceInviteData, - RevokeWorkspaceInviteError, - RevokeWorkspaceInviteErrors, - RevokeWorkspaceInviteResponse, - RevokeWorkspaceInviteResponses, - SecretListResponse, - SecretProvider, - SecretProvidersResponse, - SecretResponse, - SeedAssetsData, - SeedAssetsResponse, - SeedAssetsResponses, - SetReviewStatusData, - SetReviewStatusError, - SetReviewStatusErrors, - SetReviewStatusRequest, - SetReviewStatusResponse, - SetReviewStatusResponse2, - SetReviewStatusResponses, - ShortLinkRedirectData, - ShortLinkRedirectErrors, - SubmitFeedbackData, - SubmitFeedbackError, - SubmitFeedbackErrors, - SubmitFeedbackResponse, - SubmitFeedbackResponses, - SubscribeData, - SubscribeError, - SubscribeErrors, - SubscribeRequest, - SubscribeResponse, - SubscribeResponse2, - SubscribeResponses, - SubscribeToLogsData, - SubscribeToLogsResponses, - SubscriptionDuration, - SubscriptionTier, - SyncApiKeyData, - SyncApiKeyError, - SyncApiKeyErrors, - SyncApiKeyRequest, - SyncApiKeyResponse, - SyncApiKeyResponse2, - SyncApiKeyResponses, - SystemStatsResponse, - TagInfo, - TagsModificationResponse, - TaskEntry, - TaskResponse, - TasksListResponse, - TeamCreditStop, - TeamCreditStopPrice, - TeamCreditStops, - TeamCreditStopSummary, - UpdateAssetData, - UpdateAssetError, - UpdateAssetErrors, - UpdateAssetResponse, - UpdateAssetResponses, - UpdateHubProfileData, - UpdateHubProfileError, - UpdateHubProfileErrors, - UpdateHubProfileRequest, - UpdateHubProfileResponse, - UpdateHubProfileResponses, - UpdateHubWorkflowData, - UpdateHubWorkflowError, - UpdateHubWorkflowErrors, - UpdateHubWorkflowRequest, - UpdateHubWorkflowResponse, - UpdateHubWorkflowResponses, - UpdateMemberRoleRequest, - UpdateMultipleSettingsData, - UpdateMultipleSettingsError, - UpdateMultipleSettingsErrors, - UpdateMultipleSettingsResponse, - UpdateMultipleSettingsResponses, - UpdateSecretData, - UpdateSecretError, - UpdateSecretErrors, - UpdateSecretRequest, - UpdateSecretResponse, - UpdateSecretResponses, - UpdateSettingByIdData, - UpdateSettingByIdError, - UpdateSettingByIdErrors, - UpdateSettingByIdResponse, - UpdateSettingByIdResponses, - UpdateSubscriptionCacheData, - UpdateSubscriptionCacheError, - UpdateSubscriptionCacheErrors, - UpdateSubscriptionCacheResponse, - UpdateSubscriptionCacheResponses, - UpdateWorkflowData, - UpdateWorkflowError, - UpdateWorkflowErrors, - UpdateWorkflowRequest, - UpdateWorkflowResponse, - UpdateWorkflowResponses, - UpdateWorkspaceData, - UpdateWorkspaceError, - UpdateWorkspaceErrors, - UpdateWorkspaceMemberRoleData, - UpdateWorkspaceMemberRoleError, - UpdateWorkspaceMemberRoleErrors, - UpdateWorkspaceMemberRoleResponse, - UpdateWorkspaceMemberRoleResponses, - UpdateWorkspaceRequest, - UpdateWorkspaceResponse, - UpdateWorkspaceResponses, - UploadImageData, - UploadImageError, - UploadImageErrors, - UploadImageResponse, - UploadImageResponses, - UploadMaskData, - UploadMaskError, - UploadMaskErrors, - UploadMaskResponse, - UploadMaskResponses, - UserDataResponseFull, - UserResponse, - ValidationError, - ValidationResult, - VerifyApiKeyRequest, - VerifyApiKeyResponse, - VerifyWorkspaceApiKeyData, - VerifyWorkspaceApiKeyError, - VerifyWorkspaceApiKeyErrors, - VerifyWorkspaceApiKeyResponse, - VerifyWorkspaceApiKeyResponses, - ViewFileData, - ViewFileError, - ViewFileErrors, - ViewFileResponse, - ViewFileResponses, - WorkflowApiAssetsRequest, - WorkflowApiAssetsResponse, - WorkflowForkedFrom, - WorkflowListResponse, - WorkflowPublishInfo, - WorkflowResponse, - WorkflowVersionContentResponse, - WorkflowVersionResponse, - Workspace, - WorkspaceApiKeyInfo, - WorkspaceSummary, - WorkspaceWithRole -} from './types.gen' +export type { AcceptInviteResponse, AcceptWorkspaceInviteData, AcceptWorkspaceInviteError, AcceptWorkspaceInviteErrors, AcceptWorkspaceInviteResponse, AcceptWorkspaceInviteResponses, AddAssetTagsData, AddAssetTagsError, AddAssetTagsErrors, AddAssetTagsResponse, AddAssetTagsResponses, Asset, AssetCreated, AssetCreatedWritable, AssetDownloadResponse, AssetInfo, AssetMetadataResponse, AssetTagHistogramResponse, AssetUpdated, AssetWritable, BillingBalanceResponse, BillingEvent, BillingEventsResponse, BillingOpStatusResponse, BillingPlansResponse, BillingStatus, BillingStatusResponse, BulkRevokeApiKeysResponse, BulkRevokeWorkspaceMemberApiKeysData, BulkRevokeWorkspaceMemberApiKeysError, BulkRevokeWorkspaceMemberApiKeysErrors, BulkRevokeWorkspaceMemberApiKeysResponse, BulkRevokeWorkspaceMemberApiKeysResponses, CancelAssetSeedData, CancelAssetSeedResponse, CancelAssetSeedResponses, CancelJobData, CancelJobError, CancelJobErrors, CancelJobResponse, CancelJobResponses, CancelJobsData, CancelJobsError, CancelJobsErrors, CancelJobsResponse, CancelJobsResponses, CancelSubscriptionData, CancelSubscriptionError, CancelSubscriptionErrors, CancelSubscriptionRequest, CancelSubscriptionResponse, CancelSubscriptionResponse2, CancelSubscriptionResponses, CheckAssetByHashData, CheckAssetByHashError, CheckAssetByHashErrors, CheckAssetByHashResponses, CheckHubUsernameData, CheckHubUsernameError, CheckHubUsernameErrors, CheckHubUsernameResponse, CheckHubUsernameResponses, ClientOptions, CreateAssetData, CreateAssetDownloadData, CreateAssetDownloadError, CreateAssetDownloadErrors, CreateAssetDownloadResponse, CreateAssetDownloadResponses, CreateAssetError, CreateAssetErrors, CreateAssetExportData, CreateAssetExportError, CreateAssetExportErrors, CreateAssetExportResponse, CreateAssetExportResponses, CreateAssetFromHashData, CreateAssetFromHashError, CreateAssetFromHashErrors, CreateAssetFromHashResponse, CreateAssetFromHashResponses, CreateAssetResponse, CreateAssetResponses, CreateDesktopLoginCodeData, CreateDesktopLoginCodeError, CreateDesktopLoginCodeErrors, CreateDesktopLoginCodeResponse, CreateDesktopLoginCodeResponses, CreateHubAssetUploadUrlData, CreateHubAssetUploadUrlError, CreateHubAssetUploadUrlErrors, CreateHubAssetUploadUrlResponse, CreateHubAssetUploadUrlResponses, CreateHubProfileData, CreateHubProfileError, CreateHubProfileErrors, CreateHubProfileRequest, CreateHubProfileResponse, CreateHubProfileResponses, CreateInviteRequest, CreateSecretData, CreateSecretError, CreateSecretErrors, CreateSecretRequest, CreateSecretResponse, CreateSecretResponses, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponse2, CreateSessionResponses, CreateTopupData, CreateTopupError, CreateTopupErrors, CreateTopupRequest, CreateTopupResponse, CreateTopupResponse2, CreateTopupResponses, CreateWorkflowData, CreateWorkflowError, CreateWorkflowErrors, CreateWorkflowRequest, CreateWorkflowResponse, CreateWorkflowResponses, CreateWorkflowVersionData, CreateWorkflowVersionError, CreateWorkflowVersionErrors, CreateWorkflowVersionRequest, CreateWorkflowVersionResponse, CreateWorkflowVersionResponses, CreateWorkspaceApiKeyData, CreateWorkspaceApiKeyError, CreateWorkspaceApiKeyErrors, CreateWorkspaceApiKeyRequest, CreateWorkspaceApiKeyResponse, CreateWorkspaceApiKeyResponse2, CreateWorkspaceApiKeyResponses, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceErrors, CreateWorkspaceInviteData, CreateWorkspaceInviteError, CreateWorkspaceInviteErrors, CreateWorkspaceInviteResponse, CreateWorkspaceInviteResponses, CreateWorkspaceRequest, CreateWorkspaceResponse, CreateWorkspaceResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetResponse, DeleteAssetResponses, DeleteHubWorkflowData, DeleteHubWorkflowError, DeleteHubWorkflowErrors, DeleteHubWorkflowResponse, DeleteHubWorkflowResponses, DeleteSecretData, DeleteSecretError, DeleteSecretErrors, DeleteSecretResponse, DeleteSecretResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponse2, DeleteSessionResponses, DeleteUserdataFileData, DeleteUserdataFileError, DeleteUserdataFileErrors, DeleteUserdataFileResponse, DeleteUserdataFileResponses, DeleteWorkflowData, DeleteWorkflowError, DeleteWorkflowErrors, DeleteWorkflowResponse, DeleteWorkflowResponses, DeleteWorkspaceData, DeleteWorkspaceError, DeleteWorkspaceErrors, DeleteWorkspaceResponse, DeleteWorkspaceResponses, DesktopLoginCodeCreateRequest, DesktopLoginCodeCreateResponse, DesktopLoginCodeExchangeRequest, DesktopLoginCodeExchangeResponse, DesktopLoginCodeRedeemRequest, DesktopLoginCodeRedeemResponse, DownloadExportData, DownloadExportError, DownloadExportErrors, DownloadExportResponse, DownloadExportResponses, ErrorResponse, ExchangeDesktopLoginCodeData, ExchangeDesktopLoginCodeError, ExchangeDesktopLoginCodeErrors, ExchangeDesktopLoginCodeResponse, ExchangeDesktopLoginCodeResponses, ExchangeTokenData, ExchangeTokenError, ExchangeTokenErrors, ExchangeTokenRequest, ExchangeTokenResponse, ExchangeTokenResponse2, ExchangeTokenResponses, ExecutePromptData, ExecutePromptError, ExecutePromptErrors, ExecutePromptResponse, ExecutePromptResponses, ExecutionError, ExportDownloadUrlResponse, FeedbackRequest, FeedbackResponse, ForkWorkflowData, ForkWorkflowError, ForkWorkflowErrors, ForkWorkflowRequest, ForkWorkflowResponse, ForkWorkflowResponses, FreeMemoryData, FreeMemoryResponses, GetAllSettingsData, GetAllSettingsError, GetAllSettingsErrors, GetAllSettingsResponse, GetAllSettingsResponses, GetApiViewVideoAliasData, GetApiViewVideoAliasErrors, GetApiViewVideoAliasResponses, GetAssetByIdData, GetAssetByIdError, GetAssetByIdErrors, GetAssetByIdResponse, GetAssetByIdResponses, GetAssetContentData, GetAssetContentError, GetAssetContentErrors, GetAssetContentResponse, GetAssetContentResponses, GetAssetSeedStatusData, GetAssetSeedStatusResponse, GetAssetSeedStatusResponses, GetAssetTagHistogramData, GetAssetTagHistogramError, GetAssetTagHistogramErrors, GetAssetTagHistogramResponse, GetAssetTagHistogramResponses, GetBillingBalanceData, GetBillingBalanceError, GetBillingBalanceErrors, GetBillingBalanceResponse, GetBillingBalanceResponses, GetBillingEventsData, GetBillingEventsError, GetBillingEventsErrors, GetBillingEventsResponse, GetBillingEventsResponses, GetBillingOpStatusData, GetBillingOpStatusError, GetBillingOpStatusErrors, GetBillingOpStatusResponse, GetBillingOpStatusResponses, GetBillingPlansData, GetBillingPlansError, GetBillingPlansErrors, GetBillingPlansResponse, GetBillingPlansResponses, GetBillingStatusData, GetBillingStatusError, GetBillingStatusErrors, GetBillingStatusResponse, GetBillingStatusResponses, GetCustomNodeProxyData, GetCustomNodeProxyErrors, GetCustomNodeProxyResponses, GetEmbeddingsData, GetEmbeddingsResponse, GetEmbeddingsResponses, GetExtensionsData, GetExtensionsResponse, GetExtensionsResponses, GetFeaturesData, GetFeaturesResponse, GetFeaturesResponses, GetGlobalSubgraphData, GetGlobalSubgraphError, GetGlobalSubgraphErrors, GetGlobalSubgraphResponse, GetGlobalSubgraphResponses, GetGlobalSubgraphsData, GetGlobalSubgraphsError, GetGlobalSubgraphsErrors, GetGlobalSubgraphsResponse, GetGlobalSubgraphsResponses, GetHealthData, GetHealthError, GetHealthErrors, GetHealthResponse, GetHealthResponses, GetHistoryData, GetHistoryError, GetHistoryErrors, GetHistoryForPromptData, GetHistoryForPromptError, GetHistoryForPromptErrors, GetHistoryForPromptResponse, GetHistoryForPromptResponses, GetHistoryResponse, GetHistoryResponses, GetHubProfileByUsernameData, GetHubProfileByUsernameError, GetHubProfileByUsernameErrors, GetHubProfileByUsernameResponse, GetHubProfileByUsernameResponses, GetHubWorkflowData, GetHubWorkflowError, GetHubWorkflowErrors, GetHubWorkflowResponse, GetHubWorkflowResponses, GetI18nData, GetI18nResponse, GetI18nResponses, GetInternalFolderPathsData, GetInternalFolderPathsResponse, GetInternalFolderPathsResponses, GetInternalLogsData, GetInternalLogsRawData, GetInternalLogsRawResponse, GetInternalLogsRawResponses, GetInternalLogsResponse, GetInternalLogsResponses, GetJobDetailData, GetJobDetailError, GetJobDetailErrors, GetJobDetailResponse, GetJobDetailResponses, GetJobStatusData, GetJobStatusError, GetJobStatusErrors, GetJobStatusResponse, GetJobStatusResponses, GetJwksData, GetJwksResponse, GetJwksResponses, GetLegacyHistoryByIdData, GetLegacyHistoryByIdErrors, GetLegacyHistoryData, GetLegacyHistoryErrors, GetLegacyJobByIdData, GetLegacyJobByIdErrors, GetLegacyJobOutputsData, GetLegacyJobOutputsErrors, GetLegacyModelsByFolderData, GetLegacyModelsByFolderErrors, GetLegacyModelsData, GetLegacyModelsErrors, GetLegacyObjectInfoByNodeClassData, GetLegacyObjectInfoByNodeClassErrors, GetLegacyPromptByIdData, GetLegacyPromptByIdErrors, GetLegacyUserdataV2Data, GetLegacyUserdataV2Errors, GetLegacyViewMetadataData, GetLegacyViewMetadataErrors, GetMaskLayersData, GetMaskLayersError, GetMaskLayersErrors, GetMaskLayersResponse, GetMaskLayersResponses, GetModelFoldersData, GetModelFoldersError, GetModelFoldersErrors, GetModelFoldersResponse, GetModelFoldersResponses, GetModelPreviewData, GetModelPreviewErrors, GetModelsInFolderData, GetModelsInFolderError, GetModelsInFolderErrors, GetModelsInFolderResponse, GetModelsInFolderResponses, GetMyHubProfileData, GetMyHubProfileError, GetMyHubProfileErrors, GetMyHubProfileResponse, GetMyHubProfileResponses, GetNodeByIdData, GetNodeByIdErrors, GetNodeByIdResponses, GetNodeInfoData, GetNodeInfoResponse, GetNodeInfoResponses, GetNodeInfoSchemaData, GetNodeInfoSchemaResponses, GetNodeReplacementsData, GetNodeReplacementsError, GetNodeReplacementsErrors, GetNodeReplacementsResponse, GetNodeReplacementsResponses, GetOAuthAuthorizationServerData, GetOAuthAuthorizationServerError, GetOAuthAuthorizationServerErrors, GetOAuthAuthorizationServerResponse, GetOAuthAuthorizationServerResponses, GetOAuthAuthorizeData, GetOAuthAuthorizeError, GetOAuthAuthorizeErrors, GetOAuthAuthorizeResponse, GetOAuthAuthorizeResponses, GetOAuthProtectedResourceByPathData, GetOAuthProtectedResourceByPathError, GetOAuthProtectedResourceByPathErrors, GetOAuthProtectedResourceByPathResponse, GetOAuthProtectedResourceByPathResponses, GetOAuthProtectedResourceData, GetOAuthProtectedResourceError, GetOAuthProtectedResourceErrors, GetOAuthProtectedResourceResponse, GetOAuthProtectedResourceResponses, GetPaymentPortalData, GetPaymentPortalError, GetPaymentPortalErrors, GetPaymentPortalResponse, GetPaymentPortalResponses, GetPromptInfoData, GetPromptInfoError, GetPromptInfoErrors, GetPromptInfoResponse, GetPromptInfoResponses, GetPublishedWorkflowData, GetPublishedWorkflowError, GetPublishedWorkflowErrors, GetPublishedWorkflowResponse, GetPublishedWorkflowResponses, GetQueueInfoData, GetQueueInfoError, GetQueueInfoErrors, GetQueueInfoResponse, GetQueueInfoResponses, GetRemoteAssetMetadataData, GetRemoteAssetMetadataError, GetRemoteAssetMetadataErrors, GetRemoteAssetMetadataResponse, GetRemoteAssetMetadataResponses, GetSecretData, GetSecretError, GetSecretErrors, GetSecretResponse, GetSecretResponses, GetSettingByIdData, GetSettingByIdError, GetSettingByIdErrors, GetSettingByIdResponse, GetSettingByIdResponses, GetStaticExtensionsData, GetStaticExtensionsErrors, GetStaticExtensionsResponses, GetSystemStatsData, GetSystemStatsError, GetSystemStatsErrors, GetSystemStatsResponse, GetSystemStatsResponses, GetTaskData, GetTaskError, GetTaskErrors, GetTaskResponse, GetTaskResponses, GetTemplateProxyData, GetTemplateProxyErrors, GetTemplateProxyResponses, GetUserData, GetUserdataData, GetUserdataError, GetUserdataErrors, GetUserdataFileData, GetUserdataFileError, GetUserdataFileErrors, GetUserdataFilePublishData, GetUserdataFilePublishError, GetUserdataFilePublishErrors, GetUserdataFilePublishResponse, GetUserdataFilePublishResponses, GetUserdataFileResponse, GetUserdataFileResponses, GetUserdataResponse, GetUserDataResponseFull, GetUserDataResponseFullFile, GetUserdataResponses, GetUserError, GetUserErrors, GetUserResponse, GetUserResponses, GetUsersInfoData, GetUsersInfoError, GetUsersInfoErrors, GetUsersInfoResponse, GetUsersInfoResponses, GetVhsQueryVideoData, GetVhsQueryVideoError, GetVhsQueryVideoErrors, GetVhsQueryVideoResponse, GetVhsQueryVideoResponses, GetVhsViewAudioData, GetVhsViewAudioErrors, GetVhsViewAudioResponses, GetVhsViewVideoData, GetVhsViewVideoErrors, GetVhsViewVideoResponses, GetViewCompatAliasData, GetViewCompatAliasErrors, GetViewCompatAliasResponses, GetWebsocketData, GetWebsocketErrors, GetWorkflowContentData, GetWorkflowContentError, GetWorkflowContentErrors, GetWorkflowContentResponse, GetWorkflowContentResponses, GetWorkflowData, GetWorkflowError, GetWorkflowErrors, GetWorkflowResponse, GetWorkflowResponses, GetWorkflowTemplatesData, GetWorkflowTemplatesResponse, GetWorkflowTemplatesResponses, GetWorkspaceData, GetWorkspaceError, GetWorkspaceErrors, GetWorkspaceResponse, GetWorkspaceResponses, GlobalSubgraphData, GlobalSubgraphInfo, HistoryDetailEntry, HistoryDetailResponse, HistoryEntry, HistoryManageRequest, HistoryResponse, HubAssetUploadUrlRequest, HubAssetUploadUrlResponse, HubLabelInfo, HubLabelListResponse, HubProfile, HubProfileSummary, HubUsernameCheckResponse, HubWorkflowDetail, HubWorkflowListResponse, HubWorkflowStatus, HubWorkflowSummary, HubWorkflowTemplateEntry, ImportPublishedAssetsData, ImportPublishedAssetsError, ImportPublishedAssetsErrors, ImportPublishedAssetsRequest, ImportPublishedAssetsResponse, ImportPublishedAssetsResponse2, ImportPublishedAssetsResponses, InterruptJobData, InterruptJobError, InterruptJobErrors, InterruptJobResponses, JobCancelResponse, JobDetailResponse, JobEntry, JobsCancelRequest, JobsCancelResponse, JobsListResponse, JobStatusResponse, JwkKey, JwksResponse, LabelRef, LeaveWorkspaceData, LeaveWorkspaceError, LeaveWorkspaceErrors, LeaveWorkspaceResponse, LeaveWorkspaceResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponse2, ListAssetsResponses, ListAssetsResponseWritable, ListHubLabelsData, ListHubLabelsError, ListHubLabelsErrors, ListHubLabelsResponse, ListHubLabelsResponses, ListHubWorkflowIndexData, ListHubWorkflowIndexError, ListHubWorkflowIndexErrors, ListHubWorkflowIndexResponse, ListHubWorkflowIndexResponses, ListHubWorkflowsData, ListHubWorkflowsError, ListHubWorkflowsErrors, ListHubWorkflowsResponse, ListHubWorkflowsResponses, ListInvitesResponse, ListJobsData, ListJobsError, ListJobsErrors, ListJobsResponse, ListJobsResponses, ListMembersResponse, ListSecretProvidersData, ListSecretProvidersError, ListSecretProvidersErrors, ListSecretProvidersResponse, ListSecretProvidersResponses, ListSecretsData, ListSecretsError, ListSecretsErrors, ListSecretsResponse, ListSecretsResponses, ListTagsData, ListTagsError, ListTagsErrors, ListTagsResponse, ListTagsResponse2, ListTagsResponses, ListTasksData, ListTasksError, ListTasksErrors, ListTasksResponse, ListTasksResponses, ListWorkflowsData, ListWorkflowsError, ListWorkflowsErrors, ListWorkflowsResponse, ListWorkflowsResponses, ListWorkspaceApiKeysData, ListWorkspaceApiKeysError, ListWorkspaceApiKeysErrors, ListWorkspaceApiKeysResponse, ListWorkspaceApiKeysResponse2, ListWorkspaceApiKeysResponses, ListWorkspaceInvitesData, ListWorkspaceInvitesError, ListWorkspaceInvitesErrors, ListWorkspaceInvitesResponse, ListWorkspaceInvitesResponses, ListWorkspaceMembersData, ListWorkspaceMembersError, ListWorkspaceMembersErrors, ListWorkspaceMembersResponse, ListWorkspaceMembersResponses, ListWorkspacesData, ListWorkspacesError, ListWorkspacesErrors, ListWorkspacesResponse, ListWorkspacesResponse2, ListWorkspacesResponses, ManageHistoryData, ManageHistoryError, ManageHistoryErrors, ManageHistoryResponses, ManageQueueData, ManageQueueError, ManageQueueErrors, ManageQueueResponse, ManageQueueResponses, Member, ModelFile, ModelFolder, MoveUserdataFileData, MoveUserdataFileError, MoveUserdataFileErrors, MoveUserdataFileResponse, MoveUserdataFileResponses, NodeInfo, OAuthAuthorizationServerMetadata, OAuthAuthorizeRedirectResponse, OAuthConsentChallenge, OAuthConsentChallengeWorkspace, OAuthProtectedResourceMetadata, OAuthRegisterBadRequestResponse, OAuthRegisterError, OAuthRegisterRequest, OAuthRegisterResponse, OAuthTokenError, OAuthTokenResponse, PaginationInfo, PaymentPortalRequest, PaymentPortalResponse, PendingInvite, Plan, PlanAvailability, PlanAvailabilityReason, PlanSeatSummary, PostAssetsFromWorkflowData, PostAssetsFromWorkflowError, PostAssetsFromWorkflowErrors, PostAssetsFromWorkflowResponse, PostAssetsFromWorkflowResponses, PostCustomNodeProxyData, PostCustomNodeProxyErrors, PostCustomNodeProxyResponses, PostOAuthAuthorizeData, PostOAuthAuthorizeError, PostOAuthAuthorizeErrors, PostOAuthAuthorizeResponse, PostOAuthAuthorizeResponses, PostOAuthRegisterData, PostOAuthRegisterError, PostOAuthRegisterErrors, PostOAuthRegisterResponse, PostOAuthRegisterResponses, PostOAuthTokenData, PostOAuthTokenError, PostOAuthTokenErrors, PostOAuthTokenResponse, PostOAuthTokenResponses, PostUserdataFileData, PostUserdataFileError, PostUserdataFileErrors, PostUserdataFilePublishData, PostUserdataFilePublishError, PostUserdataFilePublishErrors, PostUserdataFilePublishResponse, PostUserdataFilePublishResponses, PostUserdataFileResponse, PostUserdataFileResponses, PreviewPlanInfo, PreviewSubscribeData, PreviewSubscribeError, PreviewSubscribeErrors, PreviewSubscribeRequest, PreviewSubscribeResponse, PreviewSubscribeResponse2, PreviewSubscribeResponses, PromptErrorResponse, PromptInfo, PromptRequest, PromptResponse, PruneAssetsData, PruneAssetsResponse, PruneAssetsResponses, PublishedWorkflowDetail, PublishHubWorkflowData, PublishHubWorkflowError, PublishHubWorkflowErrors, PublishHubWorkflowRequest, PublishHubWorkflowResponse, PublishHubWorkflowResponses, PublishWorkflowAssetsRequest, QueueInfo, QueueManageRequest, QueueManageResponse, RedeemDesktopLoginCodeData, RedeemDesktopLoginCodeError, RedeemDesktopLoginCodeErrors, RedeemDesktopLoginCodeResponse, RedeemDesktopLoginCodeResponses, RemoveAssetTagsData, RemoveAssetTagsError, RemoveAssetTagsErrors, RemoveAssetTagsResponse, RemoveAssetTagsResponses, RemoveWorkspaceMemberData, RemoveWorkspaceMemberError, RemoveWorkspaceMemberErrors, RemoveWorkspaceMemberResponse, RemoveWorkspaceMemberResponses, ResubscribeData, ResubscribeError, ResubscribeErrors, ResubscribeRequest, ResubscribeResponse, ResubscribeResponse2, ResubscribeResponses, RevokeWorkspaceApiKeyData, RevokeWorkspaceApiKeyError, RevokeWorkspaceApiKeyErrors, RevokeWorkspaceApiKeyResponse, RevokeWorkspaceApiKeyResponses, RevokeWorkspaceInviteData, RevokeWorkspaceInviteError, RevokeWorkspaceInviteErrors, RevokeWorkspaceInviteResponse, RevokeWorkspaceInviteResponses, SecretListResponse, SecretProvider, SecretProvidersResponse, SecretResponse, SeedAssetsData, SeedAssetsResponse, SeedAssetsResponses, SubmitFeedbackData, SubmitFeedbackError, SubmitFeedbackErrors, SubmitFeedbackResponse, SubmitFeedbackResponses, SubscribeData, SubscribeError, SubscribeErrors, SubscribeRequest, SubscribeResponse, SubscribeResponse2, SubscribeResponses, SubscribeToLogsData, SubscribeToLogsResponses, SubscriptionDuration, SubscriptionTier, SystemStatsResponse, TagInfo, TagsModificationResponse, TaskEntry, TaskResponse, TasksListResponse, TeamCreditStop, TeamCreditStopPrice, TeamCreditStops, TeamCreditStopSummary, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetResponse, UpdateAssetResponses, UpdateHubProfileData, UpdateHubProfileError, UpdateHubProfileErrors, UpdateHubProfileRequest, UpdateHubProfileResponse, UpdateHubProfileResponses, UpdateMemberRoleRequest, UpdateMultipleSettingsData, UpdateMultipleSettingsError, UpdateMultipleSettingsErrors, UpdateMultipleSettingsResponse, UpdateMultipleSettingsResponses, UpdateSecretData, UpdateSecretError, UpdateSecretErrors, UpdateSecretRequest, UpdateSecretResponse, UpdateSecretResponses, UpdateSettingByIdData, UpdateSettingByIdError, UpdateSettingByIdErrors, UpdateSettingByIdResponse, UpdateSettingByIdResponses, UpdateWorkflowData, UpdateWorkflowError, UpdateWorkflowErrors, UpdateWorkflowRequest, UpdateWorkflowResponse, UpdateWorkflowResponses, UpdateWorkspaceData, UpdateWorkspaceError, UpdateWorkspaceErrors, UpdateWorkspaceMemberRoleData, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRoleErrors, UpdateWorkspaceMemberRoleResponse, UpdateWorkspaceMemberRoleResponses, UpdateWorkspaceRequest, UpdateWorkspaceResponse, UpdateWorkspaceResponses, UploadImageData, UploadImageError, UploadImageErrors, UploadImageResponse, UploadImageResponses, UploadMaskData, UploadMaskError, UploadMaskErrors, UploadMaskResponse, UploadMaskResponses, UserDataResponseFull, UserResponse, ValidationError, ValidationResult, ViewFileData, ViewFileError, ViewFileErrors, ViewFileResponse, ViewFileResponses, WorkflowApiAssetsRequest, WorkflowApiAssetsResponse, WorkflowForkedFrom, WorkflowListResponse, WorkflowPublishInfo, WorkflowResponse, WorkflowVersionContentResponse, WorkflowVersionResponse, Workspace, WorkspaceApiKeyInfo, WorkspaceSummary, WorkspaceWithRole } from './types.gen'; diff --git a/packages/ingest-types/src/types.gen.ts b/packages/ingest-types/src/types.gen.ts index 19f04d9742c..85c94960fa1 100644 --- a/packages/ingest-types/src/types.gen.ts +++ b/packages/ingest-types/src/types.gen.ts @@ -1,11087 +1,9471 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}) -} + baseUrl: `${string}://${string}` | (string & {}); +}; /** - * Response indicating whether a Hub username is available. + * Workspace entity annotated with the requesting user's role. */ -export type HubUsernameCheckResponse = { - /** - * The username that was checked. - */ - username: string - /** - * Whether the username is available for the caller's workspace. - */ - available: boolean - /** - * Up to 5 available alternative usernames (only present when unavailable). - */ - suggestions?: Array - /** - * If the username format is invalid, describes the format requirement. - */ - validation_error?: string -} +export type WorkspaceWithRole = { + /** + * When the workspace was created + */ + created_at: string; + id: string; + /** + * When the user joined the workspace (same as created_at for the workspace creator) + */ + joined_at: string; + name: string; + role: 'owner' | 'member'; + subscription_tier?: SubscriptionTier; + type: 'personal' | 'team'; +}; /** - * Response containing a signed upload URL and the target asset path. + * Subscription tier (uppercase to match comfy-api) */ -export type HubAssetUploadUrlResponse = { - /** - * Presigned R2 URL for uploading the file via PUT. - */ - upload_url: string - /** - * The public URL where the file will be accessible after upload. - */ - public_url: string - /** - * Signed token to pass in the publish request. Has a server-determined TTL. - */ - token: string -} +export type SubscriptionTier = 'FREE' | 'STANDARD' | 'CREATOR' | 'PRO' | 'FOUNDERS_EDITION' | 'TEAM'; /** - * Request body for requesting a signed upload URL for a Hub asset. - */ -export type HubAssetUploadUrlRequest = { - /** - * Original filename for display purposes. Not used in the storage key. - */ - filename: string - /** - * MIME type of the file (e.g. "image/jpeg", "video/mp4"). Validated against a whitelist; the canonical file extension is derived from this value. - * - */ - content_type: string -} - -/** - * Partial update for a published hub workflow (admin moderation). All fields are optional. Semantics match UpdateHubProfileRequest / avatar_token: - * - * * field omitted or null — leave unchanged - * * string field = "" — clear (for clearable string fields) - * * array field = [] — clear the list - * * any other value — set to the provided value - * - * Array fields use full-replacement (PUT) semantics when a value is supplied. The two single-value thumbnail token fields accept only upload tokens (not existing URLs) since omitting them already expresses "keep the current value". - * Backend note: cleared string columns are persisted as the empty string "" in the Ent schema (description, thumbnail_url, thumbnail_comparison_url, tutorial_url). thumbnail_type is the only true SQL-nullable column but is not clearable via this endpoint. - * + * Abbreviated workspace metadata used in list responses. */ -export type UpdateHubWorkflowRequest = { - /** - * Display name. Not clearable. Null/omit leaves unchanged; empty string is invalid. - */ - name?: string | null - /** - * Workflow description. Send "" to clear. Null/omit leaves unchanged. - */ - description?: string | null - /** - * Full replacement of tag slugs. Must exist in hub_labels. Send [] to clear. Null/omit leaves unchanged. - */ - tags?: Array | null - /** - * Full replacement of model slugs. Must exist in hub_labels. Send [] to clear. Null/omit leaves unchanged. - */ - models?: Array | null - /** - * Full replacement of custom_node slugs. Must exist in hub_labels. Send [] to clear. Null/omit leaves unchanged. - */ - custom_nodes?: Array | null - /** - * Tutorial URL. Send "" to clear. Null/omit leaves unchanged. - */ - tutorial_url?: string | null - /** - * Thumbnail kind. Null/omit leaves unchanged; not clearable via this endpoint. If set to image_comparison, both the thumbnail and comparison thumbnail must resolve to a value on the stored record after this update is applied (either already present and not being cleared, or supplied as a token in this request). - * - */ - thumbnail_type?: 'image' | 'video' | 'image_comparison' - /** - * Token from POST /api/hub/assets/upload-url for a newly uploaded thumbnail. Null/omit leaves the existing thumbnail unchanged. Send "" to clear. (PATCH does not accept an existing public URL here — to keep the current thumbnail, simply omit the field.) - * - */ - thumbnail_token?: string | null - /** - * Token from POST /api/hub/assets/upload-url for a newly uploaded comparison thumbnail. Null/omit leaves unchanged. Send "" to clear. (PATCH does not accept an existing public URL here — to keep the current comparison thumbnail, simply omit the field.) - * - */ - thumbnail_comparison_token?: string | null - /** - * Full replacement of sample images. Each element is either a token from /api/hub/assets/upload-url or an existing public URL. Send [] to clear. Null/omit leaves unchanged. - * - */ - sample_image_tokens_or_urls?: Array | null - /** - * Admin-only full replacement of the hub_workflow_detail.metadata JSON object. Null/omit leaves unchanged. Send {} to clear all keys. Accepts arbitrary JSON (size, vram, open_source, media_type, logos, etc.). - * - */ - metadata?: { - [key: string]: unknown - } | null -} +export type WorkspaceSummary = { + id: string; + name: string; + type: 'personal' | 'team'; +}; /** - * Request body for publishing or updating a workflow on the Hub. + * Metadata for a workspace-scoped API key (secret is never returned). */ -export type PublishHubWorkflowRequest = { - /** - * Username of the hub profile to publish under. The authenticated user must belong to the workspace that owns this profile. - */ - username: string - /** - * Display name for the published workflow on the hub. - */ - name: string - /** - * Userdata path of the workflow file (e.g. "workflows/my-flow.json"). - */ - workflow_filename: string - /** - * IDs of assets (inputs and models) to snapshot. - */ - asset_ids: Array - /** - * Workflow description for the hub listing. - */ - description?: string - /** - * Searchable tag slugs. Must exist in hub_labels. - */ - tags?: Array - /** - * Model slugs. Must exist in hub_labels. - */ - models?: Array - /** - * Custom node slugs. Must exist in hub_labels. - */ - custom_nodes?: Array - /** - * URL to a tutorial for this workflow. - */ - tutorial_url?: string - /** - * Arbitrary metadata (size, vram, open_source, etc.). Reserved keys (extended_description, meta_description, how_to_use, suggested_use_cases, faq_items, content_template) are backend-managed and will be stripped if supplied. - */ - metadata?: { - [key: string]: unknown - } - thumbnail_type?: 'image' | 'video' | 'image_comparison' - /** - * Token (from /api/hub/assets/upload-url) for a new upload, or an existing public URL from the previous published version. Omit to have no thumbnail. - * - */ - thumbnail_token_or_url?: string - /** - * Token or existing public URL from the previous published version. Omit to have no comparison image. - * - */ - thumbnail_comparison_token_or_url?: string - /** - * Array of tokens or existing public URLs from the previous published version. Full replacement (PUT semantics). Omit or pass [] to have no sample images. - * - */ - sample_image_tokens_or_urls?: Array -} +export type WorkspaceApiKeyInfo = { + /** + * When the key was created + */ + created_at: 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; + /** + * When the key expires (if set) + */ + expires_at?: string; + /** + * API key ID + */ + id: string; + /** + * First 8 chars after prefix for display + */ + key_prefix: string; + /** + * Last time the key was used + */ + last_used_at?: string; + /** + * User-provided label + */ + name: string; + /** + * When the key was revoked (if revoked) + */ + revoked_at?: string; + /** + * User who created this key + */ + user_id: string; + /** + * Workspace this key belongs to + */ + workspace_id: string; +}; /** - * Paginated list of Hub workflows matching search criteria. + * Full workspace entity with configuration and ownership details. */ -export type HubWorkflowListResponse = { - /** - * Array of HubWorkflowSummary (default) or HubWorkflowDetail (when detail=true). - */ - workflows: Array - /** - * Cursor for the next page, empty if no more results. - */ - next_cursor?: string -} +export type Workspace = { + created_at: string; + id: string; + name: string; + type: 'personal' | 'team'; +}; /** - * Lightweight asset reference used in workflow publishing payloads. + * Metadata for a single workflow version. */ -export type AssetInfo = { - /** - * Asset identifier. - */ - id: string - name: string - /** - * Signed URL for previewing the asset. - */ - preview_url: string - storage_url: string - /** - * Whether this asset is a model. - */ - model: boolean - /** - * Whether this is a public (platform-provided) asset. - */ - public: boolean - /** - * Whether the caller already owns this asset. - */ - in_library: boolean -} +export type WorkflowVersionResponse = { + created_at: string; + created_by: string; + id: string; + latest_version: number; + version: number; +}; /** - * Full Hub workflow detail including versions, assets, and statistics. + * Full workflow version including the serialized workflow JSON. */ -export type HubWorkflowDetail = { - share_id: string - workflow_id: string - name: string - status: HubWorkflowStatus - description?: string - tags?: Array - thumbnail_type?: 'image' | 'video' | 'image_comparison' - thumbnail_url?: string - thumbnail_comparison_url?: string - models?: Array - custom_nodes?: Array - tutorial_url?: string - metadata?: { - [key: string]: unknown - } - sample_image_urls?: Array - publish_time?: string | null - workflow_json: { - [key: string]: unknown - } - /** - * Published assets. Each asset's id is the published asset ID (not the original private asset ID). - */ - assets: Array - profile: HubProfileSummary -} +export type WorkflowVersionContentResponse = { + created_at: string; + created_by: string; + dependency_asset_ids?: Array; + id: string; + version: number; + workflow_json: { + [key: string]: unknown; + }; +}; /** - * Abbreviated Hub profile used in workflow listings. + * Full workflow entity including metadata and version history. */ -export type HubProfileSummary = { - username: string - display_name?: string - /** - * Public URL of the profile avatar image. - */ - avatar_url?: string -} +export type WorkflowResponse = { + created_at: string; + created_by: string; + default_view?: 'workflow' | 'app'; + description?: string; + forked_from?: WorkflowForkedFrom; + id: string; + latest_version: number; + name?: string; + updated_at: string; +}; /** - * Reference to a Hub label by ID. + * Reference to the parent workflow from which this workflow was forked. */ -export type LabelRef = { - /** - * Slug identifier (e.g. "video-generation", "flux"). - */ - name: string - /** - * Human-readable display name (e.g. "Video Generation", "Flux"). - */ - display_name: string -} +export type WorkflowForkedFrom = { + workflow_id?: string; + workflow_version_id?: string; +}; /** - * Public workflow status. NULL in the database is represented as pending in API responses. + * Publishing metadata for a workflow shared to the Hub. */ -export type HubWorkflowStatus = - | 'pending' - | 'approved' - | 'rejected' - | 'deprecated' +export type WorkflowPublishInfo = { + /** + * Published assets (inputs and models). + */ + assets: Array; + listed: boolean; + publish_time?: string | null; + share_id: string; + workflow_id: string; +}; /** - * Abbreviated Hub workflow metadata used in search and listing results. + * Lightweight asset reference used in workflow publishing payloads. */ -export type HubWorkflowSummary = { - share_id: string - name: string - status: HubWorkflowStatus - description?: string - tags?: Array - models?: Array - custom_nodes?: Array - thumbnail_type?: 'image' | 'video' | 'image_comparison' - thumbnail_url?: string - thumbnail_comparison_url?: string - publish_time?: string | null - profile: HubProfileSummary - metadata?: { - [key: string]: unknown - } - tutorial_url?: string - sample_image_urls?: Array -} +export type AssetInfo = { + /** + * Asset identifier. + */ + id: string; + /** + * Whether the caller already owns this asset. + */ + in_library: boolean; + /** + * Whether this asset is a model. + */ + model: boolean; + name: string; + /** + * Signed URL for previewing the asset. + */ + preview_url: string; + /** + * Whether this is a public (platform-provided) asset. + */ + public: boolean; + storage_url: string; +}; /** - * Metadata for a single Hub label. + * Paginated list of saved workflows. */ -export type HubLabelInfo = { - /** - * Slug identifier. - */ - name: string - /** - * Human-readable display name. - */ - display_name: string - /** - * Optional description of the label. - */ - description?: string - /** - * Label category. - */ - type: 'tag' | 'model' | 'custom_node' -} +export type WorkflowListResponse = { + data: Array; + pagination: PaginationInfo; +}; /** - * List of available Hub labels for categorizing workflows. + * Pagination metadata included in list responses. Supports both legacy + * offset/limit pagination and cursor-based pagination. When cursor-based + * pagination is used, `next_cursor` is the primary pagination token and + * `offset`/`total` may be zero. + * */ -export type HubLabelListResponse = { - /** - * Available labels filtered by type (or all if no type specified). - */ - labels: Array -} +export type PaginationInfo = { + /** + * Whether more items are available beyond this page + */ + has_more: boolean; + /** + * Items per page + */ + limit: number; + /** + * Opaque cursor for the next page. Pass this value as the `after` + * query parameter on the next request. Empty or absent when there + * are no more results. + * + */ + next_cursor?: string; + /** + * Current offset (0-based). Deprecated: use cursor-based pagination. + * + * @deprecated + */ + offset: number; + /** + * Total number of items matching filters (may be 0 when using cursor pagination) + */ + total: number; +}; /** - * Entry in the curated workflow template gallery shown on the home page. + * Response containing assets associated with a workflow. */ -export type HubWorkflowTemplateEntry = { - /** - * Slug identifier for the template - */ - name: string - title: string - status: HubWorkflowStatus - description?: string - tags?: Array - models?: Array - requiresCustomNodes?: Array - thumbnailVariant?: string - mediaType?: string - mediaSubtype?: string - /** - * Workflow asset size in bytes. - */ - size?: number - /** - * Approximate VRAM requirement in bytes. - */ - vram?: number - /** - * Usage count reported upstream. - */ - usage?: number - /** - * Search ranking score reported upstream. - */ - searchRank?: number - /** - * Whether the template belongs to a module marked as essential. - */ - isEssential?: boolean - openSource?: boolean - profile?: HubProfileSummary - tutorialUrl?: string - logos?: Array<{ - [key: string]: unknown - }> - /** - * Publication date in YYYY-MM-DD format - */ - date?: string - io?: { - inputs?: Array<{ - [key: string]: unknown - }> - outputs?: Array<{ - [key: string]: unknown - }> - } - includeOnDistributions?: Array - /** - * Public URL of the primary thumbnail - */ - thumbnailUrl?: string - /** - * Public URL of the comparison thumbnail - */ - thumbnailComparisonUrl?: string - /** - * Share ID for linking to the hub workflow detail - */ - shareId?: string - /** - * AI-generated extended description of the workflow - */ - extendedDescription?: string - /** - * AI-generated SEO meta description (under 160 chars) - */ - metaDescription?: string - /** - * AI-generated step-by-step usage instructions - */ - howToUse?: Array - /** - * AI-generated suggested use cases - */ - suggestedUseCases?: Array - /** - * AI-generated FAQ items - */ - faqItems?: Array<{ - question: string - answer: string - }> - /** - * Content template used for generation (tutorial, showcase, comparison, breakthrough) - */ - contentTemplate?: string -} +export type WorkflowApiAssetsResponse = { + assets: Array; +}; /** - * Request body for updating an existing Hub profile. + * Request body for querying assets associated with a workflow. */ -export type UpdateHubProfileRequest = { - display_name?: string - description?: string - /** - * Token (from /api/hub/assets/upload-url) for a new avatar image. Omit or send null to leave unchanged; send empty string "" to remove. - * - */ - avatar_token?: string | null - /** - * List of website URLs. - */ - website_urls?: Array -} +export type WorkflowApiAssetsRequest = { + workflow_api_json: { + [key: string]: unknown; + }; +}; /** - * Request body for creating a new Hub profile. + * Result of validating a set of asset operations. */ -export type CreateHubProfileRequest = { - /** - * ID of the workspace to create the hub profile for. The authenticated user must belong to this workspace. - */ - workspace_id: string - /** - * Unique URL-safe slug for the hub profile. Immutable after creation. - */ - username: string - display_name?: string - description?: string - /** - * Token (from /api/hub/assets/upload-url) for an avatar image. Omit to have no avatar. - * - */ - avatar_token?: string - /** - * List of website URLs. - */ - website_urls?: Array -} +export type ValidationResult = { + /** + * Blocking validation errors that prevent download + */ + errors?: Array; + /** + * Overall validation status (true if all checks passed) + */ + is_valid: boolean; + /** + * Non-blocking validation warnings (informational only) + */ + warnings?: Array; +}; /** - * Full public profile for a Hub creator. + * Details of a single validation error encountered during asset operations. */ -export type HubProfile = { - username: string - display_name?: string - description?: string - /** - * Public URL of the profile avatar image. - */ - avatar_url?: string - /** - * List of website URLs. - */ - website_urls?: Array -} +export type ValidationError = { + /** + * Machine-readable error code + */ + code: string; + /** + * Field that failed validation + */ + field: string; + /** + * Human-readable error message + */ + message: string; +}; /** - * Response after importing published workflow assets. + * User information response */ -export type ImportPublishedAssetsResponse = { - assets: Array -} +export type UserResponse = { + /** + * Firebase UID of the authenticated user + */ + id: string; + /** + * User status (always "active" for authenticated users) + */ + status: string; +}; /** - * Request body for importing assets from a published workflow. + * User data listing entry with file metadata (path, size, modification time). */ -export type ImportPublishedAssetsRequest = { - /** - * IDs of published assets (inputs and models) to import. - */ - published_asset_ids: Array - /** - * Optional. Share ID of the published workflow these assets belong to. - * When provided (non-null, non-empty): all published_asset_ids must - * belong to this share's workflow version; returns - * 400/CodeInvalidAssets if the share is not found or any asset does - * not belong to it. - * When omitted, null, or empty string: no share-scoped validation is - * performed and the assets are validated only against global rules - * (legacy behaviour, preserved for clients that have not yet adopted - * share_id). - * - */ - share_id?: string | null -} +export type UserDataResponseFull = { + /** + * UNIX timestamp of the last modification in milliseconds. + */ + modified?: number; + path?: string; + size?: number; +}; /** - * Full detail of a publicly published workflow on the Hub. + * Request body for updating an existing workspace's settings. */ -export type PublishedWorkflowDetail = { - share_id: string - workflow_id: string - /** - * Human-readable workflow name. - */ - name: string - listed: boolean - publish_time?: string | null - /** - * The workflow JSON content at publish time. - */ - workflow_json: { - [key: string]: unknown - } - /** - * Published assets with their library status for the caller. - */ - assets: Array -} +export type UpdateWorkspaceRequest = { + /** + * New display name for the workspace + */ + name?: string; +}; /** - * Response containing assets associated with a workflow. + * Request body for updating an existing saved workflow. */ -export type WorkflowApiAssetsResponse = { - assets: Array -} +export type UpdateWorkflowRequest = { + /** + * New default view mode + */ + default_view?: 'workflow' | 'app'; + /** + * New description + */ + description?: string; + /** + * New display name + */ + name?: string; +}; /** - * Request body for querying assets associated with a workflow. + * Request body for updating an existing user secret. */ -export type WorkflowApiAssetsRequest = { - workflow_api_json: { - [key: string]: unknown - } -} +export type UpdateSecretRequest = { + /** + * New name for the secret + */ + name?: string; + /** + * New secret value (API key, token, etc.) + */ + secret_value?: string; +}; /** - * Request body for publishing workflow assets to the Hub. + * Request body for changing a workspace member's role. */ -export type PublishWorkflowAssetsRequest = { - /** - * IDs of assets (inputs and models) to snapshot. - */ - asset_ids: Array -} +export type UpdateMemberRoleRequest = { + /** + * The role to assign to the member + */ + role: 'owner' | 'member'; +}; /** - * Publishing metadata for a workflow shared to the Hub. + * Request body for updating an existing Hub profile. */ -export type WorkflowPublishInfo = { - workflow_id: string - share_id: string - publish_time?: string | null - listed: boolean - /** - * Published assets (inputs and models). - */ - assets: Array -} +export type UpdateHubProfileRequest = { + /** + * Token (from /api/hub/assets/upload-url) for a new avatar image. Omit or send null to leave unchanged; send empty string "" to remove. + * + */ + avatar_token?: string | null; + description?: string; + display_name?: string; + /** + * List of website URLs. + */ + website_urls?: Array; +}; /** - * Request body for forking an existing workflow into the user's account. + * Credit-stop ladder for the pricing slider (BE-1254). Returned by GET /api/billing/plans for every workspace regardless of the caller's token or workspace type (the personal/team distinction was removed); omitted only when the catalog defines no stops. */ -export type ForkWorkflowRequest = { - /** - * Version number to fork from - */ - source_version: number - /** - * Name for the forked workflow - */ - name?: string -} +export type TeamCreditStops = { + /** + * Index into stops[] for the slider's initial position + */ + default_stop_index: number; + stops: Array; +}; /** - * Full workflow version including the serialized workflow JSON. + * Pre/post-discount price for a team credit stop, in cents. */ -export type WorkflowVersionContentResponse = { - id: string - version: number - workflow_json: { - [key: string]: unknown - } - created_by: string - created_at: string - dependency_asset_ids?: Array -} +export type TeamCreditStopPrice = { + /** + * Pre-discount (struck-through) price in cents + */ + list_price_cents: number; + /** + * Post-discount (bold) price in cents + */ + price_cents: number; +}; /** - * Metadata for a single workflow version. + * A selectable preset on the team pricing slider. Echoed on subscribe via + * team_credit_stop_id; the backend owns the resolved amounts. credits is a + * RAW monthly credit count (not cents). Save% is derived by the FE as + * (list_price_cents - price_cents) / list_price_cents. + * */ -export type WorkflowVersionResponse = { - id: string - version: number - latest_version: number - created_by: string - created_at: string -} +export type TeamCreditStop = { + /** + * Raw monthly credit count granted at this stop + */ + credits: number; + /** + * Stable stop id echoed on subscribe (e.g. "team_700") + */ + id: string; + monthly: TeamCreditStopPrice; + yearly: TeamCreditStopPrice; +}; /** - * Request body for creating a new version of a saved workflow. + * The team credit stop a workspace is currently subscribed to: the + * per-workspace slider choice recorded at subscribe time + * (workspace_subscriptions.team_credit_stop_id). Amounts are owned by the + * catalog, not the subscription row. Returned on GET /api/billing/status + * for per-credit Team plans (BE-1254). + * */ -export type CreateWorkflowVersionRequest = { - /** - * The version number this change is based on (for optimistic concurrency) - */ - base_version: number - /** - * The updated ComfyUI workflow JSON - */ - workflow_json: { - [key: string]: unknown - } -} +export type TeamCreditStopSummary = { + /** + * Raw monthly credit count granted at this stop + */ + credits_monthly: number; + /** + * Stable stop id (e.g. "team_200") + */ + id: string; + /** + * Monthly USD commitment for this stop + */ + stop_usd: number; +}; /** - * Paginated list of saved workflows. + * Paginated list of background tasks for the authenticated user. */ -export type WorkflowListResponse = { - data: Array - pagination: PaginationInfo -} +export type TasksListResponse = { + pagination: PaginationInfo; + /** + * Array of tasks ordered by create_time + */ + tasks: Array; +}; /** - * Pagination metadata included in list responses. Supports both legacy - * offset/limit pagination and cursor-based pagination. When cursor-based - * pagination is used, `next_cursor` is the primary pagination token and - * `offset`/`total` may be zero. - * + * Task data for list views */ -export type PaginationInfo = { - /** - * Current offset (0-based). Deprecated: use cursor-based pagination. - * - * @deprecated - */ - offset: number - /** - * Items per page - */ - limit: number - /** - * Total number of items matching filters (may be 0 when using cursor pagination) - */ - total: number - /** - * Whether more items are available beyond this page - */ - has_more: boolean - /** - * Opaque cursor for the next page. Pass this value as the `after` - * query parameter on the next request. Empty or absent when there - * are no more results. - * - */ - next_cursor?: string -} +export type TaskEntry = { + /** + * When task completed or failed (null if not finished) + */ + completed_at?: string; + /** + * Task creation timestamp + */ + create_time: string; + /** + * Unique task identifier + */ + id: string; + /** + * When task execution started (null if not started) + */ + started_at?: string; + /** + * Current task status + */ + status: 'created' | 'running' | 'completed' | 'failed'; + /** + * Task type name (e.g., model_upload) + */ + task_name: string; +}; /** - * Reference to the parent workflow from which this workflow was forked. - */ -export type WorkflowForkedFrom = { - workflow_id?: string - workflow_version_id?: string -} - -/** - * Full workflow entity including metadata and version history. + * Full task details including payload and result */ -export type WorkflowResponse = { - id: string - name?: string - description?: string - default_view?: 'workflow' | 'app' - latest_version: number - forked_from?: WorkflowForkedFrom - created_by: string - created_at: string - updated_at: string -} +export type TaskResponse = { + /** + * When task completed or failed (null if not finished) + */ + completed_at?: string; + /** + * Task creation timestamp + */ + create_time: string; + /** + * Error message on failure (null if not failed) + */ + error_message?: string; + /** + * Unique task identifier + */ + id: string; + /** + * Caller-provided key for idempotent task creation + */ + idempotency_key: string; + /** + * Task input data + */ + payload: { + [key: string]: unknown; + }; + /** + * Task output data (null if not completed) + */ + result?: { + [key: string]: unknown; + }; + /** + * When task execution started (null if not started) + */ + started_at?: string; + /** + * Current task status + */ + status: 'created' | 'running' | 'completed' | 'failed'; + /** + * Task type name (e.g., model_upload) + */ + task_name: string; + /** + * Task last update timestamp + */ + update_time: string; +}; /** - * Request body for updating an existing saved workflow. + * Response after adding, updating, or removing tags on an asset. */ -export type UpdateWorkflowRequest = { - /** - * New display name - */ - name?: string - /** - * New description - */ - description?: string - /** - * New default view mode - */ - default_view?: 'workflow' | 'app' -} +export type TagsModificationResponse = { + /** + * Tags that were successfully added (for add operation) + */ + added?: Array; + /** + * Tags that were already present (for add operation) + */ + already_present?: Array; + /** + * Tags that were not present (for remove operation) + */ + not_present?: Array; + /** + * Tags that were successfully removed (for remove operation) + */ + removed?: Array; + /** + * All tags on the asset after the operation + */ + total_tags: Array; +}; /** - * Request body for creating a new saved workflow. + * Metadata for a single tag that can be applied to assets. */ -export type CreateWorkflowRequest = { - /** - * Display name for the workflow - */ - name?: string - /** - * Description of the workflow - */ - description?: string - /** - * Default view mode - */ - default_view?: 'workflow' | 'app' - /** - * The ComfyUI workflow JSON - */ - workflow_json: { - [key: string]: unknown - } - /** - * ID of the source workflow if forked - */ - forked_from_workflow_id?: string - /** - * ID of the source workflow version if forked - */ - forked_from_workflow_version_id?: string -} - -/** - * Request body for forwarding a comfy-api audit/history event. Identify the target workspace by either user_id (cloud resolves the user's personal workspace via the converged identity, BE-1047) or an explicit workspace_id. At least one must be provided; workspace_id wins when both are set. - */ -export type HistoryEventRequest = { - /** - * Originating comfy-api user (Firebase UID). The cloud resolves this to the user's personal workspace. Required unless workspace_id is set. - */ - user_id?: string - /** - * Cloud workspace ID to attach the history event to. Optional when user_id is provided. - */ - workspace_id?: string - /** - * Cloud billing event_type string for the user-facing history event. - */ - event_type: string - /** - * Unique event ID for idempotency. - */ - event_id: string - /** - * Event-specific properties copied from comfy-api audit_logs.params. - */ - params?: { - [key: string]: unknown - } - /** - * Optional credential class that produced the event. - */ - auth_method?: 'api_key' | 'bearer_token' - /** - * Optional originating comfy-api customer ID. - */ - customer_ref?: string - /** - * Optional source event timestamp; stored for forward compatibility. - */ - timestamp?: string -} - -/** - * Response after recording partner usage data. - */ -export type PartnerUsageResponse = { - /** - * Result status (e.g., "ok") - */ - status: string -} - -/** - * Request body for reporting partner resource usage (admin endpoint). - */ -export type PartnerUsageRequest = { - /** - * The workspace ID to bill usage against - */ - workspace_id: string - /** - * The user who triggered the usage (for attribution) - */ - user_id?: string - /** - * Unique transaction ID for idempotency - */ - transaction_id: string - /** - * Type of usage event (e.g., "api_node_usage") - */ - event_type: string - /** - * When the usage occurred. Defaults to current time if omitted. - */ - timestamp?: string - /** - * Event-specific properties for billing - */ - properties?: { - [key: string]: unknown - } -} +export type TagInfo = { + /** + * Number of assets using this tag + */ + count: number; + /** + * Tag name + */ + name: string; +}; /** - * Status of an asynchronous billing operation. + * System statistics response */ -export type BillingOpStatusResponse = { - /** - * Unique identifier for the billing operation - */ - id: string - /** - * Current status of the operation - */ - status: 'pending' | 'succeeded' | 'failed' - /** - * Error message if status is failed - */ - error_message?: string - /** - * When the operation was initiated - */ - started_at: string - /** - * When the operation completed (success or failure) - */ - completed_at?: string -} +export type SystemStatsResponse = { + devices: Array<{ + /** + * Device name + */ + name: string; + /** + * Device type + */ + type: string; + /** + * Free VRAM in bytes + */ + vram_free?: number; + /** + * Total VRAM in bytes + */ + vram_total?: number; + }>; + system: { + /** + * Command line arguments + */ + argv: Array; + /** + * Cloud ingest service version (commit hash) + */ + cloud_version?: string; + /** + * ComfyUI frontend version (commit hash or tag) + */ + comfyui_frontend_version?: string; + /** + * ComfyUI version + */ + comfyui_version: string; + /** + * How this ComfyUI instance is deployed (e.g. cloud, local-git, local-portable, local-desktop) + */ + deploy_environment?: string; + /** + * Whether using embedded Python + */ + embedded_python: boolean; + /** + * Operating system + */ + os: string; + /** + * Python version + */ + python_version: string; + /** + * PyTorch version + */ + pytorch_version: string; + /** + * Free RAM in bytes + */ + ram_free: number; + /** + * Total RAM in bytes + */ + ram_total: number; + /** + * Workflow templates version + */ + workflow_templates_version?: string; + }; +}; /** - * Response after successfully purchasing a credit top-up. + * Billing period (uppercase to match comfy-api) */ -export type CreateTopupResponse = { - /** - * Billing operation ID to poll for status via GET /api/billing/ops/{id} - */ - billing_op_id: string - /** - * Unique identifier for the top-up request (same as billing_op_id, deprecated) - */ - topup_id: string - /** - * Current status of the top-up - */ - status: 'pending' | 'completed' | 'failed' - /** - * Amount being charged in cents - */ - amount_cents: number -} +export type SubscriptionDuration = 'MONTHLY' | 'ANNUAL'; /** - * Request body for purchasing a one-time credit top-up. + * Response after successfully subscribing to a billing plan. */ -export type CreateTopupRequest = { - /** - * Amount to charge and grant as credits (in cents). Minimum $5.00. - */ - amount_cents: number - /** - * Client-provided key to prevent duplicate operations. - * If a billing op with this key already exists, returns the existing op instead of creating a new one. - * - */ - idempotency_key?: string -} +export type SubscribeResponse = { + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string; + /** + * When the subscription became/becomes active (present when status=subscribed or pending_payment) + */ + effective_at?: string; + /** + * URL to redirect user to add payment method (present when status=needs_payment_method) + */ + payment_method_url?: string; + /** + * Status of the subscription operation: + * - subscribed: Subscription is active immediately + * - needs_payment_method: User must add payment method via payment_method_url + * - pending_payment: Upgrade initiated, waiting for payment to complete + * + */ + status: 'subscribed' | 'needs_payment_method' | 'pending_payment'; +}; /** - * Response containing a redirect URL to the payment portal. + * Request body for subscribing a workspace to a billing plan. */ -export type PaymentPortalResponse = { - /** - * Stripe Billing Portal URL - */ - url: string -} +export type SubscribeRequest = { + /** + * Billing cycle for the team slider contract. When present it must be + * consistent with plan_slug (monthly -> team_per_credit_monthly, + * yearly -> team_per_credit_annual). + * + */ + billing_cycle?: 'monthly' | 'yearly'; + /** + * URL to redirect if user cancels the payment method flow. + * If not provided, return_url is used for both success and cancel. + * + */ + cancel_url?: string; + /** + * Client-provided key to prevent duplicate operations. + * If a billing op with this key already exists, returns the existing op instead of creating a new one. + * + */ + idempotency_key?: string; + /** + * Target plan slug to subscribe to + */ + plan_slug: string; + /** + * URL to redirect after payment method is added successfully. + * Required if workspace has no payment method on file. + * + */ + return_url?: string; + /** + * Selected team credit-stop preset id (e.g. "team_700") for the + * per-credit Team plan. Required when subscribing to a per-credit Team + * plan; rejected for non-team plans. The backend owns the resolved + * amounts (credits/price) for the stop. + * + */ + team_credit_stop_id?: string; +}; /** - * Request body for generating a payment portal session URL. + * User secret metadata (the secret value itself is never returned after creation). */ -export type PaymentPortalRequest = { - /** - * URL to redirect after the user exits the portal - */ - return_url?: string -} +export type SecretResponse = { + /** + * When the secret was created + */ + created_at: string; + /** + * Unique identifier for the secret + */ + id: string; + /** + * When the secret was last used for decryption + */ + last_used_at?: string; + /** + * User-provided label for the secret + */ + name: string; + /** + * Provider identifier (e.g., huggingface, civitai) + */ + provider?: string; + /** + * When the secret was last updated + */ + updated_at: string; +}; /** - * Response after accepting a resubscribe request. + * The providers available to the authenticated user in the current workspace. */ -export type ResubscribeResponse = { - /** - * Billing operation ID to poll for status via GET /api/billing/ops/{id} - */ - billing_op_id: string - /** - * Subscription outcome. `active` means the resubscribe committed (the scheduled cancellation was undone); `pending` means the operation is still executing — poll the billing operation for the final outcome. - */ - status: 'active' | 'pending' - /** - * Human-readable confirmation message - */ - message?: string -} +export type SecretProvidersResponse = { + data: Array; +}; /** - * Request body for reactivating a previously cancelled subscription. + * A provider the user may configure a secret for. The shape is deliberately minimal (identifier only) and reserved for future per-provider fields such as sub-keys. */ -export type ResubscribeRequest = { - /** - * Client-provided key to prevent duplicate operations. - * If a billing op with this key already exists, returns the existing op instead of creating a new one. - * - */ - idempotency_key?: string -} +export type SecretProvider = { + /** + * Provider identifier (e.g., huggingface, civitai, runway, gemini) + */ + id: string; +}; /** - * Response after successfully cancelling a subscription. + * List of user secrets with metadata only. */ -export type CancelSubscriptionResponse = { - /** - * Billing operation ID to poll for status via GET /api/billing/ops/{id} - */ - billing_op_id: string - /** - * The date when the subscription will end (end of current billing period) - */ - cancel_at: string -} +export type SecretListResponse = { + data: Array; +}; /** - * Request body for cancelling the current subscription. + * Response after accepting a resubscribe request. */ -export type CancelSubscriptionRequest = { - /** - * Client-provided key to prevent duplicate operations. - * If a billing op with this key already exists, returns the existing op instead of creating a new one. - * - */ - idempotency_key?: string -} +export type ResubscribeResponse = { + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string; + /** + * Human-readable confirmation message + */ + message?: string; + /** + * Subscription outcome. `active` means the resubscribe committed (the scheduled cancellation was undone); `pending` means the operation is still executing — poll the billing operation for the final outcome. + */ + status: 'active' | 'pending'; +}; /** - * Response after successfully subscribing to a billing plan. + * Request body for reactivating a previously cancelled subscription. */ -export type SubscribeResponse = { - /** - * Billing operation ID to poll for status via GET /api/billing/ops/{id} - */ - billing_op_id: string - /** - * Status of the subscription operation: - * - subscribed: Subscription is active immediately - * - needs_payment_method: User must add payment method via payment_method_url - * - pending_payment: Upgrade initiated, waiting for payment to complete - * - */ - status: 'subscribed' | 'needs_payment_method' | 'pending_payment' - /** - * When the subscription became/becomes active (present when status=subscribed or pending_payment) - */ - effective_at?: string - /** - * URL to redirect user to add payment method (present when status=needs_payment_method) - */ - payment_method_url?: string -} +export type ResubscribeRequest = { + /** + * Client-provided key to prevent duplicate operations. + * If a billing op with this key already exists, returns the existing op instead of creating a new one. + * + */ + idempotency_key?: string; +}; /** - * Request body for subscribing a workspace to a billing plan. + * Response after a queue management action (delete or clear). */ -export type SubscribeRequest = { - /** - * Target plan slug to subscribe to - */ - plan_slug: string - /** - * Selected team credit-stop preset id (e.g. "team_700") for the - * per-credit Team plan. Required when subscribing to a per-credit Team - * plan; rejected for non-team plans. The backend owns the resolved - * amounts (credits/price) for the stop. - * - */ - team_credit_stop_id?: string - /** - * Billing cycle for the team slider contract. When present it must be - * consistent with plan_slug (monthly -> team_per_credit_monthly, - * yearly -> team_per_credit_annual). - * - */ - billing_cycle?: 'monthly' | 'yearly' - /** - * Client-provided key to prevent duplicate operations. - * If a billing op with this key already exists, returns the existing op instead of creating a new one. - * - */ - idempotency_key?: string - /** - * URL to redirect after payment method is added successfully. - * Required if workspace has no payment method on file. - * - */ - return_url?: string - /** - * URL to redirect if user cancels the payment method flow. - * If not provided, return_url is used for both success and cancel. - * - */ - cancel_url?: string -} +export type QueueManageResponse = { + /** + * Whether the queue was cleared + */ + cleared?: boolean; + /** + * Array of job IDs that were successfully cancelled + */ + deleted?: Array; +}; /** - * Plan information for preview display + * Request to manage queue operations */ -export type PreviewPlanInfo = { - /** - * Plan slug - */ - slug: string - tier: SubscriptionTier - duration: SubscriptionDuration - /** - * Per-seat price in cents - */ - price_cents: number - /** - * Per-seat credits in cents - */ - credits_cents: number - seat_summary: PlanSeatSummary - /** - * Current billing period start (only for current_plan) - */ - period_start?: string - /** - * Current billing period end (only for current_plan) - */ - period_end?: string -} +export type QueueManageRequest = { + /** + * If true, clear all pending jobs from the queue + */ + clear?: boolean; + /** + * Array of job IDs to cancel; pending and running jobs transition to cancelled + */ + delete?: Array; +}; /** - * Summary of seat costs based on current workspace members + * Queue information with pending and running jobs */ -export type PlanSeatSummary = { - /** - * Total number of seats (owner + members) that would be charged - */ - seat_count: number - /** - * Total cost for all seats in cents - */ - total_cost_cents: number - /** - * Total credits granted for all seats in cents - */ - total_credits_cents: number -} +export type QueueInfo = { + /** + * Array of pending job items (ordered by creation time, oldest first) + */ + queue_pending?: Array<[ + unknown, + unknown, + unknown, + unknown, + unknown + ]>; + /** + * Array of currently running job items + */ + queue_running?: Array<[ + unknown, + unknown, + unknown, + unknown, + unknown + ]>; +}; /** - * Billing period (uppercase to match comfy-api) + * Full detail of a publicly published workflow on the Hub. */ -export type SubscriptionDuration = 'MONTHLY' | 'ANNUAL' +export type PublishedWorkflowDetail = { + /** + * Published assets with their library status for the caller. + */ + assets: Array; + listed: boolean; + /** + * Human-readable workflow name. + */ + name: string; + publish_time?: string | null; + share_id: string; + workflow_id: string; + /** + * The workflow JSON content at publish time. + */ + workflow_json: { + [key: string]: unknown; + }; +}; /** - * Subscription tier (uppercase to match comfy-api) + * Request body for publishing workflow assets to the Hub. */ -export type SubscriptionTier = - | 'FREE' - | 'STANDARD' - | 'CREATOR' - | 'PRO' - | 'FOUNDERS_EDITION' - | 'TEAM' +export type PublishWorkflowAssetsRequest = { + /** + * IDs of assets (inputs and models) to snapshot. + */ + asset_ids: Array; +}; /** - * Itemized cost preview for a pending subscription change. + * Request body for publishing or updating a workflow on the Hub. */ -export type PreviewSubscribeResponse = { - /** - * Whether this subscription change is allowed - */ - allowed: boolean - /** - * Reason why the change is not allowed (only present if allowed=false) - */ - reason?: string - /** - * Type of subscription transition - */ - transition_type: - | 'new_subscription' - | 'upgrade' - | 'downgrade' - | 'duration_change' - /** - * When the change takes effect - */ - effective_at: string - /** - * Whether the change takes effect immediately (true) or at period end (false) - */ - is_immediate: boolean - /** - * Amount to charge today in cents (0 for downgrades) - */ - cost_today_cents: number - /** - * Amount that will be charged at next billing period in cents - */ - cost_next_period_cents: number - /** - * Credits granted today in cents (prorated for mid-period upgrades) - */ - credits_today_cents: number - /** - * Credits that will be granted at next billing period in cents - */ - credits_next_period_cents: number - current_plan?: PreviewPlanInfo - new_plan: PreviewPlanInfo -} +export type PublishHubWorkflowRequest = { + /** + * IDs of assets (inputs and models) to snapshot. + */ + asset_ids: Array; + /** + * Custom node slugs. Must exist in hub_labels. + */ + custom_nodes?: Array; + /** + * Workflow description for the hub listing. + */ + description?: string; + /** + * Arbitrary metadata (size, vram, open_source, etc.). Reserved keys (extended_description, meta_description, how_to_use, suggested_use_cases, faq_items, content_template) are backend-managed and will be stripped if supplied. + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Model slugs. Must exist in hub_labels. + */ + models?: Array; + /** + * Display name for the published workflow on the hub. + */ + name: string; + /** + * Array of tokens or existing public URLs from the previous published version. Full replacement (PUT semantics). Omit or pass [] to have no sample images. + * + */ + sample_image_tokens_or_urls?: Array; + /** + * Searchable tag slugs. Must exist in hub_labels. + */ + tags?: Array; + /** + * Token or existing public URL from the previous published version. Omit to have no comparison image. + * + */ + thumbnail_comparison_token_or_url?: string; + /** + * Token (from /api/hub/assets/upload-url) for a new upload, or an existing public URL from the previous published version. Omit to have no thumbnail. + * + */ + thumbnail_token_or_url?: string; + thumbnail_type?: 'image' | 'video' | 'image_comparison'; + /** + * URL to a tutorial for this workflow. + */ + tutorial_url?: string; + /** + * Username of the hub profile to publish under. The authenticated user must belong to the workspace that owns this profile. + */ + username: string; + /** + * Userdata path of the workflow file (e.g. "workflows/my-flow.json"). + */ + workflow_filename: string; +}; /** - * Request body for previewing the cost of a plan subscription change. + * Response returned after successfully queuing a workflow prompt. */ -export type PreviewSubscribeRequest = { - /** - * Target plan slug to preview subscribing to - */ - plan_slug: string -} +export type PromptResponse = { + /** + * Any errors in the nodes of the prompt + */ + node_errors?: { + [key: string]: unknown; + }; + /** + * Priority number in the queue + */ + number?: number; + /** + * Unique identifier for the prompt execution + */ + prompt_id?: string; +}; /** - * List of available billing plans for subscription. + * Request body for submitting a ComfyUI workflow prompt for execution. */ -export type BillingPlansResponse = { - /** - * Current plan slug if subscribed - */ - current_plan_slug?: string - plans: Array - team_credit_stops?: TeamCreditStops -} +export type PromptRequest = { + /** + * Extra data to be associated with the prompt + */ + extra_data?: { + [key: string]: unknown; + }; + /** + * If true, adds the prompt to the front of the queue + */ + front?: boolean; + /** + * Priority number for the queue (lower numbers have higher priority) + */ + number?: number; + /** + * List of node names to execute + */ + partial_execution_targets?: Array; + /** + * The workflow graph to execute + */ + prompt: { + [key: string]: unknown; + }; + /** + * UUID identifying the cloud workflow entity to associate with this job + */ + workflow_id?: string; + /** + * UUID identifying the workflow version to associate with this job + */ + workflow_version_id?: string; +}; /** - * Pre/post-discount price for a team credit stop, in cents. + * Metadata about the currently running and queued prompts. */ -export type TeamCreditStopPrice = { - /** - * Pre-discount (struck-through) price in cents - */ - list_price_cents: number - /** - * Post-discount (bold) price in cents - */ - price_cents: number -} +export type PromptInfo = { + exec_info?: { + /** + * Number of items remaining in the queue + */ + queue_remaining?: number; + }; +}; /** - * A selectable preset on the team pricing slider. Echoed on subscribe via - * team_credit_stop_id; the backend owns the resolved amounts. credits is a - * RAW monthly credit count (not cents). Save% is derived by the FE as - * (list_price_cents - price_cents) / list_price_cents. - * + * Error response for ComfyUI prompt execution. */ -export type TeamCreditStop = { - /** - * Stable stop id echoed on subscribe (e.g. "team_700") - */ - id: string - /** - * Raw monthly credit count granted at this stop - */ - credits: number - monthly: TeamCreditStopPrice - yearly: TeamCreditStopPrice -} +export type PromptErrorResponse = { + [key: string]: unknown; +}; /** - * Credit-stop ladder for the pricing slider (BE-1254). Returned by GET /api/billing/plans for every workspace regardless of the caller's token or workspace type (the personal/team distinction was removed); omitted only when the catalog defines no stops. + * Itemized cost preview for a pending subscription change. */ -export type TeamCreditStops = { - /** - * Index into stops[] for the slider's initial position - */ - default_stop_index: number - stops: Array -} - -/** - * Reason why a plan is unavailable - */ -export type PlanAvailabilityReason = - | 'same_plan' - | 'incompatible_transition' - | 'requires_team' - | 'requires_personal' - | 'exceeds_max_seats' - -/** - * Availability and eligibility information for a billing plan. - */ -export type PlanAvailability = { - /** - * Whether the workspace can subscribe to this plan - */ - available: boolean - reason?: PlanAvailabilityReason -} - -/** - * Billing plan details including pricing, limits, and features. - */ -export type Plan = { - /** - * Plan identifier (e.g., "pro-monthly", "team-standard-annual") - */ - slug: string - tier: SubscriptionTier - duration: SubscriptionDuration - /** - * Per-member price in cents (base + one seat) - */ - price_cents: number - /** - * Per-member credits in cents (base + one seat) - */ - credits_cents: number - /** - * Maximum number of seats allowed for this plan - */ - max_seats: number - availability: PlanAvailability - seat_summary: PlanSeatSummary -} - -/** - * The team credit stop a workspace is currently subscribed to: the - * per-workspace slider choice recorded at subscribe time - * (workspace_subscriptions.team_credit_stop_id). Amounts are owned by the - * catalog, not the subscription row. Returned on GET /api/billing/status - * for per-credit Team plans (BE-1254). - * - */ -export type TeamCreditStopSummary = { - /** - * Stable stop id (e.g. "team_200") - */ - id: string - /** - * Raw monthly credit count granted at this stop - */ - credits_monthly: number - /** - * Monthly USD commitment for this stop - */ - stop_usd: number -} - -/** - * The providers available to the authenticated user in the current workspace. - */ -export type SecretProvidersResponse = { - data: Array -} - -/** - * A provider the user may configure a secret for. The shape is deliberately minimal (identifier only) and reserved for future per-provider fields such as sub-keys. - */ -export type SecretProvider = { - /** - * Provider identifier (e.g., huggingface, civitai, runway, gemini) - */ - id: string -} - -/** - * List of user secrets with metadata only. - */ -export type SecretListResponse = { - data: Array -} - -/** - * User secret metadata (the secret value itself is never returned after creation). - */ -export type SecretResponse = { - /** - * Unique identifier for the secret - */ - id: string - /** - * User-provided label for the secret - */ - name: string - /** - * Provider identifier (e.g., huggingface, civitai) - */ - provider?: string - /** - * When the secret was last used for decryption - */ - last_used_at?: string - /** - * When the secret was created - */ - created_at: string - /** - * When the secret was last updated - */ - updated_at: string -} +export type PreviewSubscribeResponse = { + /** + * Whether this subscription change is allowed + */ + allowed: boolean; + /** + * Amount that will be charged at next billing period in cents + */ + cost_next_period_cents: number; + /** + * Amount to charge today in cents (0 for downgrades) + */ + cost_today_cents: number; + /** + * Credits that will be granted at next billing period in cents + */ + credits_next_period_cents: number; + /** + * Credits granted today in cents (prorated for mid-period upgrades) + */ + credits_today_cents: number; + current_plan?: PreviewPlanInfo; + /** + * When the change takes effect + */ + effective_at: string; + /** + * Whether the change takes effect immediately (true) or at period end (false) + */ + is_immediate: boolean; + new_plan: PreviewPlanInfo; + /** + * Reason why the change is not allowed (only present if allowed=false) + */ + reason?: string; + /** + * Type of subscription transition + */ + transition_type: 'new_subscription' | 'upgrade' | 'downgrade' | 'duration_change'; +}; /** - * Request body for updating an existing user secret. + * Summary of seat costs based on current workspace members */ -export type UpdateSecretRequest = { - /** - * New name for the secret - */ - name?: string - /** - * New secret value (API key, token, etc.) - */ - secret_value?: string -} +export type PlanSeatSummary = { + /** + * Total number of seats (owner + members) that would be charged + */ + seat_count: number; + /** + * Total cost for all seats in cents + */ + total_cost_cents: number; + /** + * Total credits granted for all seats in cents + */ + total_credits_cents: number; +}; /** - * Request body for creating a new user secret. + * Plan information for preview display */ -export type CreateSecretRequest = { - /** - * User-provided label for the secret - */ - name: string - /** - * Optional provider identifier (e.g., huggingface, civitai) - */ - provider?: string - /** - * The plaintext secret to encrypt and store - */ - secret_value: string -} +export type PreviewPlanInfo = { + /** + * Per-seat credits in cents + */ + credits_cents: number; + duration: SubscriptionDuration; + /** + * Current billing period end (only for current_plan) + */ + period_end?: string; + /** + * Current billing period start (only for current_plan) + */ + period_start?: string; + /** + * Per-seat price in cents + */ + price_cents: number; + seat_summary: PlanSeatSummary; + /** + * Plan slug + */ + slug: string; + tier: SubscriptionTier; +}; /** - * Paginated list of billing events for a workspace. + * Request body for previewing the cost of a plan subscription change. */ -export type BillingEventsResponse = { - /** - * Total number of events - */ - total: number - events: Array - /** - * Current page number (1-indexed) - */ - page: number - /** - * Items per page - */ - limit: number - /** - * Total number of pages - */ - totalPages: number -} +export type PreviewSubscribeRequest = { + /** + * Target plan slug to preview subscribing to + */ + plan_slug: string; +}; /** - * A single history event. The cloud history-events store is the single source of truth for both billing events (charges, credits, adjustments) and user-facing usage events. + * Reason why a plan is unavailable */ -export type BillingEvent = { - /** - * Type of history event. Billing types (e.g. invoice_paid, checkout_completed, topup_completed) and the migrated user-facing usage types (account_created, credit_added, api_usage_completed, cloud_subscription_created, cloud_subscription_paid, cloud_subscription_credit_added, cloud_workflow_executed, free_tier_credit_granted). Kept as a free-form string for back-compat with existing billing-event consumers. - */ - event_type: string - /** - * Unique event identifier - */ - event_id: string - /** - * Event-specific parameters - */ - params?: { - [key: string]: unknown - } - /** - * When the event occurred - */ - createdAt: string -} +export type PlanAvailabilityReason = 'same_plan' | 'incompatible_transition' | 'requires_team' | 'requires_personal' | 'exceeds_max_seats'; /** - * Current credit balance and usage details for a workspace. + * Availability and eligibility information for a billing plan. */ -export type BillingBalanceResponse = { - /** - * The total remaining balance in microamount (1/1,000,000 of the currency unit) - */ - amount_micros: number - /** - * The remaining balance from prepaid commits in microamount - */ - prepaid_balance_micros?: number - /** - * The remaining balance from cloud credits in microamount - */ - cloud_credit_balance_micros?: number - /** - * The total amount of pending/unbilled charges from draft invoices in microamount - */ - pending_charges_micros?: number - /** - * The effective balance (total balance minus pending charges). Can be negative if pending charges exceed the balance. - */ - effective_balance_micros?: number - /** - * Currency code - */ - currency: string -} +export type PlanAvailability = { + /** + * Whether the workspace can subscribe to this plan + */ + available: boolean; + reason?: PlanAvailabilityReason; +}; /** - * Current billing and subscription status for a workspace. + * Billing plan details including pricing, limits, and features. */ -export type BillingStatusResponse = { - /** - * Whether the workspace has an active subscription - */ - is_active: boolean - /** - * Subscription activity status (scheduled subscriptions are not returned) - */ - subscription_status?: 'active' | 'ended' | 'canceled' - subscription_tier?: SubscriptionTier - subscription_duration?: SubscriptionDuration - /** - * Plan identifier (e.g., standard-monthly, team-pro-annual) - */ - plan_slug?: string - billing_status?: BillingStatus - /** - * Whether the workspace has available credits - */ - has_funds: boolean - /** - * When the subscription will become inactive (if canceled) - */ - cancel_at?: string - /** - * When the current billing period ends and the next one begins - */ - renewal_date?: string - /** - * The team credit stop the workspace is currently subscribed to, for per-credit Team plans (BE-1254). Lets clients tell apart team subscriptions, which all share subscription_tier=TEAM. Always present; null for personal plans (use subscription_tier to distinguish those) and for legacy team plans without a credit stop. - */ - team_credit_stop: TeamCreditStopSummary | null -} +export type Plan = { + availability: PlanAvailability; + /** + * Per-member credits in cents (base + one seat) + */ + credits_cents: number; + duration: SubscriptionDuration; + /** + * Maximum number of seats allowed for this plan + */ + max_seats: number; + /** + * Per-member price in cents (base + one seat) + */ + price_cents: number; + seat_summary: PlanSeatSummary; + /** + * Plan identifier (e.g., "pro-monthly", "team-standard-annual") + */ + slug: string; + tier: SubscriptionTier; +}; /** - * Payment lifecycle status + * An outstanding workspace invitation that has not yet been accepted. */ -export type BillingStatus = - | 'awaiting_payment_method' - | 'pending_payment' - | 'paid' - | 'payment_failed' - | 'inactive' +export type PendingInvite = { + /** + * Email address of the invited user + */ + email: string; + /** + * When the invite expires + */ + expires_at: string; + /** + * Invite ID + */ + id: string; + /** + * When the invite was created + */ + invited_at: string; + /** + * Invite token for constructing invite links. Empty for expired invites. + */ + token?: string; +}; /** - * A single JSON Web Key entry within a JWKS response. + * Response containing a redirect URL to the payment portal. */ -export type JwkKey = { - kty: string - crv: string - kid: string - use: string - alg: string - /** - * Base64url-encoded X coordinate - */ - x: string - /** - * Base64url-encoded Y coordinate - */ - y: string -} +export type PaymentPortalResponse = { + /** + * Stripe Billing Portal URL + */ + url: string; +}; /** - * RFC 6749 §5.2 error response. + * Request body for generating a payment portal session URL. */ -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 -} +export type PaymentPortalRequest = { + /** + * URL to redirect after the user exits the portal + */ + return_url?: 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 -} + /** + * Resource-bound Cloud JWT (audience matches the protected resource). + */ + access_token: string; + /** + * 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; + token_type: 'Bearer'; +}; /** - * 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. - * + * RFC 6749 §5.2 error response. */ -export type OAuthConsentChallengeWorkspace = { - id: string - name: string - type: 'personal' | 'team' - role: 'owner' | 'member' -} +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; +}; /** - * 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. + * RFC 7591 §3.2.1 successful registration response. */ -export type OAuthAuthorizeRedirectResponse = { - /** - * OAuth client redirect URI with either code+state for allow, or error+state for deny. - */ - redirect_url: string -} +export type OAuthRegisterResponse = { + application_type: 'native' | 'web'; + /** + * 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; + grant_types: Array; + redirect_uris: Array; + response_types: Array; + token_endpoint_auth_method: 'none'; +}; /** - * 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. + * 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 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 - /** - * The exact redirect URI this authorization request was validated - * against at GET time (oauth_authorization_requests.redirect_uri, - * itself byte-matched to the client registration). The frontend - * binds the post-consent navigation to this value, so it needs no - * per-client knowledge of callback schemes. Surfaced verbatim; - * also suitable for display so users can verify the destination. - * - */ - redirect_uri: string - /** - * Scopes the client is requesting for this resource. The frontend should present these for the user to approve. - */ - scopes: Array - /** - * Workspaces the user can select from. Membership is re-checked on POST. - */ - workspaces: Array -} - -/** - * OAuth 2.1 protected-resource metadata (RFC 9728). - */ -export type OAuthProtectedResourceMetadata = { - resource: string - authorization_servers: Array - scopes_supported: Array - bearer_methods_supported?: Array -} +export type OAuthRegisterRequest = { + /** + * RFC 7591 §2 application_type. **OPTIONAL** — omit the field to default to `native` (the loopback-friendly policy), rather than the RFC's nominal `web` default; the MCP SDK's DCR client omits it. `native` for desktop / CLI / MCP-spec-strict clients (loopback redirects); `web` for hosted clients (HTTPS only, host must be allowlisted). The realistic MCP-client population is overwhelmingly native/loopback, so defaulting to `web` would silently bounce those clients off the wrong redirect policy. A *present* value must be one of the enum members; any other value rejects with `invalid_client_metadata`. (The server has no runtime enum validation and defensively coerces a null/empty value to `native`, but spec-validating clients should omit the field rather than send `""` — the enum does not permit it.) + * + */ + application_type?: 'native' | 'web'; + /** + * Human-readable name shown in the consent UI. Reserved-name list rejects impersonation of major MCP clients. + */ + client_name?: string; + /** + * **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. + */ + contacts?: Array | null; + /** + * Optional. Defaults to `["authorization_code","refresh_token"]`. + */ + grant_types?: Array<'authorization_code' | 'refresh_token'>; + /** + * **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; + /** + * **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. + */ + policy_uri?: string | null; + /** + * 1–5 redirect URIs. Validated against `application_type` policy. + */ + redirect_uris: Array; + /** + * **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; + } | null; + /** + * 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.** 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; + /** + * Public clients only this phase — must be `none` if present. The server forces `none` regardless. + */ + token_endpoint_auth_method?: 'none'; + /** + * **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase. + */ + tos_uri?: string | null; +}; /** * RFC 7591 §3.2.2 error response. */ export type OAuthRegisterError = { - error: 'invalid_redirect_uri' | 'invalid_client_metadata' - error_description?: string | null -} + 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; `ErrorResponse` is the strict-server binding-layer error fired when the request body fails OpenAPI-schema validation before the handler runs, normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler (BE-1178). * */ -export type OAuthRegisterBadRequestResponse = OAuthRegisterError | ErrorResponse +export type OAuthRegisterBadRequestResponse = OAuthRegisterError | ErrorResponse; /** * Standard error response with a machine-readable code and human-readable message. */ export type ErrorResponse = { - code: string - message: string - /** - * Optional open object carrying structured, machine-readable context about the error (e.g. offending field names, validation specifics). Absent for most errors; consumers must not assume any particular shape. - */ - details?: { - [key: string]: unknown - } -} + code: string; + /** + * Optional open object carrying structured, machine-readable context about the error (e.g. offending field names, validation specifics). Absent for most errors; consumers must not assume any particular shape. + */ + details?: { + [key: string]: unknown; + }; + message: string; +}; /** - * RFC 7591 §3.2.1 successful registration response. + * OAuth 2.1 protected-resource metadata (RFC 9728). */ -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 - grant_types: Array - response_types: Array - token_endpoint_auth_method: 'none' - application_type: 'native' | 'web' -} +export type OAuthProtectedResourceMetadata = { + authorization_servers: Array; + bearer_methods_supported?: Array; + resource: string; + scopes_supported: Array; +}; /** - * 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. + * 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 OAuthRegisterRequest = { - /** - * 1–5 redirect URIs. Validated against `application_type` policy. - */ - redirect_uris: Array - /** - * 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. **OPTIONAL** — omit the field to default to `native` (the loopback-friendly policy), rather than the RFC's nominal `web` default; the MCP SDK's DCR client omits it. `native` for desktop / CLI / MCP-spec-strict clients (loopback redirects); `web` for hosted clients (HTTPS only, host must be allowlisted). The realistic MCP-client population is overwhelmingly native/loopback, so defaulting to `web` would silently bounce those clients off the wrong redirect policy. A *present* value must be one of the enum members; any other value rejects with `invalid_client_metadata`. (The server has no runtime enum validation and defensively coerces a null/empty value to `native`, but spec-validating clients should omit the field rather than send `""` — the enum does not permit it.) - * - */ - 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 - } | 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 | 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 - grant_types_supported: Array - code_challenge_methods_supported: Array - token_endpoint_auth_methods_supported: Array - scopes_supported?: Array -} +export type OAuthConsentChallengeWorkspace = { + id: string; + name: string; + role: 'owner' | 'member'; + type: 'personal' | 'team'; +}; /** - * JSON Web Key Set containing the public keys used to verify Cloud JWTs. - */ -export type JwksResponse = { - keys: Array -} - -/** - * Response after synchronizing an API key into the local database. - */ -export type SyncApiKeyResponse = { - /** - * `revoked` — matching row found, was active, now revoked. - * `already_revoked` — matching row found, already revoked. - * `no_op` — no row matches the supplied hash. - * - */ - result: 'revoked' | 'already_revoked' | 'no_op' -} - -/** - * Request body for synchronizing an API key from the external registry. - */ -export type SyncApiKeyRequest = { - /** - * Lifecycle event type. Only `delete` is supported in Phase 1. - */ - event: 'delete' - /** - * SHA-256 hex digest of the plaintext API key (64 hex characters). - * Case-insensitive: the server lowercases the value before lookup, so - * producers may emit lowercase or uppercase hex. The lowercase form - * is recommended for consistency with the rest of the codebase, which - * computes hashes via `hex.EncodeToString`. - * - */ - key_hash: string - /** - * Firebase UID of the key's owner according to comfy-api. Required on - * the request so cloud can detect drift between the two systems, but - * **advisory only**: `key_hash` is the sole authoritative identifier - * for the revocation. A mismatch against cloud's stored `user_id` is - * logged and emits `admin.api_key_sync.delete.customer_mismatch`, but - * does not change the outcome — the matching row is still revoked so - * a subsequent sync call can repair drift. - * - */ - customer_id: string -} - -/** - * The personal workspace's provisioned billing identity. - */ -export type EnsureWorkspaceBillingProvisionedResponse = { - /** - * The user's personal workspace ID. - */ - workspace_id: string - /** - * The Stripe customer ID attached to the workspace. - */ - stripe_customer_id: string - /** - * The Metronome customer ID attached to the workspace. - */ - metronome_customer_id: string - /** - * The active Metronome contract ID on the workspace. - */ - metronome_contract_id: string -} - -/** - * The caller's already-resolved legacy (comfy-api) customer identity. When - * present and carrying provider IDs, provisioning ATTACHES this identity to - * the personal workspace (sharing the existing balance and subscription) - * instead of minting a net-new empty customer. Omit (or send with no - * provider IDs) for a free user with nothing to attach — provisioning then - * creates net-new. This closes the create-new-before-attach gap: a caller - * that already knows the legacy identity hands it over so the very first - * provisioning is an attach. - * - */ -export type EnsureWorkspaceBillingLegacySnapshot = { - /** - * Legacy Stripe customer id to attach. - */ - stripe_customer_id?: string - /** - * Legacy Metronome customer id to attach (the balance holder). - */ - metronome_customer_id?: string - /** - * Active Metronome contract id on the legacy customer. - */ - metronome_contract_id?: string - /** - * Whether the legacy customer currently has spendable funds. - */ - has_funds?: boolean - /** - * Cached subscription tier of the legacy customer, if any. - */ - subscription_tier?: string - /** - * Active legacy Stripe subscription id, if the customer is subscribed. - */ - legacy_stripe_subscription_id?: string - /** - * Namespaced legacy comfy user id, for provider stamping and audit. - */ - legacy_comfy_user_id?: string -} - -/** - * Request body for ensuring a user's personal workspace carries a fully - * provisioned billing identity. Sent by comfy-api's CreateCustomer (BE-1047) - * with the already canonical-resolved user identity. - * - */ -export type EnsureWorkspaceBillingProvisionedRequest = { - /** - * Canonical cloud user ID whose personal workspace should be ensured and - * provisioned. The caller (comfy-api) resolves canonical-sibling routing - * before calling, so this is taken as authoritative — the endpoint never - * re-resolves or self-maps. - * - */ - user_id: string - /** - * Owner email, used when minting a net-new vendor customer. Required for - * create-new; ignored on the already-provisioned fast-path. - * - */ - email: string - snapshot?: EnsureWorkspaceBillingLegacySnapshot -} - -/** - * Firebase UIDs linked to the canonical comfy_user_id. Empty list when - * no mappings exist (not an error — callers can treat empty as "unknown - * canonical"). + * 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 ListLinkedFirebaseUidsResponse = { - /** - * Subjects from `identity_mappings` where provider = 'firebase' and - * comfy_user_id matches the request. Order is unspecified. - * - */ - firebase_uids: Array -} - -/** - * Request body for reverse-looking-up Firebase UIDs linked to a canonical comfy_user_id. - */ -export type ListLinkedFirebaseUidsRequest = { - /** - * Canonical user ID to look up. Cloud's `identity_mappings` is queried - * for every `subject` whose `comfy_user_id` matches and whose `provider` - * equals `firebase`. - * - */ - comfy_user_id: string -} - -/** - * Response confirming the validity and scope of a workspace API key. - */ -export type VerifyApiKeyResponse = { - /** - * Firebase UID of the key creator - */ - user_id: string - /** - * User's email address - */ - email: string - /** - * User's display name - */ - name: string - /** - * Whether the user is an admin - */ - is_admin: boolean - /** - * Workspace ID for billing attribution - */ - workspace_id: string - /** - * Type of workspace - */ - workspace_type: 'personal' | 'team' - /** - * User's role in the workspace - */ - role: 'owner' | 'member' - /** - * Whether the workspace has available funds for usage - */ - has_funds: boolean - /** - * Whether the workspace has an active subscription - */ - is_active: boolean - /** - * Permissions granted by this key. Always includes the role permission - * (`owner:*` or `member:*`). May also include `partner-node:use`, - * which is a **staging-only shim** used to gate partner-node access - * for non-admin users during testing. No production code path checks - * this permission today; it is emitted for parity with the Cloud JWT - * claim set so JWT and API-key callers see the same permissions. - * - */ - permissions: Array -} - -/** - * Request body for verifying a workspace API key (admin endpoint). - */ -export type VerifyApiKeyRequest = { - /** - * The full plaintext API key to verify - */ - api_key: string -} +export type OAuthConsentChallenge = { + /** + * Human-readable name of the OAuth client requesting authorization, from oauth_clients.display_name. + */ + client_display_name: string; + /** + * Per-row CSRF token bound to this authorization request (not to the session). Must be echoed back on POST. + */ + csrf_token: string; + /** + * Opaque server-side identifier for the authorization-request row. Carried back unchanged in the consent submission. + */ + oauth_request_id: string; + /** + * The exact redirect URI this authorization request was validated + * against at GET time (oauth_authorization_requests.redirect_uri, + * itself byte-matched to the client registration). The frontend + * binds the post-consent navigation to this value, so it needs no + * per-client knowledge of callback schemes. Surfaced verbatim; + * also suitable for display so users can verify the destination. + * + */ + redirect_uri: 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; + /** + * Workspaces the user can select from. Membership is re-checked on POST. + */ + workspaces: Array; +}; /** - * Response after bulk-revoking API keys for a workspace 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 BulkRevokeApiKeysResponse = { - /** - * Number of API keys that were revoked - */ - revoked_count: number -} +export type OAuthAuthorizeRedirectResponse = { + /** + * OAuth client redirect URI with either code+state for allow, or error+state for deny. + */ + redirect_url: string; +}; /** - * List of API keys associated with the current workspace. + * OAuth 2.1 authorization-server metadata (RFC 8414). */ -export type ListWorkspaceApiKeysResponse = { - api_keys: Array -} +export type OAuthAuthorizationServerMetadata = { + authorization_endpoint: string; + code_challenge_methods_supported: Array; + grant_types_supported: Array; + issuer: 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; + scopes_supported?: Array; + token_endpoint: string; + token_endpoint_auth_methods_supported: Array; +}; /** - * Metadata for a workspace-scoped API key (secret is never returned). + * Metadata describing a single ComfyUI node type and its inputs/outputs. */ -export type WorkspaceApiKeyInfo = { - /** - * API key ID - */ - id: string - /** - * Workspace this key belongs to - */ - workspace_id: string - /** - * User who created this key - */ - user_id: string - /** - * 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 - */ - key_prefix: string - /** - * When the key expires (if set) - */ - expires_at?: string - /** - * Last time the key was used - */ - last_used_at?: string - /** - * When the key was revoked (if revoked) - */ - revoked_at?: string - /** - * When the key was created - */ - created_at: string -} +export type NodeInfo = { + /** + * Whether this is an API node + */ + api_node?: boolean; + /** + * Category of the node + */ + category?: string; + /** + * Whether the node is deprecated + */ + deprecated?: boolean; + /** + * Description of the node + */ + description?: string; + /** + * Display name of the node + */ + display_name?: string; + /** + * Whether the node is experimental + */ + experimental?: boolean; + /** + * Input specifications for the node + */ + input?: { + [key: string]: unknown; + }; + /** + * Order of inputs for display + */ + input_order?: { + [key: string]: Array; + }; + /** + * Internal name of the node + */ + name?: string; + /** + * Output types of the node + */ + output?: Array; + /** + * Whether each output is a list + */ + output_is_list?: Array; + /** + * Names of the outputs + */ + output_name?: Array; + /** + * Whether this is an output node + */ + output_node?: boolean; + /** + * Tooltips for outputs + */ + output_tooltips?: Array; + /** + * Python module implementing the node + */ + python_module?: string; +}; /** - * Response containing the newly created workspace API key. + * Represents a folder containing models */ -export type CreateWorkspaceApiKeyResponse = { - /** - * API key ID - */ - id: string - /** - * 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) - */ - key: string - /** - * First 8 chars after prefix for display - */ - key_prefix: string - /** - * When the key expires (if set) - */ - expires_at?: string - /** - * When the key was created - */ - created_at: string -} +export type ModelFolder = { + /** + * List of paths where models of this type are stored + */ + folders: Array; + /** + * The name of the model folder + */ + name: string; +}; /** - * Request body for creating a new workspace-scoped API key. + * Represents a model file with metadata */ -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 - */ - expires_at?: string -} +export type ModelFile = { + /** + * The filename of the model + */ + name: string; + /** + * Index of the path where this model is located + */ + pathIndex: number; +}; /** - * Response returned after successfully accepting a workspace invitation. + * Workspace member with profile and role information. */ -export type AcceptInviteResponse = { - /** - * ID of the workspace joined - */ - workspace_id: string - /** - * Name of the workspace joined - */ - workspace_name: string -} +export type Member = { + /** + * User's email address + */ + email: string; + /** + * User ID + */ + id: string; + /** + * Whether this member is the workspace's immutable original owner (the creator). Derived as member.id == workspace.created_by_user_id; exactly one member per workspace is marked. The original owner can never be demoted, removed, or leave; a promoted owner is never marked. + */ + is_original_owner: boolean; + /** + * When the user joined the workspace + */ + joined_at: string; + /** + * User's display name + */ + name: string; + /** + * User's role in the workspace + */ + role: 'owner' | 'member'; +}; /** - * Request body for inviting a user to a workspace. + * Paginated list of workspaces the authenticated user belongs to. */ -export type CreateInviteRequest = { - /** - * Email address to invite - */ - email: string -} +export type ListWorkspacesResponse = { + workspaces: Array; +}; /** - * List of pending invitations for the current workspace. + * List of API keys associated with the current workspace. */ -export type ListInvitesResponse = { - invites: Array -} +export type ListWorkspaceApiKeysResponse = { + api_keys: Array; +}; /** - * An outstanding workspace invitation that has not yet been accepted. + * Paginated list of available asset tags. */ -export type PendingInvite = { - /** - * Invite ID - */ - id: string - /** - * Email address of the invited user - */ - email: string - /** - * Invite token for constructing invite links. Empty for expired invites. - */ - token?: string - /** - * When the invite was created - */ - invited_at: string - /** - * When the invite expires - */ - expires_at: string -} +export type ListTagsResponse = { + /** + * Whether more tags are available + */ + has_more: boolean; + /** + * List of tags + */ + tags: Array; + /** + * Total number of tags + */ + total: number; +}; /** * List of members in the current workspace. */ export type ListMembersResponse = { - members: Array - pagination: PaginationInfo -} - -/** - * Workspace member with profile and role information. - */ -export type Member = { - /** - * User ID - */ - id: string - /** - * User's display name - */ - name: string - /** - * User's email address - */ - email: string - /** - * User's role in the workspace - */ - role: 'owner' | 'member' - /** - * When the user joined the workspace - */ - joined_at: string - /** - * Whether this member is the workspace's immutable original owner (the creator). Derived as member.id == workspace.created_by_user_id; exactly one member per workspace is marked. The original owner can never be demoted, removed, or leave; a promoted owner is never marked. - */ - is_original_owner: boolean -} - -/** - * Request body for changing a workspace member's role. - */ -export type UpdateMemberRoleRequest = { - /** - * The role to assign to the member - */ - role: 'owner' | 'member' -} + members: Array; + pagination: PaginationInfo; +}; /** - * Request body for updating an existing workspace's settings. + * List of pending invitations for the current workspace. */ -export type UpdateWorkspaceRequest = { - /** - * New display name for the workspace - */ - name?: string -} +export type ListInvitesResponse = { + invites: Array; +}; /** - * Request body for creating a new workspace. + * Paginated list of assets belonging to the authenticated user. */ -export type CreateWorkspaceRequest = { - /** - * Display name for the workspace - */ - name: string -} +export type ListAssetsResponse = { + /** + * List of assets matching the query + */ + assets: Array; + /** + * 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; + /** + * Total number of assets matching the filters + */ + total: number; +}; /** - * Workspace entity annotated with the requesting user's role. + * Represents a user-owned asset (image, video, or other generated output). */ -export type WorkspaceWithRole = { - id: string - name: string - type: 'personal' | 'team' - role: 'owner' | 'member' - /** - * When the workspace was created - */ - created_at: string - /** - * When the user joined the workspace (same as created_at for the workspace creator) - */ - joined_at: string - subscription_tier?: SubscriptionTier -} +export type Asset = { + /** + * Timestamp when the asset was created + */ + created_at: string; + /** + * Display name of the asset. Mirrors name for backwards compatibility. + */ + display_name?: string | null; + /** + * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") + */ + file_path?: string | null; + /** + * Blake3 hash of the asset content. + */ + hash?: string; + /** + * Unique identifier for the asset + */ + id: string; + /** + * Whether this asset is immutable (cannot be modified or deleted) + */ + is_immutable?: boolean; + /** + * ID of the job that created this asset, if available + */ + job_id?: string | null; + /** + * Timestamp when the asset was last accessed + */ + last_access_time?: string; + /** + * System-managed metadata from download sources (HuggingFace, CivitAI, etc.) - read-only, not user-modifiable + */ + readonly metadata?: { + [key: string]: unknown; + }; + /** + * MIME type of the asset + */ + mime_type?: string; + /** + * Name of the asset file + */ + name: string; + /** + * ID of the preview asset if available + */ + preview_id?: string | null; + /** + * URL for asset preview/thumbnail + */ + preview_url?: string; + /** + * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash. + */ + short_url?: string | null; + /** + * Size of the asset in bytes + */ + size?: number; + /** + * Tags associated with the asset + */ + tags?: Array; + /** + * Timestamp when the asset was last updated + */ + updated_at: string; + /** + * Custom user metadata for the asset + */ + user_metadata?: { + [key: string]: unknown; + }; +}; /** - * Paginated list of workspaces the authenticated user belongs to. + * Reference to a Hub label by ID. */ -export type ListWorkspacesResponse = { - workspaces: Array -} +export type LabelRef = { + /** + * Human-readable display name (e.g. "Video Generation", "Flux"). + */ + display_name: string; + /** + * Slug identifier (e.g. "video-generation", "flux"). + */ + name: string; +}; /** - * Full workspace entity with configuration and ownership details. + * JSON Web Key Set containing the public keys used to verify Cloud JWTs. */ -export type Workspace = { - id: string - name: string - type: 'personal' | 'team' - created_at: string -} +export type JwksResponse = { + keys: Array; +}; /** - * Exchange poll result. Pending until the code is redeemed in the browser. + * A single JSON Web Key entry within a JWKS response. */ -export type DesktopLoginCodeExchangeResponse = { - /** - * Whether the code has been redeemed yet. - */ - status: 'pending' | 'complete' - /** - * One-time Firebase custom token for the redeeming user. Present only when status is "complete". - */ - custom_token?: string -} +export type JwkKey = { + alg: string; + crv: string; + kid: string; + kty: string; + use: string; + /** + * Base64url-encoded X coordinate + */ + x: string; + /** + * Base64url-encoded Y coordinate + */ + y: string; +}; /** - * Request to exchange a redeemed login code for a custom token. + * Paginated list of jobs for the authenticated user. */ -export type DesktopLoginCodeExchangeRequest = { - /** - * The login code returned at creation. - */ - code: string - /** - * PKCE code verifier matching the challenge supplied at creation. - */ - code_verifier: string -} +export type JobsListResponse = { + /** + * Array of jobs ordered by specified sort field + */ + jobs: Array; + pagination: PaginationInfo; +}; /** - * Result of redeeming a desktop login code. + * Detailed execution error information from ComfyUI */ -export type DesktopLoginCodeRedeemResponse = { - /** - * The code is now claimed for the authenticated user. - */ - status: 'redeemed' -} +export type ExecutionError = { + /** + * Input values at time of failure (empty object if not available) + */ + current_inputs: { + [key: string]: unknown; + }; + /** + * Output values at time of failure (empty object if not available) + */ + current_outputs: { + [key: string]: unknown; + }; + /** + * Human-readable error message + */ + exception_message: string; + /** + * Python exception type (e.g., "RuntimeError") + */ + exception_type: string; + /** + * ID of the node that failed + */ + node_id: string; + /** + * Type name of the node (e.g., "KSampler") + */ + node_type: string; + /** + * Array of traceback lines (empty array if not available) + */ + traceback: Array; +}; /** - * Request to claim a desktop login code for the authenticated user. + * Lightweight job data for list views (workflow and full outputs excluded) */ -export type DesktopLoginCodeRedeemRequest = { - /** - * The login code the desktop app placed in the browser URL. - */ - code: string -} +export type JobEntry = { + /** + * Job creation timestamp (Unix timestamp in milliseconds) + */ + create_time: number; + /** + * Workflow execution completion timestamp (Unix milliseconds, only present for terminal states) + */ + execution_end_time?: number; + /** + * Detailed execution error from ComfyUI (only for failed jobs with structured error data) + */ + execution_error?: ExecutionError; + /** + * Workflow execution start timestamp (Unix milliseconds, only present for terminal states) + */ + execution_start_time?: number; + /** + * Unique job identifier + */ + id: string; + /** + * Total number of output files (omitted for non-terminal states) + */ + outputs_count?: number; + /** + * Primary preview output (only present for terminal states) + */ + preview_output?: { + [key: string]: unknown; + }; + /** + * User-friendly job status + */ + status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled'; + /** + * UUID identifying the workflow graph definition + */ + workflow_id?: string; +}; /** - * A freshly minted desktop login code and its polling parameters. + * Response for POST /api/jobs/cancel. */ -export type DesktopLoginCodeCreateResponse = { - /** - * Opaque single-use login code ("dlc_" prefix). - */ - code: string - /** - * Seconds until the code expires if not redeemed. - */ - expires_in: number - /** - * Suggested seconds between exchange polls. - */ - poll_interval: number -} +export type JobsCancelResponse = { + /** + * Job IDs for which a cancel event was successfully dispatched by this + * call. Jobs already in a terminal or cancelling state are idempotently + * skipped and will not appear here. + * + */ + cancelled: Array; +}; /** - * Request to mint a desktop login code. + * Request to cancel multiple jobs by ID. */ -export type DesktopLoginCodeCreateRequest = { - /** - * Stable identifier of the desktop installation, used only for the login attribution event. Omit when telemetry consent is off - the login flow still works, but no attribution event is emitted. - */ - installation_id?: string - /** - * Desktop platform identifier (e.g. darwin, win32, linux). - */ - platform: string - /** - * Desktop app version string. - */ - app_version: string - /** - * PKCE code challenge - base64url(SHA256(code_verifier)) per RFC 7636 (S256 only). - */ - code_challenge: string -} +export type JobsCancelRequest = { + /** + * Job identifiers (UUIDs) to cancel. + */ + job_ids: Array; +}; /** - * Abbreviated workspace metadata used in list responses. + * Job status information */ -export type WorkspaceSummary = { - id: string - name: string - type: 'personal' | 'team' -} +export type JobStatusResponse = { + /** + * The inference instance assigned to this job (if any) + */ + assigned_inference?: string | null; + /** + * When the job was created + */ + created_at: string; + /** + * Error message if the job failed + */ + error_message?: string | null; + /** + * The job ID + */ + id: string; + /** + * When the job status was last changed + */ + last_state_update?: string; + /** + * Current job status + */ + status: 'waiting_to_dispatch' | 'pending' | 'in_progress' | 'completed' | 'error' | 'cancelled'; + /** + * When the job was last updated + */ + updated_at: string; +}; /** - * Response containing the issued Cloud JWT and its expiry. + * Full job details including workflow and outputs */ -export type ExchangeTokenResponse = { - /** - * Cloud JWT token - */ - token: string - /** - * Token expiration time (RFC 3339) - */ - expires_at: string - workspace: WorkspaceSummary - /** - * User's role in the workspace - */ - role: 'owner' | 'member' - /** - * Permission strings for the role - */ - permissions: Array -} +export type JobDetailResponse = { + /** + * Job creation timestamp (Unix timestamp in milliseconds) + */ + create_time: number; + /** + * Detailed execution error from ComfyUI (only for failed jobs with structured error data) + */ + execution_error?: ExecutionError; + /** + * Node-level execution metadata (only for terminal states) + */ + execution_meta?: { + [key: string]: unknown; + }; + /** + * ComfyUI execution status and timeline (only for terminal states) + */ + execution_status?: { + [key: string]: unknown; + }; + /** + * Unique job identifier + */ + id: string; + /** + * Full outputs object from ComfyUI (only for terminal states) + */ + outputs?: { + [key: string]: unknown; + }; + /** + * Total number of output files (omitted for non-terminal states) + */ + outputs_count?: number; + /** + * Primary preview output (only for terminal states) + */ + preview_output?: { + [key: string]: unknown; + }; + /** + * User-friendly job status + */ + status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled'; + /** + * Last update timestamp (Unix timestamp in milliseconds) + */ + update_time: number; + /** + * Full ComfyUI workflow (10-100KB, omitted if not available). + * + * Sensitive credentials are redacted before the response is returned: + * `extra_data.api_key_comfy_org`, when present, is replaced with the + * literal string `"[REDACTED]"`. The field is preserved (not removed) + * so existence checks still pass, but the value is not usable. + * + */ + workflow?: { + [key: string]: unknown; + }; + /** + * UUID identifying the workflow graph definition + */ + workflow_id?: string; +}; /** - * Optional request body for the token exchange endpoint. The Firebase JWT - * being exchanged is supplied via the `Authorization: Bearer` header; this - * body only carries workspace-selection input. - * + * Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops. */ -export type ExchangeTokenRequest = { - /** - * Workspace ID to get token for. Defaults to personal workspace if omitted. - */ - workspace_id?: string -} +export type JobCancelResponse = { + /** + * True when a cancel event was successfully dispatched by this call. + * False when the job was already in a terminal or cancelling state, + * in which case the call is a no-op (still 200 — idempotent). + * + */ + cancelled: boolean; +}; /** - * Full task details including payload and result + * Response after importing published workflow assets. */ -export type TaskResponse = { - /** - * Unique task identifier - */ - id: string - /** - * Caller-provided key for idempotent task creation - */ - idempotency_key: string - /** - * Task type name (e.g., model_upload) - */ - task_name: string - /** - * Task input data - */ - payload: { - [key: string]: unknown - } - /** - * Current task status - */ - status: 'created' | 'running' | 'completed' | 'failed' - /** - * Task output data (null if not completed) - */ - result?: { - [key: string]: unknown - } - /** - * Error message on failure (null if not failed) - */ - error_message?: string - /** - * Task creation timestamp - */ - create_time: string - /** - * Task last update timestamp - */ - update_time: string - /** - * When task execution started (null if not started) - */ - started_at?: string - /** - * When task completed or failed (null if not finished) - */ - completed_at?: string -} +export type ImportPublishedAssetsResponse = { + assets: Array; +}; /** - * Task data for list views + * Request body for importing assets from a published workflow. */ -export type TaskEntry = { - /** - * Unique task identifier - */ - id: string - /** - * Task type name (e.g., model_upload) - */ - task_name: string - /** - * Current task status - */ - status: 'created' | 'running' | 'completed' | 'failed' - /** - * Task creation timestamp - */ - create_time: string - /** - * When task execution started (null if not started) - */ - started_at?: string - /** - * When task completed or failed (null if not finished) - */ - completed_at?: string -} +export type ImportPublishedAssetsRequest = { + /** + * IDs of published assets (inputs and models) to import. + */ + published_asset_ids: Array; + /** + * Optional. Share ID of the published workflow these assets belong to. + * When provided (non-null, non-empty): all published_asset_ids must + * belong to this share's workflow version; returns + * 400/CodeInvalidAssets if the share is not found or any asset does + * not belong to it. + * When omitted, null, or empty string: no share-scoped validation is + * performed and the assets are validated only against global rules + * (legacy behaviour, preserved for clients that have not yet adopted + * share_id). + * + */ + share_id?: string | null; +}; /** - * Paginated list of background tasks for the authenticated user. + * Entry in the curated workflow template gallery shown on the home page. */ -export type TasksListResponse = { - /** - * Array of tasks ordered by create_time - */ - tasks: Array - pagination: PaginationInfo -} - -/** - * Result of authorizing a legal-hold release on a user's deletion. - */ -export type ReleaseHoldResponse = { - /** - * The Firebase ID of the user whose hold was released - */ - firebase_id: string - /** - * Whether the release authorization is recorded on the deletion request - */ - released: boolean - /** - * Human-readable outcome detail - */ - message: string -} - -/** - * Details of a pending or completed user data deletion request. - */ -export type DeletionRequest = { - /** - * Unique identifier for the deletion request - */ - id: string - /** - * The Firebase ID of the user being deleted - */ - firebase_id: string - /** - * The time the deletion request was created - */ - create_time: string - /** - * Array of deletion status objects - */ - deletion_status: Array -} - -/** - * Current status of a user data deletion request. - */ -export type DeletionStatus = { - /** - * The name of the deletion status - */ - status_name: string - /** - * Additional details about the deletion status - */ - status_details: string -} +export type HubWorkflowTemplateEntry = { + /** + * Content template used for generation (tutorial, showcase, comparison, breakthrough) + */ + contentTemplate?: string; + /** + * Publication date in YYYY-MM-DD format + */ + date?: string; + description?: string; + /** + * AI-generated extended description of the workflow + */ + extendedDescription?: string; + /** + * AI-generated FAQ items + */ + faqItems?: Array<{ + answer: string; + question: string; + }>; + /** + * AI-generated step-by-step usage instructions + */ + howToUse?: Array; + includeOnDistributions?: Array; + io?: { + inputs?: Array<{ + [key: string]: unknown; + }>; + outputs?: Array<{ + [key: string]: unknown; + }>; + }; + /** + * Whether the template belongs to a module marked as essential. + */ + isEssential?: boolean; + logos?: Array<{ + [key: string]: unknown; + }>; + mediaSubtype?: string; + mediaType?: string; + /** + * AI-generated SEO meta description (under 160 chars) + */ + metaDescription?: string; + models?: Array; + /** + * Slug identifier for the template + */ + name: string; + openSource?: boolean; + profile?: HubProfileSummary; + requiresCustomNodes?: Array; + /** + * Search ranking score reported upstream. + */ + searchRank?: number; + /** + * Share ID for linking to the hub workflow detail + */ + shareId?: string; + /** + * Workflow asset size in bytes. + */ + size?: number; + status: HubWorkflowStatus; + /** + * AI-generated suggested use cases + */ + suggestedUseCases?: Array; + tags?: Array; + /** + * Public URL of the comparison thumbnail + */ + thumbnailComparisonUrl?: string; + /** + * Public URL of the primary thumbnail + */ + thumbnailUrl?: string; + thumbnailVariant?: string; + title: string; + tutorialUrl?: string; + /** + * Usage count reported upstream. + */ + usage?: number; + /** + * Approximate VRAM requirement in bytes. + */ + vram?: number; +}; /** - * Detailed execution error information from ComfyUI + * Public workflow status. NULL in the database is represented as pending in API responses. */ -export type ExecutionError = { - /** - * ID of the node that failed - */ - node_id: string - /** - * Type name of the node (e.g., "KSampler") - */ - node_type: string - /** - * Human-readable error message - */ - exception_message: string - /** - * Python exception type (e.g., "RuntimeError") - */ - exception_type: string - /** - * Array of traceback lines (empty array if not available) - */ - traceback: Array - /** - * Input values at time of failure (empty object if not available) - */ - current_inputs: { - [key: string]: unknown - } - /** - * Output values at time of failure (empty object if not available) - */ - current_outputs: { - [key: string]: unknown - } -} +export type HubWorkflowStatus = 'pending' | 'approved' | 'rejected' | 'deprecated'; /** - * Full job details including workflow and outputs + * Abbreviated Hub profile used in workflow listings. */ -export type JobDetailResponse = { - /** - * Unique job identifier - */ - id: string - /** - * User-friendly job status - */ - status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' - /** - * Full ComfyUI workflow (10-100KB, omitted if not available). - * - * Sensitive credentials are redacted before the response is returned: - * `extra_data.api_key_comfy_org`, when present, is replaced with the - * literal string `"[REDACTED]"`. The field is preserved (not removed) - * so existence checks still pass, but the value is not usable. - * - */ - workflow?: { - [key: string]: unknown - } - /** - * Detailed execution error from ComfyUI (only for failed jobs with structured error data) - */ - execution_error?: ExecutionError - /** - * Job creation timestamp (Unix timestamp in milliseconds) - */ - create_time: number - /** - * Last update timestamp (Unix timestamp in milliseconds) - */ - update_time: number - /** - * Full outputs object from ComfyUI (only for terminal states) - */ - outputs?: { - [key: string]: unknown - } - /** - * Primary preview output (only for terminal states) - */ - preview_output?: { - [key: string]: unknown - } - /** - * Total number of output files (omitted for non-terminal states) - */ - outputs_count?: number - /** - * UUID identifying the workflow graph definition - */ - workflow_id?: string - /** - * ComfyUI execution status and timeline (only for terminal states) - */ - execution_status?: { - [key: string]: unknown - } - /** - * Node-level execution metadata (only for terminal states) - */ - execution_meta?: { - [key: string]: unknown - } -} +export type HubProfileSummary = { + /** + * Public URL of the profile avatar image. + */ + avatar_url?: string; + display_name?: string; + username: string; +}; /** - * Response for POST /api/jobs/cancel. + * Abbreviated Hub workflow metadata used in search and listing results. */ -export type JobsCancelResponse = { - /** - * Job IDs for which a cancel event was successfully dispatched by this - * call. Jobs already in a terminal or cancelling state are idempotently - * skipped and will not appear here. - * - */ - cancelled: Array -} +export type HubWorkflowSummary = { + custom_nodes?: Array; + description?: string; + metadata?: { + [key: string]: unknown; + }; + models?: Array; + name: string; + profile: HubProfileSummary; + publish_time?: string | null; + sample_image_urls?: Array; + share_id: string; + status: HubWorkflowStatus; + tags?: Array; + thumbnail_comparison_url?: string; + thumbnail_type?: 'image' | 'video' | 'image_comparison'; + thumbnail_url?: string; + tutorial_url?: string; +}; /** - * Request to cancel multiple jobs by ID. + * Paginated list of Hub workflows matching search criteria. */ -export type JobsCancelRequest = { - /** - * Job identifiers (UUIDs) to cancel. - */ - job_ids: Array -} +export type HubWorkflowListResponse = { + /** + * Cursor for the next page, empty if no more results. + */ + next_cursor?: string; + /** + * Array of HubWorkflowSummary (default) or HubWorkflowDetail (when detail=true). + */ + workflows: Array; +}; /** - * Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops. + * Full Hub workflow detail including versions, assets, and statistics. */ -export type JobCancelResponse = { - /** - * True when a cancel event was successfully dispatched by this call. - * False when the job was already in a terminal or cancelling state, - * in which case the call is a no-op (still 200 — idempotent). - * - */ - cancelled: boolean -} +export type HubWorkflowDetail = { + /** + * Published assets. Each asset's id is the published asset ID (not the original private asset ID). + */ + assets: Array; + custom_nodes?: Array; + description?: string; + metadata?: { + [key: string]: unknown; + }; + models?: Array; + name: string; + profile: HubProfileSummary; + publish_time?: string | null; + sample_image_urls?: Array; + share_id: string; + status: HubWorkflowStatus; + tags?: Array; + thumbnail_comparison_url?: string; + thumbnail_type?: 'image' | 'video' | 'image_comparison'; + thumbnail_url?: string; + tutorial_url?: string; + workflow_id: string; + workflow_json: { + [key: string]: unknown; + }; +}; /** - * Lightweight job data for list views (workflow and full outputs excluded) + * Response indicating whether a Hub username is available. */ -export type JobEntry = { - /** - * Unique job identifier - */ - id: string - /** - * User-friendly job status - */ - status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' - /** - * Detailed execution error from ComfyUI (only for failed jobs with structured error data) - */ - execution_error?: ExecutionError - /** - * Job creation timestamp (Unix timestamp in milliseconds) - */ - create_time: number - /** - * Primary preview output (only present for terminal states) - */ - preview_output?: { - [key: string]: unknown - } - /** - * Total number of output files (omitted for non-terminal states) - */ - outputs_count?: number - /** - * UUID identifying the workflow graph definition - */ - workflow_id?: string - /** - * Workflow execution start timestamp (Unix milliseconds, only present for terminal states) - */ - execution_start_time?: number - /** - * Workflow execution completion timestamp (Unix milliseconds, only present for terminal states) - */ - execution_end_time?: number -} +export type HubUsernameCheckResponse = { + /** + * Whether the username is available for the caller's workspace. + */ + available: boolean; + /** + * Up to 5 available alternative usernames (only present when unavailable). + */ + suggestions?: Array; + /** + * The username that was checked. + */ + username: string; + /** + * If the username format is invalid, describes the format requirement. + */ + validation_error?: string; +}; /** - * Paginated list of jobs for the authenticated user. + * Full public profile for a Hub creator. */ -export type JobsListResponse = { - /** - * Array of jobs ordered by specified sort field - */ - jobs: Array - pagination: PaginationInfo -} +export type HubProfile = { + /** + * Public URL of the profile avatar image. + */ + avatar_url?: string; + description?: string; + display_name?: string; + username: string; + /** + * List of website URLs. + */ + website_urls?: Array; +}; /** - * Response after adding, updating, or removing tags on an asset. + * List of available Hub labels for categorizing workflows. */ -export type TagsModificationResponse = { - /** - * Tags that were successfully added (for add operation) - */ - added?: Array - /** - * Tags that were successfully removed (for remove operation) - */ - removed?: Array - /** - * Tags that were already present (for add operation) - */ - already_present?: Array - /** - * Tags that were not present (for remove operation) - */ - not_present?: Array - /** - * All tags on the asset after the operation - */ - total_tags: Array -} +export type HubLabelListResponse = { + /** + * Available labels filtered by type (or all if no type specified). + */ + labels: Array; +}; /** - * Details of a single validation error encountered during asset operations. + * Metadata for a single Hub label. */ -export type ValidationError = { - /** - * Machine-readable error code - */ - code: string - /** - * Human-readable error message - */ - message: string - /** - * Field that failed validation - */ - field: string -} +export type HubLabelInfo = { + /** + * Optional description of the label. + */ + description?: string; + /** + * Human-readable display name. + */ + display_name: string; + /** + * Slug identifier. + */ + name: string; + /** + * Label category. + */ + type: 'tag' | 'model' | 'custom_node'; +}; /** - * Result of validating a set of asset operations. + * Response containing a signed upload URL and the target asset path. */ -export type ValidationResult = { - /** - * Overall validation status (true if all checks passed) - */ - is_valid: boolean - /** - * Blocking validation errors that prevent download - */ - errors?: Array - /** - * Non-blocking validation warnings (informational only) - */ - warnings?: Array -} +export type HubAssetUploadUrlResponse = { + /** + * The public URL where the file will be accessible after upload. + */ + public_url: string; + /** + * Signed token to pass in the publish request. Has a server-determined TTL. + */ + token: string; + /** + * Presigned R2 URL for uploading the file via PUT. + */ + upload_url: string; +}; /** - * Acknowledgement of an async asset download task; clients poll GET /api/tasks/{task_id} for status. + * Request body for requesting a signed upload URL for a Hub asset. */ -export type AssetDownloadResponse = { - /** - * Task ID for tracking download progress via GET /api/tasks/{task_id} - */ - task_id: string - /** - * Current task status - */ - status: 'created' | 'running' | 'completed' | 'failed' - /** - * Human-readable message - */ - message?: string -} +export type HubAssetUploadUrlRequest = { + /** + * MIME type of the file (e.g. "image/jpeg", "video/mp4"). Validated against a whitelist; the canonical file extension is derived from this value. + * + */ + content_type: string; + /** + * Original filename for display purposes. Not used in the storage key. + */ + filename: string; +}; /** - * Metadata for a remotely hosted asset resolved by URL. + * Execution history response with history array. + * Returns an object with a "history" key containing an array of history entries. + * Each entry includes prompt_id as a property along with execution data. + * */ -export type AssetMetadataResponse = { - /** - * Size of the asset in bytes (-1 if unknown) - */ - content_length: number - /** - * MIME type of the asset - */ - content_type?: string - /** - * Suggested filename for the asset from source - */ - filename?: string - /** - * Display name or title for the asset from source - */ - name?: string - /** - * Tags for categorization from source - */ - tags?: Array - /** - * Preview image as base64-encoded data URL - */ - preview_image?: string - /** - * Validation results for the file - */ - validation?: ValidationResult -} +export type HistoryResponse = { + /** + * Array of history entries ordered by creation time (newest first) + */ + history: Array; +}; + +/** + * History entry with prompt_id and execution data + */ +export type HistoryEntry = { + /** + * Job creation timestamp (Unix timestamp in milliseconds) + */ + create_time?: number; + /** + * Metadata about the execution and nodes + */ + meta?: { + [key: string]: unknown; + }; + /** + * Output data from execution (generated images, files, etc.) + */ + outputs?: { + [key: string]: unknown; + }; + /** + * Filtered prompt execution data (lightweight format) + */ + prompt?: { + /** + * Additional execution data (workflow removed from extra_pnginfo) + */ + extra_data?: { + [key: string]: unknown; + }; + /** + * Execution priority + */ + priority?: number; + /** + * The prompt ID + */ + prompt_id?: string; + }; + /** + * Unique identifier for this prompt execution + */ + prompt_id: string; + /** + * Execution status and timeline information + */ + status?: { + [key: string]: unknown; + }; + /** + * UUID identifying the workflow graph definition + */ + workflow_id?: string; +}; + +/** + * Request to manage history operations + */ +export type HistoryManageRequest = { + /** + * If true, clear all history for the authenticated user + */ + clear?: boolean; + /** + * Array of job IDs to delete from history + */ + delete?: Array; +}; + +/** + * Detailed execution history response for a specific prompt. + * Returns a dictionary with prompt_id as key and full history data as value. + * + */ +export type HistoryDetailResponse = { + [key: string]: HistoryDetailEntry; +}; + +/** + * History entry with full prompt data + */ +export type HistoryDetailEntry = { + /** + * Metadata about the execution and nodes + */ + meta?: { + [key: string]: unknown; + }; + /** + * Output data from execution (generated images, files, etc.) + */ + outputs?: { + [key: string]: unknown; + }; + /** + * Full prompt execution data + */ + prompt?: { + /** + * Additional execution data + */ + extra_data?: { + [key: string]: unknown; + }; + /** + * Output nodes to execute + */ + outputs_to_execute?: Array; + /** + * Execution priority + */ + priority?: number; + /** + * The workflow nodes + */ + prompt?: { + [key: string]: unknown; + }; + /** + * The prompt ID + */ + prompt_id?: string; + }; + /** + * Execution status and timeline information + */ + status?: { + [key: string]: unknown; + }; +}; + +/** + * Metadata for a global subgraph blueprint (without full data) + */ +export type GlobalSubgraphInfo = { + /** + * The full subgraph JSON data (may be empty in list view) + */ + data?: string; + /** + * Additional information about the subgraph + */ + info: { + /** + * The node pack/module that provides this subgraph + */ + node_pack: string; + }; + /** + * Display name of the subgraph blueprint + */ + name: string; + /** + * Source type of the subgraph - "templates" for workflow templates or "custom_node" for custom node subgraphs + */ + source: string; +}; + +/** + * Full data for a global subgraph blueprint + */ +export type GlobalSubgraphData = { + /** + * The full subgraph JSON data as a string + */ + data: string; + /** + * Additional information about the subgraph + */ + info: { + /** + * The node pack/module that provides this subgraph + */ + node_pack: string; + }; + /** + * Display name of the subgraph blueprint + */ + name: string; + /** + * Source type of the subgraph - "templates" for workflow templates or "custom_node" for custom node subgraphs + */ + source: string; +}; + +/** + * Individual file entry within a full user data response. + */ +export type GetUserDataResponseFullFile = { + /** + * UNIX timestamp of the last modification in milliseconds. + */ + modified?: number; + /** + * File name or path relative to the user directory. + */ + path?: string; + /** + * File size in bytes. + */ + size?: number; +}; + +/** + * List of user data file entries (each with path, size, and modification time) returned when full_info=true. + */ +export type GetUserDataResponseFull = Array; + +/** + * Request body for forking an existing workflow into the user's account. + */ +export type ForkWorkflowRequest = { + /** + * Name for the forked workflow + */ + name?: string; + /** + * Version number to fork from + */ + source_version: number; +}; + +/** + * Response after submitting feedback + */ +export type FeedbackResponse = { + [key: string]: unknown; +}; + +/** + * Request to submit user feedback + */ +export type FeedbackRequest = { + /** + * The feedback content or message + */ + content?: string; + /** + * Additional metadata about the feedback + */ + metadata?: { + [key: string]: unknown; + }; + /** + * User's rating of ComfyUI Cloud experience (1-5 stars) + */ + rating?: number; + /** + * Type of feedback being submitted + */ + type: 'missing_nodes' | 'general' | 'missing_models'; +}; + +/** + * Response containing a signed download URL for an exported asset archive. + */ +export type ExportDownloadUrlResponse = { + /** + * When the signed URL expires + */ + expires_at?: string; + /** + * Signed URL for downloading the export ZIP file + */ + url: string; +}; + +/** + * Response containing the issued Cloud JWT and its expiry. + */ +export type ExchangeTokenResponse = { + /** + * Token expiration time (RFC 3339) + */ + expires_at: string; + /** + * Permission strings for the role + */ + permissions: Array; + /** + * User's role in the workspace + */ + role: 'owner' | 'member'; + /** + * Cloud JWT token + */ + token: string; + workspace: WorkspaceSummary; +}; + +/** + * Optional request body for the token exchange endpoint. The Firebase JWT + * being exchanged is supplied via the `Authorization: Bearer` header; this + * body only carries workspace-selection input. + * + */ +export type ExchangeTokenRequest = { + /** + * Workspace ID to get token for. Defaults to personal workspace if omitted. + */ + workspace_id?: string; +}; + +/** + * Result of redeeming a desktop login code. + */ +export type DesktopLoginCodeRedeemResponse = { + /** + * The code is now claimed for the authenticated user. + */ + status: 'redeemed'; +}; + +/** + * Request to claim a desktop login code for the authenticated user. + */ +export type DesktopLoginCodeRedeemRequest = { + /** + * The login code the desktop app placed in the browser URL. + */ + code: string; +}; + +/** + * Exchange poll result. Pending until the code is redeemed in the browser. + */ +export type DesktopLoginCodeExchangeResponse = { + /** + * One-time Firebase custom token for the redeeming user. Present only when status is "complete". + */ + custom_token?: string; + /** + * Whether the code has been redeemed yet. + */ + status: 'pending' | 'complete'; +}; + +/** + * Request to exchange a redeemed login code for a custom token. + */ +export type DesktopLoginCodeExchangeRequest = { + /** + * The login code returned at creation. + */ + code: string; + /** + * PKCE code verifier matching the challenge supplied at creation. + */ + code_verifier: string; +}; + +/** + * A freshly minted desktop login code and its polling parameters. + */ +export type DesktopLoginCodeCreateResponse = { + /** + * Opaque single-use login code ("dlc_" prefix). + */ + code: string; + /** + * Seconds until the code expires if not redeemed. + */ + expires_in: number; + /** + * Suggested seconds between exchange polls. + */ + poll_interval: number; +}; + +/** + * Request to mint a desktop login code. + */ +export type DesktopLoginCodeCreateRequest = { + /** + * Desktop app version string. + */ + app_version: string; + /** + * PKCE code challenge - base64url(SHA256(code_verifier)) per RFC 7636 (S256 only). + */ + code_challenge: string; + /** + * Stable identifier of the desktop installation, used only for the login attribution event. Omit when telemetry consent is off - the login flow still works, but no attribution event is emitted. + */ + installation_id?: string; + /** + * Desktop platform identifier (e.g. darwin, win32, linux). + */ + platform: string; +}; + +/** + * Response after deleting a session cookie + */ +export type DeleteSessionResponse = { + /** + * Whether the session was deleted successfully + */ + success: boolean; +}; + +/** + * Request body for creating a new workspace. + */ +export type CreateWorkspaceRequest = { + /** + * Display name for the workspace + */ + name: string; +}; + +/** + * Response containing the newly created workspace API key. + */ +export type CreateWorkspaceApiKeyResponse = { + /** + * When the key was created + */ + created_at: 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; + /** + * When the key expires (if set) + */ + expires_at?: string; + /** + * API key ID + */ + id: string; + /** + * The full plaintext API key (only shown once) + */ + key: string; + /** + * First 8 chars after prefix for display + */ + key_prefix: string; + /** + * User-provided label + */ + name: string; +}; + +/** + * Request body for creating a new workspace-scoped API key. + */ +export type CreateWorkspaceApiKeyRequest = { + /** + * 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 + */ + expires_at?: string; + /** + * User-provided label for the key + */ + name: string; +}; + +/** + * Request body for creating a new version of a saved workflow. + */ +export type CreateWorkflowVersionRequest = { + /** + * The version number this change is based on (for optimistic concurrency) + */ + base_version: number; + /** + * The updated ComfyUI workflow JSON + */ + workflow_json: { + [key: string]: unknown; + }; +}; + +/** + * Request body for creating a new saved workflow. + */ +export type CreateWorkflowRequest = { + /** + * Default view mode + */ + default_view?: 'workflow' | 'app'; + /** + * Description of the workflow + */ + description?: string; + /** + * ID of the source workflow if forked + */ + forked_from_workflow_id?: string; + /** + * ID of the source workflow version if forked + */ + forked_from_workflow_version_id?: string; + /** + * Display name for the workflow + */ + name?: string; + /** + * The ComfyUI workflow JSON + */ + workflow_json: { + [key: string]: unknown; + }; +}; + +/** + * Response after successfully purchasing a credit top-up. + */ +export type CreateTopupResponse = { + /** + * Amount being charged in cents + */ + amount_cents: number; + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string; + /** + * Current status of the top-up + */ + status: 'pending' | 'completed' | 'failed'; + /** + * Unique identifier for the top-up request (same as billing_op_id, deprecated) + */ + topup_id: string; +}; + +/** + * Request body for purchasing a one-time credit top-up. + */ +export type CreateTopupRequest = { + /** + * Amount to charge and grant as credits (in cents). Minimum $5.00. + */ + amount_cents: number; + /** + * Client-provided key to prevent duplicate operations. + * If a billing op with this key already exists, returns the existing op instead of creating a new one. + * + */ + idempotency_key?: string; +}; + +/** + * Response after creating a session cookie + */ +export type CreateSessionResponse = { + /** + * Session expiration time in seconds (5 days) + */ + expiresIn?: number; + /** + * Whether the session was created successfully + */ + success: boolean; +}; + +/** + * Request body for creating a new user secret. + */ +export type CreateSecretRequest = { + /** + * User-provided label for the secret + */ + name: string; + /** + * Optional provider identifier (e.g., huggingface, civitai) + */ + provider?: string; + /** + * The plaintext secret to encrypt and store + */ + secret_value: string; +}; + +/** + * Request body for inviting a user to a workspace. + */ +export type CreateInviteRequest = { + /** + * Email address to invite + */ + email: string; +}; + +/** + * Request body for creating a new Hub profile. + */ +export type CreateHubProfileRequest = { + /** + * Token (from /api/hub/assets/upload-url) for an avatar image. Omit to have no avatar. + * + */ + avatar_token?: string; + description?: string; + display_name?: string; + /** + * Unique URL-safe slug for the hub profile. Immutable after creation. + */ + username: string; + /** + * List of website URLs. + */ + website_urls?: Array; + /** + * ID of the workspace to create the hub profile for. The authenticated user must belong to this workspace. + */ + workspace_id: string; +}; + +/** + * Response after successfully cancelling a subscription. + */ +export type CancelSubscriptionResponse = { + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string; + /** + * The date when the subscription will end (end of current billing period) + */ + cancel_at: string; +}; + +/** + * Request body for cancelling the current subscription. + */ +export type CancelSubscriptionRequest = { + /** + * Client-provided key to prevent duplicate operations. + * If a billing op with this key already exists, returns the existing op instead of creating a new one. + * + */ + idempotency_key?: string; +}; + +/** + * Response after bulk-revoking API keys for a workspace member. + */ +export type BulkRevokeApiKeysResponse = { + /** + * Number of API keys that were revoked + */ + revoked_count: number; +}; + +/** + * Current billing and subscription status for a workspace. + */ +export type BillingStatusResponse = { + billing_status?: BillingStatus; + /** + * When the subscription will become inactive (if canceled) + */ + cancel_at?: string; + /** + * Whether the workspace has available credits + */ + has_funds: boolean; + /** + * Whether the workspace has an active subscription + */ + is_active: boolean; + /** + * Plan identifier (e.g., standard-monthly, team-pro-annual) + */ + plan_slug?: string; + /** + * When the current billing period ends and the next one begins + */ + renewal_date?: string; + subscription_duration?: SubscriptionDuration; + /** + * Subscription activity status (scheduled subscriptions are not returned) + */ + subscription_status?: 'active' | 'ended' | 'canceled'; + subscription_tier?: SubscriptionTier; + /** + * The team credit stop the workspace is currently subscribed to, for per-credit Team plans (BE-1254). Lets clients tell apart team subscriptions, which all share subscription_tier=TEAM. Always present; null for personal plans (use subscription_tier to distinguish those) and for legacy team plans without a credit stop. + */ + team_credit_stop: TeamCreditStopSummary | null; +}; + +/** + * Payment lifecycle status + */ +export type BillingStatus = 'awaiting_payment_method' | 'pending_payment' | 'paid' | 'payment_failed' | 'inactive'; + +/** + * List of available billing plans for subscription. + */ +export type BillingPlansResponse = { + /** + * Current plan slug if subscribed + */ + current_plan_slug?: string; + plans: Array; + team_credit_stops?: TeamCreditStops; +}; + +/** + * Status of an asynchronous billing operation. + */ +export type BillingOpStatusResponse = { + /** + * When the operation completed (success or failure) + */ + completed_at?: string; + /** + * Error message if status is failed + */ + error_message?: string; + /** + * Unique identifier for the billing operation + */ + id: string; + /** + * When the operation was initiated + */ + started_at: string; + /** + * Current status of the operation + */ + status: 'pending' | 'succeeded' | 'failed'; +}; + +/** + * Paginated list of billing events for a workspace. + */ +export type BillingEventsResponse = { + events: Array; + /** + * Items per page + */ + limit: number; + /** + * Current page number (1-indexed) + */ + page: number; + /** + * Total number of events + */ + total: number; + /** + * Total number of pages + */ + totalPages: number; +}; + +/** + * A single history event. The cloud history-events store is the single source of truth for both billing events (charges, credits, adjustments) and user-facing usage events. + */ +export type BillingEvent = { + /** + * When the event occurred + */ + createdAt: string; + /** + * Unique event identifier + */ + event_id: string; + /** + * Type of history event. Billing types (e.g. invoice_paid, checkout_completed, topup_completed) and the migrated user-facing usage types (account_created, credit_added, api_usage_completed, cloud_subscription_created, cloud_subscription_paid, cloud_subscription_credit_added, cloud_workflow_executed, free_tier_credit_granted). Kept as a free-form string for back-compat with existing billing-event consumers. + */ + event_type: string; + /** + * Event-specific parameters + */ + params?: { + [key: string]: unknown; + }; +}; + +/** + * Current credit balance and usage details for a workspace. + */ +export type BillingBalanceResponse = { + /** + * The total remaining balance in microamount (1/1,000,000 of the currency unit) + */ + amount_micros: number; + /** + * The remaining balance from cloud credits in microamount + */ + cloud_credit_balance_micros?: number; + /** + * Currency code + */ + currency: string; + /** + * The effective balance (total balance minus pending charges). Can be negative if pending charges exceed the balance. + */ + effective_balance_micros?: number; + /** + * The total amount of pending/unbilled charges from draft invoices in microamount + */ + pending_charges_micros?: number; + /** + * The remaining balance from prepaid commits in microamount + */ + prepaid_balance_micros?: number; +}; + +/** + * Response returned when an existing asset is successfully updated. + */ +export type AssetUpdated = { + /** + * Display name of the asset. Mirrors name for backwards compatibility. + */ + display_name?: string | null; + /** + * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") + */ + file_path?: string | null; + /** + * Blake3 hash of the asset content. + */ + hash?: string; + /** + * Asset ID + */ + id: string; + /** + * ID of the job that created this asset, if available + */ + job_id?: string | null; + /** + * Updated MIME type of the asset + */ + mime_type?: string; + /** + * Updated name of the asset + */ + name?: string; + /** + * Tags associated with the asset + */ + tags?: Array; + /** + * Timestamp of the update + */ + updated_at: string; + /** + * Updated custom metadata + */ + user_metadata?: { + [key: string]: unknown; + }; +}; + +/** + * Histogram of tag counts used for refining asset search results. + */ +export type AssetTagHistogramResponse = { + /** + * Map of tag names to their occurrence counts on matching assets + */ + tag_counts: { + [key: string]: number; + }; +}; + +/** + * Metadata for a remotely hosted asset resolved by URL. + */ +export type AssetMetadataResponse = { + /** + * Size of the asset in bytes (-1 if unknown) + */ + content_length: number; + /** + * MIME type of the asset + */ + content_type?: string; + /** + * Suggested filename for the asset from source + */ + filename?: string; + /** + * Display name or title for the asset from source + */ + name?: string; + /** + * Preview image as base64-encoded data URL + */ + preview_image?: string; + /** + * Tags for categorization from source + */ + tags?: Array; + /** + * Validation results for the file + */ + validation?: ValidationResult; +}; + +/** + * Acknowledgement of an async asset download task; clients poll GET /api/tasks/{task_id} for status. + */ +export type AssetDownloadResponse = { + /** + * Human-readable message + */ + message?: string; + /** + * Current task status + */ + status: 'created' | 'running' | 'completed' | 'failed'; + /** + * Task ID for tracking download progress via GET /api/tasks/{task_id} + */ + task_id: string; +}; + +/** + * Response returned when a new asset is successfully created. + */ +export type AssetCreated = Asset & { + /** + * Whether this was a new asset creation (true) or returned existing (false) + */ + created_new: boolean; +}; + +/** + * Response returned after successfully accepting a workspace invitation. + */ +export type AcceptInviteResponse = { + /** + * ID of the workspace joined + */ + workspace_id: string; + /** + * Name of the workspace joined + */ + workspace_name: string; +}; + +/** + * Paginated list of assets belonging to the authenticated user. + */ +export type ListAssetsResponseWritable = { + /** + * List of assets matching the query + */ + assets: Array; + /** + * 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; + /** + * Total number of assets matching the filters + */ + total: number; +}; + +/** + * Represents a user-owned asset (image, video, or other generated output). + */ +export type AssetWritable = { + /** + * Timestamp when the asset was created + */ + created_at: string; + /** + * Display name of the asset. Mirrors name for backwards compatibility. + */ + display_name?: string | null; + /** + * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") + */ + file_path?: string | null; + /** + * Blake3 hash of the asset content. + */ + hash?: string; + /** + * Unique identifier for the asset + */ + id: string; + /** + * Whether this asset is immutable (cannot be modified or deleted) + */ + is_immutable?: boolean; + /** + * ID of the job that created this asset, if available + */ + job_id?: string | null; + /** + * Timestamp when the asset was last accessed + */ + last_access_time?: string; + /** + * MIME type of the asset + */ + mime_type?: string; + /** + * Name of the asset file + */ + name: string; + /** + * ID of the preview asset if available + */ + preview_id?: string | null; + /** + * URL for asset preview/thumbnail + */ + preview_url?: string; + /** + * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash. + */ + short_url?: string | null; + /** + * Size of the asset in bytes + */ + size?: number; + /** + * Tags associated with the asset + */ + tags?: Array; + /** + * Timestamp when the asset was last updated + */ + updated_at: string; + /** + * Custom user metadata for the asset + */ + user_metadata?: { + [key: string]: unknown; + }; +}; + +/** + * Response returned when a new asset is successfully created. + */ +export type AssetCreatedWritable = AssetWritable & { + /** + * Whether this was a new asset creation (true) or returned existing (false) + */ + created_new: boolean; +}; + +export type GetJwksData = { + body?: never; + path?: never; + query?: never; + url: '/.well-known/jwks.json'; +}; + +export type GetJwksResponses = { + /** + * JWKS response + */ + 200: JwksResponse; +}; + +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 GetOAuthProtectedResourceByPathData = { + body?: never; + path: { + /** + * Single-segment resource path without its leading slash (e.g. "mcp"). + */ + resourcePath: string; + }; + query?: never; + url: '/.well-known/oauth-protected-resource/{resourcePath}'; +}; + +export type GetOAuthProtectedResourceByPathErrors = { + /** + * OAuth disabled, or no active resource at this path + */ + 404: ErrorResponse; +}; + +export type GetOAuthProtectedResourceByPathError = GetOAuthProtectedResourceByPathErrors[keyof GetOAuthProtectedResourceByPathErrors]; + +export type GetOAuthProtectedResourceByPathResponses = { + /** + * Protected-resource metadata + */ + 200: OAuthProtectedResourceMetadata; +}; + +export type GetOAuthProtectedResourceByPathResponse = GetOAuthProtectedResourceByPathResponses[keyof GetOAuthProtectedResourceByPathResponses]; + +export type GetCustomNodeProxyData = { + body?: never; + path: { + /** + * Custom node HTTP endpoint path being proxied to the CPU-backed worker. + */ + path: string; + }; + query?: never; + url: '/__custom_node_proxy/{path}'; +}; + +export type GetCustomNodeProxyErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Path not in allowlist + */ + 403: unknown; +}; + +export type GetCustomNodeProxyResponses = { + /** + * Proxied response + */ + 200: unknown; +}; + +export type PostCustomNodeProxyData = { + body?: never; + path: { + /** + * Custom node HTTP endpoint path being proxied to the CPU-backed worker. + */ + path: string; + }; + query?: never; + url: '/__custom_node_proxy/{path}'; +}; + +export type PostCustomNodeProxyErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Path not in allowlist + */ + 403: unknown; +}; + +export type PostCustomNodeProxyResponses = { + /** + * Proxied response + */ + 200: unknown; +}; + +export type ListAssetsData = { + body?: never; + path?: never; + query?: { + /** + * Filter assets that have ALL of these tags + */ + include_tags?: Array; + /** + * Exclude assets that have ANY of these tags + */ + exclude_tags?: Array; + /** + * Filter assets where name contains this substring (case-insensitive) + */ + name_contains?: string; + /** + * JSON object for filtering by metadata fields + */ + metadata_filter?: string; + /** + * Maximum number of assets to return (1-500) + */ + limit?: number; + /** + * Number of assets to skip for pagination + */ + offset?: number; + /** + * Field to sort by + */ + sort?: 'name' | 'created_at' | 'updated_at' | 'size' | 'last_access_time'; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Whether to include public/shared assets in results + */ + include_public?: boolean; + /** + * Filter assets by exact content hash. + */ + 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'; +}; + +export type ListAssetsErrors = { + /** + * Invalid request parameters + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type ListAssetsError = ListAssetsErrors[keyof ListAssetsErrors]; + +export type ListAssetsResponses = { + /** + * Success - Assets returned + */ + 200: ListAssetsResponse; +}; + +export type ListAssetsResponse2 = ListAssetsResponses[keyof ListAssetsResponses]; + +export type CreateAssetData = { + body: { + /** + * The asset file to upload + */ + file: Blob | File; + /** + * Content hash of the file. + */ + hash?: string; + /** + * Optional asset ID for idempotent creation. If provided and asset exists, returns existing asset. + */ + id?: string; + /** + * MIME type of the asset (e.g., "image/png", "video/mp4") + */ + mime_type?: string; + /** + * Display name for the asset + */ + name?: string; + /** + * Optional preview asset ID. If not provided, images will use their own ID as preview. + */ + preview_id?: string; + /** + * JSON-encoded array of freeform tag strings, e.g. '["models","checkpoint"]'. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. + */ + tags?: string; + /** + * Custom JSON metadata as a string + */ + user_metadata?: string; + }; + path?: never; + query?: never; + url: '/api/assets'; +}; + +export type CreateAssetErrors = { + /** + * Invalid request (bad file, invalid content type, etc.) + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * File too large + */ + 413: ErrorResponse; + /** + * Unsupported media type + */ + 415: ErrorResponse; + /** + * Validation error (e.g., disallowed model_type tag) + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type CreateAssetError = CreateAssetErrors[keyof CreateAssetErrors]; + +export type CreateAssetResponses = { + /** + * Asset already existed for this user (deduplicated by content hash); the + * existing asset is returned with created_new=false. + * + */ + 200: AssetCreated; + /** + * Asset created successfully (created_new=true) + */ + 201: AssetCreated; +}; + +export type CreateAssetResponse = CreateAssetResponses[keyof CreateAssetResponses]; + +export type DeleteAssetData = { + body?: never; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}'; +}; + +export type DeleteAssetErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: ErrorResponse; + /** + * Asset cannot be deleted because it is referenced by another resource, e.g. a workflow version (error code: ASSET_IN_USE) + */ + 409: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type DeleteAssetError = DeleteAssetErrors[keyof DeleteAssetErrors]; + +export type DeleteAssetResponses = { + /** + * Asset record deleted successfully + */ + 204: void; +}; + +export type DeleteAssetResponse = DeleteAssetResponses[keyof DeleteAssetResponses]; + +export type GetAssetByIdData = { + body?: never; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}'; +}; + +export type GetAssetByIdErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetAssetByIdError = GetAssetByIdErrors[keyof GetAssetByIdErrors]; + +export type GetAssetByIdResponses = { + /** + * Asset details retrieved successfully + */ + 200: Asset; +}; + +export type GetAssetByIdResponse = GetAssetByIdResponses[keyof GetAssetByIdResponses]; + +export type UpdateAssetData = { + body: { + /** + * Updated MIME type of the asset + */ + mime_type?: string; + /** + * New display name for the asset + */ + name?: string; + /** + * Updated preview asset ID + */ + preview_id?: string; + /** + * Updated custom metadata + */ + user_metadata?: { + [key: string]: unknown; + }; + }; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}'; +}; + +export type UpdateAssetErrors = { + /** + * Invalid request — no fields provided, or `preview_id` is the zero UUID + * (`INVALID_PREVIEW_ID`). + * + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found — returned both when the asset being updated does + * not exist and when `preview_id` does not reference an asset + * accessible to the caller. + * + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type UpdateAssetError = UpdateAssetErrors[keyof UpdateAssetErrors]; + +export type UpdateAssetResponses = { + /** + * Asset updated successfully + */ + 200: AssetUpdated; +}; + +export type UpdateAssetResponse = UpdateAssetResponses[keyof UpdateAssetResponses]; + +export type GetAssetContentData = { + body?: never; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: { + /** + * Content-Disposition for the response: `attachment` (download) or + * `inline` (render in browser). Defaults to `attachment`. + * + */ + disposition?: 'inline' | 'attachment'; + }; + url: '/api/assets/{id}/content'; +}; + +export type GetAssetContentErrors = { + /** + * Asset not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetAssetContentError = GetAssetContentErrors[keyof GetAssetContentErrors]; + +export type GetAssetContentResponses = { + /** + * Asset content stream (local runtime streams the bytes directly) + */ + 200: Blob | File; +}; + +export type GetAssetContentResponse = GetAssetContentResponses[keyof GetAssetContentResponses]; + +export type RemoveAssetTagsData = { + body: { + /** + * Tags to remove from the asset + */ + tags: Array; + }; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}/tags'; +}; + +export type RemoveAssetTagsErrors = { + /** + * Invalid request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: ErrorResponse; + /** + * Validation error (e.g., reserved tag) + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type RemoveAssetTagsError = RemoveAssetTagsErrors[keyof RemoveAssetTagsErrors]; + +export type RemoveAssetTagsResponses = { + /** + * Tags removed successfully + */ + 200: TagsModificationResponse; +}; + +export type RemoveAssetTagsResponse = RemoveAssetTagsResponses[keyof RemoveAssetTagsResponses]; + +export type AddAssetTagsData = { + body: { + /** + * Tags to add to the asset + */ + tags: Array; + }; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}/tags'; +}; + +export type AddAssetTagsErrors = { + /** + * Invalid request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: ErrorResponse; + /** + * Validation error (e.g., reserved tag) + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type AddAssetTagsError = AddAssetTagsErrors[keyof AddAssetTagsErrors]; + +export type AddAssetTagsResponses = { + /** + * Tags added successfully + */ + 200: TagsModificationResponse; +}; + +export type AddAssetTagsResponse = AddAssetTagsResponses[keyof AddAssetTagsResponses]; + +export type CreateAssetDownloadData = { + body: { + /** + * Optional preview asset ID to associate with the downloaded asset + */ + preview_id?: string; + /** + * URL of the file to download (must be from huggingface.co, civitai.com, or civitai.red) + */ + source_url: string; + /** + * Optional tags for the asset (e.g., ["model", "checkpoint"]) + */ + tags?: Array; + /** + * Optional user-defined metadata to attach to the asset + */ + user_metadata?: { + [key: string]: unknown; + }; + }; + path?: never; + query?: never; + url: '/api/assets/download'; +}; + +export type CreateAssetDownloadErrors = { + /** + * Invalid URL or unsupported source + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Validation errors + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type CreateAssetDownloadError = CreateAssetDownloadErrors[keyof CreateAssetDownloadErrors]; + +export type CreateAssetDownloadResponses = { + /** + * File already exists in storage - asset created/returned immediately + */ + 200: AssetCreated; + /** + * Accepted - Download task created and processing in background + */ + 202: AssetDownloadResponse; +}; + +export type CreateAssetDownloadResponse = CreateAssetDownloadResponses[keyof CreateAssetDownloadResponses]; + +export type CreateAssetExportData = { + body: { + /** + * Asset IDs to include in the ZIP bundle. Supports input, output, and available temp assets. Additive to output assets associated with provided job IDs. + */ + asset_ids?: Array; + /** + * When true, preview assets attached to the provided job_ids are included in the export. No effect on asset_ids. Preview assets are placed under a `previews/` subfolder in group-by-job layouts. + */ + include_previews?: boolean; + /** + * Optional per-job asset name filters. When provided for a job ID, + * only assets whose name matches one of the specified names are included. + * Job IDs present in `job_ids` but absent from this map include their output assets (plus previews when `include_previews` is true). + * + */ + job_asset_name_filters?: { + [key: string]: Array; + }; + /** + * Job IDs whose output assets are included in the ZIP bundle. Preview assets of these jobs are additionally included when `include_previews` is true. + */ + job_ids?: Array; + /** + * Strategy for naming files in the ZIP: + * - group_by_job_id: Group assets by job ID as a parent directory (e.g., "833a1b5c-beab-436a-ae8e-f07e7cd7b2c4/ComfyUI_00001_.png") + * - preserve: Use original asset names, skip duplicates (first one wins) + * - asset_id: Use the asset ID as the filename (e.g., "833a1b5c-beab-436a-ae8e-f07e7cd7b2c4.png") + * - group_by_job_time: Group by job creation timestamp (e.g., "2026-03-26T16-13-00/ComfyUI_00001_.png") + * + */ + naming_strategy?: 'group_by_job_id' | 'preserve' | 'asset_id' | 'group_by_job_time'; + }; + path?: never; + query?: never; + url: '/api/assets/export'; +}; + +export type CreateAssetExportErrors = { + /** + * Invalid request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type CreateAssetExportError = CreateAssetExportErrors[keyof CreateAssetExportErrors]; + +export type CreateAssetExportResponses = { + /** + * Accepted - Export task created and processing in background + */ + 202: AssetDownloadResponse; +}; + +export type CreateAssetExportResponse = CreateAssetExportResponses[keyof CreateAssetExportResponses]; + +export type DownloadExportData = { + body?: never; + path: { + /** + * Export filename with extension (e.g., "021e55cd-9785-4ac7-ac39-f4010138e3bc.zip") + */ + exportName: string; + }; + query?: never; + url: '/api/assets/exports/{exportName}'; +}; + +export type DownloadExportErrors = { + /** + * Invalid export name + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Export not found or not owned by user + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type DownloadExportError = DownloadExportErrors[keyof DownloadExportErrors]; + +export type DownloadExportResponses = { + /** + * Signed URL for downloading the export + */ + 200: ExportDownloadUrlResponse; +}; + +export type DownloadExportResponse = DownloadExportResponses[keyof DownloadExportResponses]; + +export type CreateAssetFromHashData = { + body: { + /** + * Blake3 content hash of the existing asset (blake3: prefix) + */ + hash: string; + /** + * MIME type of the asset (e.g., "image/png", "video/mp4") + */ + mime_type?: string; + /** + * Display name for the asset reference (optional) + */ + name?: string; + /** + * Freeform tags for the asset. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. + */ + tags: Array; + /** + * Custom metadata for this asset reference + */ + user_metadata?: { + [key: string]: unknown; + }; + }; + path?: never; + query?: never; + url: '/api/assets/from-hash'; +}; + +export type CreateAssetFromHashErrors = { + /** + * Invalid request (bad hash format, invalid tags, etc.) + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Source asset with given hash not found + */ + 404: ErrorResponse; + /** + * Validation error (e.g., disallowed model_type tag) + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type CreateAssetFromHashError = CreateAssetFromHashErrors[keyof CreateAssetFromHashErrors]; + +export type CreateAssetFromHashResponses = { + /** + * Asset reference already existed for this user (deduplicated by content + * hash); the existing asset is returned with created_new=false. + * + */ + 200: AssetCreated; + /** + * Asset reference created successfully (created_new=true) + */ + 201: AssetCreated; +}; + +export type CreateAssetFromHashResponse = CreateAssetFromHashResponses[keyof CreateAssetFromHashResponses]; + +export type PostAssetsFromWorkflowData = { + body: WorkflowApiAssetsRequest; + path?: never; + query?: never; + url: '/api/assets/from-workflow'; +}; + +export type PostAssetsFromWorkflowErrors = { + /** + * Bad request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type PostAssetsFromWorkflowError = PostAssetsFromWorkflowErrors[keyof PostAssetsFromWorkflowErrors]; + +export type PostAssetsFromWorkflowResponses = { + /** + * Success + */ + 200: WorkflowApiAssetsResponse; +}; + +export type PostAssetsFromWorkflowResponse = PostAssetsFromWorkflowResponses[keyof PostAssetsFromWorkflowResponses]; + +export type CheckAssetByHashData = { + body?: never; + path: { + /** + * Blake3 hash of the asset in format 'blake3:hex_digest' + */ + hash: string; + }; + query?: never; + url: '/api/assets/hash/{hash}'; +}; + +export type CheckAssetByHashErrors = { + /** + * Invalid hash format + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: unknown; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type CheckAssetByHashError = CheckAssetByHashErrors[keyof CheckAssetByHashErrors]; + +export type CheckAssetByHashResponses = { + /** + * Asset exists + */ + 200: unknown; +}; + +export type ImportPublishedAssetsData = { + body: ImportPublishedAssetsRequest; + path?: never; + query?: never; + url: '/api/assets/import'; +}; + +export type ImportPublishedAssetsErrors = { + /** + * Bad request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type ImportPublishedAssetsError = ImportPublishedAssetsErrors[keyof ImportPublishedAssetsErrors]; + +export type ImportPublishedAssetsResponses = { + /** + * Successfully imported assets + */ + 200: ImportPublishedAssetsResponse; +}; + +export type ImportPublishedAssetsResponse2 = ImportPublishedAssetsResponses[keyof ImportPublishedAssetsResponses]; + +export type PruneAssetsData = { + body?: never; + path?: never; + query?: never; + url: '/api/assets/prune'; +}; + +export type PruneAssetsResponses = { + /** + * Prune result + */ + 200: { + /** + * Number of assets marked as missing + */ + marked?: number; + status?: string; + }; +}; + +export type PruneAssetsResponse = PruneAssetsResponses[keyof PruneAssetsResponses]; + +export type GetRemoteAssetMetadataData = { + body?: never; + path?: never; + query: { + /** + * Download URL to retrieve metadata from + */ + url: string; + }; + url: '/api/assets/remote-metadata'; +}; + +export type GetRemoteAssetMetadataErrors = { + /** + * Invalid URL or missing required parameter + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Failed to retrieve metadata from source + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetRemoteAssetMetadataError = GetRemoteAssetMetadataErrors[keyof GetRemoteAssetMetadataErrors]; + +export type GetRemoteAssetMetadataResponses = { + /** + * Metadata retrieved successfully + */ + 200: AssetMetadataResponse; +}; + +export type GetRemoteAssetMetadataResponse = GetRemoteAssetMetadataResponses[keyof GetRemoteAssetMetadataResponses]; + +export type SeedAssetsData = { + body?: { + /** + * Root folder paths to scan (if omitted, scans all) + */ + roots?: Array; + }; + path?: never; + query?: never; + url: '/api/assets/seed'; +}; + +export type SeedAssetsResponses = { + /** + * Seed started + */ + 200: { + status?: string; + }; +}; + +export type SeedAssetsResponse = SeedAssetsResponses[keyof SeedAssetsResponses]; + +export type CancelAssetSeedData = { + body?: never; + path?: never; + query?: never; + url: '/api/assets/seed/cancel'; +}; + +export type CancelAssetSeedResponses = { + /** + * Scan cancelled + */ + 200: { + status?: string; + }; +}; + +export type CancelAssetSeedResponse = CancelAssetSeedResponses[keyof CancelAssetSeedResponses]; + +export type GetAssetSeedStatusData = { + body?: never; + path?: never; + query?: never; + url: '/api/assets/seed/status'; +}; + +export type GetAssetSeedStatusResponses = { + /** + * Scan progress details (files scanned, total, status, etc.) + */ + 200: { + [key: string]: unknown; + }; +}; + +export type GetAssetSeedStatusResponse = GetAssetSeedStatusResponses[keyof GetAssetSeedStatusResponses]; + +export type GetAssetTagHistogramData = { + body?: never; + path?: never; + query?: { + /** + * Filter assets that have ALL of these tags + */ + include_tags?: Array; + /** + * Exclude assets that have ANY of these tags + */ + exclude_tags?: Array; + /** + * Filter assets where name contains this substring (case-insensitive) + */ + name_contains?: string; + /** + * JSON object for filtering by metadata fields + */ + metadata_filter?: string; + /** + * Maximum number of tags to return (1-1000, default 100) + */ + limit?: number; + /** + * Whether to include public/shared assets in results + */ + include_public?: boolean; + }; + url: '/api/assets/tags/refine'; +}; + +export type GetAssetTagHistogramErrors = { + /** + * Invalid request parameters + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetAssetTagHistogramError = GetAssetTagHistogramErrors[keyof GetAssetTagHistogramErrors]; + +export type GetAssetTagHistogramResponses = { + /** + * Success - Tag histogram returned + */ + 200: AssetTagHistogramResponse; +}; + +export type GetAssetTagHistogramResponse = GetAssetTagHistogramResponses[keyof GetAssetTagHistogramResponses]; + +export type CreateDesktopLoginCodeData = { + body: DesktopLoginCodeCreateRequest; + path?: never; + query?: never; + url: '/api/auth/desktop-login-codes'; +}; + +export type CreateDesktopLoginCodeErrors = { + /** + * Invalid request + */ + 400: ErrorResponse; + /** + * Service unavailable - login code store not available + */ + 503: ErrorResponse; +}; + +export type CreateDesktopLoginCodeError = CreateDesktopLoginCodeErrors[keyof CreateDesktopLoginCodeErrors]; + +export type CreateDesktopLoginCodeResponses = { + /** + * Login code created + */ + 201: DesktopLoginCodeCreateResponse; +}; + +export type CreateDesktopLoginCodeResponse = CreateDesktopLoginCodeResponses[keyof CreateDesktopLoginCodeResponses]; + +export type ExchangeDesktopLoginCodeData = { + body: DesktopLoginCodeExchangeRequest; + path?: never; + query?: never; + url: '/api/auth/desktop-login-codes/exchange'; +}; + +export type ExchangeDesktopLoginCodeErrors = { + /** + * Invalid request + */ + 400: ErrorResponse; + /** + * Code verifier does not match the challenge + */ + 403: ErrorResponse; + /** + * Unknown, expired, or already-consumed code + */ + 404: ErrorResponse; + /** + * Service unavailable - login code store or token minting not available + */ + 503: ErrorResponse; +}; + +export type ExchangeDesktopLoginCodeError = ExchangeDesktopLoginCodeErrors[keyof ExchangeDesktopLoginCodeErrors]; + +export type ExchangeDesktopLoginCodeResponses = { + /** + * Pending (not yet redeemed) or complete with a custom token + */ + 200: DesktopLoginCodeExchangeResponse; +}; + +export type ExchangeDesktopLoginCodeResponse = ExchangeDesktopLoginCodeResponses[keyof ExchangeDesktopLoginCodeResponses]; + +export type RedeemDesktopLoginCodeData = { + body: DesktopLoginCodeRedeemRequest; + path?: never; + query?: never; + url: '/api/auth/desktop-login-codes/redeem'; +}; + +export type RedeemDesktopLoginCodeErrors = { + /** + * Unauthorized - authentication required + */ + 401: ErrorResponse; + /** + * Unknown or expired code + */ + 404: ErrorResponse; + /** + * Code already redeemed by a different user + */ + 409: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; + /** + * Service unavailable - login code store not available + */ + 503: ErrorResponse; +}; + +export type RedeemDesktopLoginCodeError = RedeemDesktopLoginCodeErrors[keyof RedeemDesktopLoginCodeErrors]; + +export type RedeemDesktopLoginCodeResponses = { + /** + * Code redeemed (or already redeemed by the same user) + */ + 200: DesktopLoginCodeRedeemResponse; +}; + +export type RedeemDesktopLoginCodeResponse = RedeemDesktopLoginCodeResponses[keyof RedeemDesktopLoginCodeResponses]; + +export type DeleteSessionData = { + body?: never; + path?: never; + query?: never; + url: '/api/auth/session'; +}; + +export type DeleteSessionErrors = { + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type DeleteSessionError = DeleteSessionErrors[keyof DeleteSessionErrors]; + +export type DeleteSessionResponses = { + /** + * Session deleted successfully + */ + 200: DeleteSessionResponse; +}; + +export type DeleteSessionResponse2 = DeleteSessionResponses[keyof DeleteSessionResponses]; + +export type CreateSessionData = { + body?: never; + path?: never; + query?: never; + url: '/api/auth/session'; +}; + +export type CreateSessionErrors = { + /** + * Bad request - Invalid or old ID token + */ + 400: ErrorResponse; + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type CreateSessionError = CreateSessionErrors[keyof CreateSessionErrors]; + +export type CreateSessionResponses = { + /** + * Session created successfully + */ + 200: CreateSessionResponse; +}; + +export type CreateSessionResponse2 = CreateSessionResponses[keyof CreateSessionResponses]; + +export type ExchangeTokenData = { + body?: ExchangeTokenRequest; + path?: never; + query?: never; + url: '/api/auth/token'; +}; + +export type ExchangeTokenErrors = { + /** + * Invalid or expired Firebase JWT + */ + 401: ErrorResponse; + /** + * Workspace not found or user not a member + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type ExchangeTokenError = ExchangeTokenErrors[keyof ExchangeTokenErrors]; + +export type ExchangeTokenResponses = { + /** + * Token exchanged successfully + */ + 200: ExchangeTokenResponse; +}; + +export type ExchangeTokenResponse2 = ExchangeTokenResponses[keyof ExchangeTokenResponses]; + +export type GetBillingBalanceData = { + body?: never; + path?: never; + query?: never; + url: '/api/billing/balance'; +}; + +export type GetBillingBalanceErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetBillingBalanceError = GetBillingBalanceErrors[keyof GetBillingBalanceErrors]; + +export type GetBillingBalanceResponses = { + /** + * Credit balance + */ + 200: BillingBalanceResponse; +}; + +export type GetBillingBalanceResponse = GetBillingBalanceResponses[keyof GetBillingBalanceResponses]; + +export type GetBillingEventsData = { + body?: never; + path?: never; + query?: { + /** + * Page number (1-indexed) + */ + page?: number; + /** + * Number of events per page + */ + limit?: number; + }; + url: '/api/billing/events'; +}; + +export type GetBillingEventsErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetBillingEventsError = GetBillingEventsErrors[keyof GetBillingEventsErrors]; + +export type GetBillingEventsResponses = { + /** + * Paginated billing events + */ + 200: BillingEventsResponse; +}; + +export type GetBillingEventsResponse = GetBillingEventsResponses[keyof GetBillingEventsResponses]; + +export type GetBillingOpStatusData = { + body?: never; + path: { + /** + * The billing operation ID + */ + id: string; + }; + query?: never; + url: '/api/billing/ops/{id}'; +}; + +export type GetBillingOpStatusErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Billing operation not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetBillingOpStatusError = GetBillingOpStatusErrors[keyof GetBillingOpStatusErrors]; + +export type GetBillingOpStatusResponses = { + /** + * Billing operation status + */ + 200: BillingOpStatusResponse; +}; + +export type GetBillingOpStatusResponse = GetBillingOpStatusResponses[keyof GetBillingOpStatusResponses]; + +export type GetPaymentPortalData = { + body?: PaymentPortalRequest; + path?: never; + query?: never; + url: '/api/billing/payment-portal'; +}; + +export type GetPaymentPortalErrors = { + /** + * Bad request (e.g., missing return_url) + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetPaymentPortalError = GetPaymentPortalErrors[keyof GetPaymentPortalErrors]; + +export type GetPaymentPortalResponses = { + /** + * Success + */ + 200: PaymentPortalResponse; +}; + +export type GetPaymentPortalResponse = GetPaymentPortalResponses[keyof GetPaymentPortalResponses]; + +export type GetBillingPlansData = { + body?: never; + path?: never; + query?: never; + url: '/api/billing/plans'; +}; + +export type GetBillingPlansErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetBillingPlansError = GetBillingPlansErrors[keyof GetBillingPlansErrors]; + +export type GetBillingPlansResponses = { + /** + * Available plans with pricing + */ + 200: BillingPlansResponse; +}; -/** - * Histogram of tag counts used for refining asset search results. - */ -export type AssetTagHistogramResponse = { - /** - * Map of tag names to their occurrence counts on matching assets - */ - tag_counts: { - [key: string]: number - } -} +export type GetBillingPlansResponse = GetBillingPlansResponses[keyof GetBillingPlansResponses]; -/** - * Paginated list of available asset tags. - */ -export type ListTagsResponse = { - /** - * List of tags - */ - tags: Array - /** - * Total number of tags - */ - total: number - /** - * Whether more tags are available - */ - has_more: boolean -} +export type PreviewSubscribeData = { + body: PreviewSubscribeRequest; + path?: never; + query?: never; + url: '/api/billing/preview-subscribe'; +}; -/** - * Metadata for a single tag that can be applied to assets. - */ -export type TagInfo = { - /** - * Tag name - */ - name: string - /** - * Number of assets using this tag - */ - count: number -} +export type PreviewSubscribeErrors = { + /** + * Invalid request (e.g., invalid plan slug, seats below minimum) + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -/** - * Paginated list of assets belonging to the authenticated user. - */ -export type ListAssetsResponse = { - /** - * List of assets matching the query - */ - assets: Array - /** - * Total number of assets matching the filters - */ - total: number - /** - * 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 -} +export type PreviewSubscribeError = PreviewSubscribeErrors[keyof PreviewSubscribeErrors]; -/** - * Represents a user-owned asset (image, video, or other generated output). - */ -export type Asset = { - /** - * Unique identifier for the asset - */ - id: string - /** - * 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. - */ - hash?: string - /** - * Size of the asset in bytes - */ - size?: number - /** - * MIME type of the asset - */ - mime_type?: string - /** - * Tags associated with the asset - */ - tags?: Array - /** - * Custom user metadata for the asset - */ - user_metadata?: { - [key: string]: unknown - } - /** - * System-managed metadata from download sources (HuggingFace, CivitAI, etc.) - read-only, not user-modifiable - */ - readonly metadata?: { - [key: string]: unknown - } - /** - * URL for asset preview/thumbnail - */ - preview_url?: string - /** - * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash. - */ - short_url?: string | null - /** - * ID of the preview asset if available - */ - preview_id?: string | null - /** - * ID of the job that created this asset, if available - */ - job_id?: string | null - /** - * Timestamp when the asset was created - */ - created_at: string - /** - * Timestamp when the asset was last updated - */ - updated_at: string - /** - * Timestamp when the asset was last accessed - */ - last_access_time?: string - /** - * Whether this asset is immutable (cannot be modified or deleted) - */ - is_immutable?: boolean - /** - * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") - */ - file_path?: string | null -} +export type PreviewSubscribeResponses = { + /** + * Subscription preview + */ + 200: PreviewSubscribeResponse; +}; -/** - * Response returned when an existing asset is successfully updated. - */ -export type AssetUpdated = { - /** - * Asset ID - */ - id: string - /** - * 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. - */ - hash?: string - /** - * Tags associated with the asset - */ - tags?: Array - /** - * Updated MIME type of the asset - */ - mime_type?: string - /** - * Updated custom metadata - */ - user_metadata?: { - [key: string]: unknown - } - /** - * ID of the job that created this asset, if available - */ - job_id?: string | null - /** - * Timestamp of the update - */ - updated_at: string - /** - * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") - */ - file_path?: string | null -} +export type PreviewSubscribeResponse2 = PreviewSubscribeResponses[keyof PreviewSubscribeResponses]; -/** - * Response returned when a new asset is successfully created. - */ -export type AssetCreated = Asset & { - /** - * Whether this was a new asset creation (true) or returned existing (false) - */ - created_new: boolean -} +export type GetBillingStatusData = { + body?: never; + path?: never; + query?: never; + url: '/api/billing/status'; +}; -/** - * Response after updating the review status of a Hub workflow. - */ -export type SetReviewStatusResponse = { - /** - * The share IDs that were submitted for review - */ - share_ids: Array - /** - * The applied review status - */ - status: 'approved' | 'rejected' -} +export type GetBillingStatusErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Workspace not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -/** - * Request body for setting the review status of a Hub workflow. - */ -export type SetReviewStatusRequest = { - /** - * The share IDs of the hub workflows to review - */ - share_ids: Array - /** - * The review decision for the workflows - */ - status: 'approved' | 'rejected' -} +export type GetBillingStatusError = GetBillingStatusErrors[keyof GetBillingStatusErrors]; -/** - * Response after deleting a session cookie - */ -export type DeleteSessionResponse = { - /** - * Whether the session was deleted successfully - */ - success: boolean -} +export type GetBillingStatusResponses = { + /** + * Billing status + */ + 200: BillingStatusResponse; +}; -/** - * Response after creating a session cookie - */ -export type CreateSessionResponse = { - /** - * Whether the session was created successfully - */ - success: boolean - /** - * Session expiration time in seconds (5 days) - */ - expiresIn?: number -} +export type GetBillingStatusResponse = GetBillingStatusResponses[keyof GetBillingStatusResponses]; -/** - * User information response - */ -export type UserResponse = { - /** - * Firebase UID of the authenticated user - */ - id: string - /** - * User status (always "active" for authenticated users) - */ - status: string -} +export type SubscribeData = { + body: SubscribeRequest; + path?: never; + query?: never; + url: '/api/billing/subscribe'; +}; -/** - * System statistics response - */ -export type SystemStatsResponse = { - system: { +export type SubscribeErrors = { /** - * Operating system + * Invalid request (e.g., invalid plan slug, incompatible plan) */ - os: string + 400: ErrorResponse; /** - * Python version + * Unauthorized */ - python_version: string + 401: ErrorResponse; /** - * Whether using embedded Python + * Internal server error */ - embedded_python: boolean + 500: ErrorResponse; +}; + +export type SubscribeError = SubscribeErrors[keyof SubscribeErrors]; + +export type SubscribeResponses = { /** - * ComfyUI version + * Subscription created or payment method needed */ - comfyui_version: string + 200: SubscribeResponse; +}; + +export type SubscribeResponse2 = SubscribeResponses[keyof SubscribeResponses]; + +export type CancelSubscriptionData = { + body: CancelSubscriptionRequest; + path?: never; + query?: never; + url: '/api/billing/subscription/cancel'; +}; + +export type CancelSubscriptionErrors = { /** - * How this ComfyUI instance is deployed (e.g. cloud, local-git, local-portable, local-desktop) + * Invalid request (e.g., no active subscription) */ - deploy_environment?: string + 400: ErrorResponse; /** - * ComfyUI frontend version (commit hash or tag) + * Unauthorized */ - comfyui_frontend_version?: string + 401: ErrorResponse; /** - * Workflow templates version + * Internal server error */ - workflow_templates_version?: string + 500: ErrorResponse; +}; + +export type CancelSubscriptionError = CancelSubscriptionErrors[keyof CancelSubscriptionErrors]; + +export type CancelSubscriptionResponses = { /** - * Cloud ingest service version (commit hash) + * Subscription cancellation scheduled */ - cloud_version?: string + 200: CancelSubscriptionResponse; +}; + +export type CancelSubscriptionResponse2 = CancelSubscriptionResponses[keyof CancelSubscriptionResponses]; + +export type ResubscribeData = { + body: ResubscribeRequest; + path?: never; + query?: never; + url: '/api/billing/subscription/resubscribe'; +}; + +export type ResubscribeErrors = { /** - * PyTorch version + * Invalid request (e.g., no active subscription, not in cancellation grace period) */ - pytorch_version: string + 400: ErrorResponse; /** - * Command line arguments + * Unauthorized */ - argv: Array + 401: ErrorResponse; /** - * Total RAM in bytes + * Internal server error */ - ram_total: number + 500: ErrorResponse; +}; + +export type ResubscribeError = ResubscribeErrors[keyof ResubscribeErrors]; + +export type ResubscribeResponses = { /** - * Free RAM in bytes + * Subscription resumed successfully */ - ram_free: number - } - devices: Array<{ + 200: ResubscribeResponse; +}; + +export type ResubscribeResponse2 = ResubscribeResponses[keyof ResubscribeResponses]; + +export type CreateTopupData = { + body: CreateTopupRequest; + path?: never; + query?: never; + url: '/api/billing/topup'; +}; + +export type CreateTopupErrors = { /** - * Device name + * Bad request (invalid amount, no payment method) */ - name: string + 400: ErrorResponse; /** - * Device type + * Unauthorized */ - type: string + 401: ErrorResponse; /** - * Total VRAM in bytes + * Internal server error */ - vram_total?: number + 500: ErrorResponse; +}; + +export type CreateTopupError = CreateTopupErrors[keyof CreateTopupErrors]; + +export type CreateTopupResponses = { /** - * Free VRAM in bytes + * Top-up initiated successfully */ - vram_free?: number - }> -} + 200: CreateTopupResponse; +}; -/** - * System logs response - */ -export type LogsResponse = Array<{ - /** - * When the log entry was created - */ - timestamp?: string - /** - * Log level - */ - level?: 'debug' | 'info' | 'warn' | 'error' - /** - * Log message - */ - message?: string - /** - * Source of the log entry - */ - source?: string - /** - * Additional log metadata - */ - metadata?: { - [key: string]: unknown - } -}> +export type CreateTopupResponse2 = CreateTopupResponses[keyof CreateTopupResponses]; -/** - * Response after submitting feedback - */ -export type FeedbackResponse = { - [key: string]: unknown -} +export type GetEmbeddingsData = { + body?: never; + path?: never; + query?: never; + url: '/api/embeddings'; +}; -/** - * Request to submit user feedback - */ -export type FeedbackRequest = { - /** - * Type of feedback being submitted - */ - type: 'missing_nodes' | 'general' | 'missing_models' - /** - * The feedback content or message - */ - content?: string - /** - * User's rating of ComfyUI Cloud experience (1-5 stars) - */ - rating?: number - /** - * Additional metadata about the feedback - */ - metadata?: { - [key: string]: unknown - } -} +export type GetEmbeddingsResponses = { + /** + * Embedding names + */ + 200: Array; +}; -/** - * Represents a model file with metadata - */ -export type ModelFile = { - /** - * The filename of the model - */ - name: string - /** - * Index of the path where this model is located - */ - pathIndex: number -} +export type GetEmbeddingsResponse = GetEmbeddingsResponses[keyof GetEmbeddingsResponses]; -/** - * Represents a folder containing models - */ -export type ModelFolder = { - /** - * The name of the model folder - */ - name: string - /** - * List of paths where models of this type are stored - */ - folders: Array -} +export type GetModelFoldersData = { + body?: never; + path?: never; + query?: never; + url: '/api/experiment/models'; +}; -/** - * Error response for ComfyUI prompt execution. - */ -export type PromptErrorResponse = { - [key: string]: unknown -} +export type GetModelFoldersErrors = { + /** + * Internal server error + */ + 500: ErrorResponse; +}; -/** - * Individual file entry within a full user data response. - */ -export type GetUserDataResponseFullFile = { - /** - * File name or path relative to the user directory. - */ - path?: string - /** - * File size in bytes. - */ - size?: number - /** - * UNIX timestamp of the last modification in milliseconds. - */ - modified?: number -} +export type GetModelFoldersError = GetModelFoldersErrors[keyof GetModelFoldersErrors]; -/** - * List of user data file entries (each with path, size, and modification time) returned when full_info=true. - */ -export type GetUserDataResponseFull = Array +export type GetModelFoldersResponses = { + /** + * Success - List of model folders + */ + 200: Array; +}; -/** - * User data listing entry with file metadata (path, size, modification time). - */ -export type UserDataResponseFull = { - path?: string - size?: number - /** - * UNIX timestamp of the last modification in milliseconds. - */ - modified?: number -} +export type GetModelFoldersResponse = GetModelFoldersResponses[keyof GetModelFoldersResponses]; -/** - * Request to manage history operations - */ -export type HistoryManageRequest = { - /** - * Array of job IDs to delete from history - */ - delete?: Array - /** - * If true, clear all history for the authenticated user - */ - clear?: boolean -} +export type GetModelsInFolderData = { + body?: never; + path: { + /** + * The folder name to list models from + */ + folder: string; + }; + query?: never; + url: '/api/experiment/models/{folder}'; +}; -/** - * Job status information - */ -export type JobStatusResponse = { - /** - * The job ID - */ - id: string - /** - * Current job status - */ - status: - | 'waiting_to_dispatch' - | 'pending' - | 'in_progress' - | 'completed' - | 'error' - | 'cancelled' - /** - * When the job was created - */ - created_at: string - /** - * When the job was last updated - */ - updated_at: string - /** - * When the job status was last changed - */ - last_state_update?: string - /** - * The inference instance assigned to this job (if any) - */ - assigned_inference?: string | null - /** - * Error message if the job failed - */ - error_message?: string | null -} +export type GetModelsInFolderErrors = { + /** + * Folder not found or no models in folder + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -/** - * Response after a queue management action (delete or clear). - */ -export type QueueManageResponse = { - /** - * Array of job IDs that were successfully cancelled - */ - deleted?: Array - /** - * Whether the queue was cleared - */ - cleared?: boolean -} +export type GetModelsInFolderError = GetModelsInFolderErrors[keyof GetModelsInFolderErrors]; -/** - * Request to manage queue operations - */ -export type QueueManageRequest = { - /** - * Array of job IDs to cancel; pending and running jobs transition to cancelled - */ - delete?: Array - /** - * If true, clear all pending jobs from the queue - */ - clear?: boolean -} +export type GetModelsInFolderResponses = { + /** + * Success - List of models in the folder + */ + 200: Array; +}; -/** - * Queue information with pending and running jobs - */ -export type QueueInfo = { - /** - * Array of currently running job items - */ - queue_running?: Array<[unknown, unknown, unknown, unknown, unknown]> - /** - * Array of pending job items (ordered by creation time, oldest first) - */ - queue_pending?: Array<[unknown, unknown, unknown, unknown, unknown]> -} +export type GetModelsInFolderResponse = GetModelsInFolderResponses[keyof GetModelsInFolderResponses]; -/** - * Detailed execution history response for a specific prompt. - * Returns a dictionary with prompt_id as key and full history data as value. - * - */ -export type HistoryDetailResponse = { - [key: string]: HistoryDetailEntry -} +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}'; +}; -/** - * History entry with full prompt data - */ -export type HistoryDetailEntry = { - /** - * Full prompt execution data - */ - prompt?: { +export type GetModelPreviewErrors = { + /** + * Preview not available on Cloud + */ + 404: unknown; +}; + +export type GetNodeInfoSchemaData = { + body?: never; + path?: never; + query?: never; + url: '/api/experiment/nodes'; +}; + +export type GetNodeInfoSchemaResponses = { + /** + * Full node schema JSON + */ + 200: unknown; +}; + +export type GetNodeByIdData = { + body?: never; + path: { + /** + * Node class_type identifier + */ + id: string; + }; + query?: never; + url: '/api/experiment/nodes/{id}'; +}; + +export type GetNodeByIdErrors = { /** - * Execution priority + * Node not found */ - priority?: number + 404: unknown; +}; + +export type GetNodeByIdResponses = { /** - * The prompt ID + * Node definition JSON */ - prompt_id?: string + 200: unknown; +}; + +export type GetExtensionsData = { + body?: never; + path?: never; + query?: never; + url: '/api/extensions'; +}; + +export type GetExtensionsResponses = { /** - * The workflow nodes + * URL paths (relative to web root) of available extension JS files */ - prompt?: { - [key: string]: unknown - } + 200: Array; +}; + +export type GetExtensionsResponse = GetExtensionsResponses[keyof GetExtensionsResponses]; + +export type GetFeaturesData = { + body?: never; + path?: never; + query?: never; + url: '/api/features'; +}; + +export type GetFeaturesResponses = { /** - * Additional execution data + * Success */ - extra_data?: { - [key: string]: unknown - } - /** - * Output nodes to execute - */ - outputs_to_execute?: Array - } - /** - * Output data from execution (generated images, files, etc.) - */ - outputs?: { - [key: string]: unknown - } - /** - * Execution status and timeline information - */ - status?: { - [key: string]: unknown - } - /** - * Metadata about the execution and nodes - */ - meta?: { - [key: string]: unknown - } -} + 200: { + /** + * Maximum upload size in bytes + */ + max_upload_size?: number; + /** + * Whether the server supports preview metadata + */ + supports_preview_metadata?: boolean; + [key: string]: unknown | number | boolean | undefined; + }; +}; -/** - * History entry with prompt_id and execution data - */ -export type HistoryEntry = { - /** - * Unique identifier for this prompt execution - */ - prompt_id: string - /** - * Job creation timestamp (Unix timestamp in milliseconds) - */ - create_time?: number - /** - * UUID identifying the workflow graph definition - */ - workflow_id?: string - /** - * Filtered prompt execution data (lightweight format) - */ - prompt?: { +export type GetFeaturesResponse = GetFeaturesResponses[keyof GetFeaturesResponses]; + +export type SubmitFeedbackData = { + body: FeedbackRequest; + path?: never; + query?: never; + url: '/api/feedback'; +}; + +export type SubmitFeedbackErrors = { /** - * Execution priority + * Invalid request */ - priority?: number + 400: ErrorResponse; /** - * The prompt ID + * Unauthorized */ - prompt_id?: string + 401: ErrorResponse; /** - * Additional execution data (workflow removed from extra_pnginfo) + * Internal server error */ - extra_data?: { - [key: string]: unknown - } - } - /** - * Output data from execution (generated images, files, etc.) - */ - outputs?: { - [key: string]: unknown - } - /** - * Execution status and timeline information - */ - status?: { - [key: string]: unknown - } - /** - * Metadata about the execution and nodes - */ - meta?: { - [key: string]: unknown - } -} + 500: ErrorResponse; +}; -/** - * Execution history response with history array. - * Returns an object with a "history" key containing an array of history entries. - * Each entry includes prompt_id as a property along with execution data. - * - */ -export type HistoryResponse = { - /** - * Array of history entries ordered by creation time (newest first) - */ - history: Array -} +export type SubmitFeedbackError = SubmitFeedbackErrors[keyof SubmitFeedbackErrors]; -/** - * Full data for a global subgraph blueprint - */ -export type GlobalSubgraphData = { - /** - * Source type of the subgraph - "templates" for workflow templates or "custom_node" for custom node subgraphs - */ - source: string - /** - * Display name of the subgraph blueprint - */ - name: string - /** - * Additional information about the subgraph - */ - info: { - /** - * The node pack/module that provides this subgraph - */ - node_pack: string - } - /** - * The full subgraph JSON data as a string - */ - data: string -} +export type SubmitFeedbackResponses = { + /** + * Feedback submitted successfully + */ + 201: FeedbackResponse; +}; -/** - * Metadata for a global subgraph blueprint (without full data) - */ -export type GlobalSubgraphInfo = { - /** - * Source type of the subgraph - "templates" for workflow templates or "custom_node" for custom node subgraphs - */ - source: string - /** - * Display name of the subgraph blueprint - */ - name: string - /** - * Additional information about the subgraph - */ - info: { - /** - * The node pack/module that provides this subgraph - */ - node_pack: string - } - /** - * The full subgraph JSON data (may be empty in list view) - */ - data?: string -} +export type SubmitFeedbackResponse = SubmitFeedbackResponses[keyof SubmitFeedbackResponses]; -/** - * Metadata describing a single ComfyUI node type and its inputs/outputs. - */ -export type NodeInfo = { - /** - * Input specifications for the node - */ - input?: { - [key: string]: unknown - } - /** - * Order of inputs for display - */ - input_order?: { - [key: string]: Array - } - /** - * Output types of the node - */ - output?: Array - /** - * Whether each output is a list - */ - output_is_list?: Array - /** - * Names of the outputs - */ - output_name?: Array - /** - * Internal name of the node - */ - name?: string - /** - * Display name of the node - */ - display_name?: string - /** - * Description of the node - */ - description?: string - /** - * Python module implementing the node - */ - python_module?: string - /** - * Category of the node - */ - category?: string - /** - * Whether this is an output node - */ - output_node?: boolean - /** - * Tooltips for outputs - */ - output_tooltips?: Array - /** - * Whether the node is deprecated - */ - deprecated?: boolean - /** - * Whether the node is experimental - */ - experimental?: boolean - /** - * Whether this is an API node - */ - api_node?: boolean -} +export type GetMaskLayersData = { + body?: never; + path?: never; + query: { + /** + * Hash filename of any mask layer file + */ + filename: string; + }; + url: '/api/files/mask-layers'; +}; -/** - * Metadata about the currently running and queued prompts. - */ -export type PromptInfo = { - exec_info?: { +export type GetMaskLayersErrors = { + /** + * File not found or not a mask file + */ + 404: ErrorResponse; +}; + +export type GetMaskLayersError = GetMaskLayersErrors[keyof GetMaskLayersErrors]; + +export type GetMaskLayersResponses = { + /** + * Success - Related mask layers returned + */ + 200: { + /** + * Filename of the mask layer + */ + mask?: string | null; + /** + * Filename of the paint strokes layer + */ + paint?: string | null; + /** + * Filename of the painted image layer + */ + painted?: string | null; + /** + * Filename of the final composite layer + */ + painted_masked?: string | null; + }; +}; + +export type GetMaskLayersResponse = GetMaskLayersResponses[keyof GetMaskLayersResponses]; + +export type FreeMemoryData = { + body?: { + /** + * Run garbage collection and free cached memory + */ + free_memory?: boolean; + /** + * Unload all models from VRAM/RAM + */ + unload_models?: boolean; + }; + path?: never; + query?: never; + url: '/api/free'; +}; + +export type FreeMemoryResponses = { /** - * Number of items remaining in the queue + * Memory freed */ - queue_remaining?: number - } -} + 200: unknown; +}; -/** - * Response containing a signed download URL for an exported asset archive. - */ -export type ExportDownloadUrlResponse = { - /** - * Signed URL for downloading the export ZIP file - */ - url: string - /** - * When the signed URL expires - */ - expires_at?: string -} +export type GetGlobalSubgraphsData = { + body?: never; + path?: never; + query?: never; + url: '/api/global_subgraphs'; +}; -/** - * Response returned after successfully queuing a workflow prompt. - */ -export type PromptResponse = { - /** - * Unique identifier for the prompt execution - */ - prompt_id?: string - /** - * Priority number in the queue - */ - number?: number - /** - * Any errors in the nodes of the prompt - */ - node_errors?: { - [key: string]: unknown - } -} +export type GetGlobalSubgraphsErrors = { + /** + * Internal server error + */ + 500: ErrorResponse; +}; -/** - * Request body for submitting a ComfyUI workflow prompt for execution. - */ -export type PromptRequest = { - /** - * The workflow graph to execute - */ - prompt: { - [key: string]: unknown - } - /** - * Priority number for the queue (lower numbers have higher priority) - */ - number?: number - /** - * If true, adds the prompt to the front of the queue - */ - front?: boolean - /** - * Extra data to be associated with the prompt - */ - extra_data?: { - [key: string]: unknown - } - /** - * List of node names to execute - */ - partial_execution_targets?: Array - /** - * UUID identifying the cloud workflow entity to associate with this job - */ - workflow_id?: string - /** - * UUID identifying the workflow version to associate with this job - */ - workflow_version_id?: string -} +export type GetGlobalSubgraphsError = GetGlobalSubgraphsErrors[keyof GetGlobalSubgraphsErrors]; -/** - * Paginated list of assets belonging to the authenticated user. - */ -export type ListAssetsResponseWritable = { - /** - * List of assets matching the query - */ - assets: Array - /** - * Total number of assets matching the filters - */ - total: number - /** - * 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 -} +export type GetGlobalSubgraphsResponses = { + /** + * Success - Map of subgraph IDs to their metadata + */ + 200: { + [key: string]: GlobalSubgraphInfo; + }; +}; -/** - * Represents a user-owned asset (image, video, or other generated output). - */ -export type AssetWritable = { - /** - * Unique identifier for the asset - */ - id: string - /** - * 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. - */ - hash?: string - /** - * Size of the asset in bytes - */ - size?: number - /** - * MIME type of the asset - */ - mime_type?: string - /** - * Tags associated with the asset - */ - tags?: Array - /** - * Custom user metadata for the asset - */ - user_metadata?: { - [key: string]: unknown - } - /** - * URL for asset preview/thumbnail - */ - preview_url?: string - /** - * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash. - */ - short_url?: string | null - /** - * ID of the preview asset if available - */ - preview_id?: string | null - /** - * ID of the job that created this asset, if available - */ - job_id?: string | null - /** - * Timestamp when the asset was created - */ - created_at: string - /** - * Timestamp when the asset was last updated - */ - updated_at: string - /** - * Timestamp when the asset was last accessed - */ - last_access_time?: string - /** - * Whether this asset is immutable (cannot be modified or deleted) - */ - is_immutable?: boolean - /** - * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") - */ - file_path?: string | null -} +export type GetGlobalSubgraphsResponse = GetGlobalSubgraphsResponses[keyof GetGlobalSubgraphsResponses]; -/** - * Response returned when a new asset is successfully created. - */ -export type AssetCreatedWritable = AssetWritable & { - /** - * Whether this was a new asset creation (true) or returned existing (false) - */ - created_new: boolean -} +export type GetGlobalSubgraphData = { + body?: never; + path: { + /** + * The unique identifier of the subgraph blueprint + */ + id: string; + }; + query?: never; + url: '/api/global_subgraphs/{id}'; +}; -/** - * Response after submitting feedback - */ -export type FeedbackResponseWritable = { - [key: string]: unknown -} +export type GetGlobalSubgraphErrors = { + /** + * Subgraph not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetPromptInfoData = { - body?: never - path?: never - query?: never - url: '/api/prompt' -} +export type GetGlobalSubgraphError = GetGlobalSubgraphErrors[keyof GetGlobalSubgraphErrors]; -export type GetPromptInfoErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetPromptInfoError = GetPromptInfoErrors[keyof GetPromptInfoErrors] +export type GetGlobalSubgraphResponses = { + /** + * Success - Full subgraph data + */ + 200: GlobalSubgraphData; +}; -export type GetPromptInfoResponses = { - /** - * Success - */ - 200: PromptInfo -} +export type GetGlobalSubgraphResponse = GetGlobalSubgraphResponses[keyof GetGlobalSubgraphResponses]; -export type GetPromptInfoResponse = - GetPromptInfoResponses[keyof GetPromptInfoResponses] +export type GetLegacyHistoryData = { + body?: never; + path?: never; + query?: never; + url: '/api/history'; +}; -export type ExecutePromptData = { - body: PromptRequest - path?: never - query?: never - url: '/api/prompt' -} +export type GetLegacyHistoryErrors = { + /** + * Not Found — use /api/history_v2 instead + */ + 404: unknown; +}; -export type ExecutePromptErrors = { - /** - * Invalid prompt - */ - 400: PromptErrorResponse - /** - * Payment required - Insufficient credits - */ - 402: PromptErrorResponse - /** - * Workflow JSON too large - */ - 413: PromptErrorResponse - /** - * Payment required - User has not paid - */ - 429: PromptErrorResponse - /** - * Internal server error - */ - 500: PromptErrorResponse - /** - * Service unavailable - */ - 503: PromptErrorResponse -} - -export type ExecutePromptError = ExecutePromptErrors[keyof ExecutePromptErrors] +export type ManageHistoryData = { + body: HistoryManageRequest; + path?: never; + query?: never; + url: '/api/history'; +}; -export type ExecutePromptResponses = { - /** - * Success - Prompt accepted - */ - 200: PromptResponse -} +export type ManageHistoryErrors = { + /** + * Invalid request parameters + */ + 400: ErrorResponse; + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type ExecutePromptResponse = - ExecutePromptResponses[keyof ExecutePromptResponses] +export type ManageHistoryError = ManageHistoryErrors[keyof ManageHistoryErrors]; -export type GetNodeInfoData = { - body?: never - path?: never - query?: never - url: '/api/object_info' -} +export type ManageHistoryResponses = { + /** + * Success - History management operation completed + */ + 200: unknown; +}; -export type GetNodeInfoResponses = { - /** - * Success - */ - 200: { - [key: string]: NodeInfo - } -} +export type GetLegacyHistoryByIdData = { + body?: never; + path: { + prompt_id: string; + }; + query?: never; + url: '/api/history/{prompt_id}'; +}; -export type GetNodeInfoResponse = - GetNodeInfoResponses[keyof GetNodeInfoResponses] +export type GetLegacyHistoryByIdErrors = { + /** + * Not Found — use /api/jobs/{prompt_id} instead + */ + 404: unknown; +}; -export type GetFeaturesData = { - body?: never - path?: never - query?: never - url: '/api/features' -} +export type GetHistoryData = { + body?: never; + path?: never; + query?: { + /** + * Maximum number of items to return + */ + max_items?: number; + /** + * Starting position (default 0) + */ + offset?: number; + }; + url: '/api/history_v2'; +}; -export type GetFeaturesResponses = { - /** - * Success - */ - 200: { +export type GetHistoryErrors = { /** - * Whether the server supports preview metadata + * Unauthorized - Authentication required */ - supports_preview_metadata?: boolean + 401: ErrorResponse; /** - * Maximum upload size in bytes + * Internal server error */ - max_upload_size?: number - [key: string]: unknown | boolean | number | undefined - } -} + 500: ErrorResponse; +}; -export type GetFeaturesResponse = - GetFeaturesResponses[keyof GetFeaturesResponses] +export type GetHistoryError = GetHistoryErrors[keyof GetHistoryErrors]; -export type GetNodeReplacementsData = { - body?: never - path?: never - query?: never - url: '/api/node_replacements' -} +export type GetHistoryResponses = { + /** + * Success - Execution history retrieved + */ + 200: HistoryResponse; +}; -export type GetNodeReplacementsErrors = { - /** - * Internal server error - */ - 500: ErrorResponse -} +export type GetHistoryResponse = GetHistoryResponses[keyof GetHistoryResponses]; -export type GetNodeReplacementsError = - GetNodeReplacementsErrors[keyof GetNodeReplacementsErrors] +export type GetHistoryForPromptData = { + body?: never; + path: { + /** + * The prompt ID to retrieve history for + */ + prompt_id: string; + }; + query?: never; + url: '/api/history_v2/{prompt_id}'; +}; -export type GetNodeReplacementsResponses = { - /** - * Success - Node replacement mappings - */ - 200: { - [key: string]: unknown - } -} +export type GetHistoryForPromptErrors = { + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse; + /** + * Prompt not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetNodeReplacementsResponse = - GetNodeReplacementsResponses[keyof GetNodeReplacementsResponses] +export type GetHistoryForPromptError = GetHistoryForPromptErrors[keyof GetHistoryForPromptErrors]; -export type GetWorkflowTemplatesData = { - body?: never - path?: never - query?: never - url: '/api/workflow_templates' -} +export type GetHistoryForPromptResponses = { + /** + * Success - History for prompt retrieved + */ + 200: HistoryDetailResponse; +}; -export type GetWorkflowTemplatesResponses = { - /** - * Empty object for workflow templates - */ - 200: { - [key: string]: unknown - } -} +export type GetHistoryForPromptResponse = GetHistoryForPromptResponses[keyof GetHistoryForPromptResponses]; -export type GetWorkflowTemplatesResponse = - GetWorkflowTemplatesResponses[keyof GetWorkflowTemplatesResponses] +export type CreateHubAssetUploadUrlData = { + body: HubAssetUploadUrlRequest; + path?: never; + query?: never; + url: '/api/hub/assets/upload-url'; +}; -export type GetGlobalSubgraphsData = { - body?: never - path?: never - query?: never - url: '/api/global_subgraphs' -} +export type CreateHubAssetUploadUrlErrors = { + /** + * Bad request (e.g. unsupported content type) + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetGlobalSubgraphsErrors = { - /** - * Internal server error - */ - 500: ErrorResponse -} +export type CreateHubAssetUploadUrlError = CreateHubAssetUploadUrlErrors[keyof CreateHubAssetUploadUrlErrors]; -export type GetGlobalSubgraphsError = - GetGlobalSubgraphsErrors[keyof GetGlobalSubgraphsErrors] +export type CreateHubAssetUploadUrlResponses = { + /** + * Presigned upload URL and token + */ + 200: HubAssetUploadUrlResponse; +}; -export type GetGlobalSubgraphsResponses = { - /** - * Success - Map of subgraph IDs to their metadata - */ - 200: { - [key: string]: GlobalSubgraphInfo - } -} +export type CreateHubAssetUploadUrlResponse = CreateHubAssetUploadUrlResponses[keyof CreateHubAssetUploadUrlResponses]; -export type GetGlobalSubgraphsResponse = - GetGlobalSubgraphsResponses[keyof GetGlobalSubgraphsResponses] +export type ListHubLabelsData = { + body?: never; + path?: never; + query?: { + /** + * Filter by label type. Omit to return all labels. + */ + type?: 'tag' | 'model' | 'custom_node'; + }; + url: '/api/hub/labels'; +}; -export type GetGlobalSubgraphData = { - body?: never - path: { +export type ListHubLabelsErrors = { + /** + * Bad request (e.g. invalid type parameter) + */ + 400: ErrorResponse; /** - * The unique identifier of the subgraph blueprint + * Internal server error */ - id: string - } - query?: never - url: '/api/global_subgraphs/{id}' -} + 500: ErrorResponse; +}; -export type GetGlobalSubgraphErrors = { - /** - * Subgraph not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetGlobalSubgraphError = - GetGlobalSubgraphErrors[keyof GetGlobalSubgraphErrors] +export type ListHubLabelsError = ListHubLabelsErrors[keyof ListHubLabelsErrors]; -export type GetGlobalSubgraphResponses = { - /** - * Success - Full subgraph data - */ - 200: GlobalSubgraphData -} +export type ListHubLabelsResponses = { + /** + * List of labels + */ + 200: HubLabelListResponse; +}; -export type GetGlobalSubgraphResponse = - GetGlobalSubgraphResponses[keyof GetGlobalSubgraphResponses] +export type ListHubLabelsResponse = ListHubLabelsResponses[keyof ListHubLabelsResponses]; -export type GetModelFoldersData = { - body?: never - path?: never - query?: never - url: '/api/experiment/models' -} +export type CreateHubProfileData = { + body: CreateHubProfileRequest; + path?: never; + query?: never; + url: '/api/hub/profiles'; +}; -export type GetModelFoldersErrors = { - /** - * Internal server error - */ - 500: ErrorResponse -} +export type CreateHubProfileErrors = { + /** + * Bad request (e.g. invalid username) + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Not found + */ + 404: ErrorResponse; + /** + * Username already taken or profile already exists + */ + 409: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetModelFoldersError = - GetModelFoldersErrors[keyof GetModelFoldersErrors] +export type CreateHubProfileError = CreateHubProfileErrors[keyof CreateHubProfileErrors]; -export type GetModelFoldersResponses = { - /** - * Success - List of model folders - */ - 200: Array -} +export type CreateHubProfileResponses = { + /** + * Hub profile created + */ + 201: HubProfile; +}; -export type GetModelFoldersResponse = - GetModelFoldersResponses[keyof GetModelFoldersResponses] +export type CreateHubProfileResponse = CreateHubProfileResponses[keyof CreateHubProfileResponses]; -export type GetModelsInFolderData = { - body?: never - path: { +export type GetHubProfileByUsernameData = { + body?: never; + path: { + /** + * The hub profile username. + */ + username: string; + }; + query?: never; + url: '/api/hub/profiles/{username}'; +}; + +export type GetHubProfileByUsernameErrors = { + /** + * Profile not found + */ + 404: ErrorResponse; /** - * The folder name to list models from + * Internal server error */ - folder: string - } - query?: never - url: '/api/experiment/models/{folder}' -} + 500: ErrorResponse; +}; -export type GetModelsInFolderErrors = { - /** - * Folder not found or no models in folder - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetModelsInFolderError = - GetModelsInFolderErrors[keyof GetModelsInFolderErrors] +export type GetHubProfileByUsernameError = GetHubProfileByUsernameErrors[keyof GetHubProfileByUsernameErrors]; -export type GetModelsInFolderResponses = { - /** - * Success - List of models in the folder - */ - 200: Array -} +export type GetHubProfileByUsernameResponses = { + /** + * Hub profile + */ + 200: HubProfile; +}; -export type GetModelsInFolderResponse = - GetModelsInFolderResponses[keyof GetModelsInFolderResponses] +export type GetHubProfileByUsernameResponse = GetHubProfileByUsernameResponses[keyof GetHubProfileByUsernameResponses]; -export type GetLegacyHistoryData = { - body?: never - path?: never - query?: never - url: '/api/history' -} +export type UpdateHubProfileData = { + body: UpdateHubProfileRequest; + path: { + /** + * The hub profile username to update. + */ + username: string; + }; + query?: never; + url: '/api/hub/profiles/{username}'; +}; -export type GetLegacyHistoryErrors = { - /** - * Not Found — use /api/history_v2 instead - */ - 404: unknown -} +export type UpdateHubProfileErrors = { + /** + * Bad request (e.g. missing body, invalid avatar token) + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * No hub profile exists with this username + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type ManageHistoryData = { - body: HistoryManageRequest - path?: never - query?: never - url: '/api/history' -} +export type UpdateHubProfileError = UpdateHubProfileErrors[keyof UpdateHubProfileErrors]; -export type ManageHistoryErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ManageHistoryError = ManageHistoryErrors[keyof ManageHistoryErrors] +export type UpdateHubProfileResponses = { + /** + * Hub profile updated + */ + 200: HubProfile; +}; -export type ManageHistoryResponses = { - /** - * Success - History management operation completed - */ - 200: unknown -} +export type UpdateHubProfileResponse = UpdateHubProfileResponses[keyof UpdateHubProfileResponses]; -export type GetHistoryData = { - body?: never - path?: never - query?: { +export type CheckHubUsernameData = { + body?: never; + path?: never; + query: { + username: string; + }; + url: '/api/hub/profiles/check'; +}; + +export type CheckHubUsernameErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * Maximum number of items to return + * Not found */ - max_items?: number + 404: ErrorResponse; /** - * Starting position (default 0) + * Internal server error */ - offset?: number - } - url: '/api/history_v2' -} + 500: ErrorResponse; +}; -export type GetHistoryErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetHistoryError = GetHistoryErrors[keyof GetHistoryErrors] +export type CheckHubUsernameError = CheckHubUsernameErrors[keyof CheckHubUsernameErrors]; -export type GetHistoryResponses = { - /** - * Success - Execution history retrieved - */ - 200: HistoryResponse -} +export type CheckHubUsernameResponses = { + /** + * Username availability result + */ + 200: HubUsernameCheckResponse; +}; -export type GetHistoryResponse = GetHistoryResponses[keyof GetHistoryResponses] +export type CheckHubUsernameResponse = CheckHubUsernameResponses[keyof CheckHubUsernameResponses]; -export type GetHistoryForPromptData = { - body?: never - path: { +export type GetMyHubProfileData = { + body?: never; + path?: never; + query?: never; + url: '/api/hub/profiles/me'; +}; + +export type GetMyHubProfileErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * The prompt ID to retrieve history for + * No hub profile exists */ - prompt_id: string - } - query?: never - url: '/api/history_v2/{prompt_id}' -} + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetHistoryForPromptErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Prompt not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetHistoryForPromptError = - GetHistoryForPromptErrors[keyof GetHistoryForPromptErrors] +export type GetMyHubProfileError = GetMyHubProfileErrors[keyof GetMyHubProfileErrors]; -export type GetHistoryForPromptResponses = { - /** - * Success - History for prompt retrieved - */ - 200: HistoryDetailResponse -} +export type GetMyHubProfileResponses = { + /** + * Hub profile + */ + 200: HubProfile; +}; -export type GetHistoryForPromptResponse = - GetHistoryForPromptResponses[keyof GetHistoryForPromptResponses] +export type GetMyHubProfileResponse = GetMyHubProfileResponses[keyof GetMyHubProfileResponses]; -export type ListJobsData = { - body?: never - path?: never - query?: { +export type ListHubWorkflowsData = { + body?: never; + path?: never; + query?: { + cursor?: string; + limit?: number; + /** + * Search by workflow name + */ + search?: string; + /** + * Filter by tag + */ + tag?: string; + /** + * Filter by profile username + */ + username?: string; + /** + * When true, returns full HubWorkflowDetail objects in the workflows array instead of summaries. Requires limit <= 20. + */ + detail?: boolean; + /** + * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. + */ + status?: Array; + }; + url: '/api/hub/workflows'; +}; + +export type ListHubWorkflowsErrors = { /** - * Filter by one or more statuses (comma-separated). If not provided, returns all jobs. + * Bad request (e.g. malformed pagination cursor) */ - status?: string + 400: ErrorResponse; /** - * Filter by workflow ID (exact match) + * Profile not found (when filtering by username) */ - workflow_id?: string + 404: ErrorResponse; /** - * Filter by output media type (only applies to completed jobs with outputs) + * Internal server error */ - output_type?: 'image' | 'video' | 'audio' | '3d' + 500: ErrorResponse; +}; + +export type ListHubWorkflowsError = ListHubWorkflowsErrors[keyof ListHubWorkflowsErrors]; + +export type ListHubWorkflowsResponses = { /** - * Field to sort by (create_time = when job was submitted, execution_time = how long workflow took to run) + * Paginated list of hub workflows */ - sort_by?: 'create_time' | 'execution_time' + 200: HubWorkflowListResponse; +}; + +export type ListHubWorkflowsResponse = ListHubWorkflowsResponses[keyof ListHubWorkflowsResponses]; + +export type PublishHubWorkflowData = { + body: PublishHubWorkflowRequest; + path?: never; + query?: never; + url: '/api/hub/workflows'; +}; + +export type PublishHubWorkflowErrors = { /** - * Sort direction (asc = ascending, desc = descending) + * Bad request */ - sort_order?: 'asc' | 'desc' + 400: ErrorResponse; /** - * Opaque cursor for keyset pagination. Pass the `next_cursor` value - * from a previous response to fetch the next page. - * Cursor pagination is supported only when `sort_by=create_time` - * (default). If `sort_by=execution_time`, `after` is ignored and - * offset/limit pagination is used. - * Cursors are opaque base64url payloads — clients should treat them - * as strings and not parse the contents. - * + * Unauthorized */ - after?: string + 401: ErrorResponse; /** - * Pagination offset (0-based). Deprecated: prefer cursor-based pagination via `after`. - * - * @deprecated + * Workflow or profile not found */ - offset?: number + 404: ErrorResponse; /** - * Maximum items per page (1-1000) + * Internal server error */ - limit?: number - } - url: '/api/jobs' -} + 500: ErrorResponse; +}; -export type ListJobsErrors = { - /** - * Bad request (e.g. malformed pagination cursor). - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListJobsError = ListJobsErrors[keyof ListJobsErrors] +export type PublishHubWorkflowError = PublishHubWorkflowErrors[keyof PublishHubWorkflowErrors]; -export type ListJobsResponses = { - /** - * Success - Jobs retrieved - */ - 200: JobsListResponse -} +export type PublishHubWorkflowResponses = { + /** + * Workflow published to hub + */ + 200: HubWorkflowDetail; +}; -export type ListJobsResponse = ListJobsResponses[keyof ListJobsResponses] +export type PublishHubWorkflowResponse = PublishHubWorkflowResponses[keyof PublishHubWorkflowResponses]; -export type GetJobDetailData = { - body?: never - path: { +export type DeleteHubWorkflowData = { + body?: never; + path: { + /** + * The share ID of the hub workflow to unpublish. + */ + share_id: string; + }; + query?: never; + url: '/api/hub/workflows/{share_id}'; +}; + +export type DeleteHubWorkflowErrors = { /** - * Job identifier (UUID) + * Unauthorized */ - job_id: string - } - query?: { + 401: ErrorResponse; /** - * When present, each output item in the response receives a `short_url` field containing a short link for that asset. Omit this parameter (the default) to receive a response identical to the no-param baseline. The value selects the link's lifetime and auth model: use `ephemeral_tool_chain` for short-lived (≤5 minute) machine-to-machine handoffs — these are public bearer links where the link ID itself is the credential, so anyone holding the link can resolve it (intended for pasting into an agent/MCP tool chain); use `default` for durable (30 day) human-revisitable links, which are owner-gated and resolvable only by the authenticated owner. Links are always minted under the authenticated request owner's identity; the auth model is selected by the server and is never settable by the caller. - * + * Workflow not found */ - short_link?: 'ephemeral_tool_chain' | 'default' - } - url: '/api/jobs/{job_id}' -} + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetJobDetailErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Forbidden - Job does not belong to user - */ - 403: ErrorResponse - /** - * Job not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetJobDetailError = GetJobDetailErrors[keyof GetJobDetailErrors] +export type DeleteHubWorkflowError = DeleteHubWorkflowErrors[keyof DeleteHubWorkflowErrors]; -export type GetJobDetailResponses = { - /** - * Success - Job details retrieved - */ - 200: JobDetailResponse -} +export type DeleteHubWorkflowResponses = { + /** + * Successfully unpublished + */ + 204: void; +}; -export type GetJobDetailResponse = - GetJobDetailResponses[keyof GetJobDetailResponses] +export type DeleteHubWorkflowResponse = DeleteHubWorkflowResponses[keyof DeleteHubWorkflowResponses]; -export type CancelJobData = { - body?: never - path: { +export type GetHubWorkflowData = { + body?: never; + path: { + /** + * The share ID of the hub workflow. + */ + share_id: string; + }; + query?: never; + url: '/api/hub/workflows/{share_id}'; +}; + +export type GetHubWorkflowErrors = { + /** + * Workflow not found + */ + 404: ErrorResponse; + /** + * Workflow JSON too large + */ + 413: ErrorResponse; /** - * Job identifier (UUID) + * Internal server error */ - job_id: string - } - query?: never - url: '/api/jobs/{job_id}/cancel' -} + 500: ErrorResponse; +}; -export type CancelJobErrors = { - /** - * Bad Request - job_id is not a valid UUID (emitted by request validation before the handler runs) - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Job not found for this user - */ - 404: ErrorResponse - /** - * Internal server error - cancellation failed - */ - 500: ErrorResponse -} - -export type CancelJobError = CancelJobErrors[keyof CancelJobErrors] +export type GetHubWorkflowError = GetHubWorkflowErrors[keyof GetHubWorkflowErrors]; -export type CancelJobResponses = { - /** - * Success - Cancel request accepted (or job was already terminal) - */ - 200: JobCancelResponse -} +export type GetHubWorkflowResponses = { + /** + * Hub workflow detail + */ + 200: HubWorkflowDetail; +}; -export type CancelJobResponse = CancelJobResponses[keyof CancelJobResponses] +export type GetHubWorkflowResponse = GetHubWorkflowResponses[keyof GetHubWorkflowResponses]; -export type CancelJobsData = { - body: JobsCancelRequest - path?: never - query?: never - url: '/api/jobs/cancel' -} +export type ListHubWorkflowIndexData = { + body?: never; + path?: never; + query?: { + /** + * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. + */ + status?: Array; + }; + url: '/api/hub/workflows/index'; +}; -export type CancelJobsErrors = { - /** - * Bad Request - job_ids is missing, empty, exceeds the maximum count, or contains an invalid UUID - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * One or more job IDs not found for this user (no jobs cancelled) - */ - 404: ErrorResponse - /** - * Internal server error - cancellation failed - */ - 500: ErrorResponse -} - -export type CancelJobsError = CancelJobsErrors[keyof CancelJobsErrors] +export type ListHubWorkflowIndexErrors = { + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type CancelJobsResponses = { - /** - * Success - cancel requests dispatched (or jobs were already terminal) - */ - 200: JobsCancelResponse -} +export type ListHubWorkflowIndexError = ListHubWorkflowIndexErrors[keyof ListHubWorkflowIndexErrors]; + +export type ListHubWorkflowIndexResponses = { + /** + * List of hub workflow template entries + */ + 200: Array; +}; -export type CancelJobsResponse = CancelJobsResponses[keyof CancelJobsResponses] +export type ListHubWorkflowIndexResponse = ListHubWorkflowIndexResponses[keyof ListHubWorkflowIndexResponses]; -export type ViewFileData = { - body?: never - path?: never - query: { +export type GetI18nData = { + body?: never; + path?: never; + query?: never; + url: '/api/i18n'; +}; + +export type GetI18nResponses = { /** - * Name of the file to view + * Nested map of locale to translation key-value pairs */ - filename: string + 200: { + [key: string]: unknown; + }; +}; + +export type GetI18nResponse = GetI18nResponses[keyof GetI18nResponses]; + +export type InterruptJobData = { + body?: never; + path?: never; + query?: never; + url: '/api/interrupt'; +}; + +export type InterruptJobErrors = { /** - * Subfolder path where the file is located + * Unauthorized - Authentication required */ - subfolder?: string + 401: ErrorResponse; /** - * Type of file (e.g., output, input, temp) + * Internal server error */ - type?: string + 500: ErrorResponse; +}; + +export type InterruptJobError = InterruptJobErrors[keyof InterruptJobErrors]; + +export type InterruptJobResponses = { /** - * Full path to the file (used for temp files) + * Success - first active job cancelled, or no active job found */ - fullpath?: string + 200: unknown; +}; + +export type AcceptWorkspaceInviteData = { + body?: never; + path: { + /** + * Invite token + */ + token: string; + }; + query?: never; + url: '/api/invites/{token}/accept'; +}; + +export type AcceptWorkspaceInviteErrors = { /** - * Format of the file + * Unauthorized */ - format?: string + 401: ErrorResponse; /** - * Frame rate for video files + * Email does not match invite */ - frame_rate?: number + 403: ErrorResponse; /** - * Workflow identifier + * Invite not found or expired */ - workflow?: string + 404: ErrorResponse; /** - * Timestamp parameter + * Already a member of this workspace */ - timestamp?: number + 409: ErrorResponse; /** - * Image channel to extract from PNG images. - * - 'rgb': Return only RGB channels (alpha set to fully opaque) - * - 'a' or 'alpha': Return alpha channel as grayscale image - * - If not specified, return original image unchanged via redirect - * + * Internal server error */ - channel?: string + 500: ErrorResponse; +}; + +export type AcceptWorkspaceInviteError = AcceptWorkspaceInviteErrors[keyof AcceptWorkspaceInviteErrors]; + +export type AcceptWorkspaceInviteResponses = { /** - * Maximum dimension (width or height) to resize the image to, preserving aspect ratio. - * The image is fit within a res x res box. Returns a JPEG thumbnail. - * Only applies to raster image files (PNG, JPEG, WebP, GIF). - * + * Invite accepted, user is now a member */ - res?: number - } - url: '/api/view' -} + 200: AcceptInviteResponse; +}; -export type ViewFileErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * File not found or unauthorized - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ViewFileError = ViewFileErrors[keyof ViewFileErrors] - -export type ViewFileResponses = { - /** - * Processed PNG image with extracted channel - */ - 200: Blob | File -} +export type AcceptWorkspaceInviteResponse = AcceptWorkspaceInviteResponses[keyof AcceptWorkspaceInviteResponses]; -export type ViewFileResponse = ViewFileResponses[keyof ViewFileResponses] +export type GetLegacyJobByIdData = { + body?: never; + path: { + job_id: string; + }; + query?: never; + url: '/api/job/{job_id}'; +}; -export type GetMaskLayersData = { - body?: never - path?: never - query: { +export type GetLegacyJobByIdErrors = { /** - * Hash filename of any mask layer file + * Not Found — use /api/jobs/{job_id} instead */ - filename: string - } - url: '/api/files/mask-layers' -} + 404: unknown; +}; -export type GetMaskLayersErrors = { - /** - * File not found or not a mask file - */ - 404: ErrorResponse -} +export type GetLegacyJobOutputsData = { + body?: never; + path: { + job_id: string; + }; + query?: never; + url: '/api/job/{job_id}/outputs'; +}; -export type GetMaskLayersError = GetMaskLayersErrors[keyof GetMaskLayersErrors] +export type GetLegacyJobOutputsErrors = { + /** + * Not Found — use /api/jobs/{job_id} instead + */ + 404: unknown; +}; -export type GetMaskLayersResponses = { - /** - * Success - Related mask layers returned - */ - 200: { +export type GetJobStatusData = { + body?: never; + path: { + /** + * The unique ID of the job + */ + job_id: string; + }; + query?: never; + url: '/api/job/{job_id}/status'; +}; + +export type GetJobStatusErrors = { /** - * Filename of the mask layer + * Unauthorized */ - mask?: string | null + 401: ErrorResponse; /** - * Filename of the paint strokes layer + * Forbidden - job belongs to another user */ - paint?: string | null + 403: ErrorResponse; /** - * Filename of the painted image layer + * Job not found */ - painted?: string | null + 404: ErrorResponse; /** - * Filename of the final composite layer + * Internal server error */ - painted_masked?: string | null - } -} + 500: ErrorResponse; +}; -export type GetMaskLayersResponse = - GetMaskLayersResponses[keyof GetMaskLayersResponses] +export type GetJobStatusError = GetJobStatusErrors[keyof GetJobStatusErrors]; -export type GetFilesData = { - body?: never - path: { +export type GetJobStatusResponses = { /** - * Type of directory to list files from + * Success - Job status returned */ - directory_type: 'output' | 'input' | 'temp' - } - query?: never - url: '/internal/files/{directory_type}' -} + 200: JobStatusResponse; +}; -export type GetFilesErrors = { - /** - * Invalid directory type - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse -} +export type GetJobStatusResponse = GetJobStatusResponses[keyof GetJobStatusResponses]; -export type GetFilesError = GetFilesErrors[keyof GetFilesErrors] - -export type GetFilesResponses = { - /** - * Array of file names sorted by modification time (newest first) - */ - 200: Array -} - -export type GetFilesResponse = GetFilesResponses[keyof GetFilesResponses] +export type ListJobsData = { + body?: never; + path?: never; + query?: { + /** + * Filter by one or more statuses (comma-separated). If not provided, returns all jobs. + */ + status?: string; + /** + * Filter by workflow ID (exact match) + */ + workflow_id?: string; + /** + * Filter by output media type (only applies to completed jobs with outputs) + */ + output_type?: 'image' | 'video' | 'audio' | '3d'; + /** + * Field to sort by (create_time = when job was submitted, execution_time = how long workflow took to run) + */ + sort_by?: 'create_time' | 'execution_time'; + /** + * Sort direction (asc = ascending, desc = descending) + */ + sort_order?: 'asc' | 'desc'; + /** + * Opaque cursor for keyset pagination. Pass the `next_cursor` value + * from a previous response to fetch the next page. + * Cursor pagination is supported only when `sort_by=create_time` + * (default). If `sort_by=execution_time`, `after` is ignored and + * offset/limit pagination is used. + * Cursors are opaque base64url payloads — clients should treat them + * as strings and not parse the contents. + * + */ + after?: string; + /** + * Pagination offset (0-based). Deprecated: prefer cursor-based pagination via `after`. + * + * @deprecated + */ + offset?: number; + /** + * Maximum items per page (1-1000) + */ + limit?: number; + }; + url: '/api/jobs'; +}; -export type ListAssetsData = { - body?: never - path?: never - query?: { - /** - * Filter assets that have ALL of these tags - */ - include_tags?: Array - /** - * Exclude assets that have ANY of these tags - */ - exclude_tags?: Array +export type ListJobsErrors = { /** - * Filter assets where name contains this substring (case-insensitive) + * Bad request (e.g. malformed pagination cursor). */ - name_contains?: string + 400: ErrorResponse; /** - * JSON object for filtering by metadata fields + * Unauthorized - Authentication required */ - metadata_filter?: string + 401: ErrorResponse; /** - * Maximum number of assets to return (1-500) + * Internal server error */ - limit?: number + 500: ErrorResponse; +}; + +export type ListJobsError = ListJobsErrors[keyof ListJobsErrors]; + +export type ListJobsResponses = { /** - * Number of assets to skip for pagination + * Success - Jobs retrieved */ - offset?: number + 200: JobsListResponse; +}; + +export type ListJobsResponse = ListJobsResponses[keyof ListJobsResponses]; + +export type GetJobDetailData = { + body?: never; + path: { + /** + * Job identifier (UUID) + */ + job_id: string; + }; + query?: { + /** + * When present, each output item in the response receives a `short_url` field containing a short link for that asset. Omit this parameter (the default) to receive a response identical to the no-param baseline. The value selects the link's lifetime and auth model: use `ephemeral_tool_chain` for short-lived (≤5 minute) machine-to-machine handoffs — these are public bearer links where the link ID itself is the credential, so anyone holding the link can resolve it (intended for pasting into an agent/MCP tool chain); use `default` for durable (30 day) human-revisitable links, which are owner-gated and resolvable only by the authenticated owner. Links are always minted under the authenticated request owner's identity; the auth model is selected by the server and is never settable by the caller. + * + */ + short_link?: 'ephemeral_tool_chain' | 'default'; + }; + url: '/api/jobs/{job_id}'; +}; + +export type GetJobDetailErrors = { /** - * Field to sort by + * Unauthorized - Authentication required */ - sort?: 'name' | 'created_at' | 'updated_at' | 'size' | 'last_access_time' + 401: ErrorResponse; /** - * Sort order + * Forbidden - Job does not belong to user */ - order?: 'asc' | 'desc' + 403: ErrorResponse; /** - * Whether to include public/shared assets in results + * Job not found */ - include_public?: boolean + 404: ErrorResponse; /** - * Filter assets by exact content hash. + * Internal server error */ - hash?: string + 500: ErrorResponse; +}; + +export type GetJobDetailError = GetJobDetailErrors[keyof GetJobDetailErrors]; + +export type GetJobDetailResponses = { /** - * 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. - * + * Success - Job details retrieved */ - after?: string - } - url: '/api/assets' -} - -export type ListAssetsErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListAssetsError = ListAssetsErrors[keyof ListAssetsErrors] + 200: JobDetailResponse; +}; -export type ListAssetsResponses = { - /** - * Success - Assets returned - */ - 200: ListAssetsResponse -} +export type GetJobDetailResponse = GetJobDetailResponses[keyof GetJobDetailResponses]; -export type ListAssetsResponse2 = ListAssetsResponses[keyof ListAssetsResponses] +export type CancelJobData = { + body?: never; + path: { + /** + * Job identifier (UUID) + */ + job_id: string; + }; + query?: never; + url: '/api/jobs/{job_id}/cancel'; +}; -export type CreateAssetData = { - body: { +export type CancelJobErrors = { /** - * The asset file to upload + * Bad Request - job_id is not a valid UUID (emitted by request validation before the handler runs) */ - file: Blob | File + 400: ErrorResponse; /** - * Content hash of the file. + * Unauthorized - Authentication required */ - hash?: string + 401: ErrorResponse; /** - * JSON-encoded array of freeform tag strings, e.g. '["models","checkpoint"]'. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. + * Job not found for this user */ - tags?: string + 404: ErrorResponse; /** - * Optional asset ID for idempotent creation. If provided and asset exists, returns existing asset. + * Internal server error - cancellation failed */ - id?: string + 500: ErrorResponse; +}; + +export type CancelJobError = CancelJobErrors[keyof CancelJobErrors]; + +export type CancelJobResponses = { /** - * Optional preview asset ID. If not provided, images will use their own ID as preview. + * Success - Cancel request accepted (or job was already terminal) */ - preview_id?: string + 200: JobCancelResponse; +}; + +export type CancelJobResponse = CancelJobResponses[keyof CancelJobResponses]; + +export type CancelJobsData = { + body: JobsCancelRequest; + path?: never; + query?: never; + url: '/api/jobs/cancel'; +}; + +export type CancelJobsErrors = { /** - * Display name for the asset + * Bad Request - job_ids is missing, empty, exceeds the maximum count, or contains an invalid UUID */ - name?: string + 400: ErrorResponse; /** - * MIME type of the asset (e.g., "image/png", "video/mp4") + * Unauthorized - Authentication required */ - mime_type?: string + 401: ErrorResponse; /** - * Custom JSON metadata as a string + * One or more job IDs not found for this user (no jobs cancelled) */ - user_metadata?: string - } - path?: never - query?: never - url: '/api/assets' -} - -export type CreateAssetErrors = { - /** - * Invalid request (bad file, invalid content type, etc.) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * File too large - */ - 413: ErrorResponse - /** - * Unsupported media type - */ - 415: ErrorResponse - /** - * Validation error (e.g., disallowed model_type tag) - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateAssetError = CreateAssetErrors[keyof CreateAssetErrors] + 404: ErrorResponse; + /** + * Internal server error - cancellation failed + */ + 500: ErrorResponse; +}; -export type CreateAssetResponses = { - /** - * Asset already existed for this user (deduplicated by content hash); the - * existing asset is returned with created_new=false. - * - */ - 200: AssetCreated - /** - * Asset created successfully (created_new=true) - */ - 201: AssetCreated -} - -export type CreateAssetResponse = - CreateAssetResponses[keyof CreateAssetResponses] +export type CancelJobsError = CancelJobsErrors[keyof CancelJobsErrors]; -export type CreateAssetFromHashData = { - body: { +export type CancelJobsResponses = { /** - * Blake3 content hash of the existing asset (blake3: prefix) + * Success - cancel requests dispatched (or jobs were already terminal) */ - hash: string + 200: JobsCancelResponse; +}; + +export type CancelJobsResponse = CancelJobsResponses[keyof CancelJobsResponses]; + +export type GetLegacyModelsData = { + body?: never; + path?: never; + query?: never; + url: '/api/models'; +}; + +export type GetLegacyModelsErrors = { /** - * Display name for the asset reference (optional) + * Not Found — use /api/experiment/models instead */ - name?: string + 404: unknown; +}; + +export type GetLegacyModelsByFolderData = { + body?: never; + path: { + folder: string; + }; + query?: never; + url: '/api/models/{folder}'; +}; + +export type GetLegacyModelsByFolderErrors = { /** - * Freeform tags for the asset. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. + * Not Found — use /api/experiment/models/{folder} instead */ - tags: Array + 404: unknown; +}; + +export type GetNodeReplacementsData = { + body?: never; + path?: never; + query?: never; + url: '/api/node_replacements'; +}; + +export type GetNodeReplacementsErrors = { /** - * MIME type of the asset (e.g., "image/png", "video/mp4") + * Internal server error */ - mime_type?: string + 500: ErrorResponse; +}; + +export type GetNodeReplacementsError = GetNodeReplacementsErrors[keyof GetNodeReplacementsErrors]; + +export type GetNodeReplacementsResponses = { /** - * Custom metadata for this asset reference + * Success - Node replacement mappings */ - user_metadata?: { - [key: string]: unknown - } - } - path?: never - query?: never - url: '/api/assets/from-hash' -} + 200: { + [key: string]: unknown; + }; +}; -export type CreateAssetFromHashErrors = { - /** - * Invalid request (bad hash format, invalid tags, etc.) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Source asset with given hash not found - */ - 404: ErrorResponse - /** - * Validation error (e.g., disallowed model_type tag) - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateAssetFromHashError = - CreateAssetFromHashErrors[keyof CreateAssetFromHashErrors] +export type GetNodeReplacementsResponse = GetNodeReplacementsResponses[keyof GetNodeReplacementsResponses]; -export type CreateAssetFromHashResponses = { - /** - * Asset reference already existed for this user (deduplicated by content - * hash); the existing asset is returned with created_new=false. - * - */ - 200: AssetCreated - /** - * Asset reference created successfully (created_new=true) - */ - 201: AssetCreated -} - -export type CreateAssetFromHashResponse = - CreateAssetFromHashResponses[keyof CreateAssetFromHashResponses] +export type GetNodeInfoData = { + body?: never; + path?: never; + query?: never; + url: '/api/object_info'; +}; -export type GetRemoteAssetMetadataData = { - body?: never - path?: never - query: { +export type GetNodeInfoResponses = { /** - * Download URL to retrieve metadata from + * Success */ - url: string - } - url: '/api/assets/remote-metadata' -} + 200: { + [key: string]: NodeInfo; + }; +}; -export type GetRemoteAssetMetadataErrors = { - /** - * Invalid URL or missing required parameter - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Failed to retrieve metadata from source - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetRemoteAssetMetadataError = - GetRemoteAssetMetadataErrors[keyof GetRemoteAssetMetadataErrors] - -export type GetRemoteAssetMetadataResponses = { - /** - * Metadata retrieved successfully - */ - 200: AssetMetadataResponse -} +export type GetNodeInfoResponse = GetNodeInfoResponses[keyof GetNodeInfoResponses]; -export type GetRemoteAssetMetadataResponse = - GetRemoteAssetMetadataResponses[keyof GetRemoteAssetMetadataResponses] +export type GetLegacyObjectInfoByNodeClassData = { + body?: never; + path: { + node_class: string; + }; + query?: never; + url: '/api/object_info/{node_class}'; +}; -export type CreateAssetDownloadData = { - body: { +export type GetLegacyObjectInfoByNodeClassErrors = { /** - * URL of the file to download (must be from huggingface.co, civitai.com, or civitai.red) + * Not Found — use /api/object_info instead */ - source_url: string + 404: unknown; +}; + +export type GetPromptInfoData = { + body?: never; + path?: never; + query?: never; + url: '/api/prompt'; +}; + +export type GetPromptInfoErrors = { /** - * Optional tags for the asset (e.g., ["model", "checkpoint"]) + * Unauthorized */ - tags?: Array + 401: ErrorResponse; /** - * Optional user-defined metadata to attach to the asset + * Internal server error */ - user_metadata?: { - [key: string]: unknown - } + 500: ErrorResponse; +}; + +export type GetPromptInfoError = GetPromptInfoErrors[keyof GetPromptInfoErrors]; + +export type GetPromptInfoResponses = { /** - * Optional preview asset ID to associate with the downloaded asset + * Success */ - preview_id?: string - } - path?: never - query?: never - url: '/api/assets/download' -} + 200: PromptInfo; +}; -export type CreateAssetDownloadErrors = { - /** - * Invalid URL or unsupported source - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Validation errors - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateAssetDownloadError = - CreateAssetDownloadErrors[keyof CreateAssetDownloadErrors] +export type GetPromptInfoResponse = GetPromptInfoResponses[keyof GetPromptInfoResponses]; -export type CreateAssetDownloadResponses = { - /** - * File already exists in storage - asset created/returned immediately - */ - 200: AssetCreated - /** - * Accepted - Download task created and processing in background - */ - 202: AssetDownloadResponse -} - -export type CreateAssetDownloadResponse = - CreateAssetDownloadResponses[keyof CreateAssetDownloadResponses] +export type ExecutePromptData = { + body: PromptRequest; + path?: never; + query?: never; + url: '/api/prompt'; +}; -export type CreateAssetExportData = { - body: { +export type ExecutePromptErrors = { /** - * Job IDs whose output assets are included in the ZIP bundle. Preview assets of these jobs are additionally included when `include_previews` is true. + * Invalid prompt */ - job_ids?: Array + 400: PromptErrorResponse; /** - * Asset IDs to include in the ZIP bundle. Supports input, output, and available temp assets. Additive to output assets associated with provided job IDs. + * Payment required - Insufficient credits */ - asset_ids?: Array + 402: PromptErrorResponse; /** - * Strategy for naming files in the ZIP: - * - group_by_job_id: Group assets by job ID as a parent directory (e.g., "833a1b5c-beab-436a-ae8e-f07e7cd7b2c4/ComfyUI_00001_.png") - * - preserve: Use original asset names, skip duplicates (first one wins) - * - asset_id: Use the asset ID as the filename (e.g., "833a1b5c-beab-436a-ae8e-f07e7cd7b2c4.png") - * - group_by_job_time: Group by job creation timestamp (e.g., "2026-03-26T16-13-00/ComfyUI_00001_.png") - * + * Workflow JSON too large */ - naming_strategy?: - | 'group_by_job_id' - | 'preserve' - | 'asset_id' - | 'group_by_job_time' + 413: PromptErrorResponse; /** - * Optional per-job asset name filters. When provided for a job ID, - * only assets whose name matches one of the specified names are included. - * Job IDs present in `job_ids` but absent from this map include their output assets (plus previews when `include_previews` is true). - * + * Payment required - User has not paid */ - job_asset_name_filters?: { - [key: string]: Array - } + 429: PromptErrorResponse; /** - * When true, preview assets attached to the provided job_ids are included in the export. No effect on asset_ids. Preview assets are placed under a `previews/` subfolder in group-by-job layouts. + * Internal server error */ - include_previews?: boolean - } - path?: never - query?: never - url: '/api/assets/export' -} - -export type CreateAssetExportErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateAssetExportError = - CreateAssetExportErrors[keyof CreateAssetExportErrors] - -export type CreateAssetExportResponses = { - /** - * Accepted - Export task created and processing in background - */ - 202: AssetDownloadResponse -} - -export type CreateAssetExportResponse = - CreateAssetExportResponses[keyof CreateAssetExportResponses] - -export type DownloadExportData = { - body?: never - path: { + 500: PromptErrorResponse; /** - * Export filename with extension (e.g., "021e55cd-9785-4ac7-ac39-f4010138e3bc.zip") + * Service unavailable */ - exportName: string - } - query?: never - url: '/api/assets/exports/{exportName}' -} + 503: PromptErrorResponse; +}; -export type DownloadExportErrors = { - /** - * Invalid export name - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Export not found or not owned by user - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type DownloadExportError = - DownloadExportErrors[keyof DownloadExportErrors] - -export type DownloadExportResponses = { - /** - * Signed URL for downloading the export - */ - 200: ExportDownloadUrlResponse -} - -export type DownloadExportResponse = - DownloadExportResponses[keyof DownloadExportResponses] +export type ExecutePromptError = ExecutePromptErrors[keyof ExecutePromptErrors]; -export type DeleteAssetData = { - body?: never - path: { +export type ExecutePromptResponses = { /** - * Asset ID + * Success - Prompt accepted */ - id: string - } - query?: never - url: '/api/assets/{id}' -} - -export type DeleteAssetErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Asset not found - */ - 404: ErrorResponse - /** - * Asset cannot be deleted because it is referenced by another resource, e.g. a workflow version (error code: ASSET_IN_USE) - */ - 409: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type DeleteAssetError = DeleteAssetErrors[keyof DeleteAssetErrors] + 200: PromptResponse; +}; -export type DeleteAssetResponses = { - /** - * Asset record deleted successfully - */ - 204: void -} +export type ExecutePromptResponse = ExecutePromptResponses[keyof ExecutePromptResponses]; -export type DeleteAssetResponse = - DeleteAssetResponses[keyof DeleteAssetResponses] +export type GetLegacyPromptByIdData = { + body?: never; + path: { + prompt_id: string; + }; + query?: never; + url: '/api/prompt/{prompt_id}'; +}; -export type GetAssetByIdData = { - body?: never - path: { +export type GetLegacyPromptByIdErrors = { /** - * Asset ID + * Not Found — use /api/jobs/{prompt_id} instead */ - id: string - } - query?: never - url: '/api/assets/{id}' -} - -export type GetAssetByIdErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Asset not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetAssetByIdError = GetAssetByIdErrors[keyof GetAssetByIdErrors] + 404: unknown; +}; -export type GetAssetByIdResponses = { - /** - * Asset details retrieved successfully - */ - 200: Asset -} - -export type GetAssetByIdResponse = - GetAssetByIdResponses[keyof GetAssetByIdResponses] +export type GetQueueInfoData = { + body?: never; + path?: never; + query?: never; + url: '/api/queue'; +}; -export type UpdateAssetData = { - body: { - /** - * New display name for the asset - */ - name?: string +export type GetQueueInfoErrors = { /** - * Updated MIME type of the asset + * Invalid request parameters */ - mime_type?: string + 400: ErrorResponse; /** - * Updated preview asset ID + * Unauthorized - Authentication required */ - preview_id?: string + 401: ErrorResponse; /** - * Updated custom metadata + * Invalid request parameters */ - user_metadata?: { - [key: string]: unknown - } - } - path: { + 500: ErrorResponse; +}; + +export type GetQueueInfoError = GetQueueInfoErrors[keyof GetQueueInfoErrors]; + +export type GetQueueInfoResponses = { /** - * Asset ID + * Success */ - id: string - } - query?: never - url: '/api/assets/{id}' -} - -export type UpdateAssetErrors = { - /** - * Invalid request — no fields provided, or `preview_id` is the zero UUID - * (`INVALID_PREVIEW_ID`). - * - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Asset not found — returned both when the asset being updated does - * not exist and when `preview_id` does not reference an asset - * accessible to the caller. - * - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UpdateAssetError = UpdateAssetErrors[keyof UpdateAssetErrors] + 200: QueueInfo; +}; -export type UpdateAssetResponses = { - /** - * Asset updated successfully - */ - 200: AssetUpdated -} +export type GetQueueInfoResponse = GetQueueInfoResponses[keyof GetQueueInfoResponses]; -export type UpdateAssetResponse = - UpdateAssetResponses[keyof UpdateAssetResponses] +export type ManageQueueData = { + body: QueueManageRequest; + path?: never; + query?: never; + url: '/api/queue'; +}; -export type RemoveAssetTagsData = { - body: { +export type ManageQueueErrors = { /** - * Tags to remove from the asset + * Invalid request parameters */ - tags: Array - } - path: { + 400: ErrorResponse; /** - * Asset ID + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error */ - id: string - } - query?: never - url: '/api/assets/{id}/tags' -} + 500: ErrorResponse; +}; -export type RemoveAssetTagsErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Asset not found - */ - 404: ErrorResponse - /** - * Validation error (e.g., reserved tag) - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type RemoveAssetTagsError = - RemoveAssetTagsErrors[keyof RemoveAssetTagsErrors] +export type ManageQueueError = ManageQueueErrors[keyof ManageQueueErrors]; -export type RemoveAssetTagsResponses = { - /** - * Tags removed successfully - */ - 200: TagsModificationResponse -} +export type ManageQueueResponses = { + /** + * Success + */ + 200: QueueManageResponse; +}; -export type RemoveAssetTagsResponse = - RemoveAssetTagsResponses[keyof RemoveAssetTagsResponses] +export type ManageQueueResponse = ManageQueueResponses[keyof ManageQueueResponses]; -export type AddAssetTagsData = { - body: { +export type ListSecretsData = { + body?: never; + path?: never; + query?: never; + url: '/api/secrets'; +}; + +export type ListSecretsErrors = { /** - * Tags to add to the asset + * Unauthorized */ - tags: Array - } - path: { + 401: ErrorResponse; /** - * Asset ID + * Internal server error + */ + 500: ErrorResponse; + /** + * Service unavailable - feature is disabled */ - id: string - } - query?: never - url: '/api/assets/{id}/tags' -} + 503: ErrorResponse; +}; -export type AddAssetTagsErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Asset not found - */ - 404: ErrorResponse - /** - * Validation error (e.g., reserved tag) - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type AddAssetTagsError = AddAssetTagsErrors[keyof AddAssetTagsErrors] +export type ListSecretsError = ListSecretsErrors[keyof ListSecretsErrors]; -export type AddAssetTagsResponses = { - /** - * Tags added successfully - */ - 200: TagsModificationResponse -} +export type ListSecretsResponses = { + /** + * Success + */ + 200: SecretListResponse; +}; -export type AddAssetTagsResponse = - AddAssetTagsResponses[keyof AddAssetTagsResponses] +export type ListSecretsResponse = ListSecretsResponses[keyof ListSecretsResponses]; -export type ListTagsData = { - body?: never - path?: never - query?: { +export type CreateSecretData = { + body: CreateSecretRequest; + path?: never; + query?: never; + url: '/api/secrets'; +}; + +export type CreateSecretErrors = { /** - * Filter tags by prefix + * Invalid request */ - prefix?: string + 400: ErrorResponse; /** - * Maximum number of tags to return (1-1000) + * Unauthorized */ - limit?: number + 401: ErrorResponse; /** - * Number of tags to skip for pagination + * Forbidden - workspace is not entitled to configure a secret for this provider */ - offset?: number + 403: ErrorResponse; /** - * Sort order for tags + * Conflict - secret with this name or provider already exists */ - order?: 'count_desc' | 'name_asc' + 409: ErrorResponse; /** - * Include tags with zero usage count + * Validation error */ - include_zero?: boolean + 422: ErrorResponse; /** - * Whether to include public/shared assets when counting tags + * Internal server error */ - include_public?: boolean - } - url: '/api/tags' -} - -export type ListTagsErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListTagsError = ListTagsErrors[keyof ListTagsErrors] - -export type ListTagsResponses = { - /** - * Tags retrieved successfully - */ - 200: ListTagsResponse -} + 500: ErrorResponse; + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse; +}; -export type ListTagsResponse2 = ListTagsResponses[keyof ListTagsResponses] +export type CreateSecretError = CreateSecretErrors[keyof CreateSecretErrors]; -export type GetAssetTagHistogramData = { - body?: never - path?: never - query?: { +export type CreateSecretResponses = { /** - * Filter assets that have ALL of these tags + * Secret created successfully */ - include_tags?: Array + 201: SecretResponse; +}; + +export type CreateSecretResponse = CreateSecretResponses[keyof CreateSecretResponses]; + +export type DeleteSecretData = { + body?: never; + path: { + /** + * The UUID of the secret + */ + id: string; + }; + query?: never; + url: '/api/secrets/{id}'; +}; + +export type DeleteSecretErrors = { /** - * Exclude assets that have ANY of these tags + * Unauthorized */ - exclude_tags?: Array + 401: ErrorResponse; /** - * Filter assets where name contains this substring (case-insensitive) + * Forbidden - user does not own this secret */ - name_contains?: string + 403: ErrorResponse; /** - * JSON object for filtering by metadata fields + * Secret not found */ - metadata_filter?: string + 404: ErrorResponse; /** - * Maximum number of tags to return (1-1000, default 100) + * Internal server error */ - limit?: number + 500: ErrorResponse; /** - * Whether to include public/shared assets in results + * Service unavailable - secrets feature disabled */ - include_public?: boolean - } - url: '/api/assets/tags/refine' -} - -export type GetAssetTagHistogramErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetAssetTagHistogramError = - GetAssetTagHistogramErrors[keyof GetAssetTagHistogramErrors] - -export type GetAssetTagHistogramResponses = { - /** - * Success - Tag histogram returned - */ - 200: AssetTagHistogramResponse -} + 503: ErrorResponse; +}; -export type GetAssetTagHistogramResponse = - GetAssetTagHistogramResponses[keyof GetAssetTagHistogramResponses] +export type DeleteSecretError = DeleteSecretErrors[keyof DeleteSecretErrors]; -export type CheckAssetByHashData = { - body?: never - path: { +export type DeleteSecretResponses = { /** - * Blake3 hash of the asset in format 'blake3:hex_digest' + * Secret deleted successfully */ - hash: string - } - query?: never - url: '/api/assets/hash/{hash}' -} - -export type CheckAssetByHashErrors = { - /** - * Invalid hash format - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Asset not found - */ - 404: unknown - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CheckAssetByHashError = - CheckAssetByHashErrors[keyof CheckAssetByHashErrors] - -export type CheckAssetByHashResponses = { - /** - * Asset exists - */ - 200: unknown -} - -export type PostAssetsFromWorkflowData = { - body: WorkflowApiAssetsRequest - path?: never - query?: never - url: '/api/assets/from-workflow' -} - -export type PostAssetsFromWorkflowErrors = { - /** - * Bad request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type PostAssetsFromWorkflowError = - PostAssetsFromWorkflowErrors[keyof PostAssetsFromWorkflowErrors] - -export type PostAssetsFromWorkflowResponses = { - /** - * Success - */ - 200: WorkflowApiAssetsResponse -} - -export type PostAssetsFromWorkflowResponse = - PostAssetsFromWorkflowResponses[keyof PostAssetsFromWorkflowResponses] - -export type ImportPublishedAssetsData = { - body: ImportPublishedAssetsRequest - path?: never - query?: never - url: '/api/assets/import' -} - -export type ImportPublishedAssetsErrors = { - /** - * Bad request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ImportPublishedAssetsError = - ImportPublishedAssetsErrors[keyof ImportPublishedAssetsErrors] - -export type ImportPublishedAssetsResponses = { - /** - * Successfully imported assets - */ - 200: ImportPublishedAssetsResponse -} - -export type ImportPublishedAssetsResponse2 = - ImportPublishedAssetsResponses[keyof ImportPublishedAssetsResponses] - -export type GetQueueInfoData = { - body?: never - path?: never - query?: never - url: '/api/queue' -} - -export type GetQueueInfoErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Invalid request parameters - */ - 500: ErrorResponse -} - -export type GetQueueInfoError = GetQueueInfoErrors[keyof GetQueueInfoErrors] - -export type GetQueueInfoResponses = { - /** - * Success - */ - 200: QueueInfo -} - -export type GetQueueInfoResponse = - GetQueueInfoResponses[keyof GetQueueInfoResponses] + 204: void; +}; -export type ManageQueueData = { - body: QueueManageRequest - path?: never - query?: never - url: '/api/queue' -} - -export type ManageQueueErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ManageQueueError = ManageQueueErrors[keyof ManageQueueErrors] - -export type ManageQueueResponses = { - /** - * Success - */ - 200: QueueManageResponse -} - -export type ManageQueueResponse = - ManageQueueResponses[keyof ManageQueueResponses] - -export type InterruptJobData = { - body?: never - path?: never - query?: never - url: '/api/interrupt' -} - -export type InterruptJobErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type InterruptJobError = InterruptJobErrors[keyof InterruptJobErrors] - -export type InterruptJobResponses = { - /** - * Success - first active job cancelled, or no active job found - */ - 200: unknown -} - -export type ListSecretsData = { - body?: never - path?: never - query?: never - url: '/api/secrets' -} - -export type ListSecretsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Service unavailable - feature is disabled - */ - 503: ErrorResponse -} - -export type ListSecretsError = ListSecretsErrors[keyof ListSecretsErrors] +export type DeleteSecretResponse = DeleteSecretResponses[keyof DeleteSecretResponses]; -export type ListSecretsResponses = { - /** - * Success - */ - 200: SecretListResponse -} - -export type ListSecretsResponse = - ListSecretsResponses[keyof ListSecretsResponses] - -export type CreateSecretData = { - body: CreateSecretRequest - path?: never - query?: never - url: '/api/secrets' -} - -export type CreateSecretErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Conflict - secret with this name or provider already exists - */ - 409: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse -} - -export type CreateSecretError = CreateSecretErrors[keyof CreateSecretErrors] - -export type CreateSecretResponses = { - /** - * Secret created successfully - */ - 201: SecretResponse -} +export type GetSecretData = { + body?: never; + path: { + /** + * The UUID of the secret + */ + id: string; + }; + query?: never; + url: '/api/secrets/{id}'; +}; -export type CreateSecretResponse = - CreateSecretResponses[keyof CreateSecretResponses] +export type GetSecretErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Forbidden - user does not own this secret + */ + 403: ErrorResponse; + /** + * Secret not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse; +}; -export type ListSecretProvidersData = { - body?: never - path?: never - query?: never - url: '/api/secrets/providers' -} +export type GetSecretError = GetSecretErrors[keyof GetSecretErrors]; -export type ListSecretProvidersErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse -} - -export type ListSecretProvidersError = - ListSecretProvidersErrors[keyof ListSecretProvidersErrors] +export type GetSecretResponses = { + /** + * Success + */ + 200: SecretResponse; +}; -export type ListSecretProvidersResponses = { - /** - * Success - */ - 200: SecretProvidersResponse -} +export type GetSecretResponse = GetSecretResponses[keyof GetSecretResponses]; -export type ListSecretProvidersResponse = - ListSecretProvidersResponses[keyof ListSecretProvidersResponses] +export type UpdateSecretData = { + body: UpdateSecretRequest; + path: { + /** + * The UUID of the secret + */ + id: string; + }; + query?: never; + url: '/api/secrets/{id}'; +}; -export type DeleteSecretData = { - body?: never - path: { +export type UpdateSecretErrors = { /** - * The UUID of the secret + * Invalid request */ - id: string - } - query?: never - url: '/api/secrets/{id}' -} - -export type DeleteSecretErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - user does not own this secret - */ - 403: ErrorResponse - /** - * Secret not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse -} - -export type DeleteSecretError = DeleteSecretErrors[keyof DeleteSecretErrors] - -export type DeleteSecretResponses = { - /** - * Secret deleted successfully - */ - 204: void -} + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Forbidden - user does not own this secret + */ + 403: ErrorResponse; + /** + * Secret not found + */ + 404: ErrorResponse; + /** + * Conflict - a secret with this name already exists + */ + 409: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse; +}; -export type DeleteSecretResponse = - DeleteSecretResponses[keyof DeleteSecretResponses] +export type UpdateSecretError = UpdateSecretErrors[keyof UpdateSecretErrors]; -export type GetSecretData = { - body?: never - path: { +export type UpdateSecretResponses = { /** - * The UUID of the secret + * Secret updated successfully */ - id: string - } - query?: never - url: '/api/secrets/{id}' -} - -export type GetSecretErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - user does not own this secret - */ - 403: ErrorResponse - /** - * Secret not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse -} - -export type GetSecretError = GetSecretErrors[keyof GetSecretErrors] + 200: SecretResponse; +}; -export type GetSecretResponses = { - /** - * Success - */ - 200: SecretResponse -} +export type UpdateSecretResponse = UpdateSecretResponses[keyof UpdateSecretResponses]; -export type GetSecretResponse = GetSecretResponses[keyof GetSecretResponses] +export type ListSecretProvidersData = { + body?: never; + path?: never; + query?: never; + url: '/api/secrets/providers'; +}; -export type UpdateSecretData = { - body: UpdateSecretRequest - path: { +export type ListSecretProvidersErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * The UUID of the secret + * Service unavailable - secrets feature disabled */ - id: string - } - query?: never - url: '/api/secrets/{id}' -} + 503: ErrorResponse; +}; -export type UpdateSecretErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - user does not own this secret - */ - 403: ErrorResponse - /** - * Secret not found - */ - 404: ErrorResponse - /** - * Conflict - a secret with this name already exists - */ - 409: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse -} - -export type UpdateSecretError = UpdateSecretErrors[keyof UpdateSecretErrors] +export type ListSecretProvidersError = ListSecretProvidersErrors[keyof ListSecretProvidersErrors]; -export type UpdateSecretResponses = { - /** - * Secret updated successfully - */ - 200: SecretResponse -} +export type ListSecretProvidersResponses = { + /** + * Success + */ + 200: SecretProvidersResponse; +}; -export type UpdateSecretResponse = - UpdateSecretResponses[keyof UpdateSecretResponses] +export type ListSecretProvidersResponse = ListSecretProvidersResponses[keyof ListSecretProvidersResponses]; export type GetAllSettingsData = { - body?: never - path?: never - query?: never - url: '/api/settings' -} + body?: never; + path?: never; + query?: never; + url: '/api/settings'; +}; export type GetAllSettingsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse -} + /** + * Unauthorized + */ + 401: ErrorResponse; +}; -export type GetAllSettingsError = - GetAllSettingsErrors[keyof GetAllSettingsErrors] +export type GetAllSettingsError = GetAllSettingsErrors[keyof GetAllSettingsErrors]; export type GetAllSettingsResponses = { - /** - * User settings as key-value pairs - */ - 200: { - [key: string]: unknown - } -} + /** + * User settings as key-value pairs + */ + 200: { + [key: string]: unknown; + }; +}; -export type GetAllSettingsResponse = - GetAllSettingsResponses[keyof GetAllSettingsResponses] +export type GetAllSettingsResponse = GetAllSettingsResponses[keyof GetAllSettingsResponses]; export type UpdateMultipleSettingsData = { - /** - * Settings to update as key-value pairs - */ - body: { - [key: string]: unknown - } - path?: never - query?: never - url: '/api/settings' -} + /** + * Settings to update as key-value pairs + */ + body: { + [key: string]: unknown; + }; + path?: never; + query?: never; + url: '/api/settings'; +}; export type UpdateMultipleSettingsErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse -} - -export type UpdateMultipleSettingsError = - UpdateMultipleSettingsErrors[keyof UpdateMultipleSettingsErrors] + /** + * Invalid request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; +}; + +export type UpdateMultipleSettingsError = UpdateMultipleSettingsErrors[keyof UpdateMultipleSettingsErrors]; export type UpdateMultipleSettingsResponses = { - /** - * Updated user settings - */ - 200: { - [key: string]: unknown - } -} + /** + * Updated user settings + */ + 200: { + [key: string]: unknown; + }; +}; -export type UpdateMultipleSettingsResponse = - UpdateMultipleSettingsResponses[keyof UpdateMultipleSettingsResponses] +export type UpdateMultipleSettingsResponse = UpdateMultipleSettingsResponses[keyof UpdateMultipleSettingsResponses]; export type GetSettingByIdData = { - body?: never - path: { + body?: never; + path: { + /** + * Setting id to retrieve + */ + id: string; + }; + query?: never; + url: '/api/settings/{id}'; +}; + +export type GetSettingByIdErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * Setting id to retrieve + * Setting not found */ - id: string - } - query?: never - url: '/api/settings/{id}' -} + 404: ErrorResponse; +}; -export type GetSettingByIdErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Setting not found - */ - 404: ErrorResponse -} - -export type GetSettingByIdError = - GetSettingByIdErrors[keyof GetSettingByIdErrors] +export type GetSettingByIdError = GetSettingByIdErrors[keyof GetSettingByIdErrors]; export type GetSettingByIdResponses = { - /** - * Setting value response - */ - 200: { /** - * The setting value + * Setting value response */ - value?: unknown - } -} + 200: { + /** + * The setting value + */ + value?: unknown; + }; +}; -export type GetSettingByIdResponse = - GetSettingByIdResponses[keyof GetSettingByIdResponses] +export type GetSettingByIdResponse = GetSettingByIdResponses[keyof GetSettingByIdResponses]; export type UpdateSettingByIdData = { - /** - * New value for the setting - */ - body: unknown - path: { /** - * Setting id to update + * New value for the setting */ - id: string - } - query?: never - url: '/api/settings/{id}' -} + body: unknown; + path: { + /** + * Setting id to update + */ + id: string; + }; + query?: never; + url: '/api/settings/{id}'; +}; export type UpdateSettingByIdErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse -} - -export type UpdateSettingByIdError = - UpdateSettingByIdErrors[keyof UpdateSettingByIdErrors] + /** + * Invalid request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; +}; + +export type UpdateSettingByIdError = UpdateSettingByIdErrors[keyof UpdateSettingByIdErrors]; export type UpdateSettingByIdResponses = { - /** - * Updated setting value response - */ - 200: { /** - * The updated setting value + * Updated setting value response */ - value?: unknown - } -} - -export type UpdateSettingByIdResponse = - UpdateSettingByIdResponses[keyof UpdateSettingByIdResponses] + 200: { + /** + * The updated setting value + */ + value?: unknown; + }; +}; -export type SubmitFeedbackData = { - body: FeedbackRequest - path?: never - query?: never - url: '/api/feedback' -} +export type UpdateSettingByIdResponse = UpdateSettingByIdResponses[keyof UpdateSettingByIdResponses]; -export type SubmitFeedbackErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type SubmitFeedbackError = - SubmitFeedbackErrors[keyof SubmitFeedbackErrors] +export type GetSystemStatsData = { + body?: never; + path?: never; + query?: never; + url: '/api/system_stats'; +}; -export type SubmitFeedbackResponses = { - /** - * Feedback submitted successfully - */ - 201: FeedbackResponse -} +export type GetSystemStatsErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; +}; -export type SubmitFeedbackResponse = - SubmitFeedbackResponses[keyof SubmitFeedbackResponses] +export type GetSystemStatsError = GetSystemStatsErrors[keyof GetSystemStatsErrors]; -export type GetUserdataData = { - body?: never - path?: never - query?: { +export type GetSystemStatsResponses = { /** - * The directory to list files from. + * Success */ - dir?: string + 200: SystemStatsResponse; +}; + +export type GetSystemStatsResponse = GetSystemStatsResponses[keyof GetSystemStatsResponses]; + +export type ListTagsData = { + body?: never; + path?: never; + query?: { + /** + * Filter tags by prefix + */ + prefix?: string; + /** + * Maximum number of tags to return (1-1000) + */ + limit?: number; + /** + * Number of tags to skip for pagination + */ + offset?: number; + /** + * Sort order for tags + */ + order?: 'count_desc' | 'name_asc'; + /** + * Include tags with zero usage count + */ + include_zero?: boolean; + /** + * Whether to include public/shared assets when counting tags + */ + include_public?: boolean; + }; + url: '/api/tags'; +}; + +export type ListTagsErrors = { /** - * Whether to list files recursively. + * Invalid request parameters */ - recurse?: boolean + 400: ErrorResponse; /** - * Whether to split file information by type. + * Unauthorized */ - split?: boolean + 401: ErrorResponse; /** - * Whether to return full file metadata. + * Internal server error */ - full_info?: boolean - } - url: '/api/userdata' -} - -export type GetUserdataErrors = { - /** - * Bad request (e.g., invalid filename). - */ - 400: string - /** - * Unauthorized. - */ - 401: string - /** - * File not found or invalid path. - */ - 404: string - /** - * General error - */ - 500: string -} - -export type GetUserdataError = GetUserdataErrors[keyof GetUserdataErrors] + 500: ErrorResponse; +}; -export type GetUserdataResponses = { - /** - * A list of user data files. - */ - 200: GetUserDataResponseFull -} - -export type GetUserdataResponse = - GetUserdataResponses[keyof GetUserdataResponses] +export type ListTagsError = ListTagsErrors[keyof ListTagsErrors]; -export type GetUserdataFilePublishData = { - body?: never - path: { +export type ListTagsResponses = { /** - * The workflow file path within the user's data directory (URL encoded if necessary). + * Tags retrieved successfully */ - file: string - } - query?: never - url: '/api/userdata/{file}/publish' -} + 200: ListTagsResponse; +}; -export type GetUserdataFilePublishErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetUserdataFilePublishError = - GetUserdataFilePublishErrors[keyof GetUserdataFilePublishErrors] - -export type GetUserdataFilePublishResponses = { - /** - * Publish info (publish_time is null if never published) - */ - 200: WorkflowPublishInfo -} +export type ListTagsResponse2 = ListTagsResponses[keyof ListTagsResponses]; -export type GetUserdataFilePublishResponse = - GetUserdataFilePublishResponses[keyof GetUserdataFilePublishResponses] +export type ListTasksData = { + body?: never; + path?: never; + query?: { + /** + * Filter by task type name (exact match) + */ + task_name?: string; + /** + * Filter by idempotency key (exact match). For best performance, specify task_name as well. + */ + idempotency_key?: string; + /** + * Filter by one or more statuses (comma-separated) + */ + status?: string; + /** + * Filter tasks created after this timestamp (RFC3339 format) + */ + created_after?: string; + /** + * Filter tasks created before this timestamp (RFC3339 format) + */ + created_before?: string; + /** + * Sort direction (asc = ascending, desc = descending by create_time) + */ + sort_order?: 'asc' | 'desc'; + /** + * Pagination offset (0-based) + */ + offset?: number; + /** + * Maximum items per page (1-100) + */ + limit?: number; + }; + url: '/api/tasks'; +}; -export type PostUserdataFilePublishData = { - body: PublishWorkflowAssetsRequest - path: { +export type ListTasksErrors = { /** - * The workflow file path within the user's data directory (URL encoded if necessary). + * Unauthorized - Authentication required */ - file: string - } - query?: never - url: '/api/userdata/{file}/publish' -} - -export type PostUserdataFilePublishErrors = { - /** - * Bad request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type PostUserdataFilePublishError = - PostUserdataFilePublishErrors[keyof PostUserdataFilePublishErrors] - -export type PostUserdataFilePublishResponses = { - /** - * Workflow published - */ - 200: WorkflowPublishInfo -} - -export type PostUserdataFilePublishResponse = - PostUserdataFilePublishResponses[keyof PostUserdataFilePublishResponses] - -export type DeleteUserdataFileData = { - body?: never - path: { + 401: ErrorResponse; /** - * The file path to delete (URL encoded if necessary). + * Validation error - Invalid filter values */ - file: string - } - query?: never - url: '/api/userdata/{file}' -} - -export type DeleteUserdataFileErrors = { - /** - * Unauthorized. - */ - 401: string - /** - * File not found. - */ - 404: string - /** - * Internal server error. - */ - 500: string -} - -export type DeleteUserdataFileError = - DeleteUserdataFileErrors[keyof DeleteUserdataFileErrors] - -export type DeleteUserdataFileResponses = { - /** - * File deleted successfully (No Content). - */ - 204: void -} + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type DeleteUserdataFileResponse = - DeleteUserdataFileResponses[keyof DeleteUserdataFileResponses] +export type ListTasksError = ListTasksErrors[keyof ListTasksErrors]; -export type GetUserdataFileData = { - body?: never - path: { +export type ListTasksResponses = { /** - * The filename of the user data to retrieve. + * Success - Tasks retrieved */ - file: string - } - query?: never - url: '/api/userdata/{file}' -} - -export type GetUserdataFileErrors = { - /** - * Bad request (e.g., invalid filename). - */ - 400: string - /** - * Unauthorized. - */ - 401: string - /** - * File not found or invalid path. - */ - 404: string - /** - * General error - */ - 500: string -} - -export type GetUserdataFileError = - GetUserdataFileErrors[keyof GetUserdataFileErrors] + 200: TasksListResponse; +}; -export type GetUserdataFileResponses = { - /** - * Successfully retrieved the file. - */ - 200: Blob | File -} +export type ListTasksResponse = ListTasksResponses[keyof ListTasksResponses]; -export type GetUserdataFileResponse = - GetUserdataFileResponses[keyof GetUserdataFileResponses] +export type GetTaskData = { + body?: never; + path: { + /** + * Task identifier (UUID) + */ + task_id: string; + }; + query?: never; + url: '/api/tasks/{task_id}'; +}; -export type PostUserdataFileData = { - body: Blob | File - path: { +export type GetTaskErrors = { /** - * The target file path (URL encoded if necessary). + * Unauthorized - Authentication required */ - file: string - } - query?: { + 401: ErrorResponse; /** - * If "false", prevents overwriting existing files. Defaults to "true". + * Task not found (also returned for ownership failures to avoid leaking task existence) */ - overwrite?: 'true' | 'false' + 404: ErrorResponse; /** - * If "true", returns detailed file info; if "false", returns only the relative path. + * Internal server error */ - full_info?: 'true' | 'false' - } - url: '/api/userdata/{file}' -} + 500: ErrorResponse; +}; -export type PostUserdataFileErrors = { - /** - * Missing or invalid 'file' parameter. - */ - 400: string - /** - * Unauthorized. - */ - 401: string - /** - * The requested path is not allowed. - */ - 403: string - /** - * File already exists and overwrite is set to false. - */ - 409: string - /** - * General error - */ - 500: string -} - -export type PostUserdataFileError = - PostUserdataFileErrors[keyof PostUserdataFileErrors] +export type GetTaskError = GetTaskErrors[keyof GetTaskErrors]; -export type PostUserdataFileResponses = { - /** - * File uploaded successfully. - */ - 200: UserDataResponseFull -} +export type GetTaskResponses = { + /** + * Success - Task details retrieved + */ + 200: TaskResponse; +}; -export type PostUserdataFileResponse = - PostUserdataFileResponses[keyof PostUserdataFileResponses] +export type GetTaskResponse = GetTaskResponses[keyof GetTaskResponses]; -export type MoveUserdataFileData = { - body?: never - path: { +export type UploadImageData = { + body: { + /** + * The image file to upload + */ + image: Blob | File; + /** + * Whether to overwrite existing file (true/false) + */ + overwrite?: string; + /** + * Optional subfolder path + */ + subfolder?: string; + /** + * Upload type (defaults to "output") + */ + type?: string; + }; + path?: never; + query?: never; + url: '/api/upload/image'; +}; + +export type UploadImageErrors = { /** - * The source file path (URL encoded if necessary). + * Bad request */ - file: string + 400: ErrorResponse; /** - * The destination file path (URL encoded if necessary). + * Unauthorized */ - dest: string - } - query?: { + 401: ErrorResponse; /** - * If "false", prevents overwriting existing files. Defaults to "true". + * Internal server error */ - overwrite?: 'true' | 'false' - } - url: '/api/userdata/{file}/move/{dest}' -} + 500: ErrorResponse; +}; -export type MoveUserdataFileErrors = { - /** - * Missing or invalid parameters. - */ - 400: string - /** - * Unauthorized. - */ - 401: string - /** - * Source file not found. - */ - 404: string - /** - * Destination file already exists and overwrite is set to false. - */ - 409: string - /** - * General error - */ - 500: string -} - -export type MoveUserdataFileError = - MoveUserdataFileErrors[keyof MoveUserdataFileErrors] +export type UploadImageError = UploadImageErrors[keyof UploadImageErrors]; -export type MoveUserdataFileResponses = { - /** - * File moved successfully. - */ - 200: UserDataResponseFull -} +export type UploadImageResponses = { + /** + * Image uploaded successfully + */ + 200: { + /** + * Filename of the uploaded image + */ + name?: string; + /** + * Subfolder path where image was saved + */ + subfolder?: string; + /** + * Type of upload (e.g., "output") + */ + type?: string; + }; +}; + +export type UploadImageResponse = UploadImageResponses[keyof UploadImageResponses]; -export type MoveUserdataFileResponse = - MoveUserdataFileResponses[keyof MoveUserdataFileResponses] +export type UploadMaskData = { + body: { + /** + * The mask image file to upload + */ + image: Blob | File; + /** + * JSON string containing reference to the original image + */ + original_ref: string; + }; + path?: never; + query?: never; + url: '/api/upload/mask'; +}; -export type UploadImageData = { - body: { - /** - * The image file to upload - */ - image: Blob | File +export type UploadMaskErrors = { /** - * Whether to overwrite existing file (true/false) + * Bad request */ - overwrite?: string + 400: ErrorResponse; /** - * Optional subfolder path + * Unauthorized */ - subfolder?: string + 401: ErrorResponse; /** - * Upload type (defaults to "output") + * Internal server error */ - type?: string - } - path?: never - query?: never - url: '/api/upload/image' -} + 500: ErrorResponse; +}; -export type UploadImageErrors = { - /** - * Bad request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UploadImageError = UploadImageErrors[keyof UploadImageErrors] +export type UploadMaskError = UploadMaskErrors[keyof UploadMaskErrors]; -export type UploadImageResponses = { - /** - * Image uploaded successfully - */ - 200: { - /** - * Filename of the uploaded image - */ - name?: string - /** - * Subfolder path where image was saved - */ - subfolder?: string +export type UploadMaskResponses = { /** - * Type of upload (e.g., "output") - */ - type?: string - } -} + * Mask uploaded successfully + */ + 200: { + /** + * Filename of the uploaded mask + */ + name?: string; + /** + * Subfolder path where mask was saved + */ + subfolder?: string; + /** + * Type of upload (e.g., "output") + */ + type?: string; + }; +}; + +export type UploadMaskResponse = UploadMaskResponses[keyof UploadMaskResponses]; -export type UploadImageResponse = - UploadImageResponses[keyof UploadImageResponses] +export type GetUserData = { + body?: never; + path?: never; + query?: never; + url: '/api/user'; +}; -export type UploadMaskData = { - body: { +export type GetUserErrors = { /** - * The mask image file to upload + * Unauthorized */ - image: Blob | File + 401: ErrorResponse; +}; + +export type GetUserError = GetUserErrors[keyof GetUserErrors]; + +export type GetUserResponses = { /** - * JSON string containing reference to the original image + * Success */ - original_ref: string - } - path?: never - query?: never - url: '/api/upload/mask' -} + 200: UserResponse; +}; -export type UploadMaskErrors = { - /** - * Bad request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UploadMaskError = UploadMaskErrors[keyof UploadMaskErrors] +export type GetUserResponse = GetUserResponses[keyof GetUserResponses]; -export type UploadMaskResponses = { - /** - * Mask uploaded successfully - */ - 200: { +export type GetUserdataData = { + body?: never; + path?: never; + query?: { + /** + * The directory to list files from. + */ + dir?: string; + /** + * Whether to list files recursively. + */ + recurse?: boolean; + /** + * Whether to split file information by type. + */ + split?: boolean; + /** + * Whether to return full file metadata. + */ + full_info?: boolean; + }; + url: '/api/userdata'; +}; + +export type GetUserdataErrors = { /** - * Filename of the uploaded mask + * Bad request (e.g., invalid filename). */ - name?: string + 400: string; /** - * Subfolder path where mask was saved + * Unauthorized. */ - subfolder?: string + 401: string; /** - * Type of upload (e.g., "output") + * File not found or invalid path. */ - type?: string - } -} - -export type UploadMaskResponse = UploadMaskResponses[keyof UploadMaskResponses] - -export type GetLogsData = { - body?: never - path?: never - query?: never - url: '/api/logs' -} - -export type GetLogsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse -} - -export type GetLogsError = GetLogsErrors[keyof GetLogsErrors] - -export type GetLogsResponses = { - /** - * Success - */ - 200: LogsResponse -} - -export type GetLogsResponse = GetLogsResponses[keyof GetLogsResponses] - -export type GetSystemStatsData = { - body?: never - path?: never - query?: never - url: '/api/system_stats' -} - -export type GetSystemStatsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse -} - -export type GetSystemStatsError = - GetSystemStatsErrors[keyof GetSystemStatsErrors] - -export type GetSystemStatsResponses = { - /** - * Success - */ - 200: SystemStatsResponse -} - -export type GetSystemStatsResponse = - GetSystemStatsResponses[keyof GetSystemStatsResponses] - -export type DeleteSessionData = { - body?: never - path?: never - query?: never - url: '/api/auth/session' -} - -export type DeleteSessionErrors = { - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type DeleteSessionError = DeleteSessionErrors[keyof DeleteSessionErrors] - -export type DeleteSessionResponses = { - /** - * Session deleted successfully - */ - 200: DeleteSessionResponse -} - -export type DeleteSessionResponse2 = - DeleteSessionResponses[keyof DeleteSessionResponses] - -export type CreateSessionData = { - body?: never - path?: never - query?: never - url: '/api/auth/session' -} - -export type CreateSessionErrors = { - /** - * Bad request - Invalid or old ID token - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateSessionError = CreateSessionErrors[keyof CreateSessionErrors] - -export type CreateSessionResponses = { - /** - * Session created successfully - */ - 200: CreateSessionResponse -} - -export type CreateSessionResponse2 = - CreateSessionResponses[keyof CreateSessionResponses] - -export type ExchangeTokenData = { - body?: ExchangeTokenRequest - path?: never - query?: never - url: '/api/auth/token' -} - -export type ExchangeTokenErrors = { - /** - * Invalid or expired Firebase JWT - */ - 401: ErrorResponse - /** - * Workspace not found or user not a member - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ExchangeTokenError = ExchangeTokenErrors[keyof ExchangeTokenErrors] - -export type ExchangeTokenResponses = { - /** - * Token exchanged successfully - */ - 200: ExchangeTokenResponse -} - -export type ExchangeTokenResponse2 = - ExchangeTokenResponses[keyof ExchangeTokenResponses] - -export type CreateDesktopLoginCodeData = { - body: DesktopLoginCodeCreateRequest - path?: never - query?: never - url: '/api/auth/desktop-login-codes' -} + 404: string; + /** + * General error + */ + 500: string; +}; -export type CreateDesktopLoginCodeErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Service unavailable - login code store not available - */ - 503: ErrorResponse -} - -export type CreateDesktopLoginCodeError = - CreateDesktopLoginCodeErrors[keyof CreateDesktopLoginCodeErrors] +export type GetUserdataError = GetUserdataErrors[keyof GetUserdataErrors]; -export type CreateDesktopLoginCodeResponses = { - /** - * Login code created - */ - 201: DesktopLoginCodeCreateResponse -} +export type GetUserdataResponses = { + /** + * A list of user data files. + */ + 200: GetUserDataResponseFull; +}; -export type CreateDesktopLoginCodeResponse = - CreateDesktopLoginCodeResponses[keyof CreateDesktopLoginCodeResponses] +export type GetUserdataResponse = GetUserdataResponses[keyof GetUserdataResponses]; -export type RedeemDesktopLoginCodeData = { - body: DesktopLoginCodeRedeemRequest - path?: never - query?: never - url: '/api/auth/desktop-login-codes/redeem' -} +export type DeleteUserdataFileData = { + body?: never; + path: { + /** + * The file path to delete (URL encoded if necessary). + */ + file: string; + }; + query?: never; + url: '/api/userdata/{file}'; +}; -export type RedeemDesktopLoginCodeErrors = { - /** - * Unauthorized - authentication required - */ - 401: ErrorResponse - /** - * Unknown or expired code - */ - 404: ErrorResponse - /** - * Code already redeemed by a different user - */ - 409: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Service unavailable - login code store not available - */ - 503: ErrorResponse -} - -export type RedeemDesktopLoginCodeError = - RedeemDesktopLoginCodeErrors[keyof RedeemDesktopLoginCodeErrors] +export type DeleteUserdataFileErrors = { + /** + * Unauthorized. + */ + 401: string; + /** + * File not found. + */ + 404: string; + /** + * Internal server error. + */ + 500: string; +}; -export type RedeemDesktopLoginCodeResponses = { - /** - * Code redeemed (or already redeemed by the same user) - */ - 200: DesktopLoginCodeRedeemResponse -} +export type DeleteUserdataFileError = DeleteUserdataFileErrors[keyof DeleteUserdataFileErrors]; -export type RedeemDesktopLoginCodeResponse = - RedeemDesktopLoginCodeResponses[keyof RedeemDesktopLoginCodeResponses] +export type DeleteUserdataFileResponses = { + /** + * File deleted successfully (No Content). + */ + 204: void; +}; -export type ExchangeDesktopLoginCodeData = { - body: DesktopLoginCodeExchangeRequest - path?: never - query?: never - url: '/api/auth/desktop-login-codes/exchange' -} +export type DeleteUserdataFileResponse = DeleteUserdataFileResponses[keyof DeleteUserdataFileResponses]; -export type ExchangeDesktopLoginCodeErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Code verifier does not match the challenge - */ - 403: ErrorResponse - /** - * Unknown, expired, or already-consumed code - */ - 404: ErrorResponse - /** - * Service unavailable - login code store or token minting not available - */ - 503: ErrorResponse -} - -export type ExchangeDesktopLoginCodeError = - ExchangeDesktopLoginCodeErrors[keyof ExchangeDesktopLoginCodeErrors] +export type GetUserdataFileData = { + body?: never; + path: { + /** + * The filename of the user data to retrieve. + */ + file: string; + }; + query?: never; + url: '/api/userdata/{file}'; +}; -export type ExchangeDesktopLoginCodeResponses = { - /** - * Pending (not yet redeemed) or complete with a custom token - */ - 200: DesktopLoginCodeExchangeResponse -} +export type GetUserdataFileErrors = { + /** + * Bad request (e.g., invalid filename). + */ + 400: string; + /** + * Unauthorized. + */ + 401: string; + /** + * File not found or invalid path. + */ + 404: string; + /** + * General error + */ + 500: string; +}; -export type ExchangeDesktopLoginCodeResponse = - ExchangeDesktopLoginCodeResponses[keyof ExchangeDesktopLoginCodeResponses] +export type GetUserdataFileError = GetUserdataFileErrors[keyof GetUserdataFileErrors]; -export type GetJwksData = { - body?: never - path?: never - query?: never - url: '/.well-known/jwks.json' -} +export type GetUserdataFileResponses = { + /** + * Successfully retrieved the file. + */ + 200: Blob | File; +}; -export type GetJwksResponses = { - /** - * JWKS response - */ - 200: JwksResponse -} +export type GetUserdataFileResponse = GetUserdataFileResponses[keyof GetUserdataFileResponses]; -export type GetJwksResponse = GetJwksResponses[keyof GetJwksResponses] +export type PostUserdataFileData = { + body: Blob | File; + path: { + /** + * The target file path (URL encoded if necessary). + */ + file: string; + }; + query?: { + /** + * If "false", prevents overwriting existing files. Defaults to "true". + */ + overwrite?: 'true' | 'false'; + /** + * If "true", returns detailed file info; if "false", returns only the relative path. + */ + full_info?: 'true' | 'false'; + }; + url: '/api/userdata/{file}'; +}; -export type GetOAuthAuthorizationServerData = { - body?: never - path?: never - query?: never - url: '/.well-known/oauth-authorization-server' -} +export type PostUserdataFileErrors = { + /** + * Missing or invalid 'file' parameter. + */ + 400: string; + /** + * Unauthorized. + */ + 401: string; + /** + * The requested path is not allowed. + */ + 403: string; + /** + * File already exists and overwrite is set to false. + */ + 409: string; + /** + * General error + */ + 500: string; +}; -export type GetOAuthAuthorizationServerErrors = { - /** - * OAuth disabled - */ - 404: ErrorResponse -} +export type PostUserdataFileError = PostUserdataFileErrors[keyof PostUserdataFileErrors]; -export type GetOAuthAuthorizationServerError = - GetOAuthAuthorizationServerErrors[keyof GetOAuthAuthorizationServerErrors] +export type PostUserdataFileResponses = { + /** + * File uploaded successfully. + */ + 200: UserDataResponseFull; +}; -export type GetOAuthAuthorizationServerResponses = { - /** - * Authorization-server metadata - */ - 200: OAuthAuthorizationServerMetadata -} +export type PostUserdataFileResponse = PostUserdataFileResponses[keyof PostUserdataFileResponses]; -export type GetOAuthAuthorizationServerResponse = - GetOAuthAuthorizationServerResponses[keyof GetOAuthAuthorizationServerResponses] +export type MoveUserdataFileData = { + body?: never; + path: { + /** + * The source file path (URL encoded if necessary). + */ + file: string; + /** + * The destination file path (URL encoded if necessary). + */ + dest: string; + }; + query?: { + /** + * If "false", prevents overwriting existing files. Defaults to "true". + */ + overwrite?: 'true' | 'false'; + }; + url: '/api/userdata/{file}/move/{dest}'; +}; -export type GetOAuthProtectedResourceData = { - body?: never - path?: never - query?: never - url: '/.well-known/oauth-protected-resource' -} +export type MoveUserdataFileErrors = { + /** + * Missing or invalid parameters. + */ + 400: string; + /** + * Unauthorized. + */ + 401: string; + /** + * Source file not found. + */ + 404: string; + /** + * Destination file already exists and overwrite is set to false. + */ + 409: string; + /** + * General error + */ + 500: string; +}; -export type GetOAuthProtectedResourceErrors = { - /** - * OAuth disabled or no active resource configured - */ - 404: ErrorResponse -} +export type MoveUserdataFileError = MoveUserdataFileErrors[keyof MoveUserdataFileErrors]; -export type GetOAuthProtectedResourceError = - GetOAuthProtectedResourceErrors[keyof GetOAuthProtectedResourceErrors] +export type MoveUserdataFileResponses = { + /** + * File moved successfully. + */ + 200: UserDataResponseFull; +}; -export type GetOAuthProtectedResourceResponses = { - /** - * Protected-resource metadata - */ - 200: OAuthProtectedResourceMetadata -} +export type MoveUserdataFileResponse = MoveUserdataFileResponses[keyof MoveUserdataFileResponses]; -export type GetOAuthProtectedResourceResponse = - GetOAuthProtectedResourceResponses[keyof GetOAuthProtectedResourceResponses] +export type GetUserdataFilePublishData = { + body?: never; + path: { + /** + * The workflow file path within the user's data directory (URL encoded if necessary). + */ + file: string; + }; + query?: never; + url: '/api/userdata/{file}/publish'; +}; -export type GetOAuthProtectedResourceByPathData = { - body?: never - path: { +export type GetUserdataFilePublishErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; /** - * Single-segment resource path without its leading slash (e.g. "mcp"). + * Internal server error */ - resourcePath: string - } - query?: never - url: '/.well-known/oauth-protected-resource/{resourcePath}' -} + 500: ErrorResponse; +}; -export type GetOAuthProtectedResourceByPathErrors = { - /** - * OAuth disabled, or no active resource at this path - */ - 404: ErrorResponse -} +export type GetUserdataFilePublishError = GetUserdataFilePublishErrors[keyof GetUserdataFilePublishErrors]; -export type GetOAuthProtectedResourceByPathError = - GetOAuthProtectedResourceByPathErrors[keyof GetOAuthProtectedResourceByPathErrors] +export type GetUserdataFilePublishResponses = { + /** + * Publish info (publish_time is null if never published) + */ + 200: WorkflowPublishInfo; +}; -export type GetOAuthProtectedResourceByPathResponses = { - /** - * Protected-resource metadata - */ - 200: OAuthProtectedResourceMetadata -} +export type GetUserdataFilePublishResponse = GetUserdataFilePublishResponses[keyof GetUserdataFilePublishResponses]; -export type GetOAuthProtectedResourceByPathResponse = - GetOAuthProtectedResourceByPathResponses[keyof GetOAuthProtectedResourceByPathResponses] +export type PostUserdataFilePublishData = { + body: PublishWorkflowAssetsRequest; + path: { + /** + * The workflow file path within the user's data directory (URL encoded if necessary). + */ + file: string; + }; + query?: never; + url: '/api/userdata/{file}/publish'; +}; -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. - * +export type PostUserdataFilePublishErrors = { + /** + * Bad request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; + /** + * Internal server error */ - state?: string - code_challenge?: string - code_challenge_method?: string - resource?: string - oauth_request_id?: string - } - url: '/oauth/authorize' -} + 500: ErrorResponse; +}; -export type GetOAuthAuthorizeErrors = { - /** - * Invalid authorize request (pre-redirect failure — unknown client, redirect mismatch, malformed params). Content-negotiated; browser navigations (Accept includes text/html without application/json) receive a self-contained HTML error page instead of JSON. - */ - 400: ErrorResponse - /** - * OAuth disabled - */ - 404: ErrorResponse -} - -export type GetOAuthAuthorizeError = - GetOAuthAuthorizeErrors[keyof GetOAuthAuthorizeErrors] +export type PostUserdataFilePublishError = PostUserdataFilePublishErrors[keyof PostUserdataFilePublishErrors]; -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 PostUserdataFilePublishResponses = { + /** + * Workflow published + */ + 200: WorkflowPublishInfo; +}; -export type GetOAuthAuthorizeResponse = - GetOAuthAuthorizeResponses[keyof GetOAuthAuthorizeResponses] +export type PostUserdataFilePublishResponse = PostUserdataFilePublishResponses[keyof PostUserdataFilePublishResponses]; -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 GetUsersInfoData = { + body?: never; + path?: never; + query?: never; + url: '/api/users'; +}; -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 GetUsersInfoErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; +}; -export type PostOAuthAuthorizeResponses = { - /** - * Redirect URL for the frontend to navigate to (allow → with code+state; deny → with error+state) - */ - 200: OAuthAuthorizeRedirectResponse -} +export type GetUsersInfoError = GetUsersInfoErrors[keyof GetUsersInfoErrors]; -export type PostOAuthAuthorizeResponse = - PostOAuthAuthorizeResponses[keyof PostOAuthAuthorizeResponses] +export type GetUsersInfoResponses = { + /** + * Userdata storage information + */ + 200: { + /** + * Whether user data has been migrated (always true in cloud) + */ + migrated: boolean; + /** + * Where user data is stored (always "server" in cloud) + */ + storage: string; + }; +}; -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 GetUsersInfoResponse = GetUsersInfoResponses[keyof GetUsersInfoResponses]; -export type PostOAuthTokenErrors = { - /** - * RFC 6749 §5.2 error - */ - 400: OAuthTokenError - /** - * OAuth disabled - */ - 404: ErrorResponse -} - -export type PostOAuthTokenError = - PostOAuthTokenErrors[keyof PostOAuthTokenErrors] +export type GetLegacyUserdataV2Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v2/userdata'; +}; -export type PostOAuthTokenResponses = { - /** - * New token pair - */ - 200: OAuthTokenResponse -} +export type GetLegacyUserdataV2Errors = { + /** + * Not Found — use /api/userdata instead + */ + 404: unknown; +}; -export type PostOAuthTokenResponse = - PostOAuthTokenResponses[keyof PostOAuthTokenResponses] +export type GetVhsQueryVideoData = { + body?: never; + path?: never; + query: { + /** + * Name of the video file to query + */ + filename: string; + }; + url: '/api/vhs/queryvideo'; +}; -export type PostOAuthRegisterData = { - body: OAuthRegisterRequest - path?: never - query?: never - url: '/oauth/register' -} +export type GetVhsQueryVideoErrors = { + /** + * Missing required query parameter. Produced by the oapi-codegen + * wrapper via echo.NewHTTPError; the custom Echo HTTPErrorHandler + * normalizes it to the standard ErrorResponse {code, message} shape + * (BE-1178). + * + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; +}; -export type PostOAuthRegisterErrors = { - /** - * Bad request. Two shapes possible: `OAuthRegisterError` (RFC 7591 §3.2.2, emitted by the handler for invalid client metadata, reserved client_name, etc.) OR `ErrorResponse` (emitted by the strict-server binding layer when the request body fails OpenAPI-schema validation — malformed JSON, missing required fields, `additionalProperties: false` violations — normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler, BE-1178). - * - */ - 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 GetVhsQueryVideoError = GetVhsQueryVideoErrors[keyof GetVhsQueryVideoErrors]; -export type PostOAuthRegisterResponses = { - /** - * Registered. Body echoes the metadata RFC 7591 §3.2.1 requires. - */ - 201: OAuthRegisterResponse -} +export type GetVhsQueryVideoResponses = { + /** + * Video metadata + */ + 200: { + /** + * Source video metadata + */ + source: { + /** + * Duration in seconds + */ + duration: number; + /** + * Frames per second + */ + fps: number; + /** + * Total frame count + */ + frames: number; + /** + * [width, height] in pixels + */ + size: [ + number, + number + ]; + }; + }; +}; + +export type GetVhsQueryVideoResponse = GetVhsQueryVideoResponses[keyof GetVhsQueryVideoResponses]; -export type PostOAuthRegisterResponse = - PostOAuthRegisterResponses[keyof PostOAuthRegisterResponses] +export type GetVhsViewAudioData = { + body?: never; + path?: never; + query: { + /** + * Name of the audio file to view + */ + filename: string; + /** + * Type of file (e.g., output, input, temp) + */ + type?: string; + /** + * Subfolder path where the file is located + */ + subfolder?: string; + }; + url: '/api/vhs/viewaudio'; +}; -export type ListWorkspacesData = { - body?: never - path?: never - query?: never - url: '/api/workspaces' -} +export type GetVhsViewAudioErrors = { + /** + * Unauthorized + */ + 401: unknown; +}; -export type ListWorkspacesErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Feature not enabled for user - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListWorkspacesError = - ListWorkspacesErrors[keyof ListWorkspacesErrors] +export type GetVhsViewAudioResponses = { + /** + * Audio stream + */ + 200: unknown; +}; -export type ListWorkspacesResponses = { - /** - * List of workspaces - */ - 200: ListWorkspacesResponse -} +export type GetVhsViewVideoData = { + body?: never; + path?: never; + query: { + /** + * Name of the video file to view + */ + filename: string; + /** + * Type of file (e.g., output, input, temp) + */ + type?: string; + /** + * Subfolder path where the file is located + */ + subfolder?: string; + }; + url: '/api/vhs/viewvideo'; +}; -export type ListWorkspacesResponse2 = - ListWorkspacesResponses[keyof ListWorkspacesResponses] +export type GetVhsViewVideoErrors = { + /** + * Unauthorized + */ + 401: unknown; +}; -export type CreateWorkspaceData = { - body: CreateWorkspaceRequest - path?: never - query?: never - url: '/api/workspaces' -} +export type GetVhsViewVideoResponses = { + /** + * Video stream + */ + 200: unknown; +}; -export type CreateWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Feature not enabled for user - */ - 404: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateWorkspaceError = - CreateWorkspaceErrors[keyof CreateWorkspaceErrors] +export type ViewFileData = { + body?: never; + path?: never; + query: { + /** + * Name of the file to view + */ + filename: string; + /** + * Subfolder path where the file is located + */ + subfolder?: string; + /** + * Type of file (e.g., output, input, temp) + */ + type?: string; + /** + * Full path to the file (used for temp files) + */ + fullpath?: string; + /** + * Format of the file + */ + format?: string; + /** + * Frame rate for video files + */ + frame_rate?: number; + /** + * Workflow identifier + */ + workflow?: string; + /** + * Timestamp parameter + */ + timestamp?: number; + /** + * Image channel to extract from PNG images. + * - 'rgb': Return only RGB channels (alpha set to fully opaque) + * - 'a' or 'alpha': Return alpha channel as grayscale image + * - If not specified, return original image unchanged via redirect + * + */ + channel?: string; + /** + * Maximum dimension (width or height) to resize the image to, preserving aspect ratio. + * The image is fit within a res x res box. Returns a JPEG thumbnail. + * Only applies to raster image files (PNG, JPEG, WebP, GIF). + * + */ + res?: number; + }; + url: '/api/view'; +}; -export type CreateWorkspaceResponses = { - /** - * Workspace created - */ - 201: Workspace -} +export type ViewFileErrors = { + /** + * Invalid request parameters + */ + 400: ErrorResponse; + /** + * File not found or unauthorized + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type CreateWorkspaceResponse = - CreateWorkspaceResponses[keyof CreateWorkspaceResponses] +export type ViewFileError = ViewFileErrors[keyof ViewFileErrors]; -export type DeleteWorkspaceData = { - body?: never - path: { +export type ViewFileResponses = { /** - * Workspace ID (w-{uuid} format) + * Resized JPEG thumbnail (returned when res parameter is used) */ - id: string - } - query?: never - url: '/api/workspaces/{id}' -} + 200: Blob | File; +}; -export type DeleteWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Owner role required or cannot delete personal workspace - */ - 403: ErrorResponse - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type DeleteWorkspaceError = - DeleteWorkspaceErrors[keyof DeleteWorkspaceErrors] - -export type DeleteWorkspaceResponses = { - /** - * Workspace deleted - */ - 204: void -} +export type ViewFileResponse = ViewFileResponses[keyof ViewFileResponses]; -export type DeleteWorkspaceResponse = - DeleteWorkspaceResponses[keyof DeleteWorkspaceResponses] +export type GetLegacyViewMetadataData = { + body?: never; + path: { + folder_name: string; + }; + query?: never; + url: '/api/view_metadata/{folder_name}'; +}; -export type GetWorkspaceData = { - body?: never - path: { +export type GetLegacyViewMetadataErrors = { /** - * Workspace ID (w-{uuid} format) + * Not Found — use /api/experiment/models instead */ - id: string - } - query?: never - url: '/api/workspaces/{id}' -} - -export type GetWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workspace not found or user not a member - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetWorkspaceError = GetWorkspaceErrors[keyof GetWorkspaceErrors] + 404: unknown; +}; -export type GetWorkspaceResponses = { - /** - * Workspace details - */ - 200: Workspace -} +export type GetApiViewVideoAliasData = { + body?: never; + path?: never; + query: { + /** + * Name of the file to view (see `/api/view` for the full handler contract) + */ + filename: string; + }; + url: '/api/viewvideo'; +}; -export type GetWorkspaceResponse = - GetWorkspaceResponses[keyof GetWorkspaceResponses] +export type GetApiViewVideoAliasErrors = { + /** + * Unauthorized + */ + 401: unknown; +}; -export type UpdateWorkspaceData = { - body: UpdateWorkspaceRequest - path: { +export type GetApiViewVideoAliasResponses = { /** - * Workspace ID (w-{uuid} format) + * File stream */ - id: string - } - query?: never - url: '/api/workspaces/{id}' -} + 200: unknown; +}; -export type UpdateWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Owner role required - */ - 403: ErrorResponse - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UpdateWorkspaceError = - UpdateWorkspaceErrors[keyof UpdateWorkspaceErrors] +export type GetWorkflowTemplatesData = { + body?: never; + path?: never; + query?: never; + url: '/api/workflow_templates'; +}; -export type UpdateWorkspaceResponses = { - /** - * Workspace updated - */ - 200: Workspace -} +export type GetWorkflowTemplatesResponses = { + /** + * Empty object for workflow templates + */ + 200: { + [key: string]: unknown; + }; +}; -export type UpdateWorkspaceResponse = - UpdateWorkspaceResponses[keyof UpdateWorkspaceResponses] +export type GetWorkflowTemplatesResponse = GetWorkflowTemplatesResponses[keyof GetWorkflowTemplatesResponses]; -export type ListWorkspaceMembersData = { - body?: never - path?: never - query?: { +export type ListWorkflowsData = { + body?: never; + path?: never; + query?: { + limit?: number; + offset?: number; + /** + * Search workflows by name (case-insensitive substring match) + */ + name?: string; + /** + * Filter by default view type + */ + default_view?: 'workflow' | 'app'; + /** + * Sort field + */ + sort?: 'create_time' | 'update_time' | 'name'; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + }; + url: '/api/workflows'; +}; + +export type ListWorkflowsErrors = { /** - * Pagination offset (0-based) + * Unauthorized */ - offset?: number + 401: ErrorResponse; /** - * Maximum number of members to return + * Internal server error */ - limit?: number - } - url: '/api/workspace/members' -} + 500: ErrorResponse; +}; -export type ListWorkspaceMembersErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not a member of this workspace - */ - 403: ErrorResponse - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListWorkspaceMembersError = - ListWorkspaceMembersErrors[keyof ListWorkspaceMembersErrors] +export type ListWorkflowsError = ListWorkflowsErrors[keyof ListWorkflowsErrors]; -export type ListWorkspaceMembersResponses = { - /** - * List of members - */ - 200: ListMembersResponse -} +export type ListWorkflowsResponses = { + /** + * Success + */ + 200: WorkflowListResponse; +}; -export type ListWorkspaceMembersResponse = - ListWorkspaceMembersResponses[keyof ListWorkspaceMembersResponses] +export type ListWorkflowsResponse = ListWorkflowsResponses[keyof ListWorkflowsResponses]; -export type ListWorkspaceInvitesData = { - body?: never - path?: never - query?: never - url: '/api/workspace/invites' -} +export type CreateWorkflowData = { + body: CreateWorkflowRequest; + path?: never; + query?: never; + url: '/api/workflows'; +}; -export type ListWorkspaceInvitesErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Owner role required - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListWorkspaceInvitesError = - ListWorkspaceInvitesErrors[keyof ListWorkspaceInvitesErrors] +export type CreateWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type ListWorkspaceInvitesResponses = { - /** - * List of pending invites - */ - 200: ListInvitesResponse -} +export type CreateWorkflowError = CreateWorkflowErrors[keyof CreateWorkflowErrors]; -export type ListWorkspaceInvitesResponse = - ListWorkspaceInvitesResponses[keyof ListWorkspaceInvitesResponses] +export type CreateWorkflowResponses = { + /** + * Workflow created successfully + */ + 201: WorkflowResponse; +}; -export type CreateWorkspaceInviteData = { - body: CreateInviteRequest - path?: never - query?: never - url: '/api/workspace/invites' -} +export type CreateWorkflowResponse = CreateWorkflowResponses[keyof CreateWorkflowResponses]; -export type CreateWorkspaceInviteErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Owner role required or personal workspace (invites not allowed) - */ - 403: ErrorResponse - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Invite already exists - */ - 409: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateWorkspaceInviteError = - CreateWorkspaceInviteErrors[keyof CreateWorkspaceInviteErrors] +export type DeleteWorkflowData = { + body?: never; + path: { + /** + * The UUID of the workflow to delete. + */ + workflow_id: string; + }; + query?: never; + url: '/api/workflows/{workflow_id}'; +}; -export type CreateWorkspaceInviteResponses = { - /** - * Invite created - */ - 201: PendingInvite -} +export type DeleteWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type CreateWorkspaceInviteResponse = - CreateWorkspaceInviteResponses[keyof CreateWorkspaceInviteResponses] +export type DeleteWorkflowError = DeleteWorkflowErrors[keyof DeleteWorkflowErrors]; -export type AcceptWorkspaceInviteData = { - body?: never - path: { +export type DeleteWorkflowResponses = { /** - * Invite token + * Workflow deleted successfully */ - token: string - } - query?: never - url: '/api/invites/{token}/accept' -} + 204: void; +}; -export type AcceptWorkspaceInviteErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Email does not match invite - */ - 403: ErrorResponse - /** - * Invite not found or expired - */ - 404: ErrorResponse - /** - * Already a member of this workspace - */ - 409: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type AcceptWorkspaceInviteError = - AcceptWorkspaceInviteErrors[keyof AcceptWorkspaceInviteErrors] +export type DeleteWorkflowResponse = DeleteWorkflowResponses[keyof DeleteWorkflowResponses]; -export type AcceptWorkspaceInviteResponses = { - /** - * Invite accepted, user is now a member - */ - 200: AcceptInviteResponse -} +export type GetWorkflowData = { + body?: never; + path: { + /** + * The UUID of the workflow. + */ + workflow_id: string; + }; + query?: never; + url: '/api/workflows/{workflow_id}'; +}; -export type AcceptWorkspaceInviteResponse = - AcceptWorkspaceInviteResponses[keyof AcceptWorkspaceInviteResponses] +export type GetWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Forbidden + */ + 403: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type LeaveWorkspaceData = { - body?: never - path?: never - query?: never - url: '/api/workspace/leave' -} +export type GetWorkflowError = GetWorkflowErrors[keyof GetWorkflowErrors]; -export type LeaveWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Cannot leave as the only owner or cannot leave personal workspace - */ - 403: ErrorResponse - /** - * Workspace not found or not a member - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type LeaveWorkspaceError = - LeaveWorkspaceErrors[keyof LeaveWorkspaceErrors] +export type GetWorkflowResponses = { + /** + * Success + */ + 200: WorkflowResponse; +}; -export type LeaveWorkspaceResponses = { - /** - * Successfully left workspace - */ - 204: void -} +export type GetWorkflowResponse = GetWorkflowResponses[keyof GetWorkflowResponses]; -export type LeaveWorkspaceResponse = - LeaveWorkspaceResponses[keyof LeaveWorkspaceResponses] +export type UpdateWorkflowData = { + body: UpdateWorkflowRequest; + path: { + /** + * The UUID of the workflow to update. + */ + workflow_id: string; + }; + query?: never; + url: '/api/workflows/{workflow_id}'; +}; -export type RevokeWorkspaceInviteData = { - body?: never - path: { +export type UpdateWorkflowErrors = { /** - * Invite ID to revoke + * Unauthorized */ - inviteId: string - } - query?: never - url: '/api/workspace/invites/{inviteId}' -} - -export type RevokeWorkspaceInviteErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Owner role required - */ - 403: ErrorResponse - /** - * Workspace or invite not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type RevokeWorkspaceInviteError = - RevokeWorkspaceInviteErrors[keyof RevokeWorkspaceInviteErrors] - -export type RevokeWorkspaceInviteResponses = { - /** - * Invite revoked - */ - 204: void -} + 401: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type RevokeWorkspaceInviteResponse = - RevokeWorkspaceInviteResponses[keyof RevokeWorkspaceInviteResponses] +export type UpdateWorkflowError = UpdateWorkflowErrors[keyof UpdateWorkflowErrors]; -export type RemoveWorkspaceMemberData = { - body?: never - path: { +export type UpdateWorkflowResponses = { /** - * User ID to remove + * Success */ - userId: string - } - query?: never - url: '/api/workspace/members/{userId}' -} - -export type RemoveWorkspaceMemberErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Owner role required or cannot remove yourself - */ - 403: ErrorResponse - /** - * Workspace or member not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type RemoveWorkspaceMemberError = - RemoveWorkspaceMemberErrors[keyof RemoveWorkspaceMemberErrors] + 200: WorkflowResponse; +}; -export type RemoveWorkspaceMemberResponses = { - /** - * Member removed - */ - 204: void -} +export type UpdateWorkflowResponse = UpdateWorkflowResponses[keyof UpdateWorkflowResponses]; -export type RemoveWorkspaceMemberResponse = - RemoveWorkspaceMemberResponses[keyof RemoveWorkspaceMemberResponses] +export type GetWorkflowContentData = { + body?: never; + path: { + /** + * The UUID of the workflow whose content should be retrieved. + */ + workflow_id: string; + }; + query?: never; + url: '/api/workflows/{workflow_id}/content'; +}; -export type UpdateWorkspaceMemberRoleData = { - body: UpdateMemberRoleRequest - path: { +export type GetWorkflowContentErrors = { /** - * User ID whose role is being changed + * Unauthorized */ - userId: string - } - query?: never - url: '/api/workspace/members/{userId}' -} - -export type UpdateWorkspaceMemberRoleErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Owner role required, or the original owner cannot be demoted - */ - 403: ErrorResponse - /** - * Workspace or member not found - */ - 404: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UpdateWorkspaceMemberRoleError = - UpdateWorkspaceMemberRoleErrors[keyof UpdateWorkspaceMemberRoleErrors] - -export type UpdateWorkspaceMemberRoleResponses = { - /** - * Member role updated - */ - 200: Member -} + 401: ErrorResponse; + /** + * Forbidden + */ + 403: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type UpdateWorkspaceMemberRoleResponse = - UpdateWorkspaceMemberRoleResponses[keyof UpdateWorkspaceMemberRoleResponses] +export type GetWorkflowContentError = GetWorkflowContentErrors[keyof GetWorkflowContentErrors]; -export type ListWorkspaceApiKeysData = { - body?: never - path?: never - query?: never - url: '/api/workspace/api-keys' -} +export type GetWorkflowContentResponses = { + /** + * Success + */ + 200: WorkflowVersionContentResponse; +}; -export type ListWorkspaceApiKeysErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListWorkspaceApiKeysError = - ListWorkspaceApiKeysErrors[keyof ListWorkspaceApiKeysErrors] +export type GetWorkflowContentResponse = GetWorkflowContentResponses[keyof GetWorkflowContentResponses]; -export type ListWorkspaceApiKeysResponses = { - /** - * List of API keys - */ - 200: ListWorkspaceApiKeysResponse -} +export type ForkWorkflowData = { + body: ForkWorkflowRequest; + path: { + /** + * The UUID of the source workflow to fork from. + */ + workflow_id: string; + }; + query?: never; + url: '/api/workflows/{workflow_id}/fork'; +}; -export type ListWorkspaceApiKeysResponse2 = - ListWorkspaceApiKeysResponses[keyof ListWorkspaceApiKeysResponses] +export type ForkWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Forbidden + */ + 403: ErrorResponse; + /** + * Source workflow or version not found + */ + 404: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type CreateWorkspaceApiKeyData = { - body: CreateWorkspaceApiKeyRequest - path?: never - query?: never - url: '/api/workspace/api-keys' -} +export type ForkWorkflowError = ForkWorkflowErrors[keyof ForkWorkflowErrors]; -export type CreateWorkspaceApiKeyErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not a workspace member - */ - 403: ErrorResponse - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Key limit reached - */ - 429: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateWorkspaceApiKeyError = - CreateWorkspaceApiKeyErrors[keyof CreateWorkspaceApiKeyErrors] +export type ForkWorkflowResponses = { + /** + * Workflow forked successfully + */ + 201: WorkflowResponse; +}; -export type CreateWorkspaceApiKeyResponses = { - /** - * API key created (plaintext returned once) - */ - 201: CreateWorkspaceApiKeyResponse -} +export type ForkWorkflowResponse = ForkWorkflowResponses[keyof ForkWorkflowResponses]; -export type CreateWorkspaceApiKeyResponse2 = - CreateWorkspaceApiKeyResponses[keyof CreateWorkspaceApiKeyResponses] +export type CreateWorkflowVersionData = { + body: CreateWorkflowVersionRequest; + path: { + /** + * The UUID of the workflow to create a new version for. + */ + workflow_id: string; + }; + query?: never; + url: '/api/workflows/{workflow_id}/versions'; +}; -export type RevokeWorkspaceApiKeyData = { - body?: never - path: { +export type CreateWorkflowVersionErrors = { /** - * API key ID to revoke + * Unauthorized */ - id: string - } - query?: never - url: '/api/workspace/api-keys/{id}' -} - -export type RevokeWorkspaceApiKeyErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not authorized to revoke this key - */ - 403: ErrorResponse - /** - * API key not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type RevokeWorkspaceApiKeyError = - RevokeWorkspaceApiKeyErrors[keyof RevokeWorkspaceApiKeyErrors] - -export type RevokeWorkspaceApiKeyResponses = { - /** - * API key revoked - */ - 204: void -} + 401: ErrorResponse; + /** + * Forbidden - not the workflow owner + */ + 403: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; + /** + * Version conflict - base_version does not match latest + */ + 409: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type RevokeWorkspaceApiKeyResponse = - RevokeWorkspaceApiKeyResponses[keyof RevokeWorkspaceApiKeyResponses] +export type CreateWorkflowVersionError = CreateWorkflowVersionErrors[keyof CreateWorkflowVersionErrors]; -export type BulkRevokeWorkspaceMemberApiKeysData = { - body?: never - path: { +export type CreateWorkflowVersionResponses = { /** - * Firebase UID of the member whose keys to revoke (must be non-empty) + * Version created successfully */ - user_id: string - } - query?: never - url: '/api/workspace/members/{user_id}/api-keys' -} - -export type BulkRevokeWorkspaceMemberApiKeysErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not authorized (must be workspace owner) - */ - 403: ErrorResponse - /** - * Validation error (e.g. empty user_id) - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type BulkRevokeWorkspaceMemberApiKeysError = - BulkRevokeWorkspaceMemberApiKeysErrors[keyof BulkRevokeWorkspaceMemberApiKeysErrors] + 201: WorkflowVersionResponse; +}; -export type BulkRevokeWorkspaceMemberApiKeysResponses = { - /** - * Keys revoked successfully - */ - 200: BulkRevokeApiKeysResponse -} - -export type BulkRevokeWorkspaceMemberApiKeysResponse = - BulkRevokeWorkspaceMemberApiKeysResponses[keyof BulkRevokeWorkspaceMemberApiKeysResponses] - -export type VerifyWorkspaceApiKeyData = { - body: VerifyApiKeyRequest - path?: never - query?: { - /** - * When true, fetches real billing status from the billing service and populates has_funds and is_active accordingly. When false or omitted, the billing lookup is skipped and has_funds/is_active are returned as true (optimistic defaults). Use true when the caller needs to gate access based on billing (e.g. partner node auth); omit for identity-only lookups (e.g. key caching). - */ - include_billing?: boolean - } - url: '/admin/api/keys/verify' -} - -export type VerifyWorkspaceApiKeyErrors = { - /** - * Invalid key or unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type VerifyWorkspaceApiKeyError = - VerifyWorkspaceApiKeyErrors[keyof VerifyWorkspaceApiKeyErrors] - -export type VerifyWorkspaceApiKeyResponses = { - /** - * Key is valid - */ - 200: VerifyApiKeyResponse -} - -export type VerifyWorkspaceApiKeyResponse = - VerifyWorkspaceApiKeyResponses[keyof VerifyWorkspaceApiKeyResponses] +export type CreateWorkflowVersionResponse = CreateWorkflowVersionResponses[keyof CreateWorkflowVersionResponses]; -export type GetUserData = { - body?: never - path?: never - query?: never - url: '/api/user' -} +export type GetPublishedWorkflowData = { + body?: never; + path: { + /** + * The share ID of the published workflow. + */ + share_id: string; + }; + query?: never; + url: '/api/workflows/published/{share_id}'; +}; -export type GetUserErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse -} +export type GetPublishedWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Share not found + */ + 404: ErrorResponse; + /** + * Workflow JSON too large + */ + 413: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetUserError = GetUserErrors[keyof GetUserErrors] +export type GetPublishedWorkflowError = GetPublishedWorkflowErrors[keyof GetPublishedWorkflowErrors]; -export type GetUserResponses = { - /** - * Success - */ - 200: UserResponse -} - -export type GetUserResponse = GetUserResponses[keyof GetUserResponses] - -export type SetReviewStatusData = { - body: SetReviewStatusRequest - path?: never - query?: never - url: '/admin/api/hub/workflows/status' -} - -export type SetReviewStatusErrors = { - /** - * Bad request - invalid status value or empty share_ids - */ - 400: ErrorResponse - /** - * Unauthorized - authentication required - */ - 401: ErrorResponse - /** - * Forbidden - insufficient permissions - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type SetReviewStatusError = - SetReviewStatusErrors[keyof SetReviewStatusErrors] - -export type SetReviewStatusResponses = { - /** - * Status updated successfully - */ - 200: SetReviewStatusResponse -} - -export type SetReviewStatusResponse2 = - SetReviewStatusResponses[keyof SetReviewStatusResponses] - -export type AdminDeleteHubWorkflowData = { - body?: never - path: { - /** - * The share ID of the hub workflow to delete. - */ - share_id: string - } - query?: never - url: '/admin/api/hub/workflows/{share_id}' -} - -export type AdminDeleteHubWorkflowErrors = { - /** - * Unauthorized - authentication required - */ - 401: ErrorResponse - /** - * Forbidden - insufficient permissions - */ - 403: ErrorResponse - /** - * Not found - no published workflow for the given share_id - */ - 404: ErrorResponse - /** - * Conflict - the workflow is not rejected and cannot be deleted - */ - 409: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type AdminDeleteHubWorkflowError = - AdminDeleteHubWorkflowErrors[keyof AdminDeleteHubWorkflowErrors] - -export type AdminDeleteHubWorkflowResponses = { - /** - * Successfully deleted - */ - 204: void -} - -export type AdminDeleteHubWorkflowResponse = - AdminDeleteHubWorkflowResponses[keyof AdminDeleteHubWorkflowResponses] - -export type UpdateHubWorkflowData = { - body: UpdateHubWorkflowRequest - path: { - /** - * The share ID of the hub workflow to update. - */ - share_id: string - } - query?: never - url: '/admin/api/hub/workflows/{share_id}' -} - -export type UpdateHubWorkflowErrors = { - /** - * Bad request - invalid field, unknown label slug, or invalid media token - */ - 400: ErrorResponse - /** - * Unauthorized - authentication required - */ - 401: ErrorResponse - /** - * Forbidden - insufficient permissions - */ - 403: ErrorResponse - /** - * Not found - no published workflow for the given share_id - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UpdateHubWorkflowError = - UpdateHubWorkflowErrors[keyof UpdateHubWorkflowErrors] - -export type UpdateHubWorkflowResponses = { - /** - * Updated hub workflow detail - */ - 200: HubWorkflowDetail -} - -export type UpdateHubWorkflowResponse = - UpdateHubWorkflowResponses[keyof UpdateHubWorkflowResponses] - -export type GetDeletionRequestData = { - body?: never - path?: never - query: { - /** - * The Firebase ID of the user - */ - firebase_id: string - } - url: '/admin/api/deletion_requests' -} - -export type GetDeletionRequestErrors = { - /** - * Bad request - invalid request body - */ - 400: ErrorResponse - /** - * Unauthorized - authentication required - */ - 401: ErrorResponse - /** - * Forbidden - insufficient permissions - */ - 403: ErrorResponse - /** - * Deletion request not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetDeletionRequestError = - GetDeletionRequestErrors[keyof GetDeletionRequestErrors] - -export type GetDeletionRequestResponses = { - /** - * Success - deletion request found - */ - 200: Array -} - -export type GetDeletionRequestResponse = - GetDeletionRequestResponses[keyof GetDeletionRequestResponses] - -export type CreateDeletionRequestData = { - body: { - /** - * The Firebase ID of the user to delete - */ - firebase_id: string - } - path?: never - query?: never - url: '/admin/api/deletion_requests' -} - -export type CreateDeletionRequestErrors = { - /** - * Bad request - invalid request body - */ - 400: ErrorResponse - /** - * Unauthorized - authentication required - */ - 401: ErrorResponse - /** - * Forbidden - insufficient permissions - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateDeletionRequestError = - CreateDeletionRequestErrors[keyof CreateDeletionRequestErrors] - -export type CreateDeletionRequestResponses = { - /** - * Created - deletion request created or already exists - */ - 201: { - /** - * Whether the user had a record in the cloud database - */ - user_found_in_cloud: boolean - } -} - -export type CreateDeletionRequestResponse = - CreateDeletionRequestResponses[keyof CreateDeletionRequestResponses] - -export type ReleaseDeletionHoldData = { - body: { - /** - * The Firebase ID of the user whose hold to release - */ - firebase_id: string - } - path?: never - query?: never - url: '/admin/api/deletion_requests/release_hold' -} - -export type ReleaseDeletionHoldErrors = { - /** - * Bad request - invalid request body - */ - 400: ErrorResponse - /** - * Unauthorized - authentication required - */ - 401: ErrorResponse - /** - * Forbidden - insufficient permissions - */ - 403: ErrorResponse - /** - * No deletion request for this user - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ReleaseDeletionHoldError = - ReleaseDeletionHoldErrors[keyof ReleaseDeletionHoldErrors] - -export type ReleaseDeletionHoldResponses = { - /** - * Release authorized; the deletion workflow will proceed - */ - 200: ReleaseHoldResponse -} - -export type ReleaseDeletionHoldResponse = - ReleaseDeletionHoldResponses[keyof ReleaseDeletionHoldResponses] - -export type ReportPartnerUsageData = { - body: PartnerUsageRequest - path?: never - query?: never - url: '/admin/api/partner-usage' -} - -export type ReportPartnerUsageErrors = { - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Validation error - missing or empty required fields - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ReportPartnerUsageError = - ReportPartnerUsageErrors[keyof ReportPartnerUsageErrors] - -export type ReportPartnerUsageResponses = { - /** - * Usage reported successfully - */ - 200: PartnerUsageResponse -} - -export type ReportPartnerUsageResponse = - ReportPartnerUsageResponses[keyof ReportPartnerUsageResponses] - -export type GetHistoryEventsData = { - body?: never - path?: never - query?: { - /** - * Target workspace. One of workspace_id or user_id is required; workspace_id wins when both are supplied. - */ - workspace_id?: string - /** - * Resolve the caller's personal workspace via converged identity when workspace_id is not given. One of workspace_id or user_id is required. - */ - user_id?: string - /** - * Optional exact event_type filter. - */ - event_type?: string - /** - * Inclusive lower bound on created_at (RFC3339). - */ - start_date?: string - /** - * Inclusive upper bound on created_at (RFC3339). - */ - end_date?: string - /** - * 1-indexed page number (defaults to 1). - */ - page?: number - /** - * Items per page (defaults to 10). - */ - limit?: number - } - url: '/admin/api/history-events' -} - -export type GetHistoryEventsErrors = { - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Validation error - neither workspace_id nor user_id given, or a malformed date - */ - 422: ErrorResponse - /** - * Internal error resolving the workspace or querying events - */ - 500: ErrorResponse - /** - * Billing is disabled; the caller should fall back to legacy audit_logs - */ - 503: ErrorResponse -} - -export type GetHistoryEventsError = - GetHistoryEventsErrors[keyof GetHistoryEventsErrors] - -export type GetHistoryEventsResponses = { - /** - * Paginated cloud history events for the workspace - */ - 200: BillingEventsResponse -} - -export type GetHistoryEventsResponse = - GetHistoryEventsResponses[keyof GetHistoryEventsResponses] - -export type ReportHistoryEventData = { - body: HistoryEventRequest - path?: never - query?: never - url: '/admin/api/history-event' -} - -export type ReportHistoryEventErrors = { - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Validation error - missing or empty required fields - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} +export type GetPublishedWorkflowResponses = { + /** + * Published workflow details with asset statuses + */ + 200: PublishedWorkflowDetail; +}; -export type ReportHistoryEventError = - ReportHistoryEventErrors[keyof ReportHistoryEventErrors] - -export type ReportHistoryEventResponses = { - /** - * History event recorded successfully - */ - 200: PartnerUsageResponse -} +export type GetPublishedWorkflowResponse = GetPublishedWorkflowResponses[keyof GetPublishedWorkflowResponses]; -export type ReportHistoryEventResponse = - ReportHistoryEventResponses[keyof ReportHistoryEventResponses] +export type ListWorkspaceApiKeysData = { + body?: never; + path?: never; + query?: never; + url: '/api/workspace/api-keys'; +}; -export type UpdateSubscriptionCacheData = { - body: { +export type ListWorkspaceApiKeysErrors = { /** - * Firebase UID of the user whose cache should be updated. - */ - user_id: string - /** - * Whether the user currently has an active personal subscription. - * When false, any cached entry is cleared. - * + * Unauthorized */ - is_active: boolean + 401: ErrorResponse; /** - * Subscription tier (e.g. `PRO`, `CREATOR`). Required when - * `is_active=true`; ignored otherwise. Unknown values are treated as a - * no-op rather than cached, so a schema drift between services cannot - * poison the cache. - * + * Forbidden */ - tier?: string - } - path?: never - query?: never - url: '/admin/api/update-subscription-cache' -} - -export type UpdateSubscriptionCacheErrors = { - /** - * Missing or invalid request body - */ - 400: ErrorResponse - /** - * Cache write failed (Redis unavailable, DEL/SET error, marshal error). - * Caller should retry — state on the ingest side is unchanged. - * - */ - 500: ErrorResponse -} - -export type UpdateSubscriptionCacheError = - UpdateSubscriptionCacheErrors[keyof UpdateSubscriptionCacheErrors] - -export type UpdateSubscriptionCacheResponses = { - /** - * Cache updated successfully - */ - 200: { - /** - * One of `updated` (cache entry written), `cleared` (cache entry - * removed), or `skipped` (defensive no-op for missing / unknown tier). - * + 403: ErrorResponse; + /** + * Internal server error */ - status?: string - } -} - -export type UpdateSubscriptionCacheResponse = - UpdateSubscriptionCacheResponses[keyof UpdateSubscriptionCacheResponses] - -export type ListLinkedFirebaseUidsData = { - body: ListLinkedFirebaseUidsRequest - path?: never - query?: never - url: '/admin/api/identity/linked-uids' -} - -export type ListLinkedFirebaseUidsErrors = { - /** - * Malformed request or missing comfy_user_id - */ - 400: ErrorResponse - /** - * Missing or invalid admin secret - */ - 401: ErrorResponse - /** - * Internal error - */ - 500: ErrorResponse -} - -export type ListLinkedFirebaseUidsError = - ListLinkedFirebaseUidsErrors[keyof ListLinkedFirebaseUidsErrors] - -export type ListLinkedFirebaseUidsResponses = { - /** - * Linked Firebase UIDs (possibly empty list) - */ - 200: ListLinkedFirebaseUidsResponse -} - -export type ListLinkedFirebaseUidsResponse2 = - ListLinkedFirebaseUidsResponses[keyof ListLinkedFirebaseUidsResponses] - -export type EnsureWorkspaceBillingProvisionedData = { - body: EnsureWorkspaceBillingProvisionedRequest - path?: never - query?: never - url: '/admin/api/workspace/ensure-billing-provisioned' -} - -export type EnsureWorkspaceBillingProvisionedErrors = { - /** - * Malformed request or missing user_id - */ - 400: ErrorResponse - /** - * Missing or invalid admin secret - */ - 401: ErrorResponse - /** - * Internal error - */ - 500: ErrorResponse -} - -export type EnsureWorkspaceBillingProvisionedError = - EnsureWorkspaceBillingProvisionedErrors[keyof EnsureWorkspaceBillingProvisionedErrors] - -export type EnsureWorkspaceBillingProvisionedResponses = { - /** - * The workspace's provisioned billing identity - */ - 200: EnsureWorkspaceBillingProvisionedResponse -} - -export type EnsureWorkspaceBillingProvisionedResponse2 = - EnsureWorkspaceBillingProvisionedResponses[keyof EnsureWorkspaceBillingProvisionedResponses] - -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 - query?: never - url: '/admin/api/keys/sync' -} - -export type SyncApiKeyErrors = { - /** - * Malformed request or unsupported event - */ - 400: ErrorResponse - /** - * Missing or invalid admin secret - */ - 401: ErrorResponse - /** - * Internal error - */ - 500: ErrorResponse -} - -export type SyncApiKeyError = SyncApiKeyErrors[keyof SyncApiKeyErrors] - -export type SyncApiKeyResponses = { - /** - * Sync processed — see `result` field - */ - 200: SyncApiKeyResponse -} - -export type SyncApiKeyResponse2 = SyncApiKeyResponses[keyof SyncApiKeyResponses] + 500: ErrorResponse; +}; -export type GetJobStatusData = { - body?: never - path: { +export type ListWorkspaceApiKeysError = ListWorkspaceApiKeysErrors[keyof ListWorkspaceApiKeysErrors]; + +export type ListWorkspaceApiKeysResponses = { /** - * The unique ID of the job + * List of API keys */ - job_id: string - } - query?: never - url: '/api/job/{job_id}/status' -} - -export type GetJobStatusErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - job belongs to another user - */ - 403: ErrorResponse - /** - * Job not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetJobStatusError = GetJobStatusErrors[keyof GetJobStatusErrors] + 200: ListWorkspaceApiKeysResponse; +}; -export type GetJobStatusResponses = { - /** - * Success - Job status returned - */ - 200: JobStatusResponse -} +export type ListWorkspaceApiKeysResponse2 = ListWorkspaceApiKeysResponses[keyof ListWorkspaceApiKeysResponses]; -export type GetJobStatusResponse = - GetJobStatusResponses[keyof GetJobStatusResponses] +export type CreateWorkspaceApiKeyData = { + body: CreateWorkspaceApiKeyRequest; + path?: never; + query?: never; + url: '/api/workspace/api-keys'; +}; -export type ListTasksData = { - body?: never - path?: never - query?: { - /** - * Filter by task type name (exact match) - */ - task_name?: string - /** - * Filter by idempotency key (exact match). For best performance, specify task_name as well. - */ - idempotency_key?: string +export type CreateWorkspaceApiKeyErrors = { /** - * Filter by one or more statuses (comma-separated) + * Unauthorized */ - status?: string + 401: ErrorResponse; /** - * Filter tasks created after this timestamp (RFC3339 format) + * Not a workspace member */ - created_after?: string + 403: ErrorResponse; /** - * Filter tasks created before this timestamp (RFC3339 format) + * Workspace not found */ - created_before?: string + 404: ErrorResponse; /** - * Sort direction (asc = ascending, desc = descending by create_time) + * Validation error */ - sort_order?: 'asc' | 'desc' + 422: ErrorResponse; /** - * Pagination offset (0-based) + * Key limit reached */ - offset?: number + 429: ErrorResponse; /** - * Maximum items per page (1-100) + * Internal server error */ - limit?: number - } - url: '/api/tasks' -} - -export type ListTasksErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Validation error - Invalid filter values - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListTasksError = ListTasksErrors[keyof ListTasksErrors] - -export type ListTasksResponses = { - /** - * Success - Tasks retrieved - */ - 200: TasksListResponse -} + 500: ErrorResponse; +}; -export type ListTasksResponse = ListTasksResponses[keyof ListTasksResponses] +export type CreateWorkspaceApiKeyError = CreateWorkspaceApiKeyErrors[keyof CreateWorkspaceApiKeyErrors]; -export type GetTaskData = { - body?: never - path: { +export type CreateWorkspaceApiKeyResponses = { /** - * Task identifier (UUID) + * API key created (plaintext returned once) */ - task_id: string - } - query?: never - url: '/api/tasks/{task_id}' -} - -export type GetTaskErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Task not found (also returned for ownership failures to avoid leaking task existence) - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetTaskError = GetTaskErrors[keyof GetTaskErrors] - -export type GetTaskResponses = { - /** - * Success - Task details retrieved - */ - 200: TaskResponse -} - -export type GetTaskResponse = GetTaskResponses[keyof GetTaskResponses] - -export type GetBillingStatusData = { - body?: never - path?: never - query?: never - url: '/api/billing/status' -} - -export type GetBillingStatusErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workspace not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetBillingStatusError = - GetBillingStatusErrors[keyof GetBillingStatusErrors] - -export type GetBillingStatusResponses = { - /** - * Billing status - */ - 200: BillingStatusResponse -} - -export type GetBillingStatusResponse = - GetBillingStatusResponses[keyof GetBillingStatusResponses] - -export type GetBillingBalanceData = { - body?: never - path?: never - query?: never - url: '/api/billing/balance' -} - -export type GetBillingBalanceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetBillingBalanceError = - GetBillingBalanceErrors[keyof GetBillingBalanceErrors] + 201: CreateWorkspaceApiKeyResponse; +}; -export type GetBillingBalanceResponses = { - /** - * Credit balance - */ - 200: BillingBalanceResponse -} +export type CreateWorkspaceApiKeyResponse2 = CreateWorkspaceApiKeyResponses[keyof CreateWorkspaceApiKeyResponses]; -export type GetBillingBalanceResponse = - GetBillingBalanceResponses[keyof GetBillingBalanceResponses] +export type RevokeWorkspaceApiKeyData = { + body?: never; + path: { + /** + * API key ID to revoke + */ + id: string; + }; + query?: never; + url: '/api/workspace/api-keys/{id}'; +}; -export type GetBillingEventsData = { - body?: never - path?: never - query?: { +export type RevokeWorkspaceApiKeyErrors = { /** - * Page number (1-indexed) + * Unauthorized */ - page?: number + 401: ErrorResponse; /** - * Number of events per page + * Not authorized to revoke this key */ - limit?: number - } - url: '/api/billing/events' -} - -export type GetBillingEventsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetBillingEventsError = - GetBillingEventsErrors[keyof GetBillingEventsErrors] - -export type GetBillingEventsResponses = { - /** - * Paginated billing events - */ - 200: BillingEventsResponse -} - -export type GetBillingEventsResponse = - GetBillingEventsResponses[keyof GetBillingEventsResponses] - -export type GetBillingPlansData = { - body?: never - path?: never - query?: never - url: '/api/billing/plans' -} - -export type GetBillingPlansErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetBillingPlansError = - GetBillingPlansErrors[keyof GetBillingPlansErrors] - -export type GetBillingPlansResponses = { - /** - * Available plans with pricing - */ - 200: BillingPlansResponse -} - -export type GetBillingPlansResponse = - GetBillingPlansResponses[keyof GetBillingPlansResponses] - -export type PreviewSubscribeData = { - body: PreviewSubscribeRequest - path?: never - query?: never - url: '/api/billing/preview-subscribe' -} - -export type PreviewSubscribeErrors = { - /** - * Invalid request (e.g., invalid plan slug, seats below minimum) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type PreviewSubscribeError = - PreviewSubscribeErrors[keyof PreviewSubscribeErrors] - -export type PreviewSubscribeResponses = { - /** - * Subscription preview - */ - 200: PreviewSubscribeResponse -} - -export type PreviewSubscribeResponse2 = - PreviewSubscribeResponses[keyof PreviewSubscribeResponses] - -export type SubscribeData = { - body: SubscribeRequest - path?: never - query?: never - url: '/api/billing/subscribe' -} - -export type SubscribeErrors = { - /** - * Invalid request (e.g., invalid plan slug, incompatible plan) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type SubscribeError = SubscribeErrors[keyof SubscribeErrors] - -export type SubscribeResponses = { - /** - * Subscription created or payment method needed - */ - 200: SubscribeResponse -} - -export type SubscribeResponse2 = SubscribeResponses[keyof SubscribeResponses] - -export type CancelSubscriptionData = { - body: CancelSubscriptionRequest - path?: never - query?: never - url: '/api/billing/subscription/cancel' -} - -export type CancelSubscriptionErrors = { - /** - * Invalid request (e.g., no active subscription) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CancelSubscriptionError = - CancelSubscriptionErrors[keyof CancelSubscriptionErrors] - -export type CancelSubscriptionResponses = { - /** - * Subscription cancellation scheduled - */ - 200: CancelSubscriptionResponse -} - -export type CancelSubscriptionResponse2 = - CancelSubscriptionResponses[keyof CancelSubscriptionResponses] - -export type ResubscribeData = { - body: ResubscribeRequest - path?: never - query?: never - url: '/api/billing/subscription/resubscribe' -} - -export type ResubscribeErrors = { - /** - * Invalid request (e.g., no active subscription, not in cancellation grace period) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ResubscribeError = ResubscribeErrors[keyof ResubscribeErrors] - -export type ResubscribeResponses = { - /** - * Subscription resumed successfully - */ - 200: ResubscribeResponse -} - -export type ResubscribeResponse2 = - ResubscribeResponses[keyof ResubscribeResponses] - -export type GetPaymentPortalData = { - body?: PaymentPortalRequest - path?: never - query?: never - url: '/api/billing/payment-portal' -} - -export type GetPaymentPortalErrors = { - /** - * Bad request (e.g., missing return_url) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetPaymentPortalError = - GetPaymentPortalErrors[keyof GetPaymentPortalErrors] + 403: ErrorResponse; + /** + * API key not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetPaymentPortalResponses = { - /** - * Success - */ - 200: PaymentPortalResponse -} +export type RevokeWorkspaceApiKeyError = RevokeWorkspaceApiKeyErrors[keyof RevokeWorkspaceApiKeyErrors]; -export type GetPaymentPortalResponse = - GetPaymentPortalResponses[keyof GetPaymentPortalResponses] +export type RevokeWorkspaceApiKeyResponses = { + /** + * API key revoked + */ + 204: void; +}; -export type CreateTopupData = { - body: CreateTopupRequest - path?: never - query?: never - url: '/api/billing/topup' -} +export type RevokeWorkspaceApiKeyResponse = RevokeWorkspaceApiKeyResponses[keyof RevokeWorkspaceApiKeyResponses]; -export type CreateTopupErrors = { - /** - * Bad request (invalid amount, no payment method) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateTopupError = CreateTopupErrors[keyof CreateTopupErrors] +export type ListWorkspaceInvitesData = { + body?: never; + path?: never; + query?: never; + url: '/api/workspace/invites'; +}; -export type CreateTopupResponses = { - /** - * Top-up initiated successfully - */ - 200: CreateTopupResponse -} +export type ListWorkspaceInvitesErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Owner role required + */ + 403: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type CreateTopupResponse2 = - CreateTopupResponses[keyof CreateTopupResponses] +export type ListWorkspaceInvitesError = ListWorkspaceInvitesErrors[keyof ListWorkspaceInvitesErrors]; -export type GetBillingOpStatusData = { - body?: never - path: { +export type ListWorkspaceInvitesResponses = { /** - * The billing operation ID + * List of pending invites */ - id: string - } - query?: never - url: '/api/billing/ops/{id}' -} - -export type GetBillingOpStatusErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Billing operation not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetBillingOpStatusError = - GetBillingOpStatusErrors[keyof GetBillingOpStatusErrors] + 200: ListInvitesResponse; +}; -export type GetBillingOpStatusResponses = { - /** - * Billing operation status - */ - 200: BillingOpStatusResponse -} +export type ListWorkspaceInvitesResponse = ListWorkspaceInvitesResponses[keyof ListWorkspaceInvitesResponses]; -export type GetBillingOpStatusResponse = - GetBillingOpStatusResponses[keyof GetBillingOpStatusResponses] +export type CreateWorkspaceInviteData = { + body: CreateInviteRequest; + path?: never; + query?: never; + url: '/api/workspace/invites'; +}; -export type ListWorkflowsData = { - body?: never - path?: never - query?: { - limit?: number - offset?: number +export type CreateWorkspaceInviteErrors = { /** - * Search workflows by name (case-insensitive substring match) + * Unauthorized */ - name?: string + 401: ErrorResponse; /** - * Filter by default view type + * Owner role required or personal workspace (invites not allowed) */ - default_view?: 'workflow' | 'app' + 403: ErrorResponse; /** - * Sort field + * Workspace not found */ - sort?: 'create_time' | 'update_time' | 'name' + 404: ErrorResponse; /** - * Sort order + * Invite already exists */ - order?: 'asc' | 'desc' - } - url: '/api/workflows' -} - -export type ListWorkflowsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListWorkflowsError = ListWorkflowsErrors[keyof ListWorkflowsErrors] - -export type ListWorkflowsResponses = { - /** - * Success - */ - 200: WorkflowListResponse -} - -export type ListWorkflowsResponse = - ListWorkflowsResponses[keyof ListWorkflowsResponses] - -export type CreateWorkflowData = { - body: CreateWorkflowRequest - path?: never - query?: never - url: '/api/workflows' -} - -export type CreateWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateWorkflowError = - CreateWorkflowErrors[keyof CreateWorkflowErrors] - -export type CreateWorkflowResponses = { - /** - * Workflow created successfully - */ - 201: WorkflowResponse -} - -export type CreateWorkflowResponse = - CreateWorkflowResponses[keyof CreateWorkflowResponses] - -export type DeleteWorkflowData = { - body?: never - path: { + 409: ErrorResponse; /** - * The UUID of the workflow to delete. + * Validation error */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}' -} - -export type DeleteWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type DeleteWorkflowError = - DeleteWorkflowErrors[keyof DeleteWorkflowErrors] - -export type DeleteWorkflowResponses = { - /** - * Workflow deleted successfully - */ - 204: void -} - -export type DeleteWorkflowResponse = - DeleteWorkflowResponses[keyof DeleteWorkflowResponses] - -export type GetWorkflowData = { - body?: never - path: { + 422: ErrorResponse; /** - * The UUID of the workflow. + * Internal server error */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}' -} - -export type GetWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - */ - 403: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetWorkflowError = GetWorkflowErrors[keyof GetWorkflowErrors] - -export type GetWorkflowResponses = { - /** - * Success - */ - 200: WorkflowResponse -} + 500: ErrorResponse; +}; -export type GetWorkflowResponse = - GetWorkflowResponses[keyof GetWorkflowResponses] +export type CreateWorkspaceInviteError = CreateWorkspaceInviteErrors[keyof CreateWorkspaceInviteErrors]; -export type UpdateWorkflowData = { - body: UpdateWorkflowRequest - path: { +export type CreateWorkspaceInviteResponses = { /** - * The UUID of the workflow to update. + * Invite created */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}' -} - -export type UpdateWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UpdateWorkflowError = - UpdateWorkflowErrors[keyof UpdateWorkflowErrors] + 201: PendingInvite; +}; -export type UpdateWorkflowResponses = { - /** - * Success - */ - 200: WorkflowResponse -} +export type CreateWorkspaceInviteResponse = CreateWorkspaceInviteResponses[keyof CreateWorkspaceInviteResponses]; -export type UpdateWorkflowResponse = - UpdateWorkflowResponses[keyof UpdateWorkflowResponses] +export type RevokeWorkspaceInviteData = { + body?: never; + path: { + /** + * Invite ID to revoke + */ + inviteId: string; + }; + query?: never; + url: '/api/workspace/invites/{inviteId}'; +}; -export type CreateWorkflowVersionData = { - body: CreateWorkflowVersionRequest - path: { +export type RevokeWorkspaceInviteErrors = { /** - * The UUID of the workflow to create a new version for. + * Unauthorized */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}/versions' -} - -export type CreateWorkflowVersionErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - not the workflow owner - */ - 403: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Version conflict - base_version does not match latest - */ - 409: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateWorkflowVersionError = - CreateWorkflowVersionErrors[keyof CreateWorkflowVersionErrors] - -export type CreateWorkflowVersionResponses = { - /** - * Version created successfully - */ - 201: WorkflowVersionResponse -} - -export type CreateWorkflowVersionResponse = - CreateWorkflowVersionResponses[keyof CreateWorkflowVersionResponses] - -export type GetWorkflowContentData = { - body?: never - path: { + 401: ErrorResponse; /** - * The UUID of the workflow whose content should be retrieved. + * Owner role required */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}/content' -} - -export type GetWorkflowContentErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - */ - 403: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetWorkflowContentError = - GetWorkflowContentErrors[keyof GetWorkflowContentErrors] - -export type GetWorkflowContentResponses = { - /** - * Success - */ - 200: WorkflowVersionContentResponse -} - -export type GetWorkflowContentResponse = - GetWorkflowContentResponses[keyof GetWorkflowContentResponses] - -export type ForkWorkflowData = { - body: ForkWorkflowRequest - path: { + 403: ErrorResponse; /** - * The UUID of the source workflow to fork from. + * Workspace or invite not found */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}/fork' -} - -export type ForkWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - */ - 403: ErrorResponse - /** - * Source workflow or version not found - */ - 404: ErrorResponse - /** - * Validation error - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ForkWorkflowError = ForkWorkflowErrors[keyof ForkWorkflowErrors] - -export type ForkWorkflowResponses = { - /** - * Workflow forked successfully - */ - 201: WorkflowResponse -} - -export type ForkWorkflowResponse = - ForkWorkflowResponses[keyof ForkWorkflowResponses] - -export type CreateHubProfileData = { - body: CreateHubProfileRequest - path?: never - query?: never - url: '/api/hub/profiles' -} + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type CreateHubProfileErrors = { - /** - * Bad request (e.g. invalid username) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not found - */ - 404: ErrorResponse - /** - * Username already taken or profile already exists - */ - 409: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateHubProfileError = - CreateHubProfileErrors[keyof CreateHubProfileErrors] +export type RevokeWorkspaceInviteError = RevokeWorkspaceInviteErrors[keyof RevokeWorkspaceInviteErrors]; -export type CreateHubProfileResponses = { - /** - * Hub profile created - */ - 201: HubProfile -} +export type RevokeWorkspaceInviteResponses = { + /** + * Invite revoked + */ + 204: void; +}; -export type CreateHubProfileResponse = - CreateHubProfileResponses[keyof CreateHubProfileResponses] +export type RevokeWorkspaceInviteResponse = RevokeWorkspaceInviteResponses[keyof RevokeWorkspaceInviteResponses]; -export type GetMyHubProfileData = { - body?: never - path?: never - query?: never - url: '/api/hub/profiles/me' -} +export type LeaveWorkspaceData = { + body?: never; + path?: never; + query?: never; + url: '/api/workspace/leave'; +}; -export type GetMyHubProfileErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * No hub profile exists - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetMyHubProfileError = - GetMyHubProfileErrors[keyof GetMyHubProfileErrors] +export type LeaveWorkspaceErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Cannot leave as the only owner or cannot leave personal workspace + */ + 403: ErrorResponse; + /** + * Workspace not found or not a member + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetMyHubProfileResponses = { - /** - * Hub profile - */ - 200: HubProfile -} +export type LeaveWorkspaceError = LeaveWorkspaceErrors[keyof LeaveWorkspaceErrors]; -export type GetMyHubProfileResponse = - GetMyHubProfileResponses[keyof GetMyHubProfileResponses] +export type LeaveWorkspaceResponses = { + /** + * Successfully left workspace + */ + 204: void; +}; -export type CheckHubUsernameData = { - body?: never - path?: never - query: { - username: string - } - url: '/api/hub/profiles/check' -} +export type LeaveWorkspaceResponse = LeaveWorkspaceResponses[keyof LeaveWorkspaceResponses]; -export type CheckHubUsernameErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CheckHubUsernameError = - CheckHubUsernameErrors[keyof CheckHubUsernameErrors] +export type ListWorkspaceMembersData = { + body?: never; + path?: never; + query?: { + /** + * Pagination offset (0-based) + */ + offset?: number; + /** + * Maximum number of members to return + */ + limit?: number; + }; + url: '/api/workspace/members'; +}; -export type CheckHubUsernameResponses = { - /** - * Username availability result - */ - 200: HubUsernameCheckResponse -} +export type ListWorkspaceMembersErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Not a member of this workspace + */ + 403: ErrorResponse; + /** + * Workspace not found + */ + 404: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type CheckHubUsernameResponse = - CheckHubUsernameResponses[keyof CheckHubUsernameResponses] +export type ListWorkspaceMembersError = ListWorkspaceMembersErrors[keyof ListWorkspaceMembersErrors]; -export type GetHubProfileByUsernameData = { - body?: never - path: { +export type ListWorkspaceMembersResponses = { /** - * The hub profile username. + * List of members */ - username: string - } - query?: never - url: '/api/hub/profiles/{username}' -} - -export type GetHubProfileByUsernameErrors = { - /** - * Profile not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetHubProfileByUsernameError = - GetHubProfileByUsernameErrors[keyof GetHubProfileByUsernameErrors] + 200: ListMembersResponse; +}; -export type GetHubProfileByUsernameResponses = { - /** - * Hub profile - */ - 200: HubProfile -} +export type ListWorkspaceMembersResponse = ListWorkspaceMembersResponses[keyof ListWorkspaceMembersResponses]; -export type GetHubProfileByUsernameResponse = - GetHubProfileByUsernameResponses[keyof GetHubProfileByUsernameResponses] +export type BulkRevokeWorkspaceMemberApiKeysData = { + body?: never; + path: { + /** + * Firebase UID of the member whose keys to revoke (must be non-empty) + */ + user_id: string; + }; + query?: never; + url: '/api/workspace/members/{user_id}/api-keys'; +}; -export type UpdateHubProfileData = { - body: UpdateHubProfileRequest - path: { +export type BulkRevokeWorkspaceMemberApiKeysErrors = { /** - * The hub profile username to update. + * Unauthorized */ - username: string - } - query?: never - url: '/api/hub/profiles/{username}' -} - -export type UpdateHubProfileErrors = { - /** - * Bad request (e.g. missing body, invalid avatar token) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * No hub profile exists with this username - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UpdateHubProfileError = - UpdateHubProfileErrors[keyof UpdateHubProfileErrors] + 401: ErrorResponse; + /** + * Not authorized (must be workspace owner) + */ + 403: ErrorResponse; + /** + * Validation error (e.g. empty user_id) + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type UpdateHubProfileResponses = { - /** - * Hub profile updated - */ - 200: HubProfile -} +export type BulkRevokeWorkspaceMemberApiKeysError = BulkRevokeWorkspaceMemberApiKeysErrors[keyof BulkRevokeWorkspaceMemberApiKeysErrors]; -export type UpdateHubProfileResponse = - UpdateHubProfileResponses[keyof UpdateHubProfileResponses] +export type BulkRevokeWorkspaceMemberApiKeysResponses = { + /** + * Keys revoked successfully + */ + 200: BulkRevokeApiKeysResponse; +}; -export type CreateHubAssetUploadUrlData = { - body: HubAssetUploadUrlRequest - path?: never - query?: never - url: '/api/hub/assets/upload-url' -} +export type BulkRevokeWorkspaceMemberApiKeysResponse = BulkRevokeWorkspaceMemberApiKeysResponses[keyof BulkRevokeWorkspaceMemberApiKeysResponses]; -export type CreateHubAssetUploadUrlErrors = { - /** - * Bad request (e.g. unsupported content type) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateHubAssetUploadUrlError = - CreateHubAssetUploadUrlErrors[keyof CreateHubAssetUploadUrlErrors] +export type RemoveWorkspaceMemberData = { + body?: never; + path: { + /** + * User ID to remove + */ + userId: string; + }; + query?: never; + url: '/api/workspace/members/{userId}'; +}; -export type CreateHubAssetUploadUrlResponses = { - /** - * Presigned upload URL and token - */ - 200: HubAssetUploadUrlResponse -} +export type RemoveWorkspaceMemberErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Owner role required or cannot remove yourself + */ + 403: ErrorResponse; + /** + * Workspace or member not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type CreateHubAssetUploadUrlResponse = - CreateHubAssetUploadUrlResponses[keyof CreateHubAssetUploadUrlResponses] +export type RemoveWorkspaceMemberError = RemoveWorkspaceMemberErrors[keyof RemoveWorkspaceMemberErrors]; -export type ListHubLabelsData = { - body?: never - path?: never - query?: { +export type RemoveWorkspaceMemberResponses = { /** - * Filter by label type. Omit to return all labels. + * Member removed */ - type?: 'tag' | 'model' | 'custom_node' - } - url: '/api/hub/labels' -} - -export type ListHubLabelsErrors = { - /** - * Bad request (e.g. invalid type parameter) - */ - 400: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListHubLabelsError = ListHubLabelsErrors[keyof ListHubLabelsErrors] + 204: void; +}; -export type ListHubLabelsResponses = { - /** - * List of labels - */ - 200: HubLabelListResponse -} +export type RemoveWorkspaceMemberResponse = RemoveWorkspaceMemberResponses[keyof RemoveWorkspaceMemberResponses]; -export type ListHubLabelsResponse = - ListHubLabelsResponses[keyof ListHubLabelsResponses] +export type UpdateWorkspaceMemberRoleData = { + body: UpdateMemberRoleRequest; + path: { + /** + * User ID whose role is being changed + */ + userId: string; + }; + query?: never; + url: '/api/workspace/members/{userId}'; +}; -export type ListHubWorkflowsData = { - body?: never - path?: never - query?: { - cursor?: string - limit?: number +export type UpdateWorkspaceMemberRoleErrors = { /** - * Search by workflow name + * Unauthorized */ - search?: string + 401: ErrorResponse; /** - * Filter by tag + * Owner role required, or the original owner cannot be demoted */ - tag?: string + 403: ErrorResponse; /** - * Filter by profile username + * Workspace or member not found */ - username?: string + 404: ErrorResponse; /** - * When true, returns full HubWorkflowDetail objects in the workflows array instead of summaries. Requires limit <= 20. + * Validation error */ - detail?: boolean + 422: ErrorResponse; /** - * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. + * Internal server error */ - status?: Array - } - url: '/api/hub/workflows' -} - -export type ListHubWorkflowsErrors = { - /** - * Bad request (e.g. malformed pagination cursor) - */ - 400: ErrorResponse - /** - * Profile not found (when filtering by username) - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListHubWorkflowsError = - ListHubWorkflowsErrors[keyof ListHubWorkflowsErrors] - -export type ListHubWorkflowsResponses = { - /** - * Paginated list of hub workflows - */ - 200: HubWorkflowListResponse -} - -export type ListHubWorkflowsResponse = - ListHubWorkflowsResponses[keyof ListHubWorkflowsResponses] - -export type PublishHubWorkflowData = { - body: PublishHubWorkflowRequest - path?: never - query?: never - url: '/api/hub/workflows' -} + 500: ErrorResponse; +}; -export type PublishHubWorkflowErrors = { - /** - * Bad request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow or profile not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type PublishHubWorkflowError = - PublishHubWorkflowErrors[keyof PublishHubWorkflowErrors] - -export type PublishHubWorkflowResponses = { - /** - * Workflow published to hub - */ - 200: HubWorkflowDetail -} - -export type PublishHubWorkflowResponse = - PublishHubWorkflowResponses[keyof PublishHubWorkflowResponses] +export type UpdateWorkspaceMemberRoleError = UpdateWorkspaceMemberRoleErrors[keyof UpdateWorkspaceMemberRoleErrors]; -export type ListHubWorkflowIndexData = { - body?: never - path?: never - query?: { +export type UpdateWorkspaceMemberRoleResponses = { /** - * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. + * Member role updated */ - status?: Array - } - url: '/api/hub/workflows/index' -} - -export type ListHubWorkflowIndexErrors = { - /** - * Internal server error - */ - 500: ErrorResponse -} + 200: Member; +}; -export type ListHubWorkflowIndexError = - ListHubWorkflowIndexErrors[keyof ListHubWorkflowIndexErrors] +export type UpdateWorkspaceMemberRoleResponse = UpdateWorkspaceMemberRoleResponses[keyof UpdateWorkspaceMemberRoleResponses]; -export type ListHubWorkflowIndexResponses = { - /** - * List of hub workflow template entries - */ - 200: Array -} - -export type ListHubWorkflowIndexResponse = - ListHubWorkflowIndexResponses[keyof ListHubWorkflowIndexResponses] +export type ListWorkspacesData = { + body?: never; + path?: never; + query?: never; + url: '/api/workspaces'; +}; -export type DeleteHubWorkflowData = { - body?: never - path: { +export type ListWorkspacesErrors = { /** - * The share ID of the hub workflow to unpublish. + * Unauthorized */ - share_id: string - } - query?: never - url: '/api/hub/workflows/{share_id}' -} - -export type DeleteHubWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type DeleteHubWorkflowError = - DeleteHubWorkflowErrors[keyof DeleteHubWorkflowErrors] - -export type DeleteHubWorkflowResponses = { - /** - * Successfully unpublished - */ - 204: void -} - -export type DeleteHubWorkflowResponse = - DeleteHubWorkflowResponses[keyof DeleteHubWorkflowResponses] - -export type GetHubWorkflowData = { - body?: never - path: { + 401: ErrorResponse; /** - * The share ID of the hub workflow. + * Feature not enabled for user */ - share_id: string - } - query?: never - url: '/api/hub/workflows/{share_id}' -} - -export type GetHubWorkflowErrors = { - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Workflow JSON too large - */ - 413: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetHubWorkflowError = - GetHubWorkflowErrors[keyof GetHubWorkflowErrors] - -export type GetHubWorkflowResponses = { - /** - * Hub workflow detail - */ - 200: HubWorkflowDetail -} - -export type GetHubWorkflowResponse = - GetHubWorkflowResponses[keyof GetHubWorkflowResponses] - -export type GetPublishedWorkflowData = { - body?: never - path: { + 404: ErrorResponse; /** - * The share ID of the published workflow. + * Internal server error */ - share_id: string - } - query?: never - url: '/api/workflows/published/{share_id}' -} - -export type GetPublishedWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Share not found - */ - 404: ErrorResponse - /** - * Workflow JSON too large - */ - 413: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetPublishedWorkflowError = - GetPublishedWorkflowErrors[keyof GetPublishedWorkflowErrors] - -export type GetPublishedWorkflowResponses = { - /** - * Published workflow details with asset statuses - */ - 200: PublishedWorkflowDetail -} + 500: ErrorResponse; +}; -export type GetPublishedWorkflowResponse = - GetPublishedWorkflowResponses[keyof GetPublishedWorkflowResponses] +export type ListWorkspacesError = ListWorkspacesErrors[keyof ListWorkspacesErrors]; -export type GetExtensionsData = { - body?: never - path?: never - query?: never - url: '/api/extensions' -} +export type ListWorkspacesResponses = { + /** + * List of workspaces + */ + 200: ListWorkspacesResponse; +}; -export type GetExtensionsResponses = { - /** - * URL paths (relative to web root) of available extension JS files - */ - 200: Array -} +export type ListWorkspacesResponse2 = ListWorkspacesResponses[keyof ListWorkspacesResponses]; -export type GetExtensionsResponse = - GetExtensionsResponses[keyof GetExtensionsResponses] +export type CreateWorkspaceData = { + body: CreateWorkspaceRequest; + path?: never; + query?: never; + url: '/api/workspaces'; +}; -export type GetNodeInfoSchemaData = { - body?: never - path?: never - query?: never - url: '/api/experiment/nodes' -} +export type CreateWorkspaceErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Feature not enabled for user + */ + 404: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetNodeInfoSchemaResponses = { - /** - * Full node schema JSON - */ - 200: unknown -} +export type CreateWorkspaceError = CreateWorkspaceErrors[keyof CreateWorkspaceErrors]; -export type GetNodeByIdData = { - body?: never - path: { +export type CreateWorkspaceResponses = { /** - * Node class_type identifier + * Workspace created */ - id: string - } - query?: never - url: '/api/experiment/nodes/{id}' -} + 201: Workspace; +}; -export type GetNodeByIdErrors = { - /** - * Node not found - */ - 404: unknown -} +export type CreateWorkspaceResponse = CreateWorkspaceResponses[keyof CreateWorkspaceResponses]; -export type GetNodeByIdResponses = { - /** - * Node definition JSON - */ - 200: unknown -} +export type DeleteWorkspaceData = { + body?: never; + path: { + /** + * Workspace ID (w-{uuid} format) + */ + id: string; + }; + query?: never; + url: '/api/workspaces/{id}'; +}; -export type GetVhsViewVideoData = { - body?: never - path?: never - query: { +export type DeleteWorkspaceErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * Name of the video file to view + * Owner role required or cannot delete personal workspace */ - filename: string + 403: ErrorResponse; /** - * Type of file (e.g., output, input, temp) + * Workspace not found */ - type?: string + 404: ErrorResponse; /** - * Subfolder path where the file is located + * Internal server error */ - subfolder?: string - } - url: '/api/vhs/viewvideo' -} + 500: ErrorResponse; +}; -export type GetVhsViewVideoErrors = { - /** - * Unauthorized - */ - 401: unknown -} +export type DeleteWorkspaceError = DeleteWorkspaceErrors[keyof DeleteWorkspaceErrors]; -export type GetVhsViewVideoResponses = { - /** - * Video stream - */ - 200: unknown -} +export type DeleteWorkspaceResponses = { + /** + * Workspace deleted + */ + 204: void; +}; -export type GetVhsViewAudioData = { - body?: never - path?: never - query: { +export type DeleteWorkspaceResponse = DeleteWorkspaceResponses[keyof DeleteWorkspaceResponses]; + +export type GetWorkspaceData = { + body?: never; + path: { + /** + * Workspace ID (w-{uuid} format) + */ + id: string; + }; + query?: never; + url: '/api/workspaces/{id}'; +}; + +export type GetWorkspaceErrors = { /** - * Name of the audio file to view + * Unauthorized */ - filename: string + 401: ErrorResponse; /** - * Type of file (e.g., output, input, temp) + * Workspace not found or user not a member */ - type?: string + 404: ErrorResponse; /** - * Subfolder path where the file is located + * Internal server error */ - subfolder?: string - } - url: '/api/vhs/viewaudio' -} - -export type GetVhsViewAudioErrors = { - /** - * Unauthorized - */ - 401: unknown -} + 500: ErrorResponse; +}; -export type GetVhsViewAudioResponses = { - /** - * Audio stream - */ - 200: unknown -} +export type GetWorkspaceError = GetWorkspaceErrors[keyof GetWorkspaceErrors]; -export type GetVhsQueryVideoData = { - body?: never - path?: never - query: { +export type GetWorkspaceResponses = { /** - * Name of the video file to query + * Workspace details */ - filename: string - } - url: '/api/vhs/queryvideo' -} + 200: Workspace; +}; -export type GetVhsQueryVideoErrors = { - /** - * Missing required query parameter. Produced by the oapi-codegen - * wrapper via echo.NewHTTPError; the custom Echo HTTPErrorHandler - * normalizes it to the standard ErrorResponse {code, message} shape - * (BE-1178). - * - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse -} - -export type GetVhsQueryVideoError = - GetVhsQueryVideoErrors[keyof GetVhsQueryVideoErrors] - -export type GetVhsQueryVideoResponses = { - /** - * Video metadata - */ - 200: { - /** - * Source video metadata - */ - source: { - /** - * [width, height] in pixels - */ - size: [number, number] - /** - * Frames per second - */ - fps: number - /** - * Total frame count - */ - frames: number - /** - * Duration in seconds - */ - duration: number - } - } -} - -export type GetVhsQueryVideoResponse = - GetVhsQueryVideoResponses[keyof GetVhsQueryVideoResponses] - -export type GetUsersInfoData = { - body?: never - path?: never - query?: never - url: '/api/users' -} - -export type GetUsersInfoErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse -} +export type GetWorkspaceResponse = GetWorkspaceResponses[keyof GetWorkspaceResponses]; -export type GetUsersInfoError = GetUsersInfoErrors[keyof GetUsersInfoErrors] +export type UpdateWorkspaceData = { + body: UpdateWorkspaceRequest; + path: { + /** + * Workspace ID (w-{uuid} format) + */ + id: string; + }; + query?: never; + url: '/api/workspaces/{id}'; +}; -export type GetUsersInfoResponses = { - /** - * Userdata storage information - */ - 200: { +export type UpdateWorkspaceErrors = { /** - * Where user data is stored (always "server" in cloud) + * Unauthorized */ - storage: string + 401: ErrorResponse; /** - * Whether user data has been migrated (always true in cloud) + * Owner role required */ - migrated: boolean - } -} - -export type GetUsersInfoResponse = - GetUsersInfoResponses[keyof GetUsersInfoResponses] - -export type GetApiViewVideoAliasData = { - body?: never - path?: never - query: { + 403: ErrorResponse; /** - * Name of the file to view (see `/api/view` for the full handler contract) + * Workspace not found */ - filename: string - } - url: '/api/viewvideo' -} - -export type GetApiViewVideoAliasErrors = { - /** - * Unauthorized - */ - 401: unknown -} + 404: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetApiViewVideoAliasResponses = { - /** - * File stream - */ - 200: unknown -} +export type UpdateWorkspaceError = UpdateWorkspaceErrors[keyof UpdateWorkspaceErrors]; -export type GetViewCompatAliasData = { - body?: never - path?: never - query: { +export type UpdateWorkspaceResponses = { /** - * Name of the file to view (see `/api/view` for the full handler contract) + * Workspace updated */ - filename: string - } - url: '/view' -} + 200: Workspace; +}; -export type GetViewCompatAliasErrors = { - /** - * Unauthorized - */ - 401: unknown -} +export type UpdateWorkspaceResponse = UpdateWorkspaceResponses[keyof UpdateWorkspaceResponses]; -export type GetViewCompatAliasResponses = { - /** - * File stream - */ - 200: unknown -} +export type GetStaticExtensionsData = { + body?: never; + path: { + /** + * Extension file path relative to /static/extensions on disk. + */ + path: string; + }; + query?: never; + url: '/extensions/{path}'; +}; -export type GetWebsocketData = { - body?: never - path?: never - query?: { +export type GetStaticExtensionsErrors = { /** - * Stable client identifier used to associate the WebSocket - * connection with the frontend session. If omitted, the server - * generates one. - * + * File not found */ - clientId?: string - } - url: '/ws' -} + 404: unknown; +}; -export type GetWebsocketErrors = { - /** - * Unauthorized - */ - 401: unknown -} - -export type GetTemplateProxyData = { - body?: never - path: { +export type GetStaticExtensionsResponses = { /** - * Template subpath within the versioned GCS bucket. + * Static file */ - path: string - } - query?: never - url: '/templates/{path}' -} - -export type GetTemplateProxyErrors = { - /** - * Template not found. - */ - 404: unknown - /** - * Workflow templates version not available. - */ - 503: unknown -} - -export type GetTemplateProxyResponses = { - /** - * Template file content streamed from GCS. - */ - 200: unknown -} + 200: unknown; +}; export type GetHealthData = { - body?: never - path?: never - query?: never - url: '/health' -} + body?: never; + path?: never; + query?: never; + url: '/health'; +}; export type GetHealthErrors = { - /** - * Service is unhealthy - */ - 503: string -} + /** + * Service is unhealthy + */ + 503: string; +}; -export type GetHealthError = GetHealthErrors[keyof GetHealthErrors] +export type GetHealthError = GetHealthErrors[keyof GetHealthErrors]; export type GetHealthResponses = { - /** - * Service is healthy - */ - 200: string -} - -export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses] - -export type GetMonitoringTasksData = { - body?: never - path?: never - query?: never - url: '/monitoring/tasks' -} - -export type GetMonitoringTasksErrors = { - /** - * Unauthorized - */ - 401: unknown - /** - * Forbidden - */ - 403: unknown -} - -export type GetMonitoringTasksResponses = { - /** - * HTML dashboard - */ - 200: unknown -} - -export type DeleteMonitoringTasksSubpathData = { - body?: never - path: { - /** - * Asynqmon deletion subpath (e.g. delete task). - */ - path: string - } - query?: never - url: '/monitoring/tasks/{path}' -} - -export type DeleteMonitoringTasksSubpathErrors = { - /** - * Unauthorized - */ - 401: unknown - /** - * Forbidden - */ - 403: unknown -} - -export type DeleteMonitoringTasksSubpathResponses = { - /** - * Deletion result - */ - 200: unknown -} - -export type GetMonitoringTasksSubpathData = { - body?: never - path: { - /** - * Asynqmon UI subpath (HTML page, SPA XHR, or static asset). - */ - path: string - } - query?: never - url: '/monitoring/tasks/{path}' -} - -export type GetMonitoringTasksSubpathErrors = { - /** - * Unauthorized - */ - 401: unknown - /** - * Forbidden - */ - 403: unknown -} - -export type GetMonitoringTasksSubpathResponses = { - /** - * Subpath response (asynqmon-determined content type) - */ - 200: unknown -} - -export type PostMonitoringTasksSubpathData = { - body?: never - path: { - /** - * Asynqmon action subpath (e.g. retry, archive). - */ - path: string - } - query?: never - url: '/monitoring/tasks/{path}' -} - -export type PostMonitoringTasksSubpathErrors = { - /** - * Unauthorized - */ - 401: unknown - /** - * Forbidden - */ - 403: unknown -} - -export type PostMonitoringTasksSubpathResponses = { - /** - * Action result - */ - 200: unknown -} - -export type GetPprofData = { - body?: never - path: { - /** - * pprof endpoint name (e.g. heap, goroutine, allocs, block, mutex, threadcreate). - */ - path: string - } - query?: never - url: '/debug/pprof/{path}' -} - -export type GetPprofResponses = { - /** - * Profile data - */ - 200: unknown -} - -export type GetPprofProfileData = { - body?: never - path?: never - query?: never - url: '/debug/pprof/profile' -} - -export type GetPprofProfileResponses = { - /** - * CPU profile data - */ - 200: unknown -} - -export type GetPprofTraceData = { - body?: never - path?: never - query?: never - url: '/debug/pprof/trace' -} - -export type GetPprofTraceResponses = { - /** - * Execution trace data - */ - 200: unknown -} - -export type PostPprofSymbolData = { - body?: never - path?: never - query?: never - url: '/debug/pprof/symbol' -} - -export type PostPprofSymbolResponses = { - /** - * Resolved symbols - */ - 200: unknown -} - -export type GetStaticExtensionsData = { - body?: never - path: { /** - * Extension file path relative to /static/extensions on disk. + * Service is healthy */ - path: string - } - query?: never - url: '/extensions/{path}' -} + 200: string; +}; -export type GetStaticExtensionsErrors = { - /** - * File not found - */ - 404: unknown -} +export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses]; -export type GetStaticExtensionsResponses = { - /** - * Static file - */ - 200: unknown -} +export type GetInternalFolderPathsData = { + body?: never; + path?: never; + query?: never; + url: '/internal/folder_paths'; +}; -export type GetCustomNodeProxyData = { - body?: never - path: { +export type GetInternalFolderPathsResponses = { /** - * Custom node HTTP endpoint path being proxied to the CPU-backed worker. + * Map of folder type name to list of path entries */ - path: string - } - query?: never - url: '/__custom_node_proxy/{path}' -} + 200: { + [key: string]: Array>; + }; +}; -export type GetCustomNodeProxyErrors = { - /** - * Unauthorized - */ - 401: unknown - /** - * Path not in allowlist - */ - 403: unknown -} +export type GetInternalFolderPathsResponse = GetInternalFolderPathsResponses[keyof GetInternalFolderPathsResponses]; -export type GetCustomNodeProxyResponses = { - /** - * Proxied response - */ - 200: unknown -} +export type GetInternalLogsData = { + body?: never; + path?: never; + query?: never; + url: '/internal/logs'; +}; -export type PostCustomNodeProxyData = { - body?: never - path: { +export type GetInternalLogsResponses = { /** - * Custom node HTTP endpoint path being proxied to the CPU-backed worker. + * Log text */ - path: string - } - query?: never - url: '/__custom_node_proxy/{path}' -} + 200: string; +}; -export type PostCustomNodeProxyErrors = { - /** - * Unauthorized - */ - 401: unknown - /** - * Path not in allowlist - */ - 403: unknown -} +export type GetInternalLogsResponse = GetInternalLogsResponses[keyof GetInternalLogsResponses]; -export type PostCustomNodeProxyResponses = { - /** - * Proxied response - */ - 200: unknown -} +export type GetInternalLogsRawData = { + body?: never; + path?: never; + query?: never; + url: '/internal/logs/raw'; +}; -export type GetModelPreviewData = { - body?: never - path: { +export type GetInternalLogsRawResponses = { + /** + * Structured log data + */ + 200: { + entries?: Array<{ + /** + * Message + */ + m?: string; + /** + * Timestamp + */ + t?: number; + }>; + size?: { + cols?: number; + rows?: number; + }; + }; +}; + +export type GetInternalLogsRawResponse = GetInternalLogsRawResponses[keyof GetInternalLogsRawResponses]; + +export type SubscribeToLogsData = { + body: { + /** + * WebSocket client ID + */ + clientId: string; + /** + * Enable or disable log streaming for this client + */ + enabled: boolean; + }; + path?: never; + query?: never; + url: '/internal/logs/subscribe'; +}; + +export type SubscribeToLogsResponses = { /** - * The folder name containing the model. + * Subscription updated */ - folder: string + 200: unknown; +}; + +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 = { /** - * The path index (usually 0 for cloud service). + * Invalid authorize request (pre-redirect failure — unknown client, redirect mismatch, malformed params). Content-negotiated; browser navigations (Accept includes text/html without application/json) receive a self-contained HTML error page instead of JSON. */ - path_index: number + 400: ErrorResponse; /** - * The model filename (with or without .webp extension). + * OAuth disabled */ - 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 ShortLinkRedirectData = { - body?: never - path: { - id: string - } - query?: never - url: '/api/s/{id}' -} - -export type ShortLinkRedirectErrors = { - /** - * Not Found — unknown, expired, revoked, or malformed short-link ID - */ - 404: unknown -} - -export type GetLegacyPromptByIdData = { - body?: never - path: { - prompt_id: string - } - query?: never - url: '/api/prompt/{prompt_id}' -} - -export type GetLegacyPromptByIdErrors = { - /** - * Not Found — use /api/jobs/{prompt_id} instead - */ - 404: unknown -} - -export type GetLegacyHistoryByIdData = { - body?: never - path: { - prompt_id: string - } - query?: never - url: '/api/history/{prompt_id}' -} - -export type GetLegacyHistoryByIdErrors = { - /** - * Not Found — use /api/jobs/{prompt_id} instead - */ - 404: unknown -} - -export type GetLegacyJobByIdData = { - body?: never - path: { - job_id: string - } - query?: never - url: '/api/job/{job_id}' -} - -export type GetLegacyJobByIdErrors = { - /** - * Not Found — use /api/jobs/{job_id} instead - */ - 404: unknown -} - -export type GetLegacyJobOutputsData = { - body?: never - path: { - job_id: string - } - query?: never - url: '/api/job/{job_id}/outputs' -} + 404: ErrorResponse; +}; -export type GetLegacyJobOutputsErrors = { - /** - * Not Found — use /api/jobs/{job_id} instead - */ - 404: unknown -} - -export type GetLegacyModelsData = { - body?: never - path?: never - query?: never - url: '/api/models' -} - -export type GetLegacyModelsErrors = { - /** - * Not Found — use /api/experiment/models instead - */ - 404: unknown -} - -export type GetLegacyModelsByFolderData = { - body?: never - path: { - folder: string - } - query?: never - url: '/api/models/{folder}' -} - -export type GetLegacyModelsByFolderErrors = { - /** - * Not Found — use /api/experiment/models/{folder} instead - */ - 404: unknown -} - -export type GetLegacyObjectInfoByNodeClassData = { - body?: never - path: { - node_class: string - } - query?: never - url: '/api/object_info/{node_class}' -} +export type GetOAuthAuthorizeError = GetOAuthAuthorizeErrors[keyof GetOAuthAuthorizeErrors]; -export type GetLegacyObjectInfoByNodeClassErrors = { - /** - * Not Found — use /api/object_info instead - */ - 404: unknown -} +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 GetLegacyUserdataV2Data = { - body?: never - path?: never - query?: never - url: '/api/v2/userdata' -} +export type GetOAuthAuthorizeResponse = GetOAuthAuthorizeResponses[keyof GetOAuthAuthorizeResponses]; -export type GetLegacyUserdataV2Errors = { - /** - * Not Found — use /api/userdata instead - */ - 404: unknown -} +export type PostOAuthAuthorizeData = { + body: { + csrf_token: string; + decision: 'allow' | 'deny'; + oauth_request_id: string; + workspace_id: string; + }; + path?: never; + query?: never; + url: '/oauth/authorize'; +}; -export type GetAssetContentData = { - body?: never - path: { +export type PostOAuthAuthorizeErrors = { /** - * Asset ID + * Bad request (CSRF mismatch, expired/consumed request, inaccessible workspace) */ - id: string - } - query?: { + 400: ErrorResponse; /** - * Content-Disposition for the response: `attachment` (download) or - * `inline` (render in browser). Defaults to `attachment`. - * + * Scope broadening on consent re-grant — fresh consent flow required */ - disposition?: 'inline' | 'attachment' - } - url: '/api/assets/{id}/content' -} - -export type GetAssetContentErrors = { - /** - * Asset not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetAssetContentError = - GetAssetContentErrors[keyof GetAssetContentErrors] - -export type GetAssetContentResponses = { - /** - * Asset content stream (local runtime streams the bytes directly) - */ - 200: Blob | File -} - -export type GetAssetContentResponse = - GetAssetContentResponses[keyof GetAssetContentResponses] - -export type GetLegacyViewMetadataData = { - body?: never - path: { - folder_name: string - } - query?: never - url: '/api/view_metadata/{folder_name}' -} + 403: ErrorResponse; + /** + * OAuth disabled + */ + 404: ErrorResponse; +}; -export type GetLegacyViewMetadataErrors = { - /** - * Not Found — use /api/experiment/models instead - */ - 404: unknown -} +export type PostOAuthAuthorizeError = PostOAuthAuthorizeErrors[keyof PostOAuthAuthorizeErrors]; -export type GetEmbeddingsData = { - body?: never - path?: never - query?: never - url: '/api/embeddings' -} +export type PostOAuthAuthorizeResponses = { + /** + * Redirect URL for the frontend to navigate to (allow → with code+state; deny → with error+state) + */ + 200: OAuthAuthorizeRedirectResponse; +}; -export type GetEmbeddingsResponses = { - /** - * Embedding names - */ - 200: Array -} +export type PostOAuthAuthorizeResponse = PostOAuthAuthorizeResponses[keyof PostOAuthAuthorizeResponses]; -export type GetEmbeddingsResponse = - GetEmbeddingsResponses[keyof GetEmbeddingsResponses] +export type PostOAuthRegisterData = { + body: OAuthRegisterRequest; + path?: never; + query?: never; + url: '/oauth/register'; +}; -export type FreeMemoryData = { - body?: { +export type PostOAuthRegisterErrors = { /** - * Unload all models from VRAM/RAM + * Bad request. Two shapes possible: `OAuthRegisterError` (RFC 7591 §3.2.2, emitted by the handler for invalid client metadata, reserved client_name, etc.) OR `ErrorResponse` (emitted by the strict-server binding layer when the request body fails OpenAPI-schema validation — malformed JSON, missing required fields, `additionalProperties: false` violations — normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler, BE-1178). + * */ - unload_models?: boolean + 400: OAuthRegisterBadRequestResponse; /** - * Run garbage collection and free cached memory + * OAuth disabled */ - free_memory?: boolean - } - path?: never - query?: never - url: '/api/free' -} - -export type FreeMemoryResponses = { - /** - * Memory freed - */ - 200: unknown -} - -export type GetI18nData = { - body?: never - path?: never - query?: never - url: '/api/i18n' -} - -export type GetI18nResponses = { - /** - * Nested map of locale to translation key-value pairs - */ - 200: { - [key: string]: unknown - } -} + 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 GetI18nResponse = GetI18nResponses[keyof GetI18nResponses] +export type PostOAuthRegisterError = PostOAuthRegisterErrors[keyof PostOAuthRegisterErrors]; -export type GetInternalFolderPathsData = { - body?: never - path?: never - query?: never - url: '/internal/folder_paths' -} +export type PostOAuthRegisterResponses = { + /** + * Registered. Body echoes the metadata RFC 7591 §3.2.1 requires. + */ + 201: OAuthRegisterResponse; +}; -export type GetInternalFolderPathsResponses = { - /** - * Map of folder type name to list of path entries - */ - 200: { - [key: string]: Array> - } -} +export type PostOAuthRegisterResponse = PostOAuthRegisterResponses[keyof PostOAuthRegisterResponses]; -export type GetInternalFolderPathsResponse = - GetInternalFolderPathsResponses[keyof GetInternalFolderPathsResponses] +export type PostOAuthTokenData = { + body: { + client_id: string; + client_secret?: string; + code?: string; + code_verifier?: string; + grant_type: 'authorization_code' | 'refresh_token'; + redirect_uri?: string; + refresh_token?: string; + scope?: string; + }; + path?: never; + query?: never; + url: '/oauth/token'; +}; -export type GetInternalLogsData = { - body?: never - path?: never - query?: never - url: '/internal/logs' -} +export type PostOAuthTokenErrors = { + /** + * RFC 6749 §5.2 error + */ + 400: OAuthTokenError; + /** + * OAuth disabled + */ + 404: ErrorResponse; +}; -export type GetInternalLogsResponses = { - /** - * Log text - */ - 200: string -} +export type PostOAuthTokenError = PostOAuthTokenErrors[keyof PostOAuthTokenErrors]; -export type GetInternalLogsResponse = - GetInternalLogsResponses[keyof GetInternalLogsResponses] +export type PostOAuthTokenResponses = { + /** + * New token pair + */ + 200: OAuthTokenResponse; +}; -export type GetInternalLogsRawData = { - body?: never - path?: never - query?: never - url: '/internal/logs/raw' -} +export type PostOAuthTokenResponse = PostOAuthTokenResponses[keyof PostOAuthTokenResponses]; -export type GetInternalLogsRawResponses = { - /** - * Structured log data - */ - 200: { - entries?: Array<{ - /** - * Timestamp - */ - t?: number - /** - * Message - */ - m?: string - }> - size?: { - cols?: number - rows?: number - } - } -} - -export type GetInternalLogsRawResponse = - GetInternalLogsRawResponses[keyof GetInternalLogsRawResponses] +export type GetTemplateProxyData = { + body?: never; + path: { + /** + * Template subpath within the versioned GCS bucket. + */ + path: string; + }; + query?: never; + url: '/templates/{path}'; +}; -export type SubscribeToLogsData = { - body: { +export type GetTemplateProxyErrors = { /** - * WebSocket client ID + * Template not found. */ - clientId: string + 404: unknown; /** - * Enable or disable log streaming for this client + * Workflow templates version not available. */ - enabled: boolean - } - path?: never - query?: never - url: '/internal/logs/subscribe' -} - -export type SubscribeToLogsResponses = { - /** - * Subscription updated - */ - 200: unknown -} - -export type PruneAssetsData = { - body?: never - path?: never - query?: never - url: '/api/assets/prune' -} + 503: unknown; +}; -export type PruneAssetsResponses = { - /** - * Prune result - */ - 200: { - status?: string +export type GetTemplateProxyResponses = { /** - * Number of assets marked as missing + * Template file content streamed from GCS. */ - marked?: number - } -} + 200: unknown; +}; -export type PruneAssetsResponse = - PruneAssetsResponses[keyof PruneAssetsResponses] +export type GetViewCompatAliasData = { + body?: never; + path?: never; + query: { + /** + * Name of the file to view (see `/api/view` for the full handler contract) + */ + filename: string; + }; + url: '/view'; +}; -export type SeedAssetsData = { - body?: { +export type GetViewCompatAliasErrors = { /** - * Root folder paths to scan (if omitted, scans all) + * Unauthorized */ - roots?: Array - } - path?: never - query?: never - url: '/api/assets/seed' -} + 401: unknown; +}; -export type SeedAssetsResponses = { - /** - * Seed started - */ - 200: { - status?: string - } -} - -export type SeedAssetsResponse = SeedAssetsResponses[keyof SeedAssetsResponses] - -export type GetAssetSeedStatusData = { - body?: never - path?: never - query?: never - url: '/api/assets/seed/status' -} - -export type GetAssetSeedStatusResponses = { - /** - * Scan progress details (files scanned, total, status, etc.) - */ - 200: { - [key: string]: unknown - } -} - -export type GetAssetSeedStatusResponse = - GetAssetSeedStatusResponses[keyof GetAssetSeedStatusResponses] +export type GetViewCompatAliasResponses = { + /** + * File stream + */ + 200: unknown; +}; -export type CancelAssetSeedData = { - body?: never - path?: never - query?: never - url: '/api/assets/seed/cancel' -} +export type GetWebsocketData = { + body?: never; + path?: never; + query?: { + /** + * Stable client identifier used to associate the WebSocket + * connection with the frontend session. If omitted, the server + * generates one. + * + */ + clientId?: string; + }; + url: '/ws'; +}; -export type CancelAssetSeedResponses = { - /** - * Scan cancelled - */ - 200: { - status?: string - } -} - -export type CancelAssetSeedResponse = - CancelAssetSeedResponses[keyof CancelAssetSeedResponses] +export type GetWebsocketErrors = { + /** + * Unauthorized + */ + 401: unknown; +}; diff --git a/packages/ingest-types/src/zod.gen.ts b/packages/ingest-types/src/zod.gen.ts index b39e7f0a1e9..a417f516334 100644 --- a/packages/ingest-types/src/zod.gen.ts +++ b/packages/ingest-types/src/zod.gen.ts @@ -1,4666 +1,3886 @@ // This file is auto-generated by @hey-api/openapi-ts -import { z } from 'zod' +import { z } from 'zod'; /** - * Response indicating whether a Hub username is available. - */ -export const zHubUsernameCheckResponse = z.object({ - username: z.string(), - available: z.boolean(), - suggestions: z.array(z.string()).optional(), - validation_error: z.string().optional() -}) - -/** - * Response containing a signed upload URL and the target asset path. - */ -export const zHubAssetUploadUrlResponse = z.object({ - upload_url: z.string(), - public_url: z.string(), - token: z.string() -}) - -/** - * Request body for requesting a signed upload URL for a Hub asset. + * Subscription tier (uppercase to match comfy-api) */ -export const zHubAssetUploadUrlRequest = z.object({ - filename: z.string(), - content_type: z.string() -}) +export const zSubscriptionTier = z.enum([ + 'FREE', + 'STANDARD', + 'CREATOR', + 'PRO', + 'FOUNDERS_EDITION', + 'TEAM' +]); /** - * Partial update for a published hub workflow (admin moderation). All fields are optional. Semantics match UpdateHubProfileRequest / avatar_token: - * - * * field omitted or null — leave unchanged - * * string field = "" — clear (for clearable string fields) - * * array field = [] — clear the list - * * any other value — set to the provided value - * - * Array fields use full-replacement (PUT) semantics when a value is supplied. The two single-value thumbnail token fields accept only upload tokens (not existing URLs) since omitting them already expresses "keep the current value". - * Backend note: cleared string columns are persisted as the empty string "" in the Ent schema (description, thumbnail_url, thumbnail_comparison_url, tutorial_url). thumbnail_type is the only true SQL-nullable column but is not clearable via this endpoint. - * + * Workspace entity annotated with the requesting user's role. */ -export const zUpdateHubWorkflowRequest = z.object({ - name: z.string().min(1).nullish(), - description: z.string().nullish(), - tags: z.array(z.string()).nullish(), - models: z.array(z.string()).nullish(), - custom_nodes: z.array(z.string()).nullish(), - tutorial_url: z.string().nullish(), - thumbnail_type: z.enum(['image', 'video', 'image_comparison']).optional(), - thumbnail_token: z.string().nullish(), - thumbnail_comparison_token: z.string().nullish(), - sample_image_tokens_or_urls: z.array(z.string()).nullish(), - metadata: z.record(z.unknown()).nullish() -}) +export const zWorkspaceWithRole = z.object({ + created_at: z.string().datetime(), + id: z.string(), + joined_at: z.string().datetime(), + name: z.string(), + role: z.enum(['owner', 'member']), + subscription_tier: zSubscriptionTier.optional(), + type: z.enum(['personal', 'team']) +}); /** - * Request body for publishing or updating a workflow on the Hub. + * Abbreviated workspace metadata used in list responses. */ -export const zPublishHubWorkflowRequest = z.object({ - username: z.string(), - name: z.string(), - workflow_filename: z.string(), - asset_ids: z.array(z.string()), - description: z.string().optional(), - tags: z.array(z.string()).optional(), - models: z.array(z.string()).optional(), - custom_nodes: z.array(z.string()).optional(), - tutorial_url: z.string().optional(), - metadata: z.record(z.unknown()).optional(), - thumbnail_type: z.enum(['image', 'video', 'image_comparison']).optional(), - thumbnail_token_or_url: z.string().optional(), - thumbnail_comparison_token_or_url: z.string().optional(), - sample_image_tokens_or_urls: z.array(z.string()).optional() -}) +export const zWorkspaceSummary = z.object({ + id: z.string(), + name: z.string(), + type: z.enum(['personal', 'team']) +}); /** - * Lightweight asset reference used in workflow publishing payloads. + * Metadata for a workspace-scoped API key (secret is never returned). */ -export const zAssetInfo = z.object({ - id: z.string(), - name: z.string(), - preview_url: z.string(), - storage_url: z.string(), - model: z.boolean(), - public: z.boolean(), - in_library: z.boolean() -}) +export const zWorkspaceApiKeyInfo = z.object({ + created_at: z.string().datetime(), + description: z.string().max(5000), + expires_at: z.string().datetime().optional(), + id: z.string().uuid(), + key_prefix: z.string(), + last_used_at: z.string().datetime().optional(), + name: z.string(), + revoked_at: z.string().datetime().optional(), + user_id: z.string(), + workspace_id: z.string() +}); /** - * Abbreviated Hub profile used in workflow listings. + * Full workspace entity with configuration and ownership details. */ -export const zHubProfileSummary = z.object({ - username: z.string(), - display_name: z.string().optional(), - avatar_url: z.string().optional() -}) +export const zWorkspace = z.object({ + created_at: z.string().datetime(), + id: z.string(), + name: z.string(), + type: z.enum(['personal', 'team']) +}); /** - * Reference to a Hub label by ID. + * Metadata for a single workflow version. */ -export const zLabelRef = z.object({ - name: z.string(), - display_name: z.string() -}) +export const zWorkflowVersionResponse = z.object({ + created_at: z.string().datetime(), + created_by: z.string(), + id: z.string(), + latest_version: z.number().int(), + version: z.number().int() +}); /** - * Public workflow status. NULL in the database is represented as pending in API responses. + * Full workflow version including the serialized workflow JSON. */ -export const zHubWorkflowStatus = z.enum([ - 'pending', - 'approved', - 'rejected', - 'deprecated' -]) +export const zWorkflowVersionContentResponse = z.object({ + created_at: z.string().datetime(), + created_by: z.string(), + dependency_asset_ids: z.array(z.string()).optional(), + id: z.string(), + version: z.number().int(), + workflow_json: z.record(z.unknown()) +}); /** - * Full Hub workflow detail including versions, assets, and statistics. + * Reference to the parent workflow from which this workflow was forked. */ -export const zHubWorkflowDetail = z.object({ - share_id: z.string(), - workflow_id: z.string(), - name: z.string(), - status: zHubWorkflowStatus, - description: z.string().optional(), - tags: z.array(zLabelRef).optional(), - thumbnail_type: z.enum(['image', 'video', 'image_comparison']).optional(), - thumbnail_url: z.string().optional(), - thumbnail_comparison_url: z.string().optional(), - models: z.array(zLabelRef).optional(), - custom_nodes: z.array(zLabelRef).optional(), - tutorial_url: z.string().optional(), - metadata: z.record(z.unknown()).optional(), - sample_image_urls: z.array(z.string()).optional(), - publish_time: z.string().datetime().nullish(), - workflow_json: z.record(z.unknown()), - assets: z.array(zAssetInfo), - profile: zHubProfileSummary -}) +export const zWorkflowForkedFrom = z.object({ + workflow_id: z.string().optional(), + workflow_version_id: z.string().optional() +}); /** - * Abbreviated Hub workflow metadata used in search and listing results. + * Full workflow entity including metadata and version history. */ -export const zHubWorkflowSummary = z.object({ - share_id: z.string(), - name: z.string(), - status: zHubWorkflowStatus, - description: z.string().optional(), - tags: z.array(zLabelRef).optional(), - models: z.array(zLabelRef).optional(), - custom_nodes: z.array(zLabelRef).optional(), - thumbnail_type: z.enum(['image', 'video', 'image_comparison']).optional(), - thumbnail_url: z.string().optional(), - thumbnail_comparison_url: z.string().optional(), - publish_time: z.string().datetime().nullish(), - profile: zHubProfileSummary, - metadata: z.record(z.unknown()).optional(), - tutorial_url: z.string().optional(), - sample_image_urls: z.array(z.string()).optional() -}) +export const zWorkflowResponse = z.object({ + created_at: z.string().datetime(), + created_by: z.string(), + default_view: z.enum(['workflow', 'app']).optional(), + description: z.string().optional(), + forked_from: zWorkflowForkedFrom.optional(), + id: z.string(), + latest_version: z.number().int(), + name: z.string().optional(), + updated_at: z.string().datetime() +}); /** - * Paginated list of Hub workflows matching search criteria. + * Lightweight asset reference used in workflow publishing payloads. */ -export const zHubWorkflowListResponse = z.object({ - workflows: z.array(z.union([zHubWorkflowSummary, zHubWorkflowDetail])), - next_cursor: z.string().optional() -}) +export const zAssetInfo = z.object({ + id: z.string(), + in_library: z.boolean(), + model: z.boolean(), + name: z.string(), + preview_url: z.string(), + public: z.boolean(), + storage_url: z.string() +}); /** - * Metadata for a single Hub label. + * Publishing metadata for a workflow shared to the Hub. */ -export const zHubLabelInfo = z.object({ - name: z.string(), - display_name: z.string(), - description: z.string().optional(), - type: z.enum(['tag', 'model', 'custom_node']) -}) +export const zWorkflowPublishInfo = z.object({ + assets: z.array(zAssetInfo), + listed: z.boolean(), + publish_time: z.string().datetime().nullish(), + share_id: z.string(), + workflow_id: z.string() +}); /** - * List of available Hub labels for categorizing workflows. + * Pagination metadata included in list responses. Supports both legacy + * offset/limit pagination and cursor-based pagination. When cursor-based + * pagination is used, `next_cursor` is the primary pagination token and + * `offset`/`total` may be zero. + * */ -export const zHubLabelListResponse = z.object({ - labels: z.array(zHubLabelInfo) -}) +export const zPaginationInfo = z.object({ + has_more: z.boolean(), + limit: z.number().int().gte(1), + next_cursor: z.string().optional(), + offset: z.number().int().gte(0), + total: z.number().int().gte(0) +}); /** - * Entry in the curated workflow template gallery shown on the home page. + * Paginated list of saved workflows. */ -export const zHubWorkflowTemplateEntry = z.object({ - name: z.string(), - title: z.string(), - status: zHubWorkflowStatus, - description: z.string().optional(), - tags: z.array(z.string()).optional(), - models: z.array(z.string()).optional(), - requiresCustomNodes: z.array(z.string()).optional(), - thumbnailVariant: z.string().optional(), - mediaType: z.string().optional(), - mediaSubtype: z.string().optional(), - size: 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(), - vram: 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(), - usage: 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(), - searchRank: 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(), - isEssential: z.boolean().optional(), - openSource: z.boolean().optional(), - profile: zHubProfileSummary.optional(), - tutorialUrl: z.string().optional(), - logos: z.array(z.record(z.unknown())).optional(), - date: z.string().optional(), - io: z - .object({ - inputs: z.array(z.record(z.unknown())).optional(), - outputs: z.array(z.record(z.unknown())).optional() - }) - .optional(), - includeOnDistributions: z.array(z.string()).optional(), - thumbnailUrl: z.string().optional(), - thumbnailComparisonUrl: z.string().optional(), - shareId: z.string().optional(), - extendedDescription: z.string().optional(), - metaDescription: z.string().optional(), - howToUse: z.array(z.string()).optional(), - suggestedUseCases: z.array(z.string()).optional(), - faqItems: z - .array( - z.object({ - question: z.string(), - answer: z.string() - }) - ) - .optional(), - contentTemplate: z.string().optional() -}) +export const zWorkflowListResponse = z.object({ + data: z.array(zWorkflowResponse), + pagination: zPaginationInfo +}); /** - * Request body for updating an existing Hub profile. + * Response containing assets associated with a workflow. */ -export const zUpdateHubProfileRequest = z.object({ - display_name: z.string().optional(), - description: z.string().optional(), - avatar_token: z.string().nullish(), - website_urls: z.array(z.string()).optional() -}) +export const zWorkflowApiAssetsResponse = z.object({ + assets: z.array(zAssetInfo) +}); /** - * Request body for creating a new Hub profile. + * Request body for querying assets associated with a workflow. */ -export const zCreateHubProfileRequest = z.object({ - workspace_id: z.string(), - username: z.string(), - display_name: z.string().optional(), - description: z.string().optional(), - avatar_token: z.string().optional(), - website_urls: z.array(z.string()).optional() -}) +export const zWorkflowApiAssetsRequest = z.object({ + workflow_api_json: z.record(z.unknown()) +}); /** - * Full public profile for a Hub creator. + * Details of a single validation error encountered during asset operations. */ -export const zHubProfile = z.object({ - username: z.string(), - display_name: z.string().optional(), - description: z.string().optional(), - avatar_url: z.string().optional(), - website_urls: z.array(z.string()).optional() -}) +export const zValidationError = z.object({ + code: z.string(), + field: z.string(), + message: z.string() +}); /** - * Response after importing published workflow assets. + * Result of validating a set of asset operations. */ -export const zImportPublishedAssetsResponse = z.object({ - assets: z.array(zAssetInfo) -}) +export const zValidationResult = z.object({ + errors: z.array(zValidationError).optional(), + is_valid: z.boolean(), + warnings: z.array(zValidationError).optional() +}); /** - * Request body for importing assets from a published workflow. + * User information response */ -export const zImportPublishedAssetsRequest = z.object({ - published_asset_ids: z.array(z.string()), - share_id: z.string().nullish() -}) +export const zUserResponse = z.object({ + id: z.string(), + status: z.string() +}); /** - * Full detail of a publicly published workflow on the Hub. + * User data listing entry with file metadata (path, size, modification time). */ -export const zPublishedWorkflowDetail = z.object({ - share_id: z.string(), - workflow_id: z.string(), - name: z.string(), - listed: z.boolean(), - publish_time: z.string().datetime().nullish(), - workflow_json: z.record(z.unknown()), - assets: z.array(zAssetInfo) -}) +export const zUserDataResponseFull = z.object({ + modified: 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(), + path: z.string().optional(), + size: z.number().int().optional() +}); /** - * Response containing assets associated with a workflow. + * Request body for updating an existing workspace's settings. */ -export const zWorkflowApiAssetsResponse = z.object({ - assets: z.array(zAssetInfo) -}) +export const zUpdateWorkspaceRequest = z.object({ + name: z.string().min(1).max(100).optional() +}); /** - * Request body for querying assets associated with a workflow. + * Request body for updating an existing saved workflow. */ -export const zWorkflowApiAssetsRequest = z.object({ - workflow_api_json: z.record(z.unknown()) -}) +export const zUpdateWorkflowRequest = z.object({ + default_view: z.enum(['workflow', 'app']).optional(), + description: z.string().optional(), + name: z.string().optional() +}); /** - * Request body for publishing workflow assets to the Hub. + * Request body for updating an existing user secret. */ -export const zPublishWorkflowAssetsRequest = z.object({ - asset_ids: z.array(z.string()) -}) +export const zUpdateSecretRequest = z.object({ + name: z.string().min(1).max(255).optional(), + secret_value: z.string().min(1).optional() +}); /** - * Publishing metadata for a workflow shared to the Hub. + * Request body for changing a workspace member's role. */ -export const zWorkflowPublishInfo = z.object({ - workflow_id: z.string(), - share_id: z.string(), - publish_time: z.string().datetime().nullish(), - listed: z.boolean(), - assets: z.array(zAssetInfo) -}) +export const zUpdateMemberRoleRequest = z.object({ + role: z.enum(['owner', 'member']) +}); /** - * Request body for forking an existing workflow into the user's account. + * Request body for updating an existing Hub profile. */ -export const zForkWorkflowRequest = z.object({ - source_version: z.number().int(), - name: z.string().optional() -}) +export const zUpdateHubProfileRequest = z.object({ + avatar_token: z.string().nullish(), + description: z.string().optional(), + display_name: z.string().optional(), + website_urls: z.array(z.string()).optional() +}); /** - * Full workflow version including the serialized workflow JSON. + * Pre/post-discount price for a team credit stop, in cents. */ -export const zWorkflowVersionContentResponse = z.object({ - id: z.string(), - version: z.number().int(), - workflow_json: z.record(z.unknown()), - created_by: z.string(), - created_at: z.string().datetime(), - dependency_asset_ids: z.array(z.string()).optional() -}) +export const zTeamCreditStopPrice = z.object({ + list_price_cents: 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' }), + price_cents: 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' }) +}); /** - * Metadata for a single workflow version. + * A selectable preset on the team pricing slider. Echoed on subscribe via + * team_credit_stop_id; the backend owns the resolved amounts. credits is a + * RAW monthly credit count (not cents). Save% is derived by the FE as + * (list_price_cents - price_cents) / list_price_cents. + * */ -export const zWorkflowVersionResponse = z.object({ - id: z.string(), - version: z.number().int(), - latest_version: z.number().int(), - created_by: z.string(), - created_at: z.string().datetime() -}) +export const zTeamCreditStop = z.object({ + credits: 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' }), + id: z.string(), + monthly: zTeamCreditStopPrice, + yearly: zTeamCreditStopPrice +}); /** - * Request body for creating a new version of a saved workflow. + * Credit-stop ladder for the pricing slider (BE-1254). Returned by GET /api/billing/plans for every workspace regardless of the caller's token or workspace type (the personal/team distinction was removed); omitted only when the catalog defines no stops. */ -export const zCreateWorkflowVersionRequest = z.object({ - base_version: z.number().int(), - workflow_json: z.record(z.unknown()) -}) +export const zTeamCreditStops = z.object({ + default_stop_index: z.number().int(), + stops: z.array(zTeamCreditStop) +}); /** - * Pagination metadata included in list responses. Supports both legacy - * offset/limit pagination and cursor-based pagination. When cursor-based - * pagination is used, `next_cursor` is the primary pagination token and - * `offset`/`total` may be zero. + * The team credit stop a workspace is currently subscribed to: the + * per-workspace slider choice recorded at subscribe time + * (workspace_subscriptions.team_credit_stop_id). Amounts are owned by the + * catalog, not the subscription row. Returned on GET /api/billing/status + * for per-credit Team plans (BE-1254). * */ -export const zPaginationInfo = z.object({ - offset: z.number().int().gte(0), - limit: z.number().int().gte(1), - total: z.number().int().gte(0), - has_more: z.boolean(), - next_cursor: z.string().optional() -}) +export const zTeamCreditStopSummary = z.object({ + credits_monthly: 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' }), + id: z.string(), + stop_usd: 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' }) +}); /** - * Reference to the parent workflow from which this workflow was forked. + * Task data for list views */ -export const zWorkflowForkedFrom = z.object({ - workflow_id: z.string().optional(), - workflow_version_id: z.string().optional() -}) +export const zTaskEntry = z.object({ + completed_at: z.string().datetime().optional(), + create_time: z.string().datetime(), + id: z.string().uuid(), + started_at: z.string().datetime().optional(), + status: z.enum([ + 'created', + 'running', + 'completed', + 'failed' + ]), + task_name: z.string() +}); /** - * Full workflow entity including metadata and version history. + * Paginated list of background tasks for the authenticated user. */ -export const zWorkflowResponse = z.object({ - id: z.string(), - name: z.string().optional(), - description: z.string().optional(), - default_view: z.enum(['workflow', 'app']).optional(), - latest_version: z.number().int(), - forked_from: zWorkflowForkedFrom.optional(), - created_by: z.string(), - created_at: z.string().datetime(), - updated_at: z.string().datetime() -}) +export const zTasksListResponse = z.object({ + pagination: zPaginationInfo, + tasks: z.array(zTaskEntry) +}); /** - * Paginated list of saved workflows. + * Full task details including payload and result */ -export const zWorkflowListResponse = z.object({ - data: z.array(zWorkflowResponse), - pagination: zPaginationInfo -}) +export const zTaskResponse = z.object({ + completed_at: z.string().datetime().optional(), + create_time: z.string().datetime(), + error_message: z.string().optional(), + id: z.string().uuid(), + idempotency_key: z.string(), + payload: z.record(z.unknown()), + result: z.record(z.unknown()).optional(), + started_at: z.string().datetime().optional(), + status: z.enum([ + 'created', + 'running', + 'completed', + 'failed' + ]), + task_name: z.string(), + update_time: z.string().datetime() +}); /** - * Request body for updating an existing saved workflow. + * Response after adding, updating, or removing tags on an asset. */ -export const zUpdateWorkflowRequest = z.object({ - name: z.string().optional(), - description: z.string().optional(), - default_view: z.enum(['workflow', 'app']).optional() -}) +export const zTagsModificationResponse = z.object({ + added: z.array(z.string()).optional(), + already_present: z.array(z.string()).optional(), + not_present: z.array(z.string()).optional(), + removed: z.array(z.string()).optional(), + total_tags: z.array(z.string()) +}); /** - * Request body for creating a new saved workflow. + * Metadata for a single tag that can be applied to assets. */ -export const zCreateWorkflowRequest = z.object({ - name: z.string().optional(), - description: z.string().optional(), - default_view: z.enum(['workflow', 'app']).optional(), - workflow_json: z.record(z.unknown()), - forked_from_workflow_id: z.string().optional(), - forked_from_workflow_version_id: z.string().optional() -}) +export const zTagInfo = z.object({ + count: z.number().int(), + name: z.string() +}); /** - * Request body for forwarding a comfy-api audit/history event. Identify the target workspace by either user_id (cloud resolves the user's personal workspace via the converged identity, BE-1047) or an explicit workspace_id. At least one must be provided; workspace_id wins when both are set. + * System statistics response */ -export const zHistoryEventRequest = z.object({ - user_id: z.string().optional(), - workspace_id: z.string().optional(), - event_type: z.string().min(1), - event_id: z.string().min(1), - params: z.record(z.unknown()).optional(), - auth_method: z.enum(['api_key', 'bearer_token']).optional(), - customer_ref: z.string().optional(), - timestamp: z.string().datetime().optional() -}) +export const zSystemStatsResponse = z.object({ + devices: z.array(z.object({ + name: z.string(), + type: z.string(), + vram_free: z.number().optional(), + vram_total: z.number().optional() + })), + system: z.object({ + argv: z.array(z.string()), + cloud_version: z.string().optional(), + comfyui_frontend_version: z.string().optional(), + comfyui_version: z.string(), + deploy_environment: z.string().optional(), + embedded_python: z.boolean(), + os: z.string(), + python_version: z.string(), + pytorch_version: z.string(), + ram_free: z.number(), + ram_total: z.number(), + workflow_templates_version: z.string().optional() + }) +}); /** - * Response after recording partner usage data. + * Billing period (uppercase to match comfy-api) */ -export const zPartnerUsageResponse = z.object({ - status: z.string() -}) +export const zSubscriptionDuration = z.enum(['MONTHLY', 'ANNUAL']); /** - * Request body for reporting partner resource usage (admin endpoint). + * Response after successfully subscribing to a billing plan. */ -export const zPartnerUsageRequest = z.object({ - workspace_id: z.string().min(1), - user_id: z.string().optional(), - transaction_id: z.string().min(1), - event_type: z.string().min(1), - timestamp: z.string().datetime().optional(), - properties: z.record(z.unknown()).optional() -}) +export const zSubscribeResponse = z.object({ + billing_op_id: z.string(), + effective_at: z.string().datetime().optional(), + payment_method_url: z.string().optional(), + status: z.enum([ + 'subscribed', + 'needs_payment_method', + 'pending_payment' + ]) +}); /** - * Status of an asynchronous billing operation. + * Request body for subscribing a workspace to a billing plan. */ -export const zBillingOpStatusResponse = z.object({ - id: z.string(), - status: z.enum(['pending', 'succeeded', 'failed']), - error_message: z.string().optional(), - started_at: z.string().datetime(), - completed_at: z.string().datetime().optional() -}) +export const zSubscribeRequest = z.object({ + billing_cycle: z.enum(['monthly', 'yearly']).optional(), + cancel_url: z.string().optional(), + idempotency_key: z.string().optional(), + plan_slug: z.string(), + return_url: z.string().optional(), + team_credit_stop_id: z.string().optional() +}); /** - * Response after successfully purchasing a credit top-up. + * User secret metadata (the secret value itself is never returned after creation). */ -export const zCreateTopupResponse = z.object({ - billing_op_id: z.string(), - topup_id: z.string(), - status: z.enum(['pending', 'completed', 'failed']), - amount_cents: 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' - }) -}) +export const zSecretResponse = z.object({ + created_at: z.string().datetime(), + id: z.string().uuid(), + last_used_at: z.string().datetime().optional(), + name: z.string(), + provider: z.string().optional(), + updated_at: z.string().datetime() +}); /** - * Request body for purchasing a one-time credit top-up. + * A provider the user may configure a secret for. The shape is deliberately minimal (identifier only) and reserved for future per-provider fields such as sub-keys. */ -export const zCreateTopupRequest = z.object({ - amount_cents: z.coerce - .bigint() - .gte(BigInt(500)) - .max(BigInt('9223372036854775807'), { - message: 'Invalid value: Expected int64 to be <= 9223372036854775807' - }), - idempotency_key: z.string().optional() -}) +export const zSecretProvider = z.object({ + id: z.string() +}); /** - * Response containing a redirect URL to the payment portal. + * The providers available to the authenticated user in the current workspace. */ -export const zPaymentPortalResponse = z.object({ - url: z.string() -}) +export const zSecretProvidersResponse = z.object({ + data: z.array(zSecretProvider) +}); /** - * Request body for generating a payment portal session URL. + * List of user secrets with metadata only. */ -export const zPaymentPortalRequest = z.object({ - return_url: z.string().optional() -}) +export const zSecretListResponse = z.object({ + data: z.array(zSecretResponse) +}); /** * Response after accepting a resubscribe request. */ export const zResubscribeResponse = z.object({ - billing_op_id: z.string(), - status: z.enum(['active', 'pending']), - message: z.string().optional() -}) + billing_op_id: z.string(), + message: z.string().optional(), + status: z.enum(['active', 'pending']) +}); /** * Request body for reactivating a previously cancelled subscription. */ export const zResubscribeRequest = z.object({ - idempotency_key: z.string().optional() -}) + idempotency_key: z.string().optional() +}); /** - * Response after successfully cancelling a subscription. + * Response after a queue management action (delete or clear). */ -export const zCancelSubscriptionResponse = z.object({ - billing_op_id: z.string(), - cancel_at: z.string().datetime() -}) +export const zQueueManageResponse = z.object({ + cleared: z.boolean().optional(), + deleted: z.array(z.string()).optional() +}); /** - * Request body for cancelling the current subscription. + * Request to manage queue operations */ -export const zCancelSubscriptionRequest = z.object({ - idempotency_key: z.string().optional() -}) +export const zQueueManageRequest = z.object({ + clear: z.boolean().optional(), + delete: z.array(z.string()).optional() +}); /** - * Response after successfully subscribing to a billing plan. + * Queue information with pending and running jobs */ -export const zSubscribeResponse = z.object({ - billing_op_id: z.string(), - status: z.enum(['subscribed', 'needs_payment_method', 'pending_payment']), - effective_at: z.string().datetime().optional(), - payment_method_url: z.string().optional() -}) +export const zQueueInfo = z.object({ + queue_pending: z.array(z.tuple([ + z.unknown(), + z.unknown(), + z.unknown(), + z.unknown(), + z.unknown() + ])).optional(), + queue_running: z.array(z.tuple([ + z.unknown(), + z.unknown(), + z.unknown(), + z.unknown(), + z.unknown() + ])).optional() +}); /** - * Request body for subscribing a workspace to a billing plan. + * Full detail of a publicly published workflow on the Hub. */ -export const zSubscribeRequest = z.object({ - plan_slug: z.string(), - team_credit_stop_id: z.string().optional(), - billing_cycle: z.enum(['monthly', 'yearly']).optional(), - idempotency_key: z.string().optional(), - return_url: z.string().optional(), - cancel_url: z.string().optional() -}) +export const zPublishedWorkflowDetail = z.object({ + assets: z.array(zAssetInfo), + listed: z.boolean(), + name: z.string(), + publish_time: z.string().datetime().nullish(), + share_id: z.string(), + workflow_id: z.string(), + workflow_json: z.record(z.unknown()) +}); /** - * Summary of seat costs based on current workspace members + * Request body for publishing workflow assets to the Hub. */ -export const zPlanSeatSummary = z.object({ - seat_count: z.number().int(), - total_cost_cents: 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' - }), - total_credits_cents: 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' - }) -}) +export const zPublishWorkflowAssetsRequest = z.object({ + asset_ids: z.array(z.string()) +}); /** - * Billing period (uppercase to match comfy-api) + * Request body for publishing or updating a workflow on the Hub. */ -export const zSubscriptionDuration = z.enum(['MONTHLY', 'ANNUAL']) +export const zPublishHubWorkflowRequest = z.object({ + asset_ids: z.array(z.string()), + custom_nodes: z.array(z.string()).optional(), + description: z.string().optional(), + metadata: z.record(z.unknown()).optional(), + models: z.array(z.string()).optional(), + name: z.string(), + sample_image_tokens_or_urls: z.array(z.string()).optional(), + tags: z.array(z.string()).optional(), + thumbnail_comparison_token_or_url: z.string().optional(), + thumbnail_token_or_url: z.string().optional(), + thumbnail_type: z.enum([ + 'image', + 'video', + 'image_comparison' + ]).optional(), + tutorial_url: z.string().optional(), + username: z.string(), + workflow_filename: z.string() +}); /** - * Subscription tier (uppercase to match comfy-api) + * Response returned after successfully queuing a workflow prompt. */ -export const zSubscriptionTier = z.enum([ - 'FREE', - 'STANDARD', - 'CREATOR', - 'PRO', - 'FOUNDERS_EDITION', - 'TEAM' -]) +export const zPromptResponse = z.object({ + node_errors: z.record(z.unknown()).optional(), + number: z.number().optional(), + prompt_id: z.string().uuid().optional() +}); /** - * Plan information for preview display + * Request body for submitting a ComfyUI workflow prompt for execution. */ -export const zPreviewPlanInfo = z.object({ - slug: z.string(), - tier: zSubscriptionTier, - duration: zSubscriptionDuration, - price_cents: 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' - }), - credits_cents: 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' - }), - seat_summary: zPlanSeatSummary, - period_start: z.string().datetime().optional(), - period_end: z.string().datetime().optional() -}) +export const zPromptRequest = z.object({ + extra_data: z.record(z.unknown()).optional(), + front: z.boolean().optional(), + number: z.number().optional(), + partial_execution_targets: z.array(z.string()).optional(), + prompt: z.record(z.unknown()), + workflow_id: z.string().optional(), + workflow_version_id: z.string().optional() +}); /** - * Itemized cost preview for a pending subscription change. + * Metadata about the currently running and queued prompts. */ -export const zPreviewSubscribeResponse = z.object({ - allowed: z.boolean(), - reason: z.string().optional(), - transition_type: z.enum([ - 'new_subscription', - 'upgrade', - 'downgrade', - 'duration_change' - ]), - effective_at: z.string().datetime(), - is_immediate: z.boolean(), - cost_today_cents: 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' - }), - cost_next_period_cents: 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' - }), - credits_today_cents: 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' - }), - credits_next_period_cents: 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' - }), - current_plan: zPreviewPlanInfo.optional(), - new_plan: zPreviewPlanInfo -}) +export const zPromptInfo = z.object({ + exec_info: z.object({ + queue_remaining: z.number().int().optional() + }).optional() +}); /** - * Request body for previewing the cost of a plan subscription change. + * Error response for ComfyUI prompt execution. */ -export const zPreviewSubscribeRequest = z.object({ - plan_slug: z.string() -}) +export const zPromptErrorResponse = z.record(z.unknown()); /** - * Pre/post-discount price for a team credit stop, in cents. + * Summary of seat costs based on current workspace members */ -export const zTeamCreditStopPrice = z.object({ - list_price_cents: 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' - }), - price_cents: 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' - }) -}) +export const zPlanSeatSummary = z.object({ + seat_count: z.number().int(), + total_cost_cents: 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' }), + total_credits_cents: 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' }) +}); /** - * A selectable preset on the team pricing slider. Echoed on subscribe via - * team_credit_stop_id; the backend owns the resolved amounts. credits is a - * RAW monthly credit count (not cents). Save% is derived by the FE as - * (list_price_cents - price_cents) / list_price_cents. - * + * Plan information for preview display */ -export const zTeamCreditStop = z.object({ - id: z.string(), - credits: 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' - }), - monthly: zTeamCreditStopPrice, - yearly: zTeamCreditStopPrice -}) +export const zPreviewPlanInfo = z.object({ + credits_cents: 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' }), + duration: zSubscriptionDuration, + period_end: z.string().datetime().optional(), + period_start: z.string().datetime().optional(), + price_cents: 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' }), + seat_summary: zPlanSeatSummary, + slug: z.string(), + tier: zSubscriptionTier +}); /** - * Credit-stop ladder for the pricing slider (BE-1254). Returned by GET /api/billing/plans for every workspace regardless of the caller's token or workspace type (the personal/team distinction was removed); omitted only when the catalog defines no stops. + * Itemized cost preview for a pending subscription change. */ -export const zTeamCreditStops = z.object({ - default_stop_index: z.number().int(), - stops: z.array(zTeamCreditStop) -}) +export const zPreviewSubscribeResponse = z.object({ + allowed: z.boolean(), + cost_next_period_cents: 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' }), + cost_today_cents: 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' }), + credits_next_period_cents: 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' }), + credits_today_cents: 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' }), + current_plan: zPreviewPlanInfo.optional(), + effective_at: z.string().datetime(), + is_immediate: z.boolean(), + new_plan: zPreviewPlanInfo, + reason: z.string().optional(), + transition_type: z.enum([ + 'new_subscription', + 'upgrade', + 'downgrade', + 'duration_change' + ]) +}); + +/** + * Request body for previewing the cost of a plan subscription change. + */ +export const zPreviewSubscribeRequest = z.object({ + plan_slug: z.string() +}); /** * Reason why a plan is unavailable */ export const zPlanAvailabilityReason = z.enum([ - 'same_plan', - 'incompatible_transition', - 'requires_team', - 'requires_personal', - 'exceeds_max_seats' -]) + 'same_plan', + 'incompatible_transition', + 'requires_team', + 'requires_personal', + 'exceeds_max_seats' +]); /** * Availability and eligibility information for a billing plan. */ export const zPlanAvailability = z.object({ - available: z.boolean(), - reason: zPlanAvailabilityReason.optional() -}) + available: z.boolean(), + reason: zPlanAvailabilityReason.optional() +}); /** * Billing plan details including pricing, limits, and features. */ export const zPlan = z.object({ - slug: z.string(), - tier: zSubscriptionTier, - duration: zSubscriptionDuration, - price_cents: 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' - }), - credits_cents: 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' - }), - max_seats: 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' - }), - availability: zPlanAvailability, - seat_summary: zPlanSeatSummary -}) + availability: zPlanAvailability, + credits_cents: 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' }), + duration: zSubscriptionDuration, + max_seats: 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' }), + price_cents: 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' }), + seat_summary: zPlanSeatSummary, + slug: z.string(), + tier: zSubscriptionTier +}); /** - * List of available billing plans for subscription. + * An outstanding workspace invitation that has not yet been accepted. */ -export const zBillingPlansResponse = z.object({ - current_plan_slug: z.string().optional(), - plans: z.array(zPlan), - team_credit_stops: zTeamCreditStops.optional() -}) +export const zPendingInvite = z.object({ + email: z.string().email(), + expires_at: z.string().datetime(), + id: z.string(), + invited_at: z.string().datetime(), + token: z.string().optional() +}); /** - * The team credit stop a workspace is currently subscribed to: the - * per-workspace slider choice recorded at subscribe time - * (workspace_subscriptions.team_credit_stop_id). Amounts are owned by the - * catalog, not the subscription row. Returned on GET /api/billing/status - * for per-credit Team plans (BE-1254). - * + * Response containing a redirect URL to the payment portal. */ -export const zTeamCreditStopSummary = z.object({ - id: z.string(), - credits_monthly: 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' - }), - stop_usd: 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' - }) -}) +export const zPaymentPortalResponse = z.object({ + url: z.string() +}); /** - * A provider the user may configure a secret for. The shape is deliberately minimal (identifier only) and reserved for future per-provider fields such as sub-keys. + * Request body for generating a payment portal session URL. */ -export const zSecretProvider = z.object({ - id: z.string() -}) +export const zPaymentPortalRequest = z.object({ + return_url: z.string().optional() +}); /** - * The providers available to the authenticated user in the current workspace. + * RFC 6749 §5.1 successful token response. */ -export const zSecretProvidersResponse = z.object({ - data: z.array(zSecretProvider) -}) +export const zOAuthTokenResponse = z.object({ + access_token: z.string(), + expires_in: z.number().int(), + refresh_token: z.string(), + scope: z.string(), + token_type: z.enum(['Bearer']) +}); /** - * User secret metadata (the secret value itself is never returned after creation). + * RFC 6749 §5.2 error response. */ -export const zSecretResponse = z.object({ - id: z.string().uuid(), - name: z.string(), - provider: z.string().optional(), - last_used_at: z.string().datetime().optional(), - created_at: z.string().datetime(), - updated_at: z.string().datetime() -}) +export const zOAuthTokenError = z.object({ + error: z.string(), + error_description: z.string().optional() +}); /** - * List of user secrets with metadata only. + * RFC 7591 §3.2.1 successful registration response. */ -export const zSecretListResponse = z.object({ - data: z.array(zSecretResponse) -}) +export const zOAuthRegisterResponse = z.object({ + application_type: z.enum(['native', 'web']), + 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(), + grant_types: z.array(z.string()), + redirect_uris: z.array(z.string()), + response_types: z.array(z.string()), + token_endpoint_auth_method: z.enum(['none']) +}); /** - * Request body for updating an existing user secret. + * 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 zUpdateSecretRequest = z.object({ - name: z.string().min(1).max(255).optional(), - secret_value: z.string().min(1).optional() -}) +export const zOAuthRegisterRequest = z.object({ + application_type: z.enum(['native', 'web']).optional(), + client_name: z.string().max(100).optional(), + client_uri: z.string().nullish(), + contacts: z.array(z.string()).nullish(), + grant_types: z.array(z.enum(['authorization_code', 'refresh_token'])).optional(), + jwks: z.record(z.unknown()).nullish(), + jwks_uri: z.string().nullish(), + logo_uri: z.string().nullish(), + policy_uri: z.string().nullish(), + redirect_uris: z.array(z.string()).min(1).max(5), + resource_grants: z.record(z.array(z.string())).nullish(), + response_types: z.array(z.enum(['code'])).optional(), + scope: z.string().nullish(), + software_id: z.string().nullish(), + software_version: z.string().nullish(), + token_endpoint_auth_method: z.enum(['none']).optional(), + tos_uri: z.string().nullish() +}); /** - * Request body for creating a new user secret. + * RFC 7591 §3.2.2 error response. */ -export const zCreateSecretRequest = z.object({ - name: z.string().min(1).max(255), - provider: z.string().max(64).optional(), - secret_value: z.string().min(1) -}) +export const zOAuthRegisterError = z.object({ + error: z.enum(['invalid_redirect_uri', 'invalid_client_metadata']), + error_description: z.string().nullish() +}); /** - * A single history event. The cloud history-events store is the single source of truth for both billing events (charges, credits, adjustments) and user-facing usage events. + * Standard error response with a machine-readable code and human-readable message. */ -export const zBillingEvent = z.object({ - event_type: z.string(), - event_id: z.string(), - params: z.record(z.unknown()).optional(), - createdAt: z.string().datetime() -}) +export const zErrorResponse = z.object({ + code: z.string(), + details: z.record(z.unknown()).optional(), + message: z.string() +}); /** - * Paginated list of billing events for a workspace. + * Union of the two 400 shapes /oauth/register can emit. `OAuthRegisterError` is the handler-shaped RFC 7591 §3.2.2 error; `ErrorResponse` is the strict-server binding-layer error fired when the request body fails OpenAPI-schema validation before the handler runs, normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler (BE-1178). + * */ -export const zBillingEventsResponse = z.object({ - total: z.number().int(), - events: z.array(zBillingEvent), - page: z.number().int(), - limit: z.number().int(), - totalPages: z.number().int() -}) +export const zOAuthRegisterBadRequestResponse = z.union([ + zOAuthRegisterError, + zErrorResponse +]); /** - * Current credit balance and usage details for a workspace. + * OAuth 2.1 protected-resource metadata (RFC 9728). */ -export const zBillingBalanceResponse = z.object({ - amount_micros: z.number(), - prepaid_balance_micros: z.number().optional(), - cloud_credit_balance_micros: z.number().optional(), - pending_charges_micros: z.number().optional(), - effective_balance_micros: z.number().optional(), - currency: z.string() -}) +export const zOAuthProtectedResourceMetadata = z.object({ + authorization_servers: z.array(z.string().url()), + bearer_methods_supported: z.array(z.string()).optional(), + resource: z.string().url(), + scopes_supported: z.array(z.string()) +}); /** - * Payment lifecycle status + * 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 zBillingStatus = z.enum([ - 'awaiting_payment_method', - 'pending_payment', - 'paid', - 'payment_failed', - 'inactive' -]) +export const zOAuthConsentChallengeWorkspace = z.object({ + id: z.string(), + name: z.string(), + role: z.enum(['owner', 'member']), + type: z.enum(['personal', 'team']) +}); /** - * Current billing and subscription status for a workspace. + * 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 zBillingStatusResponse = z.object({ - is_active: z.boolean(), - subscription_status: z.enum(['active', 'ended', 'canceled']).optional(), - subscription_tier: zSubscriptionTier.optional(), - subscription_duration: zSubscriptionDuration.optional(), - plan_slug: z.string().optional(), - billing_status: zBillingStatus.optional(), - has_funds: z.boolean(), - cancel_at: z.string().datetime().optional(), - renewal_date: z.string().datetime().optional(), - team_credit_stop: zTeamCreditStopSummary.nullable() -}) +export const zOAuthConsentChallenge = z.object({ + client_display_name: z.string(), + csrf_token: z.string(), + oauth_request_id: z.string().uuid(), + redirect_uri: z.string().url(), + resource_display_name: z.string(), + scopes: z.array(z.string()), + workspaces: z.array(zOAuthConsentChallengeWorkspace) +}); /** - * A single JSON Web Key entry within a JWKS response. + * 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 zJwkKey = z.object({ - kty: z.string(), - crv: z.string(), - kid: z.string(), - use: z.string(), - alg: z.string(), - x: z.string(), - y: z.string() -}) +export const zOAuthAuthorizeRedirectResponse = z.object({ + redirect_url: z.string().url() +}); /** - * RFC 6749 §5.2 error response. + * OAuth 2.1 authorization-server metadata (RFC 8414). */ -export const zOAuthTokenError = z.object({ - error: z.string(), - error_description: z.string().optional() -}) +export const zOAuthAuthorizationServerMetadata = z.object({ + authorization_endpoint: z.string().url(), + code_challenge_methods_supported: z.array(z.string()), + grant_types_supported: z.array(z.string()), + issuer: z.string().url(), + jwks_uri: z.string().url(), + registration_endpoint: z.string().url().optional(), + response_types_supported: z.array(z.string()), + scopes_supported: z.array(z.string()).optional(), + token_endpoint: z.string().url(), + token_endpoint_auth_methods_supported: z.array(z.string()) +}); /** - * RFC 6749 §5.1 successful token response. + * Metadata describing a single ComfyUI node type and its inputs/outputs. */ -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() -}) +export const zNodeInfo = z.object({ + api_node: z.boolean().optional(), + category: z.string().optional(), + deprecated: z.boolean().optional(), + description: z.string().optional(), + display_name: z.string().optional(), + experimental: z.boolean().optional(), + input: z.record(z.unknown()).optional(), + input_order: z.record(z.array(z.string())).optional(), + name: z.string().optional(), + output: z.array(z.string()).optional(), + output_is_list: z.array(z.boolean()).optional(), + output_name: z.array(z.string()).optional(), + output_node: z.boolean().optional(), + output_tooltips: z.array(z.string()).optional(), + python_module: z.string().optional() +}); /** - * 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. - * + * Represents a folder containing models */ -export const zOAuthConsentChallengeWorkspace = z.object({ - id: z.string(), - name: z.string(), - type: z.enum(['personal', 'team']), - role: z.enum(['owner', 'member']) -}) +export const zModelFolder = z.object({ + folders: z.array(z.string()), + name: z.string() +}); /** - * 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. + * Represents a model file with metadata */ -export const zOAuthAuthorizeRedirectResponse = z.object({ - redirect_url: z.string().url() -}) +export const zModelFile = z.object({ + name: z.string(), + pathIndex: z.number().int() +}); /** - * 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. - * + * Workspace member with profile and role information. */ -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(), - redirect_uri: z.string().url(), - scopes: z.array(z.string()), - workspaces: z.array(zOAuthConsentChallengeWorkspace) -}) +export const zMember = z.object({ + email: z.string().email(), + id: z.string(), + is_original_owner: z.boolean(), + joined_at: z.string().datetime(), + name: z.string(), + role: z.enum(['owner', 'member']) +}); /** - * OAuth 2.1 protected-resource metadata (RFC 9728). + * Paginated list of workspaces the authenticated user belongs to. */ -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() -}) +export const zListWorkspacesResponse = z.object({ + workspaces: z.array(zWorkspaceWithRole) +}); /** - * RFC 7591 §3.2.2 error response. + * List of API keys associated with the current workspace. */ -export const zOAuthRegisterError = z.object({ - error: z.enum(['invalid_redirect_uri', 'invalid_client_metadata']), - error_description: z.string().nullish() -}) +export const zListWorkspaceApiKeysResponse = z.object({ + api_keys: z.array(zWorkspaceApiKeyInfo) +}); /** - * Standard error response with a machine-readable code and human-readable message. + * Paginated list of available asset tags. */ -export const zErrorResponse = z.object({ - code: z.string(), - message: z.string(), - details: z.record(z.unknown()).optional() -}) +export const zListTagsResponse = z.object({ + has_more: z.boolean(), + tags: z.array(zTagInfo), + total: z.number().int() +}); /** - * Union of the two 400 shapes /oauth/register can emit. `OAuthRegisterError` is the handler-shaped RFC 7591 §3.2.2 error; `ErrorResponse` is the strict-server binding-layer error fired when the request body fails OpenAPI-schema validation before the handler runs, normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler (BE-1178). - * + * List of members in the current workspace. */ -export const zOAuthRegisterBadRequestResponse = z.union([ - zOAuthRegisterError, - zErrorResponse -]) +export const zListMembersResponse = z.object({ + members: z.array(zMember), + pagination: zPaginationInfo +}); /** - * RFC 7591 §3.2.1 successful registration response. + * List of pending invitations for the current workspace. */ -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']) -}) +export const zListInvitesResponse = z.object({ + invites: z.array(zPendingInvite) +}); /** - * 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. - * + * Represents a user-owned asset (image, video, or other generated output). */ -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']).optional(), - 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() -}) +export const zAsset = z.object({ + created_at: z.string().datetime(), + display_name: z.string().nullish(), + file_path: z.string().nullish(), + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/).optional(), + id: z.string().uuid(), + is_immutable: z.boolean().optional(), + job_id: z.string().uuid().nullish(), + last_access_time: z.string().datetime().optional(), + metadata: z.record(z.unknown()).readonly().optional(), + mime_type: z.string().optional(), + name: z.string(), + preview_id: z.string().uuid().nullish(), + preview_url: z.string().url().optional(), + short_url: z.string().nullish(), + size: 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(), + tags: z.array(z.string()).optional(), + updated_at: z.string().datetime(), + user_metadata: z.record(z.unknown()).optional() +}); /** - * OAuth 2.1 authorization-server metadata (RFC 8414). + * Paginated list of assets belonging to the authenticated user. */ -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() -}) +export const zListAssetsResponse = z.object({ + assets: z.array(zAsset), + has_more: z.boolean(), + next_cursor: z.string().optional(), + total: z.number().int() +}); /** - * JSON Web Key Set containing the public keys used to verify Cloud JWTs. + * Reference to a Hub label by ID. */ -export const zJwksResponse = z.object({ - keys: z.array(zJwkKey) -}) +export const zLabelRef = z.object({ + display_name: z.string(), + name: z.string() +}); /** - * Response after synchronizing an API key into the local database. + * A single JSON Web Key entry within a JWKS response. */ -export const zSyncApiKeyResponse = z.object({ - result: z.enum(['revoked', 'already_revoked', 'no_op']) -}) +export const zJwkKey = z.object({ + alg: z.string(), + crv: z.string(), + kid: z.string(), + kty: z.string(), + use: z.string(), + x: z.string(), + y: z.string() +}); /** - * Request body for synchronizing an API key from the external registry. + * JSON Web Key Set containing the public keys used to verify Cloud JWTs. */ -export const zSyncApiKeyRequest = z.object({ - event: z.enum(['delete']), - key_hash: z.string().regex(/^[0-9a-fA-F]{64}$/), - customer_id: z.string().min(1) -}) +export const zJwksResponse = z.object({ + keys: z.array(zJwkKey) +}); /** - * The personal workspace's provisioned billing identity. + * Detailed execution error information from ComfyUI */ -export const zEnsureWorkspaceBillingProvisionedResponse = z.object({ - workspace_id: z.string(), - stripe_customer_id: z.string(), - metronome_customer_id: z.string(), - metronome_contract_id: z.string() -}) +export const zExecutionError = z.object({ + current_inputs: z.record(z.unknown()), + current_outputs: z.record(z.unknown()), + exception_message: z.string(), + exception_type: z.string(), + node_id: z.string(), + node_type: z.string(), + traceback: z.array(z.string()) +}); /** - * The caller's already-resolved legacy (comfy-api) customer identity. When - * present and carrying provider IDs, provisioning ATTACHES this identity to - * the personal workspace (sharing the existing balance and subscription) - * instead of minting a net-new empty customer. Omit (or send with no - * provider IDs) for a free user with nothing to attach — provisioning then - * creates net-new. This closes the create-new-before-attach gap: a caller - * that already knows the legacy identity hands it over so the very first - * provisioning is an attach. - * + * Lightweight job data for list views (workflow and full outputs excluded) */ -export const zEnsureWorkspaceBillingLegacySnapshot = z.object({ - stripe_customer_id: z.string().optional(), - metronome_customer_id: z.string().optional(), - metronome_contract_id: z.string().optional(), - has_funds: z.boolean().optional(), - subscription_tier: z.string().optional(), - legacy_stripe_subscription_id: z.string().optional(), - legacy_comfy_user_id: z.string().optional() -}) +export const zJobEntry = z.object({ + create_time: 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' }), + execution_end_time: 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(), + execution_error: zExecutionError.optional(), + execution_start_time: 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(), + id: z.string().uuid(), + outputs_count: z.number().int().optional(), + preview_output: z.record(z.unknown()).optional(), + status: z.enum([ + 'pending', + 'in_progress', + 'completed', + 'failed', + 'cancelled' + ]), + workflow_id: z.string().optional() +}); /** - * Request body for ensuring a user's personal workspace carries a fully - * provisioned billing identity. Sent by comfy-api's CreateCustomer (BE-1047) - * with the already canonical-resolved user identity. - * + * Paginated list of jobs for the authenticated user. */ -export const zEnsureWorkspaceBillingProvisionedRequest = z.object({ - user_id: z.string().min(1), - email: z.string().email().min(1), - snapshot: zEnsureWorkspaceBillingLegacySnapshot.optional() -}) +export const zJobsListResponse = z.object({ + jobs: z.array(zJobEntry), + pagination: zPaginationInfo +}); /** - * Firebase UIDs linked to the canonical comfy_user_id. Empty list when - * no mappings exist (not an error — callers can treat empty as "unknown - * canonical"). - * + * Response for POST /api/jobs/cancel. */ -export const zListLinkedFirebaseUidsResponse = z.object({ - firebase_uids: z.array(z.string()) -}) +export const zJobsCancelResponse = z.object({ + cancelled: z.array(z.string()) +}); /** - * Request body for reverse-looking-up Firebase UIDs linked to a canonical comfy_user_id. + * Request to cancel multiple jobs by ID. */ -export const zListLinkedFirebaseUidsRequest = z.object({ - comfy_user_id: z.string().min(1) -}) +export const zJobsCancelRequest = z.object({ + job_ids: z.array(z.string().uuid()).min(1).max(100) +}); /** - * Response confirming the validity and scope of a workspace API key. + * Job status information */ -export const zVerifyApiKeyResponse = z.object({ - user_id: z.string(), - email: z.string(), - name: z.string(), - is_admin: z.boolean(), - workspace_id: z.string(), - workspace_type: z.enum(['personal', 'team']), - role: z.enum(['owner', 'member']), - has_funds: z.boolean(), - is_active: z.boolean(), - permissions: z.array(z.string()) -}) +export const zJobStatusResponse = z.object({ + assigned_inference: z.string().nullish(), + created_at: z.string().datetime(), + error_message: z.string().nullish(), + id: z.string().uuid(), + last_state_update: z.string().datetime().optional(), + status: z.enum([ + 'waiting_to_dispatch', + 'pending', + 'in_progress', + 'completed', + 'error', + 'cancelled' + ]), + updated_at: z.string().datetime() +}); /** - * Request body for verifying a workspace API key (admin endpoint). + * Full job details including workflow and outputs */ -export const zVerifyApiKeyRequest = z.object({ - api_key: z.string() -}) +export const zJobDetailResponse = z.object({ + create_time: 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' }), + execution_error: zExecutionError.optional(), + execution_meta: z.record(z.unknown()).optional(), + execution_status: z.record(z.unknown()).optional(), + id: z.string().uuid(), + outputs: z.record(z.unknown()).optional(), + outputs_count: z.number().int().optional(), + preview_output: z.record(z.unknown()).optional(), + status: z.enum([ + 'pending', + 'in_progress', + 'completed', + 'failed', + 'cancelled' + ]), + update_time: 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' }), + workflow: z.record(z.unknown()).optional(), + workflow_id: z.string().optional() +}); /** - * Response after bulk-revoking API keys for a workspace member. + * Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops. */ -export const zBulkRevokeApiKeysResponse = z.object({ - revoked_count: z.number().int().gte(0) -}) +export const zJobCancelResponse = z.object({ + cancelled: z.boolean() +}); /** - * Metadata for a workspace-scoped API key (secret is never returned). + * Response after importing published workflow assets. */ -export const zWorkspaceApiKeyInfo = z.object({ - id: z.string().uuid(), - 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(), - revoked_at: z.string().datetime().optional(), - created_at: z.string().datetime() -}) +export const zImportPublishedAssetsResponse = z.object({ + assets: z.array(zAssetInfo) +}); /** - * List of API keys associated with the current workspace. + * Request body for importing assets from a published workflow. */ -export const zListWorkspaceApiKeysResponse = z.object({ - api_keys: z.array(zWorkspaceApiKeyInfo) -}) +export const zImportPublishedAssetsRequest = z.object({ + published_asset_ids: z.array(z.string()), + share_id: z.string().nullish() +}); /** - * Response containing the newly created workspace API key. + * Public workflow status. NULL in the database is represented as pending in API responses. */ -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(), - created_at: z.string().datetime() -}) +export const zHubWorkflowStatus = z.enum([ + 'pending', + 'approved', + 'rejected', + 'deprecated' +]); /** - * Request body for creating a new workspace-scoped API key. + * Abbreviated Hub profile used in workflow listings. */ -export const zCreateWorkspaceApiKeyRequest = z.object({ - name: z.string(), - description: z.string().max(5000).optional(), - expires_at: z.string().datetime().optional() -}) +export const zHubProfileSummary = z.object({ + avatar_url: z.string().optional(), + display_name: z.string().optional(), + username: z.string() +}); /** - * Response returned after successfully accepting a workspace invitation. + * Entry in the curated workflow template gallery shown on the home page. */ -export const zAcceptInviteResponse = z.object({ - workspace_id: z.string(), - workspace_name: z.string() -}) +export const zHubWorkflowTemplateEntry = z.object({ + contentTemplate: z.string().optional(), + date: z.string().optional(), + description: z.string().optional(), + extendedDescription: z.string().optional(), + faqItems: z.array(z.object({ + answer: z.string(), + question: z.string() + })).optional(), + howToUse: z.array(z.string()).optional(), + includeOnDistributions: z.array(z.string()).optional(), + io: z.object({ + inputs: z.array(z.record(z.unknown())).optional(), + outputs: z.array(z.record(z.unknown())).optional() + }).optional(), + isEssential: z.boolean().optional(), + logos: z.array(z.record(z.unknown())).optional(), + mediaSubtype: z.string().optional(), + mediaType: z.string().optional(), + metaDescription: z.string().optional(), + models: z.array(z.string()).optional(), + name: z.string(), + openSource: z.boolean().optional(), + profile: zHubProfileSummary.optional(), + requiresCustomNodes: z.array(z.string()).optional(), + searchRank: 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(), + shareId: z.string().optional(), + size: 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(), + status: zHubWorkflowStatus, + suggestedUseCases: z.array(z.string()).optional(), + tags: z.array(z.string()).optional(), + thumbnailComparisonUrl: z.string().optional(), + thumbnailUrl: z.string().optional(), + thumbnailVariant: z.string().optional(), + title: z.string(), + tutorialUrl: z.string().optional(), + usage: 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(), + vram: 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() +}); /** - * Request body for inviting a user to a workspace. + * Abbreviated Hub workflow metadata used in search and listing results. */ -export const zCreateInviteRequest = z.object({ - email: z.string().email() -}) +export const zHubWorkflowSummary = z.object({ + custom_nodes: z.array(zLabelRef).optional(), + description: z.string().optional(), + metadata: z.record(z.unknown()).optional(), + models: z.array(zLabelRef).optional(), + name: z.string(), + profile: zHubProfileSummary, + publish_time: z.string().datetime().nullish(), + sample_image_urls: z.array(z.string()).optional(), + share_id: z.string(), + status: zHubWorkflowStatus, + tags: z.array(zLabelRef).optional(), + thumbnail_comparison_url: z.string().optional(), + thumbnail_type: z.enum([ + 'image', + 'video', + 'image_comparison' + ]).optional(), + thumbnail_url: z.string().optional(), + tutorial_url: z.string().optional() +}); /** - * An outstanding workspace invitation that has not yet been accepted. + * Full Hub workflow detail including versions, assets, and statistics. */ -export const zPendingInvite = z.object({ - id: z.string(), - email: z.string().email(), - token: z.string().optional(), - invited_at: z.string().datetime(), - expires_at: z.string().datetime() -}) +export const zHubWorkflowDetail = z.object({ + assets: z.array(zAssetInfo), + custom_nodes: z.array(zLabelRef).optional(), + description: z.string().optional(), + metadata: z.record(z.unknown()).optional(), + models: z.array(zLabelRef).optional(), + name: z.string(), + profile: zHubProfileSummary, + publish_time: z.string().datetime().nullish(), + sample_image_urls: z.array(z.string()).optional(), + share_id: z.string(), + status: zHubWorkflowStatus, + tags: z.array(zLabelRef).optional(), + thumbnail_comparison_url: z.string().optional(), + thumbnail_type: z.enum([ + 'image', + 'video', + 'image_comparison' + ]).optional(), + thumbnail_url: z.string().optional(), + tutorial_url: z.string().optional(), + workflow_id: z.string(), + workflow_json: z.record(z.unknown()) +}); /** - * List of pending invitations for the current workspace. + * Paginated list of Hub workflows matching search criteria. */ -export const zListInvitesResponse = z.object({ - invites: z.array(zPendingInvite) -}) +export const zHubWorkflowListResponse = z.object({ + next_cursor: z.string().optional(), + workflows: z.array(z.union([zHubWorkflowSummary, zHubWorkflowDetail])) +}); /** - * Workspace member with profile and role information. + * Response indicating whether a Hub username is available. */ -export const zMember = z.object({ - id: z.string(), - name: z.string(), - email: z.string().email(), - role: z.enum(['owner', 'member']), - joined_at: z.string().datetime(), - is_original_owner: z.boolean() -}) +export const zHubUsernameCheckResponse = z.object({ + available: z.boolean(), + suggestions: z.array(z.string()).optional(), + username: z.string(), + validation_error: z.string().optional() +}); /** - * List of members in the current workspace. + * Full public profile for a Hub creator. */ -export const zListMembersResponse = z.object({ - members: z.array(zMember), - pagination: zPaginationInfo -}) +export const zHubProfile = z.object({ + avatar_url: z.string().optional(), + description: z.string().optional(), + display_name: z.string().optional(), + username: z.string(), + website_urls: z.array(z.string()).optional() +}); /** - * Request body for changing a workspace member's role. + * Metadata for a single Hub label. */ -export const zUpdateMemberRoleRequest = z.object({ - role: z.enum(['owner', 'member']) -}) +export const zHubLabelInfo = z.object({ + description: z.string().optional(), + display_name: z.string(), + name: z.string(), + type: z.enum([ + 'tag', + 'model', + 'custom_node' + ]) +}); /** - * Request body for updating an existing workspace's settings. + * List of available Hub labels for categorizing workflows. */ -export const zUpdateWorkspaceRequest = z.object({ - name: z.string().min(1).max(100).optional() -}) +export const zHubLabelListResponse = z.object({ + labels: z.array(zHubLabelInfo) +}); /** - * Request body for creating a new workspace. + * Response containing a signed upload URL and the target asset path. */ -export const zCreateWorkspaceRequest = z.object({ - name: z.string().min(1).max(100) -}) +export const zHubAssetUploadUrlResponse = z.object({ + public_url: z.string(), + token: z.string(), + upload_url: z.string() +}); /** - * Workspace entity annotated with the requesting user's role. + * Request body for requesting a signed upload URL for a Hub asset. */ -export const zWorkspaceWithRole = z.object({ - id: z.string(), - name: z.string(), - type: z.enum(['personal', 'team']), - role: z.enum(['owner', 'member']), - created_at: z.string().datetime(), - joined_at: z.string().datetime(), - subscription_tier: zSubscriptionTier.optional() -}) +export const zHubAssetUploadUrlRequest = z.object({ + content_type: z.string(), + filename: z.string() +}); /** - * Paginated list of workspaces the authenticated user belongs to. + * History entry with prompt_id and execution data */ -export const zListWorkspacesResponse = z.object({ - workspaces: z.array(zWorkspaceWithRole) -}) +export const zHistoryEntry = z.object({ + create_time: 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(), + meta: z.record(z.unknown()).optional(), + outputs: z.record(z.unknown()).optional(), + prompt: z.object({ + extra_data: z.record(z.unknown()).optional(), + priority: z.number().optional(), + prompt_id: z.string().optional() + }).optional(), + prompt_id: z.string(), + status: z.record(z.unknown()).optional(), + workflow_id: z.string().optional() +}); /** - * Full workspace entity with configuration and ownership details. - */ -export const zWorkspace = z.object({ - id: z.string(), - name: z.string(), - type: z.enum(['personal', 'team']), - created_at: z.string().datetime() -}) - -/** - * Exchange poll result. Pending until the code is redeemed in the browser. - */ -export const zDesktopLoginCodeExchangeResponse = z.object({ - status: z.enum(['pending', 'complete']), - custom_token: z.string().optional() -}) - -/** - * Request to exchange a redeemed login code for a custom token. - */ -export const zDesktopLoginCodeExchangeRequest = z.object({ - code: z.string(), - code_verifier: z.string().min(43).max(128) -}) - -/** - * Result of redeeming a desktop login code. - */ -export const zDesktopLoginCodeRedeemResponse = z.object({ - status: z.enum(['redeemed']) -}) - -/** - * Request to claim a desktop login code for the authenticated user. - */ -export const zDesktopLoginCodeRedeemRequest = z.object({ - code: z.string() -}) - -/** - * A freshly minted desktop login code and its polling parameters. - */ -export const zDesktopLoginCodeCreateResponse = z.object({ - code: z.string(), - expires_in: z.number().int(), - poll_interval: z.number().int() -}) - -/** - * Request to mint a desktop login code. - */ -export const zDesktopLoginCodeCreateRequest = z.object({ - installation_id: z - .string() - .min(8) - .max(128) - .regex(/^[A-Za-z0-9._-]+$/) - .optional(), - platform: z.string().min(1).max(32), - app_version: z.string().min(1).max(64), - code_challenge: z.string().min(43).max(128) -}) - -/** - * Abbreviated workspace metadata used in list responses. - */ -export const zWorkspaceSummary = z.object({ - id: z.string(), - name: z.string(), - type: z.enum(['personal', 'team']) -}) - -/** - * Response containing the issued Cloud JWT and its expiry. - */ -export const zExchangeTokenResponse = z.object({ - token: z.string(), - expires_at: z.string().datetime(), - workspace: zWorkspaceSummary, - role: z.enum(['owner', 'member']), - permissions: z.array(z.string()) -}) - -/** - * Optional request body for the token exchange endpoint. The Firebase JWT - * being exchanged is supplied via the `Authorization: Bearer` header; this - * body only carries workspace-selection input. + * Execution history response with history array. + * Returns an object with a "history" key containing an array of history entries. + * Each entry includes prompt_id as a property along with execution data. * */ -export const zExchangeTokenRequest = z.object({ - workspace_id: z.string().optional() -}) - -/** - * Full task details including payload and result - */ -export const zTaskResponse = z.object({ - id: z.string().uuid(), - idempotency_key: z.string(), - task_name: z.string(), - payload: z.record(z.unknown()), - status: z.enum(['created', 'running', 'completed', 'failed']), - result: z.record(z.unknown()).optional(), - error_message: z.string().optional(), - create_time: z.string().datetime(), - update_time: z.string().datetime(), - started_at: z.string().datetime().optional(), - completed_at: z.string().datetime().optional() -}) - -/** - * Task data for list views - */ -export const zTaskEntry = z.object({ - id: z.string().uuid(), - task_name: z.string(), - status: z.enum(['created', 'running', 'completed', 'failed']), - create_time: z.string().datetime(), - started_at: z.string().datetime().optional(), - completed_at: z.string().datetime().optional() -}) - -/** - * Paginated list of background tasks for the authenticated user. - */ -export const zTasksListResponse = z.object({ - tasks: z.array(zTaskEntry), - pagination: zPaginationInfo -}) - -/** - * Result of authorizing a legal-hold release on a user's deletion. - */ -export const zReleaseHoldResponse = z.object({ - firebase_id: z.string(), - released: z.boolean(), - message: z.string() -}) +export const zHistoryResponse = z.object({ + history: z.array(zHistoryEntry) +}); /** - * Current status of a user data deletion request. + * Request to manage history operations */ -export const zDeletionStatus = z.object({ - status_name: z.string(), - status_details: z.string() -}) +export const zHistoryManageRequest = z.object({ + clear: z.boolean().optional(), + delete: z.array(z.string()).optional() +}); /** - * Details of a pending or completed user data deletion request. + * History entry with full prompt data */ -export const zDeletionRequest = z.object({ - id: z.string(), - firebase_id: z.string(), - create_time: z.string().datetime(), - deletion_status: z.array(zDeletionStatus) -}) +export const zHistoryDetailEntry = z.object({ + meta: z.record(z.unknown()).optional(), + outputs: z.record(z.unknown()).optional(), + prompt: z.object({ + extra_data: z.record(z.unknown()).optional(), + outputs_to_execute: z.array(z.string()).optional(), + priority: z.number().optional(), + prompt: z.record(z.unknown()).optional(), + prompt_id: z.string().optional() + }).optional(), + status: z.record(z.unknown()).optional() +}); /** - * Detailed execution error information from ComfyUI + * Detailed execution history response for a specific prompt. + * Returns a dictionary with prompt_id as key and full history data as value. + * */ -export const zExecutionError = z.object({ - node_id: z.string(), - node_type: z.string(), - exception_message: z.string(), - exception_type: z.string(), - traceback: z.array(z.string()), - current_inputs: z.record(z.unknown()), - current_outputs: z.record(z.unknown()) -}) +export const zHistoryDetailResponse = z.record(zHistoryDetailEntry); /** - * Full job details including workflow and outputs + * Metadata for a global subgraph blueprint (without full data) */ -export const zJobDetailResponse = z.object({ - id: z.string().uuid(), - status: z.enum([ - 'pending', - 'in_progress', - 'completed', - 'failed', - 'cancelled' - ]), - workflow: z.record(z.unknown()).optional(), - execution_error: zExecutionError.optional(), - create_time: 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' - }), - update_time: 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' +export const zGlobalSubgraphInfo = z.object({ + data: z.string().optional(), + info: z.object({ + node_pack: z.string() }), - outputs: z.record(z.unknown()).optional(), - preview_output: z.record(z.unknown()).optional(), - outputs_count: z.number().int().optional(), - workflow_id: z.string().optional(), - execution_status: z.record(z.unknown()).optional(), - execution_meta: z.record(z.unknown()).optional() -}) - -/** - * Response for POST /api/jobs/cancel. - */ -export const zJobsCancelResponse = z.object({ - cancelled: z.array(z.string()) -}) + name: z.string(), + source: z.string() +}); /** - * Request to cancel multiple jobs by ID. - */ -export const zJobsCancelRequest = z.object({ - job_ids: z.array(z.string().uuid()).min(1).max(100) -}) - -/** - * Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops. - */ -export const zJobCancelResponse = z.object({ - cancelled: z.boolean() -}) - -/** - * Lightweight job data for list views (workflow and full outputs excluded) + * Full data for a global subgraph blueprint */ -export const zJobEntry = z.object({ - id: z.string().uuid(), - status: z.enum([ - 'pending', - 'in_progress', - 'completed', - 'failed', - 'cancelled' - ]), - execution_error: zExecutionError.optional(), - create_time: 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' +export const zGlobalSubgraphData = z.object({ + data: z.string(), + info: z.object({ + node_pack: z.string() }), - preview_output: z.record(z.unknown()).optional(), - outputs_count: z.number().int().optional(), - workflow_id: z.string().optional(), - execution_start_time: 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(), - execution_end_time: 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() -}) + name: z.string(), + source: z.string() +}); /** - * Paginated list of jobs for the authenticated user. + * Individual file entry within a full user data response. */ -export const zJobsListResponse = z.object({ - jobs: z.array(zJobEntry), - pagination: zPaginationInfo -}) +export const zGetUserDataResponseFullFile = z.object({ + modified: 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(), + path: z.string().optional(), + size: z.number().int().optional() +}); /** - * Response after adding, updating, or removing tags on an asset. + * List of user data file entries (each with path, size, and modification time) returned when full_info=true. */ -export const zTagsModificationResponse = z.object({ - added: z.array(z.string()).optional(), - removed: z.array(z.string()).optional(), - already_present: z.array(z.string()).optional(), - not_present: z.array(z.string()).optional(), - total_tags: z.array(z.string()) -}) +export const zGetUserDataResponseFull = z.array(zGetUserDataResponseFullFile); /** - * Details of a single validation error encountered during asset operations. - */ -export const zValidationError = z.object({ - code: z.string(), - message: z.string(), - field: z.string() -}) - -/** - * Result of validating a set of asset operations. + * Request body for forking an existing workflow into the user's account. */ -export const zValidationResult = z.object({ - is_valid: z.boolean(), - errors: z.array(zValidationError).optional(), - warnings: z.array(zValidationError).optional() -}) +export const zForkWorkflowRequest = z.object({ + name: z.string().optional(), + source_version: z.number().int() +}); /** - * Acknowledgement of an async asset download task; clients poll GET /api/tasks/{task_id} for status. + * Response after submitting feedback */ -export const zAssetDownloadResponse = z.object({ - task_id: z.string().uuid(), - status: z.enum(['created', 'running', 'completed', 'failed']), - message: z.string().optional() -}) +export const zFeedbackResponse = z.record(z.unknown()); /** - * Metadata for a remotely hosted asset resolved by URL. + * Request to submit user feedback */ -export const zAssetMetadataResponse = z.object({ - content_length: 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' - }), - content_type: z.string().optional(), - filename: z.string().optional(), - name: z.string().optional(), - tags: z.array(z.string()).optional(), - preview_image: z.string().optional(), - validation: zValidationResult.optional() -}) +export const zFeedbackRequest = z.object({ + content: z.string().optional(), + metadata: z.record(z.unknown()).optional(), + rating: z.number().int().gte(1).lte(5).optional(), + type: z.enum([ + 'missing_nodes', + 'general', + 'missing_models' + ]) +}); /** - * Histogram of tag counts used for refining asset search results. + * Response containing a signed download URL for an exported asset archive. */ -export const zAssetTagHistogramResponse = z.object({ - tag_counts: z.record(z.number().int()) -}) +export const zExportDownloadUrlResponse = z.object({ + expires_at: z.string().datetime().optional(), + url: z.string() +}); /** - * Metadata for a single tag that can be applied to assets. + * Response containing the issued Cloud JWT and its expiry. */ -export const zTagInfo = z.object({ - name: z.string(), - count: z.number().int() -}) +export const zExchangeTokenResponse = z.object({ + expires_at: z.string().datetime(), + permissions: z.array(z.string()), + role: z.enum(['owner', 'member']), + token: z.string(), + workspace: zWorkspaceSummary +}); /** - * Paginated list of available asset tags. + * Optional request body for the token exchange endpoint. The Firebase JWT + * being exchanged is supplied via the `Authorization: Bearer` header; this + * body only carries workspace-selection input. + * */ -export const zListTagsResponse = z.object({ - tags: z.array(zTagInfo), - total: z.number().int(), - has_more: z.boolean() -}) +export const zExchangeTokenRequest = z.object({ + workspace_id: z.string().optional() +}); /** - * Represents a user-owned asset (image, video, or other generated output). + * Result of redeeming a desktop login code. */ -export const zAsset = z.object({ - id: z.string().uuid(), - name: z.string(), - display_name: z.string().nullish(), - hash: z - .string() - .regex(/^blake3:[a-f0-9]{64}$/) - .optional(), - size: 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(), - mime_type: z.string().optional(), - tags: z.array(z.string()).optional(), - user_metadata: z.record(z.unknown()).optional(), - metadata: z.record(z.unknown()).readonly().optional(), - preview_url: z.string().url().optional(), - short_url: z.string().nullish(), - preview_id: z.string().uuid().nullish(), - job_id: z.string().uuid().nullish(), - created_at: z.string().datetime(), - updated_at: z.string().datetime(), - last_access_time: z.string().datetime().optional(), - is_immutable: z.boolean().optional(), - file_path: z.string().nullish() -}) +export const zDesktopLoginCodeRedeemResponse = z.object({ + status: z.enum(['redeemed']) +}); /** - * Paginated list of assets belonging to the authenticated user. + * Request to claim a desktop login code for the authenticated user. */ -export const zListAssetsResponse = z.object({ - assets: z.array(zAsset), - total: z.number().int(), - has_more: z.boolean(), - next_cursor: z.string().optional() -}) +export const zDesktopLoginCodeRedeemRequest = z.object({ + code: z.string() +}); /** - * Response returned when an existing asset is successfully updated. + * Exchange poll result. Pending until the code is redeemed in the browser. */ -export const zAssetUpdated = z.object({ - id: z.string().uuid(), - name: z.string().optional(), - display_name: z.string().nullish(), - hash: z - .string() - .regex(/^blake3:[a-f0-9]{64}$/) - .optional(), - tags: z.array(z.string()).optional(), - mime_type: z.string().optional(), - user_metadata: z.record(z.unknown()).optional(), - job_id: z.string().uuid().nullish(), - updated_at: z.string().datetime(), - file_path: z.string().nullish() -}) +export const zDesktopLoginCodeExchangeResponse = z.object({ + custom_token: z.string().optional(), + status: z.enum(['pending', 'complete']) +}); /** - * Response returned when a new asset is successfully created. + * Request to exchange a redeemed login code for a custom token. */ -export const zAssetCreated = zAsset.and( - z.object({ - created_new: z.boolean() - }) -) +export const zDesktopLoginCodeExchangeRequest = z.object({ + code: z.string(), + code_verifier: z.string().min(43).max(128) +}); /** - * Response after updating the review status of a Hub workflow. + * A freshly minted desktop login code and its polling parameters. */ -export const zSetReviewStatusResponse = z.object({ - share_ids: z.array(z.string()), - status: z.enum(['approved', 'rejected']) -}) +export const zDesktopLoginCodeCreateResponse = z.object({ + code: z.string(), + expires_in: z.number().int(), + poll_interval: z.number().int() +}); /** - * Request body for setting the review status of a Hub workflow. + * Request to mint a desktop login code. */ -export const zSetReviewStatusRequest = z.object({ - share_ids: z.array(z.string()).min(1), - status: z.enum(['approved', 'rejected']) -}) +export const zDesktopLoginCodeCreateRequest = z.object({ + app_version: z.string().min(1).max(64), + code_challenge: z.string().min(43).max(128), + installation_id: z.string().min(8).max(128).regex(/^[A-Za-z0-9._-]+$/).optional(), + platform: z.string().min(1).max(32) +}); /** * Response after deleting a session cookie */ export const zDeleteSessionResponse = z.object({ - success: z.boolean() -}) - -/** - * Response after creating a session cookie - */ -export const zCreateSessionResponse = z.object({ - success: z.boolean(), - expiresIn: z.number().int().optional() -}) + success: z.boolean() +}); /** - * User information response + * Request body for creating a new workspace. */ -export const zUserResponse = z.object({ - id: z.string(), - status: z.string() -}) +export const zCreateWorkspaceRequest = z.object({ + name: z.string().min(1).max(100) +}); /** - * System statistics response + * Response containing the newly created workspace API key. */ -export const zSystemStatsResponse = z.object({ - system: z.object({ - os: z.string(), - python_version: z.string(), - embedded_python: z.boolean(), - comfyui_version: z.string(), - deploy_environment: z.string().optional(), - comfyui_frontend_version: z.string().optional(), - workflow_templates_version: z.string().optional(), - cloud_version: z.string().optional(), - pytorch_version: z.string(), - argv: z.array(z.string()), - ram_total: z.number(), - ram_free: z.number() - }), - devices: z.array( - z.object({ - name: z.string(), - type: z.string(), - vram_total: z.number().optional(), - vram_free: z.number().optional() - }) - ) -}) +export const zCreateWorkspaceApiKeyResponse = z.object({ + created_at: z.string().datetime(), + description: z.string().max(5000), + expires_at: z.string().datetime().optional(), + id: z.string().uuid(), + key: z.string(), + key_prefix: z.string(), + name: z.string() +}); /** - * System logs response + * Request body for creating a new workspace-scoped API key. */ -export const zLogsResponse = z.array( - z.object({ - timestamp: z.string().datetime().optional(), - level: z.enum(['debug', 'info', 'warn', 'error']).optional(), - message: z.string().optional(), - source: z.string().optional(), - metadata: z.record(z.unknown()).optional() - }) -) +export const zCreateWorkspaceApiKeyRequest = z.object({ + description: z.string().max(5000).optional(), + expires_at: z.string().datetime().optional(), + name: z.string() +}); /** - * Response after submitting feedback + * Request body for creating a new version of a saved workflow. */ -export const zFeedbackResponse = z.record(z.unknown()) +export const zCreateWorkflowVersionRequest = z.object({ + base_version: z.number().int(), + workflow_json: z.record(z.unknown()) +}); /** - * Request to submit user feedback + * Request body for creating a new saved workflow. */ -export const zFeedbackRequest = z.object({ - type: z.enum(['missing_nodes', 'general', 'missing_models']), - content: z.string().optional(), - rating: z.number().int().gte(1).lte(5).optional(), - metadata: z.record(z.unknown()).optional() -}) +export const zCreateWorkflowRequest = z.object({ + default_view: z.enum(['workflow', 'app']).optional(), + description: z.string().optional(), + forked_from_workflow_id: z.string().optional(), + forked_from_workflow_version_id: z.string().optional(), + name: z.string().optional(), + workflow_json: z.record(z.unknown()) +}); /** - * Represents a model file with metadata + * Response after successfully purchasing a credit top-up. */ -export const zModelFile = z.object({ - name: z.string(), - pathIndex: z.number().int() -}) +export const zCreateTopupResponse = z.object({ + amount_cents: 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' }), + billing_op_id: z.string(), + status: z.enum([ + 'pending', + 'completed', + 'failed' + ]), + topup_id: z.string() +}); /** - * Represents a folder containing models + * Request body for purchasing a one-time credit top-up. */ -export const zModelFolder = z.object({ - name: z.string(), - folders: z.array(z.string()) -}) +export const zCreateTopupRequest = z.object({ + amount_cents: z.coerce.bigint().gte(BigInt(500)).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }), + idempotency_key: z.string().optional() +}); /** - * Error response for ComfyUI prompt execution. + * Response after creating a session cookie */ -export const zPromptErrorResponse = z.record(z.unknown()) +export const zCreateSessionResponse = z.object({ + expiresIn: z.number().int().optional(), + success: z.boolean() +}); /** - * Individual file entry within a full user data response. + * Request body for creating a new user secret. */ -export const zGetUserDataResponseFullFile = z.object({ - path: z.string().optional(), - size: z.number().int().optional(), - modified: 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() -}) +export const zCreateSecretRequest = z.object({ + name: z.string().min(1).max(255), + provider: z.string().max(64).optional(), + secret_value: z.string().min(1) +}); /** - * List of user data file entries (each with path, size, and modification time) returned when full_info=true. + * Request body for inviting a user to a workspace. */ -export const zGetUserDataResponseFull = z.array(zGetUserDataResponseFullFile) +export const zCreateInviteRequest = z.object({ + email: z.string().email() +}); /** - * User data listing entry with file metadata (path, size, modification time). + * Request body for creating a new Hub profile. */ -export const zUserDataResponseFull = z.object({ - path: z.string().optional(), - size: z.number().int().optional(), - modified: 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() -}) +export const zCreateHubProfileRequest = z.object({ + avatar_token: z.string().optional(), + description: z.string().optional(), + display_name: z.string().optional(), + username: z.string(), + website_urls: z.array(z.string()).optional(), + workspace_id: z.string() +}); /** - * Request to manage history operations + * Response after successfully cancelling a subscription. */ -export const zHistoryManageRequest = z.object({ - delete: z.array(z.string()).optional(), - clear: z.boolean().optional() -}) +export const zCancelSubscriptionResponse = z.object({ + billing_op_id: z.string(), + cancel_at: z.string().datetime() +}); /** - * Job status information + * Request body for cancelling the current subscription. */ -export const zJobStatusResponse = z.object({ - id: z.string().uuid(), - status: z.enum([ - 'waiting_to_dispatch', - 'pending', - 'in_progress', - 'completed', - 'error', - 'cancelled' - ]), - created_at: z.string().datetime(), - updated_at: z.string().datetime(), - last_state_update: z.string().datetime().optional(), - assigned_inference: z.string().nullish(), - error_message: z.string().nullish() -}) +export const zCancelSubscriptionRequest = z.object({ + idempotency_key: z.string().optional() +}); /** - * Response after a queue management action (delete or clear). + * Response after bulk-revoking API keys for a workspace member. */ -export const zQueueManageResponse = z.object({ - deleted: z.array(z.string()).optional(), - cleared: z.boolean().optional() -}) +export const zBulkRevokeApiKeysResponse = z.object({ + revoked_count: z.number().int().gte(0) +}); /** - * Request to manage queue operations + * Payment lifecycle status */ -export const zQueueManageRequest = z.object({ - delete: z.array(z.string()).optional(), - clear: z.boolean().optional() -}) +export const zBillingStatus = z.enum([ + 'awaiting_payment_method', + 'pending_payment', + 'paid', + 'payment_failed', + 'inactive' +]); /** - * Queue information with pending and running jobs + * Current billing and subscription status for a workspace. */ -export const zQueueInfo = z.object({ - queue_running: z - .array( - z.tuple([z.unknown(), z.unknown(), z.unknown(), z.unknown(), z.unknown()]) - ) - .optional(), - queue_pending: z - .array( - z.tuple([z.unknown(), z.unknown(), z.unknown(), z.unknown(), z.unknown()]) - ) - .optional() -}) +export const zBillingStatusResponse = z.object({ + billing_status: zBillingStatus.optional(), + cancel_at: z.string().datetime().optional(), + has_funds: z.boolean(), + is_active: z.boolean(), + plan_slug: z.string().optional(), + renewal_date: z.string().datetime().optional(), + subscription_duration: zSubscriptionDuration.optional(), + subscription_status: z.enum([ + 'active', + 'ended', + 'canceled' + ]).optional(), + subscription_tier: zSubscriptionTier.optional(), + team_credit_stop: zTeamCreditStopSummary.nullable() +}); /** - * History entry with full prompt data + * List of available billing plans for subscription. */ -export const zHistoryDetailEntry = z.object({ - prompt: z - .object({ - priority: z.number().optional(), - prompt_id: z.string().optional(), - prompt: z.record(z.unknown()).optional(), - extra_data: z.record(z.unknown()).optional(), - outputs_to_execute: z.array(z.string()).optional() - }) - .optional(), - outputs: z.record(z.unknown()).optional(), - status: z.record(z.unknown()).optional(), - meta: z.record(z.unknown()).optional() -}) +export const zBillingPlansResponse = z.object({ + current_plan_slug: z.string().optional(), + plans: z.array(zPlan), + team_credit_stops: zTeamCreditStops.optional() +}); /** - * Detailed execution history response for a specific prompt. - * Returns a dictionary with prompt_id as key and full history data as value. - * + * Status of an asynchronous billing operation. */ -export const zHistoryDetailResponse = z.record(zHistoryDetailEntry) +export const zBillingOpStatusResponse = z.object({ + completed_at: z.string().datetime().optional(), + error_message: z.string().optional(), + id: z.string(), + started_at: z.string().datetime(), + status: z.enum([ + 'pending', + 'succeeded', + 'failed' + ]) +}); /** - * History entry with prompt_id and execution data + * A single history event. The cloud history-events store is the single source of truth for both billing events (charges, credits, adjustments) and user-facing usage events. */ -export const zHistoryEntry = z.object({ - prompt_id: z.string(), - create_time: 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(), - workflow_id: z.string().optional(), - prompt: z - .object({ - priority: z.number().optional(), - prompt_id: z.string().optional(), - extra_data: z.record(z.unknown()).optional() - }) - .optional(), - outputs: z.record(z.unknown()).optional(), - status: z.record(z.unknown()).optional(), - meta: z.record(z.unknown()).optional() -}) +export const zBillingEvent = z.object({ + createdAt: z.string().datetime(), + event_id: z.string(), + event_type: z.string(), + params: z.record(z.unknown()).optional() +}); /** - * Execution history response with history array. - * Returns an object with a "history" key containing an array of history entries. - * Each entry includes prompt_id as a property along with execution data. - * + * Paginated list of billing events for a workspace. */ -export const zHistoryResponse = z.object({ - history: z.array(zHistoryEntry) -}) +export const zBillingEventsResponse = z.object({ + events: z.array(zBillingEvent), + limit: z.number().int(), + page: z.number().int(), + total: z.number().int(), + totalPages: z.number().int() +}); /** - * Full data for a global subgraph blueprint + * Current credit balance and usage details for a workspace. */ -export const zGlobalSubgraphData = z.object({ - source: z.string(), - name: z.string(), - info: z.object({ - node_pack: z.string() - }), - data: z.string() -}) +export const zBillingBalanceResponse = z.object({ + amount_micros: z.number(), + cloud_credit_balance_micros: z.number().optional(), + currency: z.string(), + effective_balance_micros: z.number().optional(), + pending_charges_micros: z.number().optional(), + prepaid_balance_micros: z.number().optional() +}); /** - * Metadata for a global subgraph blueprint (without full data) + * Response returned when an existing asset is successfully updated. */ -export const zGlobalSubgraphInfo = z.object({ - source: z.string(), - name: z.string(), - info: z.object({ - node_pack: z.string() - }), - data: z.string().optional() -}) +export const zAssetUpdated = z.object({ + display_name: z.string().nullish(), + file_path: z.string().nullish(), + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/).optional(), + id: z.string().uuid(), + job_id: z.string().uuid().nullish(), + mime_type: z.string().optional(), + name: z.string().optional(), + tags: z.array(z.string()).optional(), + updated_at: z.string().datetime(), + user_metadata: z.record(z.unknown()).optional() +}); /** - * Metadata describing a single ComfyUI node type and its inputs/outputs. + * Histogram of tag counts used for refining asset search results. */ -export const zNodeInfo = z.object({ - input: z.record(z.unknown()).optional(), - input_order: z.record(z.array(z.string())).optional(), - output: z.array(z.string()).optional(), - output_is_list: z.array(z.boolean()).optional(), - output_name: z.array(z.string()).optional(), - name: z.string().optional(), - display_name: z.string().optional(), - description: z.string().optional(), - python_module: z.string().optional(), - category: z.string().optional(), - output_node: z.boolean().optional(), - output_tooltips: z.array(z.string()).optional(), - deprecated: z.boolean().optional(), - experimental: z.boolean().optional(), - api_node: z.boolean().optional() -}) +export const zAssetTagHistogramResponse = z.object({ + tag_counts: z.record(z.number().int()) +}); /** - * Metadata about the currently running and queued prompts. + * Metadata for a remotely hosted asset resolved by URL. */ -export const zPromptInfo = z.object({ - exec_info: z - .object({ - queue_remaining: z.number().int().optional() - }) - .optional() -}) +export const zAssetMetadataResponse = z.object({ + content_length: 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' }), + content_type: z.string().optional(), + filename: z.string().optional(), + name: z.string().optional(), + preview_image: z.string().optional(), + tags: z.array(z.string()).optional(), + validation: zValidationResult.optional() +}); /** - * Response containing a signed download URL for an exported asset archive. + * Acknowledgement of an async asset download task; clients poll GET /api/tasks/{task_id} for status. */ -export const zExportDownloadUrlResponse = z.object({ - url: z.string(), - expires_at: z.string().datetime().optional() -}) +export const zAssetDownloadResponse = z.object({ + message: z.string().optional(), + status: z.enum([ + 'created', + 'running', + 'completed', + 'failed' + ]), + task_id: z.string().uuid() +}); /** - * Response returned after successfully queuing a workflow prompt. + * Response returned when a new asset is successfully created. */ -export const zPromptResponse = z.object({ - prompt_id: z.string().uuid().optional(), - number: z.number().optional(), - node_errors: z.record(z.unknown()).optional() -}) +export const zAssetCreated = zAsset.and(z.object({ + created_new: z.boolean() +})); /** - * Request body for submitting a ComfyUI workflow prompt for execution. + * Response returned after successfully accepting a workspace invitation. */ -export const zPromptRequest = z.object({ - prompt: z.record(z.unknown()), - number: z.number().optional(), - front: z.boolean().optional(), - extra_data: z.record(z.unknown()).optional(), - partial_execution_targets: z.array(z.string()).optional(), - workflow_id: z.string().optional(), - workflow_version_id: z.string().optional() -}) +export const zAcceptInviteResponse = z.object({ + workspace_id: z.string(), + workspace_name: z.string() +}); /** * Represents a user-owned asset (image, video, or other generated output). */ export const zAssetWritable = z.object({ - id: z.string().uuid(), - name: z.string(), - display_name: z.string().nullish(), - hash: z - .string() - .regex(/^blake3:[a-f0-9]{64}$/) - .optional(), - size: 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(), - mime_type: z.string().optional(), - tags: z.array(z.string()).optional(), - user_metadata: z.record(z.unknown()).optional(), - preview_url: z.string().url().optional(), - short_url: z.string().nullish(), - preview_id: z.string().uuid().nullish(), - job_id: z.string().uuid().nullish(), - created_at: z.string().datetime(), - updated_at: z.string().datetime(), - last_access_time: z.string().datetime().optional(), - is_immutable: z.boolean().optional(), - file_path: z.string().nullish() -}) + created_at: z.string().datetime(), + display_name: z.string().nullish(), + file_path: z.string().nullish(), + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/).optional(), + id: z.string().uuid(), + is_immutable: z.boolean().optional(), + job_id: z.string().uuid().nullish(), + last_access_time: z.string().datetime().optional(), + mime_type: z.string().optional(), + name: z.string(), + preview_id: z.string().uuid().nullish(), + preview_url: z.string().url().optional(), + short_url: z.string().nullish(), + size: 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(), + tags: z.array(z.string()).optional(), + updated_at: z.string().datetime(), + user_metadata: z.record(z.unknown()).optional() +}); /** * Paginated list of assets belonging to the authenticated user. */ export const zListAssetsResponseWritable = z.object({ - assets: z.array(zAssetWritable), - total: z.number().int(), - has_more: z.boolean(), - next_cursor: z.string().optional() -}) - -/** - * Response returned when a new asset is successfully created. - */ -export const zAssetCreatedWritable = zAssetWritable.and( - z.object({ - created_new: z.boolean() - }) -) - -/** - * Response after submitting feedback - */ -export const zFeedbackResponseWritable = z.record(z.unknown()) - -export const zGetPromptInfoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Success - */ -export const zGetPromptInfoResponse = zPromptInfo - -export const zExecutePromptData = z.object({ - body: zPromptRequest, - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Success - Prompt accepted - */ -export const zExecutePromptResponse = zPromptResponse - -export const zGetNodeInfoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Success - */ -export const zGetNodeInfoResponse = z.record(zNodeInfo) - -export const zGetFeaturesData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Success - */ -export const zGetFeaturesResponse = z.object({ - supports_preview_metadata: z.boolean().optional(), - max_upload_size: z.number().int().optional() -}) - -export const zGetNodeReplacementsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Success - Node replacement mappings - */ -export const zGetNodeReplacementsResponse = z.record(z.unknown()) - -export const zGetWorkflowTemplatesData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Empty object for workflow templates - */ -export const zGetWorkflowTemplatesResponse = z.record(z.unknown()) - -export const zGetGlobalSubgraphsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Success - Map of subgraph IDs to their metadata - */ -export const zGetGlobalSubgraphsResponse = z.record(zGlobalSubgraphInfo) - -export const zGetGlobalSubgraphData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) - -/** - * Success - Full subgraph data - */ -export const zGetGlobalSubgraphResponse = zGlobalSubgraphData - -export const zGetModelFoldersData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Success - List of model folders - */ -export const zGetModelFoldersResponse = z.array(zModelFolder) - -export const zGetModelsInFolderData = z.object({ - body: z.never().optional(), - path: z.object({ - folder: z.string() - }), - query: z.never().optional() -}) - -/** - * Success - List of models in the folder - */ -export const zGetModelsInFolderResponse = z.array(zModelFile) - -export const zGetLegacyHistoryData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -export const zManageHistoryData = z.object({ - body: zHistoryManageRequest, - path: z.never().optional(), - query: z.never().optional() -}) - -export const zGetHistoryData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - max_items: z.number().int().optional(), - offset: z.number().int().optional().default(0) - }) - .optional() -}) + assets: z.array(zAssetWritable), + has_more: z.boolean(), + next_cursor: z.string().optional(), + total: z.number().int() +}); /** - * Success - Execution history retrieved + * Response returned when a new asset is successfully created. */ -export const zGetHistoryResponse = zHistoryResponse +export const zAssetCreatedWritable = zAssetWritable.and(z.object({ + created_new: z.boolean() +})); -export const zGetHistoryForPromptData = z.object({ - body: z.never().optional(), - path: z.object({ - prompt_id: z.string() - }), - query: z.never().optional() -}) +export const zGetJwksData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success - History for prompt retrieved + * JWKS response */ -export const zGetHistoryForPromptResponse = zHistoryDetailResponse +export const zGetJwksResponse = zJwksResponse; -export const zListJobsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - status: z.string().optional(), - workflow_id: z.string().optional(), - output_type: z.enum(['image', 'video', 'audio', '3d']).optional(), - sort_by: z.enum(['create_time', 'execution_time']).optional(), - sort_order: z.enum(['asc', 'desc']).optional(), - after: z.string().optional(), - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(1000).optional().default(100) - }) - .optional() -}) +export const zGetOAuthAuthorizationServerData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success - Jobs retrieved + * Authorization-server metadata */ -export const zListJobsResponse = zJobsListResponse +export const zGetOAuthAuthorizationServerResponse = zOAuthAuthorizationServerMetadata; -export const zGetJobDetailData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string().uuid() - }), - query: z - .object({ - short_link: z.enum(['ephemeral_tool_chain', 'default']).optional() - }) - .optional() -}) +export const zGetOAuthProtectedResourceData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success - Job details retrieved + * Protected-resource metadata */ -export const zGetJobDetailResponse = zJobDetailResponse +export const zGetOAuthProtectedResourceResponse = zOAuthProtectedResourceMetadata; -export const zCancelJobData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zGetOAuthProtectedResourceByPathData = z.object({ + body: z.never().optional(), + path: z.object({ + resourcePath: z.string().regex(/^[a-zA-Z0-9._-]+$/) + }), + query: z.never().optional() +}); /** - * Success - Cancel request accepted (or job was already terminal) + * Protected-resource metadata */ -export const zCancelJobResponse = zJobCancelResponse +export const zGetOAuthProtectedResourceByPathResponse = zOAuthProtectedResourceMetadata; -export const zCancelJobsData = z.object({ - body: zJobsCancelRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetCustomNodeProxyData = z.object({ + body: z.never().optional(), + path: z.object({ + path: z.string() + }), + query: z.never().optional() +}); + +export const zPostCustomNodeProxyData = z.object({ + body: z.never().optional(), + path: z.object({ + path: z.string() + }), + query: z.never().optional() +}); + +export const zListAssetsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + include_tags: z.array(z.string()).optional(), + exclude_tags: z.array(z.string()).optional(), + name_contains: z.string().optional(), + metadata_filter: z.string().optional(), + limit: z.number().int().gte(1).lte(500).optional().default(20), + offset: z.number().int().gte(0).optional().default(0), + sort: z.enum([ + 'name', + 'created_at', + 'updated_at', + 'size', + 'last_access_time' + ]).optional(), + order: z.enum(['asc', 'desc']).optional(), + include_public: z.boolean().optional().default(true), + hash: z.string().optional(), + after: z.string().optional() + }).optional() +}); /** - * Success - cancel requests dispatched (or jobs were already terminal) + * Success - Assets returned */ -export const zCancelJobsResponse = zJobsCancelResponse +export const zListAssetsResponse2 = zListAssetsResponse; -export const zViewFileData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string(), - subfolder: z.string().optional(), - type: z.string().optional(), - fullpath: z.string().optional(), - format: z.string().optional(), - frame_rate: z.number().int().optional(), - workflow: z.string().optional(), - timestamp: z.number().int().optional(), - channel: z.string().optional(), - res: z.number().int().gte(64).lte(1024).optional() - }) -}) +export const zCreateAssetData = z.object({ + body: z.object({ + file: z.string(), + hash: z.string().regex(/^(blake3|sha256):[a-f0-9]{64}$/).optional(), + id: z.string().uuid().optional(), + mime_type: z.string().optional(), + name: z.string().optional(), + preview_id: z.string().uuid().optional(), + tags: z.string().optional(), + user_metadata: z.string().optional() + }), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Processed PNG image with extracted channel + * Asset already existed for this user (deduplicated by content hash); the + * existing asset is returned with created_new=false. + * */ -export const zViewFileResponse = z.string() +export const zCreateAssetResponse = zAssetCreated; -export const zGetMaskLayersData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string() - }) -}) +export const zDeleteAssetData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Success - Related mask layers returned + * Asset record deleted successfully */ -export const zGetMaskLayersResponse = z.object({ - mask: z.string().nullish(), - paint: z.string().nullish(), - painted: z.string().nullish(), - painted_masked: z.string().nullish() -}) +export const zDeleteAssetResponse = z.void(); -export const zGetFilesData = z.object({ - body: z.never().optional(), - path: z.object({ - directory_type: z.enum(['output', 'input', 'temp']) - }), - query: z.never().optional() -}) +export const zGetAssetByIdData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Array of file names sorted by modification time (newest first) + * Asset details retrieved successfully */ -export const zGetFilesResponse = z.array(z.string()) +export const zGetAssetByIdResponse = zAsset; -export const zListAssetsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - include_tags: z.array(z.string()).optional(), - exclude_tags: z.array(z.string()).optional(), - name_contains: z.string().optional(), - metadata_filter: z.string().optional(), - limit: z.number().int().gte(1).lte(500).optional().default(20), - offset: z.number().int().gte(0).optional().default(0), - sort: z - .enum(['name', 'created_at', 'updated_at', 'size', 'last_access_time']) - .optional(), - order: z.enum(['asc', 'desc']).optional(), - include_public: z.boolean().optional().default(true), - hash: z.string().optional(), - after: z.string().optional() - }) - .optional() -}) +export const zUpdateAssetData = z.object({ + body: z.object({ + mime_type: z.string().optional(), + name: z.string().optional(), + preview_id: z.string().uuid().optional(), + user_metadata: z.record(z.unknown()).optional() + }), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Success - Assets returned + * Asset updated successfully */ -export const zListAssetsResponse2 = zListAssetsResponse +export const zUpdateAssetResponse = zAssetUpdated; -export const zCreateAssetData = z.object({ - body: z.object({ - file: z.string(), - hash: z - .string() - .regex(/^(blake3|sha256):[a-f0-9]{64}$/) - .optional(), - tags: z.string().optional(), - id: z.string().uuid().optional(), - preview_id: z.string().uuid().optional(), - name: z.string().optional(), - mime_type: z.string().optional(), - user_metadata: z.string().optional() - }), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetAssetContentData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.object({ + disposition: z.enum(['inline', 'attachment']).optional() + }).optional() +}); /** - * Asset already existed for this user (deduplicated by content hash); the - * existing asset is returned with created_new=false. - * + * Asset content stream (local runtime streams the bytes directly) */ -export const zCreateAssetResponse = zAssetCreated +export const zGetAssetContentResponse = z.string(); -export const zCreateAssetFromHashData = z.object({ - body: z.object({ - hash: z.string().regex(/^blake3:[a-f0-9]{64}$/), - name: z.string().optional(), - tags: z.array(z.string()).min(1), - mime_type: z.string().optional(), - user_metadata: z.record(z.unknown()).optional() - }), - path: z.never().optional(), - query: z.never().optional() -}) +export const zRemoveAssetTagsData = z.object({ + body: z.object({ + tags: z.array(z.string()).min(1) + }), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Asset reference already existed for this user (deduplicated by content - * hash); the existing asset is returned with created_new=false. - * + * Tags removed successfully */ -export const zCreateAssetFromHashResponse = zAssetCreated +export const zRemoveAssetTagsResponse = zTagsModificationResponse; -export const zGetRemoteAssetMetadataData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - url: z.string().url() - }) -}) +export const zAddAssetTagsData = z.object({ + body: z.object({ + tags: z.array(z.string()).min(1) + }), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Metadata retrieved successfully + * Tags added successfully */ -export const zGetRemoteAssetMetadataResponse = zAssetMetadataResponse +export const zAddAssetTagsResponse = zTagsModificationResponse; export const zCreateAssetDownloadData = z.object({ - body: z.object({ - source_url: z.string().url(), - tags: z.array(z.string()).optional(), - user_metadata: z.record(z.unknown()).optional(), - preview_id: z.string().uuid().optional() - }), - path: z.never().optional(), - query: z.never().optional() -}) + body: z.object({ + preview_id: z.string().uuid().optional(), + source_url: z.string().url(), + tags: z.array(z.string()).optional(), + user_metadata: z.record(z.unknown()).optional() + }), + path: z.never().optional(), + query: z.never().optional() +}); export const zCreateAssetDownloadResponse = z.union([ - zAssetCreated, - zAssetDownloadResponse -]) + zAssetCreated, + zAssetDownloadResponse +]); export const zCreateAssetExportData = z.object({ - body: z.object({ - job_ids: z.array(z.string()).optional(), - asset_ids: z.array(z.string()).optional(), - naming_strategy: z - .enum(['group_by_job_id', 'preserve', 'asset_id', 'group_by_job_time']) - .optional(), - job_asset_name_filters: z.record(z.array(z.string()).min(1)).optional(), - include_previews: z.boolean().optional().default(false) - }), - path: z.never().optional(), - query: z.never().optional() -}) + body: z.object({ + asset_ids: z.array(z.string()).optional(), + include_previews: z.boolean().optional().default(false), + job_asset_name_filters: z.record(z.array(z.string()).min(1)).optional(), + job_ids: z.array(z.string()).optional(), + naming_strategy: z.enum([ + 'group_by_job_id', + 'preserve', + 'asset_id', + 'group_by_job_time' + ]).optional() + }), + path: z.never().optional(), + query: z.never().optional() +}); /** * Accepted - Export task created and processing in background */ -export const zCreateAssetExportResponse = zAssetDownloadResponse +export const zCreateAssetExportResponse = zAssetDownloadResponse; export const zDownloadExportData = z.object({ - body: z.never().optional(), - path: z.object({ - exportName: z.string().regex(/^[a-zA-Z0-9_-]+\.zip$/) - }), - query: z.never().optional() -}) + body: z.never().optional(), + path: z.object({ + exportName: z.string().regex(/^[a-zA-Z0-9_-]+\.zip$/) + }), + query: z.never().optional() +}); /** * Signed URL for downloading the export */ -export const zDownloadExportResponse = zExportDownloadUrlResponse +export const zDownloadExportResponse = zExportDownloadUrlResponse; -export const zDeleteAssetData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zCreateAssetFromHashData = z.object({ + body: z.object({ + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/), + mime_type: z.string().optional(), + name: z.string().optional(), + tags: z.array(z.string()).min(1), + user_metadata: z.record(z.unknown()).optional() + }), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Asset record deleted successfully + * Asset reference already existed for this user (deduplicated by content + * hash); the existing asset is returned with created_new=false. + * */ -export const zDeleteAssetResponse = z.void() +export const zCreateAssetFromHashResponse = zAssetCreated; -export const zGetAssetByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zPostAssetsFromWorkflowData = z.object({ + body: zWorkflowApiAssetsRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Asset details retrieved successfully + * Success */ -export const zGetAssetByIdResponse = zAsset - -export const zUpdateAssetData = z.object({ - body: z.object({ - name: z.string().optional(), - mime_type: z.string().optional(), - preview_id: z.string().uuid().optional(), - user_metadata: z.record(z.unknown()).optional() - }), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zPostAssetsFromWorkflowResponse = zWorkflowApiAssetsResponse; -/** - * Asset updated successfully - */ -export const zUpdateAssetResponse = zAssetUpdated +export const zCheckAssetByHashData = z.object({ + body: z.never().optional(), + path: z.object({ + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/) + }), + query: z.never().optional() +}); -export const zRemoveAssetTagsData = z.object({ - body: z.object({ - tags: z.array(z.string()).min(1) - }), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zImportPublishedAssetsData = z.object({ + body: zImportPublishedAssetsRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Tags removed successfully + * Successfully imported assets */ -export const zRemoveAssetTagsResponse = zTagsModificationResponse +export const zImportPublishedAssetsResponse2 = zImportPublishedAssetsResponse; -export const zAddAssetTagsData = z.object({ - body: z.object({ - tags: z.array(z.string()).min(1) - }), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zPruneAssetsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Tags added successfully + * Prune result */ -export const zAddAssetTagsResponse = zTagsModificationResponse +export const zPruneAssetsResponse = z.object({ + marked: z.number().int().optional(), + status: z.string().optional() +}); -export const zListTagsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - prefix: z.string().optional(), - limit: z.number().int().gte(1).lte(1000).optional().default(100), - offset: z.number().int().gte(0).optional().default(0), - order: z.enum(['count_desc', 'name_asc']).optional(), - include_zero: z.boolean().optional().default(false), - include_public: z.boolean().optional().default(true) +export const zGetRemoteAssetMetadataData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + url: z.string().url() }) - .optional() -}) +}); /** - * Tags retrieved successfully + * Metadata retrieved successfully */ -export const zListTagsResponse2 = zListTagsResponse +export const zGetRemoteAssetMetadataResponse = zAssetMetadataResponse; -export const zGetAssetTagHistogramData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - include_tags: z.array(z.string()).optional(), - exclude_tags: z.array(z.string()).optional(), - name_contains: z.string().optional(), - metadata_filter: z.string().optional(), - limit: z.number().int().gte(1).lte(1000).optional().default(100), - include_public: z.boolean().optional().default(true) - }) - .optional() -}) +export const zSeedAssetsData = z.object({ + body: z.object({ + roots: z.array(z.string()).optional() + }).optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success - Tag histogram returned + * Seed started */ -export const zGetAssetTagHistogramResponse = zAssetTagHistogramResponse - -export const zCheckAssetByHashData = z.object({ - body: z.never().optional(), - path: z.object({ - hash: z.string().regex(/^blake3:[a-f0-9]{64}$/) - }), - query: z.never().optional() -}) +export const zSeedAssetsResponse = z.object({ + status: z.string().optional() +}); -export const zPostAssetsFromWorkflowData = z.object({ - body: zWorkflowApiAssetsRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zCancelAssetSeedData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success + * Scan cancelled */ -export const zPostAssetsFromWorkflowResponse = zWorkflowApiAssetsResponse +export const zCancelAssetSeedResponse = z.object({ + status: z.string().optional() +}); -export const zImportPublishedAssetsData = z.object({ - body: zImportPublishedAssetsRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetAssetSeedStatusData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Successfully imported assets + * Scan progress details (files scanned, total, status, etc.) */ -export const zImportPublishedAssetsResponse2 = zImportPublishedAssetsResponse +export const zGetAssetSeedStatusResponse = z.record(z.unknown()); -export const zGetQueueInfoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetAssetTagHistogramData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + include_tags: z.array(z.string()).optional(), + exclude_tags: z.array(z.string()).optional(), + name_contains: z.string().optional(), + metadata_filter: z.string().optional(), + limit: z.number().int().gte(1).lte(1000).optional().default(100), + include_public: z.boolean().optional().default(true) + }).optional() +}); /** - * Success + * Success - Tag histogram returned */ -export const zGetQueueInfoResponse = zQueueInfo +export const zGetAssetTagHistogramResponse = zAssetTagHistogramResponse; -export const zManageQueueData = z.object({ - body: zQueueManageRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zCreateDesktopLoginCodeData = z.object({ + body: zDesktopLoginCodeCreateRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success + * Login code created */ -export const zManageQueueResponse = zQueueManageResponse - -export const zInterruptJobData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zCreateDesktopLoginCodeResponse = zDesktopLoginCodeCreateResponse; -export const zListSecretsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zExchangeDesktopLoginCodeData = z.object({ + body: zDesktopLoginCodeExchangeRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success + * Pending (not yet redeemed) or complete with a custom token */ -export const zListSecretsResponse = zSecretListResponse +export const zExchangeDesktopLoginCodeResponse = zDesktopLoginCodeExchangeResponse; -export const zCreateSecretData = z.object({ - body: zCreateSecretRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zRedeemDesktopLoginCodeData = z.object({ + body: zDesktopLoginCodeRedeemRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Secret created successfully + * Code redeemed (or already redeemed by the same user) */ -export const zCreateSecretResponse = zSecretResponse +export const zRedeemDesktopLoginCodeResponse = zDesktopLoginCodeRedeemResponse; -export const zListSecretProvidersData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zDeleteSessionData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success + * Session deleted successfully */ -export const zListSecretProvidersResponse = zSecretProvidersResponse +export const zDeleteSessionResponse2 = zDeleteSessionResponse; -export const zDeleteSecretData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zCreateSessionData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Secret deleted successfully + * Session created successfully */ -export const zDeleteSecretResponse = z.void() +export const zCreateSessionResponse2 = zCreateSessionResponse; -export const zGetSecretData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zExchangeTokenData = z.object({ + body: zExchangeTokenRequest.optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success + * Token exchanged successfully */ -export const zGetSecretResponse = zSecretResponse +export const zExchangeTokenResponse2 = zExchangeTokenResponse; -export const zUpdateSecretData = z.object({ - body: zUpdateSecretRequest, - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zGetBillingBalanceData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Secret updated successfully + * Credit balance */ -export const zUpdateSecretResponse = zSecretResponse +export const zGetBillingBalanceResponse = zBillingBalanceResponse; -export const zGetAllSettingsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetBillingEventsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + page: z.number().int().gte(1).optional().default(1), + limit: z.number().int().gte(1).lte(100).optional().default(20) + }).optional() +}); /** - * User settings as key-value pairs + * Paginated billing events */ -export const zGetAllSettingsResponse = z.record(z.unknown()) +export const zGetBillingEventsResponse = zBillingEventsResponse; -export const zUpdateMultipleSettingsData = z.object({ - body: z.record(z.unknown()), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetBillingOpStatusData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}); /** - * Updated user settings + * Billing operation status */ -export const zUpdateMultipleSettingsResponse = z.record(z.unknown()) +export const zGetBillingOpStatusResponse = zBillingOpStatusResponse; -export const zGetSettingByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) +export const zGetPaymentPortalData = z.object({ + body: zPaymentPortalRequest.optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Setting value response + * Success */ -export const zGetSettingByIdResponse = z.object({ - value: z.unknown().optional() -}) +export const zGetPaymentPortalResponse = zPaymentPortalResponse; -export const zUpdateSettingByIdData = z.object({ - body: z.unknown(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) +export const zGetBillingPlansData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Updated setting value response + * Available plans with pricing */ -export const zUpdateSettingByIdResponse = z.object({ - value: z.unknown().optional() -}) +export const zGetBillingPlansResponse = zBillingPlansResponse; -export const zSubmitFeedbackData = z.object({ - body: zFeedbackRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zPreviewSubscribeData = z.object({ + body: zPreviewSubscribeRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Feedback submitted successfully + * Subscription preview */ -export const zSubmitFeedbackResponse = zFeedbackResponse +export const zPreviewSubscribeResponse2 = zPreviewSubscribeResponse; -export const zGetUserdataData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - dir: z.string().optional(), - recurse: z.boolean().optional().default(false), - split: z.boolean().optional().default(false), - full_info: z.boolean().optional().default(false) - }) - .optional() -}) +export const zGetBillingStatusData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * A list of user data files. + * Billing status */ -export const zGetUserdataResponse = zGetUserDataResponseFull +export const zGetBillingStatusResponse = zBillingStatusResponse; -export const zGetUserdataFilePublishData = z.object({ - body: z.never().optional(), - path: z.object({ - file: z.string() - }), - query: z.never().optional() -}) +export const zSubscribeData = z.object({ + body: zSubscribeRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Publish info (publish_time is null if never published) + * Subscription created or payment method needed */ -export const zGetUserdataFilePublishResponse = zWorkflowPublishInfo +export const zSubscribeResponse2 = zSubscribeResponse; -export const zPostUserdataFilePublishData = z.object({ - body: zPublishWorkflowAssetsRequest, - path: z.object({ - file: z.string() - }), - query: z.never().optional() -}) +export const zCancelSubscriptionData = z.object({ + body: zCancelSubscriptionRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Workflow published + * Subscription cancellation scheduled */ -export const zPostUserdataFilePublishResponse = zWorkflowPublishInfo +export const zCancelSubscriptionResponse2 = zCancelSubscriptionResponse; -export const zDeleteUserdataFileData = z.object({ - body: z.never().optional(), - path: z.object({ - file: z.string() - }), - query: z.never().optional() -}) +export const zResubscribeData = z.object({ + body: zResubscribeRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * File deleted successfully (No Content). + * Subscription resumed successfully */ -export const zDeleteUserdataFileResponse = z.void() +export const zResubscribeResponse2 = zResubscribeResponse; -export const zGetUserdataFileData = z.object({ - body: z.never().optional(), - path: z.object({ - file: z.string() - }), - query: z.never().optional() -}) +export const zCreateTopupData = z.object({ + body: zCreateTopupRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Successfully retrieved the file. + * Top-up initiated successfully */ -export const zGetUserdataFileResponse = z.string() +export const zCreateTopupResponse2 = zCreateTopupResponse; -export const zPostUserdataFileData = z.object({ - body: z.string(), - path: z.object({ - file: z.string() - }), - query: z - .object({ - overwrite: z.enum(['true', 'false']).optional(), - full_info: z.enum(['true', 'false']).optional() - }) - .optional() -}) +export const zGetEmbeddingsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * File uploaded successfully. + * Embedding names */ -export const zPostUserdataFileResponse = zUserDataResponseFull +export const zGetEmbeddingsResponse = z.array(z.string()); -export const zMoveUserdataFileData = z.object({ - body: z.never().optional(), - path: z.object({ - file: z.string(), - dest: z.string() - }), - query: z - .object({ - overwrite: z.enum(['true', 'false']).optional() - }) - .optional() -}) +export const zGetModelFoldersData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * File moved successfully. + * Success - List of model folders */ -export const zMoveUserdataFileResponse = zUserDataResponseFull +export const zGetModelFoldersResponse = z.array(zModelFolder); -export const zUploadImageData = z.object({ - body: z.object({ - image: z.string(), - overwrite: z.string().optional(), - subfolder: z.string().optional(), - type: z.string().optional() - }), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetModelsInFolderData = z.object({ + body: z.never().optional(), + path: z.object({ + folder: z.string() + }), + query: z.never().optional() +}); /** - * Image uploaded successfully + * Success - List of models in the folder */ -export const zUploadImageResponse = z.object({ - name: z.string().optional(), - subfolder: z.string().optional(), - type: z.string().optional() -}) +export const zGetModelsInFolderResponse = z.array(zModelFile); -export const zUploadMaskData = z.object({ - body: z.object({ - image: z.string(), - original_ref: z.string() - }), - path: z.never().optional(), - 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 zGetNodeInfoSchemaData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); + +export const zGetNodeByIdData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}); + +export const zGetExtensionsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Mask uploaded successfully + * URL paths (relative to web root) of available extension JS files */ -export const zUploadMaskResponse = z.object({ - name: z.string().optional(), - subfolder: z.string().optional(), - type: z.string().optional() -}) +export const zGetExtensionsResponse = z.array(z.string()); -export const zGetLogsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetFeaturesData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** * Success */ -export const zGetLogsResponse = zLogsResponse +export const zGetFeaturesResponse = z.object({ + max_upload_size: z.number().int().optional(), + supports_preview_metadata: z.boolean().optional() +}); -export const zGetSystemStatsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zSubmitFeedbackData = z.object({ + body: zFeedbackRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success + * Feedback submitted successfully */ -export const zGetSystemStatsResponse = zSystemStatsResponse +export const zSubmitFeedbackResponse = zFeedbackResponse; -export const zDeleteSessionData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetMaskLayersData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string() + }) +}); /** - * Session deleted successfully + * Success - Related mask layers returned */ -export const zDeleteSessionResponse2 = zDeleteSessionResponse +export const zGetMaskLayersResponse = z.object({ + mask: z.string().nullish(), + paint: z.string().nullish(), + painted: z.string().nullish(), + painted_masked: z.string().nullish() +}); -export const zCreateSessionData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zFreeMemoryData = z.object({ + body: z.object({ + free_memory: z.boolean().optional(), + unload_models: z.boolean().optional() + }).optional(), + path: z.never().optional(), + query: z.never().optional() +}); + +export const zGetGlobalSubgraphsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Session created successfully + * Success - Map of subgraph IDs to their metadata */ -export const zCreateSessionResponse2 = zCreateSessionResponse +export const zGetGlobalSubgraphsResponse = z.record(zGlobalSubgraphInfo); -export const zExchangeTokenData = z.object({ - body: zExchangeTokenRequest.optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetGlobalSubgraphData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}); /** - * Token exchanged successfully + * Success - Full subgraph data */ -export const zExchangeTokenResponse2 = zExchangeTokenResponse +export const zGetGlobalSubgraphResponse = zGlobalSubgraphData; -export const zCreateDesktopLoginCodeData = z.object({ - body: zDesktopLoginCodeCreateRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetLegacyHistoryData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); + +export const zManageHistoryData = z.object({ + body: zHistoryManageRequest, + path: z.never().optional(), + query: z.never().optional() +}); + +export const zGetLegacyHistoryByIdData = z.object({ + body: z.never().optional(), + path: z.object({ + prompt_id: z.string() + }), + query: z.never().optional() +}); + +export const zGetHistoryData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + max_items: z.number().int().optional(), + offset: z.number().int().optional().default(0) + }).optional() +}); /** - * Login code created + * Success - Execution history retrieved */ -export const zCreateDesktopLoginCodeResponse = zDesktopLoginCodeCreateResponse +export const zGetHistoryResponse = zHistoryResponse; -export const zRedeemDesktopLoginCodeData = z.object({ - body: zDesktopLoginCodeRedeemRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetHistoryForPromptData = z.object({ + body: z.never().optional(), + path: z.object({ + prompt_id: z.string() + }), + query: z.never().optional() +}); /** - * Code redeemed (or already redeemed by the same user) + * Success - History for prompt retrieved */ -export const zRedeemDesktopLoginCodeResponse = zDesktopLoginCodeRedeemResponse +export const zGetHistoryForPromptResponse = zHistoryDetailResponse; -export const zExchangeDesktopLoginCodeData = z.object({ - body: zDesktopLoginCodeExchangeRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zCreateHubAssetUploadUrlData = z.object({ + body: zHubAssetUploadUrlRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Pending (not yet redeemed) or complete with a custom token + * Presigned upload URL and token */ -export const zExchangeDesktopLoginCodeResponse = - zDesktopLoginCodeExchangeResponse +export const zCreateHubAssetUploadUrlResponse = zHubAssetUploadUrlResponse; -export const zGetJwksData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zListHubLabelsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + type: z.enum([ + 'tag', + 'model', + 'custom_node' + ]).optional() + }).optional() +}); /** - * JWKS response + * List of labels */ -export const zGetJwksResponse = zJwksResponse +export const zListHubLabelsResponse = zHubLabelListResponse; -export const zGetOAuthAuthorizationServerData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zCreateHubProfileData = z.object({ + body: zCreateHubProfileRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Authorization-server metadata + * Hub profile created */ -export const zGetOAuthAuthorizationServerResponse = - zOAuthAuthorizationServerMetadata +export const zCreateHubProfileResponse = zHubProfile; -export const zGetOAuthProtectedResourceData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetHubProfileByUsernameData = z.object({ + body: z.never().optional(), + path: z.object({ + username: z.string() + }), + query: z.never().optional() +}); /** - * Protected-resource metadata + * Hub profile */ -export const zGetOAuthProtectedResourceResponse = - zOAuthProtectedResourceMetadata +export const zGetHubProfileByUsernameResponse = zHubProfile; -export const zGetOAuthProtectedResourceByPathData = z.object({ - body: z.never().optional(), - path: z.object({ - resourcePath: z.string().regex(/^[a-zA-Z0-9._-]+$/) - }), - query: z.never().optional() -}) +export const zUpdateHubProfileData = z.object({ + body: zUpdateHubProfileRequest, + path: z.object({ + username: z.string() + }), + query: z.never().optional() +}); /** - * Protected-resource metadata + * Hub profile updated */ -export const zGetOAuthProtectedResourceByPathResponse = - zOAuthProtectedResourceMetadata +export const zUpdateHubProfileResponse = zHubProfile; -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() +export const zCheckHubUsernameData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + username: z.string() }) - .optional() -}) +}); /** - * Consent challenge payload (cookie present, email verified). Frontend renders the consent UI from this payload and POSTs back to /oauth/authorize. - * + * Username availability result */ -export const zGetOAuthAuthorizeResponse = zOAuthConsentChallenge +export const zCheckHubUsernameResponse = zHubUsernameCheckResponse; -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() -}) +export const zGetMyHubProfileData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Redirect URL for the frontend to navigate to (allow → with code+state; deny → with error+state) + * Hub profile */ -export const zPostOAuthAuthorizeResponse = zOAuthAuthorizeRedirectResponse +export const zGetMyHubProfileResponse = zHubProfile; -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() -}) +export const zListHubWorkflowsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + cursor: z.string().optional(), + limit: z.number().int().gte(1).lte(100).optional().default(20), + search: z.string().optional(), + tag: z.string().optional(), + username: z.string().optional(), + detail: z.boolean().optional().default(false), + status: z.array(zHubWorkflowStatus).optional() + }).optional() +}); /** - * New token pair + * Paginated list of hub workflows */ -export const zPostOAuthTokenResponse = zOAuthTokenResponse +export const zListHubWorkflowsResponse = zHubWorkflowListResponse; -export const zPostOAuthRegisterData = z.object({ - body: zOAuthRegisterRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zPublishHubWorkflowData = z.object({ + body: zPublishHubWorkflowRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Registered. Body echoes the metadata RFC 7591 §3.2.1 requires. + * Workflow published to hub */ -export const zPostOAuthRegisterResponse = zOAuthRegisterResponse +export const zPublishHubWorkflowResponse = zHubWorkflowDetail; -export const zListWorkspacesData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zDeleteHubWorkflowData = z.object({ + body: z.never().optional(), + path: z.object({ + share_id: z.string() + }), + query: z.never().optional() +}); /** - * List of workspaces + * Successfully unpublished */ -export const zListWorkspacesResponse2 = zListWorkspacesResponse +export const zDeleteHubWorkflowResponse = z.void(); -export const zCreateWorkspaceData = z.object({ - body: zCreateWorkspaceRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetHubWorkflowData = z.object({ + body: z.never().optional(), + path: z.object({ + share_id: z.string() + }), + query: z.never().optional() +}); /** - * Workspace created + * Hub workflow detail */ -export const zCreateWorkspaceResponse = zWorkspace +export const zGetHubWorkflowResponse = zHubWorkflowDetail; -export const zDeleteWorkspaceData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) +export const zListHubWorkflowIndexData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + status: z.array(zHubWorkflowStatus).optional() + }).optional() +}); /** - * Workspace deleted + * List of hub workflow template entries */ -export const zDeleteWorkspaceResponse = z.void() +export const zListHubWorkflowIndexResponse = z.array(zHubWorkflowTemplateEntry); -export const zGetWorkspaceData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) +export const zGetI18nData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Workspace details + * Nested map of locale to translation key-value pairs */ -export const zGetWorkspaceResponse = zWorkspace +export const zGetI18nResponse = z.record(z.unknown()); -export const zUpdateWorkspaceData = z.object({ - body: zUpdateWorkspaceRequest, - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) +export const zInterruptJobData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); + +export const zAcceptWorkspaceInviteData = z.object({ + body: z.never().optional(), + path: z.object({ + token: z.string() + }), + query: z.never().optional() +}); /** - * Workspace updated + * Invite accepted, user is now a member */ -export const zUpdateWorkspaceResponse = zWorkspace +export const zAcceptWorkspaceInviteResponse = zAcceptInviteResponse; -export const zListWorkspaceMembersData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(100).optional().default(20) - }) - .optional() -}) +export const zGetLegacyJobByIdData = z.object({ + body: z.never().optional(), + path: z.object({ + job_id: z.string() + }), + query: z.never().optional() +}); -/** - * List of members - */ -export const zListWorkspaceMembersResponse = zListMembersResponse +export const zGetLegacyJobOutputsData = z.object({ + body: z.never().optional(), + path: z.object({ + job_id: z.string() + }), + query: z.never().optional() +}); -export const zListWorkspaceInvitesData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetJobStatusData = z.object({ + body: z.never().optional(), + path: z.object({ + job_id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * List of pending invites + * Success - Job status returned */ -export const zListWorkspaceInvitesResponse = zListInvitesResponse +export const zGetJobStatusResponse = zJobStatusResponse; -export const zCreateWorkspaceInviteData = z.object({ - body: zCreateInviteRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zListJobsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + status: z.string().optional(), + workflow_id: z.string().optional(), + output_type: z.enum([ + 'image', + 'video', + 'audio', + '3d' + ]).optional(), + sort_by: z.enum(['create_time', 'execution_time']).optional(), + sort_order: z.enum(['asc', 'desc']).optional(), + after: z.string().optional(), + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(1000).optional().default(100) + }).optional() +}); /** - * Invite created + * Success - Jobs retrieved */ -export const zCreateWorkspaceInviteResponse = zPendingInvite +export const zListJobsResponse = zJobsListResponse; -export const zAcceptWorkspaceInviteData = z.object({ - body: z.never().optional(), - path: z.object({ - token: z.string() - }), - query: z.never().optional() -}) +export const zGetJobDetailData = z.object({ + body: z.never().optional(), + path: z.object({ + job_id: z.string().uuid() + }), + query: z.object({ + short_link: z.enum(['ephemeral_tool_chain', 'default']).optional() + }).optional() +}); /** - * Invite accepted, user is now a member + * Success - Job details retrieved */ -export const zAcceptWorkspaceInviteResponse = zAcceptInviteResponse +export const zGetJobDetailResponse = zJobDetailResponse; -export const zLeaveWorkspaceData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zCancelJobData = z.object({ + body: z.never().optional(), + path: z.object({ + job_id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Successfully left workspace + * Success - Cancel request accepted (or job was already terminal) */ -export const zLeaveWorkspaceResponse = z.void() +export const zCancelJobResponse = zJobCancelResponse; -export const zRevokeWorkspaceInviteData = z.object({ - body: z.never().optional(), - path: z.object({ - inviteId: z.string() - }), - query: z.never().optional() -}) +export const zCancelJobsData = z.object({ + body: zJobsCancelRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Invite revoked + * Success - cancel requests dispatched (or jobs were already terminal) */ -export const zRevokeWorkspaceInviteResponse = z.void() +export const zCancelJobsResponse = zJobsCancelResponse; -export const zRemoveWorkspaceMemberData = z.object({ - body: z.never().optional(), - path: z.object({ - userId: z.string() - }), - query: z.never().optional() -}) +export const zGetLegacyModelsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); -/** - * Member removed - */ -export const zRemoveWorkspaceMemberResponse = z.void() +export const zGetLegacyModelsByFolderData = z.object({ + body: z.never().optional(), + path: z.object({ + folder: z.string() + }), + query: z.never().optional() +}); -export const zUpdateWorkspaceMemberRoleData = z.object({ - body: zUpdateMemberRoleRequest, - path: z.object({ - userId: z.string() - }), - query: z.never().optional() -}) +export const zGetNodeReplacementsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Member role updated + * Success - Node replacement mappings */ -export const zUpdateWorkspaceMemberRoleResponse = zMember +export const zGetNodeReplacementsResponse = z.record(z.unknown()); -export const zListWorkspaceApiKeysData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetNodeInfoData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * List of API keys + * Success */ -export const zListWorkspaceApiKeysResponse2 = zListWorkspaceApiKeysResponse +export const zGetNodeInfoResponse = z.record(zNodeInfo); -export const zCreateWorkspaceApiKeyData = z.object({ - body: zCreateWorkspaceApiKeyRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetLegacyObjectInfoByNodeClassData = z.object({ + body: z.never().optional(), + path: z.object({ + node_class: z.string() + }), + query: z.never().optional() +}); + +export const zGetPromptInfoData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * API key created (plaintext returned once) + * Success */ -export const zCreateWorkspaceApiKeyResponse2 = zCreateWorkspaceApiKeyResponse +export const zGetPromptInfoResponse = zPromptInfo; -export const zRevokeWorkspaceApiKeyData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zExecutePromptData = z.object({ + body: zPromptRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * API key revoked + * Success - Prompt accepted */ -export const zRevokeWorkspaceApiKeyResponse = z.void() +export const zExecutePromptResponse = zPromptResponse; -export const zBulkRevokeWorkspaceMemberApiKeysData = z.object({ - body: z.never().optional(), - path: z.object({ - user_id: z.string().min(1) - }), - query: z.never().optional() -}) +export const zGetLegacyPromptByIdData = z.object({ + body: z.never().optional(), + path: z.object({ + prompt_id: z.string() + }), + query: z.never().optional() +}); + +export const zGetQueueInfoData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Keys revoked successfully + * Success */ -export const zBulkRevokeWorkspaceMemberApiKeysResponse = - zBulkRevokeApiKeysResponse +export const zGetQueueInfoResponse = zQueueInfo; -export const zVerifyWorkspaceApiKeyData = z.object({ - body: zVerifyApiKeyRequest, - path: z.never().optional(), - query: z - .object({ - include_billing: z.boolean().optional().default(false) - }) - .optional() -}) +export const zManageQueueData = z.object({ + body: zQueueManageRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Key is valid + * Success */ -export const zVerifyWorkspaceApiKeyResponse = zVerifyApiKeyResponse +export const zManageQueueResponse = zQueueManageResponse; -export const zGetUserData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zListSecretsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** * Success */ -export const zGetUserResponse = zUserResponse +export const zListSecretsResponse = zSecretListResponse; -export const zSetReviewStatusData = z.object({ - body: zSetReviewStatusRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zCreateSecretData = z.object({ + body: zCreateSecretRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Status updated successfully + * Secret created successfully */ -export const zSetReviewStatusResponse2 = zSetReviewStatusResponse +export const zCreateSecretResponse = zSecretResponse; -export const zAdminDeleteHubWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - share_id: z.string() - }), - query: z.never().optional() -}) +export const zDeleteSecretData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Successfully deleted + * Secret deleted successfully */ -export const zAdminDeleteHubWorkflowResponse = z.void() +export const zDeleteSecretResponse = z.void(); -export const zUpdateHubWorkflowData = z.object({ - body: zUpdateHubWorkflowRequest, - path: z.object({ - share_id: z.string() - }), - query: z.never().optional() -}) +export const zGetSecretData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Updated hub workflow detail + * Success */ -export const zUpdateHubWorkflowResponse = zHubWorkflowDetail +export const zGetSecretResponse = zSecretResponse; -export const zGetDeletionRequestData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - firebase_id: z.string() - }) -}) +export const zUpdateSecretData = z.object({ + body: zUpdateSecretRequest, + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Success - deletion request found + * Secret updated successfully */ -export const zGetDeletionRequestResponse = z.array(zDeletionRequest) +export const zUpdateSecretResponse = zSecretResponse; -export const zCreateDeletionRequestData = z.object({ - body: z.object({ - firebase_id: z.string() - }), - path: z.never().optional(), - query: z.never().optional() -}) +export const zListSecretProvidersData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Created - deletion request created or already exists + * Success */ -export const zCreateDeletionRequestResponse = z.object({ - user_found_in_cloud: z.boolean() -}) +export const zListSecretProvidersResponse = zSecretProvidersResponse; -export const zReleaseDeletionHoldData = z.object({ - body: z.object({ - firebase_id: z.string() - }), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetAllSettingsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Release authorized; the deletion workflow will proceed + * User settings as key-value pairs */ -export const zReleaseDeletionHoldResponse = zReleaseHoldResponse +export const zGetAllSettingsResponse = z.record(z.unknown()); -export const zReportPartnerUsageData = z.object({ - body: zPartnerUsageRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zUpdateMultipleSettingsData = z.object({ + body: z.record(z.unknown()), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Usage reported successfully + * Updated user settings */ -export const zReportPartnerUsageResponse = zPartnerUsageResponse +export const zUpdateMultipleSettingsResponse = z.record(z.unknown()); -export const zGetHistoryEventsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - workspace_id: z.string().optional(), - user_id: z.string().optional(), - event_type: z.string().optional(), - start_date: z.string().datetime().optional(), - end_date: z.string().datetime().optional(), - page: z.number().int().optional(), - limit: z.number().int().optional() - }) - .optional() -}) +export const zGetSettingByIdData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}); /** - * Paginated cloud history events for the workspace + * Setting value response */ -export const zGetHistoryEventsResponse = zBillingEventsResponse +export const zGetSettingByIdResponse = z.object({ + value: z.unknown().optional() +}); -export const zReportHistoryEventData = z.object({ - body: zHistoryEventRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zUpdateSettingByIdData = z.object({ + body: z.unknown(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}); /** - * History event recorded successfully + * Updated setting value response */ -export const zReportHistoryEventResponse = zPartnerUsageResponse +export const zUpdateSettingByIdResponse = z.object({ + value: z.unknown().optional() +}); -export const zUpdateSubscriptionCacheData = z.object({ - body: z.object({ - user_id: z.string(), - is_active: z.boolean(), - tier: z.string().optional() - }), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetSystemStatsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Cache updated successfully + * Success */ -export const zUpdateSubscriptionCacheResponse = z.object({ - status: z.string().optional() -}) +export const zGetSystemStatsResponse = zSystemStatsResponse; -export const zListLinkedFirebaseUidsData = z.object({ - body: zListLinkedFirebaseUidsRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zListTagsData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + prefix: z.string().optional(), + limit: z.number().int().gte(1).lte(1000).optional().default(100), + offset: z.number().int().gte(0).optional().default(0), + order: z.enum(['count_desc', 'name_asc']).optional(), + include_zero: z.boolean().optional().default(false), + include_public: z.boolean().optional().default(true) + }).optional() +}); /** - * Linked Firebase UIDs (possibly empty list) + * Tags retrieved successfully */ -export const zListLinkedFirebaseUidsResponse2 = zListLinkedFirebaseUidsResponse +export const zListTagsResponse2 = zListTagsResponse; -export const zEnsureWorkspaceBillingProvisionedData = z.object({ - body: zEnsureWorkspaceBillingProvisionedRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zListTasksData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + task_name: z.string().optional(), + idempotency_key: z.string().optional(), + status: z.string().optional(), + created_after: z.string().datetime().optional(), + created_before: z.string().datetime().optional(), + sort_order: z.enum(['asc', 'desc']).optional(), + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(100).optional().default(20) + }).optional() +}); /** - * The workspace's provisioned billing identity + * Success - Tasks retrieved */ -export const zEnsureWorkspaceBillingProvisionedResponse2 = - zEnsureWorkspaceBillingProvisionedResponse +export const zListTasksResponse = zTasksListResponse; -export const zInsertDynamicConfigData = z.object({ - body: z.record(z.unknown()), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetTaskData = z.object({ + body: z.never().optional(), + path: z.object({ + task_id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Config inserted successfully + * Success - Task details retrieved */ -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 zGetTaskResponse = zTaskResponse; -export const zSyncApiKeyData = z.object({ - body: zSyncApiKeyRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zUploadImageData = z.object({ + body: z.object({ + image: z.string(), + overwrite: z.string().optional(), + subfolder: z.string().optional(), + type: z.string().optional() + }), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Sync processed — see `result` field + * Image uploaded successfully */ -export const zSyncApiKeyResponse2 = zSyncApiKeyResponse +export const zUploadImageResponse = z.object({ + name: z.string().optional(), + subfolder: z.string().optional(), + type: z.string().optional() +}); -export const zGetJobStatusData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zUploadMaskData = z.object({ + body: z.object({ + image: z.string(), + original_ref: z.string() + }), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success - Job status returned + * Mask uploaded successfully */ -export const zGetJobStatusResponse = zJobStatusResponse +export const zUploadMaskResponse = z.object({ + name: z.string().optional(), + subfolder: z.string().optional(), + type: z.string().optional() +}); -export const zListTasksData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - task_name: z.string().optional(), - idempotency_key: z.string().optional(), - status: z.string().optional(), - created_after: z.string().datetime().optional(), - created_before: z.string().datetime().optional(), - sort_order: z.enum(['asc', 'desc']).optional(), - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(100).optional().default(20) - }) - .optional() -}) +export const zGetUserData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Success - Tasks retrieved + * Success */ -export const zListTasksResponse = zTasksListResponse +export const zGetUserResponse = zUserResponse; -export const zGetTaskData = z.object({ - body: z.never().optional(), - path: z.object({ - task_id: z.string().uuid() - }), - query: z.never().optional() -}) +export const zGetUserdataData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + dir: z.string().optional(), + recurse: z.boolean().optional().default(false), + split: z.boolean().optional().default(false), + full_info: z.boolean().optional().default(false) + }).optional() +}); /** - * Success - Task details retrieved + * A list of user data files. */ -export const zGetTaskResponse = zTaskResponse +export const zGetUserdataResponse = zGetUserDataResponseFull; -export const zGetBillingStatusData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zDeleteUserdataFileData = z.object({ + body: z.never().optional(), + path: z.object({ + file: z.string() + }), + query: z.never().optional() +}); /** - * Billing status + * File deleted successfully (No Content). */ -export const zGetBillingStatusResponse = zBillingStatusResponse +export const zDeleteUserdataFileResponse = z.void(); -export const zGetBillingBalanceData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetUserdataFileData = z.object({ + body: z.never().optional(), + path: z.object({ + file: z.string() + }), + query: z.never().optional() +}); /** - * Credit balance + * Successfully retrieved the file. */ -export const zGetBillingBalanceResponse = zBillingBalanceResponse +export const zGetUserdataFileResponse = z.string(); -export const zGetBillingEventsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - page: z.number().int().gte(1).optional().default(1), - limit: z.number().int().gte(1).lte(100).optional().default(20) - }) - .optional() -}) +export const zPostUserdataFileData = z.object({ + body: z.string(), + path: z.object({ + file: z.string() + }), + query: z.object({ + overwrite: z.enum(['true', 'false']).optional(), + full_info: z.enum(['true', 'false']).optional() + }).optional() +}); /** - * Paginated billing events + * File uploaded successfully. */ -export const zGetBillingEventsResponse = zBillingEventsResponse +export const zPostUserdataFileResponse = zUserDataResponseFull; -export const zGetBillingPlansData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zMoveUserdataFileData = z.object({ + body: z.never().optional(), + path: z.object({ + file: z.string(), + dest: z.string() + }), + query: z.object({ + overwrite: z.enum(['true', 'false']).optional() + }).optional() +}); /** - * Available plans with pricing + * File moved successfully. */ -export const zGetBillingPlansResponse = zBillingPlansResponse +export const zMoveUserdataFileResponse = zUserDataResponseFull; -export const zPreviewSubscribeData = z.object({ - body: zPreviewSubscribeRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetUserdataFilePublishData = z.object({ + body: z.never().optional(), + path: z.object({ + file: z.string() + }), + query: z.never().optional() +}); /** - * Subscription preview + * Publish info (publish_time is null if never published) */ -export const zPreviewSubscribeResponse2 = zPreviewSubscribeResponse +export const zGetUserdataFilePublishResponse = zWorkflowPublishInfo; -export const zSubscribeData = z.object({ - body: zSubscribeRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zPostUserdataFilePublishData = z.object({ + body: zPublishWorkflowAssetsRequest, + path: z.object({ + file: z.string() + }), + query: z.never().optional() +}); /** - * Subscription created or payment method needed + * Workflow published */ -export const zSubscribeResponse2 = zSubscribeResponse +export const zPostUserdataFilePublishResponse = zWorkflowPublishInfo; -export const zCancelSubscriptionData = z.object({ - body: zCancelSubscriptionRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetUsersInfoData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Subscription cancellation scheduled + * Userdata storage information */ -export const zCancelSubscriptionResponse2 = zCancelSubscriptionResponse +export const zGetUsersInfoResponse = z.object({ + migrated: z.boolean(), + storage: z.string() +}); -export const zResubscribeData = z.object({ - body: zResubscribeRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetLegacyUserdataV2Data = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); + +export const zGetVhsQueryVideoData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string() + }) +}); /** - * Subscription resumed successfully + * Video metadata */ -export const zResubscribeResponse2 = zResubscribeResponse +export const zGetVhsQueryVideoResponse = z.object({ + source: z.object({ + duration: z.number(), + fps: z.number(), + frames: z.number().int(), + size: z.tuple([z.number().int(), z.number().int()]) + }) +}); -export const zGetPaymentPortalData = z.object({ - body: zPaymentPortalRequest.optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetVhsViewAudioData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string(), + type: z.string().optional(), + subfolder: z.string().optional() + }) +}); -/** - * Success - */ -export const zGetPaymentPortalResponse = zPaymentPortalResponse +export const zGetVhsViewVideoData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string(), + type: z.string().optional(), + subfolder: z.string().optional() + }) +}); -export const zCreateTopupData = z.object({ - body: zCreateTopupRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zViewFileData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string(), + subfolder: z.string().optional(), + type: z.string().optional(), + fullpath: z.string().optional(), + format: z.string().optional(), + frame_rate: z.number().int().optional(), + workflow: z.string().optional(), + timestamp: z.number().int().optional(), + channel: z.string().optional(), + res: z.number().int().gte(64).lte(1024).optional() + }) +}); /** - * Top-up initiated successfully + * Resized JPEG thumbnail (returned when res parameter is used) */ -export const zCreateTopupResponse2 = zCreateTopupResponse +export const zViewFileResponse = z.string(); -export const zGetBillingOpStatusData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) +export const zGetLegacyViewMetadataData = z.object({ + body: z.never().optional(), + path: z.object({ + folder_name: z.string() + }), + query: z.never().optional() +}); + +export const zGetApiViewVideoAliasData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string() + }) +}); + +export const zGetWorkflowTemplatesData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Billing operation status + * Empty object for workflow templates */ -export const zGetBillingOpStatusResponse = zBillingOpStatusResponse +export const zGetWorkflowTemplatesResponse = z.record(z.unknown()); export const zListWorkflowsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - limit: z.number().int().lte(100).optional().default(20), - offset: z.number().int().optional().default(0), - name: z.string().optional(), - default_view: z.enum(['workflow', 'app']).optional(), - sort: z.enum(['create_time', 'update_time', 'name']).optional(), - order: z.enum(['asc', 'desc']).optional() - }) - .optional() -}) + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + limit: z.number().int().lte(100).optional().default(20), + offset: z.number().int().optional().default(0), + name: z.string().optional(), + default_view: z.enum(['workflow', 'app']).optional(), + sort: z.enum([ + 'create_time', + 'update_time', + 'name' + ]).optional(), + order: z.enum(['asc', 'desc']).optional() + }).optional() +}); /** * Success */ -export const zListWorkflowsResponse = zWorkflowListResponse +export const zListWorkflowsResponse = zWorkflowListResponse; export const zCreateWorkflowData = z.object({ - body: zCreateWorkflowRequest, - path: z.never().optional(), - query: z.never().optional() -}) + body: zCreateWorkflowRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** * Workflow created successfully */ -export const zCreateWorkflowResponse = zWorkflowResponse +export const zCreateWorkflowResponse = zWorkflowResponse; export const zDeleteWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}) + body: z.never().optional(), + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}); /** * Workflow deleted successfully */ -export const zDeleteWorkflowResponse = z.void() +export const zDeleteWorkflowResponse = z.void(); export const zGetWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}) + body: z.never().optional(), + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}); /** * Success */ -export const zGetWorkflowResponse = zWorkflowResponse +export const zGetWorkflowResponse = zWorkflowResponse; export const zUpdateWorkflowData = z.object({ - body: zUpdateWorkflowRequest, - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}) + body: zUpdateWorkflowRequest, + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}); /** * Success */ -export const zUpdateWorkflowResponse = zWorkflowResponse - -export const zCreateWorkflowVersionData = z.object({ - body: zCreateWorkflowVersionRequest, - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}) - -/** - * Version created successfully - */ -export const zCreateWorkflowVersionResponse = zWorkflowVersionResponse +export const zUpdateWorkflowResponse = zWorkflowResponse; export const zGetWorkflowContentData = z.object({ - body: z.never().optional(), - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}) + body: z.never().optional(), + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}); /** * Success */ -export const zGetWorkflowContentResponse = zWorkflowVersionContentResponse +export const zGetWorkflowContentResponse = zWorkflowVersionContentResponse; export const zForkWorkflowData = z.object({ - body: zForkWorkflowRequest, - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}) + body: zForkWorkflowRequest, + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}); /** * Workflow forked successfully */ -export const zForkWorkflowResponse = zWorkflowResponse - -export const zCreateHubProfileData = z.object({ - body: zCreateHubProfileRequest, - path: z.never().optional(), - query: z.never().optional() -}) - -/** - * Hub profile created - */ -export const zCreateHubProfileResponse = zHubProfile +export const zForkWorkflowResponse = zWorkflowResponse; -export const zGetMyHubProfileData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zCreateWorkflowVersionData = z.object({ + body: zCreateWorkflowVersionRequest, + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}); /** - * Hub profile + * Version created successfully */ -export const zGetMyHubProfileResponse = zHubProfile +export const zCreateWorkflowVersionResponse = zWorkflowVersionResponse; -export const zCheckHubUsernameData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - username: z.string() - }) -}) +export const zGetPublishedWorkflowData = z.object({ + body: z.never().optional(), + path: z.object({ + share_id: z.string() + }), + query: z.never().optional() +}); /** - * Username availability result + * Published workflow details with asset statuses */ -export const zCheckHubUsernameResponse = zHubUsernameCheckResponse +export const zGetPublishedWorkflowResponse = zPublishedWorkflowDetail; -export const zGetHubProfileByUsernameData = z.object({ - body: z.never().optional(), - path: z.object({ - username: z.string() - }), - query: z.never().optional() -}) +export const zListWorkspaceApiKeysData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Hub profile + * List of API keys */ -export const zGetHubProfileByUsernameResponse = zHubProfile +export const zListWorkspaceApiKeysResponse2 = zListWorkspaceApiKeysResponse; -export const zUpdateHubProfileData = z.object({ - body: zUpdateHubProfileRequest, - path: z.object({ - username: z.string() - }), - query: z.never().optional() -}) +export const zCreateWorkspaceApiKeyData = z.object({ + body: zCreateWorkspaceApiKeyRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Hub profile updated + * API key created (plaintext returned once) */ -export const zUpdateHubProfileResponse = zHubProfile +export const zCreateWorkspaceApiKeyResponse2 = zCreateWorkspaceApiKeyResponse; -export const zCreateHubAssetUploadUrlData = z.object({ - body: zHubAssetUploadUrlRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zRevokeWorkspaceApiKeyData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}); /** - * Presigned upload URL and token + * API key revoked */ -export const zCreateHubAssetUploadUrlResponse = zHubAssetUploadUrlResponse +export const zRevokeWorkspaceApiKeyResponse = z.void(); -export const zListHubLabelsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - type: z.enum(['tag', 'model', 'custom_node']).optional() - }) - .optional() -}) +export const zListWorkspaceInvitesData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * List of labels + * List of pending invites */ -export const zListHubLabelsResponse = zHubLabelListResponse +export const zListWorkspaceInvitesResponse = zListInvitesResponse; -export const zListHubWorkflowsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - cursor: z.string().optional(), - limit: z.number().int().gte(1).lte(100).optional().default(20), - search: z.string().optional(), - tag: z.string().optional(), - username: z.string().optional(), - detail: z.boolean().optional().default(false), - status: z.array(zHubWorkflowStatus).optional() - }) - .optional() -}) +export const zCreateWorkspaceInviteData = z.object({ + body: zCreateInviteRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Paginated list of hub workflows + * Invite created */ -export const zListHubWorkflowsResponse = zHubWorkflowListResponse +export const zCreateWorkspaceInviteResponse = zPendingInvite; -export const zPublishHubWorkflowData = z.object({ - body: zPublishHubWorkflowRequest, - path: z.never().optional(), - query: z.never().optional() -}) +export const zRevokeWorkspaceInviteData = z.object({ + body: z.never().optional(), + path: z.object({ + inviteId: z.string() + }), + query: z.never().optional() +}); /** - * Workflow published to hub + * Invite revoked */ -export const zPublishHubWorkflowResponse = zHubWorkflowDetail +export const zRevokeWorkspaceInviteResponse = z.void(); -export const zListHubWorkflowIndexData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - status: z.array(zHubWorkflowStatus).optional() - }) - .optional() -}) +export const zLeaveWorkspaceData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * List of hub workflow template entries + * Successfully left workspace */ -export const zListHubWorkflowIndexResponse = z.array(zHubWorkflowTemplateEntry) +export const zLeaveWorkspaceResponse = z.void(); -export const zDeleteHubWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - share_id: z.string() - }), - query: z.never().optional() -}) +export const zListWorkspaceMembersData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(100).optional().default(20) + }).optional() +}); /** - * Successfully unpublished + * List of members */ -export const zDeleteHubWorkflowResponse = z.void() +export const zListWorkspaceMembersResponse = zListMembersResponse; -export const zGetHubWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - share_id: z.string() - }), - query: z.never().optional() -}) +export const zBulkRevokeWorkspaceMemberApiKeysData = z.object({ + body: z.never().optional(), + path: z.object({ + user_id: z.string().min(1) + }), + query: z.never().optional() +}); /** - * Hub workflow detail + * Keys revoked successfully */ -export const zGetHubWorkflowResponse = zHubWorkflowDetail +export const zBulkRevokeWorkspaceMemberApiKeysResponse = zBulkRevokeApiKeysResponse; -export const zGetPublishedWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - share_id: z.string() - }), - query: z.never().optional() -}) +export const zRemoveWorkspaceMemberData = z.object({ + body: z.never().optional(), + path: z.object({ + userId: z.string() + }), + query: z.never().optional() +}); /** - * Published workflow details with asset statuses + * Member removed */ -export const zGetPublishedWorkflowResponse = zPublishedWorkflowDetail +export const zRemoveWorkspaceMemberResponse = z.void(); -export const zGetExtensionsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zUpdateWorkspaceMemberRoleData = z.object({ + body: zUpdateMemberRoleRequest, + path: z.object({ + userId: z.string() + }), + query: z.never().optional() +}); /** - * URL paths (relative to web root) of available extension JS files + * Member role updated */ -export const zGetExtensionsResponse = z.array(z.string()) - -export const zGetNodeInfoSchemaData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -export const zGetNodeByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) - -export const zGetVhsViewVideoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string(), - type: z.string().optional(), - subfolder: z.string().optional() - }) -}) - -export const zGetVhsViewAudioData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string(), - type: z.string().optional(), - subfolder: z.string().optional() - }) -}) +export const zUpdateWorkspaceMemberRoleResponse = zMember; -export const zGetVhsQueryVideoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string() - }) -}) +export const zListWorkspacesData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Video metadata + * List of workspaces */ -export const zGetVhsQueryVideoResponse = z.object({ - source: z.object({ - size: z.tuple([z.number().int(), z.number().int()]), - fps: z.number(), - frames: z.number().int(), - duration: z.number() - }) -}) +export const zListWorkspacesResponse2 = zListWorkspacesResponse; -export const zGetUsersInfoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zCreateWorkspaceData = z.object({ + body: zCreateWorkspaceRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Userdata storage information + * Workspace created */ -export const zGetUsersInfoResponse = z.object({ - storage: z.string(), - migrated: z.boolean() -}) - -export const zGetApiViewVideoAliasData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string() - }) -}) - -export const zGetViewCompatAliasData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string() - }) -}) - -export const zGetWebsocketData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z - .object({ - clientId: z.string().optional() - }) - .optional() -}) - -export const zGetTemplateProxyData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}) +export const zCreateWorkspaceResponse = zWorkspace; -export const zGetHealthData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zDeleteWorkspaceData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}); /** - * Service is healthy + * Workspace deleted */ -export const zGetHealthResponse = z.string() - -export const zGetMonitoringTasksData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -export const zDeleteMonitoringTasksSubpathData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}) - -export const zGetMonitoringTasksSubpathData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}) - -export const zPostMonitoringTasksSubpathData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}) - -export const zGetPprofData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}) - -export const zGetPprofProfileData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -export const zGetPprofTraceData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -export const zPostPprofSymbolData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -export const zGetStaticExtensionsData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}) - -export const zGetCustomNodeProxyData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}) - -export const zPostCustomNodeProxyData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - 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 zShortLinkRedirectData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}) - -export const zGetLegacyPromptByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - prompt_id: z.string() - }), - query: z.never().optional() -}) - -export const zGetLegacyHistoryByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - prompt_id: z.string() - }), - query: z.never().optional() -}) - -export const zGetLegacyJobByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string() - }), - query: z.never().optional() -}) - -export const zGetLegacyJobOutputsData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string() - }), - query: z.never().optional() -}) - -export const zGetLegacyModelsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) - -export const zGetLegacyModelsByFolderData = z.object({ - body: z.never().optional(), - path: z.object({ - folder: z.string() - }), - query: z.never().optional() -}) - -export const zGetLegacyObjectInfoByNodeClassData = z.object({ - body: z.never().optional(), - path: z.object({ - node_class: z.string() - }), - query: z.never().optional() -}) - -export const zGetLegacyUserdataV2Data = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zDeleteWorkspaceResponse = z.void(); -export const zGetAssetContentData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z - .object({ - disposition: z.enum(['inline', 'attachment']).optional() - }) - .optional() -}) +export const zGetWorkspaceData = z.object({ + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}); /** - * Asset content stream (local runtime streams the bytes directly) + * Workspace details */ -export const zGetAssetContentResponse = z.string() +export const zGetWorkspaceResponse = zWorkspace; -export const zGetLegacyViewMetadataData = z.object({ - body: z.never().optional(), - path: z.object({ - folder_name: z.string() - }), - query: z.never().optional() -}) - -export const zGetEmbeddingsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zUpdateWorkspaceData = z.object({ + body: zUpdateWorkspaceRequest, + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}); /** - * Embedding names + * Workspace updated */ -export const zGetEmbeddingsResponse = z.array(z.string()) +export const zUpdateWorkspaceResponse = zWorkspace; -export const zFreeMemoryData = z.object({ - body: z - .object({ - unload_models: z.boolean().optional(), - free_memory: z.boolean().optional() - }) - .optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetStaticExtensionsData = z.object({ + body: z.never().optional(), + path: z.object({ + path: z.string() + }), + query: z.never().optional() +}); -export const zGetI18nData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zGetHealthData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Nested map of locale to translation key-value pairs + * Service is healthy */ -export const zGetI18nResponse = z.record(z.unknown()) +export const zGetHealthResponse = z.string(); export const zGetInternalFolderPathsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** * Map of folder type name to list of path entries */ -export const zGetInternalFolderPathsResponse = z.record( - z.array(z.array(z.string())) -) +export const zGetInternalFolderPathsResponse = z.record(z.array(z.array(z.string()))); export const zGetInternalLogsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** * Log text */ -export const zGetInternalLogsResponse = z.string() +export const zGetInternalLogsResponse = z.string(); export const zGetInternalLogsRawData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}); /** * Structured log data */ export const zGetInternalLogsRawResponse = z.object({ - entries: z - .array( - z.object({ - t: z.number().optional(), - m: z.string().optional() - }) - ) - .optional(), - size: z - .object({ - cols: z.number().int().optional(), - rows: z.number().int().optional() - }) - .optional() -}) + entries: z.array(z.object({ + m: z.string().optional(), + t: z.number().optional() + })).optional(), + size: z.object({ + cols: z.number().int().optional(), + rows: z.number().int().optional() + }).optional() +}); export const zSubscribeToLogsData = z.object({ - body: z.object({ - clientId: z.string(), - enabled: z.boolean() - }), - path: z.never().optional(), - query: z.never().optional() -}) + body: z.object({ + clientId: z.string(), + enabled: z.boolean() + }), + path: z.never().optional(), + query: z.never().optional() +}); -export const zPruneAssetsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +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() +}); /** - * Prune result + * Consent challenge payload (cookie present, email verified). Frontend renders the consent UI from this payload and POSTs back to /oauth/authorize. + * */ -export const zPruneAssetsResponse = z.object({ - status: z.string().optional(), - marked: z.number().int().optional() -}) +export const zGetOAuthAuthorizeResponse = zOAuthConsentChallenge; -export const zSeedAssetsData = z.object({ - body: z - .object({ - roots: z.array(z.string()).optional() - }) - .optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zPostOAuthAuthorizeData = z.object({ + body: z.object({ + csrf_token: z.string(), + decision: z.enum(['allow', 'deny']), + oauth_request_id: z.string().uuid(), + workspace_id: z.string() + }), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Seed started + * Redirect URL for the frontend to navigate to (allow → with code+state; deny → with error+state) */ -export const zSeedAssetsResponse = z.object({ - status: z.string().optional() -}) +export const zPostOAuthAuthorizeResponse = zOAuthAuthorizeRedirectResponse; -export const zGetAssetSeedStatusData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zPostOAuthRegisterData = z.object({ + body: zOAuthRegisterRequest, + path: z.never().optional(), + query: z.never().optional() +}); /** - * Scan progress details (files scanned, total, status, etc.) + * Registered. Body echoes the metadata RFC 7591 §3.2.1 requires. */ -export const zGetAssetSeedStatusResponse = z.record(z.unknown()) +export const zPostOAuthRegisterResponse = zOAuthRegisterResponse; -export const zCancelAssetSeedData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}) +export const zPostOAuthTokenData = z.object({ + body: z.object({ + client_id: z.string(), + client_secret: z.string().optional(), + code: z.string().optional(), + code_verifier: z.string().optional(), + grant_type: z.enum(['authorization_code', 'refresh_token']), + redirect_uri: z.string().optional(), + refresh_token: z.string().optional(), + scope: z.string().optional() + }), + path: z.never().optional(), + query: z.never().optional() +}); /** - * Scan cancelled + * New token pair */ -export const zCancelAssetSeedResponse = z.object({ - status: z.string().optional() -}) +export const zPostOAuthTokenResponse = zOAuthTokenResponse; + +export const zGetTemplateProxyData = z.object({ + body: z.never().optional(), + path: z.object({ + path: z.string() + }), + query: z.never().optional() +}); + +export const zGetViewCompatAliasData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string() + }) +}); + +export const zGetWebsocketData = z.object({ + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + clientId: z.string().optional() + }).optional() +}); From c864513a033b5e737a929c708f5e920275cf4279 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 8 Jul 2026 17:49:22 +0000 Subject: [PATCH 2/2] [automated] Apply ESLint and Oxfmt fixes --- packages/ingest-types/src/index.ts | 898 +- packages/ingest-types/src/types.gen.ts | 14950 ++++++++++++----------- packages/ingest-types/src/zod.gen.ts | 4560 +++---- 3 files changed, 10895 insertions(+), 9513 deletions(-) diff --git a/packages/ingest-types/src/index.ts b/packages/ingest-types/src/index.ts index 7126ba00dd8..164eba21809 100644 --- a/packages/ingest-types/src/index.ts +++ b/packages/ingest-types/src/index.ts @@ -1,3 +1,899 @@ // This file is auto-generated by @hey-api/openapi-ts -export type { AcceptInviteResponse, AcceptWorkspaceInviteData, AcceptWorkspaceInviteError, AcceptWorkspaceInviteErrors, AcceptWorkspaceInviteResponse, AcceptWorkspaceInviteResponses, AddAssetTagsData, AddAssetTagsError, AddAssetTagsErrors, AddAssetTagsResponse, AddAssetTagsResponses, Asset, AssetCreated, AssetCreatedWritable, AssetDownloadResponse, AssetInfo, AssetMetadataResponse, AssetTagHistogramResponse, AssetUpdated, AssetWritable, BillingBalanceResponse, BillingEvent, BillingEventsResponse, BillingOpStatusResponse, BillingPlansResponse, BillingStatus, BillingStatusResponse, BulkRevokeApiKeysResponse, BulkRevokeWorkspaceMemberApiKeysData, BulkRevokeWorkspaceMemberApiKeysError, BulkRevokeWorkspaceMemberApiKeysErrors, BulkRevokeWorkspaceMemberApiKeysResponse, BulkRevokeWorkspaceMemberApiKeysResponses, CancelAssetSeedData, CancelAssetSeedResponse, CancelAssetSeedResponses, CancelJobData, CancelJobError, CancelJobErrors, CancelJobResponse, CancelJobResponses, CancelJobsData, CancelJobsError, CancelJobsErrors, CancelJobsResponse, CancelJobsResponses, CancelSubscriptionData, CancelSubscriptionError, CancelSubscriptionErrors, CancelSubscriptionRequest, CancelSubscriptionResponse, CancelSubscriptionResponse2, CancelSubscriptionResponses, CheckAssetByHashData, CheckAssetByHashError, CheckAssetByHashErrors, CheckAssetByHashResponses, CheckHubUsernameData, CheckHubUsernameError, CheckHubUsernameErrors, CheckHubUsernameResponse, CheckHubUsernameResponses, ClientOptions, CreateAssetData, CreateAssetDownloadData, CreateAssetDownloadError, CreateAssetDownloadErrors, CreateAssetDownloadResponse, CreateAssetDownloadResponses, CreateAssetError, CreateAssetErrors, CreateAssetExportData, CreateAssetExportError, CreateAssetExportErrors, CreateAssetExportResponse, CreateAssetExportResponses, CreateAssetFromHashData, CreateAssetFromHashError, CreateAssetFromHashErrors, CreateAssetFromHashResponse, CreateAssetFromHashResponses, CreateAssetResponse, CreateAssetResponses, CreateDesktopLoginCodeData, CreateDesktopLoginCodeError, CreateDesktopLoginCodeErrors, CreateDesktopLoginCodeResponse, CreateDesktopLoginCodeResponses, CreateHubAssetUploadUrlData, CreateHubAssetUploadUrlError, CreateHubAssetUploadUrlErrors, CreateHubAssetUploadUrlResponse, CreateHubAssetUploadUrlResponses, CreateHubProfileData, CreateHubProfileError, CreateHubProfileErrors, CreateHubProfileRequest, CreateHubProfileResponse, CreateHubProfileResponses, CreateInviteRequest, CreateSecretData, CreateSecretError, CreateSecretErrors, CreateSecretRequest, CreateSecretResponse, CreateSecretResponses, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponse2, CreateSessionResponses, CreateTopupData, CreateTopupError, CreateTopupErrors, CreateTopupRequest, CreateTopupResponse, CreateTopupResponse2, CreateTopupResponses, CreateWorkflowData, CreateWorkflowError, CreateWorkflowErrors, CreateWorkflowRequest, CreateWorkflowResponse, CreateWorkflowResponses, CreateWorkflowVersionData, CreateWorkflowVersionError, CreateWorkflowVersionErrors, CreateWorkflowVersionRequest, CreateWorkflowVersionResponse, CreateWorkflowVersionResponses, CreateWorkspaceApiKeyData, CreateWorkspaceApiKeyError, CreateWorkspaceApiKeyErrors, CreateWorkspaceApiKeyRequest, CreateWorkspaceApiKeyResponse, CreateWorkspaceApiKeyResponse2, CreateWorkspaceApiKeyResponses, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceErrors, CreateWorkspaceInviteData, CreateWorkspaceInviteError, CreateWorkspaceInviteErrors, CreateWorkspaceInviteResponse, CreateWorkspaceInviteResponses, CreateWorkspaceRequest, CreateWorkspaceResponse, CreateWorkspaceResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetResponse, DeleteAssetResponses, DeleteHubWorkflowData, DeleteHubWorkflowError, DeleteHubWorkflowErrors, DeleteHubWorkflowResponse, DeleteHubWorkflowResponses, DeleteSecretData, DeleteSecretError, DeleteSecretErrors, DeleteSecretResponse, DeleteSecretResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponse2, DeleteSessionResponses, DeleteUserdataFileData, DeleteUserdataFileError, DeleteUserdataFileErrors, DeleteUserdataFileResponse, DeleteUserdataFileResponses, DeleteWorkflowData, DeleteWorkflowError, DeleteWorkflowErrors, DeleteWorkflowResponse, DeleteWorkflowResponses, DeleteWorkspaceData, DeleteWorkspaceError, DeleteWorkspaceErrors, DeleteWorkspaceResponse, DeleteWorkspaceResponses, DesktopLoginCodeCreateRequest, DesktopLoginCodeCreateResponse, DesktopLoginCodeExchangeRequest, DesktopLoginCodeExchangeResponse, DesktopLoginCodeRedeemRequest, DesktopLoginCodeRedeemResponse, DownloadExportData, DownloadExportError, DownloadExportErrors, DownloadExportResponse, DownloadExportResponses, ErrorResponse, ExchangeDesktopLoginCodeData, ExchangeDesktopLoginCodeError, ExchangeDesktopLoginCodeErrors, ExchangeDesktopLoginCodeResponse, ExchangeDesktopLoginCodeResponses, ExchangeTokenData, ExchangeTokenError, ExchangeTokenErrors, ExchangeTokenRequest, ExchangeTokenResponse, ExchangeTokenResponse2, ExchangeTokenResponses, ExecutePromptData, ExecutePromptError, ExecutePromptErrors, ExecutePromptResponse, ExecutePromptResponses, ExecutionError, ExportDownloadUrlResponse, FeedbackRequest, FeedbackResponse, ForkWorkflowData, ForkWorkflowError, ForkWorkflowErrors, ForkWorkflowRequest, ForkWorkflowResponse, ForkWorkflowResponses, FreeMemoryData, FreeMemoryResponses, GetAllSettingsData, GetAllSettingsError, GetAllSettingsErrors, GetAllSettingsResponse, GetAllSettingsResponses, GetApiViewVideoAliasData, GetApiViewVideoAliasErrors, GetApiViewVideoAliasResponses, GetAssetByIdData, GetAssetByIdError, GetAssetByIdErrors, GetAssetByIdResponse, GetAssetByIdResponses, GetAssetContentData, GetAssetContentError, GetAssetContentErrors, GetAssetContentResponse, GetAssetContentResponses, GetAssetSeedStatusData, GetAssetSeedStatusResponse, GetAssetSeedStatusResponses, GetAssetTagHistogramData, GetAssetTagHistogramError, GetAssetTagHistogramErrors, GetAssetTagHistogramResponse, GetAssetTagHistogramResponses, GetBillingBalanceData, GetBillingBalanceError, GetBillingBalanceErrors, GetBillingBalanceResponse, GetBillingBalanceResponses, GetBillingEventsData, GetBillingEventsError, GetBillingEventsErrors, GetBillingEventsResponse, GetBillingEventsResponses, GetBillingOpStatusData, GetBillingOpStatusError, GetBillingOpStatusErrors, GetBillingOpStatusResponse, GetBillingOpStatusResponses, GetBillingPlansData, GetBillingPlansError, GetBillingPlansErrors, GetBillingPlansResponse, GetBillingPlansResponses, GetBillingStatusData, GetBillingStatusError, GetBillingStatusErrors, GetBillingStatusResponse, GetBillingStatusResponses, GetCustomNodeProxyData, GetCustomNodeProxyErrors, GetCustomNodeProxyResponses, GetEmbeddingsData, GetEmbeddingsResponse, GetEmbeddingsResponses, GetExtensionsData, GetExtensionsResponse, GetExtensionsResponses, GetFeaturesData, GetFeaturesResponse, GetFeaturesResponses, GetGlobalSubgraphData, GetGlobalSubgraphError, GetGlobalSubgraphErrors, GetGlobalSubgraphResponse, GetGlobalSubgraphResponses, GetGlobalSubgraphsData, GetGlobalSubgraphsError, GetGlobalSubgraphsErrors, GetGlobalSubgraphsResponse, GetGlobalSubgraphsResponses, GetHealthData, GetHealthError, GetHealthErrors, GetHealthResponse, GetHealthResponses, GetHistoryData, GetHistoryError, GetHistoryErrors, GetHistoryForPromptData, GetHistoryForPromptError, GetHistoryForPromptErrors, GetHistoryForPromptResponse, GetHistoryForPromptResponses, GetHistoryResponse, GetHistoryResponses, GetHubProfileByUsernameData, GetHubProfileByUsernameError, GetHubProfileByUsernameErrors, GetHubProfileByUsernameResponse, GetHubProfileByUsernameResponses, GetHubWorkflowData, GetHubWorkflowError, GetHubWorkflowErrors, GetHubWorkflowResponse, GetHubWorkflowResponses, GetI18nData, GetI18nResponse, GetI18nResponses, GetInternalFolderPathsData, GetInternalFolderPathsResponse, GetInternalFolderPathsResponses, GetInternalLogsData, GetInternalLogsRawData, GetInternalLogsRawResponse, GetInternalLogsRawResponses, GetInternalLogsResponse, GetInternalLogsResponses, GetJobDetailData, GetJobDetailError, GetJobDetailErrors, GetJobDetailResponse, GetJobDetailResponses, GetJobStatusData, GetJobStatusError, GetJobStatusErrors, GetJobStatusResponse, GetJobStatusResponses, GetJwksData, GetJwksResponse, GetJwksResponses, GetLegacyHistoryByIdData, GetLegacyHistoryByIdErrors, GetLegacyHistoryData, GetLegacyHistoryErrors, GetLegacyJobByIdData, GetLegacyJobByIdErrors, GetLegacyJobOutputsData, GetLegacyJobOutputsErrors, GetLegacyModelsByFolderData, GetLegacyModelsByFolderErrors, GetLegacyModelsData, GetLegacyModelsErrors, GetLegacyObjectInfoByNodeClassData, GetLegacyObjectInfoByNodeClassErrors, GetLegacyPromptByIdData, GetLegacyPromptByIdErrors, GetLegacyUserdataV2Data, GetLegacyUserdataV2Errors, GetLegacyViewMetadataData, GetLegacyViewMetadataErrors, GetMaskLayersData, GetMaskLayersError, GetMaskLayersErrors, GetMaskLayersResponse, GetMaskLayersResponses, GetModelFoldersData, GetModelFoldersError, GetModelFoldersErrors, GetModelFoldersResponse, GetModelFoldersResponses, GetModelPreviewData, GetModelPreviewErrors, GetModelsInFolderData, GetModelsInFolderError, GetModelsInFolderErrors, GetModelsInFolderResponse, GetModelsInFolderResponses, GetMyHubProfileData, GetMyHubProfileError, GetMyHubProfileErrors, GetMyHubProfileResponse, GetMyHubProfileResponses, GetNodeByIdData, GetNodeByIdErrors, GetNodeByIdResponses, GetNodeInfoData, GetNodeInfoResponse, GetNodeInfoResponses, GetNodeInfoSchemaData, GetNodeInfoSchemaResponses, GetNodeReplacementsData, GetNodeReplacementsError, GetNodeReplacementsErrors, GetNodeReplacementsResponse, GetNodeReplacementsResponses, GetOAuthAuthorizationServerData, GetOAuthAuthorizationServerError, GetOAuthAuthorizationServerErrors, GetOAuthAuthorizationServerResponse, GetOAuthAuthorizationServerResponses, GetOAuthAuthorizeData, GetOAuthAuthorizeError, GetOAuthAuthorizeErrors, GetOAuthAuthorizeResponse, GetOAuthAuthorizeResponses, GetOAuthProtectedResourceByPathData, GetOAuthProtectedResourceByPathError, GetOAuthProtectedResourceByPathErrors, GetOAuthProtectedResourceByPathResponse, GetOAuthProtectedResourceByPathResponses, GetOAuthProtectedResourceData, GetOAuthProtectedResourceError, GetOAuthProtectedResourceErrors, GetOAuthProtectedResourceResponse, GetOAuthProtectedResourceResponses, GetPaymentPortalData, GetPaymentPortalError, GetPaymentPortalErrors, GetPaymentPortalResponse, GetPaymentPortalResponses, GetPromptInfoData, GetPromptInfoError, GetPromptInfoErrors, GetPromptInfoResponse, GetPromptInfoResponses, GetPublishedWorkflowData, GetPublishedWorkflowError, GetPublishedWorkflowErrors, GetPublishedWorkflowResponse, GetPublishedWorkflowResponses, GetQueueInfoData, GetQueueInfoError, GetQueueInfoErrors, GetQueueInfoResponse, GetQueueInfoResponses, GetRemoteAssetMetadataData, GetRemoteAssetMetadataError, GetRemoteAssetMetadataErrors, GetRemoteAssetMetadataResponse, GetRemoteAssetMetadataResponses, GetSecretData, GetSecretError, GetSecretErrors, GetSecretResponse, GetSecretResponses, GetSettingByIdData, GetSettingByIdError, GetSettingByIdErrors, GetSettingByIdResponse, GetSettingByIdResponses, GetStaticExtensionsData, GetStaticExtensionsErrors, GetStaticExtensionsResponses, GetSystemStatsData, GetSystemStatsError, GetSystemStatsErrors, GetSystemStatsResponse, GetSystemStatsResponses, GetTaskData, GetTaskError, GetTaskErrors, GetTaskResponse, GetTaskResponses, GetTemplateProxyData, GetTemplateProxyErrors, GetTemplateProxyResponses, GetUserData, GetUserdataData, GetUserdataError, GetUserdataErrors, GetUserdataFileData, GetUserdataFileError, GetUserdataFileErrors, GetUserdataFilePublishData, GetUserdataFilePublishError, GetUserdataFilePublishErrors, GetUserdataFilePublishResponse, GetUserdataFilePublishResponses, GetUserdataFileResponse, GetUserdataFileResponses, GetUserdataResponse, GetUserDataResponseFull, GetUserDataResponseFullFile, GetUserdataResponses, GetUserError, GetUserErrors, GetUserResponse, GetUserResponses, GetUsersInfoData, GetUsersInfoError, GetUsersInfoErrors, GetUsersInfoResponse, GetUsersInfoResponses, GetVhsQueryVideoData, GetVhsQueryVideoError, GetVhsQueryVideoErrors, GetVhsQueryVideoResponse, GetVhsQueryVideoResponses, GetVhsViewAudioData, GetVhsViewAudioErrors, GetVhsViewAudioResponses, GetVhsViewVideoData, GetVhsViewVideoErrors, GetVhsViewVideoResponses, GetViewCompatAliasData, GetViewCompatAliasErrors, GetViewCompatAliasResponses, GetWebsocketData, GetWebsocketErrors, GetWorkflowContentData, GetWorkflowContentError, GetWorkflowContentErrors, GetWorkflowContentResponse, GetWorkflowContentResponses, GetWorkflowData, GetWorkflowError, GetWorkflowErrors, GetWorkflowResponse, GetWorkflowResponses, GetWorkflowTemplatesData, GetWorkflowTemplatesResponse, GetWorkflowTemplatesResponses, GetWorkspaceData, GetWorkspaceError, GetWorkspaceErrors, GetWorkspaceResponse, GetWorkspaceResponses, GlobalSubgraphData, GlobalSubgraphInfo, HistoryDetailEntry, HistoryDetailResponse, HistoryEntry, HistoryManageRequest, HistoryResponse, HubAssetUploadUrlRequest, HubAssetUploadUrlResponse, HubLabelInfo, HubLabelListResponse, HubProfile, HubProfileSummary, HubUsernameCheckResponse, HubWorkflowDetail, HubWorkflowListResponse, HubWorkflowStatus, HubWorkflowSummary, HubWorkflowTemplateEntry, ImportPublishedAssetsData, ImportPublishedAssetsError, ImportPublishedAssetsErrors, ImportPublishedAssetsRequest, ImportPublishedAssetsResponse, ImportPublishedAssetsResponse2, ImportPublishedAssetsResponses, InterruptJobData, InterruptJobError, InterruptJobErrors, InterruptJobResponses, JobCancelResponse, JobDetailResponse, JobEntry, JobsCancelRequest, JobsCancelResponse, JobsListResponse, JobStatusResponse, JwkKey, JwksResponse, LabelRef, LeaveWorkspaceData, LeaveWorkspaceError, LeaveWorkspaceErrors, LeaveWorkspaceResponse, LeaveWorkspaceResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponse2, ListAssetsResponses, ListAssetsResponseWritable, ListHubLabelsData, ListHubLabelsError, ListHubLabelsErrors, ListHubLabelsResponse, ListHubLabelsResponses, ListHubWorkflowIndexData, ListHubWorkflowIndexError, ListHubWorkflowIndexErrors, ListHubWorkflowIndexResponse, ListHubWorkflowIndexResponses, ListHubWorkflowsData, ListHubWorkflowsError, ListHubWorkflowsErrors, ListHubWorkflowsResponse, ListHubWorkflowsResponses, ListInvitesResponse, ListJobsData, ListJobsError, ListJobsErrors, ListJobsResponse, ListJobsResponses, ListMembersResponse, ListSecretProvidersData, ListSecretProvidersError, ListSecretProvidersErrors, ListSecretProvidersResponse, ListSecretProvidersResponses, ListSecretsData, ListSecretsError, ListSecretsErrors, ListSecretsResponse, ListSecretsResponses, ListTagsData, ListTagsError, ListTagsErrors, ListTagsResponse, ListTagsResponse2, ListTagsResponses, ListTasksData, ListTasksError, ListTasksErrors, ListTasksResponse, ListTasksResponses, ListWorkflowsData, ListWorkflowsError, ListWorkflowsErrors, ListWorkflowsResponse, ListWorkflowsResponses, ListWorkspaceApiKeysData, ListWorkspaceApiKeysError, ListWorkspaceApiKeysErrors, ListWorkspaceApiKeysResponse, ListWorkspaceApiKeysResponse2, ListWorkspaceApiKeysResponses, ListWorkspaceInvitesData, ListWorkspaceInvitesError, ListWorkspaceInvitesErrors, ListWorkspaceInvitesResponse, ListWorkspaceInvitesResponses, ListWorkspaceMembersData, ListWorkspaceMembersError, ListWorkspaceMembersErrors, ListWorkspaceMembersResponse, ListWorkspaceMembersResponses, ListWorkspacesData, ListWorkspacesError, ListWorkspacesErrors, ListWorkspacesResponse, ListWorkspacesResponse2, ListWorkspacesResponses, ManageHistoryData, ManageHistoryError, ManageHistoryErrors, ManageHistoryResponses, ManageQueueData, ManageQueueError, ManageQueueErrors, ManageQueueResponse, ManageQueueResponses, Member, ModelFile, ModelFolder, MoveUserdataFileData, MoveUserdataFileError, MoveUserdataFileErrors, MoveUserdataFileResponse, MoveUserdataFileResponses, NodeInfo, OAuthAuthorizationServerMetadata, OAuthAuthorizeRedirectResponse, OAuthConsentChallenge, OAuthConsentChallengeWorkspace, OAuthProtectedResourceMetadata, OAuthRegisterBadRequestResponse, OAuthRegisterError, OAuthRegisterRequest, OAuthRegisterResponse, OAuthTokenError, OAuthTokenResponse, PaginationInfo, PaymentPortalRequest, PaymentPortalResponse, PendingInvite, Plan, PlanAvailability, PlanAvailabilityReason, PlanSeatSummary, PostAssetsFromWorkflowData, PostAssetsFromWorkflowError, PostAssetsFromWorkflowErrors, PostAssetsFromWorkflowResponse, PostAssetsFromWorkflowResponses, PostCustomNodeProxyData, PostCustomNodeProxyErrors, PostCustomNodeProxyResponses, PostOAuthAuthorizeData, PostOAuthAuthorizeError, PostOAuthAuthorizeErrors, PostOAuthAuthorizeResponse, PostOAuthAuthorizeResponses, PostOAuthRegisterData, PostOAuthRegisterError, PostOAuthRegisterErrors, PostOAuthRegisterResponse, PostOAuthRegisterResponses, PostOAuthTokenData, PostOAuthTokenError, PostOAuthTokenErrors, PostOAuthTokenResponse, PostOAuthTokenResponses, PostUserdataFileData, PostUserdataFileError, PostUserdataFileErrors, PostUserdataFilePublishData, PostUserdataFilePublishError, PostUserdataFilePublishErrors, PostUserdataFilePublishResponse, PostUserdataFilePublishResponses, PostUserdataFileResponse, PostUserdataFileResponses, PreviewPlanInfo, PreviewSubscribeData, PreviewSubscribeError, PreviewSubscribeErrors, PreviewSubscribeRequest, PreviewSubscribeResponse, PreviewSubscribeResponse2, PreviewSubscribeResponses, PromptErrorResponse, PromptInfo, PromptRequest, PromptResponse, PruneAssetsData, PruneAssetsResponse, PruneAssetsResponses, PublishedWorkflowDetail, PublishHubWorkflowData, PublishHubWorkflowError, PublishHubWorkflowErrors, PublishHubWorkflowRequest, PublishHubWorkflowResponse, PublishHubWorkflowResponses, PublishWorkflowAssetsRequest, QueueInfo, QueueManageRequest, QueueManageResponse, RedeemDesktopLoginCodeData, RedeemDesktopLoginCodeError, RedeemDesktopLoginCodeErrors, RedeemDesktopLoginCodeResponse, RedeemDesktopLoginCodeResponses, RemoveAssetTagsData, RemoveAssetTagsError, RemoveAssetTagsErrors, RemoveAssetTagsResponse, RemoveAssetTagsResponses, RemoveWorkspaceMemberData, RemoveWorkspaceMemberError, RemoveWorkspaceMemberErrors, RemoveWorkspaceMemberResponse, RemoveWorkspaceMemberResponses, ResubscribeData, ResubscribeError, ResubscribeErrors, ResubscribeRequest, ResubscribeResponse, ResubscribeResponse2, ResubscribeResponses, RevokeWorkspaceApiKeyData, RevokeWorkspaceApiKeyError, RevokeWorkspaceApiKeyErrors, RevokeWorkspaceApiKeyResponse, RevokeWorkspaceApiKeyResponses, RevokeWorkspaceInviteData, RevokeWorkspaceInviteError, RevokeWorkspaceInviteErrors, RevokeWorkspaceInviteResponse, RevokeWorkspaceInviteResponses, SecretListResponse, SecretProvider, SecretProvidersResponse, SecretResponse, SeedAssetsData, SeedAssetsResponse, SeedAssetsResponses, SubmitFeedbackData, SubmitFeedbackError, SubmitFeedbackErrors, SubmitFeedbackResponse, SubmitFeedbackResponses, SubscribeData, SubscribeError, SubscribeErrors, SubscribeRequest, SubscribeResponse, SubscribeResponse2, SubscribeResponses, SubscribeToLogsData, SubscribeToLogsResponses, SubscriptionDuration, SubscriptionTier, SystemStatsResponse, TagInfo, TagsModificationResponse, TaskEntry, TaskResponse, TasksListResponse, TeamCreditStop, TeamCreditStopPrice, TeamCreditStops, TeamCreditStopSummary, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetResponse, UpdateAssetResponses, UpdateHubProfileData, UpdateHubProfileError, UpdateHubProfileErrors, UpdateHubProfileRequest, UpdateHubProfileResponse, UpdateHubProfileResponses, UpdateMemberRoleRequest, UpdateMultipleSettingsData, UpdateMultipleSettingsError, UpdateMultipleSettingsErrors, UpdateMultipleSettingsResponse, UpdateMultipleSettingsResponses, UpdateSecretData, UpdateSecretError, UpdateSecretErrors, UpdateSecretRequest, UpdateSecretResponse, UpdateSecretResponses, UpdateSettingByIdData, UpdateSettingByIdError, UpdateSettingByIdErrors, UpdateSettingByIdResponse, UpdateSettingByIdResponses, UpdateWorkflowData, UpdateWorkflowError, UpdateWorkflowErrors, UpdateWorkflowRequest, UpdateWorkflowResponse, UpdateWorkflowResponses, UpdateWorkspaceData, UpdateWorkspaceError, UpdateWorkspaceErrors, UpdateWorkspaceMemberRoleData, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRoleErrors, UpdateWorkspaceMemberRoleResponse, UpdateWorkspaceMemberRoleResponses, UpdateWorkspaceRequest, UpdateWorkspaceResponse, UpdateWorkspaceResponses, UploadImageData, UploadImageError, UploadImageErrors, UploadImageResponse, UploadImageResponses, UploadMaskData, UploadMaskError, UploadMaskErrors, UploadMaskResponse, UploadMaskResponses, UserDataResponseFull, UserResponse, ValidationError, ValidationResult, ViewFileData, ViewFileError, ViewFileErrors, ViewFileResponse, ViewFileResponses, WorkflowApiAssetsRequest, WorkflowApiAssetsResponse, WorkflowForkedFrom, WorkflowListResponse, WorkflowPublishInfo, WorkflowResponse, WorkflowVersionContentResponse, WorkflowVersionResponse, Workspace, WorkspaceApiKeyInfo, WorkspaceSummary, WorkspaceWithRole } from './types.gen'; +export type { + AcceptInviteResponse, + AcceptWorkspaceInviteData, + AcceptWorkspaceInviteError, + AcceptWorkspaceInviteErrors, + AcceptWorkspaceInviteResponse, + AcceptWorkspaceInviteResponses, + AddAssetTagsData, + AddAssetTagsError, + AddAssetTagsErrors, + AddAssetTagsResponse, + AddAssetTagsResponses, + Asset, + AssetCreated, + AssetCreatedWritable, + AssetDownloadResponse, + AssetInfo, + AssetMetadataResponse, + AssetTagHistogramResponse, + AssetUpdated, + AssetWritable, + BillingBalanceResponse, + BillingEvent, + BillingEventsResponse, + BillingOpStatusResponse, + BillingPlansResponse, + BillingStatus, + BillingStatusResponse, + BulkRevokeApiKeysResponse, + BulkRevokeWorkspaceMemberApiKeysData, + BulkRevokeWorkspaceMemberApiKeysError, + BulkRevokeWorkspaceMemberApiKeysErrors, + BulkRevokeWorkspaceMemberApiKeysResponse, + BulkRevokeWorkspaceMemberApiKeysResponses, + CancelAssetSeedData, + CancelAssetSeedResponse, + CancelAssetSeedResponses, + CancelJobData, + CancelJobError, + CancelJobErrors, + CancelJobResponse, + CancelJobResponses, + CancelJobsData, + CancelJobsError, + CancelJobsErrors, + CancelJobsResponse, + CancelJobsResponses, + CancelSubscriptionData, + CancelSubscriptionError, + CancelSubscriptionErrors, + CancelSubscriptionRequest, + CancelSubscriptionResponse, + CancelSubscriptionResponse2, + CancelSubscriptionResponses, + CheckAssetByHashData, + CheckAssetByHashError, + CheckAssetByHashErrors, + CheckAssetByHashResponses, + CheckHubUsernameData, + CheckHubUsernameError, + CheckHubUsernameErrors, + CheckHubUsernameResponse, + CheckHubUsernameResponses, + ClientOptions, + CreateAssetData, + CreateAssetDownloadData, + CreateAssetDownloadError, + CreateAssetDownloadErrors, + CreateAssetDownloadResponse, + CreateAssetDownloadResponses, + CreateAssetError, + CreateAssetErrors, + CreateAssetExportData, + CreateAssetExportError, + CreateAssetExportErrors, + CreateAssetExportResponse, + CreateAssetExportResponses, + CreateAssetFromHashData, + CreateAssetFromHashError, + CreateAssetFromHashErrors, + CreateAssetFromHashResponse, + CreateAssetFromHashResponses, + CreateAssetResponse, + CreateAssetResponses, + CreateDesktopLoginCodeData, + CreateDesktopLoginCodeError, + CreateDesktopLoginCodeErrors, + CreateDesktopLoginCodeResponse, + CreateDesktopLoginCodeResponses, + CreateHubAssetUploadUrlData, + CreateHubAssetUploadUrlError, + CreateHubAssetUploadUrlErrors, + CreateHubAssetUploadUrlResponse, + CreateHubAssetUploadUrlResponses, + CreateHubProfileData, + CreateHubProfileError, + CreateHubProfileErrors, + CreateHubProfileRequest, + CreateHubProfileResponse, + CreateHubProfileResponses, + CreateInviteRequest, + CreateSecretData, + CreateSecretError, + CreateSecretErrors, + CreateSecretRequest, + CreateSecretResponse, + CreateSecretResponses, + CreateSessionData, + CreateSessionError, + CreateSessionErrors, + CreateSessionResponse, + CreateSessionResponse2, + CreateSessionResponses, + CreateTopupData, + CreateTopupError, + CreateTopupErrors, + CreateTopupRequest, + CreateTopupResponse, + CreateTopupResponse2, + CreateTopupResponses, + CreateWorkflowData, + CreateWorkflowError, + CreateWorkflowErrors, + CreateWorkflowRequest, + CreateWorkflowResponse, + CreateWorkflowResponses, + CreateWorkflowVersionData, + CreateWorkflowVersionError, + CreateWorkflowVersionErrors, + CreateWorkflowVersionRequest, + CreateWorkflowVersionResponse, + CreateWorkflowVersionResponses, + CreateWorkspaceApiKeyData, + CreateWorkspaceApiKeyError, + CreateWorkspaceApiKeyErrors, + CreateWorkspaceApiKeyRequest, + CreateWorkspaceApiKeyResponse, + CreateWorkspaceApiKeyResponse2, + CreateWorkspaceApiKeyResponses, + CreateWorkspaceData, + CreateWorkspaceError, + CreateWorkspaceErrors, + CreateWorkspaceInviteData, + CreateWorkspaceInviteError, + CreateWorkspaceInviteErrors, + CreateWorkspaceInviteResponse, + CreateWorkspaceInviteResponses, + CreateWorkspaceRequest, + CreateWorkspaceResponse, + CreateWorkspaceResponses, + DeleteAssetData, + DeleteAssetError, + DeleteAssetErrors, + DeleteAssetResponse, + DeleteAssetResponses, + DeleteHubWorkflowData, + DeleteHubWorkflowError, + DeleteHubWorkflowErrors, + DeleteHubWorkflowResponse, + DeleteHubWorkflowResponses, + DeleteSecretData, + DeleteSecretError, + DeleteSecretErrors, + DeleteSecretResponse, + DeleteSecretResponses, + DeleteSessionData, + DeleteSessionError, + DeleteSessionErrors, + DeleteSessionResponse, + DeleteSessionResponse2, + DeleteSessionResponses, + DeleteUserdataFileData, + DeleteUserdataFileError, + DeleteUserdataFileErrors, + DeleteUserdataFileResponse, + DeleteUserdataFileResponses, + DeleteWorkflowData, + DeleteWorkflowError, + DeleteWorkflowErrors, + DeleteWorkflowResponse, + DeleteWorkflowResponses, + DeleteWorkspaceData, + DeleteWorkspaceError, + DeleteWorkspaceErrors, + DeleteWorkspaceResponse, + DeleteWorkspaceResponses, + DesktopLoginCodeCreateRequest, + DesktopLoginCodeCreateResponse, + DesktopLoginCodeExchangeRequest, + DesktopLoginCodeExchangeResponse, + DesktopLoginCodeRedeemRequest, + DesktopLoginCodeRedeemResponse, + DownloadExportData, + DownloadExportError, + DownloadExportErrors, + DownloadExportResponse, + DownloadExportResponses, + ErrorResponse, + ExchangeDesktopLoginCodeData, + ExchangeDesktopLoginCodeError, + ExchangeDesktopLoginCodeErrors, + ExchangeDesktopLoginCodeResponse, + ExchangeDesktopLoginCodeResponses, + ExchangeTokenData, + ExchangeTokenError, + ExchangeTokenErrors, + ExchangeTokenRequest, + ExchangeTokenResponse, + ExchangeTokenResponse2, + ExchangeTokenResponses, + ExecutePromptData, + ExecutePromptError, + ExecutePromptErrors, + ExecutePromptResponse, + ExecutePromptResponses, + ExecutionError, + ExportDownloadUrlResponse, + FeedbackRequest, + FeedbackResponse, + ForkWorkflowData, + ForkWorkflowError, + ForkWorkflowErrors, + ForkWorkflowRequest, + ForkWorkflowResponse, + ForkWorkflowResponses, + FreeMemoryData, + FreeMemoryResponses, + GetAllSettingsData, + GetAllSettingsError, + GetAllSettingsErrors, + GetAllSettingsResponse, + GetAllSettingsResponses, + GetApiViewVideoAliasData, + GetApiViewVideoAliasErrors, + GetApiViewVideoAliasResponses, + GetAssetByIdData, + GetAssetByIdError, + GetAssetByIdErrors, + GetAssetByIdResponse, + GetAssetByIdResponses, + GetAssetContentData, + GetAssetContentError, + GetAssetContentErrors, + GetAssetContentResponse, + GetAssetContentResponses, + GetAssetSeedStatusData, + GetAssetSeedStatusResponse, + GetAssetSeedStatusResponses, + GetAssetTagHistogramData, + GetAssetTagHistogramError, + GetAssetTagHistogramErrors, + GetAssetTagHistogramResponse, + GetAssetTagHistogramResponses, + GetBillingBalanceData, + GetBillingBalanceError, + GetBillingBalanceErrors, + GetBillingBalanceResponse, + GetBillingBalanceResponses, + GetBillingEventsData, + GetBillingEventsError, + GetBillingEventsErrors, + GetBillingEventsResponse, + GetBillingEventsResponses, + GetBillingOpStatusData, + GetBillingOpStatusError, + GetBillingOpStatusErrors, + GetBillingOpStatusResponse, + GetBillingOpStatusResponses, + GetBillingPlansData, + GetBillingPlansError, + GetBillingPlansErrors, + GetBillingPlansResponse, + GetBillingPlansResponses, + GetBillingStatusData, + GetBillingStatusError, + GetBillingStatusErrors, + GetBillingStatusResponse, + GetBillingStatusResponses, + GetCustomNodeProxyData, + GetCustomNodeProxyErrors, + GetCustomNodeProxyResponses, + GetEmbeddingsData, + GetEmbeddingsResponse, + GetEmbeddingsResponses, + GetExtensionsData, + GetExtensionsResponse, + GetExtensionsResponses, + GetFeaturesData, + GetFeaturesResponse, + GetFeaturesResponses, + GetGlobalSubgraphData, + GetGlobalSubgraphError, + GetGlobalSubgraphErrors, + GetGlobalSubgraphResponse, + GetGlobalSubgraphResponses, + GetGlobalSubgraphsData, + GetGlobalSubgraphsError, + GetGlobalSubgraphsErrors, + GetGlobalSubgraphsResponse, + GetGlobalSubgraphsResponses, + GetHealthData, + GetHealthError, + GetHealthErrors, + GetHealthResponse, + GetHealthResponses, + GetHistoryData, + GetHistoryError, + GetHistoryErrors, + GetHistoryForPromptData, + GetHistoryForPromptError, + GetHistoryForPromptErrors, + GetHistoryForPromptResponse, + GetHistoryForPromptResponses, + GetHistoryResponse, + GetHistoryResponses, + GetHubProfileByUsernameData, + GetHubProfileByUsernameError, + GetHubProfileByUsernameErrors, + GetHubProfileByUsernameResponse, + GetHubProfileByUsernameResponses, + GetHubWorkflowData, + GetHubWorkflowError, + GetHubWorkflowErrors, + GetHubWorkflowResponse, + GetHubWorkflowResponses, + GetI18nData, + GetI18nResponse, + GetI18nResponses, + GetInternalFolderPathsData, + GetInternalFolderPathsResponse, + GetInternalFolderPathsResponses, + GetInternalLogsData, + GetInternalLogsRawData, + GetInternalLogsRawResponse, + GetInternalLogsRawResponses, + GetInternalLogsResponse, + GetInternalLogsResponses, + GetJobDetailData, + GetJobDetailError, + GetJobDetailErrors, + GetJobDetailResponse, + GetJobDetailResponses, + GetJobStatusData, + GetJobStatusError, + GetJobStatusErrors, + GetJobStatusResponse, + GetJobStatusResponses, + GetJwksData, + GetJwksResponse, + GetJwksResponses, + GetLegacyHistoryByIdData, + GetLegacyHistoryByIdErrors, + GetLegacyHistoryData, + GetLegacyHistoryErrors, + GetLegacyJobByIdData, + GetLegacyJobByIdErrors, + GetLegacyJobOutputsData, + GetLegacyJobOutputsErrors, + GetLegacyModelsByFolderData, + GetLegacyModelsByFolderErrors, + GetLegacyModelsData, + GetLegacyModelsErrors, + GetLegacyObjectInfoByNodeClassData, + GetLegacyObjectInfoByNodeClassErrors, + GetLegacyPromptByIdData, + GetLegacyPromptByIdErrors, + GetLegacyUserdataV2Data, + GetLegacyUserdataV2Errors, + GetLegacyViewMetadataData, + GetLegacyViewMetadataErrors, + GetMaskLayersData, + GetMaskLayersError, + GetMaskLayersErrors, + GetMaskLayersResponse, + GetMaskLayersResponses, + GetModelFoldersData, + GetModelFoldersError, + GetModelFoldersErrors, + GetModelFoldersResponse, + GetModelFoldersResponses, + GetModelPreviewData, + GetModelPreviewErrors, + GetModelsInFolderData, + GetModelsInFolderError, + GetModelsInFolderErrors, + GetModelsInFolderResponse, + GetModelsInFolderResponses, + GetMyHubProfileData, + GetMyHubProfileError, + GetMyHubProfileErrors, + GetMyHubProfileResponse, + GetMyHubProfileResponses, + GetNodeByIdData, + GetNodeByIdErrors, + GetNodeByIdResponses, + GetNodeInfoData, + GetNodeInfoResponse, + GetNodeInfoResponses, + GetNodeInfoSchemaData, + GetNodeInfoSchemaResponses, + GetNodeReplacementsData, + GetNodeReplacementsError, + GetNodeReplacementsErrors, + GetNodeReplacementsResponse, + GetNodeReplacementsResponses, + GetOAuthAuthorizationServerData, + GetOAuthAuthorizationServerError, + GetOAuthAuthorizationServerErrors, + GetOAuthAuthorizationServerResponse, + GetOAuthAuthorizationServerResponses, + GetOAuthAuthorizeData, + GetOAuthAuthorizeError, + GetOAuthAuthorizeErrors, + GetOAuthAuthorizeResponse, + GetOAuthAuthorizeResponses, + GetOAuthProtectedResourceByPathData, + GetOAuthProtectedResourceByPathError, + GetOAuthProtectedResourceByPathErrors, + GetOAuthProtectedResourceByPathResponse, + GetOAuthProtectedResourceByPathResponses, + GetOAuthProtectedResourceData, + GetOAuthProtectedResourceError, + GetOAuthProtectedResourceErrors, + GetOAuthProtectedResourceResponse, + GetOAuthProtectedResourceResponses, + GetPaymentPortalData, + GetPaymentPortalError, + GetPaymentPortalErrors, + GetPaymentPortalResponse, + GetPaymentPortalResponses, + GetPromptInfoData, + GetPromptInfoError, + GetPromptInfoErrors, + GetPromptInfoResponse, + GetPromptInfoResponses, + GetPublishedWorkflowData, + GetPublishedWorkflowError, + GetPublishedWorkflowErrors, + GetPublishedWorkflowResponse, + GetPublishedWorkflowResponses, + GetQueueInfoData, + GetQueueInfoError, + GetQueueInfoErrors, + GetQueueInfoResponse, + GetQueueInfoResponses, + GetRemoteAssetMetadataData, + GetRemoteAssetMetadataError, + GetRemoteAssetMetadataErrors, + GetRemoteAssetMetadataResponse, + GetRemoteAssetMetadataResponses, + GetSecretData, + GetSecretError, + GetSecretErrors, + GetSecretResponse, + GetSecretResponses, + GetSettingByIdData, + GetSettingByIdError, + GetSettingByIdErrors, + GetSettingByIdResponse, + GetSettingByIdResponses, + GetStaticExtensionsData, + GetStaticExtensionsErrors, + GetStaticExtensionsResponses, + GetSystemStatsData, + GetSystemStatsError, + GetSystemStatsErrors, + GetSystemStatsResponse, + GetSystemStatsResponses, + GetTaskData, + GetTaskError, + GetTaskErrors, + GetTaskResponse, + GetTaskResponses, + GetTemplateProxyData, + GetTemplateProxyErrors, + GetTemplateProxyResponses, + GetUserData, + GetUserdataData, + GetUserdataError, + GetUserdataErrors, + GetUserdataFileData, + GetUserdataFileError, + GetUserdataFileErrors, + GetUserdataFilePublishData, + GetUserdataFilePublishError, + GetUserdataFilePublishErrors, + GetUserdataFilePublishResponse, + GetUserdataFilePublishResponses, + GetUserdataFileResponse, + GetUserdataFileResponses, + GetUserdataResponse, + GetUserDataResponseFull, + GetUserDataResponseFullFile, + GetUserdataResponses, + GetUserError, + GetUserErrors, + GetUserResponse, + GetUserResponses, + GetUsersInfoData, + GetUsersInfoError, + GetUsersInfoErrors, + GetUsersInfoResponse, + GetUsersInfoResponses, + GetVhsQueryVideoData, + GetVhsQueryVideoError, + GetVhsQueryVideoErrors, + GetVhsQueryVideoResponse, + GetVhsQueryVideoResponses, + GetVhsViewAudioData, + GetVhsViewAudioErrors, + GetVhsViewAudioResponses, + GetVhsViewVideoData, + GetVhsViewVideoErrors, + GetVhsViewVideoResponses, + GetViewCompatAliasData, + GetViewCompatAliasErrors, + GetViewCompatAliasResponses, + GetWebsocketData, + GetWebsocketErrors, + GetWorkflowContentData, + GetWorkflowContentError, + GetWorkflowContentErrors, + GetWorkflowContentResponse, + GetWorkflowContentResponses, + GetWorkflowData, + GetWorkflowError, + GetWorkflowErrors, + GetWorkflowResponse, + GetWorkflowResponses, + GetWorkflowTemplatesData, + GetWorkflowTemplatesResponse, + GetWorkflowTemplatesResponses, + GetWorkspaceData, + GetWorkspaceError, + GetWorkspaceErrors, + GetWorkspaceResponse, + GetWorkspaceResponses, + GlobalSubgraphData, + GlobalSubgraphInfo, + HistoryDetailEntry, + HistoryDetailResponse, + HistoryEntry, + HistoryManageRequest, + HistoryResponse, + HubAssetUploadUrlRequest, + HubAssetUploadUrlResponse, + HubLabelInfo, + HubLabelListResponse, + HubProfile, + HubProfileSummary, + HubUsernameCheckResponse, + HubWorkflowDetail, + HubWorkflowListResponse, + HubWorkflowStatus, + HubWorkflowSummary, + HubWorkflowTemplateEntry, + ImportPublishedAssetsData, + ImportPublishedAssetsError, + ImportPublishedAssetsErrors, + ImportPublishedAssetsRequest, + ImportPublishedAssetsResponse, + ImportPublishedAssetsResponse2, + ImportPublishedAssetsResponses, + InterruptJobData, + InterruptJobError, + InterruptJobErrors, + InterruptJobResponses, + JobCancelResponse, + JobDetailResponse, + JobEntry, + JobsCancelRequest, + JobsCancelResponse, + JobsListResponse, + JobStatusResponse, + JwkKey, + JwksResponse, + LabelRef, + LeaveWorkspaceData, + LeaveWorkspaceError, + LeaveWorkspaceErrors, + LeaveWorkspaceResponse, + LeaveWorkspaceResponses, + ListAssetsData, + ListAssetsError, + ListAssetsErrors, + ListAssetsResponse, + ListAssetsResponse2, + ListAssetsResponses, + ListAssetsResponseWritable, + ListHubLabelsData, + ListHubLabelsError, + ListHubLabelsErrors, + ListHubLabelsResponse, + ListHubLabelsResponses, + ListHubWorkflowIndexData, + ListHubWorkflowIndexError, + ListHubWorkflowIndexErrors, + ListHubWorkflowIndexResponse, + ListHubWorkflowIndexResponses, + ListHubWorkflowsData, + ListHubWorkflowsError, + ListHubWorkflowsErrors, + ListHubWorkflowsResponse, + ListHubWorkflowsResponses, + ListInvitesResponse, + ListJobsData, + ListJobsError, + ListJobsErrors, + ListJobsResponse, + ListJobsResponses, + ListMembersResponse, + ListSecretProvidersData, + ListSecretProvidersError, + ListSecretProvidersErrors, + ListSecretProvidersResponse, + ListSecretProvidersResponses, + ListSecretsData, + ListSecretsError, + ListSecretsErrors, + ListSecretsResponse, + ListSecretsResponses, + ListTagsData, + ListTagsError, + ListTagsErrors, + ListTagsResponse, + ListTagsResponse2, + ListTagsResponses, + ListTasksData, + ListTasksError, + ListTasksErrors, + ListTasksResponse, + ListTasksResponses, + ListWorkflowsData, + ListWorkflowsError, + ListWorkflowsErrors, + ListWorkflowsResponse, + ListWorkflowsResponses, + ListWorkspaceApiKeysData, + ListWorkspaceApiKeysError, + ListWorkspaceApiKeysErrors, + ListWorkspaceApiKeysResponse, + ListWorkspaceApiKeysResponse2, + ListWorkspaceApiKeysResponses, + ListWorkspaceInvitesData, + ListWorkspaceInvitesError, + ListWorkspaceInvitesErrors, + ListWorkspaceInvitesResponse, + ListWorkspaceInvitesResponses, + ListWorkspaceMembersData, + ListWorkspaceMembersError, + ListWorkspaceMembersErrors, + ListWorkspaceMembersResponse, + ListWorkspaceMembersResponses, + ListWorkspacesData, + ListWorkspacesError, + ListWorkspacesErrors, + ListWorkspacesResponse, + ListWorkspacesResponse2, + ListWorkspacesResponses, + ManageHistoryData, + ManageHistoryError, + ManageHistoryErrors, + ManageHistoryResponses, + ManageQueueData, + ManageQueueError, + ManageQueueErrors, + ManageQueueResponse, + ManageQueueResponses, + Member, + ModelFile, + ModelFolder, + MoveUserdataFileData, + MoveUserdataFileError, + MoveUserdataFileErrors, + MoveUserdataFileResponse, + MoveUserdataFileResponses, + NodeInfo, + OAuthAuthorizationServerMetadata, + OAuthAuthorizeRedirectResponse, + OAuthConsentChallenge, + OAuthConsentChallengeWorkspace, + OAuthProtectedResourceMetadata, + OAuthRegisterBadRequestResponse, + OAuthRegisterError, + OAuthRegisterRequest, + OAuthRegisterResponse, + OAuthTokenError, + OAuthTokenResponse, + PaginationInfo, + PaymentPortalRequest, + PaymentPortalResponse, + PendingInvite, + Plan, + PlanAvailability, + PlanAvailabilityReason, + PlanSeatSummary, + PostAssetsFromWorkflowData, + PostAssetsFromWorkflowError, + PostAssetsFromWorkflowErrors, + PostAssetsFromWorkflowResponse, + PostAssetsFromWorkflowResponses, + PostCustomNodeProxyData, + PostCustomNodeProxyErrors, + PostCustomNodeProxyResponses, + PostOAuthAuthorizeData, + PostOAuthAuthorizeError, + PostOAuthAuthorizeErrors, + PostOAuthAuthorizeResponse, + PostOAuthAuthorizeResponses, + PostOAuthRegisterData, + PostOAuthRegisterError, + PostOAuthRegisterErrors, + PostOAuthRegisterResponse, + PostOAuthRegisterResponses, + PostOAuthTokenData, + PostOAuthTokenError, + PostOAuthTokenErrors, + PostOAuthTokenResponse, + PostOAuthTokenResponses, + PostUserdataFileData, + PostUserdataFileError, + PostUserdataFileErrors, + PostUserdataFilePublishData, + PostUserdataFilePublishError, + PostUserdataFilePublishErrors, + PostUserdataFilePublishResponse, + PostUserdataFilePublishResponses, + PostUserdataFileResponse, + PostUserdataFileResponses, + PreviewPlanInfo, + PreviewSubscribeData, + PreviewSubscribeError, + PreviewSubscribeErrors, + PreviewSubscribeRequest, + PreviewSubscribeResponse, + PreviewSubscribeResponse2, + PreviewSubscribeResponses, + PromptErrorResponse, + PromptInfo, + PromptRequest, + PromptResponse, + PruneAssetsData, + PruneAssetsResponse, + PruneAssetsResponses, + PublishedWorkflowDetail, + PublishHubWorkflowData, + PublishHubWorkflowError, + PublishHubWorkflowErrors, + PublishHubWorkflowRequest, + PublishHubWorkflowResponse, + PublishHubWorkflowResponses, + PublishWorkflowAssetsRequest, + QueueInfo, + QueueManageRequest, + QueueManageResponse, + RedeemDesktopLoginCodeData, + RedeemDesktopLoginCodeError, + RedeemDesktopLoginCodeErrors, + RedeemDesktopLoginCodeResponse, + RedeemDesktopLoginCodeResponses, + RemoveAssetTagsData, + RemoveAssetTagsError, + RemoveAssetTagsErrors, + RemoveAssetTagsResponse, + RemoveAssetTagsResponses, + RemoveWorkspaceMemberData, + RemoveWorkspaceMemberError, + RemoveWorkspaceMemberErrors, + RemoveWorkspaceMemberResponse, + RemoveWorkspaceMemberResponses, + ResubscribeData, + ResubscribeError, + ResubscribeErrors, + ResubscribeRequest, + ResubscribeResponse, + ResubscribeResponse2, + ResubscribeResponses, + RevokeWorkspaceApiKeyData, + RevokeWorkspaceApiKeyError, + RevokeWorkspaceApiKeyErrors, + RevokeWorkspaceApiKeyResponse, + RevokeWorkspaceApiKeyResponses, + RevokeWorkspaceInviteData, + RevokeWorkspaceInviteError, + RevokeWorkspaceInviteErrors, + RevokeWorkspaceInviteResponse, + RevokeWorkspaceInviteResponses, + SecretListResponse, + SecretProvider, + SecretProvidersResponse, + SecretResponse, + SeedAssetsData, + SeedAssetsResponse, + SeedAssetsResponses, + SubmitFeedbackData, + SubmitFeedbackError, + SubmitFeedbackErrors, + SubmitFeedbackResponse, + SubmitFeedbackResponses, + SubscribeData, + SubscribeError, + SubscribeErrors, + SubscribeRequest, + SubscribeResponse, + SubscribeResponse2, + SubscribeResponses, + SubscribeToLogsData, + SubscribeToLogsResponses, + SubscriptionDuration, + SubscriptionTier, + SystemStatsResponse, + TagInfo, + TagsModificationResponse, + TaskEntry, + TaskResponse, + TasksListResponse, + TeamCreditStop, + TeamCreditStopPrice, + TeamCreditStops, + TeamCreditStopSummary, + UpdateAssetData, + UpdateAssetError, + UpdateAssetErrors, + UpdateAssetResponse, + UpdateAssetResponses, + UpdateHubProfileData, + UpdateHubProfileError, + UpdateHubProfileErrors, + UpdateHubProfileRequest, + UpdateHubProfileResponse, + UpdateHubProfileResponses, + UpdateMemberRoleRequest, + UpdateMultipleSettingsData, + UpdateMultipleSettingsError, + UpdateMultipleSettingsErrors, + UpdateMultipleSettingsResponse, + UpdateMultipleSettingsResponses, + UpdateSecretData, + UpdateSecretError, + UpdateSecretErrors, + UpdateSecretRequest, + UpdateSecretResponse, + UpdateSecretResponses, + UpdateSettingByIdData, + UpdateSettingByIdError, + UpdateSettingByIdErrors, + UpdateSettingByIdResponse, + UpdateSettingByIdResponses, + UpdateWorkflowData, + UpdateWorkflowError, + UpdateWorkflowErrors, + UpdateWorkflowRequest, + UpdateWorkflowResponse, + UpdateWorkflowResponses, + UpdateWorkspaceData, + UpdateWorkspaceError, + UpdateWorkspaceErrors, + UpdateWorkspaceMemberRoleData, + UpdateWorkspaceMemberRoleError, + UpdateWorkspaceMemberRoleErrors, + UpdateWorkspaceMemberRoleResponse, + UpdateWorkspaceMemberRoleResponses, + UpdateWorkspaceRequest, + UpdateWorkspaceResponse, + UpdateWorkspaceResponses, + UploadImageData, + UploadImageError, + UploadImageErrors, + UploadImageResponse, + UploadImageResponses, + UploadMaskData, + UploadMaskError, + UploadMaskErrors, + UploadMaskResponse, + UploadMaskResponses, + UserDataResponseFull, + UserResponse, + ValidationError, + ValidationResult, + ViewFileData, + ViewFileError, + ViewFileErrors, + ViewFileResponse, + ViewFileResponses, + WorkflowApiAssetsRequest, + WorkflowApiAssetsResponse, + WorkflowForkedFrom, + WorkflowListResponse, + WorkflowPublishInfo, + WorkflowResponse, + WorkflowVersionContentResponse, + WorkflowVersionResponse, + Workspace, + WorkspaceApiKeyInfo, + WorkspaceSummary, + WorkspaceWithRole +} from './types.gen' diff --git a/packages/ingest-types/src/types.gen.ts b/packages/ingest-types/src/types.gen.ts index 85c94960fa1..a201f833332 100644 --- a/packages/ingest-types/src/types.gen.ts +++ b/packages/ingest-types/src/types.gen.ts @@ -1,195 +1,201 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; + baseUrl: `${string}://${string}` | (string & {}) +} /** * Workspace entity annotated with the requesting user's role. */ export type WorkspaceWithRole = { - /** - * When the workspace was created - */ - created_at: string; - id: string; - /** - * When the user joined the workspace (same as created_at for the workspace creator) - */ - joined_at: string; - name: string; - role: 'owner' | 'member'; - subscription_tier?: SubscriptionTier; - type: 'personal' | 'team'; -}; + /** + * When the workspace was created + */ + created_at: string + id: string + /** + * When the user joined the workspace (same as created_at for the workspace creator) + */ + joined_at: string + name: string + role: 'owner' | 'member' + subscription_tier?: SubscriptionTier + type: 'personal' | 'team' +} /** * Subscription tier (uppercase to match comfy-api) */ -export type SubscriptionTier = 'FREE' | 'STANDARD' | 'CREATOR' | 'PRO' | 'FOUNDERS_EDITION' | 'TEAM'; +export type SubscriptionTier = + | 'FREE' + | 'STANDARD' + | 'CREATOR' + | 'PRO' + | 'FOUNDERS_EDITION' + | 'TEAM' /** * Abbreviated workspace metadata used in list responses. */ export type WorkspaceSummary = { - id: string; - name: string; - type: 'personal' | 'team'; -}; + id: string + name: string + type: 'personal' | 'team' +} /** * Metadata for a workspace-scoped API key (secret is never returned). */ export type WorkspaceApiKeyInfo = { - /** - * When the key was created - */ - created_at: 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; - /** - * When the key expires (if set) - */ - expires_at?: string; - /** - * API key ID - */ - id: string; - /** - * First 8 chars after prefix for display - */ - key_prefix: string; - /** - * Last time the key was used - */ - last_used_at?: string; - /** - * User-provided label - */ - name: string; - /** - * When the key was revoked (if revoked) - */ - revoked_at?: string; - /** - * User who created this key - */ - user_id: string; - /** - * Workspace this key belongs to - */ - workspace_id: string; -}; + /** + * When the key was created + */ + created_at: 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 + /** + * When the key expires (if set) + */ + expires_at?: string + /** + * API key ID + */ + id: string + /** + * First 8 chars after prefix for display + */ + key_prefix: string + /** + * Last time the key was used + */ + last_used_at?: string + /** + * User-provided label + */ + name: string + /** + * When the key was revoked (if revoked) + */ + revoked_at?: string + /** + * User who created this key + */ + user_id: string + /** + * Workspace this key belongs to + */ + workspace_id: string +} /** * Full workspace entity with configuration and ownership details. */ export type Workspace = { - created_at: string; - id: string; - name: string; - type: 'personal' | 'team'; -}; + created_at: string + id: string + name: string + type: 'personal' | 'team' +} /** * Metadata for a single workflow version. */ export type WorkflowVersionResponse = { - created_at: string; - created_by: string; - id: string; - latest_version: number; - version: number; -}; + created_at: string + created_by: string + id: string + latest_version: number + version: number +} /** * Full workflow version including the serialized workflow JSON. */ export type WorkflowVersionContentResponse = { - created_at: string; - created_by: string; - dependency_asset_ids?: Array; - id: string; - version: number; - workflow_json: { - [key: string]: unknown; - }; -}; + created_at: string + created_by: string + dependency_asset_ids?: Array + id: string + version: number + workflow_json: { + [key: string]: unknown + } +} /** * Full workflow entity including metadata and version history. */ export type WorkflowResponse = { - created_at: string; - created_by: string; - default_view?: 'workflow' | 'app'; - description?: string; - forked_from?: WorkflowForkedFrom; - id: string; - latest_version: number; - name?: string; - updated_at: string; -}; + created_at: string + created_by: string + default_view?: 'workflow' | 'app' + description?: string + forked_from?: WorkflowForkedFrom + id: string + latest_version: number + name?: string + updated_at: string +} /** * Reference to the parent workflow from which this workflow was forked. */ export type WorkflowForkedFrom = { - workflow_id?: string; - workflow_version_id?: string; -}; + workflow_id?: string + workflow_version_id?: string +} /** * Publishing metadata for a workflow shared to the Hub. */ export type WorkflowPublishInfo = { - /** - * Published assets (inputs and models). - */ - assets: Array; - listed: boolean; - publish_time?: string | null; - share_id: string; - workflow_id: string; -}; + /** + * Published assets (inputs and models). + */ + assets: Array + listed: boolean + publish_time?: string | null + share_id: string + workflow_id: string +} /** * Lightweight asset reference used in workflow publishing payloads. */ export type AssetInfo = { - /** - * Asset identifier. - */ - id: string; - /** - * Whether the caller already owns this asset. - */ - in_library: boolean; - /** - * Whether this asset is a model. - */ - model: boolean; - name: string; - /** - * Signed URL for previewing the asset. - */ - preview_url: string; - /** - * Whether this is a public (platform-provided) asset. - */ - public: boolean; - storage_url: string; -}; + /** + * Asset identifier. + */ + id: string + /** + * Whether the caller already owns this asset. + */ + in_library: boolean + /** + * Whether this asset is a model. + */ + model: boolean + name: string + /** + * Signed URL for previewing the asset. + */ + preview_url: string + /** + * Whether this is a public (platform-provided) asset. + */ + public: boolean + storage_url: string +} /** * Paginated list of saved workflows. */ export type WorkflowListResponse = { - data: Array; - pagination: PaginationInfo; -}; + data: Array + pagination: PaginationInfo +} /** * Pagination metadata included in list responses. Supports both legacy @@ -199,204 +205,204 @@ export type WorkflowListResponse = { * */ export type PaginationInfo = { - /** - * Whether more items are available beyond this page - */ - has_more: boolean; - /** - * Items per page - */ - limit: number; - /** - * Opaque cursor for the next page. Pass this value as the `after` - * query parameter on the next request. Empty or absent when there - * are no more results. - * - */ - next_cursor?: string; - /** - * Current offset (0-based). Deprecated: use cursor-based pagination. - * - * @deprecated - */ - offset: number; - /** - * Total number of items matching filters (may be 0 when using cursor pagination) - */ - total: number; -}; + /** + * Whether more items are available beyond this page + */ + has_more: boolean + /** + * Items per page + */ + limit: number + /** + * Opaque cursor for the next page. Pass this value as the `after` + * query parameter on the next request. Empty or absent when there + * are no more results. + * + */ + next_cursor?: string + /** + * Current offset (0-based). Deprecated: use cursor-based pagination. + * + * @deprecated + */ + offset: number + /** + * Total number of items matching filters (may be 0 when using cursor pagination) + */ + total: number +} /** * Response containing assets associated with a workflow. */ export type WorkflowApiAssetsResponse = { - assets: Array; -}; + assets: Array +} /** * Request body for querying assets associated with a workflow. */ export type WorkflowApiAssetsRequest = { - workflow_api_json: { - [key: string]: unknown; - }; -}; + workflow_api_json: { + [key: string]: unknown + } +} /** * Result of validating a set of asset operations. */ export type ValidationResult = { - /** - * Blocking validation errors that prevent download - */ - errors?: Array; - /** - * Overall validation status (true if all checks passed) - */ - is_valid: boolean; - /** - * Non-blocking validation warnings (informational only) - */ - warnings?: Array; -}; + /** + * Blocking validation errors that prevent download + */ + errors?: Array + /** + * Overall validation status (true if all checks passed) + */ + is_valid: boolean + /** + * Non-blocking validation warnings (informational only) + */ + warnings?: Array +} /** * Details of a single validation error encountered during asset operations. */ export type ValidationError = { - /** - * Machine-readable error code - */ - code: string; - /** - * Field that failed validation - */ - field: string; - /** - * Human-readable error message - */ - message: string; -}; + /** + * Machine-readable error code + */ + code: string + /** + * Field that failed validation + */ + field: string + /** + * Human-readable error message + */ + message: string +} /** * User information response */ export type UserResponse = { - /** - * Firebase UID of the authenticated user - */ - id: string; - /** - * User status (always "active" for authenticated users) - */ - status: string; -}; + /** + * Firebase UID of the authenticated user + */ + id: string + /** + * User status (always "active" for authenticated users) + */ + status: string +} /** * User data listing entry with file metadata (path, size, modification time). */ export type UserDataResponseFull = { - /** - * UNIX timestamp of the last modification in milliseconds. - */ - modified?: number; - path?: string; - size?: number; -}; + /** + * UNIX timestamp of the last modification in milliseconds. + */ + modified?: number + path?: string + size?: number +} /** * Request body for updating an existing workspace's settings. */ export type UpdateWorkspaceRequest = { - /** - * New display name for the workspace - */ - name?: string; -}; + /** + * New display name for the workspace + */ + name?: string +} /** * Request body for updating an existing saved workflow. */ export type UpdateWorkflowRequest = { - /** - * New default view mode - */ - default_view?: 'workflow' | 'app'; - /** - * New description - */ - description?: string; - /** - * New display name - */ - name?: string; -}; + /** + * New default view mode + */ + default_view?: 'workflow' | 'app' + /** + * New description + */ + description?: string + /** + * New display name + */ + name?: string +} /** * Request body for updating an existing user secret. */ export type UpdateSecretRequest = { - /** - * New name for the secret - */ - name?: string; - /** - * New secret value (API key, token, etc.) - */ - secret_value?: string; -}; + /** + * New name for the secret + */ + name?: string + /** + * New secret value (API key, token, etc.) + */ + secret_value?: string +} /** * Request body for changing a workspace member's role. */ export type UpdateMemberRoleRequest = { - /** - * The role to assign to the member - */ - role: 'owner' | 'member'; -}; + /** + * The role to assign to the member + */ + role: 'owner' | 'member' +} /** * Request body for updating an existing Hub profile. */ export type UpdateHubProfileRequest = { - /** - * Token (from /api/hub/assets/upload-url) for a new avatar image. Omit or send null to leave unchanged; send empty string "" to remove. - * - */ - avatar_token?: string | null; - description?: string; - display_name?: string; - /** - * List of website URLs. - */ - website_urls?: Array; -}; + /** + * Token (from /api/hub/assets/upload-url) for a new avatar image. Omit or send null to leave unchanged; send empty string "" to remove. + * + */ + avatar_token?: string | null + description?: string + display_name?: string + /** + * List of website URLs. + */ + website_urls?: Array +} /** * Credit-stop ladder for the pricing slider (BE-1254). Returned by GET /api/billing/plans for every workspace regardless of the caller's token or workspace type (the personal/team distinction was removed); omitted only when the catalog defines no stops. */ export type TeamCreditStops = { - /** - * Index into stops[] for the slider's initial position - */ - default_stop_index: number; - stops: Array; -}; + /** + * Index into stops[] for the slider's initial position + */ + default_stop_index: number + stops: Array +} /** * Pre/post-discount price for a team credit stop, in cents. */ export type TeamCreditStopPrice = { - /** - * Pre-discount (struck-through) price in cents - */ - list_price_cents: number; - /** - * Post-discount (bold) price in cents - */ - price_cents: number; -}; + /** + * Pre-discount (struck-through) price in cents + */ + list_price_cents: number + /** + * Post-discount (bold) price in cents + */ + price_cents: number +} /** * A selectable preset on the team pricing slider. Echoed on subscribe via @@ -406,17 +412,17 @@ export type TeamCreditStopPrice = { * */ export type TeamCreditStop = { - /** - * Raw monthly credit count granted at this stop - */ - credits: number; - /** - * Stable stop id echoed on subscribe (e.g. "team_700") - */ - id: string; - monthly: TeamCreditStopPrice; - yearly: TeamCreditStopPrice; -}; + /** + * Raw monthly credit count granted at this stop + */ + credits: number + /** + * Stable stop id echoed on subscribe (e.g. "team_700") + */ + id: string + monthly: TeamCreditStopPrice + yearly: TeamCreditStopPrice +} /** * The team credit stop a workspace is currently subscribed to: the @@ -427,1933 +433,1940 @@ export type TeamCreditStop = { * */ export type TeamCreditStopSummary = { - /** - * Raw monthly credit count granted at this stop - */ - credits_monthly: number; - /** - * Stable stop id (e.g. "team_200") - */ - id: string; - /** - * Monthly USD commitment for this stop - */ - stop_usd: number; -}; + /** + * Raw monthly credit count granted at this stop + */ + credits_monthly: number + /** + * Stable stop id (e.g. "team_200") + */ + id: string + /** + * Monthly USD commitment for this stop + */ + stop_usd: number +} /** * Paginated list of background tasks for the authenticated user. */ export type TasksListResponse = { - pagination: PaginationInfo; - /** - * Array of tasks ordered by create_time - */ - tasks: Array; -}; + pagination: PaginationInfo + /** + * Array of tasks ordered by create_time + */ + tasks: Array +} /** * Task data for list views */ export type TaskEntry = { - /** - * When task completed or failed (null if not finished) - */ - completed_at?: string; - /** - * Task creation timestamp - */ - create_time: string; - /** - * Unique task identifier - */ - id: string; - /** - * When task execution started (null if not started) - */ - started_at?: string; - /** - * Current task status - */ - status: 'created' | 'running' | 'completed' | 'failed'; - /** - * Task type name (e.g., model_upload) - */ - task_name: string; -}; + /** + * When task completed or failed (null if not finished) + */ + completed_at?: string + /** + * Task creation timestamp + */ + create_time: string + /** + * Unique task identifier + */ + id: string + /** + * When task execution started (null if not started) + */ + started_at?: string + /** + * Current task status + */ + status: 'created' | 'running' | 'completed' | 'failed' + /** + * Task type name (e.g., model_upload) + */ + task_name: string +} /** * Full task details including payload and result */ export type TaskResponse = { + /** + * When task completed or failed (null if not finished) + */ + completed_at?: string + /** + * Task creation timestamp + */ + create_time: string + /** + * Error message on failure (null if not failed) + */ + error_message?: string + /** + * Unique task identifier + */ + id: string + /** + * Caller-provided key for idempotent task creation + */ + idempotency_key: string + /** + * Task input data + */ + payload: { + [key: string]: unknown + } + /** + * Task output data (null if not completed) + */ + result?: { + [key: string]: unknown + } + /** + * When task execution started (null if not started) + */ + started_at?: string + /** + * Current task status + */ + status: 'created' | 'running' | 'completed' | 'failed' + /** + * Task type name (e.g., model_upload) + */ + task_name: string + /** + * Task last update timestamp + */ + update_time: string +} + +/** + * Response after adding, updating, or removing tags on an asset. + */ +export type TagsModificationResponse = { + /** + * Tags that were successfully added (for add operation) + */ + added?: Array + /** + * Tags that were already present (for add operation) + */ + already_present?: Array + /** + * Tags that were not present (for remove operation) + */ + not_present?: Array + /** + * Tags that were successfully removed (for remove operation) + */ + removed?: Array + /** + * All tags on the asset after the operation + */ + total_tags: Array +} + +/** + * Metadata for a single tag that can be applied to assets. + */ +export type TagInfo = { + /** + * Number of assets using this tag + */ + count: number + /** + * Tag name + */ + name: string +} + +/** + * System statistics response + */ +export type SystemStatsResponse = { + devices: Array<{ /** - * When task completed or failed (null if not finished) - */ - completed_at?: string; - /** - * Task creation timestamp - */ - create_time: string; - /** - * Error message on failure (null if not failed) + * Device name */ - error_message?: string; + name: string /** - * Unique task identifier + * Device type */ - id: string; + type: string /** - * Caller-provided key for idempotent task creation + * Free VRAM in bytes */ - idempotency_key: string; + vram_free?: number /** - * Task input data + * Total VRAM in bytes */ - payload: { - [key: string]: unknown; - }; + vram_total?: number + }> + system: { /** - * Task output data (null if not completed) + * Command line arguments */ - result?: { - [key: string]: unknown; - }; + argv: Array /** - * When task execution started (null if not started) + * Cloud ingest service version (commit hash) */ - started_at?: string; + cloud_version?: string /** - * Current task status + * ComfyUI frontend version (commit hash or tag) */ - status: 'created' | 'running' | 'completed' | 'failed'; + comfyui_frontend_version?: string /** - * Task type name (e.g., model_upload) + * ComfyUI version */ - task_name: string; + comfyui_version: string /** - * Task last update timestamp + * How this ComfyUI instance is deployed (e.g. cloud, local-git, local-portable, local-desktop) */ - update_time: string; -}; - -/** - * Response after adding, updating, or removing tags on an asset. - */ -export type TagsModificationResponse = { + deploy_environment?: string /** - * Tags that were successfully added (for add operation) + * Whether using embedded Python */ - added?: Array; + embedded_python: boolean /** - * Tags that were already present (for add operation) + * Operating system */ - already_present?: Array; + os: string /** - * Tags that were not present (for remove operation) + * Python version */ - not_present?: Array; + python_version: string /** - * Tags that were successfully removed (for remove operation) + * PyTorch version */ - removed?: Array; + pytorch_version: string /** - * All tags on the asset after the operation + * Free RAM in bytes */ - total_tags: Array; -}; - -/** - * Metadata for a single tag that can be applied to assets. - */ -export type TagInfo = { + ram_free: number /** - * Number of assets using this tag + * Total RAM in bytes */ - count: number; + ram_total: number /** - * Tag name + * Workflow templates version */ - name: string; -}; - -/** - * System statistics response - */ -export type SystemStatsResponse = { - devices: Array<{ - /** - * Device name - */ - name: string; - /** - * Device type - */ - type: string; - /** - * Free VRAM in bytes - */ - vram_free?: number; - /** - * Total VRAM in bytes - */ - vram_total?: number; - }>; - system: { - /** - * Command line arguments - */ - argv: Array; - /** - * Cloud ingest service version (commit hash) - */ - cloud_version?: string; - /** - * ComfyUI frontend version (commit hash or tag) - */ - comfyui_frontend_version?: string; - /** - * ComfyUI version - */ - comfyui_version: string; - /** - * How this ComfyUI instance is deployed (e.g. cloud, local-git, local-portable, local-desktop) - */ - deploy_environment?: string; - /** - * Whether using embedded Python - */ - embedded_python: boolean; - /** - * Operating system - */ - os: string; - /** - * Python version - */ - python_version: string; - /** - * PyTorch version - */ - pytorch_version: string; - /** - * Free RAM in bytes - */ - ram_free: number; - /** - * Total RAM in bytes - */ - ram_total: number; - /** - * Workflow templates version - */ - workflow_templates_version?: string; - }; -}; + workflow_templates_version?: string + } +} /** * Billing period (uppercase to match comfy-api) */ -export type SubscriptionDuration = 'MONTHLY' | 'ANNUAL'; +export type SubscriptionDuration = 'MONTHLY' | 'ANNUAL' /** * Response after successfully subscribing to a billing plan. */ export type SubscribeResponse = { - /** - * Billing operation ID to poll for status via GET /api/billing/ops/{id} - */ - billing_op_id: string; - /** - * When the subscription became/becomes active (present when status=subscribed or pending_payment) - */ - effective_at?: string; - /** - * URL to redirect user to add payment method (present when status=needs_payment_method) - */ - payment_method_url?: string; - /** - * Status of the subscription operation: - * - subscribed: Subscription is active immediately - * - needs_payment_method: User must add payment method via payment_method_url - * - pending_payment: Upgrade initiated, waiting for payment to complete - * - */ - status: 'subscribed' | 'needs_payment_method' | 'pending_payment'; -}; + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string + /** + * When the subscription became/becomes active (present when status=subscribed or pending_payment) + */ + effective_at?: string + /** + * URL to redirect user to add payment method (present when status=needs_payment_method) + */ + payment_method_url?: string + /** + * Status of the subscription operation: + * - subscribed: Subscription is active immediately + * - needs_payment_method: User must add payment method via payment_method_url + * - pending_payment: Upgrade initiated, waiting for payment to complete + * + */ + status: 'subscribed' | 'needs_payment_method' | 'pending_payment' +} /** * Request body for subscribing a workspace to a billing plan. */ export type SubscribeRequest = { - /** - * Billing cycle for the team slider contract. When present it must be - * consistent with plan_slug (monthly -> team_per_credit_monthly, - * yearly -> team_per_credit_annual). - * - */ - billing_cycle?: 'monthly' | 'yearly'; - /** - * URL to redirect if user cancels the payment method flow. - * If not provided, return_url is used for both success and cancel. - * - */ - cancel_url?: string; - /** - * Client-provided key to prevent duplicate operations. - * If a billing op with this key already exists, returns the existing op instead of creating a new one. - * - */ - idempotency_key?: string; - /** - * Target plan slug to subscribe to - */ - plan_slug: string; - /** - * URL to redirect after payment method is added successfully. - * Required if workspace has no payment method on file. - * - */ - return_url?: string; - /** - * Selected team credit-stop preset id (e.g. "team_700") for the - * per-credit Team plan. Required when subscribing to a per-credit Team - * plan; rejected for non-team plans. The backend owns the resolved - * amounts (credits/price) for the stop. - * - */ - team_credit_stop_id?: string; -}; + /** + * Billing cycle for the team slider contract. When present it must be + * consistent with plan_slug (monthly -> team_per_credit_monthly, + * yearly -> team_per_credit_annual). + * + */ + billing_cycle?: 'monthly' | 'yearly' + /** + * URL to redirect if user cancels the payment method flow. + * If not provided, return_url is used for both success and cancel. + * + */ + cancel_url?: string + /** + * Client-provided key to prevent duplicate operations. + * If a billing op with this key already exists, returns the existing op instead of creating a new one. + * + */ + idempotency_key?: string + /** + * Target plan slug to subscribe to + */ + plan_slug: string + /** + * URL to redirect after payment method is added successfully. + * Required if workspace has no payment method on file. + * + */ + return_url?: string + /** + * Selected team credit-stop preset id (e.g. "team_700") for the + * per-credit Team plan. Required when subscribing to a per-credit Team + * plan; rejected for non-team plans. The backend owns the resolved + * amounts (credits/price) for the stop. + * + */ + team_credit_stop_id?: string +} /** * User secret metadata (the secret value itself is never returned after creation). */ export type SecretResponse = { - /** - * When the secret was created - */ - created_at: string; - /** - * Unique identifier for the secret - */ - id: string; - /** - * When the secret was last used for decryption - */ - last_used_at?: string; - /** - * User-provided label for the secret - */ - name: string; - /** - * Provider identifier (e.g., huggingface, civitai) - */ - provider?: string; - /** - * When the secret was last updated - */ - updated_at: string; -}; + /** + * When the secret was created + */ + created_at: string + /** + * Unique identifier for the secret + */ + id: string + /** + * When the secret was last used for decryption + */ + last_used_at?: string + /** + * User-provided label for the secret + */ + name: string + /** + * Provider identifier (e.g., huggingface, civitai) + */ + provider?: string + /** + * When the secret was last updated + */ + updated_at: string +} /** * The providers available to the authenticated user in the current workspace. */ export type SecretProvidersResponse = { - data: Array; -}; + data: Array +} /** * A provider the user may configure a secret for. The shape is deliberately minimal (identifier only) and reserved for future per-provider fields such as sub-keys. */ export type SecretProvider = { - /** - * Provider identifier (e.g., huggingface, civitai, runway, gemini) - */ - id: string; -}; + /** + * Provider identifier (e.g., huggingface, civitai, runway, gemini) + */ + id: string +} /** * List of user secrets with metadata only. */ export type SecretListResponse = { - data: Array; -}; + data: Array +} /** * Response after accepting a resubscribe request. */ export type ResubscribeResponse = { - /** - * Billing operation ID to poll for status via GET /api/billing/ops/{id} - */ - billing_op_id: string; - /** - * Human-readable confirmation message - */ - message?: string; - /** - * Subscription outcome. `active` means the resubscribe committed (the scheduled cancellation was undone); `pending` means the operation is still executing — poll the billing operation for the final outcome. - */ - status: 'active' | 'pending'; -}; + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string + /** + * Human-readable confirmation message + */ + message?: string + /** + * Subscription outcome. `active` means the resubscribe committed (the scheduled cancellation was undone); `pending` means the operation is still executing — poll the billing operation for the final outcome. + */ + status: 'active' | 'pending' +} /** * Request body for reactivating a previously cancelled subscription. */ export type ResubscribeRequest = { - /** - * Client-provided key to prevent duplicate operations. - * If a billing op with this key already exists, returns the existing op instead of creating a new one. - * - */ - idempotency_key?: string; -}; + /** + * Client-provided key to prevent duplicate operations. + * If a billing op with this key already exists, returns the existing op instead of creating a new one. + * + */ + idempotency_key?: string +} /** * Response after a queue management action (delete or clear). */ export type QueueManageResponse = { - /** - * Whether the queue was cleared - */ - cleared?: boolean; - /** - * Array of job IDs that were successfully cancelled - */ - deleted?: Array; -}; + /** + * Whether the queue was cleared + */ + cleared?: boolean + /** + * Array of job IDs that were successfully cancelled + */ + deleted?: Array +} /** * Request to manage queue operations */ export type QueueManageRequest = { - /** - * If true, clear all pending jobs from the queue - */ - clear?: boolean; - /** - * Array of job IDs to cancel; pending and running jobs transition to cancelled - */ - delete?: Array; -}; + /** + * If true, clear all pending jobs from the queue + */ + clear?: boolean + /** + * Array of job IDs to cancel; pending and running jobs transition to cancelled + */ + delete?: Array +} /** * Queue information with pending and running jobs */ export type QueueInfo = { - /** - * Array of pending job items (ordered by creation time, oldest first) - */ - queue_pending?: Array<[ - unknown, - unknown, - unknown, - unknown, - unknown - ]>; - /** - * Array of currently running job items - */ - queue_running?: Array<[ - unknown, - unknown, - unknown, - unknown, - unknown - ]>; -}; + /** + * Array of pending job items (ordered by creation time, oldest first) + */ + queue_pending?: Array<[unknown, unknown, unknown, unknown, unknown]> + /** + * Array of currently running job items + */ + queue_running?: Array<[unknown, unknown, unknown, unknown, unknown]> +} /** * Full detail of a publicly published workflow on the Hub. */ export type PublishedWorkflowDetail = { - /** - * Published assets with their library status for the caller. - */ - assets: Array; - listed: boolean; - /** - * Human-readable workflow name. - */ - name: string; - publish_time?: string | null; - share_id: string; - workflow_id: string; - /** - * The workflow JSON content at publish time. - */ - workflow_json: { - [key: string]: unknown; - }; -}; + /** + * Published assets with their library status for the caller. + */ + assets: Array + listed: boolean + /** + * Human-readable workflow name. + */ + name: string + publish_time?: string | null + share_id: string + workflow_id: string + /** + * The workflow JSON content at publish time. + */ + workflow_json: { + [key: string]: unknown + } +} /** * Request body for publishing workflow assets to the Hub. */ export type PublishWorkflowAssetsRequest = { - /** - * IDs of assets (inputs and models) to snapshot. - */ - asset_ids: Array; -}; + /** + * IDs of assets (inputs and models) to snapshot. + */ + asset_ids: Array +} /** * Request body for publishing or updating a workflow on the Hub. */ export type PublishHubWorkflowRequest = { - /** - * IDs of assets (inputs and models) to snapshot. - */ - asset_ids: Array; - /** - * Custom node slugs. Must exist in hub_labels. - */ - custom_nodes?: Array; - /** - * Workflow description for the hub listing. - */ - description?: string; - /** - * Arbitrary metadata (size, vram, open_source, etc.). Reserved keys (extended_description, meta_description, how_to_use, suggested_use_cases, faq_items, content_template) are backend-managed and will be stripped if supplied. - */ - metadata?: { - [key: string]: unknown; - }; - /** - * Model slugs. Must exist in hub_labels. - */ - models?: Array; - /** - * Display name for the published workflow on the hub. - */ - name: string; - /** - * Array of tokens or existing public URLs from the previous published version. Full replacement (PUT semantics). Omit or pass [] to have no sample images. - * - */ - sample_image_tokens_or_urls?: Array; - /** - * Searchable tag slugs. Must exist in hub_labels. - */ - tags?: Array; - /** - * Token or existing public URL from the previous published version. Omit to have no comparison image. - * - */ - thumbnail_comparison_token_or_url?: string; - /** - * Token (from /api/hub/assets/upload-url) for a new upload, or an existing public URL from the previous published version. Omit to have no thumbnail. - * - */ - thumbnail_token_or_url?: string; - thumbnail_type?: 'image' | 'video' | 'image_comparison'; - /** - * URL to a tutorial for this workflow. - */ - tutorial_url?: string; - /** - * Username of the hub profile to publish under. The authenticated user must belong to the workspace that owns this profile. - */ - username: string; - /** - * Userdata path of the workflow file (e.g. "workflows/my-flow.json"). - */ - workflow_filename: string; -}; + /** + * IDs of assets (inputs and models) to snapshot. + */ + asset_ids: Array + /** + * Custom node slugs. Must exist in hub_labels. + */ + custom_nodes?: Array + /** + * Workflow description for the hub listing. + */ + description?: string + /** + * Arbitrary metadata (size, vram, open_source, etc.). Reserved keys (extended_description, meta_description, how_to_use, suggested_use_cases, faq_items, content_template) are backend-managed and will be stripped if supplied. + */ + metadata?: { + [key: string]: unknown + } + /** + * Model slugs. Must exist in hub_labels. + */ + models?: Array + /** + * Display name for the published workflow on the hub. + */ + name: string + /** + * Array of tokens or existing public URLs from the previous published version. Full replacement (PUT semantics). Omit or pass [] to have no sample images. + * + */ + sample_image_tokens_or_urls?: Array + /** + * Searchable tag slugs. Must exist in hub_labels. + */ + tags?: Array + /** + * Token or existing public URL from the previous published version. Omit to have no comparison image. + * + */ + thumbnail_comparison_token_or_url?: string + /** + * Token (from /api/hub/assets/upload-url) for a new upload, or an existing public URL from the previous published version. Omit to have no thumbnail. + * + */ + thumbnail_token_or_url?: string + thumbnail_type?: 'image' | 'video' | 'image_comparison' + /** + * URL to a tutorial for this workflow. + */ + tutorial_url?: string + /** + * Username of the hub profile to publish under. The authenticated user must belong to the workspace that owns this profile. + */ + username: string + /** + * Userdata path of the workflow file (e.g. "workflows/my-flow.json"). + */ + workflow_filename: string +} /** * Response returned after successfully queuing a workflow prompt. */ export type PromptResponse = { - /** - * Any errors in the nodes of the prompt - */ - node_errors?: { - [key: string]: unknown; - }; - /** - * Priority number in the queue - */ - number?: number; - /** - * Unique identifier for the prompt execution - */ - prompt_id?: string; -}; + /** + * Any errors in the nodes of the prompt + */ + node_errors?: { + [key: string]: unknown + } + /** + * Priority number in the queue + */ + number?: number + /** + * Unique identifier for the prompt execution + */ + prompt_id?: string +} /** * Request body for submitting a ComfyUI workflow prompt for execution. */ export type PromptRequest = { - /** - * Extra data to be associated with the prompt - */ - extra_data?: { - [key: string]: unknown; - }; - /** - * If true, adds the prompt to the front of the queue - */ - front?: boolean; - /** - * Priority number for the queue (lower numbers have higher priority) - */ - number?: number; - /** - * List of node names to execute - */ - partial_execution_targets?: Array; - /** - * The workflow graph to execute - */ - prompt: { - [key: string]: unknown; - }; - /** - * UUID identifying the cloud workflow entity to associate with this job - */ - workflow_id?: string; - /** - * UUID identifying the workflow version to associate with this job - */ - workflow_version_id?: string; -}; + /** + * Extra data to be associated with the prompt + */ + extra_data?: { + [key: string]: unknown + } + /** + * If true, adds the prompt to the front of the queue + */ + front?: boolean + /** + * Priority number for the queue (lower numbers have higher priority) + */ + number?: number + /** + * List of node names to execute + */ + partial_execution_targets?: Array + /** + * The workflow graph to execute + */ + prompt: { + [key: string]: unknown + } + /** + * UUID identifying the cloud workflow entity to associate with this job + */ + workflow_id?: string + /** + * UUID identifying the workflow version to associate with this job + */ + workflow_version_id?: string +} /** * Metadata about the currently running and queued prompts. */ export type PromptInfo = { - exec_info?: { - /** - * Number of items remaining in the queue - */ - queue_remaining?: number; - }; -}; + exec_info?: { + /** + * Number of items remaining in the queue + */ + queue_remaining?: number + } +} /** * Error response for ComfyUI prompt execution. */ export type PromptErrorResponse = { - [key: string]: unknown; -}; + [key: string]: unknown +} /** * Itemized cost preview for a pending subscription change. */ export type PreviewSubscribeResponse = { - /** - * Whether this subscription change is allowed - */ - allowed: boolean; - /** - * Amount that will be charged at next billing period in cents - */ - cost_next_period_cents: number; - /** - * Amount to charge today in cents (0 for downgrades) - */ - cost_today_cents: number; - /** - * Credits that will be granted at next billing period in cents - */ - credits_next_period_cents: number; - /** - * Credits granted today in cents (prorated for mid-period upgrades) - */ - credits_today_cents: number; - current_plan?: PreviewPlanInfo; - /** - * When the change takes effect - */ - effective_at: string; - /** - * Whether the change takes effect immediately (true) or at period end (false) - */ - is_immediate: boolean; - new_plan: PreviewPlanInfo; - /** - * Reason why the change is not allowed (only present if allowed=false) - */ - reason?: string; - /** - * Type of subscription transition - */ - transition_type: 'new_subscription' | 'upgrade' | 'downgrade' | 'duration_change'; -}; + /** + * Whether this subscription change is allowed + */ + allowed: boolean + /** + * Amount that will be charged at next billing period in cents + */ + cost_next_period_cents: number + /** + * Amount to charge today in cents (0 for downgrades) + */ + cost_today_cents: number + /** + * Credits that will be granted at next billing period in cents + */ + credits_next_period_cents: number + /** + * Credits granted today in cents (prorated for mid-period upgrades) + */ + credits_today_cents: number + current_plan?: PreviewPlanInfo + /** + * When the change takes effect + */ + effective_at: string + /** + * Whether the change takes effect immediately (true) or at period end (false) + */ + is_immediate: boolean + new_plan: PreviewPlanInfo + /** + * Reason why the change is not allowed (only present if allowed=false) + */ + reason?: string + /** + * Type of subscription transition + */ + transition_type: + | 'new_subscription' + | 'upgrade' + | 'downgrade' + | 'duration_change' +} /** * Summary of seat costs based on current workspace members */ export type PlanSeatSummary = { - /** - * Total number of seats (owner + members) that would be charged - */ - seat_count: number; - /** - * Total cost for all seats in cents - */ - total_cost_cents: number; - /** - * Total credits granted for all seats in cents - */ - total_credits_cents: number; -}; + /** + * Total number of seats (owner + members) that would be charged + */ + seat_count: number + /** + * Total cost for all seats in cents + */ + total_cost_cents: number + /** + * Total credits granted for all seats in cents + */ + total_credits_cents: number +} /** * Plan information for preview display */ export type PreviewPlanInfo = { - /** - * Per-seat credits in cents - */ - credits_cents: number; - duration: SubscriptionDuration; - /** - * Current billing period end (only for current_plan) - */ - period_end?: string; - /** - * Current billing period start (only for current_plan) - */ - period_start?: string; - /** - * Per-seat price in cents - */ - price_cents: number; - seat_summary: PlanSeatSummary; - /** - * Plan slug - */ - slug: string; - tier: SubscriptionTier; -}; + /** + * Per-seat credits in cents + */ + credits_cents: number + duration: SubscriptionDuration + /** + * Current billing period end (only for current_plan) + */ + period_end?: string + /** + * Current billing period start (only for current_plan) + */ + period_start?: string + /** + * Per-seat price in cents + */ + price_cents: number + seat_summary: PlanSeatSummary + /** + * Plan slug + */ + slug: string + tier: SubscriptionTier +} /** * Request body for previewing the cost of a plan subscription change. */ export type PreviewSubscribeRequest = { - /** - * Target plan slug to preview subscribing to - */ - plan_slug: string; -}; + /** + * Target plan slug to preview subscribing to + */ + plan_slug: string +} /** * Reason why a plan is unavailable */ -export type PlanAvailabilityReason = 'same_plan' | 'incompatible_transition' | 'requires_team' | 'requires_personal' | 'exceeds_max_seats'; +export type PlanAvailabilityReason = + | 'same_plan' + | 'incompatible_transition' + | 'requires_team' + | 'requires_personal' + | 'exceeds_max_seats' /** * Availability and eligibility information for a billing plan. */ export type PlanAvailability = { - /** - * Whether the workspace can subscribe to this plan - */ - available: boolean; - reason?: PlanAvailabilityReason; -}; + /** + * Whether the workspace can subscribe to this plan + */ + available: boolean + reason?: PlanAvailabilityReason +} /** * Billing plan details including pricing, limits, and features. */ export type Plan = { - availability: PlanAvailability; - /** - * Per-member credits in cents (base + one seat) - */ - credits_cents: number; - duration: SubscriptionDuration; - /** - * Maximum number of seats allowed for this plan - */ - max_seats: number; - /** - * Per-member price in cents (base + one seat) - */ - price_cents: number; - seat_summary: PlanSeatSummary; - /** - * Plan identifier (e.g., "pro-monthly", "team-standard-annual") - */ - slug: string; - tier: SubscriptionTier; -}; + availability: PlanAvailability + /** + * Per-member credits in cents (base + one seat) + */ + credits_cents: number + duration: SubscriptionDuration + /** + * Maximum number of seats allowed for this plan + */ + max_seats: number + /** + * Per-member price in cents (base + one seat) + */ + price_cents: number + seat_summary: PlanSeatSummary + /** + * Plan identifier (e.g., "pro-monthly", "team-standard-annual") + */ + slug: string + tier: SubscriptionTier +} /** * An outstanding workspace invitation that has not yet been accepted. */ export type PendingInvite = { - /** - * Email address of the invited user - */ - email: string; - /** - * When the invite expires - */ - expires_at: string; - /** - * Invite ID - */ - id: string; - /** - * When the invite was created - */ - invited_at: string; - /** - * Invite token for constructing invite links. Empty for expired invites. - */ - token?: string; -}; + /** + * Email address of the invited user + */ + email: string + /** + * When the invite expires + */ + expires_at: string + /** + * Invite ID + */ + id: string + /** + * When the invite was created + */ + invited_at: string + /** + * Invite token for constructing invite links. Empty for expired invites. + */ + token?: string +} /** * Response containing a redirect URL to the payment portal. */ export type PaymentPortalResponse = { - /** - * Stripe Billing Portal URL - */ - url: string; -}; + /** + * Stripe Billing Portal URL + */ + url: string +} /** * Request body for generating a payment portal session URL. */ export type PaymentPortalRequest = { - /** - * URL to redirect after the user exits the portal - */ - return_url?: string; -}; + /** + * URL to redirect after the user exits the portal + */ + return_url?: string +} /** * RFC 6749 §5.1 successful token response. */ export type OAuthTokenResponse = { - /** - * Resource-bound Cloud JWT (audience matches the protected resource). - */ - access_token: string; - /** - * 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; - token_type: 'Bearer'; -}; + /** + * Resource-bound Cloud JWT (audience matches the protected resource). + */ + access_token: string + /** + * 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 + token_type: 'Bearer' +} /** * 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.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 7591 §3.2.1 successful registration response. */ export type OAuthRegisterResponse = { - application_type: 'native' | 'web'; - /** - * 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; - grant_types: Array; - redirect_uris: Array; - response_types: Array; - token_endpoint_auth_method: 'none'; -}; + application_type: 'native' | 'web' + /** + * 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 + grant_types: Array + redirect_uris: Array + response_types: Array + token_endpoint_auth_method: 'none' +} /** * 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 = { - /** - * RFC 7591 §2 application_type. **OPTIONAL** — omit the field to default to `native` (the loopback-friendly policy), rather than the RFC's nominal `web` default; the MCP SDK's DCR client omits it. `native` for desktop / CLI / MCP-spec-strict clients (loopback redirects); `web` for hosted clients (HTTPS only, host must be allowlisted). The realistic MCP-client population is overwhelmingly native/loopback, so defaulting to `web` would silently bounce those clients off the wrong redirect policy. A *present* value must be one of the enum members; any other value rejects with `invalid_client_metadata`. (The server has no runtime enum validation and defensively coerces a null/empty value to `native`, but spec-validating clients should omit the field rather than send `""` — the enum does not permit it.) - * - */ - application_type?: 'native' | 'web'; - /** - * Human-readable name shown in the consent UI. Reserved-name list rejects impersonation of major MCP clients. - */ - client_name?: string; - /** - * **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. - */ - contacts?: Array | null; - /** - * Optional. Defaults to `["authorization_code","refresh_token"]`. - */ - grant_types?: Array<'authorization_code' | 'refresh_token'>; - /** - * **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; - /** - * **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. - */ - policy_uri?: string | null; - /** - * 1–5 redirect URIs. Validated against `application_type` policy. - */ - redirect_uris: Array; - /** - * **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; - } | null; - /** - * 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.** 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; - /** - * Public clients only this phase — must be `none` if present. The server forces `none` regardless. - */ - token_endpoint_auth_method?: 'none'; - /** - * **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase. - */ - tos_uri?: string | null; -}; + /** + * RFC 7591 §2 application_type. **OPTIONAL** — omit the field to default to `native` (the loopback-friendly policy), rather than the RFC's nominal `web` default; the MCP SDK's DCR client omits it. `native` for desktop / CLI / MCP-spec-strict clients (loopback redirects); `web` for hosted clients (HTTPS only, host must be allowlisted). The realistic MCP-client population is overwhelmingly native/loopback, so defaulting to `web` would silently bounce those clients off the wrong redirect policy. A *present* value must be one of the enum members; any other value rejects with `invalid_client_metadata`. (The server has no runtime enum validation and defensively coerces a null/empty value to `native`, but spec-validating clients should omit the field rather than send `""` — the enum does not permit it.) + * + */ + application_type?: 'native' | 'web' + /** + * Human-readable name shown in the consent UI. Reserved-name list rejects impersonation of major MCP clients. + */ + client_name?: string + /** + * **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. + */ + contacts?: Array | null + /** + * Optional. Defaults to `["authorization_code","refresh_token"]`. + */ + grant_types?: Array<'authorization_code' | 'refresh_token'> + /** + * **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 + /** + * **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. + */ + policy_uri?: string | null + /** + * 1–5 redirect URIs. Validated against `application_type` policy. + */ + redirect_uris: Array + /** + * **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 + } | null + /** + * 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.** 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 + /** + * Public clients only this phase — must be `none` if present. The server forces `none` regardless. + */ + token_endpoint_auth_method?: 'none' + /** + * **REJECTED IF PRESENT.** Unsupported RFC 7591 metadata for this public MCP-client phase. + */ + tos_uri?: string | null +} /** * RFC 7591 §3.2.2 error response. */ export type OAuthRegisterError = { - error: 'invalid_redirect_uri' | 'invalid_client_metadata'; - error_description?: string | null; -}; + 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; `ErrorResponse` is the strict-server binding-layer error fired when the request body fails OpenAPI-schema validation before the handler runs, normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler (BE-1178). * */ -export type OAuthRegisterBadRequestResponse = OAuthRegisterError | ErrorResponse; +export type OAuthRegisterBadRequestResponse = OAuthRegisterError | ErrorResponse /** * Standard error response with a machine-readable code and human-readable message. */ export type ErrorResponse = { - code: string; - /** - * Optional open object carrying structured, machine-readable context about the error (e.g. offending field names, validation specifics). Absent for most errors; consumers must not assume any particular shape. - */ - details?: { - [key: string]: unknown; - }; - message: string; -}; + code: string + /** + * Optional open object carrying structured, machine-readable context about the error (e.g. offending field names, validation specifics). Absent for most errors; consumers must not assume any particular shape. + */ + details?: { + [key: string]: unknown + } + message: string +} /** * OAuth 2.1 protected-resource metadata (RFC 9728). */ export type OAuthProtectedResourceMetadata = { - authorization_servers: Array; - bearer_methods_supported?: Array; - resource: string; - scopes_supported: Array; -}; + authorization_servers: Array + bearer_methods_supported?: Array + resource: string + scopes_supported: Array +} /** * 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; - role: 'owner' | 'member'; - type: 'personal' | 'team'; -}; + id: string + name: string + role: 'owner' | 'member' + type: 'personal' | 'team' +} /** * 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 = { - /** - * Human-readable name of the OAuth client requesting authorization, from oauth_clients.display_name. - */ - client_display_name: string; - /** - * Per-row CSRF token bound to this authorization request (not to the session). Must be echoed back on POST. - */ - csrf_token: string; - /** - * Opaque server-side identifier for the authorization-request row. Carried back unchanged in the consent submission. - */ - oauth_request_id: string; - /** - * The exact redirect URI this authorization request was validated - * against at GET time (oauth_authorization_requests.redirect_uri, - * itself byte-matched to the client registration). The frontend - * binds the post-consent navigation to this value, so it needs no - * per-client knowledge of callback schemes. Surfaced verbatim; - * also suitable for display so users can verify the destination. - * - */ - redirect_uri: 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; - /** - * Workspaces the user can select from. Membership is re-checked on POST. - */ - workspaces: Array; -}; + /** + * Human-readable name of the OAuth client requesting authorization, from oauth_clients.display_name. + */ + client_display_name: string + /** + * Per-row CSRF token bound to this authorization request (not to the session). Must be echoed back on POST. + */ + csrf_token: string + /** + * Opaque server-side identifier for the authorization-request row. Carried back unchanged in the consent submission. + */ + oauth_request_id: string + /** + * The exact redirect URI this authorization request was validated + * against at GET time (oauth_authorization_requests.redirect_uri, + * itself byte-matched to the client registration). The frontend + * binds the post-consent navigation to this value, so it needs no + * per-client knowledge of callback schemes. Surfaced verbatim; + * also suitable for display so users can verify the destination. + * + */ + redirect_uri: 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 + /** + * Workspaces the user can select from. Membership is re-checked on POST. + */ + workspaces: Array +} /** * 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; -}; + /** + * OAuth client redirect URI with either code+state for allow, or error+state for deny. + */ + redirect_url: string +} /** * OAuth 2.1 authorization-server metadata (RFC 8414). */ export type OAuthAuthorizationServerMetadata = { - authorization_endpoint: string; - code_challenge_methods_supported: Array; - grant_types_supported: Array; - issuer: 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; - scopes_supported?: Array; - token_endpoint: string; - token_endpoint_auth_methods_supported: Array; -}; + authorization_endpoint: string + code_challenge_methods_supported: Array + grant_types_supported: Array + issuer: 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 + scopes_supported?: Array + token_endpoint: string + token_endpoint_auth_methods_supported: Array +} /** * Metadata describing a single ComfyUI node type and its inputs/outputs. */ export type NodeInfo = { - /** - * Whether this is an API node - */ - api_node?: boolean; - /** - * Category of the node - */ - category?: string; - /** - * Whether the node is deprecated - */ - deprecated?: boolean; - /** - * Description of the node - */ - description?: string; - /** - * Display name of the node - */ - display_name?: string; - /** - * Whether the node is experimental - */ - experimental?: boolean; - /** - * Input specifications for the node - */ - input?: { - [key: string]: unknown; - }; - /** - * Order of inputs for display - */ - input_order?: { - [key: string]: Array; - }; - /** - * Internal name of the node - */ - name?: string; - /** - * Output types of the node - */ - output?: Array; - /** - * Whether each output is a list - */ - output_is_list?: Array; - /** - * Names of the outputs - */ - output_name?: Array; - /** - * Whether this is an output node - */ - output_node?: boolean; - /** - * Tooltips for outputs - */ - output_tooltips?: Array; - /** - * Python module implementing the node - */ - python_module?: string; -}; + /** + * Whether this is an API node + */ + api_node?: boolean + /** + * Category of the node + */ + category?: string + /** + * Whether the node is deprecated + */ + deprecated?: boolean + /** + * Description of the node + */ + description?: string + /** + * Display name of the node + */ + display_name?: string + /** + * Whether the node is experimental + */ + experimental?: boolean + /** + * Input specifications for the node + */ + input?: { + [key: string]: unknown + } + /** + * Order of inputs for display + */ + input_order?: { + [key: string]: Array + } + /** + * Internal name of the node + */ + name?: string + /** + * Output types of the node + */ + output?: Array + /** + * Whether each output is a list + */ + output_is_list?: Array + /** + * Names of the outputs + */ + output_name?: Array + /** + * Whether this is an output node + */ + output_node?: boolean + /** + * Tooltips for outputs + */ + output_tooltips?: Array + /** + * Python module implementing the node + */ + python_module?: string +} /** * Represents a folder containing models */ export type ModelFolder = { - /** - * List of paths where models of this type are stored - */ - folders: Array; - /** - * The name of the model folder - */ - name: string; -}; + /** + * List of paths where models of this type are stored + */ + folders: Array + /** + * The name of the model folder + */ + name: string +} /** * Represents a model file with metadata */ export type ModelFile = { - /** - * The filename of the model - */ - name: string; - /** - * Index of the path where this model is located - */ - pathIndex: number; -}; + /** + * The filename of the model + */ + name: string + /** + * Index of the path where this model is located + */ + pathIndex: number +} /** * Workspace member with profile and role information. */ export type Member = { - /** - * User's email address - */ - email: string; - /** - * User ID - */ - id: string; - /** - * Whether this member is the workspace's immutable original owner (the creator). Derived as member.id == workspace.created_by_user_id; exactly one member per workspace is marked. The original owner can never be demoted, removed, or leave; a promoted owner is never marked. - */ - is_original_owner: boolean; - /** - * When the user joined the workspace - */ - joined_at: string; - /** - * User's display name - */ - name: string; - /** - * User's role in the workspace - */ - role: 'owner' | 'member'; -}; + /** + * User's email address + */ + email: string + /** + * User ID + */ + id: string + /** + * Whether this member is the workspace's immutable original owner (the creator). Derived as member.id == workspace.created_by_user_id; exactly one member per workspace is marked. The original owner can never be demoted, removed, or leave; a promoted owner is never marked. + */ + is_original_owner: boolean + /** + * When the user joined the workspace + */ + joined_at: string + /** + * User's display name + */ + name: string + /** + * User's role in the workspace + */ + role: 'owner' | 'member' +} /** * Paginated list of workspaces the authenticated user belongs to. */ export type ListWorkspacesResponse = { - workspaces: Array; -}; + workspaces: Array +} /** * List of API keys associated with the current workspace. */ export type ListWorkspaceApiKeysResponse = { - api_keys: Array; -}; + api_keys: Array +} /** * Paginated list of available asset tags. */ export type ListTagsResponse = { - /** - * Whether more tags are available - */ - has_more: boolean; - /** - * List of tags - */ - tags: Array; - /** - * Total number of tags - */ - total: number; -}; + /** + * Whether more tags are available + */ + has_more: boolean + /** + * List of tags + */ + tags: Array + /** + * Total number of tags + */ + total: number +} /** * List of members in the current workspace. */ export type ListMembersResponse = { - members: Array; - pagination: PaginationInfo; -}; + members: Array + pagination: PaginationInfo +} /** * List of pending invitations for the current workspace. */ export type ListInvitesResponse = { - invites: Array; -}; + invites: Array +} /** * Paginated list of assets belonging to the authenticated user. */ export type ListAssetsResponse = { - /** - * List of assets matching the query - */ - assets: Array; - /** - * 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; - /** - * Total number of assets matching the filters - */ - total: number; -}; + /** + * List of assets matching the query + */ + assets: Array + /** + * 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 + /** + * Total number of assets matching the filters + */ + total: number +} /** * Represents a user-owned asset (image, video, or other generated output). */ export type Asset = { - /** - * Timestamp when the asset was created - */ - created_at: string; - /** - * Display name of the asset. Mirrors name for backwards compatibility. - */ - display_name?: string | null; - /** - * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") - */ - file_path?: string | null; - /** - * Blake3 hash of the asset content. - */ - hash?: string; - /** - * Unique identifier for the asset - */ - id: string; - /** - * Whether this asset is immutable (cannot be modified or deleted) - */ - is_immutable?: boolean; - /** - * ID of the job that created this asset, if available - */ - job_id?: string | null; - /** - * Timestamp when the asset was last accessed - */ - last_access_time?: string; - /** - * System-managed metadata from download sources (HuggingFace, CivitAI, etc.) - read-only, not user-modifiable - */ - readonly metadata?: { - [key: string]: unknown; - }; - /** - * MIME type of the asset - */ - mime_type?: string; - /** - * Name of the asset file - */ - name: string; - /** - * ID of the preview asset if available - */ - preview_id?: string | null; - /** - * URL for asset preview/thumbnail - */ - preview_url?: string; - /** - * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash. - */ - short_url?: string | null; - /** - * Size of the asset in bytes - */ - size?: number; - /** - * Tags associated with the asset - */ - tags?: Array; - /** - * Timestamp when the asset was last updated - */ - updated_at: string; - /** - * Custom user metadata for the asset - */ - user_metadata?: { - [key: string]: unknown; - }; -}; + /** + * Timestamp when the asset was created + */ + created_at: string + /** + * Display name of the asset. Mirrors name for backwards compatibility. + */ + display_name?: string | null + /** + * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") + */ + file_path?: string | null + /** + * Blake3 hash of the asset content. + */ + hash?: string + /** + * Unique identifier for the asset + */ + id: string + /** + * Whether this asset is immutable (cannot be modified or deleted) + */ + is_immutable?: boolean + /** + * ID of the job that created this asset, if available + */ + job_id?: string | null + /** + * Timestamp when the asset was last accessed + */ + last_access_time?: string + /** + * System-managed metadata from download sources (HuggingFace, CivitAI, etc.) - read-only, not user-modifiable + */ + readonly metadata?: { + [key: string]: unknown + } + /** + * MIME type of the asset + */ + mime_type?: string + /** + * Name of the asset file + */ + name: string + /** + * ID of the preview asset if available + */ + preview_id?: string | null + /** + * URL for asset preview/thumbnail + */ + preview_url?: string + /** + * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash. + */ + short_url?: string | null + /** + * Size of the asset in bytes + */ + size?: number + /** + * Tags associated with the asset + */ + tags?: Array + /** + * Timestamp when the asset was last updated + */ + updated_at: string + /** + * Custom user metadata for the asset + */ + user_metadata?: { + [key: string]: unknown + } +} /** * Reference to a Hub label by ID. */ export type LabelRef = { - /** - * Human-readable display name (e.g. "Video Generation", "Flux"). - */ - display_name: string; - /** - * Slug identifier (e.g. "video-generation", "flux"). - */ - name: string; -}; + /** + * Human-readable display name (e.g. "Video Generation", "Flux"). + */ + display_name: string + /** + * Slug identifier (e.g. "video-generation", "flux"). + */ + name: string +} /** * JSON Web Key Set containing the public keys used to verify Cloud JWTs. */ export type JwksResponse = { - keys: Array; -}; + keys: Array +} /** * A single JSON Web Key entry within a JWKS response. */ export type JwkKey = { - alg: string; - crv: string; - kid: string; - kty: string; - use: string; - /** - * Base64url-encoded X coordinate - */ - x: string; - /** - * Base64url-encoded Y coordinate - */ - y: string; -}; + alg: string + crv: string + kid: string + kty: string + use: string + /** + * Base64url-encoded X coordinate + */ + x: string + /** + * Base64url-encoded Y coordinate + */ + y: string +} /** * Paginated list of jobs for the authenticated user. */ export type JobsListResponse = { - /** - * Array of jobs ordered by specified sort field - */ - jobs: Array; - pagination: PaginationInfo; -}; + /** + * Array of jobs ordered by specified sort field + */ + jobs: Array + pagination: PaginationInfo +} /** * Detailed execution error information from ComfyUI */ export type ExecutionError = { - /** - * Input values at time of failure (empty object if not available) - */ - current_inputs: { - [key: string]: unknown; - }; - /** - * Output values at time of failure (empty object if not available) - */ - current_outputs: { - [key: string]: unknown; - }; - /** - * Human-readable error message - */ - exception_message: string; - /** - * Python exception type (e.g., "RuntimeError") - */ - exception_type: string; - /** - * ID of the node that failed - */ - node_id: string; - /** - * Type name of the node (e.g., "KSampler") - */ - node_type: string; - /** - * Array of traceback lines (empty array if not available) - */ - traceback: Array; -}; + /** + * Input values at time of failure (empty object if not available) + */ + current_inputs: { + [key: string]: unknown + } + /** + * Output values at time of failure (empty object if not available) + */ + current_outputs: { + [key: string]: unknown + } + /** + * Human-readable error message + */ + exception_message: string + /** + * Python exception type (e.g., "RuntimeError") + */ + exception_type: string + /** + * ID of the node that failed + */ + node_id: string + /** + * Type name of the node (e.g., "KSampler") + */ + node_type: string + /** + * Array of traceback lines (empty array if not available) + */ + traceback: Array +} /** * Lightweight job data for list views (workflow and full outputs excluded) */ export type JobEntry = { - /** - * Job creation timestamp (Unix timestamp in milliseconds) - */ - create_time: number; - /** - * Workflow execution completion timestamp (Unix milliseconds, only present for terminal states) - */ - execution_end_time?: number; - /** - * Detailed execution error from ComfyUI (only for failed jobs with structured error data) - */ - execution_error?: ExecutionError; - /** - * Workflow execution start timestamp (Unix milliseconds, only present for terminal states) - */ - execution_start_time?: number; - /** - * Unique job identifier - */ - id: string; - /** - * Total number of output files (omitted for non-terminal states) - */ - outputs_count?: number; - /** - * Primary preview output (only present for terminal states) - */ - preview_output?: { - [key: string]: unknown; - }; - /** - * User-friendly job status - */ - status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled'; - /** - * UUID identifying the workflow graph definition - */ - workflow_id?: string; -}; + /** + * Job creation timestamp (Unix timestamp in milliseconds) + */ + create_time: number + /** + * Workflow execution completion timestamp (Unix milliseconds, only present for terminal states) + */ + execution_end_time?: number + /** + * Detailed execution error from ComfyUI (only for failed jobs with structured error data) + */ + execution_error?: ExecutionError + /** + * Workflow execution start timestamp (Unix milliseconds, only present for terminal states) + */ + execution_start_time?: number + /** + * Unique job identifier + */ + id: string + /** + * Total number of output files (omitted for non-terminal states) + */ + outputs_count?: number + /** + * Primary preview output (only present for terminal states) + */ + preview_output?: { + [key: string]: unknown + } + /** + * User-friendly job status + */ + status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' + /** + * UUID identifying the workflow graph definition + */ + workflow_id?: string +} /** * Response for POST /api/jobs/cancel. - */ -export type JobsCancelResponse = { - /** - * Job IDs for which a cancel event was successfully dispatched by this - * call. Jobs already in a terminal or cancelling state are idempotently - * skipped and will not appear here. - * - */ - cancelled: Array; -}; - -/** - * Request to cancel multiple jobs by ID. - */ -export type JobsCancelRequest = { - /** - * Job identifiers (UUIDs) to cancel. - */ - job_ids: Array; -}; - -/** - * Job status information - */ -export type JobStatusResponse = { - /** - * The inference instance assigned to this job (if any) - */ - assigned_inference?: string | null; - /** - * When the job was created - */ - created_at: string; - /** - * Error message if the job failed - */ - error_message?: string | null; - /** - * The job ID - */ - id: string; - /** - * When the job status was last changed - */ - last_state_update?: string; - /** - * Current job status - */ - status: 'waiting_to_dispatch' | 'pending' | 'in_progress' | 'completed' | 'error' | 'cancelled'; - /** - * When the job was last updated - */ - updated_at: string; -}; - -/** - * Full job details including workflow and outputs - */ -export type JobDetailResponse = { - /** - * Job creation timestamp (Unix timestamp in milliseconds) - */ - create_time: number; - /** - * Detailed execution error from ComfyUI (only for failed jobs with structured error data) - */ - execution_error?: ExecutionError; - /** - * Node-level execution metadata (only for terminal states) - */ - execution_meta?: { - [key: string]: unknown; - }; - /** - * ComfyUI execution status and timeline (only for terminal states) - */ - execution_status?: { - [key: string]: unknown; - }; - /** - * Unique job identifier - */ - id: string; - /** - * Full outputs object from ComfyUI (only for terminal states) - */ - outputs?: { - [key: string]: unknown; - }; - /** - * Total number of output files (omitted for non-terminal states) - */ - outputs_count?: number; - /** - * Primary preview output (only for terminal states) - */ - preview_output?: { - [key: string]: unknown; - }; - /** - * User-friendly job status - */ - status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled'; - /** - * Last update timestamp (Unix timestamp in milliseconds) - */ - update_time: number; - /** - * Full ComfyUI workflow (10-100KB, omitted if not available). - * - * Sensitive credentials are redacted before the response is returned: - * `extra_data.api_key_comfy_org`, when present, is replaced with the - * literal string `"[REDACTED]"`. The field is preserved (not removed) - * so existence checks still pass, but the value is not usable. - * - */ - workflow?: { - [key: string]: unknown; - }; - /** - * UUID identifying the workflow graph definition - */ - workflow_id?: string; -}; + */ +export type JobsCancelResponse = { + /** + * Job IDs for which a cancel event was successfully dispatched by this + * call. Jobs already in a terminal or cancelling state are idempotently + * skipped and will not appear here. + * + */ + cancelled: Array +} + +/** + * Request to cancel multiple jobs by ID. + */ +export type JobsCancelRequest = { + /** + * Job identifiers (UUIDs) to cancel. + */ + job_ids: Array +} + +/** + * Job status information + */ +export type JobStatusResponse = { + /** + * The inference instance assigned to this job (if any) + */ + assigned_inference?: string | null + /** + * When the job was created + */ + created_at: string + /** + * Error message if the job failed + */ + error_message?: string | null + /** + * The job ID + */ + id: string + /** + * When the job status was last changed + */ + last_state_update?: string + /** + * Current job status + */ + status: + | 'waiting_to_dispatch' + | 'pending' + | 'in_progress' + | 'completed' + | 'error' + | 'cancelled' + /** + * When the job was last updated + */ + updated_at: string +} + +/** + * Full job details including workflow and outputs + */ +export type JobDetailResponse = { + /** + * Job creation timestamp (Unix timestamp in milliseconds) + */ + create_time: number + /** + * Detailed execution error from ComfyUI (only for failed jobs with structured error data) + */ + execution_error?: ExecutionError + /** + * Node-level execution metadata (only for terminal states) + */ + execution_meta?: { + [key: string]: unknown + } + /** + * ComfyUI execution status and timeline (only for terminal states) + */ + execution_status?: { + [key: string]: unknown + } + /** + * Unique job identifier + */ + id: string + /** + * Full outputs object from ComfyUI (only for terminal states) + */ + outputs?: { + [key: string]: unknown + } + /** + * Total number of output files (omitted for non-terminal states) + */ + outputs_count?: number + /** + * Primary preview output (only for terminal states) + */ + preview_output?: { + [key: string]: unknown + } + /** + * User-friendly job status + */ + status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' + /** + * Last update timestamp (Unix timestamp in milliseconds) + */ + update_time: number + /** + * Full ComfyUI workflow (10-100KB, omitted if not available). + * + * Sensitive credentials are redacted before the response is returned: + * `extra_data.api_key_comfy_org`, when present, is replaced with the + * literal string `"[REDACTED]"`. The field is preserved (not removed) + * so existence checks still pass, but the value is not usable. + * + */ + workflow?: { + [key: string]: unknown + } + /** + * UUID identifying the workflow graph definition + */ + workflow_id?: string +} /** * Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops. */ export type JobCancelResponse = { - /** - * True when a cancel event was successfully dispatched by this call. - * False when the job was already in a terminal or cancelling state, - * in which case the call is a no-op (still 200 — idempotent). - * - */ - cancelled: boolean; -}; + /** + * True when a cancel event was successfully dispatched by this call. + * False when the job was already in a terminal or cancelling state, + * in which case the call is a no-op (still 200 — idempotent). + * + */ + cancelled: boolean +} /** * Response after importing published workflow assets. */ export type ImportPublishedAssetsResponse = { - assets: Array; -}; + assets: Array +} /** * Request body for importing assets from a published workflow. */ export type ImportPublishedAssetsRequest = { - /** - * IDs of published assets (inputs and models) to import. - */ - published_asset_ids: Array; - /** - * Optional. Share ID of the published workflow these assets belong to. - * When provided (non-null, non-empty): all published_asset_ids must - * belong to this share's workflow version; returns - * 400/CodeInvalidAssets if the share is not found or any asset does - * not belong to it. - * When omitted, null, or empty string: no share-scoped validation is - * performed and the assets are validated only against global rules - * (legacy behaviour, preserved for clients that have not yet adopted - * share_id). - * - */ - share_id?: string | null; -}; + /** + * IDs of published assets (inputs and models) to import. + */ + published_asset_ids: Array + /** + * Optional. Share ID of the published workflow these assets belong to. + * When provided (non-null, non-empty): all published_asset_ids must + * belong to this share's workflow version; returns + * 400/CodeInvalidAssets if the share is not found or any asset does + * not belong to it. + * When omitted, null, or empty string: no share-scoped validation is + * performed and the assets are validated only against global rules + * (legacy behaviour, preserved for clients that have not yet adopted + * share_id). + * + */ + share_id?: string | null +} /** * Entry in the curated workflow template gallery shown on the home page. */ export type HubWorkflowTemplateEntry = { - /** - * Content template used for generation (tutorial, showcase, comparison, breakthrough) - */ - contentTemplate?: string; - /** - * Publication date in YYYY-MM-DD format - */ - date?: string; - description?: string; - /** - * AI-generated extended description of the workflow - */ - extendedDescription?: string; - /** - * AI-generated FAQ items - */ - faqItems?: Array<{ - answer: string; - question: string; - }>; - /** - * AI-generated step-by-step usage instructions - */ - howToUse?: Array; - includeOnDistributions?: Array; - io?: { - inputs?: Array<{ - [key: string]: unknown; - }>; - outputs?: Array<{ - [key: string]: unknown; - }>; - }; - /** - * Whether the template belongs to a module marked as essential. - */ - isEssential?: boolean; - logos?: Array<{ - [key: string]: unknown; - }>; - mediaSubtype?: string; - mediaType?: string; - /** - * AI-generated SEO meta description (under 160 chars) - */ - metaDescription?: string; - models?: Array; - /** - * Slug identifier for the template - */ - name: string; - openSource?: boolean; - profile?: HubProfileSummary; - requiresCustomNodes?: Array; - /** - * Search ranking score reported upstream. - */ - searchRank?: number; - /** - * Share ID for linking to the hub workflow detail - */ - shareId?: string; - /** - * Workflow asset size in bytes. - */ - size?: number; - status: HubWorkflowStatus; - /** - * AI-generated suggested use cases - */ - suggestedUseCases?: Array; - tags?: Array; - /** - * Public URL of the comparison thumbnail - */ - thumbnailComparisonUrl?: string; - /** - * Public URL of the primary thumbnail - */ - thumbnailUrl?: string; - thumbnailVariant?: string; - title: string; - tutorialUrl?: string; - /** - * Usage count reported upstream. - */ - usage?: number; - /** - * Approximate VRAM requirement in bytes. - */ - vram?: number; -}; + /** + * Content template used for generation (tutorial, showcase, comparison, breakthrough) + */ + contentTemplate?: string + /** + * Publication date in YYYY-MM-DD format + */ + date?: string + description?: string + /** + * AI-generated extended description of the workflow + */ + extendedDescription?: string + /** + * AI-generated FAQ items + */ + faqItems?: Array<{ + answer: string + question: string + }> + /** + * AI-generated step-by-step usage instructions + */ + howToUse?: Array + includeOnDistributions?: Array + io?: { + inputs?: Array<{ + [key: string]: unknown + }> + outputs?: Array<{ + [key: string]: unknown + }> + } + /** + * Whether the template belongs to a module marked as essential. + */ + isEssential?: boolean + logos?: Array<{ + [key: string]: unknown + }> + mediaSubtype?: string + mediaType?: string + /** + * AI-generated SEO meta description (under 160 chars) + */ + metaDescription?: string + models?: Array + /** + * Slug identifier for the template + */ + name: string + openSource?: boolean + profile?: HubProfileSummary + requiresCustomNodes?: Array + /** + * Search ranking score reported upstream. + */ + searchRank?: number + /** + * Share ID for linking to the hub workflow detail + */ + shareId?: string + /** + * Workflow asset size in bytes. + */ + size?: number + status: HubWorkflowStatus + /** + * AI-generated suggested use cases + */ + suggestedUseCases?: Array + tags?: Array + /** + * Public URL of the comparison thumbnail + */ + thumbnailComparisonUrl?: string + /** + * Public URL of the primary thumbnail + */ + thumbnailUrl?: string + thumbnailVariant?: string + title: string + tutorialUrl?: string + /** + * Usage count reported upstream. + */ + usage?: number + /** + * Approximate VRAM requirement in bytes. + */ + vram?: number +} /** * Public workflow status. NULL in the database is represented as pending in API responses. */ -export type HubWorkflowStatus = 'pending' | 'approved' | 'rejected' | 'deprecated'; +export type HubWorkflowStatus = + | 'pending' + | 'approved' + | 'rejected' + | 'deprecated' /** * Abbreviated Hub profile used in workflow listings. */ export type HubProfileSummary = { - /** - * Public URL of the profile avatar image. - */ - avatar_url?: string; - display_name?: string; - username: string; -}; + /** + * Public URL of the profile avatar image. + */ + avatar_url?: string + display_name?: string + username: string +} /** * Abbreviated Hub workflow metadata used in search and listing results. */ export type HubWorkflowSummary = { - custom_nodes?: Array; - description?: string; - metadata?: { - [key: string]: unknown; - }; - models?: Array; - name: string; - profile: HubProfileSummary; - publish_time?: string | null; - sample_image_urls?: Array; - share_id: string; - status: HubWorkflowStatus; - tags?: Array; - thumbnail_comparison_url?: string; - thumbnail_type?: 'image' | 'video' | 'image_comparison'; - thumbnail_url?: string; - tutorial_url?: string; -}; + custom_nodes?: Array + description?: string + metadata?: { + [key: string]: unknown + } + models?: Array + name: string + profile: HubProfileSummary + publish_time?: string | null + sample_image_urls?: Array + share_id: string + status: HubWorkflowStatus + tags?: Array + thumbnail_comparison_url?: string + thumbnail_type?: 'image' | 'video' | 'image_comparison' + thumbnail_url?: string + tutorial_url?: string +} /** * Paginated list of Hub workflows matching search criteria. */ export type HubWorkflowListResponse = { - /** - * Cursor for the next page, empty if no more results. - */ - next_cursor?: string; - /** - * Array of HubWorkflowSummary (default) or HubWorkflowDetail (when detail=true). - */ - workflows: Array; -}; + /** + * Cursor for the next page, empty if no more results. + */ + next_cursor?: string + /** + * Array of HubWorkflowSummary (default) or HubWorkflowDetail (when detail=true). + */ + workflows: Array +} /** * Full Hub workflow detail including versions, assets, and statistics. */ export type HubWorkflowDetail = { - /** - * Published assets. Each asset's id is the published asset ID (not the original private asset ID). - */ - assets: Array; - custom_nodes?: Array; - description?: string; - metadata?: { - [key: string]: unknown; - }; - models?: Array; - name: string; - profile: HubProfileSummary; - publish_time?: string | null; - sample_image_urls?: Array; - share_id: string; - status: HubWorkflowStatus; - tags?: Array; - thumbnail_comparison_url?: string; - thumbnail_type?: 'image' | 'video' | 'image_comparison'; - thumbnail_url?: string; - tutorial_url?: string; - workflow_id: string; - workflow_json: { - [key: string]: unknown; - }; -}; + /** + * Published assets. Each asset's id is the published asset ID (not the original private asset ID). + */ + assets: Array + custom_nodes?: Array + description?: string + metadata?: { + [key: string]: unknown + } + models?: Array + name: string + profile: HubProfileSummary + publish_time?: string | null + sample_image_urls?: Array + share_id: string + status: HubWorkflowStatus + tags?: Array + thumbnail_comparison_url?: string + thumbnail_type?: 'image' | 'video' | 'image_comparison' + thumbnail_url?: string + tutorial_url?: string + workflow_id: string + workflow_json: { + [key: string]: unknown + } +} /** * Response indicating whether a Hub username is available. */ export type HubUsernameCheckResponse = { - /** - * Whether the username is available for the caller's workspace. - */ - available: boolean; - /** - * Up to 5 available alternative usernames (only present when unavailable). - */ - suggestions?: Array; - /** - * The username that was checked. - */ - username: string; - /** - * If the username format is invalid, describes the format requirement. - */ - validation_error?: string; -}; + /** + * Whether the username is available for the caller's workspace. + */ + available: boolean + /** + * Up to 5 available alternative usernames (only present when unavailable). + */ + suggestions?: Array + /** + * The username that was checked. + */ + username: string + /** + * If the username format is invalid, describes the format requirement. + */ + validation_error?: string +} /** * Full public profile for a Hub creator. */ export type HubProfile = { - /** - * Public URL of the profile avatar image. - */ - avatar_url?: string; - description?: string; - display_name?: string; - username: string; - /** - * List of website URLs. - */ - website_urls?: Array; -}; + /** + * Public URL of the profile avatar image. + */ + avatar_url?: string + description?: string + display_name?: string + username: string + /** + * List of website URLs. + */ + website_urls?: Array +} /** * List of available Hub labels for categorizing workflows. */ export type HubLabelListResponse = { - /** - * Available labels filtered by type (or all if no type specified). - */ - labels: Array; -}; + /** + * Available labels filtered by type (or all if no type specified). + */ + labels: Array +} /** * Metadata for a single Hub label. */ export type HubLabelInfo = { - /** - * Optional description of the label. - */ - description?: string; - /** - * Human-readable display name. - */ - display_name: string; - /** - * Slug identifier. - */ - name: string; - /** - * Label category. - */ - type: 'tag' | 'model' | 'custom_node'; -}; + /** + * Optional description of the label. + */ + description?: string + /** + * Human-readable display name. + */ + display_name: string + /** + * Slug identifier. + */ + name: string + /** + * Label category. + */ + type: 'tag' | 'model' | 'custom_node' +} /** * Response containing a signed upload URL and the target asset path. */ export type HubAssetUploadUrlResponse = { - /** - * The public URL where the file will be accessible after upload. - */ - public_url: string; - /** - * Signed token to pass in the publish request. Has a server-determined TTL. - */ - token: string; - /** - * Presigned R2 URL for uploading the file via PUT. - */ - upload_url: string; -}; + /** + * The public URL where the file will be accessible after upload. + */ + public_url: string + /** + * Signed token to pass in the publish request. Has a server-determined TTL. + */ + token: string + /** + * Presigned R2 URL for uploading the file via PUT. + */ + upload_url: string +} /** * Request body for requesting a signed upload URL for a Hub asset. */ export type HubAssetUploadUrlRequest = { - /** - * MIME type of the file (e.g. "image/jpeg", "video/mp4"). Validated against a whitelist; the canonical file extension is derived from this value. - * - */ - content_type: string; - /** - * Original filename for display purposes. Not used in the storage key. - */ - filename: string; -}; + /** + * MIME type of the file (e.g. "image/jpeg", "video/mp4"). Validated against a whitelist; the canonical file extension is derived from this value. + * + */ + content_type: string + /** + * Original filename for display purposes. Not used in the storage key. + */ + filename: string +} /** * Execution history response with history array. @@ -2362,80 +2375,80 @@ export type HubAssetUploadUrlRequest = { * */ export type HistoryResponse = { - /** - * Array of history entries ordered by creation time (newest first) - */ - history: Array; -}; + /** + * Array of history entries ordered by creation time (newest first) + */ + history: Array +} /** * History entry with prompt_id and execution data */ export type HistoryEntry = { - /** - * Job creation timestamp (Unix timestamp in milliseconds) - */ - create_time?: number; - /** - * Metadata about the execution and nodes - */ - meta?: { - [key: string]: unknown; - }; - /** - * Output data from execution (generated images, files, etc.) - */ - outputs?: { - [key: string]: unknown; - }; - /** - * Filtered prompt execution data (lightweight format) - */ - prompt?: { - /** - * Additional execution data (workflow removed from extra_pnginfo) - */ - extra_data?: { - [key: string]: unknown; - }; - /** - * Execution priority - */ - priority?: number; - /** - * The prompt ID - */ - prompt_id?: string; - }; - /** - * Unique identifier for this prompt execution - */ - prompt_id: string; - /** - * Execution status and timeline information - */ - status?: { - [key: string]: unknown; - }; - /** - * UUID identifying the workflow graph definition + /** + * Job creation timestamp (Unix timestamp in milliseconds) + */ + create_time?: number + /** + * Metadata about the execution and nodes + */ + meta?: { + [key: string]: unknown + } + /** + * Output data from execution (generated images, files, etc.) + */ + outputs?: { + [key: string]: unknown + } + /** + * Filtered prompt execution data (lightweight format) + */ + prompt?: { + /** + * Additional execution data (workflow removed from extra_pnginfo) */ - workflow_id?: string; -}; + extra_data?: { + [key: string]: unknown + } + /** + * Execution priority + */ + priority?: number + /** + * The prompt ID + */ + prompt_id?: string + } + /** + * Unique identifier for this prompt execution + */ + prompt_id: string + /** + * Execution status and timeline information + */ + status?: { + [key: string]: unknown + } + /** + * UUID identifying the workflow graph definition + */ + workflow_id?: string +} /** * Request to manage history operations */ export type HistoryManageRequest = { - /** - * If true, clear all history for the authenticated user - */ - clear?: boolean; - /** - * Array of job IDs to delete from history - */ - delete?: Array; -}; + /** + * If true, clear all history for the authenticated user + */ + clear?: boolean + /** + * Array of job IDs to delete from history + */ + delete?: Array +} /** * Detailed execution history response for a specific prompt. @@ -2443,220 +2456,220 @@ export type HistoryManageRequest = { * */ export type HistoryDetailResponse = { - [key: string]: HistoryDetailEntry; -}; + [key: string]: HistoryDetailEntry +} /** * History entry with full prompt data */ export type HistoryDetailEntry = { + /** + * Metadata about the execution and nodes + */ + meta?: { + [key: string]: unknown + } + /** + * Output data from execution (generated images, files, etc.) + */ + outputs?: { + [key: string]: unknown + } + /** + * Full prompt execution data + */ + prompt?: { + /** + * Additional execution data + */ + extra_data?: { + [key: string]: unknown + } /** - * Metadata about the execution and nodes + * Output nodes to execute */ - meta?: { - [key: string]: unknown; - }; + outputs_to_execute?: Array /** - * Output data from execution (generated images, files, etc.) + * Execution priority */ - outputs?: { - [key: string]: unknown; - }; + priority?: number /** - * Full prompt execution data + * The workflow nodes */ prompt?: { - /** - * Additional execution data - */ - extra_data?: { - [key: string]: unknown; - }; - /** - * Output nodes to execute - */ - outputs_to_execute?: Array; - /** - * Execution priority - */ - priority?: number; - /** - * The workflow nodes - */ - prompt?: { - [key: string]: unknown; - }; - /** - * The prompt ID - */ - prompt_id?: string; - }; - /** - * Execution status and timeline information - */ - status?: { - [key: string]: unknown; - }; -}; + [key: string]: unknown + } + /** + * The prompt ID + */ + prompt_id?: string + } + /** + * Execution status and timeline information + */ + status?: { + [key: string]: unknown + } +} /** * Metadata for a global subgraph blueprint (without full data) */ export type GlobalSubgraphInfo = { - /** - * The full subgraph JSON data (may be empty in list view) - */ - data?: string; - /** - * Additional information about the subgraph - */ - info: { - /** - * The node pack/module that provides this subgraph - */ - node_pack: string; - }; - /** - * Display name of the subgraph blueprint - */ - name: string; - /** - * Source type of the subgraph - "templates" for workflow templates or "custom_node" for custom node subgraphs - */ - source: string; -}; + /** + * The full subgraph JSON data (may be empty in list view) + */ + data?: string + /** + * Additional information about the subgraph + */ + info: { + /** + * The node pack/module that provides this subgraph + */ + node_pack: string + } + /** + * Display name of the subgraph blueprint + */ + name: string + /** + * Source type of the subgraph - "templates" for workflow templates or "custom_node" for custom node subgraphs + */ + source: string +} /** * Full data for a global subgraph blueprint */ export type GlobalSubgraphData = { - /** - * The full subgraph JSON data as a string - */ - data: string; - /** - * Additional information about the subgraph - */ - info: { - /** - * The node pack/module that provides this subgraph - */ - node_pack: string; - }; - /** - * Display name of the subgraph blueprint - */ - name: string; - /** - * Source type of the subgraph - "templates" for workflow templates or "custom_node" for custom node subgraphs - */ - source: string; -}; + /** + * The full subgraph JSON data as a string + */ + data: string + /** + * Additional information about the subgraph + */ + info: { + /** + * The node pack/module that provides this subgraph + */ + node_pack: string + } + /** + * Display name of the subgraph blueprint + */ + name: string + /** + * Source type of the subgraph - "templates" for workflow templates or "custom_node" for custom node subgraphs + */ + source: string +} /** * Individual file entry within a full user data response. */ export type GetUserDataResponseFullFile = { - /** - * UNIX timestamp of the last modification in milliseconds. - */ - modified?: number; - /** - * File name or path relative to the user directory. - */ - path?: string; - /** - * File size in bytes. - */ - size?: number; -}; + /** + * UNIX timestamp of the last modification in milliseconds. + */ + modified?: number + /** + * File name or path relative to the user directory. + */ + path?: string + /** + * File size in bytes. + */ + size?: number +} /** * List of user data file entries (each with path, size, and modification time) returned when full_info=true. */ -export type GetUserDataResponseFull = Array; +export type GetUserDataResponseFull = Array /** * Request body for forking an existing workflow into the user's account. */ export type ForkWorkflowRequest = { - /** - * Name for the forked workflow - */ - name?: string; - /** - * Version number to fork from - */ - source_version: number; -}; + /** + * Name for the forked workflow + */ + name?: string + /** + * Version number to fork from + */ + source_version: number +} /** * Response after submitting feedback */ export type FeedbackResponse = { - [key: string]: unknown; -}; + [key: string]: unknown +} /** * Request to submit user feedback */ export type FeedbackRequest = { - /** - * The feedback content or message - */ - content?: string; - /** - * Additional metadata about the feedback - */ - metadata?: { - [key: string]: unknown; - }; - /** - * User's rating of ComfyUI Cloud experience (1-5 stars) - */ - rating?: number; - /** - * Type of feedback being submitted - */ - type: 'missing_nodes' | 'general' | 'missing_models'; -}; + /** + * The feedback content or message + */ + content?: string + /** + * Additional metadata about the feedback + */ + metadata?: { + [key: string]: unknown + } + /** + * User's rating of ComfyUI Cloud experience (1-5 stars) + */ + rating?: number + /** + * Type of feedback being submitted + */ + type: 'missing_nodes' | 'general' | 'missing_models' +} /** * Response containing a signed download URL for an exported asset archive. */ export type ExportDownloadUrlResponse = { - /** - * When the signed URL expires - */ - expires_at?: string; - /** - * Signed URL for downloading the export ZIP file - */ - url: string; -}; + /** + * When the signed URL expires + */ + expires_at?: string + /** + * Signed URL for downloading the export ZIP file + */ + url: string +} /** * Response containing the issued Cloud JWT and its expiry. */ export type ExchangeTokenResponse = { - /** - * Token expiration time (RFC 3339) - */ - expires_at: string; - /** - * Permission strings for the role - */ - permissions: Array; - /** - * User's role in the workspace - */ - role: 'owner' | 'member'; - /** - * Cloud JWT token - */ - token: string; - workspace: WorkspaceSummary; -}; + /** + * Token expiration time (RFC 3339) + */ + expires_at: string + /** + * Permission strings for the role + */ + permissions: Array + /** + * User's role in the workspace + */ + role: 'owner' | 'member' + /** + * Cloud JWT token + */ + token: string + workspace: WorkspaceSummary +} /** * Optional request body for the token exchange endpoint. The Firebase JWT @@ -2665,6807 +2678,7016 @@ export type ExchangeTokenResponse = { * */ export type ExchangeTokenRequest = { - /** - * Workspace ID to get token for. Defaults to personal workspace if omitted. - */ - workspace_id?: string; -}; + /** + * Workspace ID to get token for. Defaults to personal workspace if omitted. + */ + workspace_id?: string +} /** * Result of redeeming a desktop login code. */ export type DesktopLoginCodeRedeemResponse = { - /** - * The code is now claimed for the authenticated user. - */ - status: 'redeemed'; -}; + /** + * The code is now claimed for the authenticated user. + */ + status: 'redeemed' +} /** * Request to claim a desktop login code for the authenticated user. */ export type DesktopLoginCodeRedeemRequest = { - /** - * The login code the desktop app placed in the browser URL. - */ - code: string; -}; + /** + * The login code the desktop app placed in the browser URL. + */ + code: string +} /** * Exchange poll result. Pending until the code is redeemed in the browser. */ export type DesktopLoginCodeExchangeResponse = { - /** - * One-time Firebase custom token for the redeeming user. Present only when status is "complete". - */ - custom_token?: string; - /** - * Whether the code has been redeemed yet. - */ - status: 'pending' | 'complete'; -}; + /** + * One-time Firebase custom token for the redeeming user. Present only when status is "complete". + */ + custom_token?: string + /** + * Whether the code has been redeemed yet. + */ + status: 'pending' | 'complete' +} /** * Request to exchange a redeemed login code for a custom token. */ export type DesktopLoginCodeExchangeRequest = { - /** - * The login code returned at creation. - */ - code: string; - /** - * PKCE code verifier matching the challenge supplied at creation. - */ - code_verifier: string; -}; + /** + * The login code returned at creation. + */ + code: string + /** + * PKCE code verifier matching the challenge supplied at creation. + */ + code_verifier: string +} /** * A freshly minted desktop login code and its polling parameters. */ export type DesktopLoginCodeCreateResponse = { - /** - * Opaque single-use login code ("dlc_" prefix). - */ - code: string; - /** - * Seconds until the code expires if not redeemed. - */ - expires_in: number; - /** - * Suggested seconds between exchange polls. - */ - poll_interval: number; -}; + /** + * Opaque single-use login code ("dlc_" prefix). + */ + code: string + /** + * Seconds until the code expires if not redeemed. + */ + expires_in: number + /** + * Suggested seconds between exchange polls. + */ + poll_interval: number +} /** * Request to mint a desktop login code. */ export type DesktopLoginCodeCreateRequest = { - /** - * Desktop app version string. - */ - app_version: string; - /** - * PKCE code challenge - base64url(SHA256(code_verifier)) per RFC 7636 (S256 only). - */ - code_challenge: string; - /** - * Stable identifier of the desktop installation, used only for the login attribution event. Omit when telemetry consent is off - the login flow still works, but no attribution event is emitted. - */ - installation_id?: string; - /** - * Desktop platform identifier (e.g. darwin, win32, linux). - */ - platform: string; -}; + /** + * Desktop app version string. + */ + app_version: string + /** + * PKCE code challenge - base64url(SHA256(code_verifier)) per RFC 7636 (S256 only). + */ + code_challenge: string + /** + * Stable identifier of the desktop installation, used only for the login attribution event. Omit when telemetry consent is off - the login flow still works, but no attribution event is emitted. + */ + installation_id?: string + /** + * Desktop platform identifier (e.g. darwin, win32, linux). + */ + platform: string +} /** * Response after deleting a session cookie */ export type DeleteSessionResponse = { - /** - * Whether the session was deleted successfully - */ - success: boolean; -}; + /** + * Whether the session was deleted successfully + */ + success: boolean +} /** * Request body for creating a new workspace. */ export type CreateWorkspaceRequest = { - /** - * Display name for the workspace - */ - name: string; -}; + /** + * Display name for the workspace + */ + name: string +} /** * Response containing the newly created workspace API key. */ export type CreateWorkspaceApiKeyResponse = { - /** - * When the key was created - */ - created_at: 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; - /** - * When the key expires (if set) - */ - expires_at?: string; - /** - * API key ID - */ - id: string; - /** - * The full plaintext API key (only shown once) - */ - key: string; - /** - * First 8 chars after prefix for display - */ - key_prefix: string; - /** - * User-provided label - */ - name: string; -}; + /** + * When the key was created + */ + created_at: 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 + /** + * When the key expires (if set) + */ + expires_at?: string + /** + * API key ID + */ + id: string + /** + * The full plaintext API key (only shown once) + */ + key: string + /** + * First 8 chars after prefix for display + */ + key_prefix: string + /** + * User-provided label + */ + name: string +} /** * Request body for creating a new workspace-scoped API key. */ export type CreateWorkspaceApiKeyRequest = { - /** - * 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 - */ - expires_at?: string; - /** - * 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 + */ + expires_at?: string + /** + * User-provided label for the key + */ + name: string +} /** * Request body for creating a new version of a saved workflow. */ export type CreateWorkflowVersionRequest = { - /** - * The version number this change is based on (for optimistic concurrency) - */ - base_version: number; - /** - * The updated ComfyUI workflow JSON - */ - workflow_json: { - [key: string]: unknown; - }; -}; + /** + * The version number this change is based on (for optimistic concurrency) + */ + base_version: number + /** + * The updated ComfyUI workflow JSON + */ + workflow_json: { + [key: string]: unknown + } +} /** * Request body for creating a new saved workflow. */ export type CreateWorkflowRequest = { - /** - * Default view mode - */ - default_view?: 'workflow' | 'app'; - /** - * Description of the workflow - */ - description?: string; - /** - * ID of the source workflow if forked - */ - forked_from_workflow_id?: string; - /** - * ID of the source workflow version if forked - */ - forked_from_workflow_version_id?: string; - /** - * Display name for the workflow - */ - name?: string; - /** - * The ComfyUI workflow JSON - */ - workflow_json: { - [key: string]: unknown; - }; -}; + /** + * Default view mode + */ + default_view?: 'workflow' | 'app' + /** + * Description of the workflow + */ + description?: string + /** + * ID of the source workflow if forked + */ + forked_from_workflow_id?: string + /** + * ID of the source workflow version if forked + */ + forked_from_workflow_version_id?: string + /** + * Display name for the workflow + */ + name?: string + /** + * The ComfyUI workflow JSON + */ + workflow_json: { + [key: string]: unknown + } +} /** * Response after successfully purchasing a credit top-up. */ export type CreateTopupResponse = { - /** - * Amount being charged in cents - */ - amount_cents: number; - /** - * Billing operation ID to poll for status via GET /api/billing/ops/{id} - */ - billing_op_id: string; - /** - * Current status of the top-up - */ - status: 'pending' | 'completed' | 'failed'; - /** - * Unique identifier for the top-up request (same as billing_op_id, deprecated) - */ - topup_id: string; -}; + /** + * Amount being charged in cents + */ + amount_cents: number + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string + /** + * Current status of the top-up + */ + status: 'pending' | 'completed' | 'failed' + /** + * Unique identifier for the top-up request (same as billing_op_id, deprecated) + */ + topup_id: string +} /** * Request body for purchasing a one-time credit top-up. */ export type CreateTopupRequest = { - /** - * Amount to charge and grant as credits (in cents). Minimum $5.00. - */ - amount_cents: number; - /** - * Client-provided key to prevent duplicate operations. - * If a billing op with this key already exists, returns the existing op instead of creating a new one. - * - */ - idempotency_key?: string; -}; + /** + * Amount to charge and grant as credits (in cents). Minimum $5.00. + */ + amount_cents: number + /** + * Client-provided key to prevent duplicate operations. + * If a billing op with this key already exists, returns the existing op instead of creating a new one. + * + */ + idempotency_key?: string +} /** - * Response after creating a session cookie - */ -export type CreateSessionResponse = { - /** - * Session expiration time in seconds (5 days) - */ - expiresIn?: number; - /** - * Whether the session was created successfully - */ - success: boolean; -}; + * Response after creating a session cookie + */ +export type CreateSessionResponse = { + /** + * Session expiration time in seconds (5 days) + */ + expiresIn?: number + /** + * Whether the session was created successfully + */ + success: boolean +} /** * Request body for creating a new user secret. */ export type CreateSecretRequest = { - /** - * User-provided label for the secret - */ - name: string; - /** - * Optional provider identifier (e.g., huggingface, civitai) - */ - provider?: string; - /** - * The plaintext secret to encrypt and store - */ - secret_value: string; -}; + /** + * User-provided label for the secret + */ + name: string + /** + * Optional provider identifier (e.g., huggingface, civitai) + */ + provider?: string + /** + * The plaintext secret to encrypt and store + */ + secret_value: string +} /** * Request body for inviting a user to a workspace. */ export type CreateInviteRequest = { - /** - * Email address to invite - */ - email: string; -}; + /** + * Email address to invite + */ + email: string +} /** * Request body for creating a new Hub profile. */ export type CreateHubProfileRequest = { - /** - * Token (from /api/hub/assets/upload-url) for an avatar image. Omit to have no avatar. - * - */ - avatar_token?: string; - description?: string; - display_name?: string; - /** - * Unique URL-safe slug for the hub profile. Immutable after creation. - */ - username: string; - /** - * List of website URLs. - */ - website_urls?: Array; - /** - * ID of the workspace to create the hub profile for. The authenticated user must belong to this workspace. - */ - workspace_id: string; -}; + /** + * Token (from /api/hub/assets/upload-url) for an avatar image. Omit to have no avatar. + * + */ + avatar_token?: string + description?: string + display_name?: string + /** + * Unique URL-safe slug for the hub profile. Immutable after creation. + */ + username: string + /** + * List of website URLs. + */ + website_urls?: Array + /** + * ID of the workspace to create the hub profile for. The authenticated user must belong to this workspace. + */ + workspace_id: string +} /** * Response after successfully cancelling a subscription. */ export type CancelSubscriptionResponse = { - /** - * Billing operation ID to poll for status via GET /api/billing/ops/{id} - */ - billing_op_id: string; - /** - * The date when the subscription will end (end of current billing period) - */ - cancel_at: string; -}; + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string + /** + * The date when the subscription will end (end of current billing period) + */ + cancel_at: string +} /** * Request body for cancelling the current subscription. */ export type CancelSubscriptionRequest = { - /** - * Client-provided key to prevent duplicate operations. - * If a billing op with this key already exists, returns the existing op instead of creating a new one. - * - */ - idempotency_key?: string; -}; + /** + * Client-provided key to prevent duplicate operations. + * If a billing op with this key already exists, returns the existing op instead of creating a new one. + * + */ + idempotency_key?: string +} /** * Response after bulk-revoking API keys for a workspace member. */ export type BulkRevokeApiKeysResponse = { - /** - * Number of API keys that were revoked - */ - revoked_count: number; -}; + /** + * Number of API keys that were revoked + */ + revoked_count: number +} /** * Current billing and subscription status for a workspace. */ export type BillingStatusResponse = { - billing_status?: BillingStatus; - /** - * When the subscription will become inactive (if canceled) - */ - cancel_at?: string; - /** - * Whether the workspace has available credits - */ - has_funds: boolean; - /** - * Whether the workspace has an active subscription - */ - is_active: boolean; - /** - * Plan identifier (e.g., standard-monthly, team-pro-annual) - */ - plan_slug?: string; - /** - * When the current billing period ends and the next one begins - */ - renewal_date?: string; - subscription_duration?: SubscriptionDuration; - /** - * Subscription activity status (scheduled subscriptions are not returned) - */ - subscription_status?: 'active' | 'ended' | 'canceled'; - subscription_tier?: SubscriptionTier; - /** - * The team credit stop the workspace is currently subscribed to, for per-credit Team plans (BE-1254). Lets clients tell apart team subscriptions, which all share subscription_tier=TEAM. Always present; null for personal plans (use subscription_tier to distinguish those) and for legacy team plans without a credit stop. - */ - team_credit_stop: TeamCreditStopSummary | null; -}; + billing_status?: BillingStatus + /** + * When the subscription will become inactive (if canceled) + */ + cancel_at?: string + /** + * Whether the workspace has available credits + */ + has_funds: boolean + /** + * Whether the workspace has an active subscription + */ + is_active: boolean + /** + * Plan identifier (e.g., standard-monthly, team-pro-annual) + */ + plan_slug?: string + /** + * When the current billing period ends and the next one begins + */ + renewal_date?: string + subscription_duration?: SubscriptionDuration + /** + * Subscription activity status (scheduled subscriptions are not returned) + */ + subscription_status?: 'active' | 'ended' | 'canceled' + subscription_tier?: SubscriptionTier + /** + * The team credit stop the workspace is currently subscribed to, for per-credit Team plans (BE-1254). Lets clients tell apart team subscriptions, which all share subscription_tier=TEAM. Always present; null for personal plans (use subscription_tier to distinguish those) and for legacy team plans without a credit stop. + */ + team_credit_stop: TeamCreditStopSummary | null +} /** * Payment lifecycle status */ -export type BillingStatus = 'awaiting_payment_method' | 'pending_payment' | 'paid' | 'payment_failed' | 'inactive'; +export type BillingStatus = + | 'awaiting_payment_method' + | 'pending_payment' + | 'paid' + | 'payment_failed' + | 'inactive' /** * List of available billing plans for subscription. */ export type BillingPlansResponse = { - /** - * Current plan slug if subscribed - */ - current_plan_slug?: string; - plans: Array; - team_credit_stops?: TeamCreditStops; -}; + /** + * Current plan slug if subscribed + */ + current_plan_slug?: string + plans: Array + team_credit_stops?: TeamCreditStops +} /** * Status of an asynchronous billing operation. */ export type BillingOpStatusResponse = { - /** - * When the operation completed (success or failure) - */ - completed_at?: string; - /** - * Error message if status is failed - */ - error_message?: string; - /** - * Unique identifier for the billing operation - */ - id: string; - /** - * When the operation was initiated - */ - started_at: string; - /** - * Current status of the operation - */ - status: 'pending' | 'succeeded' | 'failed'; -}; + /** + * When the operation completed (success or failure) + */ + completed_at?: string + /** + * Error message if status is failed + */ + error_message?: string + /** + * Unique identifier for the billing operation + */ + id: string + /** + * When the operation was initiated + */ + started_at: string + /** + * Current status of the operation + */ + status: 'pending' | 'succeeded' | 'failed' +} /** * Paginated list of billing events for a workspace. */ export type BillingEventsResponse = { - events: Array; - /** - * Items per page - */ - limit: number; - /** - * Current page number (1-indexed) - */ - page: number; - /** - * Total number of events - */ - total: number; - /** - * Total number of pages - */ - totalPages: number; -}; + events: Array + /** + * Items per page + */ + limit: number + /** + * Current page number (1-indexed) + */ + page: number + /** + * Total number of events + */ + total: number + /** + * Total number of pages + */ + totalPages: number +} /** * A single history event. The cloud history-events store is the single source of truth for both billing events (charges, credits, adjustments) and user-facing usage events. */ export type BillingEvent = { - /** - * When the event occurred - */ - createdAt: string; - /** - * Unique event identifier - */ - event_id: string; - /** - * Type of history event. Billing types (e.g. invoice_paid, checkout_completed, topup_completed) and the migrated user-facing usage types (account_created, credit_added, api_usage_completed, cloud_subscription_created, cloud_subscription_paid, cloud_subscription_credit_added, cloud_workflow_executed, free_tier_credit_granted). Kept as a free-form string for back-compat with existing billing-event consumers. - */ - event_type: string; - /** - * Event-specific parameters - */ - params?: { - [key: string]: unknown; - }; -}; + /** + * When the event occurred + */ + createdAt: string + /** + * Unique event identifier + */ + event_id: string + /** + * Type of history event. Billing types (e.g. invoice_paid, checkout_completed, topup_completed) and the migrated user-facing usage types (account_created, credit_added, api_usage_completed, cloud_subscription_created, cloud_subscription_paid, cloud_subscription_credit_added, cloud_workflow_executed, free_tier_credit_granted). Kept as a free-form string for back-compat with existing billing-event consumers. + */ + event_type: string + /** + * Event-specific parameters + */ + params?: { + [key: string]: unknown + } +} /** * Current credit balance and usage details for a workspace. */ export type BillingBalanceResponse = { - /** - * The total remaining balance in microamount (1/1,000,000 of the currency unit) - */ - amount_micros: number; - /** - * The remaining balance from cloud credits in microamount - */ - cloud_credit_balance_micros?: number; - /** - * Currency code - */ - currency: string; - /** - * The effective balance (total balance minus pending charges). Can be negative if pending charges exceed the balance. - */ - effective_balance_micros?: number; - /** - * The total amount of pending/unbilled charges from draft invoices in microamount - */ - pending_charges_micros?: number; - /** - * The remaining balance from prepaid commits in microamount - */ - prepaid_balance_micros?: number; -}; + /** + * The total remaining balance in microamount (1/1,000,000 of the currency unit) + */ + amount_micros: number + /** + * The remaining balance from cloud credits in microamount + */ + cloud_credit_balance_micros?: number + /** + * Currency code + */ + currency: string + /** + * The effective balance (total balance minus pending charges). Can be negative if pending charges exceed the balance. + */ + effective_balance_micros?: number + /** + * The total amount of pending/unbilled charges from draft invoices in microamount + */ + pending_charges_micros?: number + /** + * The remaining balance from prepaid commits in microamount + */ + prepaid_balance_micros?: number +} /** * Response returned when an existing asset is successfully updated. */ export type AssetUpdated = { - /** - * Display name of the asset. Mirrors name for backwards compatibility. - */ - display_name?: string | null; - /** - * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") - */ - file_path?: string | null; - /** - * Blake3 hash of the asset content. - */ - hash?: string; - /** - * Asset ID - */ - id: string; - /** - * ID of the job that created this asset, if available - */ - job_id?: string | null; - /** - * Updated MIME type of the asset - */ - mime_type?: string; - /** - * Updated name of the asset - */ - name?: string; - /** - * Tags associated with the asset - */ - tags?: Array; - /** - * Timestamp of the update - */ - updated_at: string; - /** - * Updated custom metadata - */ - user_metadata?: { - [key: string]: unknown; - }; -}; + /** + * Display name of the asset. Mirrors name for backwards compatibility. + */ + display_name?: string | null + /** + * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") + */ + file_path?: string | null + /** + * Blake3 hash of the asset content. + */ + hash?: string + /** + * Asset ID + */ + id: string + /** + * ID of the job that created this asset, if available + */ + job_id?: string | null + /** + * Updated MIME type of the asset + */ + mime_type?: string + /** + * Updated name of the asset + */ + name?: string + /** + * Tags associated with the asset + */ + tags?: Array + /** + * Timestamp of the update + */ + updated_at: string + /** + * Updated custom metadata + */ + user_metadata?: { + [key: string]: unknown + } +} /** * Histogram of tag counts used for refining asset search results. */ export type AssetTagHistogramResponse = { - /** - * Map of tag names to their occurrence counts on matching assets - */ - tag_counts: { - [key: string]: number; - }; -}; + /** + * Map of tag names to their occurrence counts on matching assets + */ + tag_counts: { + [key: string]: number + } +} /** * Metadata for a remotely hosted asset resolved by URL. */ export type AssetMetadataResponse = { - /** - * Size of the asset in bytes (-1 if unknown) - */ - content_length: number; - /** - * MIME type of the asset - */ - content_type?: string; - /** - * Suggested filename for the asset from source - */ - filename?: string; - /** - * Display name or title for the asset from source - */ - name?: string; - /** - * Preview image as base64-encoded data URL - */ - preview_image?: string; - /** - * Tags for categorization from source - */ - tags?: Array; - /** - * Validation results for the file - */ - validation?: ValidationResult; -}; + /** + * Size of the asset in bytes (-1 if unknown) + */ + content_length: number + /** + * MIME type of the asset + */ + content_type?: string + /** + * Suggested filename for the asset from source + */ + filename?: string + /** + * Display name or title for the asset from source + */ + name?: string + /** + * Preview image as base64-encoded data URL + */ + preview_image?: string + /** + * Tags for categorization from source + */ + tags?: Array + /** + * Validation results for the file + */ + validation?: ValidationResult +} /** * Acknowledgement of an async asset download task; clients poll GET /api/tasks/{task_id} for status. */ export type AssetDownloadResponse = { - /** - * Human-readable message - */ - message?: string; - /** - * Current task status - */ - status: 'created' | 'running' | 'completed' | 'failed'; - /** - * Task ID for tracking download progress via GET /api/tasks/{task_id} - */ - task_id: string; -}; + /** + * Human-readable message + */ + message?: string + /** + * Current task status + */ + status: 'created' | 'running' | 'completed' | 'failed' + /** + * Task ID for tracking download progress via GET /api/tasks/{task_id} + */ + task_id: string +} /** * Response returned when a new asset is successfully created. */ export type AssetCreated = Asset & { - /** - * Whether this was a new asset creation (true) or returned existing (false) - */ - created_new: boolean; -}; + /** + * Whether this was a new asset creation (true) or returned existing (false) + */ + created_new: boolean +} /** * Response returned after successfully accepting a workspace invitation. */ export type AcceptInviteResponse = { - /** - * ID of the workspace joined - */ - workspace_id: string; - /** - * Name of the workspace joined - */ - workspace_name: string; -}; + /** + * ID of the workspace joined + */ + workspace_id: string + /** + * Name of the workspace joined + */ + workspace_name: string +} /** * Paginated list of assets belonging to the authenticated user. */ export type ListAssetsResponseWritable = { - /** - * List of assets matching the query - */ - assets: Array; - /** - * 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; - /** - * Total number of assets matching the filters - */ - total: number; -}; + /** + * List of assets matching the query + */ + assets: Array + /** + * 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 + /** + * Total number of assets matching the filters + */ + total: number +} /** * Represents a user-owned asset (image, video, or other generated output). */ export type AssetWritable = { - /** - * Timestamp when the asset was created - */ - created_at: string; - /** - * Display name of the asset. Mirrors name for backwards compatibility. - */ - display_name?: string | null; - /** - * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") - */ - file_path?: string | null; - /** - * Blake3 hash of the asset content. - */ - hash?: string; - /** - * Unique identifier for the asset - */ - id: string; - /** - * Whether this asset is immutable (cannot be modified or deleted) - */ - is_immutable?: boolean; - /** - * ID of the job that created this asset, if available - */ - job_id?: string | null; - /** - * Timestamp when the asset was last accessed - */ - last_access_time?: string; - /** - * MIME type of the asset - */ - mime_type?: string; - /** - * Name of the asset file - */ - name: string; - /** - * ID of the preview asset if available - */ - preview_id?: string | null; - /** - * URL for asset preview/thumbnail - */ - preview_url?: string; - /** - * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash. - */ - short_url?: string | null; - /** - * Size of the asset in bytes - */ - size?: number; - /** - * Tags associated with the asset - */ - tags?: Array; - /** - * Timestamp when the asset was last updated - */ - updated_at: string; - /** - * Custom user metadata for the asset - */ - user_metadata?: { - [key: string]: unknown; - }; -}; + /** + * Timestamp when the asset was created + */ + created_at: string + /** + * Display name of the asset. Mirrors name for backwards compatibility. + */ + display_name?: string | null + /** + * Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors") + */ + file_path?: string | null + /** + * Blake3 hash of the asset content. + */ + hash?: string + /** + * Unique identifier for the asset + */ + id: string + /** + * Whether this asset is immutable (cannot be modified or deleted) + */ + is_immutable?: boolean + /** + * ID of the job that created this asset, if available + */ + job_id?: string | null + /** + * Timestamp when the asset was last accessed + */ + last_access_time?: string + /** + * MIME type of the asset + */ + mime_type?: string + /** + * Name of the asset file + */ + name: string + /** + * ID of the preview asset if available + */ + preview_id?: string | null + /** + * URL for asset preview/thumbnail + */ + preview_url?: string + /** + * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash. + */ + short_url?: string | null + /** + * Size of the asset in bytes + */ + size?: number + /** + * Tags associated with the asset + */ + tags?: Array + /** + * Timestamp when the asset was last updated + */ + updated_at: string + /** + * Custom user metadata for the asset + */ + user_metadata?: { + [key: string]: unknown + } +} /** * Response returned when a new asset is successfully created. */ export type AssetCreatedWritable = AssetWritable & { - /** - * Whether this was a new asset creation (true) or returned existing (false) - */ - created_new: boolean; -}; + /** + * Whether this was a new asset creation (true) or returned existing (false) + */ + created_new: boolean +} export type GetJwksData = { - body?: never; - path?: never; - query?: never; - url: '/.well-known/jwks.json'; -}; + body?: never + path?: never + query?: never + url: '/.well-known/jwks.json' +} export type GetJwksResponses = { - /** - * JWKS response - */ - 200: JwksResponse; -}; + /** + * JWKS response + */ + 200: JwksResponse +} -export type GetJwksResponse = GetJwksResponses[keyof GetJwksResponses]; +export type GetJwksResponse = GetJwksResponses[keyof GetJwksResponses] export type GetOAuthAuthorizationServerData = { - body?: never; - path?: never; - query?: never; - url: '/.well-known/oauth-authorization-server'; -}; + body?: never + path?: never + query?: never + url: '/.well-known/oauth-authorization-server' +} export type GetOAuthAuthorizationServerErrors = { - /** - * OAuth disabled - */ - 404: ErrorResponse; -}; + /** + * OAuth disabled + */ + 404: ErrorResponse +} -export type GetOAuthAuthorizationServerError = GetOAuthAuthorizationServerErrors[keyof GetOAuthAuthorizationServerErrors]; +export type GetOAuthAuthorizationServerError = + GetOAuthAuthorizationServerErrors[keyof GetOAuthAuthorizationServerErrors] export type GetOAuthAuthorizationServerResponses = { - /** - * Authorization-server metadata - */ - 200: OAuthAuthorizationServerMetadata; -}; + /** + * Authorization-server metadata + */ + 200: OAuthAuthorizationServerMetadata +} -export type GetOAuthAuthorizationServerResponse = GetOAuthAuthorizationServerResponses[keyof GetOAuthAuthorizationServerResponses]; +export type GetOAuthAuthorizationServerResponse = + GetOAuthAuthorizationServerResponses[keyof GetOAuthAuthorizationServerResponses] export type GetOAuthProtectedResourceData = { - body?: never; - path?: never; - query?: never; - url: '/.well-known/oauth-protected-resource'; -}; + body?: never + path?: never + query?: never + url: '/.well-known/oauth-protected-resource' +} export type GetOAuthProtectedResourceErrors = { - /** - * OAuth disabled or no active resource configured - */ - 404: ErrorResponse; -}; + /** + * OAuth disabled or no active resource configured + */ + 404: ErrorResponse +} -export type GetOAuthProtectedResourceError = GetOAuthProtectedResourceErrors[keyof GetOAuthProtectedResourceErrors]; +export type GetOAuthProtectedResourceError = + GetOAuthProtectedResourceErrors[keyof GetOAuthProtectedResourceErrors] export type GetOAuthProtectedResourceResponses = { - /** - * Protected-resource metadata - */ - 200: OAuthProtectedResourceMetadata; -}; + /** + * Protected-resource metadata + */ + 200: OAuthProtectedResourceMetadata +} -export type GetOAuthProtectedResourceResponse = GetOAuthProtectedResourceResponses[keyof GetOAuthProtectedResourceResponses]; +export type GetOAuthProtectedResourceResponse = + GetOAuthProtectedResourceResponses[keyof GetOAuthProtectedResourceResponses] export type GetOAuthProtectedResourceByPathData = { - body?: never; - path: { - /** - * Single-segment resource path without its leading slash (e.g. "mcp"). - */ - resourcePath: string; - }; - query?: never; - url: '/.well-known/oauth-protected-resource/{resourcePath}'; -}; - -export type GetOAuthProtectedResourceByPathErrors = { + body?: never + path: { /** - * OAuth disabled, or no active resource at this path + * Single-segment resource path without its leading slash (e.g. "mcp"). */ - 404: ErrorResponse; -}; + resourcePath: string + } + query?: never + url: '/.well-known/oauth-protected-resource/{resourcePath}' +} + +export type GetOAuthProtectedResourceByPathErrors = { + /** + * OAuth disabled, or no active resource at this path + */ + 404: ErrorResponse +} -export type GetOAuthProtectedResourceByPathError = GetOAuthProtectedResourceByPathErrors[keyof GetOAuthProtectedResourceByPathErrors]; +export type GetOAuthProtectedResourceByPathError = + GetOAuthProtectedResourceByPathErrors[keyof GetOAuthProtectedResourceByPathErrors] export type GetOAuthProtectedResourceByPathResponses = { - /** - * Protected-resource metadata - */ - 200: OAuthProtectedResourceMetadata; -}; + /** + * Protected-resource metadata + */ + 200: OAuthProtectedResourceMetadata +} -export type GetOAuthProtectedResourceByPathResponse = GetOAuthProtectedResourceByPathResponses[keyof GetOAuthProtectedResourceByPathResponses]; +export type GetOAuthProtectedResourceByPathResponse = + GetOAuthProtectedResourceByPathResponses[keyof GetOAuthProtectedResourceByPathResponses] export type GetCustomNodeProxyData = { - body?: never; - path: { - /** - * Custom node HTTP endpoint path being proxied to the CPU-backed worker. - */ - path: string; - }; - query?: never; - url: '/__custom_node_proxy/{path}'; -}; - -export type GetCustomNodeProxyErrors = { - /** - * Unauthorized - */ - 401: unknown; + body?: never + path: { /** - * Path not in allowlist + * Custom node HTTP endpoint path being proxied to the CPU-backed worker. */ - 403: unknown; -}; + path: string + } + query?: never + url: '/__custom_node_proxy/{path}' +} + +export type GetCustomNodeProxyErrors = { + /** + * Unauthorized + */ + 401: unknown + /** + * Path not in allowlist + */ + 403: unknown +} export type GetCustomNodeProxyResponses = { - /** - * Proxied response - */ - 200: unknown; -}; + /** + * Proxied response + */ + 200: unknown +} export type PostCustomNodeProxyData = { - body?: never; - path: { - /** - * Custom node HTTP endpoint path being proxied to the CPU-backed worker. - */ - path: string; - }; - query?: never; - url: '/__custom_node_proxy/{path}'; -}; - -export type PostCustomNodeProxyErrors = { - /** - * Unauthorized - */ - 401: unknown; + body?: never + path: { /** - * Path not in allowlist + * Custom node HTTP endpoint path being proxied to the CPU-backed worker. */ - 403: unknown; -}; + path: string + } + query?: never + url: '/__custom_node_proxy/{path}' +} + +export type PostCustomNodeProxyErrors = { + /** + * Unauthorized + */ + 401: unknown + /** + * Path not in allowlist + */ + 403: unknown +} export type PostCustomNodeProxyResponses = { - /** - * Proxied response - */ - 200: unknown; -}; + /** + * Proxied response + */ + 200: unknown +} export type ListAssetsData = { - body?: never; - path?: never; - query?: { - /** - * Filter assets that have ALL of these tags - */ - include_tags?: Array; - /** - * Exclude assets that have ANY of these tags - */ - exclude_tags?: Array; - /** - * Filter assets where name contains this substring (case-insensitive) - */ - name_contains?: string; - /** - * JSON object for filtering by metadata fields - */ - metadata_filter?: string; - /** - * Maximum number of assets to return (1-500) - */ - limit?: number; - /** - * Number of assets to skip for pagination - */ - offset?: number; - /** - * Field to sort by - */ - sort?: 'name' | 'created_at' | 'updated_at' | 'size' | 'last_access_time'; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - /** - * Whether to include public/shared assets in results - */ - include_public?: boolean; - /** - * Filter assets by exact content hash. - */ - 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'; -}; - -export type ListAssetsErrors = { + body?: never + path?: never + query?: { /** - * Invalid request parameters + * Filter assets that have ALL of these tags */ - 400: ErrorResponse; + include_tags?: Array /** - * Unauthorized + * Exclude assets that have ANY of these tags */ - 401: ErrorResponse; + exclude_tags?: Array /** - * Internal server error + * Filter assets where name contains this substring (case-insensitive) */ - 500: ErrorResponse; -}; - -export type ListAssetsError = ListAssetsErrors[keyof ListAssetsErrors]; - -export type ListAssetsResponses = { + name_contains?: string /** - * Success - Assets returned + * JSON object for filtering by metadata fields */ - 200: ListAssetsResponse; -}; - -export type ListAssetsResponse2 = ListAssetsResponses[keyof ListAssetsResponses]; - -export type CreateAssetData = { - body: { - /** - * The asset file to upload - */ - file: Blob | File; - /** - * Content hash of the file. - */ - hash?: string; - /** - * Optional asset ID for idempotent creation. If provided and asset exists, returns existing asset. - */ - id?: string; - /** - * MIME type of the asset (e.g., "image/png", "video/mp4") - */ - mime_type?: string; - /** - * Display name for the asset - */ - name?: string; - /** - * Optional preview asset ID. If not provided, images will use their own ID as preview. - */ - preview_id?: string; - /** - * JSON-encoded array of freeform tag strings, e.g. '["models","checkpoint"]'. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. - */ - tags?: string; - /** - * Custom JSON metadata as a string - */ - user_metadata?: string; - }; - path?: never; - query?: never; - url: '/api/assets'; -}; - -export type CreateAssetErrors = { + metadata_filter?: string /** - * Invalid request (bad file, invalid content type, etc.) + * Maximum number of assets to return (1-500) */ - 400: ErrorResponse; + limit?: number /** - * Unauthorized + * Number of assets to skip for pagination */ - 401: ErrorResponse; + offset?: number /** - * File too large + * Field to sort by */ - 413: ErrorResponse; + sort?: 'name' | 'created_at' | 'updated_at' | 'size' | 'last_access_time' /** - * Unsupported media type + * Sort order */ - 415: ErrorResponse; + order?: 'asc' | 'desc' /** - * Validation error (e.g., disallowed model_type tag) + * Whether to include public/shared assets in results */ - 422: ErrorResponse; + include_public?: boolean /** - * Internal server error + * Filter assets by exact content hash. */ - 500: ErrorResponse; -}; - -export type CreateAssetError = CreateAssetErrors[keyof CreateAssetErrors]; - -export type CreateAssetResponses = { + hash?: string /** - * Asset already existed for this user (deduplicated by content hash); the - * existing asset is returned with created_new=false. + * 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. * */ - 200: AssetCreated; - /** - * Asset created successfully (created_new=true) - */ - 201: AssetCreated; -}; + after?: string + } + url: '/api/assets' +} -export type CreateAssetResponse = CreateAssetResponses[keyof CreateAssetResponses]; +export type ListAssetsErrors = { + /** + * Invalid request parameters + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListAssetsError = ListAssetsErrors[keyof ListAssetsErrors] -export type DeleteAssetData = { - body?: never; - path: { - /** - * Asset ID - */ - id: string; - }; - query?: never; - url: '/api/assets/{id}'; -}; +export type ListAssetsResponses = { + /** + * Success - Assets returned + */ + 200: ListAssetsResponse +} -export type DeleteAssetErrors = { +export type ListAssetsResponse2 = ListAssetsResponses[keyof ListAssetsResponses] + +export type CreateAssetData = { + body: { /** - * Unauthorized + * The asset file to upload */ - 401: ErrorResponse; + file: Blob | File /** - * Asset not found + * Content hash of the file. */ - 404: ErrorResponse; + hash?: string /** - * Asset cannot be deleted because it is referenced by another resource, e.g. a workflow version (error code: ASSET_IN_USE) + * Optional asset ID for idempotent creation. If provided and asset exists, returns existing asset. */ - 409: ErrorResponse; + id?: string /** - * Internal server error + * MIME type of the asset (e.g., "image/png", "video/mp4") */ - 500: ErrorResponse; -}; - -export type DeleteAssetError = DeleteAssetErrors[keyof DeleteAssetErrors]; - -export type DeleteAssetResponses = { + mime_type?: string + /** + * Display name for the asset + */ + name?: string + /** + * Optional preview asset ID. If not provided, images will use their own ID as preview. + */ + preview_id?: string + /** + * JSON-encoded array of freeform tag strings, e.g. '["models","checkpoint"]'. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. + */ + tags?: string /** - * Asset record deleted successfully + * Custom JSON metadata as a string */ - 204: void; -}; + user_metadata?: string + } + path?: never + query?: never + url: '/api/assets' +} -export type DeleteAssetResponse = DeleteAssetResponses[keyof DeleteAssetResponses]; +export type CreateAssetErrors = { + /** + * Invalid request (bad file, invalid content type, etc.) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * File too large + */ + 413: ErrorResponse + /** + * Unsupported media type + */ + 415: ErrorResponse + /** + * Validation error (e.g., disallowed model_type tag) + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateAssetError = CreateAssetErrors[keyof CreateAssetErrors] -export type GetAssetByIdData = { - body?: never; - path: { - /** - * Asset ID - */ - id: string; - }; - query?: never; - url: '/api/assets/{id}'; -}; +export type CreateAssetResponses = { + /** + * Asset already existed for this user (deduplicated by content hash); the + * existing asset is returned with created_new=false. + * + */ + 200: AssetCreated + /** + * Asset created successfully (created_new=true) + */ + 201: AssetCreated +} + +export type CreateAssetResponse = + CreateAssetResponses[keyof CreateAssetResponses] -export type GetAssetByIdErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; +export type DeleteAssetData = { + body?: never + path: { /** - * Asset not found + * Asset ID */ - 404: ErrorResponse; + id: string + } + query?: never + url: '/api/assets/{id}' +} + +export type DeleteAssetErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Asset not found + */ + 404: ErrorResponse + /** + * Asset cannot be deleted because it is referenced by another resource, e.g. a workflow version (error code: ASSET_IN_USE) + */ + 409: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type DeleteAssetError = DeleteAssetErrors[keyof DeleteAssetErrors] + +export type DeleteAssetResponses = { + /** + * Asset record deleted successfully + */ + 204: void +} + +export type DeleteAssetResponse = + DeleteAssetResponses[keyof DeleteAssetResponses] + +export type GetAssetByIdData = { + body?: never + path: { /** - * Internal server error + * Asset ID */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/assets/{id}' +} -export type GetAssetByIdError = GetAssetByIdErrors[keyof GetAssetByIdErrors]; +export type GetAssetByIdErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Asset not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetAssetByIdError = GetAssetByIdErrors[keyof GetAssetByIdErrors] export type GetAssetByIdResponses = { - /** - * Asset details retrieved successfully - */ - 200: Asset; -}; + /** + * Asset details retrieved successfully + */ + 200: Asset +} -export type GetAssetByIdResponse = GetAssetByIdResponses[keyof GetAssetByIdResponses]; +export type GetAssetByIdResponse = + GetAssetByIdResponses[keyof GetAssetByIdResponses] export type UpdateAssetData = { - body: { - /** - * Updated MIME type of the asset - */ - mime_type?: string; - /** - * New display name for the asset - */ - name?: string; - /** - * Updated preview asset ID - */ - preview_id?: string; - /** - * Updated custom metadata - */ - user_metadata?: { - [key: string]: unknown; - }; - }; - path: { - /** - * Asset ID - */ - id: string; - }; - query?: never; - url: '/api/assets/{id}'; -}; - -export type UpdateAssetErrors = { + body: { /** - * Invalid request — no fields provided, or `preview_id` is the zero UUID - * (`INVALID_PREVIEW_ID`). - * + * Updated MIME type of the asset */ - 400: ErrorResponse; + mime_type?: string /** - * Unauthorized + * New display name for the asset */ - 401: ErrorResponse; + name?: string /** - * Asset not found — returned both when the asset being updated does - * not exist and when `preview_id` does not reference an asset - * accessible to the caller. - * + * Updated preview asset ID + */ + preview_id?: string + /** + * Updated custom metadata */ - 404: ErrorResponse; + user_metadata?: { + [key: string]: unknown + } + } + path: { /** - * Internal server error + * Asset ID */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/assets/{id}' +} -export type UpdateAssetError = UpdateAssetErrors[keyof UpdateAssetErrors]; +export type UpdateAssetErrors = { + /** + * Invalid request — no fields provided, or `preview_id` is the zero UUID + * (`INVALID_PREVIEW_ID`). + * + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Asset not found — returned both when the asset being updated does + * not exist and when `preview_id` does not reference an asset + * accessible to the caller. + * + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type UpdateAssetError = UpdateAssetErrors[keyof UpdateAssetErrors] export type UpdateAssetResponses = { - /** - * Asset updated successfully - */ - 200: AssetUpdated; -}; + /** + * Asset updated successfully + */ + 200: AssetUpdated +} -export type UpdateAssetResponse = UpdateAssetResponses[keyof UpdateAssetResponses]; +export type UpdateAssetResponse = + UpdateAssetResponses[keyof UpdateAssetResponses] export type GetAssetContentData = { - body?: never; - path: { - /** - * Asset ID - */ - id: string; - }; - query?: { - /** - * Content-Disposition for the response: `attachment` (download) or - * `inline` (render in browser). Defaults to `attachment`. - * - */ - disposition?: 'inline' | 'attachment'; - }; - url: '/api/assets/{id}/content'; -}; - -export type GetAssetContentErrors = { + body?: never + path: { /** - * Asset not found + * Asset ID */ - 404: ErrorResponse; + id: string + } + query?: { /** - * Internal server error + * Content-Disposition for the response: `attachment` (download) or + * `inline` (render in browser). Defaults to `attachment`. + * */ - 500: ErrorResponse; -}; + disposition?: 'inline' | 'attachment' + } + url: '/api/assets/{id}/content' +} -export type GetAssetContentError = GetAssetContentErrors[keyof GetAssetContentErrors]; +export type GetAssetContentErrors = { + /** + * Asset not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetAssetContentError = + GetAssetContentErrors[keyof GetAssetContentErrors] export type GetAssetContentResponses = { - /** - * Asset content stream (local runtime streams the bytes directly) - */ - 200: Blob | File; -}; + /** + * Asset content stream (local runtime streams the bytes directly) + */ + 200: Blob | File +} -export type GetAssetContentResponse = GetAssetContentResponses[keyof GetAssetContentResponses]; +export type GetAssetContentResponse = + GetAssetContentResponses[keyof GetAssetContentResponses] export type RemoveAssetTagsData = { - body: { - /** - * Tags to remove from the asset - */ - tags: Array; - }; - path: { - /** - * Asset ID - */ - id: string; - }; - query?: never; - url: '/api/assets/{id}/tags'; -}; - -export type RemoveAssetTagsErrors = { - /** - * Invalid request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; + body: { /** - * Asset not found + * Tags to remove from the asset */ - 404: ErrorResponse; + tags: Array + } + path: { /** - * Validation error (e.g., reserved tag) - */ - 422: ErrorResponse; - /** - * Internal server error + * Asset ID */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/assets/{id}/tags' +} -export type RemoveAssetTagsError = RemoveAssetTagsErrors[keyof RemoveAssetTagsErrors]; +export type RemoveAssetTagsErrors = { + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Asset not found + */ + 404: ErrorResponse + /** + * Validation error (e.g., reserved tag) + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type RemoveAssetTagsError = + RemoveAssetTagsErrors[keyof RemoveAssetTagsErrors] export type RemoveAssetTagsResponses = { - /** - * Tags removed successfully - */ - 200: TagsModificationResponse; -}; + /** + * Tags removed successfully + */ + 200: TagsModificationResponse +} -export type RemoveAssetTagsResponse = RemoveAssetTagsResponses[keyof RemoveAssetTagsResponses]; +export type RemoveAssetTagsResponse = + RemoveAssetTagsResponses[keyof RemoveAssetTagsResponses] export type AddAssetTagsData = { - body: { - /** - * Tags to add to the asset - */ - tags: Array; - }; - path: { - /** - * Asset ID - */ - id: string; - }; - query?: never; - url: '/api/assets/{id}/tags'; -}; - -export type AddAssetTagsErrors = { + body: { /** - * Invalid request + * Tags to add to the asset */ - 400: ErrorResponse; + tags: Array + } + path: { /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Asset not found - */ - 404: ErrorResponse; - /** - * Validation error (e.g., reserved tag) - */ - 422: ErrorResponse; - /** - * Internal server error + * Asset ID */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/assets/{id}/tags' +} -export type AddAssetTagsError = AddAssetTagsErrors[keyof AddAssetTagsErrors]; +export type AddAssetTagsErrors = { + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Asset not found + */ + 404: ErrorResponse + /** + * Validation error (e.g., reserved tag) + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type AddAssetTagsError = AddAssetTagsErrors[keyof AddAssetTagsErrors] export type AddAssetTagsResponses = { - /** - * Tags added successfully - */ - 200: TagsModificationResponse; -}; + /** + * Tags added successfully + */ + 200: TagsModificationResponse +} -export type AddAssetTagsResponse = AddAssetTagsResponses[keyof AddAssetTagsResponses]; +export type AddAssetTagsResponse = + AddAssetTagsResponses[keyof AddAssetTagsResponses] export type CreateAssetDownloadData = { - body: { - /** - * Optional preview asset ID to associate with the downloaded asset - */ - preview_id?: string; - /** - * URL of the file to download (must be from huggingface.co, civitai.com, or civitai.red) - */ - source_url: string; - /** - * Optional tags for the asset (e.g., ["model", "checkpoint"]) - */ - tags?: Array; - /** - * Optional user-defined metadata to attach to the asset - */ - user_metadata?: { - [key: string]: unknown; - }; - }; - path?: never; - query?: never; - url: '/api/assets/download'; -}; - -export type CreateAssetDownloadErrors = { + body: { /** - * Invalid URL or unsupported source + * Optional preview asset ID to associate with the downloaded asset */ - 400: ErrorResponse; + preview_id?: string /** - * Unauthorized + * URL of the file to download (must be from huggingface.co, civitai.com, or civitai.red) */ - 401: ErrorResponse; + source_url: string /** - * Validation errors + * Optional tags for the asset (e.g., ["model", "checkpoint"]) */ - 422: ErrorResponse; + tags?: Array /** - * Internal server error + * Optional user-defined metadata to attach to the asset */ - 500: ErrorResponse; -}; + user_metadata?: { + [key: string]: unknown + } + } + path?: never + query?: never + url: '/api/assets/download' +} -export type CreateAssetDownloadError = CreateAssetDownloadErrors[keyof CreateAssetDownloadErrors]; +export type CreateAssetDownloadErrors = { + /** + * Invalid URL or unsupported source + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Validation errors + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateAssetDownloadError = + CreateAssetDownloadErrors[keyof CreateAssetDownloadErrors] export type CreateAssetDownloadResponses = { + /** + * File already exists in storage - asset created/returned immediately + */ + 200: AssetCreated + /** + * Accepted - Download task created and processing in background + */ + 202: AssetDownloadResponse +} + +export type CreateAssetDownloadResponse = + CreateAssetDownloadResponses[keyof CreateAssetDownloadResponses] + +export type CreateAssetExportData = { + body: { /** - * File already exists in storage - asset created/returned immediately + * Asset IDs to include in the ZIP bundle. Supports input, output, and available temp assets. Additive to output assets associated with provided job IDs. */ - 200: AssetCreated; + asset_ids?: Array /** - * Accepted - Download task created and processing in background + * When true, preview assets attached to the provided job_ids are included in the export. No effect on asset_ids. Preview assets are placed under a `previews/` subfolder in group-by-job layouts. */ - 202: AssetDownloadResponse; -}; - -export type CreateAssetDownloadResponse = CreateAssetDownloadResponses[keyof CreateAssetDownloadResponses]; - -export type CreateAssetExportData = { - body: { - /** - * Asset IDs to include in the ZIP bundle. Supports input, output, and available temp assets. Additive to output assets associated with provided job IDs. - */ - asset_ids?: Array; - /** - * When true, preview assets attached to the provided job_ids are included in the export. No effect on asset_ids. Preview assets are placed under a `previews/` subfolder in group-by-job layouts. - */ - include_previews?: boolean; - /** - * Optional per-job asset name filters. When provided for a job ID, - * only assets whose name matches one of the specified names are included. - * Job IDs present in `job_ids` but absent from this map include their output assets (plus previews when `include_previews` is true). - * - */ - job_asset_name_filters?: { - [key: string]: Array; - }; - /** - * Job IDs whose output assets are included in the ZIP bundle. Preview assets of these jobs are additionally included when `include_previews` is true. - */ - job_ids?: Array; - /** - * Strategy for naming files in the ZIP: - * - group_by_job_id: Group assets by job ID as a parent directory (e.g., "833a1b5c-beab-436a-ae8e-f07e7cd7b2c4/ComfyUI_00001_.png") - * - preserve: Use original asset names, skip duplicates (first one wins) - * - asset_id: Use the asset ID as the filename (e.g., "833a1b5c-beab-436a-ae8e-f07e7cd7b2c4.png") - * - group_by_job_time: Group by job creation timestamp (e.g., "2026-03-26T16-13-00/ComfyUI_00001_.png") - * - */ - naming_strategy?: 'group_by_job_id' | 'preserve' | 'asset_id' | 'group_by_job_time'; - }; - path?: never; - query?: never; - url: '/api/assets/export'; -}; - -export type CreateAssetExportErrors = { + include_previews?: boolean /** - * Invalid request + * Optional per-job asset name filters. When provided for a job ID, + * only assets whose name matches one of the specified names are included. + * Job IDs present in `job_ids` but absent from this map include their output assets (plus previews when `include_previews` is true). + * */ - 400: ErrorResponse; + job_asset_name_filters?: { + [key: string]: Array + } /** - * Unauthorized + * Job IDs whose output assets are included in the ZIP bundle. Preview assets of these jobs are additionally included when `include_previews` is true. */ - 401: ErrorResponse; + job_ids?: Array /** - * Internal server error + * Strategy for naming files in the ZIP: + * - group_by_job_id: Group assets by job ID as a parent directory (e.g., "833a1b5c-beab-436a-ae8e-f07e7cd7b2c4/ComfyUI_00001_.png") + * - preserve: Use original asset names, skip duplicates (first one wins) + * - asset_id: Use the asset ID as the filename (e.g., "833a1b5c-beab-436a-ae8e-f07e7cd7b2c4.png") + * - group_by_job_time: Group by job creation timestamp (e.g., "2026-03-26T16-13-00/ComfyUI_00001_.png") + * */ - 500: ErrorResponse; -}; + naming_strategy?: + | 'group_by_job_id' + | 'preserve' + | 'asset_id' + | 'group_by_job_time' + } + path?: never + query?: never + url: '/api/assets/export' +} -export type CreateAssetExportError = CreateAssetExportErrors[keyof CreateAssetExportErrors]; +export type CreateAssetExportErrors = { + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateAssetExportError = + CreateAssetExportErrors[keyof CreateAssetExportErrors] export type CreateAssetExportResponses = { - /** - * Accepted - Export task created and processing in background - */ - 202: AssetDownloadResponse; -}; + /** + * Accepted - Export task created and processing in background + */ + 202: AssetDownloadResponse +} -export type CreateAssetExportResponse = CreateAssetExportResponses[keyof CreateAssetExportResponses]; +export type CreateAssetExportResponse = + CreateAssetExportResponses[keyof CreateAssetExportResponses] export type DownloadExportData = { - body?: never; - path: { - /** - * Export filename with extension (e.g., "021e55cd-9785-4ac7-ac39-f4010138e3bc.zip") - */ - exportName: string; - }; - query?: never; - url: '/api/assets/exports/{exportName}'; -}; - -export type DownloadExportErrors = { - /** - * Invalid export name - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; + body?: never + path: { /** - * Export not found or not owned by user + * Export filename with extension (e.g., "021e55cd-9785-4ac7-ac39-f4010138e3bc.zip") */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + exportName: string + } + query?: never + url: '/api/assets/exports/{exportName}' +} -export type DownloadExportError = DownloadExportErrors[keyof DownloadExportErrors]; +export type DownloadExportErrors = { + /** + * Invalid export name + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Export not found or not owned by user + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type DownloadExportError = + DownloadExportErrors[keyof DownloadExportErrors] export type DownloadExportResponses = { - /** - * Signed URL for downloading the export - */ - 200: ExportDownloadUrlResponse; -}; + /** + * Signed URL for downloading the export + */ + 200: ExportDownloadUrlResponse +} -export type DownloadExportResponse = DownloadExportResponses[keyof DownloadExportResponses]; +export type DownloadExportResponse = + DownloadExportResponses[keyof DownloadExportResponses] export type CreateAssetFromHashData = { - body: { - /** - * Blake3 content hash of the existing asset (blake3: prefix) - */ - hash: string; - /** - * MIME type of the asset (e.g., "image/png", "video/mp4") - */ - mime_type?: string; - /** - * Display name for the asset reference (optional) - */ - name?: string; - /** - * Freeform tags for the asset. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. - */ - tags: Array; - /** - * Custom metadata for this asset reference - */ - user_metadata?: { - [key: string]: unknown; - }; - }; - path?: never; - query?: never; - url: '/api/assets/from-hash'; -}; - -export type CreateAssetFromHashErrors = { + body: { /** - * Invalid request (bad hash format, invalid tags, etc.) + * Blake3 content hash of the existing asset (blake3: prefix) */ - 400: ErrorResponse; + hash: string /** - * Unauthorized + * MIME type of the asset (e.g., "image/png", "video/mp4") */ - 401: ErrorResponse; + mime_type?: string /** - * Source asset with given hash not found + * Display name for the asset reference (optional) */ - 404: ErrorResponse; + name?: string /** - * Validation error (e.g., disallowed model_type tag) + * Freeform tags for the asset. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. */ - 422: ErrorResponse; + tags: Array /** - * Internal server error + * Custom metadata for this asset reference */ - 500: ErrorResponse; -}; + user_metadata?: { + [key: string]: unknown + } + } + path?: never + query?: never + url: '/api/assets/from-hash' +} -export type CreateAssetFromHashError = CreateAssetFromHashErrors[keyof CreateAssetFromHashErrors]; +export type CreateAssetFromHashErrors = { + /** + * Invalid request (bad hash format, invalid tags, etc.) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Source asset with given hash not found + */ + 404: ErrorResponse + /** + * Validation error (e.g., disallowed model_type tag) + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateAssetFromHashError = + CreateAssetFromHashErrors[keyof CreateAssetFromHashErrors] export type CreateAssetFromHashResponses = { - /** - * Asset reference already existed for this user (deduplicated by content - * hash); the existing asset is returned with created_new=false. - * - */ - 200: AssetCreated; - /** - * Asset reference created successfully (created_new=true) - */ - 201: AssetCreated; -}; - -export type CreateAssetFromHashResponse = CreateAssetFromHashResponses[keyof CreateAssetFromHashResponses]; + /** + * Asset reference already existed for this user (deduplicated by content + * hash); the existing asset is returned with created_new=false. + * + */ + 200: AssetCreated + /** + * Asset reference created successfully (created_new=true) + */ + 201: AssetCreated +} + +export type CreateAssetFromHashResponse = + CreateAssetFromHashResponses[keyof CreateAssetFromHashResponses] export type PostAssetsFromWorkflowData = { - body: WorkflowApiAssetsRequest; - path?: never; - query?: never; - url: '/api/assets/from-workflow'; -}; + body: WorkflowApiAssetsRequest + path?: never + query?: never + url: '/api/assets/from-workflow' +} export type PostAssetsFromWorkflowErrors = { - /** - * Bad request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Not found - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type PostAssetsFromWorkflowError = PostAssetsFromWorkflowErrors[keyof PostAssetsFromWorkflowErrors]; + /** + * Bad request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type PostAssetsFromWorkflowError = + PostAssetsFromWorkflowErrors[keyof PostAssetsFromWorkflowErrors] export type PostAssetsFromWorkflowResponses = { - /** - * Success - */ - 200: WorkflowApiAssetsResponse; -}; + /** + * Success + */ + 200: WorkflowApiAssetsResponse +} -export type PostAssetsFromWorkflowResponse = PostAssetsFromWorkflowResponses[keyof PostAssetsFromWorkflowResponses]; +export type PostAssetsFromWorkflowResponse = + PostAssetsFromWorkflowResponses[keyof PostAssetsFromWorkflowResponses] export type CheckAssetByHashData = { - body?: never; - path: { - /** - * Blake3 hash of the asset in format 'blake3:hex_digest' - */ - hash: string; - }; - query?: never; - url: '/api/assets/hash/{hash}'; -}; - -export type CheckAssetByHashErrors = { - /** - * Invalid hash format - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; + body?: never + path: { /** - * Asset not found + * Blake3 hash of the asset in format 'blake3:hex_digest' */ - 404: unknown; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + hash: string + } + query?: never + url: '/api/assets/hash/{hash}' +} -export type CheckAssetByHashError = CheckAssetByHashErrors[keyof CheckAssetByHashErrors]; +export type CheckAssetByHashErrors = { + /** + * Invalid hash format + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Asset not found + */ + 404: unknown + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CheckAssetByHashError = + CheckAssetByHashErrors[keyof CheckAssetByHashErrors] export type CheckAssetByHashResponses = { - /** - * Asset exists - */ - 200: unknown; -}; + /** + * Asset exists + */ + 200: unknown +} export type ImportPublishedAssetsData = { - body: ImportPublishedAssetsRequest; - path?: never; - query?: never; - url: '/api/assets/import'; -}; + body: ImportPublishedAssetsRequest + path?: never + query?: never + url: '/api/assets/import' +} export type ImportPublishedAssetsErrors = { - /** - * Bad request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type ImportPublishedAssetsError = ImportPublishedAssetsErrors[keyof ImportPublishedAssetsErrors]; + /** + * Bad request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ImportPublishedAssetsError = + ImportPublishedAssetsErrors[keyof ImportPublishedAssetsErrors] export type ImportPublishedAssetsResponses = { - /** - * Successfully imported assets - */ - 200: ImportPublishedAssetsResponse; -}; + /** + * Successfully imported assets + */ + 200: ImportPublishedAssetsResponse +} -export type ImportPublishedAssetsResponse2 = ImportPublishedAssetsResponses[keyof ImportPublishedAssetsResponses]; +export type ImportPublishedAssetsResponse2 = + ImportPublishedAssetsResponses[keyof ImportPublishedAssetsResponses] export type PruneAssetsData = { - body?: never; - path?: never; - query?: never; - url: '/api/assets/prune'; -}; + body?: never + path?: never + query?: never + url: '/api/assets/prune' +} export type PruneAssetsResponses = { + /** + * Prune result + */ + 200: { /** - * Prune result + * Number of assets marked as missing */ - 200: { - /** - * Number of assets marked as missing - */ - marked?: number; - status?: string; - }; -}; + marked?: number + status?: string + } +} -export type PruneAssetsResponse = PruneAssetsResponses[keyof PruneAssetsResponses]; +export type PruneAssetsResponse = + PruneAssetsResponses[keyof PruneAssetsResponses] export type GetRemoteAssetMetadataData = { - body?: never; - path?: never; - query: { - /** - * Download URL to retrieve metadata from - */ - url: string; - }; - url: '/api/assets/remote-metadata'; -}; - -export type GetRemoteAssetMetadataErrors = { + body?: never + path?: never + query: { /** - * Invalid URL or missing required parameter + * Download URL to retrieve metadata from */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Failed to retrieve metadata from source - */ - 422: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + url: string + } + url: '/api/assets/remote-metadata' +} -export type GetRemoteAssetMetadataError = GetRemoteAssetMetadataErrors[keyof GetRemoteAssetMetadataErrors]; +export type GetRemoteAssetMetadataErrors = { + /** + * Invalid URL or missing required parameter + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Failed to retrieve metadata from source + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetRemoteAssetMetadataError = + GetRemoteAssetMetadataErrors[keyof GetRemoteAssetMetadataErrors] export type GetRemoteAssetMetadataResponses = { - /** - * Metadata retrieved successfully - */ - 200: AssetMetadataResponse; -}; + /** + * Metadata retrieved successfully + */ + 200: AssetMetadataResponse +} -export type GetRemoteAssetMetadataResponse = GetRemoteAssetMetadataResponses[keyof GetRemoteAssetMetadataResponses]; +export type GetRemoteAssetMetadataResponse = + GetRemoteAssetMetadataResponses[keyof GetRemoteAssetMetadataResponses] export type SeedAssetsData = { - body?: { - /** - * Root folder paths to scan (if omitted, scans all) - */ - roots?: Array; - }; - path?: never; - query?: never; - url: '/api/assets/seed'; -}; - -export type SeedAssetsResponses = { + body?: { /** - * Seed started + * Root folder paths to scan (if omitted, scans all) */ - 200: { - status?: string; - }; -}; + roots?: Array + } + path?: never + query?: never + url: '/api/assets/seed' +} + +export type SeedAssetsResponses = { + /** + * Seed started + */ + 200: { + status?: string + } +} -export type SeedAssetsResponse = SeedAssetsResponses[keyof SeedAssetsResponses]; +export type SeedAssetsResponse = SeedAssetsResponses[keyof SeedAssetsResponses] export type CancelAssetSeedData = { - body?: never; - path?: never; - query?: never; - url: '/api/assets/seed/cancel'; -}; + body?: never + path?: never + query?: never + url: '/api/assets/seed/cancel' +} export type CancelAssetSeedResponses = { - /** - * Scan cancelled - */ - 200: { - status?: string; - }; -}; + /** + * Scan cancelled + */ + 200: { + status?: string + } +} -export type CancelAssetSeedResponse = CancelAssetSeedResponses[keyof CancelAssetSeedResponses]; +export type CancelAssetSeedResponse = + CancelAssetSeedResponses[keyof CancelAssetSeedResponses] export type GetAssetSeedStatusData = { - body?: never; - path?: never; - query?: never; - url: '/api/assets/seed/status'; -}; + body?: never + path?: never + query?: never + url: '/api/assets/seed/status' +} export type GetAssetSeedStatusResponses = { - /** - * Scan progress details (files scanned, total, status, etc.) - */ - 200: { - [key: string]: unknown; - }; -}; + /** + * Scan progress details (files scanned, total, status, etc.) + */ + 200: { + [key: string]: unknown + } +} -export type GetAssetSeedStatusResponse = GetAssetSeedStatusResponses[keyof GetAssetSeedStatusResponses]; +export type GetAssetSeedStatusResponse = + GetAssetSeedStatusResponses[keyof GetAssetSeedStatusResponses] export type GetAssetTagHistogramData = { - body?: never; - path?: never; - query?: { - /** - * Filter assets that have ALL of these tags - */ - include_tags?: Array; - /** - * Exclude assets that have ANY of these tags - */ - exclude_tags?: Array; - /** - * Filter assets where name contains this substring (case-insensitive) - */ - name_contains?: string; - /** - * JSON object for filtering by metadata fields - */ - metadata_filter?: string; - /** - * Maximum number of tags to return (1-1000, default 100) - */ - limit?: number; - /** - * Whether to include public/shared assets in results - */ - include_public?: boolean; - }; - url: '/api/assets/tags/refine'; -}; - -export type GetAssetTagHistogramErrors = { + body?: never + path?: never + query?: { + /** + * Filter assets that have ALL of these tags + */ + include_tags?: Array + /** + * Exclude assets that have ANY of these tags + */ + exclude_tags?: Array + /** + * Filter assets where name contains this substring (case-insensitive) + */ + name_contains?: string /** - * Invalid request parameters + * JSON object for filtering by metadata fields */ - 400: ErrorResponse; + metadata_filter?: string /** - * Unauthorized + * Maximum number of tags to return (1-1000, default 100) */ - 401: ErrorResponse; + limit?: number /** - * Internal server error + * Whether to include public/shared assets in results */ - 500: ErrorResponse; -}; + include_public?: boolean + } + url: '/api/assets/tags/refine' +} -export type GetAssetTagHistogramError = GetAssetTagHistogramErrors[keyof GetAssetTagHistogramErrors]; +export type GetAssetTagHistogramErrors = { + /** + * Invalid request parameters + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetAssetTagHistogramError = + GetAssetTagHistogramErrors[keyof GetAssetTagHistogramErrors] export type GetAssetTagHistogramResponses = { - /** - * Success - Tag histogram returned - */ - 200: AssetTagHistogramResponse; -}; + /** + * Success - Tag histogram returned + */ + 200: AssetTagHistogramResponse +} -export type GetAssetTagHistogramResponse = GetAssetTagHistogramResponses[keyof GetAssetTagHistogramResponses]; +export type GetAssetTagHistogramResponse = + GetAssetTagHistogramResponses[keyof GetAssetTagHistogramResponses] export type CreateDesktopLoginCodeData = { - body: DesktopLoginCodeCreateRequest; - path?: never; - query?: never; - url: '/api/auth/desktop-login-codes'; -}; + body: DesktopLoginCodeCreateRequest + path?: never + query?: never + url: '/api/auth/desktop-login-codes' +} export type CreateDesktopLoginCodeErrors = { - /** - * Invalid request - */ - 400: ErrorResponse; - /** - * Service unavailable - login code store not available - */ - 503: ErrorResponse; -}; - -export type CreateDesktopLoginCodeError = CreateDesktopLoginCodeErrors[keyof CreateDesktopLoginCodeErrors]; + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Service unavailable - login code store not available + */ + 503: ErrorResponse +} + +export type CreateDesktopLoginCodeError = + CreateDesktopLoginCodeErrors[keyof CreateDesktopLoginCodeErrors] export type CreateDesktopLoginCodeResponses = { - /** - * Login code created - */ - 201: DesktopLoginCodeCreateResponse; -}; + /** + * Login code created + */ + 201: DesktopLoginCodeCreateResponse +} -export type CreateDesktopLoginCodeResponse = CreateDesktopLoginCodeResponses[keyof CreateDesktopLoginCodeResponses]; +export type CreateDesktopLoginCodeResponse = + CreateDesktopLoginCodeResponses[keyof CreateDesktopLoginCodeResponses] export type ExchangeDesktopLoginCodeData = { - body: DesktopLoginCodeExchangeRequest; - path?: never; - query?: never; - url: '/api/auth/desktop-login-codes/exchange'; -}; + body: DesktopLoginCodeExchangeRequest + path?: never + query?: never + url: '/api/auth/desktop-login-codes/exchange' +} export type ExchangeDesktopLoginCodeErrors = { - /** - * Invalid request - */ - 400: ErrorResponse; - /** - * Code verifier does not match the challenge - */ - 403: ErrorResponse; - /** - * Unknown, expired, or already-consumed code - */ - 404: ErrorResponse; - /** - * Service unavailable - login code store or token minting not available - */ - 503: ErrorResponse; -}; - -export type ExchangeDesktopLoginCodeError = ExchangeDesktopLoginCodeErrors[keyof ExchangeDesktopLoginCodeErrors]; + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Code verifier does not match the challenge + */ + 403: ErrorResponse + /** + * Unknown, expired, or already-consumed code + */ + 404: ErrorResponse + /** + * Service unavailable - login code store or token minting not available + */ + 503: ErrorResponse +} + +export type ExchangeDesktopLoginCodeError = + ExchangeDesktopLoginCodeErrors[keyof ExchangeDesktopLoginCodeErrors] export type ExchangeDesktopLoginCodeResponses = { - /** - * Pending (not yet redeemed) or complete with a custom token - */ - 200: DesktopLoginCodeExchangeResponse; -}; + /** + * Pending (not yet redeemed) or complete with a custom token + */ + 200: DesktopLoginCodeExchangeResponse +} -export type ExchangeDesktopLoginCodeResponse = ExchangeDesktopLoginCodeResponses[keyof ExchangeDesktopLoginCodeResponses]; +export type ExchangeDesktopLoginCodeResponse = + ExchangeDesktopLoginCodeResponses[keyof ExchangeDesktopLoginCodeResponses] export type RedeemDesktopLoginCodeData = { - body: DesktopLoginCodeRedeemRequest; - path?: never; - query?: never; - url: '/api/auth/desktop-login-codes/redeem'; -}; + body: DesktopLoginCodeRedeemRequest + path?: never + query?: never + url: '/api/auth/desktop-login-codes/redeem' +} export type RedeemDesktopLoginCodeErrors = { - /** - * Unauthorized - authentication required - */ - 401: ErrorResponse; - /** - * Unknown or expired code - */ - 404: ErrorResponse; - /** - * Code already redeemed by a different user - */ - 409: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; - /** - * Service unavailable - login code store not available - */ - 503: ErrorResponse; -}; - -export type RedeemDesktopLoginCodeError = RedeemDesktopLoginCodeErrors[keyof RedeemDesktopLoginCodeErrors]; + /** + * Unauthorized - authentication required + */ + 401: ErrorResponse + /** + * Unknown or expired code + */ + 404: ErrorResponse + /** + * Code already redeemed by a different user + */ + 409: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse + /** + * Service unavailable - login code store not available + */ + 503: ErrorResponse +} + +export type RedeemDesktopLoginCodeError = + RedeemDesktopLoginCodeErrors[keyof RedeemDesktopLoginCodeErrors] export type RedeemDesktopLoginCodeResponses = { - /** - * Code redeemed (or already redeemed by the same user) - */ - 200: DesktopLoginCodeRedeemResponse; -}; + /** + * Code redeemed (or already redeemed by the same user) + */ + 200: DesktopLoginCodeRedeemResponse +} -export type RedeemDesktopLoginCodeResponse = RedeemDesktopLoginCodeResponses[keyof RedeemDesktopLoginCodeResponses]; +export type RedeemDesktopLoginCodeResponse = + RedeemDesktopLoginCodeResponses[keyof RedeemDesktopLoginCodeResponses] export type DeleteSessionData = { - body?: never; - path?: never; - query?: never; - url: '/api/auth/session'; -}; + body?: never + path?: never + query?: never + url: '/api/auth/session' +} export type DeleteSessionErrors = { - /** - * Internal server error - */ - 500: ErrorResponse; -}; + /** + * Internal server error + */ + 500: ErrorResponse +} -export type DeleteSessionError = DeleteSessionErrors[keyof DeleteSessionErrors]; +export type DeleteSessionError = DeleteSessionErrors[keyof DeleteSessionErrors] export type DeleteSessionResponses = { - /** - * Session deleted successfully - */ - 200: DeleteSessionResponse; -}; + /** + * Session deleted successfully + */ + 200: DeleteSessionResponse +} -export type DeleteSessionResponse2 = DeleteSessionResponses[keyof DeleteSessionResponses]; +export type DeleteSessionResponse2 = + DeleteSessionResponses[keyof DeleteSessionResponses] export type CreateSessionData = { - body?: never; - path?: never; - query?: never; - url: '/api/auth/session'; -}; + body?: never + path?: never + query?: never + url: '/api/auth/session' +} export type CreateSessionErrors = { - /** - * Bad request - Invalid or old ID token - */ - 400: ErrorResponse; - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CreateSessionError = CreateSessionErrors[keyof CreateSessionErrors]; + /** + * Bad request - Invalid or old ID token + */ + 400: ErrorResponse + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateSessionError = CreateSessionErrors[keyof CreateSessionErrors] export type CreateSessionResponses = { - /** - * Session created successfully - */ - 200: CreateSessionResponse; -}; + /** + * Session created successfully + */ + 200: CreateSessionResponse +} -export type CreateSessionResponse2 = CreateSessionResponses[keyof CreateSessionResponses]; +export type CreateSessionResponse2 = + CreateSessionResponses[keyof CreateSessionResponses] export type ExchangeTokenData = { - body?: ExchangeTokenRequest; - path?: never; - query?: never; - url: '/api/auth/token'; -}; + body?: ExchangeTokenRequest + path?: never + query?: never + url: '/api/auth/token' +} export type ExchangeTokenErrors = { - /** - * Invalid or expired Firebase JWT - */ - 401: ErrorResponse; - /** - * Workspace not found or user not a member - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type ExchangeTokenError = ExchangeTokenErrors[keyof ExchangeTokenErrors]; + /** + * Invalid or expired Firebase JWT + */ + 401: ErrorResponse + /** + * Workspace not found or user not a member + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ExchangeTokenError = ExchangeTokenErrors[keyof ExchangeTokenErrors] export type ExchangeTokenResponses = { - /** - * Token exchanged successfully - */ - 200: ExchangeTokenResponse; -}; + /** + * Token exchanged successfully + */ + 200: ExchangeTokenResponse +} -export type ExchangeTokenResponse2 = ExchangeTokenResponses[keyof ExchangeTokenResponses]; +export type ExchangeTokenResponse2 = + ExchangeTokenResponses[keyof ExchangeTokenResponses] export type GetBillingBalanceData = { - body?: never; - path?: never; - query?: never; - url: '/api/billing/balance'; -}; + body?: never + path?: never + query?: never + url: '/api/billing/balance' +} export type GetBillingBalanceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type GetBillingBalanceError = GetBillingBalanceErrors[keyof GetBillingBalanceErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetBillingBalanceError = + GetBillingBalanceErrors[keyof GetBillingBalanceErrors] export type GetBillingBalanceResponses = { - /** - * Credit balance - */ - 200: BillingBalanceResponse; -}; + /** + * Credit balance + */ + 200: BillingBalanceResponse +} -export type GetBillingBalanceResponse = GetBillingBalanceResponses[keyof GetBillingBalanceResponses]; +export type GetBillingBalanceResponse = + GetBillingBalanceResponses[keyof GetBillingBalanceResponses] export type GetBillingEventsData = { - body?: never; - path?: never; - query?: { - /** - * Page number (1-indexed) - */ - page?: number; - /** - * Number of events per page - */ - limit?: number; - }; - url: '/api/billing/events'; -}; - -export type GetBillingEventsErrors = { + body?: never + path?: never + query?: { /** - * Unauthorized + * Page number (1-indexed) */ - 401: ErrorResponse; + page?: number /** - * Internal server error + * Number of events per page */ - 500: ErrorResponse; -}; + limit?: number + } + url: '/api/billing/events' +} -export type GetBillingEventsError = GetBillingEventsErrors[keyof GetBillingEventsErrors]; +export type GetBillingEventsErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetBillingEventsError = + GetBillingEventsErrors[keyof GetBillingEventsErrors] export type GetBillingEventsResponses = { - /** - * Paginated billing events - */ - 200: BillingEventsResponse; -}; + /** + * Paginated billing events + */ + 200: BillingEventsResponse +} -export type GetBillingEventsResponse = GetBillingEventsResponses[keyof GetBillingEventsResponses]; +export type GetBillingEventsResponse = + GetBillingEventsResponses[keyof GetBillingEventsResponses] export type GetBillingOpStatusData = { - body?: never; - path: { - /** - * The billing operation ID - */ - id: string; - }; - query?: never; - url: '/api/billing/ops/{id}'; -}; - -export type GetBillingOpStatusErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Billing operation not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The billing operation ID */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/billing/ops/{id}' +} -export type GetBillingOpStatusError = GetBillingOpStatusErrors[keyof GetBillingOpStatusErrors]; +export type GetBillingOpStatusErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Billing operation not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetBillingOpStatusError = + GetBillingOpStatusErrors[keyof GetBillingOpStatusErrors] export type GetBillingOpStatusResponses = { - /** - * Billing operation status - */ - 200: BillingOpStatusResponse; -}; + /** + * Billing operation status + */ + 200: BillingOpStatusResponse +} -export type GetBillingOpStatusResponse = GetBillingOpStatusResponses[keyof GetBillingOpStatusResponses]; +export type GetBillingOpStatusResponse = + GetBillingOpStatusResponses[keyof GetBillingOpStatusResponses] export type GetPaymentPortalData = { - body?: PaymentPortalRequest; - path?: never; - query?: never; - url: '/api/billing/payment-portal'; -}; + body?: PaymentPortalRequest + path?: never + query?: never + url: '/api/billing/payment-portal' +} export type GetPaymentPortalErrors = { - /** - * Bad request (e.g., missing return_url) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type GetPaymentPortalError = GetPaymentPortalErrors[keyof GetPaymentPortalErrors]; + /** + * Bad request (e.g., missing return_url) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetPaymentPortalError = + GetPaymentPortalErrors[keyof GetPaymentPortalErrors] export type GetPaymentPortalResponses = { - /** - * Success - */ - 200: PaymentPortalResponse; -}; + /** + * Success + */ + 200: PaymentPortalResponse +} -export type GetPaymentPortalResponse = GetPaymentPortalResponses[keyof GetPaymentPortalResponses]; +export type GetPaymentPortalResponse = + GetPaymentPortalResponses[keyof GetPaymentPortalResponses] export type GetBillingPlansData = { - body?: never; - path?: never; - query?: never; - url: '/api/billing/plans'; -}; + body?: never + path?: never + query?: never + url: '/api/billing/plans' +} export type GetBillingPlansErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type GetBillingPlansError = GetBillingPlansErrors[keyof GetBillingPlansErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetBillingPlansError = + GetBillingPlansErrors[keyof GetBillingPlansErrors] export type GetBillingPlansResponses = { - /** - * Available plans with pricing - */ - 200: BillingPlansResponse; -}; + /** + * Available plans with pricing + */ + 200: BillingPlansResponse +} -export type GetBillingPlansResponse = GetBillingPlansResponses[keyof GetBillingPlansResponses]; +export type GetBillingPlansResponse = + GetBillingPlansResponses[keyof GetBillingPlansResponses] export type PreviewSubscribeData = { - body: PreviewSubscribeRequest; - path?: never; - query?: never; - url: '/api/billing/preview-subscribe'; -}; + body: PreviewSubscribeRequest + path?: never + query?: never + url: '/api/billing/preview-subscribe' +} export type PreviewSubscribeErrors = { - /** - * Invalid request (e.g., invalid plan slug, seats below minimum) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type PreviewSubscribeError = PreviewSubscribeErrors[keyof PreviewSubscribeErrors]; + /** + * Invalid request (e.g., invalid plan slug, seats below minimum) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type PreviewSubscribeError = + PreviewSubscribeErrors[keyof PreviewSubscribeErrors] export type PreviewSubscribeResponses = { - /** - * Subscription preview - */ - 200: PreviewSubscribeResponse; -}; - -export type PreviewSubscribeResponse2 = PreviewSubscribeResponses[keyof PreviewSubscribeResponses]; + /** + * Subscription preview + */ + 200: PreviewSubscribeResponse +} -export type GetBillingStatusData = { - body?: never; - path?: never; - query?: never; - url: '/api/billing/status'; -}; +export type PreviewSubscribeResponse2 = + PreviewSubscribeResponses[keyof PreviewSubscribeResponses] -export type GetBillingStatusErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Workspace not found - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; +export type GetBillingStatusData = { + body?: never + path?: never + query?: never + url: '/api/billing/status' +} -export type GetBillingStatusError = GetBillingStatusErrors[keyof GetBillingStatusErrors]; +export type GetBillingStatusErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Workspace not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetBillingStatusError = + GetBillingStatusErrors[keyof GetBillingStatusErrors] export type GetBillingStatusResponses = { - /** - * Billing status - */ - 200: BillingStatusResponse; -}; + /** + * Billing status + */ + 200: BillingStatusResponse +} -export type GetBillingStatusResponse = GetBillingStatusResponses[keyof GetBillingStatusResponses]; +export type GetBillingStatusResponse = + GetBillingStatusResponses[keyof GetBillingStatusResponses] export type SubscribeData = { - body: SubscribeRequest; - path?: never; - query?: never; - url: '/api/billing/subscribe'; -}; + body: SubscribeRequest + path?: never + query?: never + url: '/api/billing/subscribe' +} export type SubscribeErrors = { - /** - * Invalid request (e.g., invalid plan slug, incompatible plan) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type SubscribeError = SubscribeErrors[keyof SubscribeErrors]; + /** + * Invalid request (e.g., invalid plan slug, incompatible plan) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type SubscribeError = SubscribeErrors[keyof SubscribeErrors] export type SubscribeResponses = { - /** - * Subscription created or payment method needed - */ - 200: SubscribeResponse; -}; + /** + * Subscription created or payment method needed + */ + 200: SubscribeResponse +} -export type SubscribeResponse2 = SubscribeResponses[keyof SubscribeResponses]; +export type SubscribeResponse2 = SubscribeResponses[keyof SubscribeResponses] export type CancelSubscriptionData = { - body: CancelSubscriptionRequest; - path?: never; - query?: never; - url: '/api/billing/subscription/cancel'; -}; + body: CancelSubscriptionRequest + path?: never + query?: never + url: '/api/billing/subscription/cancel' +} export type CancelSubscriptionErrors = { - /** - * Invalid request (e.g., no active subscription) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CancelSubscriptionError = CancelSubscriptionErrors[keyof CancelSubscriptionErrors]; + /** + * Invalid request (e.g., no active subscription) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CancelSubscriptionError = + CancelSubscriptionErrors[keyof CancelSubscriptionErrors] export type CancelSubscriptionResponses = { - /** - * Subscription cancellation scheduled - */ - 200: CancelSubscriptionResponse; -}; + /** + * Subscription cancellation scheduled + */ + 200: CancelSubscriptionResponse +} -export type CancelSubscriptionResponse2 = CancelSubscriptionResponses[keyof CancelSubscriptionResponses]; +export type CancelSubscriptionResponse2 = + CancelSubscriptionResponses[keyof CancelSubscriptionResponses] export type ResubscribeData = { - body: ResubscribeRequest; - path?: never; - query?: never; - url: '/api/billing/subscription/resubscribe'; -}; + body: ResubscribeRequest + path?: never + query?: never + url: '/api/billing/subscription/resubscribe' +} export type ResubscribeErrors = { - /** - * Invalid request (e.g., no active subscription, not in cancellation grace period) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type ResubscribeError = ResubscribeErrors[keyof ResubscribeErrors]; + /** + * Invalid request (e.g., no active subscription, not in cancellation grace period) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ResubscribeError = ResubscribeErrors[keyof ResubscribeErrors] export type ResubscribeResponses = { - /** - * Subscription resumed successfully - */ - 200: ResubscribeResponse; -}; + /** + * Subscription resumed successfully + */ + 200: ResubscribeResponse +} -export type ResubscribeResponse2 = ResubscribeResponses[keyof ResubscribeResponses]; +export type ResubscribeResponse2 = + ResubscribeResponses[keyof ResubscribeResponses] export type CreateTopupData = { - body: CreateTopupRequest; - path?: never; - query?: never; - url: '/api/billing/topup'; -}; + body: CreateTopupRequest + path?: never + query?: never + url: '/api/billing/topup' +} export type CreateTopupErrors = { - /** - * Bad request (invalid amount, no payment method) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CreateTopupError = CreateTopupErrors[keyof CreateTopupErrors]; + /** + * Bad request (invalid amount, no payment method) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateTopupError = CreateTopupErrors[keyof CreateTopupErrors] export type CreateTopupResponses = { - /** - * Top-up initiated successfully - */ - 200: CreateTopupResponse; -}; + /** + * Top-up initiated successfully + */ + 200: CreateTopupResponse +} -export type CreateTopupResponse2 = CreateTopupResponses[keyof CreateTopupResponses]; +export type CreateTopupResponse2 = + CreateTopupResponses[keyof CreateTopupResponses] export type GetEmbeddingsData = { - body?: never; - path?: never; - query?: never; - url: '/api/embeddings'; -}; + body?: never + path?: never + query?: never + url: '/api/embeddings' +} export type GetEmbeddingsResponses = { - /** - * Embedding names - */ - 200: Array; -}; + /** + * Embedding names + */ + 200: Array +} -export type GetEmbeddingsResponse = GetEmbeddingsResponses[keyof GetEmbeddingsResponses]; +export type GetEmbeddingsResponse = + GetEmbeddingsResponses[keyof GetEmbeddingsResponses] export type GetModelFoldersData = { - body?: never; - path?: never; - query?: never; - url: '/api/experiment/models'; -}; + body?: never + path?: never + query?: never + url: '/api/experiment/models' +} export type GetModelFoldersErrors = { - /** - * Internal server error - */ - 500: ErrorResponse; -}; + /** + * Internal server error + */ + 500: ErrorResponse +} -export type GetModelFoldersError = GetModelFoldersErrors[keyof GetModelFoldersErrors]; +export type GetModelFoldersError = + GetModelFoldersErrors[keyof GetModelFoldersErrors] export type GetModelFoldersResponses = { - /** - * Success - List of model folders - */ - 200: Array; -}; + /** + * Success - List of model folders + */ + 200: Array +} -export type GetModelFoldersResponse = GetModelFoldersResponses[keyof GetModelFoldersResponses]; +export type GetModelFoldersResponse = + GetModelFoldersResponses[keyof GetModelFoldersResponses] export type GetModelsInFolderData = { - body?: never; - path: { - /** - * The folder name to list models from - */ - folder: string; - }; - query?: never; - url: '/api/experiment/models/{folder}'; -}; - -export type GetModelsInFolderErrors = { + body?: never + path: { /** - * Folder not found or no models in folder + * The folder name to list models from */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + folder: string + } + query?: never + url: '/api/experiment/models/{folder}' +} -export type GetModelsInFolderError = GetModelsInFolderErrors[keyof GetModelsInFolderErrors]; +export type GetModelsInFolderErrors = { + /** + * Folder not found or no models in folder + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetModelsInFolderError = + GetModelsInFolderErrors[keyof GetModelsInFolderErrors] export type GetModelsInFolderResponses = { - /** - * Success - List of models in the folder - */ - 200: Array; -}; + /** + * Success - List of models in the folder + */ + 200: Array +} -export type GetModelsInFolderResponse = GetModelsInFolderResponses[keyof 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 = { + body?: never + path: { + /** + * The folder name containing the model. + */ + folder: string + /** + * The path index (usually 0 for cloud service). + */ + path_index: number /** - * Preview not available on Cloud + * The model filename (with or without .webp extension). */ - 404: unknown; -}; + 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 GetNodeInfoSchemaData = { - body?: never; - path?: never; - query?: never; - url: '/api/experiment/nodes'; -}; + body?: never + path?: never + query?: never + url: '/api/experiment/nodes' +} export type GetNodeInfoSchemaResponses = { - /** - * Full node schema JSON - */ - 200: unknown; -}; + /** + * Full node schema JSON + */ + 200: unknown +} export type GetNodeByIdData = { - body?: never; - path: { - /** - * Node class_type identifier - */ - id: string; - }; - query?: never; - url: '/api/experiment/nodes/{id}'; -}; - -export type GetNodeByIdErrors = { + body?: never + path: { /** - * Node not found + * Node class_type identifier */ - 404: unknown; -}; + id: string + } + query?: never + url: '/api/experiment/nodes/{id}' +} + +export type GetNodeByIdErrors = { + /** + * Node not found + */ + 404: unknown +} export type GetNodeByIdResponses = { - /** - * Node definition JSON - */ - 200: unknown; -}; + /** + * Node definition JSON + */ + 200: unknown +} export type GetExtensionsData = { - body?: never; - path?: never; - query?: never; - url: '/api/extensions'; -}; + body?: never + path?: never + query?: never + url: '/api/extensions' +} export type GetExtensionsResponses = { - /** - * URL paths (relative to web root) of available extension JS files - */ - 200: Array; -}; + /** + * URL paths (relative to web root) of available extension JS files + */ + 200: Array +} -export type GetExtensionsResponse = GetExtensionsResponses[keyof GetExtensionsResponses]; +export type GetExtensionsResponse = + GetExtensionsResponses[keyof GetExtensionsResponses] export type GetFeaturesData = { - body?: never; - path?: never; - query?: never; - url: '/api/features'; -}; + body?: never + path?: never + query?: never + url: '/api/features' +} export type GetFeaturesResponses = { + /** + * Success + */ + 200: { + /** + * Maximum upload size in bytes + */ + max_upload_size?: number /** - * Success + * Whether the server supports preview metadata */ - 200: { - /** - * Maximum upload size in bytes - */ - max_upload_size?: number; - /** - * Whether the server supports preview metadata - */ - supports_preview_metadata?: boolean; - [key: string]: unknown | number | boolean | undefined; - }; -}; + supports_preview_metadata?: boolean + [key: string]: unknown | number | boolean | undefined + } +} -export type GetFeaturesResponse = GetFeaturesResponses[keyof GetFeaturesResponses]; +export type GetFeaturesResponse = + GetFeaturesResponses[keyof GetFeaturesResponses] export type SubmitFeedbackData = { - body: FeedbackRequest; - path?: never; - query?: never; - url: '/api/feedback'; -}; + body: FeedbackRequest + path?: never + query?: never + url: '/api/feedback' +} export type SubmitFeedbackErrors = { - /** - * Invalid request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type SubmitFeedbackError = SubmitFeedbackErrors[keyof SubmitFeedbackErrors]; + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type SubmitFeedbackError = + SubmitFeedbackErrors[keyof SubmitFeedbackErrors] export type SubmitFeedbackResponses = { - /** - * Feedback submitted successfully - */ - 201: FeedbackResponse; -}; + /** + * Feedback submitted successfully + */ + 201: FeedbackResponse +} -export type SubmitFeedbackResponse = SubmitFeedbackResponses[keyof SubmitFeedbackResponses]; +export type SubmitFeedbackResponse = + SubmitFeedbackResponses[keyof SubmitFeedbackResponses] export type GetMaskLayersData = { - body?: never; - path?: never; - query: { - /** - * Hash filename of any mask layer file - */ - filename: string; - }; - url: '/api/files/mask-layers'; -}; - -export type GetMaskLayersErrors = { + body?: never + path?: never + query: { /** - * File not found or not a mask file + * Hash filename of any mask layer file */ - 404: ErrorResponse; -}; + filename: string + } + url: '/api/files/mask-layers' +} -export type GetMaskLayersError = GetMaskLayersErrors[keyof GetMaskLayersErrors]; +export type GetMaskLayersErrors = { + /** + * File not found or not a mask file + */ + 404: ErrorResponse +} + +export type GetMaskLayersError = GetMaskLayersErrors[keyof GetMaskLayersErrors] export type GetMaskLayersResponses = { + /** + * Success - Related mask layers returned + */ + 200: { + /** + * Filename of the mask layer + */ + mask?: string | null /** - * Success - Related mask layers returned - */ - 200: { - /** - * Filename of the mask layer - */ - mask?: string | null; - /** - * Filename of the paint strokes layer - */ - paint?: string | null; - /** - * Filename of the painted image layer - */ - painted?: string | null; - /** - * Filename of the final composite layer - */ - painted_masked?: string | null; - }; -}; - -export type GetMaskLayersResponse = GetMaskLayersResponses[keyof GetMaskLayersResponses]; + * Filename of the paint strokes layer + */ + paint?: string | null + /** + * Filename of the painted image layer + */ + painted?: string | null + /** + * Filename of the final composite layer + */ + painted_masked?: string | null + } +} -export type FreeMemoryData = { - body?: { - /** - * Run garbage collection and free cached memory - */ - free_memory?: boolean; - /** - * Unload all models from VRAM/RAM - */ - unload_models?: boolean; - }; - path?: never; - query?: never; - url: '/api/free'; -}; +export type GetMaskLayersResponse = + GetMaskLayersResponses[keyof GetMaskLayersResponses] -export type FreeMemoryResponses = { +export type FreeMemoryData = { + body?: { /** - * Memory freed + * Run garbage collection and free cached memory */ - 200: unknown; -}; + free_memory?: boolean + /** + * Unload all models from VRAM/RAM + */ + unload_models?: boolean + } + path?: never + query?: never + url: '/api/free' +} + +export type FreeMemoryResponses = { + /** + * Memory freed + */ + 200: unknown +} export type GetGlobalSubgraphsData = { - body?: never; - path?: never; - query?: never; - url: '/api/global_subgraphs'; -}; + body?: never + path?: never + query?: never + url: '/api/global_subgraphs' +} export type GetGlobalSubgraphsErrors = { - /** - * Internal server error - */ - 500: ErrorResponse; -}; + /** + * Internal server error + */ + 500: ErrorResponse +} -export type GetGlobalSubgraphsError = GetGlobalSubgraphsErrors[keyof GetGlobalSubgraphsErrors]; +export type GetGlobalSubgraphsError = + GetGlobalSubgraphsErrors[keyof GetGlobalSubgraphsErrors] export type GetGlobalSubgraphsResponses = { - /** - * Success - Map of subgraph IDs to their metadata - */ - 200: { - [key: string]: GlobalSubgraphInfo; - }; -}; + /** + * Success - Map of subgraph IDs to their metadata + */ + 200: { + [key: string]: GlobalSubgraphInfo + } +} -export type GetGlobalSubgraphsResponse = GetGlobalSubgraphsResponses[keyof GetGlobalSubgraphsResponses]; +export type GetGlobalSubgraphsResponse = + GetGlobalSubgraphsResponses[keyof GetGlobalSubgraphsResponses] export type GetGlobalSubgraphData = { - body?: never; - path: { - /** - * The unique identifier of the subgraph blueprint - */ - id: string; - }; - query?: never; - url: '/api/global_subgraphs/{id}'; -}; - -export type GetGlobalSubgraphErrors = { - /** - * Subgraph not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The unique identifier of the subgraph blueprint */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/global_subgraphs/{id}' +} -export type GetGlobalSubgraphError = GetGlobalSubgraphErrors[keyof GetGlobalSubgraphErrors]; +export type GetGlobalSubgraphErrors = { + /** + * Subgraph not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetGlobalSubgraphError = + GetGlobalSubgraphErrors[keyof GetGlobalSubgraphErrors] export type GetGlobalSubgraphResponses = { - /** - * Success - Full subgraph data - */ - 200: GlobalSubgraphData; -}; + /** + * Success - Full subgraph data + */ + 200: GlobalSubgraphData +} -export type GetGlobalSubgraphResponse = GetGlobalSubgraphResponses[keyof GetGlobalSubgraphResponses]; +export type GetGlobalSubgraphResponse = + GetGlobalSubgraphResponses[keyof GetGlobalSubgraphResponses] export type GetLegacyHistoryData = { - body?: never; - path?: never; - query?: never; - url: '/api/history'; -}; + body?: never + path?: never + query?: never + url: '/api/history' +} export type GetLegacyHistoryErrors = { - /** - * Not Found — use /api/history_v2 instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/history_v2 instead + */ + 404: unknown +} export type ManageHistoryData = { - body: HistoryManageRequest; - path?: never; - query?: never; - url: '/api/history'; -}; + body: HistoryManageRequest + path?: never + query?: never + url: '/api/history' +} export type ManageHistoryErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse; - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type ManageHistoryError = ManageHistoryErrors[keyof ManageHistoryErrors]; + /** + * Invalid request parameters + */ + 400: ErrorResponse + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ManageHistoryError = ManageHistoryErrors[keyof ManageHistoryErrors] export type ManageHistoryResponses = { - /** - * Success - History management operation completed - */ - 200: unknown; -}; + /** + * Success - History management operation completed + */ + 200: unknown +} export type GetLegacyHistoryByIdData = { - body?: never; - path: { - prompt_id: string; - }; - query?: never; - url: '/api/history/{prompt_id}'; -}; + body?: never + path: { + prompt_id: string + } + query?: never + url: '/api/history/{prompt_id}' +} export type GetLegacyHistoryByIdErrors = { - /** - * Not Found — use /api/jobs/{prompt_id} instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/jobs/{prompt_id} instead + */ + 404: unknown +} export type GetHistoryData = { - body?: never; - path?: never; - query?: { - /** - * Maximum number of items to return - */ - max_items?: number; - /** - * Starting position (default 0) - */ - offset?: number; - }; - url: '/api/history_v2'; -}; - -export type GetHistoryErrors = { + body?: never + path?: never + query?: { /** - * Unauthorized - Authentication required + * Maximum number of items to return */ - 401: ErrorResponse; + max_items?: number /** - * Internal server error + * Starting position (default 0) */ - 500: ErrorResponse; -}; + offset?: number + } + url: '/api/history_v2' +} -export type GetHistoryError = GetHistoryErrors[keyof GetHistoryErrors]; +export type GetHistoryErrors = { + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetHistoryError = GetHistoryErrors[keyof GetHistoryErrors] export type GetHistoryResponses = { - /** - * Success - Execution history retrieved - */ - 200: HistoryResponse; -}; + /** + * Success - Execution history retrieved + */ + 200: HistoryResponse +} -export type GetHistoryResponse = GetHistoryResponses[keyof GetHistoryResponses]; +export type GetHistoryResponse = GetHistoryResponses[keyof GetHistoryResponses] export type GetHistoryForPromptData = { - body?: never; - path: { - /** - * The prompt ID to retrieve history for - */ - prompt_id: string; - }; - query?: never; - url: '/api/history_v2/{prompt_id}'; -}; - -export type GetHistoryForPromptErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse; - /** - * Prompt not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The prompt ID to retrieve history for */ - 500: ErrorResponse; -}; + prompt_id: string + } + query?: never + url: '/api/history_v2/{prompt_id}' +} -export type GetHistoryForPromptError = GetHistoryForPromptErrors[keyof GetHistoryForPromptErrors]; +export type GetHistoryForPromptErrors = { + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Prompt not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetHistoryForPromptError = + GetHistoryForPromptErrors[keyof GetHistoryForPromptErrors] export type GetHistoryForPromptResponses = { - /** - * Success - History for prompt retrieved - */ - 200: HistoryDetailResponse; -}; + /** + * Success - History for prompt retrieved + */ + 200: HistoryDetailResponse +} -export type GetHistoryForPromptResponse = GetHistoryForPromptResponses[keyof GetHistoryForPromptResponses]; +export type GetHistoryForPromptResponse = + GetHistoryForPromptResponses[keyof GetHistoryForPromptResponses] export type CreateHubAssetUploadUrlData = { - body: HubAssetUploadUrlRequest; - path?: never; - query?: never; - url: '/api/hub/assets/upload-url'; -}; + body: HubAssetUploadUrlRequest + path?: never + query?: never + url: '/api/hub/assets/upload-url' +} export type CreateHubAssetUploadUrlErrors = { - /** - * Bad request (e.g. unsupported content type) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Not found - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CreateHubAssetUploadUrlError = CreateHubAssetUploadUrlErrors[keyof CreateHubAssetUploadUrlErrors]; + /** + * Bad request (e.g. unsupported content type) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateHubAssetUploadUrlError = + CreateHubAssetUploadUrlErrors[keyof CreateHubAssetUploadUrlErrors] export type CreateHubAssetUploadUrlResponses = { - /** - * Presigned upload URL and token - */ - 200: HubAssetUploadUrlResponse; -}; + /** + * Presigned upload URL and token + */ + 200: HubAssetUploadUrlResponse +} -export type CreateHubAssetUploadUrlResponse = CreateHubAssetUploadUrlResponses[keyof CreateHubAssetUploadUrlResponses]; +export type CreateHubAssetUploadUrlResponse = + CreateHubAssetUploadUrlResponses[keyof CreateHubAssetUploadUrlResponses] export type ListHubLabelsData = { - body?: never; - path?: never; - query?: { - /** - * Filter by label type. Omit to return all labels. - */ - type?: 'tag' | 'model' | 'custom_node'; - }; - url: '/api/hub/labels'; -}; - -export type ListHubLabelsErrors = { - /** - * Bad request (e.g. invalid type parameter) - */ - 400: ErrorResponse; + body?: never + path?: never + query?: { /** - * Internal server error + * Filter by label type. Omit to return all labels. */ - 500: ErrorResponse; -}; + type?: 'tag' | 'model' | 'custom_node' + } + url: '/api/hub/labels' +} -export type ListHubLabelsError = ListHubLabelsErrors[keyof ListHubLabelsErrors]; +export type ListHubLabelsErrors = { + /** + * Bad request (e.g. invalid type parameter) + */ + 400: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListHubLabelsError = ListHubLabelsErrors[keyof ListHubLabelsErrors] export type ListHubLabelsResponses = { - /** - * List of labels - */ - 200: HubLabelListResponse; -}; + /** + * List of labels + */ + 200: HubLabelListResponse +} -export type ListHubLabelsResponse = ListHubLabelsResponses[keyof ListHubLabelsResponses]; +export type ListHubLabelsResponse = + ListHubLabelsResponses[keyof ListHubLabelsResponses] export type CreateHubProfileData = { - body: CreateHubProfileRequest; - path?: never; - query?: never; - url: '/api/hub/profiles'; -}; + body: CreateHubProfileRequest + path?: never + query?: never + url: '/api/hub/profiles' +} export type CreateHubProfileErrors = { - /** - * Bad request (e.g. invalid username) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Not found - */ - 404: ErrorResponse; - /** - * Username already taken or profile already exists - */ - 409: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CreateHubProfileError = CreateHubProfileErrors[keyof CreateHubProfileErrors]; + /** + * Bad request (e.g. invalid username) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Not found + */ + 404: ErrorResponse + /** + * Username already taken or profile already exists + */ + 409: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateHubProfileError = + CreateHubProfileErrors[keyof CreateHubProfileErrors] export type CreateHubProfileResponses = { - /** - * Hub profile created - */ - 201: HubProfile; -}; + /** + * Hub profile created + */ + 201: HubProfile +} -export type CreateHubProfileResponse = CreateHubProfileResponses[keyof CreateHubProfileResponses]; +export type CreateHubProfileResponse = + CreateHubProfileResponses[keyof CreateHubProfileResponses] export type GetHubProfileByUsernameData = { - body?: never; - path: { - /** - * The hub profile username. - */ - username: string; - }; - query?: never; - url: '/api/hub/profiles/{username}'; -}; - -export type GetHubProfileByUsernameErrors = { - /** - * Profile not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The hub profile username. */ - 500: ErrorResponse; -}; + username: string + } + query?: never + url: '/api/hub/profiles/{username}' +} -export type GetHubProfileByUsernameError = GetHubProfileByUsernameErrors[keyof GetHubProfileByUsernameErrors]; +export type GetHubProfileByUsernameErrors = { + /** + * Profile not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetHubProfileByUsernameError = + GetHubProfileByUsernameErrors[keyof GetHubProfileByUsernameErrors] export type GetHubProfileByUsernameResponses = { - /** - * Hub profile - */ - 200: HubProfile; -}; + /** + * Hub profile + */ + 200: HubProfile +} -export type GetHubProfileByUsernameResponse = GetHubProfileByUsernameResponses[keyof GetHubProfileByUsernameResponses]; +export type GetHubProfileByUsernameResponse = + GetHubProfileByUsernameResponses[keyof GetHubProfileByUsernameResponses] export type UpdateHubProfileData = { - body: UpdateHubProfileRequest; - path: { - /** - * The hub profile username to update. - */ - username: string; - }; - query?: never; - url: '/api/hub/profiles/{username}'; -}; - -export type UpdateHubProfileErrors = { - /** - * Bad request (e.g. missing body, invalid avatar token) - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * No hub profile exists with this username - */ - 404: ErrorResponse; + body: UpdateHubProfileRequest + path: { /** - * Internal server error + * The hub profile username to update. */ - 500: ErrorResponse; -}; + username: string + } + query?: never + url: '/api/hub/profiles/{username}' +} -export type UpdateHubProfileError = UpdateHubProfileErrors[keyof UpdateHubProfileErrors]; +export type UpdateHubProfileErrors = { + /** + * Bad request (e.g. missing body, invalid avatar token) + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * No hub profile exists with this username + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type UpdateHubProfileError = + UpdateHubProfileErrors[keyof UpdateHubProfileErrors] export type UpdateHubProfileResponses = { - /** - * Hub profile updated - */ - 200: HubProfile; -}; + /** + * Hub profile updated + */ + 200: HubProfile +} -export type UpdateHubProfileResponse = UpdateHubProfileResponses[keyof UpdateHubProfileResponses]; +export type UpdateHubProfileResponse = + UpdateHubProfileResponses[keyof UpdateHubProfileResponses] export type CheckHubUsernameData = { - body?: never; - path?: never; - query: { - username: string; - }; - url: '/api/hub/profiles/check'; -}; + body?: never + path?: never + query: { + username: string + } + url: '/api/hub/profiles/check' +} export type CheckHubUsernameErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Not found - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CheckHubUsernameError = CheckHubUsernameErrors[keyof CheckHubUsernameErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CheckHubUsernameError = + CheckHubUsernameErrors[keyof CheckHubUsernameErrors] export type CheckHubUsernameResponses = { - /** - * Username availability result - */ - 200: HubUsernameCheckResponse; -}; + /** + * Username availability result + */ + 200: HubUsernameCheckResponse +} -export type CheckHubUsernameResponse = CheckHubUsernameResponses[keyof CheckHubUsernameResponses]; +export type CheckHubUsernameResponse = + CheckHubUsernameResponses[keyof CheckHubUsernameResponses] export type GetMyHubProfileData = { - body?: never; - path?: never; - query?: never; - url: '/api/hub/profiles/me'; -}; + body?: never + path?: never + query?: never + url: '/api/hub/profiles/me' +} export type GetMyHubProfileErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * No hub profile exists - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type GetMyHubProfileError = GetMyHubProfileErrors[keyof GetMyHubProfileErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * No hub profile exists + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetMyHubProfileError = + GetMyHubProfileErrors[keyof GetMyHubProfileErrors] export type GetMyHubProfileResponses = { - /** - * Hub profile - */ - 200: HubProfile; -}; + /** + * Hub profile + */ + 200: HubProfile +} -export type GetMyHubProfileResponse = GetMyHubProfileResponses[keyof GetMyHubProfileResponses]; +export type GetMyHubProfileResponse = + GetMyHubProfileResponses[keyof GetMyHubProfileResponses] export type ListHubWorkflowsData = { - body?: never; - path?: never; - query?: { - cursor?: string; - limit?: number; - /** - * Search by workflow name - */ - search?: string; - /** - * Filter by tag - */ - tag?: string; - /** - * Filter by profile username - */ - username?: string; - /** - * When true, returns full HubWorkflowDetail objects in the workflows array instead of summaries. Requires limit <= 20. - */ - detail?: boolean; - /** - * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. - */ - status?: Array; - }; - url: '/api/hub/workflows'; -}; - -export type ListHubWorkflowsErrors = { + body?: never + path?: never + query?: { + cursor?: string + limit?: number + /** + * Search by workflow name + */ + search?: string + /** + * Filter by tag + */ + tag?: string /** - * Bad request (e.g. malformed pagination cursor) + * Filter by profile username */ - 400: ErrorResponse; + username?: string /** - * Profile not found (when filtering by username) + * When true, returns full HubWorkflowDetail objects in the workflows array instead of summaries. Requires limit <= 20. */ - 404: ErrorResponse; + detail?: boolean /** - * Internal server error + * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. */ - 500: ErrorResponse; -}; + status?: Array + } + url: '/api/hub/workflows' +} -export type ListHubWorkflowsError = ListHubWorkflowsErrors[keyof ListHubWorkflowsErrors]; +export type ListHubWorkflowsErrors = { + /** + * Bad request (e.g. malformed pagination cursor) + */ + 400: ErrorResponse + /** + * Profile not found (when filtering by username) + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListHubWorkflowsError = + ListHubWorkflowsErrors[keyof ListHubWorkflowsErrors] export type ListHubWorkflowsResponses = { - /** - * Paginated list of hub workflows - */ - 200: HubWorkflowListResponse; -}; + /** + * Paginated list of hub workflows + */ + 200: HubWorkflowListResponse +} -export type ListHubWorkflowsResponse = ListHubWorkflowsResponses[keyof ListHubWorkflowsResponses]; +export type ListHubWorkflowsResponse = + ListHubWorkflowsResponses[keyof ListHubWorkflowsResponses] export type PublishHubWorkflowData = { - body: PublishHubWorkflowRequest; - path?: never; - query?: never; - url: '/api/hub/workflows'; -}; + body: PublishHubWorkflowRequest + path?: never + query?: never + url: '/api/hub/workflows' +} export type PublishHubWorkflowErrors = { - /** - * Bad request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Workflow or profile not found - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type PublishHubWorkflowError = PublishHubWorkflowErrors[keyof PublishHubWorkflowErrors]; + /** + * Bad request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Workflow or profile not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type PublishHubWorkflowError = + PublishHubWorkflowErrors[keyof PublishHubWorkflowErrors] export type PublishHubWorkflowResponses = { - /** - * Workflow published to hub - */ - 200: HubWorkflowDetail; -}; + /** + * Workflow published to hub + */ + 200: HubWorkflowDetail +} -export type PublishHubWorkflowResponse = PublishHubWorkflowResponses[keyof PublishHubWorkflowResponses]; +export type PublishHubWorkflowResponse = + PublishHubWorkflowResponses[keyof PublishHubWorkflowResponses] export type DeleteHubWorkflowData = { - body?: never; - path: { - /** - * The share ID of the hub workflow to unpublish. - */ - share_id: string; - }; - query?: never; - url: '/api/hub/workflows/{share_id}'; -}; - -export type DeleteHubWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Workflow not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The share ID of the hub workflow to unpublish. */ - 500: ErrorResponse; -}; + share_id: string + } + query?: never + url: '/api/hub/workflows/{share_id}' +} -export type DeleteHubWorkflowError = DeleteHubWorkflowErrors[keyof DeleteHubWorkflowErrors]; +export type DeleteHubWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type DeleteHubWorkflowError = + DeleteHubWorkflowErrors[keyof DeleteHubWorkflowErrors] export type DeleteHubWorkflowResponses = { - /** - * Successfully unpublished - */ - 204: void; -}; + /** + * Successfully unpublished + */ + 204: void +} -export type DeleteHubWorkflowResponse = DeleteHubWorkflowResponses[keyof DeleteHubWorkflowResponses]; +export type DeleteHubWorkflowResponse = + DeleteHubWorkflowResponses[keyof DeleteHubWorkflowResponses] export type GetHubWorkflowData = { - body?: never; - path: { - /** - * The share ID of the hub workflow. - */ - share_id: string; - }; - query?: never; - url: '/api/hub/workflows/{share_id}'; -}; - -export type GetHubWorkflowErrors = { - /** - * Workflow not found - */ - 404: ErrorResponse; - /** - * Workflow JSON too large - */ - 413: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The share ID of the hub workflow. */ - 500: ErrorResponse; -}; + share_id: string + } + query?: never + url: '/api/hub/workflows/{share_id}' +} -export type GetHubWorkflowError = GetHubWorkflowErrors[keyof GetHubWorkflowErrors]; +export type GetHubWorkflowErrors = { + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Workflow JSON too large + */ + 413: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetHubWorkflowError = + GetHubWorkflowErrors[keyof GetHubWorkflowErrors] export type GetHubWorkflowResponses = { - /** - * Hub workflow detail - */ - 200: HubWorkflowDetail; -}; + /** + * Hub workflow detail + */ + 200: HubWorkflowDetail +} -export type GetHubWorkflowResponse = GetHubWorkflowResponses[keyof GetHubWorkflowResponses]; +export type GetHubWorkflowResponse = + GetHubWorkflowResponses[keyof GetHubWorkflowResponses] export type ListHubWorkflowIndexData = { - body?: never; - path?: never; - query?: { - /** - * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. - */ - status?: Array; - }; - url: '/api/hub/workflows/index'; -}; - -export type ListHubWorkflowIndexErrors = { + body?: never + path?: never + query?: { /** - * Internal server error + * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. */ - 500: ErrorResponse; -}; + status?: Array + } + url: '/api/hub/workflows/index' +} + +export type ListHubWorkflowIndexErrors = { + /** + * Internal server error + */ + 500: ErrorResponse +} -export type ListHubWorkflowIndexError = ListHubWorkflowIndexErrors[keyof ListHubWorkflowIndexErrors]; +export type ListHubWorkflowIndexError = + ListHubWorkflowIndexErrors[keyof ListHubWorkflowIndexErrors] export type ListHubWorkflowIndexResponses = { - /** - * List of hub workflow template entries - */ - 200: Array; -}; + /** + * List of hub workflow template entries + */ + 200: Array +} -export type ListHubWorkflowIndexResponse = ListHubWorkflowIndexResponses[keyof ListHubWorkflowIndexResponses]; +export type ListHubWorkflowIndexResponse = + ListHubWorkflowIndexResponses[keyof ListHubWorkflowIndexResponses] export type GetI18nData = { - body?: never; - path?: never; - query?: never; - url: '/api/i18n'; -}; + body?: never + path?: never + query?: never + url: '/api/i18n' +} export type GetI18nResponses = { - /** - * Nested map of locale to translation key-value pairs - */ - 200: { - [key: string]: unknown; - }; -}; + /** + * Nested map of locale to translation key-value pairs + */ + 200: { + [key: string]: unknown + } +} -export type GetI18nResponse = GetI18nResponses[keyof GetI18nResponses]; +export type GetI18nResponse = GetI18nResponses[keyof GetI18nResponses] export type InterruptJobData = { - body?: never; - path?: never; - query?: never; - url: '/api/interrupt'; -}; + body?: never + path?: never + query?: never + url: '/api/interrupt' +} export type InterruptJobErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type InterruptJobError = InterruptJobErrors[keyof InterruptJobErrors]; + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type InterruptJobError = InterruptJobErrors[keyof InterruptJobErrors] export type InterruptJobResponses = { - /** - * Success - first active job cancelled, or no active job found - */ - 200: unknown; -}; + /** + * Success - first active job cancelled, or no active job found + */ + 200: unknown +} export type AcceptWorkspaceInviteData = { - body?: never; - path: { - /** - * Invite token - */ - token: string; - }; - query?: never; - url: '/api/invites/{token}/accept'; -}; - -export type AcceptWorkspaceInviteErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Email does not match invite - */ - 403: ErrorResponse; + body?: never + path: { /** - * Invite not found or expired + * Invite token */ - 404: ErrorResponse; - /** - * Already a member of this workspace - */ - 409: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + token: string + } + query?: never + url: '/api/invites/{token}/accept' +} -export type AcceptWorkspaceInviteError = AcceptWorkspaceInviteErrors[keyof AcceptWorkspaceInviteErrors]; +export type AcceptWorkspaceInviteErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Email does not match invite + */ + 403: ErrorResponse + /** + * Invite not found or expired + */ + 404: ErrorResponse + /** + * Already a member of this workspace + */ + 409: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type AcceptWorkspaceInviteError = + AcceptWorkspaceInviteErrors[keyof AcceptWorkspaceInviteErrors] export type AcceptWorkspaceInviteResponses = { - /** - * Invite accepted, user is now a member - */ - 200: AcceptInviteResponse; -}; + /** + * Invite accepted, user is now a member + */ + 200: AcceptInviteResponse +} -export type AcceptWorkspaceInviteResponse = AcceptWorkspaceInviteResponses[keyof AcceptWorkspaceInviteResponses]; +export type AcceptWorkspaceInviteResponse = + AcceptWorkspaceInviteResponses[keyof AcceptWorkspaceInviteResponses] export type GetLegacyJobByIdData = { - body?: never; - path: { - job_id: string; - }; - query?: never; - url: '/api/job/{job_id}'; -}; + body?: never + path: { + job_id: string + } + query?: never + url: '/api/job/{job_id}' +} export type GetLegacyJobByIdErrors = { - /** - * Not Found — use /api/jobs/{job_id} instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/jobs/{job_id} instead + */ + 404: unknown +} export type GetLegacyJobOutputsData = { - body?: never; - path: { - job_id: string; - }; - query?: never; - url: '/api/job/{job_id}/outputs'; -}; + body?: never + path: { + job_id: string + } + query?: never + url: '/api/job/{job_id}/outputs' +} export type GetLegacyJobOutputsErrors = { - /** - * Not Found — use /api/jobs/{job_id} instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/jobs/{job_id} instead + */ + 404: unknown +} export type GetJobStatusData = { - body?: never; - path: { - /** - * The unique ID of the job - */ - job_id: string; - }; - query?: never; - url: '/api/job/{job_id}/status'; -}; + body?: never + path: { + /** + * The unique ID of the job + */ + job_id: string + } + query?: never + url: '/api/job/{job_id}/status' +} export type GetJobStatusErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden - job belongs to another user + */ + 403: ErrorResponse + /** + * Job not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetJobStatusError = GetJobStatusErrors[keyof GetJobStatusErrors] + +export type GetJobStatusResponses = { + /** + * Success - Job status returned + */ + 200: JobStatusResponse +} + +export type GetJobStatusResponse = + GetJobStatusResponses[keyof GetJobStatusResponses] + +export type ListJobsData = { + body?: never + path?: never + query?: { /** - * Unauthorized + * Filter by one or more statuses (comma-separated). If not provided, returns all jobs. */ - 401: ErrorResponse; + status?: string /** - * Forbidden - job belongs to another user + * Filter by workflow ID (exact match) */ - 403: ErrorResponse; + workflow_id?: string /** - * Job not found + * Filter by output media type (only applies to completed jobs with outputs) */ - 404: ErrorResponse; + output_type?: 'image' | 'video' | 'audio' | '3d' /** - * Internal server error + * Field to sort by (create_time = when job was submitted, execution_time = how long workflow took to run) */ - 500: ErrorResponse; -}; - -export type GetJobStatusError = GetJobStatusErrors[keyof GetJobStatusErrors]; - -export type GetJobStatusResponses = { + sort_by?: 'create_time' | 'execution_time' /** - * Success - Job status returned + * Sort direction (asc = ascending, desc = descending) */ - 200: JobStatusResponse; -}; - -export type GetJobStatusResponse = GetJobStatusResponses[keyof GetJobStatusResponses]; - -export type ListJobsData = { - body?: never; - path?: never; - query?: { - /** - * Filter by one or more statuses (comma-separated). If not provided, returns all jobs. - */ - status?: string; - /** - * Filter by workflow ID (exact match) - */ - workflow_id?: string; - /** - * Filter by output media type (only applies to completed jobs with outputs) - */ - output_type?: 'image' | 'video' | 'audio' | '3d'; - /** - * Field to sort by (create_time = when job was submitted, execution_time = how long workflow took to run) - */ - sort_by?: 'create_time' | 'execution_time'; - /** - * Sort direction (asc = ascending, desc = descending) - */ - sort_order?: 'asc' | 'desc'; - /** - * Opaque cursor for keyset pagination. Pass the `next_cursor` value - * from a previous response to fetch the next page. - * Cursor pagination is supported only when `sort_by=create_time` - * (default). If `sort_by=execution_time`, `after` is ignored and - * offset/limit pagination is used. - * Cursors are opaque base64url payloads — clients should treat them - * as strings and not parse the contents. - * - */ - after?: string; - /** - * Pagination offset (0-based). Deprecated: prefer cursor-based pagination via `after`. - * - * @deprecated - */ - offset?: number; - /** - * Maximum items per page (1-1000) - */ - limit?: number; - }; - url: '/api/jobs'; -}; - -export type ListJobsErrors = { + sort_order?: 'asc' | 'desc' /** - * Bad request (e.g. malformed pagination cursor). + * Opaque cursor for keyset pagination. Pass the `next_cursor` value + * from a previous response to fetch the next page. + * Cursor pagination is supported only when `sort_by=create_time` + * (default). If `sort_by=execution_time`, `after` is ignored and + * offset/limit pagination is used. + * Cursors are opaque base64url payloads — clients should treat them + * as strings and not parse the contents. + * */ - 400: ErrorResponse; + after?: string /** - * Unauthorized - Authentication required + * Pagination offset (0-based). Deprecated: prefer cursor-based pagination via `after`. + * + * @deprecated */ - 401: ErrorResponse; + offset?: number /** - * Internal server error + * Maximum items per page (1-1000) */ - 500: ErrorResponse; -}; + limit?: number + } + url: '/api/jobs' +} -export type ListJobsError = ListJobsErrors[keyof ListJobsErrors]; +export type ListJobsErrors = { + /** + * Bad request (e.g. malformed pagination cursor). + */ + 400: ErrorResponse + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListJobsError = ListJobsErrors[keyof ListJobsErrors] export type ListJobsResponses = { - /** - * Success - Jobs retrieved - */ - 200: JobsListResponse; -}; + /** + * Success - Jobs retrieved + */ + 200: JobsListResponse +} -export type ListJobsResponse = ListJobsResponses[keyof ListJobsResponses]; +export type ListJobsResponse = ListJobsResponses[keyof ListJobsResponses] export type GetJobDetailData = { - body?: never; - path: { - /** - * Job identifier (UUID) - */ - job_id: string; - }; - query?: { - /** - * When present, each output item in the response receives a `short_url` field containing a short link for that asset. Omit this parameter (the default) to receive a response identical to the no-param baseline. The value selects the link's lifetime and auth model: use `ephemeral_tool_chain` for short-lived (≤5 minute) machine-to-machine handoffs — these are public bearer links where the link ID itself is the credential, so anyone holding the link can resolve it (intended for pasting into an agent/MCP tool chain); use `default` for durable (30 day) human-revisitable links, which are owner-gated and resolvable only by the authenticated owner. Links are always minted under the authenticated request owner's identity; the auth model is selected by the server and is never settable by the caller. - * - */ - short_link?: 'ephemeral_tool_chain' | 'default'; - }; - url: '/api/jobs/{job_id}'; -}; - -export type GetJobDetailErrors = { - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse; + body?: never + path: { /** - * Forbidden - Job does not belong to user + * Job identifier (UUID) */ - 403: ErrorResponse; + job_id: string + } + query?: { /** - * Job not found - */ - 404: ErrorResponse; - /** - * Internal server error + * When present, each output item in the response receives a `short_url` field containing a short link for that asset. Omit this parameter (the default) to receive a response identical to the no-param baseline. The value selects the link's lifetime and auth model: use `ephemeral_tool_chain` for short-lived (≤5 minute) machine-to-machine handoffs — these are public bearer links where the link ID itself is the credential, so anyone holding the link can resolve it (intended for pasting into an agent/MCP tool chain); use `default` for durable (30 day) human-revisitable links, which are owner-gated and resolvable only by the authenticated owner. Links are always minted under the authenticated request owner's identity; the auth model is selected by the server and is never settable by the caller. + * */ - 500: ErrorResponse; -}; + short_link?: 'ephemeral_tool_chain' | 'default' + } + url: '/api/jobs/{job_id}' +} -export type GetJobDetailError = GetJobDetailErrors[keyof GetJobDetailErrors]; +export type GetJobDetailErrors = { + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Forbidden - Job does not belong to user + */ + 403: ErrorResponse + /** + * Job not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetJobDetailError = GetJobDetailErrors[keyof GetJobDetailErrors] export type GetJobDetailResponses = { - /** - * Success - Job details retrieved - */ - 200: JobDetailResponse; -}; + /** + * Success - Job details retrieved + */ + 200: JobDetailResponse +} -export type GetJobDetailResponse = GetJobDetailResponses[keyof GetJobDetailResponses]; +export type GetJobDetailResponse = + GetJobDetailResponses[keyof GetJobDetailResponses] export type CancelJobData = { - body?: never; - path: { - /** - * Job identifier (UUID) - */ - job_id: string; - }; - query?: never; - url: '/api/jobs/{job_id}/cancel'; -}; - -export type CancelJobErrors = { - /** - * Bad Request - job_id is not a valid UUID (emitted by request validation before the handler runs) - */ - 400: ErrorResponse; - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse; + body?: never + path: { /** - * Job not found for this user + * Job identifier (UUID) */ - 404: ErrorResponse; - /** - * Internal server error - cancellation failed - */ - 500: ErrorResponse; -}; + job_id: string + } + query?: never + url: '/api/jobs/{job_id}/cancel' +} -export type CancelJobError = CancelJobErrors[keyof CancelJobErrors]; +export type CancelJobErrors = { + /** + * Bad Request - job_id is not a valid UUID (emitted by request validation before the handler runs) + */ + 400: ErrorResponse + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Job not found for this user + */ + 404: ErrorResponse + /** + * Internal server error - cancellation failed + */ + 500: ErrorResponse +} + +export type CancelJobError = CancelJobErrors[keyof CancelJobErrors] export type CancelJobResponses = { - /** - * Success - Cancel request accepted (or job was already terminal) - */ - 200: JobCancelResponse; -}; + /** + * Success - Cancel request accepted (or job was already terminal) + */ + 200: JobCancelResponse +} -export type CancelJobResponse = CancelJobResponses[keyof CancelJobResponses]; +export type CancelJobResponse = CancelJobResponses[keyof CancelJobResponses] export type CancelJobsData = { - body: JobsCancelRequest; - path?: never; - query?: never; - url: '/api/jobs/cancel'; -}; + body: JobsCancelRequest + path?: never + query?: never + url: '/api/jobs/cancel' +} export type CancelJobsErrors = { - /** - * Bad Request - job_ids is missing, empty, exceeds the maximum count, or contains an invalid UUID - */ - 400: ErrorResponse; - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse; - /** - * One or more job IDs not found for this user (no jobs cancelled) - */ - 404: ErrorResponse; - /** - * Internal server error - cancellation failed - */ - 500: ErrorResponse; -}; - -export type CancelJobsError = CancelJobsErrors[keyof CancelJobsErrors]; + /** + * Bad Request - job_ids is missing, empty, exceeds the maximum count, or contains an invalid UUID + */ + 400: ErrorResponse + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * One or more job IDs not found for this user (no jobs cancelled) + */ + 404: ErrorResponse + /** + * Internal server error - cancellation failed + */ + 500: ErrorResponse +} + +export type CancelJobsError = CancelJobsErrors[keyof CancelJobsErrors] export type CancelJobsResponses = { - /** - * Success - cancel requests dispatched (or jobs were already terminal) - */ - 200: JobsCancelResponse; -}; + /** + * Success - cancel requests dispatched (or jobs were already terminal) + */ + 200: JobsCancelResponse +} -export type CancelJobsResponse = CancelJobsResponses[keyof CancelJobsResponses]; +export type CancelJobsResponse = CancelJobsResponses[keyof CancelJobsResponses] export type GetLegacyModelsData = { - body?: never; - path?: never; - query?: never; - url: '/api/models'; -}; + body?: never + path?: never + query?: never + url: '/api/models' +} export type GetLegacyModelsErrors = { - /** - * Not Found — use /api/experiment/models instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/experiment/models instead + */ + 404: unknown +} export type GetLegacyModelsByFolderData = { - body?: never; - path: { - folder: string; - }; - query?: never; - url: '/api/models/{folder}'; -}; + body?: never + path: { + folder: string + } + query?: never + url: '/api/models/{folder}' +} export type GetLegacyModelsByFolderErrors = { - /** - * Not Found — use /api/experiment/models/{folder} instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/experiment/models/{folder} instead + */ + 404: unknown +} export type GetNodeReplacementsData = { - body?: never; - path?: never; - query?: never; - url: '/api/node_replacements'; -}; + body?: never + path?: never + query?: never + url: '/api/node_replacements' +} export type GetNodeReplacementsErrors = { - /** - * Internal server error - */ - 500: ErrorResponse; -}; + /** + * Internal server error + */ + 500: ErrorResponse +} -export type GetNodeReplacementsError = GetNodeReplacementsErrors[keyof GetNodeReplacementsErrors]; +export type GetNodeReplacementsError = + GetNodeReplacementsErrors[keyof GetNodeReplacementsErrors] export type GetNodeReplacementsResponses = { - /** - * Success - Node replacement mappings - */ - 200: { - [key: string]: unknown; - }; -}; + /** + * Success - Node replacement mappings + */ + 200: { + [key: string]: unknown + } +} -export type GetNodeReplacementsResponse = GetNodeReplacementsResponses[keyof GetNodeReplacementsResponses]; +export type GetNodeReplacementsResponse = + GetNodeReplacementsResponses[keyof GetNodeReplacementsResponses] export type GetNodeInfoData = { - body?: never; - path?: never; - query?: never; - url: '/api/object_info'; -}; + body?: never + path?: never + query?: never + url: '/api/object_info' +} export type GetNodeInfoResponses = { - /** - * Success - */ - 200: { - [key: string]: NodeInfo; - }; -}; + /** + * Success + */ + 200: { + [key: string]: NodeInfo + } +} -export type GetNodeInfoResponse = GetNodeInfoResponses[keyof GetNodeInfoResponses]; +export type GetNodeInfoResponse = + GetNodeInfoResponses[keyof GetNodeInfoResponses] export type GetLegacyObjectInfoByNodeClassData = { - body?: never; - path: { - node_class: string; - }; - query?: never; - url: '/api/object_info/{node_class}'; -}; + body?: never + path: { + node_class: string + } + query?: never + url: '/api/object_info/{node_class}' +} export type GetLegacyObjectInfoByNodeClassErrors = { - /** - * Not Found — use /api/object_info instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/object_info instead + */ + 404: unknown +} export type GetPromptInfoData = { - body?: never; - path?: never; - query?: never; - url: '/api/prompt'; -}; + body?: never + path?: never + query?: never + url: '/api/prompt' +} export type GetPromptInfoErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type GetPromptInfoError = GetPromptInfoErrors[keyof GetPromptInfoErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetPromptInfoError = GetPromptInfoErrors[keyof GetPromptInfoErrors] export type GetPromptInfoResponses = { - /** - * Success - */ - 200: PromptInfo; -}; + /** + * Success + */ + 200: PromptInfo +} -export type GetPromptInfoResponse = GetPromptInfoResponses[keyof GetPromptInfoResponses]; +export type GetPromptInfoResponse = + GetPromptInfoResponses[keyof GetPromptInfoResponses] export type ExecutePromptData = { - body: PromptRequest; - path?: never; - query?: never; - url: '/api/prompt'; -}; + body: PromptRequest + path?: never + query?: never + url: '/api/prompt' +} export type ExecutePromptErrors = { - /** - * Invalid prompt - */ - 400: PromptErrorResponse; - /** - * Payment required - Insufficient credits - */ - 402: PromptErrorResponse; - /** - * Workflow JSON too large - */ - 413: PromptErrorResponse; - /** - * Payment required - User has not paid - */ - 429: PromptErrorResponse; - /** - * Internal server error - */ - 500: PromptErrorResponse; - /** - * Service unavailable - */ - 503: PromptErrorResponse; -}; - -export type ExecutePromptError = ExecutePromptErrors[keyof ExecutePromptErrors]; + /** + * Invalid prompt + */ + 400: PromptErrorResponse + /** + * Payment required - Insufficient credits + */ + 402: PromptErrorResponse + /** + * Workflow JSON too large + */ + 413: PromptErrorResponse + /** + * Payment required - User has not paid + */ + 429: PromptErrorResponse + /** + * Internal server error + */ + 500: PromptErrorResponse + /** + * Service unavailable + */ + 503: PromptErrorResponse +} + +export type ExecutePromptError = ExecutePromptErrors[keyof ExecutePromptErrors] export type ExecutePromptResponses = { - /** - * Success - Prompt accepted - */ - 200: PromptResponse; -}; + /** + * Success - Prompt accepted + */ + 200: PromptResponse +} -export type ExecutePromptResponse = ExecutePromptResponses[keyof ExecutePromptResponses]; +export type ExecutePromptResponse = + ExecutePromptResponses[keyof ExecutePromptResponses] export type GetLegacyPromptByIdData = { - body?: never; - path: { - prompt_id: string; - }; - query?: never; - url: '/api/prompt/{prompt_id}'; -}; + body?: never + path: { + prompt_id: string + } + query?: never + url: '/api/prompt/{prompt_id}' +} export type GetLegacyPromptByIdErrors = { - /** - * Not Found — use /api/jobs/{prompt_id} instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/jobs/{prompt_id} instead + */ + 404: unknown +} export type GetQueueInfoData = { - body?: never; - path?: never; - query?: never; - url: '/api/queue'; -}; + body?: never + path?: never + query?: never + url: '/api/queue' +} export type GetQueueInfoErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse; - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse; - /** - * Invalid request parameters - */ - 500: ErrorResponse; -}; - -export type GetQueueInfoError = GetQueueInfoErrors[keyof GetQueueInfoErrors]; + /** + * Invalid request parameters + */ + 400: ErrorResponse + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Invalid request parameters + */ + 500: ErrorResponse +} + +export type GetQueueInfoError = GetQueueInfoErrors[keyof GetQueueInfoErrors] export type GetQueueInfoResponses = { - /** - * Success - */ - 200: QueueInfo; -}; + /** + * Success + */ + 200: QueueInfo +} -export type GetQueueInfoResponse = GetQueueInfoResponses[keyof GetQueueInfoResponses]; +export type GetQueueInfoResponse = + GetQueueInfoResponses[keyof GetQueueInfoResponses] export type ManageQueueData = { - body: QueueManageRequest; - path?: never; - query?: never; - url: '/api/queue'; -}; + body: QueueManageRequest + path?: never + query?: never + url: '/api/queue' +} export type ManageQueueErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type ManageQueueError = ManageQueueErrors[keyof ManageQueueErrors]; + /** + * Invalid request parameters + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ManageQueueError = ManageQueueErrors[keyof ManageQueueErrors] export type ManageQueueResponses = { - /** - * Success - */ - 200: QueueManageResponse; -}; + /** + * Success + */ + 200: QueueManageResponse +} -export type ManageQueueResponse = ManageQueueResponses[keyof ManageQueueResponses]; +export type ManageQueueResponse = + ManageQueueResponses[keyof ManageQueueResponses] export type ListSecretsData = { - body?: never; - path?: never; - query?: never; - url: '/api/secrets'; -}; + body?: never + path?: never + query?: never + url: '/api/secrets' +} export type ListSecretsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; - /** - * Service unavailable - feature is disabled - */ - 503: ErrorResponse; -}; - -export type ListSecretsError = ListSecretsErrors[keyof ListSecretsErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse + /** + * Service unavailable - feature is disabled + */ + 503: ErrorResponse +} + +export type ListSecretsError = ListSecretsErrors[keyof ListSecretsErrors] export type ListSecretsResponses = { - /** - * Success - */ - 200: SecretListResponse; -}; + /** + * Success + */ + 200: SecretListResponse +} -export type ListSecretsResponse = ListSecretsResponses[keyof ListSecretsResponses]; +export type ListSecretsResponse = + ListSecretsResponses[keyof ListSecretsResponses] export type CreateSecretData = { - body: CreateSecretRequest; - path?: never; - query?: never; - url: '/api/secrets'; -}; + body: CreateSecretRequest + path?: never + query?: never + url: '/api/secrets' +} export type CreateSecretErrors = { - /** - * Invalid request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Forbidden - workspace is not entitled to configure a secret for this provider - */ - 403: ErrorResponse; - /** - * Conflict - secret with this name or provider already exists - */ - 409: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse; -}; - -export type CreateSecretError = CreateSecretErrors[keyof CreateSecretErrors]; + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden - workspace is not entitled to configure a secret for this provider + */ + 403: ErrorResponse + /** + * Conflict - secret with this name or provider already exists + */ + 409: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse +} + +export type CreateSecretError = CreateSecretErrors[keyof CreateSecretErrors] export type CreateSecretResponses = { - /** - * Secret created successfully - */ - 201: SecretResponse; -}; + /** + * Secret created successfully + */ + 201: SecretResponse +} -export type CreateSecretResponse = CreateSecretResponses[keyof CreateSecretResponses]; +export type CreateSecretResponse = + CreateSecretResponses[keyof CreateSecretResponses] export type DeleteSecretData = { - body?: never; - path: { - /** - * The UUID of the secret - */ - id: string; - }; - query?: never; - url: '/api/secrets/{id}'; -}; - -export type DeleteSecretErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Forbidden - user does not own this secret - */ - 403: ErrorResponse; - /** - * Secret not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The UUID of the secret */ - 500: ErrorResponse; - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/secrets/{id}' +} -export type DeleteSecretError = DeleteSecretErrors[keyof DeleteSecretErrors]; +export type DeleteSecretErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden - user does not own this secret + */ + 403: ErrorResponse + /** + * Secret not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse +} + +export type DeleteSecretError = DeleteSecretErrors[keyof DeleteSecretErrors] export type DeleteSecretResponses = { - /** - * Secret deleted successfully - */ - 204: void; -}; + /** + * Secret deleted successfully + */ + 204: void +} -export type DeleteSecretResponse = DeleteSecretResponses[keyof DeleteSecretResponses]; +export type DeleteSecretResponse = + DeleteSecretResponses[keyof DeleteSecretResponses] export type GetSecretData = { - body?: never; - path: { - /** - * The UUID of the secret - */ - id: string; - }; - query?: never; - url: '/api/secrets/{id}'; -}; - -export type GetSecretErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Forbidden - user does not own this secret - */ - 403: ErrorResponse; - /** - * Secret not found - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; + body?: never + path: { /** - * Service unavailable - secrets feature disabled + * The UUID of the secret */ - 503: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/secrets/{id}' +} -export type GetSecretError = GetSecretErrors[keyof GetSecretErrors]; +export type GetSecretErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden - user does not own this secret + */ + 403: ErrorResponse + /** + * Secret not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse +} + +export type GetSecretError = GetSecretErrors[keyof GetSecretErrors] export type GetSecretResponses = { - /** - * Success - */ - 200: SecretResponse; -}; + /** + * Success + */ + 200: SecretResponse +} -export type GetSecretResponse = GetSecretResponses[keyof GetSecretResponses]; +export type GetSecretResponse = GetSecretResponses[keyof GetSecretResponses] export type UpdateSecretData = { - body: UpdateSecretRequest; - path: { - /** - * The UUID of the secret - */ - id: string; - }; - query?: never; - url: '/api/secrets/{id}'; -}; - -export type UpdateSecretErrors = { - /** - * Invalid request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Forbidden - user does not own this secret - */ - 403: ErrorResponse; - /** - * Secret not found - */ - 404: ErrorResponse; - /** - * Conflict - a secret with this name already exists - */ - 409: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; + body: UpdateSecretRequest + path: { /** - * Service unavailable - secrets feature disabled + * The UUID of the secret */ - 503: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/secrets/{id}' +} -export type UpdateSecretError = UpdateSecretErrors[keyof UpdateSecretErrors]; +export type UpdateSecretErrors = { + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden - user does not own this secret + */ + 403: ErrorResponse + /** + * Secret not found + */ + 404: ErrorResponse + /** + * Conflict - a secret with this name already exists + */ + 409: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse +} + +export type UpdateSecretError = UpdateSecretErrors[keyof UpdateSecretErrors] export type UpdateSecretResponses = { - /** - * Secret updated successfully - */ - 200: SecretResponse; -}; + /** + * Secret updated successfully + */ + 200: SecretResponse +} -export type UpdateSecretResponse = UpdateSecretResponses[keyof UpdateSecretResponses]; +export type UpdateSecretResponse = + UpdateSecretResponses[keyof UpdateSecretResponses] export type ListSecretProvidersData = { - body?: never; - path?: never; - query?: never; - url: '/api/secrets/providers'; -}; + body?: never + path?: never + query?: never + url: '/api/secrets/providers' +} export type ListSecretProvidersErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse; -}; - -export type ListSecretProvidersError = ListSecretProvidersErrors[keyof ListSecretProvidersErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse +} + +export type ListSecretProvidersError = + ListSecretProvidersErrors[keyof ListSecretProvidersErrors] export type ListSecretProvidersResponses = { - /** - * Success - */ - 200: SecretProvidersResponse; -}; + /** + * Success + */ + 200: SecretProvidersResponse +} -export type ListSecretProvidersResponse = ListSecretProvidersResponses[keyof ListSecretProvidersResponses]; +export type ListSecretProvidersResponse = + ListSecretProvidersResponses[keyof ListSecretProvidersResponses] export type GetAllSettingsData = { - body?: never; - path?: never; - query?: never; - url: '/api/settings'; -}; + body?: never + path?: never + query?: never + url: '/api/settings' +} export type GetAllSettingsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; -}; + /** + * Unauthorized + */ + 401: ErrorResponse +} -export type GetAllSettingsError = GetAllSettingsErrors[keyof GetAllSettingsErrors]; +export type GetAllSettingsError = + GetAllSettingsErrors[keyof GetAllSettingsErrors] export type GetAllSettingsResponses = { - /** - * User settings as key-value pairs - */ - 200: { - [key: string]: unknown; - }; -}; + /** + * User settings as key-value pairs + */ + 200: { + [key: string]: unknown + } +} -export type GetAllSettingsResponse = GetAllSettingsResponses[keyof GetAllSettingsResponses]; +export type GetAllSettingsResponse = + GetAllSettingsResponses[keyof GetAllSettingsResponses] export type UpdateMultipleSettingsData = { - /** - * Settings to update as key-value pairs - */ - body: { - [key: string]: unknown; - }; - path?: never; - query?: never; - url: '/api/settings'; -}; + /** + * Settings to update as key-value pairs + */ + body: { + [key: string]: unknown + } + path?: never + query?: never + url: '/api/settings' +} export type UpdateMultipleSettingsErrors = { - /** - * Invalid request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; -}; - -export type UpdateMultipleSettingsError = UpdateMultipleSettingsErrors[keyof UpdateMultipleSettingsErrors]; + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse +} + +export type UpdateMultipleSettingsError = + UpdateMultipleSettingsErrors[keyof UpdateMultipleSettingsErrors] export type UpdateMultipleSettingsResponses = { - /** - * Updated user settings - */ - 200: { - [key: string]: unknown; - }; -}; + /** + * Updated user settings + */ + 200: { + [key: string]: unknown + } +} -export type UpdateMultipleSettingsResponse = UpdateMultipleSettingsResponses[keyof UpdateMultipleSettingsResponses]; +export type UpdateMultipleSettingsResponse = + UpdateMultipleSettingsResponses[keyof UpdateMultipleSettingsResponses] export type GetSettingByIdData = { - body?: never; - path: { - /** - * Setting id to retrieve - */ - id: string; - }; - query?: never; - url: '/api/settings/{id}'; -}; - -export type GetSettingByIdErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; + body?: never + path: { /** - * Setting not found + * Setting id to retrieve */ - 404: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/settings/{id}' +} -export type GetSettingByIdError = GetSettingByIdErrors[keyof GetSettingByIdErrors]; +export type GetSettingByIdErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Setting not found + */ + 404: ErrorResponse +} + +export type GetSettingByIdError = + GetSettingByIdErrors[keyof GetSettingByIdErrors] export type GetSettingByIdResponses = { + /** + * Setting value response + */ + 200: { /** - * Setting value response + * The setting value */ - 200: { - /** - * The setting value - */ - value?: unknown; - }; -}; + value?: unknown + } +} -export type GetSettingByIdResponse = GetSettingByIdResponses[keyof GetSettingByIdResponses]; +export type GetSettingByIdResponse = + GetSettingByIdResponses[keyof GetSettingByIdResponses] export type UpdateSettingByIdData = { + /** + * New value for the setting + */ + body: unknown + path: { /** - * New value for the setting + * Setting id to update */ - body: unknown; - path: { - /** - * Setting id to update - */ - id: string; - }; - query?: never; - url: '/api/settings/{id}'; -}; + id: string + } + query?: never + url: '/api/settings/{id}' +} export type UpdateSettingByIdErrors = { - /** - * Invalid request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; -}; - -export type UpdateSettingByIdError = UpdateSettingByIdErrors[keyof UpdateSettingByIdErrors]; + /** + * Invalid request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse +} + +export type UpdateSettingByIdError = + UpdateSettingByIdErrors[keyof UpdateSettingByIdErrors] export type UpdateSettingByIdResponses = { + /** + * Updated setting value response + */ + 200: { /** - * Updated setting value response + * The updated setting value */ - 200: { - /** - * The updated setting value - */ - value?: unknown; - }; -}; + value?: unknown + } +} -export type UpdateSettingByIdResponse = UpdateSettingByIdResponses[keyof UpdateSettingByIdResponses]; +export type UpdateSettingByIdResponse = + UpdateSettingByIdResponses[keyof UpdateSettingByIdResponses] export type GetSystemStatsData = { - body?: never; - path?: never; - query?: never; - url: '/api/system_stats'; -}; + body?: never + path?: never + query?: never + url: '/api/system_stats' +} export type GetSystemStatsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; -}; + /** + * Unauthorized + */ + 401: ErrorResponse +} -export type GetSystemStatsError = GetSystemStatsErrors[keyof GetSystemStatsErrors]; +export type GetSystemStatsError = + GetSystemStatsErrors[keyof GetSystemStatsErrors] export type GetSystemStatsResponses = { - /** - * Success - */ - 200: SystemStatsResponse; -}; + /** + * Success + */ + 200: SystemStatsResponse +} -export type GetSystemStatsResponse = GetSystemStatsResponses[keyof GetSystemStatsResponses]; +export type GetSystemStatsResponse = + GetSystemStatsResponses[keyof GetSystemStatsResponses] export type ListTagsData = { - body?: never; - path?: never; - query?: { - /** - * Filter tags by prefix - */ - prefix?: string; - /** - * Maximum number of tags to return (1-1000) - */ - limit?: number; - /** - * Number of tags to skip for pagination - */ - offset?: number; - /** - * Sort order for tags - */ - order?: 'count_desc' | 'name_asc'; - /** - * Include tags with zero usage count - */ - include_zero?: boolean; - /** - * Whether to include public/shared assets when counting tags - */ - include_public?: boolean; - }; - url: '/api/tags'; -}; - -export type ListTagsErrors = { + body?: never + path?: never + query?: { + /** + * Filter tags by prefix + */ + prefix?: string + /** + * Maximum number of tags to return (1-1000) + */ + limit?: number + /** + * Number of tags to skip for pagination + */ + offset?: number /** - * Invalid request parameters + * Sort order for tags */ - 400: ErrorResponse; + order?: 'count_desc' | 'name_asc' /** - * Unauthorized + * Include tags with zero usage count */ - 401: ErrorResponse; + include_zero?: boolean /** - * Internal server error + * Whether to include public/shared assets when counting tags */ - 500: ErrorResponse; -}; + include_public?: boolean + } + url: '/api/tags' +} -export type ListTagsError = ListTagsErrors[keyof ListTagsErrors]; +export type ListTagsErrors = { + /** + * Invalid request parameters + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListTagsError = ListTagsErrors[keyof ListTagsErrors] export type ListTagsResponses = { - /** - * Tags retrieved successfully - */ - 200: ListTagsResponse; -}; + /** + * Tags retrieved successfully + */ + 200: ListTagsResponse +} -export type ListTagsResponse2 = ListTagsResponses[keyof ListTagsResponses]; +export type ListTagsResponse2 = ListTagsResponses[keyof ListTagsResponses] export type ListTasksData = { - body?: never; - path?: never; - query?: { - /** - * Filter by task type name (exact match) - */ - task_name?: string; - /** - * Filter by idempotency key (exact match). For best performance, specify task_name as well. - */ - idempotency_key?: string; - /** - * Filter by one or more statuses (comma-separated) - */ - status?: string; - /** - * Filter tasks created after this timestamp (RFC3339 format) - */ - created_after?: string; - /** - * Filter tasks created before this timestamp (RFC3339 format) - */ - created_before?: string; - /** - * Sort direction (asc = ascending, desc = descending by create_time) - */ - sort_order?: 'asc' | 'desc'; - /** - * Pagination offset (0-based) - */ - offset?: number; - /** - * Maximum items per page (1-100) - */ - limit?: number; - }; - url: '/api/tasks'; -}; - -export type ListTasksErrors = { + body?: never + path?: never + query?: { + /** + * Filter by task type name (exact match) + */ + task_name?: string + /** + * Filter by idempotency key (exact match). For best performance, specify task_name as well. + */ + idempotency_key?: string + /** + * Filter by one or more statuses (comma-separated) + */ + status?: string /** - * Unauthorized - Authentication required + * Filter tasks created after this timestamp (RFC3339 format) */ - 401: ErrorResponse; + created_after?: string /** - * Validation error - Invalid filter values + * Filter tasks created before this timestamp (RFC3339 format) */ - 422: ErrorResponse; + created_before?: string /** - * Internal server error + * Sort direction (asc = ascending, desc = descending by create_time) */ - 500: ErrorResponse; -}; + sort_order?: 'asc' | 'desc' + /** + * Pagination offset (0-based) + */ + offset?: number + /** + * Maximum items per page (1-100) + */ + limit?: number + } + url: '/api/tasks' +} -export type ListTasksError = ListTasksErrors[keyof ListTasksErrors]; +export type ListTasksErrors = { + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Validation error - Invalid filter values + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListTasksError = ListTasksErrors[keyof ListTasksErrors] export type ListTasksResponses = { + /** + * Success - Tasks retrieved + */ + 200: TasksListResponse +} + +export type ListTasksResponse = ListTasksResponses[keyof ListTasksResponses] + +export type GetTaskData = { + body?: never + path: { /** - * Success - Tasks retrieved + * Task identifier (UUID) */ - 200: TasksListResponse; -}; + task_id: string + } + query?: never + url: '/api/tasks/{task_id}' +} -export type ListTasksResponse = ListTasksResponses[keyof ListTasksResponses]; +export type GetTaskErrors = { + /** + * Unauthorized - Authentication required + */ + 401: ErrorResponse + /** + * Task not found (also returned for ownership failures to avoid leaking task existence) + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetTaskError = GetTaskErrors[keyof GetTaskErrors] -export type GetTaskData = { - body?: never; - path: { - /** - * Task identifier (UUID) - */ - task_id: string; - }; - query?: never; - url: '/api/tasks/{task_id}'; -}; +export type GetTaskResponses = { + /** + * Success - Task details retrieved + */ + 200: TaskResponse +} -export type GetTaskErrors = { +export type GetTaskResponse = GetTaskResponses[keyof GetTaskResponses] + +export type UploadImageData = { + body: { /** - * Unauthorized - Authentication required + * The image file to upload */ - 401: ErrorResponse; + image: Blob | File /** - * Task not found (also returned for ownership failures to avoid leaking task existence) + * Whether to overwrite existing file (true/false) */ - 404: ErrorResponse; + overwrite?: string /** - * Internal server error + * Optional subfolder path */ - 500: ErrorResponse; -}; - -export type GetTaskError = GetTaskErrors[keyof GetTaskErrors]; - -export type GetTaskResponses = { + subfolder?: string /** - * Success - Task details retrieved + * Upload type (defaults to "output") */ - 200: TaskResponse; -}; - -export type GetTaskResponse = GetTaskResponses[keyof GetTaskResponses]; - -export type UploadImageData = { - body: { - /** - * The image file to upload - */ - image: Blob | File; - /** - * Whether to overwrite existing file (true/false) - */ - overwrite?: string; - /** - * Optional subfolder path - */ - subfolder?: string; - /** - * Upload type (defaults to "output") - */ - type?: string; - }; - path?: never; - query?: never; - url: '/api/upload/image'; -}; + type?: string + } + path?: never + query?: never + url: '/api/upload/image' +} export type UploadImageErrors = { + /** + * Bad request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type UploadImageError = UploadImageErrors[keyof UploadImageErrors] + +export type UploadImageResponses = { + /** + * Image uploaded successfully + */ + 200: { /** - * Bad request + * Filename of the uploaded image */ - 400: ErrorResponse; + name?: string /** - * Unauthorized + * Subfolder path where image was saved */ - 401: ErrorResponse; + subfolder?: string /** - * Internal server error + * Type of upload (e.g., "output") */ - 500: ErrorResponse; -}; + type?: string + } +} -export type UploadImageError = UploadImageErrors[keyof UploadImageErrors]; - -export type UploadImageResponses = { - /** - * Image uploaded successfully - */ - 200: { - /** - * Filename of the uploaded image - */ - name?: string; - /** - * Subfolder path where image was saved - */ - subfolder?: string; - /** - * Type of upload (e.g., "output") - */ - type?: string; - }; -}; - -export type UploadImageResponse = UploadImageResponses[keyof UploadImageResponses]; +export type UploadImageResponse = + UploadImageResponses[keyof UploadImageResponses] export type UploadMaskData = { - body: { - /** - * The mask image file to upload - */ - image: Blob | File; - /** - * JSON string containing reference to the original image - */ - original_ref: string; - }; - path?: never; - query?: never; - url: '/api/upload/mask'; -}; + body: { + /** + * The mask image file to upload + */ + image: Blob | File + /** + * JSON string containing reference to the original image + */ + original_ref: string + } + path?: never + query?: never + url: '/api/upload/mask' +} export type UploadMaskErrors = { + /** + * Bad request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type UploadMaskError = UploadMaskErrors[keyof UploadMaskErrors] + +export type UploadMaskResponses = { + /** + * Mask uploaded successfully + */ + 200: { /** - * Bad request + * Filename of the uploaded mask */ - 400: ErrorResponse; + name?: string /** - * Unauthorized + * Subfolder path where mask was saved */ - 401: ErrorResponse; + subfolder?: string /** - * Internal server error + * Type of upload (e.g., "output") */ - 500: ErrorResponse; -}; - -export type UploadMaskError = UploadMaskErrors[keyof UploadMaskErrors]; + type?: string + } +} -export type UploadMaskResponses = { - /** - * Mask uploaded successfully - */ - 200: { - /** - * Filename of the uploaded mask - */ - name?: string; - /** - * Subfolder path where mask was saved - */ - subfolder?: string; - /** - * Type of upload (e.g., "output") - */ - type?: string; - }; -}; - -export type UploadMaskResponse = UploadMaskResponses[keyof UploadMaskResponses]; +export type UploadMaskResponse = UploadMaskResponses[keyof UploadMaskResponses] export type GetUserData = { - body?: never; - path?: never; - query?: never; - url: '/api/user'; -}; + body?: never + path?: never + query?: never + url: '/api/user' +} export type GetUserErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; -}; + /** + * Unauthorized + */ + 401: ErrorResponse +} -export type GetUserError = GetUserErrors[keyof GetUserErrors]; +export type GetUserError = GetUserErrors[keyof GetUserErrors] export type GetUserResponses = { - /** - * Success - */ - 200: UserResponse; -}; + /** + * Success + */ + 200: UserResponse +} -export type GetUserResponse = GetUserResponses[keyof GetUserResponses]; +export type GetUserResponse = GetUserResponses[keyof GetUserResponses] export type GetUserdataData = { - body?: never; - path?: never; - query?: { - /** - * The directory to list files from. - */ - dir?: string; - /** - * Whether to list files recursively. - */ - recurse?: boolean; - /** - * Whether to split file information by type. - */ - split?: boolean; - /** - * Whether to return full file metadata. - */ - full_info?: boolean; - }; - url: '/api/userdata'; -}; - -export type GetUserdataErrors = { + body?: never + path?: never + query?: { /** - * Bad request (e.g., invalid filename). + * The directory to list files from. */ - 400: string; + dir?: string /** - * Unauthorized. + * Whether to list files recursively. */ - 401: string; + recurse?: boolean /** - * File not found or invalid path. + * Whether to split file information by type. */ - 404: string; + split?: boolean /** - * General error + * Whether to return full file metadata. */ - 500: string; -}; + full_info?: boolean + } + url: '/api/userdata' +} -export type GetUserdataError = GetUserdataErrors[keyof GetUserdataErrors]; +export type GetUserdataErrors = { + /** + * Bad request (e.g., invalid filename). + */ + 400: string + /** + * Unauthorized. + */ + 401: string + /** + * File not found or invalid path. + */ + 404: string + /** + * General error + */ + 500: string +} + +export type GetUserdataError = GetUserdataErrors[keyof GetUserdataErrors] export type GetUserdataResponses = { - /** - * A list of user data files. - */ - 200: GetUserDataResponseFull; -}; + /** + * A list of user data files. + */ + 200: GetUserDataResponseFull +} -export type GetUserdataResponse = GetUserdataResponses[keyof GetUserdataResponses]; +export type GetUserdataResponse = + GetUserdataResponses[keyof GetUserdataResponses] export type DeleteUserdataFileData = { - body?: never; - path: { - /** - * The file path to delete (URL encoded if necessary). - */ - file: string; - }; - query?: never; - url: '/api/userdata/{file}'; -}; - -export type DeleteUserdataFileErrors = { - /** - * Unauthorized. - */ - 401: string; - /** - * File not found. - */ - 404: string; + body?: never + path: { /** - * Internal server error. + * The file path to delete (URL encoded if necessary). */ - 500: string; -}; + file: string + } + query?: never + url: '/api/userdata/{file}' +} -export type DeleteUserdataFileError = DeleteUserdataFileErrors[keyof DeleteUserdataFileErrors]; +export type DeleteUserdataFileErrors = { + /** + * Unauthorized. + */ + 401: string + /** + * File not found. + */ + 404: string + /** + * Internal server error. + */ + 500: string +} + +export type DeleteUserdataFileError = + DeleteUserdataFileErrors[keyof DeleteUserdataFileErrors] export type DeleteUserdataFileResponses = { - /** - * File deleted successfully (No Content). - */ - 204: void; -}; + /** + * File deleted successfully (No Content). + */ + 204: void +} -export type DeleteUserdataFileResponse = DeleteUserdataFileResponses[keyof DeleteUserdataFileResponses]; +export type DeleteUserdataFileResponse = + DeleteUserdataFileResponses[keyof DeleteUserdataFileResponses] export type GetUserdataFileData = { - body?: never; - path: { - /** - * The filename of the user data to retrieve. - */ - file: string; - }; - query?: never; - url: '/api/userdata/{file}'; -}; - -export type GetUserdataFileErrors = { - /** - * Bad request (e.g., invalid filename). - */ - 400: string; + body?: never + path: { /** - * Unauthorized. + * The filename of the user data to retrieve. */ - 401: string; - /** - * File not found or invalid path. - */ - 404: string; - /** - * General error - */ - 500: string; -}; + file: string + } + query?: never + url: '/api/userdata/{file}' +} -export type GetUserdataFileError = GetUserdataFileErrors[keyof GetUserdataFileErrors]; +export type GetUserdataFileErrors = { + /** + * Bad request (e.g., invalid filename). + */ + 400: string + /** + * Unauthorized. + */ + 401: string + /** + * File not found or invalid path. + */ + 404: string + /** + * General error + */ + 500: string +} + +export type GetUserdataFileError = + GetUserdataFileErrors[keyof GetUserdataFileErrors] export type GetUserdataFileResponses = { - /** - * Successfully retrieved the file. - */ - 200: Blob | File; -}; + /** + * Successfully retrieved the file. + */ + 200: Blob | File +} -export type GetUserdataFileResponse = GetUserdataFileResponses[keyof GetUserdataFileResponses]; +export type GetUserdataFileResponse = + GetUserdataFileResponses[keyof GetUserdataFileResponses] export type PostUserdataFileData = { - body: Blob | File; - path: { - /** - * The target file path (URL encoded if necessary). - */ - file: string; - }; - query?: { - /** - * If "false", prevents overwriting existing files. Defaults to "true". - */ - overwrite?: 'true' | 'false'; - /** - * If "true", returns detailed file info; if "false", returns only the relative path. - */ - full_info?: 'true' | 'false'; - }; - url: '/api/userdata/{file}'; -}; - -export type PostUserdataFileErrors = { - /** - * Missing or invalid 'file' parameter. - */ - 400: string; - /** - * Unauthorized. - */ - 401: string; + body: Blob | File + path: { /** - * The requested path is not allowed. + * The target file path (URL encoded if necessary). */ - 403: string; + file: string + } + query?: { /** - * File already exists and overwrite is set to false. + * If "false", prevents overwriting existing files. Defaults to "true". */ - 409: string; + overwrite?: 'true' | 'false' /** - * General error + * If "true", returns detailed file info; if "false", returns only the relative path. */ - 500: string; -}; + full_info?: 'true' | 'false' + } + url: '/api/userdata/{file}' +} -export type PostUserdataFileError = PostUserdataFileErrors[keyof PostUserdataFileErrors]; +export type PostUserdataFileErrors = { + /** + * Missing or invalid 'file' parameter. + */ + 400: string + /** + * Unauthorized. + */ + 401: string + /** + * The requested path is not allowed. + */ + 403: string + /** + * File already exists and overwrite is set to false. + */ + 409: string + /** + * General error + */ + 500: string +} + +export type PostUserdataFileError = + PostUserdataFileErrors[keyof PostUserdataFileErrors] export type PostUserdataFileResponses = { - /** - * File uploaded successfully. - */ - 200: UserDataResponseFull; -}; + /** + * File uploaded successfully. + */ + 200: UserDataResponseFull +} -export type PostUserdataFileResponse = PostUserdataFileResponses[keyof PostUserdataFileResponses]; +export type PostUserdataFileResponse = + PostUserdataFileResponses[keyof PostUserdataFileResponses] export type MoveUserdataFileData = { - body?: never; - path: { - /** - * The source file path (URL encoded if necessary). - */ - file: string; - /** - * The destination file path (URL encoded if necessary). - */ - dest: string; - }; - query?: { - /** - * If "false", prevents overwriting existing files. Defaults to "true". - */ - overwrite?: 'true' | 'false'; - }; - url: '/api/userdata/{file}/move/{dest}'; -}; - -export type MoveUserdataFileErrors = { - /** - * Missing or invalid parameters. - */ - 400: string; + body?: never + path: { /** - * Unauthorized. + * The source file path (URL encoded if necessary). */ - 401: string; + file: string /** - * Source file not found. + * The destination file path (URL encoded if necessary). */ - 404: string; + dest: string + } + query?: { /** - * Destination file already exists and overwrite is set to false. + * If "false", prevents overwriting existing files. Defaults to "true". */ - 409: string; - /** - * General error - */ - 500: string; -}; + overwrite?: 'true' | 'false' + } + url: '/api/userdata/{file}/move/{dest}' +} -export type MoveUserdataFileError = MoveUserdataFileErrors[keyof MoveUserdataFileErrors]; +export type MoveUserdataFileErrors = { + /** + * Missing or invalid parameters. + */ + 400: string + /** + * Unauthorized. + */ + 401: string + /** + * Source file not found. + */ + 404: string + /** + * Destination file already exists and overwrite is set to false. + */ + 409: string + /** + * General error + */ + 500: string +} + +export type MoveUserdataFileError = + MoveUserdataFileErrors[keyof MoveUserdataFileErrors] export type MoveUserdataFileResponses = { - /** - * File moved successfully. - */ - 200: UserDataResponseFull; -}; + /** + * File moved successfully. + */ + 200: UserDataResponseFull +} -export type MoveUserdataFileResponse = MoveUserdataFileResponses[keyof MoveUserdataFileResponses]; +export type MoveUserdataFileResponse = + MoveUserdataFileResponses[keyof MoveUserdataFileResponses] export type GetUserdataFilePublishData = { - body?: never; - path: { - /** - * The workflow file path within the user's data directory (URL encoded if necessary). - */ - file: string; - }; - query?: never; - url: '/api/userdata/{file}/publish'; -}; - -export type GetUserdataFilePublishErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Workflow not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The workflow file path within the user's data directory (URL encoded if necessary). */ - 500: ErrorResponse; -}; + file: string + } + query?: never + url: '/api/userdata/{file}/publish' +} -export type GetUserdataFilePublishError = GetUserdataFilePublishErrors[keyof GetUserdataFilePublishErrors]; +export type GetUserdataFilePublishErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetUserdataFilePublishError = + GetUserdataFilePublishErrors[keyof GetUserdataFilePublishErrors] export type GetUserdataFilePublishResponses = { - /** - * Publish info (publish_time is null if never published) - */ - 200: WorkflowPublishInfo; -}; + /** + * Publish info (publish_time is null if never published) + */ + 200: WorkflowPublishInfo +} -export type GetUserdataFilePublishResponse = GetUserdataFilePublishResponses[keyof GetUserdataFilePublishResponses]; +export type GetUserdataFilePublishResponse = + GetUserdataFilePublishResponses[keyof GetUserdataFilePublishResponses] export type PostUserdataFilePublishData = { - body: PublishWorkflowAssetsRequest; - path: { - /** - * The workflow file path within the user's data directory (URL encoded if necessary). - */ - file: string; - }; - query?: never; - url: '/api/userdata/{file}/publish'; -}; - -export type PostUserdataFilePublishErrors = { - /** - * Bad request - */ - 400: ErrorResponse; - /** - * Unauthorized - */ - 401: ErrorResponse; + body: PublishWorkflowAssetsRequest + path: { /** - * Workflow not found + * The workflow file path within the user's data directory (URL encoded if necessary). */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + file: string + } + query?: never + url: '/api/userdata/{file}/publish' +} -export type PostUserdataFilePublishError = PostUserdataFilePublishErrors[keyof PostUserdataFilePublishErrors]; +export type PostUserdataFilePublishErrors = { + /** + * Bad request + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type PostUserdataFilePublishError = + PostUserdataFilePublishErrors[keyof PostUserdataFilePublishErrors] export type PostUserdataFilePublishResponses = { - /** - * Workflow published - */ - 200: WorkflowPublishInfo; -}; + /** + * Workflow published + */ + 200: WorkflowPublishInfo +} -export type PostUserdataFilePublishResponse = PostUserdataFilePublishResponses[keyof PostUserdataFilePublishResponses]; +export type PostUserdataFilePublishResponse = + PostUserdataFilePublishResponses[keyof PostUserdataFilePublishResponses] export type GetUsersInfoData = { - body?: never; - path?: never; - query?: never; - url: '/api/users'; -}; + body?: never + path?: never + query?: never + url: '/api/users' +} export type GetUsersInfoErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; -}; + /** + * Unauthorized + */ + 401: ErrorResponse +} -export type GetUsersInfoError = GetUsersInfoErrors[keyof GetUsersInfoErrors]; +export type GetUsersInfoError = GetUsersInfoErrors[keyof GetUsersInfoErrors] export type GetUsersInfoResponses = { + /** + * Userdata storage information + */ + 200: { + /** + * Whether user data has been migrated (always true in cloud) + */ + migrated: boolean /** - * Userdata storage information + * Where user data is stored (always "server" in cloud) */ - 200: { - /** - * Whether user data has been migrated (always true in cloud) - */ - migrated: boolean; - /** - * Where user data is stored (always "server" in cloud) - */ - storage: string; - }; -}; + storage: string + } +} -export type GetUsersInfoResponse = GetUsersInfoResponses[keyof GetUsersInfoResponses]; +export type GetUsersInfoResponse = + GetUsersInfoResponses[keyof GetUsersInfoResponses] export type GetLegacyUserdataV2Data = { - body?: never; - path?: never; - query?: never; - url: '/api/v2/userdata'; -}; + body?: never + path?: never + query?: never + url: '/api/v2/userdata' +} export type GetLegacyUserdataV2Errors = { - /** - * Not Found — use /api/userdata instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/userdata instead + */ + 404: unknown +} export type GetVhsQueryVideoData = { - body?: never; - path?: never; - query: { - /** - * Name of the video file to query - */ - filename: string; - }; - url: '/api/vhs/queryvideo'; -}; - -export type GetVhsQueryVideoErrors = { - /** - * Missing required query parameter. Produced by the oapi-codegen - * wrapper via echo.NewHTTPError; the custom Echo HTTPErrorHandler - * normalizes it to the standard ErrorResponse {code, message} shape - * (BE-1178). - * - */ - 400: ErrorResponse; + body?: never + path?: never + query: { /** - * Unauthorized + * Name of the video file to query */ - 401: ErrorResponse; -}; + filename: string + } + url: '/api/vhs/queryvideo' +} -export type GetVhsQueryVideoError = GetVhsQueryVideoErrors[keyof GetVhsQueryVideoErrors]; +export type GetVhsQueryVideoErrors = { + /** + * Missing required query parameter. Produced by the oapi-codegen + * wrapper via echo.NewHTTPError; the custom Echo HTTPErrorHandler + * normalizes it to the standard ErrorResponse {code, message} shape + * (BE-1178). + * + */ + 400: ErrorResponse + /** + * Unauthorized + */ + 401: ErrorResponse +} + +export type GetVhsQueryVideoError = + GetVhsQueryVideoErrors[keyof GetVhsQueryVideoErrors] export type GetVhsQueryVideoResponses = { - /** - * Video metadata - */ - 200: { - /** - * Source video metadata - */ - source: { - /** - * Duration in seconds - */ - duration: number; - /** - * Frames per second - */ - fps: number; - /** - * Total frame count - */ - frames: number; - /** - * [width, height] in pixels - */ - size: [ - number, - number - ]; - }; - }; -}; - -export type GetVhsQueryVideoResponse = GetVhsQueryVideoResponses[keyof GetVhsQueryVideoResponses]; + /** + * Video metadata + */ + 200: { + /** + * Source video metadata + */ + source: { + /** + * Duration in seconds + */ + duration: number + /** + * Frames per second + */ + fps: number + /** + * Total frame count + */ + frames: number + /** + * [width, height] in pixels + */ + size: [number, number] + } + } +} + +export type GetVhsQueryVideoResponse = + GetVhsQueryVideoResponses[keyof GetVhsQueryVideoResponses] export type GetVhsViewAudioData = { - body?: never; - path?: never; - query: { - /** - * Name of the audio file to view - */ - filename: string; - /** - * Type of file (e.g., output, input, temp) - */ - type?: string; - /** - * Subfolder path where the file is located - */ - subfolder?: string; - }; - url: '/api/vhs/viewaudio'; -}; - -export type GetVhsViewAudioErrors = { + body?: never + path?: never + query: { /** - * Unauthorized + * Name of the audio file to view */ - 401: unknown; -}; - -export type GetVhsViewAudioResponses = { + filename: string + /** + * Type of file (e.g., output, input, temp) + */ + type?: string /** - * Audio stream + * Subfolder path where the file is located */ - 200: unknown; -}; + subfolder?: string + } + url: '/api/vhs/viewaudio' +} -export type GetVhsViewVideoData = { - body?: never; - path?: never; - query: { - /** - * Name of the video file to view - */ - filename: string; - /** - * Type of file (e.g., output, input, temp) - */ - type?: string; - /** - * Subfolder path where the file is located - */ - subfolder?: string; - }; - url: '/api/vhs/viewvideo'; -}; +export type GetVhsViewAudioErrors = { + /** + * Unauthorized + */ + 401: unknown +} -export type GetVhsViewVideoErrors = { +export type GetVhsViewAudioResponses = { + /** + * Audio stream + */ + 200: unknown +} + +export type GetVhsViewVideoData = { + body?: never + path?: never + query: { /** - * Unauthorized + * Name of the video file to view */ - 401: unknown; -}; - -export type GetVhsViewVideoResponses = { + filename: string /** - * Video stream + * Type of file (e.g., output, input, temp) */ - 200: unknown; -}; + type?: string + /** + * Subfolder path where the file is located + */ + subfolder?: string + } + url: '/api/vhs/viewvideo' +} -export type ViewFileData = { - body?: never; - path?: never; - query: { - /** - * Name of the file to view - */ - filename: string; - /** - * Subfolder path where the file is located - */ - subfolder?: string; - /** - * Type of file (e.g., output, input, temp) - */ - type?: string; - /** - * Full path to the file (used for temp files) - */ - fullpath?: string; - /** - * Format of the file - */ - format?: string; - /** - * Frame rate for video files - */ - frame_rate?: number; - /** - * Workflow identifier - */ - workflow?: string; - /** - * Timestamp parameter - */ - timestamp?: number; - /** - * Image channel to extract from PNG images. - * - 'rgb': Return only RGB channels (alpha set to fully opaque) - * - 'a' or 'alpha': Return alpha channel as grayscale image - * - If not specified, return original image unchanged via redirect - * - */ - channel?: string; - /** - * Maximum dimension (width or height) to resize the image to, preserving aspect ratio. - * The image is fit within a res x res box. Returns a JPEG thumbnail. - * Only applies to raster image files (PNG, JPEG, WebP, GIF). - * - */ - res?: number; - }; - url: '/api/view'; -}; +export type GetVhsViewVideoErrors = { + /** + * Unauthorized + */ + 401: unknown +} -export type ViewFileErrors = { +export type GetVhsViewVideoResponses = { + /** + * Video stream + */ + 200: unknown +} + +export type ViewFileData = { + body?: never + path?: never + query: { /** - * Invalid request parameters + * Name of the file to view */ - 400: ErrorResponse; + filename: string /** - * File not found or unauthorized + * Subfolder path where the file is located */ - 404: ErrorResponse; + subfolder?: string /** - * Internal server error + * Type of file (e.g., output, input, temp) */ - 500: ErrorResponse; -}; + type?: string + /** + * Full path to the file (used for temp files) + */ + fullpath?: string + /** + * Format of the file + */ + format?: string + /** + * Frame rate for video files + */ + frame_rate?: number + /** + * Workflow identifier + */ + workflow?: string + /** + * Timestamp parameter + */ + timestamp?: number + /** + * Image channel to extract from PNG images. + * - 'rgb': Return only RGB channels (alpha set to fully opaque) + * - 'a' or 'alpha': Return alpha channel as grayscale image + * - If not specified, return original image unchanged via redirect + * + */ + channel?: string + /** + * Maximum dimension (width or height) to resize the image to, preserving aspect ratio. + * The image is fit within a res x res box. Returns a JPEG thumbnail. + * Only applies to raster image files (PNG, JPEG, WebP, GIF). + * + */ + res?: number + } + url: '/api/view' +} -export type ViewFileError = ViewFileErrors[keyof ViewFileErrors]; +export type ViewFileErrors = { + /** + * Invalid request parameters + */ + 400: ErrorResponse + /** + * File not found or unauthorized + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ViewFileError = ViewFileErrors[keyof ViewFileErrors] export type ViewFileResponses = { - /** - * Resized JPEG thumbnail (returned when res parameter is used) - */ - 200: Blob | File; -}; + /** + * Resized JPEG thumbnail (returned when res parameter is used) + */ + 200: Blob | File +} -export type ViewFileResponse = ViewFileResponses[keyof ViewFileResponses]; +export type ViewFileResponse = ViewFileResponses[keyof ViewFileResponses] export type GetLegacyViewMetadataData = { - body?: never; - path: { - folder_name: string; - }; - query?: never; - url: '/api/view_metadata/{folder_name}'; -}; + body?: never + path: { + folder_name: string + } + query?: never + url: '/api/view_metadata/{folder_name}' +} export type GetLegacyViewMetadataErrors = { - /** - * Not Found — use /api/experiment/models instead - */ - 404: unknown; -}; + /** + * Not Found — use /api/experiment/models instead + */ + 404: unknown +} export type GetApiViewVideoAliasData = { - body?: never; - path?: never; - query: { - /** - * Name of the file to view (see `/api/view` for the full handler contract) - */ - filename: string; - }; - url: '/api/viewvideo'; -}; - -export type GetApiViewVideoAliasErrors = { + body?: never + path?: never + query: { /** - * Unauthorized + * Name of the file to view (see `/api/view` for the full handler contract) */ - 401: unknown; -}; + filename: string + } + url: '/api/viewvideo' +} + +export type GetApiViewVideoAliasErrors = { + /** + * Unauthorized + */ + 401: unknown +} export type GetApiViewVideoAliasResponses = { - /** - * File stream - */ - 200: unknown; -}; + /** + * File stream + */ + 200: unknown +} export type GetWorkflowTemplatesData = { - body?: never; - path?: never; - query?: never; - url: '/api/workflow_templates'; -}; + body?: never + path?: never + query?: never + url: '/api/workflow_templates' +} export type GetWorkflowTemplatesResponses = { - /** - * Empty object for workflow templates - */ - 200: { - [key: string]: unknown; - }; -}; + /** + * Empty object for workflow templates + */ + 200: { + [key: string]: unknown + } +} -export type GetWorkflowTemplatesResponse = GetWorkflowTemplatesResponses[keyof GetWorkflowTemplatesResponses]; +export type GetWorkflowTemplatesResponse = + GetWorkflowTemplatesResponses[keyof GetWorkflowTemplatesResponses] export type ListWorkflowsData = { - body?: never; - path?: never; - query?: { - limit?: number; - offset?: number; - /** - * Search workflows by name (case-insensitive substring match) - */ - name?: string; - /** - * Filter by default view type - */ - default_view?: 'workflow' | 'app'; - /** - * Sort field - */ - sort?: 'create_time' | 'update_time' | 'name'; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - }; - url: '/api/workflows'; -}; - -export type ListWorkflowsErrors = { + body?: never + path?: never + query?: { + limit?: number + offset?: number + /** + * Search workflows by name (case-insensitive substring match) + */ + name?: string + /** + * Filter by default view type + */ + default_view?: 'workflow' | 'app' /** - * Unauthorized + * Sort field */ - 401: ErrorResponse; + sort?: 'create_time' | 'update_time' | 'name' /** - * Internal server error + * Sort order */ - 500: ErrorResponse; -}; + order?: 'asc' | 'desc' + } + url: '/api/workflows' +} -export type ListWorkflowsError = ListWorkflowsErrors[keyof ListWorkflowsErrors]; +export type ListWorkflowsErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListWorkflowsError = ListWorkflowsErrors[keyof ListWorkflowsErrors] export type ListWorkflowsResponses = { - /** - * Success - */ - 200: WorkflowListResponse; -}; + /** + * Success + */ + 200: WorkflowListResponse +} -export type ListWorkflowsResponse = ListWorkflowsResponses[keyof ListWorkflowsResponses]; +export type ListWorkflowsResponse = + ListWorkflowsResponses[keyof ListWorkflowsResponses] export type CreateWorkflowData = { - body: CreateWorkflowRequest; - path?: never; - query?: never; - url: '/api/workflows'; -}; + body: CreateWorkflowRequest + path?: never + query?: never + url: '/api/workflows' +} export type CreateWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CreateWorkflowError = CreateWorkflowErrors[keyof CreateWorkflowErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateWorkflowError = + CreateWorkflowErrors[keyof CreateWorkflowErrors] export type CreateWorkflowResponses = { - /** - * Workflow created successfully - */ - 201: WorkflowResponse; -}; + /** + * Workflow created successfully + */ + 201: WorkflowResponse +} -export type CreateWorkflowResponse = CreateWorkflowResponses[keyof CreateWorkflowResponses]; +export type CreateWorkflowResponse = + CreateWorkflowResponses[keyof CreateWorkflowResponses] export type DeleteWorkflowData = { - body?: never; - path: { - /** - * The UUID of the workflow to delete. - */ - workflow_id: string; - }; - query?: never; - url: '/api/workflows/{workflow_id}'; -}; - -export type DeleteWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Workflow not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The UUID of the workflow to delete. */ - 500: ErrorResponse; -}; + workflow_id: string + } + query?: never + url: '/api/workflows/{workflow_id}' +} -export type DeleteWorkflowError = DeleteWorkflowErrors[keyof DeleteWorkflowErrors]; +export type DeleteWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type DeleteWorkflowError = + DeleteWorkflowErrors[keyof DeleteWorkflowErrors] export type DeleteWorkflowResponses = { - /** - * Workflow deleted successfully - */ - 204: void; -}; + /** + * Workflow deleted successfully + */ + 204: void +} -export type DeleteWorkflowResponse = DeleteWorkflowResponses[keyof DeleteWorkflowResponses]; +export type DeleteWorkflowResponse = + DeleteWorkflowResponses[keyof DeleteWorkflowResponses] export type GetWorkflowData = { - body?: never; - path: { - /** - * The UUID of the workflow. - */ - workflow_id: string; - }; - query?: never; - url: '/api/workflows/{workflow_id}'; -}; - -export type GetWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Forbidden - */ - 403: ErrorResponse; - /** - * Workflow not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The UUID of the workflow. */ - 500: ErrorResponse; -}; + workflow_id: string + } + query?: never + url: '/api/workflows/{workflow_id}' +} -export type GetWorkflowError = GetWorkflowErrors[keyof GetWorkflowErrors]; +export type GetWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden + */ + 403: ErrorResponse + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetWorkflowError = GetWorkflowErrors[keyof GetWorkflowErrors] export type GetWorkflowResponses = { - /** - * Success - */ - 200: WorkflowResponse; -}; + /** + * Success + */ + 200: WorkflowResponse +} -export type GetWorkflowResponse = GetWorkflowResponses[keyof GetWorkflowResponses]; +export type GetWorkflowResponse = + GetWorkflowResponses[keyof GetWorkflowResponses] export type UpdateWorkflowData = { - body: UpdateWorkflowRequest; - path: { - /** - * The UUID of the workflow to update. - */ - workflow_id: string; - }; - query?: never; - url: '/api/workflows/{workflow_id}'; -}; - -export type UpdateWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Workflow not found - */ - 404: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; + body: UpdateWorkflowRequest + path: { /** - * Internal server error + * The UUID of the workflow to update. */ - 500: ErrorResponse; -}; + workflow_id: string + } + query?: never + url: '/api/workflows/{workflow_id}' +} -export type UpdateWorkflowError = UpdateWorkflowErrors[keyof UpdateWorkflowErrors]; +export type UpdateWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type UpdateWorkflowError = + UpdateWorkflowErrors[keyof UpdateWorkflowErrors] export type UpdateWorkflowResponses = { - /** - * Success - */ - 200: WorkflowResponse; -}; + /** + * Success + */ + 200: WorkflowResponse +} -export type UpdateWorkflowResponse = UpdateWorkflowResponses[keyof UpdateWorkflowResponses]; +export type UpdateWorkflowResponse = + UpdateWorkflowResponses[keyof UpdateWorkflowResponses] export type GetWorkflowContentData = { - body?: never; - path: { - /** - * The UUID of the workflow whose content should be retrieved. - */ - workflow_id: string; - }; - query?: never; - url: '/api/workflows/{workflow_id}/content'; -}; - -export type GetWorkflowContentErrors = { + body?: never + path: { /** - * Unauthorized + * The UUID of the workflow whose content should be retrieved. */ - 401: ErrorResponse; - /** - * Forbidden - */ - 403: ErrorResponse; - /** - * Workflow not found - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + workflow_id: string + } + query?: never + url: '/api/workflows/{workflow_id}/content' +} -export type GetWorkflowContentError = GetWorkflowContentErrors[keyof GetWorkflowContentErrors]; +export type GetWorkflowContentErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden + */ + 403: ErrorResponse + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetWorkflowContentError = + GetWorkflowContentErrors[keyof GetWorkflowContentErrors] export type GetWorkflowContentResponses = { - /** - * Success - */ - 200: WorkflowVersionContentResponse; -}; + /** + * Success + */ + 200: WorkflowVersionContentResponse +} -export type GetWorkflowContentResponse = GetWorkflowContentResponses[keyof GetWorkflowContentResponses]; +export type GetWorkflowContentResponse = + GetWorkflowContentResponses[keyof GetWorkflowContentResponses] export type ForkWorkflowData = { - body: ForkWorkflowRequest; - path: { - /** - * The UUID of the source workflow to fork from. - */ - workflow_id: string; - }; - query?: never; - url: '/api/workflows/{workflow_id}/fork'; -}; - -export type ForkWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Forbidden - */ - 403: ErrorResponse; - /** - * Source workflow or version not found - */ - 404: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; + body: ForkWorkflowRequest + path: { /** - * Internal server error + * The UUID of the source workflow to fork from. */ - 500: ErrorResponse; -}; + workflow_id: string + } + query?: never + url: '/api/workflows/{workflow_id}/fork' +} -export type ForkWorkflowError = ForkWorkflowErrors[keyof ForkWorkflowErrors]; +export type ForkWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden + */ + 403: ErrorResponse + /** + * Source workflow or version not found + */ + 404: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ForkWorkflowError = ForkWorkflowErrors[keyof ForkWorkflowErrors] export type ForkWorkflowResponses = { - /** - * Workflow forked successfully - */ - 201: WorkflowResponse; -}; + /** + * Workflow forked successfully + */ + 201: WorkflowResponse +} -export type ForkWorkflowResponse = ForkWorkflowResponses[keyof ForkWorkflowResponses]; +export type ForkWorkflowResponse = + ForkWorkflowResponses[keyof ForkWorkflowResponses] export type CreateWorkflowVersionData = { - body: CreateWorkflowVersionRequest; - path: { - /** - * The UUID of the workflow to create a new version for. - */ - workflow_id: string; - }; - query?: never; - url: '/api/workflows/{workflow_id}/versions'; -}; - -export type CreateWorkflowVersionErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Forbidden - not the workflow owner - */ - 403: ErrorResponse; - /** - * Workflow not found - */ - 404: ErrorResponse; - /** - * Version conflict - base_version does not match latest - */ - 409: ErrorResponse; + body: CreateWorkflowVersionRequest + path: { /** - * Validation error + * The UUID of the workflow to create a new version for. */ - 422: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + workflow_id: string + } + query?: never + url: '/api/workflows/{workflow_id}/versions' +} -export type CreateWorkflowVersionError = CreateWorkflowVersionErrors[keyof CreateWorkflowVersionErrors]; +export type CreateWorkflowVersionErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden - not the workflow owner + */ + 403: ErrorResponse + /** + * Workflow not found + */ + 404: ErrorResponse + /** + * Version conflict - base_version does not match latest + */ + 409: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateWorkflowVersionError = + CreateWorkflowVersionErrors[keyof CreateWorkflowVersionErrors] export type CreateWorkflowVersionResponses = { - /** - * Version created successfully - */ - 201: WorkflowVersionResponse; -}; + /** + * Version created successfully + */ + 201: WorkflowVersionResponse +} -export type CreateWorkflowVersionResponse = CreateWorkflowVersionResponses[keyof CreateWorkflowVersionResponses]; +export type CreateWorkflowVersionResponse = + CreateWorkflowVersionResponses[keyof CreateWorkflowVersionResponses] export type GetPublishedWorkflowData = { - body?: never; - path: { - /** - * The share ID of the published workflow. - */ - share_id: string; - }; - query?: never; - url: '/api/workflows/published/{share_id}'; -}; - -export type GetPublishedWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Share not found - */ - 404: ErrorResponse; - /** - * Workflow JSON too large - */ - 413: ErrorResponse; + body?: never + path: { /** - * Internal server error + * The share ID of the published workflow. */ - 500: ErrorResponse; -}; + share_id: string + } + query?: never + url: '/api/workflows/published/{share_id}' +} -export type GetPublishedWorkflowError = GetPublishedWorkflowErrors[keyof GetPublishedWorkflowErrors]; +export type GetPublishedWorkflowErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Share not found + */ + 404: ErrorResponse + /** + * Workflow JSON too large + */ + 413: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetPublishedWorkflowError = + GetPublishedWorkflowErrors[keyof GetPublishedWorkflowErrors] export type GetPublishedWorkflowResponses = { - /** - * Published workflow details with asset statuses - */ - 200: PublishedWorkflowDetail; -}; + /** + * Published workflow details with asset statuses + */ + 200: PublishedWorkflowDetail +} -export type GetPublishedWorkflowResponse = GetPublishedWorkflowResponses[keyof GetPublishedWorkflowResponses]; +export type GetPublishedWorkflowResponse = + GetPublishedWorkflowResponses[keyof GetPublishedWorkflowResponses] export type ListWorkspaceApiKeysData = { - body?: never; - path?: never; - query?: never; - url: '/api/workspace/api-keys'; -}; + body?: never + path?: never + query?: never + url: '/api/workspace/api-keys' +} export type ListWorkspaceApiKeysErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Forbidden - */ - 403: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type ListWorkspaceApiKeysError = ListWorkspaceApiKeysErrors[keyof ListWorkspaceApiKeysErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Forbidden + */ + 403: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListWorkspaceApiKeysError = + ListWorkspaceApiKeysErrors[keyof ListWorkspaceApiKeysErrors] export type ListWorkspaceApiKeysResponses = { - /** - * List of API keys - */ - 200: ListWorkspaceApiKeysResponse; -}; + /** + * List of API keys + */ + 200: ListWorkspaceApiKeysResponse +} -export type ListWorkspaceApiKeysResponse2 = ListWorkspaceApiKeysResponses[keyof ListWorkspaceApiKeysResponses]; +export type ListWorkspaceApiKeysResponse2 = + ListWorkspaceApiKeysResponses[keyof ListWorkspaceApiKeysResponses] export type CreateWorkspaceApiKeyData = { - body: CreateWorkspaceApiKeyRequest; - path?: never; - query?: never; - url: '/api/workspace/api-keys'; -}; + body: CreateWorkspaceApiKeyRequest + path?: never + query?: never + url: '/api/workspace/api-keys' +} export type CreateWorkspaceApiKeyErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Not a workspace member - */ - 403: ErrorResponse; - /** - * Workspace not found - */ - 404: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; - /** - * Key limit reached - */ - 429: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CreateWorkspaceApiKeyError = CreateWorkspaceApiKeyErrors[keyof CreateWorkspaceApiKeyErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Not a workspace member + */ + 403: ErrorResponse + /** + * Workspace not found + */ + 404: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Key limit reached + */ + 429: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateWorkspaceApiKeyError = + CreateWorkspaceApiKeyErrors[keyof CreateWorkspaceApiKeyErrors] export type CreateWorkspaceApiKeyResponses = { - /** - * API key created (plaintext returned once) - */ - 201: CreateWorkspaceApiKeyResponse; -}; + /** + * API key created (plaintext returned once) + */ + 201: CreateWorkspaceApiKeyResponse +} -export type CreateWorkspaceApiKeyResponse2 = CreateWorkspaceApiKeyResponses[keyof CreateWorkspaceApiKeyResponses]; +export type CreateWorkspaceApiKeyResponse2 = + CreateWorkspaceApiKeyResponses[keyof CreateWorkspaceApiKeyResponses] export type RevokeWorkspaceApiKeyData = { - body?: never; - path: { - /** - * API key ID to revoke - */ - id: string; - }; - query?: never; - url: '/api/workspace/api-keys/{id}'; -}; - -export type RevokeWorkspaceApiKeyErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Not authorized to revoke this key - */ - 403: ErrorResponse; - /** - * API key not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * API key ID to revoke */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/workspace/api-keys/{id}' +} -export type RevokeWorkspaceApiKeyError = RevokeWorkspaceApiKeyErrors[keyof RevokeWorkspaceApiKeyErrors]; +export type RevokeWorkspaceApiKeyErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Not authorized to revoke this key + */ + 403: ErrorResponse + /** + * API key not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type RevokeWorkspaceApiKeyError = + RevokeWorkspaceApiKeyErrors[keyof RevokeWorkspaceApiKeyErrors] export type RevokeWorkspaceApiKeyResponses = { - /** - * API key revoked - */ - 204: void; -}; + /** + * API key revoked + */ + 204: void +} -export type RevokeWorkspaceApiKeyResponse = RevokeWorkspaceApiKeyResponses[keyof RevokeWorkspaceApiKeyResponses]; +export type RevokeWorkspaceApiKeyResponse = + RevokeWorkspaceApiKeyResponses[keyof RevokeWorkspaceApiKeyResponses] export type ListWorkspaceInvitesData = { - body?: never; - path?: never; - query?: never; - url: '/api/workspace/invites'; -}; + body?: never + path?: never + query?: never + url: '/api/workspace/invites' +} export type ListWorkspaceInvitesErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Owner role required - */ - 403: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type ListWorkspaceInvitesError = ListWorkspaceInvitesErrors[keyof ListWorkspaceInvitesErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Owner role required + */ + 403: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListWorkspaceInvitesError = + ListWorkspaceInvitesErrors[keyof ListWorkspaceInvitesErrors] export type ListWorkspaceInvitesResponses = { - /** - * List of pending invites - */ - 200: ListInvitesResponse; -}; + /** + * List of pending invites + */ + 200: ListInvitesResponse +} -export type ListWorkspaceInvitesResponse = ListWorkspaceInvitesResponses[keyof ListWorkspaceInvitesResponses]; +export type ListWorkspaceInvitesResponse = + ListWorkspaceInvitesResponses[keyof ListWorkspaceInvitesResponses] export type CreateWorkspaceInviteData = { - body: CreateInviteRequest; - path?: never; - query?: never; - url: '/api/workspace/invites'; -}; + body: CreateInviteRequest + path?: never + query?: never + url: '/api/workspace/invites' +} export type CreateWorkspaceInviteErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Owner role required or personal workspace (invites not allowed) - */ - 403: ErrorResponse; - /** - * Workspace not found - */ - 404: ErrorResponse; - /** - * Invite already exists - */ - 409: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CreateWorkspaceInviteError = CreateWorkspaceInviteErrors[keyof CreateWorkspaceInviteErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Owner role required or personal workspace (invites not allowed) + */ + 403: ErrorResponse + /** + * Workspace not found + */ + 404: ErrorResponse + /** + * Invite already exists + */ + 409: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateWorkspaceInviteError = + CreateWorkspaceInviteErrors[keyof CreateWorkspaceInviteErrors] export type CreateWorkspaceInviteResponses = { - /** - * Invite created - */ - 201: PendingInvite; -}; + /** + * Invite created + */ + 201: PendingInvite +} -export type CreateWorkspaceInviteResponse = CreateWorkspaceInviteResponses[keyof CreateWorkspaceInviteResponses]; +export type CreateWorkspaceInviteResponse = + CreateWorkspaceInviteResponses[keyof CreateWorkspaceInviteResponses] export type RevokeWorkspaceInviteData = { - body?: never; - path: { - /** - * Invite ID to revoke - */ - inviteId: string; - }; - query?: never; - url: '/api/workspace/invites/{inviteId}'; -}; - -export type RevokeWorkspaceInviteErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Owner role required - */ - 403: ErrorResponse; - /** - * Workspace or invite not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * Invite ID to revoke */ - 500: ErrorResponse; -}; + inviteId: string + } + query?: never + url: '/api/workspace/invites/{inviteId}' +} -export type RevokeWorkspaceInviteError = RevokeWorkspaceInviteErrors[keyof RevokeWorkspaceInviteErrors]; +export type RevokeWorkspaceInviteErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Owner role required + */ + 403: ErrorResponse + /** + * Workspace or invite not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type RevokeWorkspaceInviteError = + RevokeWorkspaceInviteErrors[keyof RevokeWorkspaceInviteErrors] export type RevokeWorkspaceInviteResponses = { - /** - * Invite revoked - */ - 204: void; -}; + /** + * Invite revoked + */ + 204: void +} -export type RevokeWorkspaceInviteResponse = RevokeWorkspaceInviteResponses[keyof RevokeWorkspaceInviteResponses]; +export type RevokeWorkspaceInviteResponse = + RevokeWorkspaceInviteResponses[keyof RevokeWorkspaceInviteResponses] export type LeaveWorkspaceData = { - body?: never; - path?: never; - query?: never; - url: '/api/workspace/leave'; -}; + body?: never + path?: never + query?: never + url: '/api/workspace/leave' +} export type LeaveWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Cannot leave as the only owner or cannot leave personal workspace - */ - 403: ErrorResponse; - /** - * Workspace not found or not a member - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type LeaveWorkspaceError = LeaveWorkspaceErrors[keyof LeaveWorkspaceErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Cannot leave as the only owner or cannot leave personal workspace + */ + 403: ErrorResponse + /** + * Workspace not found or not a member + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type LeaveWorkspaceError = + LeaveWorkspaceErrors[keyof LeaveWorkspaceErrors] export type LeaveWorkspaceResponses = { - /** - * Successfully left workspace - */ - 204: void; -}; + /** + * Successfully left workspace + */ + 204: void +} -export type LeaveWorkspaceResponse = LeaveWorkspaceResponses[keyof LeaveWorkspaceResponses]; +export type LeaveWorkspaceResponse = + LeaveWorkspaceResponses[keyof LeaveWorkspaceResponses] export type ListWorkspaceMembersData = { - body?: never; - path?: never; - query?: { - /** - * Pagination offset (0-based) - */ - offset?: number; - /** - * Maximum number of members to return - */ - limit?: number; - }; - url: '/api/workspace/members'; -}; - -export type ListWorkspaceMembersErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Not a member of this workspace - */ - 403: ErrorResponse; - /** - * Workspace not found - */ - 404: ErrorResponse; + body?: never + path?: never + query?: { /** - * Validation error + * Pagination offset (0-based) */ - 422: ErrorResponse; + offset?: number /** - * Internal server error + * Maximum number of members to return */ - 500: ErrorResponse; -}; + limit?: number + } + url: '/api/workspace/members' +} -export type ListWorkspaceMembersError = ListWorkspaceMembersErrors[keyof ListWorkspaceMembersErrors]; +export type ListWorkspaceMembersErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Not a member of this workspace + */ + 403: ErrorResponse + /** + * Workspace not found + */ + 404: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListWorkspaceMembersError = + ListWorkspaceMembersErrors[keyof ListWorkspaceMembersErrors] export type ListWorkspaceMembersResponses = { - /** - * List of members - */ - 200: ListMembersResponse; -}; + /** + * List of members + */ + 200: ListMembersResponse +} -export type ListWorkspaceMembersResponse = ListWorkspaceMembersResponses[keyof ListWorkspaceMembersResponses]; +export type ListWorkspaceMembersResponse = + ListWorkspaceMembersResponses[keyof ListWorkspaceMembersResponses] export type BulkRevokeWorkspaceMemberApiKeysData = { - body?: never; - path: { - /** - * Firebase UID of the member whose keys to revoke (must be non-empty) - */ - user_id: string; - }; - query?: never; - url: '/api/workspace/members/{user_id}/api-keys'; -}; - -export type BulkRevokeWorkspaceMemberApiKeysErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; + body?: never + path: { /** - * Not authorized (must be workspace owner) + * Firebase UID of the member whose keys to revoke (must be non-empty) */ - 403: ErrorResponse; - /** - * Validation error (e.g. empty user_id) - */ - 422: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + user_id: string + } + query?: never + url: '/api/workspace/members/{user_id}/api-keys' +} -export type BulkRevokeWorkspaceMemberApiKeysError = BulkRevokeWorkspaceMemberApiKeysErrors[keyof BulkRevokeWorkspaceMemberApiKeysErrors]; +export type BulkRevokeWorkspaceMemberApiKeysErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Not authorized (must be workspace owner) + */ + 403: ErrorResponse + /** + * Validation error (e.g. empty user_id) + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type BulkRevokeWorkspaceMemberApiKeysError = + BulkRevokeWorkspaceMemberApiKeysErrors[keyof BulkRevokeWorkspaceMemberApiKeysErrors] export type BulkRevokeWorkspaceMemberApiKeysResponses = { - /** - * Keys revoked successfully - */ - 200: BulkRevokeApiKeysResponse; -}; + /** + * Keys revoked successfully + */ + 200: BulkRevokeApiKeysResponse +} -export type BulkRevokeWorkspaceMemberApiKeysResponse = BulkRevokeWorkspaceMemberApiKeysResponses[keyof BulkRevokeWorkspaceMemberApiKeysResponses]; +export type BulkRevokeWorkspaceMemberApiKeysResponse = + BulkRevokeWorkspaceMemberApiKeysResponses[keyof BulkRevokeWorkspaceMemberApiKeysResponses] export type RemoveWorkspaceMemberData = { - body?: never; - path: { - /** - * User ID to remove - */ - userId: string; - }; - query?: never; - url: '/api/workspace/members/{userId}'; -}; - -export type RemoveWorkspaceMemberErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Owner role required or cannot remove yourself - */ - 403: ErrorResponse; - /** - * Workspace or member not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * User ID to remove */ - 500: ErrorResponse; -}; + userId: string + } + query?: never + url: '/api/workspace/members/{userId}' +} -export type RemoveWorkspaceMemberError = RemoveWorkspaceMemberErrors[keyof RemoveWorkspaceMemberErrors]; +export type RemoveWorkspaceMemberErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Owner role required or cannot remove yourself + */ + 403: ErrorResponse + /** + * Workspace or member not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type RemoveWorkspaceMemberError = + RemoveWorkspaceMemberErrors[keyof RemoveWorkspaceMemberErrors] export type RemoveWorkspaceMemberResponses = { - /** - * Member removed - */ - 204: void; -}; + /** + * Member removed + */ + 204: void +} -export type RemoveWorkspaceMemberResponse = RemoveWorkspaceMemberResponses[keyof RemoveWorkspaceMemberResponses]; +export type RemoveWorkspaceMemberResponse = + RemoveWorkspaceMemberResponses[keyof RemoveWorkspaceMemberResponses] export type UpdateWorkspaceMemberRoleData = { - body: UpdateMemberRoleRequest; - path: { - /** - * User ID whose role is being changed - */ - userId: string; - }; - query?: never; - url: '/api/workspace/members/{userId}'; -}; - -export type UpdateWorkspaceMemberRoleErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Owner role required, or the original owner cannot be demoted - */ - 403: ErrorResponse; + body: UpdateMemberRoleRequest + path: { /** - * Workspace or member not found + * User ID whose role is being changed */ - 404: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + userId: string + } + query?: never + url: '/api/workspace/members/{userId}' +} -export type UpdateWorkspaceMemberRoleError = UpdateWorkspaceMemberRoleErrors[keyof UpdateWorkspaceMemberRoleErrors]; +export type UpdateWorkspaceMemberRoleErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Owner role required, or the original owner cannot be demoted + */ + 403: ErrorResponse + /** + * Workspace or member not found + */ + 404: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type UpdateWorkspaceMemberRoleError = + UpdateWorkspaceMemberRoleErrors[keyof UpdateWorkspaceMemberRoleErrors] export type UpdateWorkspaceMemberRoleResponses = { - /** - * Member role updated - */ - 200: Member; -}; + /** + * Member role updated + */ + 200: Member +} -export type UpdateWorkspaceMemberRoleResponse = UpdateWorkspaceMemberRoleResponses[keyof UpdateWorkspaceMemberRoleResponses]; +export type UpdateWorkspaceMemberRoleResponse = + UpdateWorkspaceMemberRoleResponses[keyof UpdateWorkspaceMemberRoleResponses] export type ListWorkspacesData = { - body?: never; - path?: never; - query?: never; - url: '/api/workspaces'; -}; + body?: never + path?: never + query?: never + url: '/api/workspaces' +} export type ListWorkspacesErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Feature not enabled for user - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type ListWorkspacesError = ListWorkspacesErrors[keyof ListWorkspacesErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Feature not enabled for user + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type ListWorkspacesError = + ListWorkspacesErrors[keyof ListWorkspacesErrors] export type ListWorkspacesResponses = { - /** - * List of workspaces - */ - 200: ListWorkspacesResponse; -}; + /** + * List of workspaces + */ + 200: ListWorkspacesResponse +} -export type ListWorkspacesResponse2 = ListWorkspacesResponses[keyof ListWorkspacesResponses]; +export type ListWorkspacesResponse2 = + ListWorkspacesResponses[keyof ListWorkspacesResponses] export type CreateWorkspaceData = { - body: CreateWorkspaceRequest; - path?: never; - query?: never; - url: '/api/workspaces'; -}; + body: CreateWorkspaceRequest + path?: never + query?: never + url: '/api/workspaces' +} export type CreateWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Feature not enabled for user - */ - 404: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; - -export type CreateWorkspaceError = CreateWorkspaceErrors[keyof CreateWorkspaceErrors]; + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Feature not enabled for user + */ + 404: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type CreateWorkspaceError = + CreateWorkspaceErrors[keyof CreateWorkspaceErrors] export type CreateWorkspaceResponses = { - /** - * Workspace created - */ - 201: Workspace; -}; + /** + * Workspace created + */ + 201: Workspace +} -export type CreateWorkspaceResponse = CreateWorkspaceResponses[keyof CreateWorkspaceResponses]; +export type CreateWorkspaceResponse = + CreateWorkspaceResponses[keyof CreateWorkspaceResponses] export type DeleteWorkspaceData = { - body?: never; - path: { - /** - * Workspace ID (w-{uuid} format) - */ - id: string; - }; - query?: never; - url: '/api/workspaces/{id}'; -}; - -export type DeleteWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Owner role required or cannot delete personal workspace - */ - 403: ErrorResponse; - /** - * Workspace not found - */ - 404: ErrorResponse; + body?: never + path: { /** - * Internal server error + * Workspace ID (w-{uuid} format) */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/workspaces/{id}' +} -export type DeleteWorkspaceError = DeleteWorkspaceErrors[keyof DeleteWorkspaceErrors]; +export type DeleteWorkspaceErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Owner role required or cannot delete personal workspace + */ + 403: ErrorResponse + /** + * Workspace not found + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type DeleteWorkspaceError = + DeleteWorkspaceErrors[keyof DeleteWorkspaceErrors] export type DeleteWorkspaceResponses = { - /** - * Workspace deleted - */ - 204: void; -}; + /** + * Workspace deleted + */ + 204: void +} -export type DeleteWorkspaceResponse = DeleteWorkspaceResponses[keyof DeleteWorkspaceResponses]; +export type DeleteWorkspaceResponse = + DeleteWorkspaceResponses[keyof DeleteWorkspaceResponses] export type GetWorkspaceData = { - body?: never; - path: { - /** - * Workspace ID (w-{uuid} format) - */ - id: string; - }; - query?: never; - url: '/api/workspaces/{id}'; -}; - -export type GetWorkspaceErrors = { + body?: never + path: { /** - * Unauthorized + * Workspace ID (w-{uuid} format) */ - 401: ErrorResponse; - /** - * Workspace not found or user not a member - */ - 404: ErrorResponse; - /** - * Internal server error - */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/workspaces/{id}' +} -export type GetWorkspaceError = GetWorkspaceErrors[keyof GetWorkspaceErrors]; +export type GetWorkspaceErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Workspace not found or user not a member + */ + 404: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type GetWorkspaceError = GetWorkspaceErrors[keyof GetWorkspaceErrors] export type GetWorkspaceResponses = { - /** - * Workspace details - */ - 200: Workspace; -}; + /** + * Workspace details + */ + 200: Workspace +} -export type GetWorkspaceResponse = GetWorkspaceResponses[keyof GetWorkspaceResponses]; +export type GetWorkspaceResponse = + GetWorkspaceResponses[keyof GetWorkspaceResponses] export type UpdateWorkspaceData = { - body: UpdateWorkspaceRequest; - path: { - /** - * Workspace ID (w-{uuid} format) - */ - id: string; - }; - query?: never; - url: '/api/workspaces/{id}'; -}; - -export type UpdateWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse; - /** - * Owner role required - */ - 403: ErrorResponse; - /** - * Workspace not found - */ - 404: ErrorResponse; - /** - * Validation error - */ - 422: ErrorResponse; + body: UpdateWorkspaceRequest + path: { /** - * Internal server error + * Workspace ID (w-{uuid} format) */ - 500: ErrorResponse; -}; + id: string + } + query?: never + url: '/api/workspaces/{id}' +} -export type UpdateWorkspaceError = UpdateWorkspaceErrors[keyof UpdateWorkspaceErrors]; +export type UpdateWorkspaceErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse + /** + * Owner role required + */ + 403: ErrorResponse + /** + * Workspace not found + */ + 404: ErrorResponse + /** + * Validation error + */ + 422: ErrorResponse + /** + * Internal server error + */ + 500: ErrorResponse +} + +export type UpdateWorkspaceError = + UpdateWorkspaceErrors[keyof UpdateWorkspaceErrors] export type UpdateWorkspaceResponses = { - /** - * Workspace updated - */ - 200: Workspace; -}; + /** + * Workspace updated + */ + 200: Workspace +} -export type UpdateWorkspaceResponse = UpdateWorkspaceResponses[keyof UpdateWorkspaceResponses]; +export type UpdateWorkspaceResponse = + UpdateWorkspaceResponses[keyof UpdateWorkspaceResponses] export type GetStaticExtensionsData = { - body?: never; - path: { - /** - * Extension file path relative to /static/extensions on disk. - */ - path: string; - }; - query?: never; - url: '/extensions/{path}'; -}; - -export type GetStaticExtensionsErrors = { + body?: never + path: { /** - * File not found + * Extension file path relative to /static/extensions on disk. */ - 404: unknown; -}; + path: string + } + query?: never + url: '/extensions/{path}' +} + +export type GetStaticExtensionsErrors = { + /** + * File not found + */ + 404: unknown +} export type GetStaticExtensionsResponses = { - /** - * Static file - */ - 200: unknown; -}; + /** + * Static file + */ + 200: unknown +} export type GetHealthData = { - body?: never; - path?: never; - query?: never; - url: '/health'; -}; + body?: never + path?: never + query?: never + url: '/health' +} export type GetHealthErrors = { - /** - * Service is unhealthy - */ - 503: string; -}; + /** + * Service is unhealthy + */ + 503: string +} -export type GetHealthError = GetHealthErrors[keyof GetHealthErrors]; +export type GetHealthError = GetHealthErrors[keyof GetHealthErrors] export type GetHealthResponses = { - /** - * Service is healthy - */ - 200: string; -}; + /** + * Service is healthy + */ + 200: string +} -export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses]; +export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses] export type GetInternalFolderPathsData = { - body?: never; - path?: never; - query?: never; - url: '/internal/folder_paths'; -}; + body?: never + path?: never + query?: never + url: '/internal/folder_paths' +} export type GetInternalFolderPathsResponses = { - /** - * Map of folder type name to list of path entries - */ - 200: { - [key: string]: Array>; - }; -}; + /** + * Map of folder type name to list of path entries + */ + 200: { + [key: string]: Array> + } +} -export type GetInternalFolderPathsResponse = GetInternalFolderPathsResponses[keyof GetInternalFolderPathsResponses]; +export type GetInternalFolderPathsResponse = + GetInternalFolderPathsResponses[keyof GetInternalFolderPathsResponses] export type GetInternalLogsData = { - body?: never; - path?: never; - query?: never; - url: '/internal/logs'; -}; + body?: never + path?: never + query?: never + url: '/internal/logs' +} export type GetInternalLogsResponses = { - /** - * Log text - */ - 200: string; -}; + /** + * Log text + */ + 200: string +} -export type GetInternalLogsResponse = GetInternalLogsResponses[keyof GetInternalLogsResponses]; +export type GetInternalLogsResponse = + GetInternalLogsResponses[keyof GetInternalLogsResponses] export type GetInternalLogsRawData = { - body?: never; - path?: never; - query?: never; - url: '/internal/logs/raw'; -}; + body?: never + path?: never + query?: never + url: '/internal/logs/raw' +} export type GetInternalLogsRawResponses = { - /** - * Structured log data - */ - 200: { - entries?: Array<{ - /** - * Message - */ - m?: string; - /** - * Timestamp - */ - t?: number; - }>; - size?: { - cols?: number; - rows?: number; - }; - }; -}; - -export type GetInternalLogsRawResponse = GetInternalLogsRawResponses[keyof GetInternalLogsRawResponses]; + /** + * Structured log data + */ + 200: { + entries?: Array<{ + /** + * Message + */ + m?: string + /** + * Timestamp + */ + t?: number + }> + size?: { + cols?: number + rows?: number + } + } +} + +export type GetInternalLogsRawResponse = + GetInternalLogsRawResponses[keyof GetInternalLogsRawResponses] export type SubscribeToLogsData = { - body: { - /** - * WebSocket client ID - */ - clientId: string; - /** - * Enable or disable log streaming for this client - */ - enabled: boolean; - }; - path?: never; - query?: never; - url: '/internal/logs/subscribe'; -}; - -export type SubscribeToLogsResponses = { - /** - * Subscription updated - */ - 200: unknown; -}; - -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 = { + body: { /** - * Invalid authorize request (pre-redirect failure — unknown client, redirect mismatch, malformed params). Content-negotiated; browser navigations (Accept includes text/html without application/json) receive a self-contained HTML error page instead of JSON. + * WebSocket client ID */ - 400: ErrorResponse; + clientId: string /** - * OAuth disabled + * Enable or disable log streaming for this client */ - 404: ErrorResponse; -}; + enabled: boolean + } + path?: never + query?: never + url: '/internal/logs/subscribe' +} -export type GetOAuthAuthorizeError = GetOAuthAuthorizeErrors[keyof GetOAuthAuthorizeErrors]; +export type SubscribeToLogsResponses = { + /** + * Subscription updated + */ + 200: unknown +} -export type GetOAuthAuthorizeResponses = { - /** - * Consent challenge payload (cookie present, email verified). Frontend renders the consent UI from this payload and POSTs back to /oauth/authorize. +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. * */ - 200: OAuthConsentChallenge; -}; + 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). Content-negotiated; browser navigations (Accept includes text/html without application/json) receive a self-contained HTML error page instead of JSON. + */ + 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 GetOAuthAuthorizeResponse = + GetOAuthAuthorizeResponses[keyof GetOAuthAuthorizeResponses] export type PostOAuthAuthorizeData = { - body: { - csrf_token: string; - decision: 'allow' | 'deny'; - oauth_request_id: string; - workspace_id: string; - }; - path?: never; - query?: never; - url: '/oauth/authorize'; -}; + body: { + csrf_token: string + decision: 'allow' | 'deny' + oauth_request_id: string + 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]; + /** + * 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; -}; + /** + * 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 PostOAuthAuthorizeResponse = + PostOAuthAuthorizeResponses[keyof PostOAuthAuthorizeResponses] export type PostOAuthRegisterData = { - body: OAuthRegisterRequest; - path?: never; - query?: never; - url: '/oauth/register'; -}; + 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, reserved client_name, etc.) OR `ErrorResponse` (emitted by the strict-server binding layer when the request body fails OpenAPI-schema validation — malformed JSON, missing required fields, `additionalProperties: false` violations — normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler, BE-1178). - * - */ - 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]; + /** + * Bad request. Two shapes possible: `OAuthRegisterError` (RFC 7591 §3.2.2, emitted by the handler for invalid client metadata, reserved client_name, etc.) OR `ErrorResponse` (emitted by the strict-server binding layer when the request body fails OpenAPI-schema validation — malformed JSON, missing required fields, `additionalProperties: false` violations — normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler, BE-1178). + * + */ + 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; -}; + /** + * Registered. Body echoes the metadata RFC 7591 §3.2.1 requires. + */ + 201: OAuthRegisterResponse +} -export type PostOAuthRegisterResponse = PostOAuthRegisterResponses[keyof PostOAuthRegisterResponses]; +export type PostOAuthRegisterResponse = + PostOAuthRegisterResponses[keyof PostOAuthRegisterResponses] export type PostOAuthTokenData = { - body: { - client_id: string; - client_secret?: string; - code?: string; - code_verifier?: string; - grant_type: 'authorization_code' | 'refresh_token'; - redirect_uri?: string; - refresh_token?: string; - scope?: string; - }; - path?: never; - query?: never; - url: '/oauth/token'; -}; + body: { + client_id: string + client_secret?: string + code?: string + code_verifier?: string + grant_type: 'authorization_code' | 'refresh_token' + redirect_uri?: string + refresh_token?: string + scope?: 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]; + /** + * 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; -}; + /** + * New token pair + */ + 200: OAuthTokenResponse +} -export type PostOAuthTokenResponse = PostOAuthTokenResponses[keyof PostOAuthTokenResponses]; +export type PostOAuthTokenResponse = + PostOAuthTokenResponses[keyof PostOAuthTokenResponses] export type GetTemplateProxyData = { - body?: never; - path: { - /** - * Template subpath within the versioned GCS bucket. - */ - path: string; - }; - query?: never; - url: '/templates/{path}'; -}; - -export type GetTemplateProxyErrors = { - /** - * Template not found. - */ - 404: unknown; + body?: never + path: { /** - * Workflow templates version not available. + * Template subpath within the versioned GCS bucket. */ - 503: unknown; -}; + path: string + } + query?: never + url: '/templates/{path}' +} + +export type GetTemplateProxyErrors = { + /** + * Template not found. + */ + 404: unknown + /** + * Workflow templates version not available. + */ + 503: unknown +} export type GetTemplateProxyResponses = { - /** - * Template file content streamed from GCS. - */ - 200: unknown; -}; + /** + * Template file content streamed from GCS. + */ + 200: unknown +} export type GetViewCompatAliasData = { - body?: never; - path?: never; - query: { - /** - * Name of the file to view (see `/api/view` for the full handler contract) - */ - filename: string; - }; - url: '/view'; -}; - -export type GetViewCompatAliasErrors = { + body?: never + path?: never + query: { /** - * Unauthorized + * Name of the file to view (see `/api/view` for the full handler contract) */ - 401: unknown; -}; + filename: string + } + url: '/view' +} + +export type GetViewCompatAliasErrors = { + /** + * Unauthorized + */ + 401: unknown +} export type GetViewCompatAliasResponses = { - /** - * File stream - */ - 200: unknown; -}; + /** + * File stream + */ + 200: unknown +} export type GetWebsocketData = { - body?: never; - path?: never; - query?: { - /** - * Stable client identifier used to associate the WebSocket - * connection with the frontend session. If omitted, the server - * generates one. - * - */ - clientId?: string; - }; - url: '/ws'; -}; - -export type GetWebsocketErrors = { + body?: never + path?: never + query?: { /** - * Unauthorized + * Stable client identifier used to associate the WebSocket + * connection with the frontend session. If omitted, the server + * generates one. + * */ - 401: unknown; -}; + clientId?: string + } + url: '/ws' +} + +export type GetWebsocketErrors = { + /** + * Unauthorized + */ + 401: unknown +} diff --git a/packages/ingest-types/src/zod.gen.ts b/packages/ingest-types/src/zod.gen.ts index a417f516334..b710e0501ef 100644 --- a/packages/ingest-types/src/zod.gen.ts +++ b/packages/ingest-types/src/zod.gen.ts @@ -1,136 +1,136 @@ // This file is auto-generated by @hey-api/openapi-ts -import { z } from 'zod'; +import { z } from 'zod' /** * Subscription tier (uppercase to match comfy-api) */ export const zSubscriptionTier = z.enum([ - 'FREE', - 'STANDARD', - 'CREATOR', - 'PRO', - 'FOUNDERS_EDITION', - 'TEAM' -]); + 'FREE', + 'STANDARD', + 'CREATOR', + 'PRO', + 'FOUNDERS_EDITION', + 'TEAM' +]) /** * Workspace entity annotated with the requesting user's role. */ export const zWorkspaceWithRole = z.object({ - created_at: z.string().datetime(), - id: z.string(), - joined_at: z.string().datetime(), - name: z.string(), - role: z.enum(['owner', 'member']), - subscription_tier: zSubscriptionTier.optional(), - type: z.enum(['personal', 'team']) -}); + created_at: z.string().datetime(), + id: z.string(), + joined_at: z.string().datetime(), + name: z.string(), + role: z.enum(['owner', 'member']), + subscription_tier: zSubscriptionTier.optional(), + type: z.enum(['personal', 'team']) +}) /** * Abbreviated workspace metadata used in list responses. */ export const zWorkspaceSummary = z.object({ - id: z.string(), - name: z.string(), - type: z.enum(['personal', 'team']) -}); + id: z.string(), + name: z.string(), + type: z.enum(['personal', 'team']) +}) /** * Metadata for a workspace-scoped API key (secret is never returned). */ export const zWorkspaceApiKeyInfo = z.object({ - created_at: z.string().datetime(), - description: z.string().max(5000), - expires_at: z.string().datetime().optional(), - id: z.string().uuid(), - key_prefix: z.string(), - last_used_at: z.string().datetime().optional(), - name: z.string(), - revoked_at: z.string().datetime().optional(), - user_id: z.string(), - workspace_id: z.string() -}); + created_at: z.string().datetime(), + description: z.string().max(5000), + expires_at: z.string().datetime().optional(), + id: z.string().uuid(), + key_prefix: z.string(), + last_used_at: z.string().datetime().optional(), + name: z.string(), + revoked_at: z.string().datetime().optional(), + user_id: z.string(), + workspace_id: z.string() +}) /** * Full workspace entity with configuration and ownership details. */ export const zWorkspace = z.object({ - created_at: z.string().datetime(), - id: z.string(), - name: z.string(), - type: z.enum(['personal', 'team']) -}); + created_at: z.string().datetime(), + id: z.string(), + name: z.string(), + type: z.enum(['personal', 'team']) +}) /** * Metadata for a single workflow version. */ export const zWorkflowVersionResponse = z.object({ - created_at: z.string().datetime(), - created_by: z.string(), - id: z.string(), - latest_version: z.number().int(), - version: z.number().int() -}); + created_at: z.string().datetime(), + created_by: z.string(), + id: z.string(), + latest_version: z.number().int(), + version: z.number().int() +}) /** * Full workflow version including the serialized workflow JSON. */ export const zWorkflowVersionContentResponse = z.object({ - created_at: z.string().datetime(), - created_by: z.string(), - dependency_asset_ids: z.array(z.string()).optional(), - id: z.string(), - version: z.number().int(), - workflow_json: z.record(z.unknown()) -}); + created_at: z.string().datetime(), + created_by: z.string(), + dependency_asset_ids: z.array(z.string()).optional(), + id: z.string(), + version: z.number().int(), + workflow_json: z.record(z.unknown()) +}) /** * Reference to the parent workflow from which this workflow was forked. */ export const zWorkflowForkedFrom = z.object({ - workflow_id: z.string().optional(), - workflow_version_id: z.string().optional() -}); + workflow_id: z.string().optional(), + workflow_version_id: z.string().optional() +}) /** * Full workflow entity including metadata and version history. */ export const zWorkflowResponse = z.object({ - created_at: z.string().datetime(), - created_by: z.string(), - default_view: z.enum(['workflow', 'app']).optional(), - description: z.string().optional(), - forked_from: zWorkflowForkedFrom.optional(), - id: z.string(), - latest_version: z.number().int(), - name: z.string().optional(), - updated_at: z.string().datetime() -}); + created_at: z.string().datetime(), + created_by: z.string(), + default_view: z.enum(['workflow', 'app']).optional(), + description: z.string().optional(), + forked_from: zWorkflowForkedFrom.optional(), + id: z.string(), + latest_version: z.number().int(), + name: z.string().optional(), + updated_at: z.string().datetime() +}) /** * Lightweight asset reference used in workflow publishing payloads. */ export const zAssetInfo = z.object({ - id: z.string(), - in_library: z.boolean(), - model: z.boolean(), - name: z.string(), - preview_url: z.string(), - public: z.boolean(), - storage_url: z.string() -}); + id: z.string(), + in_library: z.boolean(), + model: z.boolean(), + name: z.string(), + preview_url: z.string(), + public: z.boolean(), + storage_url: z.string() +}) /** * Publishing metadata for a workflow shared to the Hub. */ export const zWorkflowPublishInfo = z.object({ - assets: z.array(zAssetInfo), - listed: z.boolean(), - publish_time: z.string().datetime().nullish(), - share_id: z.string(), - workflow_id: z.string() -}); + assets: z.array(zAssetInfo), + listed: z.boolean(), + publish_time: z.string().datetime().nullish(), + share_id: z.string(), + workflow_id: z.string() +}) /** * Pagination metadata included in list responses. Supports both legacy @@ -140,118 +140,140 @@ export const zWorkflowPublishInfo = z.object({ * */ export const zPaginationInfo = z.object({ - has_more: z.boolean(), - limit: z.number().int().gte(1), - next_cursor: z.string().optional(), - offset: z.number().int().gte(0), - total: z.number().int().gte(0) -}); + has_more: z.boolean(), + limit: z.number().int().gte(1), + next_cursor: z.string().optional(), + offset: z.number().int().gte(0), + total: z.number().int().gte(0) +}) /** * Paginated list of saved workflows. */ export const zWorkflowListResponse = z.object({ - data: z.array(zWorkflowResponse), - pagination: zPaginationInfo -}); + data: z.array(zWorkflowResponse), + pagination: zPaginationInfo +}) /** * Response containing assets associated with a workflow. */ export const zWorkflowApiAssetsResponse = z.object({ - assets: z.array(zAssetInfo) -}); + assets: z.array(zAssetInfo) +}) /** * Request body for querying assets associated with a workflow. */ export const zWorkflowApiAssetsRequest = z.object({ - workflow_api_json: z.record(z.unknown()) -}); + workflow_api_json: z.record(z.unknown()) +}) /** * Details of a single validation error encountered during asset operations. */ export const zValidationError = z.object({ - code: z.string(), - field: z.string(), - message: z.string() -}); + code: z.string(), + field: z.string(), + message: z.string() +}) /** * Result of validating a set of asset operations. */ export const zValidationResult = z.object({ - errors: z.array(zValidationError).optional(), - is_valid: z.boolean(), - warnings: z.array(zValidationError).optional() -}); + errors: z.array(zValidationError).optional(), + is_valid: z.boolean(), + warnings: z.array(zValidationError).optional() +}) /** * User information response */ export const zUserResponse = z.object({ - id: z.string(), - status: z.string() -}); + id: z.string(), + status: z.string() +}) /** * User data listing entry with file metadata (path, size, modification time). */ export const zUserDataResponseFull = z.object({ - modified: 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(), - path: z.string().optional(), - size: z.number().int().optional() -}); + modified: 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(), + path: z.string().optional(), + size: z.number().int().optional() +}) /** * Request body for updating an existing workspace's settings. */ export const zUpdateWorkspaceRequest = z.object({ - name: z.string().min(1).max(100).optional() -}); + name: z.string().min(1).max(100).optional() +}) /** * Request body for updating an existing saved workflow. */ export const zUpdateWorkflowRequest = z.object({ - default_view: z.enum(['workflow', 'app']).optional(), - description: z.string().optional(), - name: z.string().optional() -}); + default_view: z.enum(['workflow', 'app']).optional(), + description: z.string().optional(), + name: z.string().optional() +}) /** * Request body for updating an existing user secret. */ export const zUpdateSecretRequest = z.object({ - name: z.string().min(1).max(255).optional(), - secret_value: z.string().min(1).optional() -}); + name: z.string().min(1).max(255).optional(), + secret_value: z.string().min(1).optional() +}) /** * Request body for changing a workspace member's role. */ export const zUpdateMemberRoleRequest = z.object({ - role: z.enum(['owner', 'member']) -}); + role: z.enum(['owner', 'member']) +}) /** * Request body for updating an existing Hub profile. */ export const zUpdateHubProfileRequest = z.object({ - avatar_token: z.string().nullish(), - description: z.string().optional(), - display_name: z.string().optional(), - website_urls: z.array(z.string()).optional() -}); + avatar_token: z.string().nullish(), + description: z.string().optional(), + display_name: z.string().optional(), + website_urls: z.array(z.string()).optional() +}) /** * Pre/post-discount price for a team credit stop, in cents. */ export const zTeamCreditStopPrice = z.object({ - list_price_cents: 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' }), - price_cents: 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' }) -}); + list_price_cents: 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' + }), + price_cents: 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' + }) +}) /** * A selectable preset on the team pricing slider. Echoed on subscribe via @@ -261,19 +283,26 @@ export const zTeamCreditStopPrice = z.object({ * */ export const zTeamCreditStop = z.object({ - credits: 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' }), - id: z.string(), - monthly: zTeamCreditStopPrice, - yearly: zTeamCreditStopPrice -}); + credits: 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' + }), + id: z.string(), + monthly: zTeamCreditStopPrice, + yearly: zTeamCreditStopPrice +}) /** * Credit-stop ladder for the pricing slider (BE-1254). Returned by GET /api/billing/plans for every workspace regardless of the caller's token or workspace type (the personal/team distinction was removed); omitted only when the catalog defines no stops. */ export const zTeamCreditStops = z.object({ - default_stop_index: z.number().int(), - stops: z.array(zTeamCreditStop) -}); + default_stop_index: z.number().int(), + stops: z.array(zTeamCreditStop) +}) /** * The team credit stop a workspace is currently subscribed to: the @@ -284,1019 +313,1185 @@ export const zTeamCreditStops = z.object({ * */ export const zTeamCreditStopSummary = z.object({ - credits_monthly: 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' }), - id: z.string(), - stop_usd: 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' }) -}); + credits_monthly: 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' + }), + id: z.string(), + stop_usd: 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' + }) +}) /** * Task data for list views */ export const zTaskEntry = z.object({ - completed_at: z.string().datetime().optional(), - create_time: z.string().datetime(), - id: z.string().uuid(), - started_at: z.string().datetime().optional(), - status: z.enum([ - 'created', - 'running', - 'completed', - 'failed' - ]), - task_name: z.string() -}); + completed_at: z.string().datetime().optional(), + create_time: z.string().datetime(), + id: z.string().uuid(), + started_at: z.string().datetime().optional(), + status: z.enum(['created', 'running', 'completed', 'failed']), + task_name: z.string() +}) /** * Paginated list of background tasks for the authenticated user. */ export const zTasksListResponse = z.object({ - pagination: zPaginationInfo, - tasks: z.array(zTaskEntry) -}); + pagination: zPaginationInfo, + tasks: z.array(zTaskEntry) +}) /** * Full task details including payload and result */ export const zTaskResponse = z.object({ - completed_at: z.string().datetime().optional(), - create_time: z.string().datetime(), - error_message: z.string().optional(), - id: z.string().uuid(), - idempotency_key: z.string(), - payload: z.record(z.unknown()), - result: z.record(z.unknown()).optional(), - started_at: z.string().datetime().optional(), - status: z.enum([ - 'created', - 'running', - 'completed', - 'failed' - ]), - task_name: z.string(), - update_time: z.string().datetime() -}); + completed_at: z.string().datetime().optional(), + create_time: z.string().datetime(), + error_message: z.string().optional(), + id: z.string().uuid(), + idempotency_key: z.string(), + payload: z.record(z.unknown()), + result: z.record(z.unknown()).optional(), + started_at: z.string().datetime().optional(), + status: z.enum(['created', 'running', 'completed', 'failed']), + task_name: z.string(), + update_time: z.string().datetime() +}) /** * Response after adding, updating, or removing tags on an asset. */ export const zTagsModificationResponse = z.object({ - added: z.array(z.string()).optional(), - already_present: z.array(z.string()).optional(), - not_present: z.array(z.string()).optional(), - removed: z.array(z.string()).optional(), - total_tags: z.array(z.string()) -}); + added: z.array(z.string()).optional(), + already_present: z.array(z.string()).optional(), + not_present: z.array(z.string()).optional(), + removed: z.array(z.string()).optional(), + total_tags: z.array(z.string()) +}) /** * Metadata for a single tag that can be applied to assets. */ export const zTagInfo = z.object({ - count: z.number().int(), - name: z.string() -}); + count: z.number().int(), + name: z.string() +}) /** * System statistics response */ export const zSystemStatsResponse = z.object({ - devices: z.array(z.object({ - name: z.string(), - type: z.string(), - vram_free: z.number().optional(), - vram_total: z.number().optional() - })), - system: z.object({ - argv: z.array(z.string()), - cloud_version: z.string().optional(), - comfyui_frontend_version: z.string().optional(), - comfyui_version: z.string(), - deploy_environment: z.string().optional(), - embedded_python: z.boolean(), - os: z.string(), - python_version: z.string(), - pytorch_version: z.string(), - ram_free: z.number(), - ram_total: z.number(), - workflow_templates_version: z.string().optional() - }) -}); + devices: z.array( + z.object({ + name: z.string(), + type: z.string(), + vram_free: z.number().optional(), + vram_total: z.number().optional() + }) + ), + system: z.object({ + argv: z.array(z.string()), + cloud_version: z.string().optional(), + comfyui_frontend_version: z.string().optional(), + comfyui_version: z.string(), + deploy_environment: z.string().optional(), + embedded_python: z.boolean(), + os: z.string(), + python_version: z.string(), + pytorch_version: z.string(), + ram_free: z.number(), + ram_total: z.number(), + workflow_templates_version: z.string().optional() + }) +}) /** * Billing period (uppercase to match comfy-api) */ -export const zSubscriptionDuration = z.enum(['MONTHLY', 'ANNUAL']); +export const zSubscriptionDuration = z.enum(['MONTHLY', 'ANNUAL']) /** * Response after successfully subscribing to a billing plan. */ export const zSubscribeResponse = z.object({ - billing_op_id: z.string(), - effective_at: z.string().datetime().optional(), - payment_method_url: z.string().optional(), - status: z.enum([ - 'subscribed', - 'needs_payment_method', - 'pending_payment' - ]) -}); + billing_op_id: z.string(), + effective_at: z.string().datetime().optional(), + payment_method_url: z.string().optional(), + status: z.enum(['subscribed', 'needs_payment_method', 'pending_payment']) +}) /** * Request body for subscribing a workspace to a billing plan. */ export const zSubscribeRequest = z.object({ - billing_cycle: z.enum(['monthly', 'yearly']).optional(), - cancel_url: z.string().optional(), - idempotency_key: z.string().optional(), - plan_slug: z.string(), - return_url: z.string().optional(), - team_credit_stop_id: z.string().optional() -}); + billing_cycle: z.enum(['monthly', 'yearly']).optional(), + cancel_url: z.string().optional(), + idempotency_key: z.string().optional(), + plan_slug: z.string(), + return_url: z.string().optional(), + team_credit_stop_id: z.string().optional() +}) /** * User secret metadata (the secret value itself is never returned after creation). */ export const zSecretResponse = z.object({ - created_at: z.string().datetime(), - id: z.string().uuid(), - last_used_at: z.string().datetime().optional(), - name: z.string(), - provider: z.string().optional(), - updated_at: z.string().datetime() -}); + created_at: z.string().datetime(), + id: z.string().uuid(), + last_used_at: z.string().datetime().optional(), + name: z.string(), + provider: z.string().optional(), + updated_at: z.string().datetime() +}) /** * A provider the user may configure a secret for. The shape is deliberately minimal (identifier only) and reserved for future per-provider fields such as sub-keys. */ export const zSecretProvider = z.object({ - id: z.string() -}); + id: z.string() +}) /** * The providers available to the authenticated user in the current workspace. */ export const zSecretProvidersResponse = z.object({ - data: z.array(zSecretProvider) -}); + data: z.array(zSecretProvider) +}) /** * List of user secrets with metadata only. */ export const zSecretListResponse = z.object({ - data: z.array(zSecretResponse) -}); + data: z.array(zSecretResponse) +}) /** * Response after accepting a resubscribe request. */ export const zResubscribeResponse = z.object({ - billing_op_id: z.string(), - message: z.string().optional(), - status: z.enum(['active', 'pending']) -}); + billing_op_id: z.string(), + message: z.string().optional(), + status: z.enum(['active', 'pending']) +}) /** * Request body for reactivating a previously cancelled subscription. */ export const zResubscribeRequest = z.object({ - idempotency_key: z.string().optional() -}); + idempotency_key: z.string().optional() +}) /** * Response after a queue management action (delete or clear). */ export const zQueueManageResponse = z.object({ - cleared: z.boolean().optional(), - deleted: z.array(z.string()).optional() -}); + cleared: z.boolean().optional(), + deleted: z.array(z.string()).optional() +}) /** * Request to manage queue operations */ export const zQueueManageRequest = z.object({ - clear: z.boolean().optional(), - delete: z.array(z.string()).optional() -}); + clear: z.boolean().optional(), + delete: z.array(z.string()).optional() +}) /** * Queue information with pending and running jobs */ export const zQueueInfo = z.object({ - queue_pending: z.array(z.tuple([ - z.unknown(), - z.unknown(), - z.unknown(), - z.unknown(), - z.unknown() - ])).optional(), - queue_running: z.array(z.tuple([ - z.unknown(), - z.unknown(), - z.unknown(), - z.unknown(), - z.unknown() - ])).optional() -}); + queue_pending: z + .array( + z.tuple([z.unknown(), z.unknown(), z.unknown(), z.unknown(), z.unknown()]) + ) + .optional(), + queue_running: z + .array( + z.tuple([z.unknown(), z.unknown(), z.unknown(), z.unknown(), z.unknown()]) + ) + .optional() +}) /** * Full detail of a publicly published workflow on the Hub. */ export const zPublishedWorkflowDetail = z.object({ - assets: z.array(zAssetInfo), - listed: z.boolean(), - name: z.string(), - publish_time: z.string().datetime().nullish(), - share_id: z.string(), - workflow_id: z.string(), - workflow_json: z.record(z.unknown()) -}); + assets: z.array(zAssetInfo), + listed: z.boolean(), + name: z.string(), + publish_time: z.string().datetime().nullish(), + share_id: z.string(), + workflow_id: z.string(), + workflow_json: z.record(z.unknown()) +}) /** * Request body for publishing workflow assets to the Hub. */ export const zPublishWorkflowAssetsRequest = z.object({ - asset_ids: z.array(z.string()) -}); + asset_ids: z.array(z.string()) +}) /** * Request body for publishing or updating a workflow on the Hub. */ export const zPublishHubWorkflowRequest = z.object({ - asset_ids: z.array(z.string()), - custom_nodes: z.array(z.string()).optional(), - description: z.string().optional(), - metadata: z.record(z.unknown()).optional(), - models: z.array(z.string()).optional(), - name: z.string(), - sample_image_tokens_or_urls: z.array(z.string()).optional(), - tags: z.array(z.string()).optional(), - thumbnail_comparison_token_or_url: z.string().optional(), - thumbnail_token_or_url: z.string().optional(), - thumbnail_type: z.enum([ - 'image', - 'video', - 'image_comparison' - ]).optional(), - tutorial_url: z.string().optional(), - username: z.string(), - workflow_filename: z.string() -}); + asset_ids: z.array(z.string()), + custom_nodes: z.array(z.string()).optional(), + description: z.string().optional(), + metadata: z.record(z.unknown()).optional(), + models: z.array(z.string()).optional(), + name: z.string(), + sample_image_tokens_or_urls: z.array(z.string()).optional(), + tags: z.array(z.string()).optional(), + thumbnail_comparison_token_or_url: z.string().optional(), + thumbnail_token_or_url: z.string().optional(), + thumbnail_type: z.enum(['image', 'video', 'image_comparison']).optional(), + tutorial_url: z.string().optional(), + username: z.string(), + workflow_filename: z.string() +}) /** * Response returned after successfully queuing a workflow prompt. */ export const zPromptResponse = z.object({ - node_errors: z.record(z.unknown()).optional(), - number: z.number().optional(), - prompt_id: z.string().uuid().optional() -}); + node_errors: z.record(z.unknown()).optional(), + number: z.number().optional(), + prompt_id: z.string().uuid().optional() +}) /** * Request body for submitting a ComfyUI workflow prompt for execution. */ export const zPromptRequest = z.object({ - extra_data: z.record(z.unknown()).optional(), - front: z.boolean().optional(), - number: z.number().optional(), - partial_execution_targets: z.array(z.string()).optional(), - prompt: z.record(z.unknown()), - workflow_id: z.string().optional(), - workflow_version_id: z.string().optional() -}); + extra_data: z.record(z.unknown()).optional(), + front: z.boolean().optional(), + number: z.number().optional(), + partial_execution_targets: z.array(z.string()).optional(), + prompt: z.record(z.unknown()), + workflow_id: z.string().optional(), + workflow_version_id: z.string().optional() +}) /** * Metadata about the currently running and queued prompts. */ export const zPromptInfo = z.object({ - exec_info: z.object({ - queue_remaining: z.number().int().optional() - }).optional() -}); + exec_info: z + .object({ + queue_remaining: z.number().int().optional() + }) + .optional() +}) /** * Error response for ComfyUI prompt execution. */ -export const zPromptErrorResponse = z.record(z.unknown()); +export const zPromptErrorResponse = z.record(z.unknown()) /** * Summary of seat costs based on current workspace members */ export const zPlanSeatSummary = z.object({ - seat_count: z.number().int(), - total_cost_cents: 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' }), - total_credits_cents: 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' }) -}); + seat_count: z.number().int(), + total_cost_cents: 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' + }), + total_credits_cents: 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' + }) +}) /** * Plan information for preview display */ export const zPreviewPlanInfo = z.object({ - credits_cents: 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' }), - duration: zSubscriptionDuration, - period_end: z.string().datetime().optional(), - period_start: z.string().datetime().optional(), - price_cents: 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' }), - seat_summary: zPlanSeatSummary, - slug: z.string(), - tier: zSubscriptionTier -}); + credits_cents: 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' + }), + duration: zSubscriptionDuration, + period_end: z.string().datetime().optional(), + period_start: z.string().datetime().optional(), + price_cents: 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' + }), + seat_summary: zPlanSeatSummary, + slug: z.string(), + tier: zSubscriptionTier +}) /** * Itemized cost preview for a pending subscription change. */ export const zPreviewSubscribeResponse = z.object({ - allowed: z.boolean(), - cost_next_period_cents: 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' }), - cost_today_cents: 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' }), - credits_next_period_cents: 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' }), - credits_today_cents: 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' }), - current_plan: zPreviewPlanInfo.optional(), - effective_at: z.string().datetime(), - is_immediate: z.boolean(), - new_plan: zPreviewPlanInfo, - reason: z.string().optional(), - transition_type: z.enum([ - 'new_subscription', - 'upgrade', - 'downgrade', - 'duration_change' - ]) -}); + allowed: z.boolean(), + cost_next_period_cents: 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' + }), + cost_today_cents: 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' + }), + credits_next_period_cents: 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' + }), + credits_today_cents: 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' + }), + current_plan: zPreviewPlanInfo.optional(), + effective_at: z.string().datetime(), + is_immediate: z.boolean(), + new_plan: zPreviewPlanInfo, + reason: z.string().optional(), + transition_type: z.enum([ + 'new_subscription', + 'upgrade', + 'downgrade', + 'duration_change' + ]) +}) /** * Request body for previewing the cost of a plan subscription change. */ export const zPreviewSubscribeRequest = z.object({ - plan_slug: z.string() -}); + plan_slug: z.string() +}) /** * Reason why a plan is unavailable */ export const zPlanAvailabilityReason = z.enum([ - 'same_plan', - 'incompatible_transition', - 'requires_team', - 'requires_personal', - 'exceeds_max_seats' -]); + 'same_plan', + 'incompatible_transition', + 'requires_team', + 'requires_personal', + 'exceeds_max_seats' +]) /** * Availability and eligibility information for a billing plan. */ export const zPlanAvailability = z.object({ - available: z.boolean(), - reason: zPlanAvailabilityReason.optional() -}); + available: z.boolean(), + reason: zPlanAvailabilityReason.optional() +}) /** * Billing plan details including pricing, limits, and features. */ export const zPlan = z.object({ - availability: zPlanAvailability, - credits_cents: 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' }), - duration: zSubscriptionDuration, - max_seats: 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' }), - price_cents: 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' }), - seat_summary: zPlanSeatSummary, - slug: z.string(), - tier: zSubscriptionTier -}); + availability: zPlanAvailability, + credits_cents: 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' + }), + duration: zSubscriptionDuration, + max_seats: 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' + }), + price_cents: 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' + }), + seat_summary: zPlanSeatSummary, + slug: z.string(), + tier: zSubscriptionTier +}) /** * An outstanding workspace invitation that has not yet been accepted. */ export const zPendingInvite = z.object({ - email: z.string().email(), - expires_at: z.string().datetime(), - id: z.string(), - invited_at: z.string().datetime(), - token: z.string().optional() -}); + email: z.string().email(), + expires_at: z.string().datetime(), + id: z.string(), + invited_at: z.string().datetime(), + token: z.string().optional() +}) /** * Response containing a redirect URL to the payment portal. */ export const zPaymentPortalResponse = z.object({ - url: z.string() -}); + url: z.string() +}) /** * Request body for generating a payment portal session URL. */ export const zPaymentPortalRequest = z.object({ - return_url: z.string().optional() -}); + return_url: z.string().optional() +}) /** * RFC 6749 §5.1 successful token response. */ export const zOAuthTokenResponse = z.object({ - access_token: z.string(), - expires_in: z.number().int(), - refresh_token: z.string(), - scope: z.string(), - token_type: z.enum(['Bearer']) -}); + access_token: z.string(), + expires_in: z.number().int(), + refresh_token: z.string(), + scope: z.string(), + token_type: z.enum(['Bearer']) +}) /** * RFC 6749 §5.2 error response. */ export const zOAuthTokenError = z.object({ - error: z.string(), - error_description: z.string().optional() -}); + error: z.string(), + error_description: z.string().optional() +}) /** * RFC 7591 §3.2.1 successful registration response. */ export const zOAuthRegisterResponse = z.object({ - application_type: z.enum(['native', 'web']), - 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(), - grant_types: z.array(z.string()), - redirect_uris: z.array(z.string()), - response_types: z.array(z.string()), - token_endpoint_auth_method: z.enum(['none']) -}); + application_type: z.enum(['native', 'web']), + 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(), + grant_types: z.array(z.string()), + redirect_uris: z.array(z.string()), + response_types: z.array(z.string()), + token_endpoint_auth_method: z.enum(['none']) +}) /** * 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({ - application_type: z.enum(['native', 'web']).optional(), - client_name: z.string().max(100).optional(), - client_uri: z.string().nullish(), - contacts: z.array(z.string()).nullish(), - grant_types: z.array(z.enum(['authorization_code', 'refresh_token'])).optional(), - jwks: z.record(z.unknown()).nullish(), - jwks_uri: z.string().nullish(), - logo_uri: z.string().nullish(), - policy_uri: z.string().nullish(), - redirect_uris: z.array(z.string()).min(1).max(5), - resource_grants: z.record(z.array(z.string())).nullish(), - response_types: z.array(z.enum(['code'])).optional(), - scope: z.string().nullish(), - software_id: z.string().nullish(), - software_version: z.string().nullish(), - token_endpoint_auth_method: z.enum(['none']).optional(), - tos_uri: z.string().nullish() -}); + application_type: z.enum(['native', 'web']).optional(), + client_name: z.string().max(100).optional(), + client_uri: z.string().nullish(), + contacts: z.array(z.string()).nullish(), + grant_types: z + .array(z.enum(['authorization_code', 'refresh_token'])) + .optional(), + jwks: z.record(z.unknown()).nullish(), + jwks_uri: z.string().nullish(), + logo_uri: z.string().nullish(), + policy_uri: z.string().nullish(), + redirect_uris: z.array(z.string()).min(1).max(5), + resource_grants: z.record(z.array(z.string())).nullish(), + response_types: z.array(z.enum(['code'])).optional(), + scope: z.string().nullish(), + software_id: z.string().nullish(), + software_version: z.string().nullish(), + token_endpoint_auth_method: z.enum(['none']).optional(), + tos_uri: z.string().nullish() +}) /** * 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: z.enum(['invalid_redirect_uri', 'invalid_client_metadata']), + error_description: z.string().nullish() +}) /** * Standard error response with a machine-readable code and human-readable message. */ export const zErrorResponse = z.object({ - code: z.string(), - details: z.record(z.unknown()).optional(), - message: z.string() -}); + code: z.string(), + details: z.record(z.unknown()).optional(), + message: z.string() +}) /** * Union of the two 400 shapes /oauth/register can emit. `OAuthRegisterError` is the handler-shaped RFC 7591 §3.2.2 error; `ErrorResponse` is the strict-server binding-layer error fired when the request body fails OpenAPI-schema validation before the handler runs, normalized to the standard {code, message} shape by the custom Echo HTTPErrorHandler (BE-1178). * */ export const zOAuthRegisterBadRequestResponse = z.union([ - zOAuthRegisterError, - zErrorResponse -]); + zOAuthRegisterError, + zErrorResponse +]) /** * OAuth 2.1 protected-resource metadata (RFC 9728). */ export const zOAuthProtectedResourceMetadata = z.object({ - authorization_servers: z.array(z.string().url()), - bearer_methods_supported: z.array(z.string()).optional(), - resource: z.string().url(), - scopes_supported: z.array(z.string()) -}); + authorization_servers: z.array(z.string().url()), + bearer_methods_supported: z.array(z.string()).optional(), + resource: z.string().url(), + scopes_supported: z.array(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(), - role: z.enum(['owner', 'member']), - type: z.enum(['personal', 'team']) -}); + id: z.string(), + name: z.string(), + role: z.enum(['owner', 'member']), + type: z.enum(['personal', 'team']) +}) /** * 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({ - client_display_name: z.string(), - csrf_token: z.string(), - oauth_request_id: z.string().uuid(), - redirect_uri: z.string().url(), - resource_display_name: z.string(), - scopes: z.array(z.string()), - workspaces: z.array(zOAuthConsentChallengeWorkspace) -}); + client_display_name: z.string(), + csrf_token: z.string(), + oauth_request_id: z.string().uuid(), + redirect_uri: z.string().url(), + resource_display_name: z.string(), + scopes: z.array(z.string()), + workspaces: z.array(zOAuthConsentChallengeWorkspace) +}) /** * 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() -}); + redirect_url: z.string().url() +}) /** * OAuth 2.1 authorization-server metadata (RFC 8414). */ export const zOAuthAuthorizationServerMetadata = z.object({ - authorization_endpoint: z.string().url(), - code_challenge_methods_supported: z.array(z.string()), - grant_types_supported: z.array(z.string()), - issuer: z.string().url(), - jwks_uri: z.string().url(), - registration_endpoint: z.string().url().optional(), - response_types_supported: z.array(z.string()), - scopes_supported: z.array(z.string()).optional(), - token_endpoint: z.string().url(), - token_endpoint_auth_methods_supported: z.array(z.string()) -}); + authorization_endpoint: z.string().url(), + code_challenge_methods_supported: z.array(z.string()), + grant_types_supported: z.array(z.string()), + issuer: z.string().url(), + jwks_uri: z.string().url(), + registration_endpoint: z.string().url().optional(), + response_types_supported: z.array(z.string()), + scopes_supported: z.array(z.string()).optional(), + token_endpoint: z.string().url(), + token_endpoint_auth_methods_supported: z.array(z.string()) +}) /** * Metadata describing a single ComfyUI node type and its inputs/outputs. */ export const zNodeInfo = z.object({ - api_node: z.boolean().optional(), - category: z.string().optional(), - deprecated: z.boolean().optional(), - description: z.string().optional(), - display_name: z.string().optional(), - experimental: z.boolean().optional(), - input: z.record(z.unknown()).optional(), - input_order: z.record(z.array(z.string())).optional(), - name: z.string().optional(), - output: z.array(z.string()).optional(), - output_is_list: z.array(z.boolean()).optional(), - output_name: z.array(z.string()).optional(), - output_node: z.boolean().optional(), - output_tooltips: z.array(z.string()).optional(), - python_module: z.string().optional() -}); + api_node: z.boolean().optional(), + category: z.string().optional(), + deprecated: z.boolean().optional(), + description: z.string().optional(), + display_name: z.string().optional(), + experimental: z.boolean().optional(), + input: z.record(z.unknown()).optional(), + input_order: z.record(z.array(z.string())).optional(), + name: z.string().optional(), + output: z.array(z.string()).optional(), + output_is_list: z.array(z.boolean()).optional(), + output_name: z.array(z.string()).optional(), + output_node: z.boolean().optional(), + output_tooltips: z.array(z.string()).optional(), + python_module: z.string().optional() +}) /** * Represents a folder containing models */ export const zModelFolder = z.object({ - folders: z.array(z.string()), - name: z.string() -}); + folders: z.array(z.string()), + name: z.string() +}) /** * Represents a model file with metadata */ export const zModelFile = z.object({ - name: z.string(), - pathIndex: z.number().int() -}); + name: z.string(), + pathIndex: z.number().int() +}) /** * Workspace member with profile and role information. */ export const zMember = z.object({ - email: z.string().email(), - id: z.string(), - is_original_owner: z.boolean(), - joined_at: z.string().datetime(), - name: z.string(), - role: z.enum(['owner', 'member']) -}); + email: z.string().email(), + id: z.string(), + is_original_owner: z.boolean(), + joined_at: z.string().datetime(), + name: z.string(), + role: z.enum(['owner', 'member']) +}) /** * Paginated list of workspaces the authenticated user belongs to. */ export const zListWorkspacesResponse = z.object({ - workspaces: z.array(zWorkspaceWithRole) -}); + workspaces: z.array(zWorkspaceWithRole) +}) /** * List of API keys associated with the current workspace. */ export const zListWorkspaceApiKeysResponse = z.object({ - api_keys: z.array(zWorkspaceApiKeyInfo) -}); + api_keys: z.array(zWorkspaceApiKeyInfo) +}) /** * Paginated list of available asset tags. */ export const zListTagsResponse = z.object({ - has_more: z.boolean(), - tags: z.array(zTagInfo), - total: z.number().int() -}); + has_more: z.boolean(), + tags: z.array(zTagInfo), + total: z.number().int() +}) /** * List of members in the current workspace. */ export const zListMembersResponse = z.object({ - members: z.array(zMember), - pagination: zPaginationInfo -}); + members: z.array(zMember), + pagination: zPaginationInfo +}) /** * List of pending invitations for the current workspace. */ export const zListInvitesResponse = z.object({ - invites: z.array(zPendingInvite) -}); + invites: z.array(zPendingInvite) +}) /** * Represents a user-owned asset (image, video, or other generated output). */ export const zAsset = z.object({ - created_at: z.string().datetime(), - display_name: z.string().nullish(), - file_path: z.string().nullish(), - hash: z.string().regex(/^blake3:[a-f0-9]{64}$/).optional(), - id: z.string().uuid(), - is_immutable: z.boolean().optional(), - job_id: z.string().uuid().nullish(), - last_access_time: z.string().datetime().optional(), - metadata: z.record(z.unknown()).readonly().optional(), - mime_type: z.string().optional(), - name: z.string(), - preview_id: z.string().uuid().nullish(), - preview_url: z.string().url().optional(), - short_url: z.string().nullish(), - size: 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(), - tags: z.array(z.string()).optional(), - updated_at: z.string().datetime(), - user_metadata: z.record(z.unknown()).optional() -}); + created_at: z.string().datetime(), + display_name: z.string().nullish(), + file_path: z.string().nullish(), + hash: z + .string() + .regex(/^blake3:[a-f0-9]{64}$/) + .optional(), + id: z.string().uuid(), + is_immutable: z.boolean().optional(), + job_id: z.string().uuid().nullish(), + last_access_time: z.string().datetime().optional(), + metadata: z.record(z.unknown()).readonly().optional(), + mime_type: z.string().optional(), + name: z.string(), + preview_id: z.string().uuid().nullish(), + preview_url: z.string().url().optional(), + short_url: z.string().nullish(), + size: 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(), + tags: z.array(z.string()).optional(), + updated_at: z.string().datetime(), + user_metadata: z.record(z.unknown()).optional() +}) /** * Paginated list of assets belonging to the authenticated user. */ export const zListAssetsResponse = z.object({ - assets: z.array(zAsset), - has_more: z.boolean(), - next_cursor: z.string().optional(), - total: z.number().int() -}); + assets: z.array(zAsset), + has_more: z.boolean(), + next_cursor: z.string().optional(), + total: z.number().int() +}) /** * Reference to a Hub label by ID. */ export const zLabelRef = z.object({ - display_name: z.string(), - name: z.string() -}); + display_name: z.string(), + name: z.string() +}) /** * A single JSON Web Key entry within a JWKS response. */ export const zJwkKey = z.object({ - alg: z.string(), - crv: z.string(), - kid: z.string(), - kty: z.string(), - use: z.string(), - x: z.string(), - y: z.string() -}); + alg: z.string(), + crv: z.string(), + kid: z.string(), + kty: z.string(), + use: z.string(), + x: z.string(), + y: z.string() +}) /** * JSON Web Key Set containing the public keys used to verify Cloud JWTs. */ export const zJwksResponse = z.object({ - keys: z.array(zJwkKey) -}); + keys: z.array(zJwkKey) +}) /** * Detailed execution error information from ComfyUI */ export const zExecutionError = z.object({ - current_inputs: z.record(z.unknown()), - current_outputs: z.record(z.unknown()), - exception_message: z.string(), - exception_type: z.string(), - node_id: z.string(), - node_type: z.string(), - traceback: z.array(z.string()) -}); + current_inputs: z.record(z.unknown()), + current_outputs: z.record(z.unknown()), + exception_message: z.string(), + exception_type: z.string(), + node_id: z.string(), + node_type: z.string(), + traceback: z.array(z.string()) +}) /** * Lightweight job data for list views (workflow and full outputs excluded) */ export const zJobEntry = z.object({ - create_time: 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' }), - execution_end_time: 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(), - execution_error: zExecutionError.optional(), - execution_start_time: 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(), - id: z.string().uuid(), - outputs_count: z.number().int().optional(), - preview_output: z.record(z.unknown()).optional(), - status: z.enum([ - 'pending', - 'in_progress', - 'completed', - 'failed', - 'cancelled' - ]), - workflow_id: z.string().optional() -}); + create_time: 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' + }), + execution_end_time: 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(), + execution_error: zExecutionError.optional(), + execution_start_time: 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(), + id: z.string().uuid(), + outputs_count: z.number().int().optional(), + preview_output: z.record(z.unknown()).optional(), + status: z.enum([ + 'pending', + 'in_progress', + 'completed', + 'failed', + 'cancelled' + ]), + workflow_id: z.string().optional() +}) /** * Paginated list of jobs for the authenticated user. */ export const zJobsListResponse = z.object({ - jobs: z.array(zJobEntry), - pagination: zPaginationInfo -}); + jobs: z.array(zJobEntry), + pagination: zPaginationInfo +}) /** * Response for POST /api/jobs/cancel. */ export const zJobsCancelResponse = z.object({ - cancelled: z.array(z.string()) -}); + cancelled: z.array(z.string()) +}) /** * Request to cancel multiple jobs by ID. */ export const zJobsCancelRequest = z.object({ - job_ids: z.array(z.string().uuid()).min(1).max(100) -}); + job_ids: z.array(z.string().uuid()).min(1).max(100) +}) /** * Job status information */ export const zJobStatusResponse = z.object({ - assigned_inference: z.string().nullish(), - created_at: z.string().datetime(), - error_message: z.string().nullish(), - id: z.string().uuid(), - last_state_update: z.string().datetime().optional(), - status: z.enum([ - 'waiting_to_dispatch', - 'pending', - 'in_progress', - 'completed', - 'error', - 'cancelled' - ]), - updated_at: z.string().datetime() -}); + assigned_inference: z.string().nullish(), + created_at: z.string().datetime(), + error_message: z.string().nullish(), + id: z.string().uuid(), + last_state_update: z.string().datetime().optional(), + status: z.enum([ + 'waiting_to_dispatch', + 'pending', + 'in_progress', + 'completed', + 'error', + 'cancelled' + ]), + updated_at: z.string().datetime() +}) /** * Full job details including workflow and outputs */ export const zJobDetailResponse = z.object({ - create_time: 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' }), - execution_error: zExecutionError.optional(), - execution_meta: z.record(z.unknown()).optional(), - execution_status: z.record(z.unknown()).optional(), - id: z.string().uuid(), - outputs: z.record(z.unknown()).optional(), - outputs_count: z.number().int().optional(), - preview_output: z.record(z.unknown()).optional(), - status: z.enum([ - 'pending', - 'in_progress', - 'completed', - 'failed', - 'cancelled' - ]), - update_time: 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' }), - workflow: z.record(z.unknown()).optional(), - workflow_id: z.string().optional() -}); + create_time: 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' + }), + execution_error: zExecutionError.optional(), + execution_meta: z.record(z.unknown()).optional(), + execution_status: z.record(z.unknown()).optional(), + id: z.string().uuid(), + outputs: z.record(z.unknown()).optional(), + outputs_count: z.number().int().optional(), + preview_output: z.record(z.unknown()).optional(), + status: z.enum([ + 'pending', + 'in_progress', + 'completed', + 'failed', + 'cancelled' + ]), + update_time: 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' + }), + workflow: z.record(z.unknown()).optional(), + workflow_id: z.string().optional() +}) /** * Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops. */ export const zJobCancelResponse = z.object({ - cancelled: z.boolean() -}); + cancelled: z.boolean() +}) /** * Response after importing published workflow assets. */ export const zImportPublishedAssetsResponse = z.object({ - assets: z.array(zAssetInfo) -}); + assets: z.array(zAssetInfo) +}) /** * Request body for importing assets from a published workflow. */ export const zImportPublishedAssetsRequest = z.object({ - published_asset_ids: z.array(z.string()), - share_id: z.string().nullish() -}); + published_asset_ids: z.array(z.string()), + share_id: z.string().nullish() +}) /** * Public workflow status. NULL in the database is represented as pending in API responses. */ export const zHubWorkflowStatus = z.enum([ - 'pending', - 'approved', - 'rejected', - 'deprecated' -]); + 'pending', + 'approved', + 'rejected', + 'deprecated' +]) /** * Abbreviated Hub profile used in workflow listings. */ export const zHubProfileSummary = z.object({ - avatar_url: z.string().optional(), - display_name: z.string().optional(), - username: z.string() -}); + avatar_url: z.string().optional(), + display_name: z.string().optional(), + username: z.string() +}) /** * Entry in the curated workflow template gallery shown on the home page. */ export const zHubWorkflowTemplateEntry = z.object({ - contentTemplate: z.string().optional(), - date: z.string().optional(), - description: z.string().optional(), - extendedDescription: z.string().optional(), - faqItems: z.array(z.object({ + contentTemplate: z.string().optional(), + date: z.string().optional(), + description: z.string().optional(), + extendedDescription: z.string().optional(), + faqItems: z + .array( + z.object({ answer: z.string(), question: z.string() - })).optional(), - howToUse: z.array(z.string()).optional(), - includeOnDistributions: z.array(z.string()).optional(), - io: z.object({ - inputs: z.array(z.record(z.unknown())).optional(), - outputs: z.array(z.record(z.unknown())).optional() - }).optional(), - isEssential: z.boolean().optional(), - logos: z.array(z.record(z.unknown())).optional(), - mediaSubtype: z.string().optional(), - mediaType: z.string().optional(), - metaDescription: z.string().optional(), - models: z.array(z.string()).optional(), - name: z.string(), - openSource: z.boolean().optional(), - profile: zHubProfileSummary.optional(), - requiresCustomNodes: z.array(z.string()).optional(), - searchRank: 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(), - shareId: z.string().optional(), - size: 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(), - status: zHubWorkflowStatus, - suggestedUseCases: z.array(z.string()).optional(), - tags: z.array(z.string()).optional(), - thumbnailComparisonUrl: z.string().optional(), - thumbnailUrl: z.string().optional(), - thumbnailVariant: z.string().optional(), - title: z.string(), - tutorialUrl: z.string().optional(), - usage: 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(), - vram: 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() -}); + }) + ) + .optional(), + howToUse: z.array(z.string()).optional(), + includeOnDistributions: z.array(z.string()).optional(), + io: z + .object({ + inputs: z.array(z.record(z.unknown())).optional(), + outputs: z.array(z.record(z.unknown())).optional() + }) + .optional(), + isEssential: z.boolean().optional(), + logos: z.array(z.record(z.unknown())).optional(), + mediaSubtype: z.string().optional(), + mediaType: z.string().optional(), + metaDescription: z.string().optional(), + models: z.array(z.string()).optional(), + name: z.string(), + openSource: z.boolean().optional(), + profile: zHubProfileSummary.optional(), + requiresCustomNodes: z.array(z.string()).optional(), + searchRank: 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(), + shareId: z.string().optional(), + size: 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(), + status: zHubWorkflowStatus, + suggestedUseCases: z.array(z.string()).optional(), + tags: z.array(z.string()).optional(), + thumbnailComparisonUrl: z.string().optional(), + thumbnailUrl: z.string().optional(), + thumbnailVariant: z.string().optional(), + title: z.string(), + tutorialUrl: z.string().optional(), + usage: 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(), + vram: 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() +}) /** * Abbreviated Hub workflow metadata used in search and listing results. */ export const zHubWorkflowSummary = z.object({ - custom_nodes: z.array(zLabelRef).optional(), - description: z.string().optional(), - metadata: z.record(z.unknown()).optional(), - models: z.array(zLabelRef).optional(), - name: z.string(), - profile: zHubProfileSummary, - publish_time: z.string().datetime().nullish(), - sample_image_urls: z.array(z.string()).optional(), - share_id: z.string(), - status: zHubWorkflowStatus, - tags: z.array(zLabelRef).optional(), - thumbnail_comparison_url: z.string().optional(), - thumbnail_type: z.enum([ - 'image', - 'video', - 'image_comparison' - ]).optional(), - thumbnail_url: z.string().optional(), - tutorial_url: z.string().optional() -}); + custom_nodes: z.array(zLabelRef).optional(), + description: z.string().optional(), + metadata: z.record(z.unknown()).optional(), + models: z.array(zLabelRef).optional(), + name: z.string(), + profile: zHubProfileSummary, + publish_time: z.string().datetime().nullish(), + sample_image_urls: z.array(z.string()).optional(), + share_id: z.string(), + status: zHubWorkflowStatus, + tags: z.array(zLabelRef).optional(), + thumbnail_comparison_url: z.string().optional(), + thumbnail_type: z.enum(['image', 'video', 'image_comparison']).optional(), + thumbnail_url: z.string().optional(), + tutorial_url: z.string().optional() +}) /** * Full Hub workflow detail including versions, assets, and statistics. */ export const zHubWorkflowDetail = z.object({ - assets: z.array(zAssetInfo), - custom_nodes: z.array(zLabelRef).optional(), - description: z.string().optional(), - metadata: z.record(z.unknown()).optional(), - models: z.array(zLabelRef).optional(), - name: z.string(), - profile: zHubProfileSummary, - publish_time: z.string().datetime().nullish(), - sample_image_urls: z.array(z.string()).optional(), - share_id: z.string(), - status: zHubWorkflowStatus, - tags: z.array(zLabelRef).optional(), - thumbnail_comparison_url: z.string().optional(), - thumbnail_type: z.enum([ - 'image', - 'video', - 'image_comparison' - ]).optional(), - thumbnail_url: z.string().optional(), - tutorial_url: z.string().optional(), - workflow_id: z.string(), - workflow_json: z.record(z.unknown()) -}); + assets: z.array(zAssetInfo), + custom_nodes: z.array(zLabelRef).optional(), + description: z.string().optional(), + metadata: z.record(z.unknown()).optional(), + models: z.array(zLabelRef).optional(), + name: z.string(), + profile: zHubProfileSummary, + publish_time: z.string().datetime().nullish(), + sample_image_urls: z.array(z.string()).optional(), + share_id: z.string(), + status: zHubWorkflowStatus, + tags: z.array(zLabelRef).optional(), + thumbnail_comparison_url: z.string().optional(), + thumbnail_type: z.enum(['image', 'video', 'image_comparison']).optional(), + thumbnail_url: z.string().optional(), + tutorial_url: z.string().optional(), + workflow_id: z.string(), + workflow_json: z.record(z.unknown()) +}) /** * Paginated list of Hub workflows matching search criteria. */ export const zHubWorkflowListResponse = z.object({ - next_cursor: z.string().optional(), - workflows: z.array(z.union([zHubWorkflowSummary, zHubWorkflowDetail])) -}); + next_cursor: z.string().optional(), + workflows: z.array(z.union([zHubWorkflowSummary, zHubWorkflowDetail])) +}) /** * Response indicating whether a Hub username is available. */ export const zHubUsernameCheckResponse = z.object({ - available: z.boolean(), - suggestions: z.array(z.string()).optional(), - username: z.string(), - validation_error: z.string().optional() -}); + available: z.boolean(), + suggestions: z.array(z.string()).optional(), + username: z.string(), + validation_error: z.string().optional() +}) /** * Full public profile for a Hub creator. */ export const zHubProfile = z.object({ - avatar_url: z.string().optional(), - description: z.string().optional(), - display_name: z.string().optional(), - username: z.string(), - website_urls: z.array(z.string()).optional() -}); + avatar_url: z.string().optional(), + description: z.string().optional(), + display_name: z.string().optional(), + username: z.string(), + website_urls: z.array(z.string()).optional() +}) /** * Metadata for a single Hub label. */ export const zHubLabelInfo = z.object({ - description: z.string().optional(), - display_name: z.string(), - name: z.string(), - type: z.enum([ - 'tag', - 'model', - 'custom_node' - ]) -}); + description: z.string().optional(), + display_name: z.string(), + name: z.string(), + type: z.enum(['tag', 'model', 'custom_node']) +}) /** * List of available Hub labels for categorizing workflows. */ export const zHubLabelListResponse = z.object({ - labels: z.array(zHubLabelInfo) -}); + labels: z.array(zHubLabelInfo) +}) /** * Response containing a signed upload URL and the target asset path. */ export const zHubAssetUploadUrlResponse = z.object({ - public_url: z.string(), - token: z.string(), - upload_url: z.string() -}); + public_url: z.string(), + token: z.string(), + upload_url: z.string() +}) /** * Request body for requesting a signed upload URL for a Hub asset. */ export const zHubAssetUploadUrlRequest = z.object({ - content_type: z.string(), - filename: z.string() -}); + content_type: z.string(), + filename: z.string() +}) /** * History entry with prompt_id and execution data */ export const zHistoryEntry = z.object({ - create_time: 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(), - meta: z.record(z.unknown()).optional(), - outputs: z.record(z.unknown()).optional(), - prompt: z.object({ - extra_data: z.record(z.unknown()).optional(), - priority: z.number().optional(), - prompt_id: z.string().optional() - }).optional(), - prompt_id: z.string(), - status: z.record(z.unknown()).optional(), - workflow_id: z.string().optional() -}); + create_time: 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(), + meta: z.record(z.unknown()).optional(), + outputs: z.record(z.unknown()).optional(), + prompt: z + .object({ + extra_data: z.record(z.unknown()).optional(), + priority: z.number().optional(), + prompt_id: z.string().optional() + }) + .optional(), + prompt_id: z.string(), + status: z.record(z.unknown()).optional(), + workflow_id: z.string().optional() +}) /** * Execution history response with history array. @@ -1305,123 +1500,129 @@ export const zHistoryEntry = z.object({ * */ export const zHistoryResponse = z.object({ - history: z.array(zHistoryEntry) -}); + history: z.array(zHistoryEntry) +}) /** * Request to manage history operations */ export const zHistoryManageRequest = z.object({ - clear: z.boolean().optional(), - delete: z.array(z.string()).optional() -}); + clear: z.boolean().optional(), + delete: z.array(z.string()).optional() +}) /** * History entry with full prompt data */ export const zHistoryDetailEntry = z.object({ - meta: z.record(z.unknown()).optional(), - outputs: z.record(z.unknown()).optional(), - prompt: z.object({ - extra_data: z.record(z.unknown()).optional(), - outputs_to_execute: z.array(z.string()).optional(), - priority: z.number().optional(), - prompt: z.record(z.unknown()).optional(), - prompt_id: z.string().optional() - }).optional(), - status: z.record(z.unknown()).optional() -}); + meta: z.record(z.unknown()).optional(), + outputs: z.record(z.unknown()).optional(), + prompt: z + .object({ + extra_data: z.record(z.unknown()).optional(), + outputs_to_execute: z.array(z.string()).optional(), + priority: z.number().optional(), + prompt: z.record(z.unknown()).optional(), + prompt_id: z.string().optional() + }) + .optional(), + status: z.record(z.unknown()).optional() +}) /** * Detailed execution history response for a specific prompt. * Returns a dictionary with prompt_id as key and full history data as value. * */ -export const zHistoryDetailResponse = z.record(zHistoryDetailEntry); +export const zHistoryDetailResponse = z.record(zHistoryDetailEntry) /** * Metadata for a global subgraph blueprint (without full data) */ export const zGlobalSubgraphInfo = z.object({ - data: z.string().optional(), - info: z.object({ - node_pack: z.string() - }), - name: z.string(), - source: z.string() -}); + data: z.string().optional(), + info: z.object({ + node_pack: z.string() + }), + name: z.string(), + source: z.string() +}) /** * Full data for a global subgraph blueprint */ export const zGlobalSubgraphData = z.object({ - data: z.string(), - info: z.object({ - node_pack: z.string() - }), - name: z.string(), - source: z.string() -}); + data: z.string(), + info: z.object({ + node_pack: z.string() + }), + name: z.string(), + source: z.string() +}) /** * Individual file entry within a full user data response. */ export const zGetUserDataResponseFullFile = z.object({ - modified: 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(), - path: z.string().optional(), - size: z.number().int().optional() -}); + modified: 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(), + path: z.string().optional(), + size: z.number().int().optional() +}) /** * List of user data file entries (each with path, size, and modification time) returned when full_info=true. */ -export const zGetUserDataResponseFull = z.array(zGetUserDataResponseFullFile); +export const zGetUserDataResponseFull = z.array(zGetUserDataResponseFullFile) /** * Request body for forking an existing workflow into the user's account. */ export const zForkWorkflowRequest = z.object({ - name: z.string().optional(), - source_version: z.number().int() -}); + name: z.string().optional(), + source_version: z.number().int() +}) /** * Response after submitting feedback */ -export const zFeedbackResponse = z.record(z.unknown()); +export const zFeedbackResponse = z.record(z.unknown()) /** * Request to submit user feedback */ export const zFeedbackRequest = z.object({ - content: z.string().optional(), - metadata: z.record(z.unknown()).optional(), - rating: z.number().int().gte(1).lte(5).optional(), - type: z.enum([ - 'missing_nodes', - 'general', - 'missing_models' - ]) -}); + content: z.string().optional(), + metadata: z.record(z.unknown()).optional(), + rating: z.number().int().gte(1).lte(5).optional(), + type: z.enum(['missing_nodes', 'general', 'missing_models']) +}) /** * Response containing a signed download URL for an exported asset archive. */ export const zExportDownloadUrlResponse = z.object({ - expires_at: z.string().datetime().optional(), - url: z.string() -}); + expires_at: z.string().datetime().optional(), + url: z.string() +}) /** * Response containing the issued Cloud JWT and its expiry. */ export const zExchangeTokenResponse = z.object({ - expires_at: z.string().datetime(), - permissions: z.array(z.string()), - role: z.enum(['owner', 'member']), - token: z.string(), - workspace: zWorkspaceSummary -}); + expires_at: z.string().datetime(), + permissions: z.array(z.string()), + role: z.enum(['owner', 'member']), + token: z.string(), + workspace: zWorkspaceSummary +}) /** * Optional request body for the token exchange endpoint. The Firebase JWT @@ -1430,2457 +1631,2520 @@ export const zExchangeTokenResponse = z.object({ * */ export const zExchangeTokenRequest = z.object({ - workspace_id: z.string().optional() -}); + workspace_id: z.string().optional() +}) /** * Result of redeeming a desktop login code. */ export const zDesktopLoginCodeRedeemResponse = z.object({ - status: z.enum(['redeemed']) -}); + status: z.enum(['redeemed']) +}) /** * Request to claim a desktop login code for the authenticated user. */ export const zDesktopLoginCodeRedeemRequest = z.object({ - code: z.string() -}); + code: z.string() +}) /** * Exchange poll result. Pending until the code is redeemed in the browser. */ export const zDesktopLoginCodeExchangeResponse = z.object({ - custom_token: z.string().optional(), - status: z.enum(['pending', 'complete']) -}); + custom_token: z.string().optional(), + status: z.enum(['pending', 'complete']) +}) /** * Request to exchange a redeemed login code for a custom token. */ export const zDesktopLoginCodeExchangeRequest = z.object({ - code: z.string(), - code_verifier: z.string().min(43).max(128) -}); + code: z.string(), + code_verifier: z.string().min(43).max(128) +}) /** * A freshly minted desktop login code and its polling parameters. */ export const zDesktopLoginCodeCreateResponse = z.object({ - code: z.string(), - expires_in: z.number().int(), - poll_interval: z.number().int() -}); + code: z.string(), + expires_in: z.number().int(), + poll_interval: z.number().int() +}) /** * Request to mint a desktop login code. */ export const zDesktopLoginCodeCreateRequest = z.object({ - app_version: z.string().min(1).max(64), - code_challenge: z.string().min(43).max(128), - installation_id: z.string().min(8).max(128).regex(/^[A-Za-z0-9._-]+$/).optional(), - platform: z.string().min(1).max(32) -}); + app_version: z.string().min(1).max(64), + code_challenge: z.string().min(43).max(128), + installation_id: z + .string() + .min(8) + .max(128) + .regex(/^[A-Za-z0-9._-]+$/) + .optional(), + platform: z.string().min(1).max(32) +}) /** * Response after deleting a session cookie */ export const zDeleteSessionResponse = z.object({ - success: z.boolean() -}); + success: z.boolean() +}) /** * Request body for creating a new workspace. */ export const zCreateWorkspaceRequest = z.object({ - name: z.string().min(1).max(100) -}); + name: z.string().min(1).max(100) +}) /** * Response containing the newly created workspace API key. */ export const zCreateWorkspaceApiKeyResponse = z.object({ - created_at: z.string().datetime(), - description: z.string().max(5000), - expires_at: z.string().datetime().optional(), - id: z.string().uuid(), - key: z.string(), - key_prefix: z.string(), - name: z.string() -}); + created_at: z.string().datetime(), + description: z.string().max(5000), + expires_at: z.string().datetime().optional(), + id: z.string().uuid(), + key: z.string(), + key_prefix: z.string(), + name: z.string() +}) /** * Request body for creating a new workspace-scoped API key. */ export const zCreateWorkspaceApiKeyRequest = z.object({ - description: z.string().max(5000).optional(), - expires_at: z.string().datetime().optional(), - name: z.string() -}); + description: z.string().max(5000).optional(), + expires_at: z.string().datetime().optional(), + name: z.string() +}) /** * Request body for creating a new version of a saved workflow. */ export const zCreateWorkflowVersionRequest = z.object({ - base_version: z.number().int(), - workflow_json: z.record(z.unknown()) -}); + base_version: z.number().int(), + workflow_json: z.record(z.unknown()) +}) /** * Request body for creating a new saved workflow. */ export const zCreateWorkflowRequest = z.object({ - default_view: z.enum(['workflow', 'app']).optional(), - description: z.string().optional(), - forked_from_workflow_id: z.string().optional(), - forked_from_workflow_version_id: z.string().optional(), - name: z.string().optional(), - workflow_json: z.record(z.unknown()) -}); + default_view: z.enum(['workflow', 'app']).optional(), + description: z.string().optional(), + forked_from_workflow_id: z.string().optional(), + forked_from_workflow_version_id: z.string().optional(), + name: z.string().optional(), + workflow_json: z.record(z.unknown()) +}) /** * Response after successfully purchasing a credit top-up. */ export const zCreateTopupResponse = z.object({ - amount_cents: 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' }), - billing_op_id: z.string(), - status: z.enum([ - 'pending', - 'completed', - 'failed' - ]), - topup_id: z.string() -}); + amount_cents: 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' + }), + billing_op_id: z.string(), + status: z.enum(['pending', 'completed', 'failed']), + topup_id: z.string() +}) /** * Request body for purchasing a one-time credit top-up. */ export const zCreateTopupRequest = z.object({ - amount_cents: z.coerce.bigint().gte(BigInt(500)).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }), - idempotency_key: z.string().optional() -}); + amount_cents: z.coerce + .bigint() + .gte(BigInt(500)) + .max(BigInt('9223372036854775807'), { + message: 'Invalid value: Expected int64 to be <= 9223372036854775807' + }), + idempotency_key: z.string().optional() +}) /** * Response after creating a session cookie */ export const zCreateSessionResponse = z.object({ - expiresIn: z.number().int().optional(), - success: z.boolean() -}); + expiresIn: z.number().int().optional(), + success: z.boolean() +}) /** * Request body for creating a new user secret. */ export const zCreateSecretRequest = z.object({ - name: z.string().min(1).max(255), - provider: z.string().max(64).optional(), - secret_value: z.string().min(1) -}); + name: z.string().min(1).max(255), + provider: z.string().max(64).optional(), + secret_value: z.string().min(1) +}) /** * Request body for inviting a user to a workspace. */ export const zCreateInviteRequest = z.object({ - email: z.string().email() -}); + email: z.string().email() +}) /** * Request body for creating a new Hub profile. */ export const zCreateHubProfileRequest = z.object({ - avatar_token: z.string().optional(), - description: z.string().optional(), - display_name: z.string().optional(), - username: z.string(), - website_urls: z.array(z.string()).optional(), - workspace_id: z.string() -}); + avatar_token: z.string().optional(), + description: z.string().optional(), + display_name: z.string().optional(), + username: z.string(), + website_urls: z.array(z.string()).optional(), + workspace_id: z.string() +}) /** * Response after successfully cancelling a subscription. */ export const zCancelSubscriptionResponse = z.object({ - billing_op_id: z.string(), - cancel_at: z.string().datetime() -}); + billing_op_id: z.string(), + cancel_at: z.string().datetime() +}) /** * Request body for cancelling the current subscription. */ export const zCancelSubscriptionRequest = z.object({ - idempotency_key: z.string().optional() -}); + idempotency_key: z.string().optional() +}) /** * Response after bulk-revoking API keys for a workspace member. */ export const zBulkRevokeApiKeysResponse = z.object({ - revoked_count: z.number().int().gte(0) -}); + revoked_count: z.number().int().gte(0) +}) /** * Payment lifecycle status */ export const zBillingStatus = z.enum([ - 'awaiting_payment_method', - 'pending_payment', - 'paid', - 'payment_failed', - 'inactive' -]); + 'awaiting_payment_method', + 'pending_payment', + 'paid', + 'payment_failed', + 'inactive' +]) /** * Current billing and subscription status for a workspace. */ export const zBillingStatusResponse = z.object({ - billing_status: zBillingStatus.optional(), - cancel_at: z.string().datetime().optional(), - has_funds: z.boolean(), - is_active: z.boolean(), - plan_slug: z.string().optional(), - renewal_date: z.string().datetime().optional(), - subscription_duration: zSubscriptionDuration.optional(), - subscription_status: z.enum([ - 'active', - 'ended', - 'canceled' - ]).optional(), - subscription_tier: zSubscriptionTier.optional(), - team_credit_stop: zTeamCreditStopSummary.nullable() -}); + billing_status: zBillingStatus.optional(), + cancel_at: z.string().datetime().optional(), + has_funds: z.boolean(), + is_active: z.boolean(), + plan_slug: z.string().optional(), + renewal_date: z.string().datetime().optional(), + subscription_duration: zSubscriptionDuration.optional(), + subscription_status: z.enum(['active', 'ended', 'canceled']).optional(), + subscription_tier: zSubscriptionTier.optional(), + team_credit_stop: zTeamCreditStopSummary.nullable() +}) /** * List of available billing plans for subscription. */ export const zBillingPlansResponse = z.object({ - current_plan_slug: z.string().optional(), - plans: z.array(zPlan), - team_credit_stops: zTeamCreditStops.optional() -}); + current_plan_slug: z.string().optional(), + plans: z.array(zPlan), + team_credit_stops: zTeamCreditStops.optional() +}) /** * Status of an asynchronous billing operation. */ export const zBillingOpStatusResponse = z.object({ - completed_at: z.string().datetime().optional(), - error_message: z.string().optional(), - id: z.string(), - started_at: z.string().datetime(), - status: z.enum([ - 'pending', - 'succeeded', - 'failed' - ]) -}); + completed_at: z.string().datetime().optional(), + error_message: z.string().optional(), + id: z.string(), + started_at: z.string().datetime(), + status: z.enum(['pending', 'succeeded', 'failed']) +}) /** * A single history event. The cloud history-events store is the single source of truth for both billing events (charges, credits, adjustments) and user-facing usage events. */ export const zBillingEvent = z.object({ - createdAt: z.string().datetime(), - event_id: z.string(), - event_type: z.string(), - params: z.record(z.unknown()).optional() -}); + createdAt: z.string().datetime(), + event_id: z.string(), + event_type: z.string(), + params: z.record(z.unknown()).optional() +}) /** * Paginated list of billing events for a workspace. */ export const zBillingEventsResponse = z.object({ - events: z.array(zBillingEvent), - limit: z.number().int(), - page: z.number().int(), - total: z.number().int(), - totalPages: z.number().int() -}); + events: z.array(zBillingEvent), + limit: z.number().int(), + page: z.number().int(), + total: z.number().int(), + totalPages: z.number().int() +}) /** * Current credit balance and usage details for a workspace. */ export const zBillingBalanceResponse = z.object({ - amount_micros: z.number(), - cloud_credit_balance_micros: z.number().optional(), - currency: z.string(), - effective_balance_micros: z.number().optional(), - pending_charges_micros: z.number().optional(), - prepaid_balance_micros: z.number().optional() -}); + amount_micros: z.number(), + cloud_credit_balance_micros: z.number().optional(), + currency: z.string(), + effective_balance_micros: z.number().optional(), + pending_charges_micros: z.number().optional(), + prepaid_balance_micros: z.number().optional() +}) /** * Response returned when an existing asset is successfully updated. */ export const zAssetUpdated = z.object({ - display_name: z.string().nullish(), - file_path: z.string().nullish(), - hash: z.string().regex(/^blake3:[a-f0-9]{64}$/).optional(), - id: z.string().uuid(), - job_id: z.string().uuid().nullish(), - mime_type: z.string().optional(), - name: z.string().optional(), - tags: z.array(z.string()).optional(), - updated_at: z.string().datetime(), - user_metadata: z.record(z.unknown()).optional() -}); + display_name: z.string().nullish(), + file_path: z.string().nullish(), + hash: z + .string() + .regex(/^blake3:[a-f0-9]{64}$/) + .optional(), + id: z.string().uuid(), + job_id: z.string().uuid().nullish(), + mime_type: z.string().optional(), + name: z.string().optional(), + tags: z.array(z.string()).optional(), + updated_at: z.string().datetime(), + user_metadata: z.record(z.unknown()).optional() +}) /** * Histogram of tag counts used for refining asset search results. */ export const zAssetTagHistogramResponse = z.object({ - tag_counts: z.record(z.number().int()) -}); + tag_counts: z.record(z.number().int()) +}) /** * Metadata for a remotely hosted asset resolved by URL. */ export const zAssetMetadataResponse = z.object({ - content_length: 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' }), - content_type: z.string().optional(), - filename: z.string().optional(), - name: z.string().optional(), - preview_image: z.string().optional(), - tags: z.array(z.string()).optional(), - validation: zValidationResult.optional() -}); + content_length: 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' + }), + content_type: z.string().optional(), + filename: z.string().optional(), + name: z.string().optional(), + preview_image: z.string().optional(), + tags: z.array(z.string()).optional(), + validation: zValidationResult.optional() +}) /** * Acknowledgement of an async asset download task; clients poll GET /api/tasks/{task_id} for status. */ export const zAssetDownloadResponse = z.object({ - message: z.string().optional(), - status: z.enum([ - 'created', - 'running', - 'completed', - 'failed' - ]), - task_id: z.string().uuid() -}); + message: z.string().optional(), + status: z.enum(['created', 'running', 'completed', 'failed']), + task_id: z.string().uuid() +}) /** * Response returned when a new asset is successfully created. */ -export const zAssetCreated = zAsset.and(z.object({ +export const zAssetCreated = zAsset.and( + z.object({ created_new: z.boolean() -})); + }) +) /** * Response returned after successfully accepting a workspace invitation. */ export const zAcceptInviteResponse = z.object({ - workspace_id: z.string(), - workspace_name: z.string() -}); + workspace_id: z.string(), + workspace_name: z.string() +}) /** * Represents a user-owned asset (image, video, or other generated output). */ export const zAssetWritable = z.object({ - created_at: z.string().datetime(), - display_name: z.string().nullish(), - file_path: z.string().nullish(), - hash: z.string().regex(/^blake3:[a-f0-9]{64}$/).optional(), - id: z.string().uuid(), - is_immutable: z.boolean().optional(), - job_id: z.string().uuid().nullish(), - last_access_time: z.string().datetime().optional(), - mime_type: z.string().optional(), - name: z.string(), - preview_id: z.string().uuid().nullish(), - preview_url: z.string().url().optional(), - short_url: z.string().nullish(), - size: 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(), - tags: z.array(z.string()).optional(), - updated_at: z.string().datetime(), - user_metadata: z.record(z.unknown()).optional() -}); + created_at: z.string().datetime(), + display_name: z.string().nullish(), + file_path: z.string().nullish(), + hash: z + .string() + .regex(/^blake3:[a-f0-9]{64}$/) + .optional(), + id: z.string().uuid(), + is_immutable: z.boolean().optional(), + job_id: z.string().uuid().nullish(), + last_access_time: z.string().datetime().optional(), + mime_type: z.string().optional(), + name: z.string(), + preview_id: z.string().uuid().nullish(), + preview_url: z.string().url().optional(), + short_url: z.string().nullish(), + size: 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(), + tags: z.array(z.string()).optional(), + updated_at: z.string().datetime(), + user_metadata: z.record(z.unknown()).optional() +}) /** * Paginated list of assets belonging to the authenticated user. */ export const zListAssetsResponseWritable = z.object({ - assets: z.array(zAssetWritable), - has_more: z.boolean(), - next_cursor: z.string().optional(), - total: z.number().int() -}); + assets: z.array(zAssetWritable), + has_more: z.boolean(), + next_cursor: z.string().optional(), + total: z.number().int() +}) /** * Response returned when a new asset is successfully created. */ -export const zAssetCreatedWritable = zAssetWritable.and(z.object({ +export const zAssetCreatedWritable = zAssetWritable.and( + z.object({ created_new: z.boolean() -})); + }) +) export const zGetJwksData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * JWKS response */ -export const zGetJwksResponse = zJwksResponse; +export const zGetJwksResponse = zJwksResponse export const zGetOAuthAuthorizationServerData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Authorization-server metadata */ -export const zGetOAuthAuthorizationServerResponse = zOAuthAuthorizationServerMetadata; +export const zGetOAuthAuthorizationServerResponse = + zOAuthAuthorizationServerMetadata export const zGetOAuthProtectedResourceData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Protected-resource metadata */ -export const zGetOAuthProtectedResourceResponse = zOAuthProtectedResourceMetadata; +export const zGetOAuthProtectedResourceResponse = + zOAuthProtectedResourceMetadata export const zGetOAuthProtectedResourceByPathData = z.object({ - body: z.never().optional(), - path: z.object({ - resourcePath: z.string().regex(/^[a-zA-Z0-9._-]+$/) - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + resourcePath: z.string().regex(/^[a-zA-Z0-9._-]+$/) + }), + query: z.never().optional() +}) /** * Protected-resource metadata */ -export const zGetOAuthProtectedResourceByPathResponse = zOAuthProtectedResourceMetadata; +export const zGetOAuthProtectedResourceByPathResponse = + zOAuthProtectedResourceMetadata export const zGetCustomNodeProxyData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + path: z.string() + }), + query: z.never().optional() +}) export const zPostCustomNodeProxyData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + path: z.string() + }), + query: z.never().optional() +}) export const zListAssetsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - include_tags: z.array(z.string()).optional(), - exclude_tags: z.array(z.string()).optional(), - name_contains: z.string().optional(), - metadata_filter: z.string().optional(), - limit: z.number().int().gte(1).lte(500).optional().default(20), - offset: z.number().int().gte(0).optional().default(0), - sort: z.enum([ - 'name', - 'created_at', - 'updated_at', - 'size', - 'last_access_time' - ]).optional(), - order: z.enum(['asc', 'desc']).optional(), - include_public: z.boolean().optional().default(true), - hash: z.string().optional(), - after: z.string().optional() - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + include_tags: z.array(z.string()).optional(), + exclude_tags: z.array(z.string()).optional(), + name_contains: z.string().optional(), + metadata_filter: z.string().optional(), + limit: z.number().int().gte(1).lte(500).optional().default(20), + offset: z.number().int().gte(0).optional().default(0), + sort: z + .enum(['name', 'created_at', 'updated_at', 'size', 'last_access_time']) + .optional(), + order: z.enum(['asc', 'desc']).optional(), + include_public: z.boolean().optional().default(true), + hash: z.string().optional(), + after: z.string().optional() + }) + .optional() +}) /** * Success - Assets returned */ -export const zListAssetsResponse2 = zListAssetsResponse; +export const zListAssetsResponse2 = zListAssetsResponse export const zCreateAssetData = z.object({ - body: z.object({ - file: z.string(), - hash: z.string().regex(/^(blake3|sha256):[a-f0-9]{64}$/).optional(), - id: z.string().uuid().optional(), - mime_type: z.string().optional(), - name: z.string().optional(), - preview_id: z.string().uuid().optional(), - tags: z.string().optional(), - user_metadata: z.string().optional() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + file: z.string(), + hash: z + .string() + .regex(/^(blake3|sha256):[a-f0-9]{64}$/) + .optional(), + id: z.string().uuid().optional(), + mime_type: z.string().optional(), + name: z.string().optional(), + preview_id: z.string().uuid().optional(), + tags: z.string().optional(), + user_metadata: z.string().optional() + }), + path: z.never().optional(), + query: z.never().optional() +}) /** * Asset already existed for this user (deduplicated by content hash); the * existing asset is returned with created_new=false. * */ -export const zCreateAssetResponse = zAssetCreated; +export const zCreateAssetResponse = zAssetCreated export const zDeleteAssetData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Asset record deleted successfully */ -export const zDeleteAssetResponse = z.void(); +export const zDeleteAssetResponse = z.void() export const zGetAssetByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Asset details retrieved successfully */ -export const zGetAssetByIdResponse = zAsset; +export const zGetAssetByIdResponse = zAsset export const zUpdateAssetData = z.object({ - body: z.object({ - mime_type: z.string().optional(), - name: z.string().optional(), - preview_id: z.string().uuid().optional(), - user_metadata: z.record(z.unknown()).optional() - }), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.object({ + mime_type: z.string().optional(), + name: z.string().optional(), + preview_id: z.string().uuid().optional(), + user_metadata: z.record(z.unknown()).optional() + }), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Asset updated successfully */ -export const zUpdateAssetResponse = zAssetUpdated; +export const zUpdateAssetResponse = zAssetUpdated export const zGetAssetContentData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.object({ - disposition: z.enum(['inline', 'attachment']).optional() - }).optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z + .object({ + disposition: z.enum(['inline', 'attachment']).optional() + }) + .optional() +}) /** * Asset content stream (local runtime streams the bytes directly) */ -export const zGetAssetContentResponse = z.string(); +export const zGetAssetContentResponse = z.string() export const zRemoveAssetTagsData = z.object({ - body: z.object({ - tags: z.array(z.string()).min(1) - }), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.object({ + tags: z.array(z.string()).min(1) + }), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Tags removed successfully */ -export const zRemoveAssetTagsResponse = zTagsModificationResponse; +export const zRemoveAssetTagsResponse = zTagsModificationResponse export const zAddAssetTagsData = z.object({ - body: z.object({ - tags: z.array(z.string()).min(1) - }), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.object({ + tags: z.array(z.string()).min(1) + }), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Tags added successfully */ -export const zAddAssetTagsResponse = zTagsModificationResponse; +export const zAddAssetTagsResponse = zTagsModificationResponse export const zCreateAssetDownloadData = z.object({ - body: z.object({ - preview_id: z.string().uuid().optional(), - source_url: z.string().url(), - tags: z.array(z.string()).optional(), - user_metadata: z.record(z.unknown()).optional() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + preview_id: z.string().uuid().optional(), + source_url: z.string().url(), + tags: z.array(z.string()).optional(), + user_metadata: z.record(z.unknown()).optional() + }), + path: z.never().optional(), + query: z.never().optional() +}) export const zCreateAssetDownloadResponse = z.union([ - zAssetCreated, - zAssetDownloadResponse -]); + zAssetCreated, + zAssetDownloadResponse +]) export const zCreateAssetExportData = z.object({ - body: z.object({ - asset_ids: z.array(z.string()).optional(), - include_previews: z.boolean().optional().default(false), - job_asset_name_filters: z.record(z.array(z.string()).min(1)).optional(), - job_ids: z.array(z.string()).optional(), - naming_strategy: z.enum([ - 'group_by_job_id', - 'preserve', - 'asset_id', - 'group_by_job_time' - ]).optional() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + asset_ids: z.array(z.string()).optional(), + include_previews: z.boolean().optional().default(false), + job_asset_name_filters: z.record(z.array(z.string()).min(1)).optional(), + job_ids: z.array(z.string()).optional(), + naming_strategy: z + .enum(['group_by_job_id', 'preserve', 'asset_id', 'group_by_job_time']) + .optional() + }), + path: z.never().optional(), + query: z.never().optional() +}) /** * Accepted - Export task created and processing in background */ -export const zCreateAssetExportResponse = zAssetDownloadResponse; +export const zCreateAssetExportResponse = zAssetDownloadResponse export const zDownloadExportData = z.object({ - body: z.never().optional(), - path: z.object({ - exportName: z.string().regex(/^[a-zA-Z0-9_-]+\.zip$/) - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + exportName: z.string().regex(/^[a-zA-Z0-9_-]+\.zip$/) + }), + query: z.never().optional() +}) /** * Signed URL for downloading the export */ -export const zDownloadExportResponse = zExportDownloadUrlResponse; +export const zDownloadExportResponse = zExportDownloadUrlResponse export const zCreateAssetFromHashData = z.object({ - body: z.object({ - hash: z.string().regex(/^blake3:[a-f0-9]{64}$/), - mime_type: z.string().optional(), - name: z.string().optional(), - tags: z.array(z.string()).min(1), - user_metadata: z.record(z.unknown()).optional() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/), + mime_type: z.string().optional(), + name: z.string().optional(), + tags: z.array(z.string()).min(1), + user_metadata: z.record(z.unknown()).optional() + }), + path: z.never().optional(), + query: z.never().optional() +}) /** * Asset reference already existed for this user (deduplicated by content * hash); the existing asset is returned with created_new=false. * */ -export const zCreateAssetFromHashResponse = zAssetCreated; +export const zCreateAssetFromHashResponse = zAssetCreated export const zPostAssetsFromWorkflowData = z.object({ - body: zWorkflowApiAssetsRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zWorkflowApiAssetsRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zPostAssetsFromWorkflowResponse = zWorkflowApiAssetsResponse; +export const zPostAssetsFromWorkflowResponse = zWorkflowApiAssetsResponse export const zCheckAssetByHashData = z.object({ - body: z.never().optional(), - path: z.object({ - hash: z.string().regex(/^blake3:[a-f0-9]{64}$/) - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/) + }), + query: z.never().optional() +}) export const zImportPublishedAssetsData = z.object({ - body: zImportPublishedAssetsRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zImportPublishedAssetsRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Successfully imported assets */ -export const zImportPublishedAssetsResponse2 = zImportPublishedAssetsResponse; +export const zImportPublishedAssetsResponse2 = zImportPublishedAssetsResponse export const zPruneAssetsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Prune result */ export const zPruneAssetsResponse = z.object({ - marked: z.number().int().optional(), - status: z.string().optional() -}); + marked: z.number().int().optional(), + status: z.string().optional() +}) export const zGetRemoteAssetMetadataData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - url: z.string().url() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + url: z.string().url() + }) +}) /** * Metadata retrieved successfully */ -export const zGetRemoteAssetMetadataResponse = zAssetMetadataResponse; +export const zGetRemoteAssetMetadataResponse = zAssetMetadataResponse export const zSeedAssetsData = z.object({ - body: z.object({ - roots: z.array(z.string()).optional() - }).optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z + .object({ + roots: z.array(z.string()).optional() + }) + .optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Seed started */ export const zSeedAssetsResponse = z.object({ - status: z.string().optional() -}); + status: z.string().optional() +}) export const zCancelAssetSeedData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Scan cancelled */ export const zCancelAssetSeedResponse = z.object({ - status: z.string().optional() -}); + status: z.string().optional() +}) export const zGetAssetSeedStatusData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Scan progress details (files scanned, total, status, etc.) */ -export const zGetAssetSeedStatusResponse = z.record(z.unknown()); +export const zGetAssetSeedStatusResponse = z.record(z.unknown()) export const zGetAssetTagHistogramData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - include_tags: z.array(z.string()).optional(), - exclude_tags: z.array(z.string()).optional(), - name_contains: z.string().optional(), - metadata_filter: z.string().optional(), - limit: z.number().int().gte(1).lte(1000).optional().default(100), - include_public: z.boolean().optional().default(true) - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + include_tags: z.array(z.string()).optional(), + exclude_tags: z.array(z.string()).optional(), + name_contains: z.string().optional(), + metadata_filter: z.string().optional(), + limit: z.number().int().gte(1).lte(1000).optional().default(100), + include_public: z.boolean().optional().default(true) + }) + .optional() +}) /** * Success - Tag histogram returned */ -export const zGetAssetTagHistogramResponse = zAssetTagHistogramResponse; +export const zGetAssetTagHistogramResponse = zAssetTagHistogramResponse export const zCreateDesktopLoginCodeData = z.object({ - body: zDesktopLoginCodeCreateRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zDesktopLoginCodeCreateRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Login code created */ -export const zCreateDesktopLoginCodeResponse = zDesktopLoginCodeCreateResponse; +export const zCreateDesktopLoginCodeResponse = zDesktopLoginCodeCreateResponse export const zExchangeDesktopLoginCodeData = z.object({ - body: zDesktopLoginCodeExchangeRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zDesktopLoginCodeExchangeRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Pending (not yet redeemed) or complete with a custom token */ -export const zExchangeDesktopLoginCodeResponse = zDesktopLoginCodeExchangeResponse; +export const zExchangeDesktopLoginCodeResponse = + zDesktopLoginCodeExchangeResponse export const zRedeemDesktopLoginCodeData = z.object({ - body: zDesktopLoginCodeRedeemRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zDesktopLoginCodeRedeemRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Code redeemed (or already redeemed by the same user) */ -export const zRedeemDesktopLoginCodeResponse = zDesktopLoginCodeRedeemResponse; +export const zRedeemDesktopLoginCodeResponse = zDesktopLoginCodeRedeemResponse export const zDeleteSessionData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Session deleted successfully */ -export const zDeleteSessionResponse2 = zDeleteSessionResponse; +export const zDeleteSessionResponse2 = zDeleteSessionResponse export const zCreateSessionData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Session created successfully */ -export const zCreateSessionResponse2 = zCreateSessionResponse; +export const zCreateSessionResponse2 = zCreateSessionResponse export const zExchangeTokenData = z.object({ - body: zExchangeTokenRequest.optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: zExchangeTokenRequest.optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Token exchanged successfully */ -export const zExchangeTokenResponse2 = zExchangeTokenResponse; +export const zExchangeTokenResponse2 = zExchangeTokenResponse export const zGetBillingBalanceData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Credit balance */ -export const zGetBillingBalanceResponse = zBillingBalanceResponse; +export const zGetBillingBalanceResponse = zBillingBalanceResponse export const zGetBillingEventsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - page: z.number().int().gte(1).optional().default(1), - limit: z.number().int().gte(1).lte(100).optional().default(20) - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + page: z.number().int().gte(1).optional().default(1), + limit: z.number().int().gte(1).lte(100).optional().default(20) + }) + .optional() +}) /** * Paginated billing events */ -export const zGetBillingEventsResponse = zBillingEventsResponse; +export const zGetBillingEventsResponse = zBillingEventsResponse export const zGetBillingOpStatusData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}) /** * Billing operation status */ -export const zGetBillingOpStatusResponse = zBillingOpStatusResponse; +export const zGetBillingOpStatusResponse = zBillingOpStatusResponse export const zGetPaymentPortalData = z.object({ - body: zPaymentPortalRequest.optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: zPaymentPortalRequest.optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zGetPaymentPortalResponse = zPaymentPortalResponse; +export const zGetPaymentPortalResponse = zPaymentPortalResponse export const zGetBillingPlansData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Available plans with pricing */ -export const zGetBillingPlansResponse = zBillingPlansResponse; +export const zGetBillingPlansResponse = zBillingPlansResponse export const zPreviewSubscribeData = z.object({ - body: zPreviewSubscribeRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zPreviewSubscribeRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Subscription preview */ -export const zPreviewSubscribeResponse2 = zPreviewSubscribeResponse; +export const zPreviewSubscribeResponse2 = zPreviewSubscribeResponse export const zGetBillingStatusData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Billing status */ -export const zGetBillingStatusResponse = zBillingStatusResponse; +export const zGetBillingStatusResponse = zBillingStatusResponse export const zSubscribeData = z.object({ - body: zSubscribeRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zSubscribeRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Subscription created or payment method needed */ -export const zSubscribeResponse2 = zSubscribeResponse; +export const zSubscribeResponse2 = zSubscribeResponse export const zCancelSubscriptionData = z.object({ - body: zCancelSubscriptionRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zCancelSubscriptionRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Subscription cancellation scheduled */ -export const zCancelSubscriptionResponse2 = zCancelSubscriptionResponse; +export const zCancelSubscriptionResponse2 = zCancelSubscriptionResponse export const zResubscribeData = z.object({ - body: zResubscribeRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zResubscribeRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Subscription resumed successfully */ -export const zResubscribeResponse2 = zResubscribeResponse; +export const zResubscribeResponse2 = zResubscribeResponse export const zCreateTopupData = z.object({ - body: zCreateTopupRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zCreateTopupRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Top-up initiated successfully */ -export const zCreateTopupResponse2 = zCreateTopupResponse; +export const zCreateTopupResponse2 = zCreateTopupResponse export const zGetEmbeddingsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Embedding names */ -export const zGetEmbeddingsResponse = z.array(z.string()); +export const zGetEmbeddingsResponse = z.array(z.string()) export const zGetModelFoldersData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success - List of model folders */ -export const zGetModelFoldersResponse = z.array(zModelFolder); +export const zGetModelFoldersResponse = z.array(zModelFolder) export const zGetModelsInFolderData = z.object({ - body: z.never().optional(), - path: z.object({ - folder: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + folder: z.string() + }), + query: z.never().optional() +}) /** * Success - List of models in the folder */ -export const zGetModelsInFolderResponse = z.array(zModelFile); +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() -}); + body: z.never().optional(), + path: z.object({ + folder: z.string(), + path_index: z.number().int(), + filename: z.string() + }), + query: z.never().optional() +}) export const zGetNodeInfoSchemaData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) export const zGetNodeByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}) export const zGetExtensionsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * URL paths (relative to web root) of available extension JS files */ -export const zGetExtensionsResponse = z.array(z.string()); +export const zGetExtensionsResponse = z.array(z.string()) export const zGetFeaturesData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ export const zGetFeaturesResponse = z.object({ - max_upload_size: z.number().int().optional(), - supports_preview_metadata: z.boolean().optional() -}); + max_upload_size: z.number().int().optional(), + supports_preview_metadata: z.boolean().optional() +}) export const zSubmitFeedbackData = z.object({ - body: zFeedbackRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zFeedbackRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Feedback submitted successfully */ -export const zSubmitFeedbackResponse = zFeedbackResponse; +export const zSubmitFeedbackResponse = zFeedbackResponse export const zGetMaskLayersData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string() + }) +}) /** * Success - Related mask layers returned */ export const zGetMaskLayersResponse = z.object({ - mask: z.string().nullish(), - paint: z.string().nullish(), - painted: z.string().nullish(), - painted_masked: z.string().nullish() -}); + mask: z.string().nullish(), + paint: z.string().nullish(), + painted: z.string().nullish(), + painted_masked: z.string().nullish() +}) export const zFreeMemoryData = z.object({ - body: z.object({ - free_memory: z.boolean().optional(), - unload_models: z.boolean().optional() - }).optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z + .object({ + free_memory: z.boolean().optional(), + unload_models: z.boolean().optional() + }) + .optional(), + path: z.never().optional(), + query: z.never().optional() +}) export const zGetGlobalSubgraphsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success - Map of subgraph IDs to their metadata */ -export const zGetGlobalSubgraphsResponse = z.record(zGlobalSubgraphInfo); +export const zGetGlobalSubgraphsResponse = z.record(zGlobalSubgraphInfo) export const zGetGlobalSubgraphData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}) /** * Success - Full subgraph data */ -export const zGetGlobalSubgraphResponse = zGlobalSubgraphData; +export const zGetGlobalSubgraphResponse = zGlobalSubgraphData export const zGetLegacyHistoryData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) export const zManageHistoryData = z.object({ - body: zHistoryManageRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zHistoryManageRequest, + path: z.never().optional(), + query: z.never().optional() +}) export const zGetLegacyHistoryByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - prompt_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + prompt_id: z.string() + }), + query: z.never().optional() +}) export const zGetHistoryData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - max_items: z.number().int().optional(), - offset: z.number().int().optional().default(0) - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + max_items: z.number().int().optional(), + offset: z.number().int().optional().default(0) + }) + .optional() +}) /** * Success - Execution history retrieved */ -export const zGetHistoryResponse = zHistoryResponse; +export const zGetHistoryResponse = zHistoryResponse export const zGetHistoryForPromptData = z.object({ - body: z.never().optional(), - path: z.object({ - prompt_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + prompt_id: z.string() + }), + query: z.never().optional() +}) /** * Success - History for prompt retrieved */ -export const zGetHistoryForPromptResponse = zHistoryDetailResponse; +export const zGetHistoryForPromptResponse = zHistoryDetailResponse export const zCreateHubAssetUploadUrlData = z.object({ - body: zHubAssetUploadUrlRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zHubAssetUploadUrlRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Presigned upload URL and token */ -export const zCreateHubAssetUploadUrlResponse = zHubAssetUploadUrlResponse; +export const zCreateHubAssetUploadUrlResponse = zHubAssetUploadUrlResponse export const zListHubLabelsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - type: z.enum([ - 'tag', - 'model', - 'custom_node' - ]).optional() - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + type: z.enum(['tag', 'model', 'custom_node']).optional() + }) + .optional() +}) /** * List of labels */ -export const zListHubLabelsResponse = zHubLabelListResponse; +export const zListHubLabelsResponse = zHubLabelListResponse export const zCreateHubProfileData = z.object({ - body: zCreateHubProfileRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zCreateHubProfileRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Hub profile created */ -export const zCreateHubProfileResponse = zHubProfile; +export const zCreateHubProfileResponse = zHubProfile export const zGetHubProfileByUsernameData = z.object({ - body: z.never().optional(), - path: z.object({ - username: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + username: z.string() + }), + query: z.never().optional() +}) /** * Hub profile */ -export const zGetHubProfileByUsernameResponse = zHubProfile; +export const zGetHubProfileByUsernameResponse = zHubProfile export const zUpdateHubProfileData = z.object({ - body: zUpdateHubProfileRequest, - path: z.object({ - username: z.string() - }), - query: z.never().optional() -}); + body: zUpdateHubProfileRequest, + path: z.object({ + username: z.string() + }), + query: z.never().optional() +}) /** * Hub profile updated */ -export const zUpdateHubProfileResponse = zHubProfile; +export const zUpdateHubProfileResponse = zHubProfile export const zCheckHubUsernameData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - username: z.string() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + username: z.string() + }) +}) /** * Username availability result */ -export const zCheckHubUsernameResponse = zHubUsernameCheckResponse; +export const zCheckHubUsernameResponse = zHubUsernameCheckResponse export const zGetMyHubProfileData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Hub profile */ -export const zGetMyHubProfileResponse = zHubProfile; +export const zGetMyHubProfileResponse = zHubProfile export const zListHubWorkflowsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - cursor: z.string().optional(), - limit: z.number().int().gte(1).lte(100).optional().default(20), - search: z.string().optional(), - tag: z.string().optional(), - username: z.string().optional(), - detail: z.boolean().optional().default(false), - status: z.array(zHubWorkflowStatus).optional() - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + cursor: z.string().optional(), + limit: z.number().int().gte(1).lte(100).optional().default(20), + search: z.string().optional(), + tag: z.string().optional(), + username: z.string().optional(), + detail: z.boolean().optional().default(false), + status: z.array(zHubWorkflowStatus).optional() + }) + .optional() +}) /** * Paginated list of hub workflows */ -export const zListHubWorkflowsResponse = zHubWorkflowListResponse; +export const zListHubWorkflowsResponse = zHubWorkflowListResponse export const zPublishHubWorkflowData = z.object({ - body: zPublishHubWorkflowRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zPublishHubWorkflowRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Workflow published to hub */ -export const zPublishHubWorkflowResponse = zHubWorkflowDetail; +export const zPublishHubWorkflowResponse = zHubWorkflowDetail export const zDeleteHubWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - share_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + share_id: z.string() + }), + query: z.never().optional() +}) /** * Successfully unpublished */ -export const zDeleteHubWorkflowResponse = z.void(); +export const zDeleteHubWorkflowResponse = z.void() export const zGetHubWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - share_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + share_id: z.string() + }), + query: z.never().optional() +}) /** * Hub workflow detail */ -export const zGetHubWorkflowResponse = zHubWorkflowDetail; +export const zGetHubWorkflowResponse = zHubWorkflowDetail export const zListHubWorkflowIndexData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - status: z.array(zHubWorkflowStatus).optional() - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + status: z.array(zHubWorkflowStatus).optional() + }) + .optional() +}) /** * List of hub workflow template entries */ -export const zListHubWorkflowIndexResponse = z.array(zHubWorkflowTemplateEntry); +export const zListHubWorkflowIndexResponse = z.array(zHubWorkflowTemplateEntry) export const zGetI18nData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Nested map of locale to translation key-value pairs */ -export const zGetI18nResponse = z.record(z.unknown()); +export const zGetI18nResponse = z.record(z.unknown()) export const zInterruptJobData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) export const zAcceptWorkspaceInviteData = z.object({ - body: z.never().optional(), - path: z.object({ - token: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + token: z.string() + }), + query: z.never().optional() +}) /** * Invite accepted, user is now a member */ -export const zAcceptWorkspaceInviteResponse = zAcceptInviteResponse; +export const zAcceptWorkspaceInviteResponse = zAcceptInviteResponse export const zGetLegacyJobByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + job_id: z.string() + }), + query: z.never().optional() +}) export const zGetLegacyJobOutputsData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + job_id: z.string() + }), + query: z.never().optional() +}) export const zGetJobStatusData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + job_id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Success - Job status returned */ -export const zGetJobStatusResponse = zJobStatusResponse; +export const zGetJobStatusResponse = zJobStatusResponse export const zListJobsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - status: z.string().optional(), - workflow_id: z.string().optional(), - output_type: z.enum([ - 'image', - 'video', - 'audio', - '3d' - ]).optional(), - sort_by: z.enum(['create_time', 'execution_time']).optional(), - sort_order: z.enum(['asc', 'desc']).optional(), - after: z.string().optional(), - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(1000).optional().default(100) - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + status: z.string().optional(), + workflow_id: z.string().optional(), + output_type: z.enum(['image', 'video', 'audio', '3d']).optional(), + sort_by: z.enum(['create_time', 'execution_time']).optional(), + sort_order: z.enum(['asc', 'desc']).optional(), + after: z.string().optional(), + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(1000).optional().default(100) + }) + .optional() +}) /** * Success - Jobs retrieved */ -export const zListJobsResponse = zJobsListResponse; +export const zListJobsResponse = zJobsListResponse export const zGetJobDetailData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string().uuid() - }), - query: z.object({ - short_link: z.enum(['ephemeral_tool_chain', 'default']).optional() - }).optional() -}); + body: z.never().optional(), + path: z.object({ + job_id: z.string().uuid() + }), + query: z + .object({ + short_link: z.enum(['ephemeral_tool_chain', 'default']).optional() + }) + .optional() +}) /** * Success - Job details retrieved */ -export const zGetJobDetailResponse = zJobDetailResponse; +export const zGetJobDetailResponse = zJobDetailResponse export const zCancelJobData = z.object({ - body: z.never().optional(), - path: z.object({ - job_id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + job_id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Success - Cancel request accepted (or job was already terminal) */ -export const zCancelJobResponse = zJobCancelResponse; +export const zCancelJobResponse = zJobCancelResponse export const zCancelJobsData = z.object({ - body: zJobsCancelRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zJobsCancelRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Success - cancel requests dispatched (or jobs were already terminal) */ -export const zCancelJobsResponse = zJobsCancelResponse; +export const zCancelJobsResponse = zJobsCancelResponse export const zGetLegacyModelsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) export const zGetLegacyModelsByFolderData = z.object({ - body: z.never().optional(), - path: z.object({ - folder: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + folder: z.string() + }), + query: z.never().optional() +}) export const zGetNodeReplacementsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success - Node replacement mappings */ -export const zGetNodeReplacementsResponse = z.record(z.unknown()); +export const zGetNodeReplacementsResponse = z.record(z.unknown()) export const zGetNodeInfoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zGetNodeInfoResponse = z.record(zNodeInfo); +export const zGetNodeInfoResponse = z.record(zNodeInfo) export const zGetLegacyObjectInfoByNodeClassData = z.object({ - body: z.never().optional(), - path: z.object({ - node_class: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + node_class: z.string() + }), + query: z.never().optional() +}) export const zGetPromptInfoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zGetPromptInfoResponse = zPromptInfo; +export const zGetPromptInfoResponse = zPromptInfo export const zExecutePromptData = z.object({ - body: zPromptRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zPromptRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Success - Prompt accepted */ -export const zExecutePromptResponse = zPromptResponse; +export const zExecutePromptResponse = zPromptResponse export const zGetLegacyPromptByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - prompt_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + prompt_id: z.string() + }), + query: z.never().optional() +}) export const zGetQueueInfoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zGetQueueInfoResponse = zQueueInfo; +export const zGetQueueInfoResponse = zQueueInfo export const zManageQueueData = z.object({ - body: zQueueManageRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zQueueManageRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zManageQueueResponse = zQueueManageResponse; +export const zManageQueueResponse = zQueueManageResponse export const zListSecretsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zListSecretsResponse = zSecretListResponse; +export const zListSecretsResponse = zSecretListResponse export const zCreateSecretData = z.object({ - body: zCreateSecretRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zCreateSecretRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Secret created successfully */ -export const zCreateSecretResponse = zSecretResponse; +export const zCreateSecretResponse = zSecretResponse export const zDeleteSecretData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Secret deleted successfully */ -export const zDeleteSecretResponse = z.void(); +export const zDeleteSecretResponse = z.void() export const zGetSecretData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Success */ -export const zGetSecretResponse = zSecretResponse; +export const zGetSecretResponse = zSecretResponse export const zUpdateSecretData = z.object({ - body: zUpdateSecretRequest, - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: zUpdateSecretRequest, + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Secret updated successfully */ -export const zUpdateSecretResponse = zSecretResponse; +export const zUpdateSecretResponse = zSecretResponse export const zListSecretProvidersData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zListSecretProvidersResponse = zSecretProvidersResponse; +export const zListSecretProvidersResponse = zSecretProvidersResponse export const zGetAllSettingsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * User settings as key-value pairs */ -export const zGetAllSettingsResponse = z.record(z.unknown()); +export const zGetAllSettingsResponse = z.record(z.unknown()) export const zUpdateMultipleSettingsData = z.object({ - body: z.record(z.unknown()), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.record(z.unknown()), + path: z.never().optional(), + query: z.never().optional() +}) /** * Updated user settings */ -export const zUpdateMultipleSettingsResponse = z.record(z.unknown()); +export const zUpdateMultipleSettingsResponse = z.record(z.unknown()) export const zGetSettingByIdData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}) /** * Setting value response */ export const zGetSettingByIdResponse = z.object({ - value: z.unknown().optional() -}); + value: z.unknown().optional() +}) export const zUpdateSettingByIdData = z.object({ - body: z.unknown(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}); + body: z.unknown(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}) /** * Updated setting value response */ export const zUpdateSettingByIdResponse = z.object({ - value: z.unknown().optional() -}); + value: z.unknown().optional() +}) export const zGetSystemStatsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zGetSystemStatsResponse = zSystemStatsResponse; +export const zGetSystemStatsResponse = zSystemStatsResponse export const zListTagsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - prefix: z.string().optional(), - limit: z.number().int().gte(1).lte(1000).optional().default(100), - offset: z.number().int().gte(0).optional().default(0), - order: z.enum(['count_desc', 'name_asc']).optional(), - include_zero: z.boolean().optional().default(false), - include_public: z.boolean().optional().default(true) - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + prefix: z.string().optional(), + limit: z.number().int().gte(1).lte(1000).optional().default(100), + offset: z.number().int().gte(0).optional().default(0), + order: z.enum(['count_desc', 'name_asc']).optional(), + include_zero: z.boolean().optional().default(false), + include_public: z.boolean().optional().default(true) + }) + .optional() +}) /** * Tags retrieved successfully */ -export const zListTagsResponse2 = zListTagsResponse; +export const zListTagsResponse2 = zListTagsResponse export const zListTasksData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - task_name: z.string().optional(), - idempotency_key: z.string().optional(), - status: z.string().optional(), - created_after: z.string().datetime().optional(), - created_before: z.string().datetime().optional(), - sort_order: z.enum(['asc', 'desc']).optional(), - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(100).optional().default(20) - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + task_name: z.string().optional(), + idempotency_key: z.string().optional(), + status: z.string().optional(), + created_after: z.string().datetime().optional(), + created_before: z.string().datetime().optional(), + sort_order: z.enum(['asc', 'desc']).optional(), + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(100).optional().default(20) + }) + .optional() +}) /** * Success - Tasks retrieved */ -export const zListTasksResponse = zTasksListResponse; +export const zListTasksResponse = zTasksListResponse export const zGetTaskData = z.object({ - body: z.never().optional(), - path: z.object({ - task_id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + task_id: z.string().uuid() + }), + query: z.never().optional() +}) /** * Success - Task details retrieved */ -export const zGetTaskResponse = zTaskResponse; +export const zGetTaskResponse = zTaskResponse export const zUploadImageData = z.object({ - body: z.object({ - image: z.string(), - overwrite: z.string().optional(), - subfolder: z.string().optional(), - type: z.string().optional() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + image: z.string(), + overwrite: z.string().optional(), + subfolder: z.string().optional(), + type: z.string().optional() + }), + path: z.never().optional(), + query: z.never().optional() +}) /** * Image uploaded successfully */ export const zUploadImageResponse = z.object({ - name: z.string().optional(), - subfolder: z.string().optional(), - type: z.string().optional() -}); + name: z.string().optional(), + subfolder: z.string().optional(), + type: z.string().optional() +}) export const zUploadMaskData = z.object({ - body: z.object({ - image: z.string(), - original_ref: z.string() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + image: z.string(), + original_ref: z.string() + }), + path: z.never().optional(), + query: z.never().optional() +}) /** * Mask uploaded successfully */ export const zUploadMaskResponse = z.object({ - name: z.string().optional(), - subfolder: z.string().optional(), - type: z.string().optional() -}); + name: z.string().optional(), + subfolder: z.string().optional(), + type: z.string().optional() +}) export const zGetUserData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Success */ -export const zGetUserResponse = zUserResponse; +export const zGetUserResponse = zUserResponse export const zGetUserdataData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - dir: z.string().optional(), - recurse: z.boolean().optional().default(false), - split: z.boolean().optional().default(false), - full_info: z.boolean().optional().default(false) - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + dir: z.string().optional(), + recurse: z.boolean().optional().default(false), + split: z.boolean().optional().default(false), + full_info: z.boolean().optional().default(false) + }) + .optional() +}) /** * A list of user data files. */ -export const zGetUserdataResponse = zGetUserDataResponseFull; +export const zGetUserdataResponse = zGetUserDataResponseFull export const zDeleteUserdataFileData = z.object({ - body: z.never().optional(), - path: z.object({ - file: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + file: z.string() + }), + query: z.never().optional() +}) /** * File deleted successfully (No Content). */ -export const zDeleteUserdataFileResponse = z.void(); +export const zDeleteUserdataFileResponse = z.void() export const zGetUserdataFileData = z.object({ - body: z.never().optional(), - path: z.object({ - file: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + file: z.string() + }), + query: z.never().optional() +}) /** * Successfully retrieved the file. */ -export const zGetUserdataFileResponse = z.string(); +export const zGetUserdataFileResponse = z.string() export const zPostUserdataFileData = z.object({ - body: z.string(), - path: z.object({ - file: z.string() - }), - query: z.object({ - overwrite: z.enum(['true', 'false']).optional(), - full_info: z.enum(['true', 'false']).optional() - }).optional() -}); + body: z.string(), + path: z.object({ + file: z.string() + }), + query: z + .object({ + overwrite: z.enum(['true', 'false']).optional(), + full_info: z.enum(['true', 'false']).optional() + }) + .optional() +}) /** * File uploaded successfully. */ -export const zPostUserdataFileResponse = zUserDataResponseFull; +export const zPostUserdataFileResponse = zUserDataResponseFull export const zMoveUserdataFileData = z.object({ - body: z.never().optional(), - path: z.object({ - file: z.string(), - dest: z.string() - }), - query: z.object({ - overwrite: z.enum(['true', 'false']).optional() - }).optional() -}); + body: z.never().optional(), + path: z.object({ + file: z.string(), + dest: z.string() + }), + query: z + .object({ + overwrite: z.enum(['true', 'false']).optional() + }) + .optional() +}) /** * File moved successfully. */ -export const zMoveUserdataFileResponse = zUserDataResponseFull; +export const zMoveUserdataFileResponse = zUserDataResponseFull export const zGetUserdataFilePublishData = z.object({ - body: z.never().optional(), - path: z.object({ - file: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + file: z.string() + }), + query: z.never().optional() +}) /** * Publish info (publish_time is null if never published) */ -export const zGetUserdataFilePublishResponse = zWorkflowPublishInfo; +export const zGetUserdataFilePublishResponse = zWorkflowPublishInfo export const zPostUserdataFilePublishData = z.object({ - body: zPublishWorkflowAssetsRequest, - path: z.object({ - file: z.string() - }), - query: z.never().optional() -}); + body: zPublishWorkflowAssetsRequest, + path: z.object({ + file: z.string() + }), + query: z.never().optional() +}) /** * Workflow published */ -export const zPostUserdataFilePublishResponse = zWorkflowPublishInfo; +export const zPostUserdataFilePublishResponse = zWorkflowPublishInfo export const zGetUsersInfoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Userdata storage information */ export const zGetUsersInfoResponse = z.object({ - migrated: z.boolean(), - storage: z.string() -}); + migrated: z.boolean(), + storage: z.string() +}) export const zGetLegacyUserdataV2Data = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) export const zGetVhsQueryVideoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string() + }) +}) /** * Video metadata */ export const zGetVhsQueryVideoResponse = z.object({ - source: z.object({ - duration: z.number(), - fps: z.number(), - frames: z.number().int(), - size: z.tuple([z.number().int(), z.number().int()]) - }) -}); + source: z.object({ + duration: z.number(), + fps: z.number(), + frames: z.number().int(), + size: z.tuple([z.number().int(), z.number().int()]) + }) +}) export const zGetVhsViewAudioData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string(), - type: z.string().optional(), - subfolder: z.string().optional() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string(), + type: z.string().optional(), + subfolder: z.string().optional() + }) +}) export const zGetVhsViewVideoData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string(), - type: z.string().optional(), - subfolder: z.string().optional() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string(), + type: z.string().optional(), + subfolder: z.string().optional() + }) +}) export const zViewFileData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string(), - subfolder: z.string().optional(), - type: z.string().optional(), - fullpath: z.string().optional(), - format: z.string().optional(), - frame_rate: z.number().int().optional(), - workflow: z.string().optional(), - timestamp: z.number().int().optional(), - channel: z.string().optional(), - res: z.number().int().gte(64).lte(1024).optional() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string(), + subfolder: z.string().optional(), + type: z.string().optional(), + fullpath: z.string().optional(), + format: z.string().optional(), + frame_rate: z.number().int().optional(), + workflow: z.string().optional(), + timestamp: z.number().int().optional(), + channel: z.string().optional(), + res: z.number().int().gte(64).lte(1024).optional() + }) +}) /** * Resized JPEG thumbnail (returned when res parameter is used) */ -export const zViewFileResponse = z.string(); +export const zViewFileResponse = z.string() export const zGetLegacyViewMetadataData = z.object({ - body: z.never().optional(), - path: z.object({ - folder_name: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + folder_name: z.string() + }), + query: z.never().optional() +}) export const zGetApiViewVideoAliasData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string() + }) +}) export const zGetWorkflowTemplatesData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Empty object for workflow templates */ -export const zGetWorkflowTemplatesResponse = z.record(z.unknown()); +export const zGetWorkflowTemplatesResponse = z.record(z.unknown()) export const zListWorkflowsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - limit: z.number().int().lte(100).optional().default(20), - offset: z.number().int().optional().default(0), - name: z.string().optional(), - default_view: z.enum(['workflow', 'app']).optional(), - sort: z.enum([ - 'create_time', - 'update_time', - 'name' - ]).optional(), - order: z.enum(['asc', 'desc']).optional() - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + limit: z.number().int().lte(100).optional().default(20), + offset: z.number().int().optional().default(0), + name: z.string().optional(), + default_view: z.enum(['workflow', 'app']).optional(), + sort: z.enum(['create_time', 'update_time', 'name']).optional(), + order: z.enum(['asc', 'desc']).optional() + }) + .optional() +}) /** * Success */ -export const zListWorkflowsResponse = zWorkflowListResponse; +export const zListWorkflowsResponse = zWorkflowListResponse export const zCreateWorkflowData = z.object({ - body: zCreateWorkflowRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zCreateWorkflowRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Workflow created successfully */ -export const zCreateWorkflowResponse = zWorkflowResponse; +export const zCreateWorkflowResponse = zWorkflowResponse export const zDeleteWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}) /** * Workflow deleted successfully */ -export const zDeleteWorkflowResponse = z.void(); +export const zDeleteWorkflowResponse = z.void() export const zGetWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}) /** * Success */ -export const zGetWorkflowResponse = zWorkflowResponse; +export const zGetWorkflowResponse = zWorkflowResponse export const zUpdateWorkflowData = z.object({ - body: zUpdateWorkflowRequest, - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}); + body: zUpdateWorkflowRequest, + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}) /** * Success */ -export const zUpdateWorkflowResponse = zWorkflowResponse; +export const zUpdateWorkflowResponse = zWorkflowResponse export const zGetWorkflowContentData = z.object({ - body: z.never().optional(), - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}) /** * Success */ -export const zGetWorkflowContentResponse = zWorkflowVersionContentResponse; +export const zGetWorkflowContentResponse = zWorkflowVersionContentResponse export const zForkWorkflowData = z.object({ - body: zForkWorkflowRequest, - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}); + body: zForkWorkflowRequest, + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}) /** * Workflow forked successfully */ -export const zForkWorkflowResponse = zWorkflowResponse; +export const zForkWorkflowResponse = zWorkflowResponse export const zCreateWorkflowVersionData = z.object({ - body: zCreateWorkflowVersionRequest, - path: z.object({ - workflow_id: z.string() - }), - query: z.never().optional() -}); + body: zCreateWorkflowVersionRequest, + path: z.object({ + workflow_id: z.string() + }), + query: z.never().optional() +}) /** * Version created successfully */ -export const zCreateWorkflowVersionResponse = zWorkflowVersionResponse; +export const zCreateWorkflowVersionResponse = zWorkflowVersionResponse export const zGetPublishedWorkflowData = z.object({ - body: z.never().optional(), - path: z.object({ - share_id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + share_id: z.string() + }), + query: z.never().optional() +}) /** * Published workflow details with asset statuses */ -export const zGetPublishedWorkflowResponse = zPublishedWorkflowDetail; +export const zGetPublishedWorkflowResponse = zPublishedWorkflowDetail export const zListWorkspaceApiKeysData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * List of API keys */ -export const zListWorkspaceApiKeysResponse2 = zListWorkspaceApiKeysResponse; +export const zListWorkspaceApiKeysResponse2 = zListWorkspaceApiKeysResponse export const zCreateWorkspaceApiKeyData = z.object({ - body: zCreateWorkspaceApiKeyRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zCreateWorkspaceApiKeyRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * API key created (plaintext returned once) */ -export const zCreateWorkspaceApiKeyResponse2 = zCreateWorkspaceApiKeyResponse; +export const zCreateWorkspaceApiKeyResponse2 = zCreateWorkspaceApiKeyResponse export const zRevokeWorkspaceApiKeyData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string().uuid() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string().uuid() + }), + query: z.never().optional() +}) /** * API key revoked */ -export const zRevokeWorkspaceApiKeyResponse = z.void(); +export const zRevokeWorkspaceApiKeyResponse = z.void() export const zListWorkspaceInvitesData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * List of pending invites */ -export const zListWorkspaceInvitesResponse = zListInvitesResponse; +export const zListWorkspaceInvitesResponse = zListInvitesResponse export const zCreateWorkspaceInviteData = z.object({ - body: zCreateInviteRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zCreateInviteRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Invite created */ -export const zCreateWorkspaceInviteResponse = zPendingInvite; +export const zCreateWorkspaceInviteResponse = zPendingInvite export const zRevokeWorkspaceInviteData = z.object({ - body: z.never().optional(), - path: z.object({ - inviteId: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + inviteId: z.string() + }), + query: z.never().optional() +}) /** * Invite revoked */ -export const zRevokeWorkspaceInviteResponse = z.void(); +export const zRevokeWorkspaceInviteResponse = z.void() export const zLeaveWorkspaceData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Successfully left workspace */ -export const zLeaveWorkspaceResponse = z.void(); +export const zLeaveWorkspaceResponse = z.void() export const zListWorkspaceMembersData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(100).optional().default(20) - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(100).optional().default(20) + }) + .optional() +}) /** * List of members */ -export const zListWorkspaceMembersResponse = zListMembersResponse; +export const zListWorkspaceMembersResponse = zListMembersResponse export const zBulkRevokeWorkspaceMemberApiKeysData = z.object({ - body: z.never().optional(), - path: z.object({ - user_id: z.string().min(1) - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + user_id: z.string().min(1) + }), + query: z.never().optional() +}) /** * Keys revoked successfully */ -export const zBulkRevokeWorkspaceMemberApiKeysResponse = zBulkRevokeApiKeysResponse; +export const zBulkRevokeWorkspaceMemberApiKeysResponse = + zBulkRevokeApiKeysResponse export const zRemoveWorkspaceMemberData = z.object({ - body: z.never().optional(), - path: z.object({ - userId: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + userId: z.string() + }), + query: z.never().optional() +}) /** * Member removed */ -export const zRemoveWorkspaceMemberResponse = z.void(); +export const zRemoveWorkspaceMemberResponse = z.void() export const zUpdateWorkspaceMemberRoleData = z.object({ - body: zUpdateMemberRoleRequest, - path: z.object({ - userId: z.string() - }), - query: z.never().optional() -}); + body: zUpdateMemberRoleRequest, + path: z.object({ + userId: z.string() + }), + query: z.never().optional() +}) /** * Member role updated */ -export const zUpdateWorkspaceMemberRoleResponse = zMember; +export const zUpdateWorkspaceMemberRoleResponse = zMember export const zListWorkspacesData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * List of workspaces */ -export const zListWorkspacesResponse2 = zListWorkspacesResponse; +export const zListWorkspacesResponse2 = zListWorkspacesResponse export const zCreateWorkspaceData = z.object({ - body: zCreateWorkspaceRequest, - path: z.never().optional(), - query: z.never().optional() -}); + body: zCreateWorkspaceRequest, + path: z.never().optional(), + query: z.never().optional() +}) /** * Workspace created */ -export const zCreateWorkspaceResponse = zWorkspace; +export const zCreateWorkspaceResponse = zWorkspace export const zDeleteWorkspaceData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}) /** * Workspace deleted */ -export const zDeleteWorkspaceResponse = z.void(); +export const zDeleteWorkspaceResponse = z.void() export const zGetWorkspaceData = z.object({ - body: z.never().optional(), - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}) /** * Workspace details */ -export const zGetWorkspaceResponse = zWorkspace; +export const zGetWorkspaceResponse = zWorkspace export const zUpdateWorkspaceData = z.object({ - body: zUpdateWorkspaceRequest, - path: z.object({ - id: z.string() - }), - query: z.never().optional() -}); + body: zUpdateWorkspaceRequest, + path: z.object({ + id: z.string() + }), + query: z.never().optional() +}) /** * Workspace updated */ -export const zUpdateWorkspaceResponse = zWorkspace; +export const zUpdateWorkspaceResponse = zWorkspace export const zGetStaticExtensionsData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + path: z.string() + }), + query: z.never().optional() +}) export const zGetHealthData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Service is healthy */ -export const zGetHealthResponse = z.string(); +export const zGetHealthResponse = z.string() export const zGetInternalFolderPathsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Map of folder type name to list of path entries */ -export const zGetInternalFolderPathsResponse = z.record(z.array(z.array(z.string()))); +export const zGetInternalFolderPathsResponse = z.record( + z.array(z.array(z.string())) +) export const zGetInternalLogsData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Log text */ -export const zGetInternalLogsResponse = z.string(); +export const zGetInternalLogsResponse = z.string() export const zGetInternalLogsRawData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.never().optional() +}) /** * Structured log data */ export const zGetInternalLogsRawResponse = z.object({ - entries: z.array(z.object({ + entries: z + .array( + z.object({ m: z.string().optional(), t: z.number().optional() - })).optional(), - size: z.object({ - cols: z.number().int().optional(), - rows: z.number().int().optional() - }).optional() -}); + }) + ) + .optional(), + size: z + .object({ + cols: z.number().int().optional(), + rows: z.number().int().optional() + }) + .optional() +}) export const zSubscribeToLogsData = z.object({ - body: z.object({ - clientId: z.string(), - enabled: z.boolean() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + clientId: z.string(), + enabled: z.boolean() + }), + path: z.never().optional(), + query: z.never().optional() +}) 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() -}); + 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 zGetOAuthAuthorizeResponse = zOAuthConsentChallenge export const zPostOAuthAuthorizeData = z.object({ - body: z.object({ - csrf_token: z.string(), - decision: z.enum(['allow', 'deny']), - oauth_request_id: z.string().uuid(), - workspace_id: z.string() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + csrf_token: z.string(), + decision: z.enum(['allow', 'deny']), + oauth_request_id: z.string().uuid(), + 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 zPostOAuthAuthorizeResponse = zOAuthAuthorizeRedirectResponse export const zPostOAuthRegisterData = z.object({ - body: zOAuthRegisterRequest, - path: z.never().optional(), - query: z.never().optional() -}); + 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 zPostOAuthRegisterResponse = zOAuthRegisterResponse export const zPostOAuthTokenData = z.object({ - body: z.object({ - client_id: z.string(), - client_secret: z.string().optional(), - code: z.string().optional(), - code_verifier: z.string().optional(), - grant_type: z.enum(['authorization_code', 'refresh_token']), - redirect_uri: z.string().optional(), - refresh_token: z.string().optional(), - scope: z.string().optional() - }), - path: z.never().optional(), - query: z.never().optional() -}); + body: z.object({ + client_id: z.string(), + client_secret: z.string().optional(), + code: z.string().optional(), + code_verifier: z.string().optional(), + grant_type: z.enum(['authorization_code', 'refresh_token']), + redirect_uri: z.string().optional(), + refresh_token: z.string().optional(), + scope: z.string().optional() + }), + path: z.never().optional(), + query: z.never().optional() +}) /** * New token pair */ -export const zPostOAuthTokenResponse = zOAuthTokenResponse; +export const zPostOAuthTokenResponse = zOAuthTokenResponse export const zGetTemplateProxyData = z.object({ - body: z.never().optional(), - path: z.object({ - path: z.string() - }), - query: z.never().optional() -}); + body: z.never().optional(), + path: z.object({ + path: z.string() + }), + query: z.never().optional() +}) export const zGetViewCompatAliasData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - filename: z.string() - }) -}); + body: z.never().optional(), + path: z.never().optional(), + query: z.object({ + filename: z.string() + }) +}) export const zGetWebsocketData = z.object({ - body: z.never().optional(), - path: z.never().optional(), - query: z.object({ - clientId: z.string().optional() - }).optional() -}); + body: z.never().optional(), + path: z.never().optional(), + query: z + .object({ + clientId: z.string().optional() + }) + .optional() +})