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