Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions src/typings/management/homeScreenSettings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* The version of the OpenAPI document: v3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/


export class HomeScreenSettings {
/**
* Hide/show the navigation bar.
*/
"hideNavigationBar"?: boolean;
/**
* Show/hide the payments menu.
*/
"showPaymentsMenu"?: boolean;
/**
* Show/hide the settings menu.
*/
"showSettingsMenu"?: boolean;

static readonly discriminator: string | undefined = undefined;

static readonly mapping: {[index: string]: string} | undefined = undefined;

static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
{
"name": "hideNavigationBar",
"baseName": "hideNavigationBar",
"type": "boolean",
"format": ""
},
{
"name": "showPaymentsMenu",
"baseName": "showPaymentsMenu",
"type": "boolean",
"format": ""
},
{
"name": "showSettingsMenu",
"baseName": "showSettingsMenu",
"type": "boolean",
"format": ""
} ];

static getAttributeTypeMap() {
return HomeScreenSettings.attributeTypeMap;
}

public constructor() {
}
}

46 changes: 46 additions & 0 deletions src/typings/management/kioskModeSettings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* The version of the OpenAPI document: v3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/


export class KioskModeSettings {
/**
* List of package names for apps allowed to run in kiosk mode.
*/
"allowedAppsInKioskMode"?: Array<string>;
/**
* The package name of the app to launch on startup. This must be one of the apps included in `allowedAppsInKioskMode`.
*/
"kioskAppOnStartup"?: string;

static readonly discriminator: string | undefined = undefined;

static readonly mapping: {[index: string]: string} | undefined = undefined;

static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
{
"name": "allowedAppsInKioskMode",
"baseName": "allowedAppsInKioskMode",
"type": "Array<string>",
"format": ""
},
{
"name": "kioskAppOnStartup",
"baseName": "kioskAppOnStartup",
"type": "string",
"format": ""
} ];

static getAttributeTypeMap() {
return KioskModeSettings.attributeTypeMap;
}

public constructor() {
}
}

2 changes: 2 additions & 0 deletions src/typings/management/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ export * from "./givexInfo"
export * from "./googlePayInfo"
export * from "./gratuity"
export * from "./hardware"
export * from "./homeScreenSettings"
export * from "./idName"
export * from "./installAndroidAppDetails"
export * from "./installAndroidCertificateDetails"
export * from "./installedAPKs"
export * from "./invalidField"
export * from "./jCBInfo"
export * from "./key"
export * from "./kioskModeSettings"
export * from "./klarnaInfo"
export * from "./links"
export * from "./linksElement"
Expand Down
4 changes: 4 additions & 0 deletions src/typings/management/objectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ import { GivexInfo } from "./givexInfo";
import { GooglePayInfo } from "./googlePayInfo";
import { Gratuity } from "./gratuity";
import { Hardware } from "./hardware";
import { HomeScreenSettings } from "./homeScreenSettings";
import { IdName } from "./idName";
import { InstallAndroidAppDetails } from "./installAndroidAppDetails";
import { InstallAndroidCertificateDetails } from "./installAndroidCertificateDetails";
import { InstalledAPKs } from "./installedAPKs";
import { InvalidField } from "./invalidField";
import { JCBInfo } from "./jCBInfo";
import { Key } from "./key";
import { KioskModeSettings } from "./kioskModeSettings";
import { KlarnaInfo } from "./klarnaInfo";
import { Links } from "./links";
import { LinksElement } from "./linksElement";
Expand Down Expand Up @@ -370,13 +372,15 @@ let typeMap: {[index: string]: any} = {
"GooglePayInfo": GooglePayInfo,
"Gratuity": Gratuity,
"Hardware": Hardware,
"HomeScreenSettings": HomeScreenSettings,
"IdName": IdName,
"InstallAndroidAppDetails": InstallAndroidAppDetails,
"InstallAndroidCertificateDetails": InstallAndroidCertificateDetails,
"InstalledAPKs": InstalledAPKs,
"InvalidField": InvalidField,
"JCBInfo": JCBInfo,
"Key": Key,
"KioskModeSettings": KioskModeSettings,
"KlarnaInfo": KlarnaInfo,
"Links": Links,
"LinksElement": LinksElement,
Expand Down
16 changes: 16 additions & 0 deletions src/typings/management/terminalSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { CardholderReceipt } from "./cardholderReceipt";
import { Connectivity } from "./connectivity";
import { Gratuity } from "./gratuity";
import { Hardware } from "./hardware";
import { HomeScreenSettings } from "./homeScreenSettings";
import { KioskModeSettings } from "./kioskModeSettings";
import { Localization } from "./localization";
import { Moto } from "./moto";
import { Nexo } from "./nexo";
Expand Down Expand Up @@ -40,6 +42,8 @@ export class TerminalSettings {
*/
"gratuities"?: Array<Gratuity> | null;
"hardware"?: Hardware | null;
"homeScreen"?: HomeScreenSettings | null;
"kioskMode"?: KioskModeSettings | null;
Comment on lines +45 to +46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new properties homeScreen and kioskMode have been added to TerminalSettings, but the corresponding unit tests in src/__tests__/terminalSettings.spec.ts have not been updated. This leaves the new properties without test coverage.

Please add tests to verify that these properties can be set to null and to instances of their respective types. For example, you could extend the existing test case for null values:

  test("should allow properties to be null", () => {
    terminalSettings.cardholderReceipt = null;
    terminalSettings.connectivity = null;
    terminalSettings.gratuities = null;
    terminalSettings.hardware = null;
    terminalSettings.homeScreen = null; // Add this
    terminalSettings.kioskMode = null; // Add this

    expect(terminalSettings.cardholderReceipt).toBeNull();
    expect(terminalSettings.connectivity).toBeNull();
    expect(terminalSettings.gratuities).toBeNull();
    expect(terminalSettings.hardware).toBeNull();
    expect(terminalSettings.homeScreen).toBeNull(); // Add this
    expect(terminalSettings.kioskMode).toBeNull(); // Add this
  });

Additionally, a new test case should be added to verify setting valid typed values for homeScreen and kioskMode.

"localization"?: Localization | null;
"moto"?: Moto | null;
"nexo"?: Nexo | null;
Expand Down Expand Up @@ -89,6 +93,18 @@ export class TerminalSettings {
"type": "Hardware | null",
"format": ""
},
{
"name": "homeScreen",
"baseName": "homeScreen",
"type": "HomeScreenSettings | null",
"format": ""
},
{
"name": "kioskMode",
"baseName": "kioskMode",
"type": "KioskModeSettings | null",
"format": ""
},
{
"name": "localization",
"baseName": "localization",
Expand Down