Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Latest commit

 

History

History
438 lines (233 loc) · 7.9 KB

File metadata and controls

438 lines (233 loc) · 7.9 KB

#adminFunctions

This is Functions used for administration calls for permissions

##Methods

###allTenantsFlag

Convert allTenant Permissions on a Tenant

Returns: Object - response from hub-admin-api

Params:

  • jwt String

    • Token to be used in API request
  • permission String

    • [enable/disable] value for tenant Flag

###sharedDataCheck

Convert sharedDataCheck append any shared If needed to Next Step

Returns: Object - response modified options with shared data Information

Params:

  • options Object

    • Token to be used in API request

###updateModel

Convert updateModel modify a json object

Returns: Object - response modified options with shared data Information

Params:

  • newAttributes Object

    • List of attributes needed for updating

#authFunctions

This is Functions used for authentication and token manipulations

##Methods

###getUiToken

Pull the UI JWT from browser cookie.

Returns: String - JWT - value of UI authentication token

Params:

  • driver String

    • Selenium driver

###openJWT

Open JWT and get the contents of the token.

Returns: Object - Returns - Contents of JWT

Params:

  • jwtToken String

    • Encrypted JWT

###closeJWT

Close JWT Convert an Object to a Signed JWT for API Calls

Returns: String - Returns - Encrypted and signed JWT

Params:

  • token Object

    • Contents of JWT

###getAccessToken

Call to convert an application apikey to an Access Token

Returns: String - Returns Encrypted and signed JWT from auth service

Params:

  • ApiKey Guid

    • Application ApiKey from application configuration

###getEPAToken

Modify JWT to add Ethos to Tenant Name

Returns: String - Encrypted and signed JWT with Tenant name having Ethos Prepended

Params:

  • jwt String

    • Contents of JWT

###expireToken

Modify JWT to be expired

Returns: String - Encrypted and signed JWT that is expired

Params:

  • jwt String

    • Contents of JWT

#configFunctions

This is Functions used for making calls to hub-configuration-api

##Methods

###createApplications

Call to create a number of applications

Returns: Array - Array of Objects for each response body and statusCode

Params:

  • count Integer

    • Number of applications you are looking to create
  • JWT String

    • Token to be used when making calls to config
  • listAppNames Array

    • Empty Array or an Array of string as application names
  • responses Array

    • Always an Empty array

###deleteApplications

Call to delete one application

Returns: Object - Objects containing statusCode

Params:

  • id Guid

    • Application ID to be deleted
  • JWT String

    • Token to be used when making calls to config

###addPublishingResource

Modify an application to make authoritative for a resource

Returns: Array - Array of Objects for each response body and statusCode

Params:

  • JWT String

    • Token to be used when making calls to config
  • application Object

    • whole object of the application to assign a resource too
  • resourceName String/array

    • resource name as a string or an array of resource names

###addSubscribingResources

Call to add Subscriptions to an application

Returns: Array - Array of Objects for each response body and statusCode

Params:

  • JWT String

    • Token to be used when making calls to config
  • application Object

    • Application Object to add Resource as subscription
  • resourceName String/array

    • Resource name or array of resource names

###getConfiguration

Call to get array of objects for each Configuration

Returns: Array - Array of applications from configuration

Params:

  • JWT String

    • Token to be used when making calls to config

###addCredentials

Call to Add Credentials for EPA's

Returns: __ - result statuscode and body from configuration

Params:

  • appId Guid

    • Application ID to add credentials too
  • username String

    • Username for Credentials
  • password String

    • Password for Credentials
  • title String

    • Title for Credentials
  • jwt String

    • Bearer Token for making call

#errorFunctions

This is Functions used for making calls to error-reporting-service

##Methods

###sendErrorMessages

Call to send an Error Message to service

Returns: Array - Array of responses for each request to error service

Params:

  • jwt String

    • Token to use when sending error Message
  • payload Object

    • The error Message Payload that is to be sent to error service
  • count Integer

    • Number of requests to send to error service
  • responses Array

    • Array of responses from error service

###sendMessageBadMediaType

Call to send an Send bad media type to any endpoint

Returns: Array - Array of responses for each request to error service

Params:

  • jwt String

    • Token to use when sending
  • endpoint String

    • Which endpoint to make call too
  • payload Object

    • The error Message Payload that is to be sent to error service

###sendMessageExpiredToken

Call to send an Send an expired token to any endpoint

Returns: Array - Array of responses for each request to error service

Params:

  • jwt String

    • Token to use when sending
  • endpoint String

    • Which endpoint to make call too
  • payload Object

    • The error Message Payload that is to be sent to error service

###sendMessageBadEndpoint

Call to send an payload to false endpoint

Returns: Array - Array of responses for each request to error service

Params:

  • jwt String

    • Token to use when sending
  • endpoint String

    • Which endpoint to make call too
  • payload Object

    • The error Message Payload that is to be sent to error service

#mqsFunctions

This is Functions used for making calls to hub-message-queue-service

##Methods

###callConsumeAll

Call to MQS using Consume All

Returns: Object - response from MQS body with status code

Params:

  • JWT String

    • Token to be used when making calls to config
  • lastId LastId

    • last process ID

###callConsume

Call to MQS using Consume

Returns: Object - response from MQS including body and status code

Params:

  • JWT String

    • Token to be used when making calls to config
  • lastId LastId

    • last process ID

#preSetup

This is Function that setups a working environment for users to start using used for making calls to a already setup config

##Methods

###setup

deleteAll This is for removing all applications on start

Returns: Object - driver - selenium driver

Params:

  • driver Object

    • selenium driver

###setup

setup this is for setting up a default environment for running tests on

Returns: Object - driver - selenium driver

Params:

  • driver Object

    • selenium driver

###cleanUp

clean Up just to remove everything added by setup

Returns: Object - driver - selenium driver

Params:

  • driver Object

    • selenium driver
  • setupData Object

    • Data used for removing

#pubFunctions

This is Functions used for making calls to hub-publish-api

##Methods

###createChangeNotification

Call to create a change notification using default framework

Returns: Object - Generated Change Notification

Params:

  • resourceName String

    • Resource the Change notification will be attached too

###sendChangeNotifications

Call to create a send change notification to Publisher

Returns: Array - Array of responses for each request to publisher

Params:

  • jwt String

    • Token to use when sending change notification to publisher
  • payload Object

    • The change notification that is to be sent to publisher
  • count Integer

    • Number of requests to send to publisher
  • responses Array

    • Array of responses from publisher