Files
speckle-connectors-dui/lib/bindings/definitions/IAccountBinding.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

31 lines
768 B
TypeScript

import type { IBinding, IBindingSharedEvents } from 'lib/bindings/definitions/IBinding'
export const IAccountBindingKey = 'accountsBinding'
export interface IAccountBinding extends IBinding<IAccountBindingEvents> {
getAccounts: () => Promise<Account[]>
removeAccount: (accountId: string) => Promise<void>
}
// An almost 1-1 mapping of what we need from the Core accounts class.
export type Account = {
id: string
isDefault: boolean
token: string
serverInfo: {
name: string
url: string
frontend2: boolean
}
userInfo: {
id: string
avatar: string
email: string
name: string
commits: { totalCount: number }
streams: { totalCount: number }
}
}
export interface IAccountBindingEvents extends IBindingSharedEvents {}