tvpl.api

<back to all web services

MergeFileRequest

Requires Authentication
The following routes are available for this service:
POST/merge-file
import 'package:servicestack/servicestack.dart';

class TemplateDefinitionDto implements IConvertible
{
    int? id;
    int? documentId;
    String? title;
    String? description;
    bool? isActive;

    TemplateDefinitionDto({this.id,this.documentId,this.title,this.description,this.isActive});
    TemplateDefinitionDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        documentId = json['documentId'];
        title = json['title'];
        description = json['description'];
        isActive = json['isActive'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'documentId': documentId,
        'title': title,
        'description': description,
        'isActive': isActive
    };

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

class ElementInputDto implements IConvertible
{
    dynamic? value;
    String? dataType;

    ElementInputDto({this.value,this.dataType});
    ElementInputDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class MergeFileRequest implements IConvertible
{
    int? workflowId;
    TemplateDefinitionDto? template;
    Map<String,ElementInputDto?>? elements;

    MergeFileRequest({this.workflowId,this.template,this.elements});
    MergeFileRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        workflowId = json['workflowId'];
        template = JsonConverters.fromJson(json['template'],'TemplateDefinitionDto',context!);
        elements = JsonConverters.fromJson(json['elements'],'Map<String,ElementInputDto?>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'workflowId': workflowId,
        'template': JsonConverters.toJson(template,'TemplateDefinitionDto',context!),
        'elements': JsonConverters.toJson(elements,'Map<String,ElementInputDto?>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'TemplateDefinitionDto': TypeInfo(TypeOf.Class, create:() => TemplateDefinitionDto()),
    'ElementInputDto': TypeInfo(TypeOf.Class, create:() => ElementInputDto()),
    'MergeFileRequest': TypeInfo(TypeOf.Class, create:() => MergeFileRequest()),
    'Map<String,ElementInputDto?>': TypeInfo(TypeOf.Class, create:() => Map<String,ElementInputDto?>()),
});

Dart MergeFileRequest 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 /merge-file HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	workflowId: 0,
	template: 
	{
		id: 0,
		documentId: 0,
		title: String,
		description: String,
		isActive: False
	},
	elements: 
	{
		String: 
		{
			value: {},
			dataType: String
		}
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}