mtmsdk 0.0.35 → 0.0.38

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 (243) hide show
  1. package/dist/api_hatchet/client/client.gen.d.ts.map +1 -1
  2. package/dist/api_hatchet/client/client.gen.js +8 -1
  3. package/dist/api_hatchet/client/client.gen.js.map +1 -1
  4. package/dist/api_hatchet/index.d.ts +2 -2
  5. package/dist/api_hatchet/index.d.ts.map +1 -1
  6. package/dist/api_hatchet/index.js +2 -2
  7. package/dist/api_hatchet/index.js.map +1 -1
  8. package/dist/api_hatchet/zod.gen.d.ts +3 -3
  9. package/dist/api_hatchet/zod.gen.js +53 -53
  10. package/dist/api_hatchet/zod.gen.js.map +1 -1
  11. package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts +73 -979
  12. package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts.map +1 -1
  13. package/dist/gomtmapi_v2/@tanstack/react-query.gen.js +208 -1000
  14. package/dist/gomtmapi_v2/@tanstack/react-query.gen.js.map +1 -1
  15. package/dist/gomtmapi_v2/client/client.gen.d.ts.map +1 -1
  16. package/dist/gomtmapi_v2/client/client.gen.js +8 -1
  17. package/dist/gomtmapi_v2/client/client.gen.js.map +1 -1
  18. package/dist/gomtmapi_v2/index.d.ts +2 -2
  19. package/dist/gomtmapi_v2/index.d.ts.map +1 -1
  20. package/dist/gomtmapi_v2/index.js +1 -1
  21. package/dist/gomtmapi_v2/index.js.map +1 -1
  22. package/dist/gomtmapi_v2/schemas.gen.d.ts +305 -1415
  23. package/dist/gomtmapi_v2/schemas.gen.d.ts.map +1 -1
  24. package/dist/gomtmapi_v2/schemas.gen.js +282 -1407
  25. package/dist/gomtmapi_v2/schemas.gen.js.map +1 -1
  26. package/dist/gomtmapi_v2/sdk.gen.d.ts +63 -513
  27. package/dist/gomtmapi_v2/sdk.gen.d.ts.map +1 -1
  28. package/dist/gomtmapi_v2/sdk.gen.js +94 -537
  29. package/dist/gomtmapi_v2/sdk.gen.js.map +1 -1
  30. package/dist/gomtmapi_v2/types.gen.d.ts +443 -1531
  31. package/dist/gomtmapi_v2/types.gen.d.ts.map +1 -1
  32. package/dist/gomtmapi_v2/zod.gen.d.ts +293 -1292
  33. package/dist/gomtmapi_v2/zod.gen.d.ts.map +1 -1
  34. package/dist/gomtmapi_v2/zod.gen.js +187 -793
  35. package/dist/gomtmapi_v2/zod.gen.js.map +1 -1
  36. package/dist/mtgate_api/@tanstack/react-query.gen.d.ts +4 -158
  37. package/dist/mtgate_api/@tanstack/react-query.gen.d.ts.map +1 -1
  38. package/dist/mtgate_api/@tanstack/react-query.gen.js +17 -212
  39. package/dist/mtgate_api/@tanstack/react-query.gen.js.map +1 -1
  40. package/dist/mtgate_api/client/client.gen.d.ts.map +1 -1
  41. package/dist/mtgate_api/client/client.gen.js +8 -1
  42. package/dist/mtgate_api/client/client.gen.js.map +1 -1
  43. package/dist/mtgate_api/index.d.ts +2 -2
  44. package/dist/mtgate_api/index.d.ts.map +1 -1
  45. package/dist/mtgate_api/index.js +1 -1
  46. package/dist/mtgate_api/index.js.map +1 -1
  47. package/dist/mtgate_api/schemas.gen.d.ts +0 -396
  48. package/dist/mtgate_api/schemas.gen.d.ts.map +1 -1
  49. package/dist/mtgate_api/schemas.gen.js +0 -439
  50. package/dist/mtgate_api/schemas.gen.js.map +1 -1
  51. package/dist/mtgate_api/sdk.gen.d.ts +1 -26
  52. package/dist/mtgate_api/sdk.gen.d.ts.map +1 -1
  53. package/dist/mtgate_api/sdk.gen.js +0 -67
  54. package/dist/mtgate_api/sdk.gen.js.map +1 -1
  55. package/dist/mtgate_api/types.gen.d.ts +0 -310
  56. package/dist/mtgate_api/types.gen.d.ts.map +1 -1
  57. package/dist/mtgate_api/zod.gen.d.ts +0 -771
  58. package/dist/mtgate_api/zod.gen.d.ts.map +1 -1
  59. package/dist/mtgate_api/zod.gen.js +0 -249
  60. package/dist/mtgate_api/zod.gen.js.map +1 -1
  61. package/dist/mtmai_api/client/client.gen.d.ts.map +1 -1
  62. package/dist/mtmai_api/client/client.gen.js +8 -1
  63. package/dist/mtmai_api/client/client.gen.js.map +1 -1
  64. package/dist/mtmai_api/index.d.ts +2 -2
  65. package/dist/mtmai_api/index.d.ts.map +1 -1
  66. package/dist/mtmai_api/index.js +2 -2
  67. package/dist/mtmai_api/index.js.map +1 -1
  68. package/dist/opencode/@tanstack/react-query.gen.d.ts +1903 -0
  69. package/dist/opencode/@tanstack/react-query.gen.d.ts.map +1 -0
  70. package/dist/opencode/@tanstack/react-query.gen.js +1696 -0
  71. package/dist/opencode/@tanstack/react-query.gen.js.map +1 -0
  72. package/dist/opencode/client/client.gen.d.ts +3 -0
  73. package/dist/opencode/client/client.gen.d.ts.map +1 -0
  74. package/dist/opencode/client/client.gen.js +236 -0
  75. package/dist/opencode/client/client.gen.js.map +1 -0
  76. package/dist/opencode/client/index.d.ts +9 -0
  77. package/dist/opencode/client/index.d.ts.map +1 -0
  78. package/dist/opencode/client/index.js +7 -0
  79. package/dist/opencode/client/index.js.map +1 -0
  80. package/dist/opencode/client/types.gen.d.ts +118 -0
  81. package/dist/opencode/client/types.gen.d.ts.map +1 -0
  82. package/dist/opencode/client/types.gen.js +3 -0
  83. package/dist/opencode/client/types.gen.js.map +1 -0
  84. package/dist/opencode/client/utils.gen.d.ts +34 -0
  85. package/dist/opencode/client/utils.gen.d.ts.map +1 -0
  86. package/dist/opencode/client/utils.gen.js +232 -0
  87. package/dist/opencode/client/utils.gen.js.map +1 -0
  88. package/dist/opencode/client.gen.d.ts +13 -0
  89. package/dist/opencode/client.gen.d.ts.map +1 -0
  90. package/dist/opencode/client.gen.js +4 -0
  91. package/dist/opencode/client.gen.js.map +1 -0
  92. package/dist/opencode/core/auth.gen.d.ts +19 -0
  93. package/dist/opencode/core/auth.gen.d.ts.map +1 -0
  94. package/dist/opencode/core/auth.gen.js +15 -0
  95. package/dist/opencode/core/auth.gen.js.map +1 -0
  96. package/dist/opencode/core/bodySerializer.gen.d.ts +26 -0
  97. package/dist/opencode/core/bodySerializer.gen.d.ts.map +1 -0
  98. package/dist/opencode/core/bodySerializer.gen.js +58 -0
  99. package/dist/opencode/core/bodySerializer.gen.js.map +1 -0
  100. package/dist/opencode/core/params.gen.d.ts +44 -0
  101. package/dist/opencode/core/params.gen.d.ts.map +1 -0
  102. package/dist/opencode/core/params.gen.js +101 -0
  103. package/dist/opencode/core/params.gen.js.map +1 -0
  104. package/dist/opencode/core/pathSerializer.gen.d.ts +34 -0
  105. package/dist/opencode/core/pathSerializer.gen.d.ts.map +1 -0
  106. package/dist/opencode/core/pathSerializer.gen.js +115 -0
  107. package/dist/opencode/core/pathSerializer.gen.js.map +1 -0
  108. package/dist/opencode/core/queryKeySerializer.gen.d.ts +19 -0
  109. package/dist/opencode/core/queryKeySerializer.gen.d.ts.map +1 -0
  110. package/dist/opencode/core/queryKeySerializer.gen.js +100 -0
  111. package/dist/opencode/core/queryKeySerializer.gen.js.map +1 -0
  112. package/dist/opencode/core/serverSentEvents.gen.d.ts +72 -0
  113. package/dist/opencode/core/serverSentEvents.gen.d.ts.map +1 -0
  114. package/dist/opencode/core/serverSentEvents.gen.js +138 -0
  115. package/dist/opencode/core/serverSentEvents.gen.js.map +1 -0
  116. package/dist/opencode/core/types.gen.d.ts +79 -0
  117. package/dist/opencode/core/types.gen.d.ts.map +1 -0
  118. package/dist/opencode/core/types.gen.js +3 -0
  119. package/dist/opencode/core/types.gen.js.map +1 -0
  120. package/dist/opencode/core/utils.gen.d.ts +20 -0
  121. package/dist/opencode/core/utils.gen.d.ts.map +1 -0
  122. package/dist/opencode/core/utils.gen.js +88 -0
  123. package/dist/opencode/core/utils.gen.js.map +1 -0
  124. package/dist/opencode/index.d.ts +3 -0
  125. package/dist/opencode/index.d.ts.map +1 -0
  126. package/dist/opencode/index.js +4 -0
  127. package/dist/opencode/index.js.map +1 -0
  128. package/dist/opencode/schemas.gen.d.ts +4823 -0
  129. package/dist/opencode/schemas.gen.d.ts.map +1 -0
  130. package/dist/opencode/schemas.gen.js +5816 -0
  131. package/dist/opencode/schemas.gen.js.map +1 -0
  132. package/dist/opencode/sdk.gen.d.ts +562 -0
  133. package/dist/opencode/sdk.gen.d.ts.map +1 -0
  134. package/dist/opencode/sdk.gen.js +766 -0
  135. package/dist/opencode/sdk.gen.js.map +1 -0
  136. package/dist/opencode/types.gen.d.ts +4213 -0
  137. package/dist/opencode/types.gen.d.ts.map +1 -0
  138. package/dist/opencode/types.gen.js +25 -0
  139. package/dist/opencode/types.gen.js.map +1 -0
  140. package/dist/opencode/zod.gen.d.ts +17243 -0
  141. package/dist/opencode/zod.gen.d.ts.map +1 -0
  142. package/dist/opencode/zod.gen.js +2876 -0
  143. package/dist/opencode/zod.gen.js.map +1 -0
  144. package/dist/sbapi/client/client.gen.d.ts.map +1 -1
  145. package/dist/sbapi/client/client.gen.js +8 -1
  146. package/dist/sbapi/client/client.gen.js.map +1 -1
  147. package/dist/sbapi/index.d.ts +2 -2
  148. package/dist/sbapi/index.d.ts.map +1 -1
  149. package/dist/sbapi/index.js +1 -1
  150. package/dist/sbapi/index.js.map +1 -1
  151. package/dist/sbmng/@tanstack/react-query.gen.d.ts +2418 -0
  152. package/dist/sbmng/@tanstack/react-query.gen.d.ts.map +1 -0
  153. package/dist/sbmng/@tanstack/react-query.gen.js +2657 -0
  154. package/dist/sbmng/@tanstack/react-query.gen.js.map +1 -0
  155. package/dist/sbmng/client/client.gen.d.ts +3 -0
  156. package/dist/sbmng/client/client.gen.d.ts.map +1 -0
  157. package/dist/sbmng/client/client.gen.js +236 -0
  158. package/dist/sbmng/client/client.gen.js.map +1 -0
  159. package/dist/sbmng/client/index.d.ts +9 -0
  160. package/dist/sbmng/client/index.d.ts.map +1 -0
  161. package/dist/sbmng/client/index.js +7 -0
  162. package/dist/sbmng/client/index.js.map +1 -0
  163. package/dist/sbmng/client/types.gen.d.ts +118 -0
  164. package/dist/sbmng/client/types.gen.d.ts.map +1 -0
  165. package/dist/sbmng/client/types.gen.js +3 -0
  166. package/dist/sbmng/client/types.gen.js.map +1 -0
  167. package/dist/sbmng/client/utils.gen.d.ts +34 -0
  168. package/dist/sbmng/client/utils.gen.d.ts.map +1 -0
  169. package/dist/sbmng/client/utils.gen.js +232 -0
  170. package/dist/sbmng/client/utils.gen.js.map +1 -0
  171. package/dist/sbmng/client.gen.d.ts +13 -0
  172. package/dist/sbmng/client.gen.d.ts.map +1 -0
  173. package/dist/sbmng/client.gen.js +4 -0
  174. package/dist/sbmng/client.gen.js.map +1 -0
  175. package/dist/sbmng/core/auth.gen.d.ts +19 -0
  176. package/dist/sbmng/core/auth.gen.d.ts.map +1 -0
  177. package/dist/sbmng/core/auth.gen.js +15 -0
  178. package/dist/sbmng/core/auth.gen.js.map +1 -0
  179. package/dist/sbmng/core/bodySerializer.gen.d.ts +26 -0
  180. package/dist/sbmng/core/bodySerializer.gen.d.ts.map +1 -0
  181. package/dist/sbmng/core/bodySerializer.gen.js +58 -0
  182. package/dist/sbmng/core/bodySerializer.gen.js.map +1 -0
  183. package/dist/sbmng/core/params.gen.d.ts +44 -0
  184. package/dist/sbmng/core/params.gen.d.ts.map +1 -0
  185. package/dist/sbmng/core/params.gen.js +101 -0
  186. package/dist/sbmng/core/params.gen.js.map +1 -0
  187. package/dist/sbmng/core/pathSerializer.gen.d.ts +34 -0
  188. package/dist/sbmng/core/pathSerializer.gen.d.ts.map +1 -0
  189. package/dist/sbmng/core/pathSerializer.gen.js +115 -0
  190. package/dist/sbmng/core/pathSerializer.gen.js.map +1 -0
  191. package/dist/sbmng/core/queryKeySerializer.gen.d.ts +19 -0
  192. package/dist/sbmng/core/queryKeySerializer.gen.d.ts.map +1 -0
  193. package/dist/sbmng/core/queryKeySerializer.gen.js +100 -0
  194. package/dist/sbmng/core/queryKeySerializer.gen.js.map +1 -0
  195. package/dist/sbmng/core/serverSentEvents.gen.d.ts +72 -0
  196. package/dist/sbmng/core/serverSentEvents.gen.d.ts.map +1 -0
  197. package/dist/sbmng/core/serverSentEvents.gen.js +138 -0
  198. package/dist/sbmng/core/serverSentEvents.gen.js.map +1 -0
  199. package/dist/sbmng/core/types.gen.d.ts +79 -0
  200. package/dist/sbmng/core/types.gen.d.ts.map +1 -0
  201. package/dist/sbmng/core/types.gen.js +3 -0
  202. package/dist/sbmng/core/types.gen.js.map +1 -0
  203. package/dist/sbmng/core/utils.gen.d.ts +20 -0
  204. package/dist/sbmng/core/utils.gen.d.ts.map +1 -0
  205. package/dist/sbmng/core/utils.gen.js +88 -0
  206. package/dist/sbmng/core/utils.gen.js.map +1 -0
  207. package/dist/sbmng/index.d.ts +3 -0
  208. package/dist/sbmng/index.d.ts.map +1 -0
  209. package/dist/sbmng/index.js +3 -0
  210. package/dist/sbmng/index.js.map +1 -0
  211. package/dist/sbmng/schemas.gen.d.ts +7220 -0
  212. package/dist/sbmng/schemas.gen.d.ts.map +1 -0
  213. package/dist/sbmng/schemas.gen.js +9392 -0
  214. package/dist/sbmng/schemas.gen.js.map +1 -0
  215. package/dist/sbmng/sdk.gen.d.ts +743 -0
  216. package/dist/sbmng/sdk.gen.d.ts.map +1 -0
  217. package/dist/sbmng/sdk.gen.js +1543 -0
  218. package/dist/sbmng/sdk.gen.js.map +1 -0
  219. package/dist/sbmng/types.gen.d.ts +7003 -0
  220. package/dist/sbmng/types.gen.d.ts.map +1 -0
  221. package/dist/sbmng/types.gen.js +3 -0
  222. package/dist/sbmng/types.gen.js.map +1 -0
  223. package/dist/supabase/context.d.ts +14 -0
  224. package/dist/supabase/context.d.ts.map +1 -0
  225. package/dist/supabase/context.js +33 -0
  226. package/dist/supabase/context.js.map +1 -0
  227. package/dist/supabase/supabase-client.d.ts +1625 -304
  228. package/dist/supabase/supabase-client.d.ts.map +1 -1
  229. package/dist/supabase/supabase.d.ts +3551 -909
  230. package/dist/supabase/supabase.d.ts.map +1 -1
  231. package/dist/supabase/supabase.js +1 -34
  232. package/dist/supabase/supabase.js.map +1 -1
  233. package/dist/types/database.types.d.ts +1656 -314
  234. package/dist/types/database.types.d.ts.map +1 -1
  235. package/dist/types/database.types.js +3 -1
  236. package/dist/types/database.types.js.map +1 -1
  237. package/dist/types/index.d.ts +30 -1
  238. package/dist/types/index.d.ts.map +1 -1
  239. package/package.json +45 -42
  240. package/dist/supabase/supabase-browser.d.ts +0 -4
  241. package/dist/supabase/supabase-browser.d.ts.map +0 -1
  242. package/dist/supabase/supabase-browser.js +0 -20
  243. package/dist/supabase/supabase-browser.js.map +0 -1
@@ -0,0 +1,2657 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
3
+ import { client } from '../client.gen';
4
+ import { v1ActivateCustomHostname, v1ActivateVanitySubdomainConfig, v1ApplyAMigration, v1ApplyProjectAddon, v1AuthorizeJitAccess, v1AuthorizeUser, v1BulkCreateSecrets, v1BulkDeleteSecrets, v1BulkUpdateFunctions, v1CancelAProjectRestoration, v1CheckVanitySubdomainAvailability, v1ClaimProjectForOrganization, v1CreateABranch, v1CreateAFunction, v1CreateAnOrganization, v1CreateAProject, v1CreateASsoProvider, v1CreateLegacySigningKey, v1CreateLoginRole, v1CreateProjectApiKey, v1CreateProjectClaimToken, v1CreateProjectSigningKey, v1CreateProjectTpaIntegration, v1CreateRestorePoint, v1DeactivateVanitySubdomainConfig, v1DeleteABranch, v1DeleteAFunction, v1DeleteAProject, v1DeleteASsoProvider, v1DeleteHostnameConfig, v1DeleteJitAccess, v1DeleteLoginRoles, v1DeleteNetworkBans, v1DeleteProjectApiKey, v1DeleteProjectClaimToken, v1DeleteProjectTpaIntegration, v1DeployAFunction, v1DiffABranch, v1DisablePreviewBranching, v1DisableReadonlyModeTemporarily, v1EnableDatabaseWebhook, v1ExchangeOauthToken, v1GenerateTypescriptTypes, v1GetABranch, v1GetABranchConfig, v1GetActionRun, v1GetActionRunLogs, v1GetAFunction, v1GetAFunctionBody, v1GetAllProjectsForOrganization, v1GetAMigration, v1GetAnOrganization, v1GetASnippet, v1GetASsoProvider, v1GetAuthServiceConfig, v1GetAvailableRegions, v1GetDatabaseMetadata, v1GetHostnameConfig, v1GetJitAccess, v1GetLegacySigningKey, v1GetNetworkRestrictions, v1GetOrganizationProjectClaim, v1GetPerformanceAdvisors, v1GetPgsodiumConfig, v1GetPoolerConfig, v1GetPostgresConfig, v1GetPostgrestServiceConfig, v1GetPostgresUpgradeEligibility, v1GetPostgresUpgradeStatus, v1GetProject, v1GetProjectApiKey, v1GetProjectApiKeys, v1GetProjectClaimToken, v1GetProjectFunctionCombinedStats, v1GetProjectLegacyApiKeys, v1GetProjectLogs, v1GetProjectPgbouncerConfig, v1GetProjectSigningKey, v1GetProjectSigningKeys, v1GetProjectTpaIntegration, v1GetProjectUsageApiCount, v1GetProjectUsageRequestCount, v1GetReadonlyModeStatus, v1GetRealtimeConfig, v1GetRestorePoint, v1GetSecurityAdvisors, v1GetServicesHealth, v1GetSslEnforcementConfig, v1GetStorageConfig, v1GetVanitySubdomainConfig, v1ListActionRuns, v1ListAllBackups, v1ListAllBranches, v1ListAllBuckets, v1ListAllFunctions, v1ListAllNetworkBans, v1ListAllNetworkBansEnriched, v1ListAllOrganizations, v1ListAllProjects, v1ListAllSecrets, v1ListAllSnippets, v1ListAllSsoProvider, v1ListAvailableRestoreVersions, v1ListJitAccess, v1ListMigrationHistory, v1ListOrganizationMembers, v1ListProjectAddons, v1ListProjectTpaIntegrations, v1MergeABranch, v1OauthAuthorizeProjectClaim, v1PatchAMigration, v1PatchNetworkRestrictions, v1PauseAProject, v1PushABranch, v1ReadOnlyQuery, v1RemoveAReadReplica, v1RemoveProjectAddon, v1RemoveProjectSigningKey, v1ResetABranch, v1RestoreABranch, v1RestoreAProject, v1RestorePitrBackup, v1RevokeToken, v1RollbackMigrations, v1RunAQuery, v1SetupAReadReplica, v1Undo, v1UpdateABranchConfig, v1UpdateActionRunStatus, v1UpdateAFunction, v1UpdateAProject, v1UpdateASsoProvider, v1UpdateAuthServiceConfig, v1UpdateDatabasePassword, v1UpdateHostnameConfig, v1UpdateJitAccess, v1UpdateNetworkRestrictions, v1UpdatePgsodiumConfig, v1UpdatePoolerConfig, v1UpdatePostgresConfig, v1UpdatePostgrestServiceConfig, v1UpdateProjectApiKey, v1UpdateProjectLegacyApiKeys, v1UpdateProjectSigningKey, v1UpdateRealtimeConfig, v1UpdateSslEnforcementConfig, v1UpdateStorageConfig, v1UpgradePostgresVersion, v1UpsertAMigration, v1VerifyDnsConfig } from '../sdk.gen';
5
+ /**
6
+ * Delete a database branch
7
+ *
8
+ * Deletes the specified database branch. By default, deletes immediately. Use force=false to schedule deletion with 1-hour grace period (only when soft deletion is enabled).
9
+ */
10
+ export const v1DeleteABranchMutation = (options) => {
11
+ const mutationOptions = {
12
+ mutationFn: async (fnOptions) => {
13
+ const { data } = await v1DeleteABranch({
14
+ ...options,
15
+ ...fnOptions,
16
+ throwOnError: true
17
+ });
18
+ return data;
19
+ }
20
+ };
21
+ return mutationOptions;
22
+ };
23
+ const createQueryKey = (id, options, infinite, tags) => {
24
+ const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
25
+ if (infinite) {
26
+ params._infinite = infinite;
27
+ }
28
+ if (tags) {
29
+ params.tags = tags;
30
+ }
31
+ if (options?.body) {
32
+ params.body = options.body;
33
+ }
34
+ if (options?.headers) {
35
+ params.headers = options.headers;
36
+ }
37
+ if (options?.path) {
38
+ params.path = options.path;
39
+ }
40
+ if (options?.query) {
41
+ params.query = options.query;
42
+ }
43
+ return [params];
44
+ };
45
+ export const v1GetABranchConfigQueryKey = (options) => createQueryKey('v1GetABranchConfig', options);
46
+ /**
47
+ * Get database branch config
48
+ *
49
+ * Fetches configurations of the specified database branch
50
+ */
51
+ export const v1GetABranchConfigOptions = (options) => queryOptions({
52
+ queryFn: async ({ queryKey, signal }) => {
53
+ const { data } = await v1GetABranchConfig({
54
+ ...options,
55
+ ...queryKey[0],
56
+ signal,
57
+ throwOnError: true
58
+ });
59
+ return data;
60
+ },
61
+ queryKey: v1GetABranchConfigQueryKey(options)
62
+ });
63
+ /**
64
+ * Update database branch config
65
+ *
66
+ * Updates the configuration of the specified database branch
67
+ */
68
+ export const v1UpdateABranchConfigMutation = (options) => {
69
+ const mutationOptions = {
70
+ mutationFn: async (fnOptions) => {
71
+ const { data } = await v1UpdateABranchConfig({
72
+ ...options,
73
+ ...fnOptions,
74
+ throwOnError: true
75
+ });
76
+ return data;
77
+ }
78
+ };
79
+ return mutationOptions;
80
+ };
81
+ /**
82
+ * Pushes a database branch
83
+ *
84
+ * Pushes the specified database branch
85
+ */
86
+ export const v1PushABranchMutation = (options) => {
87
+ const mutationOptions = {
88
+ mutationFn: async (fnOptions) => {
89
+ const { data } = await v1PushABranch({
90
+ ...options,
91
+ ...fnOptions,
92
+ throwOnError: true
93
+ });
94
+ return data;
95
+ }
96
+ };
97
+ return mutationOptions;
98
+ };
99
+ /**
100
+ * Merges a database branch
101
+ *
102
+ * Merges the specified database branch
103
+ */
104
+ export const v1MergeABranchMutation = (options) => {
105
+ const mutationOptions = {
106
+ mutationFn: async (fnOptions) => {
107
+ const { data } = await v1MergeABranch({
108
+ ...options,
109
+ ...fnOptions,
110
+ throwOnError: true
111
+ });
112
+ return data;
113
+ }
114
+ };
115
+ return mutationOptions;
116
+ };
117
+ /**
118
+ * Resets a database branch
119
+ *
120
+ * Resets the specified database branch
121
+ */
122
+ export const v1ResetABranchMutation = (options) => {
123
+ const mutationOptions = {
124
+ mutationFn: async (fnOptions) => {
125
+ const { data } = await v1ResetABranch({
126
+ ...options,
127
+ ...fnOptions,
128
+ throwOnError: true
129
+ });
130
+ return data;
131
+ }
132
+ };
133
+ return mutationOptions;
134
+ };
135
+ /**
136
+ * Restore a scheduled branch deletion
137
+ *
138
+ * Cancels scheduled deletion and restores the branch to active state
139
+ */
140
+ export const v1RestoreABranchMutation = (options) => {
141
+ const mutationOptions = {
142
+ mutationFn: async (fnOptions) => {
143
+ const { data } = await v1RestoreABranch({
144
+ ...options,
145
+ ...fnOptions,
146
+ throwOnError: true
147
+ });
148
+ return data;
149
+ }
150
+ };
151
+ return mutationOptions;
152
+ };
153
+ export const v1DiffABranchQueryKey = (options) => createQueryKey('v1DiffABranch', options);
154
+ /**
155
+ * [Beta] Diffs a database branch
156
+ *
157
+ * Diffs the specified database branch
158
+ */
159
+ export const v1DiffABranchOptions = (options) => queryOptions({
160
+ queryFn: async ({ queryKey, signal }) => {
161
+ const { data } = await v1DiffABranch({
162
+ ...options,
163
+ ...queryKey[0],
164
+ signal,
165
+ throwOnError: true
166
+ });
167
+ return data;
168
+ },
169
+ queryKey: v1DiffABranchQueryKey(options)
170
+ });
171
+ export const v1ListAllProjectsQueryKey = (options) => createQueryKey('v1ListAllProjects', options);
172
+ /**
173
+ * List all projects
174
+ *
175
+ * Returns a list of all projects you've previously created.
176
+ *
177
+ * Use `/v1/organizations/{slug}/projects` instead when possible to get more precise results and pagination support.
178
+ */
179
+ export const v1ListAllProjectsOptions = (options) => queryOptions({
180
+ queryFn: async ({ queryKey, signal }) => {
181
+ const { data } = await v1ListAllProjects({
182
+ ...options,
183
+ ...queryKey[0],
184
+ signal,
185
+ throwOnError: true
186
+ });
187
+ return data;
188
+ },
189
+ queryKey: v1ListAllProjectsQueryKey(options)
190
+ });
191
+ /**
192
+ * Create a project
193
+ */
194
+ export const v1CreateAProjectMutation = (options) => {
195
+ const mutationOptions = {
196
+ mutationFn: async (fnOptions) => {
197
+ const { data } = await v1CreateAProject({
198
+ ...options,
199
+ ...fnOptions,
200
+ throwOnError: true
201
+ });
202
+ return data;
203
+ }
204
+ };
205
+ return mutationOptions;
206
+ };
207
+ export const v1GetAvailableRegionsQueryKey = (options) => createQueryKey('v1GetAvailableRegions', options);
208
+ /**
209
+ * [Beta] Gets the list of available regions that can be used for a new project
210
+ */
211
+ export const v1GetAvailableRegionsOptions = (options) => queryOptions({
212
+ queryFn: async ({ queryKey, signal }) => {
213
+ const { data } = await v1GetAvailableRegions({
214
+ ...options,
215
+ ...queryKey[0],
216
+ signal,
217
+ throwOnError: true
218
+ });
219
+ return data;
220
+ },
221
+ queryKey: v1GetAvailableRegionsQueryKey(options)
222
+ });
223
+ export const v1ListAllOrganizationsQueryKey = (options) => createQueryKey('v1ListAllOrganizations', options);
224
+ /**
225
+ * List all organizations
226
+ *
227
+ * Returns a list of organizations that you currently belong to.
228
+ */
229
+ export const v1ListAllOrganizationsOptions = (options) => queryOptions({
230
+ queryFn: async ({ queryKey, signal }) => {
231
+ const { data } = await v1ListAllOrganizations({
232
+ ...options,
233
+ ...queryKey[0],
234
+ signal,
235
+ throwOnError: true
236
+ });
237
+ return data;
238
+ },
239
+ queryKey: v1ListAllOrganizationsQueryKey(options)
240
+ });
241
+ /**
242
+ * Create an organization
243
+ */
244
+ export const v1CreateAnOrganizationMutation = (options) => {
245
+ const mutationOptions = {
246
+ mutationFn: async (fnOptions) => {
247
+ const { data } = await v1CreateAnOrganization({
248
+ ...options,
249
+ ...fnOptions,
250
+ throwOnError: true
251
+ });
252
+ return data;
253
+ }
254
+ };
255
+ return mutationOptions;
256
+ };
257
+ export const v1AuthorizeUserQueryKey = (options) => createQueryKey('v1AuthorizeUser', options);
258
+ /**
259
+ * [Beta] Authorize user through oauth
260
+ */
261
+ export const v1AuthorizeUserOptions = (options) => queryOptions({
262
+ queryFn: async ({ queryKey, signal }) => {
263
+ const { data } = await v1AuthorizeUser({
264
+ ...options,
265
+ ...queryKey[0],
266
+ signal,
267
+ throwOnError: true
268
+ });
269
+ return data;
270
+ },
271
+ queryKey: v1AuthorizeUserQueryKey(options)
272
+ });
273
+ /**
274
+ * [Beta] Exchange auth code for user's access and refresh token
275
+ */
276
+ export const v1ExchangeOauthTokenMutation = (options) => {
277
+ const mutationOptions = {
278
+ mutationFn: async (fnOptions) => {
279
+ const { data } = await v1ExchangeOauthToken({
280
+ ...options,
281
+ ...fnOptions,
282
+ throwOnError: true
283
+ });
284
+ return data;
285
+ }
286
+ };
287
+ return mutationOptions;
288
+ };
289
+ /**
290
+ * [Beta] Revoke oauth app authorization and it's corresponding tokens
291
+ */
292
+ export const v1RevokeTokenMutation = (options) => {
293
+ const mutationOptions = {
294
+ mutationFn: async (fnOptions) => {
295
+ const { data } = await v1RevokeToken({
296
+ ...options,
297
+ ...fnOptions,
298
+ throwOnError: true
299
+ });
300
+ return data;
301
+ }
302
+ };
303
+ return mutationOptions;
304
+ };
305
+ export const v1OauthAuthorizeProjectClaimQueryKey = (options) => createQueryKey('v1OauthAuthorizeProjectClaim', options);
306
+ /**
307
+ * Authorize user through oauth and claim a project
308
+ *
309
+ * Initiates the OAuth authorization flow for the specified provider. After successful authentication, the user can claim ownership of the specified project.
310
+ */
311
+ export const v1OauthAuthorizeProjectClaimOptions = (options) => queryOptions({
312
+ queryFn: async ({ queryKey, signal }) => {
313
+ const { data } = await v1OauthAuthorizeProjectClaim({
314
+ ...options,
315
+ ...queryKey[0],
316
+ signal,
317
+ throwOnError: true
318
+ });
319
+ return data;
320
+ },
321
+ queryKey: v1OauthAuthorizeProjectClaimQueryKey(options)
322
+ });
323
+ export const v1ListAllSnippetsQueryKey = (options) => createQueryKey('v1ListAllSnippets', options);
324
+ /**
325
+ * Lists SQL snippets for the logged in user
326
+ */
327
+ export const v1ListAllSnippetsOptions = (options) => queryOptions({
328
+ queryFn: async ({ queryKey, signal }) => {
329
+ const { data } = await v1ListAllSnippets({
330
+ ...options,
331
+ ...queryKey[0],
332
+ signal,
333
+ throwOnError: true
334
+ });
335
+ return data;
336
+ },
337
+ queryKey: v1ListAllSnippetsQueryKey(options)
338
+ });
339
+ const createInfiniteParams = (queryKey, page) => {
340
+ const params = { ...queryKey[0] };
341
+ if (page.body) {
342
+ params.body = {
343
+ ...queryKey[0].body,
344
+ ...page.body
345
+ };
346
+ }
347
+ if (page.headers) {
348
+ params.headers = {
349
+ ...queryKey[0].headers,
350
+ ...page.headers
351
+ };
352
+ }
353
+ if (page.path) {
354
+ params.path = {
355
+ ...queryKey[0].path,
356
+ ...page.path
357
+ };
358
+ }
359
+ if (page.query) {
360
+ params.query = {
361
+ ...queryKey[0].query,
362
+ ...page.query
363
+ };
364
+ }
365
+ return params;
366
+ };
367
+ export const v1ListAllSnippetsInfiniteQueryKey = (options) => createQueryKey('v1ListAllSnippets', options, true);
368
+ /**
369
+ * Lists SQL snippets for the logged in user
370
+ */
371
+ export const v1ListAllSnippetsInfiniteOptions = (options) => infiniteQueryOptions(
372
+ // @ts-ignore
373
+ {
374
+ queryFn: async ({ pageParam, queryKey, signal }) => {
375
+ // @ts-ignore
376
+ const page = typeof pageParam === 'object' ? pageParam : {
377
+ query: {
378
+ cursor: pageParam
379
+ }
380
+ };
381
+ const params = createInfiniteParams(queryKey, page);
382
+ const { data } = await v1ListAllSnippets({
383
+ ...options,
384
+ ...params,
385
+ signal,
386
+ throwOnError: true
387
+ });
388
+ return data;
389
+ },
390
+ queryKey: v1ListAllSnippetsInfiniteQueryKey(options)
391
+ });
392
+ export const v1GetASnippetQueryKey = (options) => createQueryKey('v1GetASnippet', options);
393
+ /**
394
+ * Gets a specific SQL snippet
395
+ */
396
+ export const v1GetASnippetOptions = (options) => queryOptions({
397
+ queryFn: async ({ queryKey, signal }) => {
398
+ const { data } = await v1GetASnippet({
399
+ ...options,
400
+ ...queryKey[0],
401
+ signal,
402
+ throwOnError: true
403
+ });
404
+ return data;
405
+ },
406
+ queryKey: v1GetASnippetQueryKey(options)
407
+ });
408
+ export const v1ListActionRunsQueryKey = (options) => createQueryKey('v1ListActionRuns', options);
409
+ /**
410
+ * List all action runs
411
+ *
412
+ * Returns a paginated list of action runs of the specified project.
413
+ */
414
+ export const v1ListActionRunsOptions = (options) => queryOptions({
415
+ queryFn: async ({ queryKey, signal }) => {
416
+ const { data } = await v1ListActionRuns({
417
+ ...options,
418
+ ...queryKey[0],
419
+ signal,
420
+ throwOnError: true
421
+ });
422
+ return data;
423
+ },
424
+ queryKey: v1ListActionRunsQueryKey(options)
425
+ });
426
+ export const v1ListActionRunsInfiniteQueryKey = (options) => createQueryKey('v1ListActionRuns', options, true);
427
+ /**
428
+ * List all action runs
429
+ *
430
+ * Returns a paginated list of action runs of the specified project.
431
+ */
432
+ export const v1ListActionRunsInfiniteOptions = (options) => infiniteQueryOptions(
433
+ // @ts-ignore
434
+ {
435
+ queryFn: async ({ pageParam, queryKey, signal }) => {
436
+ // @ts-ignore
437
+ const page = typeof pageParam === 'object' ? pageParam : {
438
+ query: {
439
+ offset: pageParam
440
+ }
441
+ };
442
+ const params = createInfiniteParams(queryKey, page);
443
+ const { data } = await v1ListActionRuns({
444
+ ...options,
445
+ ...params,
446
+ signal,
447
+ throwOnError: true
448
+ });
449
+ return data;
450
+ },
451
+ queryKey: v1ListActionRunsInfiniteQueryKey(options)
452
+ });
453
+ export const v1GetActionRunQueryKey = (options) => createQueryKey('v1GetActionRun', options);
454
+ /**
455
+ * Get the status of an action run
456
+ *
457
+ * Returns the current status of the specified action run.
458
+ */
459
+ export const v1GetActionRunOptions = (options) => queryOptions({
460
+ queryFn: async ({ queryKey, signal }) => {
461
+ const { data } = await v1GetActionRun({
462
+ ...options,
463
+ ...queryKey[0],
464
+ signal,
465
+ throwOnError: true
466
+ });
467
+ return data;
468
+ },
469
+ queryKey: v1GetActionRunQueryKey(options)
470
+ });
471
+ /**
472
+ * Update the status of an action run
473
+ *
474
+ * Updates the status of an ongoing action run.
475
+ */
476
+ export const v1UpdateActionRunStatusMutation = (options) => {
477
+ const mutationOptions = {
478
+ mutationFn: async (fnOptions) => {
479
+ const { data } = await v1UpdateActionRunStatus({
480
+ ...options,
481
+ ...fnOptions,
482
+ throwOnError: true
483
+ });
484
+ return data;
485
+ }
486
+ };
487
+ return mutationOptions;
488
+ };
489
+ export const v1GetActionRunLogsQueryKey = (options) => createQueryKey('v1GetActionRunLogs', options);
490
+ /**
491
+ * Get the logs of an action run
492
+ *
493
+ * Returns the logs from the specified action run.
494
+ */
495
+ export const v1GetActionRunLogsOptions = (options) => queryOptions({
496
+ queryFn: async ({ queryKey, signal }) => {
497
+ const { data } = await v1GetActionRunLogs({
498
+ ...options,
499
+ ...queryKey[0],
500
+ signal,
501
+ throwOnError: true
502
+ });
503
+ return data;
504
+ },
505
+ queryKey: v1GetActionRunLogsQueryKey(options)
506
+ });
507
+ export const v1GetProjectApiKeysQueryKey = (options) => createQueryKey('v1GetProjectApiKeys', options);
508
+ /**
509
+ * Get project api keys
510
+ */
511
+ export const v1GetProjectApiKeysOptions = (options) => queryOptions({
512
+ queryFn: async ({ queryKey, signal }) => {
513
+ const { data } = await v1GetProjectApiKeys({
514
+ ...options,
515
+ ...queryKey[0],
516
+ signal,
517
+ throwOnError: true
518
+ });
519
+ return data;
520
+ },
521
+ queryKey: v1GetProjectApiKeysQueryKey(options)
522
+ });
523
+ /**
524
+ * Creates a new API key for the project
525
+ */
526
+ export const v1CreateProjectApiKeyMutation = (options) => {
527
+ const mutationOptions = {
528
+ mutationFn: async (fnOptions) => {
529
+ const { data } = await v1CreateProjectApiKey({
530
+ ...options,
531
+ ...fnOptions,
532
+ throwOnError: true
533
+ });
534
+ return data;
535
+ }
536
+ };
537
+ return mutationOptions;
538
+ };
539
+ export const v1GetProjectLegacyApiKeysQueryKey = (options) => createQueryKey('v1GetProjectLegacyApiKeys', options);
540
+ /**
541
+ * Check whether JWT based legacy (anon, service_role) API keys are enabled. This API endpoint will be removed in the future, check for HTTP 404 Not Found.
542
+ */
543
+ export const v1GetProjectLegacyApiKeysOptions = (options) => queryOptions({
544
+ queryFn: async ({ queryKey, signal }) => {
545
+ const { data } = await v1GetProjectLegacyApiKeys({
546
+ ...options,
547
+ ...queryKey[0],
548
+ signal,
549
+ throwOnError: true
550
+ });
551
+ return data;
552
+ },
553
+ queryKey: v1GetProjectLegacyApiKeysQueryKey(options)
554
+ });
555
+ /**
556
+ * Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found.
557
+ */
558
+ export const v1UpdateProjectLegacyApiKeysMutation = (options) => {
559
+ const mutationOptions = {
560
+ mutationFn: async (fnOptions) => {
561
+ const { data } = await v1UpdateProjectLegacyApiKeys({
562
+ ...options,
563
+ ...fnOptions,
564
+ throwOnError: true
565
+ });
566
+ return data;
567
+ }
568
+ };
569
+ return mutationOptions;
570
+ };
571
+ /**
572
+ * Deletes an API key for the project
573
+ */
574
+ export const v1DeleteProjectApiKeyMutation = (options) => {
575
+ const mutationOptions = {
576
+ mutationFn: async (fnOptions) => {
577
+ const { data } = await v1DeleteProjectApiKey({
578
+ ...options,
579
+ ...fnOptions,
580
+ throwOnError: true
581
+ });
582
+ return data;
583
+ }
584
+ };
585
+ return mutationOptions;
586
+ };
587
+ export const v1GetProjectApiKeyQueryKey = (options) => createQueryKey('v1GetProjectApiKey', options);
588
+ /**
589
+ * Get API key
590
+ */
591
+ export const v1GetProjectApiKeyOptions = (options) => queryOptions({
592
+ queryFn: async ({ queryKey, signal }) => {
593
+ const { data } = await v1GetProjectApiKey({
594
+ ...options,
595
+ ...queryKey[0],
596
+ signal,
597
+ throwOnError: true
598
+ });
599
+ return data;
600
+ },
601
+ queryKey: v1GetProjectApiKeyQueryKey(options)
602
+ });
603
+ /**
604
+ * Updates an API key for the project
605
+ */
606
+ export const v1UpdateProjectApiKeyMutation = (options) => {
607
+ const mutationOptions = {
608
+ mutationFn: async (fnOptions) => {
609
+ const { data } = await v1UpdateProjectApiKey({
610
+ ...options,
611
+ ...fnOptions,
612
+ throwOnError: true
613
+ });
614
+ return data;
615
+ }
616
+ };
617
+ return mutationOptions;
618
+ };
619
+ /**
620
+ * Disables preview branching
621
+ *
622
+ * Disables preview branching for the specified project
623
+ */
624
+ export const v1DisablePreviewBranchingMutation = (options) => {
625
+ const mutationOptions = {
626
+ mutationFn: async (fnOptions) => {
627
+ const { data } = await v1DisablePreviewBranching({
628
+ ...options,
629
+ ...fnOptions,
630
+ throwOnError: true
631
+ });
632
+ return data;
633
+ }
634
+ };
635
+ return mutationOptions;
636
+ };
637
+ export const v1ListAllBranchesQueryKey = (options) => createQueryKey('v1ListAllBranches', options);
638
+ /**
639
+ * List all database branches
640
+ *
641
+ * Returns all database branches of the specified project.
642
+ */
643
+ export const v1ListAllBranchesOptions = (options) => queryOptions({
644
+ queryFn: async ({ queryKey, signal }) => {
645
+ const { data } = await v1ListAllBranches({
646
+ ...options,
647
+ ...queryKey[0],
648
+ signal,
649
+ throwOnError: true
650
+ });
651
+ return data;
652
+ },
653
+ queryKey: v1ListAllBranchesQueryKey(options)
654
+ });
655
+ /**
656
+ * Create a database branch
657
+ *
658
+ * Creates a database branch from the specified project.
659
+ */
660
+ export const v1CreateABranchMutation = (options) => {
661
+ const mutationOptions = {
662
+ mutationFn: async (fnOptions) => {
663
+ const { data } = await v1CreateABranch({
664
+ ...options,
665
+ ...fnOptions,
666
+ throwOnError: true
667
+ });
668
+ return data;
669
+ }
670
+ };
671
+ return mutationOptions;
672
+ };
673
+ export const v1GetABranchQueryKey = (options) => createQueryKey('v1GetABranch', options);
674
+ /**
675
+ * Get a database branch
676
+ *
677
+ * Fetches the specified database branch by its name.
678
+ */
679
+ export const v1GetABranchOptions = (options) => queryOptions({
680
+ queryFn: async ({ queryKey, signal }) => {
681
+ const { data } = await v1GetABranch({
682
+ ...options,
683
+ ...queryKey[0],
684
+ signal,
685
+ throwOnError: true
686
+ });
687
+ return data;
688
+ },
689
+ queryKey: v1GetABranchQueryKey(options)
690
+ });
691
+ /**
692
+ * [Beta] Deletes a project's custom hostname configuration
693
+ */
694
+ export const v1DeleteHostnameConfigMutation = (options) => {
695
+ const mutationOptions = {
696
+ mutationFn: async (fnOptions) => {
697
+ const { data } = await v1DeleteHostnameConfig({
698
+ ...options,
699
+ ...fnOptions,
700
+ throwOnError: true
701
+ });
702
+ return data;
703
+ }
704
+ };
705
+ return mutationOptions;
706
+ };
707
+ export const v1GetHostnameConfigQueryKey = (options) => createQueryKey('v1GetHostnameConfig', options);
708
+ /**
709
+ * [Beta] Gets project's custom hostname config
710
+ */
711
+ export const v1GetHostnameConfigOptions = (options) => queryOptions({
712
+ queryFn: async ({ queryKey, signal }) => {
713
+ const { data } = await v1GetHostnameConfig({
714
+ ...options,
715
+ ...queryKey[0],
716
+ signal,
717
+ throwOnError: true
718
+ });
719
+ return data;
720
+ },
721
+ queryKey: v1GetHostnameConfigQueryKey(options)
722
+ });
723
+ /**
724
+ * [Beta] Updates project's custom hostname configuration
725
+ */
726
+ export const v1UpdateHostnameConfigMutation = (options) => {
727
+ const mutationOptions = {
728
+ mutationFn: async (fnOptions) => {
729
+ const { data } = await v1UpdateHostnameConfig({
730
+ ...options,
731
+ ...fnOptions,
732
+ throwOnError: true
733
+ });
734
+ return data;
735
+ }
736
+ };
737
+ return mutationOptions;
738
+ };
739
+ /**
740
+ * [Beta] Attempts to verify the DNS configuration for project's custom hostname configuration
741
+ */
742
+ export const v1VerifyDnsConfigMutation = (options) => {
743
+ const mutationOptions = {
744
+ mutationFn: async (fnOptions) => {
745
+ const { data } = await v1VerifyDnsConfig({
746
+ ...options,
747
+ ...fnOptions,
748
+ throwOnError: true
749
+ });
750
+ return data;
751
+ }
752
+ };
753
+ return mutationOptions;
754
+ };
755
+ /**
756
+ * [Beta] Activates a custom hostname for a project.
757
+ */
758
+ export const v1ActivateCustomHostnameMutation = (options) => {
759
+ const mutationOptions = {
760
+ mutationFn: async (fnOptions) => {
761
+ const { data } = await v1ActivateCustomHostname({
762
+ ...options,
763
+ ...fnOptions,
764
+ throwOnError: true
765
+ });
766
+ return data;
767
+ }
768
+ };
769
+ return mutationOptions;
770
+ };
771
+ /**
772
+ * [Beta] Gets project's network bans
773
+ */
774
+ export const v1ListAllNetworkBansMutation = (options) => {
775
+ const mutationOptions = {
776
+ mutationFn: async (fnOptions) => {
777
+ const { data } = await v1ListAllNetworkBans({
778
+ ...options,
779
+ ...fnOptions,
780
+ throwOnError: true
781
+ });
782
+ return data;
783
+ }
784
+ };
785
+ return mutationOptions;
786
+ };
787
+ /**
788
+ * [Beta] Gets project's network bans with additional information about which databases they affect
789
+ */
790
+ export const v1ListAllNetworkBansEnrichedMutation = (options) => {
791
+ const mutationOptions = {
792
+ mutationFn: async (fnOptions) => {
793
+ const { data } = await v1ListAllNetworkBansEnriched({
794
+ ...options,
795
+ ...fnOptions,
796
+ throwOnError: true
797
+ });
798
+ return data;
799
+ }
800
+ };
801
+ return mutationOptions;
802
+ };
803
+ /**
804
+ * [Beta] Remove network bans.
805
+ */
806
+ export const v1DeleteNetworkBansMutation = (options) => {
807
+ const mutationOptions = {
808
+ mutationFn: async (fnOptions) => {
809
+ const { data } = await v1DeleteNetworkBans({
810
+ ...options,
811
+ ...fnOptions,
812
+ throwOnError: true
813
+ });
814
+ return data;
815
+ }
816
+ };
817
+ return mutationOptions;
818
+ };
819
+ export const v1GetNetworkRestrictionsQueryKey = (options) => createQueryKey('v1GetNetworkRestrictions', options);
820
+ /**
821
+ * [Beta] Gets project's network restrictions
822
+ */
823
+ export const v1GetNetworkRestrictionsOptions = (options) => queryOptions({
824
+ queryFn: async ({ queryKey, signal }) => {
825
+ const { data } = await v1GetNetworkRestrictions({
826
+ ...options,
827
+ ...queryKey[0],
828
+ signal,
829
+ throwOnError: true
830
+ });
831
+ return data;
832
+ },
833
+ queryKey: v1GetNetworkRestrictionsQueryKey(options)
834
+ });
835
+ /**
836
+ * [Alpha] Updates project's network restrictions by adding or removing CIDRs
837
+ */
838
+ export const v1PatchNetworkRestrictionsMutation = (options) => {
839
+ const mutationOptions = {
840
+ mutationFn: async (fnOptions) => {
841
+ const { data } = await v1PatchNetworkRestrictions({
842
+ ...options,
843
+ ...fnOptions,
844
+ throwOnError: true
845
+ });
846
+ return data;
847
+ }
848
+ };
849
+ return mutationOptions;
850
+ };
851
+ /**
852
+ * [Beta] Updates project's network restrictions
853
+ */
854
+ export const v1UpdateNetworkRestrictionsMutation = (options) => {
855
+ const mutationOptions = {
856
+ mutationFn: async (fnOptions) => {
857
+ const { data } = await v1UpdateNetworkRestrictions({
858
+ ...options,
859
+ ...fnOptions,
860
+ throwOnError: true
861
+ });
862
+ return data;
863
+ }
864
+ };
865
+ return mutationOptions;
866
+ };
867
+ export const v1GetPgsodiumConfigQueryKey = (options) => createQueryKey('v1GetPgsodiumConfig', options);
868
+ /**
869
+ * [Beta] Gets project's pgsodium config
870
+ */
871
+ export const v1GetPgsodiumConfigOptions = (options) => queryOptions({
872
+ queryFn: async ({ queryKey, signal }) => {
873
+ const { data } = await v1GetPgsodiumConfig({
874
+ ...options,
875
+ ...queryKey[0],
876
+ signal,
877
+ throwOnError: true
878
+ });
879
+ return data;
880
+ },
881
+ queryKey: v1GetPgsodiumConfigQueryKey(options)
882
+ });
883
+ /**
884
+ * [Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.
885
+ */
886
+ export const v1UpdatePgsodiumConfigMutation = (options) => {
887
+ const mutationOptions = {
888
+ mutationFn: async (fnOptions) => {
889
+ const { data } = await v1UpdatePgsodiumConfig({
890
+ ...options,
891
+ ...fnOptions,
892
+ throwOnError: true
893
+ });
894
+ return data;
895
+ }
896
+ };
897
+ return mutationOptions;
898
+ };
899
+ export const v1GetPostgrestServiceConfigQueryKey = (options) => createQueryKey('v1GetPostgrestServiceConfig', options);
900
+ /**
901
+ * Gets project's postgrest config
902
+ */
903
+ export const v1GetPostgrestServiceConfigOptions = (options) => queryOptions({
904
+ queryFn: async ({ queryKey, signal }) => {
905
+ const { data } = await v1GetPostgrestServiceConfig({
906
+ ...options,
907
+ ...queryKey[0],
908
+ signal,
909
+ throwOnError: true
910
+ });
911
+ return data;
912
+ },
913
+ queryKey: v1GetPostgrestServiceConfigQueryKey(options)
914
+ });
915
+ /**
916
+ * Updates project's postgrest config
917
+ */
918
+ export const v1UpdatePostgrestServiceConfigMutation = (options) => {
919
+ const mutationOptions = {
920
+ mutationFn: async (fnOptions) => {
921
+ const { data } = await v1UpdatePostgrestServiceConfig({
922
+ ...options,
923
+ ...fnOptions,
924
+ throwOnError: true
925
+ });
926
+ return data;
927
+ }
928
+ };
929
+ return mutationOptions;
930
+ };
931
+ /**
932
+ * Deletes the given project
933
+ */
934
+ export const v1DeleteAProjectMutation = (options) => {
935
+ const mutationOptions = {
936
+ mutationFn: async (fnOptions) => {
937
+ const { data } = await v1DeleteAProject({
938
+ ...options,
939
+ ...fnOptions,
940
+ throwOnError: true
941
+ });
942
+ return data;
943
+ }
944
+ };
945
+ return mutationOptions;
946
+ };
947
+ export const v1GetProjectQueryKey = (options) => createQueryKey('v1GetProject', options);
948
+ /**
949
+ * Gets a specific project that belongs to the authenticated user
950
+ */
951
+ export const v1GetProjectOptions = (options) => queryOptions({
952
+ queryFn: async ({ queryKey, signal }) => {
953
+ const { data } = await v1GetProject({
954
+ ...options,
955
+ ...queryKey[0],
956
+ signal,
957
+ throwOnError: true
958
+ });
959
+ return data;
960
+ },
961
+ queryKey: v1GetProjectQueryKey(options)
962
+ });
963
+ /**
964
+ * Updates the given project
965
+ */
966
+ export const v1UpdateAProjectMutation = (options) => {
967
+ const mutationOptions = {
968
+ mutationFn: async (fnOptions) => {
969
+ const { data } = await v1UpdateAProject({
970
+ ...options,
971
+ ...fnOptions,
972
+ throwOnError: true
973
+ });
974
+ return data;
975
+ }
976
+ };
977
+ return mutationOptions;
978
+ };
979
+ /**
980
+ * Bulk delete secrets
981
+ *
982
+ * Deletes all secrets with the given names from the specified project
983
+ */
984
+ export const v1BulkDeleteSecretsMutation = (options) => {
985
+ const mutationOptions = {
986
+ mutationFn: async (fnOptions) => {
987
+ const { data } = await v1BulkDeleteSecrets({
988
+ ...options,
989
+ ...fnOptions,
990
+ throwOnError: true
991
+ });
992
+ return data;
993
+ }
994
+ };
995
+ return mutationOptions;
996
+ };
997
+ export const v1ListAllSecretsQueryKey = (options) => createQueryKey('v1ListAllSecrets', options);
998
+ /**
999
+ * List all secrets
1000
+ *
1001
+ * Returns all secrets you've previously added to the specified project.
1002
+ */
1003
+ export const v1ListAllSecretsOptions = (options) => queryOptions({
1004
+ queryFn: async ({ queryKey, signal }) => {
1005
+ const { data } = await v1ListAllSecrets({
1006
+ ...options,
1007
+ ...queryKey[0],
1008
+ signal,
1009
+ throwOnError: true
1010
+ });
1011
+ return data;
1012
+ },
1013
+ queryKey: v1ListAllSecretsQueryKey(options)
1014
+ });
1015
+ /**
1016
+ * Bulk create secrets
1017
+ *
1018
+ * Creates multiple secrets and adds them to the specified project.
1019
+ */
1020
+ export const v1BulkCreateSecretsMutation = (options) => {
1021
+ const mutationOptions = {
1022
+ mutationFn: async (fnOptions) => {
1023
+ const { data } = await v1BulkCreateSecrets({
1024
+ ...options,
1025
+ ...fnOptions,
1026
+ throwOnError: true
1027
+ });
1028
+ return data;
1029
+ }
1030
+ };
1031
+ return mutationOptions;
1032
+ };
1033
+ export const v1GetSslEnforcementConfigQueryKey = (options) => createQueryKey('v1GetSslEnforcementConfig', options);
1034
+ /**
1035
+ * [Beta] Get project's SSL enforcement configuration.
1036
+ */
1037
+ export const v1GetSslEnforcementConfigOptions = (options) => queryOptions({
1038
+ queryFn: async ({ queryKey, signal }) => {
1039
+ const { data } = await v1GetSslEnforcementConfig({
1040
+ ...options,
1041
+ ...queryKey[0],
1042
+ signal,
1043
+ throwOnError: true
1044
+ });
1045
+ return data;
1046
+ },
1047
+ queryKey: v1GetSslEnforcementConfigQueryKey(options)
1048
+ });
1049
+ /**
1050
+ * [Beta] Update project's SSL enforcement configuration.
1051
+ */
1052
+ export const v1UpdateSslEnforcementConfigMutation = (options) => {
1053
+ const mutationOptions = {
1054
+ mutationFn: async (fnOptions) => {
1055
+ const { data } = await v1UpdateSslEnforcementConfig({
1056
+ ...options,
1057
+ ...fnOptions,
1058
+ throwOnError: true
1059
+ });
1060
+ return data;
1061
+ }
1062
+ };
1063
+ return mutationOptions;
1064
+ };
1065
+ export const v1GenerateTypescriptTypesQueryKey = (options) => createQueryKey('v1GenerateTypescriptTypes', options);
1066
+ /**
1067
+ * Generate TypeScript types
1068
+ *
1069
+ * Returns the TypeScript types of your schema for use with supabase-js.
1070
+ */
1071
+ export const v1GenerateTypescriptTypesOptions = (options) => queryOptions({
1072
+ queryFn: async ({ queryKey, signal }) => {
1073
+ const { data } = await v1GenerateTypescriptTypes({
1074
+ ...options,
1075
+ ...queryKey[0],
1076
+ signal,
1077
+ throwOnError: true
1078
+ });
1079
+ return data;
1080
+ },
1081
+ queryKey: v1GenerateTypescriptTypesQueryKey(options)
1082
+ });
1083
+ /**
1084
+ * [Beta] Deletes a project's vanity subdomain configuration
1085
+ */
1086
+ export const v1DeactivateVanitySubdomainConfigMutation = (options) => {
1087
+ const mutationOptions = {
1088
+ mutationFn: async (fnOptions) => {
1089
+ const { data } = await v1DeactivateVanitySubdomainConfig({
1090
+ ...options,
1091
+ ...fnOptions,
1092
+ throwOnError: true
1093
+ });
1094
+ return data;
1095
+ }
1096
+ };
1097
+ return mutationOptions;
1098
+ };
1099
+ export const v1GetVanitySubdomainConfigQueryKey = (options) => createQueryKey('v1GetVanitySubdomainConfig', options);
1100
+ /**
1101
+ * [Beta] Gets current vanity subdomain config
1102
+ */
1103
+ export const v1GetVanitySubdomainConfigOptions = (options) => queryOptions({
1104
+ queryFn: async ({ queryKey, signal }) => {
1105
+ const { data } = await v1GetVanitySubdomainConfig({
1106
+ ...options,
1107
+ ...queryKey[0],
1108
+ signal,
1109
+ throwOnError: true
1110
+ });
1111
+ return data;
1112
+ },
1113
+ queryKey: v1GetVanitySubdomainConfigQueryKey(options)
1114
+ });
1115
+ /**
1116
+ * [Beta] Checks vanity subdomain availability
1117
+ */
1118
+ export const v1CheckVanitySubdomainAvailabilityMutation = (options) => {
1119
+ const mutationOptions = {
1120
+ mutationFn: async (fnOptions) => {
1121
+ const { data } = await v1CheckVanitySubdomainAvailability({
1122
+ ...options,
1123
+ ...fnOptions,
1124
+ throwOnError: true
1125
+ });
1126
+ return data;
1127
+ }
1128
+ };
1129
+ return mutationOptions;
1130
+ };
1131
+ /**
1132
+ * [Beta] Activates a vanity subdomain for a project.
1133
+ */
1134
+ export const v1ActivateVanitySubdomainConfigMutation = (options) => {
1135
+ const mutationOptions = {
1136
+ mutationFn: async (fnOptions) => {
1137
+ const { data } = await v1ActivateVanitySubdomainConfig({
1138
+ ...options,
1139
+ ...fnOptions,
1140
+ throwOnError: true
1141
+ });
1142
+ return data;
1143
+ }
1144
+ };
1145
+ return mutationOptions;
1146
+ };
1147
+ /**
1148
+ * [Beta] Upgrades the project's Postgres version
1149
+ */
1150
+ export const v1UpgradePostgresVersionMutation = (options) => {
1151
+ const mutationOptions = {
1152
+ mutationFn: async (fnOptions) => {
1153
+ const { data } = await v1UpgradePostgresVersion({
1154
+ ...options,
1155
+ ...fnOptions,
1156
+ throwOnError: true
1157
+ });
1158
+ return data;
1159
+ }
1160
+ };
1161
+ return mutationOptions;
1162
+ };
1163
+ export const v1GetPostgresUpgradeEligibilityQueryKey = (options) => createQueryKey('v1GetPostgresUpgradeEligibility', options);
1164
+ /**
1165
+ * [Beta] Returns the project's eligibility for upgrades
1166
+ */
1167
+ export const v1GetPostgresUpgradeEligibilityOptions = (options) => queryOptions({
1168
+ queryFn: async ({ queryKey, signal }) => {
1169
+ const { data } = await v1GetPostgresUpgradeEligibility({
1170
+ ...options,
1171
+ ...queryKey[0],
1172
+ signal,
1173
+ throwOnError: true
1174
+ });
1175
+ return data;
1176
+ },
1177
+ queryKey: v1GetPostgresUpgradeEligibilityQueryKey(options)
1178
+ });
1179
+ export const v1GetPostgresUpgradeStatusQueryKey = (options) => createQueryKey('v1GetPostgresUpgradeStatus', options);
1180
+ /**
1181
+ * [Beta] Gets the latest status of the project's upgrade
1182
+ */
1183
+ export const v1GetPostgresUpgradeStatusOptions = (options) => queryOptions({
1184
+ queryFn: async ({ queryKey, signal }) => {
1185
+ const { data } = await v1GetPostgresUpgradeStatus({
1186
+ ...options,
1187
+ ...queryKey[0],
1188
+ signal,
1189
+ throwOnError: true
1190
+ });
1191
+ return data;
1192
+ },
1193
+ queryKey: v1GetPostgresUpgradeStatusQueryKey(options)
1194
+ });
1195
+ export const v1GetReadonlyModeStatusQueryKey = (options) => createQueryKey('v1GetReadonlyModeStatus', options);
1196
+ /**
1197
+ * Returns project's readonly mode status
1198
+ */
1199
+ export const v1GetReadonlyModeStatusOptions = (options) => queryOptions({
1200
+ queryFn: async ({ queryKey, signal }) => {
1201
+ const { data } = await v1GetReadonlyModeStatus({
1202
+ ...options,
1203
+ ...queryKey[0],
1204
+ signal,
1205
+ throwOnError: true
1206
+ });
1207
+ return data;
1208
+ },
1209
+ queryKey: v1GetReadonlyModeStatusQueryKey(options)
1210
+ });
1211
+ /**
1212
+ * Disables project's readonly mode for the next 15 minutes
1213
+ */
1214
+ export const v1DisableReadonlyModeTemporarilyMutation = (options) => {
1215
+ const mutationOptions = {
1216
+ mutationFn: async (fnOptions) => {
1217
+ const { data } = await v1DisableReadonlyModeTemporarily({
1218
+ ...options,
1219
+ ...fnOptions,
1220
+ throwOnError: true
1221
+ });
1222
+ return data;
1223
+ }
1224
+ };
1225
+ return mutationOptions;
1226
+ };
1227
+ /**
1228
+ * [Beta] Set up a read replica
1229
+ */
1230
+ export const v1SetupAReadReplicaMutation = (options) => {
1231
+ const mutationOptions = {
1232
+ mutationFn: async (fnOptions) => {
1233
+ const { data } = await v1SetupAReadReplica({
1234
+ ...options,
1235
+ ...fnOptions,
1236
+ throwOnError: true
1237
+ });
1238
+ return data;
1239
+ }
1240
+ };
1241
+ return mutationOptions;
1242
+ };
1243
+ /**
1244
+ * [Beta] Remove a read replica
1245
+ */
1246
+ export const v1RemoveAReadReplicaMutation = (options) => {
1247
+ const mutationOptions = {
1248
+ mutationFn: async (fnOptions) => {
1249
+ const { data } = await v1RemoveAReadReplica({
1250
+ ...options,
1251
+ ...fnOptions,
1252
+ throwOnError: true
1253
+ });
1254
+ return data;
1255
+ }
1256
+ };
1257
+ return mutationOptions;
1258
+ };
1259
+ export const v1GetServicesHealthQueryKey = (options) => createQueryKey('v1GetServicesHealth', options);
1260
+ /**
1261
+ * Gets project's service health status
1262
+ */
1263
+ export const v1GetServicesHealthOptions = (options) => queryOptions({
1264
+ queryFn: async ({ queryKey, signal }) => {
1265
+ const { data } = await v1GetServicesHealth({
1266
+ ...options,
1267
+ ...queryKey[0],
1268
+ signal,
1269
+ throwOnError: true
1270
+ });
1271
+ return data;
1272
+ },
1273
+ queryKey: v1GetServicesHealthQueryKey(options)
1274
+ });
1275
+ export const v1GetLegacySigningKeyQueryKey = (options) => createQueryKey('v1GetLegacySigningKey', options);
1276
+ /**
1277
+ * Get the signing key information for the JWT secret imported as signing key for this project. This endpoint will be removed in the future, check for HTTP 404 Not Found.
1278
+ */
1279
+ export const v1GetLegacySigningKeyOptions = (options) => queryOptions({
1280
+ queryFn: async ({ queryKey, signal }) => {
1281
+ const { data } = await v1GetLegacySigningKey({
1282
+ ...options,
1283
+ ...queryKey[0],
1284
+ signal,
1285
+ throwOnError: true
1286
+ });
1287
+ return data;
1288
+ },
1289
+ queryKey: v1GetLegacySigningKeyQueryKey(options)
1290
+ });
1291
+ /**
1292
+ * Set up the project's existing JWT secret as an in_use JWT signing key. This endpoint will be removed in the future always check for HTTP 404 Not Found.
1293
+ */
1294
+ export const v1CreateLegacySigningKeyMutation = (options) => {
1295
+ const mutationOptions = {
1296
+ mutationFn: async (fnOptions) => {
1297
+ const { data } = await v1CreateLegacySigningKey({
1298
+ ...options,
1299
+ ...fnOptions,
1300
+ throwOnError: true
1301
+ });
1302
+ return data;
1303
+ }
1304
+ };
1305
+ return mutationOptions;
1306
+ };
1307
+ export const v1GetProjectSigningKeysQueryKey = (options) => createQueryKey('v1GetProjectSigningKeys', options);
1308
+ /**
1309
+ * List all signing keys for the project
1310
+ */
1311
+ export const v1GetProjectSigningKeysOptions = (options) => queryOptions({
1312
+ queryFn: async ({ queryKey, signal }) => {
1313
+ const { data } = await v1GetProjectSigningKeys({
1314
+ ...options,
1315
+ ...queryKey[0],
1316
+ signal,
1317
+ throwOnError: true
1318
+ });
1319
+ return data;
1320
+ },
1321
+ queryKey: v1GetProjectSigningKeysQueryKey(options)
1322
+ });
1323
+ /**
1324
+ * Create a new signing key for the project in standby status
1325
+ */
1326
+ export const v1CreateProjectSigningKeyMutation = (options) => {
1327
+ const mutationOptions = {
1328
+ mutationFn: async (fnOptions) => {
1329
+ const { data } = await v1CreateProjectSigningKey({
1330
+ ...options,
1331
+ ...fnOptions,
1332
+ throwOnError: true
1333
+ });
1334
+ return data;
1335
+ }
1336
+ };
1337
+ return mutationOptions;
1338
+ };
1339
+ /**
1340
+ * Remove a signing key from a project. Only possible if the key has been in revoked status for a while.
1341
+ */
1342
+ export const v1RemoveProjectSigningKeyMutation = (options) => {
1343
+ const mutationOptions = {
1344
+ mutationFn: async (fnOptions) => {
1345
+ const { data } = await v1RemoveProjectSigningKey({
1346
+ ...options,
1347
+ ...fnOptions,
1348
+ throwOnError: true
1349
+ });
1350
+ return data;
1351
+ }
1352
+ };
1353
+ return mutationOptions;
1354
+ };
1355
+ export const v1GetProjectSigningKeyQueryKey = (options) => createQueryKey('v1GetProjectSigningKey', options);
1356
+ /**
1357
+ * Get information about a signing key
1358
+ */
1359
+ export const v1GetProjectSigningKeyOptions = (options) => queryOptions({
1360
+ queryFn: async ({ queryKey, signal }) => {
1361
+ const { data } = await v1GetProjectSigningKey({
1362
+ ...options,
1363
+ ...queryKey[0],
1364
+ signal,
1365
+ throwOnError: true
1366
+ });
1367
+ return data;
1368
+ },
1369
+ queryKey: v1GetProjectSigningKeyQueryKey(options)
1370
+ });
1371
+ /**
1372
+ * Update a signing key, mainly its status
1373
+ */
1374
+ export const v1UpdateProjectSigningKeyMutation = (options) => {
1375
+ const mutationOptions = {
1376
+ mutationFn: async (fnOptions) => {
1377
+ const { data } = await v1UpdateProjectSigningKey({
1378
+ ...options,
1379
+ ...fnOptions,
1380
+ throwOnError: true
1381
+ });
1382
+ return data;
1383
+ }
1384
+ };
1385
+ return mutationOptions;
1386
+ };
1387
+ export const v1GetStorageConfigQueryKey = (options) => createQueryKey('v1GetStorageConfig', options);
1388
+ /**
1389
+ * Gets project's storage config
1390
+ */
1391
+ export const v1GetStorageConfigOptions = (options) => queryOptions({
1392
+ queryFn: async ({ queryKey, signal }) => {
1393
+ const { data } = await v1GetStorageConfig({
1394
+ ...options,
1395
+ ...queryKey[0],
1396
+ signal,
1397
+ throwOnError: true
1398
+ });
1399
+ return data;
1400
+ },
1401
+ queryKey: v1GetStorageConfigQueryKey(options)
1402
+ });
1403
+ /**
1404
+ * Updates project's storage config
1405
+ */
1406
+ export const v1UpdateStorageConfigMutation = (options) => {
1407
+ const mutationOptions = {
1408
+ mutationFn: async (fnOptions) => {
1409
+ const { data } = await v1UpdateStorageConfig({
1410
+ ...options,
1411
+ ...fnOptions,
1412
+ throwOnError: true
1413
+ });
1414
+ return data;
1415
+ }
1416
+ };
1417
+ return mutationOptions;
1418
+ };
1419
+ export const v1GetPostgresConfigQueryKey = (options) => createQueryKey('v1GetPostgresConfig', options);
1420
+ /**
1421
+ * Gets project's Postgres config
1422
+ */
1423
+ export const v1GetPostgresConfigOptions = (options) => queryOptions({
1424
+ queryFn: async ({ queryKey, signal }) => {
1425
+ const { data } = await v1GetPostgresConfig({
1426
+ ...options,
1427
+ ...queryKey[0],
1428
+ signal,
1429
+ throwOnError: true
1430
+ });
1431
+ return data;
1432
+ },
1433
+ queryKey: v1GetPostgresConfigQueryKey(options)
1434
+ });
1435
+ /**
1436
+ * Updates project's Postgres config
1437
+ */
1438
+ export const v1UpdatePostgresConfigMutation = (options) => {
1439
+ const mutationOptions = {
1440
+ mutationFn: async (fnOptions) => {
1441
+ const { data } = await v1UpdatePostgresConfig({
1442
+ ...options,
1443
+ ...fnOptions,
1444
+ throwOnError: true
1445
+ });
1446
+ return data;
1447
+ }
1448
+ };
1449
+ return mutationOptions;
1450
+ };
1451
+ export const v1GetProjectPgbouncerConfigQueryKey = (options) => createQueryKey('v1GetProjectPgbouncerConfig', options);
1452
+ /**
1453
+ * Get project's pgbouncer config
1454
+ */
1455
+ export const v1GetProjectPgbouncerConfigOptions = (options) => queryOptions({
1456
+ queryFn: async ({ queryKey, signal }) => {
1457
+ const { data } = await v1GetProjectPgbouncerConfig({
1458
+ ...options,
1459
+ ...queryKey[0],
1460
+ signal,
1461
+ throwOnError: true
1462
+ });
1463
+ return data;
1464
+ },
1465
+ queryKey: v1GetProjectPgbouncerConfigQueryKey(options)
1466
+ });
1467
+ export const v1GetPoolerConfigQueryKey = (options) => createQueryKey('v1GetPoolerConfig', options);
1468
+ /**
1469
+ * Gets project's supavisor config
1470
+ */
1471
+ export const v1GetPoolerConfigOptions = (options) => queryOptions({
1472
+ queryFn: async ({ queryKey, signal }) => {
1473
+ const { data } = await v1GetPoolerConfig({
1474
+ ...options,
1475
+ ...queryKey[0],
1476
+ signal,
1477
+ throwOnError: true
1478
+ });
1479
+ return data;
1480
+ },
1481
+ queryKey: v1GetPoolerConfigQueryKey(options)
1482
+ });
1483
+ /**
1484
+ * Updates project's supavisor config
1485
+ */
1486
+ export const v1UpdatePoolerConfigMutation = (options) => {
1487
+ const mutationOptions = {
1488
+ mutationFn: async (fnOptions) => {
1489
+ const { data } = await v1UpdatePoolerConfig({
1490
+ ...options,
1491
+ ...fnOptions,
1492
+ throwOnError: true
1493
+ });
1494
+ return data;
1495
+ }
1496
+ };
1497
+ return mutationOptions;
1498
+ };
1499
+ export const v1GetAuthServiceConfigQueryKey = (options) => createQueryKey('v1GetAuthServiceConfig', options);
1500
+ /**
1501
+ * Gets project's auth config
1502
+ */
1503
+ export const v1GetAuthServiceConfigOptions = (options) => queryOptions({
1504
+ queryFn: async ({ queryKey, signal }) => {
1505
+ const { data } = await v1GetAuthServiceConfig({
1506
+ ...options,
1507
+ ...queryKey[0],
1508
+ signal,
1509
+ throwOnError: true
1510
+ });
1511
+ return data;
1512
+ },
1513
+ queryKey: v1GetAuthServiceConfigQueryKey(options)
1514
+ });
1515
+ /**
1516
+ * Updates a project's auth config
1517
+ */
1518
+ export const v1UpdateAuthServiceConfigMutation = (options) => {
1519
+ const mutationOptions = {
1520
+ mutationFn: async (fnOptions) => {
1521
+ const { data } = await v1UpdateAuthServiceConfig({
1522
+ ...options,
1523
+ ...fnOptions,
1524
+ throwOnError: true
1525
+ });
1526
+ return data;
1527
+ }
1528
+ };
1529
+ return mutationOptions;
1530
+ };
1531
+ export const v1GetRealtimeConfigQueryKey = (options) => createQueryKey('v1GetRealtimeConfig', options);
1532
+ /**
1533
+ * Gets realtime configuration
1534
+ */
1535
+ export const v1GetRealtimeConfigOptions = (options) => queryOptions({
1536
+ queryFn: async ({ queryKey, signal }) => {
1537
+ const { data } = await v1GetRealtimeConfig({
1538
+ ...options,
1539
+ ...queryKey[0],
1540
+ signal,
1541
+ throwOnError: true
1542
+ });
1543
+ return data;
1544
+ },
1545
+ queryKey: v1GetRealtimeConfigQueryKey(options)
1546
+ });
1547
+ /**
1548
+ * Updates realtime configuration
1549
+ */
1550
+ export const v1UpdateRealtimeConfigMutation = (options) => {
1551
+ const mutationOptions = {
1552
+ mutationFn: async (fnOptions) => {
1553
+ const { data } = await v1UpdateRealtimeConfig({
1554
+ ...options,
1555
+ ...fnOptions,
1556
+ throwOnError: true
1557
+ });
1558
+ return data;
1559
+ }
1560
+ };
1561
+ return mutationOptions;
1562
+ };
1563
+ export const v1ListProjectTpaIntegrationsQueryKey = (options) => createQueryKey('v1ListProjectTpaIntegrations', options);
1564
+ /**
1565
+ * Lists all third-party auth integrations
1566
+ */
1567
+ export const v1ListProjectTpaIntegrationsOptions = (options) => queryOptions({
1568
+ queryFn: async ({ queryKey, signal }) => {
1569
+ const { data } = await v1ListProjectTpaIntegrations({
1570
+ ...options,
1571
+ ...queryKey[0],
1572
+ signal,
1573
+ throwOnError: true
1574
+ });
1575
+ return data;
1576
+ },
1577
+ queryKey: v1ListProjectTpaIntegrationsQueryKey(options)
1578
+ });
1579
+ /**
1580
+ * Creates a new third-party auth integration
1581
+ */
1582
+ export const v1CreateProjectTpaIntegrationMutation = (options) => {
1583
+ const mutationOptions = {
1584
+ mutationFn: async (fnOptions) => {
1585
+ const { data } = await v1CreateProjectTpaIntegration({
1586
+ ...options,
1587
+ ...fnOptions,
1588
+ throwOnError: true
1589
+ });
1590
+ return data;
1591
+ }
1592
+ };
1593
+ return mutationOptions;
1594
+ };
1595
+ /**
1596
+ * Removes a third-party auth integration
1597
+ */
1598
+ export const v1DeleteProjectTpaIntegrationMutation = (options) => {
1599
+ const mutationOptions = {
1600
+ mutationFn: async (fnOptions) => {
1601
+ const { data } = await v1DeleteProjectTpaIntegration({
1602
+ ...options,
1603
+ ...fnOptions,
1604
+ throwOnError: true
1605
+ });
1606
+ return data;
1607
+ }
1608
+ };
1609
+ return mutationOptions;
1610
+ };
1611
+ export const v1GetProjectTpaIntegrationQueryKey = (options) => createQueryKey('v1GetProjectTpaIntegration', options);
1612
+ /**
1613
+ * Get a third-party integration
1614
+ */
1615
+ export const v1GetProjectTpaIntegrationOptions = (options) => queryOptions({
1616
+ queryFn: async ({ queryKey, signal }) => {
1617
+ const { data } = await v1GetProjectTpaIntegration({
1618
+ ...options,
1619
+ ...queryKey[0],
1620
+ signal,
1621
+ throwOnError: true
1622
+ });
1623
+ return data;
1624
+ },
1625
+ queryKey: v1GetProjectTpaIntegrationQueryKey(options)
1626
+ });
1627
+ /**
1628
+ * Pauses the given project
1629
+ */
1630
+ export const v1PauseAProjectMutation = (options) => {
1631
+ const mutationOptions = {
1632
+ mutationFn: async (fnOptions) => {
1633
+ const { data } = await v1PauseAProject({
1634
+ ...options,
1635
+ ...fnOptions,
1636
+ throwOnError: true
1637
+ });
1638
+ return data;
1639
+ }
1640
+ };
1641
+ return mutationOptions;
1642
+ };
1643
+ export const v1ListAvailableRestoreVersionsQueryKey = (options) => createQueryKey('v1ListAvailableRestoreVersions', options);
1644
+ /**
1645
+ * Lists available restore versions for the given project
1646
+ */
1647
+ export const v1ListAvailableRestoreVersionsOptions = (options) => queryOptions({
1648
+ queryFn: async ({ queryKey, signal }) => {
1649
+ const { data } = await v1ListAvailableRestoreVersions({
1650
+ ...options,
1651
+ ...queryKey[0],
1652
+ signal,
1653
+ throwOnError: true
1654
+ });
1655
+ return data;
1656
+ },
1657
+ queryKey: v1ListAvailableRestoreVersionsQueryKey(options)
1658
+ });
1659
+ /**
1660
+ * Restores the given project
1661
+ */
1662
+ export const v1RestoreAProjectMutation = (options) => {
1663
+ const mutationOptions = {
1664
+ mutationFn: async (fnOptions) => {
1665
+ const { data } = await v1RestoreAProject({
1666
+ ...options,
1667
+ ...fnOptions,
1668
+ throwOnError: true
1669
+ });
1670
+ return data;
1671
+ }
1672
+ };
1673
+ return mutationOptions;
1674
+ };
1675
+ /**
1676
+ * Cancels the given project restoration
1677
+ */
1678
+ export const v1CancelAProjectRestorationMutation = (options) => {
1679
+ const mutationOptions = {
1680
+ mutationFn: async (fnOptions) => {
1681
+ const { data } = await v1CancelAProjectRestoration({
1682
+ ...options,
1683
+ ...fnOptions,
1684
+ throwOnError: true
1685
+ });
1686
+ return data;
1687
+ }
1688
+ };
1689
+ return mutationOptions;
1690
+ };
1691
+ export const v1ListProjectAddonsQueryKey = (options) => createQueryKey('v1ListProjectAddons', options);
1692
+ /**
1693
+ * List billing addons and compute instance selections
1694
+ *
1695
+ * Returns the billing addons that are currently applied, including the active compute instance size, and lists every addon option that can be provisioned with pricing metadata.
1696
+ */
1697
+ export const v1ListProjectAddonsOptions = (options) => queryOptions({
1698
+ queryFn: async ({ queryKey, signal }) => {
1699
+ const { data } = await v1ListProjectAddons({
1700
+ ...options,
1701
+ ...queryKey[0],
1702
+ signal,
1703
+ throwOnError: true
1704
+ });
1705
+ return data;
1706
+ },
1707
+ queryKey: v1ListProjectAddonsQueryKey(options)
1708
+ });
1709
+ /**
1710
+ * Apply or update billing addons, including compute instance size
1711
+ *
1712
+ * Selects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.
1713
+ */
1714
+ export const v1ApplyProjectAddonMutation = (options) => {
1715
+ const mutationOptions = {
1716
+ mutationFn: async (fnOptions) => {
1717
+ const { data } = await v1ApplyProjectAddon({
1718
+ ...options,
1719
+ ...fnOptions,
1720
+ throwOnError: true
1721
+ });
1722
+ return data;
1723
+ }
1724
+ };
1725
+ return mutationOptions;
1726
+ };
1727
+ /**
1728
+ * Remove billing addons or revert compute instance sizing
1729
+ *
1730
+ * Disables the selected addon variant, including rolling the compute instance back to its previous size.
1731
+ */
1732
+ export const v1RemoveProjectAddonMutation = (options) => {
1733
+ const mutationOptions = {
1734
+ mutationFn: async (fnOptions) => {
1735
+ const { data } = await v1RemoveProjectAddon({
1736
+ ...options,
1737
+ ...fnOptions,
1738
+ throwOnError: true
1739
+ });
1740
+ return data;
1741
+ }
1742
+ };
1743
+ return mutationOptions;
1744
+ };
1745
+ /**
1746
+ * Revokes project claim token
1747
+ */
1748
+ export const v1DeleteProjectClaimTokenMutation = (options) => {
1749
+ const mutationOptions = {
1750
+ mutationFn: async (fnOptions) => {
1751
+ const { data } = await v1DeleteProjectClaimToken({
1752
+ ...options,
1753
+ ...fnOptions,
1754
+ throwOnError: true
1755
+ });
1756
+ return data;
1757
+ }
1758
+ };
1759
+ return mutationOptions;
1760
+ };
1761
+ export const v1GetProjectClaimTokenQueryKey = (options) => createQueryKey('v1GetProjectClaimToken', options);
1762
+ /**
1763
+ * Gets project claim token
1764
+ */
1765
+ export const v1GetProjectClaimTokenOptions = (options) => queryOptions({
1766
+ queryFn: async ({ queryKey, signal }) => {
1767
+ const { data } = await v1GetProjectClaimToken({
1768
+ ...options,
1769
+ ...queryKey[0],
1770
+ signal,
1771
+ throwOnError: true
1772
+ });
1773
+ return data;
1774
+ },
1775
+ queryKey: v1GetProjectClaimTokenQueryKey(options)
1776
+ });
1777
+ /**
1778
+ * Creates project claim token
1779
+ */
1780
+ export const v1CreateProjectClaimTokenMutation = (options) => {
1781
+ const mutationOptions = {
1782
+ mutationFn: async (fnOptions) => {
1783
+ const { data } = await v1CreateProjectClaimToken({
1784
+ ...options,
1785
+ ...fnOptions,
1786
+ throwOnError: true
1787
+ });
1788
+ return data;
1789
+ }
1790
+ };
1791
+ return mutationOptions;
1792
+ };
1793
+ export const v1GetPerformanceAdvisorsQueryKey = (options) => createQueryKey('v1GetPerformanceAdvisors', options);
1794
+ /**
1795
+ * Gets project performance advisors.
1796
+ *
1797
+ * This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
1798
+ *
1799
+ * @deprecated
1800
+ */
1801
+ export const v1GetPerformanceAdvisorsOptions = (options) => queryOptions({
1802
+ queryFn: async ({ queryKey, signal }) => {
1803
+ const { data } = await v1GetPerformanceAdvisors({
1804
+ ...options,
1805
+ ...queryKey[0],
1806
+ signal,
1807
+ throwOnError: true
1808
+ });
1809
+ return data;
1810
+ },
1811
+ queryKey: v1GetPerformanceAdvisorsQueryKey(options)
1812
+ });
1813
+ export const v1GetSecurityAdvisorsQueryKey = (options) => createQueryKey('v1GetSecurityAdvisors', options);
1814
+ /**
1815
+ * Gets project security advisors.
1816
+ *
1817
+ * This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
1818
+ *
1819
+ * @deprecated
1820
+ */
1821
+ export const v1GetSecurityAdvisorsOptions = (options) => queryOptions({
1822
+ queryFn: async ({ queryKey, signal }) => {
1823
+ const { data } = await v1GetSecurityAdvisors({
1824
+ ...options,
1825
+ ...queryKey[0],
1826
+ signal,
1827
+ throwOnError: true
1828
+ });
1829
+ return data;
1830
+ },
1831
+ queryKey: v1GetSecurityAdvisorsQueryKey(options)
1832
+ });
1833
+ export const v1GetProjectLogsQueryKey = (options) => createQueryKey('v1GetProjectLogs', options);
1834
+ /**
1835
+ * Gets project's logs
1836
+ *
1837
+ * Executes a SQL query on the project's logs.
1838
+ *
1839
+ * Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.
1840
+ * If both are not provided, only the last 1 minute of logs will be queried.
1841
+ * The timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.
1842
+ *
1843
+ * Note: Unless the `sql` parameter is provided, only edge_logs will be queried. See the [log query docs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer:~:text=logs%20from%20the-,Sources,-drop%2Ddown%3A) for all available sources.
1844
+ *
1845
+ */
1846
+ export const v1GetProjectLogsOptions = (options) => queryOptions({
1847
+ queryFn: async ({ queryKey, signal }) => {
1848
+ const { data } = await v1GetProjectLogs({
1849
+ ...options,
1850
+ ...queryKey[0],
1851
+ signal,
1852
+ throwOnError: true
1853
+ });
1854
+ return data;
1855
+ },
1856
+ queryKey: v1GetProjectLogsQueryKey(options)
1857
+ });
1858
+ export const v1GetProjectUsageApiCountQueryKey = (options) => createQueryKey('v1GetProjectUsageApiCount', options);
1859
+ /**
1860
+ * Gets project's usage api counts
1861
+ */
1862
+ export const v1GetProjectUsageApiCountOptions = (options) => queryOptions({
1863
+ queryFn: async ({ queryKey, signal }) => {
1864
+ const { data } = await v1GetProjectUsageApiCount({
1865
+ ...options,
1866
+ ...queryKey[0],
1867
+ signal,
1868
+ throwOnError: true
1869
+ });
1870
+ return data;
1871
+ },
1872
+ queryKey: v1GetProjectUsageApiCountQueryKey(options)
1873
+ });
1874
+ export const v1GetProjectUsageRequestCountQueryKey = (options) => createQueryKey('v1GetProjectUsageRequestCount', options);
1875
+ /**
1876
+ * Gets project's usage api requests count
1877
+ */
1878
+ export const v1GetProjectUsageRequestCountOptions = (options) => queryOptions({
1879
+ queryFn: async ({ queryKey, signal }) => {
1880
+ const { data } = await v1GetProjectUsageRequestCount({
1881
+ ...options,
1882
+ ...queryKey[0],
1883
+ signal,
1884
+ throwOnError: true
1885
+ });
1886
+ return data;
1887
+ },
1888
+ queryKey: v1GetProjectUsageRequestCountQueryKey(options)
1889
+ });
1890
+ export const v1GetProjectFunctionCombinedStatsQueryKey = (options) => createQueryKey('v1GetProjectFunctionCombinedStats', options);
1891
+ /**
1892
+ * Gets a project's function combined statistics
1893
+ */
1894
+ export const v1GetProjectFunctionCombinedStatsOptions = (options) => queryOptions({
1895
+ queryFn: async ({ queryKey, signal }) => {
1896
+ const { data } = await v1GetProjectFunctionCombinedStats({
1897
+ ...options,
1898
+ ...queryKey[0],
1899
+ signal,
1900
+ throwOnError: true
1901
+ });
1902
+ return data;
1903
+ },
1904
+ queryKey: v1GetProjectFunctionCombinedStatsQueryKey(options)
1905
+ });
1906
+ /**
1907
+ * [Beta] Delete existing login roles used by CLI
1908
+ */
1909
+ export const v1DeleteLoginRolesMutation = (options) => {
1910
+ const mutationOptions = {
1911
+ mutationFn: async (fnOptions) => {
1912
+ const { data } = await v1DeleteLoginRoles({
1913
+ ...options,
1914
+ ...fnOptions,
1915
+ throwOnError: true
1916
+ });
1917
+ return data;
1918
+ }
1919
+ };
1920
+ return mutationOptions;
1921
+ };
1922
+ /**
1923
+ * [Beta] Create a login role for CLI with temporary password
1924
+ */
1925
+ export const v1CreateLoginRoleMutation = (options) => {
1926
+ const mutationOptions = {
1927
+ mutationFn: async (fnOptions) => {
1928
+ const { data } = await v1CreateLoginRole({
1929
+ ...options,
1930
+ ...fnOptions,
1931
+ throwOnError: true
1932
+ });
1933
+ return data;
1934
+ }
1935
+ };
1936
+ return mutationOptions;
1937
+ };
1938
+ /**
1939
+ * [Beta] Rollback database migrations and remove them from history table
1940
+ *
1941
+ * Only available to selected partner OAuth apps
1942
+ */
1943
+ export const v1RollbackMigrationsMutation = (options) => {
1944
+ const mutationOptions = {
1945
+ mutationFn: async (fnOptions) => {
1946
+ const { data } = await v1RollbackMigrations({
1947
+ ...options,
1948
+ ...fnOptions,
1949
+ throwOnError: true
1950
+ });
1951
+ return data;
1952
+ }
1953
+ };
1954
+ return mutationOptions;
1955
+ };
1956
+ export const v1ListMigrationHistoryQueryKey = (options) => createQueryKey('v1ListMigrationHistory', options);
1957
+ /**
1958
+ * [Beta] List applied migration versions
1959
+ *
1960
+ * Only available to selected partner OAuth apps
1961
+ */
1962
+ export const v1ListMigrationHistoryOptions = (options) => queryOptions({
1963
+ queryFn: async ({ queryKey, signal }) => {
1964
+ const { data } = await v1ListMigrationHistory({
1965
+ ...options,
1966
+ ...queryKey[0],
1967
+ signal,
1968
+ throwOnError: true
1969
+ });
1970
+ return data;
1971
+ },
1972
+ queryKey: v1ListMigrationHistoryQueryKey(options)
1973
+ });
1974
+ /**
1975
+ * [Beta] Apply a database migration
1976
+ *
1977
+ * Only available to selected partner OAuth apps
1978
+ */
1979
+ export const v1ApplyAMigrationMutation = (options) => {
1980
+ const mutationOptions = {
1981
+ mutationFn: async (fnOptions) => {
1982
+ const { data } = await v1ApplyAMigration({
1983
+ ...options,
1984
+ ...fnOptions,
1985
+ throwOnError: true
1986
+ });
1987
+ return data;
1988
+ }
1989
+ };
1990
+ return mutationOptions;
1991
+ };
1992
+ /**
1993
+ * [Beta] Upsert a database migration without applying
1994
+ *
1995
+ * Only available to selected partner OAuth apps
1996
+ */
1997
+ export const v1UpsertAMigrationMutation = (options) => {
1998
+ const mutationOptions = {
1999
+ mutationFn: async (fnOptions) => {
2000
+ const { data } = await v1UpsertAMigration({
2001
+ ...options,
2002
+ ...fnOptions,
2003
+ throwOnError: true
2004
+ });
2005
+ return data;
2006
+ }
2007
+ };
2008
+ return mutationOptions;
2009
+ };
2010
+ export const v1GetAMigrationQueryKey = (options) => createQueryKey('v1GetAMigration', options);
2011
+ /**
2012
+ * [Beta] Fetch an existing entry from migration history
2013
+ *
2014
+ * Only available to selected partner OAuth apps
2015
+ */
2016
+ export const v1GetAMigrationOptions = (options) => queryOptions({
2017
+ queryFn: async ({ queryKey, signal }) => {
2018
+ const { data } = await v1GetAMigration({
2019
+ ...options,
2020
+ ...queryKey[0],
2021
+ signal,
2022
+ throwOnError: true
2023
+ });
2024
+ return data;
2025
+ },
2026
+ queryKey: v1GetAMigrationQueryKey(options)
2027
+ });
2028
+ /**
2029
+ * [Beta] Patch an existing entry in migration history
2030
+ *
2031
+ * Only available to selected partner OAuth apps
2032
+ */
2033
+ export const v1PatchAMigrationMutation = (options) => {
2034
+ const mutationOptions = {
2035
+ mutationFn: async (fnOptions) => {
2036
+ const { data } = await v1PatchAMigration({
2037
+ ...options,
2038
+ ...fnOptions,
2039
+ throwOnError: true
2040
+ });
2041
+ return data;
2042
+ }
2043
+ };
2044
+ return mutationOptions;
2045
+ };
2046
+ /**
2047
+ * [Beta] Run sql query
2048
+ */
2049
+ export const v1RunAQueryMutation = (options) => {
2050
+ const mutationOptions = {
2051
+ mutationFn: async (fnOptions) => {
2052
+ const { data } = await v1RunAQuery({
2053
+ ...options,
2054
+ ...fnOptions,
2055
+ throwOnError: true
2056
+ });
2057
+ return data;
2058
+ }
2059
+ };
2060
+ return mutationOptions;
2061
+ };
2062
+ /**
2063
+ * [Beta] Run a sql query as supabase_read_only_user
2064
+ *
2065
+ * All entity references must be schema qualified.
2066
+ */
2067
+ export const v1ReadOnlyQueryMutation = (options) => {
2068
+ const mutationOptions = {
2069
+ mutationFn: async (fnOptions) => {
2070
+ const { data } = await v1ReadOnlyQuery({
2071
+ ...options,
2072
+ ...fnOptions,
2073
+ throwOnError: true
2074
+ });
2075
+ return data;
2076
+ }
2077
+ };
2078
+ return mutationOptions;
2079
+ };
2080
+ /**
2081
+ * [Beta] Enables Database Webhooks on the project
2082
+ */
2083
+ export const v1EnableDatabaseWebhookMutation = (options) => {
2084
+ const mutationOptions = {
2085
+ mutationFn: async (fnOptions) => {
2086
+ const { data } = await v1EnableDatabaseWebhook({
2087
+ ...options,
2088
+ ...fnOptions,
2089
+ throwOnError: true
2090
+ });
2091
+ return data;
2092
+ }
2093
+ };
2094
+ return mutationOptions;
2095
+ };
2096
+ export const v1GetDatabaseMetadataQueryKey = (options) => createQueryKey('v1GetDatabaseMetadata', options);
2097
+ /**
2098
+ * Gets database metadata for the given project.
2099
+ *
2100
+ * This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.
2101
+ *
2102
+ * @deprecated
2103
+ */
2104
+ export const v1GetDatabaseMetadataOptions = (options) => queryOptions({
2105
+ queryFn: async ({ queryKey, signal }) => {
2106
+ const { data } = await v1GetDatabaseMetadata({
2107
+ ...options,
2108
+ ...queryKey[0],
2109
+ signal,
2110
+ throwOnError: true
2111
+ });
2112
+ return data;
2113
+ },
2114
+ queryKey: v1GetDatabaseMetadataQueryKey(options)
2115
+ });
2116
+ /**
2117
+ * Updates the database password
2118
+ */
2119
+ export const v1UpdateDatabasePasswordMutation = (options) => {
2120
+ const mutationOptions = {
2121
+ mutationFn: async (fnOptions) => {
2122
+ const { data } = await v1UpdateDatabasePassword({
2123
+ ...options,
2124
+ ...fnOptions,
2125
+ throwOnError: true
2126
+ });
2127
+ return data;
2128
+ }
2129
+ };
2130
+ return mutationOptions;
2131
+ };
2132
+ export const v1GetJitAccessQueryKey = (options) => createQueryKey('v1GetJitAccess', options);
2133
+ /**
2134
+ * Get user-id to role mappings for JIT access
2135
+ *
2136
+ * Mappings of roles a user can assume in the project database
2137
+ */
2138
+ export const v1GetJitAccessOptions = (options) => queryOptions({
2139
+ queryFn: async ({ queryKey, signal }) => {
2140
+ const { data } = await v1GetJitAccess({
2141
+ ...options,
2142
+ ...queryKey[0],
2143
+ signal,
2144
+ throwOnError: true
2145
+ });
2146
+ return data;
2147
+ },
2148
+ queryKey: v1GetJitAccessQueryKey(options)
2149
+ });
2150
+ /**
2151
+ * Authorize user-id to role mappings for JIT access
2152
+ *
2153
+ * Authorizes the request to assume a role in the project database
2154
+ */
2155
+ export const v1AuthorizeJitAccessMutation = (options) => {
2156
+ const mutationOptions = {
2157
+ mutationFn: async (fnOptions) => {
2158
+ const { data } = await v1AuthorizeJitAccess({
2159
+ ...options,
2160
+ ...fnOptions,
2161
+ throwOnError: true
2162
+ });
2163
+ return data;
2164
+ }
2165
+ };
2166
+ return mutationOptions;
2167
+ };
2168
+ /**
2169
+ * Updates a user mapping for JIT access
2170
+ *
2171
+ * Modifies the roles that can be assumed and for how long
2172
+ */
2173
+ export const v1UpdateJitAccessMutation = (options) => {
2174
+ const mutationOptions = {
2175
+ mutationFn: async (fnOptions) => {
2176
+ const { data } = await v1UpdateJitAccess({
2177
+ ...options,
2178
+ ...fnOptions,
2179
+ throwOnError: true
2180
+ });
2181
+ return data;
2182
+ }
2183
+ };
2184
+ return mutationOptions;
2185
+ };
2186
+ export const v1ListJitAccessQueryKey = (options) => createQueryKey('v1ListJitAccess', options);
2187
+ /**
2188
+ * List all user-id to role mappings for JIT access
2189
+ *
2190
+ * Mappings of roles a user can assume in the project database
2191
+ */
2192
+ export const v1ListJitAccessOptions = (options) => queryOptions({
2193
+ queryFn: async ({ queryKey, signal }) => {
2194
+ const { data } = await v1ListJitAccess({
2195
+ ...options,
2196
+ ...queryKey[0],
2197
+ signal,
2198
+ throwOnError: true
2199
+ });
2200
+ return data;
2201
+ },
2202
+ queryKey: v1ListJitAccessQueryKey(options)
2203
+ });
2204
+ /**
2205
+ * Delete JIT access by user-id
2206
+ *
2207
+ * Remove JIT mappings of a user, revoking all JIT database access
2208
+ */
2209
+ export const v1DeleteJitAccessMutation = (options) => {
2210
+ const mutationOptions = {
2211
+ mutationFn: async (fnOptions) => {
2212
+ const { data } = await v1DeleteJitAccess({
2213
+ ...options,
2214
+ ...fnOptions,
2215
+ throwOnError: true
2216
+ });
2217
+ return data;
2218
+ }
2219
+ };
2220
+ return mutationOptions;
2221
+ };
2222
+ export const v1ListAllFunctionsQueryKey = (options) => createQueryKey('v1ListAllFunctions', options);
2223
+ /**
2224
+ * List all functions
2225
+ *
2226
+ * Returns all functions you've previously added to the specified project.
2227
+ */
2228
+ export const v1ListAllFunctionsOptions = (options) => queryOptions({
2229
+ queryFn: async ({ queryKey, signal }) => {
2230
+ const { data } = await v1ListAllFunctions({
2231
+ ...options,
2232
+ ...queryKey[0],
2233
+ signal,
2234
+ throwOnError: true
2235
+ });
2236
+ return data;
2237
+ },
2238
+ queryKey: v1ListAllFunctionsQueryKey(options)
2239
+ });
2240
+ /**
2241
+ * Create a function
2242
+ *
2243
+ * This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.
2244
+ *
2245
+ * @deprecated
2246
+ */
2247
+ export const v1CreateAFunctionMutation = (options) => {
2248
+ const mutationOptions = {
2249
+ mutationFn: async (fnOptions) => {
2250
+ const { data } = await v1CreateAFunction({
2251
+ ...options,
2252
+ ...fnOptions,
2253
+ throwOnError: true
2254
+ });
2255
+ return data;
2256
+ }
2257
+ };
2258
+ return mutationOptions;
2259
+ };
2260
+ /**
2261
+ * Bulk update functions
2262
+ *
2263
+ * Bulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version.
2264
+ */
2265
+ export const v1BulkUpdateFunctionsMutation = (options) => {
2266
+ const mutationOptions = {
2267
+ mutationFn: async (fnOptions) => {
2268
+ const { data } = await v1BulkUpdateFunctions({
2269
+ ...options,
2270
+ ...fnOptions,
2271
+ throwOnError: true
2272
+ });
2273
+ return data;
2274
+ }
2275
+ };
2276
+ return mutationOptions;
2277
+ };
2278
+ /**
2279
+ * Deploy a function
2280
+ *
2281
+ * A new endpoint to deploy functions. It will create if function does not exist.
2282
+ */
2283
+ export const v1DeployAFunctionMutation = (options) => {
2284
+ const mutationOptions = {
2285
+ mutationFn: async (fnOptions) => {
2286
+ const { data } = await v1DeployAFunction({
2287
+ ...options,
2288
+ ...fnOptions,
2289
+ throwOnError: true
2290
+ });
2291
+ return data;
2292
+ }
2293
+ };
2294
+ return mutationOptions;
2295
+ };
2296
+ /**
2297
+ * Delete a function
2298
+ *
2299
+ * Deletes a function with the specified slug from the specified project.
2300
+ */
2301
+ export const v1DeleteAFunctionMutation = (options) => {
2302
+ const mutationOptions = {
2303
+ mutationFn: async (fnOptions) => {
2304
+ const { data } = await v1DeleteAFunction({
2305
+ ...options,
2306
+ ...fnOptions,
2307
+ throwOnError: true
2308
+ });
2309
+ return data;
2310
+ }
2311
+ };
2312
+ return mutationOptions;
2313
+ };
2314
+ export const v1GetAFunctionQueryKey = (options) => createQueryKey('v1GetAFunction', options);
2315
+ /**
2316
+ * Retrieve a function
2317
+ *
2318
+ * Retrieves a function with the specified slug and project.
2319
+ */
2320
+ export const v1GetAFunctionOptions = (options) => queryOptions({
2321
+ queryFn: async ({ queryKey, signal }) => {
2322
+ const { data } = await v1GetAFunction({
2323
+ ...options,
2324
+ ...queryKey[0],
2325
+ signal,
2326
+ throwOnError: true
2327
+ });
2328
+ return data;
2329
+ },
2330
+ queryKey: v1GetAFunctionQueryKey(options)
2331
+ });
2332
+ /**
2333
+ * Update a function
2334
+ *
2335
+ * Updates a function with the specified slug and project.
2336
+ */
2337
+ export const v1UpdateAFunctionMutation = (options) => {
2338
+ const mutationOptions = {
2339
+ mutationFn: async (fnOptions) => {
2340
+ const { data } = await v1UpdateAFunction({
2341
+ ...options,
2342
+ ...fnOptions,
2343
+ throwOnError: true
2344
+ });
2345
+ return data;
2346
+ }
2347
+ };
2348
+ return mutationOptions;
2349
+ };
2350
+ export const v1GetAFunctionBodyQueryKey = (options) => createQueryKey('v1GetAFunctionBody', options);
2351
+ /**
2352
+ * Retrieve a function body
2353
+ *
2354
+ * Retrieves a function body for the specified slug and project.
2355
+ */
2356
+ export const v1GetAFunctionBodyOptions = (options) => queryOptions({
2357
+ queryFn: async ({ queryKey, signal }) => {
2358
+ const { data } = await v1GetAFunctionBody({
2359
+ ...options,
2360
+ ...queryKey[0],
2361
+ signal,
2362
+ throwOnError: true
2363
+ });
2364
+ return data;
2365
+ },
2366
+ queryKey: v1GetAFunctionBodyQueryKey(options)
2367
+ });
2368
+ export const v1ListAllBucketsQueryKey = (options) => createQueryKey('v1ListAllBuckets', options);
2369
+ /**
2370
+ * Lists all buckets
2371
+ */
2372
+ export const v1ListAllBucketsOptions = (options) => queryOptions({
2373
+ queryFn: async ({ queryKey, signal }) => {
2374
+ const { data } = await v1ListAllBuckets({
2375
+ ...options,
2376
+ ...queryKey[0],
2377
+ signal,
2378
+ throwOnError: true
2379
+ });
2380
+ return data;
2381
+ },
2382
+ queryKey: v1ListAllBucketsQueryKey(options)
2383
+ });
2384
+ export const v1ListAllSsoProviderQueryKey = (options) => createQueryKey('v1ListAllSsoProvider', options);
2385
+ /**
2386
+ * Lists all SSO providers
2387
+ */
2388
+ export const v1ListAllSsoProviderOptions = (options) => queryOptions({
2389
+ queryFn: async ({ queryKey, signal }) => {
2390
+ const { data } = await v1ListAllSsoProvider({
2391
+ ...options,
2392
+ ...queryKey[0],
2393
+ signal,
2394
+ throwOnError: true
2395
+ });
2396
+ return data;
2397
+ },
2398
+ queryKey: v1ListAllSsoProviderQueryKey(options)
2399
+ });
2400
+ /**
2401
+ * Creates a new SSO provider
2402
+ */
2403
+ export const v1CreateAssoProviderMutation = (options) => {
2404
+ const mutationOptions = {
2405
+ mutationFn: async (fnOptions) => {
2406
+ const { data } = await v1CreateASsoProvider({
2407
+ ...options,
2408
+ ...fnOptions,
2409
+ throwOnError: true
2410
+ });
2411
+ return data;
2412
+ }
2413
+ };
2414
+ return mutationOptions;
2415
+ };
2416
+ /**
2417
+ * Removes a SSO provider by its UUID
2418
+ */
2419
+ export const v1DeleteAssoProviderMutation = (options) => {
2420
+ const mutationOptions = {
2421
+ mutationFn: async (fnOptions) => {
2422
+ const { data } = await v1DeleteASsoProvider({
2423
+ ...options,
2424
+ ...fnOptions,
2425
+ throwOnError: true
2426
+ });
2427
+ return data;
2428
+ }
2429
+ };
2430
+ return mutationOptions;
2431
+ };
2432
+ export const v1GetAssoProviderQueryKey = (options) => createQueryKey('v1GetASsoProvider', options);
2433
+ /**
2434
+ * Gets a SSO provider by its UUID
2435
+ */
2436
+ export const v1GetAssoProviderOptions = (options) => queryOptions({
2437
+ queryFn: async ({ queryKey, signal }) => {
2438
+ const { data } = await v1GetASsoProvider({
2439
+ ...options,
2440
+ ...queryKey[0],
2441
+ signal,
2442
+ throwOnError: true
2443
+ });
2444
+ return data;
2445
+ },
2446
+ queryKey: v1GetAssoProviderQueryKey(options)
2447
+ });
2448
+ /**
2449
+ * Updates a SSO provider by its UUID
2450
+ */
2451
+ export const v1UpdateAssoProviderMutation = (options) => {
2452
+ const mutationOptions = {
2453
+ mutationFn: async (fnOptions) => {
2454
+ const { data } = await v1UpdateASsoProvider({
2455
+ ...options,
2456
+ ...fnOptions,
2457
+ throwOnError: true
2458
+ });
2459
+ return data;
2460
+ }
2461
+ };
2462
+ return mutationOptions;
2463
+ };
2464
+ export const v1ListAllBackupsQueryKey = (options) => createQueryKey('v1ListAllBackups', options);
2465
+ /**
2466
+ * Lists all backups
2467
+ */
2468
+ export const v1ListAllBackupsOptions = (options) => queryOptions({
2469
+ queryFn: async ({ queryKey, signal }) => {
2470
+ const { data } = await v1ListAllBackups({
2471
+ ...options,
2472
+ ...queryKey[0],
2473
+ signal,
2474
+ throwOnError: true
2475
+ });
2476
+ return data;
2477
+ },
2478
+ queryKey: v1ListAllBackupsQueryKey(options)
2479
+ });
2480
+ /**
2481
+ * Restores a PITR backup for a database
2482
+ */
2483
+ export const v1RestorePitrBackupMutation = (options) => {
2484
+ const mutationOptions = {
2485
+ mutationFn: async (fnOptions) => {
2486
+ const { data } = await v1RestorePitrBackup({
2487
+ ...options,
2488
+ ...fnOptions,
2489
+ throwOnError: true
2490
+ });
2491
+ return data;
2492
+ }
2493
+ };
2494
+ return mutationOptions;
2495
+ };
2496
+ export const v1GetRestorePointQueryKey = (options) => createQueryKey('v1GetRestorePoint', options);
2497
+ /**
2498
+ * Get restore points for project
2499
+ */
2500
+ export const v1GetRestorePointOptions = (options) => queryOptions({
2501
+ queryFn: async ({ queryKey, signal }) => {
2502
+ const { data } = await v1GetRestorePoint({
2503
+ ...options,
2504
+ ...queryKey[0],
2505
+ signal,
2506
+ throwOnError: true
2507
+ });
2508
+ return data;
2509
+ },
2510
+ queryKey: v1GetRestorePointQueryKey(options)
2511
+ });
2512
+ /**
2513
+ * Initiates a creation of a restore point for a database
2514
+ */
2515
+ export const v1CreateRestorePointMutation = (options) => {
2516
+ const mutationOptions = {
2517
+ mutationFn: async (fnOptions) => {
2518
+ const { data } = await v1CreateRestorePoint({
2519
+ ...options,
2520
+ ...fnOptions,
2521
+ throwOnError: true
2522
+ });
2523
+ return data;
2524
+ }
2525
+ };
2526
+ return mutationOptions;
2527
+ };
2528
+ /**
2529
+ * Initiates an undo to a given restore point
2530
+ */
2531
+ export const v1UndoMutation = (options) => {
2532
+ const mutationOptions = {
2533
+ mutationFn: async (fnOptions) => {
2534
+ const { data } = await v1Undo({
2535
+ ...options,
2536
+ ...fnOptions,
2537
+ throwOnError: true
2538
+ });
2539
+ return data;
2540
+ }
2541
+ };
2542
+ return mutationOptions;
2543
+ };
2544
+ export const v1ListOrganizationMembersQueryKey = (options) => createQueryKey('v1ListOrganizationMembers', options);
2545
+ /**
2546
+ * List members of an organization
2547
+ */
2548
+ export const v1ListOrganizationMembersOptions = (options) => queryOptions({
2549
+ queryFn: async ({ queryKey, signal }) => {
2550
+ const { data } = await v1ListOrganizationMembers({
2551
+ ...options,
2552
+ ...queryKey[0],
2553
+ signal,
2554
+ throwOnError: true
2555
+ });
2556
+ return data;
2557
+ },
2558
+ queryKey: v1ListOrganizationMembersQueryKey(options)
2559
+ });
2560
+ export const v1GetAnOrganizationQueryKey = (options) => createQueryKey('v1GetAnOrganization', options);
2561
+ /**
2562
+ * Gets information about the organization
2563
+ */
2564
+ export const v1GetAnOrganizationOptions = (options) => queryOptions({
2565
+ queryFn: async ({ queryKey, signal }) => {
2566
+ const { data } = await v1GetAnOrganization({
2567
+ ...options,
2568
+ ...queryKey[0],
2569
+ signal,
2570
+ throwOnError: true
2571
+ });
2572
+ return data;
2573
+ },
2574
+ queryKey: v1GetAnOrganizationQueryKey(options)
2575
+ });
2576
+ export const v1GetOrganizationProjectClaimQueryKey = (options) => createQueryKey('v1GetOrganizationProjectClaim', options);
2577
+ /**
2578
+ * Gets project details for the specified organization and claim token
2579
+ */
2580
+ export const v1GetOrganizationProjectClaimOptions = (options) => queryOptions({
2581
+ queryFn: async ({ queryKey, signal }) => {
2582
+ const { data } = await v1GetOrganizationProjectClaim({
2583
+ ...options,
2584
+ ...queryKey[0],
2585
+ signal,
2586
+ throwOnError: true
2587
+ });
2588
+ return data;
2589
+ },
2590
+ queryKey: v1GetOrganizationProjectClaimQueryKey(options)
2591
+ });
2592
+ /**
2593
+ * Claims project for the specified organization
2594
+ */
2595
+ export const v1ClaimProjectForOrganizationMutation = (options) => {
2596
+ const mutationOptions = {
2597
+ mutationFn: async (fnOptions) => {
2598
+ const { data } = await v1ClaimProjectForOrganization({
2599
+ ...options,
2600
+ ...fnOptions,
2601
+ throwOnError: true
2602
+ });
2603
+ return data;
2604
+ }
2605
+ };
2606
+ return mutationOptions;
2607
+ };
2608
+ export const v1GetAllProjectsForOrganizationQueryKey = (options) => createQueryKey('v1GetAllProjectsForOrganization', options);
2609
+ /**
2610
+ * Gets all projects for the given organization
2611
+ *
2612
+ * Returns a paginated list of projects for the specified organization.
2613
+ *
2614
+ * This endpoint uses offset-based pagination. Use the `offset` parameter to skip a number of projects and the `limit` parameter to control the number of projects returned per page.
2615
+ */
2616
+ export const v1GetAllProjectsForOrganizationOptions = (options) => queryOptions({
2617
+ queryFn: async ({ queryKey, signal }) => {
2618
+ const { data } = await v1GetAllProjectsForOrganization({
2619
+ ...options,
2620
+ ...queryKey[0],
2621
+ signal,
2622
+ throwOnError: true
2623
+ });
2624
+ return data;
2625
+ },
2626
+ queryKey: v1GetAllProjectsForOrganizationQueryKey(options)
2627
+ });
2628
+ export const v1GetAllProjectsForOrganizationInfiniteQueryKey = (options) => createQueryKey('v1GetAllProjectsForOrganization', options, true);
2629
+ /**
2630
+ * Gets all projects for the given organization
2631
+ *
2632
+ * Returns a paginated list of projects for the specified organization.
2633
+ *
2634
+ * This endpoint uses offset-based pagination. Use the `offset` parameter to skip a number of projects and the `limit` parameter to control the number of projects returned per page.
2635
+ */
2636
+ export const v1GetAllProjectsForOrganizationInfiniteOptions = (options) => infiniteQueryOptions(
2637
+ // @ts-ignore
2638
+ {
2639
+ queryFn: async ({ pageParam, queryKey, signal }) => {
2640
+ // @ts-ignore
2641
+ const page = typeof pageParam === 'object' ? pageParam : {
2642
+ query: {
2643
+ offset: pageParam
2644
+ }
2645
+ };
2646
+ const params = createInfiniteParams(queryKey, page);
2647
+ const { data } = await v1GetAllProjectsForOrganization({
2648
+ ...options,
2649
+ ...params,
2650
+ signal,
2651
+ throwOnError: true
2652
+ });
2653
+ return data;
2654
+ },
2655
+ queryKey: v1GetAllProjectsForOrganizationInfiniteQueryKey(options)
2656
+ });
2657
+ //# sourceMappingURL=react-query.gen.js.map