2026-10-05 18:10:18 -04:00
// Generated by @hey-api/openapi-ts.
// Do not edit this directory by hand; run npm run api:generate instead.
import { type DefaultError , type InfiniteData , infiniteQueryOptions , queryOptions , type UseMutationOptions } from '@tanstack/react-query' ;
import type { AxiosError } from 'axios' ;
import { client } from '../client.gen' ;
2026-10-12 07:47:42 -04:00
import { adminActivateTheme , adminAttachEggsToMount , adminAttachNodesToMount , adminAttachServerMount , adminBulkDeleteNodeAllocations , adminClearExtensionSettingFile , adminClearThemeImage , adminCreateApiKey , adminCreateDatabaseHost , adminCreateEgg , adminCreateEggVariable , adminCreateLocation , adminCreateMount , adminCreateNode , adminCreateNodeAllocations , adminCreateNodeDeployToken , adminCreateServer , adminCreateServerDatabase , adminCreateTag , adminCreateUser , adminDeleteApiKey , adminDeleteDatabaseHost , adminDeleteEgg , adminDeleteEggVariable , adminDeleteLocation , adminDeleteMount , adminDeleteNode , adminDeleteNodeAllocation , adminDeleteNodeAllocationIpBlock , adminDeleteServer , adminDeleteServerDatabase , adminDeleteTag , adminDeleteUser , adminDetachEggFromMount , adminDetachNodeFromMount , adminDetachServerMount , adminDisableExtension , adminDisableUserTwoFactorAuthentication , adminEnableExtension , adminExportEgg , adminForceDeleteServer , adminGetApiKey , adminGetDatabaseHost , adminGetEgg , adminGetEggInstallScript , adminGetExtensionIcon , adminGetExtensionSettings , adminGetLocation , adminGetMount , adminGetNode , adminGetNodeConfiguration , adminGetNodeSystemInformation , adminGetNodeUtilization , adminGetServer , adminGetServerByExternalId , adminGetServerDatabase , adminGetServerTransferProgress , adminGetSettings , adminGetTag , adminGetThemeSettings , adminGetUser , adminGetUserByExternalId , adminGetVersionInformation , adminImportCatalogEgg , adminImportEgg , adminInstallExtension , adminListActivity , adminListActivityFilterOptions , adminListApiKeys , adminListAvailableNodeAllocations , adminListDatabaseHostDatabases , adminListDatabaseHosts , adminListEggCatalog , adminListEggs , adminListEggVariables , adminListEligibleLocationNodes , adminListExtensionForms , adminListExtensions , adminListLanguages , adminListLocations , adminListMounts , adminListNodeAllocationIps , adminListNodeAllocations , adminListNodes , adminListServerBackups , adminListServerDatabases , adminListServerMounts , adminListServers , adminListTags , adminListThemes , adminListUsers , adminPreviewTheme , adminRebuildServer , adminRefreshEggCatalog , adminReinstallServer , adminRemoveExtension , adminReorderEggVariables , adminResetTheme , adminRotateServerDatabasePassword , adminSendTestMail , adminStopThemePreview , adminSyncEggTags , adminSyncNodeDeploymentTags , adminSyncNodeGameTags , adminToggleServerBackupLock , adminToggleServerInstallState , adminTransferServer , adminUpdateAdvancedSettings , adminUpdateApiKey , adminUpdateDatabaseHost , adminUpdateEgg , adminUpdateEggFromImport , adminUpdateEggInstallScript , adminUpdateEggVariable , adminUpdateExtensionSettings , adminUpdateGeneralSettings , adminUpdateLocation , adminUpdateMailSettings , adminUpdateMount , adminUpdateNode , adminUpdateNodeAllocation , adminUpdateServerBuild , adminUpdateServerDetails , adminUpdateServerStartup , adminUpdateServerSuspension , adminUpdateTag , adminUpdateThemeSettings , adminUpdateUser , adminUploadExtensionSettingFile , adminUploadThemeImage , applicationCreateLocation , applicationCreateNode , applicationCreateNodeAllocations , applicationCreateServer , applicationCreateServerDatabase , applicationCreateUser , applicationDeleteLocation , applicationDeleteNode , applicationDeleteNodeAllocation , applicationDeleteServerDatabase , applicationDeleteServerForServersServerId , applicationDeleteServerForServersServerIdForce , applicationDeleteUser , applicationGetEgg , applicationGetLocation , applicationGetNode , applicationGetNodeConfiguration , applicationGetServer , applicationGetServerByExternalId , applicationGetServerDatabase , applicationGetTag , applicationGetUser , applicationGetUserByExternalId , applicationListDeployableNodes , applicationListEggs , applicationListLocations , applicationListNodeAllocations , applicationListNodes , applicationListServerDatabases , applicationListServers , applicationListTags , applicationListUsers , applicationReinstallServer , applicationResetServerDatabasePassword , applicationSuspendServer , applicationUnsuspendServer , applicationUpdateLocation , applicationUpdateNode , applicationUpdateServerBuild , applicationUpdateServerDetails , a
import type { AdminActivateThemeData , AdminActivateThemeError , AdminActivateThemeResponse , AdminAttachEggsToMountData , AdminAttachEggsToMountError , AdminAttachEggsToMountResponse , AdminAttachNodesToMountData , AdminAttachNodesToMountError , AdminAttachNodesToMountResponse , AdminAttachServerMountData , AdminAttachServerMountError , AdminAttachServerMountResponse , AdminBulkDeleteNodeAllocationsData , AdminBulkDeleteNodeAllocationsError , AdminBulkDeleteNodeAllocationsResponse , AdminClearExtensionSettingFileData , AdminClearExtensionSettingFileError , AdminClearExtensionSettingFileResponse , AdminClearThemeImageData , AdminClearThemeImageError , AdminClearThemeImageResponse , AdminCreateApiKeyData , AdminCreateApiKeyError , AdminCreateApiKeyResponse , AdminCreateDatabaseHostData , AdminCreateDatabaseHostError , AdminCreateDatabaseHostResponse , AdminCreateEggData , AdminCreateEggError , AdminCreateEggResponse , AdminCreateEggVariableData , AdminCreateEggVariableError , AdminCreateEggVariableResponse , AdminCreateLocationData , AdminCreateLocationError , AdminCreateLocationResponse , AdminCreateMountData , AdminCreateMountError , AdminCreateMountResponse , AdminCreateNodeAllocationsData , AdminCreateNodeAllocationsError , AdminCreateNodeAllocationsResponse , AdminCreateNodeData , AdminCreateNodeDeployTokenData , AdminCreateNodeDeployTokenError , AdminCreateNodeDeployTokenResponse , AdminCreateNodeError , AdminCreateNodeResponse , AdminCreateServerData , AdminCreateServerDatabaseData , AdminCreateServerDatabaseError , AdminCreateServerDatabaseResponse , AdminCreateServerError , AdminCreateServerResponse , AdminCreateTagData , AdminCreateTagError , AdminCreateTagResponse , AdminCreateUserData , AdminCreateUserError , AdminCreateUserResponse , AdminDeleteApiKeyData , AdminDeleteApiKeyError , AdminDeleteApiKeyResponse , AdminDeleteDatabaseHostData , AdminDeleteDatabaseHostError , AdminDeleteDatabaseHostResponse , AdminDeleteEggData , AdminDeleteEggError , AdminDeleteEggResponse , AdminDeleteEggVariableData , AdminDeleteEggVariableError , AdminDeleteEggVariableResponse , AdminDeleteLocationData , AdminDeleteLocationError , AdminDeleteLocationResponse , AdminDeleteMountData , AdminDeleteMountError , AdminDeleteMountResponse , AdminDeleteNodeAllocationData , AdminDeleteNodeAllocationError , AdminDeleteNodeAllocationIpBlockData , AdminDeleteNodeAllocationIpBlockError , AdminDeleteNodeAllocationIpBlockResponse , AdminDeleteNodeAllocationResponse , AdminDeleteNodeData , AdminDeleteNodeError , AdminDeleteNodeResponse , AdminDeleteServerData , AdminDeleteServerDatabaseData , AdminDeleteServerDatabaseError , AdminDeleteServerDatabaseResponse , AdminDeleteServerError , AdminDeleteServerResponse , AdminDeleteTagData , AdminDeleteTagError , AdminDeleteTagResponse , AdminDeleteUserData , AdminDeleteUserError , AdminDeleteUserResponse , AdminDetachEggFromMountData , AdminDetachEggFromMountError , AdminDetachEggFromMountResponse , AdminDetachNodeFromMountData , AdminDetachNodeFromMountError , AdminDetachNodeFromMountResponse , AdminDetachServerMountData , AdminDetachServerMountError , AdminDetachServerMountResponse , AdminDisableExtensionData , AdminDisableExtensionError , AdminDisableExtensionResponse , AdminDisableUserTwoFactorAuthenticationData , AdminDisableUserTwoFactorAuthenticationError , AdminDisableUserTwoFactorAuthenticationResponse , AdminEnableExtensionData , AdminEnableExtensionError , AdminEnableExtensionResponse , AdminExportEggData , AdminExportEggError , AdminExportEggResponse , AdminForceDeleteServerData , AdminForceDeleteServerError , AdminForceDeleteServerResponse , AdminGetApiKeyData , AdminGetApiKeyError , AdminGetApiKeyResponse , AdminGetDatabaseHostData , AdminGetDatabaseHostError , AdminGetDatabaseHostResponse , AdminGetEggData , AdminGetEggError , AdminGetEggInstallScriptData , AdminGetEggInstallScriptError , AdminGetEggInstallScriptResponse , AdminGetEggResponse , AdminGetExtensionIconData , AdminGetExtensionIconError , AdminGetExtensionIconResponse , AdminGetExtensionSettingsData , AdminGetExtensionSettingsError , AdminGetExtensionSettingsResponse , AdminGetLocationData , AdminGetLocationError , AdminGetLocationResponse , AdminGetMountData , AdminG
2026-10-05 18:10:18 -04:00
export type QueryKey < TOptions extends Options > = [
Pick < TOptions , 'baseURL' | 'body' | 'headers' | 'path' | 'query' > & {
_id : string ;
_infinite? : boolean ;
tags? : ReadonlyArray < string >;
}
];
const createQueryKey = < TOptions extends Options >( id : string , options? : TOptions , infinite? : boolean , tags? : ReadonlyArray < string >) : [
QueryKey < TOptions >[ 0 ]
] => {
const params : QueryKey < TOptions >[ 0 ] = { _id : id , baseURL : options?.baseURL || ( options ? . client ?? client ). getConfig (). baseURL } as QueryKey < TOptions >[ 0 ];
if ( infinite ) {
params . _infinite = infinite ;
}
if ( tags ) {
params . tags = tags ;
}
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 adminListLanguagesQueryKey = ( options? : Options < AdminListLanguagesData >) => createQueryKey ( 'adminListLanguages' , options );
/**
* List languages
*
* Returns the languages available for panel locale selectors.
*/
export const adminListLanguagesOptions = ( options? : Options < AdminListLanguagesData >) => queryOptions < AdminListLanguagesResponse , AxiosError < AdminListLanguagesError >, AdminListLanguagesResponse , ReturnType < typeof adminListLanguagesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListLanguages ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListLanguagesQueryKey ( options )
});
export const adminListActivityQueryKey = ( options? : Options < AdminListActivityData >) => createQueryKey ( 'adminListActivity' , options );
/**
* List activity
*
* Returns a paginated list of administrative activity. Only events in the "admin" namespace are returned; customer activity against a server or account is excluded.
*/
export const adminListActivityOptions = ( options? : Options < AdminListActivityData >) => queryOptions < AdminListActivityResponse , AxiosError < AdminListActivityError >, AdminListActivityResponse , ReturnType < typeof adminListActivityQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListActivity ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListActivityQueryKey ( options )
});
const createInfiniteParams = < K extends Pick < QueryKey < Options > [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>( queryKey : QueryKey < Options >, page : K ) => {
const params = { ... queryKey [ 0 ] };
if ( page . body ) {
params . body = {
... queryKey [ 0 ]. body as any ,
... page . body as any
};
}
if ( page . headers ) {
params . headers = {
... queryKey [ 0 ]. headers ,
... page . headers
};
}
if ( page . path ) {
params . path = {
... queryKey [ 0 ]. path as any ,
... page . path as any
};
}
if ( page . query ) {
params . query = {
... queryKey [ 0 ]. query as any ,
... page . query as any
};
}
return params as unknown as typeof page ;
};
export const adminListActivityInfiniteQueryKey = ( options? : Options < AdminListActivityData >) : QueryKey < Options < AdminListActivityData >> => createQueryKey ( 'adminListActivity' , options , true );
/**
* List activity
*
* Returns a paginated list of administrative activity. Only events in the "admin" namespace are returned; customer activity against a server or account is excluded.
*/
export const adminListActivityInfiniteOptions = ( options? : Options < AdminListActivityData >) => {
const opts = infiniteQueryOptions < AdminListActivityResponse , AxiosError < AdminListActivityError >, InfiniteData < AdminListActivityResponse >, QueryKey < Options < AdminListActivityData >>, AdminListActivityPageQueryParameter | Pick < QueryKey < Options < AdminListActivityData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListActivityData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListActivity ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListActivityInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminListActivityFilterOptionsQueryKey = ( options? : Options < AdminListActivityFilterOptionsData >) => createQueryKey ( 'adminListActivityFilterOptions' , options );
/**
* List activity filter options
*
* Returns the distinct events and users present in the administrative activity log.
*/
export const adminListActivityFilterOptionsOptions = ( options? : Options < AdminListActivityFilterOptionsData >) => queryOptions < AdminListActivityFilterOptionsResponse , AxiosError < AdminListActivityFilterOptionsError >, AdminListActivityFilterOptionsResponse , ReturnType < typeof adminListActivityFilterOptionsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListActivityFilterOptions ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListActivityFilterOptionsQueryKey ( options )
});
export const adminListExtensionsQueryKey = ( options? : Options < AdminListExtensionsData >) => createQueryKey ( 'adminListExtensions' , options );
/**
* List extensions
*
* Returns discovered extensions, invalid manifests, and their install state.
*/
export const adminListExtensionsOptions = ( options? : Options < AdminListExtensionsData >) => queryOptions < AdminListExtensionsResponse , AxiosError < AdminListExtensionsError >, AdminListExtensionsResponse , ReturnType < typeof adminListExtensionsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListExtensions ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListExtensionsQueryKey ( options )
});
export type MutationKey < TOptions extends Partial < Options >> = [
Pick < TOptions , 'baseURL' | 'body' | 'headers' | 'path' | 'query' > & {
_id : string ;
tags? : ReadonlyArray < string >;
}
];
const createMutationKey = < TOptions extends Partial < Options >>( id : string , options? : TOptions , tags? : ReadonlyArray < string >) : [
MutationKey < TOptions >[ 0 ]
] => {
const params : MutationKey < TOptions >[ 0 ] = { _id : id , baseURL : options?.baseURL || ( options ? . client ?? client ). getConfig (). baseURL };
if ( tags ) {
params . tags = tags ;
}
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 adminInstallExtensionMutationKey = ( options? : Partial < Options < AdminInstallExtensionData >>) => createMutationKey ( 'adminInstallExtension' , options );
/**
* Install extension
*
* Installs an uploaded .pteroext or .zip extension package.
*/
export const adminInstallExtensionMutation = ( options? : Partial < Options < AdminInstallExtensionData >>) : UseMutationOptions < AdminInstallExtensionResponse , AxiosError < AdminInstallExtensionError >, Options < AdminInstallExtensionData >> => {
const mutationOptions : UseMutationOptions < AdminInstallExtensionResponse , AxiosError < AdminInstallExtensionError >, Options < AdminInstallExtensionData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminInstallExtension ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminInstallExtensionMutationKey ( options )
};
return mutationOptions ;
};
2026-10-09 06:26:45 +01:00
export const adminListExtensionFormsQueryKey = ( options? : Options < AdminListExtensionFormsData >) => createQueryKey ( 'adminListExtensionForms' , options );
/**
* List extension forms
*
* Returns, for each admin form, the enabled extensions that add fields to it and that the signed-in administrator may edit. Forms without extension fields are left out.
*/
export const adminListExtensionFormsOptions = ( options? : Options < AdminListExtensionFormsData >) => queryOptions < AdminListExtensionFormsResponse , AxiosError < AdminListExtensionFormsError >, AdminListExtensionFormsResponse , ReturnType < typeof adminListExtensionFormsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListExtensionForms ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListExtensionFormsQueryKey ( options )
});
2026-10-05 18:10:18 -04:00
export const adminGetExtensionSettingsQueryKey = ( options : Options < AdminGetExtensionSettingsData >) => createQueryKey ( 'adminGetExtensionSettings' , options );
/**
* Get extension settings
*
* Returns the auto-render form schema (with current public values) for an extension that registered a settings definition.
*/
export const adminGetExtensionSettingsOptions = ( options : Options < AdminGetExtensionSettingsData >) => queryOptions < AdminGetExtensionSettingsResponse , AxiosError < AdminGetExtensionSettingsError >, AdminGetExtensionSettingsResponse , ReturnType < typeof adminGetExtensionSettingsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetExtensionSettings ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetExtensionSettingsQueryKey ( options )
});
export const adminUpdateExtensionSettingsMutationKey = ( options? : Partial < Options < AdminUpdateExtensionSettingsData >>) => createMutationKey ( 'adminUpdateExtensionSettings' , options );
/**
* Update extension settings
*
2026-10-07 10:46:54 +01:00
* Validates against each field's type and the extension's declared rules and persists the submitted values. Omitted fields keep their stored values, as do secrets submitted empty or as their mask.
2026-10-05 18:10:18 -04:00
*/
export const adminUpdateExtensionSettingsMutation = ( options? : Partial < Options < AdminUpdateExtensionSettingsData >>) : UseMutationOptions < AdminUpdateExtensionSettingsResponse , AxiosError < AdminUpdateExtensionSettingsError >, Options < AdminUpdateExtensionSettingsData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateExtensionSettingsResponse , AxiosError < AdminUpdateExtensionSettingsError >, Options < AdminUpdateExtensionSettingsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateExtensionSettings ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateExtensionSettingsMutationKey ( options )
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const adminGetExtensionIconQueryKey = ( options : Options < AdminGetExtensionIconData >) => createQueryKey ( 'adminGetExtensionIcon' , options );
/**
* Get extension icon
*
* Returns the PNG, JPEG or WebP image an extension declares as its "icon". Extensions with a lucide icon name or no icon return not found.
*/
export const adminGetExtensionIconOptions = ( options : Options < AdminGetExtensionIconData >) => queryOptions < AdminGetExtensionIconResponse , AxiosError < AdminGetExtensionIconError >, AdminGetExtensionIconResponse , ReturnType < typeof adminGetExtensionIconQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetExtensionIcon ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetExtensionIconQueryKey ( options )
});
2026-10-05 18:10:18 -04:00
export const adminClearExtensionSettingFileMutationKey = ( options? : Partial < Options < AdminClearExtensionSettingFileData >>) => createMutationKey ( 'adminClearExtensionSettingFile' , options );
/**
* Clear extension setting file
*
* Deletes the file stored for a file setting, which returns the setting to its default.
*/
export const adminClearExtensionSettingFileMutation = ( options? : Partial < Options < AdminClearExtensionSettingFileData >>) : UseMutationOptions < AdminClearExtensionSettingFileResponse , AxiosError < AdminClearExtensionSettingFileError >, Options < AdminClearExtensionSettingFileData >> => {
const mutationOptions : UseMutationOptions < AdminClearExtensionSettingFileResponse , AxiosError < AdminClearExtensionSettingFileError >, Options < AdminClearExtensionSettingFileData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminClearExtensionSettingFile ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminClearExtensionSettingFileMutationKey ( options )
};
return mutationOptions ;
};
export const adminUploadExtensionSettingFileMutationKey = ( options? : Partial < Options < AdminUploadExtensionSettingFileData >>) => createMutationKey ( 'adminUploadExtensionSettingFile' , options );
/**
* Upload extension setting file
*
* Stores the uploaded file as the value of a file setting and deletes the file it replaces. The type is decided from the file's content and checked against the setting's allow-list and size limit.
*/
export const adminUploadExtensionSettingFileMutation = ( options? : Partial < Options < AdminUploadExtensionSettingFileData >>) : UseMutationOptions < AdminUploadExtensionSettingFileResponse , AxiosError < AdminUploadExtensionSettingFileError >, Options < AdminUploadExtensionSettingFileData >> => {
const mutationOptions : UseMutationOptions < AdminUploadExtensionSettingFileResponse , AxiosError < AdminUploadExtensionSettingFileError >, Options < AdminUploadExtensionSettingFileData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUploadExtensionSettingFile ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUploadExtensionSettingFileMutationKey ( options )
};
return mutationOptions ;
};
export const adminEnableExtensionMutationKey = ( options? : Partial < Options < AdminEnableExtensionData >>) => createMutationKey ( 'adminEnableExtension' , options );
/**
* Enable extension
*
* Enables an installed extension, publishes assets, and runs migrations.
*/
export const adminEnableExtensionMutation = ( options? : Partial < Options < AdminEnableExtensionData >>) : UseMutationOptions < AdminEnableExtensionResponse , AxiosError < AdminEnableExtensionError >, Options < AdminEnableExtensionData >> => {
const mutationOptions : UseMutationOptions < AdminEnableExtensionResponse , AxiosError < AdminEnableExtensionError >, Options < AdminEnableExtensionData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminEnableExtension ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminEnableExtensionMutationKey ( options )
};
return mutationOptions ;
};
export const adminDisableExtensionMutationKey = ( options? : Partial < Options < AdminDisableExtensionData >>) => createMutationKey ( 'adminDisableExtension' , options );
/**
* Disable extension
*
* Disables an installed extension without removing files or data.
*/
export const adminDisableExtensionMutation = ( options? : Partial < Options < AdminDisableExtensionData >>) : UseMutationOptions < AdminDisableExtensionResponse , AxiosError < AdminDisableExtensionError >, Options < AdminDisableExtensionData >> => {
const mutationOptions : UseMutationOptions < AdminDisableExtensionResponse , AxiosError < AdminDisableExtensionError >, Options < AdminDisableExtensionData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDisableExtension ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDisableExtensionMutationKey ( options )
};
return mutationOptions ;
};
export const adminRemoveExtensionMutationKey = ( options? : Partial < Options < AdminRemoveExtensionData >>) => createMutationKey ( 'adminRemoveExtension' , options );
/**
* Remove extension
*
2026-10-06 14:01:38 -04:00
* Deletes extension files, published assets, settings, subuser permission grants, and the install record.
2026-10-05 18:10:18 -04:00
*/
export const adminRemoveExtensionMutation = ( options? : Partial < Options < AdminRemoveExtensionData >>) : UseMutationOptions < AdminRemoveExtensionResponse , AxiosError < AdminRemoveExtensionError >, Options < AdminRemoveExtensionData >> => {
const mutationOptions : UseMutationOptions < AdminRemoveExtensionResponse , AxiosError < AdminRemoveExtensionError >, Options < AdminRemoveExtensionData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminRemoveExtension ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminRemoveExtensionMutationKey ( options )
};
return mutationOptions ;
};
2026-10-12 07:47:42 -04:00
export const adminListThemesQueryKey = ( options? : Options < AdminListThemesData >) => createQueryKey ( 'adminListThemes' , options );
/**
* List themes
*
* Returns the built-in classic theme and every installed theme, with the active one and whether each can be activated.
*/
export const adminListThemesOptions = ( options? : Options < AdminListThemesData >) => queryOptions < AdminListThemesResponse , AxiosError < AdminListThemesError >, AdminListThemesResponse , ReturnType < typeof adminListThemesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListThemes ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListThemesQueryKey ( options )
});
export const adminGetThemeSettingsQueryKey = ( options : Options < AdminGetThemeSettingsData >) => createQueryKey ( 'adminGetThemeSettings' , options );
/**
* Get theme settings
*
* Returns the settings a theme declares, with their current values and the token or attribute each one writes. Classic has none.
*/
export const adminGetThemeSettingsOptions = ( options : Options < AdminGetThemeSettingsData >) => queryOptions < AdminGetThemeSettingsResponse , AxiosError < AdminGetThemeSettingsError >, AdminGetThemeSettingsResponse , ReturnType < typeof adminGetThemeSettingsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetThemeSettings ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetThemeSettingsQueryKey ( options )
});
export const adminUpdateThemeSettingsMutationKey = ( options? : Partial < Options < AdminUpdateThemeSettingsData >>) => createMutationKey ( 'adminUpdateThemeSettings' , options );
/**
* Update theme settings
*
* Validates each submitted value against its setting's type and stores it. Omitted settings keep their values and null restores a setting's default.
*/
export const adminUpdateThemeSettingsMutation = ( options? : Partial < Options < AdminUpdateThemeSettingsData >>) : UseMutationOptions < AdminUpdateThemeSettingsResponse , AxiosError < AdminUpdateThemeSettingsError >, Options < AdminUpdateThemeSettingsData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateThemeSettingsResponse , AxiosError < AdminUpdateThemeSettingsError >, Options < AdminUpdateThemeSettingsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateThemeSettings ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateThemeSettingsMutationKey ( options )
};
return mutationOptions ;
};
export const adminResetThemeMutationKey = ( options? : Partial < Options < AdminResetThemeData >>) => createMutationKey ( 'adminResetTheme' , options );
/**
* Reset theme
*
* Makes the built-in classic theme active again.
*/
export const adminResetThemeMutation = ( options? : Partial < Options < AdminResetThemeData >>) : UseMutationOptions < AdminResetThemeResponse , AxiosError < AdminResetThemeError >, Options < AdminResetThemeData >> => {
const mutationOptions : UseMutationOptions < AdminResetThemeResponse , AxiosError < AdminResetThemeError >, Options < AdminResetThemeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminResetTheme ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminResetThemeMutationKey ( options )
};
return mutationOptions ;
};
export const adminStopThemePreviewMutationKey = ( options? : Partial < Options < AdminStopThemePreviewData >>) => createMutationKey ( 'adminStopThemePreview' , options );
/**
* Stop theme preview
*
* Shows the active theme to the signed-in administrator again.
*/
export const adminStopThemePreviewMutation = ( options? : Partial < Options < AdminStopThemePreviewData >>) : UseMutationOptions < AdminStopThemePreviewResponse , AxiosError < AdminStopThemePreviewError >, Options < AdminStopThemePreviewData >> => {
const mutationOptions : UseMutationOptions < AdminStopThemePreviewResponse , AxiosError < AdminStopThemePreviewError >, Options < AdminStopThemePreviewData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminStopThemePreview ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminStopThemePreviewMutationKey ( options )
};
return mutationOptions ;
};
export const adminActivateThemeMutationKey = ( options? : Partial < Options < AdminActivateThemeData >>) => createMutationKey ( 'adminActivateTheme' , options );
/**
* Activate theme
*
* Makes an installed, enabled theme the one every visitor sees. Activating "classic" resets the panel.
*/
export const adminActivateThemeMutation = ( options? : Partial < Options < AdminActivateThemeData >>) : UseMutationOptions < AdminActivateThemeResponse , AxiosError < AdminActivateThemeError >, Options < AdminActivateThemeData >> => {
const mutationOptions : UseMutationOptions < AdminActivateThemeResponse , AxiosError < AdminActivateThemeError >, Options < AdminActivateThemeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminActivateTheme ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminActivateThemeMutationKey ( options )
};
return mutationOptions ;
};
export const adminPreviewThemeMutationKey = ( options? : Partial < Options < AdminPreviewThemeData >>) => createMutationKey ( 'adminPreviewTheme' , options );
/**
* Preview theme
*
* Shows a theme to the signed-in administrator only, for the rest of this session, without activating it.
*/
export const adminPreviewThemeMutation = ( options? : Partial < Options < AdminPreviewThemeData >>) : UseMutationOptions < AdminPreviewThemeResponse , AxiosError < AdminPreviewThemeError >, Options < AdminPreviewThemeData >> => {
const mutationOptions : UseMutationOptions < AdminPreviewThemeResponse , AxiosError < AdminPreviewThemeError >, Options < AdminPreviewThemeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminPreviewTheme ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminPreviewThemeMutationKey ( options )
};
return mutationOptions ;
};
export const adminClearThemeImageMutationKey = ( options? : Partial < Options < AdminClearThemeImageData >>) => createMutationKey ( 'adminClearThemeImage' , options );
/**
* Clear theme image
*
* Deletes the image stored for an image setting, which returns the setting to no image.
*/
export const adminClearThemeImageMutation = ( options? : Partial < Options < AdminClearThemeImageData >>) : UseMutationOptions < AdminClearThemeImageResponse , AxiosError < AdminClearThemeImageError >, Options < AdminClearThemeImageData >> => {
const mutationOptions : UseMutationOptions < AdminClearThemeImageResponse , AxiosError < AdminClearThemeImageError >, Options < AdminClearThemeImageData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminClearThemeImage ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminClearThemeImageMutationKey ( options )
};
return mutationOptions ;
};
export const adminUploadThemeImageMutationKey = ( options? : Partial < Options < AdminUploadThemeImageData >>) => createMutationKey ( 'adminUploadThemeImage' , options );
/**
* Upload theme image
*
* Stores the uploaded image as the value of an image setting and deletes the image it replaces. The type is decided from the file's content.
*/
export const adminUploadThemeImageMutation = ( options? : Partial < Options < AdminUploadThemeImageData >>) : UseMutationOptions < AdminUploadThemeImageResponse , AxiosError < AdminUploadThemeImageError >, Options < AdminUploadThemeImageData >> => {
const mutationOptions : UseMutationOptions < AdminUploadThemeImageResponse , AxiosError < AdminUploadThemeImageError >, Options < AdminUploadThemeImageData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUploadThemeImage ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUploadThemeImageMutationKey ( options )
};
return mutationOptions ;
};
2026-10-05 18:10:18 -04:00
export const adminListUsersQueryKey = ( options? : Options < AdminListUsersData >) => createQueryKey ( 'adminListUsers' , options );
/**
* List users
*
* Returns a paginated list of panel users, sorted with root administrators first by default.
*/
export const adminListUsersOptions = ( options? : Options < AdminListUsersData >) => queryOptions < AdminListUsersResponse , AxiosError < AdminListUsersError >, AdminListUsersResponse , ReturnType < typeof adminListUsersQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListUsers ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListUsersQueryKey ( options )
});
export const adminListUsersInfiniteQueryKey = ( options? : Options < AdminListUsersData >) : QueryKey < Options < AdminListUsersData >> => createQueryKey ( 'adminListUsers' , options , true );
/**
* List users
*
* Returns a paginated list of panel users, sorted with root administrators first by default.
*/
export const adminListUsersInfiniteOptions = ( options? : Options < AdminListUsersData >) => {
const opts = infiniteQueryOptions < AdminListUsersResponse , AxiosError < AdminListUsersError >, InfiniteData < AdminListUsersResponse >, QueryKey < Options < AdminListUsersData >>, AdminListUsersPageQueryParameter | Pick < QueryKey < Options < AdminListUsersData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListUsersData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListUsers ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListUsersInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateUserMutationKey = ( options? : Partial < Options < AdminCreateUserData >>) => createMutationKey ( 'adminCreateUser' , options );
/**
* Create user
*
* Creates a panel user. Optional password and language fields may be supplied explicitly.
*/
export const adminCreateUserMutation = ( options? : Partial < Options < AdminCreateUserData >>) : UseMutationOptions < AdminCreateUserResponse , AxiosError < AdminCreateUserError >, Options < AdminCreateUserData >> => {
const mutationOptions : UseMutationOptions < AdminCreateUserResponse , AxiosError < AdminCreateUserError >, Options < AdminCreateUserData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateUser ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateUserMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetUserByExternalIdQueryKey = ( options : Options < AdminGetUserByExternalIdData >) => createQueryKey ( 'adminGetUserByExternalId' , options );
/**
* Get user by external ID
*
* Returns a single panel user by external identifier.
*/
export const adminGetUserByExternalIdOptions = ( options : Options < AdminGetUserByExternalIdData >) => queryOptions < AdminGetUserByExternalIdResponse , AxiosError < AdminGetUserByExternalIdError >, AdminGetUserByExternalIdResponse , ReturnType < typeof adminGetUserByExternalIdQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetUserByExternalId ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetUserByExternalIdQueryKey ( options )
});
export const adminDeleteUserMutationKey = ( options? : Partial < Options < AdminDeleteUserData >>) => createMutationKey ( 'adminDeleteUser' , options );
/**
* Delete user
*
* Deletes a panel user. The authenticated administrator cannot delete their own account.
*/
export const adminDeleteUserMutation = ( options? : Partial < Options < AdminDeleteUserData >>) : UseMutationOptions < AdminDeleteUserResponse , AxiosError < AdminDeleteUserError >, Options < AdminDeleteUserData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteUserResponse , AxiosError < AdminDeleteUserError >, Options < AdminDeleteUserData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteUser ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteUserMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetUserQueryKey = ( options : Options < AdminGetUserData >) => createQueryKey ( 'adminGetUser' , options );
/**
* Get user
*
* Returns a single panel user by internal numeric ID.
*/
export const adminGetUserOptions = ( options : Options < AdminGetUserData >) => queryOptions < AdminGetUserResponse , AxiosError < AdminGetUserError >, AdminGetUserResponse , ReturnType < typeof adminGetUserQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetUser ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetUserQueryKey ( options )
});
2026-10-11 02:28:28 -04:00
export const adminUpdateUserMutationKey = ( options? : Partial < Options < AdminUpdateUserData >>) => createMutationKey ( 'adminUpdateUser' , options );
2026-10-05 18:10:18 -04:00
/**
2026-10-11 02:28:28 -04:00
* Update user
2026-10-05 18:10:18 -04:00
*
2026-10-11 02:28:28 -04:00
* Updates an existing panel user. Supplying a password changes the user password.
2026-10-05 18:10:18 -04:00
*/
2026-10-11 02:28:28 -04:00
export const adminUpdateUserMutation = ( options? : Partial < Options < AdminUpdateUserData >>) : UseMutationOptions < AdminUpdateUserResponse , AxiosError < AdminUpdateUserError >, Options < AdminUpdateUserData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateUserResponse , AxiosError < AdminUpdateUserError >, Options < AdminUpdateUserData >> = {
2026-10-05 18:10:18 -04:00
mutationFn : async ( fnOptions ) => {
2026-10-11 02:28:28 -04:00
const { data } = await adminUpdateUser ({
2026-10-05 18:10:18 -04:00
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
2026-10-11 02:28:28 -04:00
mutationKey : adminUpdateUserMutationKey ( options )
2026-10-05 18:10:18 -04:00
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const adminDisableUserTwoFactorAuthenticationMutationKey = ( options? : Partial < Options < AdminDisableUserTwoFactorAuthenticationData >>) => createMutationKey ( 'adminDisableUserTwoFactorAuthentication' , options );
2026-10-05 18:10:18 -04:00
/**
2026-10-11 02:28:28 -04:00
* Disable user two-factor authentication
2026-10-05 18:10:18 -04:00
*
2026-10-11 02:28:28 -04:00
* Clears the configured TOTP secret and disables two-factor authentication for a user.
2026-10-05 18:10:18 -04:00
*/
2026-10-11 02:28:28 -04:00
export const adminDisableUserTwoFactorAuthenticationMutation = ( options? : Partial < Options < AdminDisableUserTwoFactorAuthenticationData >>) : UseMutationOptions < AdminDisableUserTwoFactorAuthenticationResponse , AxiosError < AdminDisableUserTwoFactorAuthenticationError >, Options < AdminDisableUserTwoFactorAuthenticationData >> => {
const mutationOptions : UseMutationOptions < AdminDisableUserTwoFactorAuthenticationResponse , AxiosError < AdminDisableUserTwoFactorAuthenticationError >, Options < AdminDisableUserTwoFactorAuthenticationData >> = {
2026-10-05 18:10:18 -04:00
mutationFn : async ( fnOptions ) => {
2026-10-11 02:28:28 -04:00
const { data } = await adminDisableUserTwoFactorAuthentication ({
2026-10-05 18:10:18 -04:00
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
2026-10-11 02:28:28 -04:00
mutationKey : adminDisableUserTwoFactorAuthenticationMutationKey ( options )
2026-10-05 18:10:18 -04:00
};
return mutationOptions ;
};
export const adminGetNodeSystemInformationQueryKey = ( options : Options < AdminGetNodeSystemInformationData >) => createQueryKey ( 'adminGetNodeSystemInformation' , options );
/**
* Get node system information
*
* Proxies Wings system information for a node.
*/
export const adminGetNodeSystemInformationOptions = ( options : Options < AdminGetNodeSystemInformationData >) => queryOptions < AdminGetNodeSystemInformationResponse , AxiosError < AdminGetNodeSystemInformationError >, AdminGetNodeSystemInformationResponse , ReturnType < typeof adminGetNodeSystemInformationQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetNodeSystemInformation ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetNodeSystemInformationQueryKey ( options )
});
export const adminCreateNodeDeployTokenMutationKey = ( options? : Partial < Options < AdminCreateNodeDeployTokenData >>) => createMutationKey ( 'adminCreateNodeDeployToken' , options );
/**
* Create node deploy token
*
* Creates or reuses an application API key that can deploy the specified node.
*/
export const adminCreateNodeDeployTokenMutation = ( options? : Partial < Options < AdminCreateNodeDeployTokenData >>) : UseMutationOptions < AdminCreateNodeDeployTokenResponse , AxiosError < AdminCreateNodeDeployTokenError >, Options < AdminCreateNodeDeployTokenData >> => {
const mutationOptions : UseMutationOptions < AdminCreateNodeDeployTokenResponse , AxiosError < AdminCreateNodeDeployTokenError >, Options < AdminCreateNodeDeployTokenData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateNodeDeployToken ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateNodeDeployTokenMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetNodeUtilizationQueryKey = ( options : Options < AdminGetNodeUtilizationData >) => createQueryKey ( 'adminGetNodeUtilization' , options );
/**
* Get node utilization
*
* Returns aggregate resource utilization for a node.
*/
export const adminGetNodeUtilizationOptions = ( options : Options < AdminGetNodeUtilizationData >) => queryOptions < AdminGetNodeUtilizationResponse , AxiosError < AdminGetNodeUtilizationError >, AdminGetNodeUtilizationResponse , ReturnType < typeof adminGetNodeUtilizationQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetNodeUtilization ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetNodeUtilizationQueryKey ( options )
});
export const adminListServerMountsQueryKey = ( options : Options < AdminListServerMountsData >) => createQueryKey ( 'adminListServerMounts' , options );
/**
* List server mounts
*
* Returns mount definitions that are eligible for a server, including whether each mount is attached.
*/
export const adminListServerMountsOptions = ( options : Options < AdminListServerMountsData >) => queryOptions < AdminListServerMountsResponse , AxiosError < AdminListServerMountsError >, AdminListServerMountsResponse , ReturnType < typeof adminListServerMountsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListServerMounts ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListServerMountsQueryKey ( options )
});
export const adminAttachServerMountMutationKey = ( options? : Partial < Options < AdminAttachServerMountData >>) => createMutationKey ( 'adminAttachServerMount' , options );
/**
* Attach server mount
*
* Attaches an eligible mount definition to a server.
*/
export const adminAttachServerMountMutation = ( options? : Partial < Options < AdminAttachServerMountData >>) : UseMutationOptions < AdminAttachServerMountResponse , AxiosError < AdminAttachServerMountError >, Options < AdminAttachServerMountData >> => {
const mutationOptions : UseMutationOptions < AdminAttachServerMountResponse , AxiosError < AdminAttachServerMountError >, Options < AdminAttachServerMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminAttachServerMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminAttachServerMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminDetachServerMountMutationKey = ( options? : Partial < Options < AdminDetachServerMountData >>) => createMutationKey ( 'adminDetachServerMount' , options );
/**
* Detach server mount
*
* Detaches a mount definition from a server.
*/
export const adminDetachServerMountMutation = ( options? : Partial < Options < AdminDetachServerMountData >>) : UseMutationOptions < AdminDetachServerMountResponse , AxiosError < AdminDetachServerMountError >, Options < AdminDetachServerMountData >> => {
const mutationOptions : UseMutationOptions < AdminDetachServerMountResponse , AxiosError < AdminDetachServerMountError >, Options < AdminDetachServerMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDetachServerMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDetachServerMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminListServersQueryKey = ( options? : Options < AdminListServersData >) => createQueryKey ( 'adminListServers' , options );
/**
* List servers
*
* Returns a paginated list of servers.
*/
export const adminListServersOptions = ( options? : Options < AdminListServersData >) => queryOptions < AdminListServersResponse , AxiosError < AdminListServersError >, AdminListServersResponse , ReturnType < typeof adminListServersQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListServers ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListServersQueryKey ( options )
});
export const adminListServersInfiniteQueryKey = ( options? : Options < AdminListServersData >) : QueryKey < Options < AdminListServersData >> => createQueryKey ( 'adminListServers' , options , true );
/**
* List servers
*
* Returns a paginated list of servers.
*/
export const adminListServersInfiniteOptions = ( options? : Options < AdminListServersData >) => {
const opts = infiniteQueryOptions < AdminListServersResponse , AxiosError < AdminListServersError >, InfiniteData < AdminListServersResponse >, QueryKey < Options < AdminListServersData >>, AdminListServersPageQueryParameter | Pick < QueryKey < Options < AdminListServersData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListServersData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListServers ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListServersInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateServerMutationKey = ( options? : Partial < Options < AdminCreateServerData >>) => createMutationKey ( 'adminCreateServer' , options );
/**
* Create server
*
* Creates a server using explicit allocations or automatic deployment constraints.
*/
export const adminCreateServerMutation = ( options? : Partial < Options < AdminCreateServerData >>) : UseMutationOptions < AdminCreateServerResponse , AxiosError < AdminCreateServerError >, Options < AdminCreateServerData >> => {
const mutationOptions : UseMutationOptions < AdminCreateServerResponse , AxiosError < AdminCreateServerError >, Options < AdminCreateServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateServerMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetServerByExternalIdQueryKey = ( options : Options < AdminGetServerByExternalIdData >) => createQueryKey ( 'adminGetServerByExternalId' , options );
/**
* Get server by external ID
*
* Returns a single server by external identifier.
*/
export const adminGetServerByExternalIdOptions = ( options : Options < AdminGetServerByExternalIdData >) => queryOptions < AdminGetServerByExternalIdResponse , AxiosError < AdminGetServerByExternalIdError >, AdminGetServerByExternalIdResponse , ReturnType < typeof adminGetServerByExternalIdQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetServerByExternalId ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetServerByExternalIdQueryKey ( options )
});
export const adminDeleteServerMutationKey = ( options? : Partial < Options < AdminDeleteServerData >>) => createMutationKey ( 'adminDeleteServer' , options );
/**
* Delete server
*
* Deletes a server and returns an error if Wings or database host cleanup fails.
*/
export const adminDeleteServerMutation = ( options? : Partial < Options < AdminDeleteServerData >>) : UseMutationOptions < AdminDeleteServerResponse , AxiosError < AdminDeleteServerError >, Options < AdminDeleteServerData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteServerResponse , AxiosError < AdminDeleteServerError >, Options < AdminDeleteServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteServerMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetServerQueryKey = ( options : Options < AdminGetServerData >) => createQueryKey ( 'adminGetServer' , options );
/**
* Get server
*
* Returns a single server by admin identifier.
*/
export const adminGetServerOptions = ( options : Options < AdminGetServerData >) => queryOptions < AdminGetServerResponse , AxiosError < AdminGetServerError >, AdminGetServerResponse , ReturnType < typeof adminGetServerQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetServer ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetServerQueryKey ( options )
});
export const adminUpdateServerDetailsMutationKey = ( options? : Partial < Options < AdminUpdateServerDetailsData >>) => createMutationKey ( 'adminUpdateServerDetails' , options );
/**
* Update server details
*
* Updates a server name, owner, description, and external identifier.
*/
export const adminUpdateServerDetailsMutation = ( options? : Partial < Options < AdminUpdateServerDetailsData >>) : UseMutationOptions < AdminUpdateServerDetailsResponse , AxiosError < AdminUpdateServerDetailsError >, Options < AdminUpdateServerDetailsData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateServerDetailsResponse , AxiosError < AdminUpdateServerDetailsError >, Options < AdminUpdateServerDetailsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateServerDetails ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateServerDetailsMutationKey ( options )
};
return mutationOptions ;
};
export const adminUpdateServerBuildMutationKey = ( options? : Partial < Options < AdminUpdateServerBuildData >>) => createMutationKey ( 'adminUpdateServerBuild' , options );
/**
* Update server build
*
* Updates server limits, primary allocation, and feature limits.
*/
export const adminUpdateServerBuildMutation = ( options? : Partial < Options < AdminUpdateServerBuildData >>) : UseMutationOptions < AdminUpdateServerBuildResponse , AxiosError < AdminUpdateServerBuildError >, Options < AdminUpdateServerBuildData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateServerBuildResponse , AxiosError < AdminUpdateServerBuildError >, Options < AdminUpdateServerBuildData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateServerBuild ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateServerBuildMutationKey ( options )
};
return mutationOptions ;
};
export const adminUpdateServerStartupMutationKey = ( options? : Partial < Options < AdminUpdateServerStartupData >>) => createMutationKey ( 'adminUpdateServerStartup' , options );
/**
* Update server startup
*
* Updates the egg, Docker image, startup command, environment, and install-script behavior.
*/
export const adminUpdateServerStartupMutation = ( options? : Partial < Options < AdminUpdateServerStartupData >>) : UseMutationOptions < AdminUpdateServerStartupResponse , AxiosError < AdminUpdateServerStartupError >, Options < AdminUpdateServerStartupData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateServerStartupResponse , AxiosError < AdminUpdateServerStartupError >, Options < AdminUpdateServerStartupData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateServerStartup ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateServerStartupMutationKey ( options )
};
return mutationOptions ;
};
export const adminUpdateServerSuspensionMutationKey = ( options? : Partial < Options < AdminUpdateServerSuspensionData >>) => createMutationKey ( 'adminUpdateServerSuspension' , options );
/**
* Update server suspension
*
* Suspends or unsuspends a server.
*/
export const adminUpdateServerSuspensionMutation = ( options? : Partial < Options < AdminUpdateServerSuspensionData >>) : UseMutationOptions < AdminUpdateServerSuspensionResponse , AxiosError < AdminUpdateServerSuspensionError >, Options < AdminUpdateServerSuspensionData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateServerSuspensionResponse , AxiosError < AdminUpdateServerSuspensionError >, Options < AdminUpdateServerSuspensionData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateServerSuspension ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateServerSuspensionMutationKey ( options )
};
return mutationOptions ;
};
export const adminReinstallServerMutationKey = ( options? : Partial < Options < AdminReinstallServerData >>) => createMutationKey ( 'adminReinstallServer' , options );
/**
* Reinstall server
*
* Queues a server reinstall through Wings.
*/
export const adminReinstallServerMutation = ( options? : Partial < Options < AdminReinstallServerData >>) : UseMutationOptions < unknown , AxiosError < AdminReinstallServerError >, Options < AdminReinstallServerData >> => {
const mutationOptions : UseMutationOptions < unknown , AxiosError < AdminReinstallServerError >, Options < AdminReinstallServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminReinstallServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminReinstallServerMutationKey ( options )
};
return mutationOptions ;
};
export const adminRebuildServerMutationKey = ( options? : Partial < Options < AdminRebuildServerData >>) => createMutationKey ( 'adminRebuildServer' , options );
/**
* Rebuild server
*
* Synchronizes the server configuration to Wings.
*/
export const adminRebuildServerMutation = ( options? : Partial < Options < AdminRebuildServerData >>) : UseMutationOptions < AdminRebuildServerResponse , AxiosError < AdminRebuildServerError >, Options < AdminRebuildServerData >> => {
const mutationOptions : UseMutationOptions < AdminRebuildServerResponse , AxiosError < AdminRebuildServerError >, Options < AdminRebuildServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminRebuildServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminRebuildServerMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetServerTransferProgressQueryKey = ( options : Options < AdminGetServerTransferProgressData >) => createQueryKey ( 'adminGetServerTransferProgress' , options );
/**
* Get server transfer progress
*
* Returns the active transfer for a server, or 204 when no transfer is in progress.
*/
export const adminGetServerTransferProgressOptions = ( options : Options < AdminGetServerTransferProgressData >) => queryOptions < AdminGetServerTransferProgressResponse , AxiosError < AdminGetServerTransferProgressError >, AdminGetServerTransferProgressResponse , ReturnType < typeof adminGetServerTransferProgressQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetServerTransferProgress ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetServerTransferProgressQueryKey ( options )
});
export const adminTransferServerMutationKey = ( options? : Partial < Options < AdminTransferServerData >>) => createMutationKey ( 'adminTransferServer' , options );
/**
* Transfer server
*
* Starts a server transfer to another node using the specified target allocations.
*/
export const adminTransferServerMutation = ( options? : Partial < Options < AdminTransferServerData >>) : UseMutationOptions < AdminTransferServerResponse , AxiosError < AdminTransferServerError >, Options < AdminTransferServerData >> => {
const mutationOptions : UseMutationOptions < AdminTransferServerResponse , AxiosError < AdminTransferServerError >, Options < AdminTransferServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminTransferServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminTransferServerMutationKey ( options )
};
return mutationOptions ;
};
export const adminToggleServerInstallStateMutationKey = ( options? : Partial < Options < AdminToggleServerInstallStateData >>) => createMutationKey ( 'adminToggleServerInstallState' , options );
/**
* Toggle server install state
*
* Toggles a server between installed and installing states unless it is marked as failed.
*/
export const adminToggleServerInstallStateMutation = ( options? : Partial < Options < AdminToggleServerInstallStateData >>) : UseMutationOptions < AdminToggleServerInstallStateResponse , AxiosError < AdminToggleServerInstallStateError >, Options < AdminToggleServerInstallStateData >> => {
const mutationOptions : UseMutationOptions < AdminToggleServerInstallStateResponse , AxiosError < AdminToggleServerInstallStateError >, Options < AdminToggleServerInstallStateData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminToggleServerInstallState ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminToggleServerInstallStateMutationKey ( options )
};
return mutationOptions ;
};
export const adminForceDeleteServerMutationKey = ( options? : Partial < Options < AdminForceDeleteServerData >>) => createMutationKey ( 'adminForceDeleteServer' , options );
/**
* Force delete server
*
* Deletes a server while bypassing recoverable Wings or database host cleanup failures.
*/
export const adminForceDeleteServerMutation = ( options? : Partial < Options < AdminForceDeleteServerData >>) : UseMutationOptions < AdminForceDeleteServerResponse , AxiosError < AdminForceDeleteServerError >, Options < AdminForceDeleteServerData >> => {
const mutationOptions : UseMutationOptions < AdminForceDeleteServerResponse , AxiosError < AdminForceDeleteServerError >, Options < AdminForceDeleteServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminForceDeleteServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminForceDeleteServerMutationKey ( options )
};
return mutationOptions ;
};
export const adminListServerDatabasesQueryKey = ( options : Options < AdminListServerDatabasesData >) => createQueryKey ( 'adminListServerDatabases' , options );
/**
* List server databases
*
* Returns all databases assigned to a server.
*/
export const adminListServerDatabasesOptions = ( options : Options < AdminListServerDatabasesData >) => queryOptions < AdminListServerDatabasesResponse , AxiosError < AdminListServerDatabasesError >, AdminListServerDatabasesResponse , ReturnType < typeof adminListServerDatabasesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListServerDatabases ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListServerDatabasesQueryKey ( options )
});
export const adminCreateServerDatabaseMutationKey = ( options? : Partial < Options < AdminCreateServerDatabaseData >>) => createMutationKey ( 'adminCreateServerDatabase' , options );
/**
* Create server database
*
* Creates a database for a server and returns the generated password.
*/
export const adminCreateServerDatabaseMutation = ( options? : Partial < Options < AdminCreateServerDatabaseData >>) : UseMutationOptions < AdminCreateServerDatabaseResponse , AxiosError < AdminCreateServerDatabaseError >, Options < AdminCreateServerDatabaseData >> => {
const mutationOptions : UseMutationOptions < AdminCreateServerDatabaseResponse , AxiosError < AdminCreateServerDatabaseError >, Options < AdminCreateServerDatabaseData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateServerDatabase ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateServerDatabaseMutationKey ( options )
};
return mutationOptions ;
};
export const adminDeleteServerDatabaseMutationKey = ( options? : Partial < Options < AdminDeleteServerDatabaseData >>) => createMutationKey ( 'adminDeleteServerDatabase' , options );
/**
* Delete server database
*
* Deletes a database assigned to a server.
*/
export const adminDeleteServerDatabaseMutation = ( options? : Partial < Options < AdminDeleteServerDatabaseData >>) : UseMutationOptions < AdminDeleteServerDatabaseResponse , AxiosError < AdminDeleteServerDatabaseError >, Options < AdminDeleteServerDatabaseData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteServerDatabaseResponse , AxiosError < AdminDeleteServerDatabaseError >, Options < AdminDeleteServerDatabaseData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteServerDatabase ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteServerDatabaseMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetServerDatabaseQueryKey = ( options : Options < AdminGetServerDatabaseData >) => createQueryKey ( 'adminGetServerDatabase' , options );
/**
* Get server database
*
* Returns a single database assigned to a server.
*/
export const adminGetServerDatabaseOptions = ( options : Options < AdminGetServerDatabaseData >) => queryOptions < AdminGetServerDatabaseResponse , AxiosError < AdminGetServerDatabaseError >, AdminGetServerDatabaseResponse , ReturnType < typeof adminGetServerDatabaseQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetServerDatabase ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetServerDatabaseQueryKey ( options )
});
export const adminRotateServerDatabasePasswordMutationKey = ( options? : Partial < Options < AdminRotateServerDatabasePasswordData >>) => createMutationKey ( 'adminRotateServerDatabasePassword' , options );
/**
* Rotate server database password
*
* Rotates the password for a database assigned to a server.
*/
export const adminRotateServerDatabasePasswordMutation = ( options? : Partial < Options < AdminRotateServerDatabasePasswordData >>) : UseMutationOptions < AdminRotateServerDatabasePasswordResponse , AxiosError < AdminRotateServerDatabasePasswordError >, Options < AdminRotateServerDatabasePasswordData >> => {
const mutationOptions : UseMutationOptions < AdminRotateServerDatabasePasswordResponse , AxiosError < AdminRotateServerDatabasePasswordError >, Options < AdminRotateServerDatabasePasswordData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminRotateServerDatabasePassword ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminRotateServerDatabasePasswordMutationKey ( options )
};
return mutationOptions ;
};
export const adminListServerBackupsQueryKey = ( options : Options < AdminListServerBackupsData >) => createQueryKey ( 'adminListServerBackups' , options );
/**
* List server backups
*
* Returns a paginated list of backups assigned to a server.
*/
export const adminListServerBackupsOptions = ( options : Options < AdminListServerBackupsData >) => queryOptions < AdminListServerBackupsResponse , AxiosError < AdminListServerBackupsError >, AdminListServerBackupsResponse , ReturnType < typeof adminListServerBackupsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListServerBackups ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListServerBackupsQueryKey ( options )
});
export const adminToggleServerBackupLockMutationKey = ( options? : Partial < Options < AdminToggleServerBackupLockData >>) => createMutationKey ( 'adminToggleServerBackupLock' , options );
/**
* Toggle server backup lock
*
* Toggles whether a server backup is locked against deletion.
*/
export const adminToggleServerBackupLockMutation = ( options? : Partial < Options < AdminToggleServerBackupLockData >>) : UseMutationOptions < AdminToggleServerBackupLockResponse , AxiosError < AdminToggleServerBackupLockError >, Options < AdminToggleServerBackupLockData >> => {
const mutationOptions : UseMutationOptions < AdminToggleServerBackupLockResponse , AxiosError < AdminToggleServerBackupLockError >, Options < AdminToggleServerBackupLockData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminToggleServerBackupLock ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminToggleServerBackupLockMutationKey ( options )
};
return mutationOptions ;
};
export const adminListNodesQueryKey = ( options? : Options < AdminListNodesData >) => createQueryKey ( 'adminListNodes' , options );
/**
* List nodes
*
* Returns a paginated list of Wings nodes.
*/
export const adminListNodesOptions = ( options? : Options < AdminListNodesData >) => queryOptions < AdminListNodesResponse , AxiosError < AdminListNodesError >, AdminListNodesResponse , ReturnType < typeof adminListNodesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListNodes ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListNodesQueryKey ( options )
});
export const adminListNodesInfiniteQueryKey = ( options? : Options < AdminListNodesData >) : QueryKey < Options < AdminListNodesData >> => createQueryKey ( 'adminListNodes' , options , true );
/**
* List nodes
*
* Returns a paginated list of Wings nodes.
*/
export const adminListNodesInfiniteOptions = ( options? : Options < AdminListNodesData >) => {
const opts = infiniteQueryOptions < AdminListNodesResponse , AxiosError < AdminListNodesError >, InfiniteData < AdminListNodesResponse >, QueryKey < Options < AdminListNodesData >>, AdminListNodesPageQueryParameter | Pick < QueryKey < Options < AdminListNodesData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListNodesData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListNodes ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListNodesInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateNodeMutationKey = ( options? : Partial < Options < AdminCreateNodeData >>) => createMutationKey ( 'adminCreateNode' , options );
/**
* Create node
*
* Creates a Wings node. HTTPS nodes must use a valid FQDN rather than a raw IP address.
*/
export const adminCreateNodeMutation = ( options? : Partial < Options < AdminCreateNodeData >>) : UseMutationOptions < AdminCreateNodeResponse , AxiosError < AdminCreateNodeError >, Options < AdminCreateNodeData >> => {
const mutationOptions : UseMutationOptions < AdminCreateNodeResponse , AxiosError < AdminCreateNodeError >, Options < AdminCreateNodeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateNode ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateNodeMutationKey ( options )
};
return mutationOptions ;
};
export const adminDeleteNodeMutationKey = ( options? : Partial < Options < AdminDeleteNodeData >>) => createMutationKey ( 'adminDeleteNode' , options );
/**
* Delete node
*
* Deletes a node when it has no active servers.
*/
export const adminDeleteNodeMutation = ( options? : Partial < Options < AdminDeleteNodeData >>) : UseMutationOptions < AdminDeleteNodeResponse , AxiosError < AdminDeleteNodeError >, Options < AdminDeleteNodeData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteNodeResponse , AxiosError < AdminDeleteNodeError >, Options < AdminDeleteNodeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteNode ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteNodeMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetNodeQueryKey = ( options : Options < AdminGetNodeData >) => createQueryKey ( 'adminGetNode' , options );
/**
* Get node
*
* Returns a single Wings node by ID.
*/
export const adminGetNodeOptions = ( options : Options < AdminGetNodeData >) => queryOptions < AdminGetNodeResponse , AxiosError < AdminGetNodeError >, AdminGetNodeResponse , ReturnType < typeof adminGetNodeQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetNode ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetNodeQueryKey ( options )
});
export const adminUpdateNodeMutationKey = ( options? : Partial < Options < AdminUpdateNodeData >>) => createMutationKey ( 'adminUpdateNode' , options );
/**
* Update node
*
* Updates a Wings node and optionally rotates its daemon secret.
*/
export const adminUpdateNodeMutation = ( options? : Partial < Options < AdminUpdateNodeData >>) : UseMutationOptions < AdminUpdateNodeResponse , AxiosError < AdminUpdateNodeError >, Options < AdminUpdateNodeData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateNodeResponse , AxiosError < AdminUpdateNodeError >, Options < AdminUpdateNodeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateNode ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateNodeMutationKey ( options )
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const adminGetNodeConfigurationQueryKey = ( options : Options < AdminGetNodeConfigurationData >) => createQueryKey ( 'adminGetNodeConfiguration' , options );
/**
* Get node configuration
*
* Returns the raw Wings configuration payload for a node, including daemon authentication tokens.
*/
export const adminGetNodeConfigurationOptions = ( options : Options < AdminGetNodeConfigurationData >) => queryOptions < AdminGetNodeConfigurationResponse , AxiosError < AdminGetNodeConfigurationError >, AdminGetNodeConfigurationResponse , ReturnType < typeof adminGetNodeConfigurationQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetNodeConfiguration ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetNodeConfigurationQueryKey ( options )
});
2026-10-05 18:10:18 -04:00
export const adminSyncNodeGameTagsMutationKey = ( options? : Partial < Options < AdminSyncNodeGameTagsData >>) => createMutationKey ( 'adminSyncNodeGameTags' , options );
/**
* Sync node game tags
*
* Replaces the games a node accepts. A node with no game tags accepts any egg.
*/
export const adminSyncNodeGameTagsMutation = ( options? : Partial < Options < AdminSyncNodeGameTagsData >>) : UseMutationOptions < AdminSyncNodeGameTagsResponse , AxiosError < AdminSyncNodeGameTagsError >, Options < AdminSyncNodeGameTagsData >> => {
const mutationOptions : UseMutationOptions < AdminSyncNodeGameTagsResponse , AxiosError < AdminSyncNodeGameTagsError >, Options < AdminSyncNodeGameTagsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminSyncNodeGameTags ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminSyncNodeGameTagsMutationKey ( options )
};
return mutationOptions ;
};
export const adminSyncNodeDeploymentTagsMutationKey = ( options? : Partial < Options < AdminSyncNodeDeploymentTagsData >>) => createMutationKey ( 'adminSyncNodeDeploymentTags' , options );
/**
* Sync node deployment tags
*
* Replaces the reservations on a node. A deploy must declare exactly these tags to land here.
*/
export const adminSyncNodeDeploymentTagsMutation = ( options? : Partial < Options < AdminSyncNodeDeploymentTagsData >>) : UseMutationOptions < AdminSyncNodeDeploymentTagsResponse , AxiosError < AdminSyncNodeDeploymentTagsError >, Options < AdminSyncNodeDeploymentTagsData >> => {
const mutationOptions : UseMutationOptions < AdminSyncNodeDeploymentTagsResponse , AxiosError < AdminSyncNodeDeploymentTagsError >, Options < AdminSyncNodeDeploymentTagsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminSyncNodeDeploymentTags ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminSyncNodeDeploymentTagsMutationKey ( options )
};
return mutationOptions ;
};
export const adminBulkDeleteNodeAllocationsMutationKey = ( options? : Partial < Options < AdminBulkDeleteNodeAllocationsData >>) => createMutationKey ( 'adminBulkDeleteNodeAllocations' , options );
/**
* Bulk delete node allocations
*
* Deletes multiple unassigned allocations from a node by allocation ID.
*/
export const adminBulkDeleteNodeAllocationsMutation = ( options? : Partial < Options < AdminBulkDeleteNodeAllocationsData >>) : UseMutationOptions < AdminBulkDeleteNodeAllocationsResponse , AxiosError < AdminBulkDeleteNodeAllocationsError >, Options < AdminBulkDeleteNodeAllocationsData >> => {
const mutationOptions : UseMutationOptions < AdminBulkDeleteNodeAllocationsResponse , AxiosError < AdminBulkDeleteNodeAllocationsError >, Options < AdminBulkDeleteNodeAllocationsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminBulkDeleteNodeAllocations ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminBulkDeleteNodeAllocationsMutationKey ( options )
};
return mutationOptions ;
};
export const adminListNodeAllocationsQueryKey = ( options : Options < AdminListNodeAllocationsData >) => createQueryKey ( 'adminListNodeAllocations' , options );
/**
* List node allocations
*
* Returns a paginated list of allocations for a node.
*/
export const adminListNodeAllocationsOptions = ( options : Options < AdminListNodeAllocationsData >) => queryOptions < AdminListNodeAllocationsResponse , AxiosError < AdminListNodeAllocationsError >, AdminListNodeAllocationsResponse , ReturnType < typeof adminListNodeAllocationsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListNodeAllocations ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListNodeAllocationsQueryKey ( options )
});
export const adminListNodeAllocationsInfiniteQueryKey = ( options : Options < AdminListNodeAllocationsData >) : QueryKey < Options < AdminListNodeAllocationsData >> => createQueryKey ( 'adminListNodeAllocations' , options , true );
/**
* List node allocations
*
* Returns a paginated list of allocations for a node.
*/
export const adminListNodeAllocationsInfiniteOptions = ( options : Options < AdminListNodeAllocationsData >) => {
const opts = infiniteQueryOptions < AdminListNodeAllocationsResponse , AxiosError < AdminListNodeAllocationsError >, InfiniteData < AdminListNodeAllocationsResponse >, QueryKey < Options < AdminListNodeAllocationsData >>, AdminListNodeAllocationsPageQueryParameter | Pick < QueryKey < Options < AdminListNodeAllocationsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListNodeAllocationsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListNodeAllocations ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListNodeAllocationsInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateNodeAllocationsMutationKey = ( options? : Partial < Options < AdminCreateNodeAllocationsData >>) => createMutationKey ( 'adminCreateNodeAllocations' , options );
/**
* Create node allocations
*
* Creates one or more allocations on a node from IP addresses and ports or port ranges.
*/
export const adminCreateNodeAllocationsMutation = ( options? : Partial < Options < AdminCreateNodeAllocationsData >>) : UseMutationOptions < AdminCreateNodeAllocationsResponse , AxiosError < AdminCreateNodeAllocationsError >, Options < AdminCreateNodeAllocationsData >> => {
const mutationOptions : UseMutationOptions < AdminCreateNodeAllocationsResponse , AxiosError < AdminCreateNodeAllocationsError >, Options < AdminCreateNodeAllocationsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateNodeAllocations ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateNodeAllocationsMutationKey ( options )
};
return mutationOptions ;
};
export const adminListNodeAllocationIpsQueryKey = ( options : Options < AdminListNodeAllocationIpsData >) => createQueryKey ( 'adminListNodeAllocationIps' , options );
/**
* List node allocation IPs
*
* Returns distinct allocation IP addresses for a node.
*/
export const adminListNodeAllocationIpsOptions = ( options : Options < AdminListNodeAllocationIpsData >) => queryOptions < AdminListNodeAllocationIpsResponse , AxiosError < AdminListNodeAllocationIpsError >, AdminListNodeAllocationIpsResponse , ReturnType < typeof adminListNodeAllocationIpsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListNodeAllocationIps ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListNodeAllocationIpsQueryKey ( options )
});
export const adminListAvailableNodeAllocationsQueryKey = ( options : Options < AdminListAvailableNodeAllocationsData >) => createQueryKey ( 'adminListAvailableNodeAllocations' , options );
/**
* List available node allocations
*
* Returns unassigned allocations for a node.
*/
export const adminListAvailableNodeAllocationsOptions = ( options : Options < AdminListAvailableNodeAllocationsData >) => queryOptions < AdminListAvailableNodeAllocationsResponse , AxiosError < AdminListAvailableNodeAllocationsError >, AdminListAvailableNodeAllocationsResponse , ReturnType < typeof adminListAvailableNodeAllocationsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListAvailableNodeAllocations ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListAvailableNodeAllocationsQueryKey ( options )
});
export const adminDeleteNodeAllocationIpBlockMutationKey = ( options? : Partial < Options < AdminDeleteNodeAllocationIpBlockData >>) => createMutationKey ( 'adminDeleteNodeAllocationIpBlock' , options );
/**
* Delete node allocation IP block
*
* Deletes every unassigned allocation for an IP address on a node.
*/
export const adminDeleteNodeAllocationIpBlockMutation = ( options? : Partial < Options < AdminDeleteNodeAllocationIpBlockData >>) : UseMutationOptions < AdminDeleteNodeAllocationIpBlockResponse , AxiosError < AdminDeleteNodeAllocationIpBlockError >, Options < AdminDeleteNodeAllocationIpBlockData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteNodeAllocationIpBlockResponse , AxiosError < AdminDeleteNodeAllocationIpBlockError >, Options < AdminDeleteNodeAllocationIpBlockData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteNodeAllocationIpBlock ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteNodeAllocationIpBlockMutationKey ( options )
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const adminDeleteNodeAllocationMutationKey = ( options? : Partial < Options < AdminDeleteNodeAllocationData >>) => createMutationKey ( 'adminDeleteNodeAllocation' , options );
2026-10-05 18:10:18 -04:00
/**
2026-10-11 02:28:28 -04:00
* Delete node allocation
2026-10-05 18:10:18 -04:00
*
2026-10-11 02:28:28 -04:00
* Deletes a single unassigned allocation from a node.
2026-10-05 18:10:18 -04:00
*/
2026-10-11 02:28:28 -04:00
export const adminDeleteNodeAllocationMutation = ( options? : Partial < Options < AdminDeleteNodeAllocationData >>) : UseMutationOptions < AdminDeleteNodeAllocationResponse , AxiosError < AdminDeleteNodeAllocationError >, Options < AdminDeleteNodeAllocationData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteNodeAllocationResponse , AxiosError < AdminDeleteNodeAllocationError >, Options < AdminDeleteNodeAllocationData >> = {
2026-10-05 18:10:18 -04:00
mutationFn : async ( fnOptions ) => {
2026-10-11 02:28:28 -04:00
const { data } = await adminDeleteNodeAllocation ({
2026-10-05 18:10:18 -04:00
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
2026-10-11 02:28:28 -04:00
mutationKey : adminDeleteNodeAllocationMutationKey ( options )
2026-10-05 18:10:18 -04:00
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const adminUpdateNodeAllocationMutationKey = ( options? : Partial < Options < AdminUpdateNodeAllocationData >>) => createMutationKey ( 'adminUpdateNodeAllocation' , options );
2026-10-05 18:10:18 -04:00
/**
2026-10-11 02:28:28 -04:00
* Update node allocation
2026-10-05 18:10:18 -04:00
*
2026-10-11 02:28:28 -04:00
* Updates the alias for a single allocation on a node.
2026-10-05 18:10:18 -04:00
*/
2026-10-11 02:28:28 -04:00
export const adminUpdateNodeAllocationMutation = ( options? : Partial < Options < AdminUpdateNodeAllocationData >>) : UseMutationOptions < AdminUpdateNodeAllocationResponse , AxiosError < AdminUpdateNodeAllocationError >, Options < AdminUpdateNodeAllocationData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateNodeAllocationResponse , AxiosError < AdminUpdateNodeAllocationError >, Options < AdminUpdateNodeAllocationData >> = {
2026-10-05 18:10:18 -04:00
mutationFn : async ( fnOptions ) => {
2026-10-11 02:28:28 -04:00
const { data } = await adminUpdateNodeAllocation ({
2026-10-05 18:10:18 -04:00
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
2026-10-11 02:28:28 -04:00
mutationKey : adminUpdateNodeAllocationMutationKey ( options )
2026-10-05 18:10:18 -04:00
};
return mutationOptions ;
};
export const adminListLocationsQueryKey = ( options? : Options < AdminListLocationsData >) => createQueryKey ( 'adminListLocations' , options );
/**
* List locations
*
* Returns a paginated list of locations.
*/
export const adminListLocationsOptions = ( options? : Options < AdminListLocationsData >) => queryOptions < AdminListLocationsResponse , AxiosError < AdminListLocationsError >, AdminListLocationsResponse , ReturnType < typeof adminListLocationsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListLocations ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListLocationsQueryKey ( options )
});
export const adminListLocationsInfiniteQueryKey = ( options? : Options < AdminListLocationsData >) : QueryKey < Options < AdminListLocationsData >> => createQueryKey ( 'adminListLocations' , options , true );
/**
* List locations
*
* Returns a paginated list of locations.
*/
export const adminListLocationsInfiniteOptions = ( options? : Options < AdminListLocationsData >) => {
const opts = infiniteQueryOptions < AdminListLocationsResponse , AxiosError < AdminListLocationsError >, InfiniteData < AdminListLocationsResponse >, QueryKey < Options < AdminListLocationsData >>, AdminListLocationsPageQueryParameter | Pick < QueryKey < Options < AdminListLocationsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListLocationsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListLocations ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListLocationsInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateLocationMutationKey = ( options? : Partial < Options < AdminCreateLocationData >>) => createMutationKey ( 'adminCreateLocation' , options );
/**
* Create location
*
* Creates a location for grouping nodes and servers.
*/
export const adminCreateLocationMutation = ( options? : Partial < Options < AdminCreateLocationData >>) : UseMutationOptions < AdminCreateLocationResponse , AxiosError < AdminCreateLocationError >, Options < AdminCreateLocationData >> => {
const mutationOptions : UseMutationOptions < AdminCreateLocationResponse , AxiosError < AdminCreateLocationError >, Options < AdminCreateLocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateLocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateLocationMutationKey ( options )
};
return mutationOptions ;
};
export const adminDeleteLocationMutationKey = ( options? : Partial < Options < AdminDeleteLocationData >>) => createMutationKey ( 'adminDeleteLocation' , options );
/**
* Delete location
*
* Deletes a location when no dependent resources prevent removal.
*/
export const adminDeleteLocationMutation = ( options? : Partial < Options < AdminDeleteLocationData >>) : UseMutationOptions < AdminDeleteLocationResponse , AxiosError < AdminDeleteLocationError >, Options < AdminDeleteLocationData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteLocationResponse , AxiosError < AdminDeleteLocationError >, Options < AdminDeleteLocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteLocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteLocationMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetLocationQueryKey = ( options : Options < AdminGetLocationData >) => createQueryKey ( 'adminGetLocation' , options );
/**
* Get location
*
* Returns a single location by ID.
*/
export const adminGetLocationOptions = ( options : Options < AdminGetLocationData >) => queryOptions < AdminGetLocationResponse , AxiosError < AdminGetLocationError >, AdminGetLocationResponse , ReturnType < typeof adminGetLocationQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetLocation ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetLocationQueryKey ( options )
});
export const adminUpdateLocationMutationKey = ( options? : Partial < Options < AdminUpdateLocationData >>) => createMutationKey ( 'adminUpdateLocation' , options );
/**
* Update location
*
* Updates a location short identifier and description.
*/
export const adminUpdateLocationMutation = ( options? : Partial < Options < AdminUpdateLocationData >>) : UseMutationOptions < AdminUpdateLocationResponse , AxiosError < AdminUpdateLocationError >, Options < AdminUpdateLocationData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateLocationResponse , AxiosError < AdminUpdateLocationError >, Options < AdminUpdateLocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateLocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateLocationMutationKey ( options )
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const adminListEligibleLocationNodesQueryKey = ( options : Options < AdminListEligibleLocationNodesData >) => createQueryKey ( 'adminListEligibleLocationNodes' , options );
/**
* List eligible location nodes
*
* Returns nodes assigned to a location that can be selected for location-scoped workflows.
*/
export const adminListEligibleLocationNodesOptions = ( options : Options < AdminListEligibleLocationNodesData >) => queryOptions < AdminListEligibleLocationNodesResponse , AxiosError < AdminListEligibleLocationNodesError >, AdminListEligibleLocationNodesResponse , ReturnType < typeof adminListEligibleLocationNodesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListEligibleLocationNodes ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListEligibleLocationNodesQueryKey ( options )
});
2026-10-05 18:10:18 -04:00
export const adminListMountsQueryKey = ( options? : Options < AdminListMountsData >) => createQueryKey ( 'adminListMounts' , options );
/**
* List mounts
*
* Returns a paginated list of mount definitions.
*/
export const adminListMountsOptions = ( options? : Options < AdminListMountsData >) => queryOptions < AdminListMountsResponse , AxiosError < AdminListMountsError >, AdminListMountsResponse , ReturnType < typeof adminListMountsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListMounts ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListMountsQueryKey ( options )
});
export const adminListMountsInfiniteQueryKey = ( options? : Options < AdminListMountsData >) : QueryKey < Options < AdminListMountsData >> => createQueryKey ( 'adminListMounts' , options , true );
/**
* List mounts
*
* Returns a paginated list of mount definitions.
*/
export const adminListMountsInfiniteOptions = ( options? : Options < AdminListMountsData >) => {
const opts = infiniteQueryOptions < AdminListMountsResponse , AxiosError < AdminListMountsError >, InfiniteData < AdminListMountsResponse >, QueryKey < Options < AdminListMountsData >>, AdminListMountsPageQueryParameter | Pick < QueryKey < Options < AdminListMountsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListMountsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListMounts ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListMountsInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateMountMutationKey = ( options? : Partial < Options < AdminCreateMountData >>) => createMutationKey ( 'adminCreateMount' , options );
/**
* Create mount
*
* Creates a mount definition and generates its UUID.
*/
export const adminCreateMountMutation = ( options? : Partial < Options < AdminCreateMountData >>) : UseMutationOptions < AdminCreateMountResponse , AxiosError < AdminCreateMountError >, Options < AdminCreateMountData >> => {
const mutationOptions : UseMutationOptions < AdminCreateMountResponse , AxiosError < AdminCreateMountError >, Options < AdminCreateMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminDeleteMountMutationKey = ( options? : Partial < Options < AdminDeleteMountData >>) => createMutationKey ( 'adminDeleteMount' , options );
/**
* Delete mount
*
* Deletes a mount definition.
*/
export const adminDeleteMountMutation = ( options? : Partial < Options < AdminDeleteMountData >>) : UseMutationOptions < AdminDeleteMountResponse , AxiosError < AdminDeleteMountError >, Options < AdminDeleteMountData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteMountResponse , AxiosError < AdminDeleteMountError >, Options < AdminDeleteMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetMountQueryKey = ( options : Options < AdminGetMountData >) => createQueryKey ( 'adminGetMount' , options );
/**
* Get mount
*
* Returns a single mount definition by ID.
*/
export const adminGetMountOptions = ( options : Options < AdminGetMountData >) => queryOptions < AdminGetMountResponse , AxiosError < AdminGetMountError >, AdminGetMountResponse , ReturnType < typeof adminGetMountQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetMount ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetMountQueryKey ( options )
});
export const adminUpdateMountMutationKey = ( options? : Partial < Options < AdminUpdateMountData >>) => createMutationKey ( 'adminUpdateMount' , options );
/**
* Update mount
*
* Updates an existing mount definition.
*/
export const adminUpdateMountMutation = ( options? : Partial < Options < AdminUpdateMountData >>) : UseMutationOptions < AdminUpdateMountResponse , AxiosError < AdminUpdateMountError >, Options < AdminUpdateMountData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateMountResponse , AxiosError < AdminUpdateMountError >, Options < AdminUpdateMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminAttachEggsToMountMutationKey = ( options? : Partial < Options < AdminAttachEggsToMountData >>) => createMutationKey ( 'adminAttachEggsToMount' , options );
/**
* Attach eggs to mount
*
* Attaches one or more eggs to a mount definition without removing existing egg attachments.
*/
export const adminAttachEggsToMountMutation = ( options? : Partial < Options < AdminAttachEggsToMountData >>) : UseMutationOptions < AdminAttachEggsToMountResponse , AxiosError < AdminAttachEggsToMountError >, Options < AdminAttachEggsToMountData >> => {
const mutationOptions : UseMutationOptions < AdminAttachEggsToMountResponse , AxiosError < AdminAttachEggsToMountError >, Options < AdminAttachEggsToMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminAttachEggsToMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminAttachEggsToMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminDetachEggFromMountMutationKey = ( options? : Partial < Options < AdminDetachEggFromMountData >>) => createMutationKey ( 'adminDetachEggFromMount' , options );
/**
* Detach egg from mount
*
* Removes a single egg attachment from a mount definition.
*/
export const adminDetachEggFromMountMutation = ( options? : Partial < Options < AdminDetachEggFromMountData >>) : UseMutationOptions < AdminDetachEggFromMountResponse , AxiosError < AdminDetachEggFromMountError >, Options < AdminDetachEggFromMountData >> => {
const mutationOptions : UseMutationOptions < AdminDetachEggFromMountResponse , AxiosError < AdminDetachEggFromMountError >, Options < AdminDetachEggFromMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDetachEggFromMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDetachEggFromMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminAttachNodesToMountMutationKey = ( options? : Partial < Options < AdminAttachNodesToMountData >>) => createMutationKey ( 'adminAttachNodesToMount' , options );
/**
* Attach nodes to mount
*
* Attaches one or more nodes to a mount definition without removing existing node attachments.
*/
export const adminAttachNodesToMountMutation = ( options? : Partial < Options < AdminAttachNodesToMountData >>) : UseMutationOptions < AdminAttachNodesToMountResponse , AxiosError < AdminAttachNodesToMountError >, Options < AdminAttachNodesToMountData >> => {
const mutationOptions : UseMutationOptions < AdminAttachNodesToMountResponse , AxiosError < AdminAttachNodesToMountError >, Options < AdminAttachNodesToMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminAttachNodesToMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminAttachNodesToMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminDetachNodeFromMountMutationKey = ( options? : Partial < Options < AdminDetachNodeFromMountData >>) => createMutationKey ( 'adminDetachNodeFromMount' , options );
/**
* Detach node from mount
*
* Removes a single node attachment from a mount definition.
*/
export const adminDetachNodeFromMountMutation = ( options? : Partial < Options < AdminDetachNodeFromMountData >>) : UseMutationOptions < AdminDetachNodeFromMountResponse , AxiosError < AdminDetachNodeFromMountError >, Options < AdminDetachNodeFromMountData >> => {
const mutationOptions : UseMutationOptions < AdminDetachNodeFromMountResponse , AxiosError < AdminDetachNodeFromMountError >, Options < AdminDetachNodeFromMountData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDetachNodeFromMount ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDetachNodeFromMountMutationKey ( options )
};
return mutationOptions ;
};
export const adminListEggCatalogQueryKey = ( options? : Options < AdminListEggCatalogData >) => createQueryKey ( 'adminListEggCatalog' , options );
/**
* List egg catalog
*
* Returns the cached Pterodactyl egg catalog for searching and filtering. The index is cached for one hour.
*/
export const adminListEggCatalogOptions = ( options? : Options < AdminListEggCatalogData >) => queryOptions < AdminListEggCatalogResponse , AxiosError < AdminListEggCatalogError >, AdminListEggCatalogResponse , ReturnType < typeof adminListEggCatalogQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListEggCatalog ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListEggCatalogQueryKey ( options )
});
export const adminRefreshEggCatalogMutationKey = ( options? : Partial < Options < AdminRefreshEggCatalogData >>) => createMutationKey ( 'adminRefreshEggCatalog' , options );
/**
* Refresh egg catalog
*
* Clears the cached Pterodactyl catalog so the next listing downloads the current index.
*/
export const adminRefreshEggCatalogMutation = ( options? : Partial < Options < AdminRefreshEggCatalogData >>) : UseMutationOptions < AdminRefreshEggCatalogResponse , AxiosError < AdminRefreshEggCatalogError >, Options < AdminRefreshEggCatalogData >> => {
const mutationOptions : UseMutationOptions < AdminRefreshEggCatalogResponse , AxiosError < AdminRefreshEggCatalogError >, Options < AdminRefreshEggCatalogData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminRefreshEggCatalog ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminRefreshEggCatalogMutationKey ( options )
};
return mutationOptions ;
};
export const adminImportCatalogEggMutationKey = ( options? : Partial < Options < AdminImportCatalogEggData >>) => createMutationKey ( 'adminImportCatalogEgg' , options );
/**
* Import catalog egg
*
* Downloads the selected entry from the Pterodactyl catalog and imports its egg definition and variables.
*/
export const adminImportCatalogEggMutation = ( options? : Partial < Options < AdminImportCatalogEggData >>) : UseMutationOptions < AdminImportCatalogEggResponse , AxiosError < AdminImportCatalogEggError >, Options < AdminImportCatalogEggData >> => {
const mutationOptions : UseMutationOptions < AdminImportCatalogEggResponse , AxiosError < AdminImportCatalogEggError >, Options < AdminImportCatalogEggData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminImportCatalogEgg ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminImportCatalogEggMutationKey ( options )
};
return mutationOptions ;
};
export const adminListEggVariablesQueryKey = ( options : Options < AdminListEggVariablesData >) => createQueryKey ( 'adminListEggVariables' , options );
/**
* List egg variables
*
* Returns variables for an egg in display order.
*/
export const adminListEggVariablesOptions = ( options : Options < AdminListEggVariablesData >) => queryOptions < AdminListEggVariablesResponse , AxiosError < AdminListEggVariablesError >, AdminListEggVariablesResponse , ReturnType < typeof adminListEggVariablesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListEggVariables ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListEggVariablesQueryKey ( options )
});
export const adminCreateEggVariableMutationKey = ( options? : Partial < Options < AdminCreateEggVariableData >>) => createMutationKey ( 'adminCreateEggVariable' , options );
/**
* Create egg variable
*
* Creates a startup variable for an egg.
*/
export const adminCreateEggVariableMutation = ( options? : Partial < Options < AdminCreateEggVariableData >>) : UseMutationOptions < AdminCreateEggVariableResponse , AxiosError < AdminCreateEggVariableError >, Options < AdminCreateEggVariableData >> => {
const mutationOptions : UseMutationOptions < AdminCreateEggVariableResponse , AxiosError < AdminCreateEggVariableError >, Options < AdminCreateEggVariableData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateEggVariable ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateEggVariableMutationKey ( options )
};
return mutationOptions ;
};
export const adminReorderEggVariablesMutationKey = ( options? : Partial < Options < AdminReorderEggVariablesData >>) => createMutationKey ( 'adminReorderEggVariables' , options );
/**
* Reorder egg variables
*
* Updates the display order for variables on an egg.
*/
export const adminReorderEggVariablesMutation = ( options? : Partial < Options < AdminReorderEggVariablesData >>) : UseMutationOptions < AdminReorderEggVariablesResponse , AxiosError < AdminReorderEggVariablesError >, Options < AdminReorderEggVariablesData >> => {
const mutationOptions : UseMutationOptions < AdminReorderEggVariablesResponse , AxiosError < AdminReorderEggVariablesError >, Options < AdminReorderEggVariablesData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminReorderEggVariables ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminReorderEggVariablesMutationKey ( options )
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const adminDeleteEggVariableMutationKey = ( options? : Partial < Options < AdminDeleteEggVariableData >>) => createMutationKey ( 'adminDeleteEggVariable' , options );
2026-10-05 18:10:18 -04:00
/**
2026-10-11 02:28:28 -04:00
* Delete egg variable
2026-10-05 18:10:18 -04:00
*
2026-10-11 02:28:28 -04:00
* Deletes a startup variable from an egg.
2026-10-05 18:10:18 -04:00
*/
2026-10-11 02:28:28 -04:00
export const adminDeleteEggVariableMutation = ( options? : Partial < Options < AdminDeleteEggVariableData >>) : UseMutationOptions < AdminDeleteEggVariableResponse , AxiosError < AdminDeleteEggVariableError >, Options < AdminDeleteEggVariableData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteEggVariableResponse , AxiosError < AdminDeleteEggVariableError >, Options < AdminDeleteEggVariableData >> = {
2026-10-05 18:10:18 -04:00
mutationFn : async ( fnOptions ) => {
2026-10-11 02:28:28 -04:00
const { data } = await adminDeleteEggVariable ({
2026-10-05 18:10:18 -04:00
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
2026-10-11 02:28:28 -04:00
mutationKey : adminDeleteEggVariableMutationKey ( options )
2026-10-05 18:10:18 -04:00
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const adminUpdateEggVariableMutationKey = ( options? : Partial < Options < AdminUpdateEggVariableData >>) => createMutationKey ( 'adminUpdateEggVariable' , options );
2026-10-05 18:10:18 -04:00
/**
2026-10-11 02:28:28 -04:00
* Update egg variable
2026-10-05 18:10:18 -04:00
*
2026-10-11 02:28:28 -04:00
* Updates a startup variable for an egg.
2026-10-05 18:10:18 -04:00
*/
2026-10-11 02:28:28 -04:00
export const adminUpdateEggVariableMutation = ( options? : Partial < Options < AdminUpdateEggVariableData >>) : UseMutationOptions < AdminUpdateEggVariableResponse , AxiosError < AdminUpdateEggVariableError >, Options < AdminUpdateEggVariableData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateEggVariableResponse , AxiosError < AdminUpdateEggVariableError >, Options < AdminUpdateEggVariableData >> = {
2026-10-05 18:10:18 -04:00
mutationFn : async ( fnOptions ) => {
2026-10-11 02:28:28 -04:00
const { data } = await adminUpdateEggVariable ({
2026-10-05 18:10:18 -04:00
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
2026-10-11 02:28:28 -04:00
mutationKey : adminUpdateEggVariableMutationKey ( options )
2026-10-05 18:10:18 -04:00
};
return mutationOptions ;
};
export const adminGetEggInstallScriptQueryKey = ( options : Options < AdminGetEggInstallScriptData >) => createQueryKey ( 'adminGetEggInstallScript' , options );
/**
* Get egg install script
*
* Returns an egg with its install script block.
*/
export const adminGetEggInstallScriptOptions = ( options : Options < AdminGetEggInstallScriptData >) => queryOptions < AdminGetEggInstallScriptResponse , AxiosError < AdminGetEggInstallScriptError >, AdminGetEggInstallScriptResponse , ReturnType < typeof adminGetEggInstallScriptQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetEggInstallScript ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetEggInstallScriptQueryKey ( options )
});
export const adminUpdateEggInstallScriptMutationKey = ( options? : Partial < Options < AdminUpdateEggInstallScriptData >>) => createMutationKey ( 'adminUpdateEggInstallScript' , options );
/**
* Update egg install script
*
* Updates the install script configuration for an egg.
*/
export const adminUpdateEggInstallScriptMutation = ( options? : Partial < Options < AdminUpdateEggInstallScriptData >>) : UseMutationOptions < AdminUpdateEggInstallScriptResponse , AxiosError < AdminUpdateEggInstallScriptError >, Options < AdminUpdateEggInstallScriptData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateEggInstallScriptResponse , AxiosError < AdminUpdateEggInstallScriptError >, Options < AdminUpdateEggInstallScriptData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateEggInstallScript ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateEggInstallScriptMutationKey ( options )
};
return mutationOptions ;
};
export const adminExportEggQueryKey = ( options : Options < AdminExportEggData >) => createQueryKey ( 'adminExportEgg' , options );
/**
* Export egg
*
* Downloads an egg share JSON file.
*/
export const adminExportEggOptions = ( options : Options < AdminExportEggData >) => queryOptions < AdminExportEggResponse , AxiosError < AdminExportEggError >, AdminExportEggResponse , ReturnType < typeof adminExportEggQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminExportEgg ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminExportEggQueryKey ( options )
});
export const adminUpdateEggFromImportMutationKey = ( options? : Partial < Options < AdminUpdateEggFromImportData >>) => createMutationKey ( 'adminUpdateEggFromImport' , options );
/**
* Update egg from import
*
* Updates an existing egg from an uploaded egg share JSON file.
*/
export const adminUpdateEggFromImportMutation = ( options? : Partial < Options < AdminUpdateEggFromImportData >>) : UseMutationOptions < AdminUpdateEggFromImportResponse , AxiosError < AdminUpdateEggFromImportError >, Options < AdminUpdateEggFromImportData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateEggFromImportResponse , AxiosError < AdminUpdateEggFromImportError >, Options < AdminUpdateEggFromImportData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateEggFromImport ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateEggFromImportMutationKey ( options )
};
return mutationOptions ;
};
export const adminSyncEggTagsMutationKey = ( options? : Partial < Options < AdminSyncEggTagsData >>) => createMutationKey ( 'adminSyncEggTags' , options );
/**
* Sync egg tags
*
* Replaces the tags applied to an egg. Values may be tag IDs or new tag names.
*/
export const adminSyncEggTagsMutation = ( options? : Partial < Options < AdminSyncEggTagsData >>) : UseMutationOptions < AdminSyncEggTagsResponse , AxiosError < AdminSyncEggTagsError >, Options < AdminSyncEggTagsData >> => {
const mutationOptions : UseMutationOptions < AdminSyncEggTagsResponse , AxiosError < AdminSyncEggTagsError >, Options < AdminSyncEggTagsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminSyncEggTags ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminSyncEggTagsMutationKey ( options )
};
return mutationOptions ;
};
export const adminImportEggMutationKey = ( options? : Partial < Options < AdminImportEggData >>) => createMutationKey ( 'adminImportEgg' , options );
/**
* Import egg
*
* Creates an egg from an uploaded egg share JSON file.
*/
export const adminImportEggMutation = ( options? : Partial < Options < AdminImportEggData >>) : UseMutationOptions < AdminImportEggResponse , AxiosError < AdminImportEggError >, Options < AdminImportEggData >> => {
const mutationOptions : UseMutationOptions < AdminImportEggResponse , AxiosError < AdminImportEggError >, Options < AdminImportEggData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminImportEgg ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminImportEggMutationKey ( options )
};
return mutationOptions ;
};
export const adminListEggsQueryKey = ( options? : Options < AdminListEggsData >) => createQueryKey ( 'adminListEggs' , options );
/**
* List eggs
*
* Returns a paginated list of egg definitions.
*/
export const adminListEggsOptions = ( options? : Options < AdminListEggsData >) => queryOptions < AdminListEggsResponse , AxiosError < AdminListEggsError >, AdminListEggsResponse , ReturnType < typeof adminListEggsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListEggs ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListEggsQueryKey ( options )
});
export const adminListEggsInfiniteQueryKey = ( options? : Options < AdminListEggsData >) : QueryKey < Options < AdminListEggsData >> => createQueryKey ( 'adminListEggs' , options , true );
/**
* List eggs
*
* Returns a paginated list of egg definitions.
*/
export const adminListEggsInfiniteOptions = ( options? : Options < AdminListEggsData >) => {
const opts = infiniteQueryOptions < AdminListEggsResponse , AxiosError < AdminListEggsError >, InfiniteData < AdminListEggsResponse >, QueryKey < Options < AdminListEggsData >>, AdminListEggsPageQueryParameter | Pick < QueryKey < Options < AdminListEggsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListEggsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListEggs ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListEggsInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateEggMutationKey = ( options? : Partial < Options < AdminCreateEggData >>) => createMutationKey ( 'adminCreateEgg' , options );
/**
* Create egg
*
* Creates an egg definition.
*/
export const adminCreateEggMutation = ( options? : Partial < Options < AdminCreateEggData >>) : UseMutationOptions < AdminCreateEggResponse , AxiosError < AdminCreateEggError >, Options < AdminCreateEggData >> => {
const mutationOptions : UseMutationOptions < AdminCreateEggResponse , AxiosError < AdminCreateEggError >, Options < AdminCreateEggData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateEgg ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateEggMutationKey ( options )
};
return mutationOptions ;
};
export const adminDeleteEggMutationKey = ( options? : Partial < Options < AdminDeleteEggData >>) => createMutationKey ( 'adminDeleteEgg' , options );
/**
* Delete egg
*
* Deletes an egg definition.
*/
export const adminDeleteEggMutation = ( options? : Partial < Options < AdminDeleteEggData >>) : UseMutationOptions < AdminDeleteEggResponse , AxiosError < AdminDeleteEggError >, Options < AdminDeleteEggData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteEggResponse , AxiosError < AdminDeleteEggError >, Options < AdminDeleteEggData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteEgg ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteEggMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetEggQueryKey = ( options : Options < AdminGetEggData >) => createQueryKey ( 'adminGetEgg' , options );
/**
* Get egg
*
* Returns a single egg definition by ID.
*/
export const adminGetEggOptions = ( options : Options < AdminGetEggData >) => queryOptions < AdminGetEggResponse , AxiosError < AdminGetEggError >, AdminGetEggResponse , ReturnType < typeof adminGetEggQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetEgg ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetEggQueryKey ( options )
});
export const adminUpdateEggMutationKey = ( options? : Partial < Options < AdminUpdateEggData >>) => createMutationKey ( 'adminUpdateEgg' , options );
/**
* Update egg
*
* Updates an egg definition.
*/
export const adminUpdateEggMutation = ( options? : Partial < Options < AdminUpdateEggData >>) : UseMutationOptions < AdminUpdateEggResponse , AxiosError < AdminUpdateEggError >, Options < AdminUpdateEggData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateEggResponse , AxiosError < AdminUpdateEggError >, Options < AdminUpdateEggData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateEgg ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateEggMutationKey ( options )
};
return mutationOptions ;
};
export const adminListTagsQueryKey = ( options? : Options < AdminListTagsData >) => createQueryKey ( 'adminListTags' , options );
/**
* List tags
*
* Returns a paginated list of tags.
*/
export const adminListTagsOptions = ( options? : Options < AdminListTagsData >) => queryOptions < AdminListTagsResponse , AxiosError < AdminListTagsError >, AdminListTagsResponse , ReturnType < typeof adminListTagsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListTags ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListTagsQueryKey ( options )
});
export const adminListTagsInfiniteQueryKey = ( options? : Options < AdminListTagsData >) : QueryKey < Options < AdminListTagsData >> => createQueryKey ( 'adminListTags' , options , true );
/**
* List tags
*
* Returns a paginated list of tags.
*/
export const adminListTagsInfiniteOptions = ( options? : Options < AdminListTagsData >) => {
const opts = infiniteQueryOptions < AdminListTagsResponse , AxiosError < AdminListTagsError >, InfiniteData < AdminListTagsResponse >, QueryKey < Options < AdminListTagsData >>, AdminListTagsPageQueryParameter | Pick < QueryKey < Options < AdminListTagsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListTagsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListTags ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListTagsInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateTagMutationKey = ( options? : Partial < Options < AdminCreateTagData >>) => createMutationKey ( 'adminCreateTag' , options );
/**
* Create tag
*
* Creates a tag.
*/
export const adminCreateTagMutation = ( options? : Partial < Options < AdminCreateTagData >>) : UseMutationOptions < AdminCreateTagResponse , AxiosError < AdminCreateTagError >, Options < AdminCreateTagData >> => {
const mutationOptions : UseMutationOptions < AdminCreateTagResponse , AxiosError < AdminCreateTagError >, Options < AdminCreateTagData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateTag ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateTagMutationKey ( options )
};
return mutationOptions ;
};
export const adminDeleteTagMutationKey = ( options? : Partial < Options < AdminDeleteTagData >>) => createMutationKey ( 'adminDeleteTag' , options );
/**
* Delete tag
*
* Deletes a tag and detaches it from every egg and node.
*/
export const adminDeleteTagMutation = ( options? : Partial < Options < AdminDeleteTagData >>) : UseMutationOptions < AdminDeleteTagResponse , AxiosError < AdminDeleteTagError >, Options < AdminDeleteTagData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteTagResponse , AxiosError < AdminDeleteTagError >, Options < AdminDeleteTagData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteTag ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteTagMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetTagQueryKey = ( options : Options < AdminGetTagData >) => createQueryKey ( 'adminGetTag' , options );
/**
* Get tag
*
* Returns a single tag by ID.
*/
export const adminGetTagOptions = ( options : Options < AdminGetTagData >) => queryOptions < AdminGetTagResponse , AxiosError < AdminGetTagError >, AdminGetTagResponse , ReturnType < typeof adminGetTagQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetTag ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetTagQueryKey ( options )
});
export const adminUpdateTagMutationKey = ( options? : Partial < Options < AdminUpdateTagData >>) => createMutationKey ( 'adminUpdateTag' , options );
/**
* Update tag
*
* Updates an existing tag. Built-in game tags cannot be edited.
*/
export const adminUpdateTagMutation = ( options? : Partial < Options < AdminUpdateTagData >>) : UseMutationOptions < AdminUpdateTagResponse , AxiosError < AdminUpdateTagError >, Options < AdminUpdateTagData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateTagResponse , AxiosError < AdminUpdateTagError >, Options < AdminUpdateTagData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateTag ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateTagMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetSettingsQueryKey = ( options? : Options < AdminGetSettingsData >) => createQueryKey ( 'adminGetSettings' , options );
/**
* Get settings
*
* Returns current general, mail, advanced, and metadata settings.
*/
export const adminGetSettingsOptions = ( options? : Options < AdminGetSettingsData >) => queryOptions < AdminGetSettingsResponse , AxiosError < AdminGetSettingsError >, AdminGetSettingsResponse , ReturnType < typeof adminGetSettingsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetSettings ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetSettingsQueryKey ( options )
});
export const adminUpdateGeneralSettingsMutationKey = ( options? : Partial < Options < AdminUpdateGeneralSettingsData >>) => createMutationKey ( 'adminUpdateGeneralSettings' , options );
/**
* Update general settings
*
* Updates panel branding, 2FA requirements, and default locale settings.
*/
export const adminUpdateGeneralSettingsMutation = ( options? : Partial < Options < AdminUpdateGeneralSettingsData >>) : UseMutationOptions < AdminUpdateGeneralSettingsResponse , AxiosError < AdminUpdateGeneralSettingsError >, Options < AdminUpdateGeneralSettingsData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateGeneralSettingsResponse , AxiosError < AdminUpdateGeneralSettingsError >, Options < AdminUpdateGeneralSettingsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateGeneralSettings ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateGeneralSettingsMutationKey ( options )
};
return mutationOptions ;
};
export const adminUpdateMailSettingsMutationKey = ( options? : Partial < Options < AdminUpdateMailSettingsData >>) => createMutationKey ( 'adminUpdateMailSettings' , options );
/**
* Update mail settings
*
* Updates SMTP mail settings and restarts queued workers so they reload configuration.
*/
export const adminUpdateMailSettingsMutation = ( options? : Partial < Options < AdminUpdateMailSettingsData >>) : UseMutationOptions < AdminUpdateMailSettingsResponse , AxiosError < AdminUpdateMailSettingsError >, Options < AdminUpdateMailSettingsData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateMailSettingsResponse , AxiosError < AdminUpdateMailSettingsError >, Options < AdminUpdateMailSettingsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateMailSettings ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateMailSettingsMutationKey ( options )
};
return mutationOptions ;
};
export const adminSendTestMailMutationKey = ( options? : Partial < Options < AdminSendTestMailData >>) => createMutationKey ( 'adminSendTestMail' , options );
/**
* Send test mail
*
* Sends a test email to the authenticated administrator using the configured mail transport.
*/
export const adminSendTestMailMutation = ( options? : Partial < Options < AdminSendTestMailData >>) : UseMutationOptions < AdminSendTestMailResponse , AxiosError < AdminSendTestMailError >, Options < AdminSendTestMailData >> => {
const mutationOptions : UseMutationOptions < AdminSendTestMailResponse , AxiosError < AdminSendTestMailError >, Options < AdminSendTestMailData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminSendTestMail ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminSendTestMailMutationKey ( options )
};
return mutationOptions ;
};
export const adminUpdateAdvancedSettingsMutationKey = ( options? : Partial < Options < AdminUpdateAdvancedSettingsData >>) => createMutationKey ( 'adminUpdateAdvancedSettings' , options );
/**
* Update advanced settings
*
* Updates reCAPTCHA, HTTP client timeout, and client allocation feature settings.
*/
export const adminUpdateAdvancedSettingsMutation = ( options? : Partial < Options < AdminUpdateAdvancedSettingsData >>) : UseMutationOptions < AdminUpdateAdvancedSettingsResponse , AxiosError < AdminUpdateAdvancedSettingsError >, Options < AdminUpdateAdvancedSettingsData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateAdvancedSettingsResponse , AxiosError < AdminUpdateAdvancedSettingsError >, Options < AdminUpdateAdvancedSettingsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateAdvancedSettings ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateAdvancedSettingsMutationKey ( options )
};
return mutationOptions ;
};
export const adminListDatabaseHostsQueryKey = ( options? : Options < AdminListDatabaseHostsData >) => createQueryKey ( 'adminListDatabaseHosts' , options );
/**
* List database hosts
*
* Returns a paginated list of database hosts.
*/
export const adminListDatabaseHostsOptions = ( options? : Options < AdminListDatabaseHostsData >) => queryOptions < AdminListDatabaseHostsResponse , AxiosError < AdminListDatabaseHostsError >, AdminListDatabaseHostsResponse , ReturnType < typeof adminListDatabaseHostsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListDatabaseHosts ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListDatabaseHostsQueryKey ( options )
});
export const adminListDatabaseHostsInfiniteQueryKey = ( options? : Options < AdminListDatabaseHostsData >) : QueryKey < Options < AdminListDatabaseHostsData >> => createQueryKey ( 'adminListDatabaseHosts' , options , true );
/**
* List database hosts
*
* Returns a paginated list of database hosts.
*/
export const adminListDatabaseHostsInfiniteOptions = ( options? : Options < AdminListDatabaseHostsData >) => {
const opts = infiniteQueryOptions < AdminListDatabaseHostsResponse , AxiosError < AdminListDatabaseHostsError >, InfiniteData < AdminListDatabaseHostsResponse >, QueryKey < Options < AdminListDatabaseHostsData >>, AdminListDatabaseHostsPageQueryParameter | Pick < QueryKey < Options < AdminListDatabaseHostsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListDatabaseHostsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListDatabaseHosts ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListDatabaseHostsInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateDatabaseHostMutationKey = ( options? : Partial < Options < AdminCreateDatabaseHostData >>) => createMutationKey ( 'adminCreateDatabaseHost' , options );
/**
* Create database host
*
* Creates a database host after validating that the panel can connect to it.
*/
export const adminCreateDatabaseHostMutation = ( options? : Partial < Options < AdminCreateDatabaseHostData >>) : UseMutationOptions < AdminCreateDatabaseHostResponse , AxiosError < AdminCreateDatabaseHostError >, Options < AdminCreateDatabaseHostData >> => {
const mutationOptions : UseMutationOptions < AdminCreateDatabaseHostResponse , AxiosError < AdminCreateDatabaseHostError >, Options < AdminCreateDatabaseHostData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateDatabaseHost ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateDatabaseHostMutationKey ( options )
};
return mutationOptions ;
};
export const adminDeleteDatabaseHostMutationKey = ( options? : Partial < Options < AdminDeleteDatabaseHostData >>) => createMutationKey ( 'adminDeleteDatabaseHost' , options );
/**
* Delete database host
*
* Deletes a database host when no server databases depend on it.
*/
export const adminDeleteDatabaseHostMutation = ( options? : Partial < Options < AdminDeleteDatabaseHostData >>) : UseMutationOptions < AdminDeleteDatabaseHostResponse , AxiosError < AdminDeleteDatabaseHostError >, Options < AdminDeleteDatabaseHostData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteDatabaseHostResponse , AxiosError < AdminDeleteDatabaseHostError >, Options < AdminDeleteDatabaseHostData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteDatabaseHost ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteDatabaseHostMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetDatabaseHostQueryKey = ( options : Options < AdminGetDatabaseHostData >) => createQueryKey ( 'adminGetDatabaseHost' , options );
/**
* Get database host
*
* Returns a single database host by ID.
*/
export const adminGetDatabaseHostOptions = ( options : Options < AdminGetDatabaseHostData >) => queryOptions < AdminGetDatabaseHostResponse , AxiosError < AdminGetDatabaseHostError >, AdminGetDatabaseHostResponse , ReturnType < typeof adminGetDatabaseHostQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetDatabaseHost ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetDatabaseHostQueryKey ( options )
});
export const adminUpdateDatabaseHostMutationKey = ( options? : Partial < Options < AdminUpdateDatabaseHostData >>) => createMutationKey ( 'adminUpdateDatabaseHost' , options );
/**
* Update database host
*
* Updates a database host after validating that the panel can connect to the supplied host details.
*/
export const adminUpdateDatabaseHostMutation = ( options? : Partial < Options < AdminUpdateDatabaseHostData >>) : UseMutationOptions < AdminUpdateDatabaseHostResponse , AxiosError < AdminUpdateDatabaseHostError >, Options < AdminUpdateDatabaseHostData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateDatabaseHostResponse , AxiosError < AdminUpdateDatabaseHostError >, Options < AdminUpdateDatabaseHostData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateDatabaseHost ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateDatabaseHostMutationKey ( options )
};
return mutationOptions ;
};
export const adminListDatabaseHostDatabasesQueryKey = ( options : Options < AdminListDatabaseHostDatabasesData >) => createQueryKey ( 'adminListDatabaseHostDatabases' , options );
/**
* List database host databases
*
* Returns a paginated list of server databases assigned to a database host.
*/
export const adminListDatabaseHostDatabasesOptions = ( options : Options < AdminListDatabaseHostDatabasesData >) => queryOptions < AdminListDatabaseHostDatabasesResponse , AxiosError < AdminListDatabaseHostDatabasesError >, AdminListDatabaseHostDatabasesResponse , ReturnType < typeof adminListDatabaseHostDatabasesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListDatabaseHostDatabases ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListDatabaseHostDatabasesQueryKey ( options )
});
export const adminListDatabaseHostDatabasesInfiniteQueryKey = ( options : Options < AdminListDatabaseHostDatabasesData >) : QueryKey < Options < AdminListDatabaseHostDatabasesData >> => createQueryKey ( 'adminListDatabaseHostDatabases' , options , true );
/**
* List database host databases
*
* Returns a paginated list of server databases assigned to a database host.
*/
export const adminListDatabaseHostDatabasesInfiniteOptions = ( options : Options < AdminListDatabaseHostDatabasesData >) => {
const opts = infiniteQueryOptions < AdminListDatabaseHostDatabasesResponse , AxiosError < AdminListDatabaseHostDatabasesError >, InfiniteData < AdminListDatabaseHostDatabasesResponse >, QueryKey < Options < AdminListDatabaseHostDatabasesData >>, AdminListDatabaseHostDatabasesPageQueryParameter | Pick < QueryKey < Options < AdminListDatabaseHostDatabasesData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListDatabaseHostDatabasesData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListDatabaseHostDatabases ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListDatabaseHostDatabasesInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminListApiKeysQueryKey = ( options? : Options < AdminListApiKeysData >) => createQueryKey ( 'adminListApiKeys' , options );
/**
* List API keys
*
* Returns a paginated list of application API keys.
*/
export const adminListApiKeysOptions = ( options? : Options < AdminListApiKeysData >) => queryOptions < AdminListApiKeysResponse , AxiosError < AdminListApiKeysError >, AdminListApiKeysResponse , ReturnType < typeof adminListApiKeysQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminListApiKeys ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListApiKeysQueryKey ( options )
});
export const adminListApiKeysInfiniteQueryKey = ( options? : Options < AdminListApiKeysData >) : QueryKey < Options < AdminListApiKeysData >> => createQueryKey ( 'adminListApiKeys' , options , true );
/**
* List API keys
*
* Returns a paginated list of application API keys.
*/
export const adminListApiKeysInfiniteOptions = ( options? : Options < AdminListApiKeysData >) => {
const opts = infiniteQueryOptions < AdminListApiKeysResponse , AxiosError < AdminListApiKeysError >, InfiniteData < AdminListApiKeysResponse >, QueryKey < Options < AdminListApiKeysData >>, AdminListApiKeysPageQueryParameter | Pick < QueryKey < Options < AdminListApiKeysData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < AdminListApiKeysData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await adminListApiKeys ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminListApiKeysInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const adminCreateApiKeyMutationKey = ( options? : Partial < Options < AdminCreateApiKeyData >>) => createMutationKey ( 'adminCreateApiKey' , options );
/**
* Create API key
*
* Creates a new application API key and returns the plaintext secret token once.
*/
export const adminCreateApiKeyMutation = ( options? : Partial < Options < AdminCreateApiKeyData >>) : UseMutationOptions < AdminCreateApiKeyResponse , AxiosError < AdminCreateApiKeyError >, Options < AdminCreateApiKeyData >> => {
const mutationOptions : UseMutationOptions < AdminCreateApiKeyResponse , AxiosError < AdminCreateApiKeyError >, Options < AdminCreateApiKeyData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminCreateApiKey ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminCreateApiKeyMutationKey ( options )
};
return mutationOptions ;
};
export const adminDeleteApiKeyMutationKey = ( options? : Partial < Options < AdminDeleteApiKeyData >>) => createMutationKey ( 'adminDeleteApiKey' , options );
/**
* Delete API key
*
* Deletes an application API key by identifier.
*/
export const adminDeleteApiKeyMutation = ( options? : Partial < Options < AdminDeleteApiKeyData >>) : UseMutationOptions < AdminDeleteApiKeyResponse , AxiosError < AdminDeleteApiKeyError >, Options < AdminDeleteApiKeyData >> => {
const mutationOptions : UseMutationOptions < AdminDeleteApiKeyResponse , AxiosError < AdminDeleteApiKeyError >, Options < AdminDeleteApiKeyData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminDeleteApiKey ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminDeleteApiKeyMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetApiKeyQueryKey = ( options : Options < AdminGetApiKeyData >) => createQueryKey ( 'adminGetApiKey' , options );
/**
* Get API key
*
* Returns a single application API key by identifier without exposing its token.
*/
export const adminGetApiKeyOptions = ( options : Options < AdminGetApiKeyData >) => queryOptions < AdminGetApiKeyResponse , AxiosError < AdminGetApiKeyError >, AdminGetApiKeyResponse , ReturnType < typeof adminGetApiKeyQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetApiKey ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetApiKeyQueryKey ( options )
});
export const adminUpdateApiKeyMutationKey = ( options? : Partial < Options < AdminUpdateApiKeyData >>) => createMutationKey ( 'adminUpdateApiKey' , options );
/**
* Update API key
*
* Updates an application API key memo and resource permissions without regenerating the token.
*/
export const adminUpdateApiKeyMutation = ( options? : Partial < Options < AdminUpdateApiKeyData >>) : UseMutationOptions < AdminUpdateApiKeyResponse , AxiosError < AdminUpdateApiKeyError >, Options < AdminUpdateApiKeyData >> => {
const mutationOptions : UseMutationOptions < AdminUpdateApiKeyResponse , AxiosError < AdminUpdateApiKeyError >, Options < AdminUpdateApiKeyData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await adminUpdateApiKey ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : adminUpdateApiKeyMutationKey ( options )
};
return mutationOptions ;
};
export const adminGetVersionInformationQueryKey = ( options? : Options < AdminGetVersionInformationData >) => createQueryKey ( 'adminGetVersionInformation' , options );
/**
* Get version information
*
* Returns panel, Wings, and project version metadata.
*/
export const adminGetVersionInformationOptions = ( options? : Options < AdminGetVersionInformationData >) => queryOptions < AdminGetVersionInformationResponse , AxiosError < AdminGetVersionInformationError >, AdminGetVersionInformationResponse , ReturnType < typeof adminGetVersionInformationQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await adminGetVersionInformation ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : adminGetVersionInformationQueryKey ( options )
});
export const applicationListUsersQueryKey = ( options? : Options < ApplicationListUsersData >) => createQueryKey ( 'applicationListUsers' , options );
/**
* List users
*
* Returns a paginated list of panel users visible to the application API key.
*/
export const applicationListUsersOptions = ( options? : Options < ApplicationListUsersData >) => queryOptions < ApplicationListUsersResponse , AxiosError < ApplicationListUsersError >, ApplicationListUsersResponse , ReturnType < typeof applicationListUsersQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListUsers ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListUsersQueryKey ( options )
});
export const applicationCreateUserMutationKey = ( options? : Partial < Options < ApplicationCreateUserData >>) => createMutationKey ( 'applicationCreateUser' , options );
/**
* Create user
*
* Creates a new panel user and returns the created resource.
*/
export const applicationCreateUserMutation = ( options? : Partial < Options < ApplicationCreateUserData >>) : UseMutationOptions < ApplicationCreateUserResponse , AxiosError < ApplicationCreateUserError >, Options < ApplicationCreateUserData >> => {
const mutationOptions : UseMutationOptions < ApplicationCreateUserResponse , AxiosError < ApplicationCreateUserError >, Options < ApplicationCreateUserData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationCreateUser ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationCreateUserMutationKey ( options )
};
return mutationOptions ;
};
export const applicationDeleteUserMutationKey = ( options? : Partial < Options < ApplicationDeleteUserData >>) => createMutationKey ( 'applicationDeleteUser' , options );
/**
* Delete user
*
* Deletes a panel user by internal numeric ID.
*/
export const applicationDeleteUserMutation = ( options? : Partial < Options < ApplicationDeleteUserData >>) : UseMutationOptions < ApplicationDeleteUserResponse , AxiosError < ApplicationDeleteUserError >, Options < ApplicationDeleteUserData >> => {
const mutationOptions : UseMutationOptions < ApplicationDeleteUserResponse , AxiosError < ApplicationDeleteUserError >, Options < ApplicationDeleteUserData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationDeleteUser ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationDeleteUserMutationKey ( options )
};
return mutationOptions ;
};
export const applicationGetUserQueryKey = ( options : Options < ApplicationGetUserData >) => createQueryKey ( 'applicationGetUser' , options );
/**
* Get user
*
* Returns a single panel user by internal numeric ID.
*/
export const applicationGetUserOptions = ( options : Options < ApplicationGetUserData >) => queryOptions < ApplicationGetUserResponse , AxiosError < ApplicationGetUserError >, ApplicationGetUserResponse , ReturnType < typeof applicationGetUserQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetUser ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetUserQueryKey ( options )
});
export const applicationUpdateUserMutationKey = ( options? : Partial < Options < ApplicationUpdateUserData >>) => createMutationKey ( 'applicationUpdateUser' , options );
/**
* Update user
*
* Updates account details for an existing panel user.
*/
export const applicationUpdateUserMutation = ( options? : Partial < Options < ApplicationUpdateUserData >>) : UseMutationOptions < ApplicationUpdateUserResponse , AxiosError < ApplicationUpdateUserError >, Options < ApplicationUpdateUserData >> => {
const mutationOptions : UseMutationOptions < ApplicationUpdateUserResponse , AxiosError < ApplicationUpdateUserError >, Options < ApplicationUpdateUserData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationUpdateUser ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationUpdateUserMutationKey ( options )
};
return mutationOptions ;
};
export const applicationGetUserByExternalIdQueryKey = ( options : Options < ApplicationGetUserByExternalIdData >) => createQueryKey ( 'applicationGetUserByExternalId' , options );
/**
* Get user by external ID
*
* Returns a single panel user by its external identifier.
*/
export const applicationGetUserByExternalIdOptions = ( options : Options < ApplicationGetUserByExternalIdData >) => queryOptions < ApplicationGetUserByExternalIdResponse , AxiosError < ApplicationGetUserByExternalIdError >, ApplicationGetUserByExternalIdResponse , ReturnType < typeof applicationGetUserByExternalIdQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetUserByExternalId ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetUserByExternalIdQueryKey ( options )
});
export const applicationListNodesQueryKey = ( options? : Options < ApplicationListNodesData >) => createQueryKey ( 'applicationListNodes' , options );
/**
* List nodes
*
* Returns a paginated list of Wings nodes registered on the panel.
*/
export const applicationListNodesOptions = ( options? : Options < ApplicationListNodesData >) => queryOptions < ApplicationListNodesResponse , AxiosError < ApplicationListNodesError >, ApplicationListNodesResponse , ReturnType < typeof applicationListNodesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListNodes ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListNodesQueryKey ( options )
});
export const applicationCreateNodeMutationKey = ( options? : Partial < Options < ApplicationCreateNodeData >>) => createMutationKey ( 'applicationCreateNode' , options );
/**
* Create node
*
* Creates a new Wings node and returns the created resource.
*/
export const applicationCreateNodeMutation = ( options? : Partial < Options < ApplicationCreateNodeData >>) : UseMutationOptions < ApplicationCreateNodeResponse , AxiosError < ApplicationCreateNodeError >, Options < ApplicationCreateNodeData >> => {
const mutationOptions : UseMutationOptions < ApplicationCreateNodeResponse , AxiosError < ApplicationCreateNodeError >, Options < ApplicationCreateNodeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationCreateNode ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationCreateNodeMutationKey ( options )
};
return mutationOptions ;
};
export const applicationListDeployableNodesQueryKey = ( options : Options < ApplicationListDeployableNodesData >) => createQueryKey ( 'applicationListDeployableNodes' , options );
/**
* List deployable nodes
*
* Returns nodes that can satisfy the requested memory, disk, and optional location deployment constraints.
*/
export const applicationListDeployableNodesOptions = ( options : Options < ApplicationListDeployableNodesData >) => queryOptions < ApplicationListDeployableNodesResponse , AxiosError < ApplicationListDeployableNodesError >, ApplicationListDeployableNodesResponse , ReturnType < typeof applicationListDeployableNodesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListDeployableNodes ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListDeployableNodesQueryKey ( options )
});
export const applicationListDeployableNodesInfiniteQueryKey = ( options : Options < ApplicationListDeployableNodesData >) : QueryKey < Options < ApplicationListDeployableNodesData >> => createQueryKey ( 'applicationListDeployableNodes' , options , true );
/**
* List deployable nodes
*
* Returns nodes that can satisfy the requested memory, disk, and optional location deployment constraints.
*/
export const applicationListDeployableNodesInfiniteOptions = ( options : Options < ApplicationListDeployableNodesData >) => {
const opts = infiniteQueryOptions < ApplicationListDeployableNodesResponse , AxiosError < ApplicationListDeployableNodesError >, InfiniteData < ApplicationListDeployableNodesResponse >, QueryKey < Options < ApplicationListDeployableNodesData >>, ApplicationListDeployableNodesPageQueryParameter | Pick < QueryKey < Options < ApplicationListDeployableNodesData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < ApplicationListDeployableNodesData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await applicationListDeployableNodes ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListDeployableNodesInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const applicationDeleteNodeMutationKey = ( options? : Partial < Options < ApplicationDeleteNodeData >>) => createMutationKey ( 'applicationDeleteNode' , options );
/**
* Delete node
*
* Deletes a Wings node by internal numeric ID when no servers are attached.
*/
export const applicationDeleteNodeMutation = ( options? : Partial < Options < ApplicationDeleteNodeData >>) : UseMutationOptions < ApplicationDeleteNodeResponse , AxiosError < ApplicationDeleteNodeError >, Options < ApplicationDeleteNodeData >> => {
const mutationOptions : UseMutationOptions < ApplicationDeleteNodeResponse , AxiosError < ApplicationDeleteNodeError >, Options < ApplicationDeleteNodeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationDeleteNode ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationDeleteNodeMutationKey ( options )
};
return mutationOptions ;
};
export const applicationGetNodeQueryKey = ( options : Options < ApplicationGetNodeData >) => createQueryKey ( 'applicationGetNode' , options );
/**
* Get node
*
* Returns a single Wings node by internal numeric ID.
*/
export const applicationGetNodeOptions = ( options : Options < ApplicationGetNodeData >) => queryOptions < ApplicationGetNodeResponse , AxiosError < ApplicationGetNodeError >, ApplicationGetNodeResponse , ReturnType < typeof applicationGetNodeQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetNode ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetNodeQueryKey ( options )
});
export const applicationUpdateNodeMutationKey = ( options? : Partial < Options < ApplicationUpdateNodeData >>) => createMutationKey ( 'applicationUpdateNode' , options );
/**
* Update node
*
* Updates an existing Wings node by internal numeric ID.
*/
export const applicationUpdateNodeMutation = ( options? : Partial < Options < ApplicationUpdateNodeData >>) : UseMutationOptions < ApplicationUpdateNodeResponse , AxiosError < ApplicationUpdateNodeError >, Options < ApplicationUpdateNodeData >> => {
const mutationOptions : UseMutationOptions < ApplicationUpdateNodeResponse , AxiosError < ApplicationUpdateNodeError >, Options < ApplicationUpdateNodeData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationUpdateNode ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationUpdateNodeMutationKey ( options )
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const applicationGetNodeConfigurationQueryKey = ( options : Options < ApplicationGetNodeConfigurationData >) => createQueryKey ( 'applicationGetNodeConfiguration' , options );
/**
* Get node configuration
*
* Returns the Wings configuration payload for a node, including node authentication tokens. Requires write access to nodes.
*/
export const applicationGetNodeConfigurationOptions = ( options : Options < ApplicationGetNodeConfigurationData >) => queryOptions < ApplicationGetNodeConfigurationResponse , AxiosError < ApplicationGetNodeConfigurationError >, ApplicationGetNodeConfigurationResponse , ReturnType < typeof applicationGetNodeConfigurationQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetNodeConfiguration ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetNodeConfigurationQueryKey ( options )
});
2026-10-05 18:10:18 -04:00
export const applicationListNodeAllocationsQueryKey = ( options : Options < ApplicationListNodeAllocationsData >) => createQueryKey ( 'applicationListNodeAllocations' , options );
/**
* List node allocations
*
* Returns a paginated list of allocations belonging to a node.
*/
export const applicationListNodeAllocationsOptions = ( options : Options < ApplicationListNodeAllocationsData >) => queryOptions < ApplicationListNodeAllocationsResponse , AxiosError < ApplicationListNodeAllocationsError >, ApplicationListNodeAllocationsResponse , ReturnType < typeof applicationListNodeAllocationsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListNodeAllocations ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListNodeAllocationsQueryKey ( options )
});
export const applicationCreateNodeAllocationsMutationKey = ( options? : Partial < Options < ApplicationCreateNodeAllocationsData >>) => createMutationKey ( 'applicationCreateNodeAllocations' , options );
/**
* Create node allocations
*
* Assigns one or more allocation ports to a node.
*/
export const applicationCreateNodeAllocationsMutation = ( options? : Partial < Options < ApplicationCreateNodeAllocationsData >>) : UseMutationOptions < ApplicationCreateNodeAllocationsResponse , AxiosError < ApplicationCreateNodeAllocationsError >, Options < ApplicationCreateNodeAllocationsData >> => {
const mutationOptions : UseMutationOptions < ApplicationCreateNodeAllocationsResponse , AxiosError < ApplicationCreateNodeAllocationsError >, Options < ApplicationCreateNodeAllocationsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationCreateNodeAllocations ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationCreateNodeAllocationsMutationKey ( options )
};
return mutationOptions ;
};
export const applicationDeleteNodeAllocationMutationKey = ( options? : Partial < Options < ApplicationDeleteNodeAllocationData >>) => createMutationKey ( 'applicationDeleteNodeAllocation' , options );
/**
* Delete node allocation
*
* Deletes an allocation from a node when no server is using it.
*/
export const applicationDeleteNodeAllocationMutation = ( options? : Partial < Options < ApplicationDeleteNodeAllocationData >>) : UseMutationOptions < ApplicationDeleteNodeAllocationResponse , AxiosError < ApplicationDeleteNodeAllocationError >, Options < ApplicationDeleteNodeAllocationData >> => {
const mutationOptions : UseMutationOptions < ApplicationDeleteNodeAllocationResponse , AxiosError < ApplicationDeleteNodeAllocationError >, Options < ApplicationDeleteNodeAllocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationDeleteNodeAllocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationDeleteNodeAllocationMutationKey ( options )
};
return mutationOptions ;
};
export const applicationListLocationsQueryKey = ( options? : Options < ApplicationListLocationsData >) => createQueryKey ( 'applicationListLocations' , options );
/**
* List locations
*
* Returns a paginated list of all locations registered on the panel.
*/
export const applicationListLocationsOptions = ( options? : Options < ApplicationListLocationsData >) => queryOptions < ApplicationListLocationsResponse , AxiosError < ApplicationListLocationsError >, ApplicationListLocationsResponse , ReturnType < typeof applicationListLocationsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListLocations ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListLocationsQueryKey ( options )
});
export const applicationCreateLocationMutationKey = ( options? : Partial < Options < ApplicationCreateLocationData >>) => createMutationKey ( 'applicationCreateLocation' , options );
/**
* Create location
*
* Creates a new location and returns the created resource.
*/
export const applicationCreateLocationMutation = ( options? : Partial < Options < ApplicationCreateLocationData >>) : UseMutationOptions < ApplicationCreateLocationResponse , AxiosError < ApplicationCreateLocationError >, Options < ApplicationCreateLocationData >> => {
const mutationOptions : UseMutationOptions < ApplicationCreateLocationResponse , AxiosError < ApplicationCreateLocationError >, Options < ApplicationCreateLocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationCreateLocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationCreateLocationMutationKey ( options )
};
return mutationOptions ;
};
export const applicationDeleteLocationMutationKey = ( options? : Partial < Options < ApplicationDeleteLocationData >>) => createMutationKey ( 'applicationDeleteLocation' , options );
/**
* Delete location
*
* Deletes a location by internal numeric ID.
*/
export const applicationDeleteLocationMutation = ( options? : Partial < Options < ApplicationDeleteLocationData >>) : UseMutationOptions < ApplicationDeleteLocationResponse , AxiosError < ApplicationDeleteLocationError >, Options < ApplicationDeleteLocationData >> => {
const mutationOptions : UseMutationOptions < ApplicationDeleteLocationResponse , AxiosError < ApplicationDeleteLocationError >, Options < ApplicationDeleteLocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationDeleteLocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationDeleteLocationMutationKey ( options )
};
return mutationOptions ;
};
export const applicationGetLocationQueryKey = ( options : Options < ApplicationGetLocationData >) => createQueryKey ( 'applicationGetLocation' , options );
/**
* Get location
*
* Returns a single location by internal numeric ID.
*/
export const applicationGetLocationOptions = ( options : Options < ApplicationGetLocationData >) => queryOptions < ApplicationGetLocationResponse , AxiosError < ApplicationGetLocationError >, ApplicationGetLocationResponse , ReturnType < typeof applicationGetLocationQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetLocation ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetLocationQueryKey ( options )
});
export const applicationUpdateLocationMutationKey = ( options? : Partial < Options < ApplicationUpdateLocationData >>) => createMutationKey ( 'applicationUpdateLocation' , options );
/**
* Update location
*
* Updates an existing location by internal numeric ID.
*/
export const applicationUpdateLocationMutation = ( options? : Partial < Options < ApplicationUpdateLocationData >>) : UseMutationOptions < ApplicationUpdateLocationResponse , AxiosError < ApplicationUpdateLocationError >, Options < ApplicationUpdateLocationData >> => {
const mutationOptions : UseMutationOptions < ApplicationUpdateLocationResponse , AxiosError < ApplicationUpdateLocationError >, Options < ApplicationUpdateLocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationUpdateLocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationUpdateLocationMutationKey ( options )
};
return mutationOptions ;
};
export const applicationListEggsQueryKey = ( options? : Options < ApplicationListEggsData >) => createQueryKey ( 'applicationListEggs' , options );
/**
* List eggs
*
* Returns a paginated list of server eggs available on the panel.
*/
export const applicationListEggsOptions = ( options? : Options < ApplicationListEggsData >) => queryOptions < ApplicationListEggsResponse , AxiosError < ApplicationListEggsError >, ApplicationListEggsResponse , ReturnType < typeof applicationListEggsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListEggs ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListEggsQueryKey ( options )
});
export const applicationGetEggQueryKey = ( options : Options < ApplicationGetEggData >) => createQueryKey ( 'applicationGetEgg' , options );
/**
* Get egg
*
* Returns a single egg by internal numeric ID.
*/
export const applicationGetEggOptions = ( options : Options < ApplicationGetEggData >) => queryOptions < ApplicationGetEggResponse , AxiosError < ApplicationGetEggError >, ApplicationGetEggResponse , ReturnType < typeof applicationGetEggQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetEgg ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetEggQueryKey ( options )
});
export const applicationListTagsQueryKey = ( options? : Options < ApplicationListTagsData >) => createQueryKey ( 'applicationListTags' , options );
/**
* List tags
*
* Returns a paginated list of the tags that group eggs.
*/
export const applicationListTagsOptions = ( options? : Options < ApplicationListTagsData >) => queryOptions < ApplicationListTagsResponse , AxiosError < ApplicationListTagsError >, ApplicationListTagsResponse , ReturnType < typeof applicationListTagsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListTags ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListTagsQueryKey ( options )
});
export const applicationGetTagQueryKey = ( options : Options < ApplicationGetTagData >) => createQueryKey ( 'applicationGetTag' , options );
/**
* Get tag
*
* Returns a single tag by internal numeric ID.
*/
export const applicationGetTagOptions = ( options : Options < ApplicationGetTagData >) => queryOptions < ApplicationGetTagResponse , AxiosError < ApplicationGetTagError >, ApplicationGetTagResponse , ReturnType < typeof applicationGetTagQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetTag ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetTagQueryKey ( options )
});
export const applicationListServersQueryKey = ( options? : Options < ApplicationListServersData >) => createQueryKey ( 'applicationListServers' , options );
/**
* List servers
*
* Returns a paginated list of servers visible to the application API key.
*/
export const applicationListServersOptions = ( options? : Options < ApplicationListServersData >) => queryOptions < ApplicationListServersResponse , AxiosError < ApplicationListServersError >, ApplicationListServersResponse , ReturnType < typeof applicationListServersQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListServers ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListServersQueryKey ( options )
});
export const applicationCreateServerMutationKey = ( options? : Partial < Options < ApplicationCreateServerData >>) => createMutationKey ( 'applicationCreateServer' , options );
/**
* Create server
*
* Creates a new server using either explicit allocations or automatic deployment constraints.
*/
export const applicationCreateServerMutation = ( options? : Partial < Options < ApplicationCreateServerData >>) : UseMutationOptions < ApplicationCreateServerResponse , AxiosError < ApplicationCreateServerError >, Options < ApplicationCreateServerData >> => {
const mutationOptions : UseMutationOptions < ApplicationCreateServerResponse , AxiosError < ApplicationCreateServerError >, Options < ApplicationCreateServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationCreateServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationCreateServerMutationKey ( options )
};
return mutationOptions ;
};
export const applicationDeleteServerForServersServerIdMutationKey = ( options? : Partial < Options < ApplicationDeleteServerForServersServerIdData >>) => createMutationKey ( 'applicationDeleteServerForServersServerId' , options );
/**
* Delete server
*
* Deletes a server. The force route bypasses recoverable Wings or database host deletion failures.
*/
export const applicationDeleteServerForServersServerIdMutation = ( options? : Partial < Options < ApplicationDeleteServerForServersServerIdData >>) : UseMutationOptions < ApplicationDeleteServerForServersServerIdResponse , AxiosError < ApplicationDeleteServerForServersServerIdError >, Options < ApplicationDeleteServerForServersServerIdData >> => {
const mutationOptions : UseMutationOptions < ApplicationDeleteServerForServersServerIdResponse , AxiosError < ApplicationDeleteServerForServersServerIdError >, Options < ApplicationDeleteServerForServersServerIdData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationDeleteServerForServersServerId ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationDeleteServerForServersServerIdMutationKey ( options )
};
return mutationOptions ;
};
export const applicationGetServerQueryKey = ( options : Options < ApplicationGetServerData >) => createQueryKey ( 'applicationGetServer' , options );
/**
* Get server
*
* Returns a single server by internal numeric ID.
*/
export const applicationGetServerOptions = ( options : Options < ApplicationGetServerData >) => queryOptions < ApplicationGetServerResponse , AxiosError < ApplicationGetServerError >, ApplicationGetServerResponse , ReturnType < typeof applicationGetServerQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetServer ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetServerQueryKey ( options )
});
export const applicationGetServerByExternalIdQueryKey = ( options : Options < ApplicationGetServerByExternalIdData >) => createQueryKey ( 'applicationGetServerByExternalId' , options );
/**
* Get server by external ID
*
* Returns a single server by its external identifier.
*/
export const applicationGetServerByExternalIdOptions = ( options : Options < ApplicationGetServerByExternalIdData >) => queryOptions < ApplicationGetServerByExternalIdResponse , AxiosError < ApplicationGetServerByExternalIdError >, ApplicationGetServerByExternalIdResponse , ReturnType < typeof applicationGetServerByExternalIdQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetServerByExternalId ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetServerByExternalIdQueryKey ( options )
});
export const applicationUpdateServerDetailsMutationKey = ( options? : Partial < Options < ApplicationUpdateServerDetailsData >>) => createMutationKey ( 'applicationUpdateServerDetails' , options );
/**
* Update server details
*
* Updates ownership and display details for a server.
*/
export const applicationUpdateServerDetailsMutation = ( options? : Partial < Options < ApplicationUpdateServerDetailsData >>) : UseMutationOptions < ApplicationUpdateServerDetailsResponse , AxiosError < ApplicationUpdateServerDetailsError >, Options < ApplicationUpdateServerDetailsData >> => {
const mutationOptions : UseMutationOptions < ApplicationUpdateServerDetailsResponse , AxiosError < ApplicationUpdateServerDetailsError >, Options < ApplicationUpdateServerDetailsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationUpdateServerDetails ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationUpdateServerDetailsMutationKey ( options )
};
return mutationOptions ;
};
export const applicationUpdateServerBuildMutationKey = ( options? : Partial < Options < ApplicationUpdateServerBuildData >>) => createMutationKey ( 'applicationUpdateServerBuild' , options );
/**
* Update server build
*
* Updates resource limits, feature limits, and allocations for a server.
*/
export const applicationUpdateServerBuildMutation = ( options? : Partial < Options < ApplicationUpdateServerBuildData >>) : UseMutationOptions < ApplicationUpdateServerBuildResponse , AxiosError < ApplicationUpdateServerBuildError >, Options < ApplicationUpdateServerBuildData >> => {
const mutationOptions : UseMutationOptions < ApplicationUpdateServerBuildResponse , AxiosError < ApplicationUpdateServerBuildError >, Options < ApplicationUpdateServerBuildData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationUpdateServerBuild ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationUpdateServerBuildMutationKey ( options )
};
return mutationOptions ;
};
export const applicationUpdateServerStartupMutationKey = ( options? : Partial < Options < ApplicationUpdateServerStartupData >>) => createMutationKey ( 'applicationUpdateServerStartup' , options );
/**
* Update server startup
*
* Updates startup command, image, egg, and environment variables for a server.
*/
export const applicationUpdateServerStartupMutation = ( options? : Partial < Options < ApplicationUpdateServerStartupData >>) : UseMutationOptions < ApplicationUpdateServerStartupResponse , AxiosError < ApplicationUpdateServerStartupError >, Options < ApplicationUpdateServerStartupData >> => {
const mutationOptions : UseMutationOptions < ApplicationUpdateServerStartupResponse , AxiosError < ApplicationUpdateServerStartupError >, Options < ApplicationUpdateServerStartupData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationUpdateServerStartup ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationUpdateServerStartupMutationKey ( options )
};
return mutationOptions ;
};
export const applicationSuspendServerMutationKey = ( options? : Partial < Options < ApplicationSuspendServerData >>) => createMutationKey ( 'applicationSuspendServer' , options );
/**
* Suspend server
*
* Marks a server as suspended and syncs the state to Wings.
*/
export const applicationSuspendServerMutation = ( options? : Partial < Options < ApplicationSuspendServerData >>) : UseMutationOptions < ApplicationSuspendServerResponse , AxiosError < ApplicationSuspendServerError >, Options < ApplicationSuspendServerData >> => {
const mutationOptions : UseMutationOptions < ApplicationSuspendServerResponse , AxiosError < ApplicationSuspendServerError >, Options < ApplicationSuspendServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationSuspendServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationSuspendServerMutationKey ( options )
};
return mutationOptions ;
};
export const applicationUnsuspendServerMutationKey = ( options? : Partial < Options < ApplicationUnsuspendServerData >>) => createMutationKey ( 'applicationUnsuspendServer' , options );
/**
* Unsuspend server
*
* Clears a server suspension and syncs the state to Wings.
*/
export const applicationUnsuspendServerMutation = ( options? : Partial < Options < ApplicationUnsuspendServerData >>) : UseMutationOptions < ApplicationUnsuspendServerResponse , AxiosError < ApplicationUnsuspendServerError >, Options < ApplicationUnsuspendServerData >> => {
const mutationOptions : UseMutationOptions < ApplicationUnsuspendServerResponse , AxiosError < ApplicationUnsuspendServerError >, Options < ApplicationUnsuspendServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationUnsuspendServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationUnsuspendServerMutationKey ( options )
};
return mutationOptions ;
};
export const applicationReinstallServerMutationKey = ( options? : Partial < Options < ApplicationReinstallServerData >>) => createMutationKey ( 'applicationReinstallServer' , options );
/**
* Reinstall server
*
* Marks a server for reinstall and asks Wings to reinstall it.
*/
export const applicationReinstallServerMutation = ( options? : Partial < Options < ApplicationReinstallServerData >>) : UseMutationOptions < ApplicationReinstallServerResponse , AxiosError < ApplicationReinstallServerError >, Options < ApplicationReinstallServerData >> => {
const mutationOptions : UseMutationOptions < ApplicationReinstallServerResponse , AxiosError < ApplicationReinstallServerError >, Options < ApplicationReinstallServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationReinstallServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationReinstallServerMutationKey ( options )
};
return mutationOptions ;
};
export const applicationDeleteServerForServersServerIdForceMutationKey = ( options? : Partial < Options < ApplicationDeleteServerForServersServerIdForceData >>) => createMutationKey ( 'applicationDeleteServerForServersServerIdForce' , options );
/**
* Delete server
*
* Deletes a server. The force route bypasses recoverable Wings or database host deletion failures.
*/
export const applicationDeleteServerForServersServerIdForceMutation = ( options? : Partial < Options < ApplicationDeleteServerForServersServerIdForceData >>) : UseMutationOptions < ApplicationDeleteServerForServersServerIdForceResponse , AxiosError < ApplicationDeleteServerForServersServerIdForceError >, Options < ApplicationDeleteServerForServersServerIdForceData >> => {
const mutationOptions : UseMutationOptions < ApplicationDeleteServerForServersServerIdForceResponse , AxiosError < ApplicationDeleteServerForServersServerIdForceError >, Options < ApplicationDeleteServerForServersServerIdForceData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationDeleteServerForServersServerIdForce ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationDeleteServerForServersServerIdForceMutationKey ( options )
};
return mutationOptions ;
};
export const applicationListServerDatabasesQueryKey = ( options : Options < ApplicationListServerDatabasesData >) => createQueryKey ( 'applicationListServerDatabases' , options );
/**
* List server databases
*
* Returns all databases attached to a server.
*/
export const applicationListServerDatabasesOptions = ( options : Options < ApplicationListServerDatabasesData >) => queryOptions < ApplicationListServerDatabasesResponse , AxiosError < ApplicationListServerDatabasesError >, ApplicationListServerDatabasesResponse , ReturnType < typeof applicationListServerDatabasesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationListServerDatabases ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationListServerDatabasesQueryKey ( options )
});
export const applicationCreateServerDatabaseMutationKey = ( options? : Partial < Options < ApplicationCreateServerDatabaseData >>) => createMutationKey ( 'applicationCreateServerDatabase' , options );
/**
* Create server database
*
* Creates a database for a server on a configured database host.
*/
export const applicationCreateServerDatabaseMutation = ( options? : Partial < Options < ApplicationCreateServerDatabaseData >>) : UseMutationOptions < ApplicationCreateServerDatabaseResponse , AxiosError < ApplicationCreateServerDatabaseError >, Options < ApplicationCreateServerDatabaseData >> => {
const mutationOptions : UseMutationOptions < ApplicationCreateServerDatabaseResponse , AxiosError < ApplicationCreateServerDatabaseError >, Options < ApplicationCreateServerDatabaseData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationCreateServerDatabase ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationCreateServerDatabaseMutationKey ( options )
};
return mutationOptions ;
};
export const applicationDeleteServerDatabaseMutationKey = ( options? : Partial < Options < ApplicationDeleteServerDatabaseData >>) => createMutationKey ( 'applicationDeleteServerDatabase' , options );
/**
* Delete server database
*
* Deletes a database attached to a server.
*/
export const applicationDeleteServerDatabaseMutation = ( options? : Partial < Options < ApplicationDeleteServerDatabaseData >>) : UseMutationOptions < ApplicationDeleteServerDatabaseResponse , AxiosError < ApplicationDeleteServerDatabaseError >, Options < ApplicationDeleteServerDatabaseData >> => {
const mutationOptions : UseMutationOptions < ApplicationDeleteServerDatabaseResponse , AxiosError < ApplicationDeleteServerDatabaseError >, Options < ApplicationDeleteServerDatabaseData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationDeleteServerDatabase ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationDeleteServerDatabaseMutationKey ( options )
};
return mutationOptions ;
};
export const applicationGetServerDatabaseQueryKey = ( options : Options < ApplicationGetServerDatabaseData >) => createQueryKey ( 'applicationGetServerDatabase' , options );
/**
* Get server database
*
* Returns a single database attached to a server.
*/
export const applicationGetServerDatabaseOptions = ( options : Options < ApplicationGetServerDatabaseData >) => queryOptions < ApplicationGetServerDatabaseResponse , AxiosError < ApplicationGetServerDatabaseError >, ApplicationGetServerDatabaseResponse , ReturnType < typeof applicationGetServerDatabaseQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await applicationGetServerDatabase ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : applicationGetServerDatabaseQueryKey ( options )
});
export const applicationResetServerDatabasePasswordMutationKey = ( options? : Partial < Options < ApplicationResetServerDatabasePasswordData >>) => createMutationKey ( 'applicationResetServerDatabasePassword' , options );
/**
* Reset server database password
*
* Rotates the password for a database attached to a server.
*/
export const applicationResetServerDatabasePasswordMutation = ( options? : Partial < Options < ApplicationResetServerDatabasePasswordData >>) : UseMutationOptions < ApplicationResetServerDatabasePasswordResponse , AxiosError < ApplicationResetServerDatabasePasswordError >, Options < ApplicationResetServerDatabasePasswordData >> => {
const mutationOptions : UseMutationOptions < ApplicationResetServerDatabasePasswordResponse , AxiosError < ApplicationResetServerDatabasePasswordError >, Options < ApplicationResetServerDatabasePasswordData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await applicationResetServerDatabasePassword ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : applicationResetServerDatabasePasswordMutationKey ( options )
};
return mutationOptions ;
};
export const authLoginMutationKey = ( options? : Partial < Options < AuthLoginData >>) => createMutationKey ( 'authLogin' , options );
/**
* Login
*
* Authenticates a browser session. Returns a complete login payload, or a two-factor checkpoint token when the account requires a second factor.
*/
export const authLoginMutation = ( options? : Partial < Options < AuthLoginData >>) : UseMutationOptions < AuthLoginResponse2 , AxiosError < AuthLoginError >, Options < AuthLoginData >> => {
const mutationOptions : UseMutationOptions < AuthLoginResponse2 , AxiosError < AuthLoginError >, Options < AuthLoginData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await authLogin ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : authLoginMutationKey ( options )
};
return mutationOptions ;
};
export const authCompleteLoginCheckpointMutationKey = ( options? : Partial < Options < AuthCompleteLoginCheckpointData >>) => createMutationKey ( 'authCompleteLoginCheckpoint' , options );
/**
* Complete login checkpoint
*
* Completes a two-factor login checkpoint using either a TOTP code or a recovery token.
*/
export const authCompleteLoginCheckpointMutation = ( options? : Partial < Options < AuthCompleteLoginCheckpointData >>) : UseMutationOptions < AuthCompleteLoginCheckpointResponse , AxiosError < AuthCompleteLoginCheckpointError >, Options < AuthCompleteLoginCheckpointData >> => {
const mutationOptions : UseMutationOptions < AuthCompleteLoginCheckpointResponse , AxiosError < AuthCompleteLoginCheckpointError >, Options < AuthCompleteLoginCheckpointData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await authCompleteLoginCheckpoint ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : authCompleteLoginCheckpointMutationKey ( options )
};
return mutationOptions ;
};
export const authRequestPasswordResetEmailMutationKey = ( options? : Partial < Options < AuthRequestPasswordResetEmailData >>) => createMutationKey ( 'authRequestPasswordResetEmail' , options );
/**
* Request password reset email
*
* Sends a password reset email when the account exists. The response is intentionally the same when no matching account is found.
*/
export const authRequestPasswordResetEmailMutation = ( options? : Partial < Options < AuthRequestPasswordResetEmailData >>) : UseMutationOptions < AuthRequestPasswordResetEmailResponse , AxiosError < AuthRequestPasswordResetEmailError >, Options < AuthRequestPasswordResetEmailData >> => {
const mutationOptions : UseMutationOptions < AuthRequestPasswordResetEmailResponse , AxiosError < AuthRequestPasswordResetEmailError >, Options < AuthRequestPasswordResetEmailData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await authRequestPasswordResetEmail ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : authRequestPasswordResetEmailMutationKey ( options )
};
return mutationOptions ;
};
export const authResetPasswordMutationKey = ( options? : Partial < Options < AuthResetPasswordData >>) => createMutationKey ( 'authResetPassword' , options );
/**
* Reset password
*
* Resets an account password using a password reset token. The response tells the frontend whether the user must return to the login form.
*/
export const authResetPasswordMutation = ( options? : Partial < Options < AuthResetPasswordData >>) : UseMutationOptions < AuthResetPasswordResponse2 , AxiosError < AuthResetPasswordError >, Options < AuthResetPasswordData >> => {
const mutationOptions : UseMutationOptions < AuthResetPasswordResponse2 , AxiosError < AuthResetPasswordError >, Options < AuthResetPasswordData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await authResetPassword ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : authResetPasswordMutationKey ( options )
};
return mutationOptions ;
};
export const authLogoutMutationKey = ( options? : Partial < Options < AuthLogoutData >>) => createMutationKey ( 'authLogout' , options );
/**
* Logout
*
* Destroys the current browser session and regenerates the CSRF token.
*/
export const authLogoutMutation = ( options? : Partial < Options < AuthLogoutData >>) : UseMutationOptions < AuthLogoutResponse , AxiosError < AuthLogoutError >, Options < AuthLogoutData >> => {
const mutationOptions : UseMutationOptions < AuthLogoutResponse , AxiosError < AuthLogoutError >, Options < AuthLogoutData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await authLogout ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : authLogoutMutationKey ( options )
};
return mutationOptions ;
};
export const clientListClientServersQueryKey = ( options? : Options < ClientListClientServersData >) => createQueryKey ( 'clientListClientServers' , options );
/**
* List client servers
*
* Returns a paginated list of servers the authenticated user can access as an owner, subuser, or administrator.
*/
export const clientListClientServersOptions = ( options? : Options < ClientListClientServersData >) => queryOptions < ClientListClientServersResponse , AxiosError < ClientListClientServersError >, ClientListClientServersResponse , ReturnType < typeof clientListClientServersQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListClientServers ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListClientServersQueryKey ( options )
});
export const clientListClientServersInfiniteQueryKey = ( options? : Options < ClientListClientServersData >) : QueryKey < Options < ClientListClientServersData >> => createQueryKey ( 'clientListClientServers' , options , true );
/**
* List client servers
*
* Returns a paginated list of servers the authenticated user can access as an owner, subuser, or administrator.
*/
export const clientListClientServersInfiniteOptions = ( options? : Options < ClientListClientServersData >) => {
const opts = infiniteQueryOptions < ClientListClientServersResponse , AxiosError < ClientListClientServersError >, InfiniteData < ClientListClientServersResponse >, QueryKey < Options < ClientListClientServersData >>, ClientListClientServersPageQueryParameter | Pick < QueryKey < Options < ClientListClientServersData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < ClientListClientServersData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await clientListClientServers ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListClientServersInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const clientListServerPermissionsQueryKey = ( options? : Options < ClientListServerPermissionsData >) => createQueryKey ( 'clientListServerPermissions' , options );
/**
* List server permissions
*
* Returns the permission keys that can be granted to server subusers, including those registered by enabled extensions under `ext.<extension id>`.
*/
export const clientListServerPermissionsOptions = ( options? : Options < ClientListServerPermissionsData >) => queryOptions < ClientListServerPermissionsResponse , AxiosError < ClientListServerPermissionsError >, ClientListServerPermissionsResponse , ReturnType < typeof clientListServerPermissionsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListServerPermissions ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerPermissionsQueryKey ( options )
});
export const clientGetExtensionJobProgressQueryKey = ( options : Options < ClientGetExtensionJobProgressData >) => createQueryKey ( 'clientGetExtensionJobProgress' , options );
/**
* Get extension job progress
*
* Returns the latest user-scoped progress snapshot, including after reconnect. Expired, disabled, and inaccessible jobs return 404.
*/
export const clientGetExtensionJobProgressOptions = ( options : Options < ClientGetExtensionJobProgressData >) => queryOptions < ClientGetExtensionJobProgressResponse , AxiosError < ClientGetExtensionJobProgressError >, ClientGetExtensionJobProgressResponse , ReturnType < typeof clientGetExtensionJobProgressQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetExtensionJobProgress ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetExtensionJobProgressQueryKey ( options )
});
export const clientGetAccountQueryKey = ( options? : Options < ClientGetAccountData >) => createQueryKey ( 'clientGetAccount' , options );
/**
* Get account
*
* Returns profile details for the authenticated user.
*/
export const clientGetAccountOptions = ( options? : Options < ClientGetAccountData >) => queryOptions < ClientGetAccountResponse , AxiosError < ClientGetAccountError >, ClientGetAccountResponse , ReturnType < typeof clientGetAccountQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetAccount ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetAccountQueryKey ( options )
});
export const clientGetTwoFactorSetupQueryKey = ( options? : Options < ClientGetTwoFactorSetupData >) => createQueryKey ( 'clientGetTwoFactorSetup' , options );
/**
* Get two-factor setup
*
* Creates or returns the current two-factor setup payload for the authenticated user.
*/
export const clientGetTwoFactorSetupOptions = ( options? : Options < ClientGetTwoFactorSetupData >) => queryOptions < ClientGetTwoFactorSetupResponse , AxiosError < ClientGetTwoFactorSetupError >, ClientGetTwoFactorSetupResponse , ReturnType < typeof clientGetTwoFactorSetupQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetTwoFactorSetup ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetTwoFactorSetupQueryKey ( options )
});
export const clientEnableTwoFactorAuthenticationMutationKey = ( options? : Partial < Options < ClientEnableTwoFactorAuthenticationData >>) => createMutationKey ( 'clientEnableTwoFactorAuthentication' , options );
/**
* Enable two-factor authentication
*
* Enables two-factor authentication for the authenticated user and returns one-time recovery tokens.
*/
export const clientEnableTwoFactorAuthenticationMutation = ( options? : Partial < Options < ClientEnableTwoFactorAuthenticationData >>) : UseMutationOptions < ClientEnableTwoFactorAuthenticationResponse , AxiosError < ClientEnableTwoFactorAuthenticationError >, Options < ClientEnableTwoFactorAuthenticationData >> => {
const mutationOptions : UseMutationOptions < ClientEnableTwoFactorAuthenticationResponse , AxiosError < ClientEnableTwoFactorAuthenticationError >, Options < ClientEnableTwoFactorAuthenticationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientEnableTwoFactorAuthentication ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientEnableTwoFactorAuthenticationMutationKey ( options )
};
return mutationOptions ;
};
export const clientDisableTwoFactorAuthenticationMutationKey = ( options? : Partial < Options < ClientDisableTwoFactorAuthenticationData >>) => createMutationKey ( 'clientDisableTwoFactorAuthentication' , options );
/**
* Disable two-factor authentication
*
* Disables two-factor authentication for the authenticated user after verifying their password.
*/
export const clientDisableTwoFactorAuthenticationMutation = ( options? : Partial < Options < ClientDisableTwoFactorAuthenticationData >>) : UseMutationOptions < ClientDisableTwoFactorAuthenticationResponse , AxiosError < ClientDisableTwoFactorAuthenticationError >, Options < ClientDisableTwoFactorAuthenticationData >> => {
const mutationOptions : UseMutationOptions < ClientDisableTwoFactorAuthenticationResponse , AxiosError < ClientDisableTwoFactorAuthenticationError >, Options < ClientDisableTwoFactorAuthenticationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDisableTwoFactorAuthentication ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDisableTwoFactorAuthenticationMutationKey ( options )
};
return mutationOptions ;
};
export const clientUpdateAccountEmailMutationKey = ( options? : Partial < Options < ClientUpdateAccountEmailData >>) => createMutationKey ( 'clientUpdateAccountEmail' , options );
/**
* Update account email
*
* Updates the authenticated user's email address after verifying their current password.
*/
export const clientUpdateAccountEmailMutation = ( options? : Partial < Options < ClientUpdateAccountEmailData >>) : UseMutationOptions < ClientUpdateAccountEmailResponse , AxiosError < ClientUpdateAccountEmailError >, Options < ClientUpdateAccountEmailData >> => {
const mutationOptions : UseMutationOptions < ClientUpdateAccountEmailResponse , AxiosError < ClientUpdateAccountEmailError >, Options < ClientUpdateAccountEmailData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientUpdateAccountEmail ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientUpdateAccountEmailMutationKey ( options )
};
return mutationOptions ;
};
export const clientUpdateAccountPasswordMutationKey = ( options? : Partial < Options < ClientUpdateAccountPasswordData >>) => createMutationKey ( 'clientUpdateAccountPassword' , options );
/**
* Update account password
*
* Updates the authenticated user's password and revokes other active sessions where supported.
*/
export const clientUpdateAccountPasswordMutation = ( options? : Partial < Options < ClientUpdateAccountPasswordData >>) : UseMutationOptions < ClientUpdateAccountPasswordResponse , AxiosError < ClientUpdateAccountPasswordError >, Options < ClientUpdateAccountPasswordData >> => {
const mutationOptions : UseMutationOptions < ClientUpdateAccountPasswordResponse , AxiosError < ClientUpdateAccountPasswordError >, Options < ClientUpdateAccountPasswordData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientUpdateAccountPassword ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientUpdateAccountPasswordMutationKey ( options )
};
return mutationOptions ;
};
export const clientListAccountActivityQueryKey = ( options? : Options < ClientListAccountActivityData >) => createQueryKey ( 'clientListAccountActivity' , options );
/**
* List account activity
*
* Returns a paginated list of activity log entries for the authenticated user account.
*/
export const clientListAccountActivityOptions = ( options? : Options < ClientListAccountActivityData >) => queryOptions < ClientListAccountActivityResponse , AxiosError < ClientListAccountActivityError >, ClientListAccountActivityResponse , ReturnType < typeof clientListAccountActivityQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListAccountActivity ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListAccountActivityQueryKey ( options )
});
export const clientListAccountActivityInfiniteQueryKey = ( options? : Options < ClientListAccountActivityData >) : QueryKey < Options < ClientListAccountActivityData >> => createQueryKey ( 'clientListAccountActivity' , options , true );
/**
* List account activity
*
* Returns a paginated list of activity log entries for the authenticated user account.
*/
export const clientListAccountActivityInfiniteOptions = ( options? : Options < ClientListAccountActivityData >) => {
const opts = infiniteQueryOptions < ClientListAccountActivityResponse , AxiosError < ClientListAccountActivityError >, InfiniteData < ClientListAccountActivityResponse >, QueryKey < Options < ClientListAccountActivityData >>, ClientListAccountActivityPageQueryParameter | Pick < QueryKey < Options < ClientListAccountActivityData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < ClientListAccountActivityData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await clientListAccountActivity ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListAccountActivityInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const clientListAccountActivityFilterOptionsQueryKey = ( options? : Options < ClientListAccountActivityFilterOptionsData >) => createQueryKey ( 'clientListAccountActivityFilterOptions' , options );
/**
* List account activity filter options
*
* Returns the distinct events and users present in the account activity log.
*/
export const clientListAccountActivityFilterOptionsOptions = ( options? : Options < ClientListAccountActivityFilterOptionsData >) => queryOptions < ClientListAccountActivityFilterOptionsResponse , AxiosError < ClientListAccountActivityFilterOptionsError >, ClientListAccountActivityFilterOptionsResponse , ReturnType < typeof clientListAccountActivityFilterOptionsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListAccountActivityFilterOptions ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListAccountActivityFilterOptionsQueryKey ( options )
});
export const clientListAccountApiKeysQueryKey = ( options? : Options < ClientListAccountApiKeysData >) => createQueryKey ( 'clientListAccountApiKeys' , options );
/**
* List account API keys
*
* Returns all client API keys owned by the authenticated user.
*/
export const clientListAccountApiKeysOptions = ( options? : Options < ClientListAccountApiKeysData >) => queryOptions < ClientListAccountApiKeysResponse , AxiosError < ClientListAccountApiKeysError >, ClientListAccountApiKeysResponse , ReturnType < typeof clientListAccountApiKeysQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListAccountApiKeys ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListAccountApiKeysQueryKey ( options )
});
export const clientCreateAccountApiKeyMutationKey = ( options? : Partial < Options < ClientCreateAccountApiKeyData >>) => createMutationKey ( 'clientCreateAccountApiKey' , options );
/**
* Create account API key
*
* Creates a client API key for the authenticated user and returns the secret token once.
*/
export const clientCreateAccountApiKeyMutation = ( options? : Partial < Options < ClientCreateAccountApiKeyData >>) : UseMutationOptions < ClientCreateAccountApiKeyResponse , AxiosError < ClientCreateAccountApiKeyError >, Options < ClientCreateAccountApiKeyData >> => {
const mutationOptions : UseMutationOptions < ClientCreateAccountApiKeyResponse , AxiosError < ClientCreateAccountApiKeyError >, Options < ClientCreateAccountApiKeyData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateAccountApiKey ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateAccountApiKeyMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteAccountApiKeyMutationKey = ( options? : Partial < Options < ClientDeleteAccountApiKeyData >>) => createMutationKey ( 'clientDeleteAccountApiKey' , options );
/**
* Delete account API key
*
* Deletes one client API key owned by the authenticated user.
*/
export const clientDeleteAccountApiKeyMutation = ( options? : Partial < Options < ClientDeleteAccountApiKeyData >>) : UseMutationOptions < ClientDeleteAccountApiKeyResponse , AxiosError < ClientDeleteAccountApiKeyError >, Options < ClientDeleteAccountApiKeyData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteAccountApiKeyResponse , AxiosError < ClientDeleteAccountApiKeyError >, Options < ClientDeleteAccountApiKeyData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteAccountApiKey ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteAccountApiKeyMutationKey ( options )
};
return mutationOptions ;
};
export const clientListSshKeysQueryKey = ( options? : Options < ClientListSshKeysData >) => createQueryKey ( 'clientListSshKeys' , options );
/**
* List SSH keys
*
* Returns all SSH public keys configured for the authenticated user.
*/
export const clientListSshKeysOptions = ( options? : Options < ClientListSshKeysData >) => queryOptions < ClientListSshKeysResponse , AxiosError < ClientListSshKeysError >, ClientListSshKeysResponse , ReturnType < typeof clientListSshKeysQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListSshKeys ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListSshKeysQueryKey ( options )
});
export const clientCreateSshKeyMutationKey = ( options? : Partial < Options < ClientCreateSshKeyData >>) => createMutationKey ( 'clientCreateSshKey' , options );
/**
* Create SSH key
*
* Adds an SSH public key to the authenticated user account.
*/
export const clientCreateSshKeyMutation = ( options? : Partial < Options < ClientCreateSshKeyData >>) : UseMutationOptions < ClientCreateSshKeyResponse , AxiosError < ClientCreateSshKeyError >, Options < ClientCreateSshKeyData >> => {
const mutationOptions : UseMutationOptions < ClientCreateSshKeyResponse , AxiosError < ClientCreateSshKeyError >, Options < ClientCreateSshKeyData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateSshKey ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateSshKeyMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteSshKeyMutationKey = ( options? : Partial < Options < ClientDeleteSshKeyData >>) => createMutationKey ( 'clientDeleteSshKey' , options );
/**
* Delete SSH key
*
* Deletes an SSH key from the authenticated user account by fingerprint. Missing keys are treated as already deleted.
*/
export const clientDeleteSshKeyMutation = ( options? : Partial < Options < ClientDeleteSshKeyData >>) : UseMutationOptions < ClientDeleteSshKeyResponse , AxiosError < ClientDeleteSshKeyError >, Options < ClientDeleteSshKeyData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteSshKeyResponse , AxiosError < ClientDeleteSshKeyError >, Options < ClientDeleteSshKeyData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteSshKey ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteSshKeyMutationKey ( options )
};
return mutationOptions ;
};
export const clientGetServerQueryKey = ( options : Options < ClientGetServerData >) => createQueryKey ( 'clientGetServer' , options );
/**
* Get server
*
* Returns details for one server the authenticated user can access.
*/
export const clientGetServerOptions = ( options : Options < ClientGetServerData >) => queryOptions < ClientGetServerResponse , AxiosError < ClientGetServerError >, ClientGetServerResponse , ReturnType < typeof clientGetServerQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetServer ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetServerQueryKey ( options )
});
export const clientGetWebsocketCredentialsQueryKey = ( options : Options < ClientGetWebsocketCredentialsData >) => createQueryKey ( 'clientGetWebsocketCredentials' , options );
/**
* Get websocket credentials
*
* Returns a short-lived Wings websocket token and socket URL for the server.
*/
export const clientGetWebsocketCredentialsOptions = ( options : Options < ClientGetWebsocketCredentialsData >) => queryOptions < ClientGetWebsocketCredentialsResponse , AxiosError < ClientGetWebsocketCredentialsError >, ClientGetWebsocketCredentialsResponse , ReturnType < typeof clientGetWebsocketCredentialsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetWebsocketCredentials ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetWebsocketCredentialsQueryKey ( options )
});
export const clientGetServerResourcesQueryKey = ( options : Options < ClientGetServerResourcesData >) => createQueryKey ( 'clientGetServerResources' , options );
/**
* Get server resources
*
* Returns the latest cached resource utilization reported by Wings for the server.
*/
export const clientGetServerResourcesOptions = ( options : Options < ClientGetServerResourcesData >) => queryOptions < ClientGetServerResourcesResponse , AxiosError < ClientGetServerResourcesError >, ClientGetServerResourcesResponse , ReturnType < typeof clientGetServerResourcesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetServerResources ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetServerResourcesQueryKey ( options )
});
export const clientGetServerLogsQueryKey = ( options : Options < ClientGetServerLogsData >) => createQueryKey ( 'clientGetServerLogs' , options );
/**
* Get server logs
*
* Returns the most recent console output lines Wings holds for the server, oldest first.
*/
export const clientGetServerLogsOptions = ( options : Options < ClientGetServerLogsData >) => queryOptions < ClientGetServerLogsResponse , AxiosError < ClientGetServerLogsError >, ClientGetServerLogsResponse , ReturnType < typeof clientGetServerLogsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetServerLogs ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetServerLogsQueryKey ( options )
});
export const clientGetServerExtensionJobProgressQueryKey = ( options : Options < ClientGetServerExtensionJobProgressData >) => createQueryKey ( 'clientGetServerExtensionJobProgress' , options );
/**
* Get server extension job progress
*
* Returns the latest server-scoped snapshot to its creator or users holding the operation permission. Expired, disabled, and inaccessible jobs return 404.
*/
export const clientGetServerExtensionJobProgressOptions = ( options : Options < ClientGetServerExtensionJobProgressData >) => queryOptions < ClientGetServerExtensionJobProgressResponse , AxiosError < ClientGetServerExtensionJobProgressError >, ClientGetServerExtensionJobProgressResponse , ReturnType < typeof clientGetServerExtensionJobProgressQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetServerExtensionJobProgress ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetServerExtensionJobProgressQueryKey ( options )
});
export const clientListServerActivityQueryKey = ( options : Options < ClientListServerActivityData >) => createQueryKey ( 'clientListServerActivity' , options );
/**
* List server activity
*
* Returns a paginated list of activity log entries for the server.
*/
export const clientListServerActivityOptions = ( options : Options < ClientListServerActivityData >) => queryOptions < ClientListServerActivityResponse , AxiosError < ClientListServerActivityError >, ClientListServerActivityResponse , ReturnType < typeof clientListServerActivityQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListServerActivity ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerActivityQueryKey ( options )
});
export const clientListServerActivityInfiniteQueryKey = ( options : Options < ClientListServerActivityData >) : QueryKey < Options < ClientListServerActivityData >> => createQueryKey ( 'clientListServerActivity' , options , true );
/**
* List server activity
*
* Returns a paginated list of activity log entries for the server.
*/
export const clientListServerActivityInfiniteOptions = ( options : Options < ClientListServerActivityData >) => {
const opts = infiniteQueryOptions < ClientListServerActivityResponse , AxiosError < ClientListServerActivityError >, InfiniteData < ClientListServerActivityResponse >, QueryKey < Options < ClientListServerActivityData >>, ClientListServerActivityPageQueryParameter | Pick < QueryKey < Options < ClientListServerActivityData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < ClientListServerActivityData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await clientListServerActivity ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerActivityInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const clientListServerActivityFilterOptionsQueryKey = ( options : Options < ClientListServerActivityFilterOptionsData >) => createQueryKey ( 'clientListServerActivityFilterOptions' , options );
/**
* List server activity filter options
*
* Returns the distinct events and users present in the server activity log.
*/
export const clientListServerActivityFilterOptionsOptions = ( options : Options < ClientListServerActivityFilterOptionsData >) => queryOptions < ClientListServerActivityFilterOptionsResponse , AxiosError < ClientListServerActivityFilterOptionsError >, ClientListServerActivityFilterOptionsResponse , ReturnType < typeof clientListServerActivityFilterOptionsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListServerActivityFilterOptions ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerActivityFilterOptionsQueryKey ( options )
});
export const clientSendServerCommandMutationKey = ( options? : Partial < Options < ClientSendServerCommandData >>) => createMutationKey ( 'clientSendServerCommand' , options );
/**
* Send server command
*
* Sends a console command to the running server through Wings.
*/
export const clientSendServerCommandMutation = ( options? : Partial < Options < ClientSendServerCommandData >>) : UseMutationOptions < ClientSendServerCommandResponse , AxiosError < ClientSendServerCommandError >, Options < ClientSendServerCommandData >> => {
const mutationOptions : UseMutationOptions < ClientSendServerCommandResponse , AxiosError < ClientSendServerCommandError >, Options < ClientSendServerCommandData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientSendServerCommand ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientSendServerCommandMutationKey ( options )
};
return mutationOptions ;
};
export const clientSendPowerActionMutationKey = ( options? : Partial < Options < ClientSendPowerActionData >>) => createMutationKey ( 'clientSendPowerAction' , options );
/**
* Send power action
*
* Sends a power signal to the server through Wings.
*/
export const clientSendPowerActionMutation = ( options? : Partial < Options < ClientSendPowerActionData >>) : UseMutationOptions < ClientSendPowerActionResponse , AxiosError < ClientSendPowerActionError >, Options < ClientSendPowerActionData >> => {
const mutationOptions : UseMutationOptions < ClientSendPowerActionResponse , AxiosError < ClientSendPowerActionError >, Options < ClientSendPowerActionData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientSendPowerAction ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientSendPowerActionMutationKey ( options )
};
return mutationOptions ;
};
export const clientListServerDatabasesQueryKey = ( options : Options < ClientListServerDatabasesData >) => createQueryKey ( 'clientListServerDatabases' , options );
/**
* List server databases
*
* Returns databases attached to a server visible to the authenticated user.
*/
export const clientListServerDatabasesOptions = ( options : Options < ClientListServerDatabasesData >) => queryOptions < ClientListServerDatabasesResponse , AxiosError < ClientListServerDatabasesError >, ClientListServerDatabasesResponse , ReturnType < typeof clientListServerDatabasesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListServerDatabases ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerDatabasesQueryKey ( options )
});
export const clientCreateServerDatabaseMutationKey = ( options? : Partial < Options < ClientCreateServerDatabaseData >>) => createMutationKey ( 'clientCreateServerDatabase' , options );
/**
* Create server database
*
* Creates a database for a server on an automatically selected database host.
*/
export const clientCreateServerDatabaseMutation = ( options? : Partial < Options < ClientCreateServerDatabaseData >>) : UseMutationOptions < ClientCreateServerDatabaseResponse , AxiosError < ClientCreateServerDatabaseError >, Options < ClientCreateServerDatabaseData >> => {
const mutationOptions : UseMutationOptions < ClientCreateServerDatabaseResponse , AxiosError < ClientCreateServerDatabaseError >, Options < ClientCreateServerDatabaseData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateServerDatabase ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateServerDatabaseMutationKey ( options )
};
return mutationOptions ;
};
export const clientRotateServerDatabasePasswordMutationKey = ( options? : Partial < Options < ClientRotateServerDatabasePasswordData >>) => createMutationKey ( 'clientRotateServerDatabasePassword' , options );
/**
* Rotate server database password
*
* Rotates the password for a database attached to a server and returns the updated database.
*/
export const clientRotateServerDatabasePasswordMutation = ( options? : Partial < Options < ClientRotateServerDatabasePasswordData >>) : UseMutationOptions < ClientRotateServerDatabasePasswordResponse , AxiosError < ClientRotateServerDatabasePasswordError >, Options < ClientRotateServerDatabasePasswordData >> => {
const mutationOptions : UseMutationOptions < ClientRotateServerDatabasePasswordResponse , AxiosError < ClientRotateServerDatabasePasswordError >, Options < ClientRotateServerDatabasePasswordData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientRotateServerDatabasePassword ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientRotateServerDatabasePasswordMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteServerDatabaseMutationKey = ( options? : Partial < Options < ClientDeleteServerDatabaseData >>) => createMutationKey ( 'clientDeleteServerDatabase' , options );
/**
* Delete server database
*
* Deletes a database attached to a server.
*/
export const clientDeleteServerDatabaseMutation = ( options? : Partial < Options < ClientDeleteServerDatabaseData >>) : UseMutationOptions < ClientDeleteServerDatabaseResponse , AxiosError < ClientDeleteServerDatabaseError >, Options < ClientDeleteServerDatabaseData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteServerDatabaseResponse , AxiosError < ClientDeleteServerDatabaseError >, Options < ClientDeleteServerDatabaseData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteServerDatabase ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteServerDatabaseMutationKey ( options )
};
return mutationOptions ;
};
export const clientListFilesQueryKey = ( options : Options < ClientListFilesData >) => createQueryKey ( 'clientListFiles' , options );
/**
* List files
*
* Returns files and folders in a server directory.
*/
export const clientListFilesOptions = ( options : Options < ClientListFilesData >) => queryOptions < ClientListFilesResponse , AxiosError < ClientListFilesError >, ClientListFilesResponse , ReturnType < typeof clientListFilesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListFiles ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListFilesQueryKey ( options )
});
export const clientGetFileContentsQueryKey = ( options : Options < ClientGetFileContentsData >) => createQueryKey ( 'clientGetFileContents' , options );
/**
* Get file contents
*
* Returns raw text contents for a server file.
*/
export const clientGetFileContentsOptions = ( options : Options < ClientGetFileContentsData >) => queryOptions < ClientGetFileContentsResponse , AxiosError < ClientGetFileContentsError >, ClientGetFileContentsResponse , ReturnType < typeof clientGetFileContentsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetFileContents ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetFileContentsQueryKey ( options )
});
export const clientGetFileDownloadUrlQueryKey = ( options : Options < ClientGetFileDownloadUrlData >) => createQueryKey ( 'clientGetFileDownloadUrl' , options );
/**
* Get file download URL
*
* Returns a short-lived signed URL for downloading a server file directly from Wings.
*/
export const clientGetFileDownloadUrlOptions = ( options : Options < ClientGetFileDownloadUrlData >) => queryOptions < ClientGetFileDownloadUrlResponse , AxiosError < ClientGetFileDownloadUrlError >, ClientGetFileDownloadUrlResponse , ReturnType < typeof clientGetFileDownloadUrlQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetFileDownloadUrl ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetFileDownloadUrlQueryKey ( options )
});
export const clientRenameFilesMutationKey = ( options? : Partial < Options < ClientRenameFilesData >>) => createMutationKey ( 'clientRenameFiles' , options );
/**
* Rename files
*
* Renames one or more files or folders in a server directory.
*/
export const clientRenameFilesMutation = ( options? : Partial < Options < ClientRenameFilesData >>) : UseMutationOptions < ClientRenameFilesResponse , AxiosError < ClientRenameFilesError >, Options < ClientRenameFilesData >> => {
const mutationOptions : UseMutationOptions < ClientRenameFilesResponse , AxiosError < ClientRenameFilesError >, Options < ClientRenameFilesData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientRenameFiles ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientRenameFilesMutationKey ( options )
};
return mutationOptions ;
};
export const clientCopyFileMutationKey = ( options? : Partial < Options < ClientCopyFileData >>) => createMutationKey ( 'clientCopyFile' , options );
/**
* Copy file
*
* Creates a copy of a file on the server.
*/
export const clientCopyFileMutation = ( options? : Partial < Options < ClientCopyFileData >>) : UseMutationOptions < ClientCopyFileResponse , AxiosError < ClientCopyFileError >, Options < ClientCopyFileData >> => {
const mutationOptions : UseMutationOptions < ClientCopyFileResponse , AxiosError < ClientCopyFileError >, Options < ClientCopyFileData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCopyFile ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCopyFileMutationKey ( options )
};
return mutationOptions ;
};
export const clientWriteFileContentsMutationKey = ( options? : Partial < Options < ClientWriteFileContentsData >>) => createMutationKey ( 'clientWriteFileContents' , options );
/**
* Write file contents
*
* Writes the raw request body to a server file. This endpoint does not expect a JSON wrapper for the file contents.
*/
export const clientWriteFileContentsMutation = ( options? : Partial < Options < ClientWriteFileContentsData >>) : UseMutationOptions < ClientWriteFileContentsResponse , AxiosError < ClientWriteFileContentsError >, Options < ClientWriteFileContentsData >> => {
const mutationOptions : UseMutationOptions < ClientWriteFileContentsResponse , AxiosError < ClientWriteFileContentsError >, Options < ClientWriteFileContentsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientWriteFileContents ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientWriteFileContentsMutationKey ( options )
};
return mutationOptions ;
};
export const clientCompressFilesMutationKey = ( options? : Partial < Options < ClientCompressFilesData >>) => createMutationKey ( 'clientCompressFiles' , options );
/**
* Compress files
*
* Creates an archive from one or more files or folders in a server directory.
*/
export const clientCompressFilesMutation = ( options? : Partial < Options < ClientCompressFilesData >>) : UseMutationOptions < ClientCompressFilesResponse , AxiosError < ClientCompressFilesError >, Options < ClientCompressFilesData >> => {
const mutationOptions : UseMutationOptions < ClientCompressFilesResponse , AxiosError < ClientCompressFilesError >, Options < ClientCompressFilesData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCompressFiles ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCompressFilesMutationKey ( options )
};
return mutationOptions ;
};
export const clientDecompressFileMutationKey = ( options? : Partial < Options < ClientDecompressFileData >>) => createMutationKey ( 'clientDecompressFile' , options );
/**
* Decompress file
*
* Extracts an archive in a server directory.
*/
export const clientDecompressFileMutation = ( options? : Partial < Options < ClientDecompressFileData >>) : UseMutationOptions < ClientDecompressFileResponse , AxiosError < ClientDecompressFileError >, Options < ClientDecompressFileData >> => {
const mutationOptions : UseMutationOptions < ClientDecompressFileResponse , AxiosError < ClientDecompressFileError >, Options < ClientDecompressFileData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDecompressFile ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDecompressFileMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteFilesMutationKey = ( options? : Partial < Options < ClientDeleteFilesData >>) => createMutationKey ( 'clientDeleteFiles' , options );
/**
* Delete files
*
* Deletes one or more files or folders from a server directory.
*/
export const clientDeleteFilesMutation = ( options? : Partial < Options < ClientDeleteFilesData >>) : UseMutationOptions < ClientDeleteFilesResponse , AxiosError < ClientDeleteFilesError >, Options < ClientDeleteFilesData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteFilesResponse , AxiosError < ClientDeleteFilesError >, Options < ClientDeleteFilesData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteFiles ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteFilesMutationKey ( options )
};
return mutationOptions ;
};
export const clientCreateFolderMutationKey = ( options? : Partial < Options < ClientCreateFolderData >>) => createMutationKey ( 'clientCreateFolder' , options );
/**
* Create folder
*
* Creates a folder in a server directory.
*/
export const clientCreateFolderMutation = ( options? : Partial < Options < ClientCreateFolderData >>) : UseMutationOptions < ClientCreateFolderResponse , AxiosError < ClientCreateFolderError >, Options < ClientCreateFolderData >> => {
const mutationOptions : UseMutationOptions < ClientCreateFolderResponse , AxiosError < ClientCreateFolderError >, Options < ClientCreateFolderData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateFolder ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateFolderMutationKey ( options )
};
return mutationOptions ;
};
export const clientChangeFilePermissionsMutationKey = ( options? : Partial < Options < ClientChangeFilePermissionsData >>) => createMutationKey ( 'clientChangeFilePermissions' , options );
/**
* Change file permissions
*
* Updates POSIX mode bits for one or more files or folders in a server directory.
*/
export const clientChangeFilePermissionsMutation = ( options? : Partial < Options < ClientChangeFilePermissionsData >>) : UseMutationOptions < ClientChangeFilePermissionsResponse , AxiosError < ClientChangeFilePermissionsError >, Options < ClientChangeFilePermissionsData >> => {
const mutationOptions : UseMutationOptions < ClientChangeFilePermissionsResponse , AxiosError < ClientChangeFilePermissionsError >, Options < ClientChangeFilePermissionsData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientChangeFilePermissions ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientChangeFilePermissionsMutationKey ( options )
};
return mutationOptions ;
};
export const clientPullRemoteFileMutationKey = ( options? : Partial < Options < ClientPullRemoteFileData >>) => createMutationKey ( 'clientPullRemoteFile' , options );
/**
* Pull remote file
*
* Requests that Wings download a remote file into a server directory.
*/
export const clientPullRemoteFileMutation = ( options? : Partial < Options < ClientPullRemoteFileData >>) : UseMutationOptions < ClientPullRemoteFileResponse , AxiosError < ClientPullRemoteFileError >, Options < ClientPullRemoteFileData >> => {
const mutationOptions : UseMutationOptions < ClientPullRemoteFileResponse , AxiosError < ClientPullRemoteFileError >, Options < ClientPullRemoteFileData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientPullRemoteFile ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientPullRemoteFileMutationKey ( options )
};
return mutationOptions ;
};
export const clientGetFileUploadUrlQueryKey = ( options : Options < ClientGetFileUploadUrlData >) => createQueryKey ( 'clientGetFileUploadUrl' , options );
/**
* Get file upload URL
*
* Returns a short-lived signed URL for uploading a file directly to Wings.
*/
export const clientGetFileUploadUrlOptions = ( options : Options < ClientGetFileUploadUrlData >) => queryOptions < ClientGetFileUploadUrlResponse , AxiosError < ClientGetFileUploadUrlError >, ClientGetFileUploadUrlResponse , ReturnType < typeof clientGetFileUploadUrlQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetFileUploadUrl ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetFileUploadUrlQueryKey ( options )
});
export const clientListServerSchedulesQueryKey = ( options : Options < ClientListServerSchedulesData >) => createQueryKey ( 'clientListServerSchedules' , options );
/**
* List server schedules
*
* Returns all schedules configured for the server, including their tasks.
*/
export const clientListServerSchedulesOptions = ( options : Options < ClientListServerSchedulesData >) => queryOptions < ClientListServerSchedulesResponse , AxiosError < ClientListServerSchedulesError >, ClientListServerSchedulesResponse , ReturnType < typeof clientListServerSchedulesQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListServerSchedules ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerSchedulesQueryKey ( options )
});
export const clientCreateServerScheduleMutationKey = ( options? : Partial < Options < ClientCreateServerScheduleData >>) => createMutationKey ( 'clientCreateServerSchedule' , options );
/**
* Create server schedule
*
* Creates a schedule for the server.
*/
export const clientCreateServerScheduleMutation = ( options? : Partial < Options < ClientCreateServerScheduleData >>) : UseMutationOptions < ClientCreateServerScheduleResponse , AxiosError < ClientCreateServerScheduleError >, Options < ClientCreateServerScheduleData >> => {
const mutationOptions : UseMutationOptions < ClientCreateServerScheduleResponse , AxiosError < ClientCreateServerScheduleError >, Options < ClientCreateServerScheduleData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateServerSchedule ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateServerScheduleMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteServerScheduleMutationKey = ( options? : Partial < Options < ClientDeleteServerScheduleData >>) => createMutationKey ( 'clientDeleteServerSchedule' , options );
/**
* Delete server schedule
*
* Deletes a schedule and its tasks from the server.
*/
export const clientDeleteServerScheduleMutation = ( options? : Partial < Options < ClientDeleteServerScheduleData >>) : UseMutationOptions < ClientDeleteServerScheduleResponse , AxiosError < ClientDeleteServerScheduleError >, Options < ClientDeleteServerScheduleData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteServerScheduleResponse , AxiosError < ClientDeleteServerScheduleError >, Options < ClientDeleteServerScheduleData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteServerSchedule ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteServerScheduleMutationKey ( options )
};
return mutationOptions ;
};
export const clientGetServerScheduleQueryKey = ( options : Options < ClientGetServerScheduleData >) => createQueryKey ( 'clientGetServerSchedule' , options );
/**
* Get server schedule
*
* Returns one schedule configured for the server, including its tasks.
*/
export const clientGetServerScheduleOptions = ( options : Options < ClientGetServerScheduleData >) => queryOptions < ClientGetServerScheduleResponse , AxiosError < ClientGetServerScheduleError >, ClientGetServerScheduleResponse , ReturnType < typeof clientGetServerScheduleQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetServerSchedule ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetServerScheduleQueryKey ( options )
});
export const clientUpdateServerScheduleMutationKey = ( options? : Partial < Options < ClientUpdateServerScheduleData >>) => createMutationKey ( 'clientUpdateServerSchedule' , options );
/**
* Update server schedule
*
* Updates a schedule for the server and recalculates its next run time.
*/
export const clientUpdateServerScheduleMutation = ( options? : Partial < Options < ClientUpdateServerScheduleData >>) : UseMutationOptions < ClientUpdateServerScheduleResponse , AxiosError < ClientUpdateServerScheduleError >, Options < ClientUpdateServerScheduleData >> => {
const mutationOptions : UseMutationOptions < ClientUpdateServerScheduleResponse , AxiosError < ClientUpdateServerScheduleError >, Options < ClientUpdateServerScheduleData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientUpdateServerSchedule ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientUpdateServerScheduleMutationKey ( options )
};
return mutationOptions ;
};
export const clientExecuteServerScheduleMutationKey = ( options? : Partial < Options < ClientExecuteServerScheduleData >>) => createMutationKey ( 'clientExecuteServerSchedule' , options );
/**
* Execute server schedule
*
* Queues a schedule to run immediately regardless of its active state.
*/
export const clientExecuteServerScheduleMutation = ( options? : Partial < Options < ClientExecuteServerScheduleData >>) : UseMutationOptions < unknown , AxiosError < ClientExecuteServerScheduleError >, Options < ClientExecuteServerScheduleData >> => {
const mutationOptions : UseMutationOptions < unknown , AxiosError < ClientExecuteServerScheduleError >, Options < ClientExecuteServerScheduleData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientExecuteServerSchedule ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientExecuteServerScheduleMutationKey ( options )
};
return mutationOptions ;
};
export const clientCreateScheduleTaskMutationKey = ( options? : Partial < Options < ClientCreateScheduleTaskData >>) => createMutationKey ( 'clientCreateScheduleTask' , options );
/**
* Create schedule task
*
* Creates a task in a server schedule.
*/
export const clientCreateScheduleTaskMutation = ( options? : Partial < Options < ClientCreateScheduleTaskData >>) : UseMutationOptions < ClientCreateScheduleTaskResponse , AxiosError < ClientCreateScheduleTaskError >, Options < ClientCreateScheduleTaskData >> => {
const mutationOptions : UseMutationOptions < ClientCreateScheduleTaskResponse , AxiosError < ClientCreateScheduleTaskError >, Options < ClientCreateScheduleTaskData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateScheduleTask ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateScheduleTaskMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteScheduleTaskMutationKey = ( options? : Partial < Options < ClientDeleteScheduleTaskData >>) => createMutationKey ( 'clientDeleteScheduleTask' , options );
/**
* Delete schedule task
*
* Deletes a task from a server schedule and compacts subsequent sequence IDs.
*/
export const clientDeleteScheduleTaskMutation = ( options? : Partial < Options < ClientDeleteScheduleTaskData >>) : UseMutationOptions < ClientDeleteScheduleTaskResponse , AxiosError < ClientDeleteScheduleTaskError >, Options < ClientDeleteScheduleTaskData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteScheduleTaskResponse , AxiosError < ClientDeleteScheduleTaskError >, Options < ClientDeleteScheduleTaskData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteScheduleTask ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteScheduleTaskMutationKey ( options )
};
return mutationOptions ;
};
export const clientUpdateScheduleTaskMutationKey = ( options? : Partial < Options < ClientUpdateScheduleTaskData >>) => createMutationKey ( 'clientUpdateScheduleTask' , options );
/**
* Update schedule task
*
* Updates a task in a server schedule, including its sequence position.
*/
export const clientUpdateScheduleTaskMutation = ( options? : Partial < Options < ClientUpdateScheduleTaskData >>) : UseMutationOptions < ClientUpdateScheduleTaskResponse , AxiosError < ClientUpdateScheduleTaskError >, Options < ClientUpdateScheduleTaskData >> => {
const mutationOptions : UseMutationOptions < ClientUpdateScheduleTaskResponse , AxiosError < ClientUpdateScheduleTaskError >, Options < ClientUpdateScheduleTaskData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientUpdateScheduleTask ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientUpdateScheduleTaskMutationKey ( options )
};
return mutationOptions ;
};
export const clientListServerAllocationsQueryKey = ( options : Options < ClientListServerAllocationsData >) => createQueryKey ( 'clientListServerAllocations' , options );
/**
* List server allocations
*
* Returns all network allocations assigned to the server.
*/
export const clientListServerAllocationsOptions = ( options : Options < ClientListServerAllocationsData >) => queryOptions < ClientListServerAllocationsResponse , AxiosError < ClientListServerAllocationsError >, ClientListServerAllocationsResponse , ReturnType < typeof clientListServerAllocationsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListServerAllocations ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerAllocationsQueryKey ( options )
});
export const clientCreateServerAllocationMutationKey = ( options? : Partial < Options < ClientCreateServerAllocationData >>) => createMutationKey ( 'clientCreateServerAllocation' , options );
/**
* Create server allocation
*
* Assigns an available allocation to the server.
*/
export const clientCreateServerAllocationMutation = ( options? : Partial < Options < ClientCreateServerAllocationData >>) : UseMutationOptions < ClientCreateServerAllocationResponse , AxiosError < ClientCreateServerAllocationError >, Options < ClientCreateServerAllocationData >> => {
const mutationOptions : UseMutationOptions < ClientCreateServerAllocationResponse , AxiosError < ClientCreateServerAllocationError >, Options < ClientCreateServerAllocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateServerAllocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateServerAllocationMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteServerAllocationMutationKey = ( options? : Partial < Options < ClientDeleteServerAllocationData >>) => createMutationKey ( 'clientDeleteServerAllocation' , options );
/**
* Delete server allocation
*
* Removes a non-primary allocation from the server and returns it to the available pool.
*/
export const clientDeleteServerAllocationMutation = ( options? : Partial < Options < ClientDeleteServerAllocationData >>) : UseMutationOptions < ClientDeleteServerAllocationResponse , AxiosError < ClientDeleteServerAllocationError >, Options < ClientDeleteServerAllocationData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteServerAllocationResponse , AxiosError < ClientDeleteServerAllocationError >, Options < ClientDeleteServerAllocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteServerAllocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteServerAllocationMutationKey ( options )
};
return mutationOptions ;
};
export const clientUpdateAllocationNotesMutationKey = ( options? : Partial < Options < ClientUpdateAllocationNotesData >>) => createMutationKey ( 'clientUpdateAllocationNotes' , options );
/**
* Update allocation notes
*
* Updates notes attached to a server allocation.
*/
export const clientUpdateAllocationNotesMutation = ( options? : Partial < Options < ClientUpdateAllocationNotesData >>) : UseMutationOptions < ClientUpdateAllocationNotesResponse , AxiosError < ClientUpdateAllocationNotesError >, Options < ClientUpdateAllocationNotesData >> => {
const mutationOptions : UseMutationOptions < ClientUpdateAllocationNotesResponse , AxiosError < ClientUpdateAllocationNotesError >, Options < ClientUpdateAllocationNotesData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientUpdateAllocationNotes ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientUpdateAllocationNotesMutationKey ( options )
};
return mutationOptions ;
};
export const clientSetPrimaryAllocationMutationKey = ( options? : Partial < Options < ClientSetPrimaryAllocationData >>) => createMutationKey ( 'clientSetPrimaryAllocation' , options );
/**
* Set primary allocation
*
* Sets the primary network allocation for the server.
*/
export const clientSetPrimaryAllocationMutation = ( options? : Partial < Options < ClientSetPrimaryAllocationData >>) : UseMutationOptions < ClientSetPrimaryAllocationResponse , AxiosError < ClientSetPrimaryAllocationError >, Options < ClientSetPrimaryAllocationData >> => {
const mutationOptions : UseMutationOptions < ClientSetPrimaryAllocationResponse , AxiosError < ClientSetPrimaryAllocationError >, Options < ClientSetPrimaryAllocationData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientSetPrimaryAllocation ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientSetPrimaryAllocationMutationKey ( options )
};
return mutationOptions ;
};
export const clientListServerSubusersQueryKey = ( options : Options < ClientListServerSubusersData >) => createQueryKey ( 'clientListServerSubusers' , options );
/**
* List server subusers
*
* Returns subusers assigned to the server.
*/
export const clientListServerSubusersOptions = ( options : Options < ClientListServerSubusersData >) => queryOptions < ClientListServerSubusersResponse , AxiosError < ClientListServerSubusersError >, ClientListServerSubusersResponse , ReturnType < typeof clientListServerSubusersQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListServerSubusers ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerSubusersQueryKey ( options )
});
export const clientCreateServerSubuserMutationKey = ( options? : Partial < Options < ClientCreateServerSubuserData >>) => createMutationKey ( 'clientCreateServerSubuser' , options );
/**
* Create server subuser
*
* Assigns an existing or new user as a subuser on the server.
*/
export const clientCreateServerSubuserMutation = ( options? : Partial < Options < ClientCreateServerSubuserData >>) : UseMutationOptions < ClientCreateServerSubuserResponse , AxiosError < ClientCreateServerSubuserError >, Options < ClientCreateServerSubuserData >> => {
const mutationOptions : UseMutationOptions < ClientCreateServerSubuserResponse , AxiosError < ClientCreateServerSubuserError >, Options < ClientCreateServerSubuserData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateServerSubuser ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateServerSubuserMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteServerSubuserMutationKey = ( options? : Partial < Options < ClientDeleteServerSubuserData >>) => createMutationKey ( 'clientDeleteServerSubuser' , options );
/**
* Delete server subuser
*
* Removes a subuser assignment from the server and revokes SFTP access tokens.
*/
export const clientDeleteServerSubuserMutation = ( options? : Partial < Options < ClientDeleteServerSubuserData >>) : UseMutationOptions < ClientDeleteServerSubuserResponse , AxiosError < ClientDeleteServerSubuserError >, Options < ClientDeleteServerSubuserData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteServerSubuserResponse , AxiosError < ClientDeleteServerSubuserError >, Options < ClientDeleteServerSubuserData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteServerSubuser ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteServerSubuserMutationKey ( options )
};
return mutationOptions ;
};
2026-10-11 02:28:28 -04:00
export const clientGetServerSubuserQueryKey = ( options : Options < ClientGetServerSubuserData >) => createQueryKey ( 'clientGetServerSubuser' , options );
/**
* Get server subuser
*
* Returns one subuser assignment for the server.
*/
export const clientGetServerSubuserOptions = ( options : Options < ClientGetServerSubuserData >) => queryOptions < ClientGetServerSubuserResponse , AxiosError < ClientGetServerSubuserError >, ClientGetServerSubuserResponse , ReturnType < typeof clientGetServerSubuserQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetServerSubuser ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetServerSubuserQueryKey ( options )
});
2026-10-05 18:10:18 -04:00
export const clientUpdateServerSubuserMutationKey = ( options? : Partial < Options < ClientUpdateServerSubuserData >>) => createMutationKey ( 'clientUpdateServerSubuser' , options );
/**
* Update server subuser
*
* Updates permissions for a server subuser and revokes their SFTP access tokens.
*/
export const clientUpdateServerSubuserMutation = ( options? : Partial < Options < ClientUpdateServerSubuserData >>) : UseMutationOptions < ClientUpdateServerSubuserResponse , AxiosError < ClientUpdateServerSubuserError >, Options < ClientUpdateServerSubuserData >> => {
const mutationOptions : UseMutationOptions < ClientUpdateServerSubuserResponse , AxiosError < ClientUpdateServerSubuserError >, Options < ClientUpdateServerSubuserData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientUpdateServerSubuser ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientUpdateServerSubuserMutationKey ( options )
};
return mutationOptions ;
};
export const clientListServerBackupsQueryKey = ( options : Options < ClientListServerBackupsData >) => createQueryKey ( 'clientListServerBackups' , options );
/**
* List server backups
*
* Returns a paginated list of backups for the server.
*/
export const clientListServerBackupsOptions = ( options : Options < ClientListServerBackupsData >) => queryOptions < ClientListServerBackupsResponse , AxiosError < ClientListServerBackupsError >, ClientListServerBackupsResponse , ReturnType < typeof clientListServerBackupsQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientListServerBackups ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerBackupsQueryKey ( options )
});
export const clientListServerBackupsInfiniteQueryKey = ( options : Options < ClientListServerBackupsData >) : QueryKey < Options < ClientListServerBackupsData >> => createQueryKey ( 'clientListServerBackups' , options , true );
/**
* List server backups
*
* Returns a paginated list of backups for the server.
*/
export const clientListServerBackupsInfiniteOptions = ( options : Options < ClientListServerBackupsData >) => {
const opts = infiniteQueryOptions < ClientListServerBackupsResponse , AxiosError < ClientListServerBackupsError >, InfiniteData < ClientListServerBackupsResponse >, QueryKey < Options < ClientListServerBackupsData >>, ClientListServerBackupsPageQueryParameter | Pick < QueryKey < Options < ClientListServerBackupsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' >>(
// @ts-ignore
{
queryFn : async ({ pageParam , queryKey , signal }) => {
// @ts-ignore
const page : Pick < QueryKey < Options < ClientListServerBackupsData >> [ 0 ] , 'body' | 'headers' | 'path' | 'query' > = typeof pageParam === 'object' ? pageParam : {
query : {
page : pageParam
}
};
const params = createInfiniteParams ( queryKey , page );
const { data } = await clientListServerBackups ({
... options ,
... params ,
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientListServerBackupsInfiniteQueryKey ( options )
});
return opts as Omit < typeof opts , 'initialData' >;
};
export const clientCreateServerBackupMutationKey = ( options? : Partial < Options < ClientCreateServerBackupData >>) => createMutationKey ( 'clientCreateServerBackup' , options );
/**
* Create server backup
*
* Starts a new backup for the server.
*/
export const clientCreateServerBackupMutation = ( options? : Partial < Options < ClientCreateServerBackupData >>) : UseMutationOptions < ClientCreateServerBackupResponse , AxiosError < ClientCreateServerBackupError >, Options < ClientCreateServerBackupData >> => {
const mutationOptions : UseMutationOptions < ClientCreateServerBackupResponse , AxiosError < ClientCreateServerBackupError >, Options < ClientCreateServerBackupData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientCreateServerBackup ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientCreateServerBackupMutationKey ( options )
};
return mutationOptions ;
};
export const clientDeleteServerBackupMutationKey = ( options? : Partial < Options < ClientDeleteServerBackupData >>) => createMutationKey ( 'clientDeleteServerBackup' , options );
/**
* Delete server backup
*
* Deletes a backup record and its stored archive.
*/
export const clientDeleteServerBackupMutation = ( options? : Partial < Options < ClientDeleteServerBackupData >>) : UseMutationOptions < ClientDeleteServerBackupResponse , AxiosError < ClientDeleteServerBackupError >, Options < ClientDeleteServerBackupData >> => {
const mutationOptions : UseMutationOptions < ClientDeleteServerBackupResponse , AxiosError < ClientDeleteServerBackupError >, Options < ClientDeleteServerBackupData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientDeleteServerBackup ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientDeleteServerBackupMutationKey ( options )
};
return mutationOptions ;
};
export const clientGetServerBackupQueryKey = ( options : Options < ClientGetServerBackupData >) => createQueryKey ( 'clientGetServerBackup' , options );
/**
* Get server backup
*
* Returns information about one server backup.
*/
export const clientGetServerBackupOptions = ( options : Options < ClientGetServerBackupData >) => queryOptions < ClientGetServerBackupResponse , AxiosError < ClientGetServerBackupError >, ClientGetServerBackupResponse , ReturnType < typeof clientGetServerBackupQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetServerBackup ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetServerBackupQueryKey ( options )
});
export const clientGetBackupDownloadUrlQueryKey = ( options : Options < ClientGetBackupDownloadUrlData >) => createQueryKey ( 'clientGetBackupDownloadUrl' , options );
/**
* Get backup download URL
*
* Returns a signed URL for downloading a server backup.
*/
export const clientGetBackupDownloadUrlOptions = ( options : Options < ClientGetBackupDownloadUrlData >) => queryOptions < ClientGetBackupDownloadUrlResponse , AxiosError < ClientGetBackupDownloadUrlError >, ClientGetBackupDownloadUrlResponse , ReturnType < typeof clientGetBackupDownloadUrlQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetBackupDownloadUrl ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetBackupDownloadUrlQueryKey ( options )
});
export const clientToggleBackupLockMutationKey = ( options? : Partial < Options < ClientToggleBackupLockData >>) => createMutationKey ( 'clientToggleBackupLock' , options );
/**
* Toggle backup lock
*
* Toggles whether a backup is locked against deletion.
*/
export const clientToggleBackupLockMutation = ( options? : Partial < Options < ClientToggleBackupLockData >>) : UseMutationOptions < ClientToggleBackupLockResponse , AxiosError < ClientToggleBackupLockError >, Options < ClientToggleBackupLockData >> => {
const mutationOptions : UseMutationOptions < ClientToggleBackupLockResponse , AxiosError < ClientToggleBackupLockError >, Options < ClientToggleBackupLockData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientToggleBackupLock ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientToggleBackupLockMutationKey ( options )
};
return mutationOptions ;
};
export const clientRestoreServerBackupMutationKey = ( options? : Partial < Options < ClientRestoreServerBackupData >>) => createMutationKey ( 'clientRestoreServerBackup' , options );
/**
* Restore server backup
*
* Restores a backup over the server files.
*/
export const clientRestoreServerBackupMutation = ( options? : Partial < Options < ClientRestoreServerBackupData >>) : UseMutationOptions < ClientRestoreServerBackupResponse , AxiosError < ClientRestoreServerBackupError >, Options < ClientRestoreServerBackupData >> => {
const mutationOptions : UseMutationOptions < ClientRestoreServerBackupResponse , AxiosError < ClientRestoreServerBackupError >, Options < ClientRestoreServerBackupData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientRestoreServerBackup ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientRestoreServerBackupMutationKey ( options )
};
return mutationOptions ;
};
export const clientGetStartupConfigurationQueryKey = ( options : Options < ClientGetStartupConfigurationData >) => createQueryKey ( 'clientGetStartupConfiguration' , options );
/**
* Get startup configuration
*
* Returns the rendered startup command, available Docker images, raw startup command, and user-visible variables for the server.
*/
export const clientGetStartupConfigurationOptions = ( options : Options < ClientGetStartupConfigurationData >) => queryOptions < ClientGetStartupConfigurationResponse , AxiosError < ClientGetStartupConfigurationError >, ClientGetStartupConfigurationResponse , ReturnType < typeof clientGetStartupConfigurationQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await clientGetStartupConfiguration ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : clientGetStartupConfigurationQueryKey ( options )
});
export const clientUpdateStartupVariableMutationKey = ( options? : Partial < Options < ClientUpdateStartupVariableData >>) => createMutationKey ( 'clientUpdateStartupVariable' , options );
/**
* Update startup variable
*
* Updates one editable startup variable for the server and returns the updated rendered startup command.
*/
export const clientUpdateStartupVariableMutation = ( options? : Partial < Options < ClientUpdateStartupVariableData >>) : UseMutationOptions < ClientUpdateStartupVariableResponse , AxiosError < ClientUpdateStartupVariableError >, Options < ClientUpdateStartupVariableData >> => {
const mutationOptions : UseMutationOptions < ClientUpdateStartupVariableResponse , AxiosError < ClientUpdateStartupVariableError >, Options < ClientUpdateStartupVariableData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientUpdateStartupVariable ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientUpdateStartupVariableMutationKey ( options )
};
return mutationOptions ;
};
export const clientRenameServerMutationKey = ( options? : Partial < Options < ClientRenameServerData >>) => createMutationKey ( 'clientRenameServer' , options );
/**
* Rename server
*
* Updates the server name and optionally its description.
*/
export const clientRenameServerMutation = ( options? : Partial < Options < ClientRenameServerData >>) : UseMutationOptions < ClientRenameServerResponse , AxiosError < ClientRenameServerError >, Options < ClientRenameServerData >> => {
const mutationOptions : UseMutationOptions < ClientRenameServerResponse , AxiosError < ClientRenameServerError >, Options < ClientRenameServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientRenameServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientRenameServerMutationKey ( options )
};
return mutationOptions ;
};
export const clientReinstallServerMutationKey = ( options? : Partial < Options < ClientReinstallServerData >>) => createMutationKey ( 'clientReinstallServer' , options );
/**
* Reinstall server
*
* Queues a reinstall of the server on Wings.
*/
export const clientReinstallServerMutation = ( options? : Partial < Options < ClientReinstallServerData >>) : UseMutationOptions < unknown , AxiosError < ClientReinstallServerError >, Options < ClientReinstallServerData >> => {
const mutationOptions : UseMutationOptions < unknown , AxiosError < ClientReinstallServerError >, Options < ClientReinstallServerData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientReinstallServer ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientReinstallServerMutationKey ( options )
};
return mutationOptions ;
};
export const clientSetServerDockerImageMutationKey = ( options? : Partial < Options < ClientSetServerDockerImageData >>) => createMutationKey ( 'clientSetServerDockerImage' , options );
/**
* Set server Docker image
*
* Updates the server Docker image to one of the images allowed by the server egg.
*/
export const clientSetServerDockerImageMutation = ( options? : Partial < Options < ClientSetServerDockerImageData >>) : UseMutationOptions < ClientSetServerDockerImageResponse , AxiosError < ClientSetServerDockerImageError >, Options < ClientSetServerDockerImageData >> => {
const mutationOptions : UseMutationOptions < ClientSetServerDockerImageResponse , AxiosError < ClientSetServerDockerImageError >, Options < ClientSetServerDockerImageData >> = {
mutationFn : async ( fnOptions ) => {
const { data } = await clientSetServerDockerImage ({
... options ,
... fnOptions ,
throwOnError : true
});
return data ;
},
mutationKey : clientSetServerDockerImageMutationKey ( options )
};
return mutationOptions ;
};
export const authGetCsrfCookieQueryKey = ( options? : Options < AuthGetCsrfCookieData >) => createQueryKey ( 'authGetCsrfCookie' , options );
/**
* Get CSRF cookie
*
* Initializes the Laravel Sanctum CSRF cookie required before browser-session authentication requests.
*/
export const authGetCsrfCookieOptions = ( options? : Options < AuthGetCsrfCookieData >) => queryOptions < AuthGetCsrfCookieResponse , AxiosError < DefaultError >, AuthGetCsrfCookieResponse , ReturnType < typeof authGetCsrfCookieQueryKey >>({
queryFn : async ({ queryKey , signal }) => {
const { data } = await authGetCsrfCookie ({
... options ,
... queryKey [ 0 ],
signal ,
throwOnError : true
});
return data ;
},
queryKey : authGetCsrfCookieQueryKey ( options )
});