2017-03-03 06:07:11 +01:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Bit.Core.Models.Business;
|
2017-03-09 03:45:08 +01:00
|
|
|
|
using Bit.Core.Models.Table;
|
2017-03-03 06:07:11 +01:00
|
|
|
|
using System;
|
2017-03-10 05:58:43 +01:00
|
|
|
|
using System.Collections.Generic;
|
2017-04-10 17:49:53 +02:00
|
|
|
|
using Bit.Core.Enums;
|
2017-03-03 06:07:11 +01:00
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Services
|
|
|
|
|
{
|
|
|
|
|
public interface IOrganizationService
|
|
|
|
|
{
|
2017-04-06 22:52:39 +02:00
|
|
|
|
Task<OrganizationBilling> GetBillingAsync(Organization organization);
|
2017-04-08 22:41:40 +02:00
|
|
|
|
Task ReplacePaymentMethodAsync(Guid organizationId, string paymentToken);
|
2017-04-09 00:15:20 +02:00
|
|
|
|
Task CancelSubscriptionAsync(Guid organizationId, bool endOfPeriod = false);
|
2017-04-11 00:20:21 +02:00
|
|
|
|
Task ReinstateSubscriptionAsync(Guid organizationId);
|
2017-04-10 17:49:53 +02:00
|
|
|
|
Task UpgradePlanAsync(Guid organizationId, PlanType plan, int additionalSeats);
|
|
|
|
|
Task AdjustSeatsAsync(Guid organizationId, int seatAdjustment);
|
2017-03-03 06:07:11 +01:00
|
|
|
|
Task<Tuple<Organization, OrganizationUser>> SignUpAsync(OrganizationSignup organizationSignup);
|
2017-04-11 16:52:28 +02:00
|
|
|
|
Task DeleteAsync(Organization organization);
|
2017-04-11 01:07:38 +02:00
|
|
|
|
Task UpdateAsync(Organization organization, bool updateBilling = false);
|
2017-03-23 05:17:34 +01:00
|
|
|
|
Task<OrganizationUser> InviteUserAsync(Guid organizationId, Guid invitingUserId, string email,
|
2017-04-21 05:50:12 +02:00
|
|
|
|
Enums.OrganizationUserType type, bool accessAllSubvaults, IEnumerable<SubvaultUser> subvaults);
|
2017-03-23 05:17:34 +01:00
|
|
|
|
Task ResendInviteAsync(Guid organizationId, Guid invitingUserId, Guid organizationUserId);
|
2017-03-05 03:28:41 +01:00
|
|
|
|
Task<OrganizationUser> AcceptUserAsync(Guid organizationUserId, User user, string token);
|
2017-03-23 05:17:34 +01:00
|
|
|
|
Task<OrganizationUser> ConfirmUserAsync(Guid organizationId, Guid organizationUserId, string key, Guid confirmingUserId);
|
|
|
|
|
Task SaveUserAsync(OrganizationUser user, Guid savingUserId, IEnumerable<SubvaultUser> subvaults);
|
|
|
|
|
Task DeleteUserAsync(Guid organizationId, Guid organizationUserId, Guid deletingUserId);
|
2017-04-12 16:07:27 +02:00
|
|
|
|
Task DeleteUserAsync(Guid organizationId, Guid userId);
|
2017-03-03 06:07:11 +01:00
|
|
|
|
}
|
|
|
|
|
}
|