/* Options: Date: 2026-02-08 18:45:00 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: DocumentSearchRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum DocumentSearchMode { Exact, Contains, StartsWith, EndsWith, } enum DocumentTermMode { All, Any, } class LineSearchResult implements IConvertible { String? LineText; int? PageNo; int? PageLineNo; int? DocLineNo; double? BoxTop; double? BoxLeft; double? BoxWidth; double? BoxHeight; LineSearchResult({this.LineText,this.PageNo,this.PageLineNo,this.DocLineNo,this.BoxTop,this.BoxLeft,this.BoxWidth,this.BoxHeight}); LineSearchResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { LineText = json['LineText']; PageNo = json['PageNo']; PageLineNo = json['PageLineNo']; DocLineNo = json['DocLineNo']; BoxTop = JsonConverters.toDouble(json['BoxTop']); BoxLeft = JsonConverters.toDouble(json['BoxLeft']); BoxWidth = JsonConverters.toDouble(json['BoxWidth']); BoxHeight = JsonConverters.toDouble(json['BoxHeight']); return this; } Map toJson() => { 'LineText': LineText, 'PageNo': PageNo, 'PageLineNo': PageLineNo, 'DocLineNo': DocLineNo, 'BoxTop': BoxTop, 'BoxLeft': BoxLeft, 'BoxWidth': BoxWidth, 'BoxHeight': BoxHeight }; getTypeName() => "LineSearchResult"; TypeContext? context = _ctx; } class DocumentSearchResult implements IConvertible { String? AttachmentId; DateTime? DateAdded; String? AttachmentName; String? Description; String? DocumentType; String? DocumentGroup; String? DropboxTableName; int? DropboxRecordId; String? AttachmentTableName; String? AttachmentFieldName; int? AttachmentRecordId; String? FilePath; String? OCRSource; String? OCRResult; List? Lines = []; DocumentSearchResult({this.AttachmentId,this.DateAdded,this.AttachmentName,this.Description,this.DocumentType,this.DocumentGroup,this.DropboxTableName,this.DropboxRecordId,this.AttachmentTableName,this.AttachmentFieldName,this.AttachmentRecordId,this.FilePath,this.OCRSource,this.OCRResult,this.Lines}); DocumentSearchResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { AttachmentId = json['AttachmentId']; DateAdded = JsonConverters.fromJson(json['DateAdded'],'DateTime',context!); AttachmentName = json['AttachmentName']; Description = json['Description']; DocumentType = json['DocumentType']; DocumentGroup = json['DocumentGroup']; DropboxTableName = json['DropboxTableName']; DropboxRecordId = json['DropboxRecordId']; AttachmentTableName = json['AttachmentTableName']; AttachmentFieldName = json['AttachmentFieldName']; AttachmentRecordId = json['AttachmentRecordId']; FilePath = json['FilePath']; OCRSource = json['OCRSource']; OCRResult = json['OCRResult']; Lines = JsonConverters.fromJson(json['Lines'],'List',context!); return this; } Map toJson() => { 'AttachmentId': AttachmentId, 'DateAdded': JsonConverters.toJson(DateAdded,'DateTime',context!), 'AttachmentName': AttachmentName, 'Description': Description, 'DocumentType': DocumentType, 'DocumentGroup': DocumentGroup, 'DropboxTableName': DropboxTableName, 'DropboxRecordId': DropboxRecordId, 'AttachmentTableName': AttachmentTableName, 'AttachmentFieldName': AttachmentFieldName, 'AttachmentRecordId': AttachmentRecordId, 'FilePath': FilePath, 'OCRSource': OCRSource, 'OCRResult': OCRResult, 'Lines': JsonConverters.toJson(Lines,'List',context!) }; getTypeName() => "DocumentSearchResult"; TypeContext? context = _ctx; } class DocumentSearchResponse implements IConvertible { int? DocumentSearchCount; List? DocumentSearchResults = []; ResponseStatus? ResponseStatus; DocumentSearchResponse({this.DocumentSearchCount,this.DocumentSearchResults,this.ResponseStatus}); DocumentSearchResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { DocumentSearchCount = json['DocumentSearchCount']; DocumentSearchResults = JsonConverters.fromJson(json['DocumentSearchResults'],'List',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'DocumentSearchCount': DocumentSearchCount, 'DocumentSearchResults': JsonConverters.toJson(DocumentSearchResults,'List',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "DocumentSearchResponse"; TypeContext? context = _ctx; } // @Route("/v1/DocumentSearch", "POST,OPTIONS") class DocumentSearchRequest implements IReturn, IConvertible, IPost { String? searchTerms; DocumentSearchMode? searchMode; DocumentTermMode? termMode; String? userId; DocumentSearchRequest({this.searchTerms,this.searchMode,this.termMode,this.userId}); DocumentSearchRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { searchTerms = json['searchTerms']; searchMode = JsonConverters.fromJson(json['searchMode'],'DocumentSearchMode',context!); termMode = JsonConverters.fromJson(json['termMode'],'DocumentTermMode',context!); userId = json['userId']; return this; } Map toJson() => { 'searchTerms': searchTerms, 'searchMode': JsonConverters.toJson(searchMode,'DocumentSearchMode',context!), 'termMode': JsonConverters.toJson(termMode,'DocumentTermMode',context!), 'userId': userId }; createResponse() => DocumentSearchResponse(); getResponseTypeName() => "DocumentSearchResponse"; getTypeName() => "DocumentSearchRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: { 'DocumentSearchMode': TypeInfo(TypeOf.Enum, enumValues:DocumentSearchMode.values), 'DocumentTermMode': TypeInfo(TypeOf.Enum, enumValues:DocumentTermMode.values), 'LineSearchResult': TypeInfo(TypeOf.Class, create:() => LineSearchResult()), 'DocumentSearchResult': TypeInfo(TypeOf.Class, create:() => DocumentSearchResult()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'DocumentSearchResponse': TypeInfo(TypeOf.Class, create:() => DocumentSearchResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'DocumentSearchRequest': TypeInfo(TypeOf.Class, create:() => DocumentSearchRequest()), });