Portal

<back to all web services

BrowseAllContract

Requires Authentication
The following routes are available for this service:
POST/user/{userid}/allcontracts
import 'package:servicestack/servicestack.dart';

class GridSortDirection
{
    static const GridSortDirection None = const GridSortDirection._(0);
    static const GridSortDirection Asc = const GridSortDirection._(1);
    static const GridSortDirection Desc = const GridSortDirection._(2);

    final int _value;
    const GridSortDirection._(this._value);
    int get value => _value;
    static List<GridSortDirection> get values => const [None,Asc,Desc];
}

class GridViewColumnState implements IConvertible
{
    String? FieldName;
    GridSortDirection? SortDirection;

    GridViewColumnState({this.FieldName,this.SortDirection});
    GridViewColumnState.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        FieldName = json['FieldName'];
        SortDirection = JsonConverters.fromJson(json['SortDirection'],'GridSortDirection',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'FieldName': FieldName,
        'SortDirection': JsonConverters.toJson(SortDirection,'GridSortDirection',context!)
    };

    getTypeName() => "GridViewColumnState";
    TypeContext? context = _ctx;
}

class FilterOperator
{
    static const FilterOperator NotSet = const FilterOperator._(0);
    static const FilterOperator Equal = const FilterOperator._(1);
    static const FilterOperator Greater = const FilterOperator._(2);
    static const FilterOperator Less = const FilterOperator._(3);
    static const FilterOperator GreaterOrEqual = const FilterOperator._(4);
    static const FilterOperator LessOrEqual = const FilterOperator._(5);
    static const FilterOperator NotEqual = const FilterOperator._(6);
    static const FilterOperator IsNull = const FilterOperator._(7);
    static const FilterOperator IsNotNull = const FilterOperator._(8);
    static const FilterOperator Like = const FilterOperator._(9);
    static const FilterOperator NotLike = const FilterOperator._(10);
    static const FilterOperator Begins = const FilterOperator._(11);
    static const FilterOperator Ends = const FilterOperator._(12);
    static const FilterOperator In = const FilterOperator._(13);
    static const FilterOperator Between = const FilterOperator._(14);

    final int _value;
    const FilterOperator._(this._value);
    int get value => _value;
    static List<FilterOperator> get values => const [NotSet,Equal,Greater,Less,GreaterOrEqual,LessOrEqual,NotEqual,IsNull,IsNotNull,Like,NotLike,Begins,Ends,In,Between];
}

class GridViewColumnFilter implements IConvertible
{
    String? FieldName;
    String? FilterValue;
    FilterOperator? Operator;

    GridViewColumnFilter({this.FieldName,this.FilterValue,this.Operator});
    GridViewColumnFilter.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        FieldName = json['FieldName'];
        FilterValue = json['FilterValue'];
        Operator = JsonConverters.fromJson(json['Operator'],'FilterOperator',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'FieldName': FieldName,
        'FilterValue': FilterValue,
        'Operator': JsonConverters.toJson(Operator,'FilterOperator',context!)
    };

    getTypeName() => "GridViewColumnFilter";
    TypeContext? context = _ctx;
}

class GridViewPagerState implements IConvertible
{
    int? SkipRowCount;
    int? PageRowCount;

    GridViewPagerState({this.SkipRowCount,this.PageRowCount});
    GridViewPagerState.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SkipRowCount = json['SkipRowCount'];
        PageRowCount = json['PageRowCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SkipRowCount': SkipRowCount,
        'PageRowCount': PageRowCount
    };

    getTypeName() => "GridViewPagerState";
    TypeContext? context = _ctx;
}

class GridViewState implements IConvertible
{
    GridViewColumnState? ColumnState;
    List<GridViewColumnFilter>? ColumnFilters;
    GridViewPagerState? PagerState;
    bool? IsReturnCount;

    GridViewState({this.ColumnState,this.ColumnFilters,this.PagerState,this.IsReturnCount});
    GridViewState.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ColumnState = JsonConverters.fromJson(json['ColumnState'],'GridViewColumnState',context!);
        ColumnFilters = JsonConverters.fromJson(json['ColumnFilters'],'List<GridViewColumnFilter>',context!);
        PagerState = JsonConverters.fromJson(json['PagerState'],'GridViewPagerState',context!);
        IsReturnCount = json['IsReturnCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ColumnState': JsonConverters.toJson(ColumnState,'GridViewColumnState',context!),
        'ColumnFilters': JsonConverters.toJson(ColumnFilters,'List<GridViewColumnFilter>',context!),
        'PagerState': JsonConverters.toJson(PagerState,'GridViewPagerState',context!),
        'IsReturnCount': IsReturnCount
    };

    getTypeName() => "GridViewState";
    TypeContext? context = _ctx;
}

abstract class PaginationRequestBase implements IGridView
{
    GridViewState? GridViewState;

    PaginationRequestBase({this.GridViewState});
    PaginationRequestBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        GridViewState = JsonConverters.fromJson(json['GridViewState'],'GridViewState',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'GridViewState': JsonConverters.toJson(GridViewState,'GridViewState',context!)
    };

    getTypeName() => "PaginationRequestBase";
    TypeContext? context = _ctx;
}

class BrowseAllContract extends PaginationRequestBase implements IPost, IConvertible
{
    int? UserId;

    BrowseAllContract({this.UserId});
    BrowseAllContract.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        UserId = json['UserId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'UserId': UserId
    });

    getTypeName() => "BrowseAllContract";
    TypeContext? context = _ctx;
}

abstract class ResponseBase
{
    ResponseStatus? ResponseStatus;

    ResponseBase({this.ResponseStatus});
    ResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "ResponseBase";
    TypeContext? context = _ctx;
}

class ProcedureType
{
    static const ProcedureType Competition = const ProcedureType._(0);
    static const ProcedureType Simplified = const ProcedureType._(1);

    final int _value;
    const ProcedureType._(this._value);
    int get value => _value;
    static List<ProcedureType> get values => const [Competition,Simplified];
}

class TenderType
{
    static const TenderType Private = const TenderType._(0);
    static const TenderType Public = const TenderType._(1);

    final int _value;
    const TenderType._(this._value);
    int get value => _value;
    static List<TenderType> get values => const [Private,Public];
}

class TenderStatus
{
    static const TenderStatus FirstRound = const TenderStatus._(0);
    static const TenderStatus SecondRound = const TenderStatus._(1);
    static const TenderStatus ThirdRound = const TenderStatus._(2);
    static const TenderStatus Successful = const TenderStatus._(3);
    static const TenderStatus UnSuccessful = const TenderStatus._(4);
    static const TenderStatus Revoked = const TenderStatus._(5);

    final int _value;
    const TenderStatus._(this._value);
    int get value => _value;
    static List<TenderStatus> get values => const [FirstRound,SecondRound,ThirdRound,Successful,UnSuccessful,Revoked];
}

class TenderSimple implements IConvertible
{
    int? TenderId;
    String? TenderIdentifier;
    ProcedureType? ProcedureType;
    String? Subject;
    String? TenderRoundName;
    String? SectionName;
    DateTime? Deadline;
    TenderType? TenderType;
    TenderStatus? TenderStatus;
    bool? IsUnderPublish;
    DateTime? PublishStartDateTime;
    DateTime? PublishEndDateTime;
    int? PublishedById;
    bool? IsProcurementEnabled;
    bool? IsComplianceEnabled;

    TenderSimple({this.TenderId,this.TenderIdentifier,this.ProcedureType,this.Subject,this.TenderRoundName,this.SectionName,this.Deadline,this.TenderType,this.TenderStatus,this.IsUnderPublish,this.PublishStartDateTime,this.PublishEndDateTime,this.PublishedById,this.IsProcurementEnabled,this.IsComplianceEnabled});
    TenderSimple.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TenderId = json['TenderId'];
        TenderIdentifier = json['TenderIdentifier'];
        ProcedureType = JsonConverters.fromJson(json['ProcedureType'],'ProcedureType',context!);
        Subject = json['Subject'];
        TenderRoundName = json['TenderRoundName'];
        SectionName = json['SectionName'];
        Deadline = JsonConverters.fromJson(json['Deadline'],'DateTime',context!);
        TenderType = JsonConverters.fromJson(json['TenderType'],'TenderType',context!);
        TenderStatus = JsonConverters.fromJson(json['TenderStatus'],'TenderStatus',context!);
        IsUnderPublish = json['IsUnderPublish'];
        PublishStartDateTime = JsonConverters.fromJson(json['PublishStartDateTime'],'DateTime',context!);
        PublishEndDateTime = JsonConverters.fromJson(json['PublishEndDateTime'],'DateTime',context!);
        PublishedById = json['PublishedById'];
        IsProcurementEnabled = json['IsProcurementEnabled'];
        IsComplianceEnabled = json['IsComplianceEnabled'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TenderId': TenderId,
        'TenderIdentifier': TenderIdentifier,
        'ProcedureType': JsonConverters.toJson(ProcedureType,'ProcedureType',context!),
        'Subject': Subject,
        'TenderRoundName': TenderRoundName,
        'SectionName': SectionName,
        'Deadline': JsonConverters.toJson(Deadline,'DateTime',context!),
        'TenderType': JsonConverters.toJson(TenderType,'TenderType',context!),
        'TenderStatus': JsonConverters.toJson(TenderStatus,'TenderStatus',context!),
        'IsUnderPublish': IsUnderPublish,
        'PublishStartDateTime': JsonConverters.toJson(PublishStartDateTime,'DateTime',context!),
        'PublishEndDateTime': JsonConverters.toJson(PublishEndDateTime,'DateTime',context!),
        'PublishedById': PublishedById,
        'IsProcurementEnabled': IsProcurementEnabled,
        'IsComplianceEnabled': IsComplianceEnabled
    };

    getTypeName() => "TenderSimple";
    TypeContext? context = _ctx;
}

class PaginationResponse<TenderSimple> extends ResponseBase implements IConvertible
{
    PaginationResult<TenderSimple>? Result;

    PaginationResponse({this.Result});
    PaginationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Result = JsonConverters.fromJson(json['Result'],'PaginationResult<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Result': JsonConverters.toJson(Result,'PaginationResult<TenderSimple>',context!)
    });

    getTypeName() => "PaginationResponse<$TenderSimple>";
    TypeContext? context = _ctx;
}

class PaginationResult<TModel> implements IConvertible
{
    int? TotalRowCount;
    List<TModel>? Items;

    PaginationResult({this.TotalRowCount,this.Items});
    PaginationResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TotalRowCount = json['TotalRowCount'];
        Items = JsonConverters.fromJson(json['Items'],'List<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TotalRowCount': TotalRowCount,
        'Items': JsonConverters.toJson(Items,'List<TModel>',context!)
    };

    getTypeName() => "PaginationResult<$TModel>";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
    'GridSortDirection': TypeInfo(TypeOf.Enum, enumValues:GridSortDirection.values),
    'GridViewColumnState': TypeInfo(TypeOf.Class, create:() => GridViewColumnState()),
    'FilterOperator': TypeInfo(TypeOf.Enum, enumValues:FilterOperator.values),
    'GridViewColumnFilter': TypeInfo(TypeOf.Class, create:() => GridViewColumnFilter()),
    'GridViewPagerState': TypeInfo(TypeOf.Class, create:() => GridViewPagerState()),
    'GridViewState': TypeInfo(TypeOf.Class, create:() => GridViewState()),
    'List<GridViewColumnFilter>': TypeInfo(TypeOf.Class, create:() => <GridViewColumnFilter>[]),
    'PaginationRequestBase': TypeInfo(TypeOf.AbstractClass),
    'BrowseAllContract': TypeInfo(TypeOf.Class, create:() => BrowseAllContract()),
    'ResponseBase': TypeInfo(TypeOf.AbstractClass),
    'ProcedureType': TypeInfo(TypeOf.Enum, enumValues:ProcedureType.values),
    'TenderType': TypeInfo(TypeOf.Enum, enumValues:TenderType.values),
    'TenderStatus': TypeInfo(TypeOf.Enum, enumValues:TenderStatus.values),
    'TenderSimple': TypeInfo(TypeOf.Class, create:() => TenderSimple()),
    'PaginationResponse<TenderSimple>': TypeInfo(TypeOf.Class, create:() => PaginationResponse<TenderSimple>()),
    'PaginationResult<TModel>': TypeInfo(TypeOf.Class, create:() => PaginationResult<TModel>()),
});

Dart BrowseAllContract DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /user/{userid}/allcontracts HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	UserId: 0,
	GridViewState: 
	{
		ColumnState: 
		{
			FieldName: String,
			SortDirection: 0
		},
		ColumnFilters: 
		[
			{
				FieldName: String,
				FilterValue: String,
				Operator: 0
			}
		],
		PagerState: 
		{
			SkipRowCount: 0,
			PageRowCount: 0
		},
		IsReturnCount: False
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Result: 
	{
		TotalRowCount: 0,
		Items: 
		[
			{
				Id: 0,
				TenderId: 0,
				UserId: 0,
				TenderUserId: 0,
				Buyer: String,
				Subject: String,
				TenderIdentifier: String,
				ContractIdentifier: String,
				Status: 0,
				ConfirmationDeadline: 0001-01-01,
				CancellationDateTime: 0001-01-01,
				IsCancelled: False
			}
		]
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}