mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
[chore] Update Ingest API types from cloud@0125ed6 (#10677)
## Automated Ingest API Type Update This PR updates the Ingest API TypeScript types and Zod schemas from the latest cloud OpenAPI specification. - Cloud commit: 0125ed6 - Generated using @hey-api/openapi-ts with Zod plugin These types cover cloud-only endpoints (workspaces, billing, secrets, assets, tasks, etc.). Overlapping endpoints shared with the local ComfyUI Python backend are excluded. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10677-chore-Update-Ingest-API-types-from-cloud-0125ed6-3316d73d36508122a6f2ec7df88d416b) by [Unito](https://www.unito.io) --------- Co-authored-by: dante01yoon <6510430+dante01yoon@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -357,6 +357,7 @@ export type {
|
||||
HubUsernameCheckResponse,
|
||||
HubWorkflowDetail,
|
||||
HubWorkflowListResponse,
|
||||
HubWorkflowStatus,
|
||||
HubWorkflowSummary,
|
||||
HubWorkflowTemplateEntry,
|
||||
ImportPublishedAssetsData,
|
||||
@@ -510,6 +511,13 @@ export type {
|
||||
SendUserInviteEmailResponse,
|
||||
SendUserInviteEmailResponse2,
|
||||
SendUserInviteEmailResponses,
|
||||
SetReviewStatusData,
|
||||
SetReviewStatusError,
|
||||
SetReviewStatusErrors,
|
||||
SetReviewStatusRequest,
|
||||
SetReviewStatusResponse,
|
||||
SetReviewStatusResponse2,
|
||||
SetReviewStatusResponses,
|
||||
SubmitFeedbackData,
|
||||
SubmitFeedbackError,
|
||||
SubmitFeedbackErrors,
|
||||
|
||||
84
packages/ingest-types/src/types.gen.ts
generated
84
packages/ingest-types/src/types.gen.ts
generated
@@ -151,6 +151,7 @@ export type HubWorkflowDetail = {
|
||||
share_id: string
|
||||
workflow_id: string
|
||||
name: string
|
||||
status: HubWorkflowStatus
|
||||
description?: string
|
||||
tags?: Array<LabelRef>
|
||||
thumbnail_type?: 'image' | 'video' | 'image_comparison'
|
||||
@@ -194,9 +195,19 @@ export type LabelRef = {
|
||||
display_name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Public workflow status. NULL in the database is represented as pending in API responses.
|
||||
*/
|
||||
export type HubWorkflowStatus =
|
||||
| 'pending'
|
||||
| 'approved'
|
||||
| 'rejected'
|
||||
| 'deprecated'
|
||||
|
||||
export type HubWorkflowSummary = {
|
||||
share_id: string
|
||||
name: string
|
||||
status: HubWorkflowStatus
|
||||
description?: string
|
||||
tags?: Array<LabelRef>
|
||||
models?: Array<LabelRef>
|
||||
@@ -245,6 +256,7 @@ export type HubWorkflowTemplateEntry = {
|
||||
*/
|
||||
name: string
|
||||
title: string
|
||||
status: HubWorkflowStatus
|
||||
description?: string
|
||||
tags?: Array<string>
|
||||
models?: Array<string>
|
||||
@@ -1629,6 +1641,28 @@ export type SendUserInviteEmailRequest = {
|
||||
force?: boolean
|
||||
}
|
||||
|
||||
export type SetReviewStatusResponse = {
|
||||
/**
|
||||
* The share IDs that were submitted for review
|
||||
*/
|
||||
share_ids: Array<string>
|
||||
/**
|
||||
* The applied review status
|
||||
*/
|
||||
status: 'approved' | 'rejected'
|
||||
}
|
||||
|
||||
export type SetReviewStatusRequest = {
|
||||
/**
|
||||
* The share IDs of the hub workflows to review
|
||||
*/
|
||||
share_ids: Array<string>
|
||||
/**
|
||||
* The review decision for the workflows
|
||||
*/
|
||||
status: 'approved' | 'rejected'
|
||||
}
|
||||
|
||||
/**
|
||||
* Response after successfully claiming an invite code
|
||||
*/
|
||||
@@ -4457,6 +4491,45 @@ export type SendUserInviteEmailResponses = {
|
||||
export type SendUserInviteEmailResponse2 =
|
||||
SendUserInviteEmailResponses[keyof SendUserInviteEmailResponses]
|
||||
|
||||
export type SetReviewStatusData = {
|
||||
body: SetReviewStatusRequest
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/admin/api/hub/workflows/status'
|
||||
}
|
||||
|
||||
export type SetReviewStatusErrors = {
|
||||
/**
|
||||
* Bad request - invalid status value or empty share_ids
|
||||
*/
|
||||
400: ErrorResponse
|
||||
/**
|
||||
* Unauthorized - authentication required
|
||||
*/
|
||||
401: ErrorResponse
|
||||
/**
|
||||
* Forbidden - insufficient permissions
|
||||
*/
|
||||
403: ErrorResponse
|
||||
/**
|
||||
* Internal server error
|
||||
*/
|
||||
500: ErrorResponse
|
||||
}
|
||||
|
||||
export type SetReviewStatusError =
|
||||
SetReviewStatusErrors[keyof SetReviewStatusErrors]
|
||||
|
||||
export type SetReviewStatusResponses = {
|
||||
/**
|
||||
* Status updated successfully
|
||||
*/
|
||||
200: SetReviewStatusResponse
|
||||
}
|
||||
|
||||
export type SetReviewStatusResponse2 =
|
||||
SetReviewStatusResponses[keyof SetReviewStatusResponses]
|
||||
|
||||
export type GetDeletionRequestData = {
|
||||
body?: never
|
||||
path?: never
|
||||
@@ -5740,6 +5813,10 @@ export type ListHubWorkflowsData = {
|
||||
* 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<HubWorkflowStatus>
|
||||
}
|
||||
url: '/api/hub/workflows'
|
||||
}
|
||||
@@ -5814,7 +5891,12 @@ export type PublishHubWorkflowResponse =
|
||||
export type ListHubWorkflowIndexData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: never
|
||||
query?: {
|
||||
/**
|
||||
* Filter by status (e.g. ?status=pending,approved). Defaults to approved if omitted.
|
||||
*/
|
||||
status?: Array<HubWorkflowStatus>
|
||||
}
|
||||
url: '/api/hub/workflows/index'
|
||||
}
|
||||
|
||||
|
||||
43
packages/ingest-types/src/zod.gen.ts
generated
43
packages/ingest-types/src/zod.gen.ts
generated
@@ -58,10 +58,21 @@ export const zLabelRef = z.object({
|
||||
display_name: z.string()
|
||||
})
|
||||
|
||||
/**
|
||||
* Public workflow status. NULL in the database is represented as pending in API responses.
|
||||
*/
|
||||
export const zHubWorkflowStatus = z.enum([
|
||||
'pending',
|
||||
'approved',
|
||||
'rejected',
|
||||
'deprecated'
|
||||
])
|
||||
|
||||
export const zHubWorkflowDetail = z.object({
|
||||
share_id: z.string(),
|
||||
workflow_id: z.string(),
|
||||
name: z.string(),
|
||||
status: zHubWorkflowStatus,
|
||||
description: z.string().optional(),
|
||||
tags: z.array(zLabelRef).optional(),
|
||||
thumbnail_type: z.enum(['image', 'video', 'image_comparison']).optional(),
|
||||
@@ -81,6 +92,7 @@ export const zHubWorkflowDetail = z.object({
|
||||
export const zHubWorkflowSummary = z.object({
|
||||
share_id: z.string(),
|
||||
name: z.string(),
|
||||
status: zHubWorkflowStatus,
|
||||
description: z.string().optional(),
|
||||
tags: z.array(zLabelRef).optional(),
|
||||
models: z.array(zLabelRef).optional(),
|
||||
@@ -114,6 +126,7 @@ export const zHubLabelListResponse = z.object({
|
||||
export const zHubWorkflowTemplateEntry = z.object({
|
||||
name: z.string(),
|
||||
title: z.string(),
|
||||
status: zHubWorkflowStatus,
|
||||
description: z.string().optional(),
|
||||
tags: z.array(z.string()).optional(),
|
||||
models: z.array(z.string()).optional(),
|
||||
@@ -870,6 +883,16 @@ export const zSendUserInviteEmailRequest = z.object({
|
||||
force: z.boolean().optional().default(false)
|
||||
})
|
||||
|
||||
export const zSetReviewStatusResponse = z.object({
|
||||
share_ids: z.array(z.string()),
|
||||
status: z.enum(['approved', 'rejected'])
|
||||
})
|
||||
|
||||
export const zSetReviewStatusRequest = z.object({
|
||||
share_ids: z.array(z.string()).min(1),
|
||||
status: z.enum(['approved', 'rejected'])
|
||||
})
|
||||
|
||||
/**
|
||||
* Response after successfully claiming an invite code
|
||||
*/
|
||||
@@ -1837,6 +1860,17 @@ export const zSendUserInviteEmailData = z.object({
|
||||
*/
|
||||
export const zSendUserInviteEmailResponse2 = zSendUserInviteEmailResponse
|
||||
|
||||
export const zSetReviewStatusData = z.object({
|
||||
body: zSetReviewStatusRequest,
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
})
|
||||
|
||||
/**
|
||||
* Status updated successfully
|
||||
*/
|
||||
export const zSetReviewStatusResponse2 = zSetReviewStatusResponse
|
||||
|
||||
export const zGetDeletionRequestData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
@@ -2258,7 +2292,8 @@ export const zListHubWorkflowsData = z.object({
|
||||
search: z.string().optional(),
|
||||
tag: z.string().optional(),
|
||||
username: z.string().optional(),
|
||||
detail: z.boolean().optional().default(false)
|
||||
detail: z.boolean().optional().default(false),
|
||||
status: z.array(zHubWorkflowStatus).optional()
|
||||
})
|
||||
.optional()
|
||||
})
|
||||
@@ -2282,7 +2317,11 @@ export const zPublishHubWorkflowResponse = zHubWorkflowDetail
|
||||
export const zListHubWorkflowIndexData = z.object({
|
||||
body: z.never().optional(),
|
||||
path: z.never().optional(),
|
||||
query: z.never().optional()
|
||||
query: z
|
||||
.object({
|
||||
status: z.array(zHubWorkflowStatus).optional()
|
||||
})
|
||||
.optional()
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user