2025-07-08 17:32:49 -04:00
|
|
|
|
// FIXME: Update this file to be null safe and then delete the line below
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
|
|
using Bit.Core.AdminConsole.Entities;
|
2025-09-05 12:01:14 +01:00
|
|
|
|
using Bit.Core.AdminConsole.Models.Business;
|
2023-04-14 13:25:56 -04:00
|
|
|
|
using Bit.Core.Auth.Enums;
|
2023-04-14 11:13:16 +01:00
|
|
|
|
using Bit.Core.Entities;
|
2017-04-10 11:49:53 -04:00
|
|
|
|
using Bit.Core.Enums;
|
2017-03-03 00:07:11 -05:00
|
|
|
|
using Bit.Core.Models.Business;
|
2017-05-11 14:52:35 -04:00
|
|
|
|
using Bit.Core.Models.Data;
|
2017-03-03 00:07:11 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Services;
|
2022-08-29 16:06:55 -04:00
|
|
|
|
|
2017-03-03 00:07:11 -05:00
|
|
|
|
public interface IOrganizationService
|
|
|
|
|
|
{
|
2017-04-10 18:20:21 -04:00
|
|
|
|
Task ReinstateSubscriptionAsync(Guid organizationId);
|
2019-08-10 12:59:32 -04:00
|
|
|
|
Task<string> AdjustStorageAsync(Guid organizationId, short storageAdjustmentGb);
|
2021-09-23 06:36:08 -04:00
|
|
|
|
Task UpdateSubscription(Guid organizationId, int seatAdjustment, int? maxAutoscaleSeats);
|
2024-06-03 13:18:46 -04:00
|
|
|
|
Task AutoAddSeatsAsync(Organization organization, int seatsToAdd);
|
|
|
|
|
|
Task<string> AdjustSeatsAsync(Guid organizationId, int seatAdjustment);
|
2017-08-12 22:16:42 -04:00
|
|
|
|
Task UpdateExpirationDateAsync(Guid organizationId, DateTime? expirationDate);
|
2025-09-05 12:01:14 +01:00
|
|
|
|
Task UpdateAsync(Organization organization, bool updateBilling = false);
|
|
|
|
|
|
Task<Organization> UpdateCollectionManagementSettingsAsync(Guid organizationId, OrganizationCollectionManagementSettings settings);
|
2018-04-02 23:18:26 -04:00
|
|
|
|
Task UpdateTwoFactorProviderAsync(Organization organization, TwoFactorProviderType type);
|
|
|
|
|
|
Task DisableTwoFactorProviderAsync(Organization organization, TwoFactorProviderType type);
|
2024-05-31 09:23:31 +10:00
|
|
|
|
Task<OrganizationUser> InviteUserAsync(Guid organizationId, Guid? invitingUserId, EventSystemUser? systemUser,
|
|
|
|
|
|
OrganizationUserInvite invite, string externalId);
|
|
|
|
|
|
Task<List<OrganizationUser>> InviteUsersAsync(Guid organizationId, Guid? invitingUserId, EventSystemUser? systemUser,
|
2021-09-23 06:36:08 -04:00
|
|
|
|
IEnumerable<(OrganizationUserInvite invite, string externalId)> invites);
|
2022-06-08 08:44:28 -05:00
|
|
|
|
Task UpdateUserResetPasswordEnrollmentAsync(Guid organizationId, Guid userId, string resetPasswordKey, Guid? callingUserId);
|
2020-08-26 14:12:04 -04:00
|
|
|
|
Task DeleteSsoUserAsync(Guid userId, Guid? organizationId);
|
2023-02-24 07:54:19 +10:00
|
|
|
|
Task ReplaceAndUpdateCacheAsync(Organization org, EventType? orgEvent = null);
|
2025-05-02 12:53:06 -04:00
|
|
|
|
Task<(bool canScale, string failureReason)> CanScaleAsync(Organization organization, int seatsToAdd);
|
2023-07-24 23:05:05 +01:00
|
|
|
|
|
|
|
|
|
|
void ValidatePasswordManagerPlan(Models.StaticStore.Plan plan, OrganizationUpgrade upgrade);
|
|
|
|
|
|
void ValidateSecretsManagerPlan(Models.StaticStore.Plan plan, OrganizationUpgrade upgrade);
|
2023-09-01 09:10:02 +01:00
|
|
|
|
Task ValidateOrganizationUserUpdatePermissions(Guid organizationId, OrganizationUserType newType,
|
|
|
|
|
|
OrganizationUserType? oldType, Permissions permissions);
|
2024-04-18 11:42:30 +01:00
|
|
|
|
Task ValidateOrganizationCustomPermissionsEnabledAsync(Guid organizationId, OrganizationUserType newType);
|
2017-03-03 00:07:11 -05:00
|
|
|
|
}
|