Skip to content

Commit

Permalink
Merge branch 'develop' into ag
Browse files Browse the repository at this point in the history
  • Loading branch information
kaphacius authored Aug 4, 2023
2 parents 3d40b1e + 1f8136b commit 396e3f9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
29 changes: 19 additions & 10 deletions Sources/TerminalAPIKit/Models/MenuEntry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,38 @@ public final class MenuEntry: Codable {
public let menuEntryTag: MenuEntryTag?

/// Undocumented.
public let defaultSelectedFlag: Bool
public let defaultSelectedFlag: Bool?

/// Undocumented.
/// Format of the content to display or print.
public let outputFormat: OutputFormat

/// Undocumented.
/// Reference of a predefined message to display or print.
public let predefinedContent: PredefinedContent?

/// Undocumented.
/// Content of text message to display or print.
/// Mandatory, if OutputFormat is Text, not allowed otherwise. One instance of OutputText per shared format.
public let outputText: [OutputText]?

/// Undocumented.
/// XHTML document body containing the message to display or print.
/// Mandatory, if OutputFormat is XHTML, not allowed otherwise.
public let outputXHTML: Data?

/// Initializes the MenuEntry.
///
/// - Parameter menuEntryTag: Characteristics related to the selection of a menu entry
/// - Parameter defaultSelectedFlag: Undocumented.
/// - Parameter outputFormat: Undocumented.
/// - Parameter predefinedContent: Undocumented.
/// - Parameter outputText: Undocumented.
/// - Parameter outputXHTML: Undocumented.
public init(menuEntryTag: MenuEntryTag? = nil, defaultSelectedFlag: Bool, outputFormat: OutputFormat, predefinedContent: PredefinedContent? = nil, outputText: [OutputText]? = nil, outputXHTML: Data? = nil) {
/// - Parameter outputFormat: Format of the content to display or print.
/// - Parameter predefinedContent: Reference of a predefined message to display or print.
/// - Parameter outputText: Content of text message to display or print. Mandatory, if `outputFormat` is `text`, not allowed otherwise. One instance of `OutputText` per shared format.
/// - Parameter outputXHTML: XHTML document body containing the message to display or print. Mandatory, if `outputFormat` is `xhtml`, not allowed otherwise.
public init(
menuEntryTag: MenuEntryTag? = nil,
defaultSelectedFlag: Bool? = nil,
outputFormat: OutputFormat,
predefinedContent: PredefinedContent? = nil,
outputText: [OutputText]?,
outputXHTML: Data? = nil
) {
self.menuEntryTag = menuEntryTag
self.defaultSelectedFlag = defaultSelectedFlag
self.outputFormat = outputFormat
Expand Down
8 changes: 7 additions & 1 deletion Sources/TerminalAPIKit/Models/Requests/InputRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ public final class InputRequest: Request {
/// Information related to an Input request.
public let inputData: InputData

/// Information to display and the way to process the display.
public let displayOutput: DisplayOutput?

/// Initializes the InputRequest.
///
/// - Parameter inputData: Information related to an Input request.
public init(inputData: InputData) {
/// - Parameter displayOutput: Information to display and the way to process the display.
public init(inputData: InputData, displayOutput: DisplayOutput? = nil) {
self.inputData = inputData
self.displayOutput = displayOutput
}

internal enum CodingKeys: String, CodingKey {
case inputData = "InputData"
case displayOutput = "DisplayOutput"
}

}

0 comments on commit 396e3f9

Please sign in to comment.