Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KyrioAccount

Account to Kyrio Online Services. It is used to set common connection properties and create clients to access individual services.

Hierarchy

  • KyrioAccount

Index

Constructors

constructor

Properties

Private _clientId

_clientId: string

Private _enableQaEnvironment

_enableQaEnvironment: boolean = false

Private _enableTestError

_enableTestError: boolean = false

Private _enableTestLocal

_enableTestLocal: boolean = false

Private _enableTestMock

_enableTestMock: boolean = false

Private _serverUrl

_serverUrl: string

Static Private CLIENT_ID_REGEX

CLIENT_ID_REGEX: RegExp = /\d{6}/gi

Static Private PROD_SERVER_URL

PROD_SERVER_URL: "https://api.kyrioconnectionsuite.com" = "https://api.kyrioconnectionsuite.com"

Static Private QA_SERVER_URL

QA_SERVER_URL: "https://api.qa.kyrioconnectionsuite.com" = "https://api.qa.kyrioconnectionsuite.com"

Static Private SERVER_URL_REGEX

SERVER_URL_REGEX: RegExp = /(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?/gi

Accessors

clientId

  • get clientId(): string
  • set clientId(value: string): void
  • Gets identifier to confirm client who accesses the API.

    Returns string

    A unique client ID

  • Sets identifier to confirm client who accesses the API. Usually it is set as 6 digit number.

    Parameters

    • value: string

      A unique client ID

    Returns void

    A unique client ID

enableQaEnvironment

  • get enableQaEnvironment(): boolean
  • set enableQaEnvironment(value: boolean): void
  • Checks if enabled calls to QA environment.

    Returns boolean

    true to connect to QA servers or false to connect to Production servers

  • Enables calls to QA environment and sets default ServerUrl to QA servers. In the future this property can be deprecated.

    Parameters

    • value: boolean

      true to connect to QA servers or false to connect to Production servers

    Returns void

    true to connect to QA servers or false to connect to Production servers

enableTestError

  • get enableTestError(): boolean
  • set enableTestError(value: boolean): void
  • Checks if enabled random errors while making test calls.

    Returns boolean

    true if random test errors are enabled or false otherwise

  • Enables random errors while making test calls. The errors simulate Internal (500) or Timeout (504) responses with 1% probability. This property works together with EnableTestLock and EnableTestMock.

    Parameters

    • value: boolean

      true if random test errors are enabled or false otherwise

    Returns void

    true if random test errors are enabled or false otherwise

enableTestLocal

  • get enableTestLocal(): boolean
  • set enableTestLocal(value: boolean): void
  • Checks if enabled local test calls to return random responses.

    Returns boolean

    true if local test calls are enabled or false otherwise

  • Enables local test calls and returns random responses. This allows to avoid roundtrips to Kyrio servers and incurring changes for API use. The responses are delayed for 1.5 sec to make them more realistic. This property works together with EnableTestError.

    Parameters

    • value: boolean

      true if local test calls are enabled or false otherwise

    Returns void

    true if local test calls are enabled or false otherwise

enableTestMock

  • get enableTestMock(): boolean
  • set enableTestMock(value: boolean): void
  • Checks if enabled remote test calls to return random responses.

    Returns boolean

    true if remote test calls are enabled or false otherwise

  • Enables remote test calls and returns random responses. With this property enabled client makes calls to Kyrio servers without changes for API use. This property works together with EnableTestError.

    Parameters

    • value: boolean

      true if remote test calls are enabled or false otherwise

    Returns void

    true if remote test calls are enabled or false otherwise

serverUrl

  • get serverUrl(): string
  • set serverUrl(value: string): void
  • Gets base url to connect to Kyrio servers.

    Returns string

    A server URL to connect to

  • Sets base url to connect to Kyrio servers. It is an optional property. It is set automatically based on EnableQaEnvironment. But user is able to override it.

    Parameters

    • value: string

      A server URL to connect to

    Returns void

    A server URL to connect to

Methods

createServiceabilityClient

Generated using TypeDoc