mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-16 05:39:56 +00:00
remove bindings from git
This commit is contained in:
@@ -27,7 +27,7 @@ Each service is registered via `app.RegisterService(application.NewService(svc))
|
||||
- `screens/` — content shown inside `AppLayout` (`Status`, `Peers`, `Networks`, `Profiles`, `Settings`, `Update`, `QuickActions`, `Debug`).
|
||||
|
||||
### Generated bindings
|
||||
- `frontend/bindings/**` — generated, do not edit by hand. Regenerate via `wails3 generate bindings -clean=true -ts` from this directory after editing any `services/*.go`.
|
||||
- `frontend/bindings/**` — generated, **gitignored**, do not edit by hand. After editing any `services/*.go`, regenerate from this directory via `wails3 generate bindings -clean=true -ts` (or `pnpm bindings` from `frontend/`). Fresh clones need to run this once before `pnpm typecheck` will succeed; `wails3 dev` regenerates on its own.
|
||||
|
||||
## Services rundown
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ pnpm format:check
|
||||
|
||||
So `import { Connection } from "@bindings/services"` and `import type { Status } from "@bindings/services/models.js"` are the canonical imports. **Don't** hand-write deep `../../bindings/github.com/...` paths — a few legacy screens (`screens/Profiles.tsx`, `pages/Update.tsx`) still do; treat that as a smell.
|
||||
|
||||
Bindings are regenerated from Go via `wails3 generate bindings -clean=true -ts` from `client/ui/`. Don't edit anything under `bindings/`.
|
||||
`bindings/` is **gitignored** — every file is generated and never hand-edited. Regenerate from `client/ui/` via `wails3 generate bindings -clean=true -ts`, or use the `pnpm bindings` shortcut from this directory. A fresh clone has no `bindings/` on disk, so `pnpm typecheck` will fail until you run it once; `wails3 dev` regenerates on its own.
|
||||
|
||||
## Routing (app.tsx)
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Connection groups the daemon RPCs that drive login / connect / disconnect.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
export function Down(): $CancellablePromise<void> {
|
||||
return $Call.ByID(70044537);
|
||||
}
|
||||
|
||||
export function Login(p: $models.LoginParams): $CancellablePromise<$models.LoginResult> {
|
||||
return $Call.ByID(252661358, p).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
export function Logout(p: $models.LogoutParams): $CancellablePromise<void> {
|
||||
return $Call.ByID(3824847887, p);
|
||||
}
|
||||
|
||||
/**
|
||||
* OpenURL launches the user's preferred browser to display url. Mirrors the
|
||||
* Fyne client's openURL helper so the SSO flow can pop the verification page
|
||||
* the same way as the legacy UI — WebKitGTK's window.open is blocked by the
|
||||
* embedded webview, and asking the user to copy/paste defeats the point of
|
||||
* SSO. Honors $BROWSER first, then falls back to the platform default.
|
||||
*/
|
||||
export function OpenURL(url: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(3786555598, url);
|
||||
}
|
||||
|
||||
export function Up(p: $models.UpParams): $CancellablePromise<void> {
|
||||
return $Call.ByID(3381092588, p);
|
||||
}
|
||||
|
||||
export function WaitSSOLogin(p: $models.WaitSSOParams): $CancellablePromise<string> {
|
||||
return $Call.ByID(1751351500, p);
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.LoginResult.createFrom;
|
||||
@@ -1,44 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Debug groups debug / log-level / packet-trace RPCs.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
export function Bundle(p: $models.DebugBundleParams): $CancellablePromise<$models.DebugBundleResult> {
|
||||
return $Call.ByID(617551238, p).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
export function GetLogLevel(): $CancellablePromise<$models.LogLevel> {
|
||||
return $Call.ByID(3832950014).then(($result: any) => {
|
||||
return $$createType1($result);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* RevealFile opens the OS file manager focused on the given path. Wails'
|
||||
* Browser.OpenURL refuses non-http(s) schemes, so the UI calls this binding
|
||||
* instead of constructing a file:// URL.
|
||||
*/
|
||||
export function RevealFile(path: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(2620662837, path);
|
||||
}
|
||||
|
||||
export function SetLogLevel(lvl: $models.LogLevel): $CancellablePromise<void> {
|
||||
return $Call.ByID(4122411498, lvl);
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.DebugBundleResult.createFrom;
|
||||
const $$createType1 = $models.LogLevel.createFrom;
|
||||
@@ -1,29 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Forwarding groups the daemon RPCs that surface exposed/forwarded services.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
/**
|
||||
* List returns the current set of forwarding rules from the daemon's
|
||||
* reverse proxy. The frontend renders these as the "exposed services" list.
|
||||
*/
|
||||
export function List(): $CancellablePromise<$models.ForwardingRule[]> {
|
||||
return $Call.ByID(3831092172).then(($result: any) => {
|
||||
return $$createType1($result);
|
||||
});
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.ForwardingRule.createFrom;
|
||||
const $$createType1 = $Create.Array($$createType0);
|
||||
@@ -1,44 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* I18n is the Wails-bound facade over i18n.Bundle. It exists only to give
|
||||
* the binding generator a service type with the context.Context-first
|
||||
* signatures it expects; the translation logic, locale loading and the
|
||||
* LanguageCode type all live in client/ui/i18n.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as i18n$0 from "../i18n/models.js";
|
||||
|
||||
/**
|
||||
* Bundle returns the full key->text map for one language, letting the
|
||||
* React side drive its own translation library (i18next, etc.) off the
|
||||
* same source bundles the tray uses.
|
||||
*/
|
||||
export function Bundle(code: i18n$0.LanguageCode): $CancellablePromise<{ [_ in string]?: string }> {
|
||||
return $Call.ByID(1780869897, code).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Languages exposes the list of shipped locales to the frontend so the
|
||||
* settings page can populate its language picker.
|
||||
*/
|
||||
export function Languages(): $CancellablePromise<i18n$0.Language[]> {
|
||||
return $Call.ByID(768152924).then(($result: any) => {
|
||||
return $$createType2($result);
|
||||
});
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $Create.Map($Create.Any, $Create.Any);
|
||||
const $$createType1 = i18n$0.Language.createFrom;
|
||||
const $$createType2 = $Create.Array($$createType1);
|
||||
@@ -1,60 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import * as Connection from "./connection.js";
|
||||
import * as Debug from "./debug.js";
|
||||
import * as Forwarding from "./forwarding.js";
|
||||
import * as I18n from "./i18n.js";
|
||||
import * as Networks from "./networks.js";
|
||||
import * as Peers from "./peers.js";
|
||||
import * as Preferences from "./preferences.js";
|
||||
import * as ProfileSwitcher from "./profileswitcher.js";
|
||||
import * as Profiles from "./profiles.js";
|
||||
import * as Settings from "./settings.js";
|
||||
import * as Update from "./update.js";
|
||||
import * as WindowManager from "./windowmanager.js";
|
||||
export {
|
||||
Connection,
|
||||
Debug,
|
||||
Forwarding,
|
||||
I18n,
|
||||
Networks,
|
||||
Peers,
|
||||
Preferences,
|
||||
ProfileSwitcher,
|
||||
Profiles,
|
||||
Settings,
|
||||
Update,
|
||||
WindowManager
|
||||
};
|
||||
|
||||
export {
|
||||
ActiveProfile,
|
||||
Config,
|
||||
ConfigParams,
|
||||
DebugBundleParams,
|
||||
DebugBundleResult,
|
||||
Features,
|
||||
ForwardingRule,
|
||||
LocalPeer,
|
||||
LogLevel,
|
||||
LoginParams,
|
||||
LoginResult,
|
||||
LogoutParams,
|
||||
Network,
|
||||
PeerLink,
|
||||
PeerStatus,
|
||||
PortInfo,
|
||||
PortRange,
|
||||
Profile,
|
||||
ProfileRef,
|
||||
SelectNetworksParams,
|
||||
SetConfigParams,
|
||||
Status,
|
||||
SystemEvent,
|
||||
UpParams,
|
||||
UpdateAvailable,
|
||||
UpdateProgress,
|
||||
UpdateResult,
|
||||
WaitSSOParams
|
||||
} from "./models.js";
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,33 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Networks groups the daemon RPCs that read and toggle routed networks.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
export function Deselect(p: $models.SelectNetworksParams): $CancellablePromise<void> {
|
||||
return $Call.ByID(3382210947, p);
|
||||
}
|
||||
|
||||
export function List(): $CancellablePromise<$models.Network[]> {
|
||||
return $Call.ByID(1550842096).then(($result: any) => {
|
||||
return $$createType1($result);
|
||||
});
|
||||
}
|
||||
|
||||
export function Select(p: $models.SelectNetworksParams): $CancellablePromise<void> {
|
||||
return $Call.ByID(1339338400, p);
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.Network.createFrom;
|
||||
const $$createType1 = $Create.Array($$createType0);
|
||||
@@ -1,90 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Peers serves the dashboard data: one polled Status RPC and a long-running
|
||||
* SubscribeEvents stream that re-emits every event over the Wails event bus.
|
||||
*
|
||||
* Profile-switch suppression: ProfileSwitcher calls BeginProfileSwitch
|
||||
* before tearing down the old profile when it would otherwise be followed
|
||||
* by an Up on the new profile (i.e. previous status was Connected or
|
||||
* Connecting). statusStreamLoop then swallows the transient stale
|
||||
* Connected and Idle pushes the daemon emits during Down so the tray
|
||||
* and the React Status page both see Connecting → new-profile-state
|
||||
* instead of Connected → Connected → Idle → Connecting → new-state.
|
||||
*
|
||||
* Suppression transition (applied by shouldSuppress before each emit):
|
||||
*
|
||||
* ┌────────────────────────────────────────────┬──────────────────────────────────┐
|
||||
* │ Incoming daemon status │ Action │
|
||||
* ├────────────────────────────────────────────┼──────────────────────────────────┤
|
||||
* │ Connected, Idle │ Suppress (the blink we hide) │
|
||||
* │ Connecting │ Emit, clear flag (new Up began) │
|
||||
* │ NeedsLogin, LoginFailed, SessionExpired, │ Emit, clear flag (new profile's │
|
||||
* │ DaemonUnavailable │ "Up won't run" terminal state) │
|
||||
* │ (timeout elapsed) │ Clear flag, emit normally │
|
||||
* └────────────────────────────────────────────┴──────────────────────────────────┘
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
/**
|
||||
* BeginProfileSwitch is called by ProfileSwitcher at the start of a switch
|
||||
* when the previous status was Connected/Connecting — i.e. the daemon is
|
||||
* about to emit Connected updates during Down's peer-count teardown and
|
||||
* then an Idle before the new profile's Up resumes the stream. The flag
|
||||
* makes statusStreamLoop drop those transient events. A synthetic
|
||||
* Connecting snapshot is emitted right away so both consumers (tray and
|
||||
* React) paint the optimistic state immediately. A 30s safety timeout
|
||||
* clears the flag if the daemon never emits a follow-up status.
|
||||
*/
|
||||
export function BeginProfileSwitch(): $CancellablePromise<void> {
|
||||
return $Call.ByID(3532998514);
|
||||
}
|
||||
|
||||
/**
|
||||
* CancelProfileSwitch is called by callers that abort the switch midway
|
||||
* (the tray's Disconnect click while Connecting). Clears the suppression
|
||||
* flag so the next daemon Idle paints through immediately instead of
|
||||
* being swallowed.
|
||||
*/
|
||||
export function CancelProfileSwitch(): $CancellablePromise<void> {
|
||||
return $Call.ByID(4190545179);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get returns the current daemon status snapshot.
|
||||
*/
|
||||
export function Get(): $CancellablePromise<$models.Status> {
|
||||
return $Call.ByID(3266051360).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Watch starts the background loops that feed the frontend:
|
||||
* - statusStreamLoop: push-driven snapshots on connection-state change
|
||||
* (Connected/Disconnected/Connecting, peer list, address). Drives the
|
||||
* tray icon, Status page, and Peers page.
|
||||
* - toastStreamLoop: DNS / network / auth / connectivity / update
|
||||
* SystemEvent stream. Drives OS notifications, the Recent Events
|
||||
* list, and the update-overlay flag. The daemon-side RPC is named
|
||||
* SubscribeEvents — only the loop's local alias differs to keep the
|
||||
* two streams distinguishable in this file.
|
||||
*
|
||||
* Safe to call once at boot; both loops self-restart on stream errors
|
||||
* via exponential backoff.
|
||||
*/
|
||||
export function Watch(): $CancellablePromise<void> {
|
||||
return $Call.ByID(2799871735);
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.Status.createFrom;
|
||||
@@ -1,40 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Preferences is the Wails-bound facade over preferences.Store. The store
|
||||
* itself owns persistence and the subscription channel; this type just
|
||||
* re-exposes Get and SetLanguage with the context.Context-first signature
|
||||
* the Wails binding generator wants.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as i18n$0 from "../i18n/models.js";
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as preferences$0 from "../preferences/models.js";
|
||||
|
||||
/**
|
||||
* Get returns the current user-scope preferences.
|
||||
*/
|
||||
export function Get(): $CancellablePromise<preferences$0.UIPreferences> {
|
||||
return $Call.ByID(3500743391).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* SetLanguage validates and persists a new UI language.
|
||||
*/
|
||||
export function SetLanguage(lang: i18n$0.LanguageCode): $CancellablePromise<void> {
|
||||
return $Call.ByID(3710099805, lang);
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = preferences$0.UIPreferences.createFrom;
|
||||
@@ -1,52 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Profiles groups the daemon RPCs that manage named profiles.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
export function Add(p: $models.ProfileRef): $CancellablePromise<void> {
|
||||
return $Call.ByID(722930578, p);
|
||||
}
|
||||
|
||||
export function GetActive(): $CancellablePromise<$models.ActiveProfile> {
|
||||
return $Call.ByID(3458449443).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
export function List(username: string): $CancellablePromise<$models.Profile[]> {
|
||||
return $Call.ByID(3702185167, username).then(($result: any) => {
|
||||
return $$createType2($result);
|
||||
});
|
||||
}
|
||||
|
||||
export function Remove(p: $models.ProfileRef): $CancellablePromise<void> {
|
||||
return $Call.ByID(2365690315, p);
|
||||
}
|
||||
|
||||
export function Switch(p: $models.ProfileRef): $CancellablePromise<void> {
|
||||
return $Call.ByID(3209858855, p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Username returns the OS username the daemon expects for profile lookups.
|
||||
* The frontend calls this once at boot and reuses the result.
|
||||
*/
|
||||
export function Username(): $CancellablePromise<string> {
|
||||
return $Call.ByID(262345647);
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.ActiveProfile.createFrom;
|
||||
const $$createType1 = $models.Profile.createFrom;
|
||||
const $$createType2 = $Create.Array($$createType1);
|
||||
@@ -1,62 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* ProfileSwitcher encapsulates the full profile-switching reconnect policy
|
||||
* so both the tray and the React frontend use identical logic.
|
||||
*
|
||||
* Reconnect policy + optimistic-feedback table (driven by prevStatus
|
||||
* captured from Peers.Get at SwitchActive entry):
|
||||
*
|
||||
* ┌─────────────────┬──────────────────────┬──────────────────────────┬────────────────────┐
|
||||
* │ Previous status │ Action │ Optimistic UI label │ Suppressed events │
|
||||
* │ │ │ shown immediately │ until new flow │
|
||||
* ├─────────────────┼──────────────────────┼──────────────────────────┼────────────────────┤
|
||||
* │ Connected │ Switch + Down + Up │ Connecting (synthetic) │ Connected, Idle │
|
||||
* │ Connecting │ Switch + Down + Up │ Connecting (unchanged) │ Connected, Idle │
|
||||
* │ NeedsLogin │ Switch + Down │ (no change) │ — │
|
||||
* │ LoginFailed │ Switch + Down │ (no change) │ — │
|
||||
* │ SessionExpired │ Switch + Down │ (no change) │ — │
|
||||
* │ Idle │ Switch only │ (no change) │ — │
|
||||
* └─────────────────┴──────────────────────┴──────────────────────────┴────────────────────┘
|
||||
*
|
||||
* Only Connected/Connecting trigger the optimistic Connecting paint
|
||||
* (via Peers.BeginProfileSwitch): they're the only prevStatuses where
|
||||
* the daemon emits stale Connected updates (peer count drops as the
|
||||
* engine tears down) and then Idle, before the new profile's Up
|
||||
* resumes the stream. Both are swallowed by Peers.shouldSuppress
|
||||
* until a status that signals the new flow has begun (Connecting, or
|
||||
* any of the "Up won't run" terminal states: NeedsLogin / LoginFailed /
|
||||
* SessionExpired / DaemonUnavailable). The other prevStatuses either
|
||||
* don't drive Down/Up at all (Idle) or stop after Down (NeedsLogin /
|
||||
* LoginFailed / SessionExpired) — the resulting Idle is the correct
|
||||
* terminal state, so no suppression is needed.
|
||||
*
|
||||
* Rationale for each Action choice:
|
||||
*
|
||||
* Connected → Reconnect with the new profile.
|
||||
* Connecting → Stop old retry loop, restart.
|
||||
* NeedsLogin → Clear stale error; user logs in.
|
||||
* LoginFailed → Clear stale error; user logs in.
|
||||
* SessionExpired → Clear stale error; user logs in.
|
||||
* Idle → User chose offline; don't connect.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
/**
|
||||
* SwitchActive switches to the named profile applying the reconnect policy.
|
||||
* All RPCs complete quickly: Up uses async mode so the daemon starts the
|
||||
* connection attempt and returns immediately; status updates flow via the
|
||||
* SubscribeStatus stream.
|
||||
*/
|
||||
export function SwitchActive(p: $models.ProfileRef): $CancellablePromise<void> {
|
||||
return $Call.ByID(4025913103, p);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Settings groups the daemon RPCs that read and write the daemon config.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
export function GetConfig(p: $models.ConfigParams): $CancellablePromise<$models.Config> {
|
||||
return $Call.ByID(59246988, p).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
export function GetFeatures(): $CancellablePromise<$models.Features> {
|
||||
return $Call.ByID(2056724965).then(($result: any) => {
|
||||
return $$createType1($result);
|
||||
});
|
||||
}
|
||||
|
||||
export function SetConfig(p: $models.SetConfigParams): $CancellablePromise<void> {
|
||||
return $Call.ByID(26939944, p);
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.Config.createFrom;
|
||||
const $$createType1 = $models.Features.createFrom;
|
||||
@@ -1,41 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Update groups the RPCs that drive the enforced-update install flow.
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
export function GetInstallerResult(): $CancellablePromise<$models.UpdateResult> {
|
||||
return $Call.ByID(2533624807).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Quit asks the host application to exit. The /update page calls this once
|
||||
* the daemon-side installer has reported success, mirroring the legacy
|
||||
* Fyne UI's app.Quit() in showInstallerResult. Schedules the actual exit
|
||||
* off the calling goroutine so the JS-side caller's response can return
|
||||
* before the runtime tears down.
|
||||
*/
|
||||
export function Quit(): $CancellablePromise<void> {
|
||||
return $Call.ByID(409602657);
|
||||
}
|
||||
|
||||
export function Trigger(): $CancellablePromise<$models.UpdateResult> {
|
||||
return $Call.ByID(166270378).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.UpdateResult.createFrom;
|
||||
@@ -1,33 +0,0 @@
|
||||
//@ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as preferences$0 from "../../../../netbirdio/netbird/client/ui/preferences/models.js";
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as services$0 from "../../../../netbirdio/netbird/client/ui/services/models.js";
|
||||
|
||||
function configure() {
|
||||
Object.freeze(Object.assign($Create.Events, {
|
||||
"netbird:event": $$createType0,
|
||||
"netbird:preferences:changed": $$createType1,
|
||||
"netbird:status": $$createType2,
|
||||
"netbird:update:available": $$createType3,
|
||||
"netbird:update:progress": $$createType4,
|
||||
}));
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = services$0.SystemEvent.createFrom;
|
||||
const $$createType1 = preferences$0.UIPreferences.createFrom;
|
||||
const $$createType2 = services$0.Status.createFrom;
|
||||
const $$createType3 = services$0.UpdateAvailable.createFrom;
|
||||
const $$createType4 = services$0.UpdateProgress.createFrom;
|
||||
|
||||
configure();
|
||||
@@ -1,25 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import type { Events } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import type * as preferences$0 from "../../../../netbirdio/netbird/client/ui/preferences/models.js";
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import type * as services$0 from "../../../../netbirdio/netbird/client/ui/services/models.js";
|
||||
|
||||
declare module "@wailsio/runtime" {
|
||||
namespace Events {
|
||||
interface CustomEvents {
|
||||
"netbird:event": services$0.SystemEvent;
|
||||
"netbird:preferences:changed": preferences$0.UIPreferences;
|
||||
"netbird:status": services$0.Status;
|
||||
"netbird:update:available": services$0.UpdateAvailable;
|
||||
"netbird:update:progress": services$0.UpdateProgress;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import * as NotificationService from "./notificationservice.js";
|
||||
export {
|
||||
NotificationService
|
||||
};
|
||||
|
||||
export {
|
||||
NotificationAction,
|
||||
NotificationCategory,
|
||||
NotificationOptions
|
||||
} from "./models.js";
|
||||
@@ -1,107 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
/**
|
||||
* NotificationAction represents an action button for a notification.
|
||||
*/
|
||||
export class NotificationAction {
|
||||
"id"?: string;
|
||||
"title"?: string;
|
||||
|
||||
/**
|
||||
* (macOS-specific)
|
||||
*/
|
||||
"destructive"?: boolean;
|
||||
|
||||
/** Creates a new NotificationAction instance. */
|
||||
constructor($$source: Partial<NotificationAction> = {}) {
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new NotificationAction instance from a string or object.
|
||||
*/
|
||||
static createFrom($$source: any = {}): NotificationAction {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new NotificationAction($$parsedSource as Partial<NotificationAction>);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* NotificationCategory groups actions for notifications.
|
||||
*/
|
||||
export class NotificationCategory {
|
||||
"id"?: string;
|
||||
"actions"?: NotificationAction[];
|
||||
"hasReplyField"?: boolean;
|
||||
"replyPlaceholder"?: string;
|
||||
"replyButtonTitle"?: string;
|
||||
|
||||
/** Creates a new NotificationCategory instance. */
|
||||
constructor($$source: Partial<NotificationCategory> = {}) {
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new NotificationCategory instance from a string or object.
|
||||
*/
|
||||
static createFrom($$source: any = {}): NotificationCategory {
|
||||
const $$createField1_0 = $$createType1;
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
if ("actions" in $$parsedSource) {
|
||||
$$parsedSource["actions"] = $$createField1_0($$parsedSource["actions"]);
|
||||
}
|
||||
return new NotificationCategory($$parsedSource as Partial<NotificationCategory>);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* NotificationOptions contains configuration for a notification
|
||||
*/
|
||||
export class NotificationOptions {
|
||||
"id": string;
|
||||
"title": string;
|
||||
|
||||
/**
|
||||
* (macOS and Linux only)
|
||||
*/
|
||||
"subtitle"?: string;
|
||||
"body"?: string;
|
||||
"categoryId"?: string;
|
||||
"data"?: { [_ in string]?: any };
|
||||
|
||||
/** Creates a new NotificationOptions instance. */
|
||||
constructor($$source: Partial<NotificationOptions> = {}) {
|
||||
if (!("id" in $$source)) {
|
||||
this["id"] = "";
|
||||
}
|
||||
if (!("title" in $$source)) {
|
||||
this["title"] = "";
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new NotificationOptions instance from a string or object.
|
||||
*/
|
||||
static createFrom($$source: any = {}): NotificationOptions {
|
||||
const $$createField5_0 = $$createType2;
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
if ("data" in $$parsedSource) {
|
||||
$$parsedSource["data"] = $$createField5_0($$parsedSource["data"]);
|
||||
}
|
||||
return new NotificationOptions($$parsedSource as Partial<NotificationOptions>);
|
||||
}
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = NotificationAction.createFrom;
|
||||
const $$createType1 = $Create.Array($$createType0);
|
||||
const $$createType2 = $Create.Map($Create.Any, $Create.Any);
|
||||
@@ -1,62 +0,0 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* Service represents the notifications service
|
||||
* @module
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
export function CheckNotificationAuthorization(): $CancellablePromise<boolean> {
|
||||
return $Call.ByID(2216952893);
|
||||
}
|
||||
|
||||
export function RegisterNotificationCategory(category: $models.NotificationCategory): $CancellablePromise<void> {
|
||||
return $Call.ByID(2917562919, category);
|
||||
}
|
||||
|
||||
export function RemoveAllDeliveredNotifications(): $CancellablePromise<void> {
|
||||
return $Call.ByID(3956282340);
|
||||
}
|
||||
|
||||
export function RemoveAllPendingNotifications(): $CancellablePromise<void> {
|
||||
return $Call.ByID(108821341);
|
||||
}
|
||||
|
||||
export function RemoveDeliveredNotification(identifier: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(975691940, identifier);
|
||||
}
|
||||
|
||||
export function RemoveNotification(identifier: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(3966653866, identifier);
|
||||
}
|
||||
|
||||
export function RemoveNotificationCategory(categoryID: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(2032615554, categoryID);
|
||||
}
|
||||
|
||||
export function RemovePendingNotification(identifier: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(3729049703, identifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Public methods that delegate to the implementation.
|
||||
*/
|
||||
export function RequestNotificationAuthorization(): $CancellablePromise<boolean> {
|
||||
return $Call.ByID(3933442950);
|
||||
}
|
||||
|
||||
export function SendNotification(options: $models.NotificationOptions): $CancellablePromise<void> {
|
||||
return $Call.ByID(3968228732, options);
|
||||
}
|
||||
|
||||
export function SendNotificationWithActions(options: $models.NotificationOptions): $CancellablePromise<void> {
|
||||
return $Call.ByID(1886542847, options);
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
"build": "tsc && vite build --mode production",
|
||||
"preview": "vite preview",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"bindings": "cd .. && wails3 generate bindings -clean=true -ts",
|
||||
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,css,json,md}\"",
|
||||
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,css,json,md}\""
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user