0.3.27 • Published 6 months ago

@envizage/services v0.3.27

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

Envizage Services

A list of Javascript methods and an HTTP client implementation that can be used to interact with the Envizage API. Type definitions are included.

Table of contents

  1. Pre-requisites
  2. Installation
  3. Usage
    1. HTTP Client

1. Pre-requisites

The @envizage/model package is a peer dependency for this project. Make sure that a version equal to or newer than the minimum required in the package.json file is installed. You can install the @envizage/model package using the following command:"


$ npm install --save @envizage/model # Or alternatively: `yarn add @envizage/model`

2. Installation

The SDK package can be installed as a usual npm package:


$ npm install --save @envizage/services # Or alternatively: `yarn add @envizage/services`

3. Usage

1. The HTTP Client

An HTTP Client implementation is required as a dependency for all services included in this SDK. The HTTP client that will be injected has to implement the IHttpClient interface:

export interface IHttpClient {
  get: <T>(url: string, params?: Map<string, string>, headerMap?: string[][]) => Promise<T>,

  post: <T, U>(url: string, body: T, params?: Map<string, string>, headerMap?: string[][]) => Promise<U>,

  put: <T, U>(url: string, body: T, params?: Map<string, string>, headerMap?: string[][]) => Promise<U>,

  remove: <T>(url: string, params?: Map<string, string>, headerMap?: string[][]) => Promise<T>
}

A user of the SDK can either implement that interface or import a ready fetch-based implementation that comes with the SDK:

  import { HttpClient } from "@envizage/services";

2. Envizage API service implementations

Service nameAPI EndpointMethods
Asset services
PhysicalAssetService/scenarios/{scenarioId}/assets/physical/query,get,create,update,delete
PortfolioAssetService/scenarios/{scenarioId}/assets/portfolio/query,get,create,update,delete
PortfolioFinancialAssetService/scenarios/{scenarioId}/assets/portfolio/{portfolioId}/financial/query,get,create,update,delete
PropertyAssetService/scenarios/{scenarioId}/assets/properties/query
InvestmentPropertyAssetService/scenarios/{scenarioId}/assets/properties/investment/query,get,create,update,delete
ResidentialPropertyAssetService/scenarios/{scenarioId}/assets/properties/residential/query,get,create,update,delete
AssetForPersonService/scenarios/{scenarioId}/persons/{personId}/assets/queryForPerson
PortfolioAssetForPersonService/scenarios/{scenarioId}/persons/{personId}/assets/portfolio/query,get,create,update,delete
PortfolioFinancialAssetForPersonService/scenarios/{scenarioId}/persons/{personId}/assets/portfolio/{portfolioId}/financialqueryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
ResidentialPropertyAssetForPersonService/scenarios/{scenarioId}/persons/{personId}/assets/properties/residential/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
InvestmentPropertyAssetForPersonService/scenarios/{scenarioId}/persons/{personId}/assets/properties/investment/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
User configuration
UserConfigurationService/config/userqueryForComponent,queryForProfile,get,create,update,delete
Expenses
LivingExpenseService/scenarios/{scenarioId}/expenses/living/query,get,create,update,delete
MortgageExpenseService/scenarios/{scenarioId}/expenses/mortgage/query,get,create,update,delete
PortfolioContributionExpenseService/scenarios/{scenarioId}/expenses/portfolio-contribution/query,get,create,update,delete
RentExpenseService/scenarios/{scenarioId}/expenses/rent/query,get,create,update,delete
EmployeePensionContributionExpenseForPersonService/scenarios/{scenarioId}/persons/{personId}/expenses/employee-pension-contribution/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
InsurancePremiumExpenseForPersonService/scenarios/{scenarioId}/persons/{personId}/expenses/insurance-premium/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
LivingExpenseForPersonService/scenarios/{scenarioId}/persons/{personId}/expenses/living/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
MortgageExpenseForPersonService/scenarios/{scenarioId}/persons/{personId}/expenses/mortgage/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
PortfolioContributionExpenseForPersonService/scenarios/{scenarioId}/persons/{personId}/expenses/portfolio-contribution/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
RentExpenseForPersonService/scenarios/{scenarioId}/persons/{personId}/expenses/rent/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
Incomes
EmployerPensionContributionIncomeService/scenarios/{scenarioId}/incomes/employer-pension-contribution/query,get,create,update,delete
InsuranceIncomeService/scenarios/{scenarioId}/incomes/insurance/query,get,create,update,delete
RentIncomeService/scenarios/{scenarioId}/incomes/rent/query,get,create,update,delete
UnearnedIncomeService/scenarios/{scenarioId}/incomes/unearned/query,get,create,update,delete
EarnedIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/earned/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
InsuranceIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/insurance/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
PensionAnnuityIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/pension/annuity/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
PensionDrawdownIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/pension/drawdown/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
PensionLumpSumIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/pension/lumpsum/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
StatePensionIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/pension/state/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
RentIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/rent/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
UnearnedIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/unearned/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
EmployerPensionContributionIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/pension/state/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
StatePensionIncomeForPersonService/scenarios/{scenarioId}/persons/{personId}/incomes/employer-pension-contribution/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
Goals
TypedGoalService/scenarios/{scenarioId}/goals/typed/query,get,create,update,delete
TypedGoalForPersonService/scenarios/{scenarioId}/persons/{personId}/goals/typed/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
Liabilities
MortgageLiabilityService/scenarios/{scenarioId}/liabilities/mortgage/query,get,create,update,delete
OtherSecuredLiabilityService/scenarios/{scenarioId}/liabilities/secured-debts/query,get,create,update,delete
UnsecuredLiabilityService/scenarios/{scenarioId}/liabilities/unsecured-debts/query,get,create,update,delete
MortgageLiabilityForPersonService/scenarios/{scenarioId}/persons/{personId}/persons/${personId}/liabilities/mortgages/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
OtherSecuredLiabilityForPersonService/scenarios/{scenarioId}/persons/{personId}/persons/${personId}/liabilities/secured-debts/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
UnsecuredLiabilityForPersonService/scenarios/{scenarioId}/persons/{personId}/liabilities/unsecured-debts/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
Persons
PrimaryPersonService/scenarios/{scenarioId}/persons/primary/get,update
PartnerPersonService/scenarios/{scenarioId}/persons/partner/get,create,update,delete
ParentPersonService/scenarios/{scenarioId}/persons/parents/query,get,create,update,delete
ChildPersonService/scenarios/{scenarioId}/persons/children/query,get,create,update,delete
Preferences
PrimaryPersonService/scenarios/{scenarioId}/preference/{key}get,get,update,delete
Insurances
CriticalIllnessInsuranceForPersonService/scenarios/{scenarioId}/persons/{personId}/persons/${personId}/insurances/critical-illness/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
DisabilityInsuranceForPersonService/scenarios/{scenarioId}/persons/{personId}/persons/${personId}/insurances/disability/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
LifeInsuranceForPersonService/scenarios/{scenarioId}/persons/{personId}/persons/${personId}/insurances/life/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
MortgageLifeInsuranceForPersonService/scenarios/{scenarioId}/persons/{personId}/persons/${personId}/insurances/mortgage-life/queryForPerson,getForPerson,createForPerson,updateForPerson,deleteForPerson
Financial Reference Data
FinancialAssetClassService/scenarios/reference/assets/financial/classes/query
FinancialAssetProfileService/scenarios/reference/assets/financial/profiles/query
FinancialAssetWrapperService/scenarios/reference/assets/financial/wrappers/query
Scenario
ScenarioService/scenarios/{scenarioId}/query,get,create,load,update,clone,replace,execute,diagnose,diff
Security
LoginService/uaa/login/login,loginUser
RegistrationService/uaa/register/register
TokenService/uaa/token/getClientToken,refresh,revoke
ResetPasswordService/uaa/reset/resetPassword
TermsOfUseService/uaa/terms-of-use/getCurrent,query,get,getAcceptance,create,update,updateAcceptance,delete
Simulation results
ResultsService/results/{scenarioId}/query/resultsget
DiagnosticResultsService/results/{scenarioId}/query/diagnostics/get
0.3.27

6 months ago

0.3.26

7 months ago

0.3.25

7 months ago

0.3.24

7 months ago

0.3.23

7 months ago

0.3.22

9 months ago

0.3.20

1 year ago

0.3.21

1 year ago

0.3.19

1 year ago

0.3.17

1 year ago

0.3.15

1 year ago

0.3.14

1 year ago

0.3.13

1 year ago

0.3.12

1 year ago

0.3.10

1 year ago

0.3.18

1 year ago

0.3.5

1 year ago

0.3.2

1 year ago

0.3.3

1 year ago

0.2.27

1 year ago

0.2.16

2 years ago

0.2.15

2 years ago

0.2.14

2 years ago

0.2.13

2 years ago

0.2.12

2 years ago

0.2.11

2 years ago

0.2.20

1 year ago

0.3.0

1 year ago

0.2.29

1 year ago

0.2.18

1 year ago

0.2.17

1 year ago

0.2.10

2 years ago