| GET | /api/riskstore/eventset/search | Search for event sets |
|---|
"use strict";
export class QueryBase {
/** @param {{skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
skip;
/** @type {?number} */
take;
/** @type {string} */
orderBy;
/** @type {string} */
orderByDesc;
/** @type {string} */
include;
/** @type {string} */
fields;
/** @type {{ [index:string]: string; }} */
meta;
}
/** @typedef T {any} */
export class QueryDb extends QueryBase {
/** @param {{skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
/** @typedef {number} */
export var ProcessingStatus;
(function (ProcessingStatus) {
ProcessingStatus[ProcessingStatus["New"] = 0] = "New"
ProcessingStatus[ProcessingStatus["Processing"] = 1] = "Processing"
ProcessingStatus[ProcessingStatus["Failed"] = 10] = "Failed"
ProcessingStatus[ProcessingStatus["Successful"] = 20] = "Successful"
})(ProcessingStatus || (ProcessingStatus = {}));
export class EventSetTelemetry {
/** @param {{eventSetId?:number,startedDateTimeUtc?:string,endedDateTimeUct?:string,eventLossCount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
eventSetId;
/** @type {?string} */
startedDateTimeUtc;
/** @type {?string} */
endedDateTimeUct;
/** @type {number} */
eventLossCount;
}
export class EventSet {
/** @param {{eventSetId?:number,processingStatus?:ProcessingStatus,sourceModelSystem?:string,sourceEventSetId?:string,modelId?:string,perspectiveId?:number,simulationCount?:number,programCalculationId?:string,description?:string,limit?:number,reinstatements?:number,eventSourceType?:string,eventSetOriginId?:string,eventSetOriginName?:string,eventSetOriginType?:string,sourceEventSetLossContainer?:string,sourceEventSetLossPath?:string,resolution?:string,resultsHash?:string,expectedLossAggregate?:number,expectedLossOccurrence?:number,probabilityOfAttachment?:number,probabilityOfExhaustion?:number,approvedDateTimeUtc?:string,approvedBy?:string,eventSourceId?:number,validFromUtc?:string,validToUtc?:string,container?:string,blobName?:string,updatedDateUtc?:string,isArchived?:boolean,archivedLossDataBlobPath?:string,archivedLossDataHash?:string,eventSetTelemetry?:EventSetTelemetry}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
eventSetId;
/** @type {ProcessingStatus} */
processingStatus;
/** @type {string} */
sourceModelSystem;
/** @type {string} */
sourceEventSetId;
/** @type {string} */
modelId;
/** @type {number} */
perspectiveId;
/** @type {number} */
simulationCount;
/** @type {string} */
programCalculationId;
/** @type {string} */
description;
/** @type {number} */
limit;
/** @type {number} */
reinstatements;
/** @type {string} */
eventSourceType;
/** @type {string} */
eventSetOriginId;
/** @type {string} */
eventSetOriginName;
/** @type {string} */
eventSetOriginType;
/** @type {string} */
sourceEventSetLossContainer;
/** @type {string} */
sourceEventSetLossPath;
/** @type {string} */
resolution;
/** @type {string} */
resultsHash;
/** @type {number} */
expectedLossAggregate;
/** @type {number} */
expectedLossOccurrence;
/** @type {number} */
probabilityOfAttachment;
/** @type {number} */
probabilityOfExhaustion;
/** @type {string} */
approvedDateTimeUtc;
/** @type {string} */
approvedBy;
/** @type {number} */
eventSourceId;
/** @type {string} */
validFromUtc;
/** @type {string} */
validToUtc;
/** @type {string} */
container;
/** @type {string} */
blobName;
/** @type {string} */
updatedDateUtc;
/** @type {boolean} */
isArchived;
/** @type {string} */
archivedLossDataBlobPath;
/** @type {string} */
archivedLossDataHash;
/** @type {EventSetTelemetry} */
eventSetTelemetry;
}
export class FindEventSetRequest extends QueryDb {
/** @param {{sourceModelSystem?:string,modelId?:string,perspectiveId?:number,sourceEventSetId?:string,skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description Source Model System */
sourceModelSystem;
/**
* @type {string}
* @description Model Id */
modelId;
/**
* @type {?number}
* @description The perspective id for the event set */
perspectiveId;
/**
* @type {?string}
* @description Source Event Set Id */
sourceEventSetId;
}
/** @typedef {'NotSet'|'PortfolioMetrics'|'Curve'|'YLT'|'TailIntensity'|'DealYlt'|'DealElt'|'DealEltWithIndustryLoss'|'PortfolioElt'|'PortfolioEltWithIndustryLoss'|'EventSetGeneration'|'PortfolioRaps'|'DealRaps'|'PortfolioSepyIndustryLoss'|'DealSepyIndustryLoss'} */
export var ResultOutputLevel;
(function (ResultOutputLevel) {
ResultOutputLevel["NotSet"] = "NotSet"
ResultOutputLevel["PortfolioMetrics"] = "PortfolioMetrics"
ResultOutputLevel["Curve"] = "Curve"
ResultOutputLevel["YLT"] = "YLT"
ResultOutputLevel["TailIntensity"] = "TailIntensity"
ResultOutputLevel["DealYlt"] = "DealYlt"
ResultOutputLevel["DealElt"] = "DealElt"
ResultOutputLevel["DealEltWithIndustryLoss"] = "DealEltWithIndustryLoss"
ResultOutputLevel["PortfolioElt"] = "PortfolioElt"
ResultOutputLevel["PortfolioEltWithIndustryLoss"] = "PortfolioEltWithIndustryLoss"
ResultOutputLevel["EventSetGeneration"] = "EventSetGeneration"
ResultOutputLevel["PortfolioRaps"] = "PortfolioRaps"
ResultOutputLevel["DealRaps"] = "DealRaps"
ResultOutputLevel["PortfolioSepyIndustryLoss"] = "PortfolioSepyIndustryLoss"
ResultOutputLevel["DealSepyIndustryLoss"] = "DealSepyIndustryLoss"
})(ResultOutputLevel || (ResultOutputLevel = {}));
export class AnalysisPortfolioEventSetConfiguration {
/** @param {{id?:number,analysisId?:number,analysisConfigurationId?:number,portfolioName?:string,modelId?:string,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {number} */
analysisConfigurationId;
/** @type {string} */
portfolioName;
/** @type {string} */
modelId;
/** @type {string} */
rowIdentifier;
}
export class AnalysisConfiguration {
/** @param {{id?:number,analysisId?:number,windowStartDate?:string,windowEndDate?:string,standardEnabled?:boolean,runOffEnabled?:boolean,aggregateEnabled?:boolean,occurrenceEnabled?:boolean,nettEnabled?:boolean,grossEnabled?:boolean,tailIntensityPercentageStart?:number,tailIntensityPercentageEnd?:number,metaRiskId?:number,outputLevel?:ResultOutputLevel,processingStatus?:ProcessingStatus,eventLossFloorStartRange?:number,eventLossFloorEndRange?:number,analysisPortfolioEventSetConfigurations?:AnalysisPortfolioEventSetConfiguration[],rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {?string} */
windowStartDate;
/** @type {?string} */
windowEndDate;
/** @type {boolean} */
standardEnabled;
/** @type {boolean} */
runOffEnabled;
/** @type {boolean} */
aggregateEnabled;
/** @type {boolean} */
occurrenceEnabled;
/** @type {boolean} */
nettEnabled;
/** @type {boolean} */
grossEnabled;
/** @type {?number} */
tailIntensityPercentageStart;
/** @type {?number} */
tailIntensityPercentageEnd;
/** @type {number} */
metaRiskId;
/** @type {ResultOutputLevel} */
outputLevel;
/** @type {ProcessingStatus} */
processingStatus;
/** @type {?number} */
eventLossFloorStartRange;
/** @type {?number} */
eventLossFloorEndRange;
/** @type {AnalysisPortfolioEventSetConfiguration[]} */
analysisPortfolioEventSetConfigurations;
/** @type {string} */
rowIdentifier;
}
/** @typedef {'NotSet'|'S'|'B'} */
export var TransactionType;
(function (TransactionType) {
TransactionType["NotSet"] = "NotSet"
TransactionType["S"] = "S"
TransactionType["B"] = "B"
})(TransactionType || (TransactionType = {}));
export class AnalysisPortfolioAllocation {
/** @param {{id?:number,analysisDealId?:number,portfolioName?:string,allocationPercentage?:number,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisDealId;
/** @type {string} */
portfolioName;
/** @type {number} */
allocationPercentage;
/** @type {string} */
rowIdentifier;
}
export class AnalysisDeal {
/** @param {{id?:number,analysisId?:number,sourceDealId?:string,dealRef?:string,sourceDealSystem?:string,eventSetId?:number,rol?:number,limit?:number,inceptionDate?:string,expiryDate?:string,transactionType?:TransactionType,allocations?:AnalysisPortfolioAllocation[],perspectiveIdOverride?:number,eventSetIdOverride?:number,modelAsOfDateOverride?:string,sourceModelSystemOverride?:string,sourceModelIdOverride?:string,sourceEventSetIdOverride?:string,eventSourceSystemOverride?:string,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {string} */
sourceDealId;
/** @type {string} */
dealRef;
/** @type {string} */
sourceDealSystem;
/** @type {number} */
eventSetId;
/** @type {number} */
rol;
/** @type {number} */
limit;
/** @type {string} */
inceptionDate;
/** @type {string} */
expiryDate;
/** @type {TransactionType} */
transactionType;
/** @type {AnalysisPortfolioAllocation[]} */
allocations;
/** @type {?number} */
perspectiveIdOverride;
/** @type {?number} */
eventSetIdOverride;
/** @type {?string} */
modelAsOfDateOverride;
/** @type {string} */
sourceModelSystemOverride;
/** @type {string} */
sourceModelIdOverride;
/** @type {string} */
sourceEventSetIdOverride;
/** @type {string} */
eventSourceSystemOverride;
/** @type {string} */
rowIdentifier;
}
export class AnalysisEventIdFilter {
/** @param {{id?:number,analysisId?:number,eventSourceId?:number,eventId?:number,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {number} */
eventSourceId;
/** @type {number} */
eventId;
/** @type {string} */
rowIdentifier;
}
/** @typedef {'NotSet'|'Persistence'|'Archival'} */
export var MessageType;
(function (MessageType) {
MessageType["NotSet"] = "NotSet"
MessageType["Persistence"] = "Persistence"
MessageType["Archival"] = "Archival"
})(MessageType || (MessageType = {}));
export class MessageTracking {
/** @param {{id?:string,analysisId?:number,processingStatus?:ProcessingStatus,messageType?:MessageType,createdDateUtc?:string,updatedDateUtc?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {?number} */
analysisId;
/** @type {ProcessingStatus} */
processingStatus;
/** @type {MessageType} */
messageType;
/** @type {string} */
createdDateUtc;
/** @type {string} */
updatedDateUtc;
}
export class Analysis {
/** @param {{id?:number,name?:string,modelAsOfDate?:string,perspectiveId?:number,configurations?:AnalysisConfiguration[],deals?:AnalysisDeal[],eventIdFilters?:AnalysisEventIdFilter[],createdBy?:string,createdDateUtc?:string,completedDateUtc?:string,legacyAnalysisId?:number,resultPersistenceTracking?:MessageTracking[],processingStatus?:ProcessingStatus,saveResults?:boolean,eventSourceSystem?:string,updatedDateUtc?:string,isExpired?:boolean,rowIdentifier?:string,errorMessage?:string,ignoreSimulationCountMismatch?:boolean,finalStatus?:ProcessingStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
name;
/** @type {?string} */
modelAsOfDate;
/** @type {number} */
perspectiveId;
/** @type {AnalysisConfiguration[]} */
configurations;
/** @type {AnalysisDeal[]} */
deals;
/** @type {AnalysisEventIdFilter[]} */
eventIdFilters;
/** @type {string} */
createdBy;
/** @type {string} */
createdDateUtc;
/** @type {?string} */
completedDateUtc;
/** @type {?number} */
legacyAnalysisId;
/** @type {MessageTracking[]} */
resultPersistenceTracking;
/** @type {ProcessingStatus} */
processingStatus;
/** @type {boolean} */
saveResults;
/** @type {string} */
eventSourceSystem;
/** @type {string} */
updatedDateUtc;
/** @type {boolean} */
isExpired;
/** @type {string} */
rowIdentifier;
/** @type {string} */
errorMessage;
/**
* @type {boolean}
* @description Take the minimum simulation count when we have different simulations between event sets */
ignoreSimulationCountMismatch;
/** @type {ProcessingStatus} */
finalStatus;
}
/** @typedef T {any} */
export class QueryResponse {
/** @param {{offset?:number,total?:number,results?:T[],meta?:{ [index:string]: string; },responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
offset;
/** @type {number} */
total;
/** @type {T[]} */
results;
/** @type {{ [index:string]: string; }} */
meta;
/** @type {ResponseStatus} */
responseStatus;
}
JavaScript FindEventSetRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/riskstore/eventset/search HTTP/1.1 Host: riskstoreng-dev.nephila.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
offset: 0,
total: 0,
results:
[
{
eventSetId: 0,
processingStatus: New,
sourceModelSystem: String,
sourceEventSetId: String,
modelId: String,
perspectiveId: 0,
simulationCount: 0,
programCalculationId: String,
description: String,
limit: 0,
reinstatements: 0,
eventSourceType: String,
eventSetOriginId: String,
eventSetOriginName: String,
eventSetOriginType: String,
sourceEventSetLossContainer: String,
sourceEventSetLossPath: String,
resolution: String,
resultsHash: String,
expectedLossAggregate: 0,
expectedLossOccurrence: 0,
probabilityOfAttachment: 0,
probabilityOfExhaustion: 0,
approvedDateTimeUtc: 0001-01-01,
approvedBy: String,
eventSourceId: 0,
validFromUtc: 0001-01-01,
validToUtc: 0001-01-01,
container: String,
blobName: String,
updatedDateUtc: 0001-01-01,
isArchived: False,
archivedLossDataBlobPath: String,
archivedLossDataHash: String,
eventSetTelemetry:
{
eventSetId: 0,
startedDateTimeUtc: 0001-01-01,
endedDateTimeUct: 0001-01-01,
eventLossCount: 0
}
}
],
meta:
{
String: String
},
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}