// This file is auto-generated by @hey-api/openapi-ts

import { type Options, projectDeleteProjectSession, projectGetProject, projectPostProject, projectGetSumoAssets, projectGetGlobalConfigStatus, projectPostInitProject, projectPostGlobalConfig, projectPostLockAcquire, projectPostLockRelease, projectPostLockRefresh, projectGetLockStatus, projectPatchMasterdata, projectPatchModel, projectPatchAccess, projectPatchCacheMaxRevisions, projectGetRmsProjects, projectPatchRms, projectPatchRmsCoordinateSystem, projectPatchRmsStratigraphicFramework, projectPatchRmsWells, projectGetCache, projectGetCacheRevision, projectGetCacheDiff, projectPostCacheRestore, projectGetMappings, projectPutMappings, projectGetChangelog, userGetUser, userPatchApiKey, sessionGetSession, sessionPostSession, sessionPatchAccessToken, sessionPostRestore, rmsDeleteRmsProject, rmsPostRmsProject, rmsGetZones, rmsGetHorizons, rmsGetWells, rmsGetCoordinateSystem, smdaGetHealth, smdaPostField, smdaPostMasterdata, smdaPostStratUnits, matchGetStratigraphy, matchGetCoordinateSystem, healthV1HealthCheck, healthHealthCheck } from '../sdk.gen';
import { type UseMutationOptions, queryOptions, type DefaultError } from '@tanstack/react-query';
import type { ProjectDeleteProjectSessionData, ProjectDeleteProjectSessionError, ProjectDeleteProjectSessionResponse, ProjectGetProjectData, ProjectPostProjectData, ProjectPostProjectError, ProjectPostProjectResponse, ProjectGetSumoAssetsData, ProjectGetGlobalConfigStatusData, ProjectPostInitProjectData, ProjectPostInitProjectError, ProjectPostInitProjectResponse, ProjectPostGlobalConfigData, ProjectPostGlobalConfigResponse, ProjectPostLockAcquireData, ProjectPostLockAcquireError, ProjectPostLockAcquireResponse, ProjectPostLockReleaseData, ProjectPostLockReleaseError, ProjectPostLockReleaseResponse, ProjectPostLockRefreshData, ProjectPostLockRefreshError, ProjectPostLockRefreshResponse, ProjectGetLockStatusData, ProjectPatchMasterdataData, ProjectPatchMasterdataError, ProjectPatchMasterdataResponse, ProjectPatchModelData, ProjectPatchModelError, ProjectPatchModelResponse, ProjectPatchAccessData, ProjectPatchAccessError, ProjectPatchAccessResponse, ProjectPatchCacheMaxRevisionsData, ProjectPatchCacheMaxRevisionsError, ProjectPatchCacheMaxRevisionsResponse, ProjectGetRmsProjectsData, ProjectPatchRmsData, ProjectPatchRmsError, ProjectPatchRmsResponse, ProjectPatchRmsCoordinateSystemData, ProjectPatchRmsCoordinateSystemResponse, ProjectPatchRmsStratigraphicFrameworkData, ProjectPatchRmsStratigraphicFrameworkResponse, ProjectPatchRmsWellsData, ProjectPatchRmsWellsResponse, ProjectGetCacheData, ProjectGetCacheRevisionData, ProjectGetCacheDiffData, ProjectPostCacheRestoreData, ProjectPostCacheRestoreResponse, ProjectGetMappingsData, ProjectPutMappingsData, ProjectPutMappingsResponse, ProjectGetChangelogData, UserGetUserData, UserPatchApiKeyData, UserPatchApiKeyError, UserPatchApiKeyResponse, SessionGetSessionData, SessionPostSessionData, SessionPostSessionError, SessionPostSessionResponse, SessionPatchAccessTokenData, SessionPatchAccessTokenError, SessionPatchAccessTokenResponse, SessionPostRestoreData, SessionPostRestoreError, SessionPostRestoreResponse, RmsDeleteRmsProjectData, RmsDeleteRmsProjectError, RmsDeleteRmsProjectResponse, RmsPostRmsProjectData, RmsPostRmsProjectResponse, RmsGetZonesData, RmsGetHorizonsData, RmsGetWellsData, RmsGetCoordinateSystemData, SmdaGetHealthData, SmdaPostFieldData, SmdaPostFieldError, SmdaPostFieldResponse, SmdaPostMasterdataData, SmdaPostMasterdataResponse, SmdaPostStratUnitsData, SmdaPostStratUnitsResponse, MatchGetStratigraphyData, MatchGetCoordinateSystemData, HealthV1HealthCheckData, HealthHealthCheckData } from '../types.gen';
import type { AxiosError } from 'axios';
import { client as _heyApiClient } from '../client.gen';

export const projectDeleteProjectSessionMutation = (options?: Partial<Options<ProjectDeleteProjectSessionData>>): UseMutationOptions<ProjectDeleteProjectSessionResponse, AxiosError<ProjectDeleteProjectSessionError>, Options<ProjectDeleteProjectSessionData>> => {
    const mutationOptions: UseMutationOptions<ProjectDeleteProjectSessionResponse, AxiosError<ProjectDeleteProjectSessionError>, Options<ProjectDeleteProjectSessionData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectDeleteProjectSession({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export type QueryKey<TOptions extends Options> = [
    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {
        _id: string;
        _infinite?: boolean;
    }
];

const createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean): [
    QueryKey<TOptions>[0]
] => {
    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: (options?.client ?? _heyApiClient).getConfig().baseURL } as QueryKey<TOptions>[0];
    if (infinite) {
        params._infinite = infinite;
    }
    if (options?.body) {
        params.body = options.body;
    }
    if (options?.headers) {
        params.headers = options.headers;
    }
    if (options?.path) {
        params.path = options.path;
    }
    if (options?.query) {
        params.query = options.query;
    }
    return [
        params
    ];
};

export const projectGetProjectQueryKey = (options?: Options<ProjectGetProjectData>) => createQueryKey('projectGetProject', options);

export const projectGetProjectOptions = (options?: Options<ProjectGetProjectData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetProject({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetProjectQueryKey(options)
    });
};

export const projectPostProjectQueryKey = (options: Options<ProjectPostProjectData>) => createQueryKey('projectPostProject', options);

export const projectPostProjectOptions = (options: Options<ProjectPostProjectData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectPostProject({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectPostProjectQueryKey(options)
    });
};

export const projectPostProjectMutation = (options?: Partial<Options<ProjectPostProjectData>>): UseMutationOptions<ProjectPostProjectResponse, AxiosError<ProjectPostProjectError>, Options<ProjectPostProjectData>> => {
    const mutationOptions: UseMutationOptions<ProjectPostProjectResponse, AxiosError<ProjectPostProjectError>, Options<ProjectPostProjectData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPostProject({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectGetSumoAssetsQueryKey = (options?: Options<ProjectGetSumoAssetsData>) => createQueryKey('projectGetSumoAssets', options);

export const projectGetSumoAssetsOptions = (options?: Options<ProjectGetSumoAssetsData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetSumoAssets({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetSumoAssetsQueryKey(options)
    });
};

export const projectGetGlobalConfigStatusQueryKey = (options?: Options<ProjectGetGlobalConfigStatusData>) => createQueryKey('projectGetGlobalConfigStatus', options);

export const projectGetGlobalConfigStatusOptions = (options?: Options<ProjectGetGlobalConfigStatusData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetGlobalConfigStatus({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetGlobalConfigStatusQueryKey(options)
    });
};

export const projectPostInitProjectQueryKey = (options: Options<ProjectPostInitProjectData>) => createQueryKey('projectPostInitProject', options);

export const projectPostInitProjectOptions = (options: Options<ProjectPostInitProjectData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectPostInitProject({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectPostInitProjectQueryKey(options)
    });
};

export const projectPostInitProjectMutation = (options?: Partial<Options<ProjectPostInitProjectData>>): UseMutationOptions<ProjectPostInitProjectResponse, AxiosError<ProjectPostInitProjectError>, Options<ProjectPostInitProjectData>> => {
    const mutationOptions: UseMutationOptions<ProjectPostInitProjectResponse, AxiosError<ProjectPostInitProjectError>, Options<ProjectPostInitProjectData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPostInitProject({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPostGlobalConfigQueryKey = (options?: Options<ProjectPostGlobalConfigData>) => createQueryKey('projectPostGlobalConfig', options);

export const projectPostGlobalConfigOptions = (options?: Options<ProjectPostGlobalConfigData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectPostGlobalConfig({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectPostGlobalConfigQueryKey(options)
    });
};

export const projectPostGlobalConfigMutation = (options?: Partial<Options<ProjectPostGlobalConfigData>>): UseMutationOptions<ProjectPostGlobalConfigResponse, AxiosError<DefaultError>, Options<ProjectPostGlobalConfigData>> => {
    const mutationOptions: UseMutationOptions<ProjectPostGlobalConfigResponse, AxiosError<DefaultError>, Options<ProjectPostGlobalConfigData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPostGlobalConfig({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPostLockAcquireQueryKey = (options?: Options<ProjectPostLockAcquireData>) => createQueryKey('projectPostLockAcquire', options);

export const projectPostLockAcquireOptions = (options?: Options<ProjectPostLockAcquireData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectPostLockAcquire({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectPostLockAcquireQueryKey(options)
    });
};

export const projectPostLockAcquireMutation = (options?: Partial<Options<ProjectPostLockAcquireData>>): UseMutationOptions<ProjectPostLockAcquireResponse, AxiosError<ProjectPostLockAcquireError>, Options<ProjectPostLockAcquireData>> => {
    const mutationOptions: UseMutationOptions<ProjectPostLockAcquireResponse, AxiosError<ProjectPostLockAcquireError>, Options<ProjectPostLockAcquireData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPostLockAcquire({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPostLockReleaseQueryKey = (options?: Options<ProjectPostLockReleaseData>) => createQueryKey('projectPostLockRelease', options);

export const projectPostLockReleaseOptions = (options?: Options<ProjectPostLockReleaseData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectPostLockRelease({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectPostLockReleaseQueryKey(options)
    });
};

export const projectPostLockReleaseMutation = (options?: Partial<Options<ProjectPostLockReleaseData>>): UseMutationOptions<ProjectPostLockReleaseResponse, AxiosError<ProjectPostLockReleaseError>, Options<ProjectPostLockReleaseData>> => {
    const mutationOptions: UseMutationOptions<ProjectPostLockReleaseResponse, AxiosError<ProjectPostLockReleaseError>, Options<ProjectPostLockReleaseData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPostLockRelease({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPostLockRefreshQueryKey = (options?: Options<ProjectPostLockRefreshData>) => createQueryKey('projectPostLockRefresh', options);

export const projectPostLockRefreshOptions = (options?: Options<ProjectPostLockRefreshData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectPostLockRefresh({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectPostLockRefreshQueryKey(options)
    });
};

export const projectPostLockRefreshMutation = (options?: Partial<Options<ProjectPostLockRefreshData>>): UseMutationOptions<ProjectPostLockRefreshResponse, AxiosError<ProjectPostLockRefreshError>, Options<ProjectPostLockRefreshData>> => {
    const mutationOptions: UseMutationOptions<ProjectPostLockRefreshResponse, AxiosError<ProjectPostLockRefreshError>, Options<ProjectPostLockRefreshData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPostLockRefresh({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectGetLockStatusQueryKey = (options?: Options<ProjectGetLockStatusData>) => createQueryKey('projectGetLockStatus', options);

export const projectGetLockStatusOptions = (options?: Options<ProjectGetLockStatusData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetLockStatus({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetLockStatusQueryKey(options)
    });
};

export const projectPatchMasterdataMutation = (options?: Partial<Options<ProjectPatchMasterdataData>>): UseMutationOptions<ProjectPatchMasterdataResponse, AxiosError<ProjectPatchMasterdataError>, Options<ProjectPatchMasterdataData>> => {
    const mutationOptions: UseMutationOptions<ProjectPatchMasterdataResponse, AxiosError<ProjectPatchMasterdataError>, Options<ProjectPatchMasterdataData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPatchMasterdata({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPatchModelMutation = (options?: Partial<Options<ProjectPatchModelData>>): UseMutationOptions<ProjectPatchModelResponse, AxiosError<ProjectPatchModelError>, Options<ProjectPatchModelData>> => {
    const mutationOptions: UseMutationOptions<ProjectPatchModelResponse, AxiosError<ProjectPatchModelError>, Options<ProjectPatchModelData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPatchModel({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPatchAccessMutation = (options?: Partial<Options<ProjectPatchAccessData>>): UseMutationOptions<ProjectPatchAccessResponse, AxiosError<ProjectPatchAccessError>, Options<ProjectPatchAccessData>> => {
    const mutationOptions: UseMutationOptions<ProjectPatchAccessResponse, AxiosError<ProjectPatchAccessError>, Options<ProjectPatchAccessData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPatchAccess({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPatchCacheMaxRevisionsMutation = (options?: Partial<Options<ProjectPatchCacheMaxRevisionsData>>): UseMutationOptions<ProjectPatchCacheMaxRevisionsResponse, AxiosError<ProjectPatchCacheMaxRevisionsError>, Options<ProjectPatchCacheMaxRevisionsData>> => {
    const mutationOptions: UseMutationOptions<ProjectPatchCacheMaxRevisionsResponse, AxiosError<ProjectPatchCacheMaxRevisionsError>, Options<ProjectPatchCacheMaxRevisionsData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPatchCacheMaxRevisions({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectGetRmsProjectsQueryKey = (options?: Options<ProjectGetRmsProjectsData>) => createQueryKey('projectGetRmsProjects', options);

export const projectGetRmsProjectsOptions = (options?: Options<ProjectGetRmsProjectsData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetRmsProjects({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetRmsProjectsQueryKey(options)
    });
};

export const projectPatchRmsMutation = (options?: Partial<Options<ProjectPatchRmsData>>): UseMutationOptions<ProjectPatchRmsResponse, AxiosError<ProjectPatchRmsError>, Options<ProjectPatchRmsData>> => {
    const mutationOptions: UseMutationOptions<ProjectPatchRmsResponse, AxiosError<ProjectPatchRmsError>, Options<ProjectPatchRmsData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPatchRms({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPatchRmsCoordinateSystemMutation = (options?: Partial<Options<ProjectPatchRmsCoordinateSystemData>>): UseMutationOptions<ProjectPatchRmsCoordinateSystemResponse, AxiosError<DefaultError>, Options<ProjectPatchRmsCoordinateSystemData>> => {
    const mutationOptions: UseMutationOptions<ProjectPatchRmsCoordinateSystemResponse, AxiosError<DefaultError>, Options<ProjectPatchRmsCoordinateSystemData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPatchRmsCoordinateSystem({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPatchRmsStratigraphicFrameworkMutation = (options?: Partial<Options<ProjectPatchRmsStratigraphicFrameworkData>>): UseMutationOptions<ProjectPatchRmsStratigraphicFrameworkResponse, AxiosError<DefaultError>, Options<ProjectPatchRmsStratigraphicFrameworkData>> => {
    const mutationOptions: UseMutationOptions<ProjectPatchRmsStratigraphicFrameworkResponse, AxiosError<DefaultError>, Options<ProjectPatchRmsStratigraphicFrameworkData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPatchRmsStratigraphicFramework({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectPatchRmsWellsMutation = (options?: Partial<Options<ProjectPatchRmsWellsData>>): UseMutationOptions<ProjectPatchRmsWellsResponse, AxiosError<DefaultError>, Options<ProjectPatchRmsWellsData>> => {
    const mutationOptions: UseMutationOptions<ProjectPatchRmsWellsResponse, AxiosError<DefaultError>, Options<ProjectPatchRmsWellsData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPatchRmsWells({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectGetCacheQueryKey = (options: Options<ProjectGetCacheData>) => createQueryKey('projectGetCache', options);

export const projectGetCacheOptions = (options: Options<ProjectGetCacheData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetCache({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetCacheQueryKey(options)
    });
};

export const projectGetCacheRevisionQueryKey = (options: Options<ProjectGetCacheRevisionData>) => createQueryKey('projectGetCacheRevision', options);

export const projectGetCacheRevisionOptions = (options: Options<ProjectGetCacheRevisionData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetCacheRevision({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetCacheRevisionQueryKey(options)
    });
};

export const projectGetCacheDiffQueryKey = (options: Options<ProjectGetCacheDiffData>) => createQueryKey('projectGetCacheDiff', options);

export const projectGetCacheDiffOptions = (options: Options<ProjectGetCacheDiffData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetCacheDiff({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetCacheDiffQueryKey(options)
    });
};

export const projectPostCacheRestoreQueryKey = (options: Options<ProjectPostCacheRestoreData>) => createQueryKey('projectPostCacheRestore', options);

export const projectPostCacheRestoreOptions = (options: Options<ProjectPostCacheRestoreData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectPostCacheRestore({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectPostCacheRestoreQueryKey(options)
    });
};

export const projectPostCacheRestoreMutation = (options?: Partial<Options<ProjectPostCacheRestoreData>>): UseMutationOptions<ProjectPostCacheRestoreResponse, AxiosError<DefaultError>, Options<ProjectPostCacheRestoreData>> => {
    const mutationOptions: UseMutationOptions<ProjectPostCacheRestoreResponse, AxiosError<DefaultError>, Options<ProjectPostCacheRestoreData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPostCacheRestore({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectGetMappingsQueryKey = (options: Options<ProjectGetMappingsData>) => createQueryKey('projectGetMappings', options);

export const projectGetMappingsOptions = (options: Options<ProjectGetMappingsData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetMappings({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetMappingsQueryKey(options)
    });
};

export const projectPutMappingsMutation = (options?: Partial<Options<ProjectPutMappingsData>>): UseMutationOptions<ProjectPutMappingsResponse, AxiosError<DefaultError>, Options<ProjectPutMappingsData>> => {
    const mutationOptions: UseMutationOptions<ProjectPutMappingsResponse, AxiosError<DefaultError>, Options<ProjectPutMappingsData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await projectPutMappings({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const projectGetChangelogQueryKey = (options?: Options<ProjectGetChangelogData>) => createQueryKey('projectGetChangelog', options);

export const projectGetChangelogOptions = (options?: Options<ProjectGetChangelogData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await projectGetChangelog({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: projectGetChangelogQueryKey(options)
    });
};

export const userGetUserQueryKey = (options?: Options<UserGetUserData>) => createQueryKey('userGetUser', options);

export const userGetUserOptions = (options?: Options<UserGetUserData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await userGetUser({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: userGetUserQueryKey(options)
    });
};

export const userPatchApiKeyMutation = (options?: Partial<Options<UserPatchApiKeyData>>): UseMutationOptions<UserPatchApiKeyResponse, AxiosError<UserPatchApiKeyError>, Options<UserPatchApiKeyData>> => {
    const mutationOptions: UseMutationOptions<UserPatchApiKeyResponse, AxiosError<UserPatchApiKeyError>, Options<UserPatchApiKeyData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await userPatchApiKey({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const sessionGetSessionQueryKey = (options?: Options<SessionGetSessionData>) => createQueryKey('sessionGetSession', options);

export const sessionGetSessionOptions = (options?: Options<SessionGetSessionData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await sessionGetSession({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: sessionGetSessionQueryKey(options)
    });
};

export const sessionPostSessionQueryKey = (options?: Options<SessionPostSessionData>) => createQueryKey('sessionPostSession', options);

export const sessionPostSessionOptions = (options?: Options<SessionPostSessionData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await sessionPostSession({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: sessionPostSessionQueryKey(options)
    });
};

export const sessionPostSessionMutation = (options?: Partial<Options<SessionPostSessionData>>): UseMutationOptions<SessionPostSessionResponse, AxiosError<SessionPostSessionError>, Options<SessionPostSessionData>> => {
    const mutationOptions: UseMutationOptions<SessionPostSessionResponse, AxiosError<SessionPostSessionError>, Options<SessionPostSessionData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await sessionPostSession({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const sessionPatchAccessTokenMutation = (options?: Partial<Options<SessionPatchAccessTokenData>>): UseMutationOptions<SessionPatchAccessTokenResponse, AxiosError<SessionPatchAccessTokenError>, Options<SessionPatchAccessTokenData>> => {
    const mutationOptions: UseMutationOptions<SessionPatchAccessTokenResponse, AxiosError<SessionPatchAccessTokenError>, Options<SessionPatchAccessTokenData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await sessionPatchAccessToken({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const sessionPostRestoreQueryKey = (options?: Options<SessionPostRestoreData>) => createQueryKey('sessionPostRestore', options);

export const sessionPostRestoreOptions = (options?: Options<SessionPostRestoreData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await sessionPostRestore({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: sessionPostRestoreQueryKey(options)
    });
};

export const sessionPostRestoreMutation = (options?: Partial<Options<SessionPostRestoreData>>): UseMutationOptions<SessionPostRestoreResponse, AxiosError<SessionPostRestoreError>, Options<SessionPostRestoreData>> => {
    const mutationOptions: UseMutationOptions<SessionPostRestoreResponse, AxiosError<SessionPostRestoreError>, Options<SessionPostRestoreData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await sessionPostRestore({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const rmsDeleteRmsProjectMutation = (options?: Partial<Options<RmsDeleteRmsProjectData>>): UseMutationOptions<RmsDeleteRmsProjectResponse, AxiosError<RmsDeleteRmsProjectError>, Options<RmsDeleteRmsProjectData>> => {
    const mutationOptions: UseMutationOptions<RmsDeleteRmsProjectResponse, AxiosError<RmsDeleteRmsProjectError>, Options<RmsDeleteRmsProjectData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await rmsDeleteRmsProject({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const rmsPostRmsProjectQueryKey = (options?: Options<RmsPostRmsProjectData>) => createQueryKey('rmsPostRmsProject', options);

export const rmsPostRmsProjectOptions = (options?: Options<RmsPostRmsProjectData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await rmsPostRmsProject({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: rmsPostRmsProjectQueryKey(options)
    });
};

export const rmsPostRmsProjectMutation = (options?: Partial<Options<RmsPostRmsProjectData>>): UseMutationOptions<RmsPostRmsProjectResponse, AxiosError<DefaultError>, Options<RmsPostRmsProjectData>> => {
    const mutationOptions: UseMutationOptions<RmsPostRmsProjectResponse, AxiosError<DefaultError>, Options<RmsPostRmsProjectData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await rmsPostRmsProject({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const rmsGetZonesQueryKey = (options?: Options<RmsGetZonesData>) => createQueryKey('rmsGetZones', options);

export const rmsGetZonesOptions = (options?: Options<RmsGetZonesData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await rmsGetZones({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: rmsGetZonesQueryKey(options)
    });
};

export const rmsGetHorizonsQueryKey = (options?: Options<RmsGetHorizonsData>) => createQueryKey('rmsGetHorizons', options);

export const rmsGetHorizonsOptions = (options?: Options<RmsGetHorizonsData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await rmsGetHorizons({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: rmsGetHorizonsQueryKey(options)
    });
};

export const rmsGetWellsQueryKey = (options?: Options<RmsGetWellsData>) => createQueryKey('rmsGetWells', options);

export const rmsGetWellsOptions = (options?: Options<RmsGetWellsData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await rmsGetWells({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: rmsGetWellsQueryKey(options)
    });
};

export const rmsGetCoordinateSystemQueryKey = (options?: Options<RmsGetCoordinateSystemData>) => createQueryKey('rmsGetCoordinateSystem', options);

export const rmsGetCoordinateSystemOptions = (options?: Options<RmsGetCoordinateSystemData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await rmsGetCoordinateSystem({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: rmsGetCoordinateSystemQueryKey(options)
    });
};

export const smdaGetHealthQueryKey = (options?: Options<SmdaGetHealthData>) => createQueryKey('smdaGetHealth', options);

export const smdaGetHealthOptions = (options?: Options<SmdaGetHealthData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await smdaGetHealth({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: smdaGetHealthQueryKey(options)
    });
};

export const smdaPostFieldQueryKey = (options: Options<SmdaPostFieldData>) => createQueryKey('smdaPostField', options);

export const smdaPostFieldOptions = (options: Options<SmdaPostFieldData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await smdaPostField({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: smdaPostFieldQueryKey(options)
    });
};

export const smdaPostFieldMutation = (options?: Partial<Options<SmdaPostFieldData>>): UseMutationOptions<SmdaPostFieldResponse, AxiosError<SmdaPostFieldError>, Options<SmdaPostFieldData>> => {
    const mutationOptions: UseMutationOptions<SmdaPostFieldResponse, AxiosError<SmdaPostFieldError>, Options<SmdaPostFieldData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await smdaPostField({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const smdaPostMasterdataQueryKey = (options: Options<SmdaPostMasterdataData>) => createQueryKey('smdaPostMasterdata', options);

export const smdaPostMasterdataOptions = (options: Options<SmdaPostMasterdataData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await smdaPostMasterdata({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: smdaPostMasterdataQueryKey(options)
    });
};

export const smdaPostMasterdataMutation = (options?: Partial<Options<SmdaPostMasterdataData>>): UseMutationOptions<SmdaPostMasterdataResponse, AxiosError<DefaultError>, Options<SmdaPostMasterdataData>> => {
    const mutationOptions: UseMutationOptions<SmdaPostMasterdataResponse, AxiosError<DefaultError>, Options<SmdaPostMasterdataData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await smdaPostMasterdata({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const smdaPostStratUnitsQueryKey = (options: Options<SmdaPostStratUnitsData>) => createQueryKey('smdaPostStratUnits', options);

export const smdaPostStratUnitsOptions = (options: Options<SmdaPostStratUnitsData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await smdaPostStratUnits({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: smdaPostStratUnitsQueryKey(options)
    });
};

export const smdaPostStratUnitsMutation = (options?: Partial<Options<SmdaPostStratUnitsData>>): UseMutationOptions<SmdaPostStratUnitsResponse, AxiosError<DefaultError>, Options<SmdaPostStratUnitsData>> => {
    const mutationOptions: UseMutationOptions<SmdaPostStratUnitsResponse, AxiosError<DefaultError>, Options<SmdaPostStratUnitsData>> = {
        mutationFn: async (localOptions) => {
            const { data } = await smdaPostStratUnits({
                ...options,
                ...localOptions,
                throwOnError: true
            });
            return data;
        }
    };
    return mutationOptions;
};

export const matchGetStratigraphyQueryKey = (options?: Options<MatchGetStratigraphyData>) => createQueryKey('matchGetStratigraphy', options);

export const matchGetStratigraphyOptions = (options?: Options<MatchGetStratigraphyData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await matchGetStratigraphy({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: matchGetStratigraphyQueryKey(options)
    });
};

export const matchGetCoordinateSystemQueryKey = (options?: Options<MatchGetCoordinateSystemData>) => createQueryKey('matchGetCoordinateSystem', options);

export const matchGetCoordinateSystemOptions = (options?: Options<MatchGetCoordinateSystemData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await matchGetCoordinateSystem({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: matchGetCoordinateSystemQueryKey(options)
    });
};

export const healthV1HealthCheckQueryKey = (options?: Options<HealthV1HealthCheckData>) => createQueryKey('healthV1HealthCheck', options);

export const healthV1HealthCheckOptions = (options?: Options<HealthV1HealthCheckData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await healthV1HealthCheck({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: healthV1HealthCheckQueryKey(options)
    });
};

export const healthHealthCheckQueryKey = (options?: Options<HealthHealthCheckData>) => createQueryKey('healthHealthCheck', options);

export const healthHealthCheckOptions = (options?: Options<HealthHealthCheckData>) => {
    return queryOptions({
        queryFn: async ({ queryKey, signal }) => {
            const { data } = await healthHealthCheck({
                ...options,
                ...queryKey[0],
                signal,
                throwOnError: true
            });
            return data;
        },
        queryKey: healthHealthCheckQueryKey(options)
    });
};