| GET | /v1/coverage/policies/templates |
|---|
"use strict";
export class CoverageRingDef {
/** @param {{Key?:string,Label?:string,Sub?:string,WaitMinutes?:number,Enabled?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Label;
/** @type {string} */
Sub;
/** @type {?number} */
WaitMinutes;
/** @type {boolean} */
Enabled;
}
export class CoveragePolicyPrefs {
/** @param {{AssignmentMode?:string,RestHours?:number,OtThresholdHours?:number,RingWaitMinutes?:number,QuietStart?:string,QuietEnd?:string,RescheduleAllowed?:boolean,QuietMode?:string,Rings?:CoverageRingDef[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
AssignmentMode;
/** @type {number} */
RestHours;
/** @type {number} */
OtThresholdHours;
/** @type {number} */
RingWaitMinutes;
/** @type {string} */
QuietStart;
/** @type {string} */
QuietEnd;
/** @type {boolean} */
RescheduleAllowed;
/** @type {string} */
QuietMode;
/** @type {CoverageRingDef[]} */
Rings = [];
}
export class CoverageRuleDocSection {
/** @param {{H?:string,T?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
H;
/** @type {string} */
T;
}
export class CoverageRuleTuneOption {
/** @param {{Label?:string,Sub?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Label;
/** @type {string} */
Sub;
}
export class CoverageRuleTune {
/** @param {{Intro?:string,Options?:CoverageRuleTuneOption[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Intro;
/** @type {CoverageRuleTuneOption[]} */
Options = [];
}
export class CoverageRuleDef {
/** @param {{RuleId?:string,Name?:string,Kind?:string,Demand?:string,SourcePolicyName?:string,CascadeLevel?:string,Why?:string,Change?:string,OverrideWho?:string,OverrideConsequence?:string,NoNote?:string,Params?:{ [index:string]: string; },Doc?:CoverageRuleDocSection[],Tune?:CoverageRuleTune}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
RuleId;
/** @type {string} */
Name;
/** @type {string} */
Kind;
/** @type {string} */
Demand;
/** @type {string} */
SourcePolicyName;
/** @type {string} */
CascadeLevel;
/** @type {string} */
Why;
/** @type {string} */
Change;
/** @type {string} */
OverrideWho;
/** @type {string} */
OverrideConsequence;
/** @type {string} */
NoNote;
/** @type {{ [index:string]: string; }} */
Params = {};
/** @type {CoverageRuleDocSection[]} */
Doc = [];
/** @type {CoverageRuleTune} */
Tune;
}
export class CoveragePolicyDoc {
/** @param {{Intro?:string,LockLine?:string,TemplateName?:string,Prefs?:CoveragePolicyPrefs,Rules?:CoverageRuleDef[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Intro;
/** @type {string} */
LockLine;
/** @type {string} */
TemplateName;
/** @type {CoveragePolicyPrefs} */
Prefs;
/** @type {CoverageRuleDef[]} */
Rules = [];
}
export class CoverageTemplateInfo {
/** @param {{Key?:string,Name?:string,Sub?:string,Doc?:CoveragePolicyDoc}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Name;
/** @type {string} */
Sub;
/** @type {CoveragePolicyDoc} */
Doc;
}
export class CoverageTemplatesResponse {
/** @param {{Templates?:CoverageTemplateInfo[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {CoverageTemplateInfo[]} */
Templates = [];
/** @type {ResponseStatus} */
ResponseStatus;
}
export class CoverageTemplatesRequest {
constructor(init) { Object.assign(this, init) }
}
JavaScript CoverageTemplatesRequest 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 /v1/coverage/policies/templates HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Templates:
[
{
Key: String,
Name: String,
Sub: String,
Doc:
{
Intro: String,
LockLine: String,
TemplateName: String,
Prefs:
{
AssignmentMode: String,
RestHours: 0,
OtThresholdHours: 0,
RingWaitMinutes: 0,
QuietStart: String,
QuietEnd: String,
RescheduleAllowed: False,
QuietMode: String,
Rings:
[
{
Key: String,
Label: String,
Sub: String,
WaitMinutes: 0,
Enabled: False
}
]
},
Rules:
[
{
RuleId: String,
Name: String,
Kind: String,
Demand: String,
SourcePolicyName: String,
CascadeLevel: String,
Why: String,
Change: String,
OverrideWho: String,
OverrideConsequence: String,
NoNote: String,
Params:
{
String: String
},
Doc:
[
{
H: String,
T: String
}
],
Tune:
{
Intro: String,
Options:
[
{
Label: String,
Sub: String
}
]
}
}
]
}
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}