/** * Copyright 2022 Gravwell, Inc. All rights reserved. * * Contact: [legal@gravwell.io](mailto:legal@gravwell.io) * * This software may be modified and distributed under the terms of the MIT * license. See the LICENSE file for details. */ import { CreatableGroup } from '../../models/group/creatable-group'; import { Group } from '../../models/group/group'; import { UpdatableGroup } from '../../models/group/updatable-group'; import { NumericID } from '../../value-objects/id'; export interface GroupsService { readonly create: { readonly one: (data: CreatableGroup) => Promise; }; readonly delete: { readonly one: (groupID: string) => Promise; }; readonly get: { readonly one: (groupID: string) => Promise; readonly many: (groupFilter?: { userID?: string | undefined; }) => Promise>; readonly all: () => Promise>; }; readonly update: { readonly one: (data: UpdatableGroup) => Promise; }; readonly addUserTo: { readonly one: (userID: NumericID, groupID: NumericID) => Promise; readonly many: (userID: string, groupIDs: Array) => Promise; }; readonly removeUserFrom: { readonly one: (userID: string, groupID: string) => Promise; }; }