@contember/react-client-tenant 2.0.0-alpha.9 → 2.0.0-beta.2

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 (401) hide show
  1. package/dist/development/index.cjs +24 -0
  2. package/dist/development/index.cjs.map +1 -1
  3. package/dist/development/index.js +24 -0
  4. package/dist/development/index.js.map +1 -1
  5. package/dist/development/src/components/IdentityProvider.cjs.map +1 -1
  6. package/dist/development/src/components/IdentityProvider.js.map +1 -1
  7. package/dist/development/src/components/IdentityState.cjs.map +1 -1
  8. package/dist/development/src/components/IdentityState.js.map +1 -1
  9. package/dist/development/src/components/forms/ChangeMyPasswordForm.cjs.map +1 -1
  10. package/dist/development/src/components/forms/ChangeMyPasswordForm.js.map +1 -1
  11. package/dist/development/src/components/forms/CreateApiKeyForm.cjs.map +1 -1
  12. package/dist/development/src/components/forms/CreateApiKeyForm.js.map +1 -1
  13. package/dist/development/src/components/forms/CreateSessionTokenForm.cjs.map +1 -1
  14. package/dist/development/src/components/forms/CreateSessionTokenForm.js.map +1 -1
  15. package/dist/development/src/components/forms/InviteForm.cjs.map +1 -1
  16. package/dist/development/src/components/forms/InviteForm.js.map +1 -1
  17. package/dist/development/src/components/forms/LoginForm.cjs +1 -1
  18. package/dist/development/src/components/forms/LoginForm.cjs.map +1 -1
  19. package/dist/development/src/components/forms/LoginForm.js +1 -1
  20. package/dist/development/src/components/forms/LoginForm.js.map +1 -1
  21. package/dist/development/src/components/forms/OtpConfirmForm.cjs.map +1 -1
  22. package/dist/development/src/components/forms/OtpConfirmForm.js.map +1 -1
  23. package/dist/development/src/components/forms/OtpPrepareForm.cjs.map +1 -1
  24. package/dist/development/src/components/forms/OtpPrepareForm.js.map +1 -1
  25. package/dist/development/src/components/forms/PasswordResetForm.cjs +2 -1
  26. package/dist/development/src/components/forms/PasswordResetForm.cjs.map +1 -1
  27. package/dist/development/src/components/forms/PasswordResetForm.js +2 -1
  28. package/dist/development/src/components/forms/PasswordResetForm.js.map +1 -1
  29. package/dist/development/src/components/forms/PasswordResetRequestForm.cjs.map +1 -1
  30. package/dist/development/src/components/forms/PasswordResetRequestForm.js.map +1 -1
  31. package/dist/development/src/components/forms/PasswordlessSignInForm.cjs +79 -0
  32. package/dist/development/src/components/forms/PasswordlessSignInForm.cjs.map +1 -0
  33. package/dist/development/src/components/forms/PasswordlessSignInForm.js +79 -0
  34. package/dist/development/src/components/forms/PasswordlessSignInForm.js.map +1 -0
  35. package/dist/development/src/components/forms/PasswordlessSignInInitForm.cjs +54 -0
  36. package/dist/development/src/components/forms/PasswordlessSignInInitForm.cjs.map +1 -0
  37. package/dist/development/src/components/forms/PasswordlessSignInInitForm.js +54 -0
  38. package/dist/development/src/components/forms/PasswordlessSignInInitForm.js.map +1 -0
  39. package/dist/development/src/components/forms/TenantForm.cjs.map +1 -1
  40. package/dist/development/src/components/forms/TenantForm.js.map +1 -1
  41. package/dist/development/src/components/forms/UpdateProjectMemberForm.cjs.map +1 -1
  42. package/dist/development/src/components/forms/UpdateProjectMemberForm.js.map +1 -1
  43. package/dist/development/src/components/idp/IDP.cjs.map +1 -1
  44. package/dist/development/src/components/idp/IDP.js.map +1 -1
  45. package/dist/development/src/components/idp/IDPInitTrigger.cjs.map +1 -1
  46. package/dist/development/src/components/idp/IDPInitTrigger.js.map +1 -1
  47. package/dist/development/src/components/idp/IDPState.cjs.map +1 -1
  48. package/dist/development/src/components/idp/IDPState.js.map +1 -1
  49. package/dist/development/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
  50. package/dist/development/src/components/triggers/DisableOtpTrigger.js.map +1 -1
  51. package/dist/development/src/components/triggers/LogoutTrigger.cjs.map +1 -1
  52. package/dist/development/src/components/triggers/LogoutTrigger.js.map +1 -1
  53. package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
  54. package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
  55. package/dist/development/src/components/triggers/TenantActionTrigger.cjs.map +1 -1
  56. package/dist/development/src/components/triggers/TenantActionTrigger.js.map +1 -1
  57. package/dist/development/src/consts.cjs +5 -0
  58. package/dist/development/src/consts.cjs.map +1 -0
  59. package/dist/development/src/consts.js +5 -0
  60. package/dist/development/src/consts.js.map +1 -0
  61. package/dist/development/src/contexts.cjs.map +1 -1
  62. package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs +1 -1
  63. package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -1
  64. package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js +1 -1
  65. package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -1
  66. package/dist/development/src/hooks/mutations/auth/useSignInMutation.cjs +1 -1
  67. package/dist/development/src/hooks/mutations/auth/useSignInMutation.cjs.map +1 -1
  68. package/dist/development/src/hooks/mutations/auth/useSignInMutation.js +1 -1
  69. package/dist/development/src/hooks/mutations/auth/useSignInMutation.js.map +1 -1
  70. package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs +1 -1
  71. package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -1
  72. package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.js +1 -1
  73. package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -1
  74. package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.cjs +1 -1
  75. package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -1
  76. package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.js +1 -1
  77. package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -1
  78. package/dist/development/src/hooks/mutations/invite/useInviteMutation.cjs +1 -1
  79. package/dist/development/src/hooks/mutations/invite/useInviteMutation.cjs.map +1 -1
  80. package/dist/development/src/hooks/mutations/invite/useInviteMutation.js +1 -1
  81. package/dist/development/src/hooks/mutations/invite/useInviteMutation.js.map +1 -1
  82. package/dist/development/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -1
  83. package/dist/development/src/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -1
  84. package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs +31 -0
  85. package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs.map +1 -0
  86. package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js +14 -0
  87. package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js.map +1 -0
  88. package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs +28 -0
  89. package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs.map +1 -0
  90. package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js +11 -0
  91. package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js.map +1 -0
  92. package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs +28 -0
  93. package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs.map +1 -0
  94. package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js +11 -0
  95. package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js.map +1 -0
  96. package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs +32 -0
  97. package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs.map +1 -0
  98. package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js +15 -0
  99. package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js.map +1 -0
  100. package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs +32 -0
  101. package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs.map +1 -0
  102. package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js +15 -0
  103. package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js.map +1 -0
  104. package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.cjs +29 -0
  105. package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.cjs.map +1 -0
  106. package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.js +12 -0
  107. package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.js.map +1 -0
  108. package/dist/development/src/hooks/mutations/profile/useChangeProfile.cjs +29 -0
  109. package/dist/development/src/hooks/mutations/profile/useChangeProfile.cjs.map +1 -0
  110. package/dist/development/src/hooks/mutations/profile/useChangeProfile.js +12 -0
  111. package/dist/development/src/hooks/mutations/profile/useChangeProfile.js.map +1 -0
  112. package/dist/development/src/hooks/queries/useMeQuery.cjs +1 -1
  113. package/dist/development/src/hooks/queries/useMeQuery.cjs.map +1 -1
  114. package/dist/development/src/hooks/queries/useMeQuery.js +1 -1
  115. package/dist/development/src/hooks/queries/useMeQuery.js.map +1 -1
  116. package/dist/development/src/hooks/queries/useProjectMembersQuery.cjs +1 -1
  117. package/dist/development/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
  118. package/dist/development/src/hooks/queries/useProjectMembersQuery.js +1 -1
  119. package/dist/development/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
  120. package/dist/development/src/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -1
  121. package/dist/development/src/hooks/queries/useProjectMembershipsQuery.js.map +1 -1
  122. package/dist/development/src/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -1
  123. package/dist/development/src/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -1
  124. package/dist/development/src/hooks/useFetchIdentity.cjs +2 -2
  125. package/dist/development/src/hooks/useFetchIdentity.cjs.map +1 -1
  126. package/dist/development/src/hooks/useFetchIdentity.js +3 -3
  127. package/dist/development/src/hooks/useFetchIdentity.js.map +1 -1
  128. package/dist/development/src/hooks/useLogout.cjs.map +1 -1
  129. package/dist/development/src/hooks/useLogout.js.map +1 -1
  130. package/dist/development/src/hooks/usePasswordlessOtpActivator.cjs +53 -0
  131. package/dist/development/src/hooks/usePasswordlessOtpActivator.cjs.map +1 -0
  132. package/dist/development/src/hooks/usePasswordlessOtpActivator.js +53 -0
  133. package/dist/development/src/hooks/usePasswordlessOtpActivator.js.map +1 -0
  134. package/dist/development/src/hooks/useTenantApi.cjs.map +1 -1
  135. package/dist/development/src/hooks/useTenantApi.js.map +1 -1
  136. package/dist/development/src/hooks/useTenantMutation.cjs.map +1 -1
  137. package/dist/development/src/hooks/useTenantMutation.js.map +1 -1
  138. package/dist/development/src/hooks/useTenantQueryLoader.cjs.map +1 -1
  139. package/dist/development/src/hooks/useTenantQueryLoader.js.map +1 -1
  140. package/dist/development/src/internal/hooks/useHandleIDPResponse.cjs +1 -1
  141. package/dist/development/src/internal/hooks/useHandleIDPResponse.cjs.map +1 -1
  142. package/dist/development/src/internal/hooks/useHandleIDPResponse.js +1 -1
  143. package/dist/development/src/internal/hooks/useHandleIDPResponse.js.map +1 -1
  144. package/dist/development/src/internal/hooks/useIDPAutoInit.cjs.map +1 -1
  145. package/dist/development/src/internal/hooks/useIDPAutoInit.js.map +1 -1
  146. package/dist/development/src/internal/hooks/useIDPStateStore.cjs.map +1 -1
  147. package/dist/development/src/internal/hooks/useIDPStateStore.js.map +1 -1
  148. package/dist/development/src/internal/hooks/useInitIDPRedirect.cjs.map +1 -1
  149. package/dist/development/src/internal/hooks/useInitIDPRedirect.js.map +1 -1
  150. package/dist/development/src/internal/hooks/useLogoutInternal.cjs.map +1 -1
  151. package/dist/development/src/internal/hooks/useLogoutInternal.js.map +1 -1
  152. package/dist/development/src/internal/hooks/useRedirectToBacklink.cjs.map +1 -1
  153. package/dist/development/src/internal/hooks/useRedirectToBacklink.js.map +1 -1
  154. package/dist/development/src/internal/utils/hashing.cjs +8 -0
  155. package/dist/development/src/internal/utils/hashing.cjs.map +1 -0
  156. package/dist/development/src/internal/utils/hashing.js +8 -0
  157. package/dist/development/src/internal/utils/hashing.js.map +1 -0
  158. package/dist/development/src/internal/utils/randomInt.cjs +29 -0
  159. package/dist/development/src/internal/utils/randomInt.cjs.map +1 -0
  160. package/dist/development/src/internal/utils/randomInt.js +29 -0
  161. package/dist/development/src/internal/utils/randomInt.js.map +1 -0
  162. package/dist/production/index.cjs +24 -0
  163. package/dist/production/index.cjs.map +1 -1
  164. package/dist/production/index.js +24 -0
  165. package/dist/production/index.js.map +1 -1
  166. package/dist/production/src/components/IdentityProvider.cjs.map +1 -1
  167. package/dist/production/src/components/IdentityProvider.js.map +1 -1
  168. package/dist/production/src/components/IdentityState.cjs.map +1 -1
  169. package/dist/production/src/components/IdentityState.js.map +1 -1
  170. package/dist/production/src/components/forms/ChangeMyPasswordForm.cjs.map +1 -1
  171. package/dist/production/src/components/forms/ChangeMyPasswordForm.js.map +1 -1
  172. package/dist/production/src/components/forms/CreateApiKeyForm.cjs.map +1 -1
  173. package/dist/production/src/components/forms/CreateApiKeyForm.js.map +1 -1
  174. package/dist/production/src/components/forms/CreateSessionTokenForm.cjs.map +1 -1
  175. package/dist/production/src/components/forms/CreateSessionTokenForm.js.map +1 -1
  176. package/dist/production/src/components/forms/InviteForm.cjs.map +1 -1
  177. package/dist/production/src/components/forms/InviteForm.js.map +1 -1
  178. package/dist/production/src/components/forms/LoginForm.cjs +1 -1
  179. package/dist/production/src/components/forms/LoginForm.cjs.map +1 -1
  180. package/dist/production/src/components/forms/LoginForm.js +1 -1
  181. package/dist/production/src/components/forms/LoginForm.js.map +1 -1
  182. package/dist/production/src/components/forms/OtpConfirmForm.cjs.map +1 -1
  183. package/dist/production/src/components/forms/OtpConfirmForm.js.map +1 -1
  184. package/dist/production/src/components/forms/OtpPrepareForm.cjs.map +1 -1
  185. package/dist/production/src/components/forms/OtpPrepareForm.js.map +1 -1
  186. package/dist/production/src/components/forms/PasswordResetForm.cjs +2 -1
  187. package/dist/production/src/components/forms/PasswordResetForm.cjs.map +1 -1
  188. package/dist/production/src/components/forms/PasswordResetForm.js +2 -1
  189. package/dist/production/src/components/forms/PasswordResetForm.js.map +1 -1
  190. package/dist/production/src/components/forms/PasswordResetRequestForm.cjs.map +1 -1
  191. package/dist/production/src/components/forms/PasswordResetRequestForm.js.map +1 -1
  192. package/dist/production/src/components/forms/PasswordlessSignInForm.cjs +71 -0
  193. package/dist/production/src/components/forms/PasswordlessSignInForm.cjs.map +1 -0
  194. package/dist/production/src/components/forms/PasswordlessSignInForm.js +71 -0
  195. package/dist/production/src/components/forms/PasswordlessSignInForm.js.map +1 -0
  196. package/dist/production/src/components/forms/PasswordlessSignInInitForm.cjs +46 -0
  197. package/dist/production/src/components/forms/PasswordlessSignInInitForm.cjs.map +1 -0
  198. package/dist/production/src/components/forms/PasswordlessSignInInitForm.js +46 -0
  199. package/dist/production/src/components/forms/PasswordlessSignInInitForm.js.map +1 -0
  200. package/dist/production/src/components/forms/TenantForm.cjs.map +1 -1
  201. package/dist/production/src/components/forms/TenantForm.js.map +1 -1
  202. package/dist/production/src/components/forms/UpdateProjectMemberForm.cjs.map +1 -1
  203. package/dist/production/src/components/forms/UpdateProjectMemberForm.js.map +1 -1
  204. package/dist/production/src/components/idp/IDP.cjs.map +1 -1
  205. package/dist/production/src/components/idp/IDP.js.map +1 -1
  206. package/dist/production/src/components/idp/IDPInitTrigger.cjs.map +1 -1
  207. package/dist/production/src/components/idp/IDPInitTrigger.js.map +1 -1
  208. package/dist/production/src/components/idp/IDPState.cjs.map +1 -1
  209. package/dist/production/src/components/idp/IDPState.js.map +1 -1
  210. package/dist/production/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
  211. package/dist/production/src/components/triggers/DisableOtpTrigger.js.map +1 -1
  212. package/dist/production/src/components/triggers/LogoutTrigger.cjs.map +1 -1
  213. package/dist/production/src/components/triggers/LogoutTrigger.js.map +1 -1
  214. package/dist/production/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
  215. package/dist/production/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
  216. package/dist/production/src/components/triggers/TenantActionTrigger.cjs.map +1 -1
  217. package/dist/production/src/components/triggers/TenantActionTrigger.js.map +1 -1
  218. package/dist/production/src/consts.cjs +5 -0
  219. package/dist/production/src/consts.cjs.map +1 -0
  220. package/dist/production/src/consts.js +5 -0
  221. package/dist/production/src/consts.js.map +1 -0
  222. package/dist/production/src/contexts.cjs.map +1 -1
  223. package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs +1 -1
  224. package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -1
  225. package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js +1 -1
  226. package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -1
  227. package/dist/production/src/hooks/mutations/auth/useSignInMutation.cjs +1 -1
  228. package/dist/production/src/hooks/mutations/auth/useSignInMutation.cjs.map +1 -1
  229. package/dist/production/src/hooks/mutations/auth/useSignInMutation.js +1 -1
  230. package/dist/production/src/hooks/mutations/auth/useSignInMutation.js.map +1 -1
  231. package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs +1 -1
  232. package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -1
  233. package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.js +1 -1
  234. package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -1
  235. package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.cjs +1 -1
  236. package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -1
  237. package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.js +1 -1
  238. package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -1
  239. package/dist/production/src/hooks/mutations/invite/useInviteMutation.cjs +1 -1
  240. package/dist/production/src/hooks/mutations/invite/useInviteMutation.cjs.map +1 -1
  241. package/dist/production/src/hooks/mutations/invite/useInviteMutation.js +1 -1
  242. package/dist/production/src/hooks/mutations/invite/useInviteMutation.js.map +1 -1
  243. package/dist/production/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -1
  244. package/dist/production/src/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -1
  245. package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs +31 -0
  246. package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs.map +1 -0
  247. package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js +14 -0
  248. package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js.map +1 -0
  249. package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs +28 -0
  250. package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs.map +1 -0
  251. package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js +11 -0
  252. package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js.map +1 -0
  253. package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs +28 -0
  254. package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs.map +1 -0
  255. package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js +11 -0
  256. package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js.map +1 -0
  257. package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs +32 -0
  258. package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs.map +1 -0
  259. package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js +15 -0
  260. package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js.map +1 -0
  261. package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs +32 -0
  262. package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs.map +1 -0
  263. package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js +15 -0
  264. package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js.map +1 -0
  265. package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.cjs +29 -0
  266. package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.cjs.map +1 -0
  267. package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.js +12 -0
  268. package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.js.map +1 -0
  269. package/dist/production/src/hooks/mutations/profile/useChangeProfile.cjs +29 -0
  270. package/dist/production/src/hooks/mutations/profile/useChangeProfile.cjs.map +1 -0
  271. package/dist/production/src/hooks/mutations/profile/useChangeProfile.js +12 -0
  272. package/dist/production/src/hooks/mutations/profile/useChangeProfile.js.map +1 -0
  273. package/dist/production/src/hooks/queries/useMeQuery.cjs +1 -1
  274. package/dist/production/src/hooks/queries/useMeQuery.cjs.map +1 -1
  275. package/dist/production/src/hooks/queries/useMeQuery.js +1 -1
  276. package/dist/production/src/hooks/queries/useMeQuery.js.map +1 -1
  277. package/dist/production/src/hooks/queries/useProjectMembersQuery.cjs +1 -1
  278. package/dist/production/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
  279. package/dist/production/src/hooks/queries/useProjectMembersQuery.js +1 -1
  280. package/dist/production/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
  281. package/dist/production/src/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -1
  282. package/dist/production/src/hooks/queries/useProjectMembershipsQuery.js.map +1 -1
  283. package/dist/production/src/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -1
  284. package/dist/production/src/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -1
  285. package/dist/production/src/hooks/useFetchIdentity.cjs +2 -2
  286. package/dist/production/src/hooks/useFetchIdentity.cjs.map +1 -1
  287. package/dist/production/src/hooks/useFetchIdentity.js +3 -3
  288. package/dist/production/src/hooks/useFetchIdentity.js.map +1 -1
  289. package/dist/production/src/hooks/useLogout.cjs.map +1 -1
  290. package/dist/production/src/hooks/useLogout.js.map +1 -1
  291. package/dist/production/src/hooks/usePasswordlessOtpActivator.cjs +53 -0
  292. package/dist/production/src/hooks/usePasswordlessOtpActivator.cjs.map +1 -0
  293. package/dist/production/src/hooks/usePasswordlessOtpActivator.js +53 -0
  294. package/dist/production/src/hooks/usePasswordlessOtpActivator.js.map +1 -0
  295. package/dist/production/src/hooks/useTenantApi.cjs.map +1 -1
  296. package/dist/production/src/hooks/useTenantApi.js.map +1 -1
  297. package/dist/production/src/hooks/useTenantMutation.cjs.map +1 -1
  298. package/dist/production/src/hooks/useTenantMutation.js.map +1 -1
  299. package/dist/production/src/hooks/useTenantQueryLoader.cjs.map +1 -1
  300. package/dist/production/src/hooks/useTenantQueryLoader.js.map +1 -1
  301. package/dist/production/src/internal/hooks/useHandleIDPResponse.cjs +1 -1
  302. package/dist/production/src/internal/hooks/useHandleIDPResponse.cjs.map +1 -1
  303. package/dist/production/src/internal/hooks/useHandleIDPResponse.js +1 -1
  304. package/dist/production/src/internal/hooks/useHandleIDPResponse.js.map +1 -1
  305. package/dist/production/src/internal/hooks/useIDPAutoInit.cjs.map +1 -1
  306. package/dist/production/src/internal/hooks/useIDPAutoInit.js.map +1 -1
  307. package/dist/production/src/internal/hooks/useIDPStateStore.cjs.map +1 -1
  308. package/dist/production/src/internal/hooks/useIDPStateStore.js.map +1 -1
  309. package/dist/production/src/internal/hooks/useInitIDPRedirect.cjs.map +1 -1
  310. package/dist/production/src/internal/hooks/useInitIDPRedirect.js.map +1 -1
  311. package/dist/production/src/internal/hooks/useLogoutInternal.cjs.map +1 -1
  312. package/dist/production/src/internal/hooks/useLogoutInternal.js.map +1 -1
  313. package/dist/production/src/internal/hooks/useRedirectToBacklink.cjs.map +1 -1
  314. package/dist/production/src/internal/hooks/useRedirectToBacklink.js.map +1 -1
  315. package/dist/production/src/internal/utils/hashing.cjs +8 -0
  316. package/dist/production/src/internal/utils/hashing.cjs.map +1 -0
  317. package/dist/production/src/internal/utils/hashing.js +8 -0
  318. package/dist/production/src/internal/utils/hashing.js.map +1 -0
  319. package/dist/production/src/internal/utils/randomInt.cjs +29 -0
  320. package/dist/production/src/internal/utils/randomInt.cjs.map +1 -0
  321. package/dist/production/src/internal/utils/randomInt.js +29 -0
  322. package/dist/production/src/internal/utils/randomInt.js.map +1 -0
  323. package/dist/types/components/forms/PasswordlessSignInForm.d.ts +22 -0
  324. package/dist/types/components/forms/PasswordlessSignInForm.d.ts.map +1 -0
  325. package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts +20 -0
  326. package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts.map +1 -0
  327. package/dist/types/components/forms/index.d.ts +2 -0
  328. package/dist/types/components/forms/index.d.ts.map +1 -1
  329. package/dist/types/consts.d.ts +2 -0
  330. package/dist/types/consts.d.ts.map +1 -0
  331. package/dist/types/hooks/index.d.ts +1 -0
  332. package/dist/types/hooks/index.d.ts.map +1 -1
  333. package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts +0 -6
  334. package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts.map +1 -1
  335. package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts +0 -6
  336. package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts.map +1 -1
  337. package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts +6 -6
  338. package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts.map +1 -1
  339. package/dist/types/hooks/mutations/index.d.ts +2 -0
  340. package/dist/types/hooks/mutations/index.d.ts.map +1 -1
  341. package/dist/types/hooks/mutations/invite/useInviteMutation.d.ts +0 -6
  342. package/dist/types/hooks/mutations/invite/useInviteMutation.d.ts.map +1 -1
  343. package/dist/types/hooks/mutations/passwordless/index.d.ts +6 -0
  344. package/dist/types/hooks/mutations/passwordless/index.d.ts.map +1 -0
  345. package/dist/types/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.d.ts +8 -0
  346. package/dist/types/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.d.ts.map +1 -0
  347. package/dist/types/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.d.ts +3 -0
  348. package/dist/types/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.d.ts.map +1 -0
  349. package/dist/types/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.d.ts +3 -0
  350. package/dist/types/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.d.ts.map +1 -0
  351. package/dist/types/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.d.ts +19 -0
  352. package/dist/types/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.d.ts.map +1 -0
  353. package/dist/types/hooks/mutations/passwordless/useSignInPasswordlessMutation.d.ts +34 -0
  354. package/dist/types/hooks/mutations/passwordless/useSignInPasswordlessMutation.d.ts.map +1 -0
  355. package/dist/types/hooks/mutations/profile/index.d.ts +3 -0
  356. package/dist/types/hooks/mutations/profile/index.d.ts.map +1 -0
  357. package/dist/types/hooks/mutations/profile/useChangeMyProfile.d.ts +21 -0
  358. package/dist/types/hooks/mutations/profile/useChangeMyProfile.d.ts.map +1 -0
  359. package/dist/types/hooks/mutations/profile/useChangeProfile.d.ts +23 -0
  360. package/dist/types/hooks/mutations/profile/useChangeProfile.d.ts.map +1 -0
  361. package/dist/types/hooks/usePasswordlessOtpActivator.d.ts +19 -0
  362. package/dist/types/hooks/usePasswordlessOtpActivator.d.ts.map +1 -0
  363. package/dist/types/hooks/useTenantMutation.d.ts.map +1 -1
  364. package/dist/types/internal/utils/hashing.d.ts +2 -0
  365. package/dist/types/internal/utils/hashing.d.ts.map +1 -0
  366. package/dist/types/internal/utils/randomInt.d.ts +3 -0
  367. package/dist/types/internal/utils/randomInt.d.ts.map +1 -0
  368. package/dist/types/tsconfig.tsbuildinfo +1 -1
  369. package/dist/types/types/Identity.d.ts +1 -0
  370. package/dist/types/types/Identity.d.ts.map +1 -1
  371. package/package.json +8 -7
  372. package/src/components/forms/LoginForm.tsx +1 -1
  373. package/src/components/forms/PasswordResetForm.tsx +1 -0
  374. package/src/components/forms/PasswordlessSignInForm.tsx +102 -0
  375. package/src/components/forms/PasswordlessSignInInitForm.tsx +68 -0
  376. package/src/components/forms/index.ts +2 -0
  377. package/src/consts.ts +1 -0
  378. package/src/hooks/index.ts +1 -0
  379. package/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx +1 -1
  380. package/src/hooks/mutations/auth/useSignInMutation.ts +1 -1
  381. package/src/hooks/mutations/idp/useInitSignInIDPMutation.ts +1 -1
  382. package/src/hooks/mutations/idp/useSignInIdpMutation.ts +1 -1
  383. package/src/hooks/mutations/index.ts +2 -0
  384. package/src/hooks/mutations/invite/useInviteMutation.tsx +1 -1
  385. package/src/hooks/mutations/passwordless/index.ts +5 -0
  386. package/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.ts +19 -0
  387. package/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.ts +14 -0
  388. package/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.ts +14 -0
  389. package/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.ts +22 -0
  390. package/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.ts +24 -0
  391. package/src/hooks/mutations/profile/index.ts +2 -0
  392. package/src/hooks/mutations/profile/useChangeMyProfile.ts +13 -0
  393. package/src/hooks/mutations/profile/useChangeProfile.ts +13 -0
  394. package/src/hooks/queries/useMeQuery.ts +1 -1
  395. package/src/hooks/queries/useProjectMembersQuery.ts +1 -1
  396. package/src/hooks/useFetchIdentity.ts +3 -3
  397. package/src/hooks/usePasswordlessOtpActivator.ts +66 -0
  398. package/src/internal/hooks/useHandleIDPResponse.ts +1 -1
  399. package/src/internal/utils/hashing.ts +4 -0
  400. package/src/internal/utils/randomInt.ts +30 -0
  401. package/src/types/Identity.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useInitIDPRedirect.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useInitIDPRedirect.ts"],"sourcesContent":["import { SetStateAction, useCallback } from 'react'\nimport { useIDPStateStore } from './useIDPStateStore'\nimport { getBaseHref } from '../utils/getBaseHref'\nimport { IDPInitError, IDPStateValue } from '../../types/idp'\nimport { useInitSignInIDPMutation } from '../../hooks'\nimport { useSaveBacklink } from './useRedirectToBacklink'\n\nexport interface UseInitIDPRedirectProps {\n\tonRedirect?: (url: string) => void\n\tsetState: (state: SetStateAction<IDPStateValue>) => void\n}\n\nexport const useInitIDPRedirect = ({ onRedirect, setState }: UseInitIDPRedirectProps) => {\n\tconst initRequest = useInitSignInIDPMutation()\n\tconst saveBacklink = useSaveBacklink()\n\tconst { set: saveIdpState } = useIDPStateStore()\n\n\treturn useCallback(async ({ provider }: { provider: string }): Promise<{ ok: true } | { ok: false; error: IDPInitError }> => {\n\t\tconst fail = (error: IDPInitError) => {\n\t\t\tsetState({ type: 'init_failed', error })\n\t\t\treturn { ok: false, error }\n\t\t}\n\t\ttry {\n\t\t\tsetState({ type: 'processing_init' })\n\t\t\tconst response = await initRequest({\n\t\t\t\tdata: {\n\t\t\t\t\tredirectUrl: getBaseHref(),\n\t\t\t\t},\n\t\t\t\tidentityProvider: provider,\n\t\t\t})\n\t\t\tif (!response.ok) {\n\t\t\t\treturn fail(response.error || 'UNKNOWN_ERROR')\n\t\t\t} else {\n\t\t\t\tsaveIdpState({ provider, sessionData: response.result.sessionData as string })\n\t\t\t\tsaveBacklink()\n\t\t\t\tif (onRedirect) {\n\t\t\t\t\tonRedirect(response.result.authUrl as string)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = response.result.authUrl as string\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn fail('UNKNOWN_ERROR')\n\t\t}\n\t}, [initRequest, onRedirect, saveBacklink, saveIdpState, setState])\n}\n"],"names":["useInitSignInIDPMutation","useSaveBacklink","useIDPStateStore","useCallback","getBaseHref"],"mappings":";;;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,YAAY,eAAwC;AACxF,QAAM,cAAcA,yBAAAA;AACpB,QAAM,eAAeC,sBAAAA;AACrB,QAAM,EAAE,KAAK,aAAa,IAAIC,iBAAiB,iBAAA;AAE/C,SAAOC,MAAY,YAAA,OAAO,EAAE,eAAiG;AACtH,UAAA,OAAO,CAAC,UAAwB;AACrC,eAAS,EAAE,MAAM,eAAe,MAAO,CAAA;AAChC,aAAA,EAAE,IAAI,OAAO;IAAM;AAEvB,QAAA;AACM,eAAA,EAAE,MAAM,kBAAA,CAAmB;AAC9B,YAAA,WAAW,MAAM,YAAY;AAAA,QAClC,MAAM;AAAA,UACL,aAAaC,YAAAA,YAAY;AAAA,QAC1B;AAAA,QACA,kBAAkB;AAAA,MAAA,CAClB;AACG,UAAA,CAAC,SAAS,IAAI;AACV,eAAA,KAAK,SAAS,SAAS,eAAe;AAAA,MAAA,OACvC;AACN,qBAAa,EAAE,UAAU,aAAa,SAAS,OAAO,aAAuB;AAChE;AACb,YAAI,YAAY;AACJ,qBAAA,SAAS,OAAO,OAAiB;AAAA,QAAA,OACtC;AACC,iBAAA,SAAS,OAAO,SAAS,OAAO;AAAA,QACxC;AACO,eAAA,EAAE,IAAI;MACd;AAAA,aACQ,GAAG;AACX,cAAQ,MAAM,CAAC;AACf,aAAO,KAAK,eAAe;AAAA,IAC5B;AAAA,EAAA,GACE,CAAC,aAAa,YAAY,cAAc,cAAc,QAAQ,CAAC;AACnE;;"}
1
+ {"version":3,"file":"useInitIDPRedirect.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useInitIDPRedirect.ts"],"sourcesContent":["import { SetStateAction, useCallback } from 'react'\nimport { useIDPStateStore } from './useIDPStateStore'\nimport { getBaseHref } from '../utils/getBaseHref'\nimport { IDPInitError, IDPStateValue } from '../../types/idp'\nimport { useInitSignInIDPMutation } from '../../hooks'\nimport { useSaveBacklink } from './useRedirectToBacklink'\n\nexport interface UseInitIDPRedirectProps {\n\tonRedirect?: (url: string) => void\n\tsetState: (state: SetStateAction<IDPStateValue>) => void\n}\n\nexport const useInitIDPRedirect = ({ onRedirect, setState }: UseInitIDPRedirectProps) => {\n\tconst initRequest = useInitSignInIDPMutation()\n\tconst saveBacklink = useSaveBacklink()\n\tconst { set: saveIdpState } = useIDPStateStore()\n\n\treturn useCallback(async ({ provider }: { provider: string }): Promise<{ ok: true } | { ok: false; error: IDPInitError }> => {\n\t\tconst fail = (error: IDPInitError) => {\n\t\t\tsetState({ type: 'init_failed', error })\n\t\t\treturn { ok: false, error }\n\t\t}\n\t\ttry {\n\t\t\tsetState({ type: 'processing_init' })\n\t\t\tconst response = await initRequest({\n\t\t\t\tdata: {\n\t\t\t\t\tredirectUrl: getBaseHref(),\n\t\t\t\t},\n\t\t\t\tidentityProvider: provider,\n\t\t\t})\n\t\t\tif (!response.ok) {\n\t\t\t\treturn fail(response.error || 'UNKNOWN_ERROR')\n\t\t\t} else {\n\t\t\t\tsaveIdpState({ provider, sessionData: response.result.sessionData as string })\n\t\t\t\tsaveBacklink()\n\t\t\t\tif (onRedirect) {\n\t\t\t\t\tonRedirect(response.result.authUrl as string)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = response.result.authUrl as string\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn fail('UNKNOWN_ERROR')\n\t\t}\n\t}, [initRequest, onRedirect, saveBacklink, saveIdpState, setState])\n}\n"],"names":["useInitSignInIDPMutation","useSaveBacklink","useIDPStateStore","useCallback","getBaseHref"],"mappings":";;;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,YAAY,eAAwC;AACxF,QAAM,cAAcA,yBAAAA,yBAAyB;AAC7C,QAAM,eAAeC,sBAAAA,gBAAgB;AACrC,QAAM,EAAE,KAAK,aAAa,IAAIC,kCAAiB;AAE/C,SAAOC,MAAY,YAAA,OAAO,EAAE,eAAiG;AACtH,UAAA,OAAO,CAAC,UAAwB;AACrC,eAAS,EAAE,MAAM,eAAe,MAAA,CAAO;AAChC,aAAA,EAAE,IAAI,OAAO,MAAM;AAAA,IAC3B;AACI,QAAA;AACM,eAAA,EAAE,MAAM,mBAAmB;AAC9B,YAAA,WAAW,MAAM,YAAY;AAAA,QAClC,MAAM;AAAA,UACL,aAAaC,YAAY,YAAA;AAAA,QAC1B;AAAA,QACA,kBAAkB;AAAA,MAAA,CAClB;AACG,UAAA,CAAC,SAAS,IAAI;AACV,eAAA,KAAK,SAAS,SAAS,eAAe;AAAA,MAAA,OACvC;AACN,qBAAa,EAAE,UAAU,aAAa,SAAS,OAAO,aAAuB;AAChE,qBAAA;AACb,YAAI,YAAY;AACJ,qBAAA,SAAS,OAAO,OAAiB;AAAA,QAAA,OACtC;AACC,iBAAA,SAAS,OAAO,SAAS,OAAO;AAAA,QAAA;AAEjC,eAAA,EAAE,IAAI,KAAK;AAAA,MAAA;AAAA,aAEX,GAAG;AACX,cAAQ,MAAM,CAAC;AACf,aAAO,KAAK,eAAe;AAAA,IAAA;AAAA,EAC5B,GACE,CAAC,aAAa,YAAY,cAAc,cAAc,QAAQ,CAAC;AACnE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useInitIDPRedirect.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useInitIDPRedirect.ts"],"sourcesContent":["import { SetStateAction, useCallback } from 'react'\nimport { useIDPStateStore } from './useIDPStateStore'\nimport { getBaseHref } from '../utils/getBaseHref'\nimport { IDPInitError, IDPStateValue } from '../../types/idp'\nimport { useInitSignInIDPMutation } from '../../hooks'\nimport { useSaveBacklink } from './useRedirectToBacklink'\n\nexport interface UseInitIDPRedirectProps {\n\tonRedirect?: (url: string) => void\n\tsetState: (state: SetStateAction<IDPStateValue>) => void\n}\n\nexport const useInitIDPRedirect = ({ onRedirect, setState }: UseInitIDPRedirectProps) => {\n\tconst initRequest = useInitSignInIDPMutation()\n\tconst saveBacklink = useSaveBacklink()\n\tconst { set: saveIdpState } = useIDPStateStore()\n\n\treturn useCallback(async ({ provider }: { provider: string }): Promise<{ ok: true } | { ok: false; error: IDPInitError }> => {\n\t\tconst fail = (error: IDPInitError) => {\n\t\t\tsetState({ type: 'init_failed', error })\n\t\t\treturn { ok: false, error }\n\t\t}\n\t\ttry {\n\t\t\tsetState({ type: 'processing_init' })\n\t\t\tconst response = await initRequest({\n\t\t\t\tdata: {\n\t\t\t\t\tredirectUrl: getBaseHref(),\n\t\t\t\t},\n\t\t\t\tidentityProvider: provider,\n\t\t\t})\n\t\t\tif (!response.ok) {\n\t\t\t\treturn fail(response.error || 'UNKNOWN_ERROR')\n\t\t\t} else {\n\t\t\t\tsaveIdpState({ provider, sessionData: response.result.sessionData as string })\n\t\t\t\tsaveBacklink()\n\t\t\t\tif (onRedirect) {\n\t\t\t\t\tonRedirect(response.result.authUrl as string)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = response.result.authUrl as string\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn fail('UNKNOWN_ERROR')\n\t\t}\n\t}, [initRequest, onRedirect, saveBacklink, saveIdpState, setState])\n}\n"],"names":[],"mappings":";;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,YAAY,eAAwC;AACxF,QAAM,cAAc;AACpB,QAAM,eAAe;AACrB,QAAM,EAAE,KAAK,aAAa,IAAI,iBAAiB;AAE/C,SAAO,YAAY,OAAO,EAAE,eAAiG;AACtH,UAAA,OAAO,CAAC,UAAwB;AACrC,eAAS,EAAE,MAAM,eAAe,MAAO,CAAA;AAChC,aAAA,EAAE,IAAI,OAAO;IAAM;AAEvB,QAAA;AACM,eAAA,EAAE,MAAM,kBAAA,CAAmB;AAC9B,YAAA,WAAW,MAAM,YAAY;AAAA,QAClC,MAAM;AAAA,UACL,aAAa,YAAY;AAAA,QAC1B;AAAA,QACA,kBAAkB;AAAA,MAAA,CAClB;AACG,UAAA,CAAC,SAAS,IAAI;AACV,eAAA,KAAK,SAAS,SAAS,eAAe;AAAA,MAAA,OACvC;AACN,qBAAa,EAAE,UAAU,aAAa,SAAS,OAAO,aAAuB;AAChE;AACb,YAAI,YAAY;AACJ,qBAAA,SAAS,OAAO,OAAiB;AAAA,QAAA,OACtC;AACC,iBAAA,SAAS,OAAO,SAAS,OAAO;AAAA,QACxC;AACO,eAAA,EAAE,IAAI;MACd;AAAA,aACQ,GAAG;AACX,cAAQ,MAAM,CAAC;AACf,aAAO,KAAK,eAAe;AAAA,IAC5B;AAAA,EAAA,GACE,CAAC,aAAa,YAAY,cAAc,cAAc,QAAQ,CAAC;AACnE;"}
1
+ {"version":3,"file":"useInitIDPRedirect.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useInitIDPRedirect.ts"],"sourcesContent":["import { SetStateAction, useCallback } from 'react'\nimport { useIDPStateStore } from './useIDPStateStore'\nimport { getBaseHref } from '../utils/getBaseHref'\nimport { IDPInitError, IDPStateValue } from '../../types/idp'\nimport { useInitSignInIDPMutation } from '../../hooks'\nimport { useSaveBacklink } from './useRedirectToBacklink'\n\nexport interface UseInitIDPRedirectProps {\n\tonRedirect?: (url: string) => void\n\tsetState: (state: SetStateAction<IDPStateValue>) => void\n}\n\nexport const useInitIDPRedirect = ({ onRedirect, setState }: UseInitIDPRedirectProps) => {\n\tconst initRequest = useInitSignInIDPMutation()\n\tconst saveBacklink = useSaveBacklink()\n\tconst { set: saveIdpState } = useIDPStateStore()\n\n\treturn useCallback(async ({ provider }: { provider: string }): Promise<{ ok: true } | { ok: false; error: IDPInitError }> => {\n\t\tconst fail = (error: IDPInitError) => {\n\t\t\tsetState({ type: 'init_failed', error })\n\t\t\treturn { ok: false, error }\n\t\t}\n\t\ttry {\n\t\t\tsetState({ type: 'processing_init' })\n\t\t\tconst response = await initRequest({\n\t\t\t\tdata: {\n\t\t\t\t\tredirectUrl: getBaseHref(),\n\t\t\t\t},\n\t\t\t\tidentityProvider: provider,\n\t\t\t})\n\t\t\tif (!response.ok) {\n\t\t\t\treturn fail(response.error || 'UNKNOWN_ERROR')\n\t\t\t} else {\n\t\t\t\tsaveIdpState({ provider, sessionData: response.result.sessionData as string })\n\t\t\t\tsaveBacklink()\n\t\t\t\tif (onRedirect) {\n\t\t\t\t\tonRedirect(response.result.authUrl as string)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = response.result.authUrl as string\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn fail('UNKNOWN_ERROR')\n\t\t}\n\t}, [initRequest, onRedirect, saveBacklink, saveIdpState, setState])\n}\n"],"names":[],"mappings":";;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,YAAY,eAAwC;AACxF,QAAM,cAAc,yBAAyB;AAC7C,QAAM,eAAe,gBAAgB;AACrC,QAAM,EAAE,KAAK,aAAa,IAAI,iBAAiB;AAE/C,SAAO,YAAY,OAAO,EAAE,eAAiG;AACtH,UAAA,OAAO,CAAC,UAAwB;AACrC,eAAS,EAAE,MAAM,eAAe,MAAA,CAAO;AAChC,aAAA,EAAE,IAAI,OAAO,MAAM;AAAA,IAC3B;AACI,QAAA;AACM,eAAA,EAAE,MAAM,mBAAmB;AAC9B,YAAA,WAAW,MAAM,YAAY;AAAA,QAClC,MAAM;AAAA,UACL,aAAa,YAAY;AAAA,QAC1B;AAAA,QACA,kBAAkB;AAAA,MAAA,CAClB;AACG,UAAA,CAAC,SAAS,IAAI;AACV,eAAA,KAAK,SAAS,SAAS,eAAe;AAAA,MAAA,OACvC;AACN,qBAAa,EAAE,UAAU,aAAa,SAAS,OAAO,aAAuB;AAChE,qBAAA;AACb,YAAI,YAAY;AACJ,qBAAA,SAAS,OAAO,OAAiB;AAAA,QAAA,OACtC;AACC,iBAAA,SAAS,OAAO,SAAS,OAAO;AAAA,QAAA;AAEjC,eAAA,EAAE,IAAI,KAAK;AAAA,MAAA;AAAA,aAEX,GAAG;AACX,cAAQ,MAAM,CAAC;AACf,aAAO,KAAK,eAAe;AAAA,IAAA;AAAA,EAC5B,GACE,CAAC,aAAa,YAAY,cAAc,cAAc,QAAQ,CAAC;AACnE;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLogoutInternal.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useLogoutInternal.ts"],"sourcesContent":["import { useSetSessionToken } from '@contember/react-client'\nimport { useCallback } from 'react'\nimport { useSignOutMutation } from '../../hooks'\n\nexport const useLogoutInternal = (clearIdentity?: () => void) => {\n\tconst tenantLogout = useSignOutMutation()\n\tconst setSessionToken = useSetSessionToken()\n\n\treturn useCallback(\n\t\tasync ({ noRedirect = false }: { noRedirect?: boolean } = {}) => {\n\t\t\tif (navigator.credentials && navigator.credentials.preventSilentAccess) {\n\t\t\t\ttry {\n\t\t\t\t\tawait navigator.credentials.preventSilentAccess()\n\t\t\t\t} catch {\n\t\t\t\t\t// actually, not implemented in safari:\n\t\t\t\t\t// https://github.com/WebKit/WebKit/blob/414f4e45b0e82bbfcee783d08a9642be1afa8f72/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp#L132\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearIdentity?.()\n\t\t\tsetSessionToken(undefined)\n\t\t\ttry {\n\t\t\t\tconst response = await tenantLogout({})\n\t\t\t\tif (!response?.ok) {\n\t\t\t\t\tconsole.warn(response?.error)\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e)\n\t\t\t}\n\t\t\tif (!noRedirect) {\n\t\t\t\twindow.location.href = '/' // todo better redirect?\n\t\t\t}\n\t\t},\n\t\t[clearIdentity, setSessionToken, tenantLogout],\n\t)\n}\n"],"names":["useSignOutMutation","useSetSessionToken","useCallback"],"mappings":";;;;;AAIa,MAAA,oBAAoB,CAAC,kBAA+B;AAChE,QAAM,eAAeA,mBAAAA;AACrB,QAAM,kBAAkBC,YAAAA;AAEjB,SAAAC,MAAA;AAAA,IACN,OAAO,EAAE,aAAa,MAAM,IAA8B,OAAO;AAChE,UAAI,UAAU,eAAe,UAAU,YAAY,qBAAqB;AACnE,YAAA;AACG,gBAAA,UAAU,YAAY;QAAoB,QACzC;AAAA,QAGR;AAAA,MACD;AACgB;AAChB,sBAAgB,MAAS;AACrB,UAAA;AACH,cAAM,WAAW,MAAM,aAAa,CAAA,CAAE;AAClC,YAAA,CAAC,UAAU,IAAI;AACV,kBAAA,KAAK,UAAU,KAAK;AAAA,QAC7B;AAAA,eACQ,GAAG;AACX,gBAAQ,KAAK,CAAC;AAAA,MACf;AACA,UAAI,CAAC,YAAY;AAChB,eAAO,SAAS,OAAO;AAAA,MACxB;AAAA,IACD;AAAA,IACA,CAAC,eAAe,iBAAiB,YAAY;AAAA,EAAA;AAE/C;;"}
1
+ {"version":3,"file":"useLogoutInternal.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useLogoutInternal.ts"],"sourcesContent":["import { useSetSessionToken } from '@contember/react-client'\nimport { useCallback } from 'react'\nimport { useSignOutMutation } from '../../hooks'\n\nexport const useLogoutInternal = (clearIdentity?: () => void) => {\n\tconst tenantLogout = useSignOutMutation()\n\tconst setSessionToken = useSetSessionToken()\n\n\treturn useCallback(\n\t\tasync ({ noRedirect = false }: { noRedirect?: boolean } = {}) => {\n\t\t\tif (navigator.credentials && navigator.credentials.preventSilentAccess) {\n\t\t\t\ttry {\n\t\t\t\t\tawait navigator.credentials.preventSilentAccess()\n\t\t\t\t} catch {\n\t\t\t\t\t// actually, not implemented in safari:\n\t\t\t\t\t// https://github.com/WebKit/WebKit/blob/414f4e45b0e82bbfcee783d08a9642be1afa8f72/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp#L132\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearIdentity?.()\n\t\t\tsetSessionToken(undefined)\n\t\t\ttry {\n\t\t\t\tconst response = await tenantLogout({})\n\t\t\t\tif (!response?.ok) {\n\t\t\t\t\tconsole.warn(response?.error)\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e)\n\t\t\t}\n\t\t\tif (!noRedirect) {\n\t\t\t\twindow.location.href = '/' // todo better redirect?\n\t\t\t}\n\t\t},\n\t\t[clearIdentity, setSessionToken, tenantLogout],\n\t)\n}\n"],"names":["useSignOutMutation","useSetSessionToken","useCallback"],"mappings":";;;;;AAIa,MAAA,oBAAoB,CAAC,kBAA+B;AAChE,QAAM,eAAeA,mBAAAA,mBAAmB;AACxC,QAAM,kBAAkBC,YAAAA,mBAAmB;AAEpC,SAAAC,MAAA;AAAA,IACN,OAAO,EAAE,aAAa,MAAM,IAA8B,OAAO;AAChE,UAAI,UAAU,eAAe,UAAU,YAAY,qBAAqB;AACnE,YAAA;AACG,gBAAA,UAAU,YAAY,oBAAoB;AAAA,QAAA,QACzC;AAAA,QAAA;AAAA,MAGR;AAEe,sBAAA;AAChB,sBAAgB,MAAS;AACrB,UAAA;AACH,cAAM,WAAW,MAAM,aAAa,EAAE;AAClC,YAAA,CAAC,UAAU,IAAI;AACV,kBAAA,KAAK,UAAU,KAAK;AAAA,QAAA;AAAA,eAErB,GAAG;AACX,gBAAQ,KAAK,CAAC;AAAA,MAAA;AAEf,UAAI,CAAC,YAAY;AAChB,eAAO,SAAS,OAAO;AAAA,MAAA;AAAA,IAEzB;AAAA,IACA,CAAC,eAAe,iBAAiB,YAAY;AAAA,EAC9C;AACD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLogoutInternal.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useLogoutInternal.ts"],"sourcesContent":["import { useSetSessionToken } from '@contember/react-client'\nimport { useCallback } from 'react'\nimport { useSignOutMutation } from '../../hooks'\n\nexport const useLogoutInternal = (clearIdentity?: () => void) => {\n\tconst tenantLogout = useSignOutMutation()\n\tconst setSessionToken = useSetSessionToken()\n\n\treturn useCallback(\n\t\tasync ({ noRedirect = false }: { noRedirect?: boolean } = {}) => {\n\t\t\tif (navigator.credentials && navigator.credentials.preventSilentAccess) {\n\t\t\t\ttry {\n\t\t\t\t\tawait navigator.credentials.preventSilentAccess()\n\t\t\t\t} catch {\n\t\t\t\t\t// actually, not implemented in safari:\n\t\t\t\t\t// https://github.com/WebKit/WebKit/blob/414f4e45b0e82bbfcee783d08a9642be1afa8f72/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp#L132\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearIdentity?.()\n\t\t\tsetSessionToken(undefined)\n\t\t\ttry {\n\t\t\t\tconst response = await tenantLogout({})\n\t\t\t\tif (!response?.ok) {\n\t\t\t\t\tconsole.warn(response?.error)\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e)\n\t\t\t}\n\t\t\tif (!noRedirect) {\n\t\t\t\twindow.location.href = '/' // todo better redirect?\n\t\t\t}\n\t\t},\n\t\t[clearIdentity, setSessionToken, tenantLogout],\n\t)\n}\n"],"names":[],"mappings":";;;AAIa,MAAA,oBAAoB,CAAC,kBAA+B;AAChE,QAAM,eAAe;AACrB,QAAM,kBAAkB;AAEjB,SAAA;AAAA,IACN,OAAO,EAAE,aAAa,MAAM,IAA8B,OAAO;AAChE,UAAI,UAAU,eAAe,UAAU,YAAY,qBAAqB;AACnE,YAAA;AACG,gBAAA,UAAU,YAAY;QAAoB,QACzC;AAAA,QAGR;AAAA,MACD;AACgB;AAChB,sBAAgB,MAAS;AACrB,UAAA;AACH,cAAM,WAAW,MAAM,aAAa,CAAA,CAAE;AAClC,YAAA,CAAC,UAAU,IAAI;AACV,kBAAA,KAAK,UAAU,KAAK;AAAA,QAC7B;AAAA,eACQ,GAAG;AACX,gBAAQ,KAAK,CAAC;AAAA,MACf;AACA,UAAI,CAAC,YAAY;AAChB,eAAO,SAAS,OAAO;AAAA,MACxB;AAAA,IACD;AAAA,IACA,CAAC,eAAe,iBAAiB,YAAY;AAAA,EAAA;AAE/C;"}
1
+ {"version":3,"file":"useLogoutInternal.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useLogoutInternal.ts"],"sourcesContent":["import { useSetSessionToken } from '@contember/react-client'\nimport { useCallback } from 'react'\nimport { useSignOutMutation } from '../../hooks'\n\nexport const useLogoutInternal = (clearIdentity?: () => void) => {\n\tconst tenantLogout = useSignOutMutation()\n\tconst setSessionToken = useSetSessionToken()\n\n\treturn useCallback(\n\t\tasync ({ noRedirect = false }: { noRedirect?: boolean } = {}) => {\n\t\t\tif (navigator.credentials && navigator.credentials.preventSilentAccess) {\n\t\t\t\ttry {\n\t\t\t\t\tawait navigator.credentials.preventSilentAccess()\n\t\t\t\t} catch {\n\t\t\t\t\t// actually, not implemented in safari:\n\t\t\t\t\t// https://github.com/WebKit/WebKit/blob/414f4e45b0e82bbfcee783d08a9642be1afa8f72/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp#L132\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearIdentity?.()\n\t\t\tsetSessionToken(undefined)\n\t\t\ttry {\n\t\t\t\tconst response = await tenantLogout({})\n\t\t\t\tif (!response?.ok) {\n\t\t\t\t\tconsole.warn(response?.error)\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e)\n\t\t\t}\n\t\t\tif (!noRedirect) {\n\t\t\t\twindow.location.href = '/' // todo better redirect?\n\t\t\t}\n\t\t},\n\t\t[clearIdentity, setSessionToken, tenantLogout],\n\t)\n}\n"],"names":[],"mappings":";;;AAIa,MAAA,oBAAoB,CAAC,kBAA+B;AAChE,QAAM,eAAe,mBAAmB;AACxC,QAAM,kBAAkB,mBAAmB;AAEpC,SAAA;AAAA,IACN,OAAO,EAAE,aAAa,MAAM,IAA8B,OAAO;AAChE,UAAI,UAAU,eAAe,UAAU,YAAY,qBAAqB;AACnE,YAAA;AACG,gBAAA,UAAU,YAAY,oBAAoB;AAAA,QAAA,QACzC;AAAA,QAAA;AAAA,MAGR;AAEe,sBAAA;AAChB,sBAAgB,MAAS;AACrB,UAAA;AACH,cAAM,WAAW,MAAM,aAAa,EAAE;AAClC,YAAA,CAAC,UAAU,IAAI;AACV,kBAAA,KAAK,UAAU,KAAK;AAAA,QAAA;AAAA,eAErB,GAAG;AACX,gBAAQ,KAAK,CAAC;AAAA,MAAA;AAEf,UAAI,CAAC,YAAY;AAChB,eAAO,SAAS,OAAO;AAAA,MAAA;AAAA,IAEzB;AAAA,IACA,CAAC,eAAe,iBAAiB,YAAY;AAAA,EAC9C;AACD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useRedirectToBacklink.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useRedirectToBacklink.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { useIdentity } from '../../contexts'\n\nconst getBacklinkFromUrl = () => {\n\treturn new URLSearchParams(window.location.search).get('backlink')\n}\n\nexport const useSaveBacklink = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl()\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.setItem('backlink', backlink)\n\t}, [])\n}\n\nexport const useRedirectToBacklinkCallback = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl() ?? sessionStorage.getItem('backlink')\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.removeItem('backlink')\n\t\tconst resolvedBacklink = new URL(backlink, window.location.href)\n\t\tif (resolvedBacklink.origin === window.location.origin) {\n\t\t\twindow.location.href = resolvedBacklink.toString()\n\t\t}\n\t}, [])\n}\n\nexport const useRedirectToBacklink = () => {\n\tconst identity = useIdentity()\n\tconst redirect = useRedirectToBacklinkCallback()\n\tuseEffect(() => {\n\t\tif (!identity) {\n\t\t\treturn\n\t\t}\n\t\tredirect()\n\t}, [identity, redirect])\n\n}\n"],"names":["useCallback"],"mappings":";;;AAGA,MAAM,qBAAqB,MAAM;AAChC,SAAO,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,UAAU;AAClE;AAEO,MAAM,kBAAkB,MAAM;AACpC,SAAOA,kBAAY,MAAM;AACxB,UAAM,WAAW;AACjB,QAAI,CAAC,UAAU;AACd;AAAA,IACD;AACe,mBAAA,QAAQ,YAAY,QAAQ;AAAA,EAC5C,GAAG,CAAE,CAAA;AACN;AAEO,MAAM,gCAAgC,MAAM;AAClD,SAAOA,kBAAY,MAAM;AACxB,UAAM,WAAW,mBAAwB,KAAA,eAAe,QAAQ,UAAU;AAC1E,QAAI,CAAC,UAAU;AACd;AAAA,IACD;AACA,mBAAe,WAAW,UAAU;AACpC,UAAM,mBAAmB,IAAI,IAAI,UAAU,OAAO,SAAS,IAAI;AAC/D,QAAI,iBAAiB,WAAW,OAAO,SAAS,QAAQ;AAChD,aAAA,SAAS,OAAO,iBAAiB,SAAS;AAAA,IAClD;AAAA,EACD,GAAG,CAAE,CAAA;AACN;;;"}
1
+ {"version":3,"file":"useRedirectToBacklink.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useRedirectToBacklink.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { useIdentity } from '../../contexts'\n\nconst getBacklinkFromUrl = () => {\n\treturn new URLSearchParams(window.location.search).get('backlink')\n}\n\nexport const useSaveBacklink = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl()\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.setItem('backlink', backlink)\n\t}, [])\n}\n\nexport const useRedirectToBacklinkCallback = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl() ?? sessionStorage.getItem('backlink')\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.removeItem('backlink')\n\t\tconst resolvedBacklink = new URL(backlink, window.location.href)\n\t\tif (resolvedBacklink.origin === window.location.origin) {\n\t\t\twindow.location.href = resolvedBacklink.toString()\n\t\t}\n\t}, [])\n}\n\nexport const useRedirectToBacklink = () => {\n\tconst identity = useIdentity()\n\tconst redirect = useRedirectToBacklinkCallback()\n\tuseEffect(() => {\n\t\tif (!identity) {\n\t\t\treturn\n\t\t}\n\t\tredirect()\n\t}, [identity, redirect])\n\n}\n"],"names":["useCallback"],"mappings":";;;AAGA,MAAM,qBAAqB,MAAM;AAChC,SAAO,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,UAAU;AAClE;AAEO,MAAM,kBAAkB,MAAM;AACpC,SAAOA,kBAAY,MAAM;AACxB,UAAM,WAAW,mBAAmB;AACpC,QAAI,CAAC,UAAU;AACd;AAAA,IAAA;AAEc,mBAAA,QAAQ,YAAY,QAAQ;AAAA,EAC5C,GAAG,EAAE;AACN;AAEO,MAAM,gCAAgC,MAAM;AAClD,SAAOA,kBAAY,MAAM;AACxB,UAAM,WAAW,mBAAA,KAAwB,eAAe,QAAQ,UAAU;AAC1E,QAAI,CAAC,UAAU;AACd;AAAA,IAAA;AAED,mBAAe,WAAW,UAAU;AACpC,UAAM,mBAAmB,IAAI,IAAI,UAAU,OAAO,SAAS,IAAI;AAC/D,QAAI,iBAAiB,WAAW,OAAO,SAAS,QAAQ;AAChD,aAAA,SAAS,OAAO,iBAAiB,SAAS;AAAA,IAAA;AAAA,EAEnD,GAAG,EAAE;AACN;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useRedirectToBacklink.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useRedirectToBacklink.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { useIdentity } from '../../contexts'\n\nconst getBacklinkFromUrl = () => {\n\treturn new URLSearchParams(window.location.search).get('backlink')\n}\n\nexport const useSaveBacklink = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl()\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.setItem('backlink', backlink)\n\t}, [])\n}\n\nexport const useRedirectToBacklinkCallback = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl() ?? sessionStorage.getItem('backlink')\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.removeItem('backlink')\n\t\tconst resolvedBacklink = new URL(backlink, window.location.href)\n\t\tif (resolvedBacklink.origin === window.location.origin) {\n\t\t\twindow.location.href = resolvedBacklink.toString()\n\t\t}\n\t}, [])\n}\n\nexport const useRedirectToBacklink = () => {\n\tconst identity = useIdentity()\n\tconst redirect = useRedirectToBacklinkCallback()\n\tuseEffect(() => {\n\t\tif (!identity) {\n\t\t\treturn\n\t\t}\n\t\tredirect()\n\t}, [identity, redirect])\n\n}\n"],"names":[],"mappings":";AAGA,MAAM,qBAAqB,MAAM;AAChC,SAAO,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,UAAU;AAClE;AAEO,MAAM,kBAAkB,MAAM;AACpC,SAAO,YAAY,MAAM;AACxB,UAAM,WAAW;AACjB,QAAI,CAAC,UAAU;AACd;AAAA,IACD;AACe,mBAAA,QAAQ,YAAY,QAAQ;AAAA,EAC5C,GAAG,CAAE,CAAA;AACN;AAEO,MAAM,gCAAgC,MAAM;AAClD,SAAO,YAAY,MAAM;AACxB,UAAM,WAAW,mBAAwB,KAAA,eAAe,QAAQ,UAAU;AAC1E,QAAI,CAAC,UAAU;AACd;AAAA,IACD;AACA,mBAAe,WAAW,UAAU;AACpC,UAAM,mBAAmB,IAAI,IAAI,UAAU,OAAO,SAAS,IAAI;AAC/D,QAAI,iBAAiB,WAAW,OAAO,SAAS,QAAQ;AAChD,aAAA,SAAS,OAAO,iBAAiB,SAAS;AAAA,IAClD;AAAA,EACD,GAAG,CAAE,CAAA;AACN;"}
1
+ {"version":3,"file":"useRedirectToBacklink.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useRedirectToBacklink.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { useIdentity } from '../../contexts'\n\nconst getBacklinkFromUrl = () => {\n\treturn new URLSearchParams(window.location.search).get('backlink')\n}\n\nexport const useSaveBacklink = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl()\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.setItem('backlink', backlink)\n\t}, [])\n}\n\nexport const useRedirectToBacklinkCallback = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl() ?? sessionStorage.getItem('backlink')\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.removeItem('backlink')\n\t\tconst resolvedBacklink = new URL(backlink, window.location.href)\n\t\tif (resolvedBacklink.origin === window.location.origin) {\n\t\t\twindow.location.href = resolvedBacklink.toString()\n\t\t}\n\t}, [])\n}\n\nexport const useRedirectToBacklink = () => {\n\tconst identity = useIdentity()\n\tconst redirect = useRedirectToBacklinkCallback()\n\tuseEffect(() => {\n\t\tif (!identity) {\n\t\t\treturn\n\t\t}\n\t\tredirect()\n\t}, [identity, redirect])\n\n}\n"],"names":[],"mappings":";AAGA,MAAM,qBAAqB,MAAM;AAChC,SAAO,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,UAAU;AAClE;AAEO,MAAM,kBAAkB,MAAM;AACpC,SAAO,YAAY,MAAM;AACxB,UAAM,WAAW,mBAAmB;AACpC,QAAI,CAAC,UAAU;AACd;AAAA,IAAA;AAEc,mBAAA,QAAQ,YAAY,QAAQ;AAAA,EAC5C,GAAG,EAAE;AACN;AAEO,MAAM,gCAAgC,MAAM;AAClD,SAAO,YAAY,MAAM;AACxB,UAAM,WAAW,mBAAA,KAAwB,eAAe,QAAQ,UAAU;AAC1E,QAAI,CAAC,UAAU;AACd;AAAA,IAAA;AAED,mBAAe,WAAW,UAAU;AACpC,UAAM,mBAAmB,IAAI,IAAI,UAAU,OAAO,SAAS,IAAI;AAC/D,QAAI,iBAAiB,WAAW,OAAO,SAAS,QAAQ;AAChD,aAAA,SAAS,OAAO,iBAAiB,SAAS;AAAA,IAAA;AAAA,EAEnD,GAAG,EAAE;AACN;"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const calculateHash = async (algo, message) => {
4
+ const hashBuffer = await crypto.subtle.digest(algo, new TextEncoder().encode(message));
5
+ return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
6
+ };
7
+ exports.calculateHash = calculateHash;
8
+ //# sourceMappingURL=hashing.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hashing.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/utils/hashing.ts"],"sourcesContent":["export const calculateHash = async (algo: AlgorithmIdentifier, message: string): Promise<string> => {\n\tconst hashBuffer = await crypto.subtle.digest(algo, new TextEncoder().encode(message))\n\treturn Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, '0')).join('')\n}\n"],"names":[],"mappings":";;AAAa,MAAA,gBAAgB,OAAO,MAA2B,YAAqC;AAC7F,QAAA,aAAa,MAAM,OAAO,OAAO,OAAO,MAAM,IAAI,YAAY,EAAE,OAAO,OAAO,CAAC;AACrF,SAAO,MAAM,KAAK,IAAI,WAAW,UAAU,CAAC,EAAE,IAAI,CAAA,MAAK,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE;AAChG;;"}
@@ -0,0 +1,8 @@
1
+ const calculateHash = async (algo, message) => {
2
+ const hashBuffer = await crypto.subtle.digest(algo, new TextEncoder().encode(message));
3
+ return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
4
+ };
5
+ export {
6
+ calculateHash
7
+ };
8
+ //# sourceMappingURL=hashing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hashing.js","sources":["../../../../../../packages/react-client-tenant/src/internal/utils/hashing.ts"],"sourcesContent":["export const calculateHash = async (algo: AlgorithmIdentifier, message: string): Promise<string> => {\n\tconst hashBuffer = await crypto.subtle.digest(algo, new TextEncoder().encode(message))\n\treturn Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, '0')).join('')\n}\n"],"names":[],"mappings":"AAAa,MAAA,gBAAgB,OAAO,MAA2B,YAAqC;AAC7F,QAAA,aAAa,MAAM,OAAO,OAAO,OAAO,MAAM,IAAI,YAAY,EAAE,OAAO,OAAO,CAAC;AACrF,SAAO,MAAM,KAAK,IAAI,WAAW,UAAU,CAAC,EAAE,IAAI,CAAA,MAAK,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE;AAChG;"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const randomInt = (min, max) => {
4
+ if (min >= max) {
5
+ throw new Error("The min value must be less than the max value.");
6
+ }
7
+ if (max > 4294967295) {
8
+ throw new Error("The max value exceeds the limit for this implementation.");
9
+ }
10
+ const range = max - min + 1;
11
+ const maxValidValue = Math.floor(4294967295 / range) * range;
12
+ let randomInt2;
13
+ do {
14
+ const array = new Uint32Array(1);
15
+ window.crypto.getRandomValues(array);
16
+ randomInt2 = array[0];
17
+ } while (randomInt2 >= maxValidValue);
18
+ return min + randomInt2 % range;
19
+ };
20
+ const randomString = (length, charset) => {
21
+ let result = "";
22
+ for (let i = 0; i < length; i++) {
23
+ result += charset[randomInt(0, charset.length - 1)];
24
+ }
25
+ return result;
26
+ };
27
+ exports.randomInt = randomInt;
28
+ exports.randomString = randomString;
29
+ //# sourceMappingURL=randomInt.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"randomInt.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/utils/randomInt.ts"],"sourcesContent":["export const randomInt = (min: number, max: number) => {\n\tif (min >= max) {\n\t\tthrow new Error('The min value must be less than the max value.')\n\t}\n\n\tif (max > 0xFFFFFFFF) {\n\t\tthrow new Error('The max value exceeds the limit for this implementation.')\n\t}\n\n\tconst range = max - min + 1\n\tconst maxValidValue = Math.floor(0xFFFFFFFF / range) * range\n\tlet randomInt\n\n\tdo {\n\t\tconst array = new Uint32Array(1)\n\t\twindow.crypto.getRandomValues(array)\n\t\trandomInt = array[0]\n\t} while (randomInt >= maxValidValue)\n\n\treturn min + (randomInt % range)\n}\n\n\nexport const randomString = (length: number, charset: string): string => {\n\tlet result = ''\n\tfor (let i = 0; i < length; i++) {\n\t\tresult += charset[randomInt(0, charset.length - 1)]\n\t}\n\treturn result\n}\n"],"names":["randomInt"],"mappings":";;AAAa,MAAA,YAAY,CAAC,KAAa,QAAgB;AACtD,MAAI,OAAO,KAAK;AACT,UAAA,IAAI,MAAM,gDAAgD;AAAA,EAAA;AAGjE,MAAI,MAAM,YAAY;AACf,UAAA,IAAI,MAAM,0DAA0D;AAAA,EAAA;AAGrE,QAAA,QAAQ,MAAM,MAAM;AAC1B,QAAM,gBAAgB,KAAK,MAAM,aAAa,KAAK,IAAI;AACnDA,MAAAA;AAED,KAAA;AACI,UAAA,QAAQ,IAAI,YAAY,CAAC;AACxB,WAAA,OAAO,gBAAgB,KAAK;AACnCA,iBAAY,MAAM,CAAC;AAAA,WACXA,cAAa;AAEtB,SAAO,MAAOA,aAAY;AAC3B;AAGa,MAAA,eAAe,CAAC,QAAgB,YAA4B;AACxE,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAChC,cAAU,QAAQ,UAAU,GAAG,QAAQ,SAAS,CAAC,CAAC;AAAA,EAAA;AAE5C,SAAA;AACR;;;"}
@@ -0,0 +1,29 @@
1
+ const randomInt = (min, max) => {
2
+ if (min >= max) {
3
+ throw new Error("The min value must be less than the max value.");
4
+ }
5
+ if (max > 4294967295) {
6
+ throw new Error("The max value exceeds the limit for this implementation.");
7
+ }
8
+ const range = max - min + 1;
9
+ const maxValidValue = Math.floor(4294967295 / range) * range;
10
+ let randomInt2;
11
+ do {
12
+ const array = new Uint32Array(1);
13
+ window.crypto.getRandomValues(array);
14
+ randomInt2 = array[0];
15
+ } while (randomInt2 >= maxValidValue);
16
+ return min + randomInt2 % range;
17
+ };
18
+ const randomString = (length, charset) => {
19
+ let result = "";
20
+ for (let i = 0; i < length; i++) {
21
+ result += charset[randomInt(0, charset.length - 1)];
22
+ }
23
+ return result;
24
+ };
25
+ export {
26
+ randomInt,
27
+ randomString
28
+ };
29
+ //# sourceMappingURL=randomInt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"randomInt.js","sources":["../../../../../../packages/react-client-tenant/src/internal/utils/randomInt.ts"],"sourcesContent":["export const randomInt = (min: number, max: number) => {\n\tif (min >= max) {\n\t\tthrow new Error('The min value must be less than the max value.')\n\t}\n\n\tif (max > 0xFFFFFFFF) {\n\t\tthrow new Error('The max value exceeds the limit for this implementation.')\n\t}\n\n\tconst range = max - min + 1\n\tconst maxValidValue = Math.floor(0xFFFFFFFF / range) * range\n\tlet randomInt\n\n\tdo {\n\t\tconst array = new Uint32Array(1)\n\t\twindow.crypto.getRandomValues(array)\n\t\trandomInt = array[0]\n\t} while (randomInt >= maxValidValue)\n\n\treturn min + (randomInt % range)\n}\n\n\nexport const randomString = (length: number, charset: string): string => {\n\tlet result = ''\n\tfor (let i = 0; i < length; i++) {\n\t\tresult += charset[randomInt(0, charset.length - 1)]\n\t}\n\treturn result\n}\n"],"names":["randomInt"],"mappings":"AAAa,MAAA,YAAY,CAAC,KAAa,QAAgB;AACtD,MAAI,OAAO,KAAK;AACT,UAAA,IAAI,MAAM,gDAAgD;AAAA,EAAA;AAGjE,MAAI,MAAM,YAAY;AACf,UAAA,IAAI,MAAM,0DAA0D;AAAA,EAAA;AAGrE,QAAA,QAAQ,MAAM,MAAM;AAC1B,QAAM,gBAAgB,KAAK,MAAM,aAAa,KAAK,IAAI;AACnDA,MAAAA;AAED,KAAA;AACI,UAAA,QAAQ,IAAI,YAAY,CAAC;AACxB,WAAA,OAAO,gBAAgB,KAAK;AACnCA,iBAAY,MAAM,CAAC;AAAA,WACXA,cAAa;AAEtB,SAAO,MAAOA,aAAY;AAC3B;AAGa,MAAA,eAAe,CAAC,QAAgB,YAA4B;AACxE,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAChC,cAAU,QAAQ,UAAU,GAAG,QAAQ,SAAS,CAAC,CAAC;AAAA,EAAA;AAE5C,SAAA;AACR;"}
@@ -0,0 +1,22 @@
1
+ import { ReactElement } from 'react';
2
+ import * as TenantApi from '@contember/graphql-client-tenant';
3
+ import { FormContextValue, FormError, FormState } from '../../types/forms';
4
+ export type PasswordlessSignInFormValues = {
5
+ token: string;
6
+ otpToken: string;
7
+ };
8
+ export type PasswordlessSignInFormErrorCode = TenantApi.SignInPasswordlessErrorCode | 'FIELD_REQUIRED' | 'INVALID_VALUE' | 'UNKNOWN_ERROR';
9
+ export type PasswordlessSignInFormState = FormState | 'otp-required';
10
+ export type PasswordlessSignInFormError = FormError<PasswordlessSignInFormValues, PasswordlessSignInFormErrorCode>;
11
+ export type PasswordlessSignInFormContextValue = FormContextValue<PasswordlessSignInFormValues, PasswordlessSignInFormErrorCode, PasswordlessSignInFormState>;
12
+ export interface PasswordlessSignInFormProps {
13
+ requestId: string;
14
+ validationType: TenantApi.PasswordlessValidationType;
15
+ token?: string;
16
+ expiration?: number;
17
+ children: ReactElement;
18
+ onSuccess?: () => void;
19
+ }
20
+ export declare const usePasswordlessSignInForm: () => PasswordlessSignInFormContextValue;
21
+ export declare const PasswordlessSignInForm: ({ children, onSuccess, requestId, validationType, token, expiration }: PasswordlessSignInFormProps) => import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=PasswordlessSignInForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordlessSignInForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/PasswordlessSignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwB,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAE7D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAM1E,MAAM,MAAM,4BAA4B,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,+BAA+B,GACxC,SAAS,CAAC,2BAA2B,GACrC,gBAAgB,GAChB,eAAe,GACf,eAAe,CAAA;AAElB,MAAM,MAAM,2BAA2B,GACpC,SAAS,GACT,cAAc,CAAA;AAEjB,MAAM,MAAM,2BAA2B,GAAG,SAAS,CAAC,4BAA4B,EAAE,+BAA+B,CAAC,CAAA;AAElH,MAAM,MAAM,kCAAkC,GAAG,gBAAgB,CAAC,4BAA4B,EAAE,+BAA+B,EAAE,2BAA2B,CAAC,CAAA;AAG7J,MAAM,WAAW,2BAA2B;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,SAAS,CAAC,0BAA0B,CAAA;IACpD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,YAAY,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,eAAO,MAAM,yBAAyB,EAAc,MAAM,kCAAkC,CAAA;AAO5F,eAAO,MAAM,sBAAsB,0EAAsG,2BAA2B,4CA+CnK,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { ReactElement } from 'react';
2
+ import * as TenantApi from '@contember/graphql-client-tenant';
3
+ import { FormContextValue, FormError, FormState } from '../../types/forms';
4
+ import { InitSignInPasswordlessMutationResult } from '../../hooks';
5
+ export type PasswordlessSignInInitFormValues = {
6
+ email: string;
7
+ };
8
+ export type PasswordlessSignInInitFormErrorCode = TenantApi.InitSignInPasswordlessErrorCode | 'FIELD_REQUIRED' | 'INVALID_VALUE' | 'UNKNOWN_ERROR';
9
+ export type PasswordlessSignInInitFormState = FormState;
10
+ export type PasswordlessSignInInitFormError = FormError<PasswordlessSignInInitFormValues, PasswordlessSignInInitFormErrorCode>;
11
+ export type PasswordlessSignInInitFormContextValue = FormContextValue<PasswordlessSignInInitFormValues, PasswordlessSignInInitFormErrorCode>;
12
+ export interface PasswordlessSignInInitFormProps {
13
+ children: ReactElement;
14
+ onSuccess?: (args: {
15
+ result: InitSignInPasswordlessMutationResult;
16
+ }) => void;
17
+ }
18
+ export declare const usePasswordlessSignInInitForm: () => PasswordlessSignInInitFormContextValue;
19
+ export declare const PasswordlessSignInInitForm: ({ children, onSuccess }: PasswordlessSignInInitFormProps) => import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=PasswordlessSignInInitForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordlessSignInInitForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/PasswordlessSignInInitForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwB,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAE7D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE1E,OAAO,EAAE,oCAAoC,EAAqC,MAAM,aAAa,CAAA;AAGrG,MAAM,MAAM,gCAAgC,GAAG;IAC9C,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,mCAAmC,GAC5C,SAAS,CAAC,+BAA+B,GACzC,gBAAgB,GAChB,eAAe,GACf,eAAe,CAAA;AAElB,MAAM,MAAM,+BAA+B,GAAG,SAAS,CAAA;AAEvD,MAAM,MAAM,+BAA+B,GAAG,SAAS,CAAC,gCAAgC,EAAE,mCAAmC,CAAC,CAAA;AAE9H,MAAM,MAAM,sCAAsC,GAAG,gBAAgB,CAAC,gCAAgC,EAAE,mCAAmC,CAAC,CAAA;AAG5I,MAAM,WAAW,+BAA+B;IAC/C,QAAQ,EAAE,YAAY,CAAA;IACtB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,oCAAoC,CAAA;KAAE,KAAK,IAAI,CAAA;CAC5E;AAED,eAAO,MAAM,6BAA6B,EAAc,MAAM,sCAAsC,CAAA;AAEpG,eAAO,MAAM,0BAA0B,4BAA6B,+BAA+B,4CA+BlG,CAAA"}
@@ -5,6 +5,8 @@ export * from './InviteForm';
5
5
  export * from './LoginForm';
6
6
  export * from './PasswordResetForm';
7
7
  export * from './PasswordResetRequestForm';
8
+ export * from './PasswordlessSignInForm';
9
+ export * from './PasswordlessSignInInitForm';
8
10
  export * from './OtpPrepareForm';
9
11
  export * from './OtpConfirmForm';
10
12
  export * from './UpdateProjectMemberForm';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const PASSWORDLESS_REQUEST_STORAGE_KEY = "passwordless_request";
2
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,yBAAyB,CAAA"}
@@ -5,4 +5,5 @@ export * from './useLogout';
5
5
  export * from './useTenantApi';
6
6
  export * from './useTenantQueryLoader';
7
7
  export * from './useTenantMutation';
8
+ export * from './usePasswordlessOtpActivator';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,+BAA+B,CAAA"}
@@ -9,8 +9,6 @@ declare const createSessionTokenMutationResult: TenantApi.CreateSessionTokenResu
9
9
  readonly email?: string;
10
10
  } & {
11
11
  readonly name?: string;
12
- } & {
13
- readonly otpEnabled: boolean;
14
12
  };
15
13
  }, {}>;
16
14
  export type CreateSessionTokenMutationResult = ModelType<typeof createSessionTokenMutationResult>;
@@ -33,8 +31,6 @@ export declare const createSessionTokenMutation: TenantApi.MutationFetcher<{
33
31
  readonly email?: string;
34
32
  } & {
35
33
  readonly name?: string;
36
- } & {
37
- readonly otpEnabled: boolean;
38
34
  };
39
35
  }) | undefined;
40
36
  }) | undefined;
@@ -56,8 +52,6 @@ export declare const useCreateSessionTokenMutation: ({ headers, apiToken }?: imp
56
52
  readonly email?: string;
57
53
  } & {
58
54
  readonly name?: string;
59
- } & {
60
- readonly otpEnabled: boolean;
61
55
  };
62
56
  }, TenantApi.CreateSessionTokenErrorCode>>;
63
57
  export type CreateSessionTokenMutationVariables = Parameters<ReturnType<typeof useCreateSessionTokenMutation>>[0];
@@ -1 +1 @@
1
- {"version":3,"file":"useCreateSessionTokenMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,gCAAgC;;;;;;;;;;;;MAAuE,CAAA;AAE7G,MAAM,MAAM,gCAAgC,GAAG,SAAS,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEjG,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;0CAAmD,CAAA;AAC7F,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"useCreateSessionTokenMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,gCAAgC;;;;;;;;;;MAAoF,CAAA;AAE1H,MAAM,MAAM,gCAAgC,GAAG,SAAS,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEjG,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;0CAAmD,CAAA;AAC7F,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -9,8 +9,6 @@ declare const signInResultFragment: TenantApi.SignInResultFetcher<{
9
9
  readonly email?: string;
10
10
  } & {
11
11
  readonly name?: string;
12
- } & {
13
- readonly otpEnabled: boolean;
14
12
  };
15
13
  }, {}>;
16
14
  export type SignInMutationResult = ModelType<typeof signInResultFragment>;
@@ -35,8 +33,6 @@ export declare const signInMutation: TenantApi.MutationFetcher<{
35
33
  readonly email?: string;
36
34
  } & {
37
35
  readonly name?: string;
38
- } & {
39
- readonly otpEnabled: boolean;
40
36
  };
41
37
  }) | undefined;
42
38
  }) | undefined;
@@ -60,8 +56,6 @@ export declare const useSignInMutation: ({ headers, apiToken }?: import("../../u
60
56
  readonly email?: string;
61
57
  } & {
62
58
  readonly name?: string;
63
- } & {
64
- readonly otpEnabled: boolean;
65
59
  };
66
60
  }, TenantApi.SignInErrorCode>>;
67
61
  export type SignInMutationVariables = Parameters<ReturnType<typeof useSignInMutation>>[0];
@@ -1 +1 @@
1
- {"version":3,"file":"useSignInMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/auth/useSignInMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,oBAAoB;;;;;;;;;;;;MAAsD,CAAA;AAEhF,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEzE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQzB,CAAA;AAGF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;8BAE5B,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"useSignInMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/auth/useSignInMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,oBAAoB;;;;;;;;;;MAAmE,CAAA;AAE7F,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEzE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQzB,CAAA;AAGF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;8BAE5B,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -2,6 +2,8 @@ import * as TenantApi from '@contember/graphql-client-tenant';
2
2
  import { ModelType } from 'graphql-ts-client-api';
3
3
  declare const signInIdpFragment: TenantApi.SignInIDPResultFetcher<{
4
4
  readonly token: string;
5
+ } & {
6
+ readonly idpResponse?: unknown;
5
7
  } & {
6
8
  readonly person: {
7
9
  readonly id: string;
@@ -9,8 +11,6 @@ declare const signInIdpFragment: TenantApi.SignInIDPResultFetcher<{
9
11
  readonly email?: string;
10
12
  } & {
11
13
  readonly name?: string;
12
- } & {
13
- readonly otpEnabled: boolean;
14
14
  };
15
15
  }, {}>;
16
16
  export type SignInIDPMutationResult = ModelType<typeof signInIdpFragment>;
@@ -28,6 +28,8 @@ export declare const signInIDPMutation: TenantApi.MutationFetcher<{
28
28
  } & {
29
29
  readonly result?: ({
30
30
  readonly token: string;
31
+ } & {
32
+ readonly idpResponse?: unknown;
31
33
  } & {
32
34
  readonly person: {
33
35
  readonly id: string;
@@ -35,8 +37,6 @@ export declare const signInIDPMutation: TenantApi.MutationFetcher<{
35
37
  readonly email?: string;
36
38
  } & {
37
39
  readonly name?: string;
38
- } & {
39
- readonly otpEnabled: boolean;
40
40
  };
41
41
  }) | undefined;
42
42
  }) | undefined;
@@ -61,6 +61,8 @@ export type SignInIDPMutationVariables = {
61
61
  };
62
62
  export declare const useSignInIDPMutation: ({ headers, apiToken }?: import("../../useTenantApi").TenantApiOptions) => (variables: SignInIDPMutationVariables) => Promise<import("../../useTenantMutation").TenantMutationResponse<{
63
63
  readonly token: string;
64
+ } & {
65
+ readonly idpResponse?: unknown;
64
66
  } & {
65
67
  readonly person: {
66
68
  readonly id: string;
@@ -68,8 +70,6 @@ export declare const useSignInIDPMutation: ({ headers, apiToken }?: import("../.
68
70
  readonly email?: string;
69
71
  } & {
70
72
  readonly name?: string;
71
- } & {
72
- readonly otpEnabled: boolean;
73
73
  };
74
74
  }, TenantApi.SignInIDPErrorCode>>;
75
75
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"useSignInIdpMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/idp/useSignInIdpMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;MAAyD,CAAA;AAEhF,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEzE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ5B,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,EACD;QACD,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,WAAW,CAAC,EAAE,GAAG,CAAA;KACjB,GACC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;CACzB,CAAA;AAGD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iCAE/B,CAAA"}
1
+ {"version":3,"file":"useSignInIdpMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/idp/useSignInIdpMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;MAAsE,CAAA;AAE7F,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEzE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ5B,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,EACD;QACD,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,WAAW,CAAC,EAAE,GAAG,CAAA;KACjB,GACC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;CACzB,CAAA;AAGD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iCAE/B,CAAA"}
@@ -3,6 +3,8 @@ export * from './auth';
3
3
  export * from './invite';
4
4
  export * from './idp';
5
5
  export * from './memberships';
6
+ export * from './passwordless';
6
7
  export * from './otp';
7
8
  export * from './passwordReset';
9
+ export * from './profile';
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,OAAO,CAAA;AACrB,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,OAAO,CAAA;AACrB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA"}
@@ -9,8 +9,6 @@ declare const inviteMutationResult: TenantApi.InviteResultFetcher<{
9
9
  readonly email?: string;
10
10
  } & {
11
11
  readonly name?: string;
12
- } & {
13
- readonly otpEnabled: boolean;
14
12
  } & {
15
13
  readonly identity: {
16
14
  readonly id: string;
@@ -51,8 +49,6 @@ export declare const inviteMutation: TenantApi.MutationFetcher<{
51
49
  readonly email?: string;
52
50
  } & {
53
51
  readonly name?: string;
54
- } & {
55
- readonly otpEnabled: boolean;
56
52
  } & {
57
53
  readonly identity: {
58
54
  readonly id: string;
@@ -86,8 +82,6 @@ export declare const useInviteMutation: ({ headers, apiToken }?: import("../..")
86
82
  readonly email?: string;
87
83
  } & {
88
84
  readonly name?: string;
89
- } & {
90
- readonly otpEnabled: boolean;
91
85
  } & {
92
86
  readonly identity: {
93
87
  readonly id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useInviteMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/invite/useInviteMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;MACiC,CAAA;AAE3D,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEzE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOzB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;8BAAuC,CAAA;AACrE,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"useInviteMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/invite/useInviteMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;MAC8C,CAAA;AAExE,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEzE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOzB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;8BAAuC,CAAA;AACrE,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './useActivatePasswordlessOtpMutation';
2
+ export * from './useDisableMyPasswordlessMutation';
3
+ export * from './useEnableMyPasswordlessMutation';
4
+ export * from './useSignInPasswordlessMutation';
5
+ export * from './useInitSignInPasswordlessMutation';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qCAAqC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import * as TenantApi from '@contember/graphql-client-tenant';
2
+ export declare const useActivatePasswordlessOtpMutation: ({ headers, apiToken }?: import("../../useTenantApi").TenantApiOptions) => (variables: {
3
+ readonly requestId: string;
4
+ readonly token: string;
5
+ readonly otpHash: string;
6
+ }) => Promise<import("../../useTenantMutation").TenantMutationResponse<unknown, TenantApi.ActivatePasswordlessOtpErrorCode>>;
7
+ export type ActivatePasswordlessOtpMutationVariables = Parameters<ReturnType<typeof useActivatePasswordlessOtpMutation>>[0];
8
+ //# sourceMappingURL=useActivatePasswordlessOtpMutation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useActivatePasswordlessOtpMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAc7D,eAAO,MAAM,kCAAkC;;;;4HAE7C,CAAA;AAEF,MAAM,MAAM,wCAAwC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import * as TenantApi from '@contember/graphql-client-tenant';
2
+ export declare const useDisableMyPasswordlessMutation: ({ headers, apiToken }?: import("../..").TenantApiOptions) => (variables: {}) => Promise<import("../../useTenantMutation").TenantMutationResponse<unknown, TenantApi.ToggleMyPasswordlessErrorCode>>;
3
+ //# sourceMappingURL=useDisableMyPasswordlessMutation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDisableMyPasswordlessMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAa7D,eAAO,MAAM,gCAAgC,sMAAsD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import * as TenantApi from '@contember/graphql-client-tenant';
2
+ export declare const useEnableMyPasswordlessMutation: ({ headers, apiToken }?: import("../..").TenantApiOptions) => (variables: {}) => Promise<import("../../useTenantMutation").TenantMutationResponse<unknown, TenantApi.ToggleMyPasswordlessErrorCode>>;
3
+ //# sourceMappingURL=useEnableMyPasswordlessMutation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEnableMyPasswordlessMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAa7D,eAAO,MAAM,+BAA+B,sMAAqD,CAAA"}
@@ -0,0 +1,19 @@
1
+ import * as TenantApi from '@contember/graphql-client-tenant';
2
+ import { ModelType } from 'graphql-ts-client-api';
3
+ declare const InitSignInPasswordlessMutationResult: TenantApi.InitSignInPasswordlessResultFetcher<{
4
+ readonly requestId: string;
5
+ } & {
6
+ readonly expiresAt: string;
7
+ }, {}>;
8
+ export type InitSignInPasswordlessMutationResult = ModelType<typeof InitSignInPasswordlessMutationResult>;
9
+ export declare const useInitSignInPasswordlessMutation: ({ headers, apiToken }?: import("../../useTenantApi").TenantApiOptions) => (variables: {
10
+ readonly email: string;
11
+ readonly options?: TenantApi.InitSignInPasswordlessOptions;
12
+ }) => Promise<import("../../useTenantMutation").TenantMutationResponse<{
13
+ readonly requestId: string;
14
+ } & {
15
+ readonly expiresAt: string;
16
+ }, TenantApi.InitSignInPasswordlessErrorCode>>;
17
+ export type InitSignInPasswordlessMutationVariables = Parameters<ReturnType<typeof useInitSignInPasswordlessMutation>>[0];
18
+ export {};
19
+ //# sourceMappingURL=useInitSignInPasswordlessMutation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInitSignInPasswordlessMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,oCAAoC;;;;MAA2C,CAAA;AACrF,MAAM,MAAM,oCAAoC,GAAG,SAAS,CAAC,OAAO,oCAAoC,CAAC,CAAA;AAWzG,eAAO,MAAM,iCAAiC;;;;;;;8CAE5C,CAAA;AAEF,MAAM,MAAM,uCAAuC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,34 @@
1
+ import * as TenantApi from '@contember/graphql-client-tenant';
2
+ import { ModelType } from 'graphql-ts-client-api';
3
+ declare const signInResultFragment: TenantApi.SignInPasswordlessResultFetcher<{
4
+ readonly token: string;
5
+ } & {
6
+ readonly person: {
7
+ readonly id: string;
8
+ } & {
9
+ readonly email?: string;
10
+ } & {
11
+ readonly name?: string;
12
+ };
13
+ }, {}>;
14
+ export type SignInPasswordlessMutationResult = ModelType<typeof signInResultFragment>;
15
+ export declare const useSignInPasswordlessMutation: ({ headers, apiToken }?: import("../../useTenantApi").TenantApiOptions) => (variables: {
16
+ readonly requestId: string;
17
+ readonly validationType: TenantApi.PasswordlessValidationType;
18
+ readonly token: string;
19
+ readonly expiration?: number;
20
+ readonly mfaOtp?: string;
21
+ }) => Promise<import("../../useTenantMutation").TenantMutationResponse<{
22
+ readonly token: string;
23
+ } & {
24
+ readonly person: {
25
+ readonly id: string;
26
+ } & {
27
+ readonly email?: string;
28
+ } & {
29
+ readonly name?: string;
30
+ };
31
+ }, TenantApi.SignInPasswordlessErrorCode>>;
32
+ export type SignInPasswordlessMutationVariables = Parameters<ReturnType<typeof useSignInPasswordlessMutation>>[0];
33
+ export {};
34
+ //# sourceMappingURL=useSignInPasswordlessMutation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSignInPasswordlessMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useSignInPasswordlessMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,oBAAoB;;;;;;;;;;MAA+E,CAAA;AAEzG,MAAM,MAAM,gCAAgC,GAAG,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAYrF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;0CAExC,CAAA;AAEF,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './useChangeProfile';
2
+ export * from './useChangeMyProfile';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/profile/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,21 @@
1
+ import * as TenantApi from '@contember/graphql-client-tenant';
2
+ export declare const changeMyProfile: TenantApi.MutationFetcher<{
3
+ readonly mutation?: ({
4
+ readonly ok: boolean;
5
+ } & {
6
+ readonly error?: ({
7
+ readonly code: TenantApi.ChangeMyProfileErrorCode;
8
+ } & {
9
+ readonly developerMessage: string;
10
+ }) | undefined;
11
+ }) | undefined;
12
+ }, {
13
+ readonly email?: string;
14
+ readonly name?: string;
15
+ }>;
16
+ export declare const useChangeMyProfileMutation: ({ headers, apiToken }?: import("../..").TenantApiOptions) => (variables: {
17
+ readonly email?: string;
18
+ readonly name?: string;
19
+ }) => Promise<import("../../useTenantMutation").TenantMutationResponse<unknown, TenantApi.ChangeMyProfileErrorCode>>;
20
+ export type ChangeMyProfileMutationVariables = Parameters<ReturnType<typeof useChangeMyProfileMutation>>[0];
21
+ //# sourceMappingURL=useChangeMyProfile.d.ts.map