/** * 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 { CreatableUser } from '../../models/user/creatable-user'; import { UpdatableUser } from '../../models/user/updatable-user'; import { User } from '../../models/user/user'; import { NumericID } from '../../value-objects/id'; export interface UsersService { readonly get: { readonly me: () => Promise; readonly one: (userID: NumericID) => Promise; readonly many: (filter?: { groupID?: NumericID; }) => Promise>; readonly all: () => Promise>; }; readonly create: { readonly one: (data: CreatableUser) => Promise; }; readonly update: { readonly me: (data: Omit) => Promise; readonly one: (data: UpdatableUser) => Promise; }; readonly delete: { readonly one: (userID: NumericID) => Promise; }; }