Skip to content

Commit

Permalink
Merge pull request #944 from AsakyraZ/poa-for-prepare-documents-to-sign
Browse files Browse the repository at this point in the history
Add PowerOfAttorney for PrepareDocumentsToSign and GenerateTitleXml methods
  • Loading branch information
AsakyraZ authored Feb 10, 2022
2 parents e91c285 + ab09068 commit 13c90f8
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 40 deletions.
4 changes: 2 additions & 2 deletions Samples/Diadoc.Console/Properties/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
using System.Reflection;

[assembly: AssemblyVersion("2.9.0.0")]
[assembly: AssemblyFileVersion("2.9.23-dev")]
[assembly: AssemblyInformationalVersion("2.9.23-dev")]
[assembly: AssemblyFileVersion("2.9.25-dev")]
[assembly: AssemblyInformationalVersion("2.9.25-dev")]

4 changes: 2 additions & 2 deletions Samples/Diadoc.Samples/Properties/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
using System.Reflection;

[assembly: AssemblyVersion("2.9.0.0")]
[assembly: AssemblyFileVersion("2.9.23-dev")]
[assembly: AssemblyInformationalVersion("2.9.23-dev")]
[assembly: AssemblyFileVersion("2.9.25-dev")]
[assembly: AssemblyInformationalVersion("2.9.25-dev")]

7 changes: 1 addition & 6 deletions proto/Events/DiadocMessage-PostApi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "Events/ResolutionInfo.proto";
import "Events/ResolutionRequestInfo.proto";
import "Invoicing/OrganizationInfo.proto";
import "Docflow/DocumentInfo.proto";
import "PowersOfAttorney/PowerOfAttorney.proto";
import "Events/PowerOfAttorneyToPost.proto";

package Diadoc.Api.Proto.Events;

Expand Down Expand Up @@ -586,8 +586,3 @@ message DocumentTransformation {
required string DocumentId = 1;
optional string CustomDocumentId = 2;
}

message PowerOfAttorneyToPost {
optional PowersOfAttorney.PowerOfAttorneyFullId FullId = 1;
required bool UseDefault = 2;
}
8 changes: 8 additions & 0 deletions proto/Events/PowerOfAttorneyToPost.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import "PowersOfAttorney/PowerOfAttorney.proto";

package Diadoc.Api.Proto.Events;

message PowerOfAttorneyToPost {
optional PowersOfAttorney.PowerOfAttorneyFullId FullId = 1;
required bool UseDefault = 2;
}
3 changes: 3 additions & 0 deletions proto/Invoicing/ExtendedSigner.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import "Events/PowerOfAttorneyToPost.proto";

package Diadoc.Api.Proto.Invoicing.Signers;

message ExtendedSigner {
optional string BoxId = 1;
optional bytes SignerCertificate = 2;
optional string SignerCertificateThumbprint = 3;
optional ExtendedSignerDetails SignerDetails = 4;
optional Events.PowerOfAttorneyToPost PowerOfAttorney = 5;
}

message ExtendedSignerDetails {
Expand Down
80 changes: 80 additions & 0 deletions src/DataXml/CommonXmlNodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ public partial class SignerReference

private string certificateThumbprintField;

private PowerOfAttorney powerOfAttorneyField;

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string BoxId
Expand All @@ -701,6 +703,84 @@ public string CertificateThumbprint
get { return this.certificateThumbprintField; }
set { this.certificateThumbprintField = value; }
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public PowerOfAttorney PowerOfAttorney
{
get { return this.powerOfAttorneyField; }
set { this.powerOfAttorneyField = value; }
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class PowerOfAttorney
{
private PowerOfAttorneyFullId fullIdField;

private PowerOfAttorneyUseDefault useDefaultField;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public PowerOfAttorneyFullId FullId
{
get { return this.fullIdField; }
set { this.fullIdField = value; }
}

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public PowerOfAttorneyUseDefault UseDefault
{
get { return this.useDefaultField; }
set { this.useDefaultField = value; }
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class PowerOfAttorneyFullId
{
private string registrationNumberField;

private string issuerInnField;

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string RegistrationNumber
{
get { return this.registrationNumberField; }
set { this.registrationNumberField = value; }
}

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string IssuerInn
{
get { return this.issuerInnField; }
set { this.issuerInnField = value; }
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public enum PowerOfAttorneyUseDefault
{
/// <remarks/>
@true,

/// <remarks/>
@false,
}

/// <remarks/>
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
using System.Reflection;

[assembly: AssemblyVersion("2.9.0.0")]
[assembly: AssemblyFileVersion("2.9.23-dev")]
[assembly: AssemblyInformationalVersion("2.9.23-dev")]
[assembly: AssemblyFileVersion("2.9.25-dev")]
[assembly: AssemblyInformationalVersion("2.9.25-dev")]

28 changes: 1 addition & 27 deletions src/Proto/Events/DiadocMessage-PostApi.proto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Note: requires additional types generated from: Events/ResolutionRequestInfo.proto
// Note: requires additional types generated from: Invoicing/OrganizationInfo.proto
// Note: requires additional types generated from: Docflow/DocumentInfo.proto
// Note: requires additional types generated from: PowersOfAttorney/PowerOfAttorney.proto
// Note: requires additional types generated from: Events/PowerOfAttorneyToPost.proto
namespace Diadoc.Api.Proto.Events
{
[global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"MessageToPost")]
Expand Down Expand Up @@ -3534,32 +3534,6 @@ public string CustomDocumentId
{ return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
}

[global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"PowerOfAttorneyToPost")]
public partial class PowerOfAttorneyToPost : global::ProtoBuf.IExtensible
{
public PowerOfAttorneyToPost() {}


private Diadoc.Api.Proto.PowersOfAttorney.PowerOfAttorneyFullId _FullId = null;
[global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"FullId", DataFormat = global::ProtoBuf.DataFormat.Default)]
[global::System.ComponentModel.DefaultValue(null)]
public Diadoc.Api.Proto.PowersOfAttorney.PowerOfAttorneyFullId FullId
{
get { return _FullId; }
set { _FullId = value; }
}
private bool _UseDefault;
[global::ProtoBuf.ProtoMember(2, IsRequired = true, Name=@"UseDefault", DataFormat = global::ProtoBuf.DataFormat.Default)]
public bool UseDefault
{
get { return _UseDefault; }
set { _UseDefault = 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=@"CustomDataPatchOperation")]
public enum CustomDataPatchOperation
{
Expand Down
40 changes: 40 additions & 0 deletions src/Proto/Events/PowerOfAttorneyToPost.proto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// Generated from: Events/PowerOfAttorneyToPost.proto
// Note: requires additional types generated from: PowersOfAttorney/PowerOfAttorney.proto
namespace Diadoc.Api.Proto.Events
{
[global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"PowerOfAttorneyToPost")]
public partial class PowerOfAttorneyToPost : global::ProtoBuf.IExtensible
{
public PowerOfAttorneyToPost() {}


private Diadoc.Api.Proto.PowersOfAttorney.PowerOfAttorneyFullId _FullId = null;
[global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"FullId", DataFormat = global::ProtoBuf.DataFormat.Default)]
[global::System.ComponentModel.DefaultValue(null)]
public Diadoc.Api.Proto.PowersOfAttorney.PowerOfAttorneyFullId FullId
{
get { return _FullId; }
set { _FullId = value; }
}
private bool _UseDefault;
[global::ProtoBuf.ProtoMember(2, IsRequired = true, Name=@"UseDefault", DataFormat = global::ProtoBuf.DataFormat.Default)]
public bool UseDefault
{
get { return _UseDefault; }
set { _UseDefault = value; }
}
private global::ProtoBuf.IExtension extensionObject;
global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
{ return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
}

}
2 changes: 2 additions & 0 deletions src/Proto/Invoicing/ExtendedSigner.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Runtime.InteropServices;
using Diadoc.Api.Proto.Events;

namespace Diadoc.Api.Proto.Invoicing.Signers
{
Expand All @@ -10,6 +11,7 @@ public interface IExtendedSigner
byte[] SignerCertificate { get; set; }
string SignerCertificateThumbprint { get; set; }
ExtendedSignerDetails SignerDetails { get; set; }
PowerOfAttorneyToPost PowerOfAttorney { get; set; }
}

[ComVisible(true)]
Expand Down
12 changes: 11 additions & 1 deletion src/Proto/Invoicing/ExtendedSigner.proto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//------------------------------------------------------------------------------

// Generated from: Invoicing/ExtendedSigner.proto
// Note: requires additional types generated from: Events/PowerOfAttorneyToPost.proto
namespace Diadoc.Api.Proto.Invoicing.Signers
{
[global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"ExtendedSigner")]
Expand Down Expand Up @@ -51,6 +52,15 @@ public Diadoc.Api.Proto.Invoicing.Signers.ExtendedSignerDetails SignerDetails
get { return _SignerDetails; }
set { _SignerDetails = value; }
}

private Diadoc.Api.Proto.Events.PowerOfAttorneyToPost _PowerOfAttorney = null;
[global::ProtoBuf.ProtoMember(5, IsRequired = false, Name=@"PowerOfAttorney", DataFormat = global::ProtoBuf.DataFormat.Default)]
[global::System.ComponentModel.DefaultValue(null)]
public Diadoc.Api.Proto.Events.PowerOfAttorneyToPost PowerOfAttorney
{
get { return _PowerOfAttorney; }
set { _PowerOfAttorney = value; }
}
private global::ProtoBuf.IExtension extensionObject;
global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
{ return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
Expand Down Expand Up @@ -374,4 +384,4 @@ public enum DocumentTitleType
Ucd736Buyer = 11
}

}
}

0 comments on commit 13c90f8

Please sign in to comment.