@comfyorg/ingest-types 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,21 @@ export type AcceptInviteResponse = {
14
14
  */
15
15
  workspace_name: string;
16
16
  };
17
+ /**
18
+ * The auto top-up settings a purchase was accepted with, echoed so checkout and its done state show exactly what turns on. Present only on a purchase sent with auto_top_up.
19
+ */
20
+ export type AcceptedAutoTopUpSettings = {
21
+ /**
22
+ * The stored monthly limit; the ceiling when the owner set no limit.
23
+ */
24
+ monthly_budget_cents: number;
25
+ /**
26
+ * True when the owner set no limit and the ceiling was stored.
27
+ */
28
+ monthly_budget_is_default: boolean;
29
+ target_credits: number;
30
+ threshold_credits: number;
31
+ };
17
32
  /**
18
33
  * Returned when a request to run the agent is declined before the turn starts, because of a billing or account condition on the workspace. The `error` object carries a `message` you can show the user, a `type` that matches the HTTP status, and a more specific `reason` you can branch on to offer the right next step.
19
34
  */
@@ -411,6 +426,43 @@ export type AgentMessageDoneFrame = {
411
426
  data: AgentMessageDoneData;
412
427
  type: 'agent_message_done';
413
428
  };
429
+ /**
430
+ * The immutable model selection receipt for an accepted turn.
431
+ */
432
+ export type AgentModelReceipt = {
433
+ contract: 'v1';
434
+ /**
435
+ * Exact model ID to which the turn is pinned.
436
+ */
437
+ model_id: string;
438
+ /**
439
+ * Profile revision pinned for the turn (bootstrap for the configured default profile).
440
+ */
441
+ profile_revision: string;
442
+ /**
443
+ * The supplied model_selection object, or null when omitted.
444
+ */
445
+ requested: AgentModelSelection | null;
446
+ source: 'request' | 'deployment_default';
447
+ strategy: 'anthropic';
448
+ wire: 'anthropic_messages' | 'openai_chat';
449
+ };
450
+ /**
451
+ * An explicit exact model selection. Unknown properties are refused with 400 so a newer intent is never silently ignored by an older server.
452
+ */
453
+ export type AgentModelSelection = {
454
+ /**
455
+ * Exact model ID, using the agent-llm v1 ID grammar.
456
+ */
457
+ model_id: string;
458
+ /**
459
+ * Reserved dial option ID. It is accepted and recorded in requested while the dial is off, but does not affect resolution.
460
+ */
461
+ option_id?: string;
462
+ };
463
+ export type AgentModelUnavailable = AgentError & {
464
+ code: 'model_unavailable';
465
+ };
414
466
  /**
415
467
  * The `context` of a `paused` ask.
416
468
  */
@@ -550,6 +602,7 @@ export type AgentPostMessageRequest = {
550
602
  [key: string]: unknown;
551
603
  };
552
604
  };
605
+ model_selection?: AgentModelSelection;
553
606
  /**
554
607
  * Snapshot of the client's open editor tabs in editor order. Advisory context, not a grant — entries outside the caller's workspace are ignored. With workflow_references present, only the editable target and explicit references enter the model's workflow context.
555
608
  */
@@ -854,13 +907,14 @@ export type AgentToolCallFrame = {
854
907
  type: 'agent_tool_call';
855
908
  };
856
909
  /**
857
- * Acknowledgement that a turn was accepted. The agent runs asynchronously; output streams over the WebSocket (agent_message_delta, agent_tool_call, agent_message_done); canvas edits arrive as doc_update frames.
910
+ * Acknowledgement that a turn was accepted. The agent runs asynchronously; output streams over the WebSocket (agent_message_delta, agent_tool_call, agent_message_done); canvas edits arrive as doc_update frames. The model selection receipt is present when the backend supports its configured wire. A client that requested selection must treat a missing receipt as selection not applied.
858
911
  */
859
912
  export type AgentTurnAccepted = {
860
913
  /**
861
914
  * ID of the assistant message that will stream the reply.
862
915
  */
863
916
  message_id: string;
917
+ model_selection?: AgentModelReceipt;
864
918
  thread_id: string;
865
919
  };
866
920
  /**
@@ -881,7 +935,7 @@ export type AgentTurnRefusal = {
881
935
  reason?: string;
882
936
  };
883
937
  /**
884
- * Usage of a completed turn, as carried on agent_message_done. Mirrors `$defs.agent_message_done.data.usage` in services/agent/api/agent_events.schema.json; TestMessageDoneFrameMatchesContract holds the two definitions to the same fields and constraints. charge_micro_usd appears only when the server durably captured priced billing for at least one round. It is the exact charge in millionths of a US dollar; clients convert that denomination to catalog credits for display and must not read its absence as a zero charge.
938
+ * Usage of a completed turn, as carried on agent_message_done. Mirrors `$defs.agent_message_done.data.usage` in services/agent/api/agent_events.schema.json; TestMessageDoneFrameMatchesContract holds the two definitions to the same fields and constraints. charge_micro_usd appears only when the server durably captured priced billing for at least one round. It is the exact charge in millionths of a US dollar; clients convert that denomination to catalog credits for display and must not read its absence as a zero charge. On a local-agent turn it is the proxy-reported lower bound, and priced_rounds / unpriced_rounds count the rounds that did and did not report a price.
885
939
  */
886
940
  export type AgentTurnUsage = {
887
941
  cache_creation_input_tokens: number;
@@ -889,7 +943,9 @@ export type AgentTurnUsage = {
889
943
  charge_micro_usd?: number;
890
944
  input_tokens: number;
891
945
  output_tokens: number;
946
+ priced_rounds?: number;
892
947
  total_tokens: number;
948
+ unpriced_rounds?: number;
893
949
  };
894
950
  export type AgentUsageStatusResponse = {
895
951
  /**
@@ -1398,6 +1454,14 @@ export type AutoReloadSettingsRequest = {
1398
1454
  target_credits?: number;
1399
1455
  threshold_credits: number;
1400
1456
  };
1457
+ /**
1458
+ * Did auto top-up turn on with a purchase sent with auto_top_up; absent otherwise, so absence is not "off". pending: payment or activation has not finished; keep polling. on: on with auto_top_up's settings. failed: payment and credits stand but auto top-up did not turn on; send the owner to set it up in Billing. not_attempted: the payment did not succeed (or the checkout expired). Not the current status; read GET /api/billing/auto-reload.
1459
+ */
1460
+ export type AutoTopUpActivation = 'pending' | 'on' | 'failed' | 'not_attempted';
1461
+ /**
1462
+ * Only when auto_top_up_activation is failed. An auto_top_up_setup reason (GET /api/billing/capabilities) or activation_error. For support and analytics, not copy.
1463
+ */
1464
+ export type AutoTopUpActivationReason = string;
1401
1465
  /**
1402
1466
  * Read-only auto top-up display for non-owner workspace members. Omitted when unavailable, hidden, or unsupported by an older server; keep the member discoverability notice as the fallback. Never grants management access and contains no limit amounts, spending or payment details.
1403
1467
  */
@@ -1424,8 +1488,8 @@ export type AutoTopUpMemberView = {
1424
1488
  * means setup is not available. Owner read/disable authority remains separate.
1425
1489
  * These states do not determine surface visibility. Unified billing settings
1426
1490
  * show the auto top-up card only when capabilities.can_view_auto_top_up is
1427
- * true; it is false when can_top_up is, including paused or payment-failed
1428
- * billing.
1491
+ * true. Paused or payment-failed billing hides it; the manual-purchase
1492
+ * switch does not.
1429
1493
  * Ready does not authorize a charge or guarantee an off-session payment method.
1430
1494
  * This fact ignores saved consent and monthly budget. An absent fact is unknown.
1431
1495
  *
@@ -1879,13 +1943,16 @@ export type BillingCapabilities = {
1879
1943
  can_upgrade: boolean;
1880
1944
  /**
1881
1945
  * - Answers: should the client show the owner auto top-up card?
1882
- * - True: can_manage_auto_top_up and can_top_up are both true in this
1883
- * response. Render it as received; never recombine those two fields.
1946
+ * - True: owner management authority and top-up eligibility, except
1947
+ * that stopped manual purchases do not hide this card. Paused and
1948
+ * past-due billing still hide it. Render this fact as received.
1884
1949
  * - False: denied_reasons.can_view_auto_top_up names the first refusal,
1885
- * the can_manage_auto_top_up reason before the can_top_up reason.
1950
+ * the can_manage_auto_top_up reason before the can_top_up reason,
1951
+ * excluding topup_purchases_paused.
1886
1952
  * - When billing-api omits this field, ingest serves
1887
1953
  * can_manage_auto_top_up and can_top_up as served here, and takes the
1888
- * reason from their denied_reasons in the same order.
1954
+ * reason from their denied_reasons in the same order. This fallback
1955
+ * stays closed whenever can_top_up is false.
1889
1956
  * - Not: authorization to enable, edit or charge auto top-up, and not
1890
1957
  * setup readiness, which auto_top_up_setup reports. auto_top_up_enabled
1891
1958
  * still gates the rollout.
@@ -1896,9 +1963,9 @@ export type BillingCapabilities = {
1896
1963
  * - Answers: should the client show the member auto top-up notice that
1897
1964
  * sends a non-owner to a workspace owner?
1898
1965
  * - True: the actor is a member but not an owner, and the workspace
1899
- * passes every can_top_up condition that does not depend on the
1900
- * actor: not past due or paused, a recognized tier and status, and
1901
- * purchases not paused by staff. Render it as received; never derive
1966
+ * passes workspace eligibility checks other than stopped manual
1967
+ * purchases. Paused and past-due billing still hide it.
1968
+ * Render it as received; never derive
1902
1969
  * it from can_top_up, can_manage_auto_top_up or their reasons.
1903
1970
  * - False: denied_reasons.can_view_auto_top_up_member_notice names the
1904
1971
  * first refusal.
@@ -1956,6 +2023,15 @@ export type BillingCapabilitiesResponse = {
1956
2023
  *
1957
2024
  */
1958
2025
  billing_notice_audience?: 'none' | 'team' | 'personal';
2026
+ /**
2027
+ * Which checkout UI billing-web renders for this user: the
2028
+ * billing_web_checkout_ui rollout flag, evaluated by ingest the same
2029
+ * way GET /api/features evaluates it. Any evaluation failure reads as
2030
+ * embedded. It lets a caller that cannot read /api/features, such as
2031
+ * a billing handoff's scoped session, render the same checkout.
2032
+ *
2033
+ */
2034
+ billing_web_checkout_ui: 'embedded' | 'full_page';
1959
2035
  capabilities: BillingCapabilities;
1960
2036
  denied_reason_params?: BillingCapabilityDenialParams;
1961
2037
  denied_reasons?: BillingCapabilityDenials;
@@ -2010,6 +2086,26 @@ export type BillingCapabilitiesResponse = {
2010
2086
  *
2011
2087
  */
2012
2088
  plan_kind?: 'none' | 'self_serve' | 'sales_managed';
2089
+ /**
2090
+ * The single billing action for this actor in the Cloud profile menu's
2091
+ * credits row. Render as received, not derived from other capabilities.
2092
+ * Members and unknown subscription/payment-recovery state receive none.
2093
+ * Enterprise owners receive only permitted Add credits, including on
2094
+ * reserved rows. Reserved self-serve signup rows receive none; use
2095
+ * subscription_payment_recovery on plans for their Finish payment.
2096
+ * For other eligible owners, verified payment recovery wins, then
2097
+ * Subscribe/Resubscribe without a running paid plan, then Add credits
2098
+ * for a running paid plan (even with zero credits), then permitted
2099
+ * Resubscribe for an ending plan. FREE uses Subscribe, not Resubscribe.
2100
+ * A no-plan Subscribe refusal never falls back to Add credits.
2101
+ * This is not global top-up eligibility, other surfaces' button emphasis
2102
+ * or write authorization. can_top_up still permits purchases without
2103
+ * a plan; local clients retain existing guidance. Older servers and
2104
+ * disabled billing omit the field. Absent, invalid or failed reads
2105
+ * must show no row action.
2106
+ *
2107
+ */
2108
+ primary_billing_action?: 'update_payment' | 'subscribe' | 'resubscribe' | 'add_credits' | 'none';
2013
2109
  /**
2014
2110
  * Where the customer goes when the plan has ended. Rendered as received;
2015
2111
  * never derive it from tier names or slugs.
@@ -2460,7 +2556,7 @@ export type BillingCapabilityDenials = {
2460
2556
  * - payment_past_due: The failed subscription payment must be resolved before credits can be bought.
2461
2557
  * - tier_not_self_serve: The existing subscription tier is unrecognized.
2462
2558
  * - subscription_status_unrecognized: The subscription status is unrecognized.
2463
- * - topup_purchases_paused: Staff paused customer credit purchases; this lifts without customer action.
2559
+ * - topup_purchases_paused: Accepted from older billing servers only; current policy does not emit this visibility refusal.
2464
2560
  *
2465
2561
  */
2466
2562
  can_view_auto_top_up?: 'not_a_member' | 'not_workspace_owner' | 'creator_only_provisioning' | 'payment_past_due' | 'tier_not_self_serve' | 'subscription_status_unrecognized' | 'topup_purchases_paused';
@@ -2471,7 +2567,7 @@ export type BillingCapabilityDenials = {
2471
2567
  * - payment_past_due: The failed subscription payment must be resolved before credits can be bought, including a paused workspace.
2472
2568
  * - tier_not_self_serve: The existing subscription tier is unrecognized.
2473
2569
  * - subscription_status_unrecognized: The subscription status is unrecognized.
2474
- * - topup_purchases_paused: Staff paused customer credit purchases; this lifts without customer action.
2570
+ * - topup_purchases_paused: Accepted from older billing servers only; current policy does not emit this visibility refusal.
2475
2571
  *
2476
2572
  */
2477
2573
  can_view_auto_top_up_member_notice?: 'not_a_member' | 'workspace_owner' | 'payment_past_due' | 'tier_not_self_serve' | 'subscription_status_unrecognized' | 'topup_purchases_paused';
@@ -2616,6 +2712,102 @@ export type BillingEventsResponse = {
2616
2712
  */
2617
2713
  totalPages: number;
2618
2714
  };
2715
+ /**
2716
+ * Asks for a one-time handoff that signs a billing receiver tab in as the caller.
2717
+ */
2718
+ export type BillingHandoffCreateRequest = {
2719
+ /**
2720
+ * Version of the issuing app, for logs.
2721
+ */
2722
+ client_version: string;
2723
+ /**
2724
+ * Billing app that will exchange the handoff; its origin is the only one the exchange accepts.
2725
+ */
2726
+ receiver: 'billing_web' | 'platform';
2727
+ /**
2728
+ * Client-asserted; stages the rollout, not a security boundary.
2729
+ */
2730
+ surface: 'local_web' | 'desktop';
2731
+ /**
2732
+ * Workspace the handoff and its session are bound to. An OAuth access token may name only its own workspace.
2733
+ */
2734
+ workspace_id: string;
2735
+ };
2736
+ /**
2737
+ * An issued handoff. The token is single use and expires within 60 seconds.
2738
+ */
2739
+ export type BillingHandoffCreateResponse = {
2740
+ /**
2741
+ * The receiver's handoff page with the token in the fragment. Open it, never display it.
2742
+ */
2743
+ entry_url: string;
2744
+ /**
2745
+ * When the handoff can no longer be exchanged.
2746
+ */
2747
+ expires_at: string;
2748
+ /**
2749
+ * Id of the stored handoff, for support and logs.
2750
+ */
2751
+ request_id: string;
2752
+ };
2753
+ /**
2754
+ * The handoff token a receiver read from its URL fragment.
2755
+ */
2756
+ export type BillingHandoffExchangeRequest = {
2757
+ /**
2758
+ * The raw handoff token from the entry URL fragment.
2759
+ */
2760
+ token: string;
2761
+ };
2762
+ /**
2763
+ * A scoped billing session for the handoff's user and workspace.
2764
+ */
2765
+ export type BillingHandoffExchangeResponse = {
2766
+ /**
2767
+ * When the session ends; it is never extended. At most 30 minutes, and never after the source sign-in expires.
2768
+ */
2769
+ expires_at: string;
2770
+ /**
2771
+ * The user's role in the workspace at exchange time.
2772
+ */
2773
+ role: 'owner' | 'member';
2774
+ /**
2775
+ * Bearer for billing routes of the bound workspace only.
2776
+ */
2777
+ session_token: string;
2778
+ user: BillingHandoffUser;
2779
+ workspace: BillingHandoffWorkspace;
2780
+ };
2781
+ /**
2782
+ * The user a scoped billing session acts as.
2783
+ */
2784
+ export type BillingHandoffUser = {
2785
+ /**
2786
+ * The user's email address.
2787
+ */
2788
+ email: string;
2789
+ /**
2790
+ * Comfy user id.
2791
+ */
2792
+ id: string;
2793
+ };
2794
+ /**
2795
+ * The workspace a scoped billing session is bound to.
2796
+ */
2797
+ export type BillingHandoffWorkspace = {
2798
+ /**
2799
+ * Workspace id.
2800
+ */
2801
+ id: string;
2802
+ /**
2803
+ * Workspace display name.
2804
+ */
2805
+ name: string;
2806
+ /**
2807
+ * Workspace type, personal or team.
2808
+ */
2809
+ type: string;
2810
+ };
2619
2811
  export type BillingOpCancelResponse = {
2620
2812
  billing_op_id: string;
2621
2813
  /**
@@ -2766,6 +2958,9 @@ export type BillingOpStatusResponse = {
2766
2958
  *
2767
2959
  */
2768
2960
  authentication_state?: 'requires_action' | 'processing' | 'failed_retryable' | 'succeeded' | 'reconciliation_needed';
2961
+ auto_top_up?: AcceptedAutoTopUpSettings;
2962
+ auto_top_up_activation?: AutoTopUpActivation;
2963
+ auto_top_up_activation_reason?: AutoTopUpActivationReason;
2769
2964
  /**
2770
2965
  * true exactly when POST /api/billing/ops/{id}/cancel would deliver
2771
2966
  * the abandon for this caller: a pending plan change or initial
@@ -3005,6 +3200,7 @@ export type BillingStatusResponse = {
3005
3200
  [key: string]: boolean;
3006
3201
  };
3007
3202
  subscription_duration?: SubscriptionDuration;
3203
+ subscription_payment_recovery?: SubscriptionPaymentRecovery;
3008
3204
  /**
3009
3205
  * Render this state without recombining payment, tier, dates or activity. Native and legacy provider history distinguish never-subscribed from ended. Ended means a historical provider Cloud subscription ended, regardless of whether an invoice was ever paid. Omitted when an older upstream/server exposes no usable history facts. Optional history failures leave guidance unknown while ordinary status remains available. Also omitted for a native live subscription when a workspace payment_failed label has no authoritative subscription-payment provenance. Unknown states must not be inferred from missing fields.
3010
3206
  */
@@ -3044,10 +3240,116 @@ export type BulkRevokeApiKeysResponse = {
3044
3240
  */
3045
3241
  revoked_count: number;
3046
3242
  };
3243
+ export type CccActivityItem = {
3244
+ /**
3245
+ * Account ID of the person who saved, published, discarded or reverted
3246
+ */
3247
+ actor_uid: string;
3248
+ at: string;
3249
+ /**
3250
+ * save only; status of the catalog revision that holds the save
3251
+ */
3252
+ catalog_status?: 'draft' | 'published' | 'reverted' | 'archived';
3253
+ /**
3254
+ * save only
3255
+ */
3256
+ changed_fields?: Array<string>;
3257
+ /**
3258
+ * publish only
3259
+ */
3260
+ file_count?: number;
3261
+ /**
3262
+ * save only; the save archives or removes the page
3263
+ */
3264
+ is_deleted?: boolean;
3265
+ /**
3266
+ * save only
3267
+ */
3268
+ is_new?: boolean;
3269
+ kind: 'save' | 'publish' | 'discard' | 'revert';
3270
+ page?: CccActivityPageRef;
3271
+ /**
3272
+ * publish only
3273
+ */
3274
+ page_count?: number;
3275
+ /**
3276
+ * publish only
3277
+ */
3278
+ pages?: Array<CccActivityPageRef>;
3279
+ /**
3280
+ * save only; absent for a first save
3281
+ */
3282
+ previous_revision_uid?: string;
3283
+ /**
3284
+ * publish only; the revision this publication restored, absent when not set
3285
+ */
3286
+ restored_from?: number;
3287
+ /**
3288
+ * revert only; the publication Live moved back to
3289
+ */
3290
+ restored_revision?: number;
3291
+ /**
3292
+ * publish only; Live later moved back before this publication
3293
+ */
3294
+ reverted?: boolean;
3295
+ /**
3296
+ * revert only; the publication taken off Live
3297
+ */
3298
+ reverted_revision?: number;
3299
+ /**
3300
+ * publish only
3301
+ */
3302
+ revision?: number;
3303
+ /**
3304
+ * save only
3305
+ */
3306
+ revision_uid?: string;
3307
+ };
3308
+ export type CccActivityPage = {
3309
+ has_more: boolean;
3310
+ items: Array<CccActivityItem>;
3311
+ /**
3312
+ * Newest publication, ignoring filters; null before any publication
3313
+ */
3314
+ last_publish: {
3315
+ actor_uid: string;
3316
+ at: string;
3317
+ /**
3318
+ * Live later moved back before this publication
3319
+ */
3320
+ reverted: boolean;
3321
+ revision: number;
3322
+ } | null;
3323
+ next_cursor?: string;
3324
+ };
3325
+ export type CccActivityPageRef = {
3326
+ /**
3327
+ * Authored page address; empty when not set
3328
+ */
3329
+ slug: string;
3330
+ /**
3331
+ * Authored title of the save; empty when not set
3332
+ */
3333
+ title: string;
3334
+ type: 'model' | 'workflow' | 'app';
3335
+ uid: string;
3336
+ };
3047
3337
  export type CccAuthoringContext = {
3048
3338
  actor_uid: string;
3339
+ /**
3340
+ * Whether this session may enter website administration
3341
+ */
3342
+ can_access_catalog: boolean;
3049
3343
  can_apply: boolean;
3050
3344
  can_edit: boolean;
3345
+ /**
3346
+ * Whether this verified interactive session has Catalog Admin status and may manage website users and permissions
3347
+ */
3348
+ can_manage_users: boolean;
3349
+ /**
3350
+ * Whether this account may use raw Catalog transfer
3351
+ */
3352
+ can_transfer: boolean;
3051
3353
  owner_uid: string;
3052
3354
  state: CccCatalogState;
3053
3355
  };
@@ -3094,6 +3396,30 @@ export type CccCreatorsPage = {
3094
3396
  items: Array<CccCreatorSummary>;
3095
3397
  next_cursor?: string;
3096
3398
  };
3399
+ /**
3400
+ * One immutable save: the flat CCCJSON read plus the status of the catalog revision that holds it and its save time.
3401
+ */
3402
+ export type CccHistoryItem = Cccjson & {
3403
+ /**
3404
+ * Status of the catalog revision that holds this save.
3405
+ */
3406
+ catalog_status: 'draft' | 'published' | 'reverted' | 'archived';
3407
+ /**
3408
+ * RFC3339 UTC save time of this exact edit.
3409
+ */
3410
+ saved_at: string;
3411
+ };
3412
+ /**
3413
+ * One page of save history, newest edit_sequence first. next_cursor is present only when has_more is true. There is no total.
3414
+ */
3415
+ export type CccHistoryPage = {
3416
+ has_more: boolean;
3417
+ items: Array<CccHistoryItem>;
3418
+ /**
3419
+ * Opaque cursor bound to this UID; pass it back as cursor.
3420
+ */
3421
+ next_cursor?: string;
3422
+ };
3097
3423
  /**
3098
3424
  * Flat type-versioned CCC JSON. Domain schemas (/api/v1/catalog/schemas/{type}/{version}) constrain authored fields. The readOnly properties are server metadata returned by reads; a save may send them back unchanged and they are ignored, never applied. expected_draft_rev and expected_revision_uid are the save concurrency tokens.
3099
3425
  */
@@ -3133,32 +3459,345 @@ export type Cccjson = {
3133
3459
  */
3134
3460
  readonly saved_by_uid?: string;
3135
3461
  /**
3136
- * Server-assigned logical resource UID.
3462
+ * Server-assigned logical resource UID.
3463
+ */
3464
+ readonly uid?: string;
3465
+ [key: string]: unknown;
3466
+ };
3467
+ /**
3468
+ * Current Hub page that replaces an old public URL
3469
+ */
3470
+ export type CccLegacyTarget = {
3471
+ /**
3472
+ * Website path of the Hub page, for example /hub/workflows/<slug>/
3473
+ */
3474
+ path: string;
3475
+ /**
3476
+ * Current slug of the record
3477
+ */
3478
+ slug: string;
3479
+ type: 'workflow' | 'app' | 'model';
3480
+ };
3481
+ export type CccMediaConstraint = {
3482
+ max_bytes?: number;
3483
+ max_height?: number;
3484
+ max_width?: number;
3485
+ mime_type: string;
3486
+ min_bytes?: number;
3487
+ };
3488
+ /**
3489
+ * Matching pages per type. Every filter applies except types.
3490
+ */
3491
+ export type CccPageCounts = {
3492
+ app: number;
3493
+ model: number;
3494
+ workflow: number;
3495
+ };
3496
+ /**
3497
+ * Display data for the row.
3498
+ */
3499
+ export type CccPagePresentation = {
3500
+ preview?: CccPagePreview;
3501
+ };
3502
+ /**
3503
+ * Card picture. Absent when the page has none, which is what missing=cover selects.
3504
+ */
3505
+ export type CccPagePreview = {
3506
+ kind: 'image' | 'video';
3507
+ /**
3508
+ * Path under /api/v1/catalog for staff preview bytes.
3509
+ */
3510
+ src: string;
3511
+ };
3512
+ /**
3513
+ * One model, workflow or app page at its Draft head.
3514
+ */
3515
+ export type CccPageRow = {
3516
+ /**
3517
+ * Credited account, not the saver.
3518
+ */
3519
+ author_uid: string;
3520
+ description: string;
3521
+ /**
3522
+ * Show on the Hub in the Draft head; false when unset.
3523
+ */
3524
+ enabled: boolean;
3525
+ has_draft_edits: boolean;
3526
+ has_live: boolean;
3527
+ /**
3528
+ * The Draft head start time is later than as_of, so the page is held until then whatever status says. False when no start time is set and for a removed page.
3529
+ */
3530
+ held_until_start: boolean;
3531
+ /**
3532
+ * Deleted in Draft.
3533
+ */
3534
+ is_deleted: boolean;
3535
+ /**
3536
+ * The Draft head lists hub in available_surfaces. The website serves only such pages.
3537
+ */
3538
+ on_hub: boolean;
3539
+ presentation: CccPagePresentation;
3540
+ /**
3541
+ * The Draft head edit.
3542
+ */
3543
+ revision_uid: string;
3544
+ /**
3545
+ * Save time of the Draft head.
3546
+ */
3547
+ saved_at: string;
3548
+ /**
3549
+ * Account that saved the Draft head. An account ID, not a display name.
3550
+ */
3551
+ saved_by_uid: string;
3552
+ /**
3553
+ * Empty when the page has no address yet.
3554
+ */
3555
+ slug: string;
3556
+ /**
3557
+ * The first that applies, in this order. hidden also covers a page that is not on the hub surface.
3558
+ */
3559
+ status: 'removed' | 'not_live' | 'unpublished' | 'hidden' | 'scheduled' | 'live';
3560
+ title: string;
3561
+ type: 'model' | 'workflow' | 'app';
3562
+ uid: string;
3563
+ /**
3564
+ * Audience in the Draft head, for example public or staff. status ignores it.
3565
+ */
3566
+ visibility: string;
3567
+ /**
3568
+ * Draft head start time as RFC3339, or an empty string when unset.
3569
+ */
3570
+ visible_from: string;
3571
+ };
3572
+ /**
3573
+ * One page of the staff page list.
3574
+ */
3575
+ export type CccPagesPage = {
3576
+ /**
3577
+ * Time that decides scheduled; continuations keep the first page's value.
3578
+ */
3579
+ as_of: string;
3580
+ counts: CccPageCounts;
3581
+ has_more: boolean;
3582
+ items: Array<CccPageRow>;
3583
+ /**
3584
+ * Opaque; send it back with the same filters, sort and limit.
3585
+ */
3586
+ next_cursor?: string;
3587
+ state: CccPagesState;
3588
+ };
3589
+ /**
3590
+ * Live and Draft revisions this page was read from.
3591
+ */
3592
+ export type CccPagesState = {
3593
+ draft_generation: number;
3594
+ draft_rev: number;
3595
+ live_rev: number;
3596
+ next_rev: number;
3597
+ previous_live_rev: number | null;
3598
+ };
3599
+ export type CccPublicItemsPage = ContentCatalogProjection & {
3600
+ has_more: boolean;
3601
+ /**
3602
+ * Opaque continuation bound to this query and publication identity; omitted on the last page.
3603
+ */
3604
+ next_cursor?: string;
3605
+ page_size: number;
3606
+ };
3607
+ /**
3608
+ * Holds when field equals equals (a bool or string). if_absent decides when field is absent or null; a value of another shape holds.
3609
+ */
3610
+ export type CccPublicationCondition = {
3611
+ /**
3612
+ * A boolean or string.
3613
+ */
3614
+ equals: unknown;
3615
+ field: string;
3616
+ if_absent?: CccPublicationCondition;
3617
+ };
3618
+ /**
3619
+ * One publish-time field rule. Publish enforces required levels, media constraints and resolves_to references; recommended levels are advice only.
3620
+ */
3621
+ export type CccPublicationRule = {
3622
+ /**
3623
+ * Document paths such as $.title or $.workflow_versions[0].api. A level is met when any one is filled; [*] matches every array index.
3624
+ */
3625
+ fields: Array<string>;
3626
+ /**
3627
+ * Absent means the rule only constrains a value that is set.
3628
+ */
3629
+ level?: 'required' | 'recommended';
3630
+ media?: CccMediaConstraint;
3631
+ /**
3632
+ * Display text. Required and media faults return it.
3633
+ */
3634
+ message: string;
3635
+ /**
3636
+ * Content type a referenced UID must resolve to as enabled public content; "content" means any type.
3637
+ */
3638
+ resolves_to?: string;
3639
+ /**
3640
+ * Content types the rule applies to; absent means every type.
3641
+ */
3642
+ types?: Array<'model' | 'workflow' | 'app' | 'template_set'>;
3643
+ when?: CccPublicationCondition;
3644
+ };
3645
+ /**
3646
+ * Every tag on the eligible hub model and workflow pages, most used first
3647
+ */
3648
+ export type CccSiteTagUsage = {
3649
+ /**
3650
+ * Draft generation, returned for both views
3651
+ */
3652
+ generation: number;
3653
+ /**
3654
+ * Draft revision for DRAFT, Live revision for LIVE
3655
+ */
3656
+ revision_id: number;
3657
+ tags: Array<CccSiteTagUsageItem>;
3658
+ };
3659
+ /**
3660
+ * One tag and the number of eligible model and workflow pages that carry it
3661
+ */
3662
+ export type CccSiteTagUsageItem = {
3663
+ /**
3664
+ * Number of eligible model and workflow pages that carry the tag
3665
+ */
3666
+ count: number;
3667
+ /**
3668
+ * Tag text with surrounding whitespace trimmed; case is kept
3669
+ */
3670
+ tag: string;
3671
+ };
3672
+ export type CccStaffPermissions = {
3673
+ account_id: string;
3674
+ /**
3675
+ * Optional HTTPS Catalog profile avatar on permission lists; render an initials icon when absent
3676
+ */
3677
+ avatar_url?: string;
3678
+ can_edit: boolean;
3679
+ can_manage_users: boolean;
3680
+ can_publish: boolean;
3681
+ can_transfer: boolean;
3682
+ /**
3683
+ * Display-only name on permission lists; empty when no safe name is available; never grants authority
3684
+ */
3685
+ display_name?: string;
3686
+ updated_at: string;
3687
+ updated_by: string;
3688
+ version: number;
3689
+ };
3690
+ export type CccStagingMediaUse = {
3691
+ /**
3692
+ * True when the pinned version is not the newest file version.
3693
+ */
3694
+ differs_from_head: boolean;
3695
+ /**
3696
+ * Exact file version the page pins, when it pins one.
3697
+ */
3698
+ file_version_uid?: string;
3699
+ is_deleted: boolean;
3700
+ mime_type?: string;
3701
+ name?: string;
3702
+ /**
3703
+ * True when the page is the upload's recorded origin (legacy imports only).
3704
+ */
3705
+ origin: boolean;
3706
+ slug?: string;
3707
+ title: string;
3708
+ type: 'model' | 'workflow' | 'app' | 'template_set';
3709
+ uid: string;
3710
+ };
3711
+ export type CccStagingPresentation = {
3712
+ media_name?: string;
3713
+ preview?: {
3714
+ kind: 'image' | 'video';
3715
+ src: string;
3716
+ };
3717
+ /**
3718
+ * Draft pages that reference this media row.
3719
+ */
3720
+ uses?: Array<CccStagingMediaUse>;
3721
+ [key: string]: unknown;
3722
+ };
3723
+ export type CccStagingResource = {
3724
+ /**
3725
+ * Credited author at this version; not the saver.
3726
+ */
3727
+ author_uid: string;
3728
+ /**
3729
+ * Sparse display fields on page and selection rows (title, name, slug, provider, change_id, visible_from, visibility, enabled); the full document on detail rows.
3730
+ */
3731
+ document: {
3732
+ change_id?: string;
3733
+ enabled?: boolean;
3734
+ name?: string;
3735
+ provider?: string;
3736
+ slug?: string;
3737
+ title?: string;
3738
+ /**
3739
+ * Audience of the page as saved in this change.
3740
+ */
3741
+ visibility?: string;
3742
+ visible_from?: string;
3743
+ [key: string]: unknown;
3744
+ };
3745
+ is_deleted: boolean;
3746
+ revision_uid: string;
3747
+ /**
3748
+ * Account that saved this exact change. Absent on before rows.
3137
3749
  */
3138
- readonly uid?: string;
3750
+ saved_by_uid?: string;
3751
+ type: 'model' | 'workflow' | 'app' | 'media' | 'template_set';
3752
+ uid: string;
3139
3753
  [key: string]: unknown;
3140
3754
  };
3141
3755
  /**
3142
- * Current Hub page that replaces an old public URL
3756
+ * Staging read. Page and selection rows are sparse; detail and the legacy read return full content.
3143
3757
  */
3144
- export type CccLegacyTarget = {
3758
+ export type CccStagingReview = {
3759
+ items?: Array<CccStagingRow>;
3760
+ representation?: 'page' | 'selection' | 'detail';
3761
+ selection_digest?: string;
3762
+ state?: CccCatalogState;
3763
+ unresolved_count?: number;
3764
+ [key: string]: unknown;
3765
+ };
3766
+ export type CccStagingRow = {
3767
+ before?: CccStagingResource;
3768
+ content: CccStagingResource;
3769
+ decision: 'NEW' | 'APPROVED' | 'DEFERRED' | 'DELETED';
3770
+ presentation?: CccStagingPresentation;
3145
3771
  /**
3146
- * Website path of the Hub page, for example /hub/workflows/<slug>/
3772
+ * RFC3339 UTC save time of this exact change.
3147
3773
  */
3148
- path: string;
3774
+ saved_at?: string;
3775
+ status: 'NEW' | 'APPROVED' | 'DEFERRED' | 'DELETED';
3776
+ summary: string;
3777
+ [key: string]: unknown;
3778
+ };
3779
+ export type CccTypeSchema = {
3780
+ contract_version: string;
3781
+ environment: string;
3782
+ format: 'openapi-3.0-schema';
3149
3783
  /**
3150
- * Current slug of the record
3784
+ * Content types only.
3151
3785
  */
3152
- slug: string;
3153
- type: 'workflow' | 'app' | 'model';
3154
- };
3155
- export type CccPublicItemsPage = ContentCatalogProjection & {
3156
- has_more: boolean;
3786
+ publication?: {
3787
+ rules: Array<CccPublicationRule>;
3788
+ };
3157
3789
  /**
3158
- * Opaque continuation bound to this query and publication identity; omitted on the last page.
3790
+ * OpenAPI 3.0 schema the save validator applies.
3159
3791
  */
3160
- next_cursor?: string;
3161
- page_size: number;
3792
+ schema: {
3793
+ [key: string]: unknown;
3794
+ };
3795
+ schema_version: number;
3796
+ /**
3797
+ * Content types only. The readOnly CCCJSON properties; a save never applies them.
3798
+ */
3799
+ server_fields?: Array<string>;
3800
+ type: 'model' | 'workflow' | 'app' | 'template_set' | 'media';
3162
3801
  };
3163
3802
  export type CccWebsiteCardFacet = {
3164
3803
  /**
@@ -3388,6 +4027,10 @@ export type ContentCatalogRecord = {
3388
4027
  edit_version: string;
3389
4028
  enabled: boolean;
3390
4029
  kind: 'MODEL' | 'WORKFLOW' | 'APP' | 'TEMPLATE_SET';
4030
+ /**
4031
+ * When the page's public content last changed: its publication or a later revert. Set on LIVE card reads only.
4032
+ */
4033
+ last_modified?: string;
3391
4034
  /**
3392
4035
  * Integer revision supplying this entity; may precede the requested catalog revision.
3393
4036
  */
@@ -3479,6 +4122,7 @@ export type CreateTopupCheckoutRequest = {
3479
4122
  *
3480
4123
  */
3481
4124
  amount_cents: number;
4125
+ auto_top_up?: TopupAutoTopUpSettings;
3482
4126
  /**
3483
4127
  * Optional client-provided key. Forwarded to Stripe so a double-submit
3484
4128
  * collapses onto one session instead of minting two payable links.
@@ -3520,7 +4164,7 @@ export type CreateTopupQuoteRequest = {
3520
4164
  amount_cents: number;
3521
4165
  };
3522
4166
  /**
3523
- * Legacy on-file top-up. Explicit payment authority and save/default fields require the dedicated interactive route and are rejected here, including null or false values.
4167
+ * Legacy on-file top-up. Explicit payment authority, save/default fields and auto_top_up require the dedicated interactive route and are rejected here, including null or false values.
3524
4168
  */
3525
4169
  export type CreateTopupRequest = {
3526
4170
  /**
@@ -4072,7 +4716,7 @@ export type ExecutionError = {
4072
4716
  */
4073
4717
  node_type: string;
4074
4718
  /**
4075
- * Array of traceback lines (empty array if not available)
4719
+ * Array of traceback lines (empty array if not available). In a job's detail (GET /api/jobs/{job_id}) for a failed run on a deployment, read by a member of the job's workspace, the last item may instead hold the end of what the run printed, opening with the line `What this run printed (up to the last 8 KB):`. The jobs list never carries that item.
4076
4720
  */
4077
4721
  traceback: Array<string>;
4078
4722
  };
@@ -4373,6 +5017,9 @@ export type HostedTopupCheckout = {
4373
5017
  * Original credit purchase amount before promotions, not the settled payment amount.
4374
5018
  */
4375
5019
  amount_cents: number;
5020
+ auto_top_up?: AcceptedAutoTopUpSettings;
5021
+ auto_top_up_activation?: AutoTopUpActivation;
5022
+ auto_top_up_activation_reason?: AutoTopUpActivationReason;
4376
5023
  /**
4377
5024
  * Actual USD Stripe total after promotions, including a confirmed fully discounted zero. Null when unavailable; use this for payment messages, not amount_cents.
4378
5025
  */
@@ -4758,6 +5405,7 @@ export type InteractiveTopupRequest = {
4758
5405
  * Nominal credit purchase in USD cents, excluding tax and discounts; at most `max_topup_cents` on GET /api/billing/balance. Actual payment and credit grant are asynchronous.
4759
5406
  */
4760
5407
  amount_cents: number;
5408
+ auto_top_up?: TopupAutoTopUpSettings;
4761
5409
  /**
4762
5410
  * Client-minted identifier for one checkout attempt, generated when
4763
5411
  * the customer starts checkout and sent on every request and
@@ -5448,34 +6096,84 @@ export type ModelFolder = {
5448
6096
  */
5449
6097
  name: string;
5450
6098
  };
6099
+ /**
6100
+ * Optional client observations. Invalid values are discarded without refusing the upload.
6101
+ * Unknown or absent client becomes unknown. Missing resumed stays unknown; choosing resumable mode
6102
+ * does not mean recovery. Start ignores resumed. Older servers ignore this entire object.
6103
+ *
6104
+ */
6105
+ export type ModelUploadAnalytics = {
6106
+ /**
6107
+ * editor, comfy_cli or platform; other values normalize to unknown.
6108
+ */
6109
+ client?: string;
6110
+ /**
6111
+ * True only after recovery continued from a nonzero stored offset; false for an observed fresh transfer. Omit when unknown.
6112
+ */
6113
+ resumed?: boolean;
6114
+ };
5451
6115
  /**
5452
6116
  * Where and how the browser sends a model file's bytes (POST /api/assets/uploads).
5453
6117
  */
5454
6118
  export type ModelUploadStarted = {
5455
6119
  /**
5456
- * When `upload_url` stops working (15 minutes after the answer).
6120
+ * Suggested piece size, 67108864 (64 MiB), only for resumable sessions. The last piece may be shorter.
6121
+ */
6122
+ chunk_size_bytes?: number;
6123
+ /**
6124
+ * When `upload_url` stops working (15 minutes for a signed URL, seven days for a resumable session).
5457
6125
  */
5458
6126
  expires_at: string;
5459
6127
  /**
5460
- * Every header the PUT must send, with exactly these values (`Content-Type`, `x-goog-content-length-range` and `x-goog-if-generation-match` set to `0`, which makes storage refuse a second write to the object).
6128
+ * Empty for a resumable session, whose pieces send `Content-Range`. Otherwise every header the PUT must send, with exactly these values (`Content-Type`, `x-goog-content-length-range` and `x-goog-if-generation-match` set to `0`, which makes storage refuse a second write to the object).
5461
6129
  */
5462
6130
  headers: {
5463
6131
  [key: string]: string;
5464
6132
  };
5465
6133
  /**
5466
- * The largest file an upload accepts, 2147483648 (2 GiB).
6134
+ * The largest file the answered mode accepts, 2147483648 (2 GiB) or 26843545600 (25 GiB).
5467
6135
  */
5468
6136
  max_size_bytes: number;
5469
6137
  method: 'PUT';
6138
+ /**
6139
+ * Version 1 accepts optional metadata and terminal client reports. Absence means unsupported.
6140
+ */
6141
+ upload_analytics_version?: number;
5470
6142
  /**
5471
6143
  * Names this upload in `POST /api/assets/uploads/{upload_id}/complete`.
5472
6144
  */
5473
6145
  upload_id: string;
5474
6146
  /**
5475
- * Signed URL for exactly one staged object; works until `expires_at`.
6147
+ * Present only for a resumable session. Clients must tolerate unknown values and refuse unsupported modes without sending bytes. When absent, send one PUT with the returned headers.
6148
+ */
6149
+ upload_mode?: 'resumable';
6150
+ /**
6151
+ * Signed URL or GCS resumable session for exactly one staged object; works until `expires_at`. Treat it as a credential.
5476
6152
  */
5477
6153
  upload_url: string;
5478
6154
  };
6155
+ export type ModelUploadTransferReport = {
6156
+ /**
6157
+ * editor, comfy_cli or platform; other values normalize to unknown.
6158
+ */
6159
+ client: string;
6160
+ /**
6161
+ * One folder from model_upload_folders in GET /api/features.
6162
+ */
6163
+ model_folder: string;
6164
+ /**
6165
+ * Terminal transfer failure; canceled reports a user cancellation.
6166
+ */
6167
+ reason: 'network' | 'http' | 'session_expired' | 'file_changed' | 'file_unreadable' | 'canceled' | 'unknown';
6168
+ /**
6169
+ * Actual recovery from a nonzero stored offset; omit when unknown.
6170
+ */
6171
+ resumed?: boolean;
6172
+ /**
6173
+ * Client-reported file size.
6174
+ */
6175
+ size_bytes: number;
6176
+ };
5479
6177
  /**
5480
6178
  * The next charge to the card on file, as Stripe's invoice preview reported it, after proration, discounts, tax and account credit.
5481
6179
  */
@@ -5969,6 +6667,10 @@ export type Plan = {
5969
6667
  credits_cents: number;
5970
6668
  denied_reason?: PlanActionDeniedReason;
5971
6669
  denied_reason_params?: PlanActionDeniedReasonParams;
6670
+ /**
6671
+ * Display-only whole percentage saved by this personal annual offer against list_price_cents, rounded down from 100 * (list_price_cents - price_cents) / list_price_cents. Present together with list_price_cents only when the rounded saving is at least 1%; clients render this value instead of deriving it.
6672
+ */
6673
+ discount_percent?: number;
5972
6674
  duration: SubscriptionDuration;
5973
6675
  /**
5974
6676
  * Optional ordered localization companion selected by the server. Only available items appear in the existing features strings; coming-soon items remain separate. Key is a stable semantic identifier, not a client locale path. Clients map known keys to translations and may use text as an English fallback according to their locale policy. Unknown keys never imply entitlements. Omitted for older string-only metadata. Team count uses the resolved max_seats.
@@ -5978,6 +6680,10 @@ export type Plan = {
5978
6680
  * Optional ordered English feature copy for this offer, for display only. Omitted when metadata is unavailable. Team member count uses max_seats. Does not grant entitlements or change plan actions or availability.
5979
6681
  */
5980
6682
  features?: Array<string>;
6683
+ /**
6684
+ * Display-only yearly total of the matching personal monthly offer (its served price_cents multiplied by 12). Present together with discount_percent only for priced Standard, Creator and Pro annual offers with at least a 1% saving. Omitted for monthly offers, missing monthly counterparts, unpriced annual offers and smaller or no savings. Not an invoice quote.
6685
+ */
6686
+ list_price_cents?: number;
5981
6687
  /**
5982
6688
  * Maximum number of seats allowed for this plan
5983
6689
  */
@@ -6185,6 +6891,16 @@ export type PreviewSubscribeResponse = {
6185
6891
  *
6186
6892
  */
6187
6893
  balance_applied_cents?: number;
6894
+ /**
6895
+ * The date the current subscription is set to end because a
6896
+ * cancellation is scheduled. Present only when a cancellation is
6897
+ * scheduled, which is exactly when requires_reactivation_confirmation
6898
+ * is true. Use this, not current_plan.period_end, for the
6899
+ * reactivation banner: period_end is the provider's billing-period
6900
+ * boundary and can differ from a mid-period cancellation date.
6901
+ *
6902
+ */
6903
+ cancel_at?: string;
6188
6904
  /**
6189
6905
  * Amount that will be charged at next billing period in cents
6190
6906
  */
@@ -6313,9 +7029,10 @@ export type PreviewSubscribeResponse = {
6313
7029
  requires_reactivation_charge_confirmation?: boolean;
6314
7030
  /**
6315
7031
  * Whether this previewed change requires explicit reactivation
6316
- * consent. Computed from the persisted subscription and a short-lived
6317
- * cache of Stripe lifecycle state. The subscribe enforcement path
6318
- * performs its own uncached Stripe lifecycle read.
7032
+ * consent. Present on every successful preview, with or without
7033
+ * embedded checkout. Computed from the persisted subscription and a
7034
+ * short-lived cache of Stripe lifecycle state. The subscribe
7035
+ * enforcement path performs its own uncached Stripe lifecycle read.
6319
7036
  *
6320
7037
  */
6321
7038
  requires_reactivation_confirmation?: boolean;
@@ -7453,6 +8170,27 @@ export type TopUpPurchaseAmount = {
7453
8170
  amount_cents: number;
7454
8171
  currency: 'usd';
7455
8172
  };
8173
+ /**
8174
+ * Turns auto top-up on after this purchase's payment succeeds; the server does it, so never follow with PUT /api/billing/auto-reload. Absent leaves auto top-up unchanged. Owner who may manage auto top-up only. Hosted checkout shows a $0.00 "Auto top-up" line and consent covering future top-ups.
8175
+ * PUT /api/billing/auto-reload's enabled-save rules apply before anything is charged (400 INVALID_AUTO_TOP_UP); 400 AUTO_TOP_UP_NOT_ELIGIBLE when setup is unavailable or frozen except for a missing default card; 400 AUTO_TOP_UP_NOT_AVAILABLE when first enrollment is outside the rollout.
8176
+ * Auto top-up charges the default card. With none, the paid card is saved off-session and becomes the default; an existing default is kept and a new card is not saved. On the interactive route a new card's confirmation token must use setup_future_usage off_session exactly when there is no default card.
8177
+ * A replay with other settings is refused. The outcome is auto_top_up_activation on the checkout read (hosted) or GET /api/billing/ops/{id} (interactive).
8178
+ *
8179
+ */
8180
+ export type TopupAutoTopUpSettings = {
8181
+ /**
8182
+ * Owner monthly limit in USD cents. Absent or null means no owner limit and is stored as max_monthly_budget_cents, with monthly_budget_is_default true.
8183
+ */
8184
+ monthly_budget_cents?: number | null;
8185
+ /**
8186
+ * The balance each auto top-up buys back up to.
8187
+ */
8188
+ target_credits: number;
8189
+ /**
8190
+ * Auto top-up runs when the balance drops below this many credits.
8191
+ */
8192
+ threshold_credits: number;
8193
+ };
7456
8194
  /**
7457
8195
  * What a credit top-up of the requested amount would grant.
7458
8196
  */
@@ -7893,6 +8631,23 @@ export type WorkflowResponse = {
7893
8631
  name?: string;
7894
8632
  updated_at: string;
7895
8633
  };
8634
+ /**
8635
+ * The sidebar file a workflow was copied from, when the two agree. No content and no userdata id: open the path through the userdata API.
8636
+ */
8637
+ export type WorkflowSidebarFileResponse = {
8638
+ /**
8639
+ * UNIX timestamp of the last modification in milliseconds, the same unit as GET /api/userdata?full_info=true.
8640
+ */
8641
+ modified: number;
8642
+ /**
8643
+ * The userdata path, `workflows/<name>.json`.
8644
+ */
8645
+ path: string;
8646
+ /**
8647
+ * File size in bytes.
8648
+ */
8649
+ size: number;
8650
+ };
7896
8651
  /**
7897
8652
  * Workflow metadata captured at mint time. The subsequent PUT body is the
7898
8653
  * raw workflow JSON document and nothing else, so everything that would
@@ -8255,6 +9010,30 @@ export type AssetCreatedWritable = AssetWritable & {
8255
9010
  */
8256
9011
  created_new: boolean;
8257
9012
  };
9013
+ /**
9014
+ * One immutable save: the flat CCCJSON read plus the status of the catalog revision that holds it and its save time.
9015
+ */
9016
+ export type CccHistoryItemWritable = {
9017
+ /**
9018
+ * Status of the catalog revision that holds this save.
9019
+ */
9020
+ catalog_status: 'draft' | 'published' | 'reverted' | 'archived';
9021
+ /**
9022
+ * RFC3339 UTC save time of this exact edit.
9023
+ */
9024
+ saved_at: string;
9025
+ };
9026
+ /**
9027
+ * One page of save history, newest edit_sequence first. next_cursor is present only when has_more is true. There is no total.
9028
+ */
9029
+ export type CccHistoryPageWritable = {
9030
+ has_more: boolean;
9031
+ items: Array<CccHistoryItemWritable>;
9032
+ /**
9033
+ * Opaque cursor bound to this UID; pass it back as cursor.
9034
+ */
9035
+ next_cursor?: string;
9036
+ };
8258
9037
  /**
8259
9038
  * Paginated list of assets belonging to the authenticated user.
8260
9039
  */
@@ -8520,6 +9299,75 @@ export type GetAgentEventsErrors = {
8520
9299
  404: unknown;
8521
9300
  };
8522
9301
  export type GetAgentEventsError = GetAgentEventsErrors[keyof GetAgentEventsErrors];
9302
+ export type AgentGetExecutionsData = {
9303
+ body?: never;
9304
+ path?: never;
9305
+ query?: {
9306
+ /**
9307
+ * Thread UUID; required together with message_id
9308
+ */
9309
+ thread_id?: string;
9310
+ /**
9311
+ * Exact assistant message UUID; required together with thread_id
9312
+ */
9313
+ message_id?: string;
9314
+ };
9315
+ url: '/api/agent/executions';
9316
+ };
9317
+ export type AgentGetExecutionsErrors = {
9318
+ /**
9319
+ * Both identifiers must be supplied as UUIDs, or session workspace selection refused (workspace_id_invalid)
9320
+ */
9321
+ 400: ErrorResponse | AgentError;
9322
+ /**
9323
+ * Authentication required; ingest uses ErrorResponse and the agent identity guard uses AgentError
9324
+ */
9325
+ 401: ErrorResponse | AgentError;
9326
+ /**
9327
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
9328
+ */
9329
+ 403: ForbiddenError;
9330
+ /**
9331
+ * Assistant message not found in the caller's thread and workspace
9332
+ */
9333
+ 404: unknown;
9334
+ /**
9335
+ * Observation unavailable; must not be interpreted as an empty set
9336
+ */
9337
+ 500: unknown;
9338
+ /**
9339
+ * Agent service unavailable
9340
+ */
9341
+ 502: unknown;
9342
+ /**
9343
+ * Execution observation unavailable
9344
+ */
9345
+ 503: unknown;
9346
+ };
9347
+ export type AgentGetExecutionsError = AgentGetExecutionsErrors[keyof AgentGetExecutionsErrors];
9348
+ export type AgentGetExecutionsResponses = {
9349
+ /**
9350
+ * Contract probe or the complete uncapped submission snapshot
9351
+ */
9352
+ 200: {
9353
+ complete?: boolean;
9354
+ executions?: Array<{
9355
+ job_id: string;
9356
+ paid: boolean | null;
9357
+ partner: boolean | null;
9358
+ /**
9359
+ * Raw jobs state, including error, cancelled and executing; unknown if unavailable
9360
+ */
9361
+ status: string;
9362
+ submitted_at: string;
9363
+ }>;
9364
+ message_id?: string;
9365
+ schema_version: 'agent-executions.v1';
9366
+ thread_id?: string;
9367
+ turn_id?: string;
9368
+ };
9369
+ };
9370
+ export type AgentGetExecutionsResponse = AgentGetExecutionsResponses[keyof AgentGetExecutionsResponses];
8523
9371
  export type AgentGetIdentityData = {
8524
9372
  body?: never;
8525
9373
  path?: never;
@@ -9224,9 +10072,9 @@ export type AgentPostMessageErrors = {
9224
10072
  */
9225
10073
  403: ErrorResponse | AgentError;
9226
10074
  /**
9227
- * One or more attachments name a file type the agent does not accept. The body names the offending references and carries the full accepted policy, so the client can explain the refusal without hardcoding the list.
10075
+ * The selected model is unavailable, or one or more attachments name a file type the agent does not accept. A model refusal writes no thread or message row and does not substitute another model. An attachment refusal names the offending references and carries the full accepted policy, so the client can explain the refusal without hardcoding the list.
9228
10076
  */
9229
- 422: AgentAttachmentError;
10077
+ 422: AgentAttachmentError | AgentModelUnavailable;
9230
10078
  /**
9231
10079
  * Rate limit exceeded: the request was refused before it reached the agent, so nothing ran. The body is a fixed message with no code to branch on.
9232
10080
  */
@@ -9932,11 +10780,11 @@ export type CreateAssetDownloadErrors = {
9932
10780
  */
9933
10781
  403: ForbiddenError;
9934
10782
  /**
9935
- * Validation errors
10783
+ * Validation errors, or `CONTENT_BLOCKED` when content moderation has already blocked the file's bytes (no download task is created)
9936
10784
  */
9937
10785
  422: ErrorResponse;
9938
10786
  /**
9939
- * Internal server error
10787
+ * Internal server error, including when the content moderation status of the file's bytes could not be read (retriable; no download task is created)
9940
10788
  */
9941
10789
  500: ErrorResponse;
9942
10790
  /**
@@ -10111,7 +10959,7 @@ export type CreateAssetFromHashErrors = {
10111
10959
  */
10112
10960
  422: ErrorResponse;
10113
10961
  /**
10114
- * Internal server error
10962
+ * Internal server error, including when the content moderation status of the file's bytes could not be read (retriable; no asset is created)
10115
10963
  */
10116
10964
  500: ErrorResponse;
10117
10965
  /**
@@ -10449,13 +11297,24 @@ export type StartModelUploadData = {
10449
11297
  */
10450
11298
  filename: string;
10451
11299
  /**
10452
- * The file's size, 1 to 2147483648 (2 GiB).
11300
+ * Request a resumable session for uploads up to 25 GiB. Omit or set false for the existing single PUT.
11301
+ */
11302
+ resumable?: boolean;
11303
+ /**
11304
+ * The file's size, 1 to 2147483648 (2 GiB), or 26843545600 (25 GiB) with `resumable: true`.
10453
11305
  */
10454
11306
  size_bytes: number;
10455
11307
  /**
10456
11308
  * Exactly `models` plus one model folder from `model_upload_folders` in GET /api/features (`loras`, `checkpoints`, `vae`, `embeddings`, ...); another folder is `400 UNSUPPORTED_MODEL_TYPE`.
10457
11309
  */
10458
11310
  tags: Array<string>;
11311
+ upload_analytics?: ModelUploadAnalytics;
11312
+ };
11313
+ headers?: {
11314
+ /**
11315
+ * The browser page's HTTPS origin, forwarded when opening a resumable session so its later responses carry CORS headers for that page.
11316
+ */
11317
+ Origin?: string;
10459
11318
  };
10460
11319
  path?: never;
10461
11320
  query?: never;
@@ -10463,7 +11322,7 @@ export type StartModelUploadData = {
10463
11322
  };
10464
11323
  export type StartModelUploadErrors = {
10465
11324
  /**
10466
- * `INVALID_BODY` (bad filename, size or tag list), `UNSUPPORTED_FILE_TYPE` (not `.safetensors`: a pickle format such as `.ckpt`, `.pt` or `.bin` can run code when loaded), `UNSUPPORTED_MODEL_TYPE` (`models` plus a folder not in `model_upload_folders` of GET /api/features) or `FILE_TOO_LARGE` (over 2 GiB; the message is "Files can be up to 2 GB.")
11325
+ * `INVALID_BODY` (bad filename, size or tag list), `UNSUPPORTED_FILE_TYPE` (not `.safetensors`: a pickle format such as `.ckpt`, `.pt` or `.bin` can run code when loaded), `UNSUPPORTED_MODEL_TYPE` (`models` plus a folder not in `model_upload_folders` of GET /api/features) or `FILE_TOO_LARGE` (over 2 GiB, or 25 GiB with `resumable`; the message is "Files can be up to 2 GB." or "Files can be up to 25 GB.")
10467
11326
  */
10468
11327
  400: ErrorResponse;
10469
11328
  /**
@@ -10471,7 +11330,7 @@ export type StartModelUploadErrors = {
10471
11330
  */
10472
11331
  401: ErrorResponse;
10473
11332
  /**
10474
- * `FEATURE_DISABLED` when `runtime_library_models_enabled` is off for this workspace, `PRIVATE_MODELS_DISABLED` when the workspace's plan does not include private models (the link import's check), `MODEL_STORAGE_LIMIT_REACHED` when the file would take the workspace's private models past its model storage cap (1 TB unless its plan sets another; the message names the cap, e.g. "Your workspace has used its 1 TB of model storage."), or a refused session write (see `SessionWriteForbidden`)
11333
+ * `FEATURE_DISABLED` when `runtime_library_models_enabled` is off for this workspace, or when `resumable: true` is requested while ingest's deployment switch `MODEL_UPLOAD_RESUMABLE_ENABLED` is off (default false). The error code alone does not identify which gate refused the request. For files up to 2 GiB, callers may retry with `resumable` omitted or false for a single PUT; the library flag and all other upload checks still apply. Other refusals are `PRIVATE_MODELS_DISABLED` when the workspace's plan does not include private models (the link import's check), `MODEL_STORAGE_LIMIT_REACHED` when the file would take the workspace's private models past its model storage cap (1 TB unless its plan sets another; the message names the cap, e.g. "Your workspace has used its 1 TB of model storage."), or a refused session write (see `SessionWriteForbidden`)
10475
11334
  */
10476
11335
  403: ErrorResponse;
10477
11336
  /**
@@ -10486,7 +11345,7 @@ export type StartModelUploadErrors = {
10486
11345
  export type StartModelUploadError = StartModelUploadErrors[keyof StartModelUploadErrors];
10487
11346
  export type StartModelUploadResponses = {
10488
11347
  /**
10489
- * Signed upload URL for one staged object
11348
+ * Signed upload URL or resumable session for one staged object
10490
11349
  */
10491
11350
  201: ModelUploadStarted;
10492
11351
  };
@@ -10501,6 +11360,7 @@ export type CompleteModelUploadData = {
10501
11360
  * The `tags` sent to start the upload.
10502
11361
  */
10503
11362
  tags: Array<string>;
11363
+ upload_analytics?: ModelUploadAnalytics;
10504
11364
  };
10505
11365
  path: {
10506
11366
  /**
@@ -10513,7 +11373,7 @@ export type CompleteModelUploadData = {
10513
11373
  };
10514
11374
  export type CompleteModelUploadErrors = {
10515
11375
  /**
10516
- * `INVALID_BODY` (bad filename or tag list), `UNSUPPORTED_FILE_TYPE` (not `.safetensors`), `UNSUPPORTED_MODEL_TYPE` (a folder not in `model_upload_folders`) or `FILE_TOO_LARGE` (the stored object is over 2 GiB; the message is "Files can be up to 2 GB.")
11376
+ * `INVALID_BODY` (bad filename or tag list), `UNSUPPORTED_FILE_TYPE` (not `.safetensors`), `UNSUPPORTED_MODEL_TYPE` (a folder not in `model_upload_folders`) or `FILE_TOO_LARGE` (the stored object is over 25 GiB; the message is "Files can be up to 25 GB.")
10517
11377
  */
10518
11378
  400: ErrorResponse;
10519
11379
  /**
@@ -10545,6 +11405,44 @@ export type CompleteModelUploadResponses = {
10545
11405
  202: AssetDownloadResponse;
10546
11406
  };
10547
11407
  export type CompleteModelUploadResponse = CompleteModelUploadResponses[keyof CompleteModelUploadResponses];
11408
+ export type ReportModelUploadEventData = {
11409
+ body: ModelUploadTransferReport;
11410
+ path: {
11411
+ upload_id: string;
11412
+ };
11413
+ query?: never;
11414
+ url: '/api/assets/uploads/{upload_id}/events';
11415
+ };
11416
+ export type ReportModelUploadEventErrors = {
11417
+ /**
11418
+ * Malformed report
11419
+ */
11420
+ 400: ErrorResponse;
11421
+ /**
11422
+ * Authentication required
11423
+ */
11424
+ 401: ErrorResponse;
11425
+ /**
11426
+ * Workspace or private-library access refused
11427
+ */
11428
+ 403: ErrorResponse;
11429
+ /**
11430
+ * Edge rate limit exceeded
11431
+ */
11432
+ 429: unknown;
11433
+ /**
11434
+ * Private-model eligibility temporarily unavailable
11435
+ */
11436
+ 503: ErrorResponse;
11437
+ };
11438
+ export type ReportModelUploadEventError = ReportModelUploadEventErrors[keyof ReportModelUploadEventErrors];
11439
+ export type ReportModelUploadEventResponses = {
11440
+ /**
11441
+ * Report accepted; delivery is best effort
11442
+ */
11443
+ 204: void;
11444
+ };
11445
+ export type ReportModelUploadEventResponse = ReportModelUploadEventResponses[keyof ReportModelUploadEventResponses];
10548
11446
  export type AuthenticateData = {
10549
11447
  body: AuthenticateRequest;
10550
11448
  path?: never;
@@ -10677,6 +11575,74 @@ export type RedeemDesktopLoginCodeResponses = {
10677
11575
  200: DesktopLoginCodeRedeemResponse;
10678
11576
  };
10679
11577
  export type RedeemDesktopLoginCodeResponse = RedeemDesktopLoginCodeResponses[keyof RedeemDesktopLoginCodeResponses];
11578
+ export type CreateBillingHandoffData = {
11579
+ body: BillingHandoffCreateRequest;
11580
+ path?: never;
11581
+ query?: never;
11582
+ url: '/api/auth/handoffs';
11583
+ };
11584
+ export type CreateBillingHandoffErrors = {
11585
+ /**
11586
+ * `INVALID_REQUEST`
11587
+ */
11588
+ 400: ErrorResponse;
11589
+ /**
11590
+ * `INVALID_CREDENTIAL`: the sign-in has ended, predates the user's sign-out of all devices, or must be renewed
11591
+ */
11592
+ 401: ErrorResponse;
11593
+ /**
11594
+ * `CREDENTIAL_UNSUPPORTED`, `BILLING_FORBIDDEN` or `HANDOFF_DISABLED`
11595
+ */
11596
+ 403: ErrorResponse;
11597
+ /**
11598
+ * Too many handoffs for this user in the last hour
11599
+ */
11600
+ 429: ErrorResponse;
11601
+ /**
11602
+ * `SERVICE_UNAVAILABLE`: the Firebase revocation check could not be made
11603
+ */
11604
+ 503: ErrorResponse;
11605
+ };
11606
+ export type CreateBillingHandoffError = CreateBillingHandoffErrors[keyof CreateBillingHandoffErrors];
11607
+ export type CreateBillingHandoffResponses = {
11608
+ /**
11609
+ * Handoff issued
11610
+ */
11611
+ 201: BillingHandoffCreateResponse;
11612
+ };
11613
+ export type CreateBillingHandoffResponse = CreateBillingHandoffResponses[keyof CreateBillingHandoffResponses];
11614
+ export type ExchangeBillingHandoffData = {
11615
+ body: BillingHandoffExchangeRequest;
11616
+ path?: never;
11617
+ query?: never;
11618
+ url: '/api/auth/handoffs/exchange';
11619
+ };
11620
+ export type ExchangeBillingHandoffErrors = {
11621
+ /**
11622
+ * `INVALID_REQUEST`
11623
+ */
11624
+ 400: ErrorResponse;
11625
+ /**
11626
+ * `BILLING_FORBIDDEN` or `HANDOFF_DISABLED`, or the request did not come from the handoff's receiver
11627
+ */
11628
+ 403: ErrorResponse;
11629
+ /**
11630
+ * `HANDOFF_UNAVAILABLE`: unknown, expired, revoked or already consumed
11631
+ */
11632
+ 410: ErrorResponse;
11633
+ /**
11634
+ * The user already holds the most live scoped sessions
11635
+ */
11636
+ 429: ErrorResponse;
11637
+ };
11638
+ export type ExchangeBillingHandoffError = ExchangeBillingHandoffErrors[keyof ExchangeBillingHandoffErrors];
11639
+ export type ExchangeBillingHandoffResponses = {
11640
+ /**
11641
+ * Scoped session created
11642
+ */
11643
+ 200: BillingHandoffExchangeResponse;
11644
+ };
11645
+ export type ExchangeBillingHandoffResponse = ExchangeBillingHandoffResponses[keyof ExchangeBillingHandoffResponses];
10680
11646
  export type DeleteSessionData = {
10681
11647
  body?: never;
10682
11648
  path?: never;
@@ -10887,7 +11853,7 @@ export type ExchangeTokenErrors = {
10887
11853
  */
10888
11854
  400: ErrorResponse;
10889
11855
  /**
10890
- * Invalid or expired Firebase JWT, no live web session, or a revoked, expired, deleted or unknown API key. Refused credentials get `code` `UNAUTHORIZED` and a `message`. A session that ends within seconds gets `code` `session_expired`: a token minted from it would expire on arrival.
11856
+ * Invalid or expired Firebase JWT, no live web session, or a revoked, expired, deleted or unknown API key. Refused credentials get `code` `UNAUTHORIZED` and a `message`. A session that ends within seconds gets `code` `session_expired`: a token minted from it would expire on arrival. `oauth_grant_ended`: an OAuth access token holding `comfy-cloud:workspace-token:mint` whose grant was signed out, revoked or expired, even though the token itself is still valid; sign in again.
10891
11857
  */
10892
11858
  401: ErrorResponse;
10893
11859
  /**
@@ -10895,11 +11861,11 @@ export type ExchangeTokenErrors = {
10895
11861
  */
10896
11862
  403: ErrorResponse;
10897
11863
  /**
10898
- * Workspace not found or user not a member, or an API key's request names another workspace than the key's own.
11864
+ * Workspace not found or user not a member, or an API key's or OAuth access token's request names another workspace than its own. Only an OAuth grant from a client in `WORKSPACE_MINT_OAUTH_CLIENTS` that holds `comfy-cloud:workspace-token:mint` may name another workspace.
10899
11865
  */
10900
11866
  404: ErrorResponse;
10901
11867
  /**
10902
- * The user minted 240 tokens from the session this hour. `code` is `rate_limited`, in lower case like the session codes.
11868
+ * The user minted 240 tokens from the session this hour, or 30 tokens from OAuth grants carrying `comfy-cloud:workspace-token:mint` in the last 600 seconds. `code` is `rate_limited`.
10903
11869
  */
10904
11870
  429: ErrorResponse;
10905
11871
  /**
@@ -10907,7 +11873,7 @@ export type ExchangeTokenErrors = {
10907
11873
  */
10908
11874
  500: ErrorResponse;
10909
11875
  /**
10910
- * The comfy-api registry could not verify an API key. `code` is `SERVICE_UNAVAILABLE`; retry, since the key may be good. `partner_node_token_disabled`: a partner-node mint while ops have switched those off (`PartnerNodeTokenMintDisabled`); mint without `resource` instead.
11876
+ * The comfy-api registry could not verify an API key. `code` is `SERVICE_UNAVAILABLE`; retry, since the key may be good. `partner_node_token_disabled`: a partner-node mint while ops have switched those off (`PartnerNodeTokenMintDisabled`); mint without `resource` instead. `oauth_workspace_mint_disabled`: an OAuth grant naming a workspace other than its own while ops have switched that off (`OAuthCrossWorkspaceMintDisabled`); authorize again for that workspace.
10911
11877
  */
10912
11878
  503: ErrorResponse;
10913
11879
  };
@@ -11271,7 +12237,7 @@ export type GetBillingEventsData = {
11271
12237
  */
11272
12238
  limit?: number;
11273
12239
  /**
11274
- * Event scope. The user scope requires user_id.
12240
+ * Event scope. Defaults to workspace for workspace owners and self for everyone else. The user scope requires user_id.
11275
12241
  */
11276
12242
  scope?: 'self' | 'workspace' | 'user';
11277
12243
  /**
@@ -15589,25 +16555,65 @@ export type GetUsersInfoErrors = {
15589
16555
  /**
15590
16556
  * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
15591
16557
  */
15592
- 403: ForbiddenError;
16558
+ 403: ForbiddenError;
16559
+ };
16560
+ export type GetUsersInfoError = GetUsersInfoErrors[keyof GetUsersInfoErrors];
16561
+ export type GetUsersInfoResponses = {
16562
+ /**
16563
+ * Userdata storage information
16564
+ */
16565
+ 200: {
16566
+ /**
16567
+ * Whether user data has been migrated (always true in cloud)
16568
+ */
16569
+ migrated: boolean;
16570
+ /**
16571
+ * Where user data is stored (always "server" in cloud)
16572
+ */
16573
+ storage: string;
16574
+ };
16575
+ };
16576
+ export type GetUsersInfoResponse = GetUsersInfoResponses[keyof GetUsersInfoResponses];
16577
+ export type GetCccActivityData = {
16578
+ body?: never;
16579
+ path?: never;
16580
+ query?: {
16581
+ kind?: Array<'save' | 'publish' | 'discard' | 'revert'>;
16582
+ actor_uid?: string;
16583
+ type?: Array<'model' | 'workflow' | 'app'>;
16584
+ since?: string;
16585
+ until?: string;
16586
+ limit?: number;
16587
+ cursor?: string;
16588
+ };
16589
+ url: '/api/v1/catalog/activity';
16590
+ };
16591
+ export type GetCccActivityErrors = {
16592
+ /**
16593
+ * Invalid kind, type, actor_uid, time range, limit, cursor or unsupported query parameter; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
16594
+ */
16595
+ 400: ErrorResponse;
16596
+ /**
16597
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
16598
+ */
16599
+ 401: ErrorResponse;
16600
+ /**
16601
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
16602
+ */
16603
+ 403: ForbiddenError;
16604
+ /**
16605
+ * Dedicated catalog unavailable
16606
+ */
16607
+ 503: unknown;
15593
16608
  };
15594
- export type GetUsersInfoError = GetUsersInfoErrors[keyof GetUsersInfoErrors];
15595
- export type GetUsersInfoResponses = {
16609
+ export type GetCccActivityError = GetCccActivityErrors[keyof GetCccActivityErrors];
16610
+ export type GetCccActivityResponses = {
15596
16611
  /**
15597
- * Userdata storage information
16612
+ * One page of activity, has_more, optional next_cursor and the newest publication
15598
16613
  */
15599
- 200: {
15600
- /**
15601
- * Whether user data has been migrated (always true in cloud)
15602
- */
15603
- migrated: boolean;
15604
- /**
15605
- * Where user data is stored (always "server" in cloud)
15606
- */
15607
- storage: string;
15608
- };
16614
+ 200: CccActivityPage;
15609
16615
  };
15610
- export type GetUsersInfoResponse = GetUsersInfoResponses[keyof GetUsersInfoResponses];
16616
+ export type GetCccActivityResponse = GetCccActivityResponses[keyof GetCccActivityResponses];
15611
16617
  export type GetCatalogAgentInstructionsData = {
15612
16618
  body?: never;
15613
16619
  path?: never;
@@ -15672,7 +16678,7 @@ export type ListCccWebsiteCardsData = {
15672
16678
  kind: 'MODEL' | 'WORKFLOW' | 'APP';
15673
16679
  limit?: number;
15674
16680
  cursor?: string;
15675
- locale?: 'en' | 'zh-CN';
16681
+ locale?: 'en' | 'zh-CN' | 'ja';
15676
16682
  q?: string;
15677
16683
  sort?: 'popular' | 'name' | 'priceAsc' | 'priceDesc';
15678
16684
  category?: Array<string>;
@@ -16480,6 +17486,10 @@ export type GetCccStagingData = {
16480
17486
  uid?: string;
16481
17487
  search?: string;
16482
17488
  author_uid?: string;
17489
+ /**
17490
+ * Account that saved the pending change (saved_by_uid), not the credited author.
17491
+ */
17492
+ saved_by?: string;
16483
17493
  change_id?: string;
16484
17494
  tags?: Array<string>;
16485
17495
  types?: Array<'model' | 'workflow' | 'app' | 'media' | 'template_set'>;
@@ -16514,7 +17524,7 @@ export type GetCccStagingResponses = {
16514
17524
  /**
16515
17525
  * Private review with exact Draft generation and optional sparse page metadata
16516
17526
  */
16517
- 200: Cccjson;
17527
+ 200: CccStagingReview;
16518
17528
  };
16519
17529
  export type GetCccStagingResponse = GetCccStagingResponses[keyof GetCccStagingResponses];
16520
17530
  export type StageCccChangesData = {
@@ -16682,7 +17692,7 @@ export type GetCccItemHistoryResponses = {
16682
17692
  /**
16683
17693
  * Flat immutable items with catalog_status and saved_at, has_more and optional opaque next_cursor; no total
16684
17694
  */
16685
- 200: Cccjson;
17695
+ 200: CccHistoryPage;
16686
17696
  };
16687
17697
  export type GetCccItemHistoryResponse = GetCccItemHistoryResponses[keyof GetCccItemHistoryResponses];
16688
17698
  export type GetCccLegacyTargetData = {
@@ -16778,7 +17788,7 @@ export type ListCccWebsiteModelDirectoryData = {
16778
17788
  };
16779
17789
  path?: never;
16780
17790
  query?: {
16781
- locale?: 'en' | 'zh-CN';
17791
+ locale?: 'en' | 'zh-CN' | 'ja';
16782
17792
  };
16783
17793
  url: '/api/v1/catalog/model-directory';
16784
17794
  };
@@ -16822,6 +17832,237 @@ export type GetCatalogOpenApiResponses = {
16822
17832
  200: Cccjson;
16823
17833
  };
16824
17834
  export type GetCatalogOpenApiResponse = GetCatalogOpenApiResponses[keyof GetCatalogOpenApiResponses];
17835
+ export type ListCccAdminItemsData = {
17836
+ body?: never;
17837
+ path?: never;
17838
+ query?: {
17839
+ types?: Array<'model' | 'workflow' | 'app'>;
17840
+ q?: string;
17841
+ status?: Array<'not_live' | 'unpublished' | 'live' | 'scheduled' | 'hidden' | 'removed'>;
17842
+ saved_by?: string;
17843
+ /**
17844
+ * false keeps pages whose Draft head has enabled not true (Show on the Hub off), whatever their status; true keeps the others.
17845
+ */
17846
+ enabled?: boolean;
17847
+ /**
17848
+ * Exact page UIDs; repeat to read several pages, for example one page in the editor.
17849
+ */
17850
+ uid?: Array<string>;
17851
+ missing?: Array<'cover'>;
17852
+ sort?: 'saved_desc' | 'title_asc';
17853
+ limit?: number;
17854
+ cursor?: string;
17855
+ };
17856
+ url: '/api/v1/catalog/pages';
17857
+ };
17858
+ export type ListCccAdminItemsErrors = {
17859
+ /**
17860
+ * Unknown, repeated scalar or invalid filter, or a cursor from other filters; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
17861
+ */
17862
+ 400: ErrorResponse;
17863
+ /**
17864
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
17865
+ */
17866
+ 401: ErrorResponse;
17867
+ /**
17868
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
17869
+ */
17870
+ 403: ForbiddenError;
17871
+ /**
17872
+ * The cursor belongs to a stale Draft snapshot
17873
+ */
17874
+ 409: unknown;
17875
+ /**
17876
+ * Dedicated catalog unavailable
17877
+ */
17878
+ 503: unknown;
17879
+ };
17880
+ export type ListCccAdminItemsError = ListCccAdminItemsErrors[keyof ListCccAdminItemsErrors];
17881
+ export type ListCccAdminItemsResponses = {
17882
+ /**
17883
+ * One page of staff page rows, the per-type counts and the optional opaque next_cursor
17884
+ */
17885
+ 200: CccPagesPage;
17886
+ };
17887
+ export type ListCccAdminItemsResponse = ListCccAdminItemsResponses[keyof ListCccAdminItemsResponses];
17888
+ export type ListCccStaffPermissionsData = {
17889
+ body?: never;
17890
+ path?: never;
17891
+ query?: never;
17892
+ url: '/api/v1/catalog/permissions';
17893
+ };
17894
+ export type ListCccStaffPermissionsErrors = {
17895
+ /**
17896
+ * Unsupported query, or code workspace_id_invalid from session validation (see SessionWorkspaceIDInvalid)
17897
+ */
17898
+ 400: ErrorResponse;
17899
+ /**
17900
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
17901
+ */
17902
+ 401: ErrorResponse;
17903
+ /**
17904
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
17905
+ */
17906
+ 403: ForbiddenError;
17907
+ /**
17908
+ * Catalog permissions unavailable
17909
+ */
17910
+ 503: unknown;
17911
+ };
17912
+ export type ListCccStaffPermissionsError = ListCccStaffPermissionsErrors[keyof ListCccStaffPermissionsErrors];
17913
+ export type ListCccStaffPermissionsResponses = {
17914
+ /**
17915
+ * Current website permission records
17916
+ */
17917
+ 200: {
17918
+ items: Array<CccStaffPermissions>;
17919
+ };
17920
+ };
17921
+ export type ListCccStaffPermissionsResponse = ListCccStaffPermissionsResponses[keyof ListCccStaffPermissionsResponses];
17922
+ export type DeleteCccStaffPermissionsData = {
17923
+ body?: never;
17924
+ path: {
17925
+ account_id: string;
17926
+ };
17927
+ query: {
17928
+ expected_version: number;
17929
+ };
17930
+ url: '/api/v1/catalog/permissions/{account_id}';
17931
+ };
17932
+ export type DeleteCccStaffPermissionsErrors = {
17933
+ /**
17934
+ * Invalid version or query, or code workspace_id_invalid from session validation (see SessionWorkspaceIDInvalid)
17935
+ */
17936
+ 400: ErrorResponse;
17937
+ /**
17938
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
17939
+ */
17940
+ 401: ErrorResponse;
17941
+ /**
17942
+ * A refused request that changes data. For a web session, `code` is `csrf_invalid` (no `X-CSRF-Token`, or not the session's), `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email, or, on `POST /api/workspaces`, an account an SSO organization holds (its organization manages its workspaces; signing in again does not change it). On the plan-lifecycle writes (`POST /api/billing/subscribe`, `POST /api/billing/subscription/cancel`, `POST /api/billing/subscription/resubscribe`, `POST /api/billing/subscription/revert-scheduled-change`, `POST /api/billing/ops/{id}/cancel` and the `/api/billing/retention*` routes), `NOT_ORIGINAL_OWNER` means the caller is an owner but not the workspace's creator, and only the creator may change the plan; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever the flag.
17943
+ */
17944
+ 403: ForbiddenError;
17945
+ /**
17946
+ * Permission record does not exist
17947
+ */
17948
+ 404: unknown;
17949
+ /**
17950
+ * Stale version or removal would leave no permission manager
17951
+ */
17952
+ 409: unknown;
17953
+ /**
17954
+ * Catalog permissions unavailable
17955
+ */
17956
+ 503: unknown;
17957
+ };
17958
+ export type DeleteCccStaffPermissionsError = DeleteCccStaffPermissionsErrors[keyof DeleteCccStaffPermissionsErrors];
17959
+ export type DeleteCccStaffPermissionsResponses = {
17960
+ /**
17961
+ * Website access removed
17962
+ */
17963
+ 204: void;
17964
+ };
17965
+ export type DeleteCccStaffPermissionsResponse = DeleteCccStaffPermissionsResponses[keyof DeleteCccStaffPermissionsResponses];
17966
+ export type PutCccStaffPermissionsData = {
17967
+ body: {
17968
+ can_edit: boolean;
17969
+ can_manage_users: boolean;
17970
+ /**
17971
+ * Publication also grants content editing
17972
+ */
17973
+ can_publish: boolean;
17974
+ can_transfer: boolean;
17975
+ expected_version: number;
17976
+ };
17977
+ path: {
17978
+ account_id: string;
17979
+ };
17980
+ query?: never;
17981
+ url: '/api/v1/catalog/permissions/{account_id}';
17982
+ };
17983
+ export type PutCccStaffPermissionsErrors = {
17984
+ /**
17985
+ * Invalid permission record, or code workspace_id_invalid from session validation (see SessionWorkspaceIDInvalid)
17986
+ */
17987
+ 400: ErrorResponse;
17988
+ /**
17989
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
17990
+ */
17991
+ 401: ErrorResponse;
17992
+ /**
17993
+ * A refused request that changes data. For a web session, `code` is `csrf_invalid` (no `X-CSRF-Token`, or not the session's), `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email, or, on `POST /api/workspaces`, an account an SSO organization holds (its organization manages its workspaces; signing in again does not change it). On the plan-lifecycle writes (`POST /api/billing/subscribe`, `POST /api/billing/subscription/cancel`, `POST /api/billing/subscription/resubscribe`, `POST /api/billing/subscription/revert-scheduled-change`, `POST /api/billing/ops/{id}/cancel` and the `/api/billing/retention*` routes), `NOT_ORIGINAL_OWNER` means the caller is an owner but not the workspace's creator, and only the creator may change the plan; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever the flag.
17994
+ */
17995
+ 403: ForbiddenError;
17996
+ /**
17997
+ * Active Cloud account does not exist
17998
+ */
17999
+ 404: unknown;
18000
+ /**
18001
+ * Stale version or change would leave no permission manager
18002
+ */
18003
+ 409: unknown;
18004
+ /**
18005
+ * Body exceeds 4 KiB
18006
+ */
18007
+ 413: unknown;
18008
+ /**
18009
+ * Catalog permissions or identity lookup unavailable
18010
+ */
18011
+ 503: unknown;
18012
+ };
18013
+ export type PutCccStaffPermissionsError = PutCccStaffPermissionsErrors[keyof PutCccStaffPermissionsErrors];
18014
+ export type PutCccStaffPermissionsResponses = {
18015
+ /**
18016
+ * Saved website permissions and the new version token
18017
+ */
18018
+ 200: CccStaffPermissions;
18019
+ };
18020
+ export type PutCccStaffPermissionsResponse = PutCccStaffPermissionsResponses[keyof PutCccStaffPermissionsResponses];
18021
+ export type ResolveCccStaffAccountData = {
18022
+ body: {
18023
+ email: string;
18024
+ };
18025
+ path?: never;
18026
+ query?: never;
18027
+ url: '/api/v1/catalog/permissions/resolve';
18028
+ };
18029
+ export type ResolveCccStaffAccountErrors = {
18030
+ /**
18031
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
18032
+ */
18033
+ 400: ErrorResponse;
18034
+ /**
18035
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
18036
+ */
18037
+ 401: ErrorResponse;
18038
+ /**
18039
+ * A refused request that changes data. For a web session, `code` is `csrf_invalid` (no `X-CSRF-Token`, or not the session's), `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email, or, on `POST /api/workspaces`, an account an SSO organization holds (its organization manages its workspaces; signing in again does not change it). On the plan-lifecycle writes (`POST /api/billing/subscribe`, `POST /api/billing/subscription/cancel`, `POST /api/billing/subscription/resubscribe`, `POST /api/billing/subscription/revert-scheduled-change`, `POST /api/billing/ops/{id}/cancel` and the `/api/billing/retention*` routes), `NOT_ORIGINAL_OWNER` means the caller is an owner but not the workspace's creator, and only the creator may change the plan; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever the flag.
18040
+ */
18041
+ 403: ForbiddenError;
18042
+ /**
18043
+ * No unique active account matches that email
18044
+ */
18045
+ 404: unknown;
18046
+ /**
18047
+ * Email verification body exceeds 2 KiB
18048
+ */
18049
+ 413: unknown;
18050
+ /**
18051
+ * Account lookup unavailable
18052
+ */
18053
+ 503: unknown;
18054
+ };
18055
+ export type ResolveCccStaffAccountError = ResolveCccStaffAccountErrors[keyof ResolveCccStaffAccountErrors];
18056
+ export type ResolveCccStaffAccountResponses = {
18057
+ /**
18058
+ * Verified active account, without granting access
18059
+ */
18060
+ 200: {
18061
+ account_id: string;
18062
+ display_name?: string;
18063
+ };
18064
+ };
18065
+ export type ResolveCccStaffAccountResponse = ResolveCccStaffAccountResponses[keyof ResolveCccStaffAccountResponses];
16825
18066
  export type GetCccPreviewMediaBytesData = {
16826
18067
  body?: never;
16827
18068
  path: {
@@ -16981,7 +18222,7 @@ export type GetCccWebsiteRootPresentationData = {
16981
18222
  path?: never;
16982
18223
  query: {
16983
18224
  path: '/hub/models/' | '/hub/workflows/' | '/hub/apps/';
16984
- locale?: 'en' | 'zh-CN';
18225
+ locale?: 'en' | 'zh-CN' | 'ja';
16985
18226
  /**
16986
18227
  * Live revision selected once at page entry. Redis requires both this revision and the selected authority pin. On an origin miss the revision must match current Live.
16987
18228
  */
@@ -17033,7 +18274,7 @@ export type GetCccTypeSchemaResponses = {
17033
18274
  /**
17034
18275
  * Build-coupled OpenAPI 3.0 schema object, type, version and API environment
17035
18276
  */
17036
- 200: Cccjson;
18277
+ 200: CccTypeSchema;
17037
18278
  };
17038
18279
  export type GetCccTypeSchemaResponse = GetCccTypeSchemaResponses[keyof GetCccTypeSchemaResponses];
17039
18280
  export type GetCccStateData = {
@@ -17068,6 +18309,41 @@ export type GetCccStateResponses = {
17068
18309
  200: Cccjson;
17069
18310
  };
17070
18311
  export type GetCccStateResponse = GetCccStateResponses[keyof GetCccStateResponses];
18312
+ export type GetCccSiteTagsData = {
18313
+ body?: never;
18314
+ path?: never;
18315
+ query?: {
18316
+ view?: 'LIVE' | 'DRAFT';
18317
+ now?: string;
18318
+ };
18319
+ url: '/api/v1/catalog/tags';
18320
+ };
18321
+ export type GetCccSiteTagsErrors = {
18322
+ /**
18323
+ * Invalid, repeated or unsupported query parameter; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid)
18324
+ */
18325
+ 400: ErrorResponse;
18326
+ /**
18327
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
18328
+ */
18329
+ 401: ErrorResponse;
18330
+ /**
18331
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
18332
+ */
18333
+ 403: ForbiddenError;
18334
+ /**
18335
+ * Catalog unavailable or tag budget exceeded
18336
+ */
18337
+ 503: unknown;
18338
+ };
18339
+ export type GetCccSiteTagsError = GetCccSiteTagsErrors[keyof GetCccSiteTagsErrors];
18340
+ export type GetCccSiteTagsResponses = {
18341
+ /**
18342
+ * Complete tag usage with Draft generation
18343
+ */
18344
+ 200: CccSiteTagUsage;
18345
+ };
18346
+ export type GetCccSiteTagsResponse = GetCccSiteTagsResponses[keyof GetCccSiteTagsResponses];
17071
18347
  export type GetLegacyUserdataV2Data = {
17072
18348
  body?: never;
17073
18349
  path?: never;
@@ -17778,6 +19054,51 @@ export type ForkWorkflowResponses = {
17778
19054
  201: WorkflowResponse;
17779
19055
  };
17780
19056
  export type ForkWorkflowResponse = ForkWorkflowResponses[keyof ForkWorkflowResponses];
19057
+ export type GetWorkflowSidebarFileData = {
19058
+ body?: never;
19059
+ path: {
19060
+ /**
19061
+ * The UUID of the workflow. Parsed by the handler, so a malformed id answers 404.
19062
+ */
19063
+ workflow_id: string;
19064
+ };
19065
+ query?: never;
19066
+ url: '/api/workflows/{workflow_id}/sidebar-file';
19067
+ };
19068
+ export type GetWorkflowSidebarFileErrors = {
19069
+ /**
19070
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
19071
+ */
19072
+ 400: ErrorResponse;
19073
+ /**
19074
+ * Unauthorized
19075
+ */
19076
+ 401: ErrorResponse;
19077
+ /**
19078
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
19079
+ */
19080
+ 403: ForbiddenError;
19081
+ /**
19082
+ * `code` is `NOT_FOUND`: no live workflow with this id that the caller created in this workspace.
19083
+ */
19084
+ 404: ErrorResponse;
19085
+ /**
19086
+ * `code` is `WORKFLOW_OUT_OF_SYNC` and `details.reason` is one of `no_sidebar_path`, `name_ambiguous`, `file_missing` or `content_mismatch`. Clients open nothing on this answer. The set of reasons may grow, and clients treat an unknown reason as out of sync.
19087
+ */
19088
+ 409: ErrorResponse;
19089
+ /**
19090
+ * Internal server error
19091
+ */
19092
+ 500: ErrorResponse;
19093
+ };
19094
+ export type GetWorkflowSidebarFileError = GetWorkflowSidebarFileErrors[keyof GetWorkflowSidebarFileErrors];
19095
+ export type GetWorkflowSidebarFileResponses = {
19096
+ /**
19097
+ * The workflow and its sidebar file agree.
19098
+ */
19099
+ 200: WorkflowSidebarFileResponse;
19100
+ };
19101
+ export type GetWorkflowSidebarFileResponse = GetWorkflowSidebarFileResponses[keyof GetWorkflowSidebarFileResponses];
17781
19102
  export type CreateWorkflowVersionData = {
17782
19103
  body: CreateWorkflowVersionRequest;
17783
19104
  path: {
@@ -19363,7 +20684,7 @@ export type PostOAuthAuthorizeData = {
19363
20684
  };
19364
20685
  export type PostOAuthAuthorizeErrors = {
19365
20686
  /**
19366
- * Bad request (CSRF mismatch, expired/consumed request, inaccessible workspace, no signed-in user), or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
20687
+ * Bad request (CSRF mismatch, expired/consumed request, inaccessible workspace, no signed-in user), `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid), or `code` `login_required`: the user signed out of all devices after the sign-in behind this request (the web session's or the Firebase token's `auth_time`), or the request uses a credential with no sign-in time (API key, Cloud JWT, OAuth token) after such a sign-out. Nothing is recorded and the request stays open, so the user can sign in again and approve it.
19367
20688
  */
19368
20689
  400: ErrorResponse;
19369
20690
  /**
@@ -19412,6 +20733,34 @@ export type PostOAuthRegisterResponses = {
19412
20733
  201: OAuthRegisterResponse;
19413
20734
  };
19414
20735
  export type PostOAuthRegisterResponse = PostOAuthRegisterResponses[keyof PostOAuthRegisterResponses];
20736
+ export type PostOAuthRevokeData = {
20737
+ body: {
20738
+ client_id: string;
20739
+ client_secret?: string;
20740
+ token: string;
20741
+ token_type_hint?: string;
20742
+ };
20743
+ path?: never;
20744
+ query?: never;
20745
+ url: '/oauth/revoke';
20746
+ };
20747
+ export type PostOAuthRevokeErrors = {
20748
+ /**
20749
+ * RFC 6749 §5.2 error
20750
+ */
20751
+ 400: OAuthTokenError;
20752
+ /**
20753
+ * Revocation failed; retry
20754
+ */
20755
+ 500: ErrorResponse;
20756
+ };
20757
+ export type PostOAuthRevokeError = PostOAuthRevokeErrors[keyof PostOAuthRevokeErrors];
20758
+ export type PostOAuthRevokeResponses = {
20759
+ /**
20760
+ * Revoked, or nothing to revoke
20761
+ */
20762
+ 200: unknown;
20763
+ };
19415
20764
  export type PostOAuthTokenData = {
19416
20765
  body: {
19417
20766
  client_id: string;