From 4dde5b9c03aea2711437d3fb60a3b41e122411ff Mon Sep 17 00:00:00 2001 From: trofimov Date: Tue, 14 Jan 2025 14:06:27 +0500 Subject: [PATCH] delete UpdateMyUser, UserToUpdate --- proto/Users/UserToUpdate.proto | 19 ------- src/Com/Users.cs | 53 ------------------ src/ComDiadocApi.cs | 7 --- src/DiadocApi.Async.cs | 8 --- src/DiadocApi.cs | 8 --- src/DiadocHttpApi.References.cs | 6 -- src/DiadocHttpApi.ReferencesAsync.cs | 6 -- src/IDiadocApi.cs | 3 - src/Proto/Users/UserToUpdate.proto.cs | 80 --------------------------- 9 files changed, 190 deletions(-) delete mode 100644 proto/Users/UserToUpdate.proto delete mode 100644 src/Com/Users.cs delete mode 100644 src/Proto/Users/UserToUpdate.proto.cs diff --git a/proto/Users/UserToUpdate.proto b/proto/Users/UserToUpdate.proto deleted file mode 100644 index 611538b5..00000000 --- a/proto/Users/UserToUpdate.proto +++ /dev/null @@ -1,19 +0,0 @@ -import "User.proto"; - -package Diadoc.Api.Proto.Users; - -message UserToUpdate -{ - optional UserLoginPatch Login = 1; - optional UserFullNamePatch FullName = 2; -} - -message UserLoginPatch -{ - optional string Login = 1; -} - -message UserFullNamePatch -{ - optional FullName FullName = 1; -} \ No newline at end of file diff --git a/src/Com/Users.cs b/src/Com/Users.cs deleted file mode 100644 index cdf72a92..00000000 --- a/src/Com/Users.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.InteropServices; - -namespace Diadoc.Api.Proto.Users -{ - [ComVisible(true)] - [Guid("90688E07-B2B0-4423-87D2-52F27D231D25")] - public interface IUserToUpdate - { - UserLoginPatch Login { get; set; } - UserFullNamePatch FullName { get; set; } - } - - [ComVisible(true)] - [ProgId("Diadoc.Api.UserToUpdate")] - [Guid("7C44B38B-E8FF-4E56-91F5-DBDC2ECC6A37")] - [ClassInterface(ClassInterfaceType.None)] - [ComDefaultInterface(typeof(IUserToUpdate))] - public partial class UserToUpdate : SafeComObject, IUserToUpdate - { - } - - [ComVisible(true)] - [Guid("62B9735D-E1FA-4A0E-8BF8-86031B52F3CA")] - public interface IUserLoginPatch - { - string Login { get; set; } - } - - [ComVisible(true)] - [ProgId("Diadoc.Api.UserLoginPatch")] - [Guid("1D89A3C1-C44D-46C8-A255-1B9CB7604538")] - [ClassInterface(ClassInterfaceType.None)] - [ComDefaultInterface(typeof(IUserLoginPatch))] - public partial class UserLoginPatch : SafeComObject, IUserLoginPatch - { - } - - [ComVisible(true)] - [Guid("47E724F1-E794-4073-B40D-E7663FBD93EF")] - public interface IUserFullNamePatch - { - FullName FullName { get; set; } - } - - [ComVisible(true)] - [ProgId("Diadoc.Api.UserFullNamePatch")] - [Guid("619A4FF0-49F3-4448-A966-343C0F29FDB5")] - [ClassInterface(ClassInterfaceType.None)] - [ComDefaultInterface(typeof(IUserFullNamePatch))] - public partial class UserFullNamePatch : SafeComObject, IUserFullNamePatch - { - } -} \ No newline at end of file diff --git a/src/ComDiadocApi.cs b/src/ComDiadocApi.cs index 5cbb341f..438ed88a 100644 --- a/src/ComDiadocApi.cs +++ b/src/ComDiadocApi.cs @@ -25,7 +25,6 @@ using Diadoc.Api.Proto.PowersOfAttorney; using Diadoc.Api.Proto.Recognition; using Diadoc.Api.Proto.Registration; -using Diadoc.Api.Proto.Users; using Diadoc.Api.Proto.Workflows; using JetBrains.Annotations; using Department = Diadoc.Api.Proto.Department; @@ -586,7 +585,6 @@ PrepareDocumentsToSignResponse PrepareDocumentsToSign( User GetMyUser(string authToken); UserV2 GetMyUserV2(string authToken); - UserV2 UpdateMyUser(string authToken, [MarshalAs(UnmanagedType.IDispatch)] object userToUpdate); CertificateList GetMyCertificates(string authToken, string boxId); AsyncMethodResult CloudSign(string authToken, [MarshalAs(UnmanagedType.IDispatch)] object request, string certificateThumbprint); @@ -1714,11 +1712,6 @@ public UserV2 GetMyUserV2(string authToken) return diadoc.GetMyUserV2(authToken); } - public UserV2 UpdateMyUser(string authToken, object userToUpdate) - { - return diadoc.UpdateMyUser(authToken, (UserToUpdate) userToUpdate); - } - public CertificateList GetMyCertificates(string authToken, string boxId) { return diadoc.GetMyCertificates(authToken, boxId); diff --git a/src/DiadocApi.Async.cs b/src/DiadocApi.Async.cs index 20b69d2e..792e1287 100644 --- a/src/DiadocApi.Async.cs +++ b/src/DiadocApi.Async.cs @@ -17,7 +17,6 @@ using Diadoc.Api.Proto.Organizations; using Diadoc.Api.Proto.Recognition; using Diadoc.Api.Proto.Registration; -using Diadoc.Api.Proto.Users; using JetBrains.Annotations; using DocumentType = Diadoc.Api.Proto.DocumentType; using Employee = Diadoc.Api.Proto.Employees.Employee; @@ -114,13 +113,6 @@ public Task GetMyUserV2Async(string authToken) return diadocHttpApi.GetMyUserV2Async(authToken); } - public Task UpdateMyUserAsync(string authToken, UserToUpdate userToUpdate) - { - if (authToken == null) throw new ArgumentNullException("authToken"); - if (userToUpdate == null) throw new ArgumentNullException("userToUpdate"); - return diadocHttpApi.UpdateMyUserAsync(authToken, userToUpdate); - } - public Task GetMyCertificatesAsync(string authToken, string boxId) { if (authToken == null) throw new ArgumentNullException("authToken"); diff --git a/src/DiadocApi.cs b/src/DiadocApi.cs index b962dc12..597f5cde 100644 --- a/src/DiadocApi.cs +++ b/src/DiadocApi.cs @@ -24,7 +24,6 @@ using Diadoc.Api.Proto.PowersOfAttorney; using Diadoc.Api.Proto.Recognition; using Diadoc.Api.Proto.Registration; -using Diadoc.Api.Proto.Users; using Diadoc.Api.Proto.Workflows; using JetBrains.Annotations; using Department = Diadoc.Api.Proto.Department; @@ -188,13 +187,6 @@ public UserV2 GetMyUserV2(string authToken) return diadocHttpApi.GetMyUserV2(authToken); } - public UserV2 UpdateMyUser(string authToken, UserToUpdate userToUpdate) - { - if (authToken == null) throw new ArgumentNullException("authToken"); - if (userToUpdate == null) throw new ArgumentNullException("userToUpdate"); - return diadocHttpApi.UpdateMyUser(authToken, userToUpdate); - } - public CertificateList GetMyCertificates(string authToken, string boxId) { if (authToken == null) throw new ArgumentNullException("authToken"); diff --git a/src/DiadocHttpApi.References.cs b/src/DiadocHttpApi.References.cs index 382a3e19..6010ec02 100644 --- a/src/DiadocHttpApi.References.cs +++ b/src/DiadocHttpApi.References.cs @@ -5,7 +5,6 @@ using Diadoc.Api.Http; using Diadoc.Api.Proto; using Diadoc.Api.Proto.Certificates; -using Diadoc.Api.Proto.Users; namespace Diadoc.Api { @@ -35,11 +34,6 @@ public UserV2 GetMyUserV2(string authToken) return PerformHttpRequest(authToken, "GET", "/V2/GetMyUser"); } - public UserV2 UpdateMyUser(string authToken, UserToUpdate userToUpdate) - { - return PerformHttpRequest(authToken, "/UpdateMyUser", userToUpdate); - } - public CertificateList GetMyCertificates(string authToken, string boxId) { var queryBuilder = new PathAndQueryBuilder("/GetMyCertificates"); diff --git a/src/DiadocHttpApi.ReferencesAsync.cs b/src/DiadocHttpApi.ReferencesAsync.cs index 12cac3eb..68963adf 100644 --- a/src/DiadocHttpApi.ReferencesAsync.cs +++ b/src/DiadocHttpApi.ReferencesAsync.cs @@ -6,7 +6,6 @@ using Diadoc.Api.Http; using Diadoc.Api.Proto; using Diadoc.Api.Proto.Certificates; -using Diadoc.Api.Proto.Users; namespace Diadoc.Api { @@ -35,11 +34,6 @@ public Task GetMyUserV2Async(string authToken) { return PerformHttpRequestAsync(authToken, "GET", "/V2/GetMyUser"); } - - public Task UpdateMyUserAsync(string authToken, UserToUpdate userToUpdate) - { - return PerformHttpRequestAsync(authToken, "/UpdateMyUser", userToUpdate); - } public Task GetMyCertificatesAsync(string authToken, string boxId) { diff --git a/src/IDiadocApi.cs b/src/IDiadocApi.cs index 8f3f615d..e0425611 100644 --- a/src/IDiadocApi.cs +++ b/src/IDiadocApi.cs @@ -19,7 +19,6 @@ using Diadoc.Api.Proto.KeyValueStorage; using Diadoc.Api.Proto.Organizations; using Diadoc.Api.Proto.Registration; -using Diadoc.Api.Proto.Users; using Departments = Diadoc.Api.Proto.Departments; using DocumentType = Diadoc.Api.Proto.DocumentType; using Employee = Diadoc.Api.Proto.Employees.Employee; @@ -278,7 +277,6 @@ byte[] ParseTitleXml( [Obsolete("Use GetMyUserV2")] User GetMyUser(string authToken); UserV2 GetMyUserV2(string authToken); - UserV2 UpdateMyUser(string authToken, UserToUpdate userToUpdate); CertificateList GetMyCertificates(string authToken, string boxId); AsyncMethodResult CloudSign(string authToken, CloudSignRequest request, string certificateThumbprint); CloudSignResult WaitCloudSignResult(string authToken, string taskId, TimeSpan? timeout = null); @@ -403,7 +401,6 @@ Task AuthenticateWithKeyAsync(byte[] certificateBytes, bool useLocalSyst [Obsolete("Use GetMyUserV2Async")] Task GetMyUserAsync(string authToken); Task GetMyUserV2Async(string authToken); - Task UpdateMyUserAsync(string authToken, UserToUpdate userToUpdate); Task GetMyCertificatesAsync(string authToken, string boxId); [Obsolete(ObsoleteReasons.UseAuthTokenOverload)] Task GetOrganizationsByInnKppAsync(string inn, string kpp, bool includeRelations = false); diff --git a/src/Proto/Users/UserToUpdate.proto.cs b/src/Proto/Users/UserToUpdate.proto.cs deleted file mode 100644 index 1ea18b0d..00000000 --- a/src/Proto/Users/UserToUpdate.proto.cs +++ /dev/null @@ -1,80 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Generated from: Users/UserToUpdate.proto -// Note: requires additional types generated from: User.proto -namespace Diadoc.Api.Proto.Users -{ - [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"UserToUpdate")] - public partial class UserToUpdate : global::ProtoBuf.IExtensible - { - public UserToUpdate() {} - - - private Diadoc.Api.Proto.Users.UserLoginPatch _Login = null; - [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"Login", DataFormat = global::ProtoBuf.DataFormat.Default)] - [global::System.ComponentModel.DefaultValue(null)] - public Diadoc.Api.Proto.Users.UserLoginPatch Login - { - get { return _Login; } - set { _Login = value; } - } - - private Diadoc.Api.Proto.Users.UserFullNamePatch _FullName = null; - [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"FullName", DataFormat = global::ProtoBuf.DataFormat.Default)] - [global::System.ComponentModel.DefaultValue(null)] - public Diadoc.Api.Proto.Users.UserFullNamePatch FullName - { - get { return _FullName; } - set { _FullName = 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=@"UserLoginPatch")] - public partial class UserLoginPatch : global::ProtoBuf.IExtensible - { - public UserLoginPatch() {} - - - private string _Login = ""; - [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"Login", DataFormat = global::ProtoBuf.DataFormat.Default)] - [global::System.ComponentModel.DefaultValue("")] - public string Login - { - get { return _Login; } - set { _Login = 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=@"UserFullNamePatch")] - public partial class UserFullNamePatch : global::ProtoBuf.IExtensible - { - public UserFullNamePatch() {} - - - private Diadoc.Api.Proto.FullName _FullName = null; - [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"FullName", DataFormat = global::ProtoBuf.DataFormat.Default)] - [global::System.ComponentModel.DefaultValue(null)] - public Diadoc.Api.Proto.FullName FullName - { - get { return _FullName; } - set { _FullName = 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