feat: add autogenerated TypeScript definitions and service interfaces

This commit is contained in:
Snider 2026-01-15 22:47:11 +00:00
parent 0ad5c09ee6
commit a0a7ea20da
64 changed files with 6336 additions and 0 deletions

View file

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as MCPBridge from "./mcpbridge.js";
export {
MCPBridge
};

View file

@ -0,0 +1,57 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* MCPBridge wires together MCP, WebView, Display and WebSocket services
* and starts the MCP HTTP server after Wails initializes.
* @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 display$0 from "../github.com/Snider/Core/pkg/display/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as mcp$0 from "../github.com/Snider/Core/pkg/mcp/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as webview$0 from "../github.com/Snider/Core/pkg/webview/models.js";
/**
* GetDisplay returns the Display service.
*/
export function GetDisplay(): $CancellablePromise<display$0.Service | null> {
return $Call.ByID(3763799861).then(($result: any) => {
return $$createType1($result);
});
}
/**
* GetMCPService returns the MCP service for direct access.
*/
export function GetMCPService(): $CancellablePromise<mcp$0.Service | null> {
return $Call.ByID(4133944486).then(($result: any) => {
return $$createType3($result);
});
}
/**
* GetWebView returns the WebView service.
*/
export function GetWebView(): $CancellablePromise<webview$0.Service | null> {
return $Call.ByID(903939500).then(($result: any) => {
return $$createType5($result);
});
}
// Private type creation functions
const $$createType0 = display$0.Service.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = mcp$0.Service.createFrom;
const $$createType3 = $Create.Nullable($$createType2);
const $$createType4 = webview$0.Service.createFrom;
const $$createType5 = $Create.Nullable($$createType4);

View file

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};

View file

@ -0,0 +1,226 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service provides access to the application's configuration.
* It handles loading, saving, and providing access to configuration values,
* abstracting away the details of file I/O and data serialization.
* The Service is designed to be a central point for all configuration-related
* operations within the application.
*
* The fields of the Service struct are automatically saved to and loaded from
* a JSON configuration file. The `json:"-"` tag on ServiceRuntime prevents
* it from being serialized.
* @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 core$0 from "../core/models.js";
/**
* Config returns the registered Config service from the core application.
* This is a convenience method for accessing the application's configuration.
*/
export function Config(): $CancellablePromise<core$0.Config> {
return $Call.ByID(80156326);
}
/**
* Core returns the central core instance, providing access to all registered services.
*/
export function Core(): $CancellablePromise<core$0.Core | null> {
return $Call.ByID(1678901799).then(($result: any) => {
return $$createType1($result);
});
}
/**
* DisableFeature disables a feature by removing it from the features list.
* If the feature is not enabled, this is a no-op.
*
* Example:
*
* err := cfg.DisableFeature("dark_mode")
* if err != nil {
* log.Printf("Failed to disable feature: %v", err)
* }
*/
export function DisableFeature(feature: string): $CancellablePromise<void> {
return $Call.ByID(796720498, feature);
}
/**
* EnableFeature enables a feature by adding it to the features list.
* If the feature is already enabled, this is a no-op.
*
* Example:
*
* err := cfg.EnableFeature("dark_mode")
* if err != nil {
* log.Printf("Failed to enable feature: %v", err)
* }
*/
export function EnableFeature(feature: string): $CancellablePromise<void> {
return $Call.ByID(953595547, feature);
}
/**
* Get retrieves a configuration value by its key. The key corresponds to the
* JSON tag of a field in the Service struct. The retrieved value is stored in
* the `out` parameter, which must be a non-nil pointer to a variable of the
* correct type.
*
* Example:
*
* var currentLanguage string
* err := cfg.Get("language", &currentLanguage)
* if err != nil {
* log.Printf("Could not retrieve language setting: %v", err)
* }
* fmt.Println("Current language is:", currentLanguage)
*/
export function Get(key: string, out: any): $CancellablePromise<void> {
return $Call.ByID(1987004372, key, out);
}
/**
* HandleIPCEvents processes IPC messages for the config service.
*/
export function HandleIPCEvents(c: core$0.Core | null, msg: core$0.Message): $CancellablePromise<void> {
return $Call.ByID(1015502349, c, msg);
}
/**
* IsFeatureEnabled checks if a feature is enabled.
*
* Example:
*
* if cfg.IsFeatureEnabled("dark_mode") {
* // Apply dark mode styles
* }
*/
export function IsFeatureEnabled(feature: string): $CancellablePromise<boolean> {
return $Call.ByID(1495993163, feature);
}
/**
* LoadKeyValues loads a map of key-value pairs from a file in the config
* directory. The file format is determined by the extension of the `key`
* parameter. This allows for easy retrieval of data stored in various formats.
*
* Example:
*
* dbConfig, err := cfg.LoadKeyValues("database.yml")
* if err != nil {
* log.Printf("Error loading database config: %v", err)
* }
* port, ok := dbConfig["port"].(int)
* // ...
*/
export function LoadKeyValues(key: string): $CancellablePromise<{ [_: string]: any }> {
return $Call.ByID(1235871433, key).then(($result: any) => {
return $$createType2($result);
});
}
/**
* LoadStruct loads an arbitrary struct from a JSON file in the config directory.
* The `key` parameter specifies the filename (without the .json extension). The
* loaded data is unmarshaled into the `data` parameter, which must be a
* non-nil pointer to a struct.
*
* Example:
*
* var prefs UserPreferences
* err := cfg.LoadStruct("user_prefs", &prefs)
* if err != nil {
* log.Printf("Error loading user preferences: %v", err)
* }
* fmt.Printf("User theme is: %s", prefs.Theme)
*/
export function LoadStruct(key: string, data: any): $CancellablePromise<void> {
return $Call.ByID(2823566133, key, data);
}
/**
* Save writes the current configuration to a JSON file. The location of the file
* is determined by the ConfigPath field of the Service struct. This method is
* typically called automatically by Set, but can be used to explicitly save
* changes.
*
* Example:
*
* err := cfg.Save()
* if err != nil {
* log.Printf("Error saving configuration: %v", err)
* }
*/
export function Save(): $CancellablePromise<void> {
return $Call.ByID(1923338053);
}
/**
* SaveKeyValues saves a map of key-value pairs to a file in the config
* directory. The file format is determined by the extension of the `key`
* parameter. This method is a convenient way to store structured data in a
* format of choice.
*
* Example:
*
* data := map[string]interface{}{"host": "localhost", "port": 8080}
* err := cfg.SaveKeyValues("database.yml", data)
* if err != nil {
* log.Printf("Error saving database config: %v", err)
* }
*/
export function SaveKeyValues(key: string, data: { [_: string]: any }): $CancellablePromise<void> {
return $Call.ByID(2830367426, key, data);
}
/**
* SaveStruct saves an arbitrary struct to a JSON file in the config directory.
* This is useful for storing complex data that is not part of the main
* configuration. The `key` parameter is used as the filename (with a .json
* extension).
*
* Example:
*
* type UserPreferences struct {
* Theme string `json:"theme"`
* Notifications bool `json:"notifications"`
* }
* prefs := UserPreferences{Theme: "dark", Notifications: true}
* err := cfg.SaveStruct("user_prefs", prefs)
* if err != nil {
* log.Printf("Error saving user preferences: %v", err)
* }
*/
export function SaveStruct(key: string, data: any): $CancellablePromise<void> {
return $Call.ByID(2819770048, key, data);
}
/**
* Set updates a configuration value and saves the change to the configuration
* file. The key corresponds to the JSON tag of a field in the Service struct.
* The provided value `v` must be of a type that is assignable to the field.
*
* Example:
*
* err := cfg.Set("default_route", "/home")
* if err != nil {
* log.Printf("Failed to set default route: %v", err)
* }
*/
export function Set(key: string, v: any): $CancellablePromise<void> {
return $Call.ByID(2438166024, key, v);
}
// Private type creation functions
const $$createType0 = core$0.Core.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = $Create.Map($Create.Any, $Create.Any);

View file

@ -0,0 +1,12 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
Core,
Features
} from "./models.js";
export type {
Config,
Message
} from "./models.js";

View file

@ -0,0 +1,96 @@
// 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 application$0 from "../../../../wailsapp/wails/v3/pkg/application/models.js";
/**
* Config provides access to application configuration.
*/
export type Config = any;
/**
* Core is the central application object that manages services, assets, and communication.
*/
export class Core {
"App": application$0.App | null;
"Features": Features | null;
/** Creates a new Core instance. */
constructor($$source: Partial<Core> = {}) {
if (!("App" in $$source)) {
this["App"] = null;
}
if (!("Features" in $$source)) {
this["Features"] = null;
}
Object.assign(this, $$source);
}
/**
* Creates a new Core instance from a string or object.
*/
static createFrom($$source: any = {}): Core {
const $$createField0_0 = $$createType1;
const $$createField1_0 = $$createType3;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("App" in $$parsedSource) {
$$parsedSource["App"] = $$createField0_0($$parsedSource["App"]);
}
if ("Features" in $$parsedSource) {
$$parsedSource["Features"] = $$createField1_0($$parsedSource["Features"]);
}
return new Core($$parsedSource as Partial<Core>);
}
}
/**
* Features provides a way to check if a feature is enabled.
* This is used for feature flagging and conditional logic.
*/
export class Features {
/**
* Flags is a list of enabled feature flags.
*/
"Flags": string[];
/** Creates a new Features instance. */
constructor($$source: Partial<Features> = {}) {
if (!("Flags" in $$source)) {
this["Flags"] = [];
}
Object.assign(this, $$source);
}
/**
* Creates a new Features instance from a string or object.
*/
static createFrom($$source: any = {}): Features {
const $$createField0_0 = $$createType4;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("Flags" in $$parsedSource) {
$$parsedSource["Flags"] = $$createField0_0($$parsedSource["Flags"]);
}
return new Features($$parsedSource as Partial<Features>);
}
}
/**
* Message is the interface for all messages that can be sent through the Core's IPC system.
* Any struct can be a message, allowing for structured data to be passed between services.
*/
export type Message = any;
// Private type creation functions
const $$createType0 = application$0.App.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = Features.createFrom;
const $$createType3 = $Create.Nullable($$createType2);
const $$createType4 = $Create.Array($Create.Any);

View file

@ -0,0 +1,11 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};
export type {
HashType
} from "./models.js";

View file

@ -0,0 +1,16 @@
// 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 crypt$0 from "../../../Enchantrix/pkg/crypt/models.js";
/**
* HashType defines the supported hashing algorithms.
* Re-exported from Enchantrix for convenience.
*/
export type HashType = crypt$0.HashType;

View file

@ -0,0 +1,169 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service provides cryptographic functions to the application.
* It delegates to Enchantrix for all cryptographic operations.
* @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 core$0 from "../core/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as io$0 from "../../../../../io/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";
/**
* Config returns the registered Config service from the core application.
* This is a convenience method for accessing the application's configuration.
*/
export function Config(): $CancellablePromise<core$0.Config> {
return $Call.ByID(4086601246);
}
/**
* Core returns the central core instance, providing access to all registered services.
*/
export function Core(): $CancellablePromise<core$0.Core | null> {
return $Call.ByID(81428095).then(($result: any) => {
return $$createType1($result);
});
}
/**
* DecryptPGP decrypts a PGP message.
* Note: Enchantrix does not support passphrase-protected keys for decryption.
*/
export function DecryptPGP(privateKey: string, message: string): $CancellablePromise<string> {
return $Call.ByID(583706276, privateKey, message);
}
/**
* DecryptRSA decrypts data using an RSA private key.
* Takes PEM-encoded private key and ciphertext.
*/
export function DecryptRSA(privateKeyPEM: string, ciphertext: string): $CancellablePromise<string> {
return $Call.ByID(1345539309, privateKeyPEM, ciphertext);
}
/**
* EncryptPGP encrypts data for a recipient and writes to the provided writer.
*/
export function EncryptPGP(writer: io$0.Writer, recipientPublicKey: string, data: string): $CancellablePromise<void> {
return $Call.ByID(2890283020, writer, recipientPublicKey, data);
}
/**
* EncryptPGPToString encrypts data for a recipient and returns the ciphertext.
*/
export function EncryptPGPToString(recipientPublicKey: string, data: string): $CancellablePromise<string> {
return $Call.ByID(165721080, recipientPublicKey, data);
}
/**
* EncryptRSA encrypts data using an RSA public key.
* Takes PEM-encoded public key and returns base64-encoded ciphertext.
*/
export function EncryptRSA(publicKeyPEM: string, plaintext: string): $CancellablePromise<string> {
return $Call.ByID(2625148021, publicKeyPEM, plaintext);
}
/**
* Fletcher16 computes the Fletcher-16 checksum.
*/
export function Fletcher16(payload: string): $CancellablePromise<number> {
return $Call.ByID(1946934332, payload);
}
/**
* Fletcher32 computes the Fletcher-32 checksum.
*/
export function Fletcher32(payload: string): $CancellablePromise<number> {
return $Call.ByID(134657290, payload);
}
/**
* Fletcher64 computes the Fletcher-64 checksum.
*/
export function Fletcher64(payload: string): $CancellablePromise<number> {
return $Call.ByID(4160741397, payload);
}
/**
* GeneratePGPKeyPair generates a PGP key pair.
* Note: Enchantrix PGP keys are not passphrase-protected. The comment parameter
* is used instead of passphrase for key metadata.
*/
export function GeneratePGPKeyPair(name: string, email: string, comment: string): $CancellablePromise<[string, string]> {
return $Call.ByID(404306973, name, email, comment);
}
/**
* GenerateRSAKeyPair generates an RSA key pair with the specified bit size.
* Returns PEM-encoded public and private keys.
*/
export function GenerateRSAKeyPair(bits: number): $CancellablePromise<[string, string]> {
return $Call.ByID(931266286, bits);
}
/**
* HandleIPCEvents processes IPC messages for the crypt service.
*/
export function HandleIPCEvents(c: core$0.Core | null, msg: core$0.Message): $CancellablePromise<void> {
return $Call.ByID(2172739989, c, msg);
}
/**
* Hash computes a hash of the payload using the specified algorithm.
*/
export function Hash(lib: $models.HashType, payload: string): $CancellablePromise<string> {
return $Call.ByID(2586228864, lib, payload);
}
/**
* IsHashAlgo checks if the given string is a valid hash algorithm.
*/
export function IsHashAlgo(algo: string): $CancellablePromise<boolean> {
return $Call.ByID(326857739, algo);
}
/**
* Luhn validates a number using the Luhn algorithm.
*/
export function Luhn(payload: string): $CancellablePromise<boolean> {
return $Call.ByID(2072043901, payload);
}
/**
* SignPGP signs data with a PGP private key.
*/
export function SignPGP(privateKey: string, data: string): $CancellablePromise<string> {
return $Call.ByID(1808182420, privateKey, data);
}
/**
* SymmetricallyEncryptPGP encrypts data using a passphrase and writes to the provided writer.
*/
export function SymmetricallyEncryptPGP(writer: io$0.Writer, data: string, passphrase: string): $CancellablePromise<void> {
return $Call.ByID(1965343785, writer, data, passphrase);
}
/**
* VerifyPGP verifies a PGP signature.
*/
export function VerifyPGP(publicKey: string, data: string, signature: string): $CancellablePromise<void> {
return $Call.ByID(2355577904, publicKey, data, signature);
}
// Private type creation functions
const $$createType0 = core$0.Core.createFrom;
const $$createType1 = $Create.Nullable($$createType0);

View file

@ -0,0 +1,34 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};
export {
CreateWindowOptions,
FileFilter,
Layout,
LayoutInfo,
NotificationOptions,
OpenDirectoryOptions,
OpenFileOptions,
SaveFileOptions,
ScreenInfo,
Service,
SnapPosition,
ThemeInfo,
TileMode,
TrayMenuItem,
WSEventManager,
Window,
WindowInfo,
WindowState,
WorkArea,
WorkflowType
} from "./models.js";
export type {
WindowOption
} from "./models.js";

View file

@ -0,0 +1,641 @@
// 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 application$0 from "../../../../wailsapp/wails/v3/pkg/application/models.js";
/**
* CreateWindowOptions contains options for creating a new window.
*/
export class CreateWindowOptions {
"name": string;
"title"?: string;
"url"?: string;
"x"?: number;
"y"?: number;
"width"?: number;
"height"?: number;
/** Creates a new CreateWindowOptions instance. */
constructor($$source: Partial<CreateWindowOptions> = {}) {
if (!("name" in $$source)) {
this["name"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new CreateWindowOptions instance from a string or object.
*/
static createFrom($$source: any = {}): CreateWindowOptions {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new CreateWindowOptions($$parsedSource as Partial<CreateWindowOptions>);
}
}
/**
* FileFilter represents a file type filter for dialogs.
*/
export class FileFilter {
"displayName": string;
"pattern": string;
"extensions"?: string[];
/** Creates a new FileFilter instance. */
constructor($$source: Partial<FileFilter> = {}) {
if (!("displayName" in $$source)) {
this["displayName"] = "";
}
if (!("pattern" in $$source)) {
this["pattern"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new FileFilter instance from a string or object.
*/
static createFrom($$source: any = {}): FileFilter {
const $$createField2_0 = $$createType0;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("extensions" in $$parsedSource) {
$$parsedSource["extensions"] = $$createField2_0($$parsedSource["extensions"]);
}
return new FileFilter($$parsedSource as Partial<FileFilter>);
}
}
/**
* Layout represents a saved window arrangement.
*/
export class Layout {
"name": string;
"windows": { [_: string]: WindowState };
"createdAt": number;
"updatedAt": number;
/** Creates a new Layout instance. */
constructor($$source: Partial<Layout> = {}) {
if (!("name" in $$source)) {
this["name"] = "";
}
if (!("windows" in $$source)) {
this["windows"] = {};
}
if (!("createdAt" in $$source)) {
this["createdAt"] = 0;
}
if (!("updatedAt" in $$source)) {
this["updatedAt"] = 0;
}
Object.assign(this, $$source);
}
/**
* Creates a new Layout instance from a string or object.
*/
static createFrom($$source: any = {}): Layout {
const $$createField1_0 = $$createType2;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("windows" in $$parsedSource) {
$$parsedSource["windows"] = $$createField1_0($$parsedSource["windows"]);
}
return new Layout($$parsedSource as Partial<Layout>);
}
}
/**
* LayoutInfo contains summary information about a layout.
*/
export class LayoutInfo {
"name": string;
"windowCount": number;
"createdAt": number;
"updatedAt": number;
/** Creates a new LayoutInfo instance. */
constructor($$source: Partial<LayoutInfo> = {}) {
if (!("name" in $$source)) {
this["name"] = "";
}
if (!("windowCount" in $$source)) {
this["windowCount"] = 0;
}
if (!("createdAt" in $$source)) {
this["createdAt"] = 0;
}
if (!("updatedAt" in $$source)) {
this["updatedAt"] = 0;
}
Object.assign(this, $$source);
}
/**
* Creates a new LayoutInfo instance from a string or object.
*/
static createFrom($$source: any = {}): LayoutInfo {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new LayoutInfo($$parsedSource as Partial<LayoutInfo>);
}
}
/**
* NotificationOptions contains options for showing a notification.
*/
export class NotificationOptions {
"id"?: string;
"title": string;
"message": string;
"subtitle"?: string;
/** Creates a new NotificationOptions instance. */
constructor($$source: Partial<NotificationOptions> = {}) {
if (!("title" in $$source)) {
this["title"] = "";
}
if (!("message" in $$source)) {
this["message"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new NotificationOptions instance from a string or object.
*/
static createFrom($$source: any = {}): NotificationOptions {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new NotificationOptions($$parsedSource as Partial<NotificationOptions>);
}
}
/**
* OpenDirectoryOptions contains options for the directory picker.
*/
export class OpenDirectoryOptions {
"title"?: string;
"defaultDirectory"?: string;
"allowMultiple"?: boolean;
/** Creates a new OpenDirectoryOptions instance. */
constructor($$source: Partial<OpenDirectoryOptions> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new OpenDirectoryOptions instance from a string or object.
*/
static createFrom($$source: any = {}): OpenDirectoryOptions {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new OpenDirectoryOptions($$parsedSource as Partial<OpenDirectoryOptions>);
}
}
/**
* OpenFileOptions contains options for the open file dialog.
*/
export class OpenFileOptions {
"title"?: string;
"defaultDirectory"?: string;
"defaultFilename"?: string;
"filters"?: FileFilter[];
"allowMultiple"?: boolean;
/** Creates a new OpenFileOptions instance. */
constructor($$source: Partial<OpenFileOptions> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new OpenFileOptions instance from a string or object.
*/
static createFrom($$source: any = {}): OpenFileOptions {
const $$createField3_0 = $$createType4;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("filters" in $$parsedSource) {
$$parsedSource["filters"] = $$createField3_0($$parsedSource["filters"]);
}
return new OpenFileOptions($$parsedSource as Partial<OpenFileOptions>);
}
}
/**
* SaveFileOptions contains options for the save file dialog.
*/
export class SaveFileOptions {
"title"?: string;
"defaultDirectory"?: string;
"defaultFilename"?: string;
"filters"?: FileFilter[];
/** Creates a new SaveFileOptions instance. */
constructor($$source: Partial<SaveFileOptions> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new SaveFileOptions instance from a string or object.
*/
static createFrom($$source: any = {}): SaveFileOptions {
const $$createField3_0 = $$createType4;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("filters" in $$parsedSource) {
$$parsedSource["filters"] = $$createField3_0($$parsedSource["filters"]);
}
return new SaveFileOptions($$parsedSource as Partial<SaveFileOptions>);
}
}
/**
* ScreenInfo contains information about a display screen.
*/
export class ScreenInfo {
"id": string;
"name": string;
"x": number;
"y": number;
"width": number;
"height": number;
"primary": boolean;
/** Creates a new ScreenInfo instance. */
constructor($$source: Partial<ScreenInfo> = {}) {
if (!("id" in $$source)) {
this["id"] = "";
}
if (!("name" in $$source)) {
this["name"] = "";
}
if (!("x" in $$source)) {
this["x"] = 0;
}
if (!("y" in $$source)) {
this["y"] = 0;
}
if (!("width" in $$source)) {
this["width"] = 0;
}
if (!("height" in $$source)) {
this["height"] = 0;
}
if (!("primary" in $$source)) {
this["primary"] = false;
}
Object.assign(this, $$source);
}
/**
* Creates a new ScreenInfo instance from a string or object.
*/
static createFrom($$source: any = {}): ScreenInfo {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new ScreenInfo($$parsedSource as Partial<ScreenInfo>);
}
}
/**
* Service manages windowing, dialogs, and other visual elements.
* It is the primary interface for interacting with the UI.
*/
export class Service {
/** Creates a new Service instance. */
constructor($$source: Partial<Service> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new Service instance from a string or object.
*/
static createFrom($$source: any = {}): Service {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Service($$parsedSource as Partial<Service>);
}
}
/**
* SnapPosition represents positions for snapping windows.
*/
export enum SnapPosition {
/**
* The Go zero value for the underlying type of the enum.
*/
$zero = "",
SnapLeft = "left",
SnapRight = "right",
SnapTop = "top",
SnapBottom = "bottom",
SnapTopLeft = "top-left",
SnapTopRight = "top-right",
SnapBottomLeft = "bottom-left",
SnapBottomRight = "bottom-right",
SnapCenter = "center",
};
/**
* ThemeInfo contains information about the current theme.
*/
export class ThemeInfo {
"isDark": boolean;
/**
* "dark" or "light"
*/
"theme": string;
/**
* Whether following system theme
*/
"system": boolean;
/** Creates a new ThemeInfo instance. */
constructor($$source: Partial<ThemeInfo> = {}) {
if (!("isDark" in $$source)) {
this["isDark"] = false;
}
if (!("theme" in $$source)) {
this["theme"] = "";
}
if (!("system" in $$source)) {
this["system"] = false;
}
Object.assign(this, $$source);
}
/**
* Creates a new ThemeInfo instance from a string or object.
*/
static createFrom($$source: any = {}): ThemeInfo {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new ThemeInfo($$parsedSource as Partial<ThemeInfo>);
}
}
/**
* TileMode represents different tiling arrangements.
*/
export enum TileMode {
/**
* The Go zero value for the underlying type of the enum.
*/
$zero = "",
TileModeLeft = "left",
TileModeRight = "right",
TileModeTop = "top",
TileModeBottom = "bottom",
TileModeTopLeft = "top-left",
TileModeTopRight = "top-right",
TileModeBottomLeft = "bottom-left",
TileModeBottomRight = "bottom-right",
TileModeGrid = "grid",
};
/**
* TrayMenuItem represents a menu item for the system tray.
*/
export class TrayMenuItem {
"label": string;
/**
* "normal", "separator", "checkbox", "radio"
*/
"type"?: string;
/**
* for checkbox/radio items
*/
"checked"?: boolean;
"disabled"?: boolean;
"tooltip"?: string;
"submenu"?: TrayMenuItem[];
/**
* ID for callback
*/
"actionId"?: string;
/** Creates a new TrayMenuItem instance. */
constructor($$source: Partial<TrayMenuItem> = {}) {
if (!("label" in $$source)) {
this["label"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new TrayMenuItem instance from a string or object.
*/
static createFrom($$source: any = {}): TrayMenuItem {
const $$createField5_0 = $$createType6;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("submenu" in $$parsedSource) {
$$parsedSource["submenu"] = $$createField5_0($$parsedSource["submenu"]);
}
return new TrayMenuItem($$parsedSource as Partial<TrayMenuItem>);
}
}
/**
* WSEventManager manages WebSocket connections and event subscriptions.
*/
export class WSEventManager {
/** Creates a new WSEventManager instance. */
constructor($$source: Partial<WSEventManager> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new WSEventManager instance from a string or object.
*/
static createFrom($$source: any = {}): WSEventManager {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new WSEventManager($$parsedSource as Partial<WSEventManager>);
}
}
export const Window = application$0.WebviewWindowOptions;
export type Window = application$0.WebviewWindowOptions;
/**
* WindowInfo contains information about a window for MCP.
*/
export class WindowInfo {
"name": string;
"x": number;
"y": number;
"width": number;
"height": number;
"maximized": boolean;
/** Creates a new WindowInfo instance. */
constructor($$source: Partial<WindowInfo> = {}) {
if (!("name" in $$source)) {
this["name"] = "";
}
if (!("x" in $$source)) {
this["x"] = 0;
}
if (!("y" in $$source)) {
this["y"] = 0;
}
if (!("width" in $$source)) {
this["width"] = 0;
}
if (!("height" in $$source)) {
this["height"] = 0;
}
if (!("maximized" in $$source)) {
this["maximized"] = false;
}
Object.assign(this, $$source);
}
/**
* Creates a new WindowInfo instance from a string or object.
*/
static createFrom($$source: any = {}): WindowInfo {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new WindowInfo($$parsedSource as Partial<WindowInfo>);
}
}
export type WindowOption = any;
/**
* WindowState holds the persisted state of a window.
*/
export class WindowState {
"x": number;
"y": number;
"width": number;
"height": number;
"maximized": boolean;
/**
* Screen identifier for multi-monitor
*/
"screen"?: string;
/**
* Last URL/route
*/
"url"?: string;
"updatedAt": number;
/** Creates a new WindowState instance. */
constructor($$source: Partial<WindowState> = {}) {
if (!("x" in $$source)) {
this["x"] = 0;
}
if (!("y" in $$source)) {
this["y"] = 0;
}
if (!("width" in $$source)) {
this["width"] = 0;
}
if (!("height" in $$source)) {
this["height"] = 0;
}
if (!("maximized" in $$source)) {
this["maximized"] = false;
}
if (!("updatedAt" in $$source)) {
this["updatedAt"] = 0;
}
Object.assign(this, $$source);
}
/**
* Creates a new WindowState instance from a string or object.
*/
static createFrom($$source: any = {}): WindowState {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new WindowState($$parsedSource as Partial<WindowState>);
}
}
/**
* WorkArea represents usable screen space (excluding dock, menubar, etc).
*/
export class WorkArea {
"screenId": string;
"x": number;
"y": number;
"width": number;
"height": number;
/** Creates a new WorkArea instance. */
constructor($$source: Partial<WorkArea> = {}) {
if (!("screenId" in $$source)) {
this["screenId"] = "";
}
if (!("x" in $$source)) {
this["x"] = 0;
}
if (!("y" in $$source)) {
this["y"] = 0;
}
if (!("width" in $$source)) {
this["width"] = 0;
}
if (!("height" in $$source)) {
this["height"] = 0;
}
Object.assign(this, $$source);
}
/**
* Creates a new WorkArea instance from a string or object.
*/
static createFrom($$source: any = {}): WorkArea {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new WorkArea($$parsedSource as Partial<WorkArea>);
}
}
/**
* WorkflowType represents predefined workflow layouts.
*/
export enum WorkflowType {
/**
* The Go zero value for the underlying type of the enum.
*/
$zero = "",
WorkflowCoding = "coding",
WorkflowDebugging = "debugging",
WorkflowPresenting = "presenting",
WorkflowSideBySide = "side-by-side",
};
// Private type creation functions
const $$createType0 = $Create.Array($Create.Any);
const $$createType1 = WindowState.createFrom;
const $$createType2 = $Create.Map($Create.Any, $$createType1);
const $$createType3 = FileFilter.createFrom;
const $$createType4 = $Create.Array($$createType3);
const $$createType5 = TrayMenuItem.createFrom;
const $$createType6 = $Create.Array($$createType5);

View file

@ -0,0 +1,618 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service manages windowing, dialogs, and other visual elements.
* It is the primary interface for interacting with the UI.
* @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 core$0 from "../core/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as application$0 from "../../../../wailsapp/wails/v3/pkg/application/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as notifications$0 from "../../../../wailsapp/wails/v3/pkg/services/notifications/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";
/**
* ApplyWorkflowLayout applies a predefined layout for a specific workflow.
*/
export function ApplyWorkflowLayout(workflow: $models.WorkflowType): $CancellablePromise<void> {
return $Call.ByID(476043825, workflow);
}
/**
* CheckNotificationPermission checks if notifications are authorized.
*/
export function CheckNotificationPermission(): $CancellablePromise<boolean> {
return $Call.ByID(3457032254);
}
/**
* ClearClipboard clears the clipboard by setting empty text.
*/
export function ClearClipboard(): $CancellablePromise<void> {
return $Call.ByID(841655875);
}
/**
* CloseWindow closes a window by name.
*/
export function CloseWindow(name: string): $CancellablePromise<void> {
return $Call.ByID(3433483506, name);
}
/**
* Config returns the registered Config service from the core application.
* This is a convenience method for accessing the application's configuration.
*/
export function Config(): $CancellablePromise<core$0.Config> {
return $Call.ByID(2232242108);
}
/**
* ConfirmDialog shows a confirmation dialog and returns the user's choice.
*/
export function ConfirmDialog(title: string, message: string): $CancellablePromise<boolean> {
return $Call.ByID(3496660522, title, message);
}
/**
* Core returns the central core instance, providing access to all registered services.
*/
export function Core(): $CancellablePromise<core$0.Core | null> {
return $Call.ByID(1945729093).then(($result: any) => {
return $$createType1($result);
});
}
/**
* CreateWindow creates a new window with the specified options.
*/
export function CreateWindow(opts: $models.CreateWindowOptions): $CancellablePromise<$models.WindowInfo | null> {
return $Call.ByID(2268870170, opts).then(($result: any) => {
return $$createType3($result);
});
}
/**
* DeleteLayout removes a saved layout by name.
*/
export function DeleteLayout(name: string): $CancellablePromise<void> {
return $Call.ByID(431293335, name);
}
/**
* FocusWindow brings a window to the front.
*/
export function FocusWindow(name: string): $CancellablePromise<void> {
return $Call.ByID(3679876474, name);
}
/**
* GetEventManager returns the event manager for WebSocket event subscriptions.
*/
export function GetEventManager(): $CancellablePromise<$models.WSEventManager | null> {
return $Call.ByID(4088339441).then(($result: any) => {
return $$createType5($result);
});
}
/**
* GetFocusedWindow returns the name of the currently focused window, or empty if none.
*/
export function GetFocusedWindow(): $CancellablePromise<string> {
return $Call.ByID(4250461515);
}
/**
* GetLayout returns a specific layout by name.
*/
export function GetLayout(name: string): $CancellablePromise<$models.Layout | null> {
return $Call.ByID(2300207048, name).then(($result: any) => {
return $$createType7($result);
});
}
/**
* GetPrimaryScreen returns information about the primary screen.
*/
export function GetPrimaryScreen(): $CancellablePromise<$models.ScreenInfo | null> {
return $Call.ByID(1543157204).then(($result: any) => {
return $$createType9($result);
});
}
/**
* GetSavedWindowStates returns all saved window states.
*/
export function GetSavedWindowStates(): $CancellablePromise<{ [_: string]: $models.WindowState | null }> {
return $Call.ByID(959704111).then(($result: any) => {
return $$createType12($result);
});
}
/**
* GetScreen returns information about a specific screen by ID.
*/
export function GetScreen(id: string): $CancellablePromise<$models.ScreenInfo | null> {
return $Call.ByID(461483954, id).then(($result: any) => {
return $$createType9($result);
});
}
/**
* GetScreenAtPoint returns the screen containing a specific point.
*/
export function GetScreenAtPoint(x: number, y: number): $CancellablePromise<$models.ScreenInfo | null> {
return $Call.ByID(1700073503, x, y).then(($result: any) => {
return $$createType9($result);
});
}
/**
* GetScreenForWindow returns the screen containing a specific window.
*/
export function GetScreenForWindow(name: string): $CancellablePromise<$models.ScreenInfo | null> {
return $Call.ByID(835390401, name).then(($result: any) => {
return $$createType9($result);
});
}
/**
* GetScreens returns information about all available screens.
*/
export function GetScreens(): $CancellablePromise<$models.ScreenInfo[]> {
return $Call.ByID(237481171).then(($result: any) => {
return $$createType13($result);
});
}
/**
* GetSystemTheme returns the system's theme preference.
* This is the same as GetTheme since Wails follows the system theme.
*/
export function GetSystemTheme(): $CancellablePromise<$models.ThemeInfo> {
return $Call.ByID(3150417360).then(($result: any) => {
return $$createType14($result);
});
}
/**
* GetTheme returns the current application theme.
*/
export function GetTheme(): $CancellablePromise<$models.ThemeInfo> {
return $Call.ByID(4073748231).then(($result: any) => {
return $$createType14($result);
});
}
/**
* GetTrayInfo returns information about the current tray state.
*/
export function GetTrayInfo(): $CancellablePromise<{ [_: string]: any }> {
return $Call.ByID(3859382794).then(($result: any) => {
return $$createType15($result);
});
}
/**
* GetWindowInfo returns information about a window by name.
*/
export function GetWindowInfo(name: string): $CancellablePromise<$models.WindowInfo | null> {
return $Call.ByID(349034490, name).then(($result: any) => {
return $$createType3($result);
});
}
/**
* GetWindowTitle returns the title of a window by name.
* Note: Wails v3 doesn't expose a title getter, so we track it ourselves or return the name.
*/
export function GetWindowTitle(name: string): $CancellablePromise<string> {
return $Call.ByID(2943922308, name);
}
/**
* GetWorkAreas returns the usable work area for all screens.
*/
export function GetWorkAreas(): $CancellablePromise<$models.WorkArea[]> {
return $Call.ByID(2006398407).then(($result: any) => {
return $$createType17($result);
});
}
/**
* HasClipboard checks if the clipboard has content.
*/
export function HasClipboard(): $CancellablePromise<boolean> {
return $Call.ByID(2739125668);
}
/**
* ListLayouts returns all saved layout names with metadata.
*/
export function ListLayouts(): $CancellablePromise<$models.LayoutInfo[]> {
return $Call.ByID(1178398225).then(($result: any) => {
return $$createType19($result);
});
}
/**
* ListWindowInfos returns information about all windows.
*/
export function ListWindowInfos(): $CancellablePromise<$models.WindowInfo[]> {
return $Call.ByID(1417409467).then(($result: any) => {
return $$createType20($result);
});
}
/**
* MaximizeWindow maximizes a window.
*/
export function MaximizeWindow(name: string): $CancellablePromise<void> {
return $Call.ByID(3409085844, name);
}
/**
* MinimizeWindow minimizes a window.
*/
export function MinimizeWindow(name: string): $CancellablePromise<void> {
return $Call.ByID(282422382, name);
}
/**
* NewWithOptions creates a new window by applying a series of options.
*/
export function NewWithOptions(...opts: $models.WindowOption[]): $CancellablePromise<application$0.WebviewWindow | null> {
return $Call.ByID(2933522506, opts).then(($result: any) => {
return $$createType22($result);
});
}
/**
* NewWithStruct creates a new window using the provided options and returns its handle.
*/
export function NewWithStruct(options: $models.Window | null): $CancellablePromise<application$0.WebviewWindow | null> {
return $Call.ByID(51896165, options).then(($result: any) => {
return $$createType22($result);
});
}
/**
* NewWithURL creates a new default window pointing to the specified URL.
*/
export function NewWithURL(url: string): $CancellablePromise<application$0.WebviewWindow | null> {
return $Call.ByID(1128847469, url).then(($result: any) => {
return $$createType22($result);
});
}
/**
* OpenDirectoryDialog shows a directory picker.
*/
export function OpenDirectoryDialog(opts: $models.OpenDirectoryOptions): $CancellablePromise<string> {
return $Call.ByID(2018109069, opts);
}
/**
* OpenFileDialog shows a file open dialog and returns selected path(s).
*/
export function OpenFileDialog(opts: $models.OpenFileOptions): $CancellablePromise<string[]> {
return $Call.ByID(1105329884, opts).then(($result: any) => {
return $$createType23($result);
});
}
/**
* OpenSingleFileDialog shows a file open dialog for a single file.
*/
export function OpenSingleFileDialog(opts: $models.OpenFileOptions): $CancellablePromise<string> {
return $Call.ByID(2818039508, opts);
}
/**
* OpenWindow creates a new window with the given options. If no options are
* provided, it will use the default options.
*
* example:
*
* err := displayService.OpenWindow(
* display.WithName("my-window"),
* display.WithTitle("My Window"),
* display.WithWidth(800),
* display.WithHeight(600),
* )
* if err != nil {
* log.Fatal(err)
* }
*/
export function OpenWindow(...opts: $models.WindowOption[]): $CancellablePromise<void> {
return $Call.ByID(1872737238, opts);
}
/**
* PromptDialog shows an input prompt dialog.
* Note: Wails v3 doesn't have a native prompt dialog, so this uses a question dialog.
*/
export function PromptDialog(title: string, message: string): $CancellablePromise<[string, boolean]> {
return $Call.ByID(3860540752, title, message);
}
/**
* ReadClipboard reads text content from the system clipboard.
*/
export function ReadClipboard(): $CancellablePromise<string> {
return $Call.ByID(353696084);
}
/**
* RegisterTrayMenuCallback registers a callback for a tray menu action ID.
*/
export function RegisterTrayMenuCallback(actionID: string, callback: any): $CancellablePromise<void> {
return $Call.ByID(2238034275, actionID, callback);
}
/**
* RequestNotificationPermission requests permission for native notifications.
*/
export function RequestNotificationPermission(): $CancellablePromise<boolean> {
return $Call.ByID(1315305223);
}
/**
* ResetWindowState clears saved window positions.
*/
export function ResetWindowState(): $CancellablePromise<void> {
return $Call.ByID(610344254);
}
/**
* RestoreLayout applies a saved layout, positioning all windows.
*/
export function RestoreLayout(name: string): $CancellablePromise<void> {
return $Call.ByID(2529654318, name);
}
/**
* RestoreWindow restores a maximized/minimized window.
*/
export function RestoreWindow(name: string): $CancellablePromise<void> {
return $Call.ByID(2762972996, name);
}
/**
* SaveFileDialog shows a save file dialog and returns the selected path.
*/
export function SaveFileDialog(opts: $models.SaveFileOptions): $CancellablePromise<string> {
return $Call.ByID(3969587317, opts);
}
/**
* SaveLayout saves the current window arrangement as a named layout.
*/
export function SaveLayout(name: string): $CancellablePromise<void> {
return $Call.ByID(1426429509, name);
}
/**
* SelectDirectory opens a directory selection dialog and returns the selected path.
*/
export function SelectDirectory(): $CancellablePromise<string> {
return $Call.ByID(968138697);
}
/**
* SetNotifier sets the notifications service for native notifications.
*/
export function SetNotifier(notifier: notifications$0.NotificationService | null): $CancellablePromise<void> {
return $Call.ByID(4060884340, notifier);
}
/**
* SetTrayIcon sets the system tray icon from raw PNG data.
*/
export function SetTrayIcon(iconData: string): $CancellablePromise<void> {
return $Call.ByID(888726123, iconData);
}
/**
* SetTrayLabel sets the system tray label text.
*/
export function SetTrayLabel(label: string): $CancellablePromise<void> {
return $Call.ByID(3980670180, label);
}
/**
* SetTrayMenu sets the system tray menu from a list of menu items.
*/
export function SetTrayMenu(items: $models.TrayMenuItem[]): $CancellablePromise<void> {
return $Call.ByID(3981223617, items);
}
/**
* SetTrayTooltip sets the system tray tooltip text.
*/
export function SetTrayTooltip(tooltip: string): $CancellablePromise<void> {
return $Call.ByID(85856277, tooltip);
}
/**
* SetWindowAlwaysOnTop sets whether a window stays on top of other windows.
*/
export function SetWindowAlwaysOnTop(name: string, alwaysOnTop: boolean): $CancellablePromise<void> {
return $Call.ByID(2197119377, name, alwaysOnTop);
}
/**
* SetWindowBackgroundColour sets the background color of a window with alpha for transparency.
* Note: On Windows, only alpha 0 or 255 are supported. Other values treated as 255.
*/
export function SetWindowBackgroundColour(name: string, r: number, g: number, b: number, a: number): $CancellablePromise<void> {
return $Call.ByID(3749517962, name, r, g, b, a);
}
/**
* SetWindowBounds sets both position and size of a window.
*/
export function SetWindowBounds(name: string, x: number, y: number, width: number, height: number): $CancellablePromise<void> {
return $Call.ByID(2084950575, name, x, y, width, height);
}
/**
* SetWindowFullscreen sets a window to fullscreen mode.
*/
export function SetWindowFullscreen(name: string, fullscreen: boolean): $CancellablePromise<void> {
return $Call.ByID(4232233979, name, fullscreen);
}
/**
* SetWindowPosition moves a window to the specified position.
*/
export function SetWindowPosition(name: string, x: number, y: number): $CancellablePromise<void> {
return $Call.ByID(3018518601, name, x, y);
}
/**
* SetWindowSize resizes a window.
*/
export function SetWindowSize(name: string, width: number, height: number): $CancellablePromise<void> {
return $Call.ByID(2987817615, name, width, height);
}
/**
* SetWindowTitle changes a window's title.
*/
export function SetWindowTitle(name: string, title: string): $CancellablePromise<void> {
return $Call.ByID(3349151432, name, title);
}
/**
* SetWindowVisibility shows or hides a window.
*/
export function SetWindowVisibility(name: string, visible: boolean): $CancellablePromise<void> {
return $Call.ByID(121431198, name, visible);
}
/**
* ShowEnvironmentDialog displays a dialog containing detailed information about
* the application's runtime environment. This is useful for debugging and
* understanding the context in which the application is running.
*
* example:
*
* displayService.ShowEnvironmentDialog()
*/
export function ShowEnvironmentDialog(): $CancellablePromise<void> {
return $Call.ByID(3261510832);
}
/**
* ShowErrorNotification shows an error notification.
*/
export function ShowErrorNotification(title: string, message: string): $CancellablePromise<void> {
return $Call.ByID(1228262280, title, message);
}
/**
* ShowInfoNotification shows an info notification with a simple message.
*/
export function ShowInfoNotification(title: string, message: string): $CancellablePromise<void> {
return $Call.ByID(2419366044, title, message);
}
/**
* ShowNotification displays a native system notification.
* Falls back to dialog if notifier is not available.
*/
export function ShowNotification(opts: $models.NotificationOptions): $CancellablePromise<void> {
return $Call.ByID(2416075800, opts);
}
/**
* ShowWarningNotification shows a warning notification.
*/
export function ShowWarningNotification(title: string, message: string): $CancellablePromise<void> {
return $Call.ByID(200899338, title, message);
}
/**
* SnapWindow snaps a window to a screen edge or corner.
*/
export function SnapWindow(name: string, position: $models.SnapPosition): $CancellablePromise<void> {
return $Call.ByID(3088366266, name, position);
}
/**
* StackWindows arranges windows in a cascade (stacked) pattern.
* Each window is offset by the given amount from the previous one.
*/
export function StackWindows(windowNames: string[], offsetX: number, offsetY: number): $CancellablePromise<void> {
return $Call.ByID(3309040327, windowNames, offsetX, offsetY);
}
/**
* Startup is called when the app starts. It initializes the display service
* and sets up the main application window and system tray.
*
* err := displayService.Startup(ctx)
* if err != nil {
* log.Fatal(err)
* }
*/
export function Startup(): $CancellablePromise<void> {
return $Call.ByID(1664741927);
}
/**
* TileWindows arranges windows in a tiled layout.
* mode can be: left, right, top, bottom, top-left, top-right, bottom-left, bottom-right, grid
* If windowNames is empty, tiles all windows.
*/
export function TileWindows(mode: $models.TileMode, windowNames: string[]): $CancellablePromise<void> {
return $Call.ByID(1638500379, mode, windowNames);
}
/**
* WriteClipboard writes text content to the system clipboard.
*/
export function WriteClipboard(text: string): $CancellablePromise<void> {
return $Call.ByID(2577466505, text);
}
// Private type creation functions
const $$createType0 = core$0.Core.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = $models.WindowInfo.createFrom;
const $$createType3 = $Create.Nullable($$createType2);
const $$createType4 = $models.WSEventManager.createFrom;
const $$createType5 = $Create.Nullable($$createType4);
const $$createType6 = $models.Layout.createFrom;
const $$createType7 = $Create.Nullable($$createType6);
const $$createType8 = $models.ScreenInfo.createFrom;
const $$createType9 = $Create.Nullable($$createType8);
const $$createType10 = $models.WindowState.createFrom;
const $$createType11 = $Create.Nullable($$createType10);
const $$createType12 = $Create.Map($Create.Any, $$createType11);
const $$createType13 = $Create.Array($$createType8);
const $$createType14 = $models.ThemeInfo.createFrom;
const $$createType15 = $Create.Map($Create.Any, $Create.Any);
const $$createType16 = $models.WorkArea.createFrom;
const $$createType17 = $Create.Array($$createType16);
const $$createType18 = $models.LayoutInfo.createFrom;
const $$createType19 = $Create.Array($$createType18);
const $$createType20 = $Create.Array($$createType2);
const $$createType21 = application$0.WebviewWindow.createFrom;
const $$createType22 = $Create.Nullable($$createType21);
const $$createType23 = $Create.Array($Create.Any);

View file

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};

View file

@ -0,0 +1,37 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service manages documentation windows.
* @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 core$0 from "../core/models.js";
/**
* OpenDocsWindow opens a documentation window at the specified path.
* The path is appended to the base URL to form the full documentation URL.
*/
export function OpenDocsWindow(path: string): $CancellablePromise<void> {
return $Call.ByID(2514509460, path);
}
/**
* SetBaseURL sets the base URL for documentation.
*/
export function SetBaseURL(url: string): $CancellablePromise<void> {
return $Call.ByID(1851990453, url);
}
/**
* SetCore sets the core reference for accessing other services.
*/
export function SetCore(c: core$0.Core | null): $CancellablePromise<void> {
return $Call.ByID(527529290, c);
}

View file

@ -0,0 +1,12 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};
export type {
Core,
Display
} from "./models.js";

View file

@ -0,0 +1,20 @@
// 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";
/**
* Core defines the interface for the core runtime functionalities that the
* help service depends on. This typically includes methods for performing
* actions and accessing the application context.
*/
export type Core = any;
/**
* Display defines the interface for a display service. The help service
* uses this interface to check for the presence of a display module,
* allowing it to function as an optional dependency.
*/
export type Display = any;

View file

@ -0,0 +1,48 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service manages the in-app help system. It handles the initialization
* of the help content, interaction with the core runtime, and display
* of the help window.
* @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";
/**
* Init initializes the service with its core dependencies. This method is
* intended to be called by the dependency injection system of the application
* to provide the necessary `Core` and `Display` implementations.
*/
export function Init(c: $models.Core, d: $models.Display): $CancellablePromise<void> {
return $Call.ByID(2251945077, c, d);
}
/**
* Show displays the main help window. If a `Display` service is available,
* it sends an action to the core runtime to open the window. Otherwise, it
* falls back to using the `wails3` application instance to create a new
* window. This ensures that the help functionality is available even when
* the `Snider/display` module is not in use.
*/
export function Show(): $CancellablePromise<void> {
return $Call.ByID(401579614);
}
/**
* ShowAt displays a specific section of the help documentation, identified
* by an anchor. Similar to `Show`, it uses the `Display` service if available,
* or falls back to a direct `wails3` implementation. The anchor is appended
* to the URL, allowing the help window to open directly to the relevant
* section.
*/
export function ShowAt(anchor: string): $CancellablePromise<void> {
return $Call.ByID(3303047483, anchor);
}

View file

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};

View file

@ -0,0 +1,65 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service provides internationalization and localization.
* It is the primary entrypoint for the i18n package.
* @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 "../../../../nicksnyder/go-i18n/v2/i18n/models.js";
/**
* AvailableLanguages returns a list of available language codes.
*/
export function AvailableLanguages(): $CancellablePromise<string[]> {
return $Call.ByID(3797911080).then(($result: any) => {
return $$createType0($result);
});
}
/**
* GetAllMessages returns all translation messages for the specified language.
* The keys are message IDs and values are the translated strings.
* If lang is empty, it uses the current language.
*/
export function GetAllMessages(lang: string): $CancellablePromise<{ [_: string]: string }> {
return $Call.ByID(497958721, lang).then(($result: any) => {
return $$createType1($result);
});
}
/**
* SetBundle is a test helper to inject a bundle.
*/
export function SetBundle(bundle: i18n$0.Bundle | null): $CancellablePromise<void> {
return $Call.ByID(2373446086, bundle);
}
/**
* SetLanguage sets the language for the i18n service.
* The language tag should be a valid BCP 47 language tag (e.g., "en", "en-US").
* If the language is not supported, an error is returned.
*/
export function SetLanguage(lang: string): $CancellablePromise<void> {
return $Call.ByID(1882213732, lang);
}
/**
* Translate translates a message by its ID.
* It accepts an optional template data argument to interpolate into the translation.
* If the message is not found, the message ID is returned.
*/
export function Translate(messageID: string, ...args: any[]): $CancellablePromise<string> {
return $Call.ByID(1625170060, messageID, args);
}
// Private type creation functions
const $$createType0 = $Create.Array($Create.Any);
const $$createType1 = $Create.Map($Create.Any, $Create.Any);

View file

@ -0,0 +1,13 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};
export {
DirectoryEntry,
FileInfo,
LanguageInfo
} from "./models.js";

View file

@ -0,0 +1,121 @@
// 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";
/**
* DirectoryEntry represents a file or directory in a listing.
*/
export class DirectoryEntry {
"name": string;
"path": string;
"isDir": boolean;
"size": number;
/** Creates a new DirectoryEntry instance. */
constructor($$source: Partial<DirectoryEntry> = {}) {
if (!("name" in $$source)) {
this["name"] = "";
}
if (!("path" in $$source)) {
this["path"] = "";
}
if (!("isDir" in $$source)) {
this["isDir"] = false;
}
if (!("size" in $$source)) {
this["size"] = 0;
}
Object.assign(this, $$source);
}
/**
* Creates a new DirectoryEntry instance from a string or object.
*/
static createFrom($$source: any = {}): DirectoryEntry {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new DirectoryEntry($$parsedSource as Partial<DirectoryEntry>);
}
}
/**
* FileInfo represents information about a file for the editor.
*/
export class FileInfo {
"path": string;
"name": string;
"content": string;
"language": string;
"isNew": boolean;
/** Creates a new FileInfo instance. */
constructor($$source: Partial<FileInfo> = {}) {
if (!("path" in $$source)) {
this["path"] = "";
}
if (!("name" in $$source)) {
this["name"] = "";
}
if (!("content" in $$source)) {
this["content"] = "";
}
if (!("language" in $$source)) {
this["language"] = "";
}
if (!("isNew" in $$source)) {
this["isNew"] = false;
}
Object.assign(this, $$source);
}
/**
* Creates a new FileInfo instance from a string or object.
*/
static createFrom($$source: any = {}): FileInfo {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new FileInfo($$parsedSource as Partial<FileInfo>);
}
}
/**
* LanguageInfo describes a supported programming language.
*/
export class LanguageInfo {
"id": string;
"name": string;
"extensions": string[];
/** Creates a new LanguageInfo instance. */
constructor($$source: Partial<LanguageInfo> = {}) {
if (!("id" in $$source)) {
this["id"] = "";
}
if (!("name" in $$source)) {
this["name"] = "";
}
if (!("extensions" in $$source)) {
this["extensions"] = [];
}
Object.assign(this, $$source);
}
/**
* Creates a new LanguageInfo instance from a string or object.
*/
static createFrom($$source: any = {}): LanguageInfo {
const $$createField2_0 = $$createType0;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("extensions" in $$parsedSource) {
$$parsedSource["extensions"] = $$createField2_0($$parsedSource["extensions"]);
}
return new LanguageInfo($$parsedSource as Partial<LanguageInfo>);
}
}
// Private type creation functions
const $$createType0 = $Create.Array($Create.Any);

View file

@ -0,0 +1,130 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service provides IDE functionality for code editing, file management, and project operations.
* @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 core$0 from "../core/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";
/**
* Config returns the registered Config service from the core application.
* This is a convenience method for accessing the application's configuration.
*/
export function Config(): $CancellablePromise<core$0.Config> {
return $Call.ByID(2256800318);
}
/**
* Core returns the central core instance, providing access to all registered services.
*/
export function Core(): $CancellablePromise<core$0.Core | null> {
return $Call.ByID(2000663455).then(($result: any) => {
return $$createType1($result);
});
}
/**
* CreateDirectory creates a new directory at the given path.
*/
export function CreateDirectory(path: string): $CancellablePromise<void> {
return $Call.ByID(4108527007, path);
}
/**
* DeleteFile removes a file at the given path.
*/
export function DeleteFile(path: string): $CancellablePromise<void> {
return $Call.ByID(1778361797, path);
}
/**
* DetectLanguage returns the Monaco editor language for a given file path.
*/
export function DetectLanguage(path: string): $CancellablePromise<string> {
return $Call.ByID(1446649409, path);
}
/**
* FileExists checks if a file exists at the given path.
*/
export function FileExists(path: string): $CancellablePromise<boolean> {
return $Call.ByID(2444049838, path);
}
/**
* GetSupportedLanguages returns a list of languages supported by the editor.
*/
export function GetSupportedLanguages(): $CancellablePromise<$models.LanguageInfo[]> {
return $Call.ByID(948137385).then(($result: any) => {
return $$createType3($result);
});
}
/**
* ListDirectory returns a list of files and directories in the given path.
*/
export function ListDirectory(path: string): $CancellablePromise<$models.DirectoryEntry[]> {
return $Call.ByID(2978024379, path).then(($result: any) => {
return $$createType5($result);
});
}
/**
* NewFile creates a new untitled file with the specified language.
*/
export function NewFile(language: string): $CancellablePromise<$models.FileInfo> {
return $Call.ByID(354339848, language).then(($result: any) => {
return $$createType6($result);
});
}
/**
* OpenFile reads a file from disk and returns its content with language detection.
*/
export function OpenFile(path: string): $CancellablePromise<$models.FileInfo> {
return $Call.ByID(1563991886, path).then(($result: any) => {
return $$createType6($result);
});
}
/**
* ReadFile reads content from a file without additional metadata.
*/
export function ReadFile(path: string): $CancellablePromise<string> {
return $Call.ByID(1836122514, path);
}
/**
* RenameFile renames/moves a file from oldPath to newPath.
*/
export function RenameFile(oldPath: string, newPath: string): $CancellablePromise<void> {
return $Call.ByID(128270740, oldPath, newPath);
}
/**
* SaveFile saves content to the specified path.
*/
export function SaveFile(path: string, content: string): $CancellablePromise<void> {
return $Call.ByID(1229744459, path, content);
}
// Private type creation functions
const $$createType0 = core$0.Core.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = $models.LanguageInfo.createFrom;
const $$createType3 = $Create.Array($$createType2);
const $$createType4 = $models.DirectoryEntry.createFrom;
const $$createType5 = $Create.Array($$createType4);
const $$createType6 = $models.FileInfo.createFrom;

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
Service
} from "./models.js";

View file

@ -0,0 +1,26 @@
// 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";
/**
* Service provides an MCP server that exposes Core functionality.
*/
export class Service {
/** Creates a new Service instance. */
constructor($$source: Partial<Service> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new Service instance from a string or object.
*/
static createFrom($$source: any = {}): Service {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Service($$parsedSource as Partial<Service>);
}
}

View file

@ -0,0 +1,23 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};
export {
APIEndpoint,
AppConfig,
AppHook,
BinaryInfo,
Config,
Context,
Downloads,
MenuItem,
ModuleType,
PlatformBinaries,
Registry,
Route,
UIConfig
} from "./models.js";

View file

@ -0,0 +1,577 @@
// 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";
/**
* APIEndpoint declares an API endpoint the module provides.
*/
export class APIEndpoint {
/**
* GET, POST, etc.
*/
"method": string;
/**
* Relative to /api/{namespace}/{code}
*/
"path": string;
"description"?: string;
/** Creates a new APIEndpoint instance. */
constructor($$source: Partial<APIEndpoint> = {}) {
if (!("method" in $$source)) {
this["method"] = "";
}
if (!("path" in $$source)) {
this["path"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new APIEndpoint instance from a string or object.
*/
static createFrom($$source: any = {}): APIEndpoint {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new APIEndpoint($$parsedSource as Partial<APIEndpoint>);
}
}
/**
* AppConfig defines web app specific configuration.
*/
export class AppConfig {
"url"?: string;
/**
* spa, iframe, etc.
*/
"type"?: string;
"hooks"?: AppHook[];
/** Creates a new AppConfig instance. */
constructor($$source: Partial<AppConfig> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new AppConfig instance from a string or object.
*/
static createFrom($$source: any = {}): AppConfig {
const $$createField2_0 = $$createType1;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("hooks" in $$parsedSource) {
$$parsedSource["hooks"] = $$createField2_0($$parsedSource["hooks"]);
}
return new AppConfig($$parsedSource as Partial<AppConfig>);
}
}
/**
* AppHook defines app lifecycle hooks.
*/
export class AppHook {
/**
* rename, copy, etc.
*/
"type": string;
"from"?: string;
"to"?: string;
"data"?: { [_: string]: any };
/** Creates a new AppHook instance. */
constructor($$source: Partial<AppHook> = {}) {
if (!("type" in $$source)) {
this["type"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new AppHook instance from a string or object.
*/
static createFrom($$source: any = {}): AppHook {
const $$createField3_0 = $$createType2;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("data" in $$parsedSource) {
$$parsedSource["data"] = $$createField3_0($$parsedSource["data"]);
}
return new AppHook($$parsedSource as Partial<AppHook>);
}
}
/**
* BinaryInfo contains download info for a binary.
*/
export class BinaryInfo {
"url": string;
"checksum"?: string;
/** Creates a new BinaryInfo instance. */
constructor($$source: Partial<BinaryInfo> = {}) {
if (!("url" in $$source)) {
this["url"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new BinaryInfo instance from a string or object.
*/
static createFrom($$source: any = {}): BinaryInfo {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new BinaryInfo($$parsedSource as Partial<BinaryInfo>);
}
}
/**
* Config is the .itw3.json format for module registration.
* This is the boundary format between Core and external modules.
*/
export class Config {
/**
* Unique identifier
*/
"code": string;
/**
* core, app, bin
*/
"type": ModuleType;
/**
* Display name
*/
"name": string;
/**
* Semantic version
*/
"version": string;
/**
* API/config namespace
*/
"namespace": string;
/**
* Human description
*/
"description"?: string;
"author"?: string;
/**
* UI menu contributions
*/
"menu"?: MenuItem[];
/**
* UI route contributions
*/
"routes"?: Route[];
/**
* Which contexts this module supports
*/
"contexts"?: Context[];
/**
* Platform binaries
*/
"downloads"?: Downloads | null;
/**
* Web app config
*/
"app"?: AppConfig | null;
/**
* Module dependencies
*/
"depends"?: string[];
/**
* API endpoint declarations
*/
"api"?: APIEndpoint[];
/**
* Default configuration
*/
"config"?: { [_: string]: any };
/** Creates a new Config instance. */
constructor($$source: Partial<Config> = {}) {
if (!("code" in $$source)) {
this["code"] = "";
}
if (!("type" in $$source)) {
this["type"] = ModuleType.$zero;
}
if (!("name" in $$source)) {
this["name"] = "";
}
if (!("version" in $$source)) {
this["version"] = "";
}
if (!("namespace" in $$source)) {
this["namespace"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new Config instance from a string or object.
*/
static createFrom($$source: any = {}): Config {
const $$createField7_0 = $$createType4;
const $$createField8_0 = $$createType6;
const $$createField9_0 = $$createType7;
const $$createField10_0 = $$createType9;
const $$createField11_0 = $$createType11;
const $$createField12_0 = $$createType12;
const $$createField13_0 = $$createType14;
const $$createField14_0 = $$createType2;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("menu" in $$parsedSource) {
$$parsedSource["menu"] = $$createField7_0($$parsedSource["menu"]);
}
if ("routes" in $$parsedSource) {
$$parsedSource["routes"] = $$createField8_0($$parsedSource["routes"]);
}
if ("contexts" in $$parsedSource) {
$$parsedSource["contexts"] = $$createField9_0($$parsedSource["contexts"]);
}
if ("downloads" in $$parsedSource) {
$$parsedSource["downloads"] = $$createField10_0($$parsedSource["downloads"]);
}
if ("app" in $$parsedSource) {
$$parsedSource["app"] = $$createField11_0($$parsedSource["app"]);
}
if ("depends" in $$parsedSource) {
$$parsedSource["depends"] = $$createField12_0($$parsedSource["depends"]);
}
if ("api" in $$parsedSource) {
$$parsedSource["api"] = $$createField13_0($$parsedSource["api"]);
}
if ("config" in $$parsedSource) {
$$parsedSource["config"] = $$createField14_0($$parsedSource["config"]);
}
return new Config($$parsedSource as Partial<Config>);
}
}
/**
* Context represents the UI context (developer, retail, miner, etc.)
*/
export enum Context {
/**
* The Go zero value for the underlying type of the enum.
*/
$zero = "",
ContextDefault = "default",
ContextDeveloper = "developer",
ContextRetail = "retail",
ContextMiner = "miner",
};
/**
* Downloads defines platform-specific binary downloads.
*/
export class Downloads {
/**
* Web app archive
*/
"app"?: string;
"x86_64"?: PlatformBinaries | null;
"aarch64"?: PlatformBinaries | null;
/** Creates a new Downloads instance. */
constructor($$source: Partial<Downloads> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new Downloads instance from a string or object.
*/
static createFrom($$source: any = {}): Downloads {
const $$createField1_0 = $$createType16;
const $$createField2_0 = $$createType16;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("x86_64" in $$parsedSource) {
$$parsedSource["x86_64"] = $$createField1_0($$parsedSource["x86_64"]);
}
if ("aarch64" in $$parsedSource) {
$$parsedSource["aarch64"] = $$createField2_0($$parsedSource["aarch64"]);
}
return new Downloads($$parsedSource as Partial<Downloads>);
}
}
/**
* MenuItem represents a menu item contribution.
*/
export class MenuItem {
"id": string;
"label": string;
"icon"?: string;
/**
* Event name to emit
*/
"action"?: string;
/**
* Frontend route
*/
"route"?: string;
/**
* Keyboard shortcut
*/
"accelerator"?: string;
/**
* Show in these contexts
*/
"contexts"?: Context[];
/**
* Submenu items
*/
"children"?: MenuItem[];
/**
* Sort order
*/
"order"?: number;
"separator"?: boolean;
/** Creates a new MenuItem instance. */
constructor($$source: Partial<MenuItem> = {}) {
if (!("id" in $$source)) {
this["id"] = "";
}
if (!("label" in $$source)) {
this["label"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new MenuItem instance from a string or object.
*/
static createFrom($$source: any = {}): MenuItem {
const $$createField6_0 = $$createType7;
const $$createField7_0 = $$createType4;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("contexts" in $$parsedSource) {
$$parsedSource["contexts"] = $$createField6_0($$parsedSource["contexts"]);
}
if ("children" in $$parsedSource) {
$$parsedSource["children"] = $$createField7_0($$parsedSource["children"]);
}
return new MenuItem($$parsedSource as Partial<MenuItem>);
}
}
/**
* ModuleType defines the type of module.
*/
export enum ModuleType {
/**
* The Go zero value for the underlying type of the enum.
*/
$zero = "",
/**
* Built-in core module
*/
TypeCore = "core",
/**
* External application
*/
TypeApp = "app",
/**
* Binary/daemon wrapper
*/
TypeBin = "bin",
};
/**
* PlatformBinaries defines OS-specific binary URLs.
*/
export class PlatformBinaries {
"darwin"?: BinaryInfo | null;
"linux"?: BinaryInfo | null;
"windows"?: BinaryInfo | null;
/** Creates a new PlatformBinaries instance. */
constructor($$source: Partial<PlatformBinaries> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new PlatformBinaries instance from a string or object.
*/
static createFrom($$source: any = {}): PlatformBinaries {
const $$createField0_0 = $$createType18;
const $$createField1_0 = $$createType18;
const $$createField2_0 = $$createType18;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("darwin" in $$parsedSource) {
$$parsedSource["darwin"] = $$createField0_0($$parsedSource["darwin"]);
}
if ("linux" in $$parsedSource) {
$$parsedSource["linux"] = $$createField1_0($$parsedSource["linux"]);
}
if ("windows" in $$parsedSource) {
$$parsedSource["windows"] = $$createField2_0($$parsedSource["windows"]);
}
return new PlatformBinaries($$parsedSource as Partial<PlatformBinaries>);
}
}
/**
* Registry manages module registration and provides unified API routing + UI assembly.
*/
export class Registry {
/** Creates a new Registry instance. */
constructor($$source: Partial<Registry> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new Registry instance from a string or object.
*/
static createFrom($$source: any = {}): Registry {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Registry($$parsedSource as Partial<Registry>);
}
}
/**
* Route represents a UI route contribution.
*/
export class Route {
"path": string;
/**
* Custom element or component
*/
"component": string;
"title"?: string;
"icon"?: string;
"contexts"?: Context[];
/** Creates a new Route instance. */
constructor($$source: Partial<Route> = {}) {
if (!("path" in $$source)) {
this["path"] = "";
}
if (!("component" in $$source)) {
this["component"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new Route instance from a string or object.
*/
static createFrom($$source: any = {}): Route {
const $$createField4_0 = $$createType7;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("contexts" in $$parsedSource) {
$$parsedSource["contexts"] = $$createField4_0($$parsedSource["contexts"]);
}
return new Route($$parsedSource as Partial<Route>);
}
}
/**
* UIConfig is the complete UI configuration for frontends.
*/
export class UIConfig {
"context": Context;
"menus": MenuItem[];
"routes": Route[];
"modules": Config[];
/** Creates a new UIConfig instance. */
constructor($$source: Partial<UIConfig> = {}) {
if (!("context" in $$source)) {
this["context"] = Context.$zero;
}
if (!("menus" in $$source)) {
this["menus"] = [];
}
if (!("routes" in $$source)) {
this["routes"] = [];
}
if (!("modules" in $$source)) {
this["modules"] = [];
}
Object.assign(this, $$source);
}
/**
* Creates a new UIConfig instance from a string or object.
*/
static createFrom($$source: any = {}): UIConfig {
const $$createField1_0 = $$createType4;
const $$createField2_0 = $$createType6;
const $$createField3_0 = $$createType20;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("menus" in $$parsedSource) {
$$parsedSource["menus"] = $$createField1_0($$parsedSource["menus"]);
}
if ("routes" in $$parsedSource) {
$$parsedSource["routes"] = $$createField2_0($$parsedSource["routes"]);
}
if ("modules" in $$parsedSource) {
$$parsedSource["modules"] = $$createField3_0($$parsedSource["modules"]);
}
return new UIConfig($$parsedSource as Partial<UIConfig>);
}
}
// Private type creation functions
const $$createType0 = AppHook.createFrom;
const $$createType1 = $Create.Array($$createType0);
const $$createType2 = $Create.Map($Create.Any, $Create.Any);
const $$createType3 = MenuItem.createFrom;
const $$createType4 = $Create.Array($$createType3);
const $$createType5 = Route.createFrom;
const $$createType6 = $Create.Array($$createType5);
const $$createType7 = $Create.Array($Create.Any);
const $$createType8 = Downloads.createFrom;
const $$createType9 = $Create.Nullable($$createType8);
const $$createType10 = AppConfig.createFrom;
const $$createType11 = $Create.Nullable($$createType10);
const $$createType12 = $Create.Array($Create.Any);
const $$createType13 = APIEndpoint.createFrom;
const $$createType14 = $Create.Array($$createType13);
const $$createType15 = PlatformBinaries.createFrom;
const $$createType16 = $Create.Nullable($$createType15);
const $$createType17 = BinaryInfo.createFrom;
const $$createType18 = $Create.Nullable($$createType17);
const $$createType19 = Config.createFrom;
const $$createType20 = $Create.Array($$createType19);

View file

@ -0,0 +1,142 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service wraps Registry for Wails service registration.
* @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 core$0 from "../core/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";
/**
* Config returns the registered Config service from the core application.
* This is a convenience method for accessing the application's configuration.
*/
export function Config(): $CancellablePromise<core$0.Config> {
return $Call.ByID(2666037348);
}
/**
* Core returns the central core instance, providing access to all registered services.
*/
export function Core(): $CancellablePromise<core$0.Core | null> {
return $Call.ByID(2667999981).then(($result: any) => {
return $$createType1($result);
});
}
/**
* GetAvailableContexts returns all available contexts.
*/
export function GetAvailableContexts(): $CancellablePromise<string[]> {
return $Call.ByID(581350213).then(($result: any) => {
return $$createType2($result);
});
}
/**
* GetContext returns the current context.
*/
export function GetContext(): $CancellablePromise<string> {
return $Call.ByID(2851668817);
}
/**
* GetMenus returns menus for the current context.
*/
export function GetMenus(): $CancellablePromise<$models.MenuItem[]> {
return $Call.ByID(2772432318).then(($result: any) => {
return $$createType4($result);
});
}
/**
* GetModule returns a specific module by code.
*/
export function GetModule(code: string): $CancellablePromise<[$models.Config, boolean]> {
return $Call.ByID(2941496402, code).then(($result: any) => {
$result[0] = $$createType5($result[0]);
return $result;
});
}
/**
* GetModules returns all registered modules.
*/
export function GetModules(): $CancellablePromise<$models.Config[]> {
return $Call.ByID(565704691).then(($result: any) => {
return $$createType6($result);
});
}
/**
* GetRoutes returns routes for the current context.
*/
export function GetRoutes(): $CancellablePromise<$models.Route[]> {
return $Call.ByID(2452947460).then(($result: any) => {
return $$createType8($result);
});
}
/**
* GetUIConfig returns complete UI config for the current context.
*/
export function GetUIConfig(): $CancellablePromise<$models.UIConfig> {
return $Call.ByID(1850432430).then(($result: any) => {
return $$createType9($result);
});
}
/**
* RegisterModule registers a module from JSON config string.
*/
export function RegisterModule(jsonConfig: string): $CancellablePromise<void> {
return $Call.ByID(3476381919, jsonConfig);
}
/**
* Registry returns the underlying registry for direct access.
*/
export function Registry(): $CancellablePromise<$models.Registry | null> {
return $Call.ByID(406000161).then(($result: any) => {
return $$createType11($result);
});
}
/**
* SetContext changes the active UI context.
*/
export function SetContext(ctx: string): $CancellablePromise<void> {
return $Call.ByID(2231690805, ctx);
}
/**
* UnregisterModule removes a module by code.
*/
export function UnregisterModule(code: string): $CancellablePromise<void> {
return $Call.ByID(514107996, code);
}
// Private type creation functions
const $$createType0 = core$0.Core.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = $Create.Array($Create.Any);
const $$createType3 = $models.MenuItem.createFrom;
const $$createType4 = $Create.Array($$createType3);
const $$createType5 = $models.Config.createFrom;
const $$createType6 = $Create.Array($$createType5);
const $$createType7 = $models.Route.createFrom;
const $$createType8 = $Create.Array($$createType7);
const $$createType9 = $models.UIConfig.createFrom;
const $$createType10 = $models.Registry.createFrom;
const $$createType11 = $Create.Nullable($$createType10);

View file

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Router from "./router.js";
export {
Router
};
export {
PluginInfo
} from "./models.js";
export type {
Plugin
} from "./models.js";

View file

@ -0,0 +1,66 @@
// 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";
/**
* Plugin defines the interface that all plugins must implement.
*/
export type Plugin = any;
/**
* PluginInfo contains metadata about a registered plugin.
*/
export class PluginInfo {
"Name": string;
"Namespace": string;
"Description": string;
"Version": string;
"Author": string;
/**
* List of sub-routes this plugin handles
*/
"Routes": string[];
/** Creates a new PluginInfo instance. */
constructor($$source: Partial<PluginInfo> = {}) {
if (!("Name" in $$source)) {
this["Name"] = "";
}
if (!("Namespace" in $$source)) {
this["Namespace"] = "";
}
if (!("Description" in $$source)) {
this["Description"] = "";
}
if (!("Version" in $$source)) {
this["Version"] = "";
}
if (!("Author" in $$source)) {
this["Author"] = "";
}
if (!("Routes" in $$source)) {
this["Routes"] = [];
}
Object.assign(this, $$source);
}
/**
* Creates a new PluginInfo instance from a string or object.
*/
static createFrom($$source: any = {}): PluginInfo {
const $$createField5_0 = $$createType0;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("Routes" in $$parsedSource) {
$$parsedSource["Routes"] = $$createField5_0($$parsedSource["Routes"]);
}
return new PluginInfo($$parsedSource as Partial<PluginInfo>);
}
}
// Private type creation functions
const $$createType0 = $Create.Array($Create.Any);

View file

@ -0,0 +1,100 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Router manages plugin registration and provides a Gin-based HTTP router.
* It implements http.Handler and can be used as the Wails asset handler middleware.
* @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 gin$0 from "../../../../gin-gonic/gin/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as application$0 from "../../../../wailsapp/wails/v3/pkg/application/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as http$0 from "../../../../../net/http/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";
/**
* Engine returns the underlying Gin engine for advanced configuration.
*/
export function Engine(): $CancellablePromise<gin$0.Engine | null> {
return $Call.ByID(2071121571).then(($result: any) => {
return $$createType1($result);
});
}
/**
* Get returns a plugin by namespace and name.
*/
export function Get($namespace: string, name: string): $CancellablePromise<[$models.Plugin, boolean]> {
return $Call.ByID(2263988351, $namespace, name);
}
/**
* List returns info about all registered plugins.
*/
export function List(): $CancellablePromise<$models.PluginInfo[]> {
return $Call.ByID(1465721241).then(($result: any) => {
return $$createType3($result);
});
}
/**
* ListByNamespace returns all plugins in a namespace.
*/
export function ListByNamespace($namespace: string): $CancellablePromise<$models.Plugin[]> {
return $Call.ByID(3303695111, $namespace).then(($result: any) => {
return $$createType4($result);
});
}
/**
* Register adds a plugin to the router.
*/
export function Register(p: $models.Plugin): $CancellablePromise<void> {
return $Call.ByID(1142024616, p);
}
/**
* ServiceOptions returns the Wails service options for the router.
*/
export function ServiceOptions(): $CancellablePromise<application$0.ServiceOptions> {
return $Call.ByID(1034114530).then(($result: any) => {
return $$createType5($result);
});
}
/**
* SetAssetHandler sets the fallback handler for non-API routes (Wails assets).
*/
export function SetAssetHandler(h: http$0.Handler): $CancellablePromise<void> {
return $Call.ByID(417441915, h);
}
/**
* Unregister removes a plugin from the router.
* Note: Gin doesn't support removing routes, so this only removes from our registry.
* A restart is required for route changes to take effect.
*/
export function Unregister($namespace: string, name: string): $CancellablePromise<void> {
return $Call.ByID(2047711931, $namespace, name);
}
// Private type creation functions
const $$createType0 = gin$0.Engine.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = $models.PluginInfo.createFrom;
const $$createType3 = $Create.Array($$createType2);
const $$createType4 = $Create.Array($Create.Any);
const $$createType5 = application$0.ServiceOptions.createFrom;

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
Service
} from "./models.js";

View file

@ -0,0 +1,26 @@
// 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";
/**
* Service provides WebView interaction capabilities.
*/
export class Service {
/** Creates a new Service instance. */
constructor($$source: Partial<Service> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new Service instance from a string or object.
*/
static createFrom($$source: any = {}): Service {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Service($$parsedSource as Partial<Service>);
}
}

View file

@ -0,0 +1,11 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Service from "./service.js";
export {
Service
};
export {
Workspace
} from "./models.js";

View file

@ -0,0 +1,34 @@
// 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";
/**
* Workspace represents a user's workspace.
*/
export class Workspace {
"Name": string;
"Path": string;
/** Creates a new Workspace instance. */
constructor($$source: Partial<Workspace> = {}) {
if (!("Name" in $$source)) {
this["Name"] = "";
}
if (!("Path" in $$source)) {
this["Path"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new Workspace instance from a string or object.
*/
static createFrom($$source: any = {}): Workspace {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Workspace($$parsedSource as Partial<Workspace>);
}
}

View file

@ -0,0 +1,96 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* Service manages user workspaces.
* @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 core$0 from "../core/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";
/**
* ActiveWorkspace returns the currently active workspace, or nil if none is active.
*/
export function ActiveWorkspace(): $CancellablePromise<$models.Workspace | null> {
return $Call.ByID(1950953690).then(($result: any) => {
return $$createType1($result);
});
}
/**
* Config returns the registered Config service from the core application.
* This is a convenience method for accessing the application's configuration.
*/
export function Config(): $CancellablePromise<core$0.Config> {
return $Call.ByID(1263760661);
}
/**
* Core returns the central core instance, providing access to all registered services.
*/
export function Core(): $CancellablePromise<core$0.Core | null> {
return $Call.ByID(235692716).then(($result: any) => {
return $$createType3($result);
});
}
/**
* CreateWorkspace creates a new, obfuscated workspace on the local medium.
*/
export function CreateWorkspace(identifier: string, password: string): $CancellablePromise<string> {
return $Call.ByID(1795228612, identifier, password);
}
/**
* HandleIPCEvents processes IPC messages, including injecting dependencies on startup.
*/
export function HandleIPCEvents(c: core$0.Core | null, msg: core$0.Message): $CancellablePromise<void> {
return $Call.ByID(2170147968, c, msg);
}
/**
* ListWorkspaces returns the list of workspace IDs.
*/
export function ListWorkspaces(): $CancellablePromise<string[]> {
return $Call.ByID(539524341).then(($result: any) => {
return $$createType4($result);
});
}
/**
* SwitchWorkspace changes the active workspace.
*/
export function SwitchWorkspace(name: string): $CancellablePromise<void> {
return $Call.ByID(3125647852, name);
}
/**
* WorkspaceFileGet retrieves a file from the active workspace.
*/
export function WorkspaceFileGet(filename: string): $CancellablePromise<string> {
return $Call.ByID(3718387990, filename);
}
/**
* WorkspaceFileSet writes a file to the active workspace.
*/
export function WorkspaceFileSet(filename: string, content: string): $CancellablePromise<void> {
return $Call.ByID(1806719962, filename, content);
}
// Private type creation functions
const $$createType0 = $models.Workspace.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = core$0.Core.createFrom;
const $$createType3 = $Create.Nullable($$createType2);
const $$createType4 = $Create.Array($Create.Any);

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
HashType
} from "./models.js";

View file

@ -0,0 +1,41 @@
// 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";
/**
* HashType defines the supported hashing algorithms.
*/
export enum HashType {
/**
* The Go zero value for the underlying type of the enum.
*/
$zero = "",
/**
* LTHN is a custom quasi-salted hashing algorithm.
*/
LTHN = "lthn",
/**
* SHA512 is the SHA-512 hashing algorithm.
*/
SHA512 = "sha512",
/**
* SHA256 is the SHA-256 hashing algorithm.
*/
SHA256 = "sha256",
/**
* SHA1 is the SHA-1 hashing algorithm.
*/
SHA1 = "sha1",
/**
* MD5 is the MD5 hashing algorithm.
*/
MD5 = "md5",
};

View file

@ -0,0 +1,11 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
Engine
} from "./models.js";
export type {
HandlerFunc,
HandlersChain
} from "./models.js";

View file

@ -0,0 +1,220 @@
// 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 render$0 from "./render/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as template$0 from "../../../html/template/models.js";
/**
* Engine is the framework's instance, it contains the muxer, middleware and configuration settings.
* Create an instance of Engine, by using New() or Default()
*/
export class Engine {
"Handlers": HandlersChain;
/**
* RedirectTrailingSlash enables automatic redirection if the current route can't be matched but a
* handler for the path with (without) the trailing slash exists.
* For example if /foo/ is requested but a route only exists for /foo, the
* client is redirected to /foo with http status code 301 for GET requests
* and 307 for all other request methods.
*/
"RedirectTrailingSlash": boolean;
/**
* RedirectFixedPath if enabled, the router tries to fix the current request path, if no
* handle is registered for it.
* First superfluous path elements like ../ or // are removed.
* Afterwards the router does a case-insensitive lookup of the cleaned path.
* If a handle can be found for this route, the router makes a redirection
* to the corrected path with status code 301 for GET requests and 307 for
* all other request methods.
* For example /FOO and /..//Foo could be redirected to /foo.
* RedirectTrailingSlash is independent of this option.
*/
"RedirectFixedPath": boolean;
/**
* HandleMethodNotAllowed if enabled, the router checks if another method is allowed for the
* current route, if the current request can not be routed.
* If this is the case, the request is answered with 'Method Not Allowed'
* and HTTP status code 405.
* If no other Method is allowed, the request is delegated to the NotFound
* handler.
*/
"HandleMethodNotAllowed": boolean;
/**
* ForwardedByClientIP if enabled, client IP will be parsed from the request's headers that
* match those stored at `(*gin.Engine).RemoteIPHeaders`. If no IP was
* fetched, it falls back to the IP obtained from
* `(*gin.Context).Request.RemoteAddr`.
*/
"ForwardedByClientIP": boolean;
/**
* AppEngine was deprecated.
* Deprecated: USE `TrustedPlatform` WITH VALUE `gin.PlatformGoogleAppEngine` INSTEAD
* #726 #755 If enabled, it will trust some headers starting with
* 'X-AppEngine...' for better integration with that PaaS.
*/
"AppEngine": boolean;
/**
* UseRawPath if enabled, the url.RawPath will be used to find parameters.
*/
"UseRawPath": boolean;
/**
* UnescapePathValues if true, the path value will be unescaped.
* If UseRawPath is false (by default), the UnescapePathValues effectively is true,
* as url.Path gonna be used, which is already unescaped.
*/
"UnescapePathValues": boolean;
/**
* RemoveExtraSlash a parameter can be parsed from the URL even with extra slashes.
* See the PR #1817 and issue #1644
*/
"RemoveExtraSlash": boolean;
/**
* RemoteIPHeaders list of headers used to obtain the client IP when
* `(*gin.Engine).ForwardedByClientIP` is `true` and
* `(*gin.Context).Request.RemoteAddr` is matched by at least one of the
* network origins of list defined by `(*gin.Engine).SetTrustedProxies()`.
*/
"RemoteIPHeaders": string[];
/**
* TrustedPlatform if set to a constant of value gin.Platform*, trusts the headers set by
* that platform, for example to determine the client IP
*/
"TrustedPlatform": string;
/**
* MaxMultipartMemory value of 'maxMemory' param that is given to http.Request's ParseMultipartForm
* method call.
*/
"MaxMultipartMemory": number;
/**
* UseH2C enable h2c support.
*/
"UseH2C": boolean;
/**
* ContextWithFallback enable fallback Context.Deadline(), Context.Done(), Context.Err() and Context.Value() when Context.Request.Context() is not nil.
*/
"ContextWithFallback": boolean;
"HTMLRender": render$0.HTMLRender;
"FuncMap": template$0.FuncMap;
/** Creates a new Engine instance. */
constructor($$source: Partial<Engine> = {}) {
if (!("Handlers" in $$source)) {
this["Handlers"] = [];
}
if (!("RedirectTrailingSlash" in $$source)) {
this["RedirectTrailingSlash"] = false;
}
if (!("RedirectFixedPath" in $$source)) {
this["RedirectFixedPath"] = false;
}
if (!("HandleMethodNotAllowed" in $$source)) {
this["HandleMethodNotAllowed"] = false;
}
if (!("ForwardedByClientIP" in $$source)) {
this["ForwardedByClientIP"] = false;
}
if (!("AppEngine" in $$source)) {
this["AppEngine"] = false;
}
if (!("UseRawPath" in $$source)) {
this["UseRawPath"] = false;
}
if (!("UnescapePathValues" in $$source)) {
this["UnescapePathValues"] = false;
}
if (!("RemoveExtraSlash" in $$source)) {
this["RemoveExtraSlash"] = false;
}
if (!("RemoteIPHeaders" in $$source)) {
this["RemoteIPHeaders"] = [];
}
if (!("TrustedPlatform" in $$source)) {
this["TrustedPlatform"] = "";
}
if (!("MaxMultipartMemory" in $$source)) {
this["MaxMultipartMemory"] = 0;
}
if (!("UseH2C" in $$source)) {
this["UseH2C"] = false;
}
if (!("ContextWithFallback" in $$source)) {
this["ContextWithFallback"] = false;
}
if (!("HTMLRender" in $$source)) {
this["HTMLRender"] = null;
}
if (!("FuncMap" in $$source)) {
this["FuncMap"] = {};
}
Object.assign(this, $$source);
}
/**
* Creates a new Engine instance from a string or object.
*/
static createFrom($$source: any = {}): Engine {
const $$createField0_0 = $$createType0;
const $$createField9_0 = $$createType2;
const $$createField15_0 = $$createType3;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("Handlers" in $$parsedSource) {
$$parsedSource["Handlers"] = $$createField0_0($$parsedSource["Handlers"]);
}
if ("RemoteIPHeaders" in $$parsedSource) {
$$parsedSource["RemoteIPHeaders"] = $$createField9_0($$parsedSource["RemoteIPHeaders"]);
}
if ("FuncMap" in $$parsedSource) {
$$parsedSource["FuncMap"] = $$createField15_0($$parsedSource["FuncMap"]);
}
return new Engine($$parsedSource as Partial<Engine>);
}
}
/**
* HandlerFunc defines the handler used by gin middleware as return value.
*/
export type HandlerFunc = any;
/**
* HandlersChain defines a HandlerFunc slice.
*/
export type HandlersChain = HandlerFunc[];
// Private type creation functions
var $$createType0 = (function $$initCreateType0(...args: any[]): any {
if ($$createType0 === $$initCreateType0) {
$$createType0 = $$createType1;
}
return $$createType0(...args);
});
const $$createType1 = $Create.Array($Create.Any);
const $$createType2 = $Create.Array($Create.Any);
var $$createType3 = (function $$initCreateType3(...args: any[]): any {
if ($$createType3 === $$initCreateType3) {
$$createType3 = $$createType4;
}
return $$createType3(...args);
});
const $$createType4 = $Create.Map($Create.Any, $Create.Any);

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export type {
HTMLRender
} from "./models.js";

View file

@ -0,0 +1,11 @@
// 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";
/**
* HTMLRender interface is to be implemented by HTMLProduction and HTMLDebug.
*/
export type HTMLRender = any;

View file

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
Bool,
Var
} from "./models.js";

View file

@ -0,0 +1,40 @@
// 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";
/**
* Var is a variable that can be set, unset and queried for its state.
*/
export class Var<T> {
/** Creates a new Var instance. */
constructor($$source: Partial<Var<T>> = {}) {
Object.assign(this, $$source);
}
/**
* Given creation functions for each type parameter,
* returns a creation function for a concrete instance
* of the generic class Var.
*/
static createFrom<T = any>($$createParamT: (source: any) => T): ($$source?: any) => Var<T> {
return ($$source: any = {}) => {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Var<T>($$parsedSource as Partial<Var<T>>);
};
}
}
/**
* Bool is a `bool` that can be unset
*/
export const Bool = Var;
/**
* Bool is a `bool` that can be unset
*/
export type Bool = Var<boolean>;

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
Bundle
} from "./models.js";

View file

@ -0,0 +1,30 @@
// 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";
/**
* Bundle stores a set of messages and pluralization rules.
* Most applications only need a single bundle
* that is initialized early in the application's lifecycle.
* It is not goroutine safe to modify the bundle while Localizers
* are reading from it.
*/
export class Bundle {
/** Creates a new Bundle instance. */
constructor($$source: Partial<Bundle> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new Bundle instance from a string or object.
*/
static createFrom($$source: any = {}): Bundle {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Bundle($$parsedSource as Partial<Bundle>);
}
}

View file

@ -0,0 +1,9 @@
//@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";
Object.freeze($Create.Events);

View file

@ -0,0 +1,2 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

View file

@ -0,0 +1,47 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
App,
BackdropType,
BackgroundType,
BrowserManager,
ButtonState,
ClipboardManager,
ContextMenuManager,
CoreWebView2PermissionState,
DialogManager,
DragEffect,
EnvironmentManager,
EventManager,
KeyBindingManager,
LinuxWindow,
MacAppearanceType,
MacBackdrop,
MacLiquidGlass,
MacLiquidGlassStyle,
MacTitleBar,
MacToolbarStyle,
MacWebviewPreferences,
MacWindow,
MacWindowLevel,
Menu,
MenuBarTheme,
MenuManager,
NSVisualEffectMaterial,
RGBA,
ScreenManager,
ServiceOptions,
SystemTrayManager,
TextTheme,
Theme,
ThemeSettings,
WebviewGpuPolicy,
WebviewWindow,
WebviewWindowOptions,
WindowManager,
WindowStartPosition,
WindowState,
WindowTheme,
WindowsWindow
} from "./models.js";

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export type {
WindowEventType
} from "./models.js";

View file

@ -0,0 +1,8 @@
// 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";
export type WindowEventType = number;

View file

@ -0,0 +1,14 @@
// 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,
NotificationService
} from "./models.js";

View file

@ -0,0 +1,127 @@
// 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"?: { [_: 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>);
}
}
/**
* Service represents the notifications service
*/
export class NotificationService {
/** Creates a new NotificationService instance. */
constructor($$source: Partial<NotificationService> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new NotificationService instance from a string or object.
*/
static createFrom($$source: any = {}): NotificationService {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new NotificationService($$parsedSource as Partial<NotificationService>);
}
}
// Private type creation functions
const $$createType0 = NotificationAction.createFrom;
const $$createType1 = $Create.Array($$createType0);
const $$createType2 = $Create.Map($Create.Any, $Create.Any);

View file

@ -0,0 +1,62 @@
// 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);
}

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export type {
FuncMap
} from "./models.js";

View file

@ -0,0 +1,12 @@
// 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 template$0 from "../../text/template/models.js";
export type FuncMap = template$0.FuncMap;

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export type {
Writer
} from "./models.js";

View file

@ -0,0 +1,19 @@
// 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";
/**
* Writer is the interface that wraps the basic Write method.
*
* Write writes len(p) bytes from p to the underlying data stream.
* It returns the number of bytes written from p (0 <= n <= len(p))
* and any error encountered that caused the write to stop early.
* Write must return a non-nil error if it returns n < len(p).
* Write must not modify the slice data, even temporarily.
*
* Implementations must not retain p.
*/
export type Writer = any;

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
Logger
} from "./models.js";

View file

@ -0,0 +1,31 @@
// 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";
/**
* A Logger records structured information about each call to its
* Log, Debug, Info, Warn, and Error methods.
* For each call, it creates a [Record] and passes it to a [Handler].
*
* To create a new Logger, call [New] or a Logger method
* that begins "With".
*/
export class Logger {
/** Creates a new Logger instance. */
constructor($$source: Partial<Logger> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new Logger instance from a string or object.
*/
static createFrom($$source: any = {}): Logger {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Logger($$parsedSource as Partial<Logger>);
}
}

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export type {
Handler
} from "./models.js";

View file

@ -0,0 +1,34 @@
// 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";
/**
* A Handler responds to an HTTP request.
*
* [Handler.ServeHTTP] should write reply headers and data to the [ResponseWriter]
* and then return. Returning signals that the request is finished; it
* is not valid to use the [ResponseWriter] or read from the
* [Request.Body] after or concurrently with the completion of the
* ServeHTTP call.
*
* Depending on the HTTP client software, HTTP protocol version, and
* any intermediaries between the client and the Go server, it may not
* be possible to read from the [Request.Body] after writing to the
* [ResponseWriter]. Cautious handlers should read the [Request.Body]
* first, and then reply.
*
* Except for reading the body, handlers should not modify the
* provided Request.
*
* If ServeHTTP panics, the server (the caller of ServeHTTP) assumes
* that the effect of the panic was isolated to the active request.
* It recovers the panic, logs a stack trace to the server error log,
* and either closes the network connection or sends an HTTP/2
* RST_STREAM, depending on the HTTP protocol. To abort a handler so
* the client sees an interrupted response but the server doesn't log
* an error, panic with the value [ErrAbortHandler].
*/
export type Handler = any;

View file

@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export type {
FuncMap
} from "./models.js";

View file

@ -0,0 +1,24 @@
// 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";
/**
* FuncMap is the type of the map defining the mapping from names to functions.
* Each function must have either a single return value, or two return values of
* which the second has type error. In that case, if the second (error)
* return value evaluates to non-nil during execution, execution terminates and
* Execute returns that error.
*
* Errors returned by Execute wrap the underlying error; call [errors.As] to
* unwrap them.
*
* When template execution invokes a function with an argument list, that list
* must be assignable to the function's parameter types. Functions meant to
* apply to arguments of arbitrary type can use parameters of type interface{} or
* of type [reflect.Value]. Similarly, functions meant to return a result of arbitrary
* type can return interface{} or [reflect.Value].
*/
export type FuncMap = { [_: string]: any };