mirror of
https://github.com/bitwarden/server.git
synced 2025-04-29 08:42:19 -05:00

* Added a button for resending provider setup emails * Fixed a case typo in a stored procedure * Turned a couple lines of code into a method call * Added service level validation against inviting users for MSP invites * Code review improvements for provider invites created a factory for provider user invites wrote tests for provider invite permissions" * changed a few exception types
35 lines
1.6 KiB
C#
35 lines
1.6 KiB
C#
using System.Threading.Tasks;
|
|
using Bit.Core.Models.Table;
|
|
using System.Collections.Generic;
|
|
using System;
|
|
using Bit.Core.Models.Business;
|
|
using Bit.Core.Models.Business.Provider;
|
|
using Bit.Core.Models.Table.Provider;
|
|
|
|
namespace Bit.Core.Services
|
|
{
|
|
public interface IProviderService
|
|
{
|
|
Task CreateAsync(string ownerEmail);
|
|
Task<Provider> CompleteSetupAsync(Provider provider, Guid ownerUserId, string token, string key);
|
|
Task UpdateAsync(Provider provider, bool updateBilling = false);
|
|
|
|
Task<List<ProviderUser>> InviteUserAsync(ProviderUserInvite<string> invite);
|
|
Task<List<Tuple<ProviderUser, string>>> ResendInvitesAsync(ProviderUserInvite<Guid> invite);
|
|
Task<ProviderUser> AcceptUserAsync(Guid providerUserId, User user, string token);
|
|
Task<List<Tuple<ProviderUser, string>>> ConfirmUsersAsync(Guid providerId, Dictionary<Guid, string> keys, Guid confirmingUserId);
|
|
|
|
Task SaveUserAsync(ProviderUser user, Guid savingUserId);
|
|
Task<List<Tuple<ProviderUser, string>>> DeleteUsersAsync(Guid providerId, IEnumerable<Guid> providerUserIds,
|
|
Guid deletingUserId);
|
|
|
|
Task AddOrganization(Guid providerId, Guid organizationId, Guid addingUserId, string key);
|
|
Task<ProviderOrganization> CreateOrganizationAsync(Guid providerId, OrganizationSignup organizationSignup,
|
|
string clientOwnerEmail, User user);
|
|
Task RemoveOrganizationAsync(Guid providerId, Guid providerOrganizationId, Guid removingUserId);
|
|
Task LogProviderAccessToOrganizationAsync(Guid organizationId);
|
|
Task ResendProviderSetupInviteEmailAsync(Guid providerId, Guid ownerId);
|
|
}
|
|
}
|
|
|