Files
speckle-connectors-dui/lib/bindings/definitions/IAccountBinding.ts
T
Oğuzhan Koral fe77ede49e feat: introduce CI linting & fix various issues (#5)
* introduce CI checks

* fixx

* add caching

* fixes

* wip

* server bridge linting

* No lint errors

* fix paths on lint:prettier

* make files pretty again

* fix stylelint

* fix lock

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2025-05-14 10:05:51 +03:00

34 lines
774 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 {}