/**
 * Generated by orval v8.23.0 🍺
 * Do not edit manually.
 * FastAPI
 * OpenAPI spec version: v2.2.0
 */
import type {
  HTTPValidationError,
  MessageResponse,
  OrganizationMemberResponse,
  OrganizationRequest,
  OrganizationResponse
} from '../model';

import { customInstance } from '.././client';

export type createOrganizationOrganizationsCreatePostResponse200 = {
  data: OrganizationResponse
  status: 200
}

export type createOrganizationOrganizationsCreatePostResponse422 = {
  data: HTTPValidationError
  status: 422
}

export type createOrganizationOrganizationsCreatePostResponseSuccess = (createOrganizationOrganizationsCreatePostResponse200) & {
  headers: Headers;
};
export type createOrganizationOrganizationsCreatePostResponseError = (createOrganizationOrganizationsCreatePostResponse422) & {
  headers: Headers;
};

export type createOrganizationOrganizationsCreatePostResponse = (createOrganizationOrganizationsCreatePostResponseSuccess | createOrganizationOrganizationsCreatePostResponseError)

export const getCreateOrganizationOrganizationsCreatePostUrl = () => {




  return `/organizations/create`
}

/**
 * Create a new organization
 *
 * Parameters:
 *     data (OrganizationRequest): The data to create the organization
 *
 * Returns:
 *     `Organization`: The created organization
 * @summary Create Organization
 */
export const createOrganizationOrganizationsCreatePost = async (organizationRequest: OrganizationRequest, options?: Parameters<typeof customInstance>[1]): Promise<createOrganizationOrganizationsCreatePostResponse> => {

  return customInstance<createOrganizationOrganizationsCreatePostResponse>(getCreateOrganizationOrganizationsCreatePostUrl(),
  {
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(organizationRequest)
  }
);}


export type getOrganizationsOrganizationsAllListGetResponse200 = {
  data: OrganizationResponse[]
  status: 200
}

export type getOrganizationsOrganizationsAllListGetResponseSuccess = (getOrganizationsOrganizationsAllListGetResponse200) & {
  headers: Headers;
};
;

export type getOrganizationsOrganizationsAllListGetResponse = (getOrganizationsOrganizationsAllListGetResponseSuccess)

export const getGetOrganizationsOrganizationsAllListGetUrl = () => {




  return `/organizations/all/list`
}

/**
 * Get all organizations on the server
 *
 * Returns:
 *     list[Organization]: A list of all organizations
 * @summary Get Organizations
 */
export const getOrganizationsOrganizationsAllListGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getOrganizationsOrganizationsAllListGetResponse> => {

  return customInstance<getOrganizationsOrganizationsAllListGetResponse>(getGetOrganizationsOrganizationsAllListGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


export type getUserOrganizationsOrganizationsMeListGetResponse200 = {
  data: OrganizationResponse[]
  status: 200
}

export type getUserOrganizationsOrganizationsMeListGetResponseSuccess = (getUserOrganizationsOrganizationsMeListGetResponse200) & {
  headers: Headers;
};
;

export type getUserOrganizationsOrganizationsMeListGetResponse = (getUserOrganizationsOrganizationsMeListGetResponseSuccess)

export const getGetUserOrganizationsOrganizationsMeListGetUrl = () => {




  return `/organizations/me/list`
}

/**
 * Get all organizations that the current user is a member of
 *
 * Returns:
 *     list[Organization]: A list of all organizations
 * @summary Get User Organizations
 */
export const getUserOrganizationsOrganizationsMeListGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getUserOrganizationsOrganizationsMeListGetResponse> => {

  return customInstance<getUserOrganizationsOrganizationsMeListGetResponse>(getGetUserOrganizationsOrganizationsMeListGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


export type getOrganizationOrganizationsOrganizationUuidGetResponse200 = {
  data: OrganizationResponse
  status: 200
}

export type getOrganizationOrganizationsOrganizationUuidGetResponse422 = {
  data: HTTPValidationError
  status: 422
}

export type getOrganizationOrganizationsOrganizationUuidGetResponseSuccess = (getOrganizationOrganizationsOrganizationUuidGetResponse200) & {
  headers: Headers;
};
export type getOrganizationOrganizationsOrganizationUuidGetResponseError = (getOrganizationOrganizationsOrganizationUuidGetResponse422) & {
  headers: Headers;
};

export type getOrganizationOrganizationsOrganizationUuidGetResponse = (getOrganizationOrganizationsOrganizationUuidGetResponseSuccess | getOrganizationOrganizationsOrganizationUuidGetResponseError)

export const getGetOrganizationOrganizationsOrganizationUuidGetUrl = (organizationUuid: string,) => {




  return `/organizations/${organizationUuid}`
}

/**
 * Get a specific organization
 *
 * Parameters:
 *     data (OrganizationUuidRequest): The data to get the organization
 *
 * Returns:
 *     `Organization`: The organization
 * @summary Get Organization
 */
export const getOrganizationOrganizationsOrganizationUuidGet = async (organizationUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<getOrganizationOrganizationsOrganizationUuidGetResponse> => {

  return customInstance<getOrganizationOrganizationsOrganizationUuidGetResponse>(getGetOrganizationOrganizationsOrganizationUuidGetUrl(organizationUuid),
  {
    ...options,
    method: 'GET'


  }
);}


export type deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponse200 = {
  data: MessageResponse
  status: 200
}

export type deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponse422 = {
  data: HTTPValidationError
  status: 422
}

export type deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponseSuccess = (deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponse200) & {
  headers: Headers;
};
export type deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponseError = (deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponse422) & {
  headers: Headers;
};

export type deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponse = (deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponseSuccess | deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponseError)

export const getDeleteOrganizationOrganizationsDeleteOrganizationUuidDeleteUrl = (organizationUuid: string,) => {




  return `/organizations/delete/${organizationUuid}`
}

/**
 * Delete a specific organization
 *
 * Parameters:
 *     data (OrganizationUuidRequest): The data to delete the organization
 *
 * Returns:
 *     `MessageResponse`: A message indicating that the organization was deleted
 * @summary Delete Organization
 */
export const deleteOrganizationOrganizationsDeleteOrganizationUuidDelete = async (organizationUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponse> => {

  return customInstance<deleteOrganizationOrganizationsDeleteOrganizationUuidDeleteResponse>(getDeleteOrganizationOrganizationsDeleteOrganizationUuidDeleteUrl(organizationUuid),
  {
    ...options,
    method: 'DELETE'


  }
);}


export type getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponse200 = {
  data: OrganizationMemberResponse[]
  status: 200
}

export type getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponse422 = {
  data: HTTPValidationError
  status: 422
}

export type getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponseSuccess = (getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponse200) & {
  headers: Headers;
};
export type getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponseError = (getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponse422) & {
  headers: Headers;
};

export type getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponse = (getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponseSuccess | getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponseError)

export const getGetOrganizationMembersOrganizationsOrganizationUuidMembersGetUrl = (organizationUuid: string,) => {




  return `/organizations/${organizationUuid}/members`
}

/**
 * Get all members of a specific organization
 *
 * Parameters:
 *     data (OrganizationUuidRequest): The data to get the organization members
 *
 * Returns:
 *     list[OrganizationMember]: A list of all organization members
 * @summary Get Organization Members
 */
export const getOrganizationMembersOrganizationsOrganizationUuidMembersGet = async (organizationUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponse> => {

  return customInstance<getOrganizationMembersOrganizationsOrganizationUuidMembersGetResponse>(getGetOrganizationMembersOrganizationsOrganizationUuidMembersGetUrl(organizationUuid),
  {
    ...options,
    method: 'GET'


  }
);}


