@thunderid/react 1.0.8 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/dist/api/updateMeCredentials.d.ts +33 -0
  2. package/dist/api/updateMeCredentials.d.ts.map +1 -0
  3. package/dist/api/updateMeCredentials.js +29 -0
  4. package/dist/api/updateMeCredentials.js.map +1 -0
  5. package/dist/cjs/api/updateMeCredentials.cjs +31 -0
  6. package/dist/cjs/api/updateMeCredentials.cjs.map +1 -0
  7. package/dist/cjs/components/presentation/ChangeCredential/BaseChangeCredential.cjs +187 -0
  8. package/dist/cjs/components/presentation/ChangeCredential/BaseChangeCredential.cjs.map +1 -0
  9. package/dist/cjs/components/presentation/ChangeCredential/BaseChangeCredential.styles.cjs +108 -0
  10. package/dist/cjs/components/presentation/ChangeCredential/BaseChangeCredential.styles.cjs.map +1 -0
  11. package/dist/cjs/components/presentation/ChangeCredential/ChangeCredential.cjs +123 -0
  12. package/dist/cjs/components/presentation/ChangeCredential/ChangeCredential.cjs.map +1 -0
  13. package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs +1 -1
  14. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs +2 -2
  15. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -1
  16. package/dist/cjs/components/presentation/UserDropdown/UserDropdown.cjs +8 -4
  17. package/dist/cjs/components/presentation/UserDropdown/UserDropdown.cjs.map +1 -1
  18. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs +2 -0
  19. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs.map +1 -1
  20. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +13 -0
  21. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
  22. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs +69 -66
  23. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
  24. package/dist/cjs/components/primitives/KeyValueList/KeyValueList.cjs +41 -0
  25. package/dist/cjs/components/primitives/KeyValueList/KeyValueList.cjs.map +1 -0
  26. package/dist/cjs/components/primitives/KeyValueList/KeyValueList.styles.cjs +46 -0
  27. package/dist/cjs/components/primitives/KeyValueList/KeyValueList.styles.cjs.map +1 -0
  28. package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs +2 -2
  29. package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs.map +1 -1
  30. package/dist/cjs/contexts/Theme/ThemeProvider.cjs +26 -4
  31. package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
  32. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +2 -0
  33. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
  34. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +7 -1
  35. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
  36. package/dist/cjs/hooks/agents/useCreateAgent.cjs +26 -0
  37. package/dist/cjs/hooks/agents/useCreateAgent.cjs.map +1 -0
  38. package/dist/cjs/hooks/agents/useDeleteAgent.cjs +26 -0
  39. package/dist/cjs/hooks/agents/useDeleteAgent.cjs.map +1 -0
  40. package/dist/cjs/hooks/agents/useGetAgent.cjs +30 -0
  41. package/dist/cjs/hooks/agents/useGetAgent.cjs.map +1 -0
  42. package/dist/cjs/hooks/agents/useGetAgents.cjs +31 -0
  43. package/dist/cjs/hooks/agents/useGetAgents.cjs.map +1 -0
  44. package/dist/cjs/hooks/agents/useUpdateAgent.cjs +27 -0
  45. package/dist/cjs/hooks/agents/useUpdateAgent.cjs.map +1 -0
  46. package/dist/cjs/hooks/applications/useCreateApplication.cjs +31 -0
  47. package/dist/cjs/hooks/applications/useCreateApplication.cjs.map +1 -0
  48. package/dist/cjs/hooks/applications/useDeleteApplication.cjs +26 -0
  49. package/dist/cjs/hooks/applications/useDeleteApplication.cjs.map +1 -0
  50. package/dist/cjs/hooks/applications/useGetApplication.cjs +35 -0
  51. package/dist/cjs/hooks/applications/useGetApplication.cjs.map +1 -0
  52. package/dist/cjs/hooks/applications/useGetApplications.cjs +36 -0
  53. package/dist/cjs/hooks/applications/useGetApplications.cjs.map +1 -0
  54. package/dist/cjs/hooks/applications/useUpdateApplication.cjs +27 -0
  55. package/dist/cjs/hooks/applications/useUpdateApplication.cjs.map +1 -0
  56. package/dist/cjs/hooks/useManagementEndpoint.cjs +25 -0
  57. package/dist/cjs/hooks/useManagementEndpoint.cjs.map +1 -0
  58. package/dist/cjs/hooks/useResourceMutation.cjs +72 -0
  59. package/dist/cjs/hooks/useResourceMutation.cjs.map +1 -0
  60. package/dist/cjs/hooks/useResourceQuery.cjs +86 -0
  61. package/dist/cjs/hooks/useResourceQuery.cjs.map +1 -0
  62. package/dist/cjs/hooks/users/useCreateUser.cjs +26 -0
  63. package/dist/cjs/hooks/users/useCreateUser.cjs.map +1 -0
  64. package/dist/cjs/hooks/users/useDeleteUser.cjs +26 -0
  65. package/dist/cjs/hooks/users/useDeleteUser.cjs.map +1 -0
  66. package/dist/cjs/hooks/users/useGetUser.cjs +30 -0
  67. package/dist/cjs/hooks/users/useGetUser.cjs.map +1 -0
  68. package/dist/cjs/hooks/users/useGetUsers.cjs +38 -0
  69. package/dist/cjs/hooks/users/useGetUsers.cjs.map +1 -0
  70. package/dist/cjs/hooks/users/useUpdateUser.cjs +27 -0
  71. package/dist/cjs/hooks/users/useUpdateUser.cjs.map +1 -0
  72. package/dist/cjs/index.cjs +152 -0
  73. package/dist/cjs/utils/createAuthenticatedFetcher.cjs +43 -0
  74. package/dist/cjs/utils/createAuthenticatedFetcher.cjs.map +1 -0
  75. package/dist/cjs/utils/createResourceInvalidator.cjs +38 -0
  76. package/dist/cjs/utils/createResourceInvalidator.cjs.map +1 -0
  77. package/dist/components/actions/SignInButton/BaseSignInButton.js +2 -2
  78. package/dist/components/actions/SignInButton/BaseSignInButton.js.map +1 -1
  79. package/dist/components/actions/SignOutButton/BaseSignOutButton.js +2 -2
  80. package/dist/components/actions/SignOutButton/BaseSignOutButton.js.map +1 -1
  81. package/dist/components/actions/SignUpButton/BaseSignUpButton.js +2 -2
  82. package/dist/components/actions/SignUpButton/BaseSignUpButton.js.map +1 -1
  83. package/dist/components/adapters/FlowTimer.js +2 -2
  84. package/dist/components/adapters/FlowTimer.js.map +1 -1
  85. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.d.ts +100 -0
  86. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.d.ts.map +1 -0
  87. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.js +183 -0
  88. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.js.map +1 -0
  89. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.styles.d.ts +10 -0
  90. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.styles.d.ts.map +1 -0
  91. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.styles.js +108 -0
  92. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.styles.js.map +1 -0
  93. package/dist/components/presentation/ChangeCredential/ChangeCredential.d.ts +55 -0
  94. package/dist/components/presentation/ChangeCredential/ChangeCredential.d.ts.map +1 -0
  95. package/dist/components/presentation/ChangeCredential/ChangeCredential.js +119 -0
  96. package/dist/components/presentation/ChangeCredential/ChangeCredential.js.map +1 -0
  97. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js +3 -3
  98. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js.map +1 -1
  99. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +5 -0
  100. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
  101. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js +2 -2
  102. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -1
  103. package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +12 -0
  104. package/dist/components/presentation/UserDropdown/UserDropdown.d.ts.map +1 -1
  105. package/dist/components/presentation/UserDropdown/UserDropdown.js +11 -7
  106. package/dist/components/presentation/UserDropdown/UserDropdown.js.map +1 -1
  107. package/dist/components/presentation/UserProfile/BaseUserProfile.js +8 -8
  108. package/dist/components/presentation/UserProfile/BaseUserProfile.js.map +1 -1
  109. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts.map +1 -1
  110. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js +2 -0
  111. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js.map +1 -1
  112. package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
  113. package/dist/components/presentation/auth/AuthOptionFactory.js +14 -1
  114. package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
  115. package/dist/components/presentation/auth/SignIn/SignIn.js +2 -2
  116. package/dist/components/presentation/auth/SignIn/SignIn.js.map +1 -1
  117. package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
  118. package/dist/components/presentation/auth/SignUp/BaseSignUp.js +69 -66
  119. package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
  120. package/dist/components/primitives/AffixedField/AffixedField.js +2 -2
  121. package/dist/components/primitives/AffixedField/AffixedField.js.map +1 -1
  122. package/dist/components/primitives/KeyValueList/KeyValueList.d.ts +19 -0
  123. package/dist/components/primitives/KeyValueList/KeyValueList.d.ts.map +1 -0
  124. package/dist/components/primitives/KeyValueList/KeyValueList.js +38 -0
  125. package/dist/components/primitives/KeyValueList/KeyValueList.js.map +1 -0
  126. package/dist/components/primitives/KeyValueList/KeyValueList.styles.d.ts +4 -0
  127. package/dist/components/primitives/KeyValueList/KeyValueList.styles.d.ts.map +1 -0
  128. package/dist/components/primitives/KeyValueList/KeyValueList.styles.js +44 -0
  129. package/dist/components/primitives/KeyValueList/KeyValueList.styles.js.map +1 -0
  130. package/dist/components/primitives/PasswordField/PasswordField.d.ts +6 -0
  131. package/dist/components/primitives/PasswordField/PasswordField.d.ts.map +1 -1
  132. package/dist/components/primitives/PasswordField/PasswordField.js +2 -2
  133. package/dist/components/primitives/PasswordField/PasswordField.js.map +1 -1
  134. package/dist/contexts/Theme/ThemeProvider.d.ts +1 -1
  135. package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
  136. package/dist/contexts/Theme/ThemeProvider.js +27 -5
  137. package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
  138. package/dist/contexts/ThunderID/ThunderIDContext.d.ts +12 -1
  139. package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
  140. package/dist/contexts/ThunderID/ThunderIDContext.js +2 -0
  141. package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
  142. package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
  143. package/dist/contexts/ThunderID/ThunderIDProvider.js +7 -1
  144. package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
  145. package/dist/hooks/agents/useCreateAgent.d.ts +11 -0
  146. package/dist/hooks/agents/useCreateAgent.d.ts.map +1 -0
  147. package/dist/hooks/agents/useCreateAgent.js +24 -0
  148. package/dist/hooks/agents/useCreateAgent.js.map +1 -0
  149. package/dist/hooks/agents/useDeleteAgent.d.ts +10 -0
  150. package/dist/hooks/agents/useDeleteAgent.d.ts.map +1 -0
  151. package/dist/hooks/agents/useDeleteAgent.js +24 -0
  152. package/dist/hooks/agents/useDeleteAgent.js.map +1 -0
  153. package/dist/hooks/agents/useGetAgent.d.ts +12 -0
  154. package/dist/hooks/agents/useGetAgent.d.ts.map +1 -0
  155. package/dist/hooks/agents/useGetAgent.js +28 -0
  156. package/dist/hooks/agents/useGetAgent.js.map +1 -0
  157. package/dist/hooks/agents/useGetAgents.d.ts +19 -0
  158. package/dist/hooks/agents/useGetAgents.d.ts.map +1 -0
  159. package/dist/hooks/agents/useGetAgents.js +29 -0
  160. package/dist/hooks/agents/useGetAgents.js.map +1 -0
  161. package/dist/hooks/agents/useUpdateAgent.d.ts +18 -0
  162. package/dist/hooks/agents/useUpdateAgent.d.ts.map +1 -0
  163. package/dist/hooks/agents/useUpdateAgent.js +25 -0
  164. package/dist/hooks/agents/useUpdateAgent.js.map +1 -0
  165. package/dist/hooks/applications/useCreateApplication.d.ts +16 -0
  166. package/dist/hooks/applications/useCreateApplication.d.ts.map +1 -0
  167. package/dist/hooks/applications/useCreateApplication.js +29 -0
  168. package/dist/hooks/applications/useCreateApplication.js.map +1 -0
  169. package/dist/hooks/applications/useDeleteApplication.d.ts +10 -0
  170. package/dist/hooks/applications/useDeleteApplication.d.ts.map +1 -0
  171. package/dist/hooks/applications/useDeleteApplication.js +24 -0
  172. package/dist/hooks/applications/useDeleteApplication.js.map +1 -0
  173. package/dist/hooks/applications/useGetApplication.d.ts +17 -0
  174. package/dist/hooks/applications/useGetApplication.d.ts.map +1 -0
  175. package/dist/hooks/applications/useGetApplication.js +33 -0
  176. package/dist/hooks/applications/useGetApplication.js.map +1 -0
  177. package/dist/hooks/applications/useGetApplications.d.ts +24 -0
  178. package/dist/hooks/applications/useGetApplications.d.ts.map +1 -0
  179. package/dist/hooks/applications/useGetApplications.js +34 -0
  180. package/dist/hooks/applications/useGetApplications.js.map +1 -0
  181. package/dist/hooks/applications/useUpdateApplication.d.ts +18 -0
  182. package/dist/hooks/applications/useUpdateApplication.d.ts.map +1 -0
  183. package/dist/hooks/applications/useUpdateApplication.js +25 -0
  184. package/dist/hooks/applications/useUpdateApplication.js.map +1 -0
  185. package/dist/hooks/useManagementEndpoint.d.ts +22 -0
  186. package/dist/hooks/useManagementEndpoint.d.ts.map +1 -0
  187. package/dist/hooks/useManagementEndpoint.js +23 -0
  188. package/dist/hooks/useManagementEndpoint.js.map +1 -0
  189. package/dist/hooks/useResourceMutation.d.ts +51 -0
  190. package/dist/hooks/useResourceMutation.d.ts.map +1 -0
  191. package/dist/hooks/useResourceMutation.js +70 -0
  192. package/dist/hooks/useResourceMutation.js.map +1 -0
  193. package/dist/hooks/useResourceQuery.d.ts +45 -0
  194. package/dist/hooks/useResourceQuery.d.ts.map +1 -0
  195. package/dist/hooks/useResourceQuery.js +83 -0
  196. package/dist/hooks/useResourceQuery.js.map +1 -0
  197. package/dist/hooks/users/useCreateUser.d.ts +11 -0
  198. package/dist/hooks/users/useCreateUser.d.ts.map +1 -0
  199. package/dist/hooks/users/useCreateUser.js +24 -0
  200. package/dist/hooks/users/useCreateUser.js.map +1 -0
  201. package/dist/hooks/users/useDeleteUser.d.ts +10 -0
  202. package/dist/hooks/users/useDeleteUser.d.ts.map +1 -0
  203. package/dist/hooks/users/useDeleteUser.js +24 -0
  204. package/dist/hooks/users/useDeleteUser.js.map +1 -0
  205. package/dist/hooks/users/useGetUser.d.ts +12 -0
  206. package/dist/hooks/users/useGetUser.d.ts.map +1 -0
  207. package/dist/hooks/users/useGetUser.js +28 -0
  208. package/dist/hooks/users/useGetUser.js.map +1 -0
  209. package/dist/hooks/users/useGetUsers.d.ts +17 -0
  210. package/dist/hooks/users/useGetUsers.d.ts.map +1 -0
  211. package/dist/hooks/users/useGetUsers.js +36 -0
  212. package/dist/hooks/users/useGetUsers.js.map +1 -0
  213. package/dist/hooks/users/useUpdateUser.d.ts +18 -0
  214. package/dist/hooks/users/useUpdateUser.d.ts.map +1 -0
  215. package/dist/hooks/users/useUpdateUser.js +25 -0
  216. package/dist/hooks/users/useUpdateUser.js.map +1 -0
  217. package/dist/index.d.ts +32 -1
  218. package/dist/index.d.ts.map +1 -1
  219. package/dist/index.js +21 -2
  220. package/dist/models/config.d.ts +13 -1
  221. package/dist/models/config.d.ts.map +1 -1
  222. package/dist/utils/createAuthenticatedFetcher.d.ts +14 -0
  223. package/dist/utils/createAuthenticatedFetcher.d.ts.map +1 -0
  224. package/dist/utils/createAuthenticatedFetcher.js +41 -0
  225. package/dist/utils/createAuthenticatedFetcher.js.map +1 -0
  226. package/dist/utils/createResourceInvalidator.d.ts +29 -0
  227. package/dist/utils/createResourceInvalidator.d.ts.map +1 -0
  228. package/dist/utils/createResourceInvalidator.js +36 -0
  229. package/dist/utils/createResourceInvalidator.js.map +1 -0
  230. package/package.json +4 -4
@@ -0,0 +1,10 @@
1
+ import { ResourceMutationOptions, ResourceMutationResult } from '../useResourceMutation';
2
+ /**
3
+ * Deletes an agent, then refetches any mounted agent lists.
4
+ *
5
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
6
+ * @returns The mutation state. Call `mutate(agentId)` to delete.
7
+ */
8
+ declare const useDeleteAgent: (options?: ResourceMutationOptions<void, string>) => ResourceMutationResult<void, string>;
9
+ export default useDeleteAgent;
10
+ //# sourceMappingURL=useDeleteAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeleteAgent.d.ts","sourceRoot":"","sources":["../../../src/hooks/agents/useDeleteAgent.ts"],"names":[],"mappings":"AAKA,OAA4B,EAAC,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,wBAAwB,CAAC;AAE5G;;;;;GAKG;AACH,QAAA,MAAM,cAAc,GAAI,UAAU,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,KAAG,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAQ5G,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceMutation_default from "../useResourceMutation.js";
3
+ import { AgentQueryKeys, deleteAgent } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/agents/useDeleteAgent.ts
6
+ /**
7
+ * Deletes an agent, then refetches any mounted agent lists.
8
+ *
9
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
10
+ * @returns The mutation state. Call `mutate(agentId)` to delete.
11
+ */
12
+ const useDeleteAgent = (options) => {
13
+ const endpoint = useManagementEndpoint_default("agents");
14
+ return useResourceMutation_default((agentId, fetcher) => deleteAgent({
15
+ ...endpoint,
16
+ agentId,
17
+ fetcher
18
+ }), () => [[AgentQueryKeys.AGENTS]], options);
19
+ };
20
+ var useDeleteAgent_default = useDeleteAgent;
21
+
22
+ //#endregion
23
+ export { useDeleteAgent_default as default };
24
+ //# sourceMappingURL=useDeleteAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeleteAgent.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceMutation"],"sources":["../../../src/hooks/agents/useDeleteAgent.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {AgentQueryKeys, deleteAgent} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceMutation, {ResourceMutationOptions, ResourceMutationResult} from '../useResourceMutation';\n\n/**\n * Deletes an agent, then refetches any mounted agent lists.\n *\n * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.\n * @returns The mutation state. Call `mutate(agentId)` to delete.\n */\nconst useDeleteAgent = (options?: ResourceMutationOptions<void, string>): ResourceMutationResult<void, string> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('agents');\n\n return useResourceMutation(\n (agentId: string, fetcher) => deleteAgent({...endpoint, agentId, fetcher}),\n () => [[AgentQueryKeys.AGENTS]],\n options,\n );\n};\n\nexport default useDeleteAgent;\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,kBAAkB,YAA0F;CAChH,MAAMA,WAA+BC,8BAAsB,SAAS;AAEpE,QAAOC,6BACJ,SAAiB,YAAY,YAAY;EAAC,GAAG;EAAU;EAAS;EAAQ,CAAC,QACpE,CAAC,CAAC,eAAe,OAAO,CAAC,EAC/B,QACD;;AAGH,6BAAe"}
@@ -0,0 +1,12 @@
1
+ import { Agent } from '@thunderid/browser';
2
+ import { ResourceQueryOptions, ResourceQueryResult } from '../useResourceQuery';
3
+ /**
4
+ * Fetches a single agent. Does nothing until `agentId` is set.
5
+ *
6
+ * @param agentId - Identifier of the agent.
7
+ * @param options - Query options, including a per-hook `fetcher`.
8
+ * @returns The query state.
9
+ */
10
+ declare const useGetAgent: (agentId: string | undefined, options?: ResourceQueryOptions) => ResourceQueryResult<Agent>;
11
+ export default useGetAgent;
12
+ //# sourceMappingURL=useGetAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetAgent.d.ts","sourceRoot":"","sources":["../../../src/hooks/agents/useGetAgent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,EAA2B,MAAM,oBAAoB,CAAC;AAEnE,OAAyB,EAAC,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAEhG;;;;;;GAMG;AACH,QAAA,MAAM,WAAW,GAAI,SAAS,MAAM,GAAG,SAAS,EAAE,UAAU,oBAAoB,KAAG,mBAAmB,CAAC,KAAK,CAQ3G,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,28 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceQuery_default from "../useResourceQuery.js";
3
+ import { AgentQueryKeys, getAgent } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/agents/useGetAgent.ts
6
+ /**
7
+ * Fetches a single agent. Does nothing until `agentId` is set.
8
+ *
9
+ * @param agentId - Identifier of the agent.
10
+ * @param options - Query options, including a per-hook `fetcher`.
11
+ * @returns The query state.
12
+ */
13
+ const useGetAgent = (agentId, options) => {
14
+ const endpoint = useManagementEndpoint_default("agents");
15
+ return useResourceQuery_default([AgentQueryKeys.AGENT, agentId], (fetcher) => getAgent({
16
+ ...endpoint,
17
+ agentId,
18
+ fetcher
19
+ }), {
20
+ ...options,
21
+ enabled: Boolean(agentId) && options?.enabled !== false
22
+ });
23
+ };
24
+ var useGetAgent_default = useGetAgent;
25
+
26
+ //#endregion
27
+ export { useGetAgent_default as default };
28
+ //# sourceMappingURL=useGetAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetAgent.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceQuery"],"sources":["../../../src/hooks/agents/useGetAgent.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Agent, AgentQueryKeys, getAgent} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceQuery, {ResourceQueryOptions, ResourceQueryResult} from '../useResourceQuery';\n\n/**\n * Fetches a single agent. Does nothing until `agentId` is set.\n *\n * @param agentId - Identifier of the agent.\n * @param options - Query options, including a per-hook `fetcher`.\n * @returns The query state.\n */\nconst useGetAgent = (agentId: string | undefined, options?: ResourceQueryOptions): ResourceQueryResult<Agent> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('agents');\n\n return useResourceQuery(\n [AgentQueryKeys.AGENT, agentId],\n (fetcher) => getAgent({...endpoint, agentId: agentId!, fetcher}),\n {...options, enabled: Boolean(agentId) && options?.enabled !== false},\n );\n};\n\nexport default useGetAgent;\n"],"mappings":";;;;;;;;;;;;AAcA,MAAM,eAAe,SAA6B,YAA+D;CAC/G,MAAMA,WAA+BC,8BAAsB,SAAS;AAEpE,QAAOC,yBACL,CAAC,eAAe,OAAO,QAAQ,GAC9B,YAAY,SAAS;EAAC,GAAG;EAAmB;EAAU;EAAQ,CAAC,EAChE;EAAC,GAAG;EAAS,SAAS,QAAQ,QAAQ,IAAI,SAAS,YAAY;EAAM,CACtE;;AAGH,0BAAe"}
@@ -0,0 +1,19 @@
1
+ import { AgentListResponse } from '@thunderid/browser';
2
+ import { ResourceQueryOptions, ResourceQueryResult } from '../useResourceQuery';
3
+ /**
4
+ * Parameters for {@link useGetAgents}.
5
+ */
6
+ export interface UseGetAgentsParams {
7
+ limit?: number;
8
+ offset?: number;
9
+ }
10
+ /**
11
+ * Fetches a page of agents.
12
+ *
13
+ * @param params - Pagination parameters.
14
+ * @param options - Query options, including a per-hook `fetcher`.
15
+ * @returns The query state.
16
+ */
17
+ declare const useGetAgents: ({ limit, offset }?: UseGetAgentsParams, options?: ResourceQueryOptions) => ResourceQueryResult<AgentListResponse>;
18
+ export default useGetAgents;
19
+ //# sourceMappingURL=useGetAgents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetAgents.d.ts","sourceRoot":"","sources":["../../../src/hooks/agents/useGetAgents.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,iBAAiB,EAA4B,MAAM,oBAAoB,CAAC;AAEhF,OAAyB,EAAC,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,YAAY,GAChB,oBAAiB,kBAAuB,EACxC,UAAU,oBAAoB,KAC7B,mBAAmB,CAAC,iBAAiB,CAQvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceQuery_default from "../useResourceQuery.js";
3
+ import { AgentQueryKeys, getAgents } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/agents/useGetAgents.ts
6
+ /**
7
+ * Fetches a page of agents.
8
+ *
9
+ * @param params - Pagination parameters.
10
+ * @param options - Query options, including a per-hook `fetcher`.
11
+ * @returns The query state.
12
+ */
13
+ const useGetAgents = ({ limit, offset } = {}, options) => {
14
+ const endpoint = useManagementEndpoint_default("agents");
15
+ return useResourceQuery_default([AgentQueryKeys.AGENTS, {
16
+ limit,
17
+ offset
18
+ }], (fetcher) => getAgents({
19
+ ...endpoint,
20
+ fetcher,
21
+ limit,
22
+ offset
23
+ }), options);
24
+ };
25
+ var useGetAgents_default = useGetAgents;
26
+
27
+ //#endregion
28
+ export { useGetAgents_default as default };
29
+ //# sourceMappingURL=useGetAgents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetAgents.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceQuery"],"sources":["../../../src/hooks/agents/useGetAgents.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {AgentListResponse, AgentQueryKeys, getAgents} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceQuery, {ResourceQueryOptions, ResourceQueryResult} from '../useResourceQuery';\n\n/**\n * Parameters for {@link useGetAgents}.\n */\nexport interface UseGetAgentsParams {\n limit?: number;\n offset?: number;\n}\n\n/**\n * Fetches a page of agents.\n *\n * @param params - Pagination parameters.\n * @param options - Query options, including a per-hook `fetcher`.\n * @returns The query state.\n */\nconst useGetAgents = (\n {limit, offset}: UseGetAgentsParams = {},\n options?: ResourceQueryOptions,\n): ResourceQueryResult<AgentListResponse> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('agents');\n\n return useResourceQuery(\n [AgentQueryKeys.AGENTS, {limit, offset}],\n (fetcher) => getAgents({...endpoint, fetcher, limit, offset}),\n options,\n );\n};\n\nexport default useGetAgents;\n"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,gBACJ,EAAC,OAAO,WAA8B,EAAE,EACxC,YAC2C;CAC3C,MAAMA,WAA+BC,8BAAsB,SAAS;AAEpE,QAAOC,yBACL,CAAC,eAAe,QAAQ;EAAC;EAAO;EAAO,CAAC,GACvC,YAAY,UAAU;EAAC,GAAG;EAAU;EAAS;EAAO;EAAO,CAAC,EAC7D,QACD;;AAGH,2BAAe"}
@@ -0,0 +1,18 @@
1
+ import { Agent, UpdateAgentRequest } from '@thunderid/browser';
2
+ import { ResourceMutationOptions, ResourceMutationResult } from '../useResourceMutation';
3
+ /**
4
+ * Variables accepted by {@link useUpdateAgent}'s `mutate`.
5
+ */
6
+ export interface UpdateAgentVariables {
7
+ agentId: string;
8
+ data: UpdateAgentRequest;
9
+ }
10
+ /**
11
+ * Updates an agent, then refetches it and any mounted agent lists.
12
+ *
13
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
14
+ * @returns The mutation state. Call `mutate({agentId, data})` to update.
15
+ */
16
+ declare const useUpdateAgent: (options?: ResourceMutationOptions<Agent, UpdateAgentVariables>) => ResourceMutationResult<Agent, UpdateAgentVariables>;
17
+ export default useUpdateAgent;
18
+ //# sourceMappingURL=useUpdateAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateAgent.d.ts","sourceRoot":"","sources":["../../../src/hooks/agents/useUpdateAgent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,EAAkB,kBAAkB,EAAc,MAAM,oBAAoB,CAAC;AAE1F,OAA4B,EAAC,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,wBAAwB,CAAC;AAE5G;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,QAAA,MAAM,cAAc,GAClB,UAAU,uBAAuB,CAAC,KAAK,EAAE,oBAAoB,CAAC,KAC7D,sBAAsB,CAAC,KAAK,EAAE,oBAAoB,CAQpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,25 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceMutation_default from "../useResourceMutation.js";
3
+ import { AgentQueryKeys, updateAgent } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/agents/useUpdateAgent.ts
6
+ /**
7
+ * Updates an agent, then refetches it and any mounted agent lists.
8
+ *
9
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
10
+ * @returns The mutation state. Call `mutate({agentId, data})` to update.
11
+ */
12
+ const useUpdateAgent = (options) => {
13
+ const endpoint = useManagementEndpoint_default("agents");
14
+ return useResourceMutation_default(({ agentId, data }, fetcher) => updateAgent({
15
+ ...endpoint,
16
+ agentId,
17
+ fetcher,
18
+ payload: data
19
+ }), ({ agentId }) => [[AgentQueryKeys.AGENT, agentId], [AgentQueryKeys.AGENTS]], options);
20
+ };
21
+ var useUpdateAgent_default = useUpdateAgent;
22
+
23
+ //#endregion
24
+ export { useUpdateAgent_default as default };
25
+ //# sourceMappingURL=useUpdateAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateAgent.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceMutation"],"sources":["../../../src/hooks/agents/useUpdateAgent.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Agent, AgentQueryKeys, UpdateAgentRequest, updateAgent} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceMutation, {ResourceMutationOptions, ResourceMutationResult} from '../useResourceMutation';\n\n/**\n * Variables accepted by {@link useUpdateAgent}'s `mutate`.\n */\nexport interface UpdateAgentVariables {\n agentId: string;\n data: UpdateAgentRequest;\n}\n\n/**\n * Updates an agent, then refetches it and any mounted agent lists.\n *\n * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.\n * @returns The mutation state. Call `mutate({agentId, data})` to update.\n */\nconst useUpdateAgent = (\n options?: ResourceMutationOptions<Agent, UpdateAgentVariables>,\n): ResourceMutationResult<Agent, UpdateAgentVariables> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('agents');\n\n return useResourceMutation(\n ({agentId, data}: UpdateAgentVariables, fetcher) => updateAgent({...endpoint, agentId, fetcher, payload: data}),\n ({agentId}: UpdateAgentVariables) => [[AgentQueryKeys.AGENT, agentId], [AgentQueryKeys.AGENTS]],\n options,\n );\n};\n\nexport default useUpdateAgent;\n"],"mappings":";;;;;;;;;;;AAqBA,MAAM,kBACJ,YACwD;CACxD,MAAMA,WAA+BC,8BAAsB,SAAS;AAEpE,QAAOC,6BACJ,EAAC,SAAS,QAA6B,YAAY,YAAY;EAAC,GAAG;EAAU;EAAS;EAAS,SAAS;EAAK,CAAC,GAC9G,EAAC,cAAmC,CAAC,CAAC,eAAe,OAAO,QAAQ,EAAE,CAAC,eAAe,OAAO,CAAC,EAC/F,QACD;;AAGH,6BAAe"}
@@ -0,0 +1,16 @@
1
+ import { Application, CreateApplicationRequest } from '@thunderid/browser';
2
+ import { ResourceMutationOptions, ResourceMutationResult } from '../useResourceMutation';
3
+ /**
4
+ * Creates an application, then refetches any mounted application lists.
5
+ *
6
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
7
+ * @returns The mutation state. Call `mutate(payload)` to create.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * const {mutate, isLoading, error} = useCreateApplication({onSuccess: app => navigate(app.id)});
12
+ * ```
13
+ */
14
+ declare const useCreateApplication: (options?: ResourceMutationOptions<Application, CreateApplicationRequest>) => ResourceMutationResult<Application, CreateApplicationRequest>;
15
+ export default useCreateApplication;
16
+ //# sourceMappingURL=useCreateApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateApplication.d.ts","sourceRoot":"","sources":["../../../src/hooks/applications/useCreateApplication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAwB,wBAAwB,EAAoB,MAAM,oBAAoB,CAAC;AAElH,OAA4B,EAAC,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,wBAAwB,CAAC;AAE5G;;;;;;;;;;GAUG;AACH,QAAA,MAAM,oBAAoB,GACxB,UAAU,uBAAuB,CAAC,WAAW,EAAE,wBAAwB,CAAC,KACvE,sBAAsB,CAAC,WAAW,EAAE,wBAAwB,CAQ9D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceMutation_default from "../useResourceMutation.js";
3
+ import { ApplicationQueryKeys, createApplication } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/applications/useCreateApplication.ts
6
+ /**
7
+ * Creates an application, then refetches any mounted application lists.
8
+ *
9
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
10
+ * @returns The mutation state. Call `mutate(payload)` to create.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * const {mutate, isLoading, error} = useCreateApplication({onSuccess: app => navigate(app.id)});
15
+ * ```
16
+ */
17
+ const useCreateApplication = (options) => {
18
+ const endpoint = useManagementEndpoint_default("applications");
19
+ return useResourceMutation_default((payload, fetcher) => createApplication({
20
+ ...endpoint,
21
+ fetcher,
22
+ payload
23
+ }), () => [[ApplicationQueryKeys.APPLICATIONS]], options);
24
+ };
25
+ var useCreateApplication_default = useCreateApplication;
26
+
27
+ //#endregion
28
+ export { useCreateApplication_default as default };
29
+ //# sourceMappingURL=useCreateApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateApplication.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceMutation"],"sources":["../../../src/hooks/applications/useCreateApplication.ts"],"sourcesContent":["// Copyright 2025-2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Application, ApplicationQueryKeys, CreateApplicationRequest, createApplication} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceMutation, {ResourceMutationOptions, ResourceMutationResult} from '../useResourceMutation';\n\n/**\n * Creates an application, then refetches any mounted application lists.\n *\n * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.\n * @returns The mutation state. Call `mutate(payload)` to create.\n *\n * @example\n * ```tsx\n * const {mutate, isLoading, error} = useCreateApplication({onSuccess: app => navigate(app.id)});\n * ```\n */\nconst useCreateApplication = (\n options?: ResourceMutationOptions<Application, CreateApplicationRequest>,\n): ResourceMutationResult<Application, CreateApplicationRequest> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('applications');\n\n return useResourceMutation(\n (payload: CreateApplicationRequest, fetcher) => createApplication({...endpoint, fetcher, payload}),\n () => [[ApplicationQueryKeys.APPLICATIONS]],\n options,\n );\n};\n\nexport default useCreateApplication;\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAM,wBACJ,YACkE;CAClE,MAAMA,WAA+BC,8BAAsB,eAAe;AAE1E,QAAOC,6BACJ,SAAmC,YAAY,kBAAkB;EAAC,GAAG;EAAU;EAAS;EAAQ,CAAC,QAC5F,CAAC,CAAC,qBAAqB,aAAa,CAAC,EAC3C,QACD;;AAGH,mCAAe"}
@@ -0,0 +1,10 @@
1
+ import { ResourceMutationOptions, ResourceMutationResult } from '../useResourceMutation';
2
+ /**
3
+ * Deletes an application, then refetches any mounted application lists.
4
+ *
5
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
6
+ * @returns The mutation state. Call `mutate(applicationId)` to delete.
7
+ */
8
+ declare const useDeleteApplication: (options?: ResourceMutationOptions<void, string>) => ResourceMutationResult<void, string>;
9
+ export default useDeleteApplication;
10
+ //# sourceMappingURL=useDeleteApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeleteApplication.d.ts","sourceRoot":"","sources":["../../../src/hooks/applications/useDeleteApplication.ts"],"names":[],"mappings":"AAKA,OAA4B,EAAC,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,wBAAwB,CAAC;AAE5G;;;;;GAKG;AACH,QAAA,MAAM,oBAAoB,GACxB,UAAU,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,KAC9C,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAQrC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceMutation_default from "../useResourceMutation.js";
3
+ import { ApplicationQueryKeys, deleteApplication } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/applications/useDeleteApplication.ts
6
+ /**
7
+ * Deletes an application, then refetches any mounted application lists.
8
+ *
9
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
10
+ * @returns The mutation state. Call `mutate(applicationId)` to delete.
11
+ */
12
+ const useDeleteApplication = (options) => {
13
+ const endpoint = useManagementEndpoint_default("applications");
14
+ return useResourceMutation_default((applicationId, fetcher) => deleteApplication({
15
+ ...endpoint,
16
+ applicationId,
17
+ fetcher
18
+ }), () => [[ApplicationQueryKeys.APPLICATIONS]], options);
19
+ };
20
+ var useDeleteApplication_default = useDeleteApplication;
21
+
22
+ //#endregion
23
+ export { useDeleteApplication_default as default };
24
+ //# sourceMappingURL=useDeleteApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeleteApplication.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceMutation"],"sources":["../../../src/hooks/applications/useDeleteApplication.ts"],"sourcesContent":["// Copyright 2025-2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {ApplicationQueryKeys, deleteApplication} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceMutation, {ResourceMutationOptions, ResourceMutationResult} from '../useResourceMutation';\n\n/**\n * Deletes an application, then refetches any mounted application lists.\n *\n * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.\n * @returns The mutation state. Call `mutate(applicationId)` to delete.\n */\nconst useDeleteApplication = (\n options?: ResourceMutationOptions<void, string>,\n): ResourceMutationResult<void, string> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('applications');\n\n return useResourceMutation(\n (applicationId: string, fetcher) => deleteApplication({...endpoint, applicationId, fetcher}),\n () => [[ApplicationQueryKeys.APPLICATIONS]],\n options,\n );\n};\n\nexport default useDeleteApplication;\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,wBACJ,YACyC;CACzC,MAAMA,WAA+BC,8BAAsB,eAAe;AAE1E,QAAOC,6BACJ,eAAuB,YAAY,kBAAkB;EAAC,GAAG;EAAU;EAAe;EAAQ,CAAC,QACtF,CAAC,CAAC,qBAAqB,aAAa,CAAC,EAC3C,QACD;;AAGH,mCAAe"}
@@ -0,0 +1,17 @@
1
+ import { Application } from '@thunderid/browser';
2
+ import { ResourceQueryOptions, ResourceQueryResult } from '../useResourceQuery';
3
+ /**
4
+ * Fetches a single application. Does nothing until `applicationId` is set.
5
+ *
6
+ * @param applicationId - Identifier of the application.
7
+ * @param options - Query options, including a per-hook `fetcher`.
8
+ * @returns The query state.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * const {data: application} = useGetApplication(applicationId);
13
+ * ```
14
+ */
15
+ declare const useGetApplication: (applicationId: string | undefined, options?: ResourceQueryOptions) => ResourceQueryResult<Application>;
16
+ export default useGetApplication;
17
+ //# sourceMappingURL=useGetApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetApplication.d.ts","sourceRoot":"","sources":["../../../src/hooks/applications/useGetApplication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAuC,MAAM,oBAAoB,CAAC;AAErF,OAAyB,EAAC,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAEhG;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,iBAAiB,GACrB,eAAe,MAAM,GAAG,SAAS,EACjC,UAAU,oBAAoB,KAC7B,mBAAmB,CAAC,WAAW,CAQjC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceQuery_default from "../useResourceQuery.js";
3
+ import { ApplicationQueryKeys, getApplication } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/applications/useGetApplication.ts
6
+ /**
7
+ * Fetches a single application. Does nothing until `applicationId` is set.
8
+ *
9
+ * @param applicationId - Identifier of the application.
10
+ * @param options - Query options, including a per-hook `fetcher`.
11
+ * @returns The query state.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const {data: application} = useGetApplication(applicationId);
16
+ * ```
17
+ */
18
+ const useGetApplication = (applicationId, options) => {
19
+ const endpoint = useManagementEndpoint_default("applications");
20
+ return useResourceQuery_default([ApplicationQueryKeys.APPLICATION, applicationId], (fetcher) => getApplication({
21
+ ...endpoint,
22
+ applicationId,
23
+ fetcher
24
+ }), {
25
+ ...options,
26
+ enabled: Boolean(applicationId) && options?.enabled !== false
27
+ });
28
+ };
29
+ var useGetApplication_default = useGetApplication;
30
+
31
+ //#endregion
32
+ export { useGetApplication_default as default };
33
+ //# sourceMappingURL=useGetApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetApplication.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceQuery"],"sources":["../../../src/hooks/applications/useGetApplication.ts"],"sourcesContent":["// Copyright 2025-2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Application, ApplicationQueryKeys, getApplication} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceQuery, {ResourceQueryOptions, ResourceQueryResult} from '../useResourceQuery';\n\n/**\n * Fetches a single application. Does nothing until `applicationId` is set.\n *\n * @param applicationId - Identifier of the application.\n * @param options - Query options, including a per-hook `fetcher`.\n * @returns The query state.\n *\n * @example\n * ```tsx\n * const {data: application} = useGetApplication(applicationId);\n * ```\n */\nconst useGetApplication = (\n applicationId: string | undefined,\n options?: ResourceQueryOptions,\n): ResourceQueryResult<Application> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('applications');\n\n return useResourceQuery(\n [ApplicationQueryKeys.APPLICATION, applicationId],\n (fetcher) => getApplication({...endpoint, applicationId: applicationId!, fetcher}),\n {...options, enabled: Boolean(applicationId) && options?.enabled !== false},\n );\n};\n\nexport default useGetApplication;\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAM,qBACJ,eACA,YACqC;CACrC,MAAMA,WAA+BC,8BAAsB,eAAe;AAE1E,QAAOC,yBACL,CAAC,qBAAqB,aAAa,cAAc,GAChD,YAAY,eAAe;EAAC,GAAG;EAAyB;EAAgB;EAAQ,CAAC,EAClF;EAAC,GAAG;EAAS,SAAS,QAAQ,cAAc,IAAI,SAAS,YAAY;EAAM,CAC5E;;AAGH,gCAAe"}
@@ -0,0 +1,24 @@
1
+ import { ApplicationListResponse } from '@thunderid/browser';
2
+ import { ResourceQueryOptions, ResourceQueryResult } from '../useResourceQuery';
3
+ /**
4
+ * Parameters for {@link useGetApplications}.
5
+ */
6
+ export interface UseGetApplicationsParams {
7
+ limit?: number;
8
+ offset?: number;
9
+ }
10
+ /**
11
+ * Fetches a page of applications.
12
+ *
13
+ * @param params - Pagination parameters.
14
+ * @param options - Query options, including a per-hook `fetcher`.
15
+ * @returns The query state.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const {data, isLoading, error} = useGetApplications({limit: 10});
20
+ * ```
21
+ */
22
+ declare const useGetApplications: ({ limit, offset }?: UseGetApplicationsParams, options?: ResourceQueryOptions) => ResourceQueryResult<ApplicationListResponse>;
23
+ export default useGetApplications;
24
+ //# sourceMappingURL=useGetApplications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetApplications.d.ts","sourceRoot":"","sources":["../../../src/hooks/applications/useGetApplications.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAwC,MAAM,oBAAoB,CAAC;AAElG,OAAyB,EAAC,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,kBAAkB,GACtB,oBAAiB,wBAA6B,EAC9C,UAAU,oBAAoB,KAC7B,mBAAmB,CAAC,uBAAuB,CAQ7C,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceQuery_default from "../useResourceQuery.js";
3
+ import { ApplicationQueryKeys, getApplications } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/applications/useGetApplications.ts
6
+ /**
7
+ * Fetches a page of applications.
8
+ *
9
+ * @param params - Pagination parameters.
10
+ * @param options - Query options, including a per-hook `fetcher`.
11
+ * @returns The query state.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const {data, isLoading, error} = useGetApplications({limit: 10});
16
+ * ```
17
+ */
18
+ const useGetApplications = ({ limit, offset } = {}, options) => {
19
+ const endpoint = useManagementEndpoint_default("applications");
20
+ return useResourceQuery_default([ApplicationQueryKeys.APPLICATIONS, {
21
+ limit,
22
+ offset
23
+ }], (fetcher) => getApplications({
24
+ ...endpoint,
25
+ fetcher,
26
+ limit,
27
+ offset
28
+ }), options);
29
+ };
30
+ var useGetApplications_default = useGetApplications;
31
+
32
+ //#endregion
33
+ export { useGetApplications_default as default };
34
+ //# sourceMappingURL=useGetApplications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetApplications.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceQuery"],"sources":["../../../src/hooks/applications/useGetApplications.ts"],"sourcesContent":["// Copyright 2025-2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {ApplicationListResponse, ApplicationQueryKeys, getApplications} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceQuery, {ResourceQueryOptions, ResourceQueryResult} from '../useResourceQuery';\n\n/**\n * Parameters for {@link useGetApplications}.\n */\nexport interface UseGetApplicationsParams {\n limit?: number;\n offset?: number;\n}\n\n/**\n * Fetches a page of applications.\n *\n * @param params - Pagination parameters.\n * @param options - Query options, including a per-hook `fetcher`.\n * @returns The query state.\n *\n * @example\n * ```tsx\n * const {data, isLoading, error} = useGetApplications({limit: 10});\n * ```\n */\nconst useGetApplications = (\n {limit, offset}: UseGetApplicationsParams = {},\n options?: ResourceQueryOptions,\n): ResourceQueryResult<ApplicationListResponse> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('applications');\n\n return useResourceQuery(\n [ApplicationQueryKeys.APPLICATIONS, {limit, offset}],\n (fetcher) => getApplications({...endpoint, fetcher, limit, offset}),\n options,\n );\n};\n\nexport default useGetApplications;\n"],"mappings":";;;;;;;;;;;;;;;;;AA2BA,MAAM,sBACJ,EAAC,OAAO,WAAoC,EAAE,EAC9C,YACiD;CACjD,MAAMA,WAA+BC,8BAAsB,eAAe;AAE1E,QAAOC,yBACL,CAAC,qBAAqB,cAAc;EAAC;EAAO;EAAO,CAAC,GACnD,YAAY,gBAAgB;EAAC,GAAG;EAAU;EAAS;EAAO;EAAO,CAAC,EACnE,QACD;;AAGH,iCAAe"}
@@ -0,0 +1,18 @@
1
+ import { Application, UpdateApplicationRequest } from '@thunderid/browser';
2
+ import { ResourceMutationOptions, ResourceMutationResult } from '../useResourceMutation';
3
+ /**
4
+ * Variables accepted by {@link useUpdateApplication}'s `mutate`.
5
+ */
6
+ export interface UpdateApplicationVariables {
7
+ applicationId: string;
8
+ data: UpdateApplicationRequest;
9
+ }
10
+ /**
11
+ * Updates an application, then refetches it and any mounted application lists.
12
+ *
13
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
14
+ * @returns The mutation state. Call `mutate({applicationId, data})` to update.
15
+ */
16
+ declare const useUpdateApplication: (options?: ResourceMutationOptions<Application, UpdateApplicationVariables>) => ResourceMutationResult<Application, UpdateApplicationVariables>;
17
+ export default useUpdateApplication;
18
+ //# sourceMappingURL=useUpdateApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateApplication.d.ts","sourceRoot":"","sources":["../../../src/hooks/applications/useUpdateApplication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAwB,wBAAwB,EAAoB,MAAM,oBAAoB,CAAC;AAElH,OAA4B,EAAC,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,wBAAwB,CAAC;AAE5G;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,wBAAwB,CAAC;CAChC;AAED;;;;;GAKG;AACH,QAAA,MAAM,oBAAoB,GACxB,UAAU,uBAAuB,CAAC,WAAW,EAAE,0BAA0B,CAAC,KACzE,sBAAsB,CAAC,WAAW,EAAE,0BAA0B,CAYhE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import useManagementEndpoint_default from "../useManagementEndpoint.js";
2
+ import useResourceMutation_default from "../useResourceMutation.js";
3
+ import { ApplicationQueryKeys, updateApplication } from "@thunderid/browser";
4
+
5
+ //#region src/hooks/applications/useUpdateApplication.ts
6
+ /**
7
+ * Updates an application, then refetches it and any mounted application lists.
8
+ *
9
+ * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.
10
+ * @returns The mutation state. Call `mutate({applicationId, data})` to update.
11
+ */
12
+ const useUpdateApplication = (options) => {
13
+ const endpoint = useManagementEndpoint_default("applications");
14
+ return useResourceMutation_default(({ applicationId, data }, fetcher) => updateApplication({
15
+ ...endpoint,
16
+ applicationId,
17
+ fetcher,
18
+ payload: data
19
+ }), ({ applicationId }) => [[ApplicationQueryKeys.APPLICATION, applicationId], [ApplicationQueryKeys.APPLICATIONS]], options);
20
+ };
21
+ var useUpdateApplication_default = useUpdateApplication;
22
+
23
+ //#endregion
24
+ export { useUpdateApplication_default as default };
25
+ //# sourceMappingURL=useUpdateApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateApplication.js","names":["endpoint: ManagementEndpoint","useManagementEndpoint","useResourceMutation"],"sources":["../../../src/hooks/applications/useUpdateApplication.ts"],"sourcesContent":["// Copyright 2025-2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Application, ApplicationQueryKeys, UpdateApplicationRequest, updateApplication} from '@thunderid/browser';\nimport useManagementEndpoint, {ManagementEndpoint} from '../useManagementEndpoint';\nimport useResourceMutation, {ResourceMutationOptions, ResourceMutationResult} from '../useResourceMutation';\n\n/**\n * Variables accepted by {@link useUpdateApplication}'s `mutate`.\n */\nexport interface UpdateApplicationVariables {\n applicationId: string;\n data: UpdateApplicationRequest;\n}\n\n/**\n * Updates an application, then refetches it and any mounted application lists.\n *\n * @param options - Mutation options, including `onSuccess`, `onError`, and a per-hook `fetcher`.\n * @returns The mutation state. Call `mutate({applicationId, data})` to update.\n */\nconst useUpdateApplication = (\n options?: ResourceMutationOptions<Application, UpdateApplicationVariables>,\n): ResourceMutationResult<Application, UpdateApplicationVariables> => {\n const endpoint: ManagementEndpoint = useManagementEndpoint('applications');\n\n return useResourceMutation(\n ({applicationId, data}: UpdateApplicationVariables, fetcher) =>\n updateApplication({...endpoint, applicationId, fetcher, payload: data}),\n ({applicationId}: UpdateApplicationVariables) => [\n [ApplicationQueryKeys.APPLICATION, applicationId],\n [ApplicationQueryKeys.APPLICATIONS],\n ],\n options,\n );\n};\n\nexport default useUpdateApplication;\n"],"mappings":";;;;;;;;;;;AAqBA,MAAM,wBACJ,YACoE;CACpE,MAAMA,WAA+BC,8BAAsB,eAAe;AAE1E,QAAOC,6BACJ,EAAC,eAAe,QAAmC,YAClD,kBAAkB;EAAC,GAAG;EAAU;EAAe;EAAS,SAAS;EAAK,CAAC,GACxE,EAAC,oBAA+C,CAC/C,CAAC,qBAAqB,aAAa,cAAc,EACjD,CAAC,qBAAqB,aAAa,CACpC,EACD,QACD;;AAGH,mCAAe"}
@@ -0,0 +1,22 @@
1
+ import { ResourceEndpointKey } from '@thunderid/browser';
2
+ /**
3
+ * The URL inputs a management API function needs.
4
+ */
5
+ export interface ManagementEndpoint {
6
+ baseUrl: string | undefined;
7
+ /**
8
+ * The collection URL from `endpoints` when overridden, otherwise `undefined` so the API function
9
+ * falls back to `{baseUrl}/{collection}`.
10
+ */
11
+ url: string | undefined;
12
+ }
13
+ /**
14
+ * Resolves where a management resource collection lives, honoring the provider's `endpoints`
15
+ * override so the management API can run on a different host from the authorization server.
16
+ *
17
+ * @param key - The resource collection.
18
+ * @returns The base URL and optional collection URL override.
19
+ */
20
+ declare const useManagementEndpoint: (key: Extract<ResourceEndpointKey, "agents" | "applications" | "users">) => ManagementEndpoint;
21
+ export default useManagementEndpoint;
22
+ //# sourceMappingURL=useManagementEndpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useManagementEndpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useManagementEndpoint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,mBAAmB,EAA0B,MAAM,oBAAoB,CAAC;AAGhF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;;OAGG;IACH,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,qBAAqB,GACzB,KAAK,OAAO,CAAC,mBAAmB,EAAE,QAAQ,GAAG,cAAc,GAAG,OAAO,CAAC,KACrE,kBAIF,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import useThunderID_default from "../contexts/ThunderID/useThunderID.js";
2
+ import { resolveResourceEndpoint } from "@thunderid/browser";
3
+
4
+ //#region src/hooks/useManagementEndpoint.ts
5
+ /**
6
+ * Resolves where a management resource collection lives, honoring the provider's `endpoints`
7
+ * override so the management API can run on a different host from the authorization server.
8
+ *
9
+ * @param key - The resource collection.
10
+ * @returns The base URL and optional collection URL override.
11
+ */
12
+ const useManagementEndpoint = (key) => {
13
+ const { baseUrl, endpoints } = useThunderID_default();
14
+ return {
15
+ baseUrl,
16
+ url: resolveResourceEndpoint(key, { endpoints })
17
+ };
18
+ };
19
+ var useManagementEndpoint_default = useManagementEndpoint;
20
+
21
+ //#endregion
22
+ export { useManagementEndpoint_default as default };
23
+ //# sourceMappingURL=useManagementEndpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useManagementEndpoint.js","names":["useThunderID"],"sources":["../../src/hooks/useManagementEndpoint.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {ResourceEndpointKey, resolveResourceEndpoint} from '@thunderid/browser';\nimport useThunderID from '../contexts/ThunderID/useThunderID';\n\n/**\n * The URL inputs a management API function needs.\n */\nexport interface ManagementEndpoint {\n baseUrl: string | undefined;\n /**\n * The collection URL from `endpoints` when overridden, otherwise `undefined` so the API function\n * falls back to `{baseUrl}/{collection}`.\n */\n url: string | undefined;\n}\n\n/**\n * Resolves where a management resource collection lives, honoring the provider's `endpoints`\n * override so the management API can run on a different host from the authorization server.\n *\n * @param key - The resource collection.\n * @returns The base URL and optional collection URL override.\n */\nconst useManagementEndpoint = (\n key: Extract<ResourceEndpointKey, 'agents' | 'applications' | 'users'>,\n): ManagementEndpoint => {\n const {baseUrl, endpoints} = useThunderID();\n\n return {baseUrl, url: resolveResourceEndpoint(key, {endpoints})};\n};\n\nexport default useManagementEndpoint;\n"],"mappings":";;;;;;;;;;;AAyBA,MAAM,yBACJ,QACuB;CACvB,MAAM,EAAC,SAAS,cAAaA,sBAAc;AAE3C,QAAO;EAAC;EAAS,KAAK,wBAAwB,KAAK,EAAC,WAAU,CAAC;EAAC;;AAGlE,oCAAe"}
@@ -0,0 +1,51 @@
1
+ import { ApiFetcher } from '@thunderid/browser';
2
+ import { ResourceQueryKey } from '../utils/createResourceInvalidator';
3
+ /**
4
+ * Options accepted by every management mutation hook.
5
+ */
6
+ export interface ResourceMutationOptions<TData, TVariables> {
7
+ /**
8
+ * Transport for this hook only. Takes precedence over `ThunderIDProvider`'s `http.fetcher`.
9
+ */
10
+ fetcher?: ApiFetcher;
11
+ /**
12
+ * Called when the mutation fails.
13
+ */
14
+ onError?: (error: Error, variables: TVariables) => void;
15
+ /**
16
+ * Called when the mutation succeeds, after the affected queries have been invalidated.
17
+ */
18
+ onSuccess?: (data: TData, variables: TVariables) => void;
19
+ }
20
+ /**
21
+ * State returned by a management mutation hook.
22
+ */
23
+ export interface ResourceMutationResult<TData, TVariables> {
24
+ data: TData | undefined;
25
+ error: Error | null;
26
+ isLoading: boolean;
27
+ /**
28
+ * Runs the mutation. Never rejects: read `error`, or use `onError`, to handle a failure.
29
+ */
30
+ mutate: (variables: TVariables) => Promise<TData | undefined>;
31
+ /**
32
+ * Runs the mutation and rejects if it fails.
33
+ */
34
+ mutateAsync: (variables: TVariables) => Promise<TData>;
35
+ /**
36
+ * Clears `data` and `error`.
37
+ */
38
+ reset: () => void;
39
+ }
40
+ /**
41
+ * Runs a management mutation and invalidates the queries whose data it changed. Depends on no data
42
+ * fetching library.
43
+ *
44
+ * @param mutationFn - Performs the request with the resolved fetcher.
45
+ * @param getInvalidatedKeys - Returns the query key prefixes to invalidate after a success.
46
+ * @param options - Mutation options.
47
+ * @returns The mutation state.
48
+ */
49
+ declare const useResourceMutation: <TData, TVariables>(mutationFn: (variables: TVariables, fetcher: ApiFetcher) => Promise<TData>, getInvalidatedKeys: (variables: TVariables) => ResourceQueryKey[], { fetcher, onError, onSuccess }?: ResourceMutationOptions<TData, TVariables>) => ResourceMutationResult<TData, TVariables>;
50
+ export default useResourceMutation;
51
+ //# sourceMappingURL=useResourceMutation.d.ts.map