| GET | /template-approval/list |
|---|
"use strict";
export class ApiServiceRequest {
/** @param {{apiKey?:string,latitude?:number,longitude?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The API Key required for authentication */
apiKey;
/**
* @type {number}
* @description Latitude of the user making this request */
latitude;
/**
* @type {number}
* @description Longitude of the user making this request */
longitude;
}
export class ApiServiceResponse {
/** @param {{description?:string,heading?:string,wasSuccessful?:boolean,modelState?:Object}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
description;
/** @type {string} */
heading;
/** @type {boolean} */
wasSuccessful;
/** @type {Object} */
modelState;
}
/** @typedef {number} */
export var TemplateApprovalStatus;
(function (TemplateApprovalStatus) {
TemplateApprovalStatus[TemplateApprovalStatus["AwaitingApproval"] = 0] = "AwaitingApproval"
TemplateApprovalStatus[TemplateApprovalStatus["Rejected"] = 1] = "Rejected"
TemplateApprovalStatus[TemplateApprovalStatus["Approved"] = 2] = "Approved"
})(TemplateApprovalStatus || (TemplateApprovalStatus = {}));
/** @typedef {number} */
export var TemplateType;
(function (TemplateType) {
TemplateType[TemplateType["Introductory"] = 0] = "Introductory"
TemplateType[TemplateType["Refresher"] = 1] = "Refresher"
})(TemplateType || (TemplateType = {}));
/** @typedef {number} */
export var SectionTitle;
(function (SectionTitle) {
SectionTitle[SectionTitle["Welcome"] = 0] = "Welcome"
SectionTitle[SectionTitle["Cochrane"] = 1] = "Cochrane"
SectionTitle[SectionTitle["Iconic"] = 2] = "Iconic"
SectionTitle[SectionTitle["OurBestWork"] = 3] = "OurBestWork"
SectionTitle[SectionTitle["RealityOfRisk"] = 4] = "RealityOfRisk"
SectionTitle[SectionTitle["ProductRange"] = 5] = "ProductRange"
SectionTitle[SectionTitle["ProductDeployments"] = 6] = "ProductDeployments"
SectionTitle[SectionTitle["Industries"] = 7] = "Industries"
SectionTitle[SectionTitle["ClearVu"] = 8] = "ClearVu"
SectionTitle[SectionTitle["CaseStudies"] = 9] = "CaseStudies"
SectionTitle[SectionTitle["Expertise"] = 10] = "Expertise"
SectionTitle[SectionTitle["Media"] = 11] = "Media"
SectionTitle[SectionTitle["ThankYou"] = 12] = "ThankYou"
SectionTitle[SectionTitle["ClearVuRange"] = 13] = "ClearVuRange"
SectionTitle[SectionTitle["Presentations"] = 14] = "Presentations"
SectionTitle[SectionTitle["LegacyVideos"] = 15] = "LegacyVideos"
})(SectionTitle || (SectionTitle = {}));
export class SectionSummary {
/** @param {{title?:SectionTitle,titleString?:string,sectionId?:number,sectionName?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {SectionTitle} */
title;
/** @type {string} */
titleString;
/** @type {number} */
sectionId;
/** @type {string} */
sectionName;
}
export class TemplateApprovalListItem {
/** @param {{userCrmId?:string,approvalDate?:string,templateApprovalId?:number,approvalStatus?:TemplateApprovalStatus,approvalStatusString?:string,templateType?:TemplateType,templateTypeString?:string,templateName?:string,systemUserName?:string,templateChangeDetail?:SectionSummary[],templateDetail?:SectionSummary[],content?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
userCrmId;
/** @type {string} */
approvalDate;
/** @type {number} */
templateApprovalId;
/** @type {TemplateApprovalStatus} */
approvalStatus;
/** @type {string} */
approvalStatusString;
/** @type {TemplateType} */
templateType;
/** @type {string} */
templateTypeString;
/** @type {string} */
templateName;
/** @type {string} */
systemUserName;
/** @type {SectionSummary[]} */
templateChangeDetail;
/** @type {SectionSummary[]} */
templateDetail;
/** @type {string} */
content;
}
export class TemplateApprovalListResponse extends ApiServiceResponse {
/** @param {{templates?:TemplateApprovalListItem[],description?:string,heading?:string,wasSuccessful?:boolean,modelState?:Object}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {TemplateApprovalListItem[]} */
templates;
}
export class TemplateApprovalList extends ApiServiceRequest {
/** @param {{apiKey?:string,latitude?:number,longitude?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
JavaScript TemplateApprovalList 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 /template-approval/list HTTP/1.1 Host: cochraneplus-api-dev.happen.zone Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
templates:
[
{
}
],
description: String,
heading: String,
wasSuccessful: False,
modelState: {}
}