Skip to content

Commit 3afa7b5

Browse files
authored
Merge pull request #1354 from diadoc/edop-1335-multititle-sdk
EDOP-1335 Реализовал поддержку многотитульных документов
2 parents cdfa907 + 07223cf commit 3afa7b5

26 files changed

Lines changed: 2197 additions & 15 deletions
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import "Timestamp.proto";
2+
3+
package Diadoc.Api.Proto.Docflow;
4+
5+
message DeliveryDocflowV5
6+
{
7+
required DeliveryStatusV5 Status = 1;
8+
optional Timestamp SentAt = 2;
9+
optional Timestamp DeliveredAt = 3;
10+
}
11+
12+
enum DeliveryStatusV5
13+
{
14+
DeliveryStatusUnknown = 0;
15+
DeliveryStatusNotReady = 1;
16+
DeliveryStatusDelivered = 2;
17+
DeliveryStatusFailed = 3;
18+
}

proto/Docflow/DocflowApiV5.proto

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import "Timestamp.proto";
2+
import "DocumentId.proto";
3+
import "TotalCountType.proto";
4+
import "Docflow/DocumentWithDocflowV5.proto";
5+
6+
package Diadoc.Api.Proto.Docflow;
7+
8+
message GetDocflowBatchResponseV5
9+
{
10+
repeated DocumentWithDocflowV5 Documents = 1;
11+
}
12+
13+
message SearchDocflowsResponseV5
14+
{
15+
repeated DocumentWithDocflowV5 Documents = 1;
16+
required bool HaveMoreDocuments = 2;
17+
}
18+
19+
message FetchedDocumentV5
20+
{
21+
required DocumentWithDocflowV5 Document = 1;
22+
required bytes IndexKey = 2;
23+
}
24+
25+
message GetDocflowsByPacketIdResponseV5
26+
{
27+
repeated FetchedDocumentV5 Documents = 1;
28+
optional bytes NextPageIndexKey = 2;
29+
}
30+
31+
message GetDocflowEventsResponseV5
32+
{
33+
optional int32 TotalCount = 1;
34+
repeated DocflowEventV5 Events = 2;
35+
required TotalCountType TotalCountType = 3;
36+
}
37+
38+
message DocflowEventV5
39+
{
40+
required string EventId = 1;
41+
required Timestamp Timestamp = 2;
42+
required DocumentId DocumentId = 3;
43+
required bytes IndexKey = 4;
44+
optional DocumentWithDocflowV5 Document = 5;
45+
optional string PreviousEventId = 6;
46+
optional DocumentWithDocflowV5 PreviousDocumentState = 7;
47+
}

proto/Docflow/DocflowV5.proto

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
import "Timestamp.proto";
2+
import "Documents/Document.proto";
3+
import "Documents/DocumentParticipantV2.proto";
4+
import "Docflow/AttachmentV3.proto";
5+
import "Docflow/DocflowV4.proto";
6+
import "Docflow/DocflowV3.proto";
7+
import "Docflow/DocumentInfoV5.proto";
8+
import "Docflow/DeliveryDocflowV5.proto";
9+
import "Docflow/OuterDocflowV5.proto";
10+
import "Docflow/OutOfWorkflowUniversalMessageDocflow.proto";
11+
import "Docflow/RoamingNotification.proto";
12+
import "Docflow/RevocationDocflowV5.proto";
13+
import "Docflow/ResolutionDocflowV5.proto";
14+
import "Docflow/UniversalMessageAttachmentDocflow.proto";
15+
import "DocflowStatusV3.proto";
16+
17+
package Diadoc.Api.Proto.Docflow;
18+
19+
message TitleDocflow
20+
{
21+
required int32 TitleIndex = 1;
22+
optional TitleVersionV5 Version = 2;
23+
required Documents.DocumentParticipantV2 Author = 3;
24+
required TitleAuthorDocflow AuthorSigning = 4;
25+
repeated TitleParticipantDocflow ParticipantDocflows = 5;
26+
optional OutOfWorkflowUniversalMessageDocflow OutOfWorkflowUniversalMessageDocflow = 6;
27+
}
28+
29+
message TitleVersionV5
30+
{
31+
required string EntityId = 1;
32+
required int32 Revision = 2;
33+
required TitleVersionStatusV5 Status = 3;
34+
optional string PreviousVersionEntityId = 4;
35+
}
36+
37+
enum TitleVersionStatusV5
38+
{
39+
TitleVersionStatusUnknown = 0;
40+
TitleVersionStatusCurrent = 1;
41+
TitleVersionStatusPending = 2;
42+
TitleVersionStatusHistorical = 3;
43+
}
44+
45+
message TitleAuthorDocflow
46+
{
47+
required bool IsFinished = 1;
48+
required TitleAuthorStatusV5 Status = 2;
49+
optional SignedAttachmentV3 Title = 3;
50+
optional TitleOperationResultV5 OperationResult = 4;
51+
}
52+
53+
enum TitleAuthorStatusV5
54+
{
55+
TitleAuthorStatusUnknown = 0;
56+
TitleAuthorStatusWaiting = 1;
57+
TitleAuthorStatusNotReadyToSign = 2;
58+
TitleAuthorStatusVerifying = 3;
59+
TitleAuthorStatusSigned = 4;
60+
TitleAuthorStatusInvalidSignature = 5;
61+
}
62+
63+
message TitleOperationResultV5
64+
{
65+
optional WellKnownTitleOperationResult WellKnown = 1;
66+
}
67+
68+
enum WellKnownTitleOperationResult
69+
{
70+
WellKnownTitleOperationResultUnknown = 0;
71+
WellKnownTitleOperationResultSigned = 1;
72+
WellKnownTitleOperationResultPartiallySigned = 2;
73+
WellKnownTitleOperationResultRejected = 3;
74+
}
75+
76+
message TitleParticipantDocflow
77+
{
78+
required Documents.DocumentParticipantV2 Participant = 1;
79+
optional TitleDeliveryDocflowV5 TitleDelivery = 2;
80+
optional TitleParticipantResponseDocflow Response = 3;
81+
optional ReceiptDocflowV5 Receipt = 4;
82+
}
83+
84+
message TitleDeliveryDocflowV5
85+
{
86+
optional DeliveryDocflowV5 Delivery = 1;
87+
optional ConfirmationDocflowV5 Confirmation = 2;
88+
optional RoamingNotification RoamingNotification = 3;
89+
}
90+
91+
message TitleParticipantResponseDocflow
92+
{
93+
required bool IsFinished = 1;
94+
required TitleParticipantResponseStatusV5 Status = 2;
95+
optional SignatureV3 Signature = 3;
96+
optional SignatureRejectionDocflowV4 Rejection = 4;
97+
optional ConfirmationDocflowV5 Confirmation = 5;
98+
optional DeliveryDocflowV5 Delivery = 6;
99+
}
100+
101+
enum TitleParticipantResponseStatusV5
102+
{
103+
TitleParticipantResponseStatusUnknown = 0;
104+
TitleParticipantResponseStatusNotAcceptable = 1;
105+
TitleParticipantResponseStatusWaiting = 2;
106+
TitleParticipantResponseStatusVerifying = 3;
107+
TitleParticipantResponseStatusSigned = 4;
108+
TitleParticipantResponseStatusSignatureRejected = 5;
109+
TitleParticipantResponseStatusInvalidSignature = 6;
110+
}
111+
112+
message ReceiptDocflowV5
113+
{
114+
required bool IsFinished = 1;
115+
optional SignedAttachmentV3 ReceiptAttachment = 2;
116+
optional Timestamp SentAt = 3;
117+
optional Timestamp DeliveredAt = 4;
118+
required Documents.GeneralReceiptStatus Status = 5;
119+
optional ConfirmationDocflowV5 Confirmation = 6;
120+
optional UniversalMessageAttachmentDocflow UniversalMessage = 7;
121+
}
122+
123+
message ConfirmationDocflowV5
124+
{
125+
required bool IsFinished = 1;
126+
optional SignedAttachmentV3 ConfirmationAttachment = 2;
127+
optional Timestamp ConfirmedAt = 3;
128+
optional ReceiptDocflowV5 Receipt = 4;
129+
optional OperatorConfirmationDocflow RoamingConfirmation = 5;
130+
}
131+
132+
message AmendmentRequestRecipientDocflow
133+
{
134+
required Documents.DocumentParticipantV2 Recipient = 1;
135+
optional ReceiptDocflowV5 Receipt = 2;
136+
optional DeliveryDocflowV5 Delivery = 3;
137+
optional ConfirmationDocflowV5 Confirmation = 4;
138+
}
139+
140+
message AmendmentRequestDocflowV5
141+
{
142+
required Documents.DocumentParticipantV2 Requester = 1;
143+
repeated AmendmentRequestRecipientDocflow RecipientDocflows = 2;
144+
required bool IsFinished = 3;
145+
optional SignedAttachmentV3 AmendmentRequest = 4;
146+
required int32 AmendmentFlags = 5;
147+
optional string PlainText = 6;
148+
optional UniversalMessageAttachmentDocflow UniversalMessage = 7;
149+
optional string TargetEntityId = 8;
150+
}
151+
152+
message DocflowV5
153+
{
154+
repeated TitleDocflow Titles = 1;
155+
repeated AmendmentRequestDocflowV5 AmendmentRequests = 2;
156+
optional RevocationDocflowV5 Revocation = 3;
157+
repeated OuterDocflowV5 OuterDocflows = 4;
158+
required DocflowStatusV3 DocflowStatus = 5;
159+
optional TtGisFixationDocflow TtGisFixation = 6;
160+
optional ResolutionDocflowV5 Resolution = 7;
161+
}

proto/Docflow/DocumentInfoV5.proto

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import "FullVersion.proto";
2+
import "Documents/Document.proto";
3+
import "Documents/DocumentParticipantV2.proto";
4+
import "DocumentDirection.proto";
5+
import "Events/DiadocMessage-PostApi.proto";
6+
import "CustomDataItem.proto";
7+
import "Docflow/DocumentInfoV3.proto";
8+
9+
package Diadoc.Api.Proto.Docflow;
10+
11+
message DocumentTemplateInfoV2
12+
{
13+
required Documents.DocumentParticipantsV2 LetterParticipants = 1;
14+
repeated string TransformedToLetterIds = 2;
15+
repeated TemplateTransformationInfo TemplateTransformationInfos = 3;
16+
optional TemplateRefusalInfo TemplateRefusalInfo = 4;
17+
optional bool IsReusable = 5 [default = false];
18+
}
19+
20+
message DocumentInfoV5
21+
{
22+
required FullVersion FullVersion = 1;
23+
required Documents.MessageType MessageType = 2;
24+
required int32 WorkflowId = 3;
25+
required Documents.DocumentParticipantsV2 Participants = 4;
26+
required DocumentDirection DocumentDirection = 5;
27+
required string DepartmentId = 6;
28+
optional string CustomDocumentId = 7;
29+
repeated Events.MetadataItem Metadata = 8;
30+
repeated CustomDataItem CustomData = 9;
31+
required DocumentLinks DocumentLinks = 10;
32+
required PacketInfo PacketInfo = 11;
33+
required bool IsRead = 12;
34+
required bool IsDeleted = 13;
35+
required bool IsInvitation = 14;
36+
optional DocumentLetterInfo LetterInfo = 15;
37+
optional DocumentDraftInfo DraftInfo = 16;
38+
optional DocumentTemplateInfoV2 TemplateInfo = 17;
39+
optional Documents.Origin Origin = 18;
40+
optional string EditingSettingId = 19 [default = ""];
41+
optional bool HasUnreadOutOfWorkflowUniversalMessages = 20 [default = true];
42+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import "DocumentId.proto";
2+
import "Docflow/DocumentInfoV5.proto";
3+
import "Docflow/DocflowV5.proto";
4+
import "Docflow/LastEvent.proto";
5+
6+
package Diadoc.Api.Proto.Docflow;
7+
8+
message DocumentWithDocflowV5
9+
{
10+
required DocumentId DocumentId = 1;
11+
required LastEvent LastEvent = 2;
12+
required DocumentInfoV5 DocumentInfo = 3;
13+
required DocflowV5 Docflow = 4;
14+
}

proto/Docflow/OuterDocflowV5.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import "Docflow/DocflowV3.proto";
2+
3+
package Diadoc.Api.Proto.Docflow;
4+
5+
message OuterDocflowV5
6+
{
7+
required string DocflowNamedId = 1;
8+
required string ParentEntityId = 2;
9+
required string LatestStatusEntityId = 3;
10+
required string DocflowFriendlyName = 4;
11+
repeated StatusEntity StatusEntities = 5;
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import "Docflow/ResolutionDocflowV3.proto";
2+
3+
package Diadoc.Api.Proto.Docflow;
4+
5+
message ResolutionDocflowV5
6+
{
7+
required bool IsFinished = 1;
8+
required ResolutionStatus ResolutionStatus = 2;
9+
optional string CurrentResolutionEntityId = 3;
10+
optional ResolutionEntitiesV3 ResolutionEntities = 4;
11+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import "Timestamp.proto";
2+
import "Documents/Document.proto";
3+
import "Documents/DocumentParticipantV2.proto";
4+
import "Docflow/AttachmentV3.proto";
5+
import "Docflow/DocflowV4.proto";
6+
import "Docflow/DocflowV3.proto";
7+
import "Docflow/DocumentInfoV5.proto";
8+
import "Docflow/OuterDocflowV5.proto";
9+
import "Docflow/RoamingNotification.proto";
10+
import "Docflow/ResolutionDocflowV5.proto";
11+
12+
package Diadoc.Api.Proto.Docflow;
13+
14+
message RevocationRequestDocflowV5
15+
{
16+
required SignedAttachmentV3 RevocationRequest = 1;
17+
optional Timestamp SentAt = 2;
18+
optional Timestamp DeliveredAt = 3;
19+
optional RoamingNotification RoamingNotification = 4;
20+
optional string PlainText = 5;
21+
}
22+
23+
message RevocationResponseDocflowV5
24+
{
25+
required Documents.DocumentParticipantV2 Participant = 1;
26+
required bool IsFinished = 2;
27+
optional SignatureV3 Signature = 3;
28+
optional SignatureRejectionDocflowV4 Rejection = 4;
29+
}
30+
31+
message RevocationDocflowV5
32+
{
33+
required bool IsFinished = 1;
34+
required RevocationRequestDocflowV5 RevocationRequest = 2;
35+
repeated RevocationResponseDocflowV5 RevocationResponse = 3;
36+
required Documents.DocumentParticipantV2 Initiator = 4;
37+
required Documents.RevocationStatus RevocationStatus = 5;
38+
optional ResolutionDocflowV5 Resolution = 6;
39+
repeated OuterDocflowV5 OuterDocflows = 7;
40+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import "Workflows/ParticipantType.proto";
2+
3+
package Diadoc.Api.Proto.Documents;
4+
5+
message DocumentParticipantFlags
6+
{
7+
required bool IsRoaming = 1;
8+
required bool IsCrossborder = 2;
9+
required bool IsForeign = 3;
10+
}
11+
12+
message DocumentParticipantV2
13+
{
14+
required string BoxId = 1;
15+
optional string DepartmentId = 2;
16+
required string Role = 3;
17+
required DocumentParticipantFlags Flags = 4;
18+
required Diadoc.Api.Proto.Workflows.ParticipantType.ParticipantType Type = 5;
19+
required bool IsCurrentBox = 6;
20+
}
21+
22+
message DocumentParticipantsV2
23+
{
24+
repeated DocumentParticipantV2 Participants = 1;
25+
}

proto/Events/DiadocMessage-GetApi.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ message Template {
7676
required LockMode LockMode = 10;
7777
optional string MessageProxyBoxId = 11;
7878
optional string MessageProxyDepartmentId = 12;
79-
optional bool IsReusable = 13 [default = false];
79+
optional bool IsReusable = 13 [default = false];
8080
}
8181

8282
message MessagePatch {

0 commit comments

Comments
 (0)