@newfold/huapi-js 1.4.0 → 1.378.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) hide show
  1. package/README.md +79 -6
  2. package/package.json +6 -6
  3. package/src/handlers.d.ts +0 -0
  4. package/src/handlers.js +0 -0
  5. package/src/index.d.ts +0 -0
  6. package/src/index.js +0 -0
  7. package/src/lib/handlers/index.d.ts +0 -0
  8. package/src/lib/handlers/index.js +0 -0
  9. package/src/lib/handlers/sites/data/sites.d.ts +0 -0
  10. package/src/lib/handlers/sites/data/sites.js +0 -0
  11. package/src/lib/handlers/sites/getHostingSitesHandler.d.ts +1 -1
  12. package/src/lib/handlers/sites/getHostingSitesHandler.js +0 -0
  13. package/src/orval-generated/index.d.ts +1321 -146
  14. package/src/orval-generated/index.js +1530 -162
  15. package/src/orval-generated/index.msw.d.ts +445 -33
  16. package/src/orval-generated/index.msw.js +363 -62
  17. package/src/orval-generated/models/addonCloudflare200.d.ts +11 -0
  18. package/src/orval-generated/models/{addonsCodeguardBackupsParams.js → addonCloudflare200.js} +1 -1
  19. package/src/orval-generated/models/addonCloudflareBody.d.ts +11 -0
  20. package/src/orval-generated/models/{addonsCodeguardBackupRestore200.js → addonCloudflareBody.js} +1 -1
  21. package/src/orval-generated/models/{addonsCodeguardBackupRestore200.d.ts → addonsCloudflare200.d.ts} +2 -2
  22. package/src/orval-generated/models/{addonsCodeguardBackups200BackupsItemDatabaseBackupsItem.js → addonsCloudflare200.js} +1 -1
  23. package/src/orval-generated/models/addonsInfo200.d.ts +10 -0
  24. package/src/orval-generated/models/{addonsCodeguardBackupRestoreBody.js → addonsInfo200.js} +1 -1
  25. package/src/orval-generated/models/addonsSitelockSso200.d.ts +12 -0
  26. package/src/orval-generated/models/addonsSitelockSso200.js +9 -0
  27. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupCreate200.d.ts → codeguardBackupCreate200.d.ts} +2 -2
  28. package/src/orval-generated/models/codeguardBackupCreate200.js +9 -0
  29. package/src/orval-generated/models/codeguardBackupCreateBody.d.ts +13 -0
  30. package/src/orval-generated/models/codeguardBackupCreateBody.js +9 -0
  31. package/src/orval-generated/models/{addonsCodeguardDatabaseBackupCreate200.d.ts → codeguardBackupDownload200.d.ts} +2 -2
  32. package/src/orval-generated/models/codeguardBackupDownload200.js +9 -0
  33. package/src/orval-generated/models/codeguardBackupDownloadBody.d.ts +15 -0
  34. package/src/orval-generated/models/codeguardBackupDownloadBody.js +9 -0
  35. package/src/orval-generated/models/codeguardBackupList200.d.ts +11 -0
  36. package/src/orval-generated/models/{addonsCodeguardBackups200.js → codeguardBackupList200.js} +0 -0
  37. package/src/orval-generated/models/codeguardBackupList200BackupsItem.d.ts +13 -0
  38. package/src/orval-generated/models/{addonsCodeguardBackups200BackupsItem.js → codeguardBackupList200BackupsItem.js} +0 -0
  39. package/src/orval-generated/models/{addonsCodeguardBackups200BackupsItemDatabaseBackupsItem.d.ts → codeguardBackupList200BackupsItemDatabaseBackupsItem.d.ts} +3 -3
  40. package/src/orval-generated/models/codeguardBackupList200BackupsItemDatabaseBackupsItem.js +9 -0
  41. package/src/orval-generated/models/{addonsCodeguardBackupsParams.d.ts → codeguardBackupListParams.d.ts} +2 -2
  42. package/src/orval-generated/models/codeguardBackupListParams.js +9 -0
  43. package/src/orval-generated/models/codeguardBackupRestore200.d.ts +11 -0
  44. package/src/orval-generated/models/codeguardBackupRestore200.js +9 -0
  45. package/src/orval-generated/models/{addonsCodeguardBackupRestoreBody.d.ts → codeguardBackupRestoreBody.d.ts} +2 -2
  46. package/src/orval-generated/models/codeguardBackupRestoreBody.js +9 -0
  47. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupRestore200.d.ts → codeguardDatabaseBackupCreate200.d.ts} +2 -2
  48. package/src/orval-generated/models/codeguardDatabaseBackupCreate200.js +9 -0
  49. package/src/orval-generated/models/{addonsCodeguardDatabaseBackupCreateBody.d.ts → codeguardDatabaseBackupCreateBody.d.ts} +2 -2
  50. package/src/orval-generated/models/codeguardDatabaseBackupCreateBody.js +9 -0
  51. package/src/orval-generated/models/codeguardDatabaseBackupList200.d.ts +11 -0
  52. package/src/orval-generated/models/{addonsCodeguardDatabaseBackupList200.js → codeguardDatabaseBackupList200.js} +0 -0
  53. package/src/orval-generated/models/{addonsCodeguardDatabaseBackupList200BackupsItem.d.ts → codeguardDatabaseBackupList200BackupsItem.d.ts} +2 -2
  54. package/src/orval-generated/models/codeguardDatabaseBackupList200BackupsItem.js +9 -0
  55. package/src/orval-generated/models/{addonsCodeguardDatabaseBackupListParams.d.ts → codeguardDatabaseBackupListParams.d.ts} +2 -2
  56. package/src/orval-generated/models/codeguardDatabaseBackupListParams.js +9 -0
  57. package/src/orval-generated/models/codeguardDatabaseBackupRestore200.d.ts +10 -0
  58. package/src/orval-generated/models/codeguardDatabaseBackupRestore200.js +9 -0
  59. package/src/orval-generated/models/{addonsCodeguardDatabaseBackupRestoreBody.d.ts → codeguardDatabaseBackupRestoreBody.d.ts} +2 -2
  60. package/src/orval-generated/models/codeguardDatabaseBackupRestoreBody.js +9 -0
  61. package/src/orval-generated/models/codeguardDatabaseList200.d.ts +12 -0
  62. package/src/orval-generated/models/{addonsCodeguardDatabaseList200.js → codeguardDatabaseList200.js} +0 -0
  63. package/src/orval-generated/models/codeguardDatabaseList200DatabasesItem.d.ts +11 -0
  64. package/src/orval-generated/models/{addonsCodeguardDatabaseList200DatabasesItem.js → codeguardDatabaseList200DatabasesItem.js} +0 -0
  65. package/src/orval-generated/models/{addonsCodeguardDatabaseList200DatabasesItemDatabaseBackup.d.ts → codeguardDatabaseList200DatabasesItemDatabaseBackup.d.ts} +2 -2
  66. package/src/orval-generated/models/codeguardDatabaseList200DatabasesItemDatabaseBackup.js +9 -0
  67. package/src/orval-generated/models/{addonsCodeguardLoginLinkGenerate200.d.ts → codeguardLoginLink200.d.ts} +2 -2
  68. package/src/orval-generated/models/codeguardLoginLink200.js +9 -0
  69. package/src/orval-generated/models/codeguardPlanInfo200.d.ts +17 -0
  70. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupList200.js → codeguardPlanInfo200.js} +0 -0
  71. package/src/orval-generated/models/codeguardPlanInfo200SeatsItem.d.ts +12 -0
  72. package/src/orval-generated/models/codeguardPlanInfo200SeatsItem.js +9 -0
  73. package/src/orval-generated/models/codeguardWebsiteBackupCreate200.d.ts +10 -0
  74. package/src/orval-generated/models/codeguardWebsiteBackupCreate200.js +9 -0
  75. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupCreateBody.d.ts → codeguardWebsiteBackupCreateBody.d.ts} +2 -2
  76. package/src/orval-generated/models/codeguardWebsiteBackupCreateBody.js +9 -0
  77. package/src/orval-generated/models/codeguardWebsiteBackupList200.d.ts +11 -0
  78. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupRestore400.js → codeguardWebsiteBackupList200.js} +0 -0
  79. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupList200BackupsItem.d.ts → codeguardWebsiteBackupList200BackupsItem.d.ts} +2 -2
  80. package/src/orval-generated/models/codeguardWebsiteBackupList200BackupsItem.js +9 -0
  81. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupListParams.d.ts → codeguardWebsiteBackupListParams.d.ts} +2 -2
  82. package/src/orval-generated/models/codeguardWebsiteBackupListParams.js +9 -0
  83. package/src/orval-generated/models/codeguardWebsiteBackupRestore200.d.ts +10 -0
  84. package/src/orval-generated/models/codeguardWebsiteBackupRestore200.js +9 -0
  85. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupRestoreBody.d.ts → codeguardWebsiteBackupRestoreBody.d.ts} +2 -2
  86. package/src/orval-generated/models/codeguardWebsiteBackupRestoreBody.js +9 -0
  87. package/src/orval-generated/models/codeguardWebsiteList200.d.ts +11 -0
  88. package/src/orval-generated/models/{addonsCodeguardWebsiteList200.js → codeguardWebsiteList200.js} +0 -0
  89. package/src/orval-generated/models/codeguardWebsiteList200WebsiteListItem.d.ts +11 -0
  90. package/src/orval-generated/models/{addonsCodeguardWebsiteList200WebsiteListItem.js → codeguardWebsiteList200WebsiteListItem.js} +0 -0
  91. package/src/orval-generated/models/{addonsCodeguardWebsiteList200WebsiteListItemWebsite.d.ts → codeguardWebsiteList200WebsiteListItemWebsite.d.ts} +2 -2
  92. package/src/orval-generated/models/codeguardWebsiteList200WebsiteListItemWebsite.js +9 -0
  93. package/src/orval-generated/models/domains200.d.ts +11 -0
  94. package/src/orval-generated/models/domains200.js +2 -0
  95. package/src/orval-generated/models/domains200DomainsItem.d.ts +13 -0
  96. package/src/orval-generated/models/domains200DomainsItem.js +9 -0
  97. package/src/orval-generated/models/domainsParams.d.ts +11 -0
  98. package/src/orval-generated/models/domainsParams.js +2 -0
  99. package/src/orval-generated/models/domainsType.d.ts +15 -0
  100. package/src/orval-generated/models/domainsType.js +18 -0
  101. package/src/orval-generated/models/hostingAccount200.d.ts +17 -0
  102. package/src/orval-generated/models/hostingAccount200.js +9 -0
  103. package/src/orval-generated/models/hostingAddons200.d.ts +1 -1
  104. package/src/orval-generated/models/hostingAddons200.js +0 -0
  105. package/src/orval-generated/models/hostingAddons200RowsItem.d.ts +2 -1
  106. package/src/orval-generated/models/hostingAddons200RowsItem.js +1 -1
  107. package/src/orval-generated/models/hostingAddonsParams.d.ts +1 -1
  108. package/src/orval-generated/models/hostingAddonsParams.js +1 -1
  109. package/src/orval-generated/models/hostingAdvancedPassword200.d.ts +10 -0
  110. package/src/orval-generated/models/hostingAdvancedPassword200.js +9 -0
  111. package/src/orval-generated/models/hostingAdvancedPasswordBody.d.ts +13 -0
  112. package/src/orval-generated/models/hostingAdvancedPasswordBody.js +9 -0
  113. package/src/orval-generated/models/hostingAdvancedServer200.d.ts +14 -0
  114. package/src/orval-generated/models/hostingAdvancedServer200.js +2 -0
  115. package/src/orval-generated/models/{addonsCodeguardWebsiteBackupRestore400Error.d.ts → hostingAdvancedServer200Actions.d.ts} +2 -2
  116. package/src/orval-generated/models/hostingAdvancedServer200Actions.js +9 -0
  117. package/src/orval-generated/models/hostingAdvancedServerStatus200.d.ts +14 -0
  118. package/src/orval-generated/models/hostingAdvancedServerStatus200.js +2 -0
  119. package/src/orval-generated/models/hostingAdvancedServerStatus200Actions.d.ts +10 -0
  120. package/src/orval-generated/models/hostingAdvancedServerStatus200Actions.js +9 -0
  121. package/src/orval-generated/models/hostingAdvancedServerStatusBody.d.ts +11 -0
  122. package/src/orval-generated/models/hostingAdvancedServerStatusBody.js +9 -0
  123. package/src/orval-generated/models/hostingAdvancedSsoWhm200.d.ts +10 -0
  124. package/src/orval-generated/models/hostingAdvancedSsoWhm200.js +9 -0
  125. package/src/orval-generated/models/hostingAdvancedSystemConsole200.d.ts +10 -0
  126. package/src/orval-generated/models/hostingAdvancedSystemConsole200.js +9 -0
  127. package/src/orval-generated/models/hostingCapabilities200.d.ts +14 -0
  128. package/src/orval-generated/models/hostingCapabilities200.js +9 -0
  129. package/src/orval-generated/models/hostingFtp200.d.ts +10 -0
  130. package/src/orval-generated/models/hostingFtp200.js +9 -0
  131. package/src/orval-generated/models/hostingFtpAdd200.d.ts +11 -0
  132. package/src/orval-generated/models/hostingFtpAdd200.js +9 -0
  133. package/src/orval-generated/models/hostingFtpAddBody.d.ts +24 -0
  134. package/src/orval-generated/models/hostingFtpAddBody.js +9 -0
  135. package/src/orval-generated/models/hostingFtpBody.d.ts +17 -0
  136. package/src/orval-generated/models/hostingFtpBody.js +9 -0
  137. package/src/orval-generated/models/hostingFtpList200.d.ts +5 -3
  138. package/src/orval-generated/models/hostingFtpList200.js +0 -0
  139. package/src/orval-generated/models/hostingFtpList200FtpAccountItem.d.ts +1 -1
  140. package/src/orval-generated/models/hostingFtpList200FtpAccountItem.js +1 -1
  141. package/src/orval-generated/models/hostingFtpList200FtpAccountsItem.d.ts +12 -0
  142. package/src/orval-generated/models/hostingFtpList200FtpAccountsItem.js +9 -0
  143. package/src/orval-generated/models/hostingFtpList200SpecialFtpAccountsItem.d.ts +12 -0
  144. package/src/orval-generated/models/hostingFtpList200SpecialFtpAccountsItem.js +9 -0
  145. package/src/orval-generated/models/hostingInfo200.d.ts +2 -2
  146. package/src/orval-generated/models/hostingInfo200.js +1 -1
  147. package/src/orval-generated/models/hostingInfoDiskUsage200.d.ts +11 -0
  148. package/src/orval-generated/models/hostingInfoDiskUsage200.js +9 -0
  149. package/src/orval-generated/models/hostingMigrationInfo200.d.ts +17 -0
  150. package/src/orval-generated/models/hostingMigrationInfo200.js +9 -0
  151. package/src/orval-generated/models/hostingMigrationInfoParams.d.ts +10 -0
  152. package/src/orval-generated/models/hostingMigrationInfoParams.js +9 -0
  153. package/src/orval-generated/models/hostingMigrationSiteScanStatus200.d.ts +11 -0
  154. package/src/orval-generated/models/hostingMigrationSiteScanStatus200.js +9 -0
  155. package/src/orval-generated/models/hostingMigrationSiteScanStatusParams.d.ts +10 -0
  156. package/src/orval-generated/models/hostingMigrationSiteScanStatusParams.js +9 -0
  157. package/src/orval-generated/models/hostingMigrationStatus200.d.ts +11 -0
  158. package/src/orval-generated/models/hostingMigrationStatus200.js +2 -0
  159. package/src/orval-generated/models/hostingMigrationStatus200RowsItem.d.ts +13 -0
  160. package/src/orval-generated/models/hostingMigrationStatus200RowsItem.js +9 -0
  161. package/src/orval-generated/models/hostingMigrations200.d.ts +10 -0
  162. package/src/orval-generated/models/hostingMigrations200.js +9 -0
  163. package/src/orval-generated/models/hostingMigrationsBody.d.ts +11 -0
  164. package/src/orval-generated/models/hostingMigrationsBody.js +9 -0
  165. package/src/orval-generated/models/hostingMigrationsEvent200.d.ts +10 -0
  166. package/src/orval-generated/models/hostingMigrationsEvent200.js +9 -0
  167. package/src/orval-generated/models/hostingMigrationsEventBody.d.ts +13 -0
  168. package/src/orval-generated/models/hostingMigrationsEventBody.js +2 -0
  169. package/src/orval-generated/models/hostingMigrationsEventBodyEventName.d.ts +17 -0
  170. package/src/orval-generated/models/hostingMigrationsEventBodyEventName.js +20 -0
  171. package/src/orval-generated/models/hostingNameservers200.d.ts +10 -0
  172. package/src/orval-generated/models/hostingNameservers200.js +9 -0
  173. package/src/orval-generated/models/hostingShellInfo200.d.ts +10 -0
  174. package/src/orval-generated/models/hostingShellInfo200.js +9 -0
  175. package/src/orval-generated/models/hostingShellToggle200.d.ts +10 -0
  176. package/src/orval-generated/models/hostingShellToggle200.js +9 -0
  177. package/src/orval-generated/models/hostingShellToggleBody.d.ts +11 -0
  178. package/src/orval-generated/models/hostingShellToggleBody.js +9 -0
  179. package/src/orval-generated/models/hostingSiteAdd200.d.ts +12 -0
  180. package/src/orval-generated/models/hostingSiteAdd200.js +9 -0
  181. package/src/orval-generated/models/hostingSiteAddBody.d.ts +17 -0
  182. package/src/orval-generated/models/hostingSiteAddBody.js +9 -0
  183. package/src/orval-generated/models/hostingSites200.d.ts +10 -1
  184. package/src/orval-generated/models/hostingSites200.js +0 -0
  185. package/src/orval-generated/models/hostingSites200RowsItem.d.ts +6 -1
  186. package/src/orval-generated/models/hostingSites200RowsItem.js +0 -7
  187. package/src/orval-generated/models/hostingSites200RowsItemMeta.d.ts +10 -0
  188. package/src/orval-generated/models/hostingSites200RowsItemMeta.js +9 -0
  189. package/src/orval-generated/models/hostingSitesV2200.d.ts +20 -0
  190. package/src/orval-generated/models/hostingSitesV2200.js +2 -0
  191. package/src/orval-generated/models/hostingSitesV2200ItemsItem.d.ts +15 -0
  192. package/src/orval-generated/models/hostingSitesV2200ItemsItem.js +9 -0
  193. package/src/orval-generated/models/{addonsCodeguardDatabaseBackupRestore200.d.ts → hostingSshInfo200.d.ts} +3 -2
  194. package/src/orval-generated/models/hostingSshInfo200.js +9 -0
  195. package/src/orval-generated/models/index.d.ts +172 -34
  196. package/src/orval-generated/models/index.js +172 -34
  197. package/src/orval-generated/models/jetpackBackupStatus200.d.ts +11 -0
  198. package/src/orval-generated/models/jetpackBackupStatus200.js +9 -0
  199. package/src/orval-generated/models/resetSite200.d.ts +12 -0
  200. package/src/orval-generated/models/resetSite200.js +9 -0
  201. package/src/orval-generated/models/site200.d.ts +10 -0
  202. package/src/orval-generated/models/site200.js +9 -0
  203. package/src/orval-generated/models/sitePlugins200.d.ts +13 -0
  204. package/src/orval-generated/models/sitePlugins200.js +2 -0
  205. package/src/orval-generated/models/sitePlugins200PluginsItem.d.ts +13 -0
  206. package/src/orval-generated/models/sitePlugins200PluginsItem.js +9 -0
  207. package/src/orval-generated/models/sitePluginsAutoupdate200.d.ts +10 -0
  208. package/src/orval-generated/models/sitePluginsAutoupdate200.js +9 -0
  209. package/src/orval-generated/models/sitePluginsAutoupdateBody.d.ts +10 -0
  210. package/src/orval-generated/models/sitePluginsAutoupdateBody.js +9 -0
  211. package/src/orval-generated/models/sitePluginsToggle200.d.ts +10 -0
  212. package/src/orval-generated/models/sitePluginsToggle200.js +9 -0
  213. package/src/orval-generated/models/sitePluginsToggleBody.d.ts +13 -0
  214. package/src/orval-generated/models/sitePluginsToggleBody.js +9 -0
  215. package/src/orval-generated/models/sitePluginsUpdate200.d.ts +10 -0
  216. package/src/orval-generated/models/sitePluginsUpdate200.js +9 -0
  217. package/src/orval-generated/models/sitePluginsUpdateBody.d.ts +11 -0
  218. package/src/orval-generated/models/sitePluginsUpdateBody.js +9 -0
  219. package/src/orval-generated/models/siteSettingsAutoupdatePlugins200.d.ts +10 -0
  220. package/src/orval-generated/models/siteSettingsAutoupdatePlugins200.js +9 -0
  221. package/src/orval-generated/models/siteUpdate200.d.ts +10 -0
  222. package/src/orval-generated/models/siteUpdate200.js +9 -0
  223. package/src/orval-generated/models/siteUpdate400.d.ts +10 -0
  224. package/src/orval-generated/models/siteUpdate400.js +9 -0
  225. package/src/orval-generated/models/siteUpdateBody.d.ts +15 -0
  226. package/src/orval-generated/models/siteUpdateBody.js +9 -0
  227. package/src/orval-generated/models/siteUsers200.d.ts +11 -0
  228. package/src/orval-generated/models/siteUsers200.js +2 -0
  229. package/src/orval-generated/models/siteUsers200UsersItem.d.ts +19 -0
  230. package/src/orval-generated/models/siteUsers200UsersItem.js +2 -0
  231. package/src/orval-generated/models/siteUsers200UsersItemMeta.d.ts +11 -0
  232. package/src/orval-generated/models/siteUsers200UsersItemMeta.js +9 -0
  233. package/src/orval-generated/models/sitesAutoupdatesResponse.d.ts +12 -0
  234. package/src/orval-generated/models/sitesAutoupdatesResponse.js +9 -0
  235. package/src/orval-generated/models/sitesAutoupdatesUpdateBody.d.ts +14 -0
  236. package/src/orval-generated/models/sitesAutoupdatesUpdateBody.js +2 -0
  237. package/src/orval-generated/models/sitesAutoupdatesUpdateBodyType.d.ts +16 -0
  238. package/src/orval-generated/models/sitesAutoupdatesUpdateBodyType.js +16 -0
  239. package/src/orval-generated/models/sitesBackups200.d.ts +10 -0
  240. package/src/orval-generated/models/sitesBackups200.js +9 -0
  241. package/src/orval-generated/models/sitesBackupsDetails200.d.ts +13 -0
  242. package/src/orval-generated/models/sitesBackupsDetails200.js +2 -0
  243. package/src/orval-generated/models/sitesBackupsDetails200Codeguard.d.ts +17 -0
  244. package/src/orval-generated/models/sitesBackupsDetails200Codeguard.js +9 -0
  245. package/src/orval-generated/models/sitesBackupsDetails200Jetpack.d.ts +11 -0
  246. package/src/orval-generated/models/sitesBackupsDetails200Jetpack.js +9 -0
  247. package/src/orval-generated/models/sitesDns200.d.ts +13 -0
  248. package/src/orval-generated/models/sitesDns200.js +2 -0
  249. package/src/orval-generated/models/sitesDns200RecordsItem.d.ts +12 -0
  250. package/src/orval-generated/models/sitesDns200RecordsItem.js +9 -0
  251. package/src/orval-generated/models/sitesDnsParams.d.ts +10 -0
  252. package/src/orval-generated/models/sitesDnsParams.js +9 -0
  253. package/src/orval-generated/models/sitesDomain200.d.ts +16 -0
  254. package/src/orval-generated/models/sitesDomain200.js +2 -0
  255. package/src/orval-generated/models/sitesDomain200Detected.d.ts +11 -0
  256. package/src/orval-generated/models/sitesDomain200Detected.js +9 -0
  257. package/src/orval-generated/models/sitesDomain200Wanted.d.ts +11 -0
  258. package/src/orval-generated/models/sitesDomain200Wanted.js +9 -0
  259. package/src/orval-generated/models/sitesDomainUrl200.d.ts +10 -0
  260. package/src/orval-generated/models/sitesDomainUrl200.js +9 -0
  261. package/src/orval-generated/models/sitesDomainUrlBody.d.ts +14 -0
  262. package/src/orval-generated/models/sitesDomainUrlBody.js +9 -0
  263. package/src/orval-generated/models/sitesHasBackups200.d.ts +10 -0
  264. package/src/orval-generated/models/sitesHasBackups200.js +9 -0
  265. package/src/orval-generated/models/sitesInfo200.d.ts +7 -1
  266. package/src/orval-generated/models/sitesInfo200.js +0 -7
  267. package/src/orval-generated/models/sitesInfo200Meta.d.ts +10 -0
  268. package/src/orval-generated/models/sitesInfo200Meta.js +9 -0
  269. package/src/orval-generated/models/sitesList200.d.ts +11 -0
  270. package/src/orval-generated/models/sitesList200.js +2 -0
  271. package/src/orval-generated/models/sitesList200ItemsItem.d.ts +14 -0
  272. package/src/orval-generated/models/sitesList200ItemsItem.js +9 -0
  273. package/src/orval-generated/models/sitesPerformanceCachepurge200.d.ts +10 -0
  274. package/src/orval-generated/models/sitesPerformanceCachepurge200.js +9 -0
  275. package/src/orval-generated/models/sitesPerformanceCachepurgeBody.d.ts +17 -0
  276. package/src/orval-generated/models/sitesPerformanceCachepurgeBody.js +9 -0
  277. package/src/orval-generated/models/sitesPerformanceEnduranceCacheLevel200.d.ts +11 -0
  278. package/src/orval-generated/models/sitesPerformanceEnduranceCacheLevel200.js +2 -0
  279. package/src/orval-generated/models/sitesPerformanceEnduranceCacheLevel200Options.d.ts +10 -0
  280. package/src/orval-generated/models/sitesPerformanceEnduranceCacheLevel200Options.js +9 -0
  281. package/src/orval-generated/models/sitesPerformanceEnduranceCacheLevelBody.d.ts +10 -0
  282. package/src/orval-generated/models/sitesPerformanceEnduranceCacheLevelBody.js +9 -0
  283. package/src/orval-generated/models/sitesPerformanceEnduranceCacheLevelStatus200.d.ts +10 -0
  284. package/src/orval-generated/models/sitesPerformanceEnduranceCacheLevelStatus200.js +9 -0
  285. package/src/orval-generated/models/sitesPerformanceEndurancePageCache200.d.ts +11 -0
  286. package/src/orval-generated/models/sitesPerformanceEndurancePageCache200.js +9 -0
  287. package/src/orval-generated/models/sitesSecurityCheckCore200.d.ts +11 -0
  288. package/src/orval-generated/models/sitesSecurityCheckCore200.js +9 -0
  289. package/src/orval-generated/models/sitesSecurityHttpsEnableDisableSsl200.d.ts +12 -0
  290. package/src/orval-generated/models/sitesSecurityHttpsEnableDisableSsl200.js +9 -0
  291. package/src/orval-generated/models/sitesSecurityHttpsEnableDisableSslBody.d.ts +11 -0
  292. package/src/orval-generated/models/sitesSecurityHttpsEnableDisableSslBody.js +9 -0
  293. package/src/orval-generated/models/sitesSecurityHttpsRedirectionStatus200.d.ts +12 -0
  294. package/src/orval-generated/models/sitesSecurityHttpsRedirectionStatus200.js +9 -0
  295. package/src/orval-generated/models/sitesSecurityResetCoreFiles200.d.ts +11 -0
  296. package/src/orval-generated/models/sitesSecurityResetCoreFiles200.js +9 -0
  297. package/src/orval-generated/models/sitesSecuritySitelock200.d.ts +14 -0
  298. package/src/orval-generated/models/sitesSecuritySitelock200.js +9 -0
  299. package/src/orval-generated/models/sitesSecuritySslAcme200.d.ts +11 -0
  300. package/src/orval-generated/models/sitesSecuritySslAcme200.js +9 -0
  301. package/src/orval-generated/models/sitesSecuritySslStatus200.d.ts +11 -0
  302. package/src/orval-generated/models/sitesSecuritySslStatus200.js +9 -0
  303. package/src/orval-generated/models/sitesSettingsAutoupdates200.d.ts +12 -0
  304. package/src/orval-generated/models/sitesSettingsAutoupdates200.js +9 -0
  305. package/src/orval-generated/models/sitesSettingsAutoupdatesCore200.d.ts +10 -0
  306. package/src/orval-generated/models/sitesSettingsAutoupdatesCore200.js +9 -0
  307. package/src/orval-generated/models/sitesSettingsAutoupdatesCoreBody.d.ts +10 -0
  308. package/src/orval-generated/models/sitesSettingsAutoupdatesCoreBody.js +9 -0
  309. package/src/orval-generated/models/sitesSettingsAutoupdatesTheme200.d.ts +10 -0
  310. package/src/orval-generated/models/sitesSettingsAutoupdatesTheme200.js +9 -0
  311. package/src/orval-generated/models/sitesSettingsAutoupdatesThemeBody.d.ts +10 -0
  312. package/src/orval-generated/models/sitesSettingsAutoupdatesThemeBody.js +9 -0
  313. package/src/orval-generated/models/sitesSettingsComingSoon200.d.ts +10 -0
  314. package/src/orval-generated/models/sitesSettingsComingSoon200.js +9 -0
  315. package/src/orval-generated/models/sitesSettingsComingSoonToggle200.d.ts +10 -0
  316. package/src/orval-generated/models/sitesSettingsComingSoonToggle200.js +9 -0
  317. package/src/orval-generated/models/sitesSettingsComingSoonToggleBody.d.ts +10 -0
  318. package/src/orval-generated/models/sitesSettingsComingSoonToggleBody.js +9 -0
  319. package/src/orval-generated/models/sitesSettingsDebug200.d.ts +10 -0
  320. package/src/orval-generated/models/sitesSettingsDebug200.js +9 -0
  321. package/src/orval-generated/models/sitesSettingsDebugToggle200.d.ts +10 -0
  322. package/src/orval-generated/models/sitesSettingsDebugToggle200.js +9 -0
  323. package/src/orval-generated/models/sitesSettingsDebugToggleBody.d.ts +10 -0
  324. package/src/orval-generated/models/sitesSettingsDebugToggleBody.js +9 -0
  325. package/src/orval-generated/models/sitesSettingsPhpVersionUpdate200.d.ts +10 -0
  326. package/src/orval-generated/models/sitesSettingsPhpVersionUpdate200.js +9 -0
  327. package/src/orval-generated/models/sitesSettingsPhpVersionUpdateBody.d.ts +12 -0
  328. package/src/orval-generated/models/sitesSettingsPhpVersionUpdateBody.js +9 -0
  329. package/src/orval-generated/models/sitesSettingsPhpVersions200.d.ts +10 -0
  330. package/src/orval-generated/models/sitesSettingsPhpVersions200.js +9 -0
  331. package/src/orval-generated/models/sitesSso200.d.ts +1 -1
  332. package/src/orval-generated/models/sitesSso200.js +1 -1
  333. package/src/orval-generated/models/sitesSsoBounceName.d.ts +14 -0
  334. package/src/orval-generated/models/sitesSsoBounceName.js +17 -0
  335. package/src/orval-generated/models/sitesSsoParams.d.ts +13 -0
  336. package/src/orval-generated/models/sitesSsoParams.js +2 -0
  337. package/src/orval-generated/models/sitesVersion200.d.ts +12 -0
  338. package/src/orval-generated/models/sitesVersion200.js +9 -0
  339. package/src/orval-generated/models/sshKey200.d.ts +11 -0
  340. package/src/orval-generated/models/sshKey200.js +9 -0
  341. package/src/orval-generated/models/sshKeyBody.d.ts +12 -0
  342. package/src/orval-generated/models/sshKeyBody.js +9 -0
  343. package/src/orval-generated/models/sshKeyFetch200.d.ts +12 -0
  344. package/src/orval-generated/models/sshKeyFetch200.js +9 -0
  345. package/src/orval-generated/models/sshKeyFetchParams.d.ts +12 -0
  346. package/src/orval-generated/models/sshKeyFetchParams.js +2 -0
  347. package/src/orval-generated/models/sshKeyFetchPrivate.d.ts +12 -0
  348. package/src/orval-generated/models/sshKeyFetchPrivate.js +15 -0
  349. package/src/orval-generated/models/sshKeyGenerate200.d.ts +12 -0
  350. package/src/orval-generated/models/sshKeyGenerate200.js +9 -0
  351. package/src/orval-generated/models/sshKeyGenerateBody.d.ts +23 -0
  352. package/src/orval-generated/models/sshKeyGenerateBody.js +2 -0
  353. package/src/orval-generated/models/sshKeyGenerateBodyBits.d.ts +16 -0
  354. package/src/orval-generated/models/sshKeyGenerateBodyBits.js +16 -0
  355. package/src/orval-generated/models/sshKeyGenerateBodyEncType.d.ts +17 -0
  356. package/src/orval-generated/models/sshKeyGenerateBodyEncType.js +17 -0
  357. package/src/orval-generated/models/sshKeyImport200.d.ts +10 -0
  358. package/src/orval-generated/models/sshKeyImport200.js +9 -0
  359. package/src/orval-generated/models/sshKeyImportBody.d.ts +19 -0
  360. package/src/orval-generated/models/sshKeyImportBody.js +9 -0
  361. package/src/orval-generated/models/sshKeyList200.d.ts +11 -0
  362. package/src/orval-generated/models/sshKeyList200.js +2 -0
  363. package/src/orval-generated/models/sshKeyList200KeysItem.d.ts +13 -0
  364. package/src/orval-generated/models/sshKeyList200KeysItem.js +9 -0
  365. package/src/orval-generated/models/sshKeyListV2200.d.ts +11 -0
  366. package/src/orval-generated/models/sshKeyListV2200.js +2 -0
  367. package/src/orval-generated/models/sshKeyListV2200RowsItem.d.ts +13 -0
  368. package/src/orval-generated/models/sshKeyListV2200RowsItem.js +9 -0
  369. package/src/orval-generated/models/sso200.d.ts +2 -2
  370. package/src/orval-generated/models/sso200.js +1 -1
  371. package/src/orval-generated/models/ssoApp.d.ts +20 -0
  372. package/src/orval-generated/models/ssoApp.js +23 -0
  373. package/src/orval-generated/models/ssoParams.d.ts +11 -0
  374. package/src/orval-generated/models/ssoParams.js +2 -0
  375. package/src/orval-generated/models/addonsCodeguardBackups200.d.ts +0 -11
  376. package/src/orval-generated/models/addonsCodeguardBackups200BackupsItem.d.ts +0 -13
  377. package/src/orval-generated/models/addonsCodeguardDatabaseBackupCreate200.js +0 -9
  378. package/src/orval-generated/models/addonsCodeguardDatabaseBackupCreateBody.js +0 -9
  379. package/src/orval-generated/models/addonsCodeguardDatabaseBackupList200.d.ts +0 -11
  380. package/src/orval-generated/models/addonsCodeguardDatabaseBackupList200BackupsItem.js +0 -9
  381. package/src/orval-generated/models/addonsCodeguardDatabaseBackupListParams.js +0 -9
  382. package/src/orval-generated/models/addonsCodeguardDatabaseBackupRestore200.js +0 -9
  383. package/src/orval-generated/models/addonsCodeguardDatabaseBackupRestoreBody.js +0 -9
  384. package/src/orval-generated/models/addonsCodeguardDatabaseList200.d.ts +0 -12
  385. package/src/orval-generated/models/addonsCodeguardDatabaseList200DatabasesItem.d.ts +0 -11
  386. package/src/orval-generated/models/addonsCodeguardDatabaseList200DatabasesItemDatabaseBackup.js +0 -9
  387. package/src/orval-generated/models/addonsCodeguardLoginLinkGenerate200.js +0 -9
  388. package/src/orval-generated/models/addonsCodeguardWebsiteBackupCreate200.js +0 -9
  389. package/src/orval-generated/models/addonsCodeguardWebsiteBackupCreateBody.js +0 -9
  390. package/src/orval-generated/models/addonsCodeguardWebsiteBackupList200.d.ts +0 -11
  391. package/src/orval-generated/models/addonsCodeguardWebsiteBackupList200BackupsItem.js +0 -9
  392. package/src/orval-generated/models/addonsCodeguardWebsiteBackupListParams.js +0 -9
  393. package/src/orval-generated/models/addonsCodeguardWebsiteBackupRestore200.js +0 -9
  394. package/src/orval-generated/models/addonsCodeguardWebsiteBackupRestore400.d.ts +0 -12
  395. package/src/orval-generated/models/addonsCodeguardWebsiteBackupRestore400Error.js +0 -9
  396. package/src/orval-generated/models/addonsCodeguardWebsiteBackupRestoreBody.js +0 -9
  397. package/src/orval-generated/models/addonsCodeguardWebsiteList200.d.ts +0 -11
  398. package/src/orval-generated/models/addonsCodeguardWebsiteList200WebsiteListItem.d.ts +0 -11
  399. package/src/orval-generated/models/addonsCodeguardWebsiteList200WebsiteListItemWebsite.js +0 -9
@@ -1,236 +1,348 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useHostingSites = exports.getHostingSitesQueryKey = exports.hostingSites = exports.useSitesInfo = exports.getSitesInfoQueryKey = exports.sitesInfo = exports.useSitesSso = exports.getSitesSsoQueryKey = exports.sitesSso = exports.useSso = exports.getSsoQueryKey = exports.sso = exports.useHostingFtpList = exports.getHostingFtpListQueryKey = exports.hostingFtpList = exports.useHostingAddons = exports.getHostingAddonsQueryKey = exports.hostingAddons = exports.useHostingInfo = exports.getHostingInfoQueryKey = exports.hostingInfo = exports.useAddonsCodeguardDatabaseBackupRestore = exports.addonsCodeguardDatabaseBackupRestore = exports.useAddonsCodeguardWebsiteBackupRestore = exports.addonsCodeguardWebsiteBackupRestore = exports.useAddonsCodeguardBackupRestore = exports.addonsCodeguardBackupRestore = exports.useAddonsCodeguardDatabaseBackupList = exports.getAddonsCodeguardDatabaseBackupListQueryKey = exports.addonsCodeguardDatabaseBackupList = exports.useAddonsCodeguardWebsiteBackupList = exports.getAddonsCodeguardWebsiteBackupListQueryKey = exports.addonsCodeguardWebsiteBackupList = exports.useAddonsCodeguardDatabaseList = exports.getAddonsCodeguardDatabaseListQueryKey = exports.addonsCodeguardDatabaseList = exports.useAddonsCodeguardWebsiteBackupCreate = exports.addonsCodeguardWebsiteBackupCreate = exports.useAddonsCodeguardDatabaseBackupCreate = exports.addonsCodeguardDatabaseBackupCreate = exports.useAddonsCodeguardLoginLinkGenerate = exports.getAddonsCodeguardLoginLinkGenerateQueryKey = exports.addonsCodeguardLoginLinkGenerate = exports.useAddonsCodeguardBackups = exports.getAddonsCodeguardBackupsQueryKey = exports.addonsCodeguardBackups = exports.useAddonsCodeguardWebsiteList = exports.getAddonsCodeguardWebsiteListQueryKey = exports.addonsCodeguardWebsiteList = void 0;
3
+ exports.hostingAdvancedServer = exports.useHostingAddons = exports.getHostingAddonsQueryKey = exports.hostingAddons = exports.useHostingAccount = exports.getHostingAccountQueryKey = exports.hostingAccount = exports.useAddonsInfo = exports.getAddonsInfoQueryKey = exports.addonsInfo = exports.useAddonsCloudflare = exports.addonsCloudflare = exports.useAddonsSitelockSso = exports.getAddonsSitelockSsoQueryKey = exports.addonsSitelockSso = exports.useCodeguardWebsiteBackupRestore = exports.codeguardWebsiteBackupRestore = exports.useCodeguardWebsiteBackupCreate = exports.codeguardWebsiteBackupCreate = exports.useCodeguardWebsiteBackupList = exports.getCodeguardWebsiteBackupListQueryKey = exports.codeguardWebsiteBackupList = exports.useCodeguardWebsiteList = exports.getCodeguardWebsiteListQueryKey = exports.codeguardWebsiteList = exports.useCodeguardPlanInfo = exports.getCodeguardPlanInfoQueryKey = exports.codeguardPlanInfo = exports.useCodeguardLoginLink = exports.getCodeguardLoginLinkQueryKey = exports.codeguardLoginLink = exports.useCodeguardDatabaseBackupRestore = exports.codeguardDatabaseBackupRestore = exports.useCodeguardDatabaseBackupCreate = exports.codeguardDatabaseBackupCreate = exports.useCodeguardDatabaseBackupList = exports.getCodeguardDatabaseBackupListQueryKey = exports.codeguardDatabaseBackupList = exports.useCodeguardDatabaseList = exports.getCodeguardDatabaseListQueryKey = exports.codeguardDatabaseList = exports.useCodeguardBackupRestore = exports.codeguardBackupRestore = exports.useCodeguardBackupDownload = exports.codeguardBackupDownload = exports.useCodeguardBackupCreate = exports.codeguardBackupCreate = exports.useCodeguardBackupList = exports.getCodeguardBackupListQueryKey = exports.codeguardBackupList = void 0;
4
+ exports.hostingShellToggle = exports.useHostingNameservers = exports.getHostingNameserversQueryKey = exports.hostingNameservers = exports.useHostingMigrationSiteScanStatus = exports.getHostingMigrationSiteScanStatusQueryKey = exports.hostingMigrationSiteScanStatus = exports.useHostingMigrationInfo = exports.getHostingMigrationInfoQueryKey = exports.hostingMigrationInfo = exports.useHostingMigrationsEvent = exports.hostingMigrationsEvent = exports.useHostingMigrations = exports.hostingMigrations = exports.useHostingMigrationStatus = exports.getHostingMigrationStatusQueryKey = exports.hostingMigrationStatus = exports.useHostingInfoDiskUsage = exports.getHostingInfoDiskUsageQueryKey = exports.hostingInfoDiskUsage = exports.useHostingInfo = exports.getHostingInfoQueryKey = exports.hostingInfo = exports.useHostingFtp = exports.hostingFtp = exports.useHostingFtpAdd = exports.hostingFtpAdd = exports.useHostingFtpList = exports.getHostingFtpListQueryKey = exports.hostingFtpList = exports.useDomains = exports.getDomainsQueryKey = exports.domains = exports.useAddonCloudflare = exports.addonCloudflare = exports.useHostingCapabilities = exports.getHostingCapabilitiesQueryKey = exports.hostingCapabilities = exports.useHostingAdvancedSystemConsole = exports.getHostingAdvancedSystemConsoleQueryKey = exports.hostingAdvancedSystemConsole = exports.useHostingAdvancedSsoWhm = exports.getHostingAdvancedSsoWhmQueryKey = exports.hostingAdvancedSsoWhm = exports.useHostingAdvancedPassword = exports.hostingAdvancedPassword = exports.useHostingAdvancedServerStatus = exports.hostingAdvancedServerStatus = exports.useHostingAdvancedServer = exports.getHostingAdvancedServerQueryKey = void 0;
5
+ exports.getSitesBackupsDetailsQueryKey = exports.sitesBackupsDetails = exports.useSitesHasBackups = exports.getSitesHasBackupsQueryKey = exports.sitesHasBackups = exports.useSitesBackups = exports.getSitesBackupsQueryKey = exports.sitesBackups = exports.useSitesAutoupdatesUpdate = exports.sitesAutoupdatesUpdate = exports.useSitesAutoupdatesInfo = exports.getSitesAutoupdatesInfoQueryKey = exports.sitesAutoupdatesInfo = exports.useSite = exports.site = exports.useSiteUpdate = exports.siteUpdate = exports.useSitesInfo = exports.getSitesInfoQueryKey = exports.sitesInfo = exports.useSitesList = exports.getSitesListQueryKey = exports.sitesList = exports.useSso = exports.getSsoQueryKey = exports.sso = exports.useSshKeyGenerate = exports.sshKeyGenerate = exports.useSshKey = exports.sshKey = exports.useSshKeyList = exports.getSshKeyListQueryKey = exports.sshKeyList = exports.useSshKeyImport = exports.sshKeyImport = exports.useSshKeyFetch = exports.getSshKeyFetchQueryKey = exports.sshKeyFetch = exports.useHostingSshInfo = exports.getHostingSshInfoQueryKey = exports.hostingSshInfo = exports.useHostingSiteAdd = exports.hostingSiteAdd = exports.useHostingSites = exports.getHostingSitesQueryKey = exports.hostingSites = exports.useHostingShellInfo = exports.getHostingShellInfoQueryKey = exports.hostingShellInfo = exports.useHostingShellToggle = void 0;
6
+ exports.useSitesSecuritySslStatus = exports.getSitesSecuritySslStatusQueryKey = exports.sitesSecuritySslStatus = exports.useSitesSecuritySslAcme = exports.sitesSecuritySslAcme = exports.useSitesSecuritySitelock = exports.getSitesSecuritySitelockQueryKey = exports.sitesSecuritySitelock = exports.useSitesSecurityHttpsEnableDisableSsl = exports.sitesSecurityHttpsEnableDisableSsl = exports.useSitesSecurityHttpsRedirectionStatus = exports.getSitesSecurityHttpsRedirectionStatusQueryKey = exports.sitesSecurityHttpsRedirectionStatus = exports.useSitesSecurityResetCoreFiles = exports.sitesSecurityResetCoreFiles = exports.useSitesSecurityCheckCore = exports.getSitesSecurityCheckCoreQueryKey = exports.sitesSecurityCheckCore = exports.useResetSite = exports.resetSite = exports.useSitePluginsUpdate = exports.sitePluginsUpdate = exports.useSitePluginsToggle = exports.sitePluginsToggle = exports.useSitePluginsAutoupdate = exports.sitePluginsAutoupdate = exports.useSitePlugins = exports.getSitePluginsQueryKey = exports.sitePlugins = exports.useSitesPerformanceEndurancePageCache = exports.sitesPerformanceEndurancePageCache = exports.useSitesPerformanceEnduranceCacheLevel = exports.sitesPerformanceEnduranceCacheLevel = exports.useSitesPerformanceEnduranceCacheLevelStatus = exports.getSitesPerformanceEnduranceCacheLevelStatusQueryKey = exports.sitesPerformanceEnduranceCacheLevelStatus = exports.useSitesPerformanceCachepurge = exports.sitesPerformanceCachepurge = exports.useSitesDomainUrl = exports.sitesDomainUrl = exports.useSitesDomain = exports.getSitesDomainQueryKey = exports.sitesDomain = exports.useSitesDns = exports.getSitesDnsQueryKey = exports.sitesDns = exports.useJetpackBackupStatus = exports.getJetpackBackupStatusQueryKey = exports.jetpackBackupStatus = exports.useSitesBackupsDetails = void 0;
7
+ exports.useSshKeyListV2 = exports.getSshKeyListV2QueryKey = exports.sshKeyListV2 = exports.useHostingSitesV2 = exports.getHostingSitesV2QueryKey = exports.hostingSitesV2 = exports.useSitesVersion = exports.getSitesVersionQueryKey = exports.sitesVersion = exports.useSiteUsers = exports.getSiteUsersQueryKey = exports.siteUsers = exports.useSitesSso = exports.getSitesSsoQueryKey = exports.sitesSso = exports.useSitesSettingsPhpVersions = exports.getSitesSettingsPhpVersionsQueryKey = exports.sitesSettingsPhpVersions = exports.useSitesSettingsPhpVersionUpdate = exports.sitesSettingsPhpVersionUpdate = exports.useSitesSettingsDebugToggle = exports.sitesSettingsDebugToggle = exports.useSitesSettingsDebug = exports.getSitesSettingsDebugQueryKey = exports.sitesSettingsDebug = exports.useSitesSettingsComingSoonToggle = exports.sitesSettingsComingSoonToggle = exports.useSitesSettingsComingSoon = exports.getSitesSettingsComingSoonQueryKey = exports.sitesSettingsComingSoon = exports.useSitesSettingsAutoupdatesTheme = exports.sitesSettingsAutoupdatesTheme = exports.useSitesSettingsAutoupdatesCore = exports.sitesSettingsAutoupdatesCore = exports.useSitesSettingsAutoupdates = exports.getSitesSettingsAutoupdatesQueryKey = exports.sitesSettingsAutoupdates = exports.useSiteSettingsAutoupdatePlugins = exports.getSiteSettingsAutoupdatePluginsQueryKey = exports.siteSettingsAutoupdatePlugins = void 0;
4
8
  /**
5
9
  * Generated by orval v6.8.1 🍺
6
10
  * Do not edit manually.
7
11
  * Hosting UAPI
8
12
  * Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
9
- * OpenAPI spec version: 0.1.0
13
+ * OpenAPI spec version: 1.378.0
10
14
  */
11
15
  const axios = require("axios");
12
16
  const react_query_1 = require("react-query");
13
17
  /**
14
- * Return all website records CodeGuard maintains for this user's account.
15
- * @summary addons codeguard website_list
18
+ * Returns a combined backup list with website commit ids and corresponding database commits
19
+ * @summary backup list
16
20
  */
17
- const addonsCodeguardWebsiteList = (addonId, options) => {
18
- return axios.default.get(`/v1/addons/codeguard/${addonId}/website_list`, options);
21
+ const codeguardBackupList = (addonId, params, options) => {
22
+ return axios.default.get(`/v1/addons/codeguard/${addonId}/backups`, Object.assign({ params }, options));
19
23
  };
20
- exports.addonsCodeguardWebsiteList = addonsCodeguardWebsiteList;
21
- const getAddonsCodeguardWebsiteListQueryKey = (addonId) => [`/v1/addons/codeguard/${addonId}/website_list`];
22
- exports.getAddonsCodeguardWebsiteListQueryKey = getAddonsCodeguardWebsiteListQueryKey;
23
- const useAddonsCodeguardWebsiteList = (addonId, options) => {
24
+ exports.codeguardBackupList = codeguardBackupList;
25
+ const getCodeguardBackupListQueryKey = (addonId, params) => [`/v1/addons/codeguard/${addonId}/backups`, ...(params ? [params] : [])];
26
+ exports.getCodeguardBackupListQueryKey = getCodeguardBackupListQueryKey;
27
+ const useCodeguardBackupList = (addonId, params, options) => {
24
28
  var _a;
25
29
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
26
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getAddonsCodeguardWebsiteListQueryKey)(addonId);
27
- const queryFn = ({ signal }) => (0, exports.addonsCodeguardWebsiteList)(addonId, Object.assign({ signal }, axiosOptions));
30
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getCodeguardBackupListQueryKey)(addonId, params);
31
+ const queryFn = ({ signal }) => (0, exports.codeguardBackupList)(addonId, params, Object.assign({ signal }, axiosOptions));
28
32
  const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
29
33
  return Object.assign({ queryKey }, query);
30
34
  };
31
- exports.useAddonsCodeguardWebsiteList = useAddonsCodeguardWebsiteList;
35
+ exports.useCodeguardBackupList = useCodeguardBackupList;
32
36
  /**
33
- * Returns a combined backup list with website commit ids and corresponding database commits
34
- * @summary addons codeguard backups
37
+ * Creates the website backup
38
+ * @summary backup create
35
39
  */
36
- const addonsCodeguardBackups = (addonId, params, options) => {
37
- return axios.default.get(`/v1/addons/codeguard/${addonId}/backups`, Object.assign({ params }, options));
40
+ const codeguardBackupCreate = (addonId, codeguardBackupCreateBody, options) => {
41
+ return axios.default.post(`/v1/addons/codeguard/${addonId}/backups`, codeguardBackupCreateBody, options);
42
+ };
43
+ exports.codeguardBackupCreate = codeguardBackupCreate;
44
+ const useCodeguardBackupCreate = (options) => {
45
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
46
+ const mutationFn = (props) => {
47
+ const { addonId, data } = props !== null && props !== void 0 ? props : {};
48
+ return (0, exports.codeguardBackupCreate)(addonId, data, axiosOptions);
49
+ };
50
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
51
+ };
52
+ exports.useCodeguardBackupCreate = useCodeguardBackupCreate;
53
+ /**
54
+ * Queues the backup download.
55
+ * @summary backup download
56
+ */
57
+ const codeguardBackupDownload = (addonId, codeguardBackupDownloadBody, options) => {
58
+ return axios.default.post(`/v1/addons/codeguard/${addonId}/backups/download`, codeguardBackupDownloadBody, options);
59
+ };
60
+ exports.codeguardBackupDownload = codeguardBackupDownload;
61
+ const useCodeguardBackupDownload = (options) => {
62
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
63
+ const mutationFn = (props) => {
64
+ const { addonId, data } = props !== null && props !== void 0 ? props : {};
65
+ return (0, exports.codeguardBackupDownload)(addonId, data, axiosOptions);
66
+ };
67
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
68
+ };
69
+ exports.useCodeguardBackupDownload = useCodeguardBackupDownload;
70
+ /**
71
+ * Restores a website and database backup
72
+ * @summary backups restore
73
+ */
74
+ const codeguardBackupRestore = (addonId, codeguardBackupRestoreBody, options) => {
75
+ return axios.default.post(`/v1/addons/codeguard/${addonId}/backups/restore`, codeguardBackupRestoreBody, options);
76
+ };
77
+ exports.codeguardBackupRestore = codeguardBackupRestore;
78
+ const useCodeguardBackupRestore = (options) => {
79
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
80
+ const mutationFn = (props) => {
81
+ const { addonId, data } = props !== null && props !== void 0 ? props : {};
82
+ return (0, exports.codeguardBackupRestore)(addonId, data, axiosOptions);
83
+ };
84
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
38
85
  };
39
- exports.addonsCodeguardBackups = addonsCodeguardBackups;
40
- const getAddonsCodeguardBackupsQueryKey = (addonId, params) => [`/v1/addons/codeguard/${addonId}/backups`, ...(params ? [params] : [])];
41
- exports.getAddonsCodeguardBackupsQueryKey = getAddonsCodeguardBackupsQueryKey;
42
- const useAddonsCodeguardBackups = (addonId, params, options) => {
86
+ exports.useCodeguardBackupRestore = useCodeguardBackupRestore;
87
+ /**
88
+ * Returns all database records CodeGuard maintains for this user's account.
89
+ * @summary database list
90
+ */
91
+ const codeguardDatabaseList = (addonId, options) => {
92
+ return axios.default.get(`/v1/addons/codeguard/${addonId}/databases`, options);
93
+ };
94
+ exports.codeguardDatabaseList = codeguardDatabaseList;
95
+ const getCodeguardDatabaseListQueryKey = (addonId) => [`/v1/addons/codeguard/${addonId}/databases`];
96
+ exports.getCodeguardDatabaseListQueryKey = getCodeguardDatabaseListQueryKey;
97
+ const useCodeguardDatabaseList = (addonId, options) => {
43
98
  var _a;
44
99
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
45
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getAddonsCodeguardBackupsQueryKey)(addonId, params);
46
- const queryFn = ({ signal }) => (0, exports.addonsCodeguardBackups)(addonId, params, Object.assign({ signal }, axiosOptions));
100
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getCodeguardDatabaseListQueryKey)(addonId);
101
+ const queryFn = ({ signal }) => (0, exports.codeguardDatabaseList)(addonId, Object.assign({ signal }, axiosOptions));
47
102
  const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
48
103
  return Object.assign({ queryKey }, query);
49
104
  };
50
- exports.useAddonsCodeguardBackups = useAddonsCodeguardBackups;
105
+ exports.useCodeguardDatabaseList = useCodeguardDatabaseList;
51
106
  /**
52
- * Returns an oauth login URL that can be used to access CodeGuard dashboard for a user.
53
- * @summary addons codeguard login_link_generate
107
+ * Returns all database backup records CodeGuard maintains for this user's account.
108
+ * @summary database backup list
54
109
  */
55
- const addonsCodeguardLoginLinkGenerate = (addonId, options) => {
56
- return axios.default.get(`/v1/addons/codeguard/${addonId}/login_link_generate`, options);
110
+ const codeguardDatabaseBackupList = (addonId, params, options) => {
111
+ return axios.default.get(`/v1/addons/codeguard/${addonId}/databases/backups`, Object.assign({ params }, options));
57
112
  };
58
- exports.addonsCodeguardLoginLinkGenerate = addonsCodeguardLoginLinkGenerate;
59
- const getAddonsCodeguardLoginLinkGenerateQueryKey = (addonId) => [`/v1/addons/codeguard/${addonId}/login_link_generate`];
60
- exports.getAddonsCodeguardLoginLinkGenerateQueryKey = getAddonsCodeguardLoginLinkGenerateQueryKey;
61
- const useAddonsCodeguardLoginLinkGenerate = (addonId, options) => {
113
+ exports.codeguardDatabaseBackupList = codeguardDatabaseBackupList;
114
+ const getCodeguardDatabaseBackupListQueryKey = (addonId, params) => [`/v1/addons/codeguard/${addonId}/databases/backups`, ...(params ? [params] : [])];
115
+ exports.getCodeguardDatabaseBackupListQueryKey = getCodeguardDatabaseBackupListQueryKey;
116
+ const useCodeguardDatabaseBackupList = (addonId, params, options) => {
62
117
  var _a;
63
118
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
64
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getAddonsCodeguardLoginLinkGenerateQueryKey)(addonId);
65
- const queryFn = ({ signal }) => (0, exports.addonsCodeguardLoginLinkGenerate)(addonId, Object.assign({ signal }, axiosOptions));
119
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getCodeguardDatabaseBackupListQueryKey)(addonId, params);
120
+ const queryFn = ({ signal }) => (0, exports.codeguardDatabaseBackupList)(addonId, params, Object.assign({ signal }, axiosOptions));
66
121
  const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
67
122
  return Object.assign({ queryKey }, query);
68
123
  };
69
- exports.useAddonsCodeguardLoginLinkGenerate = useAddonsCodeguardLoginLinkGenerate;
124
+ exports.useCodeguardDatabaseBackupList = useCodeguardDatabaseBackupList;
70
125
  /**
71
126
  * Queue the creation of a database backup.
72
- * @summary addons codeguard database_backup_create
127
+ * @summary database backup create
73
128
  */
74
- const addonsCodeguardDatabaseBackupCreate = (addonId, addonsCodeguardDatabaseBackupCreateBody, options) => {
75
- return axios.default.post(`/v1/addons/codeguard/${addonId}/database_backup_create`, addonsCodeguardDatabaseBackupCreateBody, options);
129
+ const codeguardDatabaseBackupCreate = (addonId, codeguardDatabaseBackupCreateBody, options) => {
130
+ return axios.default.post(`/v1/addons/codeguard/${addonId}/databases/backups`, codeguardDatabaseBackupCreateBody, options);
76
131
  };
77
- exports.addonsCodeguardDatabaseBackupCreate = addonsCodeguardDatabaseBackupCreate;
78
- const useAddonsCodeguardDatabaseBackupCreate = (options) => {
132
+ exports.codeguardDatabaseBackupCreate = codeguardDatabaseBackupCreate;
133
+ const useCodeguardDatabaseBackupCreate = (options) => {
79
134
  const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
80
135
  const mutationFn = (props) => {
81
136
  const { addonId, data } = props !== null && props !== void 0 ? props : {};
82
- return (0, exports.addonsCodeguardDatabaseBackupCreate)(addonId, data, axiosOptions);
137
+ return (0, exports.codeguardDatabaseBackupCreate)(addonId, data, axiosOptions);
83
138
  };
84
139
  return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
85
140
  };
86
- exports.useAddonsCodeguardDatabaseBackupCreate = useAddonsCodeguardDatabaseBackupCreate;
141
+ exports.useCodeguardDatabaseBackupCreate = useCodeguardDatabaseBackupCreate;
87
142
  /**
88
- * Initiate the creation of a new backup for a given website
89
- * @summary addons codeguard website_backup_create
143
+ * Restores a database backup
144
+ * @summary database backup restore
90
145
  */
91
- const addonsCodeguardWebsiteBackupCreate = (addonId, addonsCodeguardWebsiteBackupCreateBody, options) => {
92
- return axios.default.post(`/v1/addons/codeguard/${addonId}/website_backup_create`, addonsCodeguardWebsiteBackupCreateBody, options);
146
+ const codeguardDatabaseBackupRestore = (addonId, codeguardDatabaseBackupRestoreBody, options) => {
147
+ return axios.default.post(`/v1/addons/codeguard/${addonId}/databases/backups/restore`, codeguardDatabaseBackupRestoreBody, options);
93
148
  };
94
- exports.addonsCodeguardWebsiteBackupCreate = addonsCodeguardWebsiteBackupCreate;
95
- const useAddonsCodeguardWebsiteBackupCreate = (options) => {
149
+ exports.codeguardDatabaseBackupRestore = codeguardDatabaseBackupRestore;
150
+ const useCodeguardDatabaseBackupRestore = (options) => {
96
151
  const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
97
152
  const mutationFn = (props) => {
98
153
  const { addonId, data } = props !== null && props !== void 0 ? props : {};
99
- return (0, exports.addonsCodeguardWebsiteBackupCreate)(addonId, data, axiosOptions);
154
+ return (0, exports.codeguardDatabaseBackupRestore)(addonId, data, axiosOptions);
100
155
  };
101
156
  return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
102
157
  };
103
- exports.useAddonsCodeguardWebsiteBackupCreate = useAddonsCodeguardWebsiteBackupCreate;
158
+ exports.useCodeguardDatabaseBackupRestore = useCodeguardDatabaseBackupRestore;
159
+ /**
160
+ * Returns an oauth login URL that can be used to access CodeGuard dashboard for a user.
161
+ * @summary login link
162
+ */
163
+ const codeguardLoginLink = (addonId, options) => {
164
+ return axios.default.get(`/v1/addons/codeguard/${addonId}/login`, options);
165
+ };
166
+ exports.codeguardLoginLink = codeguardLoginLink;
167
+ const getCodeguardLoginLinkQueryKey = (addonId) => [`/v1/addons/codeguard/${addonId}/login`];
168
+ exports.getCodeguardLoginLinkQueryKey = getCodeguardLoginLinkQueryKey;
169
+ const useCodeguardLoginLink = (addonId, options) => {
170
+ var _a;
171
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
172
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getCodeguardLoginLinkQueryKey)(addonId);
173
+ const queryFn = ({ signal }) => (0, exports.codeguardLoginLink)(addonId, Object.assign({ signal }, axiosOptions));
174
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
175
+ return Object.assign({ queryKey }, query);
176
+ };
177
+ exports.useCodeguardLoginLink = useCodeguardLoginLink;
104
178
  /**
105
- * Return all database records CodeGuard maintains for this user's account.
106
- * @summary addons codeguard database_list
179
+ * Returns the subscribed plan and usage info
180
+ * @summary plan info
107
181
  */
108
- const addonsCodeguardDatabaseList = (addonId, options) => {
109
- return axios.default.get(`/v1/addons/codeguard/${addonId}/database_list`, options);
182
+ const codeguardPlanInfo = (addonId, options) => {
183
+ return axios.default.get(`/v1/addons/codeguard/${addonId}/plan`, options);
110
184
  };
111
- exports.addonsCodeguardDatabaseList = addonsCodeguardDatabaseList;
112
- const getAddonsCodeguardDatabaseListQueryKey = (addonId) => [`/v1/addons/codeguard/${addonId}/database_list`];
113
- exports.getAddonsCodeguardDatabaseListQueryKey = getAddonsCodeguardDatabaseListQueryKey;
114
- const useAddonsCodeguardDatabaseList = (addonId, options) => {
185
+ exports.codeguardPlanInfo = codeguardPlanInfo;
186
+ const getCodeguardPlanInfoQueryKey = (addonId) => [`/v1/addons/codeguard/${addonId}/plan`];
187
+ exports.getCodeguardPlanInfoQueryKey = getCodeguardPlanInfoQueryKey;
188
+ const useCodeguardPlanInfo = (addonId, options) => {
115
189
  var _a;
116
190
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
117
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getAddonsCodeguardDatabaseListQueryKey)(addonId);
118
- const queryFn = ({ signal }) => (0, exports.addonsCodeguardDatabaseList)(addonId, Object.assign({ signal }, axiosOptions));
191
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getCodeguardPlanInfoQueryKey)(addonId);
192
+ const queryFn = ({ signal }) => (0, exports.codeguardPlanInfo)(addonId, Object.assign({ signal }, axiosOptions));
119
193
  const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
120
194
  return Object.assign({ queryKey }, query);
121
195
  };
122
- exports.useAddonsCodeguardDatabaseList = useAddonsCodeguardDatabaseList;
196
+ exports.useCodeguardPlanInfo = useCodeguardPlanInfo;
123
197
  /**
124
- * Return all website backup records CodeGuard maintains for this user's account.
125
- * @summary addons codeguard website backup list
198
+ * Returns all website records CodeGuard maintains for this user's account.
199
+ * @summary website list
126
200
  */
127
- const addonsCodeguardWebsiteBackupList = (addonId, params, options) => {
128
- return axios.default.get(`/v1/addons/codeguard/${addonId}/website_backup_list`, Object.assign({ params }, options));
201
+ const codeguardWebsiteList = (addonId, options) => {
202
+ return axios.default.get(`/v1/addons/codeguard/${addonId}/websites`, options);
129
203
  };
130
- exports.addonsCodeguardWebsiteBackupList = addonsCodeguardWebsiteBackupList;
131
- const getAddonsCodeguardWebsiteBackupListQueryKey = (addonId, params) => [`/v1/addons/codeguard/${addonId}/website_backup_list`, ...(params ? [params] : [])];
132
- exports.getAddonsCodeguardWebsiteBackupListQueryKey = getAddonsCodeguardWebsiteBackupListQueryKey;
133
- const useAddonsCodeguardWebsiteBackupList = (addonId, params, options) => {
204
+ exports.codeguardWebsiteList = codeguardWebsiteList;
205
+ const getCodeguardWebsiteListQueryKey = (addonId) => [`/v1/addons/codeguard/${addonId}/websites`];
206
+ exports.getCodeguardWebsiteListQueryKey = getCodeguardWebsiteListQueryKey;
207
+ const useCodeguardWebsiteList = (addonId, options) => {
134
208
  var _a;
135
209
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
136
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getAddonsCodeguardWebsiteBackupListQueryKey)(addonId, params);
137
- const queryFn = ({ signal }) => (0, exports.addonsCodeguardWebsiteBackupList)(addonId, params, Object.assign({ signal }, axiosOptions));
210
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getCodeguardWebsiteListQueryKey)(addonId);
211
+ const queryFn = ({ signal }) => (0, exports.codeguardWebsiteList)(addonId, Object.assign({ signal }, axiosOptions));
138
212
  const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
139
213
  return Object.assign({ queryKey }, query);
140
214
  };
141
- exports.useAddonsCodeguardWebsiteBackupList = useAddonsCodeguardWebsiteBackupList;
215
+ exports.useCodeguardWebsiteList = useCodeguardWebsiteList;
142
216
  /**
143
- * Return all database backup records CodeGuard maintains for this user's account.
144
- * @summary addons codeguard database backup list
217
+ * Returns all website backup records CodeGuard maintains for this user's account.
218
+ * @summary website backup list
145
219
  */
146
- const addonsCodeguardDatabaseBackupList = (addonId, params, options) => {
147
- return axios.default.get(`/v1/addons/codeguard/${addonId}/database_backup_list`, Object.assign({ params }, options));
220
+ const codeguardWebsiteBackupList = (addonId, params, options) => {
221
+ return axios.default.get(`/v1/addons/codeguard/${addonId}/websites/backups`, Object.assign({ params }, options));
148
222
  };
149
- exports.addonsCodeguardDatabaseBackupList = addonsCodeguardDatabaseBackupList;
150
- const getAddonsCodeguardDatabaseBackupListQueryKey = (addonId, params) => [`/v1/addons/codeguard/${addonId}/database_backup_list`, ...(params ? [params] : [])];
151
- exports.getAddonsCodeguardDatabaseBackupListQueryKey = getAddonsCodeguardDatabaseBackupListQueryKey;
152
- const useAddonsCodeguardDatabaseBackupList = (addonId, params, options) => {
223
+ exports.codeguardWebsiteBackupList = codeguardWebsiteBackupList;
224
+ const getCodeguardWebsiteBackupListQueryKey = (addonId, params) => [`/v1/addons/codeguard/${addonId}/websites/backups`, ...(params ? [params] : [])];
225
+ exports.getCodeguardWebsiteBackupListQueryKey = getCodeguardWebsiteBackupListQueryKey;
226
+ const useCodeguardWebsiteBackupList = (addonId, params, options) => {
153
227
  var _a;
154
228
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
155
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getAddonsCodeguardDatabaseBackupListQueryKey)(addonId, params);
156
- const queryFn = ({ signal }) => (0, exports.addonsCodeguardDatabaseBackupList)(addonId, params, Object.assign({ signal }, axiosOptions));
229
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getCodeguardWebsiteBackupListQueryKey)(addonId, params);
230
+ const queryFn = ({ signal }) => (0, exports.codeguardWebsiteBackupList)(addonId, params, Object.assign({ signal }, axiosOptions));
157
231
  const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
158
232
  return Object.assign({ queryKey }, query);
159
233
  };
160
- exports.useAddonsCodeguardDatabaseBackupList = useAddonsCodeguardDatabaseBackupList;
234
+ exports.useCodeguardWebsiteBackupList = useCodeguardWebsiteBackupList;
161
235
  /**
162
- * Restores the website backup
163
- * @summary addons codeguard website backup restore
236
+ * Initiate the creation of a new backup for a given website
237
+ * @summary website backup create
164
238
  */
165
- const addonsCodeguardBackupRestore = (addonId, addonsCodeguardBackupRestoreBody, options) => {
166
- return axios.default.post(`/v1/addons/codeguard/${addonId}/backup_restore`, addonsCodeguardBackupRestoreBody, options);
239
+ const codeguardWebsiteBackupCreate = (addonId, codeguardWebsiteBackupCreateBody, options) => {
240
+ return axios.default.post(`/v1/addons/codeguard/${addonId}/websites/backups`, codeguardWebsiteBackupCreateBody, options);
167
241
  };
168
- exports.addonsCodeguardBackupRestore = addonsCodeguardBackupRestore;
169
- const useAddonsCodeguardBackupRestore = (options) => {
242
+ exports.codeguardWebsiteBackupCreate = codeguardWebsiteBackupCreate;
243
+ const useCodeguardWebsiteBackupCreate = (options) => {
170
244
  const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
171
245
  const mutationFn = (props) => {
172
246
  const { addonId, data } = props !== null && props !== void 0 ? props : {};
173
- return (0, exports.addonsCodeguardBackupRestore)(addonId, data, axiosOptions);
247
+ return (0, exports.codeguardWebsiteBackupCreate)(addonId, data, axiosOptions);
174
248
  };
175
249
  return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
176
250
  };
177
- exports.useAddonsCodeguardBackupRestore = useAddonsCodeguardBackupRestore;
251
+ exports.useCodeguardWebsiteBackupCreate = useCodeguardWebsiteBackupCreate;
178
252
  /**
179
- * Restores the website backup
180
- * @summary addons codeguard website backup restore
253
+ * Restores a website backup
254
+ * @summary website backup restore
181
255
  */
182
- const addonsCodeguardWebsiteBackupRestore = (addonId, addonsCodeguardWebsiteBackupRestoreBody, options) => {
183
- return axios.default.post(`/v1/addons/codeguard/${addonId}/website_backup_restore`, addonsCodeguardWebsiteBackupRestoreBody, options);
256
+ const codeguardWebsiteBackupRestore = (addonId, codeguardWebsiteBackupRestoreBody, options) => {
257
+ return axios.default.post(`/v1/addons/codeguard/${addonId}/websites/backups/restore`, codeguardWebsiteBackupRestoreBody, options);
184
258
  };
185
- exports.addonsCodeguardWebsiteBackupRestore = addonsCodeguardWebsiteBackupRestore;
186
- const useAddonsCodeguardWebsiteBackupRestore = (options) => {
259
+ exports.codeguardWebsiteBackupRestore = codeguardWebsiteBackupRestore;
260
+ const useCodeguardWebsiteBackupRestore = (options) => {
187
261
  const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
188
262
  const mutationFn = (props) => {
189
263
  const { addonId, data } = props !== null && props !== void 0 ? props : {};
190
- return (0, exports.addonsCodeguardWebsiteBackupRestore)(addonId, data, axiosOptions);
264
+ return (0, exports.codeguardWebsiteBackupRestore)(addonId, data, axiosOptions);
191
265
  };
192
266
  return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
193
267
  };
194
- exports.useAddonsCodeguardWebsiteBackupRestore = useAddonsCodeguardWebsiteBackupRestore;
268
+ exports.useCodeguardWebsiteBackupRestore = useCodeguardWebsiteBackupRestore;
269
+ /**
270
+ * Returns an oauth login URL that can be used to access Sitelock dashboard for a user.
271
+ * @summary sso
272
+ */
273
+ const addonsSitelockSso = (addonId, options) => {
274
+ return axios.default.get(`/v1/addons/sitelock/${addonId}/sso`, options);
275
+ };
276
+ exports.addonsSitelockSso = addonsSitelockSso;
277
+ const getAddonsSitelockSsoQueryKey = (addonId) => [`/v1/addons/sitelock/${addonId}/sso`];
278
+ exports.getAddonsSitelockSsoQueryKey = getAddonsSitelockSsoQueryKey;
279
+ const useAddonsSitelockSso = (addonId, options) => {
280
+ var _a;
281
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
282
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getAddonsSitelockSsoQueryKey)(addonId);
283
+ const queryFn = ({ signal }) => (0, exports.addonsSitelockSso)(addonId, Object.assign({ signal }, axiosOptions));
284
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
285
+ return Object.assign({ queryKey }, query);
286
+ };
287
+ exports.useAddonsSitelockSso = useAddonsSitelockSso;
195
288
  /**
196
- * Restores the database backup
197
- * @summary addons codeguard database backup restore
289
+ * Decom and delete cloudflare basic addon
290
+ * @summary Uninstall cloudflare basic addon
198
291
  */
199
- const addonsCodeguardDatabaseBackupRestore = (addonId, addonsCodeguardDatabaseBackupRestoreBody, options) => {
200
- return axios.default.post(`/v1/addons/codeguard/${addonId}/database_backup_restore`, addonsCodeguardDatabaseBackupRestoreBody, options);
292
+ const addonsCloudflare = (addonId, options) => {
293
+ return axios.default.delete(`/v1/addons/${addonId}/cloudflare`, options);
201
294
  };
202
- exports.addonsCodeguardDatabaseBackupRestore = addonsCodeguardDatabaseBackupRestore;
203
- const useAddonsCodeguardDatabaseBackupRestore = (options) => {
295
+ exports.addonsCloudflare = addonsCloudflare;
296
+ const useAddonsCloudflare = (options) => {
204
297
  const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
205
298
  const mutationFn = (props) => {
206
- const { addonId, data } = props !== null && props !== void 0 ? props : {};
207
- return (0, exports.addonsCodeguardDatabaseBackupRestore)(addonId, data, axiosOptions);
299
+ const { addonId } = props !== null && props !== void 0 ? props : {};
300
+ return (0, exports.addonsCloudflare)(addonId, axiosOptions);
208
301
  };
209
302
  return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
210
303
  };
211
- exports.useAddonsCodeguardDatabaseBackupRestore = useAddonsCodeguardDatabaseBackupRestore;
304
+ exports.useAddonsCloudflare = useAddonsCloudflare;
212
305
  /**
213
- * Return info about a specific account
214
- * @summary hosting info
306
+ * Returns addon information
307
+ * @summary info
215
308
  */
216
- const hostingInfo = (hostingId, options) => {
217
- return axios.default.get(`/v1/hosting/${hostingId}/info`, options);
309
+ const addonsInfo = (addonId, options) => {
310
+ return axios.default.get(`/v1/addons/${addonId}/info`, options);
218
311
  };
219
- exports.hostingInfo = hostingInfo;
220
- const getHostingInfoQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/info`];
221
- exports.getHostingInfoQueryKey = getHostingInfoQueryKey;
222
- const useHostingInfo = (hostingId, options) => {
312
+ exports.addonsInfo = addonsInfo;
313
+ const getAddonsInfoQueryKey = (addonId) => [`/v1/addons/${addonId}/info`];
314
+ exports.getAddonsInfoQueryKey = getAddonsInfoQueryKey;
315
+ const useAddonsInfo = (addonId, options) => {
223
316
  var _a;
224
317
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
225
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingInfoQueryKey)(hostingId);
226
- const queryFn = ({ signal }) => (0, exports.hostingInfo)(hostingId, Object.assign({ signal }, axiosOptions));
318
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getAddonsInfoQueryKey)(addonId);
319
+ const queryFn = ({ signal }) => (0, exports.addonsInfo)(addonId, Object.assign({ signal }, axiosOptions));
320
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(addonId) }, queryOptions));
321
+ return Object.assign({ queryKey }, query);
322
+ };
323
+ exports.useAddonsInfo = useAddonsInfo;
324
+ /**
325
+ * Returns HAL hosting account-level information
326
+ * @summary HAL Hosting Account Info
327
+ */
328
+ const hostingAccount = (hostingId, options) => {
329
+ return axios.default.get(`/v1/hosting/${hostingId}`, options);
330
+ };
331
+ exports.hostingAccount = hostingAccount;
332
+ const getHostingAccountQueryKey = (hostingId) => [`/v1/hosting/${hostingId}`];
333
+ exports.getHostingAccountQueryKey = getHostingAccountQueryKey;
334
+ const useHostingAccount = (hostingId, options) => {
335
+ var _a;
336
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
337
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingAccountQueryKey)(hostingId);
338
+ const queryFn = ({ signal }) => (0, exports.hostingAccount)(hostingId, Object.assign({ signal }, axiosOptions));
227
339
  const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
228
340
  return Object.assign({ queryKey }, query);
229
341
  };
230
- exports.useHostingInfo = useHostingInfo;
342
+ exports.useHostingAccount = useHostingAccount;
231
343
  /**
232
- * Obtain a list of addons.
233
- * @summary hosting addons
344
+ * Returns a list of addons.
345
+ * @summary addon list
234
346
  */
235
347
  const hostingAddons = (hostingId, params, options) => {
236
348
  return axios.default.get(`/v1/hosting/${hostingId}/addons`, Object.assign({ params }, options));
@@ -248,14 +360,160 @@ const useHostingAddons = (hostingId, params, options) => {
248
360
  };
249
361
  exports.useHostingAddons = useHostingAddons;
250
362
  /**
251
- * List FTP accounts.
252
- * @summary hosting ftp list
363
+ * Returns the hosting server info
364
+ * @summary server status/info
365
+ */
366
+ const hostingAdvancedServer = (hostingId, options) => {
367
+ return axios.default.get(`/v1/hosting/${hostingId}/advanced/server`, options);
368
+ };
369
+ exports.hostingAdvancedServer = hostingAdvancedServer;
370
+ const getHostingAdvancedServerQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/advanced/server`];
371
+ exports.getHostingAdvancedServerQueryKey = getHostingAdvancedServerQueryKey;
372
+ const useHostingAdvancedServer = (hostingId, options) => {
373
+ var _a;
374
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
375
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingAdvancedServerQueryKey)(hostingId);
376
+ const queryFn = ({ signal }) => (0, exports.hostingAdvancedServer)(hostingId, Object.assign({ signal }, axiosOptions));
377
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
378
+ return Object.assign({ queryKey }, query);
379
+ };
380
+ exports.useHostingAdvancedServer = useHostingAdvancedServer;
381
+ /**
382
+ * Allows for managing server status
383
+ * @summary server_status
384
+ */
385
+ const hostingAdvancedServerStatus = (hostingId, hostingAdvancedServerStatusBody, options) => {
386
+ return axios.default.put(`/v1/hosting/${hostingId}/advanced/server`, hostingAdvancedServerStatusBody, options);
387
+ };
388
+ exports.hostingAdvancedServerStatus = hostingAdvancedServerStatus;
389
+ const useHostingAdvancedServerStatus = (options) => {
390
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
391
+ const mutationFn = (props) => {
392
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
393
+ return (0, exports.hostingAdvancedServerStatus)(hostingId, data, axiosOptions);
394
+ };
395
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
396
+ };
397
+ exports.useHostingAdvancedServerStatus = useHostingAdvancedServerStatus;
398
+ /**
399
+ * Update user account's password
400
+ * @summary Update user account password
401
+ */
402
+ const hostingAdvancedPassword = (hostingId, hostingAdvancedPasswordBody, options) => {
403
+ return axios.default.put(`/v1/hosting/${hostingId}/advanced/server/password`, hostingAdvancedPasswordBody, options);
404
+ };
405
+ exports.hostingAdvancedPassword = hostingAdvancedPassword;
406
+ const useHostingAdvancedPassword = (options) => {
407
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
408
+ const mutationFn = (props) => {
409
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
410
+ return (0, exports.hostingAdvancedPassword)(hostingId, data, axiosOptions);
411
+ };
412
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
413
+ };
414
+ exports.useHostingAdvancedPassword = useHostingAdvancedPassword;
415
+ /**
416
+ * Returns the hosting sso_whm login url
417
+ * @summary hosting sso_whm
418
+ */
419
+ const hostingAdvancedSsoWhm = (hostingId, options) => {
420
+ return axios.default.get(`/v1/hosting/${hostingId}/advanced/sso_whm`, options);
421
+ };
422
+ exports.hostingAdvancedSsoWhm = hostingAdvancedSsoWhm;
423
+ const getHostingAdvancedSsoWhmQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/advanced/sso_whm`];
424
+ exports.getHostingAdvancedSsoWhmQueryKey = getHostingAdvancedSsoWhmQueryKey;
425
+ const useHostingAdvancedSsoWhm = (hostingId, options) => {
426
+ var _a;
427
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
428
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingAdvancedSsoWhmQueryKey)(hostingId);
429
+ const queryFn = ({ signal }) => (0, exports.hostingAdvancedSsoWhm)(hostingId, Object.assign({ signal }, axiosOptions));
430
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
431
+ return Object.assign({ queryKey }, query);
432
+ };
433
+ exports.useHostingAdvancedSsoWhm = useHostingAdvancedSsoWhm;
434
+ /**
435
+ * Returns the hosting system_console url
436
+ * @summary hosting system_console
437
+ */
438
+ const hostingAdvancedSystemConsole = (hostingId, options) => {
439
+ return axios.default.get(`/v1/hosting/${hostingId}/advanced/system-console`, options);
440
+ };
441
+ exports.hostingAdvancedSystemConsole = hostingAdvancedSystemConsole;
442
+ const getHostingAdvancedSystemConsoleQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/advanced/system-console`];
443
+ exports.getHostingAdvancedSystemConsoleQueryKey = getHostingAdvancedSystemConsoleQueryKey;
444
+ const useHostingAdvancedSystemConsole = (hostingId, options) => {
445
+ var _a;
446
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
447
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingAdvancedSystemConsoleQueryKey)(hostingId);
448
+ const queryFn = ({ signal }) => (0, exports.hostingAdvancedSystemConsole)(hostingId, Object.assign({ signal }, axiosOptions));
449
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
450
+ return Object.assign({ queryKey }, query);
451
+ };
452
+ exports.useHostingAdvancedSystemConsole = useHostingAdvancedSystemConsole;
453
+ /**
454
+ * Returns the hosting capabilities
455
+ * @summary hosting capabilities
456
+ */
457
+ const hostingCapabilities = (hostingId, options) => {
458
+ return axios.default.get(`/v1/hosting/${hostingId}/capabilities`, options);
459
+ };
460
+ exports.hostingCapabilities = hostingCapabilities;
461
+ const getHostingCapabilitiesQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/capabilities`];
462
+ exports.getHostingCapabilitiesQueryKey = getHostingCapabilitiesQueryKey;
463
+ const useHostingCapabilities = (hostingId, options) => {
464
+ var _a;
465
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
466
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingCapabilitiesQueryKey)(hostingId);
467
+ const queryFn = ({ signal }) => (0, exports.hostingCapabilities)(hostingId, Object.assign({ signal }, axiosOptions));
468
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
469
+ return Object.assign({ queryKey }, query);
470
+ };
471
+ exports.useHostingCapabilities = useHostingCapabilities;
472
+ /**
473
+ * Creates cloudflare basic addon
474
+ * @summary Install cloudflare basic addon
475
+ */
476
+ const addonCloudflare = (hostingId, addonCloudflareBody, options) => {
477
+ return axios.default.post(`/v1/hosting/${hostingId}/cloudflare`, addonCloudflareBody, options);
478
+ };
479
+ exports.addonCloudflare = addonCloudflare;
480
+ const useAddonCloudflare = (options) => {
481
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
482
+ const mutationFn = (props) => {
483
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
484
+ return (0, exports.addonCloudflare)(hostingId, data, axiosOptions);
485
+ };
486
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
487
+ };
488
+ exports.useAddonCloudflare = useAddonCloudflare;
489
+ /**
490
+ * Returns a list of domains
491
+ * @summary domain list
492
+ */
493
+ const domains = (hostingId, params, options) => {
494
+ return axios.default.get(`/v1/hosting/${hostingId}/domains`, Object.assign({ params }, options));
495
+ };
496
+ exports.domains = domains;
497
+ const getDomainsQueryKey = (hostingId, params) => [`/v1/hosting/${hostingId}/domains`, ...(params ? [params] : [])];
498
+ exports.getDomainsQueryKey = getDomainsQueryKey;
499
+ const useDomains = (hostingId, params, options) => {
500
+ var _a;
501
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
502
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getDomainsQueryKey)(hostingId, params);
503
+ const queryFn = ({ signal }) => (0, exports.domains)(hostingId, params, Object.assign({ signal }, axiosOptions));
504
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
505
+ return Object.assign({ queryKey }, query);
506
+ };
507
+ exports.useDomains = useDomains;
508
+ /**
509
+ * Returns a list of FTP accounts.
510
+ * @summary ftp list
253
511
  */
254
512
  const hostingFtpList = (hostingId, options) => {
255
- return axios.default.get(`/v1/hosting/${hostingId}/ftp/list`, options);
513
+ return axios.default.get(`/v1/hosting/${hostingId}/ftp`, options);
256
514
  };
257
515
  exports.hostingFtpList = hostingFtpList;
258
- const getHostingFtpListQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/ftp/list`];
516
+ const getHostingFtpListQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/ftp`];
259
517
  exports.getHostingFtpListQueryKey = getHostingFtpListQueryKey;
260
518
  const useHostingFtpList = (hostingId, options) => {
261
519
  var _a;
@@ -267,65 +525,226 @@ const useHostingFtpList = (hostingId, options) => {
267
525
  };
268
526
  exports.useHostingFtpList = useHostingFtpList;
269
527
  /**
270
- * Return a SSO login token for a hosting account
271
- * @summary sso
528
+ * Add ftp account
529
+ * @summary Add ftp account
272
530
  */
273
- const sso = (hostingId, options) => {
274
- return axios.default.get(`/v1/hosting/${hostingId}/sso`, options);
531
+ const hostingFtpAdd = (hostingId, hostingFtpAddBody, options) => {
532
+ return axios.default.post(`/v1/hosting/${hostingId}/ftp`, hostingFtpAddBody, options);
275
533
  };
276
- exports.sso = sso;
277
- const getSsoQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/sso`];
278
- exports.getSsoQueryKey = getSsoQueryKey;
279
- const useSso = (hostingId, options) => {
534
+ exports.hostingFtpAdd = hostingFtpAdd;
535
+ const useHostingFtpAdd = (options) => {
536
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
537
+ const mutationFn = (props) => {
538
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
539
+ return (0, exports.hostingFtpAdd)(hostingId, data, axiosOptions);
540
+ };
541
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
542
+ };
543
+ exports.useHostingFtpAdd = useHostingFtpAdd;
544
+ /**
545
+ * Delete ftp account
546
+ * @summary Delete ftp account
547
+ */
548
+ const hostingFtp = (hostingId, hostingFtpBody, options) => {
549
+ return axios.default.delete(`/v1/hosting/${hostingId}/ftp`, Object.assign({ data: hostingFtpBody }, options));
550
+ };
551
+ exports.hostingFtp = hostingFtp;
552
+ const useHostingFtp = (options) => {
553
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
554
+ const mutationFn = (props) => {
555
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
556
+ return (0, exports.hostingFtp)(hostingId, data, axiosOptions);
557
+ };
558
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
559
+ };
560
+ exports.useHostingFtp = useHostingFtp;
561
+ /**
562
+ * Returns hosting account info
563
+ * @summary Hosting info
564
+ */
565
+ const hostingInfo = (hostingId, options) => {
566
+ return axios.default.get(`/v1/hosting/${hostingId}/info`, options);
567
+ };
568
+ exports.hostingInfo = hostingInfo;
569
+ const getHostingInfoQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/info`];
570
+ exports.getHostingInfoQueryKey = getHostingInfoQueryKey;
571
+ const useHostingInfo = (hostingId, options) => {
280
572
  var _a;
281
573
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
282
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSsoQueryKey)(hostingId);
283
- const queryFn = ({ signal }) => (0, exports.sso)(hostingId, Object.assign({ signal }, axiosOptions));
574
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingInfoQueryKey)(hostingId);
575
+ const queryFn = ({ signal }) => (0, exports.hostingInfo)(hostingId, Object.assign({ signal }, axiosOptions));
284
576
  const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
285
577
  return Object.assign({ queryKey }, query);
286
578
  };
287
- exports.useSso = useSso;
579
+ exports.useHostingInfo = useHostingInfo;
288
580
  /**
289
- * Return an SSO token or login URL for this site (if supported).
290
- * @summary sites sso
581
+ * Returns the hosting account's disk usage
582
+ * @summary info disk usage
291
583
  */
292
- const sitesSso = (siteId, options) => {
293
- return axios.default.get(`/v1/sites/${siteId}/sso`, options);
584
+ const hostingInfoDiskUsage = (hostingId, options) => {
585
+ return axios.default.get(`/v1/hosting/${hostingId}/info/diskusage`, options);
294
586
  };
295
- exports.sitesSso = sitesSso;
296
- const getSitesSsoQueryKey = (siteId) => [`/v1/sites/${siteId}/sso`];
297
- exports.getSitesSsoQueryKey = getSitesSsoQueryKey;
298
- const useSitesSso = (siteId, options) => {
587
+ exports.hostingInfoDiskUsage = hostingInfoDiskUsage;
588
+ const getHostingInfoDiskUsageQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/info/diskusage`];
589
+ exports.getHostingInfoDiskUsageQueryKey = getHostingInfoDiskUsageQueryKey;
590
+ const useHostingInfoDiskUsage = (hostingId, options) => {
299
591
  var _a;
300
592
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
301
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSsoQueryKey)(siteId);
302
- const queryFn = ({ signal }) => (0, exports.sitesSso)(siteId, Object.assign({ signal }, axiosOptions));
303
- const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
593
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingInfoDiskUsageQueryKey)(hostingId);
594
+ const queryFn = ({ signal }) => (0, exports.hostingInfoDiskUsage)(hostingId, Object.assign({ signal }, axiosOptions));
595
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
304
596
  return Object.assign({ queryKey }, query);
305
597
  };
306
- exports.useSitesSso = useSitesSso;
598
+ exports.useHostingInfoDiskUsage = useHostingInfoDiskUsage;
307
599
  /**
308
- * Return info about a specific site
309
- * @summary sites info
600
+ * Gets the Wordpress migration status
601
+ * @summary Wordpress migration status
310
602
  */
311
- const sitesInfo = (siteId, options) => {
312
- return axios.default.get(`/v1/sites/${siteId}/info`, options);
603
+ const hostingMigrationStatus = (hostingId, options) => {
604
+ return axios.default.get(`/v1/hosting/${hostingId}/migrations`, options);
313
605
  };
314
- exports.sitesInfo = sitesInfo;
315
- const getSitesInfoQueryKey = (siteId) => [`/v1/sites/${siteId}/info`];
316
- exports.getSitesInfoQueryKey = getSitesInfoQueryKey;
317
- const useSitesInfo = (siteId, options) => {
606
+ exports.hostingMigrationStatus = hostingMigrationStatus;
607
+ const getHostingMigrationStatusQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/migrations`];
608
+ exports.getHostingMigrationStatusQueryKey = getHostingMigrationStatusQueryKey;
609
+ const useHostingMigrationStatus = (hostingId, options) => {
318
610
  var _a;
319
611
  const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
320
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesInfoQueryKey)(siteId);
321
- const queryFn = ({ signal }) => (0, exports.sitesInfo)(siteId, Object.assign({ signal }, axiosOptions));
322
- const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
612
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingMigrationStatusQueryKey)(hostingId);
613
+ const queryFn = ({ signal }) => (0, exports.hostingMigrationStatus)(hostingId, Object.assign({ signal }, axiosOptions));
614
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
323
615
  return Object.assign({ queryKey }, query);
324
616
  };
325
- exports.useSitesInfo = useSitesInfo;
617
+ exports.useHostingMigrationStatus = useHostingMigrationStatus;
618
+ /**
619
+ * Adds the wordpressmigrate addon for a given migration id and hosting account
620
+ * @summary start the migration process for a site
621
+ */
622
+ const hostingMigrations = (hostingId, hostingMigrationsBody, options) => {
623
+ return axios.default.post(`/v1/hosting/${hostingId}/migrations`, hostingMigrationsBody, options);
624
+ };
625
+ exports.hostingMigrations = hostingMigrations;
626
+ const useHostingMigrations = (options) => {
627
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
628
+ const mutationFn = (props) => {
629
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
630
+ return (0, exports.hostingMigrations)(hostingId, data, axiosOptions);
631
+ };
632
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
633
+ };
634
+ exports.useHostingMigrations = useHostingMigrations;
635
+ /**
636
+ * Post migration event to CWM
637
+ * @summary hosting migrations event
638
+ */
639
+ const hostingMigrationsEvent = (hostingId, hostingMigrationsEventBody, options) => {
640
+ return axios.default.post(`/v1/hosting/${hostingId}/migrations/event`, hostingMigrationsEventBody, options);
641
+ };
642
+ exports.hostingMigrationsEvent = hostingMigrationsEvent;
643
+ const useHostingMigrationsEvent = (options) => {
644
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
645
+ const mutationFn = (props) => {
646
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
647
+ return (0, exports.hostingMigrationsEvent)(hostingId, data, axiosOptions);
648
+ };
649
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
650
+ };
651
+ exports.useHostingMigrationsEvent = useHostingMigrationsEvent;
652
+ /**
653
+ * Gets the Wordpress migration information
654
+ * @summary Wordpress migration information
655
+ */
656
+ const hostingMigrationInfo = (hostingId, params, options) => {
657
+ return axios.default.get(`/v1/hosting/${hostingId}/migrations/info`, Object.assign({ params }, options));
658
+ };
659
+ exports.hostingMigrationInfo = hostingMigrationInfo;
660
+ const getHostingMigrationInfoQueryKey = (hostingId, params) => [`/v1/hosting/${hostingId}/migrations/info`, ...(params ? [params] : [])];
661
+ exports.getHostingMigrationInfoQueryKey = getHostingMigrationInfoQueryKey;
662
+ const useHostingMigrationInfo = (hostingId, params, options) => {
663
+ var _a;
664
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
665
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingMigrationInfoQueryKey)(hostingId, params);
666
+ const queryFn = ({ signal }) => (0, exports.hostingMigrationInfo)(hostingId, params, Object.assign({ signal }, axiosOptions));
667
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
668
+ return Object.assign({ queryKey }, query);
669
+ };
670
+ exports.useHostingMigrationInfo = useHostingMigrationInfo;
671
+ /**
672
+ * Provides the status of SiteMigration site_scan and deeplink to WordPress admin page
673
+ * @summary SiteMigration site_scan status
674
+ */
675
+ const hostingMigrationSiteScanStatus = (hostingId, params, options) => {
676
+ return axios.default.get(`/v1/hosting/${hostingId}/migrations/site-scan`, Object.assign({ params }, options));
677
+ };
678
+ exports.hostingMigrationSiteScanStatus = hostingMigrationSiteScanStatus;
679
+ const getHostingMigrationSiteScanStatusQueryKey = (hostingId, params) => [`/v1/hosting/${hostingId}/migrations/site-scan`, ...(params ? [params] : [])];
680
+ exports.getHostingMigrationSiteScanStatusQueryKey = getHostingMigrationSiteScanStatusQueryKey;
681
+ const useHostingMigrationSiteScanStatus = (hostingId, params, options) => {
682
+ var _a;
683
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
684
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingMigrationSiteScanStatusQueryKey)(hostingId, params);
685
+ const queryFn = ({ signal }) => (0, exports.hostingMigrationSiteScanStatus)(hostingId, params, Object.assign({ signal }, axiosOptions));
686
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
687
+ return Object.assign({ queryKey }, query);
688
+ };
689
+ exports.useHostingMigrationSiteScanStatus = useHostingMigrationSiteScanStatus;
690
+ /**
691
+ * Returns the hosting brand nameservers
692
+ * @summary hosting nameservers
693
+ */
694
+ const hostingNameservers = (hostingId, options) => {
695
+ return axios.default.get(`/v1/hosting/${hostingId}/nameservers`, options);
696
+ };
697
+ exports.hostingNameservers = hostingNameservers;
698
+ const getHostingNameserversQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/nameservers`];
699
+ exports.getHostingNameserversQueryKey = getHostingNameserversQueryKey;
700
+ const useHostingNameservers = (hostingId, options) => {
701
+ var _a;
702
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
703
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingNameserversQueryKey)(hostingId);
704
+ const queryFn = ({ signal }) => (0, exports.hostingNameservers)(hostingId, Object.assign({ signal }, axiosOptions));
705
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
706
+ return Object.assign({ queryKey }, query);
707
+ };
708
+ exports.useHostingNameservers = useHostingNameservers;
709
+ /**
710
+ * Enable or disable shell access on an account by setting the shell.SSH key access must be established separately.
711
+ * @summary hosting shell toggle
712
+ */
713
+ const hostingShellToggle = (hostingId, hostingShellToggleBody, options) => {
714
+ return axios.default.put(`/v1/hosting/${hostingId}/shell`, hostingShellToggleBody, options);
715
+ };
716
+ exports.hostingShellToggle = hostingShellToggle;
717
+ const useHostingShellToggle = (options) => {
718
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
719
+ const mutationFn = (props) => {
720
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
721
+ return (0, exports.hostingShellToggle)(hostingId, data, axiosOptions);
722
+ };
723
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
724
+ };
725
+ exports.useHostingShellToggle = useHostingShellToggle;
726
+ /**
727
+ * Determine shell access status for an account.
728
+ * @summary hosting shell_status
729
+ */
730
+ const hostingShellInfo = (hostingId, options) => {
731
+ return axios.default.get(`/v1/hosting/${hostingId}/shell`, options);
732
+ };
733
+ exports.hostingShellInfo = hostingShellInfo;
734
+ const getHostingShellInfoQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/shell`];
735
+ exports.getHostingShellInfoQueryKey = getHostingShellInfoQueryKey;
736
+ const useHostingShellInfo = (hostingId, options) => {
737
+ var _a;
738
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
739
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingShellInfoQueryKey)(hostingId);
740
+ const queryFn = ({ signal }) => (0, exports.hostingShellInfo)(hostingId, Object.assign({ signal }, axiosOptions));
741
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
742
+ return Object.assign({ queryKey }, query);
743
+ };
744
+ exports.useHostingShellInfo = useHostingShellInfo;
326
745
  /**
327
- * Obtain a list of sites.
328
- * @summary hosting sites
746
+ * Returns a list of sites.
747
+ * @summary sites list
329
748
  */
330
749
  const hostingSites = (hostingId, options) => {
331
750
  return axios.default.get(`/v1/hosting/${hostingId}/sites`, options);
@@ -342,3 +761,952 @@ const useHostingSites = (hostingId, options) => {
342
761
  return Object.assign({ queryKey }, query);
343
762
  };
344
763
  exports.useHostingSites = useHostingSites;
764
+ /**
765
+ * Add a site to the current hosting.
766
+ * @summary sites add
767
+ */
768
+ const hostingSiteAdd = (hostingId, hostingSiteAddBody, options) => {
769
+ return axios.default.post(`/v1/hosting/${hostingId}/sites`, hostingSiteAddBody, options);
770
+ };
771
+ exports.hostingSiteAdd = hostingSiteAdd;
772
+ const useHostingSiteAdd = (options) => {
773
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
774
+ const mutationFn = (props) => {
775
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
776
+ return (0, exports.hostingSiteAdd)(hostingId, data, axiosOptions);
777
+ };
778
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
779
+ };
780
+ exports.useHostingSiteAdd = useHostingSiteAdd;
781
+ /**
782
+ * Returns the hosting account's SSH information
783
+ * @summary ssh info
784
+ */
785
+ const hostingSshInfo = (hostingId, options) => {
786
+ return axios.default.get(`/v1/hosting/${hostingId}/ssh`, options);
787
+ };
788
+ exports.hostingSshInfo = hostingSshInfo;
789
+ const getHostingSshInfoQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/ssh`];
790
+ exports.getHostingSshInfoQueryKey = getHostingSshInfoQueryKey;
791
+ const useHostingSshInfo = (hostingId, options) => {
792
+ var _a;
793
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
794
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingSshInfoQueryKey)(hostingId);
795
+ const queryFn = ({ signal }) => (0, exports.hostingSshInfo)(hostingId, Object.assign({ signal }, axiosOptions));
796
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
797
+ return Object.assign({ queryKey }, query);
798
+ };
799
+ exports.useHostingSshInfo = useHostingSshInfo;
800
+ /**
801
+ * Fetches an SSH public (or optionally private) key.
802
+ * @summary ssh key fetch
803
+ */
804
+ const sshKeyFetch = (hostingId, params, options) => {
805
+ return axios.default.get(`/v1/hosting/${hostingId}/ssh/fetch`, Object.assign({ params }, options));
806
+ };
807
+ exports.sshKeyFetch = sshKeyFetch;
808
+ const getSshKeyFetchQueryKey = (hostingId, params) => [`/v1/hosting/${hostingId}/ssh/fetch`, ...(params ? [params] : [])];
809
+ exports.getSshKeyFetchQueryKey = getSshKeyFetchQueryKey;
810
+ const useSshKeyFetch = (hostingId, params, options) => {
811
+ var _a;
812
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
813
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSshKeyFetchQueryKey)(hostingId, params);
814
+ const queryFn = ({ signal }) => (0, exports.sshKeyFetch)(hostingId, params, Object.assign({ signal }, axiosOptions));
815
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
816
+ return Object.assign({ queryKey }, query);
817
+ };
818
+ exports.useSshKeyFetch = useSshKeyFetch;
819
+ /**
820
+ * Import public/private ssh key
821
+ * @summary Import ssh key
822
+ */
823
+ const sshKeyImport = (hostingId, sshKeyImportBody, options) => {
824
+ return axios.default.post(`/v1/hosting/${hostingId}/ssh/import`, sshKeyImportBody, options);
825
+ };
826
+ exports.sshKeyImport = sshKeyImport;
827
+ const useSshKeyImport = (options) => {
828
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
829
+ const mutationFn = (props) => {
830
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
831
+ return (0, exports.sshKeyImport)(hostingId, data, axiosOptions);
832
+ };
833
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
834
+ };
835
+ exports.useSshKeyImport = useSshKeyImport;
836
+ /**
837
+ * List all SSH keys on a server or account. Finds all keys in user's .ssh/ diretory.
838
+ * @deprecated
839
+ * @summary Deprecated - ssh keys list
840
+ */
841
+ const sshKeyList = (hostingId, options) => {
842
+ return axios.default.get(`/v1/hosting/${hostingId}/ssh/keys`, options);
843
+ };
844
+ exports.sshKeyList = sshKeyList;
845
+ const getSshKeyListQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/ssh/keys`];
846
+ exports.getSshKeyListQueryKey = getSshKeyListQueryKey;
847
+ const useSshKeyList = (hostingId, options) => {
848
+ var _a;
849
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
850
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSshKeyListQueryKey)(hostingId);
851
+ const queryFn = ({ signal }) => (0, exports.sshKeyList)(hostingId, Object.assign({ signal }, axiosOptions));
852
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
853
+ return Object.assign({ queryKey }, query);
854
+ };
855
+ exports.useSshKeyList = useSshKeyList;
856
+ /**
857
+ * Deletes an SSH key
858
+ * @summary ssh key delete
859
+ */
860
+ const sshKey = (hostingId, sshKeyBody, options) => {
861
+ return axios.default.delete(`/v1/hosting/${hostingId}/ssh/keys`, Object.assign({ data: sshKeyBody }, options));
862
+ };
863
+ exports.sshKey = sshKey;
864
+ const useSshKey = (options) => {
865
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
866
+ const mutationFn = (props) => {
867
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
868
+ return (0, exports.sshKey)(hostingId, data, axiosOptions);
869
+ };
870
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
871
+ };
872
+ exports.useSshKey = useSshKey;
873
+ /**
874
+ * Generates public/private ssh keys
875
+ * @summary Generate ssh key
876
+ */
877
+ const sshKeyGenerate = (hostingId, sshKeyGenerateBody, options) => {
878
+ return axios.default.post(`/v1/hosting/${hostingId}/ssh/keys`, sshKeyGenerateBody, options);
879
+ };
880
+ exports.sshKeyGenerate = sshKeyGenerate;
881
+ const useSshKeyGenerate = (options) => {
882
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
883
+ const mutationFn = (props) => {
884
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
885
+ return (0, exports.sshKeyGenerate)(hostingId, data, axiosOptions);
886
+ };
887
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
888
+ };
889
+ exports.useSshKeyGenerate = useSshKeyGenerate;
890
+ /**
891
+ * Returns a SSO login token for a hosting account by default, or directly to various apps within the hosting account by using the optional query parameter.
892
+ * @summary sso
893
+ */
894
+ const sso = (hostingId, params, options) => {
895
+ return axios.default.get(`/v1/hosting/${hostingId}/sso`, Object.assign({ params }, options));
896
+ };
897
+ exports.sso = sso;
898
+ const getSsoQueryKey = (hostingId, params) => [`/v1/hosting/${hostingId}/sso`, ...(params ? [params] : [])];
899
+ exports.getSsoQueryKey = getSsoQueryKey;
900
+ const useSso = (hostingId, params, options) => {
901
+ var _a;
902
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
903
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSsoQueryKey)(hostingId, params);
904
+ const queryFn = ({ signal }) => (0, exports.sso)(hostingId, params, Object.assign({ signal }, axiosOptions));
905
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
906
+ return Object.assign({ queryKey }, query);
907
+ };
908
+ exports.useSso = useSso;
909
+ /**
910
+ * Returns site list.
911
+ * @summary Site list for an account
912
+ */
913
+ const sitesList = (options) => {
914
+ return axios.default.get(`/v1/sites`, options);
915
+ };
916
+ exports.sitesList = sitesList;
917
+ const getSitesListQueryKey = () => [`/v1/sites`];
918
+ exports.getSitesListQueryKey = getSitesListQueryKey;
919
+ const useSitesList = (options) => {
920
+ var _a;
921
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
922
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesListQueryKey)();
923
+ const queryFn = ({ signal }) => (0, exports.sitesList)(Object.assign({ signal }, axiosOptions));
924
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, queryOptions);
925
+ return Object.assign({ queryKey }, query);
926
+ };
927
+ exports.useSitesList = useSitesList;
928
+ /**
929
+ * Returns site information.
930
+ * @summary info
931
+ */
932
+ const sitesInfo = (siteId, options) => {
933
+ return axios.default.get(`/v1/sites/${siteId}`, options);
934
+ };
935
+ exports.sitesInfo = sitesInfo;
936
+ const getSitesInfoQueryKey = (siteId) => [`/v1/sites/${siteId}`];
937
+ exports.getSitesInfoQueryKey = getSitesInfoQueryKey;
938
+ const useSitesInfo = (siteId, options) => {
939
+ var _a;
940
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
941
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesInfoQueryKey)(siteId);
942
+ const queryFn = ({ signal }) => (0, exports.sitesInfo)(siteId, Object.assign({ signal }, axiosOptions));
943
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
944
+ return Object.assign({ queryKey }, query);
945
+ };
946
+ exports.useSitesInfo = useSitesInfo;
947
+ /**
948
+ * Allows for updating a site's attributes
949
+ * @summary site update
950
+ */
951
+ const siteUpdate = (siteId, siteUpdateBody, options) => {
952
+ return axios.default.put(`/v1/sites/${siteId}`, siteUpdateBody, options);
953
+ };
954
+ exports.siteUpdate = siteUpdate;
955
+ const useSiteUpdate = (options) => {
956
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
957
+ const mutationFn = (props) => {
958
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
959
+ return (0, exports.siteUpdate)(siteId, data, axiosOptions);
960
+ };
961
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
962
+ };
963
+ exports.useSiteUpdate = useSiteUpdate;
964
+ /**
965
+ * Allows deleting a site
966
+ * @summary site delete
967
+ */
968
+ const site = (siteId, options) => {
969
+ return axios.default.delete(`/v1/sites/${siteId}`, options);
970
+ };
971
+ exports.site = site;
972
+ const useSite = (options) => {
973
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
974
+ const mutationFn = (props) => {
975
+ const { siteId } = props !== null && props !== void 0 ? props : {};
976
+ return (0, exports.site)(siteId, axiosOptions);
977
+ };
978
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
979
+ };
980
+ exports.useSite = useSite;
981
+ /**
982
+ * Returns the autoupdate status of the site's core, themes, and plugins
983
+ * @summary settings autoupdates
984
+ */
985
+ const sitesAutoupdatesInfo = (siteId, options) => {
986
+ return axios.default.get(`/v1/sites/${siteId}/autoupdates`, options);
987
+ };
988
+ exports.sitesAutoupdatesInfo = sitesAutoupdatesInfo;
989
+ const getSitesAutoupdatesInfoQueryKey = (siteId) => [`/v1/sites/${siteId}/autoupdates`];
990
+ exports.getSitesAutoupdatesInfoQueryKey = getSitesAutoupdatesInfoQueryKey;
991
+ const useSitesAutoupdatesInfo = (siteId, options) => {
992
+ var _a;
993
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
994
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesAutoupdatesInfoQueryKey)(siteId);
995
+ const queryFn = ({ signal }) => (0, exports.sitesAutoupdatesInfo)(siteId, Object.assign({ signal }, axiosOptions));
996
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
997
+ return Object.assign({ queryKey }, query);
998
+ };
999
+ exports.useSitesAutoupdatesInfo = useSitesAutoupdatesInfo;
1000
+ /**
1001
+ * Enable / disable core, themes, or plugins autoupdates
1002
+ * @summary settings autoupdates toggle
1003
+ */
1004
+ const sitesAutoupdatesUpdate = (siteId, sitesAutoupdatesUpdateBody, options) => {
1005
+ return axios.default.put(`/v1/sites/${siteId}/autoupdates`, sitesAutoupdatesUpdateBody, options);
1006
+ };
1007
+ exports.sitesAutoupdatesUpdate = sitesAutoupdatesUpdate;
1008
+ const useSitesAutoupdatesUpdate = (options) => {
1009
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1010
+ const mutationFn = (props) => {
1011
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1012
+ return (0, exports.sitesAutoupdatesUpdate)(siteId, data, axiosOptions);
1013
+ };
1014
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1015
+ };
1016
+ exports.useSitesAutoupdatesUpdate = useSitesAutoupdatesUpdate;
1017
+ /**
1018
+ * Returns whether the site has either Codeguard or Jetpack-backup.
1019
+ * @deprecated
1020
+ * @summary Deprecated - has backup
1021
+ */
1022
+ const sitesBackups = (siteId, options) => {
1023
+ return axios.default.get(`/v1/sites/${siteId}/backups`, options);
1024
+ };
1025
+ exports.sitesBackups = sitesBackups;
1026
+ const getSitesBackupsQueryKey = (siteId) => [`/v1/sites/${siteId}/backups`];
1027
+ exports.getSitesBackupsQueryKey = getSitesBackupsQueryKey;
1028
+ const useSitesBackups = (siteId, options) => {
1029
+ var _a;
1030
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1031
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesBackupsQueryKey)(siteId);
1032
+ const queryFn = ({ signal }) => (0, exports.sitesBackups)(siteId, Object.assign({ signal }, axiosOptions));
1033
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1034
+ return Object.assign({ queryKey }, query);
1035
+ };
1036
+ exports.useSitesBackups = useSitesBackups;
1037
+ /**
1038
+ * Returns whether the site has either Codeguard or Jetpack-backup.
1039
+ * @summary has backups
1040
+ */
1041
+ const sitesHasBackups = (siteId, options) => {
1042
+ return axios.default.get(`/v1/sites/${siteId}/backups/check`, options);
1043
+ };
1044
+ exports.sitesHasBackups = sitesHasBackups;
1045
+ const getSitesHasBackupsQueryKey = (siteId) => [`/v1/sites/${siteId}/backups/check`];
1046
+ exports.getSitesHasBackupsQueryKey = getSitesHasBackupsQueryKey;
1047
+ const useSitesHasBackups = (siteId, options) => {
1048
+ var _a;
1049
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1050
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesHasBackupsQueryKey)(siteId);
1051
+ const queryFn = ({ signal }) => (0, exports.sitesHasBackups)(siteId, Object.assign({ signal }, axiosOptions));
1052
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1053
+ return Object.assign({ queryKey }, query);
1054
+ };
1055
+ exports.useSitesHasBackups = useSitesHasBackups;
1056
+ /**
1057
+ * Returns details about the backup options available for the site, i.e. details about the codeguard backup addon and the jetpack based on if one or both of them are added to the account.
1058
+ * @summary site backup details
1059
+ */
1060
+ const sitesBackupsDetails = (siteId, options) => {
1061
+ return axios.default.get(`/v1/sites/${siteId}/backups/details`, options);
1062
+ };
1063
+ exports.sitesBackupsDetails = sitesBackupsDetails;
1064
+ const getSitesBackupsDetailsQueryKey = (siteId) => [`/v1/sites/${siteId}/backups/details`];
1065
+ exports.getSitesBackupsDetailsQueryKey = getSitesBackupsDetailsQueryKey;
1066
+ const useSitesBackupsDetails = (siteId, options) => {
1067
+ var _a;
1068
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1069
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesBackupsDetailsQueryKey)(siteId);
1070
+ const queryFn = ({ signal }) => (0, exports.sitesBackupsDetails)(siteId, Object.assign({ signal }, axiosOptions));
1071
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1072
+ return Object.assign({ queryKey }, query);
1073
+ };
1074
+ exports.useSitesBackupsDetails = useSitesBackupsDetails;
1075
+ /**
1076
+ * The products supported jetpack-backup addon and jetpack-backup plugin
1077
+ * @summary Returns the status of the jetpack-backup product
1078
+ */
1079
+ const jetpackBackupStatus = (siteId, options) => {
1080
+ return axios.default.get(`/v1/sites/${siteId}/backups/jetpack`, options);
1081
+ };
1082
+ exports.jetpackBackupStatus = jetpackBackupStatus;
1083
+ const getJetpackBackupStatusQueryKey = (siteId) => [`/v1/sites/${siteId}/backups/jetpack`];
1084
+ exports.getJetpackBackupStatusQueryKey = getJetpackBackupStatusQueryKey;
1085
+ const useJetpackBackupStatus = (siteId, options) => {
1086
+ var _a;
1087
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1088
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getJetpackBackupStatusQueryKey)(siteId);
1089
+ const queryFn = ({ signal }) => (0, exports.jetpackBackupStatus)(siteId, Object.assign({ signal }, axiosOptions));
1090
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1091
+ return Object.assign({ queryKey }, query);
1092
+ };
1093
+ exports.useJetpackBackupStatus = useJetpackBackupStatus;
1094
+ /**
1095
+ * Returns a list of DNS records for the site's domain.
1096
+ * @summary dns
1097
+ */
1098
+ const sitesDns = (siteId, params, options) => {
1099
+ return axios.default.get(`/v1/sites/${siteId}/dns`, Object.assign({ params }, options));
1100
+ };
1101
+ exports.sitesDns = sitesDns;
1102
+ const getSitesDnsQueryKey = (siteId, params) => [`/v1/sites/${siteId}/dns`, ...(params ? [params] : [])];
1103
+ exports.getSitesDnsQueryKey = getSitesDnsQueryKey;
1104
+ const useSitesDns = (siteId, params, options) => {
1105
+ var _a;
1106
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1107
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesDnsQueryKey)(siteId, params);
1108
+ const queryFn = ({ signal }) => (0, exports.sitesDns)(siteId, params, Object.assign({ signal }, axiosOptions));
1109
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1110
+ return Object.assign({ queryKey }, query);
1111
+ };
1112
+ exports.useSitesDns = useSitesDns;
1113
+ /**
1114
+ * Determines if the domain has the correct DNS setup for site
1115
+ * @summary Domain DNS setup for site
1116
+ */
1117
+ const sitesDomain = (siteId, options) => {
1118
+ return axios.default.get(`/v1/sites/${siteId}/domain`, options);
1119
+ };
1120
+ exports.sitesDomain = sitesDomain;
1121
+ const getSitesDomainQueryKey = (siteId) => [`/v1/sites/${siteId}/domain`];
1122
+ exports.getSitesDomainQueryKey = getSitesDomainQueryKey;
1123
+ const useSitesDomain = (siteId, options) => {
1124
+ var _a;
1125
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1126
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesDomainQueryKey)(siteId);
1127
+ const queryFn = ({ signal }) => (0, exports.sitesDomain)(siteId, Object.assign({ signal }, axiosOptions));
1128
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1129
+ return Object.assign({ queryKey }, query);
1130
+ };
1131
+ exports.useSitesDomain = useSitesDomain;
1132
+ /**
1133
+ * Add or promote pending site url
1134
+ * @summary Add pending site url
1135
+ */
1136
+ const sitesDomainUrl = (siteId, sitesDomainUrlBody, options) => {
1137
+ return axios.default.post(`/v1/sites/${siteId}/domain`, sitesDomainUrlBody, options);
1138
+ };
1139
+ exports.sitesDomainUrl = sitesDomainUrl;
1140
+ const useSitesDomainUrl = (options) => {
1141
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1142
+ const mutationFn = (props) => {
1143
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1144
+ return (0, exports.sitesDomainUrl)(siteId, data, axiosOptions);
1145
+ };
1146
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1147
+ };
1148
+ exports.useSitesDomainUrl = useSitesDomainUrl;
1149
+ /**
1150
+ * cache purge site and url
1151
+ * @summary cache purge url
1152
+ */
1153
+ const sitesPerformanceCachepurge = (siteId, sitesPerformanceCachepurgeBody, options) => {
1154
+ return axios.default.post(`/v1/sites/${siteId}/performance/cachepurge`, sitesPerformanceCachepurgeBody, options);
1155
+ };
1156
+ exports.sitesPerformanceCachepurge = sitesPerformanceCachepurge;
1157
+ const useSitesPerformanceCachepurge = (options) => {
1158
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1159
+ const mutationFn = (props) => {
1160
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1161
+ return (0, exports.sitesPerformanceCachepurge)(siteId, data, axiosOptions);
1162
+ };
1163
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1164
+ };
1165
+ exports.useSitesPerformanceCachepurge = useSitesPerformanceCachepurge;
1166
+ /**
1167
+ * Returns the status of endurance_cache_level
1168
+ * @summary Get status of endurance cache level
1169
+ */
1170
+ const sitesPerformanceEnduranceCacheLevelStatus = (siteId, options) => {
1171
+ return axios.default.get(`/v1/sites/${siteId}/performance/endurance_cache_level`, options);
1172
+ };
1173
+ exports.sitesPerformanceEnduranceCacheLevelStatus = sitesPerformanceEnduranceCacheLevelStatus;
1174
+ const getSitesPerformanceEnduranceCacheLevelStatusQueryKey = (siteId) => [`/v1/sites/${siteId}/performance/endurance_cache_level`];
1175
+ exports.getSitesPerformanceEnduranceCacheLevelStatusQueryKey = getSitesPerformanceEnduranceCacheLevelStatusQueryKey;
1176
+ const useSitesPerformanceEnduranceCacheLevelStatus = (siteId, options) => {
1177
+ var _a;
1178
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1179
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesPerformanceEnduranceCacheLevelStatusQueryKey)(siteId);
1180
+ const queryFn = ({ signal }) => (0, exports.sitesPerformanceEnduranceCacheLevelStatus)(siteId, Object.assign({ signal }, axiosOptions));
1181
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1182
+ return Object.assign({ queryKey }, query);
1183
+ };
1184
+ exports.useSitesPerformanceEnduranceCacheLevelStatus = useSitesPerformanceEnduranceCacheLevelStatus;
1185
+ /**
1186
+ * Set endurance cache level to 0, 1,2 or 3
1187
+ * @summary Set endurance cache level
1188
+ */
1189
+ const sitesPerformanceEnduranceCacheLevel = (siteId, sitesPerformanceEnduranceCacheLevelBody, options) => {
1190
+ return axios.default.post(`/v1/sites/${siteId}/performance/endurance_cache_level`, sitesPerformanceEnduranceCacheLevelBody, options);
1191
+ };
1192
+ exports.sitesPerformanceEnduranceCacheLevel = sitesPerformanceEnduranceCacheLevel;
1193
+ const useSitesPerformanceEnduranceCacheLevel = (options) => {
1194
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1195
+ const mutationFn = (props) => {
1196
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1197
+ return (0, exports.sitesPerformanceEnduranceCacheLevel)(siteId, data, axiosOptions);
1198
+ };
1199
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1200
+ };
1201
+ exports.useSitesPerformanceEnduranceCacheLevel = useSitesPerformanceEnduranceCacheLevel;
1202
+ /**
1203
+ * Update the endurance page cache
1204
+ * @summary update the endurance cache page
1205
+ */
1206
+ const sitesPerformanceEndurancePageCache = (siteId, options) => {
1207
+ return axios.default.put(`/v1/sites/${siteId}/performance/endurance_page_cache`, undefined, options);
1208
+ };
1209
+ exports.sitesPerformanceEndurancePageCache = sitesPerformanceEndurancePageCache;
1210
+ const useSitesPerformanceEndurancePageCache = (options) => {
1211
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1212
+ const mutationFn = (props) => {
1213
+ const { siteId } = props !== null && props !== void 0 ? props : {};
1214
+ return (0, exports.sitesPerformanceEndurancePageCache)(siteId, axiosOptions);
1215
+ };
1216
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1217
+ };
1218
+ exports.useSitesPerformanceEndurancePageCache = useSitesPerformanceEndurancePageCache;
1219
+ /**
1220
+ * Returns a list of the site's plugins
1221
+ * @summary plugins
1222
+ */
1223
+ const sitePlugins = (siteId, options) => {
1224
+ return axios.default.get(`/v1/sites/${siteId}/plugins`, options);
1225
+ };
1226
+ exports.sitePlugins = sitePlugins;
1227
+ const getSitePluginsQueryKey = (siteId) => [`/v1/sites/${siteId}/plugins`];
1228
+ exports.getSitePluginsQueryKey = getSitePluginsQueryKey;
1229
+ const useSitePlugins = (siteId, options) => {
1230
+ var _a;
1231
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1232
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitePluginsQueryKey)(siteId);
1233
+ const queryFn = ({ signal }) => (0, exports.sitePlugins)(siteId, Object.assign({ signal }, axiosOptions));
1234
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1235
+ return Object.assign({ queryKey }, query);
1236
+ };
1237
+ exports.useSitePlugins = useSitePlugins;
1238
+ /**
1239
+ * Enables / disables plugin auto-updates
1240
+ * @deprecated
1241
+ * @summary plugins autoupdate
1242
+ */
1243
+ const sitePluginsAutoupdate = (siteId, sitePluginsAutoupdateBody, options) => {
1244
+ return axios.default.post(`/v1/sites/${siteId}/plugins/autoupdate`, sitePluginsAutoupdateBody, options);
1245
+ };
1246
+ exports.sitePluginsAutoupdate = sitePluginsAutoupdate;
1247
+ const useSitePluginsAutoupdate = (options) => {
1248
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1249
+ const mutationFn = (props) => {
1250
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1251
+ return (0, exports.sitePluginsAutoupdate)(siteId, data, axiosOptions);
1252
+ };
1253
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1254
+ };
1255
+ exports.useSitePluginsAutoupdate = useSitePluginsAutoupdate;
1256
+ /**
1257
+ * Enables / disables a plugin
1258
+ * @summary plugins toggle
1259
+ */
1260
+ const sitePluginsToggle = (siteId, sitePluginsToggleBody, options) => {
1261
+ return axios.default.post(`/v1/sites/${siteId}/plugins/toggle`, sitePluginsToggleBody, options);
1262
+ };
1263
+ exports.sitePluginsToggle = sitePluginsToggle;
1264
+ const useSitePluginsToggle = (options) => {
1265
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1266
+ const mutationFn = (props) => {
1267
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1268
+ return (0, exports.sitePluginsToggle)(siteId, data, axiosOptions);
1269
+ };
1270
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1271
+ };
1272
+ exports.useSitePluginsToggle = useSitePluginsToggle;
1273
+ /**
1274
+ * Updates a plugin
1275
+ * @summary plugins update
1276
+ */
1277
+ const sitePluginsUpdate = (siteId, sitePluginsUpdateBody, options) => {
1278
+ return axios.default.post(`/v1/sites/${siteId}/plugins/update`, sitePluginsUpdateBody, options);
1279
+ };
1280
+ exports.sitePluginsUpdate = sitePluginsUpdate;
1281
+ const useSitePluginsUpdate = (options) => {
1282
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1283
+ const mutationFn = (props) => {
1284
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1285
+ return (0, exports.sitePluginsUpdate)(siteId, data, axiosOptions);
1286
+ };
1287
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1288
+ };
1289
+ exports.useSitePluginsUpdate = useSitePluginsUpdate;
1290
+ /**
1291
+ * Resets a site - deletes/reinstalls the site.
1292
+ * @summary reset site
1293
+ */
1294
+ const resetSite = (siteId, options) => {
1295
+ return axios.default.post(`/v1/sites/${siteId}/reset`, undefined, options);
1296
+ };
1297
+ exports.resetSite = resetSite;
1298
+ const useResetSite = (options) => {
1299
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1300
+ const mutationFn = (props) => {
1301
+ const { siteId } = props !== null && props !== void 0 ? props : {};
1302
+ return (0, exports.resetSite)(siteId, axiosOptions);
1303
+ };
1304
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1305
+ };
1306
+ exports.useResetSite = useResetSite;
1307
+ /**
1308
+ * Performs a checksum of the site's core files to verify integrity.
1309
+ * @summary core files checksum
1310
+ */
1311
+ const sitesSecurityCheckCore = (siteId, options) => {
1312
+ return axios.default.get(`/v1/sites/${siteId}/security/core/check`, options);
1313
+ };
1314
+ exports.sitesSecurityCheckCore = sitesSecurityCheckCore;
1315
+ const getSitesSecurityCheckCoreQueryKey = (siteId) => [`/v1/sites/${siteId}/security/core/check`];
1316
+ exports.getSitesSecurityCheckCoreQueryKey = getSitesSecurityCheckCoreQueryKey;
1317
+ const useSitesSecurityCheckCore = (siteId, options) => {
1318
+ var _a;
1319
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1320
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSecurityCheckCoreQueryKey)(siteId);
1321
+ const queryFn = ({ signal }) => (0, exports.sitesSecurityCheckCore)(siteId, Object.assign({ signal }, axiosOptions));
1322
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1323
+ return Object.assign({ queryKey }, query);
1324
+ };
1325
+ exports.useSitesSecurityCheckCore = useSitesSecurityCheckCore;
1326
+ /**
1327
+ * Resets the site's core files.
1328
+ * @summary core files reset
1329
+ */
1330
+ const sitesSecurityResetCoreFiles = (siteId, options) => {
1331
+ return axios.default.post(`/v1/sites/${siteId}/security/core/reset`, undefined, options);
1332
+ };
1333
+ exports.sitesSecurityResetCoreFiles = sitesSecurityResetCoreFiles;
1334
+ const useSitesSecurityResetCoreFiles = (options) => {
1335
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1336
+ const mutationFn = (props) => {
1337
+ const { siteId } = props !== null && props !== void 0 ? props : {};
1338
+ return (0, exports.sitesSecurityResetCoreFiles)(siteId, axiosOptions);
1339
+ };
1340
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1341
+ };
1342
+ exports.useSitesSecurityResetCoreFiles = useSitesSecurityResetCoreFiles;
1343
+ /**
1344
+ * Returns the HTTPS redirection status.
1345
+ * @summary https redirection status
1346
+ */
1347
+ const sitesSecurityHttpsRedirectionStatus = (siteId, options) => {
1348
+ return axios.default.get(`/v1/sites/${siteId}/security/https`, options);
1349
+ };
1350
+ exports.sitesSecurityHttpsRedirectionStatus = sitesSecurityHttpsRedirectionStatus;
1351
+ const getSitesSecurityHttpsRedirectionStatusQueryKey = (siteId) => [`/v1/sites/${siteId}/security/https`];
1352
+ exports.getSitesSecurityHttpsRedirectionStatusQueryKey = getSitesSecurityHttpsRedirectionStatusQueryKey;
1353
+ const useSitesSecurityHttpsRedirectionStatus = (siteId, options) => {
1354
+ var _a;
1355
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1356
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSecurityHttpsRedirectionStatusQueryKey)(siteId);
1357
+ const queryFn = ({ signal }) => (0, exports.sitesSecurityHttpsRedirectionStatus)(siteId, Object.assign({ signal }, axiosOptions));
1358
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1359
+ return Object.assign({ queryKey }, query);
1360
+ };
1361
+ exports.useSitesSecurityHttpsRedirectionStatus = useSitesSecurityHttpsRedirectionStatus;
1362
+ /**
1363
+ * Enables / disables HTTPS redirection.
1364
+ * @summary https redirection toggle
1365
+ */
1366
+ const sitesSecurityHttpsEnableDisableSsl = (siteId, sitesSecurityHttpsEnableDisableSslBody, options) => {
1367
+ return axios.default.post(`/v1/sites/${siteId}/security/https`, sitesSecurityHttpsEnableDisableSslBody, options);
1368
+ };
1369
+ exports.sitesSecurityHttpsEnableDisableSsl = sitesSecurityHttpsEnableDisableSsl;
1370
+ const useSitesSecurityHttpsEnableDisableSsl = (options) => {
1371
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1372
+ const mutationFn = (props) => {
1373
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1374
+ return (0, exports.sitesSecurityHttpsEnableDisableSsl)(siteId, data, axiosOptions);
1375
+ };
1376
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1377
+ };
1378
+ exports.useSitesSecurityHttpsEnableDisableSsl = useSitesSecurityHttpsEnableDisableSsl;
1379
+ /**
1380
+ * Returns the site's sitelock information.
1381
+ * @summary sitelock info
1382
+ */
1383
+ const sitesSecuritySitelock = (siteId, options) => {
1384
+ return axios.default.get(`/v1/sites/${siteId}/security/sitelock`, options);
1385
+ };
1386
+ exports.sitesSecuritySitelock = sitesSecuritySitelock;
1387
+ const getSitesSecuritySitelockQueryKey = (siteId) => [`/v1/sites/${siteId}/security/sitelock`];
1388
+ exports.getSitesSecuritySitelockQueryKey = getSitesSecuritySitelockQueryKey;
1389
+ const useSitesSecuritySitelock = (siteId, options) => {
1390
+ var _a;
1391
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1392
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSecuritySitelockQueryKey)(siteId);
1393
+ const queryFn = ({ signal }) => (0, exports.sitesSecuritySitelock)(siteId, Object.assign({ signal }, axiosOptions));
1394
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1395
+ return Object.assign({ queryKey }, query);
1396
+ };
1397
+ exports.useSitesSecuritySitelock = useSitesSecuritySitelock;
1398
+ /**
1399
+ * Disables / enables cPanel to generate Let's Encrypt SSLs for the site.
1400
+ * @summary ssl lets encrypt toggle
1401
+ */
1402
+ const sitesSecuritySslAcme = (siteId, options) => {
1403
+ return axios.default.post(`/v1/sites/${siteId}/security/ssl/acme`, undefined, options);
1404
+ };
1405
+ exports.sitesSecuritySslAcme = sitesSecuritySslAcme;
1406
+ const useSitesSecuritySslAcme = (options) => {
1407
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1408
+ const mutationFn = (props) => {
1409
+ const { siteId } = props !== null && props !== void 0 ? props : {};
1410
+ return (0, exports.sitesSecuritySslAcme)(siteId, axiosOptions);
1411
+ };
1412
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1413
+ };
1414
+ exports.useSitesSecuritySslAcme = useSitesSecuritySslAcme;
1415
+ /**
1416
+ * Returns the site's SSL Status
1417
+ * @summary ssl status
1418
+ */
1419
+ const sitesSecuritySslStatus = (siteId, options) => {
1420
+ return axios.default.get(`/v1/sites/${siteId}/security/ssl/status`, options);
1421
+ };
1422
+ exports.sitesSecuritySslStatus = sitesSecuritySslStatus;
1423
+ const getSitesSecuritySslStatusQueryKey = (siteId) => [`/v1/sites/${siteId}/security/ssl/status`];
1424
+ exports.getSitesSecuritySslStatusQueryKey = getSitesSecuritySslStatusQueryKey;
1425
+ const useSitesSecuritySslStatus = (siteId, options) => {
1426
+ var _a;
1427
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1428
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSecuritySslStatusQueryKey)(siteId);
1429
+ const queryFn = ({ signal }) => (0, exports.sitesSecuritySslStatus)(siteId, Object.assign({ signal }, axiosOptions));
1430
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1431
+ return Object.assign({ queryKey }, query);
1432
+ };
1433
+ exports.useSitesSecuritySslStatus = useSitesSecuritySslStatus;
1434
+ /**
1435
+ * Returns status of plugin autoupdate for site
1436
+ * @deprecated
1437
+ * @summary plugins autoupdate status
1438
+ */
1439
+ const siteSettingsAutoupdatePlugins = (siteId, options) => {
1440
+ return axios.default.get(`/v1/sites/${siteId}/settings/autoupdate/plugins`, options);
1441
+ };
1442
+ exports.siteSettingsAutoupdatePlugins = siteSettingsAutoupdatePlugins;
1443
+ const getSiteSettingsAutoupdatePluginsQueryKey = (siteId) => [`/v1/sites/${siteId}/settings/autoupdate/plugins`];
1444
+ exports.getSiteSettingsAutoupdatePluginsQueryKey = getSiteSettingsAutoupdatePluginsQueryKey;
1445
+ const useSiteSettingsAutoupdatePlugins = (siteId, options) => {
1446
+ var _a;
1447
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1448
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSiteSettingsAutoupdatePluginsQueryKey)(siteId);
1449
+ const queryFn = ({ signal }) => (0, exports.siteSettingsAutoupdatePlugins)(siteId, Object.assign({ signal }, axiosOptions));
1450
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1451
+ return Object.assign({ queryKey }, query);
1452
+ };
1453
+ exports.useSiteSettingsAutoupdatePlugins = useSiteSettingsAutoupdatePlugins;
1454
+ /**
1455
+ * Returns the autoupdate status of the site's core, themes, and plugins
1456
+ * @deprecated
1457
+ * @summary settings autoupdates
1458
+ */
1459
+ const sitesSettingsAutoupdates = (siteId, options) => {
1460
+ return axios.default.get(`/v1/sites/${siteId}/settings/autoupdates`, options);
1461
+ };
1462
+ exports.sitesSettingsAutoupdates = sitesSettingsAutoupdates;
1463
+ const getSitesSettingsAutoupdatesQueryKey = (siteId) => [`/v1/sites/${siteId}/settings/autoupdates`];
1464
+ exports.getSitesSettingsAutoupdatesQueryKey = getSitesSettingsAutoupdatesQueryKey;
1465
+ const useSitesSettingsAutoupdates = (siteId, options) => {
1466
+ var _a;
1467
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1468
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSettingsAutoupdatesQueryKey)(siteId);
1469
+ const queryFn = ({ signal }) => (0, exports.sitesSettingsAutoupdates)(siteId, Object.assign({ signal }, axiosOptions));
1470
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1471
+ return Object.assign({ queryKey }, query);
1472
+ };
1473
+ exports.useSitesSettingsAutoupdates = useSitesSettingsAutoupdates;
1474
+ /**
1475
+ * Enables WP Core autoupdates
1476
+ * @deprecated
1477
+ * @summary settings autoupdates core enable
1478
+ */
1479
+ const sitesSettingsAutoupdatesCore = (siteId, sitesSettingsAutoupdatesCoreBody, options) => {
1480
+ return axios.default.post(`/v1/sites/${siteId}/settings/autoupdates/core`, sitesSettingsAutoupdatesCoreBody, options);
1481
+ };
1482
+ exports.sitesSettingsAutoupdatesCore = sitesSettingsAutoupdatesCore;
1483
+ const useSitesSettingsAutoupdatesCore = (options) => {
1484
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1485
+ const mutationFn = (props) => {
1486
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1487
+ return (0, exports.sitesSettingsAutoupdatesCore)(siteId, data, axiosOptions);
1488
+ };
1489
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1490
+ };
1491
+ exports.useSitesSettingsAutoupdatesCore = useSitesSettingsAutoupdatesCore;
1492
+ /**
1493
+ * Enables theme autoupdates
1494
+ * @deprecated
1495
+ * @summary settings autoupdate theme enable
1496
+ */
1497
+ const sitesSettingsAutoupdatesTheme = (siteId, sitesSettingsAutoupdatesThemeBody, options) => {
1498
+ return axios.default.post(`/v1/sites/${siteId}/settings/autoupdates/theme`, sitesSettingsAutoupdatesThemeBody, options);
1499
+ };
1500
+ exports.sitesSettingsAutoupdatesTheme = sitesSettingsAutoupdatesTheme;
1501
+ const useSitesSettingsAutoupdatesTheme = (options) => {
1502
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1503
+ const mutationFn = (props) => {
1504
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1505
+ return (0, exports.sitesSettingsAutoupdatesTheme)(siteId, data, axiosOptions);
1506
+ };
1507
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1508
+ };
1509
+ exports.useSitesSettingsAutoupdatesTheme = useSitesSettingsAutoupdatesTheme;
1510
+ /**
1511
+ * Returns whether the coming soon setting is enable or disabled
1512
+ * @summary settings coming soon page status
1513
+ */
1514
+ const sitesSettingsComingSoon = (siteId, options) => {
1515
+ return axios.default.get(`/v1/sites/${siteId}/settings/coming-soon`, options);
1516
+ };
1517
+ exports.sitesSettingsComingSoon = sitesSettingsComingSoon;
1518
+ const getSitesSettingsComingSoonQueryKey = (siteId) => [`/v1/sites/${siteId}/settings/coming-soon`];
1519
+ exports.getSitesSettingsComingSoonQueryKey = getSitesSettingsComingSoonQueryKey;
1520
+ const useSitesSettingsComingSoon = (siteId, options) => {
1521
+ var _a;
1522
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1523
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSettingsComingSoonQueryKey)(siteId);
1524
+ const queryFn = ({ signal }) => (0, exports.sitesSettingsComingSoon)(siteId, Object.assign({ signal }, axiosOptions));
1525
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1526
+ return Object.assign({ queryKey }, query);
1527
+ };
1528
+ exports.useSitesSettingsComingSoon = useSitesSettingsComingSoon;
1529
+ /**
1530
+ * Enables/disables the coming soon (under-construction) page
1531
+ * @summary settings coming soon toggle
1532
+ */
1533
+ const sitesSettingsComingSoonToggle = (siteId, sitesSettingsComingSoonToggleBody, options) => {
1534
+ return axios.default.post(`/v1/sites/${siteId}/settings/coming-soon`, sitesSettingsComingSoonToggleBody, options);
1535
+ };
1536
+ exports.sitesSettingsComingSoonToggle = sitesSettingsComingSoonToggle;
1537
+ const useSitesSettingsComingSoonToggle = (options) => {
1538
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1539
+ const mutationFn = (props) => {
1540
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1541
+ return (0, exports.sitesSettingsComingSoonToggle)(siteId, data, axiosOptions);
1542
+ };
1543
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1544
+ };
1545
+ exports.useSitesSettingsComingSoonToggle = useSitesSettingsComingSoonToggle;
1546
+ /**
1547
+ * Returns the site's debug mode status
1548
+ * @summary settings debug status
1549
+ */
1550
+ const sitesSettingsDebug = (siteId, options) => {
1551
+ return axios.default.get(`/v1/sites/${siteId}/settings/debug`, options);
1552
+ };
1553
+ exports.sitesSettingsDebug = sitesSettingsDebug;
1554
+ const getSitesSettingsDebugQueryKey = (siteId) => [`/v1/sites/${siteId}/settings/debug`];
1555
+ exports.getSitesSettingsDebugQueryKey = getSitesSettingsDebugQueryKey;
1556
+ const useSitesSettingsDebug = (siteId, options) => {
1557
+ var _a;
1558
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1559
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSettingsDebugQueryKey)(siteId);
1560
+ const queryFn = ({ signal }) => (0, exports.sitesSettingsDebug)(siteId, Object.assign({ signal }, axiosOptions));
1561
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1562
+ return Object.assign({ queryKey }, query);
1563
+ };
1564
+ exports.useSitesSettingsDebug = useSitesSettingsDebug;
1565
+ /**
1566
+ * Enables or disables the output and display of site generated errors on the site
1567
+ * @summary settings debug toggle
1568
+ */
1569
+ const sitesSettingsDebugToggle = (siteId, sitesSettingsDebugToggleBody, options) => {
1570
+ return axios.default.post(`/v1/sites/${siteId}/settings/debug`, sitesSettingsDebugToggleBody, options);
1571
+ };
1572
+ exports.sitesSettingsDebugToggle = sitesSettingsDebugToggle;
1573
+ const useSitesSettingsDebugToggle = (options) => {
1574
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1575
+ const mutationFn = (props) => {
1576
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1577
+ return (0, exports.sitesSettingsDebugToggle)(siteId, data, axiosOptions);
1578
+ };
1579
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1580
+ };
1581
+ exports.useSitesSettingsDebugToggle = useSitesSettingsDebugToggle;
1582
+ /**
1583
+ * Updates the site's PHP version
1584
+ * @summary settings php version update
1585
+ */
1586
+ const sitesSettingsPhpVersionUpdate = (siteId, sitesSettingsPhpVersionUpdateBody, options) => {
1587
+ return axios.default.post(`/v1/sites/${siteId}/settings/php-version`, sitesSettingsPhpVersionUpdateBody, options);
1588
+ };
1589
+ exports.sitesSettingsPhpVersionUpdate = sitesSettingsPhpVersionUpdate;
1590
+ const useSitesSettingsPhpVersionUpdate = (options) => {
1591
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1592
+ const mutationFn = (props) => {
1593
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1594
+ return (0, exports.sitesSettingsPhpVersionUpdate)(siteId, data, axiosOptions);
1595
+ };
1596
+ return (0, react_query_1.useMutation)(mutationFn, mutationOptions);
1597
+ };
1598
+ exports.useSitesSettingsPhpVersionUpdate = useSitesSettingsPhpVersionUpdate;
1599
+ /**
1600
+ * Gets the list of PHP versions available/installed
1601
+ * @summary settings php versions list
1602
+ */
1603
+ const sitesSettingsPhpVersions = (siteId, options) => {
1604
+ return axios.default.get(`/v1/sites/${siteId}/settings/php-versions`, options);
1605
+ };
1606
+ exports.sitesSettingsPhpVersions = sitesSettingsPhpVersions;
1607
+ const getSitesSettingsPhpVersionsQueryKey = (siteId) => [`/v1/sites/${siteId}/settings/php-versions`];
1608
+ exports.getSitesSettingsPhpVersionsQueryKey = getSitesSettingsPhpVersionsQueryKey;
1609
+ const useSitesSettingsPhpVersions = (siteId, options) => {
1610
+ var _a;
1611
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1612
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSettingsPhpVersionsQueryKey)(siteId);
1613
+ const queryFn = ({ signal }) => (0, exports.sitesSettingsPhpVersions)(siteId, Object.assign({ signal }, axiosOptions));
1614
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1615
+ return Object.assign({ queryKey }, query);
1616
+ };
1617
+ exports.useSitesSettingsPhpVersions = useSitesSettingsPhpVersions;
1618
+ /**
1619
+ * Returns an SSO token or login URL for the site (if supported).
1620
+ * @summary sso
1621
+ */
1622
+ const sitesSso = (siteId, params, options) => {
1623
+ return axios.default.get(`/v1/sites/${siteId}/sso`, Object.assign({ params }, options));
1624
+ };
1625
+ exports.sitesSso = sitesSso;
1626
+ const getSitesSsoQueryKey = (siteId, params) => [`/v1/sites/${siteId}/sso`, ...(params ? [params] : [])];
1627
+ exports.getSitesSsoQueryKey = getSitesSsoQueryKey;
1628
+ const useSitesSso = (siteId, params, options) => {
1629
+ var _a;
1630
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1631
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesSsoQueryKey)(siteId, params);
1632
+ const queryFn = ({ signal }) => (0, exports.sitesSso)(siteId, params, Object.assign({ signal }, axiosOptions));
1633
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1634
+ return Object.assign({ queryKey }, query);
1635
+ };
1636
+ exports.useSitesSso = useSitesSso;
1637
+ /**
1638
+ * Returns a list of the site's users
1639
+ * @summary users
1640
+ */
1641
+ const siteUsers = (siteId, options) => {
1642
+ return axios.default.get(`/v1/sites/${siteId}/users`, options);
1643
+ };
1644
+ exports.siteUsers = siteUsers;
1645
+ const getSiteUsersQueryKey = (siteId) => [`/v1/sites/${siteId}/users`];
1646
+ exports.getSiteUsersQueryKey = getSiteUsersQueryKey;
1647
+ const useSiteUsers = (siteId, options) => {
1648
+ var _a;
1649
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1650
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSiteUsersQueryKey)(siteId);
1651
+ const queryFn = ({ signal }) => (0, exports.siteUsers)(siteId, Object.assign({ signal }, axiosOptions));
1652
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1653
+ return Object.assign({ queryKey }, query);
1654
+ };
1655
+ exports.useSiteUsers = useSiteUsers;
1656
+ /**
1657
+ * Returns site version information.
1658
+ * @summary version
1659
+ */
1660
+ const sitesVersion = (siteId, options) => {
1661
+ return axios.default.get(`/v1/sites/${siteId}/version`, options);
1662
+ };
1663
+ exports.sitesVersion = sitesVersion;
1664
+ const getSitesVersionQueryKey = (siteId) => [`/v1/sites/${siteId}/version`];
1665
+ exports.getSitesVersionQueryKey = getSitesVersionQueryKey;
1666
+ const useSitesVersion = (siteId, options) => {
1667
+ var _a;
1668
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1669
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSitesVersionQueryKey)(siteId);
1670
+ const queryFn = ({ signal }) => (0, exports.sitesVersion)(siteId, Object.assign({ signal }, axiosOptions));
1671
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(siteId) }, queryOptions));
1672
+ return Object.assign({ queryKey }, query);
1673
+ };
1674
+ exports.useSitesVersion = useSitesVersion;
1675
+ /**
1676
+ * Returns a list of sites.
1677
+ * @summary sites list v2
1678
+ */
1679
+ const hostingSitesV2 = (hostingId, options) => {
1680
+ return axios.default.get(`/v2/hosting/${hostingId}/sites`, options);
1681
+ };
1682
+ exports.hostingSitesV2 = hostingSitesV2;
1683
+ const getHostingSitesV2QueryKey = (hostingId) => [`/v2/hosting/${hostingId}/sites`];
1684
+ exports.getHostingSitesV2QueryKey = getHostingSitesV2QueryKey;
1685
+ const useHostingSitesV2 = (hostingId, options) => {
1686
+ var _a;
1687
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1688
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getHostingSitesV2QueryKey)(hostingId);
1689
+ const queryFn = ({ signal }) => (0, exports.hostingSitesV2)(hostingId, Object.assign({ signal }, axiosOptions));
1690
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
1691
+ return Object.assign({ queryKey }, query);
1692
+ };
1693
+ exports.useHostingSitesV2 = useHostingSitesV2;
1694
+ /**
1695
+ * List all SSH keys on a server or account. Finds all keys in user's .ssh/ diretory.
1696
+ * @summary ssh keys list
1697
+ */
1698
+ const sshKeyListV2 = (hostingId, options) => {
1699
+ return axios.default.get(`/v2/hosting/${hostingId}/ssh/keys`, options);
1700
+ };
1701
+ exports.sshKeyListV2 = sshKeyListV2;
1702
+ const getSshKeyListV2QueryKey = (hostingId) => [`/v2/hosting/${hostingId}/ssh/keys`];
1703
+ exports.getSshKeyListV2QueryKey = getSshKeyListV2QueryKey;
1704
+ const useSshKeyListV2 = (hostingId, options) => {
1705
+ var _a;
1706
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1707
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : (0, exports.getSshKeyListV2QueryKey)(hostingId);
1708
+ const queryFn = ({ signal }) => (0, exports.sshKeyListV2)(hostingId, Object.assign({ signal }, axiosOptions));
1709
+ const query = (0, react_query_1.useQuery)(queryKey, queryFn, Object.assign({ enabled: !!(hostingId) }, queryOptions));
1710
+ return Object.assign({ queryKey }, query);
1711
+ };
1712
+ exports.useSshKeyListV2 = useSshKeyListV2;