1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-02 13:53:23 +01:00
bitwarden-server/src/Core/Services/IOrganizationService.cs

42 lines
2.7 KiB
C#
Raw Normal View History

using System.Threading.Tasks;
using Bit.Core.Models.Business;
2017-03-09 03:45:08 +01:00
using Bit.Core.Models.Table;
using System;
2017-03-10 05:58:43 +01:00
using System.Collections.Generic;
using Bit.Core.Enums;
2017-05-11 20:52:35 +02:00
using Bit.Core.Models.Data;
namespace Bit.Core.Services
{
public interface IOrganizationService
{
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);
Task ReinstateSubscriptionAsync(Guid organizationId);
Task UpgradePlanAsync(Guid organizationId, PlanType plan, int additionalSeats);
2017-07-11 16:59:59 +02:00
Task AdjustStorageAsync(Guid organizationId, short storageAdjustmentGb);
Task AdjustSeatsAsync(Guid organizationId, int seatAdjustment);
2017-08-14 15:23:54 +02:00
Task VerifyBankAsync(Guid organizationId, int amount1, int amount2);
Task<Tuple<Organization, OrganizationUser>> SignUpAsync(OrganizationSignup organizationSignup);
2017-08-15 02:57:45 +02:00
Task<Tuple<Organization, OrganizationUser>> SignUpAsync(OrganizationLicense license, User owner, string ownerKey);
2017-08-15 04:05:37 +02:00
Task UpdateLicenseAsync(Guid organizationId, OrganizationLicense license);
2017-04-11 16:52:28 +02:00
Task DeleteAsync(Organization organization);
2017-08-13 04:16:42 +02:00
Task DisableAsync(Guid organizationId, DateTime? expirationDate);
Task UpdateExpirationDateAsync(Guid organizationId, DateTime? expirationDate);
Task EnableAsync(Guid organizationId);
2017-04-11 01:07:38 +02:00
Task UpdateAsync(Organization organization, bool updateBilling = false);
Task<OrganizationUser> InviteUserAsync(Guid organizationId, Guid invitingUserId, string email,
2017-05-16 06:11:21 +02:00
OrganizationUserType type, bool accessAll, string externalId, IEnumerable<SelectionReadOnly> collections);
2017-05-18 18:04:27 +02:00
Task<List<OrganizationUser>> InviteUserAsync(Guid organizationId, Guid invitingUserId, IEnumerable<string> emails,
OrganizationUserType type, bool accessAll, string externalId, IEnumerable<SelectionReadOnly> collections);
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);
Task<OrganizationUser> ConfirmUserAsync(Guid organizationId, Guid organizationUserId, string key, Guid confirmingUserId);
2017-05-11 20:52:35 +02:00
Task SaveUserAsync(OrganizationUser user, Guid savingUserId, IEnumerable<SelectionReadOnly> collections);
Task DeleteUserAsync(Guid organizationId, Guid organizationUserId, Guid deletingUserId);
2017-04-12 16:07:27 +02:00
Task DeleteUserAsync(Guid organizationId, Guid userId);
2017-05-16 06:11:21 +02:00
Task ImportAsync(Guid organizationId, Guid importingUserId, IEnumerable<ImportedGroup> groups,
IEnumerable<ImportedOrganizationUser> newUsers, IEnumerable<string> removeUserExternalIds);
}
}