Files
speckle-connectors-dui/lib/bindings/definitions/ISendBinding.ts
T
Kristaps Fabians Geikins f2d7493c2a chore: move package over from speckle-server (#2)
* stuff copied over, but aint workin

* various fixes

* vscode settings

* trigger deploy

* trigger deploy
2025-05-13 16:18:45 +03:00

41 lines
1.4 KiB
TypeScript

import type { ISendFilter } from '~~/lib/models/card/send'
import type {
IBinding,
IBindingSharedEvents
} from '~~/lib/bindings/definitions/IBinding'
import type { CardSetting } from '~/lib/models/card/setting'
import type { IModelCardSharedEvents } from '~/lib/models/card'
import type { ConversionResult } from 'lib/conversions/conversionResult'
import type { CreateVersionArgs } from '~/lib/bridge/server'
export const ISendBindingKey = 'sendBinding'
export interface ISendBinding extends IBinding<ISendBindingEvents> {
getSendFilters: () => Promise<ISendFilter[]>
getSendSettings: () => Promise<CardSetting[]>
send: (modelId: string) => Promise<void>
cancelSend: (modelId: string) => Promise<void>
}
export interface ISendBindingEvents
extends IBindingSharedEvents,
IModelCardSharedEvents {
refreshSendFilters: () => void
setModelsExpired: (modelCardIds: string[]) => void
setModelSendResult: (args: {
modelCardId: string
versionId: string
sendConversionResults: ConversionResult[]
}) => void
setIdMap: (args: {
modelCardId: string
idMap: Record<string, string>
newSelectedObjectIds: string[]
}) => void
/**
* Use whenever want to cancel model card progress, it is used on Archicad so far since send operation blocks the UI thread.
*/
triggerCancel: (modelCardId: string) => void
triggerCreateVersion: (args: CreateVersionArgs) => void
}