diff --git a/proto/CustomPrintFormDetectionResult.proto b/proto/CustomPrintFormDetection.proto similarity index 100% rename from proto/CustomPrintFormDetectionResult.proto rename to proto/CustomPrintFormDetection.proto diff --git a/proto/Docflow/DocumentInfoV3.proto b/proto/Docflow/DocumentInfoV3.proto index b7977e03..9e93ba99 100644 --- a/proto/Docflow/DocumentInfoV3.proto +++ b/proto/Docflow/DocumentInfoV3.proto @@ -78,6 +78,7 @@ message DocumentTemplateInfo required DocumentParticipants LetterParticipants = 1; repeated string TransformedToLetterIds = 2; repeated TemplateTransformationInfo TemplateTransformationInfos = 3; + optional TemplateRefusalInfo TemplateRefusalInfo = 4; } message TemplateTransformationInfo @@ -86,3 +87,10 @@ message TemplateTransformationInfo optional DocumentId TransformedToDocumentId = 2; optional string AuthorUserId = 3; } + +message TemplateRefusalInfo +{ + required string BoxId = 1; + optional string AuthorUserId = 2; + optional string Comment = 3; +} diff --git a/proto/Events/DiadocMessage-GetApi.proto b/proto/Events/DiadocMessage-GetApi.proto index 49287ee4..3f3fa3b8 100644 --- a/proto/Events/DiadocMessage-GetApi.proto +++ b/proto/Events/DiadocMessage-GetApi.proto @@ -113,6 +113,7 @@ message Entity { repeated string Labels = 25; optional string Version = 26; optional TemplateTransformationInfo TemplateTransformationInfo = 27; + optional TemplateRefusalInfo TemplateRefusalInfo = 28; } message EntityPatch { @@ -138,6 +139,21 @@ message TemplateTransformationInfo optional string Author = 2; } +message TemplateRefusalInfo +{ + required TemplateRefusalType Type = 1 [default = UnknownTemplateRefusalType]; + required string BoxId = 2; + optional string Author = 3; + optional string Comment = 4; +} + +enum TemplateRefusalType { + UnknownTemplateRefusalType = 0; + Refusal = 1; + Withdrawal = 2; +} + + enum EntityType { UnknownEntityType = 0; // Reserved type to report to legacy clients for newly introduced entity types Attachment = 1; @@ -200,5 +216,6 @@ enum AttachmentType { Edition = 71; DeletionRestoration = 72; TemplateTransformation = 73; + TemplateRefusal = 74; //Неизвестные типы должны обрабатываться как Title } diff --git a/proto/Events/DiadocMessage-PostApi.proto b/proto/Events/DiadocMessage-PostApi.proto index e22114ff..36dacec8 100644 --- a/proto/Events/DiadocMessage-PostApi.proto +++ b/proto/Events/DiadocMessage-PostApi.proto @@ -545,6 +545,17 @@ message TemplateDocumentAttachment { optional string EditingSettingId = 9; optional bool NeedRecipientSignature = 10 [default = false]; optional PredefinedRecipientTitle PredefinedRecipientTitle = 11; + optional bool RefusalDisabled = 12 [default = false]; +} + +message TemplatePatchToPost { + repeated TemplateRefusalAttachment Refusals = 1; +} + +message TemplateRefusalAttachment { + required string DocumentId = 1; + optional string Comment = 2; + repeated string Labels = 3; } message PredefinedRecipientTitle { diff --git a/proto/Invoicing/ExtendedSigner.proto b/proto/Invoicing/ExtendedSigner.proto index adc1f4e2..3aeb0e23 100644 --- a/proto/Invoicing/ExtendedSigner.proto +++ b/proto/Invoicing/ExtendedSigner.proto @@ -55,7 +55,7 @@ enum SignerStatus { SellerEmployee = 1; // Работник организации продавца товаров (работ, услуг, имущественных прав); InformationCreatorEmployee = 2; // Работник организации - составителя информации продавца; OtherOrganizationEmployee = 3; // Работник иной уполномоченной организации; - AuthorizedPerson= 4; // Уполномоченное физическое лицо (в том числе индивидуальный предприниматель); + AuthorizedPerson = 4; // Уполномоченное физическое лицо (в том числе индивидуальный предприниматель); BuyerEmployee = 5; // Работник организации - покупателя (для документов в формате приказа №820); InformationCreatorBuyerEmployee = 6; // Работник организации - составителя файла обмена информации покупателя, если составитель файла обмена информации покупателя не является покупателем (для документов в формате приказа №820) } @@ -66,7 +66,7 @@ enum DocumentTitleType { UtdBuyer = 1; // Данные для титула покупателя УПД UcdSeller = 2; // Данные для титула продавца УКД UcdBuyer = 3; // Данные для титула покупателя УКД - TovTorg551Seller = 4; // Данные для титула продавца формата приказа 551 + TovTorg551Seller = 4; // Данные для титула продавца формата приказа 551 TovTorg551Buyer = 5; // Данные для титула покупателя формата приказа 551 AccCert552Seller = 6; // Данные для титула исполнителя формата приказа 552 AccCert552Buyer = 7; // Данные для титула заказчика формата приказа 552 diff --git a/src/Com/AttachmentType.cs b/src/Com/AttachmentType.cs index f2c07c27..20ecfbff 100644 --- a/src/Com/AttachmentType.cs +++ b/src/Com/AttachmentType.cs @@ -62,6 +62,7 @@ public enum AttachmentType Cancellation = 69, Edition = 71, DeletionRestoration = 72, - TemplateTransformation = 73 + TemplateTransformation = 73, + TemplateRefusal = 74 } } \ No newline at end of file diff --git a/src/Com/DocflowsV3.cs b/src/Com/DocflowsV3.cs index cebb2f11..6cf98e4f 100644 --- a/src/Com/DocflowsV3.cs +++ b/src/Com/DocflowsV3.cs @@ -411,6 +411,7 @@ public interface IDocumentTemplateInfo { DocumentParticipants LetterParticipants { get; } ReadonlyList TransformedToLetterIdsList { get; } + TemplateRefusalInfo TemplateRefusalInfo { get; } } [ComVisible(true)] @@ -427,6 +428,24 @@ public ReadonlyList TransformedToLetterIdsList } } + [ComVisible(true)] + [Guid("75C71C29-AC5C-43A4-A820-5841C71F3532")] + public interface ITemplateRefusalInfo + { + string BoxId { get; } + string AuthorUserId { get; } + string Comment { get; } + } + + [ComVisible(true)] + [ProgId("Diadoc.Api.Docflow.TemplateRefusalInfo")] + [Guid("D1763A94-4981-4AFE-9AC1-845D11196169")] + [ClassInterface(ClassInterfaceType.None)] + [ComDefaultInterface(typeof(ITemplateRefusalInfo))] + public partial class TemplateRefusalInfo : SafeComObject, ITemplateRefusalInfo + { + } + [ComVisible(true)] [Guid("F87CC29D-FF93-488C-83B0-AB8F148409F9")] public interface IDocflowV3 diff --git a/src/Com/TemplateRefusalType.cs b/src/Com/TemplateRefusalType.cs new file mode 100644 index 00000000..686b1c6f --- /dev/null +++ b/src/Com/TemplateRefusalType.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; +using System.Xml.Serialization; + +namespace Diadoc.Api.Com +{ + [ComVisible(true)] + [Guid("67ED41D3-8E2C-4BF5-9FEA-FB0DBF97AB9E")] + //NOTE: Это хотели, чтобы можно было использовать XML-сериализацию для классов + [XmlType(TypeName = "TemplateRefusalType", Namespace = "https://diadoc-api.kontur.ru")] + public enum TemplateRefusalType + { + UnknownTemplateRefusalType = 0, + Refusal = 1, + Withdrawal = 2 + } +} \ No newline at end of file diff --git a/src/ComDiadocApi.cs b/src/ComDiadocApi.cs index 875e7fdc..09295468 100644 --- a/src/ComDiadocApi.cs +++ b/src/ComDiadocApi.cs @@ -459,6 +459,7 @@ FileContent GetContent( Template PostTemplate(string authToken, [MarshalAs(UnmanagedType.IDispatch)] object template); Template PostTemplate(string authToken, [MarshalAs(UnmanagedType.IDispatch)] object template, string operationId); + MessagePatch PostTemplatePatch(string authToken, string boxId, string templateId, [MarshalAs(UnmanagedType.IDispatch)] object patch, string operationId); Message TransformTemplateToMessage(string authToken, [MarshalAs(UnmanagedType.IDispatch)] object templateTransformation); Message TransformTemplateToMessage(string authToken, [MarshalAs(UnmanagedType.IDispatch)] object templateTransformation, string operationId); @@ -714,6 +715,11 @@ public Template PostTemplate(string authToken, object template, string operation return diadoc.PostTemplate(authToken, (TemplateToPost) template, operationId); } + public MessagePatch PostTemplatePatch(string authToken, string boxId, string templateId, object patch, string operationId) + { + return diadoc.PostTemplatePatch(authToken, boxId, templateId, (TemplatePatchToPost) patch, operationId); + } + public Message TransformTemplateToMessage(string authToken, object templateTransformation) { return diadoc.TransformTemplateToMessage(authToken, (TemplateTransformationToPost) templateTransformation); diff --git a/src/DiadocApi.Async.cs b/src/DiadocApi.Async.cs index 4117ff1d..982f877b 100644 --- a/src/DiadocApi.Async.cs +++ b/src/DiadocApi.Async.cs @@ -223,6 +223,15 @@ public Task PostMessagePatchAsync(string authToken, MessagePatchTo return diadocHttpApi.PostMessagePatchAsync(authToken, patch, operationId); } + public Task PostTemplatePatchAsync(string authToken, string boxId, string templateId, TemplatePatchToPost patch, string operationId = null) + { + if (authToken == null) throw new ArgumentNullException("authToken"); + if (boxId == null) throw new ArgumentNullException("boxId"); + if (templateId == null) throw new ArgumentNullException("templateId"); + if (patch == null) throw new ArgumentNullException("patch"); + return diadocHttpApi.PostTemplatePatchAsync(authToken, boxId, templateId, patch, operationId); + } + public Task PostRoamingNotificationAsync(string authToken, RoamingNotificationToPost notification) { if (authToken == null) throw new ArgumentNullException("authToken"); diff --git a/src/DiadocApi.cs b/src/DiadocApi.cs index fc57b22a..7d5bda38 100644 --- a/src/DiadocApi.cs +++ b/src/DiadocApi.cs @@ -281,6 +281,15 @@ public MessagePatch PostMessagePatch(string authToken, MessagePatchToPost patch, return diadocHttpApi.PostMessagePatch(authToken, patch, operationId); } + public MessagePatch PostTemplatePatch(string authToken, string boxId, string templateId, TemplatePatchToPost patch, string operationId = null) + { + if (authToken == null) throw new ArgumentNullException("authToken"); + if (boxId == null) throw new ArgumentNullException("boxId"); + if (templateId == null) throw new ArgumentNullException("templateId"); + if (patch == null) throw new ArgumentNullException("patch"); + return diadocHttpApi.PostTemplatePatch(authToken, boxId, templateId, patch, operationId); + } + public void PostRoamingNotification(string authToken, RoamingNotificationToPost notification) { if (authToken == null) throw new ArgumentNullException("authToken"); diff --git a/src/DiadocHttpApi.Events.cs b/src/DiadocHttpApi.Events.cs index 2fe385e7..7309dc0e 100644 --- a/src/DiadocHttpApi.Events.cs +++ b/src/DiadocHttpApi.Events.cs @@ -11,10 +11,11 @@ public BoxEventList GetNewEvents(string authToken, string boxId, string afterEve var qsb = new PathAndQueryBuilder("/V6/GetNewEvents"); qsb.AddParameter("includeDrafts"); qsb.AddParameter("boxId", boxId); - if (!string.IsNullOrEmpty(afterEventId)) + if (!string.IsNullOrEmpty(afterEventId)) qsb.AddParameter("afterEventId", afterEventId); return PerformHttpRequest(authToken, "GET", qsb.BuildPathAndQuery()); } + public BoxEvent GetEvent(string authToken, string boxId, string eventId) { var queryString = string.Format("/V2/GetEvent?eventId={0}&boxId={1}", eventId, boxId); @@ -32,7 +33,13 @@ public Message GetMessage(string authToken, string boxId, string messageId, bool return PerformHttpRequest(authToken, "GET", qsb.BuildPathAndQuery()); } - public Message GetMessage(string authToken, string boxId, string messageId, string entityId, bool withOriginalSignature = false, bool injectEntityContent = false) + public Message GetMessage( + string authToken, + string boxId, + string messageId, + string entityId, + bool withOriginalSignature = false, + bool injectEntityContent = false) { var qsb = new PathAndQueryBuilder("/V5/GetMessage"); qsb.AddParameter("boxId", boxId); @@ -82,8 +89,23 @@ public Message TransformTemplateToMessage(string authToken, TemplateTransformati public MessagePatch PostMessagePatch(string authToken, MessagePatchToPost patch, string operationId = null) { - var queryString = string.Format("/V3/PostMessagePatch?operationId={0}", operationId); - return PerformHttpRequest(authToken, queryString, patch); + var qsb = new PathAndQueryBuilder("/V3/PostMessagePatch"); + qsb.AddParameter("operationId", operationId); + return PerformHttpRequest(authToken, qsb.BuildPathAndQuery(), patch); + } + + public MessagePatch PostTemplatePatch( + string authToken, + string boxId, + string templateId, + TemplatePatchToPost patch, + string operationId = null) + { + var qsb = new PathAndQueryBuilder("/PostTemplatePatch"); + qsb.AddParameter("boxId", boxId); + qsb.AddParameter("templateId", templateId); + qsb.AddParameter("operationId", operationId); + return PerformHttpRequest(authToken, qsb.BuildPathAndQuery(), patch); } public void PostRoamingNotification(string authToken, RoamingNotificationToPost notification) @@ -96,11 +118,11 @@ public PrepareDocumentsToSignResponse PrepareDocumentsToSign(string authToken, P var queryString = "/PrepareDocumentsToSign" + (excludeContent ? "?excludeContent" : ""); return PerformHttpRequest(authToken, queryString, request); } - + public BoxEvent GetLastEvent(string authToken, string boxId) { var queryString = BuildQueryStringWithBoxId("GetLastEvent", boxId); - return PerformHttpRequest(authToken,"GET", queryString, allowedStatusCodes: HttpStatusCode.NoContent); + return PerformHttpRequest(authToken, "GET", queryString, allowedStatusCodes: HttpStatusCode.NoContent); } } -} +} \ No newline at end of file diff --git a/src/DiadocHttpApi.EventsAsync.cs b/src/DiadocHttpApi.EventsAsync.cs index 2205d18f..e28bc509 100644 --- a/src/DiadocHttpApi.EventsAsync.cs +++ b/src/DiadocHttpApi.EventsAsync.cs @@ -100,6 +100,20 @@ public Task PostMessagePatchAsync(string authToken, MessagePatchTo return PerformHttpRequestAsync(authToken, qsb.BuildPathAndQuery(), patch); } + public Task PostTemplatePatchAsync( + string authToken, + string boxId, + string templateId, + TemplatePatchToPost patch, + string operationId = null) + { + var qsb = new PathAndQueryBuilder("/PostTemplatePatch"); + qsb.AddParameter("boxId", boxId); + qsb.AddParameter("templateId", templateId); + qsb.AddParameter("operationId", operationId); + return PerformHttpRequestAsync(authToken, qsb.BuildPathAndQuery(), patch); + } + public Task PostRoamingNotificationAsync(string authToken, RoamingNotificationToPost notification) { return PerformHttpRequestAsync(authToken, "POST", "/PostRoamingNotification", Serialize(notification)); diff --git a/src/IDiadocApi.cs b/src/IDiadocApi.cs index 4b12bf16..435c81e1 100644 --- a/src/IDiadocApi.cs +++ b/src/IDiadocApi.cs @@ -70,6 +70,7 @@ public interface IDiadocApi Template PostTemplate(string authToken, TemplateToPost template, string operationId = null); Message TransformTemplateToMessage(string authToken, TemplateTransformationToPost templateTransformation, string operationId = null); MessagePatch PostMessagePatch(string authToken, MessagePatchToPost patch, string operationId = null); + MessagePatch PostTemplatePatch(string authToken, string boxId, string templateId, TemplatePatchToPost patch, string operationId = null); void PostRoamingNotification(string authToken, RoamingNotificationToPost notification); void Delete(string authToken, string boxId, string messageId, string documentId); void Restore(string authToken, string boxId, string messageId, string documentId); @@ -267,6 +268,7 @@ Task AuthenticateWithKeyAsync(byte[] certificateBytes, bool useLocalSyst Task TransformTemplateToMessageAsync(string authToken, TemplateTransformationToPost templateTransformation, string operationId = null); Task PostMessagePatchAsync(string authToken, MessagePatchToPost patch, string operationId = null); + Task PostTemplatePatchAsync(string authToken, string boxId, string templateId, TemplatePatchToPost patch, string operationId = null); Task PostRoamingNotificationAsync(string authToken, RoamingNotificationToPost notification); Task DeleteAsync(string authToken, string boxId, string messageId, string documentId); Task RestoreAsync(string authToken, string boxId, string messageId, string documentId); diff --git a/src/Proto/CustomPrintFormDetectionResult.proto.cs b/src/Proto/CustomPrintFormDetection.proto.cs similarity index 98% rename from src/Proto/CustomPrintFormDetectionResult.proto.cs rename to src/Proto/CustomPrintFormDetection.proto.cs index a874af8b..6ad39c45 100644 --- a/src/Proto/CustomPrintFormDetectionResult.proto.cs +++ b/src/Proto/CustomPrintFormDetection.proto.cs @@ -7,7 +7,7 @@ // //------------------------------------------------------------------------------ -// Generated from: CustomPrintFormDetectionResult.proto +// Generated from: CustomPrintFormDetection.proto // Note: requires additional types generated from: DocumentId.proto namespace Diadoc.Api.Proto { diff --git a/src/Proto/Docflow/DocumentInfoV3.proto.cs b/src/Proto/Docflow/DocumentInfoV3.proto.cs index 48ba43b8..6c55f28e 100644 --- a/src/Proto/Docflow/DocumentInfoV3.proto.cs +++ b/src/Proto/Docflow/DocumentInfoV3.proto.cs @@ -380,6 +380,15 @@ public Diadoc.Api.Proto.Docflow.DocumentParticipants LetterParticipants get { return _TemplateTransformationInfos; } } + + private Diadoc.Api.Proto.Docflow.TemplateRefusalInfo _TemplateRefusalInfo = null; + [global::ProtoBuf.ProtoMember(4, IsRequired = false, Name=@"TemplateRefusalInfo", DataFormat = global::ProtoBuf.DataFormat.Default)] + [global::System.ComponentModel.DefaultValue(null)] + public Diadoc.Api.Proto.Docflow.TemplateRefusalInfo TemplateRefusalInfo + { + get { return _TemplateRefusalInfo; } + set { _TemplateRefusalInfo = value; } + } private global::ProtoBuf.IExtension extensionObject; global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } @@ -420,4 +429,39 @@ public string AuthorUserId { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } } + [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"TemplateRefusalInfo")] + public partial class TemplateRefusalInfo : global::ProtoBuf.IExtensible + { + public TemplateRefusalInfo() {} + + private string _BoxId; + [global::ProtoBuf.ProtoMember(1, IsRequired = true, Name=@"BoxId", DataFormat = global::ProtoBuf.DataFormat.Default)] + public string BoxId + { + get { return _BoxId; } + set { _BoxId = value; } + } + + private string _AuthorUserId = ""; + [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"AuthorUserId", DataFormat = global::ProtoBuf.DataFormat.Default)] + [global::System.ComponentModel.DefaultValue("")] + public string AuthorUserId + { + get { return _AuthorUserId; } + set { _AuthorUserId = value; } + } + + private string _Comment = ""; + [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"Comment", DataFormat = global::ProtoBuf.DataFormat.Default)] + [global::System.ComponentModel.DefaultValue("")] + public string Comment + { + get { return _Comment; } + set { _Comment = value; } + } + private global::ProtoBuf.IExtension extensionObject; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } + } + } \ No newline at end of file diff --git a/src/Proto/Events/DiadocMessage-GetApi.proto.cs b/src/Proto/Events/DiadocMessage-GetApi.proto.cs index 09eba886..7f553d37 100644 --- a/src/Proto/Events/DiadocMessage-GetApi.proto.cs +++ b/src/Proto/Events/DiadocMessage-GetApi.proto.cs @@ -728,6 +728,15 @@ public Diadoc.Api.Proto.Events.TemplateTransformationInfo TemplateTransformation get { return _TemplateTransformationInfo; } set { _TemplateTransformationInfo = value; } } + + private Diadoc.Api.Proto.Events.TemplateRefusalInfo _TemplateRefusalInfo = null; + [global::ProtoBuf.ProtoMember(28, IsRequired = false, Name=@"TemplateRefusalInfo", DataFormat = global::ProtoBuf.DataFormat.Default)] + [global::System.ComponentModel.DefaultValue(null)] + public Diadoc.Api.Proto.Events.TemplateRefusalInfo TemplateRefusalInfo + { + get { return _TemplateRefusalInfo; } + set { _TemplateRefusalInfo = value; } + } private global::ProtoBuf.IExtension extensionObject; global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } @@ -865,6 +874,62 @@ public string Author { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } } + [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"TemplateRefusalInfo")] + public partial class TemplateRefusalInfo : global::ProtoBuf.IExtensible + { + public TemplateRefusalInfo() {} + + private Diadoc.Api.Proto.Events.TemplateRefusalType _Type; + [global::ProtoBuf.ProtoMember(1, IsRequired = true, Name=@"Type", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)] + public Diadoc.Api.Proto.Events.TemplateRefusalType Type + { + get { return _Type; } + set { _Type = value; } + } + private string _BoxId; + [global::ProtoBuf.ProtoMember(2, IsRequired = true, Name=@"BoxId", DataFormat = global::ProtoBuf.DataFormat.Default)] + public string BoxId + { + get { return _BoxId; } + set { _BoxId = value; } + } + + private string _Author = ""; + [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"Author", DataFormat = global::ProtoBuf.DataFormat.Default)] + [global::System.ComponentModel.DefaultValue("")] + public string Author + { + get { return _Author; } + set { _Author = value; } + } + + private string _Comment = ""; + [global::ProtoBuf.ProtoMember(4, IsRequired = false, Name=@"Comment", DataFormat = global::ProtoBuf.DataFormat.Default)] + [global::System.ComponentModel.DefaultValue("")] + public string Comment + { + get { return _Comment; } + set { _Comment = value; } + } + private global::ProtoBuf.IExtension extensionObject; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } + } + + [global::ProtoBuf.ProtoContract(Name=@"TemplateRefusalType")] + public enum TemplateRefusalType + { + + [global::ProtoBuf.ProtoEnum(Name=@"UnknownTemplateRefusalType", Value=0)] + UnknownTemplateRefusalType = 0, + + [global::ProtoBuf.ProtoEnum(Name=@"Refusal", Value=1)] + Refusal = 1, + + [global::ProtoBuf.ProtoEnum(Name=@"Withdrawal", Value=2)] + Withdrawal = 2 + } + [global::ProtoBuf.ProtoContract(Name=@"EntityType")] public enum EntityType { @@ -1043,7 +1108,10 @@ public enum AttachmentType DeletionRestoration = 72, [global::ProtoBuf.ProtoEnum(Name=@"TemplateTransformation", Value=73)] - TemplateTransformation = 73 + TemplateTransformation = 73, + + [global::ProtoBuf.ProtoEnum(Name=@"TemplateRefusal", Value=74)] + TemplateRefusal = 74 } } \ No newline at end of file diff --git a/src/Proto/Events/DiadocMessage-PostApi.proto.cs b/src/Proto/Events/DiadocMessage-PostApi.proto.cs index 6a61c9bf..8821aa9a 100644 --- a/src/Proto/Events/DiadocMessage-PostApi.proto.cs +++ b/src/Proto/Events/DiadocMessage-PostApi.proto.cs @@ -3297,6 +3297,65 @@ public Diadoc.Api.Proto.Events.PredefinedRecipientTitle PredefinedRecipientTitle get { return _PredefinedRecipientTitle; } set { _PredefinedRecipientTitle = value; } } + + private bool _RefusalDisabled = (bool)false; + [global::ProtoBuf.ProtoMember(12, IsRequired = false, Name=@"RefusalDisabled", DataFormat = global::ProtoBuf.DataFormat.Default)] + [global::System.ComponentModel.DefaultValue((bool)false)] + public bool RefusalDisabled + { + get { return _RefusalDisabled; } + set { _RefusalDisabled = value; } + } + private global::ProtoBuf.IExtension extensionObject; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } + } + + [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"TemplatePatchToPost")] + public partial class TemplatePatchToPost : global::ProtoBuf.IExtensible + { + public TemplatePatchToPost() {} + + private readonly global::System.Collections.Generic.List _Refusals = new global::System.Collections.Generic.List(); + [global::ProtoBuf.ProtoMember(1, Name=@"Refusals", DataFormat = global::ProtoBuf.DataFormat.Default)] + public global::System.Collections.Generic.List Refusals + { + get { return _Refusals; } + } + + private global::ProtoBuf.IExtension extensionObject; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } + } + + [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"TemplateRefusalAttachment")] + public partial class TemplateRefusalAttachment : global::ProtoBuf.IExtensible + { + public TemplateRefusalAttachment() {} + + private string _DocumentId; + [global::ProtoBuf.ProtoMember(1, IsRequired = true, Name=@"DocumentId", DataFormat = global::ProtoBuf.DataFormat.Default)] + public string DocumentId + { + get { return _DocumentId; } + set { _DocumentId = value; } + } + + private string _Comment = ""; + [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"Comment", DataFormat = global::ProtoBuf.DataFormat.Default)] + [global::System.ComponentModel.DefaultValue("")] + public string Comment + { + get { return _Comment; } + set { _Comment = value; } + } + private readonly global::System.Collections.Generic.List _Labels = new global::System.Collections.Generic.List(); + [global::ProtoBuf.ProtoMember(3, Name=@"Labels", DataFormat = global::ProtoBuf.DataFormat.Default)] + public global::System.Collections.Generic.List Labels + { + get { return _Labels; } + } + private global::ProtoBuf.IExtension extensionObject; global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); } diff --git a/src/Proto/Events/DiadocMessage.cs b/src/Proto/Events/DiadocMessage.cs index a5a11d29..ef8827f2 100644 --- a/src/Proto/Events/DiadocMessage.cs +++ b/src/Proto/Events/DiadocMessage.cs @@ -93,6 +93,9 @@ public interface IEntity string AttachmentVersion { get; } string Version { get; } void AddLabel(string label); + + TemplateTransformationInfo TemplateTransformationInfo { get; } + TemplateRefusalInfo TemplateRefusalInfo { get; } } [ComVisible(true)] @@ -127,6 +130,47 @@ public void AddLabel(string label) } } + [ComVisible(true)] + [Guid("73FC26F8-AD84-4A40-B7FE-D49CFED58F88")] + public interface ITemplateTransformationInfo + { + DocumentId TransformedToDocumentId { get; } + string Author { get; } + } + + [ComVisible(true)] + [ProgId("Diadoc.Api.TemplateTransformationInfo")] + [Guid("0ED31956-D09A-4676-9CA5-33DF660FED87")] + [ClassInterface(ClassInterfaceType.None)] + [ComDefaultInterface(typeof(ITemplateTransformationInfo))] + public partial class TemplateTransformationInfo : SafeComObject, ITemplateTransformationInfo + { + } + + [ComVisible(true)] + [Guid("34C626B4-D4C4-47C7-8011-ACE469BFB8B7")] + public interface ITemplateRefusalInfo + { + Com.TemplateRefusalType TypeValue { get; } + string BoxId { get; } + string Author { get; } + string Comment { get; } + } + + [ComVisible(true)] + [ProgId("Diadoc.Api.TemplateRefusalInfo")] + [Guid("181ED48D-40D1-4974-9FC8-790118BE616A")] + [ClassInterface(ClassInterfaceType.None)] + [ComDefaultInterface(typeof(ITemplateRefusalInfo))] + public partial class TemplateRefusalInfo : SafeComObject, ITemplateRefusalInfo + { + public Com.TemplateRefusalType TypeValue + { + get { return (Com.TemplateRefusalType) Type; } + set { Type = (TemplateRefusalType) value; } + } + } + [ComVisible(true)] [Guid("D3BD7130-16A6-4202-B1CE-5FB1A9AFD4EF")] public interface IEntityPatch @@ -524,6 +568,7 @@ public interface ITemplateDocumentAttachment string CustomDocumentId { get; set; } string EditingSettingId { get; set; } bool NeedRecipientSignature { get; set; } + bool RefusalDisabled { get; set; } void SetUnsignedContent([MarshalAs(UnmanagedType.IDispatch)] object unsignedContent); void AddMetadataItem([MarshalAs(UnmanagedType.IDispatch)] object metadataItem); @@ -547,6 +592,43 @@ public void AddMetadataItem(object metadataItem) } } + [ComVisible(true)] + [Guid("43AC127F-9F6A-402F-A75F-0C76D260E4AF")] + public interface ITemplatePatchToPost + { + void AddRefusal([MarshalAs(UnmanagedType.IDispatch)] object refusal); + } + + [ComVisible(true)] + [ProgId("Diadoc.Api.TemplatePatchToPost")] + [Guid("72BF0A5D-E8E9-455F-B00F-0505877EFF2B")] + [ClassInterface(ClassInterfaceType.None)] + [ComDefaultInterface(typeof(ITemplatePatchToPost))] + public partial class TemplatePatchToPost : SafeComObject, ITemplatePatchToPost + { + public void AddRefusal(object refusal) + { + Refusals.Add((TemplateRefusalAttachment) refusal); + } + } + + [ComVisible(true)] + [Guid("0C069765-AC7D-42E4-8307-9C5BDACB15F7")] + public interface ITemplateRefusalAttachment + { + string DocumentId { get; set; } + string Comment { get; set; } + } + + [ComVisible(true)] + [ProgId("Diadoc.Api.TemplateRefusalAttachment")] + [Guid("B9A66086-1772-446E-A22D-A988062B341C")] + [ClassInterface(ClassInterfaceType.None)] + [ComDefaultInterface(typeof(ITemplateRefusalAttachment))] + public partial class TemplateRefusalAttachment : SafeComObject, ITemplateRefusalAttachment + { + } + [ComVisible(true)] [Guid("E23434B2-F8F8-40DA-991E-E233B976519A")] public interface IUnsignedContent