/* Options: Date: 2026-09-22 23:40:01 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.dev.dynamics.trendsic.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: InspectionDueRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class InspectionPhoto implements IConvertible { String? AttachmentId; String? FileName; String? Url; String? CreatedBy; DateTime? CreatedDate; bool? HasAnnotation; String? AnnotatedAttachmentId; String? AnnotatedUrl; InspectionPhoto({this.AttachmentId,this.FileName,this.Url,this.CreatedBy,this.CreatedDate,this.HasAnnotation,this.AnnotatedAttachmentId,this.AnnotatedUrl}); InspectionPhoto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { AttachmentId = json['AttachmentId']; FileName = json['FileName']; Url = json['Url']; CreatedBy = json['CreatedBy']; CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); HasAnnotation = json['HasAnnotation']; AnnotatedAttachmentId = json['AnnotatedAttachmentId']; AnnotatedUrl = json['AnnotatedUrl']; return this; } Map toJson() => { 'AttachmentId': AttachmentId, 'FileName': FileName, 'Url': Url, 'CreatedBy': CreatedBy, 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'HasAnnotation': HasAnnotation, 'AnnotatedAttachmentId': AnnotatedAttachmentId, 'AnnotatedUrl': AnnotatedUrl }; getTypeName() => "InspectionPhoto"; TypeContext? context = _ctx; } class InspectionItem implements IConvertible { int? InspectionItemID; int? InspectionID; int? Seq; String? Section; String? Prompt; String? ResponseType; bool? IsRequired; String? Unit; String? Guidance; String? Result; String? Value; String? Notes; int? PhotoCount; int? LinkedPunchItemID; String? LinkedPunchNo; String? LinkedPunchStatus; int? LinkedNcrID; String? LinkedNcrNo; int? LinkedActionID; String? AnsweredBy; DateTime? AnsweredAt; List? Photos = []; InspectionItem({this.InspectionItemID,this.InspectionID,this.Seq,this.Section,this.Prompt,this.ResponseType,this.IsRequired,this.Unit,this.Guidance,this.Result,this.Value,this.Notes,this.PhotoCount,this.LinkedPunchItemID,this.LinkedPunchNo,this.LinkedPunchStatus,this.LinkedNcrID,this.LinkedNcrNo,this.LinkedActionID,this.AnsweredBy,this.AnsweredAt,this.Photos}); InspectionItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { InspectionItemID = json['InspectionItemID']; InspectionID = json['InspectionID']; Seq = json['Seq']; Section = json['Section']; Prompt = json['Prompt']; ResponseType = json['ResponseType']; IsRequired = json['IsRequired']; Unit = json['Unit']; Guidance = json['Guidance']; Result = json['Result']; Value = json['Value']; Notes = json['Notes']; PhotoCount = json['PhotoCount']; LinkedPunchItemID = json['LinkedPunchItemID']; LinkedPunchNo = json['LinkedPunchNo']; LinkedPunchStatus = json['LinkedPunchStatus']; LinkedNcrID = json['LinkedNcrID']; LinkedNcrNo = json['LinkedNcrNo']; LinkedActionID = json['LinkedActionID']; AnsweredBy = json['AnsweredBy']; AnsweredAt = JsonConverters.fromJson(json['AnsweredAt'],'DateTime',context!); Photos = JsonConverters.fromJson(json['Photos'],'List',context!); return this; } Map toJson() => { 'InspectionItemID': InspectionItemID, 'InspectionID': InspectionID, 'Seq': Seq, 'Section': Section, 'Prompt': Prompt, 'ResponseType': ResponseType, 'IsRequired': IsRequired, 'Unit': Unit, 'Guidance': Guidance, 'Result': Result, 'Value': Value, 'Notes': Notes, 'PhotoCount': PhotoCount, 'LinkedPunchItemID': LinkedPunchItemID, 'LinkedPunchNo': LinkedPunchNo, 'LinkedPunchStatus': LinkedPunchStatus, 'LinkedNcrID': LinkedNcrID, 'LinkedNcrNo': LinkedNcrNo, 'LinkedActionID': LinkedActionID, 'AnsweredBy': AnsweredBy, 'AnsweredAt': JsonConverters.toJson(AnsweredAt,'DateTime',context!), 'Photos': JsonConverters.toJson(Photos,'List',context!) }; getTypeName() => "InspectionItem"; TypeContext? context = _ctx; } class InspectionRequest implements IConvertible { int? InspectionRequestID; int? InspectionID; String? Agency; String? ContactName; String? ContactPhone; String? PermitNo; DateTime? RequestedDate; String? RequestedWindow; String? Status; String? ConfirmationNo; String? Outcome; String? CreatedBy; DateTime? CreatedAt; DateTime? UpdatedAt; InspectionRequest({this.InspectionRequestID,this.InspectionID,this.Agency,this.ContactName,this.ContactPhone,this.PermitNo,this.RequestedDate,this.RequestedWindow,this.Status,this.ConfirmationNo,this.Outcome,this.CreatedBy,this.CreatedAt,this.UpdatedAt}); InspectionRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { InspectionRequestID = json['InspectionRequestID']; InspectionID = json['InspectionID']; Agency = json['Agency']; ContactName = json['ContactName']; ContactPhone = json['ContactPhone']; PermitNo = json['PermitNo']; RequestedDate = JsonConverters.fromJson(json['RequestedDate'],'DateTime',context!); RequestedWindow = json['RequestedWindow']; Status = json['Status']; ConfirmationNo = json['ConfirmationNo']; Outcome = json['Outcome']; CreatedBy = json['CreatedBy']; CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!); UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!); return this; } Map toJson() => { 'InspectionRequestID': InspectionRequestID, 'InspectionID': InspectionID, 'Agency': Agency, 'ContactName': ContactName, 'ContactPhone': ContactPhone, 'PermitNo': PermitNo, 'RequestedDate': JsonConverters.toJson(RequestedDate,'DateTime',context!), 'RequestedWindow': RequestedWindow, 'Status': Status, 'ConfirmationNo': ConfirmationNo, 'Outcome': Outcome, 'CreatedBy': CreatedBy, 'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!), 'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!) }; getTypeName() => "InspectionRequest"; TypeContext? context = _ctx; } class SignatureRecord implements IConvertible { int? SignatureRecordID; String? EntityType; int? EntityID; String? Role; String? SignerName; int? SignerContactID; String? SignerUserId; String? Method; String? ImageAttachmentId; String? ImageUrl; String? ImageHash; String? DocumentHash; String? ConsentText; String? IpAddress; String? UserAgent; DateTime? SignedAt; SignatureRecord({this.SignatureRecordID,this.EntityType,this.EntityID,this.Role,this.SignerName,this.SignerContactID,this.SignerUserId,this.Method,this.ImageAttachmentId,this.ImageUrl,this.ImageHash,this.DocumentHash,this.ConsentText,this.IpAddress,this.UserAgent,this.SignedAt}); SignatureRecord.fromJson(Map json) { fromMap(json); } fromMap(Map json) { SignatureRecordID = json['SignatureRecordID']; EntityType = json['EntityType']; EntityID = json['EntityID']; Role = json['Role']; SignerName = json['SignerName']; SignerContactID = json['SignerContactID']; SignerUserId = json['SignerUserId']; Method = json['Method']; ImageAttachmentId = json['ImageAttachmentId']; ImageUrl = json['ImageUrl']; ImageHash = json['ImageHash']; DocumentHash = json['DocumentHash']; ConsentText = json['ConsentText']; IpAddress = json['IpAddress']; UserAgent = json['UserAgent']; SignedAt = JsonConverters.fromJson(json['SignedAt'],'DateTime',context!); return this; } Map toJson() => { 'SignatureRecordID': SignatureRecordID, 'EntityType': EntityType, 'EntityID': EntityID, 'Role': Role, 'SignerName': SignerName, 'SignerContactID': SignerContactID, 'SignerUserId': SignerUserId, 'Method': Method, 'ImageAttachmentId': ImageAttachmentId, 'ImageUrl': ImageUrl, 'ImageHash': ImageHash, 'DocumentHash': DocumentHash, 'ConsentText': ConsentText, 'IpAddress': IpAddress, 'UserAgent': UserAgent, 'SignedAt': JsonConverters.toJson(SignedAt,'DateTime',context!) }; getTypeName() => "SignatureRecord"; TypeContext? context = _ctx; } class Inspection implements IConvertible { int? InspectionID; String? InspectionUID; int? ProjectID; String? ProjectName; int? JobID; String? JobName; String? InspectionNo; String? Type; String? Title; String? Status; String? TemplateUID; int? TemplateVersionNo; DateTime? ScheduledFor; DateTime? StartedAt; DateTime? CompletedAt; DateTime? ClosedAt; int? InspectorContactID; String? InspectorName; String? AgencyName; String? PermitNo; String? LocationText; String? Notes; String? WeatherJson; int? ItemsTotal; int? ItemsPassed; int? ItemsFailed; String? Outcome; String? OutcomeNotes; int? ReinspectionOfInspectionID; int? QcHoldPointID; String? ReportAttachmentId; int? RequestCount; int? SignatureCount; String? CreatedBy; DateTime? CreatedAt; DateTime? UpdatedAt; List? Items = []; List? Requests = []; List? Signatures = []; List? Actions = []; Inspection({this.InspectionID,this.InspectionUID,this.ProjectID,this.ProjectName,this.JobID,this.JobName,this.InspectionNo,this.Type,this.Title,this.Status,this.TemplateUID,this.TemplateVersionNo,this.ScheduledFor,this.StartedAt,this.CompletedAt,this.ClosedAt,this.InspectorContactID,this.InspectorName,this.AgencyName,this.PermitNo,this.LocationText,this.Notes,this.WeatherJson,this.ItemsTotal,this.ItemsPassed,this.ItemsFailed,this.Outcome,this.OutcomeNotes,this.ReinspectionOfInspectionID,this.QcHoldPointID,this.ReportAttachmentId,this.RequestCount,this.SignatureCount,this.CreatedBy,this.CreatedAt,this.UpdatedAt,this.Items,this.Requests,this.Signatures,this.Actions}); Inspection.fromJson(Map json) { fromMap(json); } fromMap(Map json) { InspectionID = json['InspectionID']; InspectionUID = json['InspectionUID']; ProjectID = json['ProjectID']; ProjectName = json['ProjectName']; JobID = json['JobID']; JobName = json['JobName']; InspectionNo = json['InspectionNo']; Type = json['Type']; Title = json['Title']; Status = json['Status']; TemplateUID = json['TemplateUID']; TemplateVersionNo = json['TemplateVersionNo']; ScheduledFor = JsonConverters.fromJson(json['ScheduledFor'],'DateTime',context!); StartedAt = JsonConverters.fromJson(json['StartedAt'],'DateTime',context!); CompletedAt = JsonConverters.fromJson(json['CompletedAt'],'DateTime',context!); ClosedAt = JsonConverters.fromJson(json['ClosedAt'],'DateTime',context!); InspectorContactID = json['InspectorContactID']; InspectorName = json['InspectorName']; AgencyName = json['AgencyName']; PermitNo = json['PermitNo']; LocationText = json['LocationText']; Notes = json['Notes']; WeatherJson = json['WeatherJson']; ItemsTotal = json['ItemsTotal']; ItemsPassed = json['ItemsPassed']; ItemsFailed = json['ItemsFailed']; Outcome = json['Outcome']; OutcomeNotes = json['OutcomeNotes']; ReinspectionOfInspectionID = json['ReinspectionOfInspectionID']; QcHoldPointID = json['QcHoldPointID']; ReportAttachmentId = json['ReportAttachmentId']; RequestCount = json['RequestCount']; SignatureCount = json['SignatureCount']; CreatedBy = json['CreatedBy']; CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!); UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!); Items = JsonConverters.fromJson(json['Items'],'List',context!); Requests = JsonConverters.fromJson(json['Requests'],'List',context!); Signatures = JsonConverters.fromJson(json['Signatures'],'List',context!); Actions = JsonConverters.fromJson(json['Actions'],'List',context!); return this; } Map toJson() => { 'InspectionID': InspectionID, 'InspectionUID': InspectionUID, 'ProjectID': ProjectID, 'ProjectName': ProjectName, 'JobID': JobID, 'JobName': JobName, 'InspectionNo': InspectionNo, 'Type': Type, 'Title': Title, 'Status': Status, 'TemplateUID': TemplateUID, 'TemplateVersionNo': TemplateVersionNo, 'ScheduledFor': JsonConverters.toJson(ScheduledFor,'DateTime',context!), 'StartedAt': JsonConverters.toJson(StartedAt,'DateTime',context!), 'CompletedAt': JsonConverters.toJson(CompletedAt,'DateTime',context!), 'ClosedAt': JsonConverters.toJson(ClosedAt,'DateTime',context!), 'InspectorContactID': InspectorContactID, 'InspectorName': InspectorName, 'AgencyName': AgencyName, 'PermitNo': PermitNo, 'LocationText': LocationText, 'Notes': Notes, 'WeatherJson': WeatherJson, 'ItemsTotal': ItemsTotal, 'ItemsPassed': ItemsPassed, 'ItemsFailed': ItemsFailed, 'Outcome': Outcome, 'OutcomeNotes': OutcomeNotes, 'ReinspectionOfInspectionID': ReinspectionOfInspectionID, 'QcHoldPointID': QcHoldPointID, 'ReportAttachmentId': ReportAttachmentId, 'RequestCount': RequestCount, 'SignatureCount': SignatureCount, 'CreatedBy': CreatedBy, 'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!), 'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!), 'Items': JsonConverters.toJson(Items,'List',context!), 'Requests': JsonConverters.toJson(Requests,'List',context!), 'Signatures': JsonConverters.toJson(Signatures,'List',context!), 'Actions': JsonConverters.toJson(Actions,'List',context!) }; getTypeName() => "Inspection"; TypeContext? context = _ctx; } class InspectionSummary implements IConvertible { int? Total; int? DueToday; int? Overdue; int? InProgress; int? Failed; int? Conditional; int? PassedOpen; int? Closed; int? Completed30d; int? Passed30d; String? Headline; InspectionSummary({this.Total,this.DueToday,this.Overdue,this.InProgress,this.Failed,this.Conditional,this.PassedOpen,this.Closed,this.Completed30d,this.Passed30d,this.Headline}); InspectionSummary.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Total = json['Total']; DueToday = json['DueToday']; Overdue = json['Overdue']; InProgress = json['InProgress']; Failed = json['Failed']; Conditional = json['Conditional']; PassedOpen = json['PassedOpen']; Closed = json['Closed']; Completed30d = json['Completed30d']; Passed30d = json['Passed30d']; Headline = json['Headline']; return this; } Map toJson() => { 'Total': Total, 'DueToday': DueToday, 'Overdue': Overdue, 'InProgress': InProgress, 'Failed': Failed, 'Conditional': Conditional, 'PassedOpen': PassedOpen, 'Closed': Closed, 'Completed30d': Completed30d, 'Passed30d': Passed30d, 'Headline': Headline }; getTypeName() => "InspectionSummary"; TypeContext? context = _ctx; } class InspectionListResponse implements IConvertible { ResponseStatus? ResponseStatus; List? Inspections = []; InspectionSummary? Summary; InspectionListResponse({this.ResponseStatus,this.Inspections,this.Summary}); InspectionListResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); Inspections = JsonConverters.fromJson(json['Inspections'],'List',context!); Summary = JsonConverters.fromJson(json['Summary'],'InspectionSummary',context!); return this; } Map toJson() => { 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!), 'Inspections': JsonConverters.toJson(Inspections,'List',context!), 'Summary': JsonConverters.toJson(Summary,'InspectionSummary',context!) }; getTypeName() => "InspectionListResponse"; TypeContext? context = _ctx; } // @Route("/v1/inspections/due", "GET,OPTIONS") class InspectionDueRequest implements IReturn, IConvertible, IGet { int? ProjectID; InspectionDueRequest({this.ProjectID}); InspectionDueRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ProjectID = json['ProjectID']; return this; } Map toJson() => { 'ProjectID': ProjectID }; createResponse() => InspectionListResponse(); getResponseTypeName() => "InspectionListResponse"; getTypeName() => "InspectionDueRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: { 'InspectionPhoto': TypeInfo(TypeOf.Class, create:() => InspectionPhoto()), 'InspectionItem': TypeInfo(TypeOf.Class, create:() => InspectionItem()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'InspectionRequest': TypeInfo(TypeOf.Class, create:() => InspectionRequest()), 'SignatureRecord': TypeInfo(TypeOf.Class, create:() => SignatureRecord()), 'Inspection': TypeInfo(TypeOf.Class, create:() => Inspection()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'InspectionSummary': TypeInfo(TypeOf.Class, create:() => InspectionSummary()), 'InspectionListResponse': TypeInfo(TypeOf.Class, create:() => InspectionListResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'InspectionDueRequest': TypeInfo(TypeOf.Class, create:() => InspectionDueRequest()), });