fe77ede49e
* 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>
34 lines
774 B
TypeScript
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 {}
|