Trendsic Platform Service

<back to all web services

CoverageCascadeRequest

Requires Authentication
The following routes are available for this service:
GET/v1/coverage/cascade
"use strict";
export class CoveragePolicy {
    /** @param {{CoveragePolicyId?:number,CoveragePolicyUID?:string,Name?:string,ScopeLevel?:string,BranchId?:string,BranchName?:string,WorkTypeKey?:string,JobID?:number,JobName?:string,CurrentVersion?:number,IsActive?:boolean,CreatedAt?:string,UpdatedAt?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CoveragePolicyId;
    /** @type {string} */
    CoveragePolicyUID;
    /** @type {string} */
    Name;
    /** @type {string} */
    ScopeLevel;
    /** @type {?string} */
    BranchId;
    /** @type {string} */
    BranchName;
    /** @type {string} */
    WorkTypeKey;
    /** @type {?number} */
    JobID;
    /** @type {string} */
    JobName;
    /** @type {number} */
    CurrentVersion;
    /** @type {boolean} */
    IsActive;
    /** @type {string} */
    CreatedAt;
    /** @type {?string} */
    UpdatedAt;
}
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 CoveragePolicyVersionInfo {
    /** @param {{CoveragePolicyVersionId?:number,CoveragePolicyId?:number,VersionNumber?:number,ChangeNote?:string,ChangedByName?:string,CreatedAtUtc?:string,Doc?:CoveragePolicyDoc}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CoveragePolicyVersionId;
    /** @type {number} */
    CoveragePolicyId;
    /** @type {number} */
    VersionNumber;
    /** @type {string} */
    ChangeNote;
    /** @type {string} */
    ChangedByName;
    /** @type {string} */
    CreatedAtUtc;
    /** @type {CoveragePolicyDoc} */
    Doc;
}
export class CoverageCascadeResponse {
    /** @param {{Policy?:CoveragePolicy,Doc?:CoveragePolicyDoc,VersionNumber?:number,Versions?:CoveragePolicyVersionInfo[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {CoveragePolicy} */
    Policy;
    /** @type {CoveragePolicyDoc} */
    Doc;
    /** @type {number} */
    VersionNumber;
    /** @type {CoveragePolicyVersionInfo[]} */
    Versions = [];
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class CoverageCascadeRequest {
    /** @param {{CoveragePolicyId?:number,VersionNumber?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    CoveragePolicyId;
    /** @type {?number} */
    VersionNumber;
}

JavaScript CoverageCascadeRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/coverage/cascade HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Policy: 
	{
		CoveragePolicyId: 0,
		CoveragePolicyUID: 00000000000000000000000000000000,
		Name: String,
		ScopeLevel: String,
		BranchId: 00000000000000000000000000000000,
		BranchName: String,
		WorkTypeKey: String,
		JobID: 0,
		JobName: String,
		CurrentVersion: 0,
		IsActive: False,
		CreatedAt: 0001-01-01,
		UpdatedAt: 0001-01-01
	},
	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
						}
					]
				}
			}
		]
	},
	VersionNumber: 0,
	Versions: 
	[
		{
			CoveragePolicyVersionId: 0,
			CoveragePolicyId: 0,
			VersionNumber: 0,
			ChangeNote: String,
			ChangedByName: String,
			CreatedAtUtc: 0001-01-01,
			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
		}
	}
}