| POST | /api/DMS/AddUploadFile |
|---|
"use strict";
export class MetaDataField {
/** @param {{ID?:string,DocumentVeldID?:string,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?:boolean,KopierenBijNieuweVersie?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
ID;
/** @type {?string} */
DocumentVeldID;
/** @type {string} */
Name;
/** @type {string} */
Label;
/** @type {string} */
Datatype;
/** @type {string} */
PrintLabel;
/** @type {string} */
Entity;
/** @type {string} */
PrintValue;
/** @type {string} */
RegistrationValue;
/** @type {string} */
SPSiteColumnName;
/** @type {string} */
ShadowName;
/** @type {string} */
ShadowDatatype;
/** @type {string} */
ShadowSPSiteColumnName;
/** @type {string} */
ShadowSPSiteColumnRegistrationValue;
/** @type {string} */
ShadowRegistrationValue;
/** @type {boolean} */
IsKeyField;
/** @type {boolean} */
KopierenBijNieuweVersie;
}
export class AddUploadFile {
/** @param {{RegistrationProfileID?:string,NavigationPath?:string,FileName?:string,FileDate?:string,FileContent?:string,Description?:string,DocumentUpload?:boolean,Source?:string,MetaDataFields?:MetaDataField[],DocumentID?:string,MainDocumentID?:string,SubDocumentIDs?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Registration profile ID */
RegistrationProfileID;
/**
* @type {string}
* @description Registration navigation path */
NavigationPath;
/**
* @type {string}
* @description File name */
FileName;
/**
* @type {string}
* @description File date */
FileDate;
/**
* @type {string}
* @description File content */
FileContent = [];
/**
* @type {string}
* @description File description */
Description;
/**
* @type {boolean}
* @description Keep document in uploads (false; register immediately) */
DocumentUpload;
/**
* @type {string}
* @description Source of the file */
Source;
/**
* @type {MetaDataField[]}
* @description MetaDataFields */
MetaDataFields;
/**
* @type {?string}
* @description Document ID */
DocumentID;
/**
* @type {?string}
* @description Main Document ID */
MainDocumentID;
/**
* @type {string[]}
* @description Sub Document IDs */
SubDocumentIDs;
}
/** @typedef {number} */
export var MessageType;
(function (MessageType) {
MessageType[MessageType["Information"] = 1] = "Information"
MessageType[MessageType["Warning"] = 2] = "Warning"
MessageType[MessageType["Error"] = 3] = "Error"
MessageType[MessageType["Success"] = 4] = "Success"
})(MessageType || (MessageType = {}));
export class InformationMessageBase {
/** @param {{Type?:MessageType,Summary?:string,FullMessage?:string,FieldName?:string,KeepOpen?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {MessageType} */
Type;
/** @type {string} */
Summary;
/** @type {string} */
FullMessage;
/** @type {string} */
FieldName;
/** @type {boolean} */
KeepOpen;
}
export class InformationMessages extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class AddUploadFileResponse {
/** @param {{DocumentId?:string,DocumentUploadId?:number,DocumentNr?:string,Messages?:InformationMessages}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
DocumentId;
/** @type {?number} */
DocumentUploadId;
/** @type {string} */
DocumentNr;
/** @type {InformationMessages} */
Messages;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/DMS/AddUploadFile HTTP/1.1
Host: test-do-services.klokgroep.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
NavigationPath: String,
FileName: String,
FileDate: 0001-01-01,
FileContent: AA==,
Description: String,
DocumentUpload: False,
Source: String,
MetaDataFields:
[
{
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
}
],
DocumentID: 00000000-0000-0000-0000-000000000000,
MainDocumentID: 00000000-0000-0000-0000-000000000000,
SubDocumentIDs:
[
00000000-0000-0000-0000-000000000000
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
DocumentId: 00000000-0000-0000-0000-000000000000,
DocumentUploadId: 0,
DocumentNr: String,
Messages:
[
{
}
]
}