Skip to content

Commit

Permalink
Merge pull request #101 from zharkovstas/template-refusals
Browse files Browse the repository at this point in the history
Add template refusals and various existing contracts
  • Loading branch information
zharkovstas authored Dec 24, 2019
2 parents 01d9fa2 + a5dc26a commit b0769a1
Show file tree
Hide file tree
Showing 53 changed files with 35,496 additions and 717 deletions.
6 changes: 3 additions & 3 deletions proto/AcquireCounteragent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import "DocumentId.proto";
package Diadoc.Api.Proto;

message AcquireCounteragentRequest {
optional string OrgId = 1;
optional string Inn = 2;
optional string MessageToCounteragent = 3;
optional string OrgId = 1;
optional string Inn = 2;
optional string MessageToCounteragent = 3;
optional InvitationDocument InvitationDocument = 4;
}

Expand Down
24 changes: 24 additions & 0 deletions proto/CertificateInfoV2.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package Diadoc.Api.Proto;

message CertificateInfoV2 {
required string Thumbprint = 1;
required CertificateType Type = 2;
optional sfixed64 ValidFrom = 3;
optional sfixed64 ValidTo = 4;
optional sfixed64 PrivateKeyValidFrom = 5;
optional sfixed64 PrivateKeyValidTo = 6;
optional string OrganizationName = 7;
optional string Inn = 8;
optional string UserFirstName = 9;
optional string UserMiddleName = 10;
optional string UserLastName = 11;
optional string UserShortName = 12;
optional bool IsDefault = 13;
}

enum CertificateType {
UnknownCertificateType = 0;
TokenCertificateType = 1;
DssCertificateType = 2;
KonturCertificateType = 3;
}
6 changes: 6 additions & 0 deletions proto/CertificateList.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import "CertificateInfoV2.proto";
package Diadoc.Api.Proto;

message CertificateList {
repeated CertificateInfoV2 Certificates = 1;
}
24 changes: 24 additions & 0 deletions proto/Docflow/AttachmentV3.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import "Docflow/Attachment.proto";
import "Content.proto";
import "Timestamp.proto";
import "SignatureVerificationResult.proto";

package Diadoc.Api.Proto.Docflow;

message SignatureV3
{
required Entity Cms = 1;
optional Entity CadesT = 2;
required string SignerBoxId = 3;
required string SignerDepartmentId = 4;
required bool IsValid = 5;
optional SignatureVerificationResult VerificationResult = 6;
optional Timestamp DeliveredAt = 7;
}

message SignedAttachmentV3
{
required Attachment Attachment = 1;
optional SignatureV3 Signature = 2;
optional Entity Comment = 3;
}
7 changes: 1 addition & 6 deletions proto/Docflow/Docflow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "Docflow/XmlBilateralDocflow.proto";
import "Docflow/RevocationDocflow.proto";
import "Docflow/ResolutionDocflow.proto";
import "Docflow/UniversalTransferDocumentDocflow.proto";
import "Docflow/RoamingNotification.proto";

package Diadoc.Api.Proto.Docflow;

Expand Down Expand Up @@ -63,9 +64,3 @@ enum DocflowStatusSeverity
Warning = 3;
Error = 4;
}

message RoamingNotification
{
required Entity Notification = 1;
required bool IsSuccess = 2;
}
2 changes: 2 additions & 0 deletions proto/Docflow/DocflowApi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import "Timestamp.proto";
import "DocumentId.proto";
import "TotalCountType.proto";
import "TimeBasedFilter.proto";
import "Docflow/DocumentWithDocflow.proto";

Expand Down Expand Up @@ -83,6 +84,7 @@ message GetDocflowEventsResponse
{
optional int32 TotalCount = 1;
repeated DocflowEvent Events = 2;
required TotalCountType TotalCountType = 3;
}

message DocflowEvent
Expand Down
51 changes: 51 additions & 0 deletions proto/Docflow/DocflowApiV3.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// docflow api
// GetDocflows(boxId, GetDocflowBatchRequest) : GetDocflowBatchResponseV3
// GetDocflowEvents(boxId, GetDocflowEventsRequest) : GetDocflowEventsResponseV3

import "Timestamp.proto";
import "DocumentId.proto";
import "TotalCountType.proto";
import "Docflow/DocumentWithDocflowV3.proto";

package Diadoc.Api.Proto.Docflow;

message GetDocflowBatchResponseV3
{
repeated DocumentWithDocflowV3 Documents = 1;
}

message SearchDocflowsResponseV3
{
repeated DocumentWithDocflowV3 Documents = 1;
required bool HaveMoreDocuments = 2;
}

message FetchedDocumentV3
{
required DocumentWithDocflowV3 Document = 1;
required bytes IndexKey = 2;
}

message GetDocflowsByPacketIdResponseV3
{
repeated FetchedDocumentV3 Documents = 1;
optional bytes NextPageIndexKey = 2;
}

message GetDocflowEventsResponseV3
{
required int32 TotalCount = 1;
repeated DocflowEventV3 Events = 2;
required TotalCountType TotalCountType = 3;
}

message DocflowEventV3
{
required string EventId = 1;
required Timestamp Timestamp = 2;
required DocumentId DocumentId = 3;
required bytes IndexKey = 4;
optional DocumentWithDocflowV3 Document = 5;
optional string PreviousEventId = 6;
optional DocumentWithDocflowV3 PreviousDocumentState = 7;
}
104 changes: 104 additions & 0 deletions proto/Docflow/DocflowV3.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import "Timestamp.proto";
import "Documents/Document.proto";
import "Docflow/AttachmentV3.proto";
import "Docflow/RoamingNotification.proto";
import "Docflow/ResolutionDocflowV3.proto";

package Diadoc.Api.Proto.Docflow;

message DocflowV3
{
required SenderTitleDocflow SenderTitle = 1;
optional ConfirmationDocflow Confirmation = 2;
optional ParticipantResponseDocflow ProxyResponse = 11;
optional ReceiptDocflowV3 RecipientReceipt = 4;
optional ParticipantResponseDocflow RecipientResponse = 5;
optional AmendmentRequestDocflow AmendmentRequest = 6;
optional RevocationDocflowV3 Revocation = 7;
optional ReceiptDocflowV3 SenderReceipt = 8;
optional ResolutionDocflowV3 Resolution = 9;
optional ResolutionEntitiesV3 ResolutionEntities = 10;
}

message SenderTitleDocflow
{
required bool IsFinished = 1;
required SignedAttachmentV3 Attachment = 2;
optional Timestamp SentAt = 3;
optional Timestamp DeliveredAt = 4;
optional RoamingNotification RoamingNotification = 5;
required Documents.SenderSignatureStatus SenderSignatureStatus = 6;
}

message ConfirmationDocflow
{
required bool IsFinished = 1;
optional SignedAttachmentV3 ConfirmationAttachment = 2;
optional Timestamp ConfirmedAt = 3;
optional ReceiptDocflowV3 Receipt = 4;
}

message SignatureRejectionDocflow
{
required SignedAttachmentV3 SignatureRejection = 1;
required bool IsFormal = 2;
optional Timestamp DeliveredAt = 3;
optional string PlainText = 4;
}

message ParticipantResponseDocflow
{
required bool IsFinished = 1;
optional SignatureV3 Signature = 2;
optional SignedAttachmentV3 Title = 3;
optional SignatureRejectionDocflow Rejection = 4;
optional Timestamp SentAt = 5;
optional Timestamp DeliveredAt = 6;
required Documents.RecipientResponseStatus ResponseStatus = 7;
}

message AmendmentRequestDocflow
{
required bool IsFinished = 1;
required SignedAttachmentV3 AmendmentRequest = 2;
optional Timestamp SentAt = 3;
optional Timestamp DeliveredAt = 4;
optional ReceiptDocflowV3 Receipt = 5;
required int32 AmendmentFlags = 6;
optional string PlainText = 7;
}

message RevocationDocflowV3
{
required bool IsFinished = 1;
required RevocationRequestDocflow RevocationRequest = 2;
optional RevocationResponseDocflow RevocationResponse = 3;
required string InitiatorBoxId = 4;
required Documents.RevocationStatus RevocationStatus = 5;
optional ResolutionEntitiesV3 ResolutionEntities = 6;
}

message RevocationRequestDocflow
{
required SignedAttachmentV3 RevocationRequest = 1;
optional Timestamp SentAt = 2;
optional Timestamp DeliveredAt = 3;
optional RoamingNotification RoamingNotification = 4;
optional string PlainText = 5;
}

message RevocationResponseDocflow
{
optional SignatureV3 RecipientSignature = 1;
optional SignatureRejectionDocflow SignatureRejection = 2;
}

message ReceiptDocflowV3
{
required bool IsFinished = 1;
optional SignedAttachmentV3 ReceiptAttachment = 2;
optional Timestamp SentAt = 3;
optional Timestamp DeliveredAt = 4;
optional ConfirmationDocflow Confirmation = 5;
required Documents.GeneralReceiptStatus Status = 6;
}
96 changes: 96 additions & 0 deletions proto/Docflow/DocumentInfoV3.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import "FullVersion.proto";
import "DocumentId.proto";
import "Timestamp.proto";
import "Documents/Document.proto";
import "LockMode.proto";
import "ForwardDocumentEvent.proto";
import "DocumentDirection.proto";
import "Events/DiadocMessage-PostApi.proto";
import "CustomDataItem.proto";

package Diadoc.Api.Proto.Docflow;

message DocumentInfoV3
{
required FullVersion FullVersion = 1;
required Documents.MessageType MessageType = 2;
required int32 WorkflowId = 3;
required DocumentParticipants Participants = 4;
required DocumentDirection DocumentDirection = 5;
required string DepartmentId = 6;
optional string CustomDocumentId = 7;
repeated Events.MetadataItem Metadata = 8;
repeated CustomDataItem CustomData = 9;
required DocumentLinks DocumentLinks = 10;
required PacketInfo PacketInfo = 11;
required bool IsRead = 12;
required bool IsDeleted = 13;
required bool IsInvitation = 14;
optional DocumentLetterInfo LetterInfo = 15;
optional DocumentDraftInfo DraftInfo = 16;
optional DocumentTemplateInfo TemplateInfo = 17;
optional Documents.Origin Origin = 18;
}

message DocumentParticipants
{
required DocumentParticipant Sender = 1;
optional DocumentParticipant Proxy = 2;
optional DocumentParticipant Recipient = 3;
required bool IsInternal = 4;
}

message DocumentParticipant
{
required string BoxId = 1;
optional string DepartmentId = 2;
}

message DocumentLinks
{
repeated DocumentId InitialIds = 1;
repeated DocumentId SubordinateIds = 2;
}

message PacketInfo
{
required LockMode LockMode = 1;
optional string PacketId = 2;
optional Timestamp AddedAt = 3;
}

message DocumentLetterInfo
{
required bool IsEncrypted = 1;
repeated ForwardDocumentEvent ForwardDocumentEvents = 2;
required bool IsTest = 3;
}

message DocumentDraftInfo
{
required bool IsRecycled = 1;
required bool IsLocked = 2;
repeated string TransformedToLetterIds = 3;
}

message DocumentTemplateInfo
{
required DocumentParticipants LetterParticipants = 1;
repeated string TransformedToLetterIds = 2;
repeated TemplateTransformationInfo TemplateTransformationInfos = 3;
optional TemplateRefusalInfo TemplateRefusalInfo = 4;
}

message TemplateTransformationInfo
{
required string TransformationId = 1;
optional DocumentId TransformedToDocumentId = 2;
optional string AuthorUserId = 3;
}

message TemplateRefusalInfo
{
required string BoxId = 1;
optional string AuthorUserId = 2;
optional string Comment = 3;
}
20 changes: 20 additions & 0 deletions proto/Docflow/DocumentWithDocflowV3.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import "DocumentId.proto";
import "Timestamp.proto";
import "Docflow/DocumentInfoV3.proto";
import "Docflow/DocflowV3.proto";

package Diadoc.Api.Proto.Docflow;

message DocumentWithDocflowV3
{
required DocumentId DocumentId = 1;
required LastEvent LastEvent = 2;
required DocumentInfoV3 DocumentInfo = 3;
required DocflowV3 Docflow = 4;
}

message LastEvent
{
required string EventId = 1;
required Timestamp Timestamp = 2;
}
2 changes: 1 addition & 1 deletion proto/Docflow/ResolutionDocflow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ package Diadoc.Api.Proto.Docflow;

message ResolutionDocflow
{
}
}
Loading

0 comments on commit b0769a1

Please sign in to comment.