import type { AxiosInstance } from 'contentful-sdk-core' ; import { CollectionProp , GetOrganizationParams , GetSpaceParams , QueryParams , } from '../../../common-types' ; import { UserProps } from '../../../entities/user' ; import { RestEndpoint } from '../types' ; import * as raw from './raw' ; export const getForSpace = ( http , params ) => { return raw . get < UserProps > ( http , `/spaces/${ params . spaceId }/users/${ params . userId }` ) ; } ; export const getCurrent = < T = UserProps > ( http , params ? ) => raw . get < T > ( http , `/users/me` , { params : params ?. query } ) ; export const getManyForSpace = ( http , params ) => { return raw . get < CollectionProp < UserProps > > ( http , `/spaces/${ params . spaceId }/users` , { params : params . query , } ) ; } ; export const getForOrganization = ( http , params ) => { return raw . get < UserProps > ( http , `/organizations/${ params . organizationId }/users/${ params . userId }` ) ; } ; export const getManyForOrganization = ( http , params ) => { return raw . get < CollectionProp < UserProps > > ( http , `/organizations/${ params . organizationId }/users` , { params : params . query , } ) ; } ;