From 4a61f64a5866e4b985af6dd8dbda77e47b68a406 Mon Sep 17 00:00:00 2001 From: dante01yoon <6510430+dante01yoon@users.noreply.github.com> Date: Mon, 24 Aug 2026 22:23:47 +0000 Subject: [PATCH] [chore] Update Ingest API types from cloud@2f554c4 --- packages/ingest-types/src/index.ts | 1062 +- packages/ingest-types/src/types.gen.ts | 18625 +++++++++++------------ packages/ingest-types/src/zod.gen.ts | 4126 +++-- 3 files changed, 11167 insertions(+), 12646 deletions(-) diff --git a/packages/ingest-types/src/index.ts b/packages/ingest-types/src/index.ts index 41844da4e26..787fdbbcd0c 100644 --- a/packages/ingest-types/src/index.ts +++ b/packages/ingest-types/src/index.ts @@ -1,1063 +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, - AgentAnswerAccepted, - AgentAnswerAskData, - AgentAnswerAskError, - AgentAnswerAskErrors, - AgentAnswerAskResponse, - AgentAnswerAskResponses, - AgentAnswerRequest, - AgentCancelAccepted, - AgentCancelMessageData, - AgentCancelMessageError, - AgentCancelMessageErrors, - AgentCancelMessageResponse, - AgentCancelMessageResponses, - AgentCreateThreadData, - AgentCreateThreadError, - AgentCreateThreadErrors, - AgentCreateThreadResponse, - AgentCreateThreadResponses, - AgentDeleteSkillData, - AgentDeleteSkillError, - AgentDeleteSkillErrors, - AgentDeleteSkillResponse, - AgentDeleteSkillResponses, - AgentDraftSnapshot, - AgentError, - AgentGetDraftData, - AgentGetDraftError, - AgentGetDraftErrors, - AgentGetDraftResponse, - AgentGetDraftResponses, - AgentGetMessagesData, - AgentGetMessagesError, - AgentGetMessagesErrors, - AgentGetMessagesResponse, - AgentGetMessagesResponses, - AgentListSkillsData, - AgentListSkillsError, - AgentListSkillsErrors, - AgentListSkillsResponse, - AgentListSkillsResponses, - AgentListThreadsData, - AgentListThreadsError, - AgentListThreadsErrors, - AgentListThreadsResponse, - AgentListThreadsResponses, - AgentMessage, - AgentPostMessageData, - AgentPostMessageError, - AgentPostMessageErrors, - AgentPostMessageRequest, - AgentPostMessageResponse, - AgentPostMessageResponses, - AgentPublishSkillData, - AgentPublishSkillError, - AgentPublishSkillErrors, - AgentPublishSkillResponse, - AgentPublishSkillResponses, - AgentSkill, - AgentSkillListResponse, - AgentSkillPublishRequest, - AgentThreadCreated, - AgentThreadCreateRequest, - AgentThreadListResponse, - AgentThreadSummary, - AgentTurnAccepted, - Asset, - AssetCreated, - AssetCreatedWritable, - AssetDownloadResponse, - AssetInfo, - AssetMetadataResponse, - AssetTagHistogramResponse, - AssetUpdated, - AssetWritable, - BillingAddress, - BillingBalanceResponse, - BillingCompanyDetailsResponse, - BillingCompanyDetailsUpdateRequest, - BillingEvent, - BillingEventsResponse, - BillingOpStatusResponse, - BillingPlansResponse, - BillingStatus, - BillingStatusResponse, - BillingTaxId, - 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, - CatalogProvider, - CheckAssetByHashData, - CheckAssetByHashError, - CheckAssetByHashErrors, - CheckAssetByHashResponses, - CheckHubUsernameData, - CheckHubUsernameError, - CheckHubUsernameErrors, - CheckHubUsernameResponse, - CheckHubUsernameResponses, - ChurnkeyAuthResponse, - 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, - CreateInputUploadUrlData, - CreateInputUploadUrlError, - CreateInputUploadUrlErrors, - CreateInputUploadUrlResponse, - CreateInputUploadUrlResponses, - 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, - CreateWorkflowUploadUrlData, - CreateWorkflowUploadUrlError, - CreateWorkflowUploadUrlErrors, - CreateWorkflowUploadUrlResponse, - CreateWorkflowUploadUrlResponses, - CreateWorkflowVersionData, - CreateWorkflowVersionError, - CreateWorkflowVersionErrors, - CreateWorkflowVersionRequest, - CreateWorkflowVersionResponse, - CreateWorkflowVersionResponses, - CreateWorkspaceApiKeyData, - CreateWorkspaceApiKeyError, - CreateWorkspaceApiKeyErrors, - CreateWorkspaceApiKeyRequest, - CreateWorkspaceApiKeyResponse, - CreateWorkspaceApiKeyResponse2, - CreateWorkspaceApiKeyResponses, - CreateWorkspaceData, - CreateWorkspaceError, - CreateWorkspaceErrors, - CreateWorkspaceInviteData, - CreateWorkspaceInviteError, - CreateWorkspaceInviteErrors, - CreateWorkspaceInviteResponse, - CreateWorkspaceInviteResponses, - CreateWorkspaceRequest, - CreateWorkspaceResponse, - CreateWorkspaceResponses, - CredentialOption, - CurrentWorkspaceResponse, - 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, - GetBillingCompanyDetailsData, - GetBillingCompanyDetailsError, - GetBillingCompanyDetailsErrors, - GetBillingCompanyDetailsResponse, - GetBillingCompanyDetailsResponses, - GetBillingEventsData, - GetBillingEventsError, - GetBillingEventsErrors, - GetBillingEventsResponse, - GetBillingEventsResponses, - GetBillingOpStatusData, - GetBillingOpStatusError, - GetBillingOpStatusErrors, - GetBillingOpStatusResponse, - GetBillingOpStatusResponses, - GetBillingPlansData, - GetBillingPlansError, - GetBillingPlansErrors, - GetBillingPlansResponse, - GetBillingPlansResponses, - GetBillingStatusData, - GetBillingStatusError, - GetBillingStatusErrors, - GetBillingStatusResponse, - GetBillingStatusResponses, - GetBillingUsageTimeSeriesData, - GetBillingUsageTimeSeriesError, - GetBillingUsageTimeSeriesErrors, - GetBillingUsageTimeSeriesResponse, - GetBillingUsageTimeSeriesResponses, - GetChurnkeyAuthData, - GetChurnkeyAuthError, - GetChurnkeyAuthErrors, - GetChurnkeyAuthResponse, - GetChurnkeyAuthResponses, - GetCurrentWorkspaceData, - GetCurrentWorkspaceError, - GetCurrentWorkspaceErrors, - GetCurrentWorkspaceResponse, - GetCurrentWorkspaceResponses, - 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, - GetJobAssetsData, - GetJobAssetsError, - GetJobAssetsErrors, - GetJobAssetsResponse, - GetJobAssetsResponses, - 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, - GetProviderPolicyData, - GetProviderPolicyError, - GetProviderPolicyErrors, - GetProviderPolicyResponse, - GetProviderPolicyResponses, - GetProvidersData, - GetProvidersError, - GetProvidersErrors, - GetProvidersResponse, - GetProvidersResponses, - 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, - GetStaticKjwebAsyncData, - GetStaticKjwebAsyncErrors, - GetStaticKjwebAsyncResponses, - 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, - InputUploadResponse, - InputUploadUrlRequest, - InterruptJobData, - InterruptJobError, - InterruptJobErrors, - InterruptJobResponses, - JobAssetsResponse, - JobCancelResponse, - JobDetailResponse, - JobEntry, - JobOutputAsset, - 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, - ListSavedPaymentMethodsData, - ListSavedPaymentMethodsError, - ListSavedPaymentMethodsErrors, - ListSavedPaymentMethodsResponse, - ListSavedPaymentMethodsResponses, - 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, - ProviderCatalogResponse, - ProviderPolicy, - ProviderPolicyEntry, - PruneAssetsData, - PruneAssetsResponse, - PruneAssetsResponses, - PublishedWorkflowDetail, - PublishHubWorkflowData, - PublishHubWorkflowError, - PublishHubWorkflowErrors, - PublishHubWorkflowRequest, - PublishHubWorkflowResponse, - PublishHubWorkflowResponses, - PublishWorkflowAssetsRequest, - PutProviderPolicyData, - PutProviderPolicyError, - PutProviderPolicyErrors, - PutProviderPolicyResponse, - PutProviderPolicyResponses, - QueueInfo, - QueueManageRequest, - QueueManageResponse, - RedeemDesktopLoginCodeData, - RedeemDesktopLoginCodeError, - RedeemDesktopLoginCodeErrors, - RedeemDesktopLoginCodeResponse, - RedeemDesktopLoginCodeResponses, - RedirectExtensionScriptsData, - RedirectExtensionScriptsError, - RedirectExtensionScriptsErrors, - RemoveAssetTagsData, - RemoveAssetTagsError, - RemoveAssetTagsErrors, - RemoveAssetTagsResponse, - RemoveAssetTagsResponses, - RemoveWorkspaceMemberData, - RemoveWorkspaceMemberError, - RemoveWorkspaceMemberErrors, - RemoveWorkspaceMemberResponse, - RemoveWorkspaceMemberResponses, - ResendWorkspaceInviteData, - ResendWorkspaceInviteError, - ResendWorkspaceInviteErrors, - ResendWorkspaceInviteResponse, - ResendWorkspaceInviteResponses, - ResubscribeData, - ResubscribeError, - ResubscribeErrors, - ResubscribeRequest, - ResubscribeResponse, - ResubscribeResponse2, - ResubscribeResponses, - RevokeWorkspaceApiKeyData, - RevokeWorkspaceApiKeyError, - RevokeWorkspaceApiKeyErrors, - RevokeWorkspaceApiKeyResponse, - RevokeWorkspaceApiKeyResponses, - RevokeWorkspaceInviteData, - RevokeWorkspaceInviteError, - RevokeWorkspaceInviteErrors, - RevokeWorkspaceInviteResponse, - RevokeWorkspaceInviteResponses, - SavedPaymentMethod, - SecretListResponse, - SecretProvider, - SecretProvidersResponse, - SecretResponse, - SeedAssetsData, - SeedAssetsResponse, - SeedAssetsResponses, - SubmitFeedbackData, - SubmitFeedbackError, - SubmitFeedbackErrors, - SubmitFeedbackResponse, - SubmitFeedbackResponses, - SubscribeData, - SubscribeError, - SubscribeErrors, - SubscribeRequest, - SubscribeResponse, - SubscribeResponse2, - SubscribeResponses, - SubscribeToLogsData, - SubscribeToLogsResponses, - SubscriptionDiscount, - SubscriptionDuration, - SubscriptionTier, - SystemStatsResponse, - TagInfo, - TagsModificationResponse, - TaskEntry, - TaskResponse, - TasksListResponse, - TeamCreditStop, - TeamCreditStopPrice, - TeamCreditStops, - TeamCreditStopSummary, - UpdateAssetData, - UpdateAssetError, - UpdateAssetErrors, - UpdateAssetResponse, - UpdateAssetResponses, - UpdateBillingCompanyDetailsData, - UpdateBillingCompanyDetailsError, - UpdateBillingCompanyDetailsErrors, - UpdateBillingCompanyDetailsResponse, - UpdateBillingCompanyDetailsResponses, - 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, - UploadGrantPutData, - UploadGrantPutErrors, - UploadGrantPutResponse, - UploadGrantPutResponses, - UploadGrantResponse, - UploadImageData, - UploadImageError, - UploadImageErrors, - UploadImageResponse, - UploadImageResponses, - UploadMaskData, - UploadMaskError, - UploadMaskErrors, - UploadMaskResponse, - UploadMaskResponses, - UsageBalance, - UsageBreakdownRow, - UsageBucket, - UsageSummary, - UsageTimeSeries, - UserDataResponseFull, - UserResponse, - ValidationError, - ValidationResult, - ViewFileData, - ViewFileError, - ViewFileErrors, - ViewFileResponse, - ViewFileResponses, - WorkflowApiAssetsRequest, - WorkflowApiAssetsResponse, - WorkflowForkedFrom, - WorkflowListResponse, - WorkflowPublishInfo, - WorkflowResponse, - WorkflowUploadUrlRequest, - WorkflowVersionContentResponse, - WorkflowVersionResponse, - Workspace, - WorkspaceApiKeyInfo, - WorkspaceSummary, - WorkspaceWithRole -} from './types.gen' +export type { AcceptInviteResponse, AcceptWorkspaceInviteData, AcceptWorkspaceInviteError, AcceptWorkspaceInviteErrors, AcceptWorkspaceInviteResponse, AcceptWorkspaceInviteResponses, AddAssetTagsData, AddAssetTagsError, AddAssetTagsErrors, AddAssetTagsResponse, AddAssetTagsResponses, AgentAnswerAccepted, AgentAnswerAskData, AgentAnswerAskError, AgentAnswerAskErrors, AgentAnswerAskResponse, AgentAnswerAskResponses, AgentAnswerRequest, AgentCancelAccepted, AgentCancelMessageData, AgentCancelMessageError, AgentCancelMessageErrors, AgentCancelMessageResponse, AgentCancelMessageResponses, AgentCreateThreadData, AgentCreateThreadError, AgentCreateThreadErrors, AgentCreateThreadResponse, AgentCreateThreadResponses, AgentDeleteSkillData, AgentDeleteSkillError, AgentDeleteSkillErrors, AgentDeleteSkillResponse, AgentDeleteSkillResponses, AgentDraftSnapshot, AgentError, AgentGetDraftData, AgentGetDraftError, AgentGetDraftErrors, AgentGetDraftResponse, AgentGetDraftResponses, AgentGetMessagesData, AgentGetMessagesError, AgentGetMessagesErrors, AgentGetMessagesResponse, AgentGetMessagesResponses, AgentListSkillsData, AgentListSkillsError, AgentListSkillsErrors, AgentListSkillsResponse, AgentListSkillsResponses, AgentListThreadsData, AgentListThreadsError, AgentListThreadsErrors, AgentListThreadsResponse, AgentListThreadsResponses, AgentMessage, AgentPostMessageData, AgentPostMessageError, AgentPostMessageErrors, AgentPostMessageRequest, AgentPostMessageResponse, AgentPostMessageResponses, AgentPublishSkillData, AgentPublishSkillError, AgentPublishSkillErrors, AgentPublishSkillResponse, AgentPublishSkillResponses, AgentSkill, AgentSkillListResponse, AgentSkillPublishRequest, AgentThreadCreated, AgentThreadCreateRequest, AgentThreadListResponse, AgentThreadSummary, AgentTurnAccepted, Asset, AssetCreated, AssetCreatedWritable, AssetDownloadResponse, AssetInfo, AssetMetadataResponse, AssetTagHistogramResponse, AssetUpdated, AssetWritable, BillingAddress, BillingBalanceResponse, BillingCapabilities, BillingCapabilitiesResponse, BillingCapabilityRolloutDefaults, BillingCapabilityScope, BillingCompanyDetailsResponse, BillingCompanyDetailsUpdateRequest, BillingEvent, BillingEventsResponse, BillingOpStatusResponse, BillingPlansResponse, BillingStatus, BillingStatusResponse, BillingTaxId, 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, CatalogProvider, CheckAssetByHashData, CheckAssetByHashError, CheckAssetByHashErrors, CheckAssetByHashResponses, CheckHubUsernameData, CheckHubUsernameError, CheckHubUsernameErrors, CheckHubUsernameResponse, CheckHubUsernameResponses, ChurnkeyAuthResponse, 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, CreateInputUploadUrlData, CreateInputUploadUrlError, CreateInputUploadUrlErrors, CreateInputUploadUrlResponse, CreateInputUploadUrlResponses, 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, CreateWorkflowUploadUrlData, CreateWorkflowUploadUrlError, CreateWorkflowUploadUrlErrors, CreateWorkflowUploadUrlResponse, CreateWorkflowUploadUrlResponses, CreateWorkflowVersionData, CreateWorkflowVersionError, CreateWorkflowVersionErrors, CreateWorkflowVersionRequest, CreateWorkflowVersionResponse, CreateWorkflowVersionResponses, CreateWorkspaceApiKeyData, CreateWorkspaceApiKeyError, CreateWorkspaceApiKeyErrors, CreateWorkspaceApiKeyRequest, CreateWorkspaceApiKeyResponse, CreateWorkspaceApiKeyResponse2, CreateWorkspaceApiKeyResponses, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceErrors, CreateWorkspaceInviteData, CreateWorkspaceInviteError, CreateWorkspaceInviteErrors, CreateWorkspaceInviteResponse, CreateWorkspaceInviteResponses, CreateWorkspaceRequest, CreateWorkspaceResponse, CreateWorkspaceResponses, CredentialOption, CurrentWorkspaceResponse, 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, GetBillingCapabilitiesData, GetBillingCapabilitiesError, GetBillingCapabilitiesErrors, GetBillingCapabilitiesResponse, GetBillingCapabilitiesResponses, GetBillingCompanyDetailsData, GetBillingCompanyDetailsError, GetBillingCompanyDetailsErrors, GetBillingCompanyDetailsResponse, GetBillingCompanyDetailsResponses, GetBillingEventsData, GetBillingEventsError, GetBillingEventsErrors, GetBillingEventsResponse, GetBillingEventsResponses, GetBillingOpStatusData, GetBillingOpStatusError, GetBillingOpStatusErrors, GetBillingOpStatusResponse, GetBillingOpStatusResponses, GetBillingPlansData, GetBillingPlansError, GetBillingPlansErrors, GetBillingPlansResponse, GetBillingPlansResponses, GetBillingStatusData, GetBillingStatusError, GetBillingStatusErrors, GetBillingStatusResponse, GetBillingStatusResponses, GetBillingUsageTimeSeriesData, GetBillingUsageTimeSeriesError, GetBillingUsageTimeSeriesErrors, GetBillingUsageTimeSeriesResponse, GetBillingUsageTimeSeriesResponses, GetChurnkeyAuthData, GetChurnkeyAuthError, GetChurnkeyAuthErrors, GetChurnkeyAuthResponse, GetChurnkeyAuthResponses, GetCurrentWorkspaceData, GetCurrentWorkspaceError, GetCurrentWorkspaceErrors, GetCurrentWorkspaceResponse, GetCurrentWorkspaceResponses, 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, GetJobAssetsData, GetJobAssetsError, GetJobAssetsErrors, GetJobAssetsResponse, GetJobAssetsResponses, 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, GetProviderPolicyData, GetProviderPolicyError, GetProviderPolicyErrors, GetProviderPolicyResponse, GetProviderPolicyResponses, GetProvidersData, GetProvidersError, GetProvidersErrors, GetProvidersResponse, GetProvidersResponses, 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, GetStaticKjwebAsyncData, GetStaticKjwebAsyncErrors, GetStaticKjwebAsyncResponses, 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, InputUploadResponse, InputUploadUrlRequest, InterruptJobData, InterruptJobError, InterruptJobErrors, InterruptJobResponses, JobAssetsResponse, JobCancelResponse, JobDetailResponse, JobEntry, JobOutputAsset, 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, ListSavedPaymentMethodsData, ListSavedPaymentMethodsError, ListSavedPaymentMethodsErrors, ListSavedPaymentMethodsResponse, ListSavedPaymentMethodsResponses, 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, ProviderCatalogResponse, ProviderPolicy, ProviderPolicyEntry, PruneAssetsData, PruneAssetsResponse, PruneAssetsResponses, PublishedWorkflowDetail, PublishHubWorkflowData, PublishHubWorkflowError, PublishHubWorkflowErrors, PublishHubWorkflowRequest, PublishHubWorkflowResponse, PublishHubWorkflowResponses, PublishWorkflowAssetsRequest, PutProviderPolicyData, PutProviderPolicyError, PutProviderPolicyErrors, PutProviderPolicyResponse, PutProviderPolicyResponses, QueueInfo, QueueManageRequest, QueueManageResponse, RedeemDesktopLoginCodeData, RedeemDesktopLoginCodeError, RedeemDesktopLoginCodeErrors, RedeemDesktopLoginCodeResponse, RedeemDesktopLoginCodeResponses, RedirectExtensionScriptsData, RedirectExtensionScriptsError, RedirectExtensionScriptsErrors, RemoveAssetTagsData, RemoveAssetTagsError, RemoveAssetTagsErrors, RemoveAssetTagsResponse, RemoveAssetTagsResponses, RemoveWorkspaceMemberData, RemoveWorkspaceMemberError, RemoveWorkspaceMemberErrors, RemoveWorkspaceMemberResponse, RemoveWorkspaceMemberResponses, ResendWorkspaceInviteData, ResendWorkspaceInviteError, ResendWorkspaceInviteErrors, ResendWorkspaceInviteResponse, ResendWorkspaceInviteResponses, ResubscribeData, ResubscribeError, ResubscribeErrors, ResubscribeRequest, ResubscribeResponse, ResubscribeResponse2, ResubscribeResponses, RevokeWorkspaceApiKeyData, RevokeWorkspaceApiKeyError, RevokeWorkspaceApiKeyErrors, RevokeWorkspaceApiKeyResponse, RevokeWorkspaceApiKeyResponses, RevokeWorkspaceInviteData, RevokeWorkspaceInviteError, RevokeWorkspaceInviteErrors, RevokeWorkspaceInviteResponse, RevokeWorkspaceInviteResponses, SavedPaymentMethod, SecretListResponse, SecretProvider, SecretProvidersResponse, SecretResponse, SeedAssetsData, SeedAssetsResponse, SeedAssetsResponses, SubmitFeedbackData, SubmitFeedbackError, SubmitFeedbackErrors, SubmitFeedbackResponse, SubmitFeedbackResponses, SubscribeData, SubscribeError, SubscribeErrors, SubscribeRequest, SubscribeResponse, SubscribeResponse2, SubscribeResponses, SubscribeToLogsData, SubscribeToLogsResponses, SubscriptionDiscount, SubscriptionDuration, SubscriptionTier, SystemStatsResponse, TagInfo, TagsModificationResponse, TaskEntry, TaskResponse, TasksListResponse, TeamCreditStop, TeamCreditStopPrice, TeamCreditStops, TeamCreditStopSummary, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetResponse, UpdateAssetResponses, UpdateBillingCompanyDetailsData, UpdateBillingCompanyDetailsError, UpdateBillingCompanyDetailsErrors, UpdateBillingCompanyDetailsResponse, UpdateBillingCompanyDetailsResponses, 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, UploadGrantPutData, UploadGrantPutErrors, UploadGrantPutResponse, UploadGrantPutResponses, UploadGrantResponse, UploadImageData, UploadImageError, UploadImageErrors, UploadImageResponse, UploadImageResponses, UploadMaskData, UploadMaskError, UploadMaskErrors, UploadMaskResponse, UploadMaskResponses, UsageBalance, UsageBreakdownRow, UsageBucket, UsageSummary, UsageTimeSeries, UserDataResponseFull, UserResponse, ValidationError, ValidationResult, ViewFileData, ViewFileError, ViewFileErrors, ViewFileResponse, ViewFileResponses, WorkflowApiAssetsRequest, WorkflowApiAssetsResponse, WorkflowForkedFrom, WorkflowListResponse, WorkflowPublishInfo, WorkflowResponse, WorkflowUploadUrlRequest, 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 d1e5f868770..fac7ae216fa 100644 --- a/packages/ingest-types/src/types.gen.ts +++ b/packages/ingest-types/src/types.gen.ts @@ -1,128 +1,122 @@ // 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' | 'ENTERPRISE'; /** * 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; + }; +}; /** * Workflow metadata captured at mint time. The subsequent PUT body is the @@ -132,100 +126,100 @@ export type WorkflowVersionContentResponse = { * */ export type WorkflowUploadUrlRequest = { - /** - * 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 -} + /** + * 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; +}; /** * 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 @@ -235,259 +229,259 @@ 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; +}; export type UsageTimeSeries = { - breakdown: Array - buckets: Array - ending_before: string - granularity: 'hour' | 'day' | 'month' - group_by: 'model' | 'endpoint' | 'product' - groups: Array - starting_on: string - summary: UsageSummary -} + breakdown: Array; + buckets: Array; + ending_before: string; + granularity: 'hour' | 'day' | 'month'; + group_by: 'model' | 'endpoint' | 'product'; + groups: Array; + starting_on: string; + summary: UsageSummary; +}; export type UsageBalance = { - amount_micros?: number - cloud_credit_balance_micros?: number - currency?: string - prepaid_balance_micros?: number -} + amount_micros?: number; + cloud_credit_balance_micros?: number; + currency?: string; + prepaid_balance_micros?: number; +}; export type UsageSummary = { - balance?: UsageBalance - spend_micros: number -} + balance?: UsageBalance; + spend_micros: number; +}; export type UsageBucket = { - cost_micros: number - group_key: string - period_end: string - period_start: string -} + cost_micros: number; + group_key: string; + period_end: string; + period_start: string; +}; export type UsageBreakdownRow = { - cost_micros: number - group_key: string - share: number -} + cost_micros: number; + group_key: string; + share: number; +}; /** * A minted single-use upload grant. */ export type UploadGrantResponse = { - /** - * Seconds until the grant expires if unused. - */ - expires_in: number - /** - * Relative path (/api/uploads/{id}) to PUT the raw bytes to, resolved - * against this API's origin. The unguessable id is the only - * credential the upload needs — send no Authorization header or API - * key. Single-use: a failed or interrupted upload burns the grant; - * mint a new one to retry. - * - */ - upload_path: string -} + /** + * Seconds until the grant expires if unused. + */ + expires_in: number; + /** + * Relative path (/api/uploads/{id}) to PUT the raw bytes to, resolved + * against this API's origin. The unguessable id is the only + * credential the upload needs — send no Authorization header or API + * key. Single-use: a failed or interrupted upload burns the grant; + * mint a new one to retry. + * + */ + upload_path: string; +}; /** * 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 @@ -497,17 +491,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 @@ -518,1776 +512,1773 @@ 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<{ /** - * Device name + * When task completed or failed (null if not finished) + */ + completed_at?: string; + /** + * Task creation timestamp */ - name: string + create_time: string; /** - * Device type + * Error message on failure (null if not failed) */ - type: string + error_message?: string; /** - * Free VRAM in bytes + * Unique task identifier */ - vram_free?: number + id: string; /** - * Total VRAM in bytes + * Caller-provided key for idempotent task creation */ - vram_total?: number - }> - system: { + idempotency_key: string; /** - * Command line arguments + * Task input data */ - argv: Array + payload: { + [key: string]: unknown; + }; /** - * Cloud ingest service version (commit hash) + * Task output data (null if not completed) */ - cloud_version?: string + result?: { + [key: string]: unknown; + }; /** - * ComfyUI frontend version (commit hash or tag) + * When task execution started (null if not started) */ - comfyui_frontend_version?: string + started_at?: string; /** - * ComfyUI version + * Current task status */ - comfyui_version: string + status: 'created' | 'running' | 'completed' | 'failed'; /** - * How this ComfyUI instance is deployed (e.g. cloud, local-git, local-portable, local-desktop) + * Task type name (e.g., model_upload) */ - deploy_environment?: string + task_name: string; + /** + * Task last update timestamp + */ + update_time: string; +}; + +/** + * Response after adding, updating, or removing tags on an asset. + */ +export type TagsModificationResponse = { /** - * Whether using embedded Python + * Tags that were successfully added (for add operation) */ - embedded_python: boolean + added?: Array; /** - * Operating system + * Tags that were already present (for add operation) */ - os: string + already_present?: Array; /** - * Python version + * Tags that were not present (for remove operation) */ - python_version: string + not_present?: Array; /** - * PyTorch version + * Tags that were successfully removed (for remove operation) */ - pytorch_version: string + removed?: Array; /** - * Free RAM in bytes + * All tags on the asset after the operation */ - ram_free: number + total_tags: Array; +}; + +/** + * Metadata for a single tag that can be applied to assets. + */ +export type TagInfo = { /** - * Total RAM in bytes + * Number of assets using this tag */ - ram_total: number + count: number; /** - * Workflow templates version + * Tag name */ - workflow_templates_version?: string - } -} + 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; + }; +}; /** * Billing period (uppercase to match comfy-api) */ -export type SubscriptionDuration = 'MONTHLY' | 'ANNUAL' +export type SubscriptionDuration = 'MONTHLY' | 'ANNUAL'; export type SubscriptionDiscount = { - /** - * What this discount removed from the amount due today. - */ - amount_off_cents?: number - code: string - kind: 'plan' | 'promotion' - /** - * Customer-facing display name of the underlying coupon. `code` can - * be an internal identifier (e.g. team_commitment_7_5); render this - * when present. - * - */ - name?: string -} + /** + * What this discount removed from the amount due today. + */ + amount_off_cents?: number; + code: string; + kind: 'plan' | 'promotion'; + /** + * Customer-facing display name of the underlying coupon. `code` can + * be an internal identifier (e.g. team_commitment_7_5); render this + * when present. + * + */ + name?: string; +}; /** * 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 - /** - * Explicit consent to reactivate a subscription that is currently - * scheduled to cancel at period end. Set to true when the caller has - * confirmed this with the user; omitting it (or sending false) while - * a cancellation is scheduled fails the request with - * REACTIVATION_CONFIRMATION_REQUIRED instead of silently clearing - * the cancellation. - * - */ - confirm_reactivation?: boolean - /** - * Stripe ConfirmationToken created from deferred Payment Element - * details. For an initial subscription, the backend creates the exact - * invoice PaymentIntent and confirms it with this token. - * - */ - confirmation_token?: 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 - /** - * Optional customer-facing Stripe promotion code. The backend - * resolves and validates it, then stacks it with plan discounts. - * - */ - promotion_code?: string - /** - * Echoes PreviewSubscribeResponse.proration_at from the preview the - * caller consented to. When present, the charge is prorated to this - * exact instant instead of the instant this request is processed, so - * the amount billed matches exactly what was previewed and consented - * to. Optional for backward compatibility: omit to keep today's - * behavior (prorate to now). Rejected with PRORATION_QUOTE_EXPIRED if - * it is in the future or older than a short window — request a fresh - * preview and retry in that case. - * - */ - proration_at?: string - /** - * Opaque quote id returned by PreviewSubscribeResponse. - */ - quote_id?: string - /** - * Quote version returned by PreviewSubscribeResponse. - */ - quote_version?: number - /** - * URL to redirect after payment method is added successfully. - * Required if the workspace has no payment method on file, when - * confirmation_token is provided, or when a selected saved payment - * method is redirect-based (any non-card type). Redirect-based flows - * require an absolute HTTPS URL; plain HTTP is accepted only for - * loopback hosts during local development. - * - */ - return_url?: string - /** - * Optional saved payment method selected for this subscription. It - * must be attached to the current workspace's Stripe customer. - * Mutually exclusive with confirmation_token. - * - */ - saved_payment_method_id?: 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; + /** + * Explicit consent to reactivate a subscription that is currently + * scheduled to cancel at period end. Set to true when the caller has + * confirmed this with the user; omitting it (or sending false) while + * a cancellation is scheduled fails the request with + * REACTIVATION_CONFIRMATION_REQUIRED instead of silently clearing + * the cancellation. + * + */ + confirm_reactivation?: boolean; + /** + * Stripe ConfirmationToken created from deferred Payment Element + * details. For an initial subscription, the backend creates the exact + * invoice PaymentIntent and confirms it with this token. + * + */ + confirmation_token?: 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; + /** + * Optional customer-facing Stripe promotion code. The backend + * resolves and validates it, then stacks it with plan discounts. + * + */ + promotion_code?: string; + /** + * Echoes PreviewSubscribeResponse.proration_at from the preview the + * caller consented to. When present, the charge is prorated to this + * exact instant instead of the instant this request is processed, so + * the amount billed matches exactly what was previewed and consented + * to. Optional for backward compatibility: omit to keep today's + * behavior (prorate to now). Rejected with PRORATION_QUOTE_EXPIRED if + * it is in the future or older than a short window — request a fresh + * preview and retry in that case. + * + */ + proration_at?: string; + /** + * Opaque quote id returned by PreviewSubscribeResponse. + */ + quote_id?: string; + /** + * Quote version returned by PreviewSubscribeResponse. + */ + quote_version?: number; + /** + * URL to redirect after payment method is added successfully. + * Required if the workspace has no payment method on file, when + * confirmation_token is provided, or when a selected saved payment + * method is redirect-based (any non-card type). Redirect-based flows + * require an absolute HTTPS URL; plain HTTP is accepted only for + * loopback hosts during local development. + * + */ + return_url?: string; + /** + * Optional saved payment method selected for this subscription. It + * must be attached to the current workspace's Stripe customer. + * Mutually exclusive with confirmation_token. + * + */ + saved_payment_method_id?: 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 - /** - * Credential class discriminator (`api_key` or `gcp_service_account`). - */ - credential_type?: 'api_key' | 'gcp_service_account' - /** - * 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; + /** + * Credential class discriminator (`api_key` or `gcp_service_account`). + */ + credential_type?: 'api_key' | 'gcp_service_account'; + /** + * 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; +}; /** * One way a provider's credential can be entered. When a provider exposes more than one option, clients present a sub-selection; the selected option's credential_type is sent on CreateSecretRequest. */ export type CredentialOption = { - /** - * The credential_type to send on CreateSecretRequest when this option is selected. - */ - credential_type: 'api_key' | 'gcp_service_account' - /** - * How the credential value is entered. `text` is a single-line secret (an API key); `json_file` is a pasted/uploaded JSON document (e.g. a Vertex service-account key). - */ - input_type: 'text' | 'json_file' - /** - * Human-facing label for this option (e.g. "API key (Google AI Studio)"). - */ - label: string -} + /** + * The credential_type to send on CreateSecretRequest when this option is selected. + */ + credential_type: 'api_key' | 'gcp_service_account'; + /** + * How the credential value is entered. `text` is a single-line secret (an API key); `json_file` is a pasted/uploaded JSON document (e.g. a Vertex service-account key). + */ + input_type: 'text' | 'json_file'; + /** + * Human-facing label for this option (e.g. "API key (Google AI Studio)"). + */ + label: string; +}; /** * A provider the user may configure a secret for, with its display label and credential-entry options. */ export type SecretProvider = { - /** - * The credential-entry options for this provider. A single entry is the common case (an API key); multiple entries (e.g. Gemini's AI Studio API key vs Vertex service account) drive a client-side sub-selection. - */ - credential_options?: Array - /** - * Provider identifier (e.g., huggingface, civitai, runway, gemini) - */ - id: string - /** - * Human-facing display label for the provider. Falls back to the client registry label, then the raw id, when omitted. - */ - label?: string -} + /** + * The credential-entry options for this provider. A single entry is the common case (an API key); multiple entries (e.g. Gemini's AI Studio API key vs Vertex service account) drive a client-side sub-selection. + */ + credential_options?: Array; + /** + * Provider identifier (e.g., huggingface, civitai, runway, gemini) + */ + id: string; + /** + * Human-facing display label for the provider. Falls back to the client registry label, then the raw id, when omitted. + */ + label?: string; +}; /** * List of user secrets with metadata only. */ export type SecretListResponse = { - data: Array -} + data: Array; +}; export type SavedPaymentMethod = { - /** - * Card brand. Present only for card payment methods. - */ - brand?: string - id: string - /** - * Exactly one item is the default when the returned list is non-empty. - */ - is_default: boolean - /** - * Masked card suffix. Present only for card payment methods. - */ - last4?: string - type: string -} + /** + * Card brand. Present only for card payment methods. + */ + brand?: string; + id: string; + /** + * Exactly one item is the default when the returned list is non-empty. + */ + is_default: boolean; + /** + * Masked card suffix. Present only for card payment methods. + */ + last4?: string; + type: string; +}; /** * 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; +}; /** * One provider's policy state. */ export type ProviderPolicyEntry = { - /** - * true = allowlisted. false and absent evaluate identically when enforcing; explicit false is UI review state. - */ - enabled: boolean - /** - * Catalog provider identifier. - */ - provider_id: string -} + /** + * true = allowlisted. false and absent evaluate identically when enforcing; explicit false is UI review state. + */ + enabled: boolean; + /** + * Catalog provider identifier. + */ + provider_id: string; +}; /** * A workspace's partner-provider governance policy document — the exact shape PUT accepts (round-trips; entries come back sorted by provider_id, write order is not significant). Effective rule: enabled(P) = !enforcement_enabled || (the entry for P has enabled=true); absent from the array = unset (deny when enforcing). */ export type ProviderPolicy = { - /** - * The arming switch. While false the policy is editable but nothing blocks (preview mode). - */ - enforcement_enabled: boolean - /** - * One entry per reviewed provider. A duplicate provider_id in a write is rejected with 400. Unknown provider_ids are rejected with 422. - */ - providers: Array -} + /** + * The arming switch. While false the policy is editable but nothing blocks (preview mode). + */ + enforcement_enabled: boolean; + /** + * One entry per reviewed provider. A duplicate provider_id in a write is rejected with 400. Unknown provider_ids are rejected with 422. + */ + providers: Array; +}; /** * The partner-provider governance catalog: every governable provider, identical for all workspaces. A projection of the curated catalog minus the internal api_names. */ export type ProviderCatalogResponse = { - /** - * Sorted by provider_id. - */ - providers: Array -} + /** + * Sorted by provider_id. + */ + providers: Array; +}; /** * Display data for one governable partner provider. */ export type CatalogProvider = { - /** - * Panel display label (e.g. "OpenAI (inc. Sora)"). Changeable freely, unlike the provider_id. - */ - display_name: string - /** - * The provider's owned /object_info category segments (partner//), e.g. openai -> ["OpenAI", "Sora"]. The panel uses them to group nodes under providers (including merged vendors) and preview which nodes a toggle disables. Empty for route-only vendors (callable and governed; the panel hides their toggles). - */ - node_categories: Array - /** - * Permanent policy identifier (e.g. "kling", "openai"). Not client-derivable (merged vendors such as OpenAI+Sora). - */ - provider_id: string -} + /** + * Panel display label (e.g. "OpenAI (inc. Sora)"). Changeable freely, unlike the provider_id. + */ + display_name: string; + /** + * The provider's owned /object_info category segments (partner//), e.g. openai -> ["OpenAI", "Sora"]. The panel uses them to group nodes under providers (including merged vendors) and preview which nodes a toggle disables. Empty for route-only vendors (callable and governed; the panel hides their toggles). + */ + node_categories: Array; + /** + * Permanent policy identifier (e.g. "kling", "openai"). Not client-derivable (merged vendors such as OpenAI+Sora). + */ + provider_id: 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_due_cents?: number - /** - * 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 - currency?: string - current_plan?: PreviewPlanInfo - discounts?: Array - /** - * 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 - /** - * The Stripe payment method configuration governing which payment - * methods the embedded checkout offers for this environment. Mount - * Stripe Elements with `paymentMethodConfiguration` set to this id - * instead of hardcoding payment method types. Present on every - * successful preview while embedded checkout is enabled and absent - * from legacy previews. - * - */ - payment_method_configuration_id?: string - /** - * Normalized promotion code accepted by Stripe. - */ - promotion_code?: string - /** - * The instant cost_today_cents was priced at (Stripe-native transitions - * only; absent for other billing rails). Echo this back as proration_at - * on POST /billing/subscribe to have the subscribe charge exactly this - * previewed amount instead of re-pricing at whatever later instant the - * subscribe request happens to arrive. - * - */ - proration_at?: string - /** - * Opaque short-lived quote identifier to echo on Subscribe. - */ - quote_id?: string - /** - * Quote contract version to echo on Subscribe. - */ - quote_version?: number - /** - * Reason why the change is not allowed (only present if allowed=false) - */ - reason?: string - renewal_amount_cents?: number - /** - * The next recurring charge and target-plan period end. Current servers - * always return this later than effective_at and following the target - * plan's billing interval. Optional in the schema for older clients. - * - */ - renewal_at?: string - /** - * Whether this previewed change requires explicit reactivation - * consent. Computed from the persisted subscription and a short-lived - * cache of Stripe lifecycle state. The subscribe enforcement path - * performs its own uncached Stripe lifecycle read. - * - */ - requires_reactivation_confirmation?: boolean - /** - * Type of subscription transition - */ - transition_type: - | 'new_subscription' - | 'upgrade' - | 'downgrade' - | 'duration_change' -} + /** + * Whether this subscription change is allowed + */ + allowed: boolean; + amount_due_cents?: number; + /** + * 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; + currency?: string; + current_plan?: PreviewPlanInfo; + discounts?: Array; + /** + * 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; + /** + * The Stripe payment method configuration governing which payment + * methods the embedded checkout offers for this environment. Mount + * Stripe Elements with `paymentMethodConfiguration` set to this id + * instead of hardcoding payment method types. Present on every + * successful preview while embedded checkout is enabled and absent + * from legacy previews. + * + */ + payment_method_configuration_id?: string; + /** + * Normalized promotion code accepted by Stripe. + */ + promotion_code?: string; + /** + * The instant cost_today_cents was priced at (Stripe-native transitions + * only; absent for other billing rails). Echo this back as proration_at + * on POST /billing/subscribe to have the subscribe charge exactly this + * previewed amount instead of re-pricing at whatever later instant the + * subscribe request happens to arrive. + * + */ + proration_at?: string; + /** + * Opaque short-lived quote identifier to echo on Subscribe. + */ + quote_id?: string; + /** + * Quote contract version to echo on Subscribe. + */ + quote_version?: number; + /** + * Reason why the change is not allowed (only present if allowed=false) + */ + reason?: string; + renewal_amount_cents?: number; + /** + * The next recurring charge and target-plan period end. Current servers + * always return this later than effective_at and following the target + * plan's billing interval. Optional in the schema for older clients. + * + */ + renewal_at?: string; + /** + * Whether this previewed change requires explicit reactivation + * consent. Computed from the persisted subscription and a short-lived + * cache of Stripe lifecycle state. The subscribe enforcement path + * performs its own uncached Stripe lifecycle read. + * + */ + requires_reactivation_confirmation?: boolean; + /** + * 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 - /** - * Optional Stripe promotion code to validate and include in the exact quote. - */ - promotion_code?: string - /** - * Selected per-credit Team plan stop to preview. - */ - team_credit_stop_id?: string -} + /** + * Target plan slug to preview subscribing to + */ + plan_slug: string; + /** + * Optional Stripe promotion code to validate and include in the exact quote. + */ + promotion_code?: string; + /** + * Selected per-credit Team plan stop to preview. + */ + team_credit_stop_id?: 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. Fields fall into three groups: the ones the server honors, the purely informational ones it accepts and ignores (`scope` plus the client-profile fields `client_uri`, `logo_uri`, `tos_uri`, `policy_uri`, `contacts`, `software_id`, `software_version` — parsed, never persisted, never echoed, per RFC 7591 §2's "MAY ignore" allowance), and the ones it rejects with `invalid_client_metadata` (`resource_grants`, because scopes/grants are server-owned for dynamic clients; `jwks`/`jwks_uri`, because they only apply to the JWT client-authentication methods DCR does not offer). `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 - /** - * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. - */ - client_uri?: string | null - /** - * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. - */ - contacts?: Array | null - /** - * Optional. Defaults to `["authorization_code","refresh_token"]`. - */ - grant_types?: Array<'authorization_code' | 'refresh_token'> - /** - * **REJECTED IF PRESENT.** A JWK set only applies to the `private_key_jwt` / `client_secret_jwt` client-authentication methods, which DCR does not offer — `token_endpoint_auth_method` is forced to `none` (public clients only). Accepting it silently would leave the client believing it had negotiated an authentication posture the server never agreed to, so this returns `invalid_client_metadata`. - */ - jwks?: { - [key: string]: unknown - } | null - /** - * **REJECTED IF PRESENT.** Same reason as `jwks`: JWT client authentication is not offered by DCR, so a JWK set URI cannot be honored and returns `invalid_client_metadata` rather than being silently dropped. - */ - jwks_uri?: string | null - /** - * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. - */ - logo_uri?: string | null - /** - * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. - */ - 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'> - /** - * **ACCEPTED AND IGNORED.** Dynamic clients do not pick scopes — the server assigns scopes from the active MCP resource's published list, so a caller-supplied value cannot escalate. The field is accepted (RFC 7591 §2 defines it and the MCP SDK always sends it) but the value is dropped: it is never persisted and never echoed in the registration response. - * - */ - scope?: string | null - /** - * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. - */ - software_id?: string | null - /** - * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. - */ - software_version?: string | null - /** - * Optional. Any value is accepted and substituted with `none` (RFC 7591 §3.2.1); the registration response reports `none`. Public clients only, so authenticate with PKCE. - */ - token_endpoint_auth_method?: string - /** - * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. - */ - 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; + /** + * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. + */ + client_uri?: string | null; + /** + * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. + */ + contacts?: Array | null; + /** + * Optional. Defaults to `["authorization_code","refresh_token"]`. + */ + grant_types?: Array<'authorization_code' | 'refresh_token'>; + /** + * **REJECTED IF PRESENT.** A JWK set only applies to the `private_key_jwt` / `client_secret_jwt` client-authentication methods, which DCR does not offer — `token_endpoint_auth_method` is forced to `none` (public clients only). Accepting it silently would leave the client believing it had negotiated an authentication posture the server never agreed to, so this returns `invalid_client_metadata`. + */ + jwks?: { + [key: string]: unknown; + } | null; + /** + * **REJECTED IF PRESENT.** Same reason as `jwks`: JWT client authentication is not offered by DCR, so a JWK set URI cannot be honored and returns `invalid_client_metadata` rather than being silently dropped. + */ + jwks_uri?: string | null; + /** + * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. + */ + logo_uri?: string | null; + /** + * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. + */ + 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'>; + /** + * **ACCEPTED AND IGNORED.** Dynamic clients do not pick scopes — the server assigns scopes from the active MCP resource's published list, so a caller-supplied value cannot escalate. The field is accepted (RFC 7591 §2 defines it and the MCP SDK always sends it) but the value is dropped: it is never persisted and never echoed in the registration response. + * + */ + scope?: string | null; + /** + * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. + */ + software_id?: string | null; + /** + * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. + */ + software_version?: string | null; + /** + * Optional. Any value is accepted and substituted with `none` (RFC 7591 §3.2.1); the registration response reports `none`. Public clients only, so authenticate with PKCE. + */ + token_endpoint_auth_method?: string; + /** + * **ACCEPTED AND IGNORED.** Informational RFC 7591 §2 client-profile metadata. Parsed so spec-compliant clients are not 400'd, then dropped — never persisted, never echoed in the registration response. + */ + 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 created the workspace. Derived as member.id == workspace.created_by_user_id; exactly one member per workspace is marked. Personal workspace creators cannot 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 created the workspace. Derived as member.id == workspace.created_by_user_id; exactly one member per workspace is marked. Personal workspace creators cannot 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 - /** - * The bare value a loader widget consumes for this asset. For models it is the path inside the category folder (e.g. "flux.safetensors" for "models/checkpoints/flux.safetensors"), which is what the model resolver matches. For input/output/temp it is the content hash, because those assets are fetched by hash rather than staged by name — that is the value LoadImage-style widgets must carry. Clients add the "[output]"/"[temp]" annotation from the asset's own type, so it is never included here. Null when no such value can be derived. - */ - loader_path?: string | null - /** - * 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; + /** + * The bare value a loader widget consumes for this asset. For models it is the path inside the category folder (e.g. "flux.safetensors" for "models/checkpoints/flux.safetensors"), which is what the model resolver matches. For input/output/temp it is the content hash, because those assets are fetched by hash rather than staged by name — that is the value LoadImage-style widgets must carry. Clients add the "[output]"/"[temp]" annotation from the asset's own type, so it is never included here. Null when no such value can be derived. + */ + loader_path?: string | null; + /** + * 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 - } - /** - * Count of outputs classified as previewable media types (images, video, audio, 3D, text) — a subset of outputs_count (omitted for non-terminal states) - */ - previewable_outputs_count?: number - /** - * 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; + }; + /** + * Count of outputs classified as previewable media types (images, video, audio, 3D, text) — a subset of outputs_count (omitted for non-terminal states) + */ + previewable_outputs_count?: number; + /** + * 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 -} + /** + * 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 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 -} + /** + * 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; +}; /** * An asset produced by a job, enriched with the per-output node context @@ -2297,198 +2288,198 @@ export type JobStatusResponse = { * */ export type JobOutputAsset = { - /** - * Timestamp when the asset was created - */ - created_at: string - /** - * Blake3 hash of the asset content. - */ - hash?: string - /** - * Unique identifier for the asset - */ - id: string - /** - * MIME type of the asset - */ - mime_type?: string - /** - * Name of the asset file - */ - name: string - /** - * ID of the workflow node that produced this asset, if known - */ - node_id?: string | null - /** - * Zero-based index of this asset within the node's output slot, if known - */ - output_index?: number | null - /** - * Output slot key under the producing node (e.g. "images"), if known - */ - output_key?: string | null - /** - * Relative URL for asset preview/thumbnail - */ - preview_url?: string - /** - * Size of the asset in bytes - */ - size?: number -} + /** + * Timestamp when the asset was created + */ + created_at: string; + /** + * Blake3 hash of the asset content. + */ + hash?: string; + /** + * Unique identifier for the asset + */ + id: string; + /** + * MIME type of the asset + */ + mime_type?: string; + /** + * Name of the asset file + */ + name: string; + /** + * ID of the workflow node that produced this asset, if known + */ + node_id?: string | null; + /** + * Zero-based index of this asset within the node's output slot, if known + */ + output_index?: number | null; + /** + * Output slot key under the producing node (e.g. "images"), if known + */ + output_key?: string | null; + /** + * Relative URL for asset preview/thumbnail + */ + preview_url?: string; + /** + * Size of the asset in bytes + */ + size?: number; +}; /** * Full job details including workflow and outputs */ export type JobDetailResponse = { - /** - * 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 - /** - * Node-level execution metadata (only for terminal states) - */ - execution_meta?: { - [key: string]: unknown - } - /** - * Workflow execution start timestamp (Unix milliseconds, only present once execution has started) - */ - execution_start_time?: number - /** - * 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 - } - /** - * Count of outputs classified as previewable media types (images, video, audio, 3D, text) — a subset of outputs_count (omitted for non-terminal states) - */ - previewable_outputs_count?: number - /** - * User-friendly job status - */ - status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' - /** - * Last update timestamp (Unix timestamp in milliseconds) - */ - update_time: number - /** - * ID of the user that owns this job (see the `workspace_id` - * description above for why this is always the caller's own id - * on a successful response). - * - */ - user_id?: string - /** - * 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 - /** - * UUID of the cloud workflow version this job is pinned to, if the - * submission carried one (see PromptRequest's workflow_version_id). - * Absent for jobs submitted without that association, including - * every job submitted through the public API v2 today. - * - */ - workflow_version_id?: string - /** - * ID of the workspace that owns this job. A successful (200) - * response from this operation is only ever returned for the - * caller's own job (see this operation's ownership-scoped - * query), so this is always the caller's own workspace — - * consumers that also need to correlate this job to its - * live-progress broadcast channel (workspace+user scoped; see - * the internal common/gateways/broadcast package) can use this - * value directly rather than resolving their own identity a - * second way. - * - */ - workspace_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; + /** + * Node-level execution metadata (only for terminal states) + */ + execution_meta?: { + [key: string]: unknown; + }; + /** + * Workflow execution start timestamp (Unix milliseconds, only present once execution has started) + */ + execution_start_time?: number; + /** + * 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; + }; + /** + * Count of outputs classified as previewable media types (images, video, audio, 3D, text) — a subset of outputs_count (omitted for non-terminal states) + */ + previewable_outputs_count?: number; + /** + * User-friendly job status + */ + status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled'; + /** + * Last update timestamp (Unix timestamp in milliseconds) + */ + update_time: number; + /** + * ID of the user that owns this job (see the `workspace_id` + * description above for why this is always the caller's own id + * on a successful response). + * + */ + user_id?: string; + /** + * 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; + /** + * UUID of the cloud workflow version this job is pinned to, if the + * submission carried one (see PromptRequest's workflow_version_id). + * Absent for jobs submitted without that association, including + * every job submitted through the public API v2 today. + * + */ + workflow_version_id?: string; + /** + * ID of the workspace that owns this job. A successful (200) + * response from this operation is only ever returned for the + * caller's own job (see this operation's ownership-scoped + * query), so this is always the caller's own workspace — + * consumers that also need to correlate this job to its + * live-progress broadcast channel (workspace+user scoped; see + * the internal common/gateways/broadcast package) can use this + * value directly rather than resolving their own identity a + * second way. + * + */ + workspace_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; +}; /** * Paginated list of the assets produced by a single job. */ export type JobAssetsResponse = { - /** - * The job's output assets for the requested page (empty when the job produced none) - */ - assets: Array - /** - * ID of the job these assets belong to - */ - job_id: string - pagination: PaginationInfo -} + /** + * The job's output assets for the requested page (empty when the job produced none) + */ + assets: Array; + /** + * ID of the job these assets belong to + */ + job_id: string; + pagination: PaginationInfo; +}; /** * Request body for minting an input-image upload grant. */ export type InputUploadUrlRequest = { - /** - * MIME type of the image to upload. Must be one of image/jpeg, - * image/png, image/webp, or image/gif. Advisory: the stored asset's - * format always follows the uploaded bytes as decoded server-side. - * - */ - content_type: string -} + /** + * MIME type of the image to upload. Must be one of image/jpeg, + * image/png, image/webp, or image/gif. Advisory: the stored asset's + * format always follows the uploaded bytes as decoded server-side. + * + */ + content_type: string; +}; /** * Result of redeeming an input-image upload grant. Identical in shape to @@ -2496,351 +2487,347 @@ export type InputUploadUrlRequest = { * */ export type InputUploadResponse = { - /** - * Content hash of the stored input image. - */ - name: string - /** - * Subfolder path where the image was saved (empty for input uploads). - */ - subfolder: string - /** - * Upload type; always "input". - */ - type: string -} + /** + * Content hash of the stored input image. + */ + name: string; + /** + * Subfolder path where the image was saved (empty for input uploads). + */ + subfolder: string; + /** + * Upload type; always "input". + */ + type: string; +}; /** * 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 App Mode is this workflow's default view. - */ - isApp: boolean - /** - * 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 App Mode is this workflow's default view. + */ + isApp: boolean; + /** + * 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 - /** - * Whether App Mode is this workflow's default view. - */ - is_app: boolean - 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; + /** + * Whether App Mode is this workflow's default view. + */ + is_app: boolean; + 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 - /** - * Whether App Mode is this workflow's default view. - */ - is_app: boolean - 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; + /** + * Whether App Mode is this workflow's default view. + */ + is_app: boolean; + 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. @@ -2849,80 +2836,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) + /** + * Job creation timestamp (Unix timestamp in milliseconds) */ - 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 -} + 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 -} + /** + * 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. @@ -2930,220 +2917,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 - } /** - * Output nodes to execute + * Metadata about the execution and nodes */ - outputs_to_execute?: Array + meta?: { + [key: string]: unknown; + }; /** - * Execution priority + * Output data from execution (generated images, files, etc.) */ - priority?: number + outputs?: { + [key: string]: unknown; + }; /** - * The workflow nodes + * Full prompt execution data */ prompt?: { - [key: string]: unknown - } - /** - * The prompt ID - */ - prompt_id?: string - } - /** - * Execution status and timeline information - */ - status?: { - [key: string]: unknown - } -} + /** + * 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 -} + /** + * 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 @@ -3152,345 +3139,345 @@ 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; +}; /** * The workspace bound to the presented credential, plus how that credential authenticated. Same shape as Workspace with the caller's role and the auth method added, and without created_at (callers of this endpoint want identity, not provenance). */ export type CurrentWorkspaceResponse = { - /** - * How this request authenticated. Known values are firebase, cookie, comfy_api_key, comfy_admin_key, cloud_api_key and cloud_jwt; treat it as an open string so a new auth method is not a breaking change. - */ - auth_method: string - id: string - name: string - /** - * The requesting user's role in this workspace. Omitted (absent from the object, never an explicit null) when the credential carries no resolvable user membership. - */ - role?: 'owner' | 'member' - type: 'personal' | 'team' -} + /** + * How this request authenticated. Known values are firebase, cookie, comfy_api_key, comfy_admin_key, cloud_api_key and cloud_jwt; treat it as an open string so a new auth method is not a breaking change. + */ + auth_method: string; + id: string; + name: string; + /** + * The requesting user's role in this workspace. Omitted (absent from the object, never an explicit null) when the credential carries no resolvable user membership. + */ + role?: 'owner' | 'member'; + type: 'personal' | 'team'; +}; /** * 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 -} + /** + * 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 = { - /** - * Credential class discriminator. `api_key` (default) stores an opaque key/token; `gcp_service_account` stores a Google Cloud service-account key JSON, whose value is validated as a service-account key on write. Prefer setting this explicitly over relying on value-shape sniffing. - */ - credential_type?: 'api_key' | 'gcp_service_account' - /** - * 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 -} + /** + * Credential class discriminator. `api_key` (default) stores an opaque key/token; `gcp_service_account` stores a Google Cloud service-account key JSON, whose value is validated as a service-account key on write. Prefer setting this explicitly over relying on value-shape sniffing. + */ + credential_type?: 'api_key' | 'gcp_service_account'; + /** + * 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; +}; /** * Credentials the Churnkey embed requires to launch the cancel flow. @@ -3500,55 +3487,55 @@ export type CreateHubProfileRequest = { * */ export type ChurnkeyAuthResponse = { - /** - * Hex-encoded HMAC-SHA256(customer_id, CHURNKEY_HMAC_SECRET) - */ - auth_hash: string - /** - * Stripe customer ID for the workspace - */ - customer_id: string - /** - * Churnkey environment matching the configured app - */ - mode: 'live' | 'test' | 'sandbox' -} + /** + * Hex-encoded HMAC-SHA256(customer_id, CHURNKEY_HMAC_SECRET) + */ + auth_hash: string; + /** + * Stripe customer ID for the workspace + */ + customer_id: string; + /** + * Churnkey environment matching the configured app + */ + mode: 'live' | 'test' | 'sandbox'; +}; /** * 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 terminal cancellation time for a delinquent Stripe subscription, otherwise the end of the current billing period - */ - cancel_at: string -} + /** + * Billing operation ID to poll for status via GET /api/billing/ops/{id} + */ + billing_op_id: string; + /** + * The terminal cancellation time for a delinquent Stripe subscription, otherwise the end of the 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; +}; /** * A tax identifier for a company Stripe customer. Stripe validates the @@ -3557,262 +3544,239 @@ export type BulkRevokeApiKeysResponse = { * */ export type BillingTaxId = { - /** - * Stripe tax ID type, e.g. `eu_vat`, `us_ein`, `au_abn`. See - * https://docs.stripe.com/api/tax_ids/object#tax_id_object-type - * for the full list. - * - */ - type: string - value: string -} + /** + * Stripe tax ID type, e.g. `eu_vat`, `us_ein`, `au_abn`. See + * https://docs.stripe.com/api/tax_ids/object#tax_id_object-type + * for the full list. + * + */ + type: string; + value: string; +}; /** * Current billing and subscription status for a workspace. */ export type BillingStatusResponse = { - /** - * Present when the pending operation cannot proceed without the - * customer. Today this is a Stripe-hosted payment page for an invoice - * needing authentication (SCA/3DS); - * send the customer there to complete payment. Mirrors the field of - * the same name on BillingOpStatusResponse. This bearer capability is - * returned only to workspace billing managers. - * - */ - action_url?: string - /** - * Durable workspace billing authority. Omitted by older servers and billing-disabled deployments. - */ - billing_rail?: 'legacy_stripe' | 'metronome' | 'stripe' - 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 - /** - * Effective active workspace seat limit after applying any workspace override. 0 means unlimited (billing-disabled/no-op). - */ - max_seats: number - /** - * Current workspace members plus non-expired pending invites, used against max_seats. 0 when billing is disabled. - */ - occupied_seats: number - /** - * Present when a pending operation supports embedded Stripe - * authentication. It may be returned alongside a hosted payment page - * when both recovery methods are available. This bearer - * capability is returned only to workspace billing managers. Pass - * directly to Stripe.js; do not log or - * persist it in client storage. - * - */ - payment_intent_client_secret?: string - /** - * The workspace's in-flight billing operation, when one exists. Lets a - * client recover a payment it has lost the local reference to — a - * cleared browser, or simply a different device from the one that - * started it — by polling /billing/ops/{id} without having stored the - * id. Absent when no operation is pending, and for non-owners, who - * cannot act on one. - * - */ - pending_billing_op_id?: string - /** - * How the client should resume `pending_billing_op_id`, not the - * internal operation type: a plan change reports `subscription`, - * because it resumes exactly like one. A top-up resumes with a - * different timeout and completion path, so the two cannot be - * told apart by the client. Present whenever - * `pending_billing_op_id` is. - * - */ - pending_billing_op_type?: 'subscription' | 'topup' - /** - * 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 -} + /** + * Present when the pending operation cannot proceed without the + * customer. Today this is a Stripe-hosted payment page for an invoice + * needing authentication (SCA/3DS); + * send the customer there to complete payment. Mirrors the field of + * the same name on BillingOpStatusResponse. This bearer capability is + * returned only to workspace billing managers. + * + */ + action_url?: string; + /** + * Durable workspace billing authority. Omitted by older servers and billing-disabled deployments. + */ + billing_rail?: 'legacy_stripe' | 'metronome' | 'stripe'; + 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; + /** + * Effective active workspace seat limit after applying any workspace override. 0 means unlimited (billing-disabled/no-op). + */ + max_seats: number; + /** + * Current workspace members plus non-expired pending invites, used against max_seats. 0 when billing is disabled. + */ + occupied_seats: number; + /** + * Present when a pending operation supports embedded Stripe + * authentication. It may be returned alongside a hosted payment page + * when both recovery methods are available. This bearer + * capability is returned only to workspace billing managers. Pass + * directly to Stripe.js; do not log or + * persist it in client storage. + * + */ + payment_intent_client_secret?: string; + /** + * The workspace's in-flight billing operation, when one exists. Lets a + * client recover a payment it has lost the local reference to — a + * cleared browser, or simply a different device from the one that + * started it — by polling /billing/ops/{id} without having stored the + * id. Absent when no operation is pending, and for non-owners, who + * cannot act on one. + * + */ + pending_billing_op_id?: string; + /** + * How the client should resume `pending_billing_op_id`, not the + * internal operation type: a plan change reports `subscription`, + * because it resumes exactly like one. A top-up resumes with a + * different timeout and completion path, so the two cannot be + * told apart by the client. Present whenever + * `pending_billing_op_id` is. + * + */ + pending_billing_op_type?: 'subscription' | 'topup'; + /** + * 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' - | 'paused' - | 'inactive' +export type BillingStatus = 'awaiting_payment_method' | 'pending_payment' | 'paid' | 'payment_failed' | 'paused' | '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 = { - /** - * Present while status is "pending" and the operation cannot proceed - * without the customer. Today this is a Stripe-hosted payment page for - * a subscription whose first invoice needs authentication (SCA/3DS); - * send the customer there to complete payment. This bearer capability is - * returned only to workspace billing managers. Absent otherwise. - * - */ - action_url?: string - /** - * State derived from the PaymentIntent attached to this operation's - * exact stored Stripe invoice. Absent when the operation has no - * correlated PaymentIntent. - * - */ - authentication_state?: - | 'requires_action' - | 'processing' - | 'failed_retryable' - | 'succeeded' - | 'reconciliation_needed' - /** - * When the operation completed (success or failure) - */ - completed_at?: string - /** - * Coarse classification of why the correlated PaymentIntent's last - * payment attempt failed, derived at read time from the provider's - * machine-readable error and decline codes — never from provider - * message text or payment-method details. Present only when the - * intent has recorded a failed attempt and the operation is either - * still pending with authentication_state failed_retryable or has - * terminally failed. generic means the attempt failed for a reason - * outside this vocabulary. - * - */ - decline_reason?: - | 'card_declined' - | 'insufficient_funds' - | 'expired_card' - | 'incorrect_cvc' - | 'authentication_required' - | 'authentication_failed' - | 'processing_error' - | 'generic' - /** - * PII-safe failure code or generic failure message - */ - error_message?: string - /** - * Unique identifier for the billing operation - */ - id: string - /** - * Stripe PaymentIntent client secret for completing requires_action. - * This bearer capability is returned only to workspace billing managers - * and is absent otherwise. - * - */ - payment_intent_client_secret?: string - /** - * Typed next action for a failed operation. Absent for pending and succeeded operations. - */ - recovery_action?: - | 'retry' - | 'replace_payment_method' - | 'authenticate_payment' - | 'contact_support' - /** - * Whether the customer can recover by starting a new billing operation after performing recovery_action. - */ - retryable?: boolean - /** - * When the operation was initiated - */ - started_at: string - /** - * Current status of the operation. reconciliation_needed is terminal - * for client polling but requires support reconciliation. - * - */ - status: 'pending' | 'succeeded' | 'failed' | 'reconciliation_needed' -} + /** + * Present while status is "pending" and the operation cannot proceed + * without the customer. Today this is a Stripe-hosted payment page for + * a subscription whose first invoice needs authentication (SCA/3DS); + * send the customer there to complete payment. This bearer capability is + * returned only to workspace billing managers. Absent otherwise. + * + */ + action_url?: string; + /** + * State derived from the PaymentIntent attached to this operation's + * exact stored Stripe invoice. Absent when the operation has no + * correlated PaymentIntent. + * + */ + authentication_state?: 'requires_action' | 'processing' | 'failed_retryable' | 'succeeded' | 'reconciliation_needed'; + /** + * When the operation completed (success or failure) + */ + completed_at?: string; + /** + * Coarse classification of why the correlated PaymentIntent's last + * payment attempt failed, derived at read time from the provider's + * machine-readable error and decline codes — never from provider + * message text or payment-method details. Present only when the + * intent has recorded a failed attempt and the operation is either + * still pending with authentication_state failed_retryable or has + * terminally failed. generic means the attempt failed for a reason + * outside this vocabulary. + * + */ + decline_reason?: 'card_declined' | 'insufficient_funds' | 'expired_card' | 'incorrect_cvc' | 'authentication_required' | 'authentication_failed' | 'processing_error' | 'generic'; + /** + * PII-safe failure code or generic failure message + */ + error_message?: string; + /** + * Unique identifier for the billing operation + */ + id: string; + /** + * Stripe PaymentIntent client secret for completing requires_action. + * This bearer capability is returned only to workspace billing managers + * and is absent otherwise. + * + */ + payment_intent_client_secret?: string; + /** + * Typed next action for a failed operation. Absent for pending and succeeded operations. + */ + recovery_action?: 'retry' | 'replace_payment_method' | 'authenticate_payment' | 'contact_support'; + /** + * Whether the customer can recover by starting a new billing operation after performing recovery_action. + */ + retryable?: boolean; + /** + * When the operation was initiated + */ + started_at: string; + /** + * Current status of the operation. reconciliation_needed is terminal + * for client polling but requires support reconciliation. + * + */ + status: 'pending' | 'succeeded' | 'failed' | 'reconciliation_needed'; +}; /** * 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; + }; +}; /** * Fields to set on the workspace's Stripe customer. Every group is @@ -3820,13 +3784,13 @@ export type BillingEvent = { * */ export type BillingCompanyDetailsUpdateRequest = { - address?: BillingAddress - /** - * Legal or trading name to show on invoices. - */ - company_name?: string - tax_id?: BillingTaxId -} + address?: BillingAddress; + /** + * Legal or trading name to show on invoices. + */ + company_name?: string; + tax_id?: BillingTaxId; +}; /** * A billing address for a company Stripe customer. city and postal_code @@ -3836,16 +3800,16 @@ export type BillingCompanyDetailsUpdateRequest = { * */ export type BillingAddress = { - city?: string - /** - * Two-letter ISO 3166-1 country code. - */ - country: string - line1: string - line2?: string - postal_code?: string - state?: string -} + city?: string; + /** + * Two-letter ISO 3166-1 country code. + */ + country: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; +}; /** * Company billing details on file for the workspace's Stripe customer. @@ -3854,8095 +3818,7936 @@ export type BillingAddress = { * */ export type BillingCompanyDetailsResponse = { - address?: BillingAddress - company_name?: string - tax_id?: BillingTaxId -} + address?: BillingAddress; + company_name?: string; + tax_id?: BillingTaxId; +}; + +export type BillingCapabilityScope = { + user_id: string; + workspace_id: string; +}; + +/** + * Identifies capability values currently using safe rollout defaults + * instead of deterministic policy results. A true value is UI guidance, + * not evidence that the corresponding write will succeed. + * + */ +export type BillingCapabilityRolloutDefaults = { + can_downgrade_to_personal: boolean; + can_subscribe_self_serve: boolean; + can_top_up: boolean; +}; + +/** + * Effective billing UI guidance for one authenticated user and workspace. + */ +export type BillingCapabilitiesResponse = { + capabilities: BillingCapabilities; + /** + * Time after which the client must refetch this snapshot. + */ + expires_at: string; + resolved_for: BillingCapabilityScope; + /** + * JavaScript-safe, time-sortable revision for this snapshot. It + * increases monotonically within a serving process. Clients should + * invalidate on a different X-Capability-Revision value and use + * expires_at as the cross-instance freshness bound. + * + */ + revision: number; + rollout_defaults_applied: BillingCapabilityRolloutDefaults; +}; + +/** + * Conservative UI guidance. These values do not authorize billing writes; + * each write endpoint independently enforces its permission policy. + * + */ +export type BillingCapabilities = { + can_cancel: boolean; + can_change_seats: boolean; + can_downgrade_to_personal: boolean; + can_invite_members: boolean; + can_reactivate: boolean; + can_subscribe_self_serve: boolean; + can_top_up: boolean; +}; /** * 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 - /** - * The bare value a loader widget consumes for this asset. For models it is the path inside the category folder (e.g. "flux.safetensors" for "models/checkpoints/flux.safetensors"), which is what the model resolver matches. For input/output/temp it is the content hash, because those assets are fetched by hash rather than staged by name — that is the value LoadImage-style widgets must carry. Clients add the "[output]"/"[temp]" annotation from the asset's own type, so it is never included here. Null when no such value can be derived. - */ - loader_path?: 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; + /** + * The bare value a loader widget consumes for this asset. For models it is the path inside the category folder (e.g. "flux.safetensors" for "models/checkpoints/flux.safetensors"), which is what the model resolver matches. For input/output/temp it is the content hash, because those assets are fetched by hash rather than staged by name — that is the value LoadImage-style widgets must carry. Clients add the "[output]"/"[temp]" annotation from the asset's own type, so it is never included here. Null when no such value can be derived. + */ + loader_path?: 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; +}; /** * Acknowledgement that a turn was accepted. The agent runs asynchronously; output streams over the WebSocket (agent_message_delta, agent_tool_call, draft_patch, agent_message_done). */ export type AgentTurnAccepted = { - /** - * ID of the assistant message that will stream the reply. - */ - message_id: string - thread_id: string -} + /** + * ID of the assistant message that will stream the reply. + */ + message_id: string; + thread_id: string; +}; /** * One agent thread row for the history sidebar. */ export type AgentThreadSummary = { - /** - * Thread creation time (RFC3339). - */ - created_at: string - /** - * Thread ID. - */ - id: string - /** - * When the thread was last marked active (RFC3339). Empty when unset. - */ - last_message_at: string - /** - * Number of messages in the thread. - */ - message_count: number - /** - * First user message text, truncated. Shown when title is empty. - */ - preview: string - /** - * Thread status. - */ - status: 'active' | 'archived' - /** - * Thread title; empty when none has been assigned (fall back to preview). - */ - title: string - /** - * Thread last-update time (RFC3339). - */ - updated_at: string - /** - * Associated workflow/draft ID; empty when the thread has none. - */ - workflow_id: string -} + /** + * Thread creation time (RFC3339). + */ + created_at: string; + /** + * Thread ID. + */ + id: string; + /** + * When the thread was last marked active (RFC3339). Empty when unset. + */ + last_message_at: string; + /** + * Number of messages in the thread. + */ + message_count: number; + /** + * First user message text, truncated. Shown when title is empty. + */ + preview: string; + /** + * Thread status. + */ + status: 'active' | 'archived'; + /** + * Thread title; empty when none has been assigned (fall back to preview). + */ + title: string; + /** + * Thread last-update time (RFC3339). + */ + updated_at: string; + /** + * Associated workflow/draft ID; empty when the thread has none. + */ + workflow_id: string; +}; /** * A paginated page of the caller's agent threads. */ export type AgentThreadListResponse = { - pagination: PaginationInfo - threads: Array -} + pagination: PaginationInfo; + threads: Array; +}; /** * Result of creating an agent thread. */ export type AgentThreadCreated = { - thread_id: string -} + thread_id: string; +}; /** * Optional body for creating an agent thread. */ export type AgentThreadCreateRequest = { - /** - * Workflow the thread is about. Optional — a thread can exist without a workflow. - */ - workflow_id?: string -} + /** + * Workflow the thread is about. Optional — a thread can exist without a workflow. + */ + workflow_id?: string; +}; /** * A user-authored skill pack to create or replace. Plain JSON — a pack body is small enough that a signed-URL upload would be pure overhead. */ export type AgentSkillPublishRequest = { - /** - * Accepted only so an `always: true` copied out of a SKILL.md frontmatter is refused with an explanation instead of silently dropped. User packs are on-demand only, so true is rejected. - */ - always?: boolean - /** - * The full instruction text, injected only when the pack is loaded. Capped per pack and, together with the caller's other packs, in total; the exact byte limits are deployment configuration and are named in the rejection message when exceeded. - */ - body: string - /** - * One line saying when the agent should load this pack. It is what every prompt carries for an unloaded pack, so it is a trigger description, not a title. Single-line: control characters, including CR and LF, are refused. maxLength is counted in code points, as JSON Schema defines it, and the service counts the same way. - */ - description: string - /** - * The pack's flat identifier and the load_skill argument: letters, digits, '.', '_' and '-'. Publishing a name already held by the caller replaces that pack. A name matching a built-in always-on pack is refused; a name matching a built-in on-demand pack is accepted, and is the name consumption will resolve to the user's pack. Must contain at least one character that is not a dot: "." and ".." are path segments a normalizing client rewrites. - */ - name: string -} + /** + * Accepted only so an `always: true` copied out of a SKILL.md frontmatter is refused with an explanation instead of silently dropped. User packs are on-demand only, so true is rejected. + */ + always?: boolean; + /** + * The full instruction text, injected only when the pack is loaded. Capped per pack and, together with the caller's other packs, in total; the exact byte limits are deployment configuration and are named in the rejection message when exceeded. + */ + body: string; + /** + * One line saying when the agent should load this pack. It is what every prompt carries for an unloaded pack, so it is a trigger description, not a title. Single-line: control characters, including CR and LF, are refused. maxLength is counted in code points, as JSON Schema defines it, and the service counts the same way. + */ + description: string; + /** + * The pack's flat identifier and the load_skill argument: letters, digits, '.', '_' and '-'. Publishing a name already held by the caller replaces that pack. A name matching a built-in always-on pack is refused; a name matching a built-in on-demand pack is accepted, and is the name consumption will resolve to the user's pack. Must contain at least one character that is not a dot: "." and ".." are path segments a normalizing client rewrites. + */ + name: string; +}; /** * The caller's skill packs, ordered by name. */ export type AgentSkillListResponse = { - skills: Array -} + skills: Array; +}; /** * One of the caller's user-authored skill packs. */ export type AgentSkill = { - /** - * The full instruction text. - */ - body: string - /** - * Lowercase hex sha256 of body, with no algorithm prefix. Stamped on every write, so a client can tell whether the stored pack matches the body it last sent. - */ - body_hash: string - /** - * RFC3339 timestamp of when the pack was first published. - */ - created_at: string - /** - * One-line trigger description the agent selects the pack from. - */ - description: string - /** - * Server-assigned pack ID. - */ - id: string - /** - * The pack's flat identifier and the load_skill argument. - */ - name: string - /** - * RFC3339 timestamp of the pack's most recent publish. - */ - updated_at: string -} + /** + * The full instruction text. + */ + body: string; + /** + * Lowercase hex sha256 of body, with no algorithm prefix. Stamped on every write, so a client can tell whether the stored pack matches the body it last sent. + */ + body_hash: string; + /** + * RFC3339 timestamp of when the pack was first published. + */ + created_at: string; + /** + * One-line trigger description the agent selects the pack from. + */ + description: string; + /** + * Server-assigned pack ID. + */ + id: string; + /** + * The pack's flat identifier and the load_skill argument. + */ + name: string; + /** + * RFC3339 timestamp of the pack's most recent publish. + */ + updated_at: string; +}; /** * A user turn posted to the agent. */ export type AgentPostMessageRequest = { - /** - * Optional input-image filenames the client already uploaded to the ComfyUI input namespace (via /api/upload/image, which returns the {name, subfolder, type} reference). The agent wires them into the workflow by filename — it never receives image bytes here. - */ - attachments?: Array - /** - * The user's message. - */ - content: string - /** - * Cloud workflow id of the client's active tab (should appear in open_tabs). When present and authorized it selects the workflow the turn starts focused on — explicit workflow_id > current_tab > the thread's remembered workflow. - */ - current_tab?: string - /** - * The client's live canvas, sent so the agent operates on what the user currently sees instead of an empty or stale draft. Reuses the {content, version} shape returned by GET /api/agent/draft. Additive — older clients omit it and the agent falls back to the stored draft. - */ - draft?: { - /** - * Full save-format graph (the frontend's app.graph.serialize() output). + /** + * Optional input-image filenames the client already uploaded to the ComfyUI input namespace (via /api/upload/image, which returns the {name, subfolder, type} reference). The agent wires them into the workflow by filename — it never receives image bytes here. */ - content?: { - [key: string]: unknown - } + attachments?: Array; + /** + * The user's message. + */ + content: string; + /** + * Cloud workflow id of the client's active tab (should appear in open_tabs). When present and authorized it selects the workflow the turn starts focused on — explicit workflow_id > current_tab > the thread's remembered workflow. + */ + current_tab?: string; + /** + * The client's live canvas, sent so the agent operates on what the user currently sees instead of an empty or stale draft. Reuses the {content, version} shape returned by GET /api/agent/draft. Additive — older clients omit it and the agent falls back to the stored draft. + */ + draft?: { + /** + * Full save-format graph (the frontend's app.graph.serialize() output). + */ + content?: { + [key: string]: unknown; + }; + /** + * The draft version the client last saw; null or 0 on first send. If it does not match the server's current draft version, the server returns 409 with the current version (an agent write landed since the client last saw the draft). + */ + version?: number | null; + }; /** - * The draft version the client last saw; null or 0 on first send. If it does not match the server's current draft version, the server returns 409 with the current version (an agent write landed since the client last saw the draft). + * Snapshot of the client's open workflow tabs that have cloud workflow ids (local-only/unsaved tabs are omitted), so the agent knows the user's real tab strip and can switch between tabs. Advisory context, not a grant — entries not in the caller's workspace are ignored. Additive — older clients omit it. */ - version?: number | null - } - /** - * Snapshot of the client's open workflow tabs that have cloud workflow ids (local-only/unsaved tabs are omitted), so the agent knows the user's real tab strip and can switch between tabs. Advisory context, not a grant — entries not in the caller's workspace are ignored. Additive — older clients omit it. - */ - open_tabs?: Array<{ + open_tabs?: Array<{ + /** + * Display name of the tab, shown to the agent so the user can reference tabs by name. + */ + name?: string; + /** + * Cloud workflow id of the open tab. + */ + workflow_id: string; + }>; /** - * Display name of the tab, shown to the agent so the user can reference tabs by name. + * Optional canvas selection context ("change these nodes"). */ - name?: string + selection?: { + [key: string]: unknown; + }; /** - * Cloud workflow id of the open tab. + * When present, the agent edits this workflow's draft. Ownership-checked (403 if not the caller's workflow). */ - workflow_id: string - }> - /** - * Optional canvas selection context ("change these nodes"). - */ - selection?: { - [key: string]: unknown - } - /** - * When present, the agent edits this workflow's draft. Ownership-checked (403 if not the caller's workflow). - */ - workflow_id?: string -} + workflow_id?: string; +}; /** * A persisted message in an agent thread. */ export type AgentMessage = { - /** - * Message payload. User turns carry {text, attachments?} (attachments are the input-image filenames from the request); assistant turns carry {text} — the final answer text (or error copy on a failed turn). Omitted when empty (e.g. an assistant message still streaming). Per-turn token accounting is NOT included here; it is surfaced on the agent_message_done WebSocket broadcast. - */ - content?: { - [key: string]: unknown - } - id: string - role: 'user' | 'assistant' | 'tool' | 'system' - /** - * Monotonic ordering within the thread. - */ - seq: number - status: 'streaming' | 'complete' | 'error' | 'interrupted' - thread_id: string - /** - * Groups the user message, assistant reply, and its tool calls. - */ - turn_id: string - /** - * The workflow/draft this turn operated on. Recorded per message so a thread can span or switch workflows over its lifetime; the thread's own workflow_id is only the active-workflow pointer. Empty for a workflow-less turn. - */ - workflow_id?: string -} + /** + * Message payload. User turns carry {text, attachments?} (attachments are the input-image filenames from the request); assistant turns carry {text} — the final answer text (or error copy on a failed turn). Omitted when empty (e.g. an assistant message still streaming). Per-turn token accounting is NOT included here; it is surfaced on the agent_message_done WebSocket broadcast. + */ + content?: { + [key: string]: unknown; + }; + id: string; + role: 'user' | 'assistant' | 'tool' | 'system'; + /** + * Monotonic ordering within the thread. + */ + seq: number; + status: 'streaming' | 'complete' | 'error' | 'interrupted'; + thread_id: string; + /** + * Groups the user message, assistant reply, and its tool calls. + */ + turn_id: string; + /** + * The workflow/draft this turn operated on. Recorded per message so a thread can span or switch workflows over its lifetime; the thread's own workflow_id is only the active-workflow pointer. Empty for a workflow-less turn. + */ + workflow_id?: string; +}; /** * Error body authored by the comfy-agent service and proxied verbatim through ingest. Errors raised by ingest itself (authentication, an unreachable agent service) use the standard ErrorResponse shape instead. */ export type AgentError = { - /** - * Human-readable error message. - */ - error: string -} + /** + * Human-readable error message. + */ + error: string; +}; /** * Authoritative snapshot of a workflow's agent draft — the replay-on-reconnect baseline for the draft_patch stream. */ export type AgentDraftSnapshot = { - /** - * Full UI/save-format workflow graph (nodes, links, groups, widgets_values). - */ - content: { - [key: string]: unknown - } - /** - * Monotonic draft version; compare against draft_patch base_version/version to detect gaps. - */ - version: number -} + /** + * Full UI/save-format workflow graph (nodes, links, groups, widgets_values). + */ + content: { + [key: string]: unknown; + }; + /** + * Monotonic draft version; compare against draft_patch base_version/version to detect gaps. + */ + version: number; +}; /** * Acknowledgement that a turn cancellation was requested. Cancellation is asynchronous; the terminal message state (status=error with stop copy) arrives over the WebSocket. */ export type AgentCancelAccepted = { - status: 'cancelling' -} + status: 'cancelling'; +}; /** * The user's answer to a pending ask_user prompt. `selected` holds the chosen option ids; a permission gate answers with one id (e.g. the Approve/Deny option). `other_text` carries a free-text answer when the ask set allow_other. */ export type AgentAnswerRequest = { - /** - * Free-text answer; only permitted when the ask set allow_other. Counts as one selection toward the bounds. - */ - other_text?: string - /** - * Chosen option ids. Must be a subset of the ask's option ids and satisfy its min_selections/max_selections. - */ - selected: Array -} + /** + * Free-text answer; only permitted when the ask set allow_other. Counts as one selection toward the bounds. + */ + other_text?: string; + /** + * Chosen option ids. Must be a subset of the ask's option ids and satisfy its min_selections/max_selections. + */ + selected: Array; +}; /** * Acknowledgement that an ask answer was accepted. The parked turn resumes and its continuation streams over the WebSocket. */ export type AgentAnswerAccepted = { - status: 'answered' -} + status: 'answered'; +}; /** * 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 - /** - * The bare value a loader widget consumes for this asset. For models it is the path inside the category folder (e.g. "flux.safetensors" for "models/checkpoints/flux.safetensors"), which is what the model resolver matches. For input/output/temp it is the content hash, because those assets are fetched by hash rather than staged by name — that is the value LoadImage-style widgets must carry. Clients add the "[output]"/"[temp]" annotation from the asset's own type, so it is never included here. Null when no such value can be derived. - */ - loader_path?: string | null - /** - * 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; + /** + * The bare value a loader widget consumes for this asset. For models it is the path inside the category folder (e.g. "flux.safetensors" for "models/checkpoints/flux.safetensors"), which is what the model resolver matches. For input/output/temp it is the content hash, because those assets are fetched by hash rather than staged by name — that is the value LoadImage-style widgets must carry. Clients add the "[output]"/"[temp]" annotation from the asset's own type, so it is never included here. Null when no such value can be derived. + */ + loader_path?: string | null; + /** + * 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}' -} + 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 -} + /** + * 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}' -} + 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 -} + /** + * 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. + * Proxied response */ - path: string - } - query?: never - url: '/__custom_node_proxy/{path}' -} + 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 -} + /** + * Unauthorized + */ + 401: unknown; + /** + * Path not in allowlist + */ + 403: unknown; +}; export type PostCustomNodeProxyResponses = { - /** - * Proxied response - */ - 200: unknown -} + /** + * Proxied response + */ + 200: unknown; +}; export type AgentGetDraftData = { - body?: never - path?: never - query: { + body?: never; + path?: never; + query: { + /** + * Workflow ID whose draft snapshot to fetch + */ + workflow_id: string; + }; + url: '/api/agent/draft'; +}; + +export type AgentGetDraftErrors = { + /** + * Missing workflow_id + */ + 400: AgentError; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Forbidden (workflow not found or cross-workspace) + */ + 403: AgentError; + /** + * No draft exists for the workflow + */ + 404: AgentError; + /** + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) + */ + 500: AgentError; /** - * Workflow ID whose draft snapshot to fetch + * Agent service unavailable */ - workflow_id: string - } - url: '/api/agent/draft' -} + 502: ErrorResponse; +}; -export type AgentGetDraftErrors = { - /** - * Missing workflow_id - */ - 400: AgentError - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden (workflow not found or cross-workspace) - */ - 403: AgentError - /** - * No draft exists for the workflow - */ - 404: AgentError - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse -} - -export type AgentGetDraftError = AgentGetDraftErrors[keyof AgentGetDraftErrors] +export type AgentGetDraftError = AgentGetDraftErrors[keyof AgentGetDraftErrors]; export type AgentGetDraftResponses = { - /** - * Current draft snapshot - */ - 200: AgentDraftSnapshot -} + /** + * Current draft snapshot + */ + 200: AgentDraftSnapshot; +}; -export type AgentGetDraftResponse = - AgentGetDraftResponses[keyof AgentGetDraftResponses] +export type AgentGetDraftResponse = AgentGetDraftResponses[keyof AgentGetDraftResponses]; export type AgentListSkillsData = { - body?: never - path?: never - query?: never - url: '/api/agent/skills' -} + body?: never; + path?: never; + query?: never; + url: '/api/agent/skills'; +}; export type AgentListSkillsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse - /** - * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. - */ - 503: ErrorResponse -} - -export type AgentListSkillsError = - AgentListSkillsErrors[keyof AgentListSkillsErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) + */ + 500: AgentError; + /** + * Agent service unavailable + */ + 502: ErrorResponse; + /** + * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. + */ + 503: ErrorResponse; +}; + +export type AgentListSkillsError = AgentListSkillsErrors[keyof AgentListSkillsErrors]; export type AgentListSkillsResponses = { - /** - * The caller's skill packs. - */ - 200: AgentSkillListResponse -} + /** + * The caller's skill packs. + */ + 200: AgentSkillListResponse; +}; -export type AgentListSkillsResponse = - AgentListSkillsResponses[keyof AgentListSkillsResponses] +export type AgentListSkillsResponse = AgentListSkillsResponses[keyof AgentListSkillsResponses]; export type AgentPublishSkillData = { - body: AgentSkillPublishRequest - path?: never - query?: never - url: '/api/agent/skills' -} + body: AgentSkillPublishRequest; + path?: never; + query?: never; + url: '/api/agent/skills'; +}; export type AgentPublishSkillErrors = { - /** - * The pack was rejected by publish-time validation (name shape, empty description or body, control characters in either, body over the per-pack size cap, always:true, a reserved always-on name, or comfy-cli shell syntax in the body). The message names what to change. - */ - 400: AgentError - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * A per-user budget is full — the pack count, or the combined size of the caller's packs. Nothing about this pack can be edited to make it fit; another pack has to be deleted first. - */ - 409: AgentError - /** - * Request body over ingest's transport-level cap (AGENT_SKILL_REQUEST_BODY_LIMIT), which is set well above the per-pack size cap so an over-size pack gets the actionable 400 above instead. Reaching this means the request itself is outsized. - */ - 413: ErrorResponse - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse - /** - * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. - */ - 503: ErrorResponse -} - -export type AgentPublishSkillError = - AgentPublishSkillErrors[keyof AgentPublishSkillErrors] + /** + * The pack was rejected by publish-time validation (name shape, empty description or body, control characters in either, body over the per-pack size cap, always:true, a reserved always-on name, or comfy-cli shell syntax in the body). The message names what to change. + */ + 400: AgentError; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * A per-user budget is full — the pack count, or the combined size of the caller's packs. Nothing about this pack can be edited to make it fit; another pack has to be deleted first. + */ + 409: AgentError; + /** + * Request body over ingest's transport-level cap (AGENT_SKILL_REQUEST_BODY_LIMIT), which is set well above the per-pack size cap so an over-size pack gets the actionable 400 above instead. Reaching this means the request itself is outsized. + */ + 413: ErrorResponse; + /** + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) + */ + 500: AgentError; + /** + * Agent service unavailable + */ + 502: ErrorResponse; + /** + * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. + */ + 503: ErrorResponse; +}; + +export type AgentPublishSkillError = AgentPublishSkillErrors[keyof AgentPublishSkillErrors]; export type AgentPublishSkillResponses = { - /** - * An existing pack of the same name was replaced. - */ - 200: AgentSkill - /** - * A new pack was created. - */ - 201: AgentSkill -} - -export type AgentPublishSkillResponse = - AgentPublishSkillResponses[keyof AgentPublishSkillResponses] + /** + * An existing pack of the same name was replaced. + */ + 200: AgentSkill; + /** + * A new pack was created. + */ + 201: AgentSkill; +}; + +export type AgentPublishSkillResponse = AgentPublishSkillResponses[keyof AgentPublishSkillResponses]; export type AgentDeleteSkillData = { - body?: never - path: { + body?: never; + path: { + /** + * The pack's name. + */ + name: string; + }; + query?: never; + url: '/api/agent/skills/{name}'; +}; + +export type AgentDeleteSkillErrors = { + /** + * The name is not a valid pack name. + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * The pack's name. + * The caller holds no pack with that name. */ - name: string - } - query?: never - url: '/api/agent/skills/{name}' -} + 404: AgentError; + /** + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) + */ + 500: AgentError; + /** + * Agent service unavailable + */ + 502: ErrorResponse; + /** + * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. + */ + 503: ErrorResponse; +}; -export type AgentDeleteSkillErrors = { - /** - * The name is not a valid pack name. - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * The caller holds no pack with that name. - */ - 404: AgentError - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse - /** - * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. - */ - 503: ErrorResponse -} - -export type AgentDeleteSkillError = - AgentDeleteSkillErrors[keyof AgentDeleteSkillErrors] +export type AgentDeleteSkillError = AgentDeleteSkillErrors[keyof AgentDeleteSkillErrors]; export type AgentDeleteSkillResponses = { - /** - * The pack was deleted. - */ - 204: void -} + /** + * The pack was deleted. + */ + 204: void; +}; -export type AgentDeleteSkillResponse = - AgentDeleteSkillResponses[keyof AgentDeleteSkillResponses] +export type AgentDeleteSkillResponse = AgentDeleteSkillResponses[keyof AgentDeleteSkillResponses]; export type AgentListThreadsData = { - body?: never - path?: never - query?: { + body?: never; + path?: never; + query?: { + /** + * Maximum threads to return (1–100, default 20). + */ + limit?: number; + /** + * Opaque pagination cursor. Pass the `next_cursor` value from a + * previous response to fetch the next page. Omit for the first page. + * + */ + after?: string; + }; + url: '/api/agent/threads'; +}; + +export type AgentListThreadsErrors = { /** - * Maximum threads to return (1–100, default 20). + * Invalid limit or cursor */ - limit?: number + 400: AgentError; /** - * Opaque pagination cursor. Pass the `next_cursor` value from a - * previous response to fetch the next page. Omit for the first page. - * + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) + */ + 500: AgentError; + /** + * Agent service unavailable */ - after?: string - } - url: '/api/agent/threads' -} + 502: ErrorResponse; +}; -export type AgentListThreadsErrors = { - /** - * Invalid limit or cursor - */ - 400: AgentError - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse -} - -export type AgentListThreadsError = - AgentListThreadsErrors[keyof AgentListThreadsErrors] +export type AgentListThreadsError = AgentListThreadsErrors[keyof AgentListThreadsErrors]; export type AgentListThreadsResponses = { - /** - * A page of the caller's agent threads. - */ - 200: AgentThreadListResponse -} + /** + * A page of the caller's agent threads. + */ + 200: AgentThreadListResponse; +}; -export type AgentListThreadsResponse = - AgentListThreadsResponses[keyof AgentListThreadsResponses] +export type AgentListThreadsResponse = AgentListThreadsResponses[keyof AgentListThreadsResponses]; export type AgentCreateThreadData = { - body?: AgentThreadCreateRequest - path?: never - query?: never - url: '/api/agent/threads' -} + body?: AgentThreadCreateRequest; + path?: never; + query?: never; + url: '/api/agent/threads'; +}; export type AgentCreateThreadErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse -} - -export type AgentCreateThreadError = - AgentCreateThreadErrors[keyof AgentCreateThreadErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) + */ + 500: AgentError; + /** + * Agent service unavailable + */ + 502: ErrorResponse; +}; + +export type AgentCreateThreadError = AgentCreateThreadErrors[keyof AgentCreateThreadErrors]; export type AgentCreateThreadResponses = { - /** - * Thread created - */ - 201: AgentThreadCreated -} + /** + * Thread created + */ + 201: AgentThreadCreated; +}; -export type AgentCreateThreadResponse = - AgentCreateThreadResponses[keyof AgentCreateThreadResponses] +export type AgentCreateThreadResponse = AgentCreateThreadResponses[keyof AgentCreateThreadResponses]; export type AgentAnswerAskData = { - body: AgentAnswerRequest - path: { + body: AgentAnswerRequest; + path: { + /** + * Thread ID + */ + id: string; + /** + * Ask ID (from the agent_ask event or the message list's pending_ask). + */ + ask_id: string; + }; + query?: never; + url: '/api/agent/threads/{id}/asks/{ask_id}/answer'; +}; + +export type AgentAnswerAskErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Forbidden (ask not found or not owned by the caller) + */ + 403: AgentError; + /** + * Ask not found + */ + 404: AgentError; + /** + * The ask was already resolved (answered, cancelled, or expired) + */ + 409: AgentError; + /** + * The selection is invalid for this ask (unknown option or wrong count) + */ + 422: AgentError; /** - * Thread ID + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) */ - id: string + 500: AgentError; /** - * Ask ID (from the agent_ask event or the message list's pending_ask). + * Answering asks is not supported on this deployment (inline engine) */ - ask_id: string - } - query?: never - url: '/api/agent/threads/{id}/asks/{ask_id}/answer' -} + 501: AgentError; + /** + * Agent service unavailable + */ + 502: ErrorResponse; +}; -export type AgentAnswerAskErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden (ask not found or not owned by the caller) - */ - 403: AgentError - /** - * Ask not found - */ - 404: AgentError - /** - * The ask was already resolved (answered, cancelled, or expired) - */ - 409: AgentError - /** - * The selection is invalid for this ask (unknown option or wrong count) - */ - 422: AgentError - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Answering asks is not supported on this deployment (inline engine) - */ - 501: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse -} - -export type AgentAnswerAskError = - AgentAnswerAskErrors[keyof AgentAnswerAskErrors] +export type AgentAnswerAskError = AgentAnswerAskErrors[keyof AgentAnswerAskErrors]; export type AgentAnswerAskResponses = { - /** - * Answer accepted; the turn resumes and streams over the WebSocket - */ - 202: AgentAnswerAccepted -} - -export type AgentAnswerAskResponse = - AgentAnswerAskResponses[keyof AgentAnswerAskResponses] - -export type AgentGetMessagesData = { - body?: never - path: { /** - * Thread ID + * Answer accepted; the turn resumes and streams over the WebSocket */ - id: string - } - query?: never - url: '/api/agent/threads/{id}/messages' -} - -export type AgentGetMessagesErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Thread not found or has no messages - */ - 404: AgentError - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse -} - -export type AgentGetMessagesError = - AgentGetMessagesErrors[keyof AgentGetMessagesErrors] + 202: AgentAnswerAccepted; +}; -export type AgentGetMessagesResponses = { - /** - * Messages in the thread, ordered by seq - */ - 200: Array -} +export type AgentAnswerAskResponse = AgentAnswerAskResponses[keyof AgentAnswerAskResponses]; -export type AgentGetMessagesResponse = - AgentGetMessagesResponses[keyof AgentGetMessagesResponses] +export type AgentGetMessagesData = { + body?: never; + path: { + /** + * Thread ID + */ + id: string; + }; + query?: never; + url: '/api/agent/threads/{id}/messages'; +}; -export type AgentPostMessageData = { - body: AgentPostMessageRequest - path: { +export type AgentGetMessagesErrors = { /** - * Thread ID. Use the literal "new" to open a fresh thread in the same call. + * Unauthorized */ - id: string - } - query?: never - url: '/api/agent/threads/{id}/messages' -} - -export type AgentPostMessageErrors = { - /** - * Invalid request body - */ - 400: AgentError - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden (workflow or thread not owned by the caller) - */ - 403: AgentError - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse -} - -export type AgentPostMessageError = - AgentPostMessageErrors[keyof AgentPostMessageErrors] - -export type AgentPostMessageResponses = { - /** - * Turn accepted; the agent runs asynchronously and streams output over the WebSocket - */ - 202: AgentTurnAccepted -} - -export type AgentPostMessageResponse = - AgentPostMessageResponses[keyof AgentPostMessageResponses] - -export type AgentCancelMessageData = { - body?: never - path: { + 401: ErrorResponse; /** - * Thread ID + * Thread not found or has no messages */ - id: string + 404: AgentError; /** - * Assistant message ID (from the turn's 202 acknowledgement or the message list). + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) */ - message_id: string - } - query?: never - url: '/api/agent/threads/{id}/messages/{message_id}/cancel' -} - -export type AgentCancelMessageErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden (message not found or not owned by the caller) - */ - 403: AgentError - /** - * The message is not a running assistant turn - */ - 409: AgentError - /** - * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) - */ - 500: AgentError - /** - * Stop is not supported on this deployment (inline engine) - */ - 501: AgentError - /** - * Agent service unavailable - */ - 502: ErrorResponse -} - -export type AgentCancelMessageError = - AgentCancelMessageErrors[keyof AgentCancelMessageErrors] - -export type AgentCancelMessageResponses = { - /** - * Cancellation requested; the terminal state arrives over the WebSocket - */ - 202: AgentCancelAccepted -} + 500: AgentError; + /** + * Agent service unavailable + */ + 502: ErrorResponse; +}; -export type AgentCancelMessageResponse = - AgentCancelMessageResponses[keyof AgentCancelMessageResponses] +export type AgentGetMessagesError = AgentGetMessagesErrors[keyof AgentGetMessagesErrors]; -export type ListAssetsData = { - body?: never - path?: never - query?: { - /** - * Deprecated alias for `tags_all`, kept permanently for existing - * callers. Filter assets that have ALL of these tags. Combining it - * with `tags_all`, or exceeding 100 tags (counted after removing - * empty values and duplicates), returns 400 `INVALID_TAG_FILTER`. - * - * - * @deprecated +export type AgentGetMessagesResponses = { + /** + * Messages in the thread, ordered by seq */ - include_tags?: Array + 200: Array; +}; + +export type AgentGetMessagesResponse = AgentGetMessagesResponses[keyof AgentGetMessagesResponses]; + +export type AgentPostMessageData = { + body: AgentPostMessageRequest; + path: { + /** + * Thread ID. Use the literal "new" to open a fresh thread in the same call. + */ + id: string; + }; + query?: never; + url: '/api/agent/threads/{id}/messages'; +}; + +export type AgentPostMessageErrors = { /** - * Deprecated alias for `tags_none`, kept permanently for existing - * callers. Exclude assets that have ANY of these tags. Combining it - * with `tags_none`, or exceeding 100 tags (counted after removing - * empty values and duplicates), returns 400 `INVALID_TAG_FILTER`. - * - * - * @deprecated + * Invalid request body */ - exclude_tags?: Array + 400: AgentError; /** - * Filter assets that have ALL of these tags. Tag values are opaque - * byte-strings compared exactly and case-sensitively; unknown tags - * are not an error — they simply match nothing. Replaces the - * deprecated `include_tags`. Sending both spellings, listing the - * same tag here and in `tags_none`, or exceeding 100 tags per list - * (counted after removing empty values and duplicates) returns 400 - * `INVALID_TAG_FILTER`. - * + * Unauthorized */ - tags_all?: Array + 401: ErrorResponse; /** - * Filter assets that have AT LEAST ONE of these tags. Combines with - * `tags_all`/`tags_none` by intersection (`tags_none` always wins; - * overlap with `tags_none` is allowed and leaves a dead term). - * Supplying a positive tag filter (`tags_any`, `tags_all`, or - * `include_tags`) replaces the default category filter that is - * otherwise applied. Lists over 100 tags (counted after removing - * empty values and duplicates) return 400 `INVALID_TAG_FILTER`. - * + * Forbidden (workflow or thread not owned by the caller) */ - tags_any?: Array + 403: AgentError; /** - * Exclude assets that have ANY of these tags. Replaces the - * deprecated `exclude_tags`. Sending both spellings, or exceeding - * 100 tags per list (counted after removing empty values and - * duplicates), returns 400 `INVALID_TAG_FILTER`. - * + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) */ - tags_none?: Array + 500: AgentError; /** - * Filter assets where name contains this substring (case-insensitive) + * Agent service unavailable */ - name_contains?: string + 502: ErrorResponse; +}; + +export type AgentPostMessageError = AgentPostMessageErrors[keyof AgentPostMessageErrors]; + +export type AgentPostMessageResponses = { /** - * JSON object for filtering by metadata fields + * Turn accepted; the agent runs asynchronously and streams output over the WebSocket */ - metadata_filter?: string + 202: AgentTurnAccepted; +}; + +export type AgentPostMessageResponse = AgentPostMessageResponses[keyof AgentPostMessageResponses]; + +export type AgentCancelMessageData = { + body?: never; + path: { + /** + * Thread ID + */ + id: string; + /** + * Assistant message ID (from the turn's 202 acknowledgement or the message list). + */ + message_id: string; + }; + query?: never; + url: '/api/agent/threads/{id}/messages/{message_id}/cancel'; +}; + +export type AgentCancelMessageErrors = { /** - * Maximum number of assets to return (1-500) + * Unauthorized */ - limit?: number + 401: ErrorResponse; /** - * Number of assets to skip for pagination + * Forbidden (message not found or not owned by the caller) */ - offset?: number + 403: AgentError; /** - * Field to sort by + * The message is not a running assistant turn */ - sort?: 'name' | 'created_at' | 'updated_at' | 'size' | 'last_access_time' + 409: AgentError; /** - * Sort order + * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead) */ - order?: 'asc' | 'desc' + 500: AgentError; /** - * Whether to include public/shared assets in results + * Stop is not supported on this deployment (inline engine) */ - include_public?: boolean + 501: AgentError; /** - * Filter assets by content hash, in the canonical `blake3:` - * form. Matches regardless of which of this asset store's two - * internal hash storage formats the matching row was written - * under (the canonical form used by from-hash-created references, - * or the raw `.`/bare `` storage key used by direct - * uploads) — both represent the same content hash. - * + * Agent service unavailable */ - hash?: string + 502: ErrorResponse; +}; + +export type AgentCancelMessageError = AgentCancelMessageErrors[keyof AgentCancelMessageErrors]; + +export type AgentCancelMessageResponses = { /** - * 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. - * + * Cancellation requested; the terminal state arrives over the WebSocket */ - after?: string - } - url: '/api/assets' -} + 202: AgentCancelAccepted; +}; + +export type AgentCancelMessageResponse = AgentCancelMessageResponses[keyof AgentCancelMessageResponses]; + +export type ListAssetsData = { + body?: never; + path?: never; + query?: { + /** + * Deprecated alias for `tags_all`, kept permanently for existing + * callers. Filter assets that have ALL of these tags. Combining it + * with `tags_all`, or exceeding 100 tags (counted after removing + * empty values and duplicates), returns 400 `INVALID_TAG_FILTER`. + * + * + * @deprecated + */ + include_tags?: Array; + /** + * Deprecated alias for `tags_none`, kept permanently for existing + * callers. Exclude assets that have ANY of these tags. Combining it + * with `tags_none`, or exceeding 100 tags (counted after removing + * empty values and duplicates), returns 400 `INVALID_TAG_FILTER`. + * + * + * @deprecated + */ + exclude_tags?: Array; + /** + * Filter assets that have ALL of these tags. Tag values are opaque + * byte-strings compared exactly and case-sensitively; unknown tags + * are not an error — they simply match nothing. Replaces the + * deprecated `include_tags`. Sending both spellings, listing the + * same tag here and in `tags_none`, or exceeding 100 tags per list + * (counted after removing empty values and duplicates) returns 400 + * `INVALID_TAG_FILTER`. + * + */ + tags_all?: Array; + /** + * Filter assets that have AT LEAST ONE of these tags. Combines with + * `tags_all`/`tags_none` by intersection (`tags_none` always wins; + * overlap with `tags_none` is allowed and leaves a dead term). + * Supplying a positive tag filter (`tags_any`, `tags_all`, or + * `include_tags`) replaces the default category filter that is + * otherwise applied. Lists over 100 tags (counted after removing + * empty values and duplicates) return 400 `INVALID_TAG_FILTER`. + * + */ + tags_any?: Array; + /** + * Exclude assets that have ANY of these tags. Replaces the + * deprecated `exclude_tags`. Sending both spellings, or exceeding + * 100 tags per list (counted after removing empty values and + * duplicates), returns 400 `INVALID_TAG_FILTER`. + * + */ + tags_none?: 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 content hash, in the canonical `blake3:` + * form. Matches regardless of which of this asset store's two + * internal hash storage formats the matching row was written + * under (the canonical form used by from-hash-created references, + * or the raw `.`/bare `` storage key used by direct + * uploads) — both represent the same 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] + /** + * 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 -} + /** + * Success - Assets returned + */ + 200: ListAssetsResponse; +}; -export type ListAssetsResponse2 = ListAssetsResponses[keyof ListAssetsResponses] +export type ListAssetsResponse2 = ListAssetsResponses[keyof ListAssetsResponses]; export type CreateAssetData = { - body: { + 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 = { /** - * The asset file to upload + * Invalid request (bad file, invalid content type, etc.) */ - file: Blob | File + 400: ErrorResponse; /** - * Content hash of the file. + * Unauthorized */ - hash?: string + 401: ErrorResponse; /** - * Optional asset ID for idempotent creation. If provided and asset exists, returns existing asset. + * File too large */ - id?: string + 413: ErrorResponse; /** - * MIME type of the asset (e.g., "image/png", "video/mp4") + * Unsupported media type */ - mime_type?: string + 415: ErrorResponse; /** - * Display name for the asset + * Validation error (e.g., disallowed model_type tag) */ - name?: string + 422: ErrorResponse; /** - * Optional preview asset ID. If not provided, images will use their own ID as preview. + * Internal server error */ - preview_id?: string + 500: ErrorResponse; +}; + +export type CreateAssetError = CreateAssetErrors[keyof CreateAssetErrors]; + +export type CreateAssetResponses = { /** - * 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. + * Asset already existed for this user (deduplicated by content hash); the + * existing asset is returned with created_new=false. + * */ - tags?: string + 200: AssetCreated; /** - * Custom JSON metadata as a string + * Asset created successfully (created_new=true) */ - 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] + 201: AssetCreated; +}; -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 CreateAssetResponse = CreateAssetResponses[keyof CreateAssetResponses]; export type DeleteAssetData = { - body?: never - path: { + body?: never; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}'; +}; + +export type DeleteAssetErrors = { /** - * Asset ID + * 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 */ - id: string - } - query?: never - url: '/api/assets/{id}' -} + 500: ErrorResponse; +}; -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 DeleteAssetError = DeleteAssetErrors[keyof DeleteAssetErrors]; export type DeleteAssetResponses = { - /** - * Asset record deleted successfully - */ - 204: void -} + /** + * Asset record deleted successfully + */ + 204: void; +}; -export type DeleteAssetResponse = - DeleteAssetResponses[keyof DeleteAssetResponses] +export type DeleteAssetResponse = DeleteAssetResponses[keyof DeleteAssetResponses]; export type GetAssetByIdData = { - body?: never - path: { + body?: never; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}'; +}; + +export type GetAssetByIdErrors = { /** - * Asset ID + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: ErrorResponse; + /** + * Internal server error */ - id: string - } - query?: never - url: '/api/assets/{id}' -} + 500: ErrorResponse; +}; -export type GetAssetByIdErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Asset not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetAssetByIdError = GetAssetByIdErrors[keyof GetAssetByIdErrors] +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 + 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 = { /** - * New display name for the asset + * Invalid request — no fields provided, or `preview_id` is the zero UUID + * (`INVALID_PREVIEW_ID`). + * */ - name?: string + 400: ErrorResponse; /** - * Updated preview asset ID + * Unauthorized */ - preview_id?: string + 401: ErrorResponse; /** - * Updated custom metadata + * 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. + * */ - user_metadata?: { - [key: string]: unknown - } - } - path: { + 404: ErrorResponse; /** - * Asset ID + * Internal server error */ - id: string - } - query?: never - url: '/api/assets/{id}' -} + 500: ErrorResponse; +}; -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 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: { + 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 ID + * Asset not found */ - id: string - } - query?: { + 404: ErrorResponse; /** - * Content-Disposition for the response: `attachment` (download) or - * `inline` (render in browser). Defaults to `attachment`. - * + * Internal server error */ - disposition?: 'inline' | 'attachment' - } - url: '/api/assets/{id}/content' -} + 500: ErrorResponse; +}; -export type GetAssetContentErrors = { - /** - * Asset not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetAssetContentError = - GetAssetContentErrors[keyof GetAssetContentErrors] +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: { + body: { + /** + * Tags to remove from the asset + */ + tags: Array; + }; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}/tags'; +}; + +export type RemoveAssetTagsErrors = { /** - * Tags to remove from the asset + * Invalid request */ - tags: Array - } - path: { + 400: ErrorResponse; /** - * Asset ID + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: ErrorResponse; + /** + * Validation error (e.g., reserved tag) + */ + 422: 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 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: { + body: { + /** + * Tags to add to the asset + */ + tags: Array; + }; + path: { + /** + * Asset ID + */ + id: string; + }; + query?: never; + url: '/api/assets/{id}/tags'; +}; + +export type AddAssetTagsErrors = { /** - * Tags to add to the asset + * Invalid request */ - tags: Array - } - path: { + 400: ErrorResponse; /** - * Asset ID + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: ErrorResponse; + /** + * Validation error (e.g., reserved tag) + */ + 422: ErrorResponse; + /** + * Internal server error */ - id: string - } - query?: never - url: '/api/assets/{id}/tags' -} + 500: 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 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: { + 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 = { /** - * Optional preview asset ID to associate with the downloaded asset + * Invalid URL or unsupported source */ - preview_id?: string + 400: ErrorResponse; /** - * URL of the file to download (must be from huggingface.co, civitai.com, or civitai.red) + * Unauthorized */ - source_url: string + 401: ErrorResponse; /** - * Optional tags for the asset (e.g., ["model", "checkpoint"]) + * Validation errors */ - tags?: Array + 422: ErrorResponse; /** - * Optional user-defined metadata to attach to the asset + * Internal server error */ - user_metadata?: { - [key: string]: unknown - } - } - path?: never - query?: never - url: '/api/assets/download' -} + 500: ErrorResponse; +}; -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 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. + * File already exists in storage - asset created/returned immediately */ - asset_ids?: Array + 200: AssetCreated; /** - * 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. + * Accepted - Download task created and processing in background */ - include_previews?: boolean + 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 = { /** - * 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). - * + * Invalid request */ - job_asset_name_filters?: { - [key: string]: Array - } + 400: ErrorResponse; /** - * Job IDs whose output assets are included in the ZIP bundle. Preview assets of these jobs are additionally included when `include_previews` is true. + * Unauthorized */ - job_ids?: Array + 401: ErrorResponse; /** - * 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") - * + * Internal server error */ - naming_strategy?: - | 'group_by_job_id' - | 'preserve' - | 'asset_id' - | 'group_by_job_time' - } - path?: never - query?: never - url: '/api/assets/export' -} + 500: ErrorResponse; +}; -export type CreateAssetExportErrors = { - /** - * Invalid request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CreateAssetExportError = - CreateAssetExportErrors[keyof CreateAssetExportErrors] +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: { + 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 = { /** - * Export filename with extension (e.g., "021e55cd-9785-4ac7-ac39-f4010138e3bc.zip") + * Invalid export name */ - exportName: string - } - query?: never - url: '/api/assets/exports/{exportName}' -} + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Export not found or not owned by user + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -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 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: { + 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 = { /** - * Blake3 content hash of the existing asset (blake3: prefix) + * Invalid request (bad hash format, invalid tags, etc.) */ - hash: string + 400: ErrorResponse; /** - * MIME type of the asset (e.g., "image/png", "video/mp4") + * Unauthorized */ - mime_type?: string + 401: ErrorResponse; /** - * Display name for the asset reference (optional) + * Source asset with given hash not found */ - name?: string + 404: ErrorResponse; /** - * Freeform tags for the asset. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. + * Validation error (e.g., disallowed model_type tag) */ - tags: Array + 422: ErrorResponse; /** - * Custom metadata for this asset reference + * Internal server error */ - user_metadata?: { - [key: string]: unknown - } - } - path?: never - query?: never - url: '/api/assets/from-hash' -} + 500: ErrorResponse; +}; -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 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: { + 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 = { /** - * Blake3 hash of the asset in format 'blake3:hex_digest' + * Invalid hash format */ - hash: string - } - query?: never - url: '/api/assets/hash/{hash}' -} + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Asset not found + */ + 404: unknown; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -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 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: { /** - * Number of assets marked as missing + * Prune result */ - marked?: number - status?: string - } -} + 200: { + /** + * Number of assets marked as missing + */ + marked?: number; + status?: string; + }; +}; -export type PruneAssetsResponse = - PruneAssetsResponses[keyof PruneAssetsResponses] +export type PruneAssetsResponse = PruneAssetsResponses[keyof PruneAssetsResponses]; export type GetRemoteAssetMetadataData = { - body?: never - path?: never - query: { + 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; /** - * Download URL to retrieve metadata from + * Failed to retrieve metadata from source */ - url: string - } - url: '/api/assets/remote-metadata' -} + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -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 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' -} + 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 - } -} + /** + * 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?: { - /** - * Deprecated alias for `tags_all`, kept permanently for existing - * callers. Filter assets that have ALL of these tags. The same - * combination and list-size rules as on `/api/assets` apply - * (400 `INVALID_TAG_FILTER`). - * - * - * @deprecated - */ - include_tags?: Array - /** - * Deprecated alias for `tags_none`, kept permanently for existing - * callers. Exclude assets that have ANY of these tags. The same - * combination and list-size rules as on `/api/assets` apply - * (400 `INVALID_TAG_FILTER`). - * - * - * @deprecated - */ - exclude_tags?: Array - /** - * Filter assets that have ALL of these tags. Replaces the deprecated - * `include_tags`. The same combination and list-size rules as on - * `/api/assets` apply (400 `INVALID_TAG_FILTER`). - * - */ - tags_all?: Array - /** - * Filter assets that have AT LEAST ONE of these tags. Combines with - * `tags_all`/`tags_none` by intersection (`tags_none` always wins). - * The same combination and list-size rules as on `/api/assets` apply - * (400 `INVALID_TAG_FILTER`). - * - */ - tags_any?: Array - /** - * Exclude assets that have ANY of these tags. Replaces the deprecated - * `exclude_tags`. The same combination and list-size rules as on - * `/api/assets` apply (400 `INVALID_TAG_FILTER`). - * - */ - tags_none?: Array - /** - * Filter assets where name contains this substring (case-insensitive) - */ - name_contains?: string + body?: never; + path?: never; + query?: { + /** + * Deprecated alias for `tags_all`, kept permanently for existing + * callers. Filter assets that have ALL of these tags. The same + * combination and list-size rules as on `/api/assets` apply + * (400 `INVALID_TAG_FILTER`). + * + * + * @deprecated + */ + include_tags?: Array; + /** + * Deprecated alias for `tags_none`, kept permanently for existing + * callers. Exclude assets that have ANY of these tags. The same + * combination and list-size rules as on `/api/assets` apply + * (400 `INVALID_TAG_FILTER`). + * + * + * @deprecated + */ + exclude_tags?: Array; + /** + * Filter assets that have ALL of these tags. Replaces the deprecated + * `include_tags`. The same combination and list-size rules as on + * `/api/assets` apply (400 `INVALID_TAG_FILTER`). + * + */ + tags_all?: Array; + /** + * Filter assets that have AT LEAST ONE of these tags. Combines with + * `tags_all`/`tags_none` by intersection (`tags_none` always wins). + * The same combination and list-size rules as on `/api/assets` apply + * (400 `INVALID_TAG_FILTER`). + * + */ + tags_any?: Array; + /** + * Exclude assets that have ANY of these tags. Replaces the deprecated + * `exclude_tags`. The same combination and list-size rules as on + * `/api/assets` apply (400 `INVALID_TAG_FILTER`). + * + */ + tags_none?: 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 = { /** - * JSON object for filtering by metadata fields + * Invalid request parameters */ - metadata_filter?: string + 400: ErrorResponse; /** - * Maximum number of tags to return (1-1000, default 100) + * Unauthorized */ - limit?: number + 401: ErrorResponse; /** - * Whether to include public/shared assets in results + * Internal server error */ - include_public?: boolean - } - url: '/api/assets/tags/refine' -} + 500: ErrorResponse; +}; -export type GetAssetTagHistogramErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetAssetTagHistogramError = - GetAssetTagHistogramErrors[keyof GetAssetTagHistogramErrors] +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 GetBillingCapabilitiesData = { + body?: never; + path?: never; + query?: never; + url: '/api/billing/capabilities'; +}; + +export type GetBillingCapabilitiesErrors = { + /** + * Workspace or user context required + */ + 401: ErrorResponse; + /** + * Actor is not a member of the authenticated workspace + */ + 403: ErrorResponse; + /** + * Workspace not found + */ + 404: ErrorResponse; + /** + * Billing service unavailable or returned an invalid response + */ + 502: ErrorResponse; +}; + +export type GetBillingCapabilitiesError = GetBillingCapabilitiesErrors[keyof GetBillingCapabilitiesErrors]; + +export type GetBillingCapabilitiesResponses = { + /** + * Effective billing capabilities + */ + 200: BillingCapabilitiesResponse; +}; -export type GetBillingBalanceResponse = - GetBillingBalanceResponses[keyof GetBillingBalanceResponses] +export type GetBillingCapabilitiesResponse = GetBillingCapabilitiesResponses[keyof GetBillingCapabilitiesResponses]; export type GetChurnkeyAuthData = { - body?: never - path?: never - query?: never - url: '/api/billing/churnkey/auth' -} + body?: never; + path?: never; + query?: never; + url: '/api/billing/churnkey/auth'; +}; export type GetChurnkeyAuthErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workspace has no Stripe customer (never subscribed) - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Churnkey is not configured on the server - */ - 503: ErrorResponse -} - -export type GetChurnkeyAuthError = - GetChurnkeyAuthErrors[keyof GetChurnkeyAuthErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Workspace has no Stripe customer (never subscribed) + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; + /** + * Churnkey is not configured on the server + */ + 503: ErrorResponse; +}; + +export type GetChurnkeyAuthError = GetChurnkeyAuthErrors[keyof GetChurnkeyAuthErrors]; export type GetChurnkeyAuthResponses = { - /** - * Success - */ - 200: ChurnkeyAuthResponse -} + /** + * Success + */ + 200: ChurnkeyAuthResponse; +}; -export type GetChurnkeyAuthResponse = - GetChurnkeyAuthResponses[keyof GetChurnkeyAuthResponses] +export type GetChurnkeyAuthResponse = GetChurnkeyAuthResponses[keyof GetChurnkeyAuthResponses]; export type GetBillingCompanyDetailsData = { - body?: never - path?: never - query?: never - url: '/api/billing/company-details' -} + body?: never; + path?: never; + query?: never; + url: '/api/billing/company-details'; +}; export type GetBillingCompanyDetailsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workspace owner role required - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetBillingCompanyDetailsError = - GetBillingCompanyDetailsErrors[keyof GetBillingCompanyDetailsErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Workspace owner role required + */ + 403: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetBillingCompanyDetailsError = GetBillingCompanyDetailsErrors[keyof GetBillingCompanyDetailsErrors]; export type GetBillingCompanyDetailsResponses = { - /** - * Success - */ - 200: BillingCompanyDetailsResponse -} + /** + * Success + */ + 200: BillingCompanyDetailsResponse; +}; -export type GetBillingCompanyDetailsResponse = - GetBillingCompanyDetailsResponses[keyof GetBillingCompanyDetailsResponses] +export type GetBillingCompanyDetailsResponse = GetBillingCompanyDetailsResponses[keyof GetBillingCompanyDetailsResponses]; export type UpdateBillingCompanyDetailsData = { - body: BillingCompanyDetailsUpdateRequest - path?: never - query?: never - url: '/api/billing/company-details' -} + body: BillingCompanyDetailsUpdateRequest; + path?: never; + query?: never; + url: '/api/billing/company-details'; +}; export type UpdateBillingCompanyDetailsErrors = { - /** - * Bad request (e.g., missing address fields or an invalid tax ID) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UpdateBillingCompanyDetailsError = - UpdateBillingCompanyDetailsErrors[keyof UpdateBillingCompanyDetailsErrors] - -export type UpdateBillingCompanyDetailsResponses = { - /** - * Success - */ - 200: BillingCompanyDetailsResponse -} - -export type UpdateBillingCompanyDetailsResponse = - UpdateBillingCompanyDetailsResponses[keyof UpdateBillingCompanyDetailsResponses] - -export type GetBillingEventsData = { - body?: never - path?: never - query?: { /** - * Page number (1-indexed) + * Bad request (e.g., missing address fields or an invalid tax ID) + */ + 400: ErrorResponse; + /** + * Unauthorized */ - page?: number + 401: ErrorResponse; /** - * Number of events per page + * Internal server error */ - limit?: number + 500: ErrorResponse; +}; + +export type UpdateBillingCompanyDetailsError = UpdateBillingCompanyDetailsErrors[keyof UpdateBillingCompanyDetailsErrors]; + +export type UpdateBillingCompanyDetailsResponses = { /** - * Event scope. The user scope requires user_id. + * Success */ - scope?: 'self' | 'workspace' | 'user' + 200: BillingCompanyDetailsResponse; +}; + +export type UpdateBillingCompanyDetailsResponse = UpdateBillingCompanyDetailsResponses[keyof UpdateBillingCompanyDetailsResponses]; + +export type GetBillingEventsData = { + body?: never; + path?: never; + query?: { + /** + * Page number (1-indexed) + */ + page?: number; + /** + * Number of events per page + */ + limit?: number; + /** + * Event scope. The user scope requires user_id. + */ + scope?: 'self' | 'workspace' | 'user'; + /** + * Current workspace member to filter by when scope is user + */ + user_id?: string; + /** + * Event type to filter + */ + filter?: string; + /** + * Earliest event creation time + */ + start_date?: string; + /** + * Latest event creation time + */ + end_date?: string; + }; + url: '/api/billing/events'; +}; + +export type GetBillingEventsErrors = { /** - * Current workspace member to filter by when scope is user + * Invalid filter */ - user_id?: string + 400: ErrorResponse; /** - * Event type to filter + * Unauthorized */ - filter?: string + 401: ErrorResponse; /** - * Earliest event creation time + * Insufficient workspace permissions */ - start_date?: string + 403: ErrorResponse; /** - * Latest event creation time + * Internal server error */ - end_date?: string - } - url: '/api/billing/events' -} + 500: ErrorResponse; +}; -export type GetBillingEventsErrors = { - /** - * Invalid filter - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Insufficient workspace permissions - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetBillingEventsError = - GetBillingEventsErrors[keyof GetBillingEventsErrors] +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: { + 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; /** - * The billing operation ID + * Internal server error */ - id: string - } - query?: never - url: '/api/billing/ops/{id}' -} + 500: ErrorResponse; +}; -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 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 ListSavedPaymentMethodsData = { - body?: never - path?: never - query?: never - url: '/api/billing/payment-methods' -} + body?: never; + path?: never; + query?: never; + url: '/api/billing/payment-methods'; +}; export type ListSavedPaymentMethodsErrors = { - /** - * Billing is disabled - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workspace owner role required - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListSavedPaymentMethodsError = - ListSavedPaymentMethodsErrors[keyof ListSavedPaymentMethodsErrors] + /** + * Billing is disabled + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Workspace owner role required + */ + 403: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type ListSavedPaymentMethodsError = ListSavedPaymentMethodsErrors[keyof ListSavedPaymentMethodsErrors]; export type ListSavedPaymentMethodsResponses = { - /** - * Saved payment methods - */ - 200: Array -} + /** + * Saved payment methods + */ + 200: Array; +}; -export type ListSavedPaymentMethodsResponse = - ListSavedPaymentMethodsResponses[keyof ListSavedPaymentMethodsResponses] +export type ListSavedPaymentMethodsResponse = ListSavedPaymentMethodsResponses[keyof ListSavedPaymentMethodsResponses]; 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 - /** - * Workspace owner role required - */ - 403: 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; + /** + * Workspace owner role required + */ + 403: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type PreviewSubscribeError = PreviewSubscribeErrors[keyof PreviewSubscribeErrors]; export type PreviewSubscribeResponses = { - /** - * Subscription preview - */ - 200: PreviewSubscribeResponse -} + /** + * Subscription preview + */ + 200: PreviewSubscribeResponse; +}; -export type PreviewSubscribeResponse2 = - PreviewSubscribeResponses[keyof PreviewSubscribeResponses] +export type PreviewSubscribeResponse2 = PreviewSubscribeResponses[keyof PreviewSubscribeResponses]; export type GetBillingStatusData = { - body?: never - path?: never - query?: never - url: '/api/billing/status' -} + 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] + /** + * 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 (for example, no active subscription). Ambiguous legacy Stripe state uses code BILLING_RECONCILIATION_REQUIRED. - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type CancelSubscriptionError = - CancelSubscriptionErrors[keyof CancelSubscriptionErrors] + /** + * Invalid request (for example, no active subscription). Ambiguous legacy Stripe state uses code BILLING_RECONCILIATION_REQUIRED. + */ + 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 GetBillingUsageTimeSeriesData = { - body?: never - path?: never - query?: { - group_by?: 'model' | 'endpoint' | 'product' - granularity?: 'hour' | 'day' | 'month' - starting_on?: string - ending_before?: string - months?: number - } - url: '/api/billing/usage/timeseries' -} + body?: never; + path?: never; + query?: { + group_by?: 'model' | 'endpoint' | 'product'; + granularity?: 'hour' | 'day' | 'month'; + starting_on?: string; + ending_before?: string; + months?: number; + }; + url: '/api/billing/usage/timeseries'; +}; export type GetBillingUsageTimeSeriesErrors = { - /** - * Invalid time range - */ - 400: ErrorResponse - /** - * Workspace context required - */ - 401: ErrorResponse - /** - * Upstream or internal error - */ - 500: ErrorResponse -} - -export type GetBillingUsageTimeSeriesError = - GetBillingUsageTimeSeriesErrors[keyof GetBillingUsageTimeSeriesErrors] + /** + * Invalid time range + */ + 400: ErrorResponse; + /** + * Workspace context required + */ + 401: ErrorResponse; + /** + * Upstream or internal error + */ + 500: ErrorResponse; +}; + +export type GetBillingUsageTimeSeriesError = GetBillingUsageTimeSeriesErrors[keyof GetBillingUsageTimeSeriesErrors]; export type GetBillingUsageTimeSeriesResponses = { - /** - * Workspace usage - */ - 200: UsageTimeSeries -} + /** + * Workspace usage + */ + 200: UsageTimeSeries; +}; -export type GetBillingUsageTimeSeriesResponse = - GetBillingUsageTimeSeriesResponses[keyof GetBillingUsageTimeSeriesResponses] +export type GetBillingUsageTimeSeriesResponse = GetBillingUsageTimeSeriesResponses[keyof GetBillingUsageTimeSeriesResponses]; 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 -} - -export type GetModelFoldersResponse = - GetModelFoldersResponses[keyof GetModelFoldersResponses] - -export type GetModelsInFolderData = { - body?: never - path: { /** - * The folder name to list models from + * Success - List of model folders */ - folder: string - } - query?: never - url: '/api/experiment/models/{folder}' -} - -export type GetModelsInFolderErrors = { - /** - * Folder not found or no models in folder - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetModelsInFolderError = - GetModelsInFolderErrors[keyof GetModelsInFolderErrors] + 200: Array; +}; -export type GetModelsInFolderResponses = { - /** - * Success - List of models in the folder - */ - 200: Array -} +export type GetModelFoldersResponse = GetModelFoldersResponses[keyof GetModelFoldersResponses]; -export type GetModelsInFolderResponse = - GetModelsInFolderResponses[keyof GetModelsInFolderResponses] +export type GetModelsInFolderData = { + body?: never; + path: { + /** + * The folder name to list models from + */ + folder: string; + }; + query?: never; + url: '/api/experiment/models/{folder}'; +}; -export type GetModelPreviewData = { - body?: never - path: { +export type GetModelsInFolderErrors = { /** - * The folder name containing the model. + * Folder not found or no models in folder */ - folder: string + 404: ErrorResponse; /** - * The path index (usually 0 for cloud service). + * Internal server error */ - path_index: number + 500: ErrorResponse; +}; + +export type GetModelsInFolderError = GetModelsInFolderErrors[keyof GetModelsInFolderErrors]; + +export type GetModelsInFolderResponses = { /** - * The model filename (with or without .webp extension). + * Success - List of models in the folder */ - filename: string - } - query?: never - url: '/api/experiment/models/preview/{folder}/{path_index}/{filename}' -} + 200: Array; +}; + +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 = { - /** - * Preview not available on Cloud - */ - 404: unknown -} + /** + * 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 -} - -export type GetNodeByIdData = { - body?: never - path: { /** - * Node class_type identifier + * Full node schema JSON */ - id: string - } - query?: never - url: '/api/experiment/nodes/{id}' -} + 200: unknown; +}; + +export type GetNodeByIdData = { + body?: never; + path: { + /** + * Node class_type identifier + */ + id: string; + }; + query?: never; + url: '/api/experiment/nodes/{id}'; +}; export type GetNodeByIdErrors = { - /** - * Node not found - */ - 404: unknown -} + /** + * 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: { - /** - * Free-tier job allowance for an authenticated non-paid (FREE-tier) user in the rollout. Absent for paid users and unauthenticated requests. Synthesized from config before a grant row exists so a brand-new user still sees their full allowance. - */ - free_tier_balance?: { - /** - * Total free jobs granted for the current period - */ - allowance: number - /** - * Free jobs remaining (allowance - used, floored at 0) - */ - remaining: number - /** - * Free jobs consumed so far - */ - used: number - } - /** - * Maximum upload size in bytes - */ - max_upload_size?: number - /** - * Whether the server supports preview metadata - */ - supports_preview_metadata?: boolean - [key: string]: unknown - } -} - -export type GetFeaturesResponse = - GetFeaturesResponses[keyof GetFeaturesResponses] + /** + * Success + */ + 200: { + /** + * Free-tier job allowance for an authenticated non-paid (FREE-tier) user in the rollout. Absent for paid users and unauthenticated requests. Synthesized from config before a grant row exists so a brand-new user still sees their full allowance. + */ + free_tier_balance?: { + /** + * Total free jobs granted for the current period + */ + allowance: number; + /** + * Free jobs remaining (allowance - used, floored at 0) + */ + remaining: number; + /** + * Free jobs consumed so far + */ + used: number; + }; + /** + * Maximum upload size in bytes + */ + max_upload_size?: number; + /** + * Whether the server supports preview metadata + */ + supports_preview_metadata?: boolean; + [key: string]: unknown; + }; +}; + +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] - -export type SubmitFeedbackResponses = { - /** - * Feedback submitted successfully - */ - 201: FeedbackResponse -} - -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 = { - /** - * 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 + * Invalid request */ - mask?: string | null + 400: ErrorResponse; /** - * Filename of the paint strokes layer + * Unauthorized */ - paint?: string | null + 401: ErrorResponse; /** - * Filename of the painted image layer + * Internal server error */ - painted?: string | null + 500: ErrorResponse; +}; + +export type SubmitFeedbackError = SubmitFeedbackErrors[keyof SubmitFeedbackErrors]; + +export type SubmitFeedbackResponses = { /** - * Filename of the final composite layer + * Feedback submitted successfully */ - painted_masked?: string | null - } -} + 201: FeedbackResponse; +}; -export type GetMaskLayersResponse = - GetMaskLayersResponses[keyof GetMaskLayersResponses] +export type SubmitFeedbackResponse = SubmitFeedbackResponses[keyof SubmitFeedbackResponses]; -export type FreeMemoryData = { - body?: { +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 = { /** - * Run garbage collection and free cached memory + * File not found or not a mask file */ - free_memory?: boolean + 404: ErrorResponse; +}; + +export type GetMaskLayersError = GetMaskLayersErrors[keyof GetMaskLayersErrors]; + +export type GetMaskLayersResponses = { /** - * Unload all models from VRAM/RAM - */ - unload_models?: boolean - } - path?: never - query?: never - url: '/api/free' -} + * 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 = { - /** - * Memory freed - */ - 200: unknown -} + /** + * 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: { + 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; /** - * 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 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 ManageHistoryErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ManageHistoryError = ManageHistoryErrors[keyof ManageHistoryErrors] +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?: { + 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 = { /** - * Maximum number of items to return + * Unauthorized - Authentication required */ - max_items?: number + 401: 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 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: { + body?: never; + path: { + /** + * The prompt ID to retrieve history for + */ + prompt_id: string; + }; + query?: never; + url: '/api/history_v2/{prompt_id}'; +}; + +export type GetHistoryForPromptErrors = { /** - * The prompt ID to retrieve history for + * Unauthorized - Authentication required */ - prompt_id: string - } - query?: never - url: '/api/history_v2/{prompt_id}' -} + 401: ErrorResponse; + /** + * Prompt not found + */ + 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 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?: { + 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 = { /** - * Filter by label type. Omit to return all labels. + * Bad request (e.g. invalid type parameter) */ - type?: 'tag' | 'model' | 'custom_node' - } - url: '/api/hub/labels' -} + 400: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -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 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: { + body?: never; + path: { + /** + * The hub profile username. + */ + username: string; + }; + query?: never; + url: '/api/hub/profiles/{username}'; +}; + +export type GetHubProfileByUsernameErrors = { /** - * The hub profile username. + * Profile not found */ - username: string - } - query?: never - url: '/api/hub/profiles/{username}' -} + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetHubProfileByUsernameErrors = { - /** - * Profile not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetHubProfileByUsernameError = - GetHubProfileByUsernameErrors[keyof GetHubProfileByUsernameErrors] +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: { + 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; /** - * The hub profile username to update. + * Internal server error */ - username: string - } - query?: never - url: '/api/hub/profiles/{username}' -} + 500: ErrorResponse; +}; -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 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 + 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 profile username + * Bad request (e.g. malformed pagination cursor) */ - username?: string + 400: ErrorResponse; /** - * When true, returns full HubWorkflowDetail objects in the workflows array instead of summaries. Requires limit <= 20. + * Profile not found (when filtering by username) */ - detail?: boolean + 404: ErrorResponse; /** - * Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted. + * Internal server error */ - status?: Array - } - url: '/api/hub/workflows' -} + 500: ErrorResponse; +}; -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 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: { + 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 = { /** - * The share ID of the hub workflow to unpublish. + * Unauthorized */ - share_id: string - } - query?: never - url: '/api/hub/workflows/{share_id}' -} + 401: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type DeleteHubWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type DeleteHubWorkflowError = - DeleteHubWorkflowErrors[keyof DeleteHubWorkflowErrors] +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: { + 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; /** - * The share ID of the hub workflow. + * Internal server error */ - share_id: string - } - query?: never - url: '/api/hub/workflows/{share_id}' -} + 500: ErrorResponse; +}; -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 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' -} + 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 = { - /** - * Internal server error - */ - 500: ErrorResponse -} + /** + * 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 CreateInputUploadUrlData = { - body: InputUploadUrlRequest - path?: never - query?: never - url: '/api/inputs/upload-url' -} + body: InputUploadUrlRequest; + path?: never; + query?: never; + url: '/api/inputs/upload-url'; +}; export type CreateInputUploadUrlErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Validation error (e.g. unsupported content type) - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Uploads temporarily unavailable (grant store not reachable) - */ - 503: ErrorResponse -} - -export type CreateInputUploadUrlError = - CreateInputUploadUrlErrors[keyof CreateInputUploadUrlErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Validation error (e.g. unsupported content type) + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; + /** + * Uploads temporarily unavailable (grant store not reachable) + */ + 503: ErrorResponse; +}; + +export type CreateInputUploadUrlError = CreateInputUploadUrlErrors[keyof CreateInputUploadUrlErrors]; export type CreateInputUploadUrlResponses = { - /** - * Upload grant minted - */ - 200: UploadGrantResponse -} + /** + * Upload grant minted + */ + 200: UploadGrantResponse; +}; -export type CreateInputUploadUrlResponse = - CreateInputUploadUrlResponses[keyof CreateInputUploadUrlResponses] +export type CreateInputUploadUrlResponse = CreateInputUploadUrlResponses[keyof CreateInputUploadUrlResponses]; 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: { + 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; /** - * Invite token + * Invite not found or expired */ - token: string - } - query?: never - url: '/api/invites/{token}/accept' -} + 404: ErrorResponse; + /** + * Already a member of this workspace + */ + 409: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -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 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 -} - -export type GetJobStatusData = { - body?: never - path: { /** - * The unique ID of the job + * Not Found — use /api/jobs/{job_id} instead */ - 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 -} + 404: unknown; +}; -export type GetJobStatusResponse = - GetJobStatusResponses[keyof GetJobStatusResponses] +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 ListJobsData = { - body?: never - path?: never - query?: { +export type GetJobStatusErrors = { /** - * Filter by one or more statuses (comma-separated). If not provided, returns all jobs. + * Unauthorized */ - status?: string + 401: ErrorResponse; /** - * Filter by workflow ID (exact match) + * Forbidden - job belongs to another user */ - workflow_id?: string + 403: ErrorResponse; /** - * Filter by output media type (only applies to completed jobs with outputs) + * Job not found */ - output_type?: 'image' | 'video' | 'audio' | '3d' + 404: ErrorResponse; /** - * Field to sort by (create_time = when job was submitted, execution_time = how long workflow took to run) + * Internal server error */ - sort_by?: 'create_time' | 'execution_time' + 500: ErrorResponse; +}; + +export type GetJobStatusError = GetJobStatusErrors[keyof GetJobStatusErrors]; + +export type GetJobStatusResponses = { /** - * Sort direction (asc = ascending, desc = descending) + * Success - Job status returned */ - sort_order?: 'asc' | 'desc' + 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 = { /** - * 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. - * + * Bad request (e.g. malformed pagination cursor). */ - after?: string + 400: ErrorResponse; /** - * Pagination offset (0-based). Deprecated: prefer cursor-based pagination via `after`. - * - * @deprecated + * Unauthorized - Authentication required */ - offset?: number + 401: 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 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: { + 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 = { /** - * Job identifier (UUID) + * Unauthorized - Authentication required */ - 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. - * + * Forbidden - Job does not belong to user + */ + 403: ErrorResponse; + /** + * Job not found + */ + 404: ErrorResponse; + /** + * Internal server error */ - short_link?: 'ephemeral_tool_chain' | 'default' - } - url: '/api/jobs/{job_id}' -} + 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 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 GetJobAssetsData = { - body?: never - path: { + body?: never; + path: { + /** + * Job identifier (UUID) + */ + job_id: string; + }; + query?: { + /** + * Maximum number of assets to return (1-500) + */ + limit?: number; + /** + * Number of assets to skip for pagination + */ + offset?: number; + }; + url: '/api/jobs/{job_id}/assets'; +}; + +export type GetJobAssetsErrors = { /** - * Job identifier (UUID) + * Invalid request parameters */ - job_id: string - } - query?: { + 400: ErrorResponse; /** - * Maximum number of assets to return (1-500) + * Unauthorized - Authentication required */ - limit?: number + 401: ErrorResponse; /** - * Number of assets to skip for pagination + * Job not found or does not belong to the user */ - offset?: number - } - url: '/api/jobs/{job_id}/assets' -} + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type GetJobAssetsErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - Authentication required - */ - 401: ErrorResponse - /** - * Job not found or does not belong to the user - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetJobAssetsError = GetJobAssetsErrors[keyof GetJobAssetsErrors] +export type GetJobAssetsError = GetJobAssetsErrors[keyof GetJobAssetsErrors]; export type GetJobAssetsResponses = { - /** - * Success - Job assets returned - */ - 200: JobAssetsResponse -} + /** + * Success - Job assets returned + */ + 200: JobAssetsResponse; +}; -export type GetJobAssetsResponse = - GetJobAssetsResponses[keyof GetJobAssetsResponses] +export type GetJobAssetsResponse = GetJobAssetsResponses[keyof GetJobAssetsResponses]; export type CancelJobData = { - body?: never - path: { + 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; + /** + * Job not found for this user + */ + 404: ErrorResponse; /** - * Job identifier (UUID) + * Internal server error - cancellation failed */ - 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 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; + /** + * Workspace governance policy blocks one or more partner providers (error.type PARTNER_NODE_DISABLED; error.class_types lists the offending nodes, error.providers the disabled providers) + */ + 403: PromptErrorResponse; + /** + * Workflow JSON too large + */ + 413: PromptErrorResponse; + /** + * Retryable backpressure. Two distinct causes, disambiguated by the body's `error.type`, NOT by parsing `error.message`: `PAYMENT_REQUIRED` / `FREE_TIER_UNAVAILABLE` / `FREE_TIER_EXHAUSTED` / `PARTNER_NODE_PAYMENT_REQUIRED` (a billing gate - retrying without paying never succeeds), or `QUEUE_LIMIT` (this workspace's bounded job queue is full - retrying after some queued jobs complete will succeed). + */ + 429: PromptErrorResponse; + /** + * Internal server error + */ + 500: PromptErrorResponse; + /** + * Service unavailable + */ + 503: PromptErrorResponse; +}; -export type ExecutePromptErrors = { - /** - * Invalid prompt - */ - 400: PromptErrorResponse - /** - * Payment required - Insufficient credits - */ - 402: PromptErrorResponse - /** - * Workspace governance policy blocks one or more partner providers (error.type PARTNER_NODE_DISABLED; error.class_types lists the offending nodes, error.providers the disabled providers) - */ - 403: PromptErrorResponse - /** - * Workflow JSON too large - */ - 413: PromptErrorResponse - /** - * Retryable backpressure. Two distinct causes, disambiguated by the body's `error.type`, NOT by parsing `error.message`: `PAYMENT_REQUIRED` / `FREE_TIER_UNAVAILABLE` / `FREE_TIER_EXHAUSTED` / `PARTNER_NODE_PAYMENT_REQUIRED` (a billing gate - retrying without paying never succeeds), or `QUEUE_LIMIT` (this workspace's bounded job queue is full - retrying after some queued jobs complete will succeed). - */ - 429: PromptErrorResponse - /** - * Internal server error - */ - 500: PromptErrorResponse - /** - * Service unavailable - */ - 503: PromptErrorResponse -} - -export type ExecutePromptError = ExecutePromptErrors[keyof ExecutePromptErrors] +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 GetProvidersData = { - body?: never - path?: never - query?: never - url: '/api/providers' -} + body?: never; + path?: never; + query?: never; + url: '/api/providers'; +}; export type GetProvidersErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Governance not available (no governance entitlement) - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetProvidersError = GetProvidersErrors[keyof GetProvidersErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Governance not available (no governance entitlement) + */ + 403: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetProvidersError = GetProvidersErrors[keyof GetProvidersErrors]; export type GetProvidersResponses = { - /** - * The provider catalog - */ - 200: ProviderCatalogResponse -} + /** + * The provider catalog + */ + 200: ProviderCatalogResponse; +}; -export type GetProvidersResponse = - GetProvidersResponses[keyof GetProvidersResponses] +export type GetProvidersResponse = GetProvidersResponses[keyof GetProvidersResponses]; 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: { + body?: never; + path: { + /** + * The UUID of the secret + */ + id: string; + }; + query?: never; + url: '/api/secrets/{id}'; +}; + +export type DeleteSecretErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * The UUID of the secret + * Forbidden - user does not own this secret */ - id: string - } - query?: never - url: '/api/secrets/{id}' -} + 403: ErrorResponse; + /** + * Secret not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; + /** + * Service unavailable - secrets feature disabled + */ + 503: ErrorResponse; +}; -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 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: { + 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; /** - * The UUID of the secret + * Service unavailable - secrets feature disabled */ - id: string - } - query?: never - url: '/api/secrets/{id}' -} + 503: ErrorResponse; +}; -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 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: { + body: UpdateSecretRequest; + path: { + /** + * The UUID of the secret + */ + id: string; + }; + query?: never; + url: '/api/secrets/{id}'; +}; + +export type UpdateSecretErrors = { /** - * The UUID of the secret + * Invalid request */ - id: string - } - query?: never - url: '/api/secrets/{id}' -} + 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; + /** + * Validation error - the replacement value does not match the secret's credential type + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; + /** + * Service unavailable - secrets feature disabled + */ + 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 - /** - * Validation error - the replacement value does not match the secret's credential type - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Service unavailable - secrets feature disabled - */ - 503: ErrorResponse -} - -export type UpdateSecretError = UpdateSecretErrors[keyof UpdateSecretErrors] +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: { + 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 - } -} + 200: { + /** + * The updated setting value + */ + 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 + 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 = { /** - * Sort order for tags + * Invalid request parameters */ - order?: 'count_desc' | 'name_asc' + 400: ErrorResponse; /** - * Include tags with zero usage count + * Unauthorized */ - include_zero?: boolean + 401: ErrorResponse; /** - * Whether to include public/shared assets when counting tags + * Internal server error */ - include_public?: boolean - } - url: '/api/tags' -} + 500: ErrorResponse; +}; -export type ListTagsErrors = { - /** - * Invalid request parameters - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListTagsError = ListTagsErrors[keyof ListTagsErrors] +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?: { + 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 = { /** - * Filter by task type name (exact match) + * Unauthorized - Authentication required */ - task_name?: string + 401: ErrorResponse; /** - * Filter by idempotency key (exact match). For best performance, specify task_name as well. + * Validation error - Invalid filter values */ - idempotency_key?: string + 422: ErrorResponse; /** - * Filter by one or more statuses (comma-separated) + * Internal server error */ - status?: string + 500: ErrorResponse; +}; + +export type ListTasksError = ListTasksErrors[keyof ListTasksErrors]; + +export type ListTasksResponses = { /** - * Filter tasks created after this timestamp (RFC3339 format) + * Success - Tasks retrieved */ - created_after?: string + 200: TasksListResponse; +}; + +export type ListTasksResponse = ListTasksResponses[keyof ListTasksResponses]; + +export type GetTaskData = { + body?: never; + path: { + /** + * Task identifier (UUID) + */ + task_id: string; + }; + query?: never; + url: '/api/tasks/{task_id}'; +}; + +export type GetTaskErrors = { /** - * Filter tasks created before this timestamp (RFC3339 format) + * Unauthorized - Authentication required */ - created_before?: string + 401: ErrorResponse; /** - * Sort direction (asc = ascending, desc = descending by create_time) + * Task not found (also returned for ownership failures to avoid leaking task existence) */ - sort_order?: 'asc' | 'desc' + 404: ErrorResponse; /** - * Pagination offset (0-based) + * Internal server error */ - offset?: number + 500: ErrorResponse; +}; + +export type GetTaskError = GetTaskErrors[keyof GetTaskErrors]; + +export type GetTaskResponses = { /** - * Maximum items per page (1-100) + * Success - Task details retrieved */ - 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] + 200: TaskResponse; +}; -export type ListTasksResponses = { - /** - * Success - Tasks retrieved - */ - 200: TasksListResponse -} +export type GetTaskResponse = GetTaskResponses[keyof GetTaskResponses]; -export type ListTasksResponse = ListTasksResponses[keyof ListTasksResponses] +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 GetTaskData = { - body?: never - path: { +export type UploadImageErrors = { + /** + * Bad request + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * Task identifier (UUID) + * Internal server error */ - task_id: string - } - query?: never - url: '/api/tasks/{task_id}' -} + 500: ErrorResponse; +}; -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 UploadImageError = UploadImageErrors[keyof UploadImageErrors]; -export type GetTaskResponses = { - /** - * Success - Task details retrieved - */ - 200: TaskResponse -} +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 GetTaskResponse = GetTaskResponses[keyof GetTaskResponses] +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: { +export type UploadMaskErrors = { /** - * The image file to upload + * Bad request */ - image: Blob | File + 400: ErrorResponse; /** - * Whether to overwrite existing file (true/false) + * Unauthorized */ - overwrite?: string + 401: ErrorResponse; /** - * Optional subfolder path + * Internal server error */ - subfolder?: string + 500: ErrorResponse; +}; + +export type UploadMaskError = UploadMaskErrors[keyof UploadMaskErrors]; + +export type UploadMaskResponses = { /** - * Upload type (defaults to "output") - */ - type?: string - } - path?: never - query?: never - url: '/api/upload/image' -} + * 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 UploadImageErrors = { - /** - * Bad request - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type UploadImageError = UploadImageErrors[keyof UploadImageErrors] +export type UploadGrantPutData = { + body: Blob | File; + path: { + upload_id: string; + }; + query?: never; + url: '/api/uploads/{upload_id}'; +}; -export type UploadImageResponses = { - /** - * Image uploaded successfully - */ - 200: { +export type UploadGrantPutErrors = { /** - * Filename of the uploaded image + * Body read failed mid-stream; mint a new grant and retry */ - name?: string + 400: unknown; /** - * Subfolder path where image was saved + * Unknown, expired, malformed, or already-used upload id */ - subfolder?: string + 404: unknown; /** - * Type of upload (e.g., "output") + * Body exceeds the per-purpose size cap */ - type?: string - } -} - -export type UploadImageResponse = - UploadImageResponses[keyof UploadImageResponses] - -export type UploadMaskData = { - body: { + 413: unknown; /** - * The mask image file to upload + * Body failed validation for the grant's purpose */ - image: Blob | File + 422: unknown; /** - * JSON string containing reference to the original image + * Internal server error */ - 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: { + 500: unknown; /** - * Filename of the uploaded mask + * Uploads temporarily unavailable (grant store not reachable) */ - name?: string + 503: unknown; +}; + +export type UploadGrantPutResponses = { /** - * Subfolder path where mask was saved + * Input image stored (input-image grants) */ - subfolder?: string + 200: InputUploadResponse; /** - * Type of upload (e.g., "output") + * Workflow created (workflow grants) */ - type?: string - } -} - -export type UploadMaskResponse = UploadMaskResponses[keyof UploadMaskResponses] - -export type UploadGrantPutData = { - body: Blob | File - path: { - upload_id: string - } - query?: never - url: '/api/uploads/{upload_id}' -} + 201: WorkflowResponse; +}; -export type UploadGrantPutErrors = { - /** - * Body read failed mid-stream; mint a new grant and retry - */ - 400: unknown - /** - * Unknown, expired, malformed, or already-used upload id - */ - 404: unknown - /** - * Body exceeds the per-purpose size cap - */ - 413: unknown - /** - * Body failed validation for the grant's purpose - */ - 422: unknown - /** - * Internal server error - */ - 500: unknown - /** - * Uploads temporarily unavailable (grant store not reachable) - */ - 503: unknown -} - -export type UploadGrantPutResponses = { - /** - * Input image stored (input-image grants) - */ - 200: InputUploadResponse - /** - * Workflow created (workflow grants) - */ - 201: WorkflowResponse -} - -export type UploadGrantPutResponse = - UploadGrantPutResponses[keyof UploadGrantPutResponses] +export type UploadGrantPutResponse = UploadGrantPutResponses[keyof UploadGrantPutResponses]; 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?: { + 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 = { /** - * The directory to list files from. + * Bad request (e.g., invalid filename). */ - dir?: string + 400: string; /** - * Whether to list files recursively. + * Unauthorized. */ - recurse?: boolean + 401: string; /** - * Whether to split file information by type. + * File not found or invalid path. */ - split?: boolean + 404: string; /** - * Whether to return full file metadata. + * General error */ - full_info?: boolean - } - url: '/api/userdata' -} + 500: string; +}; -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 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: { + 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; /** - * The file path to delete (URL encoded if necessary). + * File not found. */ - file: string - } - query?: never - url: '/api/userdata/{file}' -} + 404: string; + /** + * Internal server error. + */ + 500: string; +}; -export type DeleteUserdataFileErrors = { - /** - * Unauthorized. - */ - 401: string - /** - * File not found. - */ - 404: string - /** - * Internal server error. - */ - 500: string -} - -export type DeleteUserdataFileError = - DeleteUserdataFileErrors[keyof DeleteUserdataFileErrors] +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: { + 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; + /** + * Unauthorized. + */ + 401: string; + /** + * File not found or invalid path. + */ + 404: string; /** - * The filename of the user data to retrieve. + * General error */ - file: string - } - query?: never - url: '/api/userdata/{file}' -} + 500: string; +}; -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 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: { + 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; /** - * The target file path (URL encoded if necessary). + * Unauthorized. */ - file: string - } - query?: { + 401: string; /** - * If "false", prevents overwriting existing files. Defaults to "true". + * The requested path is not allowed. */ - overwrite?: 'true' | 'false' + 403: string; /** - * If "true", returns detailed file info; if "false", returns only the relative path. + * File already exists and overwrite is set to false. */ - full_info?: 'true' | 'false' - } - url: '/api/userdata/{file}' -} + 409: string; + /** + * General error + */ + 500: string; +}; -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 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: { + 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; + /** + * Unauthorized. + */ + 401: string; /** - * The source file path (URL encoded if necessary). + * Source file not found. */ - file: string + 404: string; /** - * The destination file path (URL encoded if necessary). + * Destination file already exists and overwrite is set to false. */ - dest: string - } - query?: { + 409: string; /** - * If "false", prevents overwriting existing files. Defaults to "true". + * General error */ - overwrite?: 'true' | 'false' - } - url: '/api/userdata/{file}/move/{dest}' -} + 500: string; +}; -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 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: { + 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; /** - * The workflow file path within the user's data directory (URL encoded if necessary). + * Internal server error */ - file: string - } - query?: never - url: '/api/userdata/{file}/publish' -} + 500: ErrorResponse; +}; -export type GetUserdataFilePublishErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetUserdataFilePublishError = - GetUserdataFilePublishErrors[keyof GetUserdataFilePublishErrors] +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: { + 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; + /** + * Workflow not found + */ + 404: ErrorResponse; /** - * The workflow file path within the user's data directory (URL encoded if necessary). + * Internal server error */ - file: string - } - query?: never - url: '/api/userdata/{file}/publish' -} + 500: ErrorResponse; +}; -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 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) + * Userdata storage information */ - migrated: boolean - /** - * Where user data is stored (always "server" in cloud) - */ - storage: string - } -} + 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 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 -} - -export type GetVhsQueryVideoData = { - body?: never - path?: never - query: { /** - * Name of the video file to query + * Not Found — use /api/userdata instead */ - filename: string - } - url: '/api/vhs/queryvideo' -} + 404: unknown; +}; -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] +export type GetVhsQueryVideoData = { + body?: never; + path?: never; + query: { + /** + * Name of the video file to query + */ + filename: string; + }; + url: '/api/vhs/queryvideo'; +}; -export type GetVhsViewAudioData = { - body?: never - path?: never - query: { - /** - * Name of the audio file to view - */ - filename: string +export type GetVhsQueryVideoErrors = { /** - * Type of file (e.g., output, input, temp) + * 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). + * */ - type?: string + 400: ErrorResponse; /** - * Subfolder path where the file is located + * Unauthorized */ - subfolder?: string - } - url: '/api/vhs/viewaudio' -} - -export type GetVhsViewAudioErrors = { - /** - * Unauthorized - */ - 401: unknown -} + 401: ErrorResponse; +}; -export type GetVhsViewAudioResponses = { - /** - * Audio stream - */ - 200: unknown -} +export type GetVhsQueryVideoError = GetVhsQueryVideoErrors[keyof GetVhsQueryVideoErrors]; -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 +export type GetVhsQueryVideoResponses = { /** - * Subfolder path where the file is located - */ - subfolder?: string - } - url: '/api/vhs/viewvideo' -} - -export type GetVhsViewVideoErrors = { - /** - * Unauthorized - */ - 401: unknown -} + * 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 GetVhsViewVideoResponses = { - /** - * Video stream - */ - 200: unknown -} +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 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 +export type GetVhsViewAudioErrors = { /** - * Full path to the file (used for temp files) + * Unauthorized */ - fullpath?: string + 401: unknown; +}; + +export type GetVhsViewAudioResponses = { /** - * Format of the file + * Audio stream */ - format?: string + 200: unknown; +}; + +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 GetVhsViewVideoErrors = { /** - * Frame rate for video files + * Unauthorized */ - frame_rate?: number + 401: unknown; +}; + +export type GetVhsViewVideoResponses = { /** - * Workflow identifier + * Video stream */ - workflow?: string + 200: unknown; +}; + +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 ViewFileErrors = { /** - * Timestamp parameter + * Invalid request parameters */ - timestamp?: number + 400: 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 - * + * File not found or unauthorized */ - channel?: string + 404: ErrorResponse; /** - * 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). - * + * Internal server error */ - res?: number - } - url: '/api/view' -} + 500: ErrorResponse; +}; -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 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 -} - -export type GetApiViewVideoAliasData = { - body?: never - path?: never - query: { /** - * Name of the file to view (see `/api/view` for the full handler contract) + * Not Found — use /api/experiment/models instead */ - filename: string - } - url: '/api/viewvideo' -} + 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 = { - /** - * Unauthorized - */ - 401: unknown -} + /** + * 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' + 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 = { /** - * Sort field + * Unauthorized */ - sort?: 'create_time' | 'update_time' | 'name' + 401: ErrorResponse; /** - * Sort order + * Internal server error */ - order?: 'asc' | 'desc' - } - url: '/api/workflows' -} + 500: ErrorResponse; +}; -export type ListWorkflowsErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListWorkflowsError = ListWorkflowsErrors[keyof ListWorkflowsErrors] +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: { + 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; /** - * The UUID of the workflow to delete. + * Workflow not found */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}' -} + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type DeleteWorkflowErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Workflow not found - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type DeleteWorkflowError = - DeleteWorkflowErrors[keyof DeleteWorkflowErrors] +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: { + 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; /** - * The UUID of the workflow. + * Internal server error */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}' -} + 500: ErrorResponse; +}; -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 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: { + 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; /** - * The UUID of the workflow to update. + * Workflow not found */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}' -} + 404: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -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 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: { + 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 = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Forbidden + */ + 403: ErrorResponse; + /** + * Workflow not found + */ + 404: ErrorResponse; /** - * The UUID of the workflow whose content should be retrieved. + * Internal server error */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}/content' -} + 500: ErrorResponse; +}; -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 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: { + 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; /** - * The UUID of the source workflow to fork from. + * Source workflow or version not found */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}/fork' -} + 404: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -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 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: { + 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; + /** + * Validation error + */ + 422: ErrorResponse; /** - * The UUID of the workflow to create a new version for. + * Internal server error */ - workflow_id: string - } - query?: never - url: '/api/workflows/{workflow_id}/versions' -} + 500: ErrorResponse; +}; -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 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: { + body?: never; + path: { + /** + * The share ID of the published workflow. + */ + share_id: string; + }; + query?: never; + url: '/api/workflows/published/{share_id}'; +}; + +export type GetPublishedWorkflowErrors = { /** - * The share ID of the published workflow. + * Unauthorized */ - share_id: string - } - query?: never - url: '/api/workflows/published/{share_id}' -} + 401: ErrorResponse; + /** + * Share not found + */ + 404: ErrorResponse; + /** + * Workflow JSON too large + */ + 413: ErrorResponse; + /** + * Internal server error + */ + 500: 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 GetPublishedWorkflowError = - GetPublishedWorkflowErrors[keyof GetPublishedWorkflowErrors] +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 CreateWorkflowUploadUrlData = { - body?: WorkflowUploadUrlRequest - path?: never - query?: never - url: '/api/workflows/upload-url' -} + body?: WorkflowUploadUrlRequest; + path?: never; + query?: never; + url: '/api/workflows/upload-url'; +}; export type CreateWorkflowUploadUrlErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Validation error (metadata field over its maximum length) - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse - /** - * Uploads temporarily unavailable (grant store not reachable) - */ - 503: ErrorResponse -} - -export type CreateWorkflowUploadUrlError = - CreateWorkflowUploadUrlErrors[keyof CreateWorkflowUploadUrlErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Validation error (metadata field over its maximum length) + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; + /** + * Uploads temporarily unavailable (grant store not reachable) + */ + 503: ErrorResponse; +}; + +export type CreateWorkflowUploadUrlError = CreateWorkflowUploadUrlErrors[keyof CreateWorkflowUploadUrlErrors]; export type CreateWorkflowUploadUrlResponses = { - /** - * Upload grant minted - */ - 200: UploadGrantResponse -} + /** + * Upload grant minted + */ + 200: UploadGrantResponse; +}; -export type CreateWorkflowUploadUrlResponse = - CreateWorkflowUploadUrlResponses[keyof CreateWorkflowUploadUrlResponses] +export type CreateWorkflowUploadUrlResponse = CreateWorkflowUploadUrlResponses[keyof CreateWorkflowUploadUrlResponses]; export type ListWorkspaceApiKeysData = { - body?: never - path?: never - query?: { + body?: never; + path?: never; + query?: { + /** + * Include revoked API keys in the response + */ + include_revoked?: boolean; + }; + url: '/api/workspace/api-keys'; +}; + +export type ListWorkspaceApiKeysErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * Include revoked API keys in the response + * Forbidden */ - include_revoked?: boolean - } - url: '/api/workspace/api-keys' -} + 403: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type ListWorkspaceApiKeysErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Forbidden - */ - 403: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ListWorkspaceApiKeysError = - ListWorkspaceApiKeysErrors[keyof ListWorkspaceApiKeysErrors] +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: { + body?: never; + path: { + /** + * API key ID to revoke + */ + id: string; + }; + query?: never; + url: '/api/workspace/api-keys/{id}'; +}; + +export type RevokeWorkspaceApiKeyErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; /** - * API key ID to revoke + * Not authorized to revoke this key */ - id: string - } - query?: never - url: '/api/workspace/api-keys/{id}' -} + 403: ErrorResponse; + /** + * API key not found + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -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 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: { + 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; /** - * Invite ID to revoke + * Internal server error */ - inviteId: string - } - query?: never - url: '/api/workspace/invites/{inviteId}' -} + 500: ErrorResponse; +}; -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 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 ResendWorkspaceInviteData = { - body?: never - path: { + body?: never; + path: { + /** + * Invite ID to resend + */ + inviteId: string; + }; + query?: never; + url: '/api/workspace/invites/{inviteId}/resend'; +}; + +export type ResendWorkspaceInviteErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Owner role required + */ + 403: ErrorResponse; /** - * Invite ID to resend + * Workspace or invite not found */ - inviteId: string - } - query?: never - url: '/api/workspace/invites/{inviteId}/resend' -} + 404: ErrorResponse; + /** + * Invited user is already a member + */ + 409: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; -export type ResendWorkspaceInviteErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Owner role required - */ - 403: ErrorResponse - /** - * Workspace or invite not found - */ - 404: ErrorResponse - /** - * Invited user is already a member - */ - 409: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type ResendWorkspaceInviteError = - ResendWorkspaceInviteErrors[keyof ResendWorkspaceInviteErrors] +export type ResendWorkspaceInviteError = ResendWorkspaceInviteErrors[keyof ResendWorkspaceInviteErrors]; export type ResendWorkspaceInviteResponses = { - /** - * Invite refreshed and queued for delivery - */ - 200: PendingInvite -} + /** + * Invite refreshed and queued for delivery + */ + 200: PendingInvite; +}; -export type ResendWorkspaceInviteResponse = - ResendWorkspaceInviteResponses[keyof ResendWorkspaceInviteResponses] +export type ResendWorkspaceInviteResponse = ResendWorkspaceInviteResponses[keyof ResendWorkspaceInviteResponses]; 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?: { + 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; /** - * Pagination offset (0-based) + * Workspace not found */ - offset?: number + 404: ErrorResponse; /** - * Maximum number of members to return + * Validation error */ - limit?: number - } - url: '/api/workspace/members' -} + 422: ErrorResponse; + /** + * Internal server error + */ + 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 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: { + 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; + /** + * Not authorized (must be workspace owner) + */ + 403: ErrorResponse; + /** + * Validation error (e.g. empty user_id) + */ + 422: ErrorResponse; /** - * Firebase UID of the member whose keys to revoke (must be non-empty) + * Internal server error */ - user_id: string - } - query?: never - url: '/api/workspace/members/{user_id}/api-keys' -} + 500: ErrorResponse; +}; -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 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: { + 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; /** - * User ID to remove + * Internal server error */ - userId: string - } - query?: never - url: '/api/workspace/members/{userId}' -} + 500: ErrorResponse; +}; -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 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: { + 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; + /** + * Workspace or member not found + */ + 404: ErrorResponse; + /** + * Validation error + */ + 422: ErrorResponse; /** - * User ID whose role is being changed + * Internal server error */ - userId: string - } - query?: never - url: '/api/workspace/members/{userId}' -} + 500: ErrorResponse; +}; -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 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 GetProviderPolicyData = { - body?: never - path?: never - query?: never - url: '/api/workspace/provider-policy' -} + body?: never; + path?: never; + query?: never; + url: '/api/workspace/provider-policy'; +}; export type GetProviderPolicyErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Governance not available (no governance entitlement) - */ - 403: ErrorResponse - /** - * Entitled workspace with no policy document yet - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetProviderPolicyError = - GetProviderPolicyErrors[keyof GetProviderPolicyErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Governance not available (no governance entitlement) + */ + 403: ErrorResponse; + /** + * Entitled workspace with no policy document yet + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetProviderPolicyError = GetProviderPolicyErrors[keyof GetProviderPolicyErrors]; export type GetProviderPolicyResponses = { - /** - * The policy document - */ - 200: ProviderPolicy -} + /** + * The policy document + */ + 200: ProviderPolicy; +}; -export type GetProviderPolicyResponse = - GetProviderPolicyResponses[keyof GetProviderPolicyResponses] +export type GetProviderPolicyResponse = GetProviderPolicyResponses[keyof GetProviderPolicyResponses]; export type PutProviderPolicyData = { - body: ProviderPolicy - path?: never - query?: never - url: '/api/workspace/provider-policy' -} + body: ProviderPolicy; + path?: never; + query?: never; + url: '/api/workspace/provider-policy'; +}; export type PutProviderPolicyErrors = { - /** - * Malformed document (wrong shape, missing fields, or duplicate provider_id entries) - */ - 400: ErrorResponse - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * Not a workspace owner, or governance not available (no governance entitlement) - */ - 403: ErrorResponse - /** - * Unknown provider slugs (code UNKNOWN_PROVIDERS; details.unknown_providers enumerates them so the client can prune and retry) - */ - 422: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type PutProviderPolicyError = - PutProviderPolicyErrors[keyof PutProviderPolicyErrors] + /** + * Malformed document (wrong shape, missing fields, or duplicate provider_id entries) + */ + 400: ErrorResponse; + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Not a workspace owner, or governance not available (no governance entitlement) + */ + 403: ErrorResponse; + /** + * Unknown provider slugs (code UNKNOWN_PROVIDERS; details.unknown_providers enumerates them so the client can prune and retry) + */ + 422: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type PutProviderPolicyError = PutProviderPolicyErrors[keyof PutProviderPolicyErrors]; export type PutProviderPolicyResponses = { - /** - * Policy replaced - */ - 200: ProviderPolicy - /** - * Policy created - */ - 201: ProviderPolicy -} - -export type PutProviderPolicyResponse = - PutProviderPolicyResponses[keyof PutProviderPolicyResponses] + /** + * Policy replaced + */ + 200: ProviderPolicy; + /** + * Policy created + */ + 201: ProviderPolicy; +}; + +export type PutProviderPolicyResponse = PutProviderPolicyResponses[keyof PutProviderPolicyResponses]; 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: { + 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; /** - * Workspace ID (w-{uuid} format) + * Internal server error */ - id: string - } - query?: never - url: '/api/workspaces/{id}' -} + 500: ErrorResponse; +}; -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 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: { + body?: never; + path: { + /** + * Workspace ID (w-{uuid} format) + */ + id: string; + }; + query?: never; + url: '/api/workspaces/{id}'; +}; + +export type GetWorkspaceErrors = { + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * Workspace not found or user not a member + */ + 404: ErrorResponse; /** - * Workspace ID (w-{uuid} format) + * Internal server error */ - id: string - } - query?: never - url: '/api/workspaces/{id}' -} + 500: ErrorResponse; +}; -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 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: { + 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; /** - * Workspace ID (w-{uuid} format) + * Internal server error */ - id: string - } - query?: never - url: '/api/workspaces/{id}' -} + 500: ErrorResponse; +}; -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 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 GetCurrentWorkspaceData = { - body?: never - path?: never - query?: never - url: '/api/workspaces/current' -} + body?: never; + path?: never; + query?: never; + url: '/api/workspaces/current'; +}; export type GetCurrentWorkspaceErrors = { - /** - * Unauthorized - */ - 401: ErrorResponse - /** - * No workspace resolves for this credential — it carries no workspace binding, the workspace was deleted, or the credential's user is no longer a member. Deliberately not 401: the credential itself is valid, so clients must not discard it or re-authenticate. - */ - 404: ErrorResponse - /** - * Internal server error - */ - 500: ErrorResponse -} - -export type GetCurrentWorkspaceError = - GetCurrentWorkspaceErrors[keyof GetCurrentWorkspaceErrors] + /** + * Unauthorized + */ + 401: ErrorResponse; + /** + * No workspace resolves for this credential — it carries no workspace binding, the workspace was deleted, or the credential's user is no longer a member. Deliberately not 401: the credential itself is valid, so clients must not discard it or re-authenticate. + */ + 404: ErrorResponse; + /** + * Internal server error + */ + 500: ErrorResponse; +}; + +export type GetCurrentWorkspaceError = GetCurrentWorkspaceErrors[keyof GetCurrentWorkspaceErrors]; export type GetCurrentWorkspaceResponses = { - /** - * The credential's workspace - */ - 200: CurrentWorkspaceResponse -} + /** + * The credential's workspace + */ + 200: CurrentWorkspaceResponse; +}; -export type GetCurrentWorkspaceResponse = - GetCurrentWorkspaceResponses[keyof GetCurrentWorkspaceResponses] +export type GetCurrentWorkspaceResponse = GetCurrentWorkspaceResponses[keyof GetCurrentWorkspaceResponses]; export type GetStaticExtensionsData = { - body?: never - path: { - /** - * Extension file path relative to /static/extensions on disk. - */ - path: string - } - query?: never - url: '/extensions/{path}' -} + body?: never; + path: { + /** + * Extension file path relative to /static/extensions on disk. + */ + path: string; + }; + query?: never; + url: '/extensions/{path}'; +}; export type GetStaticExtensionsErrors = { - /** - * File not found - */ - 404: unknown -} + /** + * File not found + */ + 404: unknown; +}; export type GetStaticExtensionsResponses = { - /** - * Static file - */ - 200: unknown -} - -export type RedirectExtensionScriptsData = { - body?: never - path: { /** - * Core script filename (e.g. `app.js`, `widgets.js`). + * Static file */ - file: string - } - query?: never - url: '/extensions/scripts/{file}' -} + 200: unknown; +}; + +export type RedirectExtensionScriptsData = { + body?: never; + path: { + /** + * Core script filename (e.g. `app.js`, `widgets.js`). + */ + file: string; + }; + query?: never; + url: '/extensions/scripts/{file}'; +}; export type RedirectExtensionScriptsErrors = { - /** - * The `file` param is not a valid plain basename. The redirect target - * is derived from an untrusted path param, so values that are not a - * single, traversal-free filename (e.g. `..`, `%2e%2e`, embedded - * separators, backslashes, or control characters) are rejected instead - * of being redirected, keeping the 302 a same-origin `/scripts/`. - * - */ - 404: { - error: { - /** - * Human-readable rejection reason. - */ - message: string - /** - * Machine-readable error code (e.g. `not_found`). - */ - type: string - } - } -} - -export type RedirectExtensionScriptsError = - RedirectExtensionScriptsErrors[keyof RedirectExtensionScriptsErrors] + /** + * The `file` param is not a valid plain basename. The redirect target + * is derived from an untrusted path param, so values that are not a + * single, traversal-free filename (e.g. `..`, `%2e%2e`, embedded + * separators, backslashes, or control characters) are rejected instead + * of being redirected, keeping the 302 a same-origin `/scripts/`. + * + */ + 404: { + error: { + /** + * Human-readable rejection reason. + */ + message: string; + /** + * Machine-readable error code (e.g. `not_found`). + */ + type: string; + }; + }; +}; + +export type RedirectExtensionScriptsError = RedirectExtensionScriptsErrors[keyof RedirectExtensionScriptsErrors]; 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' -} + 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 GetStaticKjwebAsyncData = { - body?: never - path: { /** - * Asset file path relative to /static/kjweb_async on disk. + * Subscription updated */ - path: string - } - query?: never - url: '/kjweb_async/{path}' -} + 200: unknown; +}; + +export type GetStaticKjwebAsyncData = { + body?: never; + path: { + /** + * Asset file path relative to /static/kjweb_async on disk. + */ + path: string; + }; + query?: never; + url: '/kjweb_async/{path}'; +}; export type GetStaticKjwebAsyncErrors = { - /** - * File not found - */ - 404: unknown -} + /** + * File not found + */ + 404: unknown; +}; export type GetStaticKjwebAsyncResponses = { - /** - * Static file - */ - 200: unknown -} + /** + * Static file + */ + 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' -} + body?: never; + path?: never; + query?: { + response_type?: string; + client_id?: string; + redirect_uri?: string; + scope?: string; + /** + * RFC 6749 §10.12 marks `state` as RECOMMENDED. Our hardening makes + * it REQUIRED on the initial-entry path (omitted only on the resume + * path where `oauth_request_id` is supplied instead). This parameter + * is `required: false` at the spec level only because the operation + * is dual-mode (initial entry vs. resume); the runtime parser + * (services/ingest/server/implementation/oauth/protocol/request.go) + * rejects empty `state` on the initial-entry path with a stable + * `invalid_request` 400. + * + */ + state?: string; + code_challenge?: string; + code_challenge_method?: string; + resource?: string; + oauth_request_id?: string; + }; + url: '/oauth/authorize'; +}; export type GetOAuthAuthorizeErrors = { - /** - * Invalid authorize request (pre-redirect failure — unknown client, redirect mismatch, malformed params). 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] + /** + * 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 -} + /** + * 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}' -} + 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 - /** - * Workflow templates version not available. - */ - 503: unknown -} + /** + * Template not found. + */ + 404: unknown; + /** + * Workflow templates version not available. + */ + 503: unknown; +}; export type GetTemplateProxyResponses = { - /** - * Template file content streamed from GCS. - */ - 200: unknown -} - -export type GetViewCompatAliasData = { - body?: never - path?: never - query: { /** - * Name of the file to view (see `/api/view` for the full handler contract) + * Template file content streamed from GCS. */ - filename: string - } - url: '/view' -} + 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 = { - /** - * Unauthorized - */ - 401: unknown -} + /** + * Unauthorized + */ + 401: unknown; +}; export type GetViewCompatAliasResponses = { - /** - * 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. - * + * File stream */ - clientId?: string - } - url: '/ws' -} + 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 = { - /** - * Unauthorized - */ - 401: unknown -} + /** + * Unauthorized + */ + 401: unknown; +}; diff --git a/packages/ingest-types/src/zod.gen.ts b/packages/ingest-types/src/zod.gen.ts index 52954c1230f..6b42a943619 100644 --- a/packages/ingest-types/src/zod.gen.ts +++ b/packages/ingest-types/src/zod.gen.ts @@ -1,89 +1,90 @@ // 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', + 'ENTERPRISE' +]); /** * 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()) +}); /** * Workflow metadata captured at mint time. The subsequent PUT body is the @@ -93,59 +94,59 @@ export const zWorkflowVersionContentResponse = z.object({ * */ export const zWorkflowUploadUrlRequest = z.object({ - default_view: z.enum(['workflow', 'app']).optional(), - description: z.string().max(2000).optional(), - forked_from_workflow_id: z.string().max(128).optional(), - forked_from_workflow_version_id: z.string().max(128).optional(), - name: z.string().max(255).optional() -}) + default_view: z.enum(['workflow', 'app']).optional(), + description: z.string().max(2000).optional(), + forked_from_workflow_id: z.string().max(128).optional(), + forked_from_workflow_version_id: z.string().max(128).optional(), + name: z.string().max(255).optional() +}); /** * 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 @@ -155,184 +156,170 @@ 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() +}); export const zUsageBalance = z.object({ - amount_micros: z.number().optional(), - cloud_credit_balance_micros: z.number().optional(), - currency: z.string().optional(), - prepaid_balance_micros: z.number().optional() -}) + amount_micros: z.number().optional(), + cloud_credit_balance_micros: z.number().optional(), + currency: z.string().optional(), + prepaid_balance_micros: z.number().optional() +}); export const zUsageSummary = z.object({ - balance: zUsageBalance.optional(), - spend_micros: z.number() -}) + balance: zUsageBalance.optional(), + spend_micros: z.number() +}); export const zUsageBucket = z.object({ - cost_micros: z.number(), - group_key: z.string(), - period_end: z.string().datetime(), - period_start: z.string().datetime() -}) + cost_micros: z.number(), + group_key: z.string(), + period_end: z.string().datetime(), + period_start: z.string().datetime() +}); export const zUsageBreakdownRow = z.object({ - cost_micros: z.number(), - group_key: z.string(), - share: z.number() -}) + cost_micros: z.number(), + group_key: z.string(), + share: z.number() +}); export const zUsageTimeSeries = z.object({ - breakdown: z.array(zUsageBreakdownRow), - buckets: z.array(zUsageBucket), - ending_before: z.string().datetime(), - granularity: z.enum(['hour', 'day', 'month']), - group_by: z.enum(['model', 'endpoint', 'product']), - groups: z.array(z.string()), - starting_on: z.string().datetime(), - summary: zUsageSummary -}) + breakdown: z.array(zUsageBreakdownRow), + buckets: z.array(zUsageBucket), + ending_before: z.string().datetime(), + granularity: z.enum([ + 'hour', + 'day', + 'month' + ]), + group_by: z.enum([ + 'model', + 'endpoint', + 'product' + ]), + groups: z.array(z.string()), + starting_on: z.string().datetime(), + summary: zUsageSummary +}); /** * A minted single-use upload grant. */ export const zUploadGrantResponse = z.object({ - expires_in: z.number().int(), - upload_path: z.string() -}) + expires_in: z.number().int(), + upload_path: z.string() +}); /** * 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 @@ -342,26 +329,19 @@ 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 @@ -372,998 +352,855 @@ 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']); export const zSubscriptionDiscount = z.object({ - amount_off_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' - }) - .optional(), - code: z.string(), - kind: z.enum(['plan', 'promotion']), - name: z.string().optional() -}) + amount_off_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' }).optional(), + code: z.string(), + kind: z.enum(['plan', 'promotion']), + name: z.string().optional() +}); /** * 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(), - confirm_reactivation: z.boolean().optional(), - confirmation_token: z.string().optional(), - idempotency_key: z.string().optional(), - plan_slug: z.string(), - promotion_code: z.string().optional(), - proration_at: z.string().datetime().optional(), - quote_id: z.string().optional(), - quote_version: z.number().int().optional(), - return_url: z.string().optional(), - saved_payment_method_id: z.string().regex(/^pm_/).optional(), - team_credit_stop_id: z.string().optional() -}) + billing_cycle: z.enum(['monthly', 'yearly']).optional(), + cancel_url: z.string().optional(), + confirm_reactivation: z.boolean().optional(), + confirmation_token: z.string().optional(), + idempotency_key: z.string().optional(), + plan_slug: z.string(), + promotion_code: z.string().optional(), + proration_at: z.string().datetime().optional(), + quote_id: z.string().optional(), + quote_version: z.number().int().optional(), + return_url: z.string().optional(), + saved_payment_method_id: z.string().regex(/^pm_/).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(), - credential_type: z.enum(['api_key', 'gcp_service_account']).optional(), - 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(), + credential_type: z.enum(['api_key', 'gcp_service_account']).optional(), + id: z.string().uuid(), + last_used_at: z.string().datetime().optional(), + name: z.string(), + provider: z.string().optional(), + updated_at: z.string().datetime() +}); /** * One way a provider's credential can be entered. When a provider exposes more than one option, clients present a sub-selection; the selected option's credential_type is sent on CreateSecretRequest. */ export const zCredentialOption = z.object({ - credential_type: z.enum(['api_key', 'gcp_service_account']), - input_type: z.enum(['text', 'json_file']), - label: z.string() -}) + credential_type: z.enum(['api_key', 'gcp_service_account']), + input_type: z.enum(['text', 'json_file']), + label: z.string() +}); /** * A provider the user may configure a secret for, with its display label and credential-entry options. */ export const zSecretProvider = z.object({ - credential_options: z.array(zCredentialOption).optional(), - id: z.string(), - label: z.string().optional() -}) + credential_options: z.array(zCredentialOption).optional(), + id: z.string(), + label: z.string().optional() +}); /** * 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) +}); export const zSavedPaymentMethod = z.object({ - brand: z.string().optional(), - id: z.string().regex(/^pm_/), - is_default: z.boolean(), - last4: z - .string() - .regex(/^[0-9]{4}$/) - .optional(), - type: z.string() -}) + brand: z.string().optional(), + id: z.string().regex(/^pm_/), + is_default: z.boolean(), + last4: z.string().regex(/^[0-9]{4}$/).optional(), + type: z.string() +}); /** * 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() +}); /** * One provider's policy state. */ export const zProviderPolicyEntry = z.object({ - enabled: z.boolean(), - provider_id: z.string() -}) + enabled: z.boolean(), + provider_id: z.string() +}); /** * A workspace's partner-provider governance policy document — the exact shape PUT accepts (round-trips; entries come back sorted by provider_id, write order is not significant). Effective rule: enabled(P) = !enforcement_enabled || (the entry for P has enabled=true); absent from the array = unset (deny when enforcing). */ export const zProviderPolicy = z.object({ - enforcement_enabled: z.boolean(), - providers: z.array(zProviderPolicyEntry) -}) + enforcement_enabled: z.boolean(), + providers: z.array(zProviderPolicyEntry) +}); /** * Display data for one governable partner provider. */ export const zCatalogProvider = z.object({ - display_name: z.string(), - node_categories: z.array(z.string()), - provider_id: z.string() -}) + display_name: z.string(), + node_categories: z.array(z.string()), + provider_id: z.string() +}); /** * The partner-provider governance catalog: every governable provider, identical for all workspaces. A projection of the curated catalog minus the internal api_names. */ export const zProviderCatalogResponse = z.object({ - providers: z.array(zCatalogProvider) -}) + providers: z.array(zCatalogProvider) +}); /** * 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(), - amount_due_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' - }) - .optional(), - 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' - }), - currency: z.string().optional(), - current_plan: zPreviewPlanInfo.optional(), - discounts: z.array(zSubscriptionDiscount).optional(), - effective_at: z.string().datetime(), - is_immediate: z.boolean(), - new_plan: zPreviewPlanInfo, - payment_method_configuration_id: z.string().optional(), - promotion_code: z.string().optional(), - proration_at: z.string().datetime().optional(), - quote_id: z.string().optional(), - quote_version: z.number().int().optional(), - reason: z.string().optional(), - renewal_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' - }) - .optional(), - renewal_at: z.string().datetime().optional(), - requires_reactivation_confirmation: z.boolean().optional(), - transition_type: z.enum([ - 'new_subscription', - 'upgrade', - 'downgrade', - 'duration_change' - ]) -}) + allowed: z.boolean(), + amount_due_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' }).optional(), + 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' }), + currency: z.string().optional(), + current_plan: zPreviewPlanInfo.optional(), + discounts: z.array(zSubscriptionDiscount).optional(), + effective_at: z.string().datetime(), + is_immediate: z.boolean(), + new_plan: zPreviewPlanInfo, + payment_method_configuration_id: z.string().optional(), + promotion_code: z.string().optional(), + proration_at: z.string().datetime().optional(), + quote_id: z.string().optional(), + quote_version: z.number().int().optional(), + reason: z.string().optional(), + renewal_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' }).optional(), + renewal_at: z.string().datetime().optional(), + requires_reactivation_confirmation: z.boolean().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(), - promotion_code: z.string().optional(), - team_credit_stop_id: z.string().optional() -}) + plan_slug: z.string(), + promotion_code: z.string().optional(), + team_credit_stop_id: z.string().optional() +}); /** * 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. Fields fall into three groups: the ones the server honors, the purely informational ones it accepts and ignores (`scope` plus the client-profile fields `client_uri`, `logo_uri`, `tos_uri`, `policy_uri`, `contacts`, `software_id`, `software_version` — parsed, never persisted, never echoed, per RFC 7591 §2's "MAY ignore" allowance), and the ones it rejects with `invalid_client_metadata` (`resource_grants`, because scopes/grants are server-owned for dynamic clients; `jwks`/`jwks_uri`, because they only apply to the JWT client-authentication methods DCR does not offer). `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.string().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.string().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(), - loader_path: z.string().nullish(), - 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(), + loader_path: z.string().nullish(), + 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(), - previewable_outputs_count: z.number().int().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(), + previewable_outputs_count: z.number().int().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() +}); /** * An asset produced by a job, enriched with the per-output node context @@ -1373,111 +1210,70 @@ export const zJobStatusResponse = z.object({ * */ export const zJobOutputAsset = z.object({ - created_at: z.string().datetime(), - hash: z - .string() - .regex(/^blake3:[a-f0-9]{64}$/) - .optional(), - id: z.string().uuid(), - mime_type: z.string().optional(), - name: z.string(), - node_id: z.string().nullish(), - output_index: z.number().int().nullish(), - output_key: z.string().nullish(), - preview_url: 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() -}) + created_at: z.string().datetime(), + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/).optional(), + id: z.string().uuid(), + mime_type: z.string().optional(), + name: z.string(), + node_id: z.string().nullish(), + output_index: z.number().int().nullish(), + output_key: z.string().nullish(), + preview_url: 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() +}); /** * 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_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_meta: z.record(z.unknown()).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_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(), - previewable_outputs_count: z.number().int().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' - }), - user_id: z.string().optional(), - workflow: z.record(z.unknown()).optional(), - workflow_id: z.string().optional(), - workflow_version_id: z.string().optional(), - workspace_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_meta: z.record(z.unknown()).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_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(), + previewable_outputs_count: z.number().int().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' }), + user_id: z.string().optional(), + workflow: z.record(z.unknown()).optional(), + workflow_id: z.string().optional(), + workflow_version_id: z.string().optional(), + workspace_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() +}); /** * Paginated list of the assets produced by a single job. */ export const zJobAssetsResponse = z.object({ - assets: z.array(zJobOutputAsset), - job_id: z.string().uuid(), - pagination: zPaginationInfo -}) + assets: z.array(zJobOutputAsset), + job_id: z.string().uuid(), + pagination: zPaginationInfo +}); /** * Request body for minting an input-image upload grant. */ export const zInputUploadUrlRequest = z.object({ - content_type: z.string().max(64) -}) + content_type: z.string().max(64) +}); /** * Result of redeeming an input-image upload grant. Identical in shape to @@ -1485,263 +1281,227 @@ export const zInputUploadUrlRequest = z.object({ * */ export const zInputUploadResponse = z.object({ - name: z.string(), - subfolder: z.string(), - type: z.string() -}) + name: z.string(), + subfolder: z.string(), + type: z.string() +}); /** * 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(), - isApp: z.boolean(), - 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(), + isApp: z.boolean(), + 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(), - is_app: z.boolean(), - 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(), + is_app: z.boolean(), + 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(), - is_app: z.boolean(), - 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(), + is_app: z.boolean(), + 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. @@ -1750,129 +1510,123 @@ 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 @@ -1881,199 +1635,183 @@ 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() +}); /** * The workspace bound to the presented credential, plus how that credential authenticated. Same shape as Workspace with the caller's role and the auth method added, and without created_at (callers of this endpoint want identity, not provenance). */ export const zCurrentWorkspaceResponse = z.object({ - auth_method: z.string(), - id: z.string(), - name: z.string(), - role: z.enum(['owner', 'member']).optional(), - type: z.enum(['personal', 'team']) -}) + auth_method: z.string(), + id: z.string(), + name: z.string(), + role: z.enum(['owner', 'member']).optional(), + type: z.enum(['personal', 'team']) +}); /** * 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({ - credential_type: z - .enum(['api_key', 'gcp_service_account']) - .optional() - .default('api_key'), - name: z.string().min(1).max(255), - provider: z.string().max(64).optional(), - secret_value: z.string().min(1) -}) + credential_type: z.enum(['api_key', 'gcp_service_account']).optional().default('api_key'), + 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() +}); /** * Credentials the Churnkey embed requires to launch the cancel flow. @@ -2083,32 +1821,36 @@ export const zCreateHubProfileRequest = z.object({ * */ export const zChurnkeyAuthResponse = z.object({ - auth_hash: z.string(), - customer_id: z.string(), - mode: z.enum(['live', 'test', 'sandbox']) -}) + auth_hash: z.string(), + customer_id: z.string(), + mode: z.enum([ + 'live', + 'test', + 'sandbox' + ]) +}); /** * 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) +}); /** * A tax identifier for a company Stripe customer. Stripe validates the @@ -2117,117 +1859,124 @@ export const zBulkRevokeApiKeysResponse = z.object({ * */ export const zBillingTaxId = z.object({ - type: z.string(), - value: z.string() -}) + type: z.string(), + value: z.string() +}); /** * Payment lifecycle status */ export const zBillingStatus = z.enum([ - 'awaiting_payment_method', - 'pending_payment', - 'paid', - 'payment_failed', - 'paused', - 'inactive' -]) + 'awaiting_payment_method', + 'pending_payment', + 'paid', + 'payment_failed', + 'paused', + 'inactive' +]); /** * Current billing and subscription status for a workspace. */ export const zBillingStatusResponse = z.object({ - action_url: z.string().optional(), - billing_rail: z.enum(['legacy_stripe', 'metronome', 'stripe']).optional(), - billing_status: zBillingStatus.optional(), - cancel_at: z.string().datetime().optional(), - has_funds: z.boolean(), - is_active: z.boolean(), - max_seats: z.number().int(), - occupied_seats: z.number().int(), - payment_intent_client_secret: z.string().optional(), - pending_billing_op_id: z.string().optional(), - pending_billing_op_type: z.enum(['subscription', 'topup']).optional(), - 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() -}) + action_url: z.string().optional(), + billing_rail: z.enum([ + 'legacy_stripe', + 'metronome', + 'stripe' + ]).optional(), + billing_status: zBillingStatus.optional(), + cancel_at: z.string().datetime().optional(), + has_funds: z.boolean(), + is_active: z.boolean(), + max_seats: z.number().int(), + occupied_seats: z.number().int(), + payment_intent_client_secret: z.string().optional(), + pending_billing_op_id: z.string().optional(), + pending_billing_op_type: z.enum(['subscription', 'topup']).optional(), + 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({ - action_url: z.string().optional(), - authentication_state: z - .enum([ - 'requires_action', - 'processing', - 'failed_retryable', - 'succeeded', - 'reconciliation_needed' + action_url: z.string().optional(), + authentication_state: z.enum([ + 'requires_action', + 'processing', + 'failed_retryable', + 'succeeded', + 'reconciliation_needed' + ]).optional(), + completed_at: z.string().datetime().optional(), + decline_reason: z.enum([ + 'card_declined', + 'insufficient_funds', + 'expired_card', + 'incorrect_cvc', + 'authentication_required', + 'authentication_failed', + 'processing_error', + 'generic' + ]).optional(), + error_message: z.string().optional(), + id: z.string(), + payment_intent_client_secret: z.string().optional(), + recovery_action: z.enum([ + 'retry', + 'replace_payment_method', + 'authenticate_payment', + 'contact_support' + ]).optional(), + retryable: z.boolean().optional(), + started_at: z.string().datetime(), + status: z.enum([ + 'pending', + 'succeeded', + 'failed', + 'reconciliation_needed' ]) - .optional(), - completed_at: z.string().datetime().optional(), - decline_reason: z - .enum([ - 'card_declined', - 'insufficient_funds', - 'expired_card', - 'incorrect_cvc', - 'authentication_required', - 'authentication_failed', - 'processing_error', - 'generic' - ]) - .optional(), - error_message: z.string().optional(), - id: z.string(), - payment_intent_client_secret: z.string().optional(), - recovery_action: z - .enum([ - 'retry', - 'replace_payment_method', - 'authenticate_payment', - 'contact_support' - ]) - .optional(), - retryable: z.boolean().optional(), - started_at: z.string().datetime(), - status: z.enum(['pending', 'succeeded', 'failed', 'reconciliation_needed']) -}) +}); /** * 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() +}); /** * A billing address for a company Stripe customer. city and postal_code @@ -2237,13 +1986,13 @@ export const zBillingEventsResponse = z.object({ * */ export const zBillingAddress = z.object({ - city: z.string().optional(), - country: z.string(), - line1: z.string(), - line2: z.string().optional(), - postal_code: z.string().optional(), - state: z.string().optional() -}) + city: z.string().optional(), + country: z.string(), + line1: z.string(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional() +}); /** * Fields to set on the workspace's Stripe customer. Every group is @@ -2251,10 +2000,10 @@ export const zBillingAddress = z.object({ * */ export const zBillingCompanyDetailsUpdateRequest = z.object({ - address: zBillingAddress.optional(), - company_name: z.string().optional(), - tax_id: zBillingTaxId.optional() -}) + address: zBillingAddress.optional(), + company_name: z.string().optional(), + tax_id: zBillingTaxId.optional() +}); /** * Company billing details on file for the workspace's Stripe customer. @@ -2263,1906 +2012,1933 @@ export const zBillingCompanyDetailsUpdateRequest = z.object({ * */ export const zBillingCompanyDetailsResponse = z.object({ - address: zBillingAddress.optional(), - company_name: z.string().optional(), - tax_id: zBillingTaxId.optional() -}) + address: zBillingAddress.optional(), + company_name: z.string().optional(), + tax_id: zBillingTaxId.optional() +}); + +export const zBillingCapabilityScope = z.object({ + user_id: z.string(), + workspace_id: z.string() +}); + +/** + * Identifies capability values currently using safe rollout defaults + * instead of deterministic policy results. A true value is UI guidance, + * not evidence that the corresponding write will succeed. + * + */ +export const zBillingCapabilityRolloutDefaults = z.object({ + can_downgrade_to_personal: z.boolean(), + can_subscribe_self_serve: z.boolean(), + can_top_up: z.boolean() +}); + +/** + * Conservative UI guidance. These values do not authorize billing writes; + * each write endpoint independently enforces its permission policy. + * + */ +export const zBillingCapabilities = z.object({ + can_cancel: z.boolean(), + can_change_seats: z.boolean(), + can_downgrade_to_personal: z.boolean(), + can_invite_members: z.boolean(), + can_reactivate: z.boolean(), + can_subscribe_self_serve: z.boolean(), + can_top_up: z.boolean() +}); + +/** + * Effective billing UI guidance for one authenticated user and workspace. + */ +export const zBillingCapabilitiesResponse = z.object({ + capabilities: zBillingCapabilities, + expires_at: z.string().datetime(), + resolved_for: zBillingCapabilityScope, + revision: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).lte(BigInt(9007199254740991)), + rollout_defaults_applied: zBillingCapabilityRolloutDefaults +}); /** * 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(), - loader_path: z.string().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(), + loader_path: z.string().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() - }) -) +})); /** * Acknowledgement that a turn was accepted. The agent runs asynchronously; output streams over the WebSocket (agent_message_delta, agent_tool_call, draft_patch, agent_message_done). */ export const zAgentTurnAccepted = z.object({ - message_id: z.string(), - thread_id: z.string() -}) + message_id: z.string(), + thread_id: z.string() +}); /** * One agent thread row for the history sidebar. */ export const zAgentThreadSummary = z.object({ - created_at: z.string(), - id: z.string(), - last_message_at: z.string(), - message_count: z.number().int().gte(0), - preview: z.string(), - status: z.enum(['active', 'archived']), - title: z.string(), - updated_at: z.string(), - workflow_id: z.string() -}) + created_at: z.string(), + id: z.string(), + last_message_at: z.string(), + message_count: z.number().int().gte(0), + preview: z.string(), + status: z.enum(['active', 'archived']), + title: z.string(), + updated_at: z.string(), + workflow_id: z.string() +}); /** * A paginated page of the caller's agent threads. */ export const zAgentThreadListResponse = z.object({ - pagination: zPaginationInfo, - threads: z.array(zAgentThreadSummary) -}) + pagination: zPaginationInfo, + threads: z.array(zAgentThreadSummary) +}); /** * Result of creating an agent thread. */ export const zAgentThreadCreated = z.object({ - thread_id: z.string() -}) + thread_id: z.string() +}); /** * Optional body for creating an agent thread. */ export const zAgentThreadCreateRequest = z.object({ - workflow_id: z.string().optional() -}) + workflow_id: z.string().optional() +}); /** * A user-authored skill pack to create or replace. Plain JSON — a pack body is small enough that a signed-URL upload would be pure overhead. */ export const zAgentSkillPublishRequest = z.object({ - always: z.boolean().optional().default(false), - body: z.string(), - description: z.string().max(1024), - name: z - .string() - .max(64) - .regex(/^[A-Za-z0-9._-]*[A-Za-z0-9_-][A-Za-z0-9._-]*$/) -}) + always: z.boolean().optional().default(false), + body: z.string(), + description: z.string().max(1024), + name: z.string().max(64).regex(/^[A-Za-z0-9._-]*[A-Za-z0-9_-][A-Za-z0-9._-]*$/) +}); /** * One of the caller's user-authored skill packs. */ export const zAgentSkill = z.object({ - body: z.string(), - body_hash: z.string(), - created_at: z.string(), - description: z.string(), - id: z.string(), - name: z.string(), - updated_at: z.string() -}) + body: z.string(), + body_hash: z.string(), + created_at: z.string(), + description: z.string(), + id: z.string(), + name: z.string(), + updated_at: z.string() +}); /** * The caller's skill packs, ordered by name. */ export const zAgentSkillListResponse = z.object({ - skills: z.array(zAgentSkill) -}) + skills: z.array(zAgentSkill) +}); /** * A user turn posted to the agent. */ export const zAgentPostMessageRequest = z.object({ - attachments: z.array(z.string()).optional(), - content: z.string(), - current_tab: z.string().optional(), - draft: z - .object({ - content: z.record(z.unknown()).optional(), - version: z.number().int().nullish() - }) - .optional(), - open_tabs: z - .array( - z.object({ + attachments: z.array(z.string()).optional(), + content: z.string(), + current_tab: z.string().optional(), + draft: z.object({ + content: z.record(z.unknown()).optional(), + version: z.number().int().nullish() + }).optional(), + open_tabs: z.array(z.object({ name: z.string().optional(), workflow_id: z.string() - }) - ) - .optional(), - selection: z.record(z.unknown()).optional(), - workflow_id: z.string().optional() -}) + })).optional(), + selection: z.record(z.unknown()).optional(), + workflow_id: z.string().optional() +}); /** * A persisted message in an agent thread. */ export const zAgentMessage = z.object({ - content: z.record(z.unknown()).optional(), - id: z.string(), - role: z.enum(['user', 'assistant', 'tool', 'system']), - seq: z.number().int(), - status: z.enum(['streaming', 'complete', 'error', 'interrupted']), - thread_id: z.string(), - turn_id: z.string(), - workflow_id: z.string().optional() -}) + content: z.record(z.unknown()).optional(), + id: z.string(), + role: z.enum([ + 'user', + 'assistant', + 'tool', + 'system' + ]), + seq: z.number().int(), + status: z.enum([ + 'streaming', + 'complete', + 'error', + 'interrupted' + ]), + thread_id: z.string(), + turn_id: z.string(), + workflow_id: z.string().optional() +}); /** * Error body authored by the comfy-agent service and proxied verbatim through ingest. Errors raised by ingest itself (authentication, an unreachable agent service) use the standard ErrorResponse shape instead. */ export const zAgentError = z.object({ - error: z.string() -}) + error: z.string() +}); /** * Authoritative snapshot of a workflow's agent draft — the replay-on-reconnect baseline for the draft_patch stream. */ export const zAgentDraftSnapshot = z.object({ - content: z.record(z.unknown()), - version: z.number().int() -}) + content: z.record(z.unknown()), + version: z.number().int() +}); /** * Acknowledgement that a turn cancellation was requested. Cancellation is asynchronous; the terminal message state (status=error with stop copy) arrives over the WebSocket. */ export const zAgentCancelAccepted = z.object({ - status: z.enum(['cancelling']) -}) + status: z.enum(['cancelling']) +}); /** * The user's answer to a pending ask_user prompt. `selected` holds the chosen option ids; a permission gate answers with one id (e.g. the Approve/Deny option). `other_text` carries a free-text answer when the ask set allow_other. */ export const zAgentAnswerRequest = z.object({ - other_text: z.string().optional(), - selected: z.array(z.string()) -}) + other_text: z.string().optional(), + selected: z.array(z.string()) +}); /** * Acknowledgement that an ask answer was accepted. The parked turn resumes and its continuation streams over the WebSocket. */ export const zAgentAnswerAccepted = z.object({ - status: z.enum(['answered']) -}) + status: z.enum(['answered']) +}); /** * 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(), - loader_path: z.string().nullish(), - 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(), + loader_path: z.string().nullish(), + 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() - }) -) +})); /** * JWKS response */ -export const zGetJwksResponse = zJwksResponse +export const zGetJwksResponse = zJwksResponse; /** * Authorization-server metadata */ -export const zGetOAuthAuthorizationServerResponse = - zOAuthAuthorizationServerMetadata +export const zGetOAuthAuthorizationServerResponse = zOAuthAuthorizationServerMetadata; /** * Protected-resource metadata */ -export const zGetOAuthProtectedResourceResponse = - zOAuthProtectedResourceMetadata +export const zGetOAuthProtectedResourceResponse = zOAuthProtectedResourceMetadata; export const zGetOAuthProtectedResourceByPathPath = z.object({ - resourcePath: z.string().regex(/^[a-zA-Z0-9._-]+$/) -}) + resourcePath: z.string().regex(/^[a-zA-Z0-9._-]+$/) +}); /** * Protected-resource metadata */ -export const zGetOAuthProtectedResourceByPathResponse = - zOAuthProtectedResourceMetadata +export const zGetOAuthProtectedResourceByPathResponse = zOAuthProtectedResourceMetadata; export const zGetCustomNodeProxyPath = z.object({ - path: z.string() -}) + path: z.string() +}); export const zPostCustomNodeProxyPath = z.object({ - path: z.string() -}) + path: z.string() +}); export const zAgentGetDraftQuery = z.object({ - workflow_id: z.string() -}) + workflow_id: z.string() +}); /** * Current draft snapshot */ -export const zAgentGetDraftResponse = zAgentDraftSnapshot +export const zAgentGetDraftResponse = zAgentDraftSnapshot; /** * The caller's skill packs. */ -export const zAgentListSkillsResponse = zAgentSkillListResponse +export const zAgentListSkillsResponse = zAgentSkillListResponse; -export const zAgentPublishSkillBody = zAgentSkillPublishRequest +export const zAgentPublishSkillBody = zAgentSkillPublishRequest; /** * An existing pack of the same name was replaced. */ -export const zAgentPublishSkillResponse = zAgentSkill +export const zAgentPublishSkillResponse = zAgentSkill; export const zAgentDeleteSkillPath = z.object({ - name: z - .string() - .max(64) - .regex(/^[A-Za-z0-9._-]*[A-Za-z0-9_-][A-Za-z0-9._-]*$/) -}) + name: z.string().max(64).regex(/^[A-Za-z0-9._-]*[A-Za-z0-9_-][A-Za-z0-9._-]*$/) +}); /** * The pack was deleted. */ -export const zAgentDeleteSkillResponse = z.void() +export const zAgentDeleteSkillResponse = z.void(); export const zAgentListThreadsQuery = z.object({ - limit: z.number().int().gte(1).lte(100).optional().default(20), - after: z.string().optional() -}) + limit: z.number().int().gte(1).lte(100).optional().default(20), + after: z.string().optional() +}); /** * A page of the caller's agent threads. */ -export const zAgentListThreadsResponse = zAgentThreadListResponse +export const zAgentListThreadsResponse = zAgentThreadListResponse; -export const zAgentCreateThreadBody = zAgentThreadCreateRequest +export const zAgentCreateThreadBody = zAgentThreadCreateRequest; /** * Thread created */ -export const zAgentCreateThreadResponse = zAgentThreadCreated +export const zAgentCreateThreadResponse = zAgentThreadCreated; -export const zAgentAnswerAskBody = zAgentAnswerRequest +export const zAgentAnswerAskBody = zAgentAnswerRequest; export const zAgentAnswerAskPath = z.object({ - id: z.string(), - ask_id: z.string() -}) + id: z.string(), + ask_id: z.string() +}); /** * Answer accepted; the turn resumes and streams over the WebSocket */ -export const zAgentAnswerAskResponse = zAgentAnswerAccepted +export const zAgentAnswerAskResponse = zAgentAnswerAccepted; export const zAgentGetMessagesPath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Messages in the thread, ordered by seq */ -export const zAgentGetMessagesResponse = z.array(zAgentMessage) +export const zAgentGetMessagesResponse = z.array(zAgentMessage); -export const zAgentPostMessageBody = zAgentPostMessageRequest +export const zAgentPostMessageBody = zAgentPostMessageRequest; export const zAgentPostMessagePath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Turn accepted; the agent runs asynchronously and streams output over the WebSocket */ -export const zAgentPostMessageResponse = zAgentTurnAccepted +export const zAgentPostMessageResponse = zAgentTurnAccepted; export const zAgentCancelMessagePath = z.object({ - id: z.string(), - message_id: z.string() -}) + id: z.string(), + message_id: z.string() +}); /** * Cancellation requested; the terminal state arrives over the WebSocket */ -export const zAgentCancelMessageResponse = zAgentCancelAccepted +export const zAgentCancelMessageResponse = zAgentCancelAccepted; export const zListAssetsQuery = z.object({ - include_tags: z.array(z.string()).optional(), - exclude_tags: z.array(z.string()).optional(), - tags_all: z.array(z.string()).optional(), - tags_any: z.array(z.string()).optional(), - tags_none: 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() - .default('created_at'), - order: z.enum(['asc', 'desc']).optional().default('desc'), - include_public: z.boolean().optional().default(true), - hash: z.string().optional(), - after: z.string().optional() -}) + include_tags: z.array(z.string()).optional(), + exclude_tags: z.array(z.string()).optional(), + tags_all: z.array(z.string()).optional(), + tags_any: z.array(z.string()).optional(), + tags_none: 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().default('created_at'), + order: z.enum(['asc', 'desc']).optional().default('desc'), + include_public: z.boolean().optional().default(true), + hash: z.string().optional(), + after: z.string().optional() +}); /** * Success - Assets returned */ -export const zListAssetsResponse2 = zListAssetsResponse +export const zListAssetsResponse2 = zListAssetsResponse; export const zCreateAssetBody = 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() -}) + 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() +}); /** * 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 zDeleteAssetPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * Asset record deleted successfully */ -export const zDeleteAssetResponse = z.void() +export const zDeleteAssetResponse = z.void(); export const zGetAssetByIdPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * Asset details retrieved successfully */ -export const zGetAssetByIdResponse = zAsset +export const zGetAssetByIdResponse = zAsset; export const zUpdateAssetBody = z.object({ - mime_type: z.string().optional(), - name: z.string().optional(), - preview_id: z.string().uuid().optional(), - user_metadata: z.record(z.unknown()).optional() -}) + mime_type: z.string().optional(), + name: z.string().optional(), + preview_id: z.string().uuid().optional(), + user_metadata: z.record(z.unknown()).optional() +}); export const zUpdateAssetPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * Asset updated successfully */ -export const zUpdateAssetResponse = zAssetUpdated +export const zUpdateAssetResponse = zAssetUpdated; export const zGetAssetContentPath = z.object({ - id: z.string() -}) + id: z.string() +}); export const zGetAssetContentQuery = z.object({ - disposition: z.enum(['inline', 'attachment']).optional().default('attachment') -}) + disposition: z.enum(['inline', 'attachment']).optional().default('attachment') +}); /** * Asset content stream (local runtime streams the bytes directly) */ -export const zGetAssetContentResponse = z.string() +export const zGetAssetContentResponse = z.string(); export const zRemoveAssetTagsBody = z.object({ - tags: z.array(z.string()).min(1) -}) + tags: z.array(z.string()).min(1) +}); export const zRemoveAssetTagsPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * Tags removed successfully */ -export const zRemoveAssetTagsResponse = zTagsModificationResponse +export const zRemoveAssetTagsResponse = zTagsModificationResponse; export const zAddAssetTagsBody = z.object({ - tags: z.array(z.string()).min(1) -}) + tags: z.array(z.string()).min(1) +}); export const zAddAssetTagsPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * Tags added successfully */ -export const zAddAssetTagsResponse = zTagsModificationResponse +export const zAddAssetTagsResponse = zTagsModificationResponse; export const zCreateAssetDownloadBody = 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() -}) + preview_id: z.string().uuid().optional(), + source_url: z.string().url(), + tags: z.array(z.string()).optional(), + user_metadata: z.record(z.unknown()).optional() +}); export const zCreateAssetDownloadResponse = z.union([ - zAssetCreated, - zAssetDownloadResponse -]) + zAssetCreated, + zAssetDownloadResponse +]); export const zCreateAssetExportBody = 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() - .default('group_by_job_time') -}) + 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().default('group_by_job_time') +}); /** * Accepted - Export task created and processing in background */ -export const zCreateAssetExportResponse = zAssetDownloadResponse +export const zCreateAssetExportResponse = zAssetDownloadResponse; export const zDownloadExportPath = z.object({ - exportName: z.string().regex(/^[a-zA-Z0-9_-]+\.zip$/) -}) + exportName: z.string().regex(/^[a-zA-Z0-9_-]+\.zip$/) +}); /** * Signed URL for downloading the export */ -export const zDownloadExportResponse = zExportDownloadUrlResponse +export const zDownloadExportResponse = zExportDownloadUrlResponse; export const zCreateAssetFromHashBody = 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() -}) + 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() +}); /** * 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 zPostAssetsFromWorkflowBody = zWorkflowApiAssetsRequest +export const zPostAssetsFromWorkflowBody = zWorkflowApiAssetsRequest; /** * Success */ -export const zPostAssetsFromWorkflowResponse = zWorkflowApiAssetsResponse +export const zPostAssetsFromWorkflowResponse = zWorkflowApiAssetsResponse; export const zCheckAssetByHashPath = z.object({ - hash: z.string().regex(/^blake3:[a-f0-9]{64}$/) -}) + hash: z.string().regex(/^blake3:[a-f0-9]{64}$/) +}); -export const zImportPublishedAssetsBody = zImportPublishedAssetsRequest +export const zImportPublishedAssetsBody = zImportPublishedAssetsRequest; /** * Successfully imported assets */ -export const zImportPublishedAssetsResponse2 = zImportPublishedAssetsResponse +export const zImportPublishedAssetsResponse2 = zImportPublishedAssetsResponse; /** * 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 zGetRemoteAssetMetadataQuery = z.object({ - url: z.string().url() -}) + url: z.string().url() +}); /** * Metadata retrieved successfully */ -export const zGetRemoteAssetMetadataResponse = zAssetMetadataResponse +export const zGetRemoteAssetMetadataResponse = zAssetMetadataResponse; export const zSeedAssetsBody = z.object({ - roots: z.array(z.string()).optional() -}) + roots: z.array(z.string()).optional() +}); /** * Seed started */ export const zSeedAssetsResponse = z.object({ - status: z.string().optional() -}) + status: z.string().optional() +}); /** * Scan cancelled */ export const zCancelAssetSeedResponse = z.object({ - status: z.string().optional() -}) + status: z.string().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 zGetAssetTagHistogramQuery = z.object({ - include_tags: z.array(z.string()).optional(), - exclude_tags: z.array(z.string()).optional(), - tags_all: z.array(z.string()).optional(), - tags_any: z.array(z.string()).optional(), - tags_none: 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) -}) + include_tags: z.array(z.string()).optional(), + exclude_tags: z.array(z.string()).optional(), + tags_all: z.array(z.string()).optional(), + tags_any: z.array(z.string()).optional(), + tags_none: 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) +}); /** * Success - Tag histogram returned */ -export const zGetAssetTagHistogramResponse = zAssetTagHistogramResponse +export const zGetAssetTagHistogramResponse = zAssetTagHistogramResponse; -export const zCreateDesktopLoginCodeBody = zDesktopLoginCodeCreateRequest +export const zCreateDesktopLoginCodeBody = zDesktopLoginCodeCreateRequest; /** * Login code created */ -export const zCreateDesktopLoginCodeResponse = zDesktopLoginCodeCreateResponse +export const zCreateDesktopLoginCodeResponse = zDesktopLoginCodeCreateResponse; -export const zExchangeDesktopLoginCodeBody = zDesktopLoginCodeExchangeRequest +export const zExchangeDesktopLoginCodeBody = zDesktopLoginCodeExchangeRequest; /** * Pending (not yet redeemed) or complete with a custom token */ -export const zExchangeDesktopLoginCodeResponse = - zDesktopLoginCodeExchangeResponse +export const zExchangeDesktopLoginCodeResponse = zDesktopLoginCodeExchangeResponse; -export const zRedeemDesktopLoginCodeBody = zDesktopLoginCodeRedeemRequest +export const zRedeemDesktopLoginCodeBody = zDesktopLoginCodeRedeemRequest; /** * Code redeemed (or already redeemed by the same user) */ -export const zRedeemDesktopLoginCodeResponse = zDesktopLoginCodeRedeemResponse +export const zRedeemDesktopLoginCodeResponse = zDesktopLoginCodeRedeemResponse; /** * Session deleted successfully */ -export const zDeleteSessionResponse2 = zDeleteSessionResponse +export const zDeleteSessionResponse2 = zDeleteSessionResponse; /** * Session created successfully */ -export const zCreateSessionResponse2 = zCreateSessionResponse +export const zCreateSessionResponse2 = zCreateSessionResponse; -export const zExchangeTokenBody = zExchangeTokenRequest +export const zExchangeTokenBody = zExchangeTokenRequest; /** * Token exchanged successfully */ -export const zExchangeTokenResponse2 = zExchangeTokenResponse +export const zExchangeTokenResponse2 = zExchangeTokenResponse; /** * Credit balance */ -export const zGetBillingBalanceResponse = zBillingBalanceResponse +export const zGetBillingBalanceResponse = zBillingBalanceResponse; + +/** + * Effective billing capabilities + */ +export const zGetBillingCapabilitiesResponse = zBillingCapabilitiesResponse; /** * Success */ -export const zGetChurnkeyAuthResponse = zChurnkeyAuthResponse +export const zGetChurnkeyAuthResponse = zChurnkeyAuthResponse; /** * Success */ -export const zGetBillingCompanyDetailsResponse = zBillingCompanyDetailsResponse +export const zGetBillingCompanyDetailsResponse = zBillingCompanyDetailsResponse; -export const zUpdateBillingCompanyDetailsBody = - zBillingCompanyDetailsUpdateRequest +export const zUpdateBillingCompanyDetailsBody = zBillingCompanyDetailsUpdateRequest; /** * Success */ -export const zUpdateBillingCompanyDetailsResponse = - zBillingCompanyDetailsResponse +export const zUpdateBillingCompanyDetailsResponse = zBillingCompanyDetailsResponse; export const zGetBillingEventsQuery = z.object({ - page: z.number().int().gte(1).optional().default(1), - limit: z.number().int().gte(1).lte(100).optional().default(20), - scope: z.enum(['self', 'workspace', 'user']).optional().default('self'), - user_id: z.string().optional(), - filter: z.string().optional(), - start_date: z.string().datetime().optional(), - end_date: z.string().datetime().optional() -}) + page: z.number().int().gte(1).optional().default(1), + limit: z.number().int().gte(1).lte(100).optional().default(20), + scope: z.enum([ + 'self', + 'workspace', + 'user' + ]).optional().default('self'), + user_id: z.string().optional(), + filter: z.string().optional(), + start_date: z.string().datetime().optional(), + end_date: z.string().datetime().optional() +}); /** * Paginated billing events */ -export const zGetBillingEventsResponse = zBillingEventsResponse +export const zGetBillingEventsResponse = zBillingEventsResponse; export const zGetBillingOpStatusPath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Billing operation status */ -export const zGetBillingOpStatusResponse = zBillingOpStatusResponse +export const zGetBillingOpStatusResponse = zBillingOpStatusResponse; /** * Saved payment methods */ -export const zListSavedPaymentMethodsResponse = z.array(zSavedPaymentMethod) +export const zListSavedPaymentMethodsResponse = z.array(zSavedPaymentMethod); -export const zGetPaymentPortalBody = zPaymentPortalRequest +export const zGetPaymentPortalBody = zPaymentPortalRequest; /** * Success */ -export const zGetPaymentPortalResponse = zPaymentPortalResponse +export const zGetPaymentPortalResponse = zPaymentPortalResponse; /** * Available plans with pricing */ -export const zGetBillingPlansResponse = zBillingPlansResponse +export const zGetBillingPlansResponse = zBillingPlansResponse; -export const zPreviewSubscribeBody = zPreviewSubscribeRequest +export const zPreviewSubscribeBody = zPreviewSubscribeRequest; /** * Subscription preview */ -export const zPreviewSubscribeResponse2 = zPreviewSubscribeResponse +export const zPreviewSubscribeResponse2 = zPreviewSubscribeResponse; /** * Billing status */ -export const zGetBillingStatusResponse = zBillingStatusResponse +export const zGetBillingStatusResponse = zBillingStatusResponse; -export const zSubscribeBody = zSubscribeRequest +export const zSubscribeBody = zSubscribeRequest; /** * Subscription created or payment method needed */ -export const zSubscribeResponse2 = zSubscribeResponse +export const zSubscribeResponse2 = zSubscribeResponse; -export const zCancelSubscriptionBody = zCancelSubscriptionRequest +export const zCancelSubscriptionBody = zCancelSubscriptionRequest; /** * Subscription cancellation scheduled */ -export const zCancelSubscriptionResponse2 = zCancelSubscriptionResponse +export const zCancelSubscriptionResponse2 = zCancelSubscriptionResponse; -export const zResubscribeBody = zResubscribeRequest +export const zResubscribeBody = zResubscribeRequest; /** * Subscription resumed successfully */ -export const zResubscribeResponse2 = zResubscribeResponse +export const zResubscribeResponse2 = zResubscribeResponse; -export const zCreateTopupBody = zCreateTopupRequest +export const zCreateTopupBody = zCreateTopupRequest; /** * Top-up initiated successfully */ -export const zCreateTopupResponse2 = zCreateTopupResponse +export const zCreateTopupResponse2 = zCreateTopupResponse; export const zGetBillingUsageTimeSeriesQuery = z.object({ - group_by: z - .enum(['model', 'endpoint', 'product']) - .optional() - .default('model'), - granularity: z.enum(['hour', 'day', 'month']).optional().default('month'), - starting_on: z.string().datetime().optional(), - ending_before: z.string().datetime().optional(), - months: z.number().int().gte(1).lte(24).optional().default(6) -}) + group_by: z.enum([ + 'model', + 'endpoint', + 'product' + ]).optional().default('model'), + granularity: z.enum([ + 'hour', + 'day', + 'month' + ]).optional().default('month'), + starting_on: z.string().datetime().optional(), + ending_before: z.string().datetime().optional(), + months: z.number().int().gte(1).lte(24).optional().default(6) +}); /** * Workspace usage */ -export const zGetBillingUsageTimeSeriesResponse = zUsageTimeSeries +export const zGetBillingUsageTimeSeriesResponse = zUsageTimeSeries; /** * Embedding names */ -export const zGetEmbeddingsResponse = z.array(z.string()) +export const zGetEmbeddingsResponse = z.array(z.string()); /** * Success - List of model folders */ -export const zGetModelFoldersResponse = z.array(zModelFolder) +export const zGetModelFoldersResponse = z.array(zModelFolder); export const zGetModelsInFolderPath = z.object({ - folder: z.string() -}) + folder: z.string() +}); /** * Success - List of models in the folder */ -export const zGetModelsInFolderResponse = z.array(zModelFile) +export const zGetModelsInFolderResponse = z.array(zModelFile); export const zGetModelPreviewPath = z.object({ - folder: z.string(), - path_index: z.number().int(), - filename: z.string() -}) + folder: z.string(), + path_index: z.number().int(), + filename: z.string() +}); export const zGetNodeByIdPath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * 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()); /** * Success */ export const zGetFeaturesResponse = z.object({ - free_tier_balance: z - .object({ - allowance: z.number().int(), - remaining: z.number().int(), - used: z.number().int() - }) - .optional(), - max_upload_size: z.number().int().optional(), - supports_preview_metadata: z.boolean().optional() -}) + free_tier_balance: z.object({ + allowance: z.number().int(), + remaining: z.number().int(), + used: z.number().int() + }).optional(), + max_upload_size: z.number().int().optional(), + supports_preview_metadata: z.boolean().optional() +}); -export const zSubmitFeedbackBody = zFeedbackRequest +export const zSubmitFeedbackBody = zFeedbackRequest; /** * Feedback submitted successfully */ -export const zSubmitFeedbackResponse = zFeedbackResponse +export const zSubmitFeedbackResponse = zFeedbackResponse; export const zGetMaskLayersQuery = z.object({ - filename: z.string() -}) + 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 zFreeMemoryBody = z.object({ - free_memory: z.boolean().optional(), - unload_models: z.boolean().optional() -}) + free_memory: z.boolean().optional(), + unload_models: z.boolean().optional() +}); /** * Success - Map of subgraph IDs to their metadata */ -export const zGetGlobalSubgraphsResponse = z.record(zGlobalSubgraphInfo) +export const zGetGlobalSubgraphsResponse = z.record(zGlobalSubgraphInfo); export const zGetGlobalSubgraphPath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Success - Full subgraph data */ -export const zGetGlobalSubgraphResponse = zGlobalSubgraphData +export const zGetGlobalSubgraphResponse = zGlobalSubgraphData; -export const zManageHistoryBody = zHistoryManageRequest +export const zManageHistoryBody = zHistoryManageRequest; export const zGetLegacyHistoryByIdPath = z.object({ - prompt_id: z.string() -}) + prompt_id: z.string() +}); export const zGetHistoryQuery = z.object({ - max_items: z.number().int().optional(), - offset: z.number().int().optional().default(0) -}) + max_items: z.number().int().optional(), + offset: z.number().int().optional().default(0) +}); /** * Success - Execution history retrieved */ -export const zGetHistoryResponse = zHistoryResponse +export const zGetHistoryResponse = zHistoryResponse; export const zGetHistoryForPromptPath = z.object({ - prompt_id: z.string() -}) + prompt_id: z.string() +}); /** * Success - History for prompt retrieved */ -export const zGetHistoryForPromptResponse = zHistoryDetailResponse +export const zGetHistoryForPromptResponse = zHistoryDetailResponse; -export const zCreateHubAssetUploadUrlBody = zHubAssetUploadUrlRequest +export const zCreateHubAssetUploadUrlBody = zHubAssetUploadUrlRequest; /** * Presigned upload URL and token */ -export const zCreateHubAssetUploadUrlResponse = zHubAssetUploadUrlResponse +export const zCreateHubAssetUploadUrlResponse = zHubAssetUploadUrlResponse; export const zListHubLabelsQuery = z.object({ - type: z.enum(['tag', 'model', 'custom_node']).optional() -}) + type: z.enum([ + 'tag', + 'model', + 'custom_node' + ]).optional() +}); /** * List of labels */ -export const zListHubLabelsResponse = zHubLabelListResponse +export const zListHubLabelsResponse = zHubLabelListResponse; -export const zCreateHubProfileBody = zCreateHubProfileRequest +export const zCreateHubProfileBody = zCreateHubProfileRequest; /** * Hub profile created */ -export const zCreateHubProfileResponse = zHubProfile +export const zCreateHubProfileResponse = zHubProfile; export const zGetHubProfileByUsernamePath = z.object({ - username: z.string() -}) + username: z.string() +}); /** * Hub profile */ -export const zGetHubProfileByUsernameResponse = zHubProfile +export const zGetHubProfileByUsernameResponse = zHubProfile; -export const zUpdateHubProfileBody = zUpdateHubProfileRequest +export const zUpdateHubProfileBody = zUpdateHubProfileRequest; export const zUpdateHubProfilePath = z.object({ - username: z.string() -}) + username: z.string() +}); /** * Hub profile updated */ -export const zUpdateHubProfileResponse = zHubProfile +export const zUpdateHubProfileResponse = zHubProfile; export const zCheckHubUsernameQuery = z.object({ - username: z.string() -}) + username: z.string() +}); /** * Username availability result */ -export const zCheckHubUsernameResponse = zHubUsernameCheckResponse +export const zCheckHubUsernameResponse = zHubUsernameCheckResponse; /** * Hub profile */ -export const zGetMyHubProfileResponse = zHubProfile +export const zGetMyHubProfileResponse = zHubProfile; export const zListHubWorkflowsQuery = 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() -}) + 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() +}); /** * Paginated list of hub workflows */ -export const zListHubWorkflowsResponse = zHubWorkflowListResponse +export const zListHubWorkflowsResponse = zHubWorkflowListResponse; -export const zPublishHubWorkflowBody = zPublishHubWorkflowRequest +export const zPublishHubWorkflowBody = zPublishHubWorkflowRequest; /** * Workflow published to hub */ -export const zPublishHubWorkflowResponse = zHubWorkflowDetail +export const zPublishHubWorkflowResponse = zHubWorkflowDetail; export const zDeleteHubWorkflowPath = z.object({ - share_id: z.string() -}) + share_id: z.string() +}); /** * Successfully unpublished */ -export const zDeleteHubWorkflowResponse = z.void() +export const zDeleteHubWorkflowResponse = z.void(); export const zGetHubWorkflowPath = z.object({ - share_id: z.string() -}) + share_id: z.string() +}); /** * Hub workflow detail */ -export const zGetHubWorkflowResponse = zHubWorkflowDetail +export const zGetHubWorkflowResponse = zHubWorkflowDetail; export const zListHubWorkflowIndexQuery = z.object({ - status: z.array(zHubWorkflowStatus).optional() -}) + status: z.array(zHubWorkflowStatus).optional() +}); /** * List of hub workflow template entries */ -export const zListHubWorkflowIndexResponse = z.array(zHubWorkflowTemplateEntry) +export const zListHubWorkflowIndexResponse = z.array(zHubWorkflowTemplateEntry); /** * 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 zCreateInputUploadUrlBody = zInputUploadUrlRequest +export const zCreateInputUploadUrlBody = zInputUploadUrlRequest; /** * Upload grant minted */ -export const zCreateInputUploadUrlResponse = zUploadGrantResponse +export const zCreateInputUploadUrlResponse = zUploadGrantResponse; export const zAcceptWorkspaceInvitePath = z.object({ - token: z.string() -}) + token: z.string() +}); /** * Invite accepted, user is now a member */ -export const zAcceptWorkspaceInviteResponse = zAcceptInviteResponse +export const zAcceptWorkspaceInviteResponse = zAcceptInviteResponse; export const zGetLegacyJobByIdPath = z.object({ - job_id: z.string() -}) + job_id: z.string() +}); export const zGetLegacyJobOutputsPath = z.object({ - job_id: z.string() -}) + job_id: z.string() +}); export const zGetJobStatusPath = z.object({ - job_id: z.string().uuid() -}) + job_id: z.string().uuid() +}); /** * Success - Job status returned */ -export const zGetJobStatusResponse = zJobStatusResponse +export const zGetJobStatusResponse = zJobStatusResponse; export const zListJobsQuery = 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() - .default('create_time'), - sort_order: z.enum(['asc', 'desc']).optional().default('desc'), - after: z.string().optional(), - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(1000).optional().default(100) -}) + 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().default('create_time'), + sort_order: z.enum(['asc', 'desc']).optional().default('desc'), + after: z.string().optional(), + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(1000).optional().default(100) +}); /** * Success - Jobs retrieved */ -export const zListJobsResponse = zJobsListResponse +export const zListJobsResponse = zJobsListResponse; export const zGetJobDetailPath = z.object({ - job_id: z.string().uuid() -}) + job_id: z.string().uuid() +}); export const zGetJobDetailQuery = z.object({ - short_link: z.enum(['ephemeral_tool_chain', 'default']).optional() -}) + short_link: z.enum(['ephemeral_tool_chain', 'default']).optional() +}); /** * Success - Job details retrieved */ -export const zGetJobDetailResponse = zJobDetailResponse +export const zGetJobDetailResponse = zJobDetailResponse; export const zGetJobAssetsPath = z.object({ - job_id: z.string().uuid() -}) + job_id: z.string().uuid() +}); export const zGetJobAssetsQuery = z.object({ - limit: z.number().int().gte(1).lte(500).optional().default(20), - offset: z.number().int().gte(0).optional().default(0) -}) + limit: z.number().int().gte(1).lte(500).optional().default(20), + offset: z.number().int().gte(0).optional().default(0) +}); /** * Success - Job assets returned */ -export const zGetJobAssetsResponse = zJobAssetsResponse +export const zGetJobAssetsResponse = zJobAssetsResponse; export const zCancelJobPath = z.object({ - job_id: z.string().uuid() -}) + job_id: z.string().uuid() +}); /** * Success - Cancel request accepted (or job was already terminal) */ -export const zCancelJobResponse = zJobCancelResponse +export const zCancelJobResponse = zJobCancelResponse; -export const zCancelJobsBody = zJobsCancelRequest +export const zCancelJobsBody = zJobsCancelRequest; /** * Success - cancel requests dispatched (or jobs were already terminal) */ -export const zCancelJobsResponse = zJobsCancelResponse +export const zCancelJobsResponse = zJobsCancelResponse; export const zGetLegacyModelsByFolderPath = z.object({ - folder: z.string() -}) + folder: z.string() +}); /** * Success - Node replacement mappings */ -export const zGetNodeReplacementsResponse = z.record(z.unknown()) +export const zGetNodeReplacementsResponse = z.record(z.unknown()); /** * Success */ -export const zGetNodeInfoResponse = z.record(zNodeInfo) +export const zGetNodeInfoResponse = z.record(zNodeInfo); export const zGetLegacyObjectInfoByNodeClassPath = z.object({ - node_class: z.string() -}) + node_class: z.string() +}); /** * Success */ -export const zGetPromptInfoResponse = zPromptInfo +export const zGetPromptInfoResponse = zPromptInfo; -export const zExecutePromptBody = zPromptRequest +export const zExecutePromptBody = zPromptRequest; /** * Success - Prompt accepted */ -export const zExecutePromptResponse = zPromptResponse +export const zExecutePromptResponse = zPromptResponse; export const zGetLegacyPromptByIdPath = z.object({ - prompt_id: z.string() -}) + prompt_id: z.string() +}); /** * The provider catalog */ -export const zGetProvidersResponse = zProviderCatalogResponse +export const zGetProvidersResponse = zProviderCatalogResponse; /** * Success */ -export const zGetQueueInfoResponse = zQueueInfo +export const zGetQueueInfoResponse = zQueueInfo; -export const zManageQueueBody = zQueueManageRequest +export const zManageQueueBody = zQueueManageRequest; /** * Success */ -export const zManageQueueResponse = zQueueManageResponse +export const zManageQueueResponse = zQueueManageResponse; /** * Success */ -export const zListSecretsResponse = zSecretListResponse +export const zListSecretsResponse = zSecretListResponse; -export const zCreateSecretBody = zCreateSecretRequest +export const zCreateSecretBody = zCreateSecretRequest; /** * Secret created successfully */ -export const zCreateSecretResponse = zSecretResponse +export const zCreateSecretResponse = zSecretResponse; export const zDeleteSecretPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * Secret deleted successfully */ -export const zDeleteSecretResponse = z.void() +export const zDeleteSecretResponse = z.void(); export const zGetSecretPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * Success */ -export const zGetSecretResponse = zSecretResponse +export const zGetSecretResponse = zSecretResponse; -export const zUpdateSecretBody = zUpdateSecretRequest +export const zUpdateSecretBody = zUpdateSecretRequest; export const zUpdateSecretPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * Secret updated successfully */ -export const zUpdateSecretResponse = zSecretResponse +export const zUpdateSecretResponse = zSecretResponse; /** * Success */ -export const zListSecretProvidersResponse = zSecretProvidersResponse +export const zListSecretProvidersResponse = zSecretProvidersResponse; /** * User settings as key-value pairs */ -export const zGetAllSettingsResponse = z.record(z.unknown()) +export const zGetAllSettingsResponse = z.record(z.unknown()); /** * Settings to update as key-value pairs */ -export const zUpdateMultipleSettingsBody = z.record(z.unknown()) +export const zUpdateMultipleSettingsBody = z.record(z.unknown()); /** * Updated user settings */ -export const zUpdateMultipleSettingsResponse = z.record(z.unknown()) +export const zUpdateMultipleSettingsResponse = z.record(z.unknown()); export const zGetSettingByIdPath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Setting value response */ export const zGetSettingByIdResponse = z.object({ - value: z.unknown().optional() -}) + value: z.unknown().optional() +}); /** * New value for the setting */ -export const zUpdateSettingByIdBody = z.unknown() +export const zUpdateSettingByIdBody = z.unknown(); export const zUpdateSettingByIdPath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Updated setting value response */ export const zUpdateSettingByIdResponse = z.object({ - value: z.unknown().optional() -}) + value: z.unknown().optional() +}); /** * Success */ -export const zGetSystemStatsResponse = zSystemStatsResponse +export const zGetSystemStatsResponse = zSystemStatsResponse; export const zListTagsQuery = 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().default('count_desc'), - include_zero: z.boolean().optional().default(false), - include_public: z.boolean().optional().default(true) -}) + 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().default('count_desc'), + include_zero: z.boolean().optional().default(false), + include_public: z.boolean().optional().default(true) +}); /** * Tags retrieved successfully */ -export const zListTagsResponse2 = zListTagsResponse +export const zListTagsResponse2 = zListTagsResponse; export const zListTasksQuery = 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().default('desc'), - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(100).optional().default(20) -}) + 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().default('desc'), + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(100).optional().default(20) +}); /** * Success - Tasks retrieved */ -export const zListTasksResponse = zTasksListResponse +export const zListTasksResponse = zTasksListResponse; export const zGetTaskPath = z.object({ - task_id: z.string().uuid() -}) + task_id: z.string().uuid() +}); /** * Success - Task details retrieved */ -export const zGetTaskResponse = zTaskResponse +export const zGetTaskResponse = zTaskResponse; export const zUploadImageBody = z.object({ - image: z.string(), - overwrite: z.string().optional(), - subfolder: z.string().optional(), - type: z.string().optional() -}) + image: z.string(), + overwrite: z.string().optional(), + subfolder: z.string().optional(), + type: z.string().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 zUploadMaskBody = z.object({ - image: z.string(), - original_ref: z.string() -}) + image: z.string(), + original_ref: z.string() +}); /** * 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 zUploadGrantPutBody = z.string() +export const zUploadGrantPutBody = z.string(); export const zUploadGrantPutPath = z.object({ - upload_id: z.string() -}) + upload_id: z.string() +}); export const zUploadGrantPutResponse = z.union([ - zInputUploadResponse, - zWorkflowResponse -]) + zInputUploadResponse, + zWorkflowResponse +]); /** * Success */ -export const zGetUserResponse = zUserResponse +export const zGetUserResponse = zUserResponse; export const zGetUserdataQuery = 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) -}) + dir: z.string().optional(), + recurse: z.boolean().optional().default(false), + split: z.boolean().optional().default(false), + full_info: z.boolean().optional().default(false) +}); /** * A list of user data files. */ -export const zGetUserdataResponse = zGetUserDataResponseFull +export const zGetUserdataResponse = zGetUserDataResponseFull; export const zDeleteUserdataFilePath = z.object({ - file: z.string() -}) + file: z.string() +}); /** * File deleted successfully (No Content). */ -export const zDeleteUserdataFileResponse = z.void() +export const zDeleteUserdataFileResponse = z.void(); export const zGetUserdataFilePath = z.object({ - file: z.string() -}) + file: z.string() +}); /** * Successfully retrieved the file. */ -export const zGetUserdataFileResponse = z.string() +export const zGetUserdataFileResponse = z.string(); -export const zPostUserdataFileBody = z.string() +export const zPostUserdataFileBody = z.string(); export const zPostUserdataFilePath = z.object({ - file: z.string() -}) + file: z.string() +}); export const zPostUserdataFileQuery = z.object({ - overwrite: z.enum(['true', 'false']).optional().default('true'), - full_info: z.enum(['true', 'false']).optional().default('false') -}) + overwrite: z.enum(['true', 'false']).optional().default('true'), + full_info: z.enum(['true', 'false']).optional().default('false') +}); /** * File uploaded successfully. */ -export const zPostUserdataFileResponse = zUserDataResponseFull +export const zPostUserdataFileResponse = zUserDataResponseFull; export const zMoveUserdataFilePath = z.object({ - file: z.string(), - dest: z.string() -}) + file: z.string(), + dest: z.string() +}); export const zMoveUserdataFileQuery = z.object({ - overwrite: z.enum(['true', 'false']).optional().default('true') -}) + overwrite: z.enum(['true', 'false']).optional().default('true') +}); /** * File moved successfully. */ -export const zMoveUserdataFileResponse = zUserDataResponseFull +export const zMoveUserdataFileResponse = zUserDataResponseFull; export const zGetUserdataFilePublishPath = z.object({ - file: z.string() -}) + file: z.string() +}); /** * Publish info (publish_time is null if never published) */ -export const zGetUserdataFilePublishResponse = zWorkflowPublishInfo +export const zGetUserdataFilePublishResponse = zWorkflowPublishInfo; -export const zPostUserdataFilePublishBody = zPublishWorkflowAssetsRequest +export const zPostUserdataFilePublishBody = zPublishWorkflowAssetsRequest; export const zPostUserdataFilePublishPath = z.object({ - file: z.string() -}) + file: z.string() +}); /** * Workflow published */ -export const zPostUserdataFilePublishResponse = zWorkflowPublishInfo +export const zPostUserdataFilePublishResponse = zWorkflowPublishInfo; /** * Userdata storage information */ export const zGetUsersInfoResponse = z.object({ - migrated: z.boolean(), - storage: z.string() -}) + migrated: z.boolean(), + storage: z.string() +}); export const zGetVhsQueryVideoQuery = z.object({ - filename: z.string() -}) + 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 zGetVhsViewAudioQuery = z.object({ - filename: z.string(), - type: z.string().optional(), - subfolder: z.string().optional() -}) + filename: z.string(), + type: z.string().optional(), + subfolder: z.string().optional() +}); export const zGetVhsViewVideoQuery = z.object({ - filename: z.string(), - type: z.string().optional(), - subfolder: z.string().optional() -}) + filename: z.string(), + type: z.string().optional(), + subfolder: z.string().optional() +}); export const zViewFileQuery = 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() -}) + 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 zGetLegacyViewMetadataPath = z.object({ - folder_name: z.string() -}) + folder_name: z.string() +}); export const zGetApiViewVideoAliasQuery = z.object({ - filename: z.string() -}) + filename: z.string() +}); /** * Empty object for workflow templates */ -export const zGetWorkflowTemplatesResponse = z.record(z.unknown()) +export const zGetWorkflowTemplatesResponse = z.record(z.unknown()); export const zListWorkflowsQuery = 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() - .default('create_time'), - order: z.enum(['asc', 'desc']).optional().default('desc') -}) + 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().default('create_time'), + order: z.enum(['asc', 'desc']).optional().default('desc') +}); /** * Success */ -export const zListWorkflowsResponse = zWorkflowListResponse +export const zListWorkflowsResponse = zWorkflowListResponse; -export const zCreateWorkflowBody = zCreateWorkflowRequest +export const zCreateWorkflowBody = zCreateWorkflowRequest; /** * Workflow created successfully */ -export const zCreateWorkflowResponse = zWorkflowResponse +export const zCreateWorkflowResponse = zWorkflowResponse; export const zDeleteWorkflowPath = z.object({ - workflow_id: z.string() -}) + workflow_id: z.string() +}); /** * Workflow deleted successfully */ -export const zDeleteWorkflowResponse = z.void() +export const zDeleteWorkflowResponse = z.void(); export const zGetWorkflowPath = z.object({ - workflow_id: z.string() -}) + workflow_id: z.string() +}); /** * Success */ -export const zGetWorkflowResponse = zWorkflowResponse +export const zGetWorkflowResponse = zWorkflowResponse; -export const zUpdateWorkflowBody = zUpdateWorkflowRequest +export const zUpdateWorkflowBody = zUpdateWorkflowRequest; export const zUpdateWorkflowPath = z.object({ - workflow_id: z.string() -}) + workflow_id: z.string() +}); /** * Success */ -export const zUpdateWorkflowResponse = zWorkflowResponse +export const zUpdateWorkflowResponse = zWorkflowResponse; export const zGetWorkflowContentPath = z.object({ - workflow_id: z.string() -}) + workflow_id: z.string() +}); /** * Success */ -export const zGetWorkflowContentResponse = zWorkflowVersionContentResponse +export const zGetWorkflowContentResponse = zWorkflowVersionContentResponse; -export const zForkWorkflowBody = zForkWorkflowRequest +export const zForkWorkflowBody = zForkWorkflowRequest; export const zForkWorkflowPath = z.object({ - workflow_id: z.string() -}) + workflow_id: z.string() +}); /** * Workflow forked successfully */ -export const zForkWorkflowResponse = zWorkflowResponse +export const zForkWorkflowResponse = zWorkflowResponse; -export const zCreateWorkflowVersionBody = zCreateWorkflowVersionRequest +export const zCreateWorkflowVersionBody = zCreateWorkflowVersionRequest; export const zCreateWorkflowVersionPath = z.object({ - workflow_id: z.string() -}) + workflow_id: z.string() +}); /** * Version created successfully */ -export const zCreateWorkflowVersionResponse = zWorkflowVersionResponse +export const zCreateWorkflowVersionResponse = zWorkflowVersionResponse; export const zGetPublishedWorkflowPath = z.object({ - share_id: z.string() -}) + share_id: z.string() +}); /** * Published workflow details with asset statuses */ -export const zGetPublishedWorkflowResponse = zPublishedWorkflowDetail +export const zGetPublishedWorkflowResponse = zPublishedWorkflowDetail; -export const zCreateWorkflowUploadUrlBody = zWorkflowUploadUrlRequest +export const zCreateWorkflowUploadUrlBody = zWorkflowUploadUrlRequest; /** * Upload grant minted */ -export const zCreateWorkflowUploadUrlResponse = zUploadGrantResponse +export const zCreateWorkflowUploadUrlResponse = zUploadGrantResponse; export const zListWorkspaceApiKeysQuery = z.object({ - include_revoked: z.boolean().optional().default(false) -}) + include_revoked: z.boolean().optional().default(false) +}); /** * List of API keys */ -export const zListWorkspaceApiKeysResponse2 = zListWorkspaceApiKeysResponse +export const zListWorkspaceApiKeysResponse2 = zListWorkspaceApiKeysResponse; -export const zCreateWorkspaceApiKeyBody = zCreateWorkspaceApiKeyRequest +export const zCreateWorkspaceApiKeyBody = zCreateWorkspaceApiKeyRequest; /** * API key created (plaintext returned once) */ -export const zCreateWorkspaceApiKeyResponse2 = zCreateWorkspaceApiKeyResponse +export const zCreateWorkspaceApiKeyResponse2 = zCreateWorkspaceApiKeyResponse; export const zRevokeWorkspaceApiKeyPath = z.object({ - id: z.string().uuid() -}) + id: z.string().uuid() +}); /** * API key revoked */ -export const zRevokeWorkspaceApiKeyResponse = z.void() +export const zRevokeWorkspaceApiKeyResponse = z.void(); /** * List of pending invites */ -export const zListWorkspaceInvitesResponse = zListInvitesResponse +export const zListWorkspaceInvitesResponse = zListInvitesResponse; -export const zCreateWorkspaceInviteBody = zCreateInviteRequest +export const zCreateWorkspaceInviteBody = zCreateInviteRequest; /** * Invite created */ -export const zCreateWorkspaceInviteResponse = zPendingInvite +export const zCreateWorkspaceInviteResponse = zPendingInvite; export const zRevokeWorkspaceInvitePath = z.object({ - inviteId: z.string() -}) + inviteId: z.string() +}); /** * Invite revoked */ -export const zRevokeWorkspaceInviteResponse = z.void() +export const zRevokeWorkspaceInviteResponse = z.void(); export const zResendWorkspaceInvitePath = z.object({ - inviteId: z.string() -}) + inviteId: z.string() +}); /** * Invite refreshed and queued for delivery */ -export const zResendWorkspaceInviteResponse = zPendingInvite +export const zResendWorkspaceInviteResponse = zPendingInvite; /** * Successfully left workspace */ -export const zLeaveWorkspaceResponse = z.void() +export const zLeaveWorkspaceResponse = z.void(); export const zListWorkspaceMembersQuery = z.object({ - offset: z.number().int().gte(0).optional().default(0), - limit: z.number().int().gte(1).lte(100).optional().default(20) -}) + offset: z.number().int().gte(0).optional().default(0), + limit: z.number().int().gte(1).lte(100).optional().default(20) +}); /** * List of members */ -export const zListWorkspaceMembersResponse = zListMembersResponse +export const zListWorkspaceMembersResponse = zListMembersResponse; export const zBulkRevokeWorkspaceMemberApiKeysPath = z.object({ - user_id: z.string().min(1) -}) + user_id: z.string().min(1) +}); /** * Keys revoked successfully */ -export const zBulkRevokeWorkspaceMemberApiKeysResponse = - zBulkRevokeApiKeysResponse +export const zBulkRevokeWorkspaceMemberApiKeysResponse = zBulkRevokeApiKeysResponse; export const zRemoveWorkspaceMemberPath = z.object({ - userId: z.string() -}) + userId: z.string() +}); /** * Member removed */ -export const zRemoveWorkspaceMemberResponse = z.void() +export const zRemoveWorkspaceMemberResponse = z.void(); -export const zUpdateWorkspaceMemberRoleBody = zUpdateMemberRoleRequest +export const zUpdateWorkspaceMemberRoleBody = zUpdateMemberRoleRequest; export const zUpdateWorkspaceMemberRolePath = z.object({ - userId: z.string() -}) + userId: z.string() +}); /** * Member role updated */ -export const zUpdateWorkspaceMemberRoleResponse = zMember +export const zUpdateWorkspaceMemberRoleResponse = zMember; /** * The policy document */ -export const zGetProviderPolicyResponse = zProviderPolicy +export const zGetProviderPolicyResponse = zProviderPolicy; -export const zPutProviderPolicyBody = zProviderPolicy +export const zPutProviderPolicyBody = zProviderPolicy; /** * Policy replaced */ -export const zPutProviderPolicyResponse = zProviderPolicy +export const zPutProviderPolicyResponse = zProviderPolicy; /** * List of workspaces */ -export const zListWorkspacesResponse2 = zListWorkspacesResponse +export const zListWorkspacesResponse2 = zListWorkspacesResponse; -export const zCreateWorkspaceBody = zCreateWorkspaceRequest +export const zCreateWorkspaceBody = zCreateWorkspaceRequest; /** * Workspace created */ -export const zCreateWorkspaceResponse = zWorkspace +export const zCreateWorkspaceResponse = zWorkspace; export const zDeleteWorkspacePath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Workspace deleted */ -export const zDeleteWorkspaceResponse = z.void() +export const zDeleteWorkspaceResponse = z.void(); export const zGetWorkspacePath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Workspace details */ -export const zGetWorkspaceResponse = zWorkspace +export const zGetWorkspaceResponse = zWorkspace; -export const zUpdateWorkspaceBody = zUpdateWorkspaceRequest +export const zUpdateWorkspaceBody = zUpdateWorkspaceRequest; export const zUpdateWorkspacePath = z.object({ - id: z.string() -}) + id: z.string() +}); /** * Workspace updated */ -export const zUpdateWorkspaceResponse = zWorkspace +export const zUpdateWorkspaceResponse = zWorkspace; /** * The credential's workspace */ -export const zGetCurrentWorkspaceResponse = zCurrentWorkspaceResponse +export const zGetCurrentWorkspaceResponse = zCurrentWorkspaceResponse; export const zGetStaticExtensionsPath = z.object({ - path: z.string() -}) + path: z.string() +}); export const zRedirectExtensionScriptsPath = z.object({ - file: z.string() -}) + file: z.string() +}); /** * Service is healthy */ -export const zGetHealthResponse = z.string() +export const zGetHealthResponse = z.string(); /** * 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()))); /** * Log text */ -export const zGetInternalLogsResponse = z.string() +export const zGetInternalLogsResponse = z.string(); /** * 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 zSubscribeToLogsBody = z.object({ - clientId: z.string(), - enabled: z.boolean() -}) + clientId: z.string(), + enabled: z.boolean() +}); export const zGetStaticKjwebAsyncPath = z.object({ - path: z.string() -}) + path: z.string() +}); export const zGetOAuthAuthorizeQuery = 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() -}) + 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() +}); /** * 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 zPostOAuthAuthorizeBody = z.object({ - csrf_token: z.string(), - decision: z.enum(['allow', 'deny']), - oauth_request_id: z.string().uuid(), - workspace_id: z.string() -}) + csrf_token: z.string(), + decision: z.enum(['allow', 'deny']), + oauth_request_id: z.string().uuid(), + workspace_id: z.string() +}); /** * 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 zPostOAuthRegisterBody = zOAuthRegisterRequest +export const zPostOAuthRegisterBody = zOAuthRegisterRequest; /** * Registered. Body echoes the metadata RFC 7591 §3.2.1 requires. */ -export const zPostOAuthRegisterResponse = zOAuthRegisterResponse +export const zPostOAuthRegisterResponse = zOAuthRegisterResponse; export const zPostOAuthTokenBody = 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() -}) + 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() +}); /** * New token pair */ -export const zPostOAuthTokenResponse = zOAuthTokenResponse +export const zPostOAuthTokenResponse = zOAuthTokenResponse; export const zGetTemplateProxyPath = z.object({ - path: z.string() -}) + path: z.string() +}); export const zGetViewCompatAliasQuery = z.object({ - filename: z.string() -}) + filename: z.string() +}); export const zGetWebsocketQuery = z.object({ - clientId: z.string().optional() -}) + clientId: z.string().optional() +});