Files
archived-orca/src/preload/api/bitbucket-bridge.ts
T
OrcaWinandOrcaWin e6101393b5 fix(i18n): localize remote server pairing, host sign-in and Bitbucket connect failures (#35843)
* fix(i18n): localize remote server pairing, host sign-in and Bitbucket connect failures

* fix(i18n): map pairing guard codes without a partial switch

* fix(i18n): type the Bitbucket connect bridge with its coded result

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-29 01:49:44 -07:00

18 lines
625 B
TypeScript

import { ipcRenderer } from 'electron'
import type { PreloadApi } from '../api-types'
import type { BitbucketConnectResult } from '../../shared/bitbucket-credentials'
export const bitbucketApi = {
connect: (args: {
authMode: 'token' | 'basic'
accessToken?: string | null
email?: string | null
apiToken?: string | null
baseUrl?: string | null
}): Promise<BitbucketConnectResult> => ipcRenderer.invoke('bitbucket:connect', args),
disconnect: (): Promise<void> => ipcRenderer.invoke('bitbucket:disconnect'),
status: () => ipcRenderer.invoke('bitbucket:status')
} satisfies PreloadApi['bitbucket']