Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddcore-8002: added new methods for ca groups #284

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions proto/CounteragentGroups/CounteragentGroup.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import "CounteragentGroups/DepartmentsInGroup.proto";

package Diadoc.Api.Proto.CounteragentGroups;

message CounteragentGroup
{
required string CounteragentGroupId = 1;
required string Name = 2;
optional DepartmentsInGroup Departments = 3;
}
9 changes: 9 additions & 0 deletions proto/CounteragentGroups/CounteragentGroupToCreate.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import "CounteragentGroups/DepartmentsInGroup.proto";

package Diadoc.Api.Proto.CounteragentGroups;

message CounteragentGroupToCreate
{
required string Name = 1;
optional DepartmentsInGroup Departments = 2;
}
15 changes: 15 additions & 0 deletions proto/CounteragentGroups/CounteragentGroupToUpdate.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import "CounteragentGroups/DepartmentsInGroup.proto";

package Diadoc.Api.Proto.CounteragentGroups;

message CounteragentGroupToUpdate
{
optional string Name = 1;
optional CounteragentGroupDepartmentPatch GroupDepartments = 2;
}

message CounteragentGroupDepartmentPatch
{
required bool AnyDepartment = 1;
optional DepartmentsInGroup Departments = 2;
}
6 changes: 6 additions & 0 deletions proto/CounteragentGroups/DepartmentsInGroup.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package Diadoc.Api.Proto.CounteragentGroups;

message DepartmentsInGroup
{
repeated string DepartmentIds = 1;
}
6 changes: 6 additions & 0 deletions src/main/java/Diadoc/Api/DiadocApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Diadoc.Api.auth.AuthManager;
import Diadoc.Api.auth.AuthenticateClient;
import Diadoc.Api.counteragent.CounteragentClient;
import Diadoc.Api.counteragentGroup.CounteragentGroupClient;
import Diadoc.Api.department.DepartmentClient;
import Diadoc.Api.docflow.DocflowClient;
import Diadoc.Api.document.DocumentClient;
Expand Down Expand Up @@ -34,6 +35,7 @@ public class DiadocApi {
private EmployeeClient employeeClient;
private UserClient userClient;
private CounteragentClient counteragentClient;
private CounteragentGroupClient counteragentGroupClient;
private GenerateClient generateClient;
private ShelfClient shelfClient;
private MessageClient messageClient;
Expand Down Expand Up @@ -61,6 +63,7 @@ public DiadocApi(String apiClientId, String url, @Nullable HttpHost proxyHost, @
employeeClient = new EmployeeClient(diadocHttpClient);
userClient = new UserClient(diadocHttpClient);
counteragentClient = new CounteragentClient(diadocHttpClient);
counteragentGroupClient = new CounteragentGroupClient(diadocHttpClient);
generateClient = new GenerateClient(diadocHttpClient);
shelfClient = new ShelfClient(diadocHttpClient);
messageClient = new MessageClient(diadocHttpClient);
Expand Down Expand Up @@ -106,6 +109,9 @@ public CounteragentClient getCounteragentClient() {
return counteragentClient;
}

public CounteragentGroupClient getCounteragentGroupClient() {
return counteragentGroupClient;
}
ShineTear marked this conversation as resolved.
Show resolved Hide resolved
public GenerateClient getGenerateClient() {
return generateClient;
}
Expand Down
Loading