/* Options: Date: 2025-03-15 03:53:16 Version: 8.30 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.sanctionssearch.com/v2 //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetClients.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; // @DataContract class Authentication implements IConvertible { /** * The API User ID provided by us when you signed up to use our API */ // @DataMember // @ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body") String? apiUserId; /** * The API User Key provided by us when you signed up to use our API */ // @DataMember // @ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body") String? apiUserKey; Authentication({this.apiUserId,this.apiUserKey}); Authentication.fromJson(Map json) { fromMap(json); } fromMap(Map json) { apiUserId = json['apiUserId']; apiUserKey = json['apiUserKey']; return this; } Map toJson() => { 'apiUserId': apiUserId, 'apiUserKey': apiUserKey }; getTypeName() => "Authentication"; TypeContext? context = _ctx; } // @DataContract class BaseRequest implements IBaseRequest, IConvertible { /** * The authentication credentials */ // @DataMember // @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body") Authentication? authentication; BaseRequest({this.authentication}); BaseRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { authentication = JsonConverters.fromJson(json['authentication'],'Authentication',context!); return this; } Map toJson() => { 'authentication': JsonConverters.toJson(authentication,'Authentication',context!) }; getTypeName() => "BaseRequest"; TypeContext? context = _ctx; } abstract class IBaseRequest { Authentication? authentication; } // @DataContract(Name="ClientState", Namespace="http://schemas.servicestack.net/types") enum ClientState { Undefined, PendingCompletion, PendingOcr, PendingVerification, Verified, } // @DataContract class PagedRequest extends BaseRequest implements IConvertible { /** * The maximum number of records to be returned in one page */ // @DataMember(Name="page[limit]") // @ApiMember(Description="The maximum number of records to be returned in one page", ParameterType="query") int? page_limit_; /** * The starting point in the list of records from where the data should be fetched. Zero based index. */ // @DataMember(Name="page[offset]") // @ApiMember(Description="The starting point in the list of records from where the data should be fetched. Zero based index.", ParameterType="query") int? page_offset_; /** * The term to determine the order in which the data is returned */ // @DataMember // @ApiMember(Description="The term to determine the order in which the data is returned", ParameterType="query") String? sort; PagedRequest({this.page_limit_,this.page_offset_,this.sort}); PagedRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); page_limit_ = json['pageLimit']; page_offset_ = json['pageOffset']; sort = json['sort']; return this; } Map toJson() => super.toJson()..addAll({ 'page_limit_': page_limit_, 'page_offset_': page_offset_, 'sort': sort }); getTypeName() => "PagedRequest"; TypeContext? context = _ctx; } class BaseResponse implements IBaseDataResponse, IHasResponseStatus, IConvertible { /** * The status of the response */ // @ApiMember(Description="The status of the response") ResponseStatus? responseStatus; BaseResponse({this.responseStatus}); BaseResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "BaseResponse"; TypeContext? context = _ctx; } class PagedResponse extends BaseResponse implements IConvertible { /** * The response Metadata */ // @ApiMember(Description="The response Metadata") Meta? meta; PagedResponse({this.meta}); PagedResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); meta = JsonConverters.fromJson(json['meta'],'Meta<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!); return this; } Map toJson() => super.toJson()..addAll({ 'meta': JsonConverters.toJson(meta,'Meta',context!) }); getTypeName() => "PagedResponse<$T>"; TypeContext? context = _ctx; } class Links implements IConvertible { // @apiMember() String? self; Links({this.self}); Links.fromJson(Map json) { fromMap(json); } fromMap(Map json) { self = json['self']; return this; } Map toJson() => { 'self': self }; getTypeName() => "Links"; TypeContext? context = _ctx; } class Image implements IConvertible { int? id; String? name; int? ocrId; String? url; Image({this.id,this.name,this.ocrId,this.url}); Image.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; ocrId = json['ocrId']; url = json['url']; return this; } Map toJson() => { 'id': id, 'name': name, 'ocrId': ocrId, 'url': url }; getTypeName() => "Image"; TypeContext? context = _ctx; } class ClientShort implements IConvertible { int? id; DateTime? dateCreated; String? name; String? reference; bool? isValidateMe; ClientState? state; Links? links; int? numOfDocuments; Image? photo; ClientShort({this.id,this.dateCreated,this.name,this.reference,this.isValidateMe,this.state,this.links,this.numOfDocuments,this.photo}); ClientShort.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; dateCreated = JsonConverters.fromJson(json['dateCreated'],'DateTime',context!); name = json['name']; reference = json['reference']; isValidateMe = json['isValidateMe']; state = JsonConverters.fromJson(json['state'],'ClientState',context!); links = JsonConverters.fromJson(json['links'],'Links',context!); numOfDocuments = json['numOfDocuments']; photo = JsonConverters.fromJson(json['photo'],'Image',context!); return this; } Map toJson() => { 'id': id, 'dateCreated': JsonConverters.toJson(dateCreated,'DateTime',context!), 'name': name, 'reference': reference, 'isValidateMe': isValidateMe, 'state': JsonConverters.toJson(state,'ClientState',context!), 'links': JsonConverters.toJson(links,'Links',context!), 'numOfDocuments': numOfDocuments, 'photo': JsonConverters.toJson(photo,'Image',context!) }; getTypeName() => "ClientShort"; TypeContext? context = _ctx; } class ArrayOfClientShort extends ListBase implements IConvertible { final List l = []; set length(int newLength) { l.length = newLength; } int get length => l.length; ClientShort operator [](int index) => l[index]; void operator []=(int index, ClientShort value) { l[index] = value; } ArrayOfClientShort(); ArrayOfClientShort.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "ArrayOfClientShort"; TypeContext? context = _ctx; } class GetClientsData extends PagedResponse implements IConvertible { ArrayOfClientShort? clients; GetClientsData({this.clients}); GetClientsData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); clients = JsonConverters.fromJson(json['clients'],'ArrayOfClientShort',context!); return this; } Map toJson() => super.toJson()..addAll({ 'clients': JsonConverters.toJson(clients,'ArrayOfClientShort',context!) }); getTypeName() => "GetClientsData"; TypeContext? context = _ctx; } // @DataContract class GetClientsResponse implements IConvertible { // @DataMember GetClientsData? data; GetClientsResponse({this.data}); GetClientsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { data = JsonConverters.fromJson(json['data'],'GetClientsData',context!); return this; } Map toJson() => { 'data': JsonConverters.toJson(data,'GetClientsData',context!) }; getTypeName() => "GetClientsResponse"; TypeContext? context = _ctx; } // @Route("/clients", "GET") // @DataContract class GetClients extends PagedRequest implements IReturn, IConvertible, IGet { /** * Filter the results to those that have a State matching the state specified */ // @DataMember // @ApiMember(Description="Filter the results to those that have a State matching the state specified", ParameterType="query") ClientState? state; /** * Filter the results to those that have a IsValidateMe flag matching the specified value */ // @DataMember // @ApiMember(Description="Filter the results to those that have a IsValidateMe flag matching the specified value", ParameterType="query") bool? isValidateMe; /** * Filter the results to those that have a Name including the specified value */ // @DataMember // @ApiMember(Description="Filter the results to those that have a Name including the specified value", ParameterType="query") String? name; /** * Filter the results to those that were created after (or on) this date */ // @DataMember // @ApiMember(Description="Filter the results to those that were created after (or on) this date", ParameterType="query") DateTime? dateFrom; /** * Filter the results to those that were created before this date */ // @DataMember // @ApiMember(Description="Filter the results to those that were created before this date", ParameterType="query") DateTime? dateTo; /** * If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view */ // @DataMember // @ApiMember(Description="If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view", ParameterType="query") String? subUserName; GetClients({this.state,this.isValidateMe,this.name,this.dateFrom,this.dateTo,this.subUserName}); GetClients.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); state = JsonConverters.fromJson(json['state'],'ClientState',context!); isValidateMe = json['isValidateMe']; name = json['name']; dateFrom = JsonConverters.fromJson(json['dateFrom'],'DateTime',context!); dateTo = JsonConverters.fromJson(json['dateTo'],'DateTime',context!); subUserName = json['subUserName']; return this; } Map toJson() => super.toJson()..addAll({ 'state': JsonConverters.toJson(state,'ClientState',context!), 'isValidateMe': isValidateMe, 'name': name, 'dateFrom': JsonConverters.toJson(dateFrom,'DateTime',context!), 'dateTo': JsonConverters.toJson(dateTo,'DateTime',context!), 'subUserName': subUserName }); createResponse() => GetClientsResponse(); getResponseTypeName() => "GetClientsResponse"; getTypeName() => "GetClients"; TypeContext? context = _ctx; } abstract class IBaseDataResponse { ResponseStatus? responseStatus; } abstract class IHasResponseStatus { ResponseStatus? responseStatus; } class MetaLinks extends Links implements IConvertible { /** * The link to the first page of records */ // @ApiMember(Description="The link to the first page of records") String? first; /** * The link to the last page of records */ // @ApiMember(Description="The link to the last page of records") String? last; /** * The link to the next page of records, if applicable */ // @ApiMember(Description="The link to the next page of records, if applicable") String? next; /** * The link to the last page of records, if applicable */ // @ApiMember(Description="The link to the last page of records, if applicable") String? prev; MetaLinks({this.first,this.last,this.next,this.prev}); MetaLinks.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); first = json['first']; last = json['last']; next = json['next']; prev = json['prev']; return this; } Map toJson() => super.toJson()..addAll({ 'first': first, 'last': last, 'next': next, 'prev': prev }); getTypeName() => "MetaLinks"; TypeContext? context = _ctx; } class Meta implements IConvertible { /** * Pagination links */ // @ApiMember(Description="Pagination links") MetaLinks? links; /** * The total number of records for the query */ // @ApiMember(Description="The total number of records for the query") int? totalCount; /** * The maximum number of records to be returned in one page */ // @ApiMember(Description="The maximum number of records to be returned in one page") int? pageLimit; /** * The starting point in the list of records from where the data should be fetched. Zero based index. */ // @ApiMember(Description="The starting point in the list of records from where the data should be fetched. Zero based index.") int? pageOffset; Meta({this.links,this.totalCount,this.pageLimit,this.pageOffset}); Meta.fromJson(Map json) { fromMap(json); } fromMap(Map json) { links = JsonConverters.fromJson(json['links'],'MetaLinks',context!); totalCount = json['totalCount']; pageLimit = json['pageLimit']; pageOffset = json['pageOffset']; return this; } Map toJson() => { 'links': JsonConverters.toJson(links,'MetaLinks',context!), 'totalCount': totalCount, 'pageLimit': pageLimit, 'pageOffset': pageOffset }; getTypeName() => "Meta<$T>"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.sanctionssearch.com', types: { 'Authentication': TypeInfo(TypeOf.Class, create:() => Authentication()), 'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()), 'IBaseRequest': TypeInfo(TypeOf.Interface), 'ClientState': TypeInfo(TypeOf.Enum, enumValues:ClientState.values), 'PagedRequest': TypeInfo(TypeOf.Class, create:() => PagedRequest()), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'PagedResponse': TypeInfo(TypeOf.Class, create:() => PagedResponse()), 'Links': TypeInfo(TypeOf.Class, create:() => Links()), 'Image': TypeInfo(TypeOf.Class, create:() => Image()), 'ClientShort': TypeInfo(TypeOf.Class, create:() => ClientShort()), 'ArrayOfClientShort': TypeInfo(TypeOf.Class, create:() => ArrayOfClientShort()), 'GetClientsData': TypeInfo(TypeOf.Class, create:() => GetClientsData()), 'GetClientsResponse': TypeInfo(TypeOf.Class, create:() => GetClientsResponse()), 'GetClients': TypeInfo(TypeOf.Class, create:() => GetClients()), 'IBaseDataResponse': TypeInfo(TypeOf.Interface), 'IHasResponseStatus': TypeInfo(TypeOf.Interface), 'MetaLinks': TypeInfo(TypeOf.Class, create:() => MetaLinks()), 'Meta': TypeInfo(TypeOf.Class, create:() => Meta()), });