diff --git a/application/apps/indexer/stypes/bindings/command.ts b/application/apps/indexer/stypes/bindings/command.ts index 7e2a33e9e..d9ad7e283 100644 --- a/application/apps/indexer/stypes/bindings/command.ts +++ b/application/apps/indexer/stypes/bindings/command.ts @@ -5,150 +5,124 @@ * At the core level, this type is used for all commands invoked within an `UnboundSession`. * It is only used to indicate the successful completion or interruption of a command. */ -export type CommandOutcomeBool = { "Finished": boolean } | "Cancelled"; +export type CommandOutcomeBool = { Finished: boolean } | 'Cancelled'; /** * Represents the result of a command execution. * At the core level, this type is used for all commands invoked within an `UnboundSession`. * It is only used to indicate the successful completion or interruption of a command. */ -export type CommandOutcomeFoldersScanningResult = { "Finished": FoldersScanningResult } | "Cancelled"; +export type CommandOutcomeFoldersScanningResult = { Finished: FoldersScanningResult } | 'Cancelled'; /** * Represents the result of a command execution. * At the core level, this type is used for all commands invoked within an `UnboundSession`. * It is only used to indicate the successful completion or interruption of a command. */ -export type CommandOutcomeOptionalString = { "Finished": string | null } | "Cancelled"; +export type CommandOutcomeOptionalString = { Finished: string | null } | 'Cancelled'; /** * Represents the result of a command execution. * At the core level, this type is used for all commands invoked within an `UnboundSession`. * It is only used to indicate the successful completion or interruption of a command. */ -export type CommandOutcomeProfilesResult = { "Finished": ProfileList } | "Cancelled"; +export type CommandOutcomeSerialPortsList = { Finished: SerialPortsList } | 'Cancelled'; /** * Represents the result of a command execution. * At the core level, this type is used for all commands invoked within an `UnboundSession`. * It is only used to indicate the successful completion or interruption of a command. */ -export type CommandOutcomeSerialPortsList = { "Finished": SerialPortsList } | "Cancelled"; +export type CommandOutcomeString = { Finished: string } | 'Cancelled'; /** * Represents the result of a command execution. * At the core level, this type is used for all commands invoked within an `UnboundSession`. * It is only used to indicate the successful completion or interruption of a command. */ -export type CommandOutcomeString = { "Finished": string } | "Cancelled"; +export type CommandOutcomeVoid = 'Finished' | 'Cancelled'; /** * Represents the result of a command execution. * At the core level, this type is used for all commands invoked within an `UnboundSession`. * It is only used to indicate the successful completion or interruption of a command. */ -export type CommandOutcomeVoid = "Finished" | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomei64 = { "Finished": number } | "Cancelled"; +export type CommandOutcomei64 = { Finished: number } | 'Cancelled'; /** * Represents a folder entity in the file system. */ -export type FolderEntity = { -/** - * The name of the entity (file or folder). - */ -name: string, -/** - * The full path of the entity. - */ -fullname: string, -/** - * The type of the entity (e.g., file, directory, symbolic link). - */ -kind: FolderEntityType, -/** - * Optional detailed information about the entity. - */ -details: FolderEntityDetails | null, }; +export type FolderEntity = { + /** + * The name of the entity (file or folder). + */ + name: string; + /** + * The full path of the entity. + */ + fullname: string; + /** + * The type of the entity (e.g., file, directory, symbolic link). + */ + kind: FolderEntityType; + /** + * Optional detailed information about the entity. + */ + details: FolderEntityDetails | null; +}; /** * Contains detailed information about a folder entity. */ -export type FolderEntityDetails = { -/** - * The name of the file or folder. - */ -filename: string, -/** - * The full path to the file or folder. - */ -full: string, -/** - * The directory path containing the file or folder. - */ -path: string, -/** - * The base name of the file or folder. - */ -basename: string, -/** - * The file extension, if applicable. - */ -ext: string, }; +export type FolderEntityDetails = { + /** + * The name of the file or folder. + */ + filename: string; + /** + * The full path to the file or folder. + */ + full: string; + /** + * The directory path containing the file or folder. + */ + path: string; + /** + * The base name of the file or folder. + */ + basename: string; + /** + * The file extension, if applicable. + */ + ext: string; +}; /** * Represents the type of a folder entity in the file system. */ -export type FolderEntityType = "BlockDevice" | "CharacterDevice" | "Directory" | "FIFO" | "File" | "Socket" | "SymbolicLink"; +export enum FolderEntityType { + BlockDevice = 'BlockDevice', + CharacterDevice = 'CharacterDevice', + Directory = 'Directory', + FIFO = 'FIFO', + File = 'File', + Socket = 'Socket', + SymbolicLink = 'SymbolicLink', +} /** * Represents the result of scanning a folder. */ -export type FoldersScanningResult = { -/** - * A list of folder entities found during the scan. - */ -list: Array, -/** - * Indicates whether the maximum length of results was reached. - */ -max_len_reached: boolean, }; - -export type Profile = { -/** - * Suggested name of shell. For unix based systems it will be name of executable file, - * like "bash", "fish" etc. For windows it will be names like "GitBash", "PowerShell" - * etc. - */ -name: string, -/** - * Path to executable file of shell - */ -path: string, -/** - * List of environment variables. Because extracting operation could take some time - * by default `envvars = None`. To load data should be used method `load`, which will - * make attempt to detect environment variables. - */ -envvars: Map, -/** - * true - if path to executable file of shell is symlink to another location. - */ -symlink: boolean, }; - -/** - * Represents a list of serial ports. - * - * This structure contains a vector of strings, where each string represents the name - * or identifier of a serial port available on the system. - */ -export type ProfileList = Array; +export type FoldersScanningResult = { + /** + * A list of folder entities found during the scan. + */ + list: Array; + /** + * Indicates whether the maximum length of results was reached. + */ + max_len_reached: boolean; +}; /** * Represents a list of serial ports. diff --git a/application/apps/indexer/stypes/bindings/miscellaneous.ts b/application/apps/indexer/stypes/bindings/miscellaneous.ts index 59ab592e7..8b2df171f 100644 --- a/application/apps/indexer/stypes/bindings/miscellaneous.ts +++ b/application/apps/indexer/stypes/bindings/miscellaneous.ts @@ -9,16 +9,17 @@ export type AroundIndexes = [number | undefined | null, number | undefined | nul /** * Describes a match for a search condition. */ -export type FilterMatch = { -/** - * The index (number) of the matching log entry. - */ -index: number, -/** - * The identifiers of the filters (search conditions) that matched - * the specified log entry. - */ -filters: Array, }; +export type FilterMatch = { + /** + * The index (number) of the matching log entry. + */ + index: number; + /** + * The identifiers of the filters (search conditions) that matched + * the specified log entry. + */ + filters: Array; +}; /** * A list of matches for a search condition. @@ -28,41 +29,42 @@ export type FilterMatchList = Array; /** * Information about a log entry. */ -export type GrabbedElement = { -/** - * The unique identifier of the source. - */ -source_id: number, -/** - * The textual content of the log entry. - */ -content: string, -/** - * The position of the log entry in the overall stream. - */ -pos: number, -/** - * The nature of the log entry, represented as a bitmask. Possible values include: - * - `SEARCH`: Nature = Nature(1) - * - `BOOKMARK`: Nature = Nature(1 << 1) - * - `EXPANDED`: Nature = Nature(1 << 5) - * - `BREADCRUMB`: Nature = Nature(1 << 6) - * - `BREADCRUMB_SEPARATOR`: Nature = Nature(1 << 7) - */ -nature: number, }; +export type GrabbedElement = { + /** + * The unique identifier of the source. + */ + source_id: number; + /** + * The textual content of the log entry. + */ + content: string; + /** + * The position of the log entry in the overall stream. + */ + pos: number; + /** + * The nature of the log entry, represented as a bitmask. Possible values include: + * - `SEARCH`: Nature = Nature(1) + * - `BOOKMARK`: Nature = Nature(1 << 1) + * - `EXPANDED`: Nature = Nature(1 << 5) + * - `BREADCRUMB`: Nature = Nature(1 << 6) + * - `BREADCRUMB_SEPARATOR`: Nature = Nature(1 << 7) + */ + nature: number; +}; /** * A list of log entries. */ export type GrabbedElementList = Array; -export type MapKeyValue = { [key in string]?: string }; +export type MapKeyValue = Map; /** * Representation of ranges. We cannot use std ranges as soon as no way * to derive Serialize, Deserialize */ -export type Range = { start: number, end: number, }; +export type Range = { start: number; end: number }; /** * A list of ranges to read. @@ -73,31 +75,33 @@ export type Ranges = Array; * A request to a stream that supports feedback, such as a terminal command * that accepts input through `stdin`. */ -export type SdeRequest = { "WriteText": string } | { "WriteBytes": Array }; +export type SdeRequest = { WriteText: string } | { WriteBytes: Array }; /** * The response from a source to a sent `SdeRequest`. Note that sending data * with `SdeRequest` does not guarantee a response, as the behavior depends * on the source. */ -export type SdeResponse = { -/** - * The number of bytes received. - */ -bytes: number, }; +export type SdeResponse = { + /** + * The number of bytes received. + */ + bytes: number; +}; /** * Describes a data source. */ -export type SourceDefinition = { -/** - * The unique identifier of the source. - */ -id: number, -/** - * The user-friendly name of the source for display purposes. - */ -alias: string, }; +export type SourceDefinition = { + /** + * The unique identifier of the source. + */ + id: number; + /** + * The user-friendly name of the source for display purposes. + */ + alias: string; +}; /** * A list of data sources. diff --git a/application/platform/types/bindings/miscellaneous.ts b/application/platform/types/bindings/miscellaneous.ts index 329f7a53e..8b2df171f 100644 --- a/application/platform/types/bindings/miscellaneous.ts +++ b/application/platform/types/bindings/miscellaneous.ts @@ -9,16 +9,17 @@ export type AroundIndexes = [number | undefined | null, number | undefined | nul /** * Describes a match for a search condition. */ -export type FilterMatch = { -/** - * The index (number) of the matching log entry. - */ -index: number, -/** - * The identifiers of the filters (search conditions) that matched - * the specified log entry. - */ -filters: Array, }; +export type FilterMatch = { + /** + * The index (number) of the matching log entry. + */ + index: number; + /** + * The identifiers of the filters (search conditions) that matched + * the specified log entry. + */ + filters: Array; +}; /** * A list of matches for a search condition. @@ -28,39 +29,42 @@ export type FilterMatchList = Array; /** * Information about a log entry. */ -export type GrabbedElement = { -/** - * The unique identifier of the source. - */ -source_id: number, -/** - * The textual content of the log entry. - */ -content: string, -/** - * The position of the log entry in the overall stream. - */ -pos: number, -/** - * The nature of the log entry, represented as a bitmask. Possible values include: - * - `SEARCH`: Nature = Nature(1) - * - `BOOKMARK`: Nature = Nature(1 << 1) - * - `EXPANDED`: Nature = Nature(1 << 5) - * - `BREADCRUMB`: Nature = Nature(1 << 6) - * - `BREADCRUMB_SEPARATOR`: Nature = Nature(1 << 7) - */ -nature: number, }; +export type GrabbedElement = { + /** + * The unique identifier of the source. + */ + source_id: number; + /** + * The textual content of the log entry. + */ + content: string; + /** + * The position of the log entry in the overall stream. + */ + pos: number; + /** + * The nature of the log entry, represented as a bitmask. Possible values include: + * - `SEARCH`: Nature = Nature(1) + * - `BOOKMARK`: Nature = Nature(1 << 1) + * - `EXPANDED`: Nature = Nature(1 << 5) + * - `BREADCRUMB`: Nature = Nature(1 << 6) + * - `BREADCRUMB_SEPARATOR`: Nature = Nature(1 << 7) + */ + nature: number; +}; /** * A list of log entries. */ export type GrabbedElementList = Array; +export type MapKeyValue = Map; + /** * Representation of ranges. We cannot use std ranges as soon as no way * to derive Serialize, Deserialize */ -export type Range = { start: number, end: number, }; +export type Range = { start: number; end: number }; /** * A list of ranges to read. @@ -71,31 +75,33 @@ export type Ranges = Array; * A request to a stream that supports feedback, such as a terminal command * that accepts input through `stdin`. */ -export type SdeRequest = { "WriteText": string } | { "WriteBytes": Array }; +export type SdeRequest = { WriteText: string } | { WriteBytes: Array }; /** * The response from a source to a sent `SdeRequest`. Note that sending data * with `SdeRequest` does not guarantee a response, as the behavior depends * on the source. */ -export type SdeResponse = { -/** - * The number of bytes received. - */ -bytes: number, }; +export type SdeResponse = { + /** + * The number of bytes received. + */ + bytes: number; +}; /** * Describes a data source. */ -export type SourceDefinition = { -/** - * The unique identifier of the source. - */ -id: number, -/** - * The user-friendly name of the source for display purposes. - */ -alias: string, }; +export type SourceDefinition = { + /** + * The unique identifier of the source. + */ + id: number; + /** + * The user-friendly name of the source for display purposes. + */ + alias: string; +}; /** * A list of data sources.