POST | /api/schedules | ||
---|---|---|---|
PUT | /api/schedules/{RequestId} |
"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 ScheduleRequest {
/** @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 ScheduleRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/schedules HTTP/1.1
Host: production-eros-gateway-api-supplierconnect.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ScheduleRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.SupplierConnect.Model.APIModels">
<Activity>
<name>String</name>
<notes>String</notes>
</Activity>
<Attachments xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Saguna.Common.Library">
<d2p1:EmailAttachment>
<d2p1:AttachmentType>Url</d2p1:AttachmentType>
<d2p1:ContentType>String</d2p1:ContentType>
<d2p1:FileName>String</d2p1:FileName>
<d2p1:FileStream xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.IO" i:nil="true" />
<d2p1:Length>0</d2p1:Length>
<d2p1:Path>String</d2p1:Path>
<d2p1:ProcessedAndUploadedAsBlob>false</d2p1:ProcessedAndUploadedAsBlob>
<d2p1:StreamContent>String</d2p1:StreamContent>
<d2p1:Url>String</d2p1:Url>
</d2p1:EmailAttachment>
</Attachments>
<Params>
<ScheduleParams>
<Name>String</Name>
<Value>String</Value>
</ScheduleParams>
</Params>
<Project>
<Address>String</Address>
<CustomerName>String</CustomerName>
<Description>String</Description>
<Elevation>String</Elevation>
<HouseType>String</HouseType>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Name>String</Name>
<ProjectReference>
<AlternateKey>String</AlternateKey>
<DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
<RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
</ProjectReference>
<Reference>String</Reference>
<Supervisor>
<ContactReference>
<AlternateKey>String</AlternateKey>
<DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
<RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
</ContactReference>
<Email>String</Email>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Name>String</Name>
<Phone>String</Phone>
</Supervisor>
</Project>
<PurchaseOrder>
<Description>String</Description>
<Id>00000000-0000-0000-0000-000000000000</Id>
<PurchaseOrderReference>
<AlternateKey>String</AlternateKey>
<DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
<RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
</PurchaseOrderReference>
<Reference>String</Reference>
</PurchaseOrder>
<RequestId>00000000-0000-0000-0000-000000000000</RequestId>
<Requester>
<ContactReference>
<AlternateKey>String</AlternateKey>
<DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
<RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
</ContactReference>
<Email>String</Email>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Name>String</Name>
<Phone>String</Phone>
</Requester>
<ScheduleDateTime>0001-01-01T00:00:00</ScheduleDateTime>
<Supplier>
<ContactReference>
<AlternateKey>String</AlternateKey>
<DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
<RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
</ContactReference>
<Email>String</Email>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Name>String</Name>
<Phone>String</Phone>
</Supplier>
</ScheduleRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.SupplierConnect.Model.APIModels"> <CommunicationId>00000000-0000-0000-0000-000000000000</CommunicationId> <Message>String</Message> <Payload>String</Payload> <ReferenceId>00000000-0000-0000-0000-000000000000</ReferenceId> <Success>false</Success> </ScheduleResponse>