@comfyorg/comfyui-desktop-bridge-types 0.7.0 → 0.8.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.
@@ -124,6 +124,24 @@ export type ComfyDesktop2AuthState =
124
124
  email?: string
125
125
  workspaceId?: string
126
126
  }
127
+ export type ComfyDesktop2BillingHandoffReceiver = 'billing_web' | 'platform'
128
+ export type ComfyDesktop2BillingHandoffIntent = 'top-up' | 'subscription'
129
+ export type ComfyDesktop2BillingHandoff =
130
+ | {
131
+ status: 'issued'
132
+ entryUrl: string
133
+ }
134
+ | {
135
+ status: 'sign_in_again'
136
+ }
137
+ | {
138
+ status: 'refused'
139
+ code?: string
140
+ message?: string
141
+ }
142
+ | {
143
+ status: 'disabled'
144
+ }
127
145
  export interface ComfyDesktop2AuthBridge {
128
146
  getState(): Promise<ComfyDesktop2AuthState>
129
147
  /** The workspace credential, only for an exact workspace Desktop's session
@@ -148,6 +166,13 @@ export interface ComfyDesktop2AuthBridge {
148
166
  switchWorkspace(workspaceId: string): Promise<ComfyDesktop2AuthState>
149
167
  /** Fires when Desktop signs in, signs out or switches workspace. */
150
168
  onChanged(callback: (state: ComfyDesktop2AuthState) => void): () => void
169
+ /** Issues a billing handoff with Desktop's credential and resolves with only its https entry URL; `intent` picks the landing page and `amountCents` the top-up amount. Absent on older Desktop builds. */
170
+ issueBillingHandoff?(
171
+ workspaceId: string,
172
+ receiver: ComfyDesktop2BillingHandoffReceiver,
173
+ intent?: ComfyDesktop2BillingHandoffIntent,
174
+ amountCents?: number
175
+ ): Promise<ComfyDesktop2BillingHandoff>
151
176
  }
152
177
  export interface ComfyDesktop2TerminalBridge {
153
178
  subscribe(installationId?: string): Promise<TerminalRestore>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-desktop-bridge-types",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "TypeScript definitions for the Comfy Desktop hosted frontend bridge",
5
5
  "type": "module",
6
6
  "main": "./index.js",