Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing shamir recovery GUI bindings #9319

Merged
merged 6 commits into from
Jan 15, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add bindings for client_get_self_shamir_recovery and client_list_sham…
…ir_recoveries_for_others
vxgmichel committed Jan 15, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c1649643d6b6469a17dcf45f6787da27f3b4e6ef
122 changes: 122 additions & 0 deletions bindings/electron/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -763,6 +763,20 @@ export type ClientExportRecoveryDeviceError =
| ClientExportRecoveryDeviceErrorTimestampOutOfBallpark


// ClientGetSelfShamirRecoveryError
export interface ClientGetSelfShamirRecoveryErrorInternal {
tag: "Internal"
error: string
}
export interface ClientGetSelfShamirRecoveryErrorStopped {
tag: "Stopped"
error: string
}
export type ClientGetSelfShamirRecoveryError =
| ClientGetSelfShamirRecoveryErrorInternal
| ClientGetSelfShamirRecoveryErrorStopped


// ClientGetTosError
export interface ClientGetTosErrorInternal {
tag: "Internal"
@@ -834,6 +848,20 @@ export type ClientListFrozenUsersError =
| ClientListFrozenUsersErrorOffline


// ClientListShamirRecoveriesForOthersError
export interface ClientListShamirRecoveriesForOthersErrorInternal {
tag: "Internal"
error: string
}
export interface ClientListShamirRecoveriesForOthersErrorStopped {
tag: "Stopped"
error: string
}
export type ClientListShamirRecoveriesForOthersError =
| ClientListShamirRecoveriesForOthersErrorInternal
| ClientListShamirRecoveriesForOthersErrorStopped


// ClientListUserDevicesError
export interface ClientListUserDevicesErrorInternal {
tag: "Internal"
@@ -1557,6 +1585,50 @@ export type MoveEntryMode =
| MoveEntryModeNoReplace


// OtherShamirRecoveryInfo
export interface OtherShamirRecoveryInfoDeleted {
tag: "Deleted"
user_id: string
created_on: number
created_by: string
threshold: number
per_recipient_shares: Map<string, number>
deleted_on: number
deleted_by: string
}
export interface OtherShamirRecoveryInfoSetupAllValid {
tag: "SetupAllValid"
user_id: string
created_on: number
created_by: string
threshold: number
per_recipient_shares: Map<string, number>
}
export interface OtherShamirRecoveryInfoSetupButUnusable {
tag: "SetupButUnusable"
user_id: string
created_on: number
created_by: string
threshold: number
per_recipient_shares: Map<string, number>
revoked_recipients: Array<string>
}
export interface OtherShamirRecoveryInfoSetupWithRevokedRecipients {
tag: "SetupWithRevokedRecipients"
user_id: string
created_on: number
created_by: string
threshold: number
per_recipient_shares: Map<string, number>
revoked_recipients: Array<string>
}
export type OtherShamirRecoveryInfo =
| OtherShamirRecoveryInfoDeleted
| OtherShamirRecoveryInfoSetupAllValid
| OtherShamirRecoveryInfoSetupButUnusable
| OtherShamirRecoveryInfoSetupWithRevokedRecipients


// ParseParsecAddrError
export interface ParseParsecAddrErrorInvalidUrl {
tag: "InvalidUrl"
@@ -1640,6 +1712,50 @@ export type ParsedParsecAddr =
| ParsedParsecAddrWorkspacePath


// SelfShamirRecoveryInfo
export interface SelfShamirRecoveryInfoDeleted {
tag: "Deleted"
created_on: number
created_by: string
threshold: number
per_recipient_shares: Map<string, number>
deleted_on: number
deleted_by: string
}
export interface SelfShamirRecoveryInfoNeverSetup {
tag: "NeverSetup"
}
export interface SelfShamirRecoveryInfoSetupAllValid {
tag: "SetupAllValid"
created_on: number
created_by: string
threshold: number
per_recipient_shares: Map<string, number>
}
export interface SelfShamirRecoveryInfoSetupButUnusable {
tag: "SetupButUnusable"
created_on: number
created_by: string
threshold: number
per_recipient_shares: Map<string, number>
revoked_recipients: Array<string>
}
export interface SelfShamirRecoveryInfoSetupWithRevokedRecipients {
tag: "SetupWithRevokedRecipients"
created_on: number
created_by: string
threshold: number
per_recipient_shares: Map<string, number>
revoked_recipients: Array<string>
}
export type SelfShamirRecoveryInfo =
| SelfShamirRecoveryInfoDeleted
| SelfShamirRecoveryInfoNeverSetup
| SelfShamirRecoveryInfoSetupAllValid
| SelfShamirRecoveryInfoSetupButUnusable
| SelfShamirRecoveryInfoSetupWithRevokedRecipients


// TestbedError
export interface TestbedErrorDisabled {
tag: "Disabled"
@@ -2765,6 +2881,9 @@ export function clientExportRecoveryDevice(
client_handle: number,
device_label: string
): Promise<Result<[string, Uint8Array], ClientExportRecoveryDeviceError>>
export function clientGetSelfShamirRecovery(
client_handle: number
): Promise<Result<SelfShamirRecoveryInfo, ClientGetSelfShamirRecoveryError>>
export function clientGetTos(
client: number
): Promise<Result<Tos, ClientGetTosError>>
@@ -2781,6 +2900,9 @@ export function clientListFrozenUsers(
export function clientListInvitations(
client: number
): Promise<Result<Array<InviteListItem>, ListInvitationsError>>
export function clientListShamirRecoveriesForOthers(
client_handle: number
): Promise<Result<Array<OtherShamirRecoveryInfo>, ClientListShamirRecoveriesForOthersError>>
export function clientListUserDevices(
client: number,
user: string
Loading