POST | /api/schedules/{RequestId}/cancel |
---|
"use strict";
export class ScheduleResponse {
/** @param {{ReferenceId?:string,CommunicationId?:string,Success?:boolean,Message?:string,Payload?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ReferenceId;
/** @type {string} */
CommunicationId;
/** @type {boolean} */
Success;
/** @type {string} */
Message;
/** @type {string} */
Payload;
}
export class ObjectReference {
/** @param {{RmsTableContextId?:string,AlternateKey?:string,DataSourceInstanceId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
RmsTableContextId;
/** @type {string} */
AlternateKey;
/** @type {string} */
DataSourceInstanceId;
}
export class ContactInfo {
/** @param {{Id?:string,Name?:string,Email?:string,Phone?:string,ContactReference?:ObjectReference}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Name;
/** @type {string} */
Email;
/** @type {string} */
Phone;
/** @type {ObjectReference} */
ContactReference;
}
export class ProjectInfo {
/** @param {{Id?:string,Name?:string,Reference?:string,Description?:string,Address?:string,HouseType?:string,Elevation?:string,CustomerName?:string,Supervisor?:ContactInfo,ProjectReference?:ObjectReference}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Name;
/** @type {string} */
Reference;
/** @type {string} */
Description;
/** @type {string} */
Address;
/** @type {string} */
HouseType;
/** @type {string} */
Elevation;
/** @type {string} */
CustomerName;
/** @type {ContactInfo} */
Supervisor;
/** @type {ObjectReference} */
ProjectReference;
}
export class PurchaseOrderInfo {
/** @param {{Id?:string,Reference?:string,Description?:string,PurchaseOrderReference?:ObjectReference}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Reference;
/** @type {string} */
Description;
/** @type {ObjectReference} */
PurchaseOrderReference;
}
export class ActivityReference {
/** @param {{name?:string,notes?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Name/details of the activity */
name;
/** @type {string} */
notes;
}
export class ScheduleParams {
/** @param {{Name?:string,Value?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {string} */
Value;
}
/** @typedef {'Url'|'FileStream'} */
export var AttachmentType;
(function (AttachmentType) {
AttachmentType["Url"] = "Url"
AttachmentType["FileStream"] = "FileStream"
})(AttachmentType || (AttachmentType = {}));
export class EmailAttachment {
/** @param {{FileName?:string,ContentType?:string,Path?:string,Url?:string,Length?:number,FileStream?:string,StreamContent?:string,AttachmentType?:AttachmentType,ProcessedAndUploadedAsBlob?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FileName;
/** @type {string} */
ContentType;
/** @type {string} */
Path;
/** @type {string} */
Url;
/** @type {number} */
Length;
/** @type {string} */
FileStream;
/** @type {string} */
StreamContent;
/** @type {AttachmentType} */
AttachmentType;
/** @type {boolean} */
ProcessedAndUploadedAsBlob;
}
export class CancelScheduleRequest {
/** @param {{RequestId?:string,ScheduleDateTime?:string,Requester?:ContactInfo,Supplier?:ContactInfo,Project?:ProjectInfo,PurchaseOrder?:PurchaseOrderInfo,Activity?:ActivityReference,Params?:ScheduleParams[],Attachments?:EmailAttachment[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Id of the schedule request to be recreated */
RequestId;
/**
* @type {string}
* @description Date/Time of the activity */
ScheduleDateTime;
/** @type {ContactInfo} */
Requester;
/** @type {ContactInfo} */
Supplier;
/** @type {ProjectInfo} */
Project;
/** @type {PurchaseOrderInfo} */
PurchaseOrder;
/** @type {ActivityReference} */
Activity;
/** @type {ScheduleParams[]} */
Params;
/** @type {EmailAttachment[]} */
Attachments;
}
JavaScript CancelScheduleRequest 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.
POST /api/schedules/{RequestId}/cancel HTTP/1.1
Host: production-eros-gateway-api-supplierconnect.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ScheduleDateTime: 0001-01-01,
Requester:
{
Name: String,
Email: String,
Phone: String,
ContactReference:
{
AlternateKey: String
}
},
Supplier:
{
Name: String,
Email: String,
Phone: String,
ContactReference:
{
AlternateKey: String
}
},
Project:
{
Name: String,
Reference: String,
Description: String,
Address: String,
HouseType: String,
Elevation: String,
CustomerName: String,
Supervisor:
{
Name: String,
Email: String,
Phone: String,
ContactReference:
{
AlternateKey: String
}
},
ProjectReference:
{
AlternateKey: String
}
},
PurchaseOrder:
{
Reference: String,
Description: String,
PurchaseOrderReference:
{
AlternateKey: String
}
},
Activity:
{
name: String,
notes: String
},
Params:
[
{
Name: String,
Value: String
}
],
Attachments:
[
{
FileName: String,
ContentType: String,
Path: String,
Url: String,
Length: 0,
StreamContent: String,
AttachmentType: Url,
ProcessedAndUploadedAsBlob: False
}
]
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Success: False, Message: String, Payload: String }