DigiOffice Gateway Web Services

<back to all web services

AddDocumentByEmailMessageId

Requires Authentication
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

// @DataContract
class MetaDataField implements IConvertible
{
    // @DataMember
    String? ID;

    // @DataMember
    String? DocumentVeldID;

    // @DataMember
    String? Name;

    // @DataMember
    String? Label;

    // @DataMember
    String? Datatype;

    // @DataMember
    String? PrintLabel;

    // @DataMember
    String? Entity;

    // @DataMember
    String? PrintValue;

    // @DataMember
    String? RegistrationValue;

    // @DataMember
    String? SPSiteColumnName;

    // @DataMember
    String? ShadowName;

    // @DataMember
    String? ShadowDatatype;

    // @DataMember
    String? ShadowSPSiteColumnName;

    // @DataMember
    String? ShadowSPSiteColumnRegistrationValue;

    // @DataMember
    String? ShadowRegistrationValue;

    // @DataMember
    bool? IsKeyField;

    // @DataMember
    bool? KopierenBijNieuweVersie;

    MetaDataField({this.ID,this.DocumentVeldID,this.Name,this.Label,this.Datatype,this.PrintLabel,this.Entity,this.PrintValue,this.RegistrationValue,this.SPSiteColumnName,this.ShadowName,this.ShadowDatatype,this.ShadowSPSiteColumnName,this.ShadowSPSiteColumnRegistrationValue,this.ShadowRegistrationValue,this.IsKeyField,this.KopierenBijNieuweVersie});
    MetaDataField.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ID = json['ID'];
        DocumentVeldID = json['DocumentVeldID'];
        Name = json['Name'];
        Label = json['Label'];
        Datatype = json['Datatype'];
        PrintLabel = json['PrintLabel'];
        Entity = json['Entity'];
        PrintValue = json['PrintValue'];
        RegistrationValue = json['RegistrationValue'];
        SPSiteColumnName = json['SPSiteColumnName'];
        ShadowName = json['ShadowName'];
        ShadowDatatype = json['ShadowDatatype'];
        ShadowSPSiteColumnName = json['ShadowSPSiteColumnName'];
        ShadowSPSiteColumnRegistrationValue = json['ShadowSPSiteColumnRegistrationValue'];
        ShadowRegistrationValue = json['ShadowRegistrationValue'];
        IsKeyField = json['IsKeyField'];
        KopierenBijNieuweVersie = json['KopierenBijNieuweVersie'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ID': ID,
        'DocumentVeldID': DocumentVeldID,
        'Name': Name,
        'Label': Label,
        'Datatype': Datatype,
        'PrintLabel': PrintLabel,
        'Entity': Entity,
        'PrintValue': PrintValue,
        'RegistrationValue': RegistrationValue,
        'SPSiteColumnName': SPSiteColumnName,
        'ShadowName': ShadowName,
        'ShadowDatatype': ShadowDatatype,
        'ShadowSPSiteColumnName': ShadowSPSiteColumnName,
        'ShadowSPSiteColumnRegistrationValue': ShadowSPSiteColumnRegistrationValue,
        'ShadowRegistrationValue': ShadowRegistrationValue,
        'IsKeyField': IsKeyField,
        'KopierenBijNieuweVersie': KopierenBijNieuweVersie
    };

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

class Bookmark implements IConvertible
{
    bool? RemoveLastBreak;
    bool? ReplaceOnChange;
    bool? IsDynamic;

    Bookmark({this.RemoveLastBreak,this.ReplaceOnChange,this.IsDynamic});
    Bookmark.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RemoveLastBreak = json['RemoveLastBreak'];
        ReplaceOnChange = json['ReplaceOnChange'];
        IsDynamic = json['IsDynamic'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RemoveLastBreak': RemoveLastBreak,
        'ReplaceOnChange': ReplaceOnChange,
        'IsDynamic': IsDynamic
    };

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

class Mailings implements IConvertible
{
    Mailings();
    Mailings.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "Mailings";
    TypeContext? context = _ctx;
}

class AttachmentMailing implements IConvertible
{
    AttachmentMailing();
    AttachmentMailing.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "AttachmentMailing";
    TypeContext? context = _ctx;
}

abstract class IInformationMessages
{
}

class DocumentResponse implements IConvertible
{
    String? DocumentID;
    String? DocumentNr;
    String? RootDocumentID;
    List<MetaDataField>? MetaData;
    List<Bookmark>? Bookmarks;
    Mailings? Mailings;
    List<AttachmentMailing>? AttachmentsMailings;
    IInformationMessages? Messages;
    String? SourceDocumentPath;
    String? DestinationDocumentPath;
    String? SharePointContentTypeName;
    bool? ZIPAttachments;

    DocumentResponse({this.DocumentID,this.DocumentNr,this.RootDocumentID,this.MetaData,this.Bookmarks,this.Mailings,this.AttachmentsMailings,this.Messages,this.SourceDocumentPath,this.DestinationDocumentPath,this.SharePointContentTypeName,this.ZIPAttachments});
    DocumentResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DocumentID = json['DocumentID'];
        DocumentNr = json['DocumentNr'];
        RootDocumentID = json['RootDocumentID'];
        MetaData = JsonConverters.fromJson(json['MetaData'],'List<MetaDataField>',context!);
        Bookmarks = JsonConverters.fromJson(json['Bookmarks'],'List<Bookmark>',context!);
        Mailings = JsonConverters.fromJson(json['Mailings'],'Mailings',context!);
        AttachmentsMailings = JsonConverters.fromJson(json['AttachmentsMailings'],'List<AttachmentMailing>',context!);
        Messages = JsonConverters.fromJson(json['Messages'],'IInformationMessages',context!);
        SourceDocumentPath = json['SourceDocumentPath'];
        DestinationDocumentPath = json['DestinationDocumentPath'];
        SharePointContentTypeName = json['SharePointContentTypeName'];
        ZIPAttachments = json['ZIPAttachments'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DocumentID': DocumentID,
        'DocumentNr': DocumentNr,
        'RootDocumentID': RootDocumentID,
        'MetaData': JsonConverters.toJson(MetaData,'List<MetaDataField>',context!),
        'Bookmarks': JsonConverters.toJson(Bookmarks,'List<Bookmark>',context!),
        'Mailings': JsonConverters.toJson(Mailings,'Mailings',context!),
        'AttachmentsMailings': JsonConverters.toJson(AttachmentsMailings,'List<AttachmentMailing>',context!),
        'Messages': JsonConverters.toJson(Messages,'IInformationMessages',context!),
        'SourceDocumentPath': SourceDocumentPath,
        'DestinationDocumentPath': DestinationDocumentPath,
        'SharePointContentTypeName': SharePointContentTypeName,
        'ZIPAttachments': ZIPAttachments
    };

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

enum DocInfoSilentMode
{
    Off,
    AllowUserInteraction,
    DoNotAllowUserInteraction,
}

class AddDocument implements IConvertible
{
    String? RegistrationProfileID;
    String? DocumentID;
    String? RootDocumentID;
    int? AssignToUserID;
    int? AssignToGroupID;
    List<MetaDataField>? MetaData;
    Mailings? Mailings;
    List<AttachmentMailing>? AttachmentsMailings;
    String? FileID;
    DocInfoSilentMode? SilentMode;
    bool? updateStorageSystem;
    int? MessageQueueId;

    AddDocument({this.RegistrationProfileID,this.DocumentID,this.RootDocumentID,this.AssignToUserID,this.AssignToGroupID,this.MetaData,this.Mailings,this.AttachmentsMailings,this.FileID,this.SilentMode,this.updateStorageSystem,this.MessageQueueId});
    AddDocument.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RegistrationProfileID = json['RegistrationProfileID'];
        DocumentID = json['DocumentID'];
        RootDocumentID = json['RootDocumentID'];
        AssignToUserID = json['AssignToUserID'];
        AssignToGroupID = json['AssignToGroupID'];
        MetaData = JsonConverters.fromJson(json['MetaData'],'List<MetaDataField>',context!);
        Mailings = JsonConverters.fromJson(json['Mailings'],'Mailings',context!);
        AttachmentsMailings = JsonConverters.fromJson(json['AttachmentsMailings'],'List<AttachmentMailing>',context!);
        FileID = json['FileID'];
        SilentMode = JsonConverters.fromJson(json['SilentMode'],'DocInfoSilentMode',context!);
        updateStorageSystem = json['updateStorageSystem'];
        MessageQueueId = json['MessageQueueId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RegistrationProfileID': RegistrationProfileID,
        'DocumentID': DocumentID,
        'RootDocumentID': RootDocumentID,
        'AssignToUserID': AssignToUserID,
        'AssignToGroupID': AssignToGroupID,
        'MetaData': JsonConverters.toJson(MetaData,'List<MetaDataField>',context!),
        'Mailings': JsonConverters.toJson(Mailings,'Mailings',context!),
        'AttachmentsMailings': JsonConverters.toJson(AttachmentsMailings,'List<AttachmentMailing>',context!),
        'FileID': FileID,
        'SilentMode': JsonConverters.toJson(SilentMode,'DocInfoSilentMode',context!),
        'updateStorageSystem': updateStorageSystem,
        'MessageQueueId': MessageQueueId
    };

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

class AddDocumentByEmailMessageId implements IConvertible
{
    String? ItemId;
    String? EwsUrl;
    String? Token;
    String? DocumentId;
    AddDocument? documentToAdd;

    AddDocumentByEmailMessageId({this.ItemId,this.EwsUrl,this.Token,this.DocumentId,this.documentToAdd});
    AddDocumentByEmailMessageId.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ItemId = json['ItemId'];
        EwsUrl = json['EwsUrl'];
        Token = json['Token'];
        DocumentId = json['DocumentId'];
        documentToAdd = JsonConverters.fromJson(json['documentToAdd'],'AddDocument',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ItemId': ItemId,
        'EwsUrl': EwsUrl,
        'Token': Token,
        'DocumentId': DocumentId,
        'documentToAdd': JsonConverters.toJson(documentToAdd,'AddDocument',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
    'MetaDataField': TypeInfo(TypeOf.Class, create:() => MetaDataField()),
    'Bookmark': TypeInfo(TypeOf.Class, create:() => Bookmark()),
    'Mailings': TypeInfo(TypeOf.Class, create:() => Mailings()),
    'AttachmentMailing': TypeInfo(TypeOf.Class, create:() => AttachmentMailing()),
    'IInformationMessages': TypeInfo(TypeOf.Interface),
    'DocumentResponse': TypeInfo(TypeOf.Class, create:() => DocumentResponse()),
    'List<MetaDataField>': TypeInfo(TypeOf.Class, create:() => <MetaDataField>[]),
    'List<Bookmark>': TypeInfo(TypeOf.Class, create:() => <Bookmark>[]),
    'List<AttachmentMailing>': TypeInfo(TypeOf.Class, create:() => <AttachmentMailing>[]),
    'DocInfoSilentMode': TypeInfo(TypeOf.Enum, enumValues:DocInfoSilentMode.values),
    'AddDocument': TypeInfo(TypeOf.Class, create:() => AddDocument()),
    'AddDocumentByEmailMessageId': TypeInfo(TypeOf.Class, create:() => AddDocumentByEmailMessageId()),
});

Dart AddDocumentByEmailMessageId 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 /jsv/reply/AddDocumentByEmailMessageId HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ItemId: String,
	EwsUrl: String,
	Token: String,
	DocumentId: String,
	documentToAdd: 
	{
		DocumentID: 00000000-0000-0000-0000-000000000000,
		RootDocumentID: 00000000-0000-0000-0000-000000000000,
		AssignToUserID: 0,
		AssignToGroupID: 0,
		MetaData: 
		[
			{
				ID: 00000000-0000-0000-0000-000000000000,
				DocumentVeldID: 00000000-0000-0000-0000-000000000000,
				Name: String,
				Label: String,
				Datatype: String,
				PrintLabel: String,
				Entity: String,
				PrintValue: String,
				RegistrationValue: String,
				SPSiteColumnName: String,
				ShadowName: String,
				ShadowDatatype: String,
				ShadowSPSiteColumnName: String,
				ShadowSPSiteColumnRegistrationValue: String,
				ShadowRegistrationValue: String,
				IsKeyField: False,
				KopierenBijNieuweVersie: False
			}
		],
		Mailings: {},
		AttachmentsMailings: 
		[
			{
				
			}
		],
		FileID: 00000000-0000-0000-0000-000000000000,
		SilentMode: Off,
		updateStorageSystem: False,
		MessageQueueId: 0
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	DocumentNr: String,
	MetaData: 
	[
		{
			ID: 00000000-0000-0000-0000-000000000000,
			DocumentVeldID: 00000000-0000-0000-0000-000000000000,
			Name: String,
			Label: String,
			Datatype: String,
			PrintLabel: String,
			Entity: String,
			PrintValue: String,
			RegistrationValue: String,
			SPSiteColumnName: String,
			ShadowName: String,
			ShadowDatatype: String,
			ShadowSPSiteColumnName: String,
			ShadowSPSiteColumnRegistrationValue: String,
			ShadowRegistrationValue: String,
			IsKeyField: False,
			KopierenBijNieuweVersie: False
		}
	],
	Bookmarks: 
	[
		{
			RemoveLastBreak: False,
			ReplaceOnChange: False,
			IsDynamic: False
		}
	],
	Mailings: {},
	AttachmentsMailings: 
	[
		{
			
		}
	],
	SourceDocumentPath: String,
	DestinationDocumentPath: String,
	SharePointContentTypeName: String,
	ZIPAttachments: False
}