GET | /api/activity | ||
---|---|---|---|
GET | /api/activity/{lastrowversion} |
import 'package:servicestack/servicestack.dart';
class SupplierConnectObjectReference implements IConvertible
{
String? RmsTableContextId;
String? AlternateKey;
String? DataSourceInstanceId;
SupplierConnectObjectReference({this.RmsTableContextId,this.AlternateKey,this.DataSourceInstanceId});
SupplierConnectObjectReference.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RmsTableContextId = json['RmsTableContextId'];
AlternateKey = json['AlternateKey'];
DataSourceInstanceId = json['DataSourceInstanceId'];
return this;
}
Map<String, dynamic> toJson() => {
'RmsTableContextId': RmsTableContextId,
'AlternateKey': AlternateKey,
'DataSourceInstanceId': DataSourceInstanceId
};
getTypeName() => "SupplierConnectObjectReference";
TypeContext? context = _ctx;
}
class SupplierConnectContactInfo implements IConvertible
{
String? Id;
String? Name;
String? Email;
String? Phone;
SupplierConnectObjectReference? ContactReference;
SupplierConnectContactInfo({this.Id,this.Name,this.Email,this.Phone,this.ContactReference});
SupplierConnectContactInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Email = json['Email'];
Phone = json['Phone'];
ContactReference = JsonConverters.fromJson(json['ContactReference'],'SupplierConnectObjectReference',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Email': Email,
'Phone': Phone,
'ContactReference': JsonConverters.toJson(ContactReference,'SupplierConnectObjectReference',context!)
};
getTypeName() => "SupplierConnectContactInfo";
TypeContext? context = _ctx;
}
class SupplierConnectProjectInfo implements IConvertible
{
String? Id;
String? Name;
String? Reference;
String? Description;
String? Address;
String? HouseType;
String? Elevation;
SupplierConnectContactInfo? Supervisor;
String? CustomerName;
SupplierConnectObjectReference? ProjectReference;
SupplierConnectProjectInfo({this.Id,this.Name,this.Reference,this.Description,this.Address,this.HouseType,this.Elevation,this.Supervisor,this.CustomerName,this.ProjectReference});
SupplierConnectProjectInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Reference = json['Reference'];
Description = json['Description'];
Address = json['Address'];
HouseType = json['HouseType'];
Elevation = json['Elevation'];
Supervisor = JsonConverters.fromJson(json['Supervisor'],'SupplierConnectContactInfo',context!);
CustomerName = json['CustomerName'];
ProjectReference = JsonConverters.fromJson(json['ProjectReference'],'SupplierConnectObjectReference',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Reference': Reference,
'Description': Description,
'Address': Address,
'HouseType': HouseType,
'Elevation': Elevation,
'Supervisor': JsonConverters.toJson(Supervisor,'SupplierConnectContactInfo',context!),
'CustomerName': CustomerName,
'ProjectReference': JsonConverters.toJson(ProjectReference,'SupplierConnectObjectReference',context!)
};
getTypeName() => "SupplierConnectProjectInfo";
TypeContext? context = _ctx;
}
class SupplierConnectPurchaseOrderInfo implements IConvertible
{
String? Id;
String? Reference;
String? Description;
String? ProjectId;
SupplierConnectObjectReference? PurchaseOrderReference;
SupplierConnectPurchaseOrderInfo({this.Id,this.Reference,this.Description,this.ProjectId,this.PurchaseOrderReference});
SupplierConnectPurchaseOrderInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Reference = json['Reference'];
Description = json['Description'];
ProjectId = json['ProjectId'];
PurchaseOrderReference = JsonConverters.fromJson(json['PurchaseOrderReference'],'SupplierConnectObjectReference',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Reference': Reference,
'Description': Description,
'ProjectId': ProjectId,
'PurchaseOrderReference': JsonConverters.toJson(PurchaseOrderReference,'SupplierConnectObjectReference',context!)
};
getTypeName() => "SupplierConnectPurchaseOrderInfo";
TypeContext? context = _ctx;
}
class SupplierConnectActivityReference implements IConvertible
{
String? Name;
String? Notes;
SupplierConnectActivityReference({this.Name,this.Notes});
SupplierConnectActivityReference.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Notes = json['Notes'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Notes': Notes
};
getTypeName() => "SupplierConnectActivityReference";
TypeContext? context = _ctx;
}
class SupplierConnectScheduleParams implements IConvertible
{
String? Name;
String? Value;
SupplierConnectScheduleParams({this.Name,this.Value});
SupplierConnectScheduleParams.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Value = json['Value'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Value': Value
};
getTypeName() => "SupplierConnectScheduleParams";
TypeContext? context = _ctx;
}
enum AttachmentType
{
Url,
FileStream,
}
class EmailAttachment implements IConvertible
{
String? FileName;
String? ContentType;
String? Path;
String? Url;
int? Length;
Uint8List? FileStream;
String? StreamContent;
AttachmentType? AttachmentType;
bool? ProcessedAndUploadedAsBlob;
EmailAttachment({this.FileName,this.ContentType,this.Path,this.Url,this.Length,this.FileStream,this.StreamContent,this.AttachmentType,this.ProcessedAndUploadedAsBlob});
EmailAttachment.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FileName = json['FileName'];
ContentType = json['ContentType'];
Path = json['Path'];
Url = json['Url'];
Length = json['Length'];
FileStream = JsonConverters.fromJson(json['FileStream'],'Uint8List',context!);
StreamContent = json['StreamContent'];
AttachmentType = JsonConverters.fromJson(json['AttachmentType'],'AttachmentType',context!);
ProcessedAndUploadedAsBlob = json['ProcessedAndUploadedAsBlob'];
return this;
}
Map<String, dynamic> toJson() => {
'FileName': FileName,
'ContentType': ContentType,
'Path': Path,
'Url': Url,
'Length': Length,
'FileStream': JsonConverters.toJson(FileStream,'Uint8List',context!),
'StreamContent': StreamContent,
'AttachmentType': JsonConverters.toJson(AttachmentType,'AttachmentType',context!),
'ProcessedAndUploadedAsBlob': ProcessedAndUploadedAsBlob
};
getTypeName() => "EmailAttachment";
TypeContext? context = _ctx;
}
class SupplierConnectSchedule implements IConvertible
{
String? RequestId;
String? PreviousRequestId;
String? LicenseeId;
String? LicenseeName;
DateTime? ScheduleDateTime;
SupplierConnectContactInfo? Requester;
SupplierConnectContactInfo? Supplier;
SupplierConnectProjectInfo? Project;
SupplierConnectPurchaseOrderInfo? PurchaseOrder;
SupplierConnectActivityReference? Activity;
List<SupplierConnectScheduleParams>? Params;
List<EmailAttachment>? Attachments;
SupplierConnectSchedule({this.RequestId,this.PreviousRequestId,this.LicenseeId,this.LicenseeName,this.ScheduleDateTime,this.Requester,this.Supplier,this.Project,this.PurchaseOrder,this.Activity,this.Params,this.Attachments});
SupplierConnectSchedule.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RequestId = json['RequestId'];
PreviousRequestId = json['PreviousRequestId'];
LicenseeId = json['LicenseeId'];
LicenseeName = json['LicenseeName'];
ScheduleDateTime = JsonConverters.fromJson(json['ScheduleDateTime'],'DateTime',context!);
Requester = JsonConverters.fromJson(json['Requester'],'SupplierConnectContactInfo',context!);
Supplier = JsonConverters.fromJson(json['Supplier'],'SupplierConnectContactInfo',context!);
Project = JsonConverters.fromJson(json['Project'],'SupplierConnectProjectInfo',context!);
PurchaseOrder = JsonConverters.fromJson(json['PurchaseOrder'],'SupplierConnectPurchaseOrderInfo',context!);
Activity = JsonConverters.fromJson(json['Activity'],'SupplierConnectActivityReference',context!);
Params = JsonConverters.fromJson(json['Params'],'List<SupplierConnectScheduleParams>',context!);
Attachments = JsonConverters.fromJson(json['Attachments'],'List<EmailAttachment>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'RequestId': RequestId,
'PreviousRequestId': PreviousRequestId,
'LicenseeId': LicenseeId,
'LicenseeName': LicenseeName,
'ScheduleDateTime': JsonConverters.toJson(ScheduleDateTime,'DateTime',context!),
'Requester': JsonConverters.toJson(Requester,'SupplierConnectContactInfo',context!),
'Supplier': JsonConverters.toJson(Supplier,'SupplierConnectContactInfo',context!),
'Project': JsonConverters.toJson(Project,'SupplierConnectProjectInfo',context!),
'PurchaseOrder': JsonConverters.toJson(PurchaseOrder,'SupplierConnectPurchaseOrderInfo',context!),
'Activity': JsonConverters.toJson(Activity,'SupplierConnectActivityReference',context!),
'Params': JsonConverters.toJson(Params,'List<SupplierConnectScheduleParams>',context!),
'Attachments': JsonConverters.toJson(Attachments,'List<EmailAttachment>',context!)
};
getTypeName() => "SupplierConnectSchedule";
TypeContext? context = _ctx;
}
class ScheduleDetails extends SupplierConnectSchedule implements IConvertible
{
String? ReferenceId;
int? Index;
String? StatusId;
String? Status;
String? StatusMessage;
String? RequestedBy;
DateTime? RequestedDate;
String? CommunicationId;
ScheduleDetails({this.ReferenceId,this.Index,this.StatusId,this.Status,this.StatusMessage,this.RequestedBy,this.RequestedDate,this.CommunicationId});
ScheduleDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ReferenceId = json['ReferenceId'];
Index = json['Index'];
StatusId = json['StatusId'];
Status = json['Status'];
StatusMessage = json['StatusMessage'];
RequestedBy = json['RequestedBy'];
RequestedDate = JsonConverters.fromJson(json['RequestedDate'],'DateTime',context!);
CommunicationId = json['CommunicationId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ReferenceId': ReferenceId,
'Index': Index,
'StatusId': StatusId,
'Status': Status,
'StatusMessage': StatusMessage,
'RequestedBy': RequestedBy,
'RequestedDate': JsonConverters.toJson(RequestedDate,'DateTime',context!),
'CommunicationId': CommunicationId
});
getTypeName() => "ScheduleDetails";
TypeContext? context = _ctx;
}
// @ApiResponse(Description="Returns the list of the schedule requests for the given list of Ids")
class GetSchedulesResponse implements IConvertible
{
bool? Success;
String? Message;
List<ScheduleDetails>? ScheduleRequests;
ResponseStatus? ResponseStatus;
String? LastRowVersion;
GetSchedulesResponse({this.Success,this.Message,this.ScheduleRequests,this.ResponseStatus,this.LastRowVersion});
GetSchedulesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Success = json['Success'];
Message = json['Message'];
ScheduleRequests = JsonConverters.fromJson(json['ScheduleRequests'],'List<ScheduleDetails>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
LastRowVersion = json['LastRowVersion'];
return this;
}
Map<String, dynamic> toJson() => {
'Success': Success,
'Message': Message,
'ScheduleRequests': JsonConverters.toJson(ScheduleRequests,'List<ScheduleDetails>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'LastRowVersion': LastRowVersion
};
getTypeName() => "GetSchedulesResponse";
TypeContext? context = _ctx;
}
/**
* Retrieves a list of activities of SupplierConnect schedule(s) for a given time window. This will return SupplierConnect schedule request(s), and the associated other details such as statuses
*/
// @Api(Description="Retrieves a list of activities of SupplierConnect schedule(s) for a given time window. This will return SupplierConnect schedule request(s), and the associated other details such as statuses")
class GetRequestActivity implements IConvertible
{
/**
* Row version of the last/latest record processed/returned in the previous request
*/
// @DataMember(Name="LastRowVersion")
// @ApiMember(Description="Row version of the last/latest record processed/returned in the previous request", IsRequired=true, Name="LastRowVersion")
String? LastRowVersion;
GetRequestActivity({this.LastRowVersion});
GetRequestActivity.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LastRowVersion = json['LastRowVersion'];
return this;
}
Map<String, dynamic> toJson() => {
'LastRowVersion': LastRowVersion
};
getTypeName() => "GetRequestActivity";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'production_eros_gateway_api_supplierconnect.azurewebsites.net', types: <String, TypeInfo> {
'SupplierConnectObjectReference': TypeInfo(TypeOf.Class, create:() => SupplierConnectObjectReference()),
'SupplierConnectContactInfo': TypeInfo(TypeOf.Class, create:() => SupplierConnectContactInfo()),
'SupplierConnectProjectInfo': TypeInfo(TypeOf.Class, create:() => SupplierConnectProjectInfo()),
'SupplierConnectPurchaseOrderInfo': TypeInfo(TypeOf.Class, create:() => SupplierConnectPurchaseOrderInfo()),
'SupplierConnectActivityReference': TypeInfo(TypeOf.Class, create:() => SupplierConnectActivityReference()),
'SupplierConnectScheduleParams': TypeInfo(TypeOf.Class, create:() => SupplierConnectScheduleParams()),
'AttachmentType': TypeInfo(TypeOf.Enum, enumValues:AttachmentType.values),
'EmailAttachment': TypeInfo(TypeOf.Class, create:() => EmailAttachment()),
'Uint8List': TypeInfo(TypeOf.Class, create:() => Uint8List(0)),
'SupplierConnectSchedule': TypeInfo(TypeOf.Class, create:() => SupplierConnectSchedule()),
'List<SupplierConnectScheduleParams>': TypeInfo(TypeOf.Class, create:() => <SupplierConnectScheduleParams>[]),
'List<EmailAttachment>': TypeInfo(TypeOf.Class, create:() => <EmailAttachment>[]),
'ScheduleDetails': TypeInfo(TypeOf.Class, create:() => ScheduleDetails()),
'GetSchedulesResponse': TypeInfo(TypeOf.Class, create:() => GetSchedulesResponse()),
'List<ScheduleDetails>': TypeInfo(TypeOf.Class, create:() => <ScheduleDetails>[]),
'GetRequestActivity': TypeInfo(TypeOf.Class, create:() => GetRequestActivity()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/activity HTTP/1.1 Host: production-eros-gateway-api-supplierconnect.azurewebsites.net Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Success":false,"Message":"String","ScheduleRequests":[{"Index":0,"Status":"String","StatusMessage":"String","RequestedBy":"String","RequestedDate":"0001-01-01T00:00:00.0000000","LicenseeName":"String","ScheduleDateTime":"0001-01-01T00:00:00.0000000","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","Supervisor":{"Name":"String","Email":"String","Phone":"String","ContactReference":{"AlternateKey":"String"}},"CustomerName":"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}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"LastRowVersion":"String"}