@intlayer/design-system 5.1.4 → 5.1.6
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.
- package/dist/.vite/manifest.json +173 -132
- package/dist/{Form-yi0CMK-a.cjs → Form-BpxW17v4.cjs} +3 -3
- package/dist/Form-BpxW17v4.cjs.map +1 -0
- package/dist/{Form-BZUDRfoN.js → Form-MjLzPGze.js} +3 -3
- package/dist/Form-MjLzPGze.js.map +1 -0
- package/dist/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.mjs +1 -1
- package/dist/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/components/Auth/AuthModal/index.cjs +1 -10
- package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
- package/dist/components/Auth/AuthModal/index.d.ts.map +1 -1
- package/dist/components/Auth/AuthModal/index.mjs +1 -10
- package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +4 -16
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +4 -16
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs +0 -32
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts +0 -32
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs +0 -32
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs.map +1 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs +81 -0
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.d.ts +9 -0
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.d.ts.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs +81 -0
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs +106 -0
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs.map +1 -0
- package/dist/components/{DictionaryEditor/validDictionaryChangeButtons.content.d.ts → Auth/DefineNewPasswordForm/defineNewPasswordForm.content.d.ts} +15 -41
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.d.ts.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs +106 -0
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/index.cjs +7 -0
- package/dist/components/Auth/DefineNewPasswordForm/index.cjs.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/index.d.ts +3 -0
- package/dist/components/Auth/DefineNewPasswordForm/index.d.ts.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/index.mjs +7 -0
- package/dist/components/Auth/DefineNewPasswordForm/index.mjs.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs +31 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs +101 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.d.ts +97 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.d.ts.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs +101 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.d.ts +19 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.d.ts.map +1 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs +31 -0
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs.map +1 -0
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +27 -9
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts +7 -3
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +27 -9
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +2 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +2 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +2 -2
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +2 -2
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +2 -2
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +2 -2
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +3 -3
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +3 -3
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs.map +1 -1
- package/dist/components/Auth/index.cjs +4 -0
- package/dist/components/Auth/index.cjs.map +1 -1
- package/dist/components/Auth/index.d.ts +1 -0
- package/dist/components/Auth/index.d.ts.map +1 -1
- package/dist/components/Auth/index.mjs +4 -0
- package/dist/components/Auth/index.mjs.map +1 -1
- package/dist/components/Auth/useAuth/index.cjs +1 -0
- package/dist/components/Auth/useAuth/index.cjs.map +1 -1
- package/dist/components/Auth/useAuth/index.d.ts +1 -0
- package/dist/components/Auth/useAuth/index.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/index.mjs +1 -0
- package/dist/components/Auth/useAuth/index.mjs.map +1 -1
- package/dist/components/Avatar/index.cjs +2 -2
- package/dist/components/Avatar/index.cjs.map +1 -1
- package/dist/components/Avatar/index.mjs +2 -2
- package/dist/components/Avatar/index.mjs.map +1 -1
- package/dist/components/Badge/index.cjs +11 -11
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.d.ts +2 -2
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.mjs +11 -11
- package/dist/components/Badge/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs +25 -25
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +25 -25
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Command/index.cjs +2 -2
- package/dist/components/Command/index.cjs.map +1 -1
- package/dist/components/Command/index.d.ts +1 -1
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.mjs +2 -2
- package/dist/components/Command/index.mjs.map +1 -1
- package/dist/components/Container/index.cjs +67 -83
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +5 -6
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +67 -83
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +2 -2
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +2 -2
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +4 -4
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +4 -4
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.cjs +3 -3
- package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.mjs +3 -3
- package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs +4 -3
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs +5 -4
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +15 -9
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +15 -9
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +13 -9
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +13 -9
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +94 -134
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +98 -138
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +0 -143
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +0 -143
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +0 -143
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +1 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +0 -3
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +1 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +52 -71
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +52 -71
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +65 -97
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +3 -3
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +68 -100
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +0 -32
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +0 -32
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +0 -32
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +9 -2
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +9 -2
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +3 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +3 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/index.cjs +0 -2
- package/dist/components/DictionaryFieldEditor/index.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/index.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/index.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/index.mjs +0 -2
- package/dist/components/DictionaryFieldEditor/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +7 -0
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +7 -0
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Footer/index.cjs +1 -1
- package/dist/components/Footer/index.cjs.map +1 -1
- package/dist/components/Footer/index.mjs +1 -1
- package/dist/components/Footer/index.mjs.map +1 -1
- package/dist/components/Form/Form.cjs +1 -1
- package/dist/components/Form/Form.mjs +1 -1
- package/dist/components/Form/FormBase.cjs +0 -1
- package/dist/components/Form/FormBase.cjs.map +1 -1
- package/dist/components/Form/FormBase.d.ts +1 -4
- package/dist/components/Form/FormBase.d.ts.map +1 -1
- package/dist/components/Form/FormBase.mjs +0 -1
- package/dist/components/Form/FormBase.mjs.map +1 -1
- package/dist/components/Form/FormDescription.cjs +1 -8
- package/dist/components/Form/FormDescription.cjs.map +1 -1
- package/dist/components/Form/FormDescription.d.ts.map +1 -1
- package/dist/components/Form/FormDescription.mjs +1 -8
- package/dist/components/Form/FormDescription.mjs.map +1 -1
- package/dist/components/Form/FormItem.cjs +1 -1
- package/dist/components/Form/FormItem.cjs.map +1 -1
- package/dist/components/Form/FormItem.mjs +1 -1
- package/dist/components/Form/FormItem.mjs.map +1 -1
- package/dist/components/Form/FormLabel.cjs +1 -5
- package/dist/components/Form/FormLabel.cjs.map +1 -1
- package/dist/components/Form/FormLabel.d.ts.map +1 -1
- package/dist/components/Form/FormLabel.mjs +1 -5
- package/dist/components/Form/FormLabel.mjs.map +1 -1
- package/dist/components/Form/FormMessage.cjs +1 -1
- package/dist/components/Form/FormMessage.cjs.map +1 -1
- package/dist/components/Form/FormMessage.mjs +1 -1
- package/dist/components/Form/FormMessage.mjs.map +1 -1
- package/dist/components/Form/elements/AutoSizeTextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/AutoSizeTextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/CheckboxElement.cjs +1 -1
- package/dist/components/Form/elements/CheckboxElement.mjs +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.cjs +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/FormElement.cjs +1 -1
- package/dist/components/Form/elements/FormElement.mjs +1 -1
- package/dist/components/Form/elements/InputElement.cjs +1 -1
- package/dist/components/Form/elements/InputElement.mjs +1 -1
- package/dist/components/Form/elements/InputPasswordElement.cjs +1 -1
- package/dist/components/Form/elements/InputPasswordElement.mjs +1 -1
- package/dist/components/Form/elements/MultiselectElement.cjs +1 -1
- package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
- package/dist/components/Form/elements/SelectElement.cjs +1 -1
- package/dist/components/Form/elements/SelectElement.mjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.cjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/index.cjs +1 -1
- package/dist/components/Form/elements/index.mjs +1 -1
- package/dist/components/Form/index.cjs +1 -1
- package/dist/components/Form/index.mjs +1 -1
- package/dist/components/Form/layout/FormItemLayout.cjs +1 -1
- package/dist/components/Form/layout/FormItemLayout.mjs +1 -1
- package/dist/components/Form/layout/index.cjs +1 -1
- package/dist/components/Form/layout/index.mjs +1 -1
- package/dist/components/Headers/index.cjs +1 -1
- package/dist/components/Headers/index.cjs.map +1 -1
- package/dist/components/Headers/index.mjs +1 -1
- package/dist/components/Headers/index.mjs.map +1 -1
- package/dist/components/IDE/Code.cjs +1 -1
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.mjs +1 -1
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs +8 -1
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.d.ts.map +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs +8 -1
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.cjs +8 -1
- package/dist/components/IDE/CodeBlockServer.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.d.ts.map +1 -1
- package/dist/components/IDE/CodeBlockServer.mjs +8 -1
- package/dist/components/IDE/CodeBlockServer.mjs.map +1 -1
- package/dist/components/IDE/FileList.cjs +1 -1
- package/dist/components/IDE/FileList.cjs.map +1 -1
- package/dist/components/IDE/FileList.mjs +1 -1
- package/dist/components/IDE/FileList.mjs.map +1 -1
- package/dist/components/IDE/FileTree.cjs +1 -1
- package/dist/components/IDE/FileTree.cjs.map +1 -1
- package/dist/components/IDE/FileTree.mjs +1 -1
- package/dist/components/IDE/FileTree.mjs.map +1 -1
- package/dist/components/IDE/IDE.cjs +7 -3
- package/dist/components/IDE/IDE.cjs.map +1 -1
- package/dist/components/IDE/IDE.d.ts +1 -0
- package/dist/components/IDE/IDE.d.ts.map +1 -1
- package/dist/components/IDE/IDE.mjs +8 -4
- package/dist/components/IDE/IDE.mjs.map +1 -1
- package/dist/components/Input/Checkbox.cjs +10 -11
- package/dist/components/Input/Checkbox.cjs.map +1 -1
- package/dist/components/Input/Checkbox.d.ts +1 -1
- package/dist/components/Input/Checkbox.mjs +10 -11
- package/dist/components/Input/Checkbox.mjs.map +1 -1
- package/dist/components/Input/Input.cjs +7 -7
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.mjs +7 -7
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/InputPassword.cjs +1 -1
- package/dist/components/Input/InputPassword.cjs.map +1 -1
- package/dist/components/Input/InputPassword.mjs +1 -1
- package/dist/components/Input/InputPassword.mjs.map +1 -1
- package/dist/components/KeyboardScreenAdapter/index.cjs +25 -0
- package/dist/components/KeyboardScreenAdapter/index.cjs.map +1 -0
- package/dist/components/KeyboardScreenAdapter/index.d.ts +3 -0
- package/dist/components/KeyboardScreenAdapter/index.d.ts.map +1 -0
- package/dist/components/KeyboardScreenAdapter/index.mjs +25 -0
- package/dist/components/KeyboardScreenAdapter/index.mjs.map +1 -0
- package/dist/components/Link/Link.cjs +26 -20
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +26 -20
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +4 -4
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +4 -4
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +4 -4
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +4 -4
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs +115 -114
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts +1 -1
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +115 -114
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.cjs +3 -1
- package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.d.ts.map +1 -1
- package/dist/components/MaxHeightSmoother/index.mjs +3 -1
- package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +16 -14
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +16 -14
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/Burger.cjs +1 -1
- package/dist/components/Navbar/Burger.cjs.map +1 -1
- package/dist/components/Navbar/Burger.mjs +1 -1
- package/dist/components/Navbar/Burger.mjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs +2 -2
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +2 -2
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +2 -2
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +2 -2
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Pattern/DotPattern.cjs +1 -1
- package/dist/components/Pattern/DotPattern.cjs.map +1 -1
- package/dist/components/Pattern/DotPattern.mjs +1 -1
- package/dist/components/Pattern/DotPattern.mjs.map +1 -1
- package/dist/components/Pattern/GridPattern.cjs +1 -1
- package/dist/components/Pattern/GridPattern.cjs.map +1 -1
- package/dist/components/Pattern/GridPattern.mjs +1 -1
- package/dist/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/components/Popover/index.cjs +1 -1
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.cjs +2 -2
- package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.d.ts.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs +2 -2
- package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/components/Select/Multiselect.cjs +8 -9
- package/dist/components/Select/Multiselect.cjs.map +1 -1
- package/dist/components/Select/Multiselect.d.ts.map +1 -1
- package/dist/components/Select/Multiselect.mjs +9 -10
- package/dist/components/Select/Multiselect.mjs.map +1 -1
- package/dist/components/Select/Select.cjs +7 -8
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.mjs +7 -8
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +11 -11
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts +1 -1
- package/dist/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +11 -11
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +15 -13
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +15 -13
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/Tag/index.cjs +6 -7
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.mjs +6 -7
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.cjs +1 -0
- package/dist/components/TextArea/AutoSizeTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.d.ts.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.mjs +1 -0
- package/dist/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.cjs +105 -0
- package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -0
- package/dist/components/TextArea/AutocompleteTextArea.d.ts +9 -0
- package/dist/components/TextArea/AutocompleteTextArea.d.ts.map +1 -0
- package/dist/components/TextArea/AutocompleteTextArea.mjs +105 -0
- package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -0
- package/dist/components/TextArea/index.cjs +3 -0
- package/dist/components/TextArea/index.cjs.map +1 -1
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/TextArea/index.d.ts.map +1 -1
- package/dist/components/TextArea/index.mjs +4 -1
- package/dist/components/TextArea/index.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/components/Toaster/Toast.cjs +5 -5
- package/dist/components/Toaster/Toast.cjs.map +1 -1
- package/dist/components/Toaster/Toast.d.ts +1 -1
- package/dist/components/Toaster/Toast.d.ts.map +1 -1
- package/dist/components/Toaster/Toast.mjs +5 -5
- package/dist/components/Toaster/Toast.mjs.map +1 -1
- package/dist/components/Toaster/Toaster.cjs +1 -1
- package/dist/components/Toaster/Toaster.cjs.map +1 -1
- package/dist/components/Toaster/Toaster.mjs +1 -1
- package/dist/components/Toaster/Toaster.mjs.map +1 -1
- package/dist/components/WithResizer/index.cjs +2 -2
- package/dist/components/WithResizer/index.cjs.map +1 -1
- package/dist/components/WithResizer/index.mjs +2 -2
- package/dist/components/WithResizer/index.mjs.map +1 -1
- package/dist/components/index.cjs +14 -3
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +14 -3
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +5 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +6 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +18 -4
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +5 -2
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +18 -4
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +8 -14
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs +8 -14
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +5 -2
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/useKeyboardDetector.cjs +27 -0
- package/dist/hooks/useKeyboardDetector.cjs.map +1 -0
- package/dist/hooks/useKeyboardDetector.d.ts +5 -0
- package/dist/hooks/useKeyboardDetector.d.ts.map +1 -0
- package/dist/hooks/useKeyboardDetector.mjs +27 -0
- package/dist/hooks/useKeyboardDetector.mjs.map +1 -0
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/{index-BUe-qmA0.js → index-C57uA6Lk.js} +2 -2
- package/dist/{index-BUe-qmA0.js.map → index-C57uA6Lk.js.map} +1 -1
- package/dist/{index-cg9H6eBs.cjs → index-D02c1QrF.cjs} +2 -2
- package/dist/{index-cg9H6eBs.cjs.map → index-D02c1QrF.cjs.map} +1 -1
- package/dist/{index-BTDHuTxL.js → index-DixKT3Hi.js} +40 -11
- package/dist/index-DixKT3Hi.js.map +1 -0
- package/dist/{index-Db5Dym4h.cjs → index-a_-DkvMQ.cjs} +40 -11
- package/dist/index-a_-DkvMQ.cjs.map +1 -0
- package/dist/tailwind.config.cjs +2 -1395
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.d.ts +3 -282
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tailwind.config.mjs +2 -1395
- package/dist/tailwind.config.mjs.map +1 -1
- package/dist/tailwind.css +2 -1
- package/dist/zod-BV4nCGJE.js.map +1 -1
- package/dist/zod-DSrtTSD_.cjs.map +1 -1
- package/package.json +28 -25
- package/dist/Form-BZUDRfoN.js.map +0 -1
- package/dist/Form-yi0CMK-a.cjs.map +0 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +0 -120
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +0 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts +0 -9
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +0 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +0 -120
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +0 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +0 -132
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +0 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +0 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +0 -132
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +0 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs +0 -8
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs.map +0 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.d.ts +0 -4
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.d.ts.map +0 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs +0 -8
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +0 -45
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +0 -9
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +0 -45
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs +0 -40
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.d.ts +0 -36
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs +0 -40
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.cjs +0 -8
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.d.ts +0 -4
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.mjs +0 -8
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.mjs.map +0 -1
- package/dist/index-BTDHuTxL.js.map +0 -1
- package/dist/index-Db5Dym4h.cjs.map +0 -1
|
@@ -89,6 +89,11 @@ const useAskResetPassword = (args) => useAppAsync(
|
|
|
89
89
|
args
|
|
90
90
|
);
|
|
91
91
|
const useResetPassword = (args) => useAppAsync("resetPassword", hooks_useIntlayerAPI.useIntlayerAuth().auth.resetPassword, args);
|
|
92
|
+
const useDefineNewPassword = (args) => useAppAsync(
|
|
93
|
+
"defineNewPassword",
|
|
94
|
+
hooks_useIntlayerAPI.useIntlayerAuth().auth.defineNewPassword,
|
|
95
|
+
args
|
|
96
|
+
);
|
|
92
97
|
const useCheckIfUserHasPassword = (args) => useAppAsync(
|
|
93
98
|
"checkIfUserHasPassword",
|
|
94
99
|
hooks_useIntlayerAPI.useIntlayerAuth().auth.checkIfUserHasPassword,
|
|
@@ -168,7 +173,7 @@ const useUpdateOrganizationMembers = (args) => useAppAsync(
|
|
|
168
173
|
"updateOrganizationMembers",
|
|
169
174
|
hooks_useIntlayerAPI.useIntlayerAuth().organization.updateOrganizationMembers,
|
|
170
175
|
{
|
|
171
|
-
invalidateQueries: ["getOrganizations"],
|
|
176
|
+
invalidateQueries: ["getOrganizations", "getSession"],
|
|
172
177
|
...args
|
|
173
178
|
}
|
|
174
179
|
);
|
|
@@ -176,7 +181,7 @@ const useAddOrganizationMember = (args) => useAppAsync(
|
|
|
176
181
|
"addOrganizationMember",
|
|
177
182
|
hooks_useIntlayerAPI.useIntlayerAuth().organization.addOrganizationMember,
|
|
178
183
|
{
|
|
179
|
-
invalidateQueries: ["getOrganizations"],
|
|
184
|
+
invalidateQueries: ["getOrganizations", "getSession"],
|
|
180
185
|
...args
|
|
181
186
|
}
|
|
182
187
|
);
|
|
@@ -184,7 +189,7 @@ const useDeleteOrganization = (args) => useAppAsync(
|
|
|
184
189
|
"deleteOrganization",
|
|
185
190
|
hooks_useIntlayerAPI.useIntlayerAuth().organization.deleteOrganization,
|
|
186
191
|
{
|
|
187
|
-
invalidateQueries: ["getOrganizations"],
|
|
192
|
+
invalidateQueries: ["getOrganizations", "getSession"],
|
|
188
193
|
...args
|
|
189
194
|
}
|
|
190
195
|
);
|
|
@@ -239,7 +244,7 @@ const useUpdateProjectMembers = (args) => useAppAsync(
|
|
|
239
244
|
}
|
|
240
245
|
);
|
|
241
246
|
const useDeleteProject = (args) => useAppAsync("deleteProject", hooks_useIntlayerAPI.useIntlayerAuth().project.deleteProject, {
|
|
242
|
-
invalidateQueries: ["getProjects"],
|
|
247
|
+
invalidateQueries: ["getProjects", "getSession"],
|
|
243
248
|
...args
|
|
244
249
|
});
|
|
245
250
|
const useSelectProject = (args) => useAppAsync("selectProject", hooks_useIntlayerAPI.useIntlayerAuth().project.selectProject, {
|
|
@@ -384,6 +389,11 @@ const useDeleteTag = (args) => useAppAsync("deleteTag", hooks_useIntlayerAPI.use
|
|
|
384
389
|
invalidateQueries: ["getTags"],
|
|
385
390
|
...args
|
|
386
391
|
});
|
|
392
|
+
const useGetPricing = (args) => useAppAsync("getPricing", hooks_useIntlayerAPI.useIntlayerAuth().stripe.getPricing, {
|
|
393
|
+
store: true,
|
|
394
|
+
cache: true,
|
|
395
|
+
...args
|
|
396
|
+
});
|
|
387
397
|
const useGetSubscription = (args) => useAppAsync(
|
|
388
398
|
"getSubscription",
|
|
389
399
|
hooks_useIntlayerAPI.useIntlayerAuth().stripe.getSubscription,
|
|
@@ -438,6 +448,7 @@ const useAuditTag = (args) => useAppAsync("auditTag", hooks_useIntlayerAPI.useIn
|
|
|
438
448
|
requireProject: true
|
|
439
449
|
});
|
|
440
450
|
const useAskDocQuestion = (args) => useAppAsync("askDocQuestion", hooks_useIntlayerAPI.useIntlayerAuth().ai.askDocQuestion, args);
|
|
451
|
+
const useAutocomplete = (args) => useAppAsync("autocomplete", hooks_useIntlayerAPI.useIntlayerAuth().ai.autocomplete, args);
|
|
441
452
|
const useWriteDictionary = (args) => useEditorAsync(
|
|
442
453
|
"writeDictionary",
|
|
443
454
|
hooks_useIntlayerAPI.useIntlayerAuth().editor.writeDictionary,
|
|
@@ -455,10 +466,12 @@ exports.useAuditContentDeclaration = useAuditContentDeclaration;
|
|
|
455
466
|
exports.useAuditContentDeclarationField = useAuditContentDeclarationField;
|
|
456
467
|
exports.useAuditContentDeclarationMetadata = useAuditContentDeclarationMetadata;
|
|
457
468
|
exports.useAuditTag = useAuditTag;
|
|
469
|
+
exports.useAutocomplete = useAutocomplete;
|
|
458
470
|
exports.useCancelSubscription = useCancelSubscription;
|
|
459
471
|
exports.useChangePassword = useChangePassword;
|
|
460
472
|
exports.useCheckIfUserHasPassword = useCheckIfUserHasPassword;
|
|
461
473
|
exports.useCreateUser = useCreateUser;
|
|
474
|
+
exports.useDefineNewPassword = useDefineNewPassword;
|
|
462
475
|
exports.useDeleteAccessKey = useDeleteAccessKey;
|
|
463
476
|
exports.useDeleteDictionary = useDeleteDictionary;
|
|
464
477
|
exports.useDeleteOrganization = useDeleteOrganization;
|
|
@@ -469,6 +482,7 @@ exports.useGetDictionaries = useGetDictionaries;
|
|
|
469
482
|
exports.useGetDictionariesKeys = useGetDictionariesKeys;
|
|
470
483
|
exports.useGetDictionary = useGetDictionary;
|
|
471
484
|
exports.useGetOrganizations = useGetOrganizations;
|
|
485
|
+
exports.useGetPricing = useGetPricing;
|
|
472
486
|
exports.useGetProjects = useGetProjects;
|
|
473
487
|
exports.useGetSubscription = useGetSubscription;
|
|
474
488
|
exports.useGetTags = useGetTags;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intlayerAPIHooks.cjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["'use client';\n\nimport type { intlayerAPI } from '@intlayer/api';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from '../components/Auth/useAuth/index';\nimport { useToast } from '../components/Toaster';\nimport { type UseAsyncOptions, useAsync } from './useAsync/useAsync';\nimport { useIntlayerAuth } from './useIntlayerAPI';\n\n/**\n * Hook to handle error logging and toast notifications\n */\nconst useErrorHandling = <T extends UseAsyncOptions<any>>(options: T): T => {\n const { toast } = useToast();\n\n return {\n ...options,\n onError: (errorMessage) => {\n let error;\n\n // If json is valid, parse it\n try {\n if (typeof errorMessage === 'undefined') return;\n\n error = JSON.parse(errorMessage);\n } catch (e) {\n // If json is not valid, set error to the original errorMessage\n\n error = errorMessage;\n }\n\n // render toast for each error if there is more than one\n // otherwise render the toast with the error message\n [error]\n .flatMap((error) => error)\n .forEach((error) =>\n toast({\n title:\n (process.env.NODE_ENV === 'production'\n ? error.title\n : error.code) ?? 'Error',\n description: error.message ?? errorMessage ?? 'An error occurred',\n variant: 'error',\n })\n );\n options.onError?.(errorMessage);\n },\n onSuccess: (data) => {\n if (data.message)\n toast({\n title: data.message,\n description: data.description,\n variant: 'success',\n });\n options.onSuccess?.(data);\n },\n };\n};\n\ntype AuthEnableOptions = {\n requireUser?: boolean;\n requireProject?: boolean;\n requireOrganization?: boolean;\n};\n\n/**\n * Hook to enable authentication\n */\nconst useAuthEnable = <T extends UseAsyncOptions<any>>(\n options: T,\n { requireUser, requireProject, requireOrganization }: AuthEnableOptions = {}\n): T => {\n const configuration = useConfiguration();\n const { csrfToken, oAuth2AccessToken, session } = useAuth({\n intlayerConfiguration: configuration,\n });\n\n const isEnabledOption = options?.enable ?? true;\n const user = session ? session.user : oAuth2AccessToken?.user;\n\n const organization = session\n ? session.organization\n : oAuth2AccessToken?.organization;\n\n const project = session ? session.project : oAuth2AccessToken?.project;\n\n const isUserEnabled = requireUser ? Boolean(user) : true;\n\n const isProjectEnabled = requireProject ? Boolean(project) : true;\n\n const isOrganizationEnabled = requireOrganization\n ? Boolean(organization)\n : true;\n\n const isCSRFEnabled =\n Boolean(csrfToken) ||\n // If auth using session, csrf token is not required\n (!session && Boolean(oAuth2AccessToken));\n\n const isEnabled =\n isEnabledOption &&\n isUserEnabled &&\n isProjectEnabled &&\n isOrganizationEnabled &&\n isCSRFEnabled;\n\n return {\n ...options,\n enable: isEnabled,\n };\n};\n\nconst useAppAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>,\n authOptions?: AuthEnableOptions\n) => {\n // Enhance options using custom hooks\n const optionsWithAuth = useAuthEnable(options ?? {}, authOptions);\n\n const optionsWithErrorHandling = useErrorHandling(optionsWithAuth);\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\nconst useEditorAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const optionsWithErrorHandling = useErrorHandling(options ?? {});\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.login>\n) =>\n useAppAsync('login', useIntlayerAuth().auth.login, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRegister = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.register>\n) =>\n useAppAsync('register', useIntlayerAuth().auth.register, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useLogout = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.logout>\n) =>\n useAppAsync('logout', useIntlayerAuth().auth.logout, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useChangePassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.changePassword>\n) => useAppAsync('changePassword', useIntlayerAuth().auth.changePassword, args);\nexport const useAskResetPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.askResetPassword>\n) =>\n useAppAsync(\n 'askResetPassword',\n useIntlayerAuth().auth.askResetPassword,\n args\n );\nexport const useResetPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.resetPassword>\n) => useAppAsync('resetPassword', useIntlayerAuth().auth.resetPassword, args);\nexport const useCheckIfUserHasPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.checkIfUserHasPassword>\n) =>\n useAppAsync(\n 'checkIfUserHasPassword',\n useIntlayerAuth().auth.checkIfUserHasPassword,\n args,\n {\n requireUser: true,\n }\n );\nexport const useVerifyEmail = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.verifyEmail>\n) => useAppAsync('verifyEmail', useIntlayerAuth().auth.verifyEmail, args);\n\nexport const useGetUserByAccount = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.getUserByAccount>\n) =>\n useAppAsync(\n 'getUserByAccount',\n useIntlayerAuth().user.getUserByAccount,\n args\n );\n\n/**\n * User\n */\n\nexport const useGetUsers = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.getUsers>\n) =>\n useAppAsync(\n 'getUsers',\n useIntlayerAuth().user.getUsers,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\nexport const useCreateUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.createUser>\n) =>\n useAppAsync('createUser', useIntlayerAuth().user.createUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\nexport const useUpdateUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.updateUser>\n) =>\n useAppAsync('updateUser', useIntlayerAuth().user.updateUser, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.deleteUser>\n) =>\n useAppAsync('deleteUser', useIntlayerAuth().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.getOrganizations>\n) =>\n useAppAsync(\n 'getOrganizations',\n useIntlayerAuth().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\n\nexport const useAddOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.addOrganization>\n) =>\n useAppAsync(\n 'addOrganization',\n useIntlayerAuth().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useUpdateOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.updateOrganization>\n) =>\n useAppAsync(\n 'updateOrganization',\n useIntlayerAuth().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUpdateOrganizationMembers = (\n args?: UseAsyncOptions<\n typeof intlayerAPI.organization.updateOrganizationMembers\n >\n) =>\n useAppAsync(\n 'updateOrganizationMembers',\n useIntlayerAuth().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useAddOrganizationMember = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.addOrganizationMember>\n) =>\n useAppAsync(\n 'addOrganizationMember',\n useIntlayerAuth().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useDeleteOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.deleteOrganization>\n) =>\n useAppAsync(\n 'deleteOrganization',\n useIntlayerAuth().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useSelectOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.selectOrganization>\n) =>\n useAppAsync(\n 'selectOrganization',\n useIntlayerAuth().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUnselectOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.unselectOrganization>\n) =>\n useAppAsync(\n 'unselectOrganization',\n useIntlayerAuth().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.getProjects>\n) =>\n useAppAsync(\n 'getProjects',\n useIntlayerAuth().project.getProjects,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.addProject>\n) =>\n useAppAsync('addProject', useIntlayerAuth().project.addProject, {\n invalidateQueries: ['getProjects'],\n ...args,\n });\nexport const useUpdateProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.updateProject>\n) =>\n useAppAsync('updateProject', useIntlayerAuth().project.updateProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUpdateProjectMembers = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.updateProjectMembers>\n) =>\n useAppAsync(\n 'updateProjectMembers',\n useIntlayerAuth().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useDeleteProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.deleteProject>\n) =>\n useAppAsync('deleteProject', useIntlayerAuth().project.deleteProject, {\n invalidateQueries: ['getProjects'],\n ...args,\n });\nexport const useSelectProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.selectProject>\n) =>\n useAppAsync('selectProject', useIntlayerAuth().project.selectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUnselectProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.unselectProject>\n) =>\n useAppAsync('unselectProject', useIntlayerAuth().project.unselectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useAddNewAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.addNewAccessKey>\n) =>\n useAppAsync('addNewAccessKey', useIntlayerAuth().project.addNewAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.deleteAccessKey>\n) =>\n useAppAsync('deleteAccessKey', useIntlayerAuth().project.deleteAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRefreshAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.refreshAccessKey>\n) =>\n useAppAsync('refreshAccessKey', useIntlayerAuth().project.refreshAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionaries>\n) =>\n useAppAsync(\n 'getDictionaries',\n useIntlayerAuth().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionariesKeys = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionariesKeys>\n) =>\n useAppAsync(\n 'getDictionariesKeys',\n useIntlayerAuth().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionary>\n) =>\n useAppAsync(\n 'getDictionary',\n useIntlayerAuth().dictionary.getDictionary,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\nexport const useAddDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.addDictionary>\n) =>\n useAppAsync('addDictionary', useIntlayerAuth().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n ...args,\n });\n\nexport const usePushDictionaries = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.pushDictionaries>\n) =>\n useAppAsync(\n 'pushDictionaries',\n useIntlayerAuth().dictionary.pushDictionaries,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\nexport const useUpdateDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.updateDictionary>\n) =>\n useAppAsync(\n 'updateDictionary',\n useIntlayerAuth().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionary'],\n ...args,\n }\n );\nexport const useDeleteDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.deleteDictionary>\n) =>\n useAppAsync(\n 'deleteDictionary',\n useIntlayerAuth().dictionary.deleteDictionary,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\n\n/**\n * Tag\n */\n\nexport const useGetTags = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.getTags>\n) =>\n useAppAsync(\n 'getTags',\n useIntlayerAuth().tag.getTags,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.addTag>\n) =>\n useAppAsync('addTag', useIntlayerAuth().tag.addTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useUpdateTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.updateTag>\n) =>\n useAppAsync('updateTag', useIntlayerAuth().tag.updateTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useDeleteTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.deleteTag>\n) =>\n useAppAsync('deleteTag', useIntlayerAuth().tag.deleteTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\n\n/**\n * Stripe\n */\n\nexport const useGetSubscription = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.getSubscription>\n) =>\n useAppAsync(\n 'getSubscription',\n useIntlayerAuth().stripe.getSubscription,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\nexport const useCancelSubscription = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.cancelSubscription>\n) =>\n useAppAsync(\n 'cancelSubscription',\n useIntlayerAuth().stripe.cancelSubscription,\n { invalidateQueries: ['getSession'], ...args },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\n/**\n * AI\n */\n\nexport const useAuditContentDeclaration = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclaration>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclaration,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationMetadata = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationMetadata>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclarationMetadata,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationField = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationField>\n) =>\n useAppAsync(\n 'auditContentDeclarationField',\n useIntlayerAuth().ai.auditContentDeclarationField,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditTag>\n) =>\n useAppAsync('auditTag', useIntlayerAuth().ai.auditTag, args, {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n\nexport const useAskDocQuestion = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.askDocQuestion>\n) => useAppAsync('askDocQuestion', useIntlayerAuth().ai.askDocQuestion, args);\n\n/**\n * Editor\n */\n\nexport const useWriteDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.editor.writeDictionary>\n) =>\n useEditorAsync(\n 'writeDictionary',\n useIntlayerAuth().editor.writeDictionary,\n args\n );\n"],"names":["useToast","error","useConfiguration","useAuth","useAsync","useIntlayerAuth"],"mappings":";;;;;;;;;;;AAYA,MAAM,mBAAmB,CAAiC,YAAkB;AACpE,QAAA,EAAE,MAAM,IAAIA,qCAAS;AAEpB,SAAA;AAAA,IACL,GAAG;AAAA,IACH,SAAS,CAAC,iBAAiB;AACrB,UAAA;AAGA,UAAA;AACE,YAAA,OAAO,iBAAiB,YAAa;AAEjC,gBAAA,KAAK,MAAM,YAAY;AAAA,eACxB,G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"intlayerAPIHooks.cjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["'use client';\n\nimport type { intlayerAPI } from '@intlayer/api';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from '../components/Auth/useAuth/index';\nimport { useToast } from '../components/Toaster';\nimport { type UseAsyncOptions, useAsync } from './useAsync/useAsync';\nimport { useIntlayerAuth } from './useIntlayerAPI';\n\n/**\n * Hook to handle error logging and toast notifications\n */\nconst useErrorHandling = <T extends UseAsyncOptions<any>>(options: T): T => {\n const { toast } = useToast();\n\n return {\n ...options,\n onError: (errorMessage) => {\n let error;\n\n // If json is valid, parse it\n try {\n if (typeof errorMessage === 'undefined') return;\n\n error = JSON.parse(errorMessage);\n } catch (e) {\n // If json is not valid, set error to the original errorMessage\n\n error = errorMessage;\n }\n\n // render toast for each error if there is more than one\n // otherwise render the toast with the error message\n [error]\n .flatMap((error) => error)\n .forEach((error) =>\n toast({\n title:\n (process.env.NODE_ENV === 'production'\n ? error.title\n : error.code) ?? 'Error',\n description: error.message ?? errorMessage ?? 'An error occurred',\n variant: 'error',\n })\n );\n options.onError?.(errorMessage);\n },\n onSuccess: (data) => {\n if (data.message)\n toast({\n title: data.message,\n description: data.description,\n variant: 'success',\n });\n options.onSuccess?.(data);\n },\n };\n};\n\ntype AuthEnableOptions = {\n requireUser?: boolean;\n requireProject?: boolean;\n requireOrganization?: boolean;\n};\n\n/**\n * Hook to enable authentication\n */\nconst useAuthEnable = <T extends UseAsyncOptions<any>>(\n options: T,\n { requireUser, requireProject, requireOrganization }: AuthEnableOptions = {}\n): T => {\n const configuration = useConfiguration();\n const { csrfToken, oAuth2AccessToken, session } = useAuth({\n intlayerConfiguration: configuration,\n });\n\n const isEnabledOption = options?.enable ?? true;\n const user = session ? session.user : oAuth2AccessToken?.user;\n\n const organization = session\n ? session.organization\n : oAuth2AccessToken?.organization;\n\n const project = session ? session.project : oAuth2AccessToken?.project;\n\n const isUserEnabled = requireUser ? Boolean(user) : true;\n\n const isProjectEnabled = requireProject ? Boolean(project) : true;\n\n const isOrganizationEnabled = requireOrganization\n ? Boolean(organization)\n : true;\n\n const isCSRFEnabled =\n Boolean(csrfToken) ||\n // If auth using session, csrf token is not required\n (!session && Boolean(oAuth2AccessToken));\n\n const isEnabled =\n isEnabledOption &&\n isUserEnabled &&\n isProjectEnabled &&\n isOrganizationEnabled &&\n isCSRFEnabled;\n\n return {\n ...options,\n enable: isEnabled,\n };\n};\n\nconst useAppAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>,\n authOptions?: AuthEnableOptions\n) => {\n // Enhance options using custom hooks\n const optionsWithAuth = useAuthEnable(options ?? {}, authOptions);\n\n const optionsWithErrorHandling = useErrorHandling(optionsWithAuth);\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\nconst useEditorAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const optionsWithErrorHandling = useErrorHandling(options ?? {});\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.login>\n) =>\n useAppAsync('login', useIntlayerAuth().auth.login, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRegister = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.register>\n) =>\n useAppAsync('register', useIntlayerAuth().auth.register, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useLogout = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.logout>\n) =>\n useAppAsync('logout', useIntlayerAuth().auth.logout, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useChangePassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.changePassword>\n) => useAppAsync('changePassword', useIntlayerAuth().auth.changePassword, args);\nexport const useAskResetPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.askResetPassword>\n) =>\n useAppAsync(\n 'askResetPassword',\n useIntlayerAuth().auth.askResetPassword,\n args\n );\nexport const useResetPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.resetPassword>\n) => useAppAsync('resetPassword', useIntlayerAuth().auth.resetPassword, args);\nexport const useDefineNewPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.defineNewPassword>\n) =>\n useAppAsync(\n 'defineNewPassword',\n useIntlayerAuth().auth.defineNewPassword,\n args\n );\nexport const useCheckIfUserHasPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.checkIfUserHasPassword>\n) =>\n useAppAsync(\n 'checkIfUserHasPassword',\n useIntlayerAuth().auth.checkIfUserHasPassword,\n args,\n {\n requireUser: true,\n }\n );\nexport const useVerifyEmail = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.verifyEmail>\n) => useAppAsync('verifyEmail', useIntlayerAuth().auth.verifyEmail, args);\n\nexport const useGetUserByAccount = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.getUserByAccount>\n) =>\n useAppAsync(\n 'getUserByAccount',\n useIntlayerAuth().user.getUserByAccount,\n args\n );\n\n/**\n * User\n */\n\nexport const useGetUsers = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.getUsers>\n) =>\n useAppAsync(\n 'getUsers',\n useIntlayerAuth().user.getUsers,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\nexport const useCreateUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.createUser>\n) =>\n useAppAsync('createUser', useIntlayerAuth().user.createUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\nexport const useUpdateUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.updateUser>\n) =>\n useAppAsync('updateUser', useIntlayerAuth().user.updateUser, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.deleteUser>\n) =>\n useAppAsync('deleteUser', useIntlayerAuth().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.getOrganizations>\n) =>\n useAppAsync(\n 'getOrganizations',\n useIntlayerAuth().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\n\nexport const useAddOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.addOrganization>\n) =>\n useAppAsync(\n 'addOrganization',\n useIntlayerAuth().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useUpdateOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.updateOrganization>\n) =>\n useAppAsync(\n 'updateOrganization',\n useIntlayerAuth().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUpdateOrganizationMembers = (\n args?: UseAsyncOptions<\n typeof intlayerAPI.organization.updateOrganizationMembers\n >\n) =>\n useAppAsync(\n 'updateOrganizationMembers',\n useIntlayerAuth().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useAddOrganizationMember = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.addOrganizationMember>\n) =>\n useAppAsync(\n 'addOrganizationMember',\n useIntlayerAuth().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useDeleteOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.deleteOrganization>\n) =>\n useAppAsync(\n 'deleteOrganization',\n useIntlayerAuth().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useSelectOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.selectOrganization>\n) =>\n useAppAsync(\n 'selectOrganization',\n useIntlayerAuth().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUnselectOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.unselectOrganization>\n) =>\n useAppAsync(\n 'unselectOrganization',\n useIntlayerAuth().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.getProjects>\n) =>\n useAppAsync(\n 'getProjects',\n useIntlayerAuth().project.getProjects,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.addProject>\n) =>\n useAppAsync('addProject', useIntlayerAuth().project.addProject, {\n invalidateQueries: ['getProjects'],\n ...args,\n });\nexport const useUpdateProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.updateProject>\n) =>\n useAppAsync('updateProject', useIntlayerAuth().project.updateProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUpdateProjectMembers = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.updateProjectMembers>\n) =>\n useAppAsync(\n 'updateProjectMembers',\n useIntlayerAuth().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useDeleteProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.deleteProject>\n) =>\n useAppAsync('deleteProject', useIntlayerAuth().project.deleteProject, {\n invalidateQueries: ['getProjects', 'getSession'],\n ...args,\n });\nexport const useSelectProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.selectProject>\n) =>\n useAppAsync('selectProject', useIntlayerAuth().project.selectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUnselectProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.unselectProject>\n) =>\n useAppAsync('unselectProject', useIntlayerAuth().project.unselectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useAddNewAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.addNewAccessKey>\n) =>\n useAppAsync('addNewAccessKey', useIntlayerAuth().project.addNewAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.deleteAccessKey>\n) =>\n useAppAsync('deleteAccessKey', useIntlayerAuth().project.deleteAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRefreshAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.refreshAccessKey>\n) =>\n useAppAsync('refreshAccessKey', useIntlayerAuth().project.refreshAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionaries>\n) =>\n useAppAsync(\n 'getDictionaries',\n useIntlayerAuth().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionariesKeys = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionariesKeys>\n) =>\n useAppAsync(\n 'getDictionariesKeys',\n useIntlayerAuth().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionary>\n) =>\n useAppAsync(\n 'getDictionary',\n useIntlayerAuth().dictionary.getDictionary,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\nexport const useAddDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.addDictionary>\n) =>\n useAppAsync('addDictionary', useIntlayerAuth().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n ...args,\n });\n\nexport const usePushDictionaries = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.pushDictionaries>\n) =>\n useAppAsync(\n 'pushDictionaries',\n useIntlayerAuth().dictionary.pushDictionaries,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\nexport const useUpdateDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.updateDictionary>\n) =>\n useAppAsync(\n 'updateDictionary',\n useIntlayerAuth().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionary'],\n ...args,\n }\n );\nexport const useDeleteDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.deleteDictionary>\n) =>\n useAppAsync(\n 'deleteDictionary',\n useIntlayerAuth().dictionary.deleteDictionary,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\n\n/**\n * Tag\n */\n\nexport const useGetTags = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.getTags>\n) =>\n useAppAsync(\n 'getTags',\n useIntlayerAuth().tag.getTags,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.addTag>\n) =>\n useAppAsync('addTag', useIntlayerAuth().tag.addTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useUpdateTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.updateTag>\n) =>\n useAppAsync('updateTag', useIntlayerAuth().tag.updateTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useDeleteTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.deleteTag>\n) =>\n useAppAsync('deleteTag', useIntlayerAuth().tag.deleteTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\n\n/**\n * Stripe\n */\n\nexport const useGetPricing = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.getPricing>\n) =>\n useAppAsync('getPricing', useIntlayerAuth().stripe.getPricing, {\n store: true,\n cache: true,\n ...args,\n });\n\nexport const useGetSubscription = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.getSubscription>\n) =>\n useAppAsync(\n 'getSubscription',\n useIntlayerAuth().stripe.getSubscription,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\nexport const useCancelSubscription = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.cancelSubscription>\n) =>\n useAppAsync(\n 'cancelSubscription',\n useIntlayerAuth().stripe.cancelSubscription,\n { invalidateQueries: ['getSession'], ...args },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\n/**\n * AI\n */\n\nexport const useAuditContentDeclaration = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclaration>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclaration,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationMetadata = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationMetadata>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclarationMetadata,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationField = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationField>\n) =>\n useAppAsync(\n 'auditContentDeclarationField',\n useIntlayerAuth().ai.auditContentDeclarationField,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditTag>\n) =>\n useAppAsync('auditTag', useIntlayerAuth().ai.auditTag, args, {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n\nexport const useAskDocQuestion = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.askDocQuestion>\n) => useAppAsync('askDocQuestion', useIntlayerAuth().ai.askDocQuestion, args);\n\nexport const useAutocomplete = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.autocomplete>\n) => useAppAsync('autocomplete', useIntlayerAuth().ai.autocomplete, args);\n\n/**\n * Editor\n */\n\nexport const useWriteDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.editor.writeDictionary>\n) =>\n useEditorAsync(\n 'writeDictionary',\n useIntlayerAuth().editor.writeDictionary,\n args\n );\n"],"names":["useToast","error","useConfiguration","useAuth","useAsync","useIntlayerAuth"],"mappings":";;;;;;;;;;;AAYA,MAAM,mBAAmB,CAAiC,YAAkB;AACpE,QAAA,EAAE,MAAM,IAAIA,qCAAS;AAEpB,SAAA;AAAA,IACL,GAAG;AAAA,IACH,SAAS,CAAC,iBAAiB;AACrB,UAAA;AAGA,UAAA;AACE,YAAA,OAAO,iBAAiB,YAAa;AAEjC,gBAAA,KAAK,MAAM,YA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AAG,UAAU,MAAM;AAAA,EAC3D,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,gBAAgB;AAClB,CAAC;AAEU,MAAA,oBAAoB,CAC/B,SACG,YAAY,kBAAkBA,qBAAAA,kBAAkB,GAAG,gBAAgB,IAAI;AAE/D,MAAA,kBAAkB,CAC7B,SACG,YAAY,gBAAgBA,qBAAAA,kBAAkB,GAAG,cAAc,IAAI;AAM3D,MAAA,qBAAqB,CAChC,SAEA;AAAA,EACE;AAAA,EACAA,qBAAA,gBAAA,EAAkB,OAAO;AAAA,EACzB;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,7 +8,8 @@ export declare const useRegister: (args?: UseAsyncOptions<typeof intlayerAPI.aut
|
|
|
8
8
|
export declare const useLogout: (args?: UseAsyncOptions<typeof intlayerAPI.auth.logout>) => import('./useAsync').UseAsyncResult<"logout", (otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<void>>;
|
|
9
9
|
export declare const useChangePassword: (args?: UseAsyncOptions<typeof intlayerAPI.auth.changePassword>) => import('./useAsync').UseAsyncResult<"changePassword", (data: import('@intlayer/backend').UpdatePasswordBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').UpdatePasswordResult>>;
|
|
10
10
|
export declare const useAskResetPassword: (args?: UseAsyncOptions<typeof intlayerAPI.auth.askResetPassword>) => import('./useAsync').UseAsyncResult<"askResetPassword", (email: import('@intlayer/backend').AskResetPasswordBody["email"], otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AskResetPasswordResult>>;
|
|
11
|
-
export declare const useResetPassword: (args?: UseAsyncOptions<typeof intlayerAPI.auth.resetPassword>) => import('./useAsync').UseAsyncResult<"resetPassword", (params:
|
|
11
|
+
export declare const useResetPassword: (args?: UseAsyncOptions<typeof intlayerAPI.auth.resetPassword>) => import('./useAsync').UseAsyncResult<"resetPassword", (params: ResetPasswordParams, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<ResetPasswordResult>>;
|
|
12
|
+
export declare const useDefineNewPassword: (args?: UseAsyncOptions<typeof intlayerAPI.auth.defineNewPassword>) => import('./useAsync').UseAsyncResult<"defineNewPassword", (data: import('@intlayer/backend').DefinePasswordBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').DefinePasswordResult>>;
|
|
12
13
|
export declare const useCheckIfUserHasPassword: (args?: UseAsyncOptions<typeof intlayerAPI.auth.checkIfUserHasPassword>) => import('./useAsync').UseAsyncResult<"checkIfUserHasPassword", (otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').CheckIfUserHasPasswordResult>>;
|
|
13
14
|
export declare const useVerifyEmail: (args?: UseAsyncOptions<typeof intlayerAPI.auth.verifyEmail>) => import('./useAsync').UseAsyncResult<"verifyEmail", ({ userId, secret }: import('@intlayer/backend').ValidEmailParams, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').ValidEmailResult>>;
|
|
14
15
|
export declare const useGetUserByAccount: (args?: UseAsyncOptions<typeof intlayerAPI.user.getUserByAccount>) => import('./useAsync').UseAsyncResult<"getUserByAccount", (providerAccountId: import('@intlayer/backend').GetUserByAccountParams["providerAccountId"], provider: import('@intlayer/backend').GetUserByAccountParams["provider"], otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').GetUserByAccountResult>>;
|
|
@@ -49,7 +50,7 @@ export declare const useRefreshAccessKey: (args?: UseAsyncOptions<typeof intlaye
|
|
|
49
50
|
export declare const useGetDictionaries: (args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionaries>) => import('./useAsync').UseAsyncResult<"getDictionaries", (filters?: import('@intlayer/backend').GetDictionariesParams, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').GetDictionariesResult>>;
|
|
50
51
|
export declare const useGetDictionariesKeys: (args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionariesKeys>) => import('./useAsync').UseAsyncResult<"getDictionariesKeys", (otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').GetDictionariesKeysResult>>;
|
|
51
52
|
export declare const useGetDictionary: (args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionary>) => import('./useAsync').UseAsyncResult<"getDictionary", (dictionaryKey: import('@intlayer/backend').GetDictionaryParams["dictionaryKey"], version?: import('@intlayer/backend').GetDictionaryQuery["version"], otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').GetDictionaryResult>>;
|
|
52
|
-
export declare const useAddDictionary: (args?: UseAsyncOptions<typeof intlayerAPI.dictionary.addDictionary>) => import('./useAsync').UseAsyncResult<"addDictionary", (
|
|
53
|
+
export declare const useAddDictionary: (args?: UseAsyncOptions<typeof intlayerAPI.dictionary.addDictionary>) => import('./useAsync').UseAsyncResult<"addDictionary", (body: import('@intlayer/backend').AddDictionaryBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AddDictionaryResult>>;
|
|
53
54
|
export declare const usePushDictionaries: (args?: UseAsyncOptions<typeof intlayerAPI.dictionary.pushDictionaries>) => import('./useAsync').UseAsyncResult<"pushDictionaries", (dictionaries: import('@intlayer/backend').PushDictionariesBody["dictionaries"], otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').PushDictionariesResult>>;
|
|
54
55
|
export declare const useUpdateDictionary: (args?: UseAsyncOptions<typeof intlayerAPI.dictionary.updateDictionary>) => import('./useAsync').UseAsyncResult<"updateDictionary", (dictionaryId: import('@intlayer/backend').UpdateDictionaryParam["dictionaryId"], dictionary: import('@intlayer/backend').UpdateDictionaryBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').UpdateDictionaryResult>>;
|
|
55
56
|
export declare const useDeleteDictionary: (args?: UseAsyncOptions<typeof intlayerAPI.dictionary.deleteDictionary>) => import('./useAsync').UseAsyncResult<"deleteDictionary", (id: import('@intlayer/backend').DeleteDictionaryParam["dictionaryId"], otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').DeleteDictionaryResult>>;
|
|
@@ -63,6 +64,7 @@ export declare const useDeleteTag: (args?: UseAsyncOptions<typeof intlayerAPI.ta
|
|
|
63
64
|
/**
|
|
64
65
|
* Stripe
|
|
65
66
|
*/
|
|
67
|
+
export declare const useGetPricing: (args?: UseAsyncOptions<typeof intlayerAPI.stripe.getPricing>) => import('./useAsync').UseAsyncResult<"getPricing", (body?: import('@intlayer/backend').GetPricingBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').GetPricingResult>>;
|
|
66
68
|
export declare const useGetSubscription: (args?: UseAsyncOptions<typeof intlayerAPI.stripe.getSubscription>) => import('./useAsync').UseAsyncResult<"getSubscription", (body?: import('@intlayer/backend').GetCheckoutSessionBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').GetCheckoutSessionResult>>;
|
|
67
69
|
export declare const useCancelSubscription: (args?: UseAsyncOptions<typeof intlayerAPI.stripe.cancelSubscription>) => import('./useAsync').UseAsyncResult<"cancelSubscription", (otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').GetCheckoutSessionResult>>;
|
|
68
70
|
/**
|
|
@@ -73,6 +75,7 @@ export declare const useAuditContentDeclarationMetadata: (args?: UseAsyncOptions
|
|
|
73
75
|
export declare const useAuditContentDeclarationField: (args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationField>) => import('./useAsync').UseAsyncResult<"auditContentDeclarationField", (body?: import('@intlayer/backend').AuditContentDeclarationFieldBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationFieldResult>>;
|
|
74
76
|
export declare const useAuditTag: (args?: UseAsyncOptions<typeof intlayerAPI.ai.auditTag>) => import('./useAsync').UseAsyncResult<"auditTag", (body?: import('@intlayer/backend').AuditTagBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AuditTagResult>>;
|
|
75
77
|
export declare const useAskDocQuestion: (args?: UseAsyncOptions<typeof intlayerAPI.ai.askDocQuestion>) => import('./useAsync').UseAsyncResult<"askDocQuestion", (body?: import('@intlayer/backend').AskDocQuestionBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AskDocQuestionResult>>;
|
|
78
|
+
export declare const useAutocomplete: (args?: UseAsyncOptions<typeof intlayerAPI.ai.autocomplete>) => import('./useAsync').UseAsyncResult<"autocomplete", (body?: import('@intlayer/backend').AutocompleteBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AutocompleteResponse>>;
|
|
76
79
|
/**
|
|
77
80
|
* Editor
|
|
78
81
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intlayerAPIHooks.d.ts","sourceRoot":"","sources":["../../src/hooks/intlayerAPIHooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,qBAAqB,CAAC;AA0IrE;;GAEG;AAEH,eAAO,MAAM,QAAQ,UACZ,eAAe,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"intlayerAPIHooks.d.ts","sourceRoot":"","sources":["../../src/hooks/intlayerAPIHooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,qBAAqB,CAAC;AA0IrE;;GAEG;AAEH,eAAO,MAAM,QAAQ,UACZ,eAAe,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,gEAmCnB,mBAAmB,sFAInD,mBAAmB,eAlCnB,CAAC;AACL,eAAO,M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AAmB,iCA3Dh6D,CAAC;AAEJ,eAAO,MAAM,kCAAkC,UACtC,eAAe,CAAC,OAAO,WAAW,CAAC,EAAE,CAAC,+BAA+B,CAAC,mFAwDqoE,mBAAmB,gHAAwF,mBAAmB,yCA7C/0E,CAAC;AAEJ,eAAO,MAAM,+BAA+B,UACnC,eAAe,CAAC,OAAO,WAAW,CAAC,EAAE,CAAC,4BAA4B,CAAC,wFA0C86D,mBAAmB,6GAAqF,mBAAmB,sCA/BlnE,CAAC;AAEJ,eAAO,MAAM,WAAW,UACf,eAAe,CAAC,OAAO,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,oEA4Bq2E,mBAAmB,yFAAiE,mBAAmB,kBAtBhgF,CAAC;AAEL,eAAO,MAAM,iBAAiB,UACrB,eAAe,CAAC,OAAO,WAAW,CAAC,EAAE,CAAC,cAAc,CAAC,0EAmBggF,mBAAmB,+FAAuE,mBAAmB,wBAlB9lF,CAAC;AAE9E,eAAO,MAAM,eAAe,UACnB,eAAe,CAAC,OAAO,WAAW,CAAC,EAAE,CAAC,YAAY,CAAC,wEAe6qF,mBAAmB,6FAAqE,mBAAmB,wBAd3wF,CAAC;AAE1E;;GAEG;AAEH,eAAO,MAAM,kBAAkB,UACtB,eAAe,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC,eAAe,CAAC,yEAOsoH,2BAA4B,0EADluH,CAAC"}
|
|
@@ -87,6 +87,11 @@ const useAskResetPassword = (args) => useAppAsync(
|
|
|
87
87
|
args
|
|
88
88
|
);
|
|
89
89
|
const useResetPassword = (args) => useAppAsync("resetPassword", useIntlayerAuth().auth.resetPassword, args);
|
|
90
|
+
const useDefineNewPassword = (args) => useAppAsync(
|
|
91
|
+
"defineNewPassword",
|
|
92
|
+
useIntlayerAuth().auth.defineNewPassword,
|
|
93
|
+
args
|
|
94
|
+
);
|
|
90
95
|
const useCheckIfUserHasPassword = (args) => useAppAsync(
|
|
91
96
|
"checkIfUserHasPassword",
|
|
92
97
|
useIntlayerAuth().auth.checkIfUserHasPassword,
|
|
@@ -166,7 +171,7 @@ const useUpdateOrganizationMembers = (args) => useAppAsync(
|
|
|
166
171
|
"updateOrganizationMembers",
|
|
167
172
|
useIntlayerAuth().organization.updateOrganizationMembers,
|
|
168
173
|
{
|
|
169
|
-
invalidateQueries: ["getOrganizations"],
|
|
174
|
+
invalidateQueries: ["getOrganizations", "getSession"],
|
|
170
175
|
...args
|
|
171
176
|
}
|
|
172
177
|
);
|
|
@@ -174,7 +179,7 @@ const useAddOrganizationMember = (args) => useAppAsync(
|
|
|
174
179
|
"addOrganizationMember",
|
|
175
180
|
useIntlayerAuth().organization.addOrganizationMember,
|
|
176
181
|
{
|
|
177
|
-
invalidateQueries: ["getOrganizations"],
|
|
182
|
+
invalidateQueries: ["getOrganizations", "getSession"],
|
|
178
183
|
...args
|
|
179
184
|
}
|
|
180
185
|
);
|
|
@@ -182,7 +187,7 @@ const useDeleteOrganization = (args) => useAppAsync(
|
|
|
182
187
|
"deleteOrganization",
|
|
183
188
|
useIntlayerAuth().organization.deleteOrganization,
|
|
184
189
|
{
|
|
185
|
-
invalidateQueries: ["getOrganizations"],
|
|
190
|
+
invalidateQueries: ["getOrganizations", "getSession"],
|
|
186
191
|
...args
|
|
187
192
|
}
|
|
188
193
|
);
|
|
@@ -237,7 +242,7 @@ const useUpdateProjectMembers = (args) => useAppAsync(
|
|
|
237
242
|
}
|
|
238
243
|
);
|
|
239
244
|
const useDeleteProject = (args) => useAppAsync("deleteProject", useIntlayerAuth().project.deleteProject, {
|
|
240
|
-
invalidateQueries: ["getProjects"],
|
|
245
|
+
invalidateQueries: ["getProjects", "getSession"],
|
|
241
246
|
...args
|
|
242
247
|
});
|
|
243
248
|
const useSelectProject = (args) => useAppAsync("selectProject", useIntlayerAuth().project.selectProject, {
|
|
@@ -382,6 +387,11 @@ const useDeleteTag = (args) => useAppAsync("deleteTag", useIntlayerAuth().tag.de
|
|
|
382
387
|
invalidateQueries: ["getTags"],
|
|
383
388
|
...args
|
|
384
389
|
});
|
|
390
|
+
const useGetPricing = (args) => useAppAsync("getPricing", useIntlayerAuth().stripe.getPricing, {
|
|
391
|
+
store: true,
|
|
392
|
+
cache: true,
|
|
393
|
+
...args
|
|
394
|
+
});
|
|
385
395
|
const useGetSubscription = (args) => useAppAsync(
|
|
386
396
|
"getSubscription",
|
|
387
397
|
useIntlayerAuth().stripe.getSubscription,
|
|
@@ -436,6 +446,7 @@ const useAuditTag = (args) => useAppAsync("auditTag", useIntlayerAuth().ai.audit
|
|
|
436
446
|
requireProject: true
|
|
437
447
|
});
|
|
438
448
|
const useAskDocQuestion = (args) => useAppAsync("askDocQuestion", useIntlayerAuth().ai.askDocQuestion, args);
|
|
449
|
+
const useAutocomplete = (args) => useAppAsync("autocomplete", useIntlayerAuth().ai.autocomplete, args);
|
|
439
450
|
const useWriteDictionary = (args) => useEditorAsync(
|
|
440
451
|
"writeDictionary",
|
|
441
452
|
useIntlayerAuth().editor.writeDictionary,
|
|
@@ -454,10 +465,12 @@ export {
|
|
|
454
465
|
useAuditContentDeclarationField,
|
|
455
466
|
useAuditContentDeclarationMetadata,
|
|
456
467
|
useAuditTag,
|
|
468
|
+
useAutocomplete,
|
|
457
469
|
useCancelSubscription,
|
|
458
470
|
useChangePassword,
|
|
459
471
|
useCheckIfUserHasPassword,
|
|
460
472
|
useCreateUser,
|
|
473
|
+
useDefineNewPassword,
|
|
461
474
|
useDeleteAccessKey,
|
|
462
475
|
useDeleteDictionary,
|
|
463
476
|
useDeleteOrganization,
|
|
@@ -468,6 +481,7 @@ export {
|
|
|
468
481
|
useGetDictionariesKeys,
|
|
469
482
|
useGetDictionary,
|
|
470
483
|
useGetOrganizations,
|
|
484
|
+
useGetPricing,
|
|
471
485
|
useGetProjects,
|
|
472
486
|
useGetSubscription,
|
|
473
487
|
useGetTags,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intlayerAPIHooks.mjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["'use client';\n\nimport type { intlayerAPI } from '@intlayer/api';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from '../components/Auth/useAuth/index';\nimport { useToast } from '../components/Toaster';\nimport { type UseAsyncOptions, useAsync } from './useAsync/useAsync';\nimport { useIntlayerAuth } from './useIntlayerAPI';\n\n/**\n * Hook to handle error logging and toast notifications\n */\nconst useErrorHandling = <T extends UseAsyncOptions<any>>(options: T): T => {\n const { toast } = useToast();\n\n return {\n ...options,\n onError: (errorMessage) => {\n let error;\n\n // If json is valid, parse it\n try {\n if (typeof errorMessage === 'undefined') return;\n\n error = JSON.parse(errorMessage);\n } catch (e) {\n // If json is not valid, set error to the original errorMessage\n\n error = errorMessage;\n }\n\n // render toast for each error if there is more than one\n // otherwise render the toast with the error message\n [error]\n .flatMap((error) => error)\n .forEach((error) =>\n toast({\n title:\n (process.env.NODE_ENV === 'production'\n ? error.title\n : error.code) ?? 'Error',\n description: error.message ?? errorMessage ?? 'An error occurred',\n variant: 'error',\n })\n );\n options.onError?.(errorMessage);\n },\n onSuccess: (data) => {\n if (data.message)\n toast({\n title: data.message,\n description: data.description,\n variant: 'success',\n });\n options.onSuccess?.(data);\n },\n };\n};\n\ntype AuthEnableOptions = {\n requireUser?: boolean;\n requireProject?: boolean;\n requireOrganization?: boolean;\n};\n\n/**\n * Hook to enable authentication\n */\nconst useAuthEnable = <T extends UseAsyncOptions<any>>(\n options: T,\n { requireUser, requireProject, requireOrganization }: AuthEnableOptions = {}\n): T => {\n const configuration = useConfiguration();\n const { csrfToken, oAuth2AccessToken, session } = useAuth({\n intlayerConfiguration: configuration,\n });\n\n const isEnabledOption = options?.enable ?? true;\n const user = session ? session.user : oAuth2AccessToken?.user;\n\n const organization = session\n ? session.organization\n : oAuth2AccessToken?.organization;\n\n const project = session ? session.project : oAuth2AccessToken?.project;\n\n const isUserEnabled = requireUser ? Boolean(user) : true;\n\n const isProjectEnabled = requireProject ? Boolean(project) : true;\n\n const isOrganizationEnabled = requireOrganization\n ? Boolean(organization)\n : true;\n\n const isCSRFEnabled =\n Boolean(csrfToken) ||\n // If auth using session, csrf token is not required\n (!session && Boolean(oAuth2AccessToken));\n\n const isEnabled =\n isEnabledOption &&\n isUserEnabled &&\n isProjectEnabled &&\n isOrganizationEnabled &&\n isCSRFEnabled;\n\n return {\n ...options,\n enable: isEnabled,\n };\n};\n\nconst useAppAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>,\n authOptions?: AuthEnableOptions\n) => {\n // Enhance options using custom hooks\n const optionsWithAuth = useAuthEnable(options ?? {}, authOptions);\n\n const optionsWithErrorHandling = useErrorHandling(optionsWithAuth);\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\nconst useEditorAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const optionsWithErrorHandling = useErrorHandling(options ?? {});\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.login>\n) =>\n useAppAsync('login', useIntlayerAuth().auth.login, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRegister = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.register>\n) =>\n useAppAsync('register', useIntlayerAuth().auth.register, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useLogout = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.logout>\n) =>\n useAppAsync('logout', useIntlayerAuth().auth.logout, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useChangePassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.changePassword>\n) => useAppAsync('changePassword', useIntlayerAuth().auth.changePassword, args);\nexport const useAskResetPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.askResetPassword>\n) =>\n useAppAsync(\n 'askResetPassword',\n useIntlayerAuth().auth.askResetPassword,\n args\n );\nexport const useResetPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.resetPassword>\n) => useAppAsync('resetPassword', useIntlayerAuth().auth.resetPassword, args);\nexport const useCheckIfUserHasPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.checkIfUserHasPassword>\n) =>\n useAppAsync(\n 'checkIfUserHasPassword',\n useIntlayerAuth().auth.checkIfUserHasPassword,\n args,\n {\n requireUser: true,\n }\n );\nexport const useVerifyEmail = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.verifyEmail>\n) => useAppAsync('verifyEmail', useIntlayerAuth().auth.verifyEmail, args);\n\nexport const useGetUserByAccount = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.getUserByAccount>\n) =>\n useAppAsync(\n 'getUserByAccount',\n useIntlayerAuth().user.getUserByAccount,\n args\n );\n\n/**\n * User\n */\n\nexport const useGetUsers = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.getUsers>\n) =>\n useAppAsync(\n 'getUsers',\n useIntlayerAuth().user.getUsers,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\nexport const useCreateUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.createUser>\n) =>\n useAppAsync('createUser', useIntlayerAuth().user.createUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\nexport const useUpdateUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.updateUser>\n) =>\n useAppAsync('updateUser', useIntlayerAuth().user.updateUser, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.deleteUser>\n) =>\n useAppAsync('deleteUser', useIntlayerAuth().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.getOrganizations>\n) =>\n useAppAsync(\n 'getOrganizations',\n useIntlayerAuth().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\n\nexport const useAddOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.addOrganization>\n) =>\n useAppAsync(\n 'addOrganization',\n useIntlayerAuth().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useUpdateOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.updateOrganization>\n) =>\n useAppAsync(\n 'updateOrganization',\n useIntlayerAuth().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUpdateOrganizationMembers = (\n args?: UseAsyncOptions<\n typeof intlayerAPI.organization.updateOrganizationMembers\n >\n) =>\n useAppAsync(\n 'updateOrganizationMembers',\n useIntlayerAuth().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useAddOrganizationMember = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.addOrganizationMember>\n) =>\n useAppAsync(\n 'addOrganizationMember',\n useIntlayerAuth().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useDeleteOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.deleteOrganization>\n) =>\n useAppAsync(\n 'deleteOrganization',\n useIntlayerAuth().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useSelectOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.selectOrganization>\n) =>\n useAppAsync(\n 'selectOrganization',\n useIntlayerAuth().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUnselectOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.unselectOrganization>\n) =>\n useAppAsync(\n 'unselectOrganization',\n useIntlayerAuth().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.getProjects>\n) =>\n useAppAsync(\n 'getProjects',\n useIntlayerAuth().project.getProjects,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.addProject>\n) =>\n useAppAsync('addProject', useIntlayerAuth().project.addProject, {\n invalidateQueries: ['getProjects'],\n ...args,\n });\nexport const useUpdateProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.updateProject>\n) =>\n useAppAsync('updateProject', useIntlayerAuth().project.updateProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUpdateProjectMembers = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.updateProjectMembers>\n) =>\n useAppAsync(\n 'updateProjectMembers',\n useIntlayerAuth().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useDeleteProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.deleteProject>\n) =>\n useAppAsync('deleteProject', useIntlayerAuth().project.deleteProject, {\n invalidateQueries: ['getProjects'],\n ...args,\n });\nexport const useSelectProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.selectProject>\n) =>\n useAppAsync('selectProject', useIntlayerAuth().project.selectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUnselectProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.unselectProject>\n) =>\n useAppAsync('unselectProject', useIntlayerAuth().project.unselectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useAddNewAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.addNewAccessKey>\n) =>\n useAppAsync('addNewAccessKey', useIntlayerAuth().project.addNewAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.deleteAccessKey>\n) =>\n useAppAsync('deleteAccessKey', useIntlayerAuth().project.deleteAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRefreshAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.refreshAccessKey>\n) =>\n useAppAsync('refreshAccessKey', useIntlayerAuth().project.refreshAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionaries>\n) =>\n useAppAsync(\n 'getDictionaries',\n useIntlayerAuth().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionariesKeys = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionariesKeys>\n) =>\n useAppAsync(\n 'getDictionariesKeys',\n useIntlayerAuth().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionary>\n) =>\n useAppAsync(\n 'getDictionary',\n useIntlayerAuth().dictionary.getDictionary,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\nexport const useAddDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.addDictionary>\n) =>\n useAppAsync('addDictionary', useIntlayerAuth().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n ...args,\n });\n\nexport const usePushDictionaries = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.pushDictionaries>\n) =>\n useAppAsync(\n 'pushDictionaries',\n useIntlayerAuth().dictionary.pushDictionaries,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\nexport const useUpdateDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.updateDictionary>\n) =>\n useAppAsync(\n 'updateDictionary',\n useIntlayerAuth().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionary'],\n ...args,\n }\n );\nexport const useDeleteDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.deleteDictionary>\n) =>\n useAppAsync(\n 'deleteDictionary',\n useIntlayerAuth().dictionary.deleteDictionary,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\n\n/**\n * Tag\n */\n\nexport const useGetTags = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.getTags>\n) =>\n useAppAsync(\n 'getTags',\n useIntlayerAuth().tag.getTags,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.addTag>\n) =>\n useAppAsync('addTag', useIntlayerAuth().tag.addTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useUpdateTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.updateTag>\n) =>\n useAppAsync('updateTag', useIntlayerAuth().tag.updateTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useDeleteTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.deleteTag>\n) =>\n useAppAsync('deleteTag', useIntlayerAuth().tag.deleteTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\n\n/**\n * Stripe\n */\n\nexport const useGetSubscription = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.getSubscription>\n) =>\n useAppAsync(\n 'getSubscription',\n useIntlayerAuth().stripe.getSubscription,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\nexport const useCancelSubscription = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.cancelSubscription>\n) =>\n useAppAsync(\n 'cancelSubscription',\n useIntlayerAuth().stripe.cancelSubscription,\n { invalidateQueries: ['getSession'], ...args },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\n/**\n * AI\n */\n\nexport const useAuditContentDeclaration = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclaration>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclaration,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationMetadata = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationMetadata>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclarationMetadata,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationField = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationField>\n) =>\n useAppAsync(\n 'auditContentDeclarationField',\n useIntlayerAuth().ai.auditContentDeclarationField,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditTag>\n) =>\n useAppAsync('auditTag', useIntlayerAuth().ai.auditTag, args, {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n\nexport const useAskDocQuestion = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.askDocQuestion>\n) => useAppAsync('askDocQuestion', useIntlayerAuth().ai.askDocQuestion, args);\n\n/**\n * Editor\n */\n\nexport const useWriteDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.editor.writeDictionary>\n) =>\n useEditorAsync(\n 'writeDictionary',\n useIntlayerAuth().editor.writeDictionary,\n args\n );\n"],"names":["error"],"mappings":";;;;;;;;;AAYA,MAAM,mBAAmB,CAAiC,YAAkB;AACpE,QAAA,EAAE,MAAM,IAAI,SAAS;AAEpB,SAAA;AAAA,IACL,GAAG;AAAA,IACH,SAAS,CAAC,iBAAiB;AACrB,UAAA;AAGA,UAAA;AACE,YAAA,OAAO,iBAAiB,YAAa;AAEjC,gBAAA,KAAK,MAAM,YAAY;AAAA,eACxB,GAAG;AAGF,gBAAA;AAAA,MAAA;AAKV,OAAC,KAAK,EACH,QAAQ,CAACA,WAAUA,MAAK,EACxB;AAAA,QAAQ,CAACA,WACR,MAAM;AAAA,UACJ,QACG,2BAAY,aAAa,eACtBA,OAAM,QACNA,OAAM,SAAS;AAAA,UACrB,aAAaA,OAAM,WAAW,gBAAgB;AAAA,UAC9C,SAAS;AAAA,QACV,CAAA;AAAA,MACH;AACF,cAAQ,UAAU,YAAY;AAAA,IAChC;AAAA,IACA,WAAW,CAAC,SAAS;AACnB,UAAI,KAAK;AACD,cAAA;AAAA,UACJ,OAAO,KAAK;AAAA,UACZ,aAAa,KAAK;AAAA,UAClB,SAAS;AAAA,QAAA,CACV;AACH,cAAQ,YAAY,IAAI;AAAA,IAAA;AAAA,EAE5B;AACF;AAWA,MAAM,gBAAgB,CACpB,SACA,EAAE,aAAa,gBAAgB,oBAA2C,IAAA,OACpE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A,IACrB,gBAAgB;AAAA,EAAA;AAEpB;AAEW,MAAA,cAAc,CACzB,SAEA,YAAY,YAAY,kBAAkB,GAAG,UAAU,MAAM;AAAA,EAC3D,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,gBAAgB;AAClB,CAAC;AAEU,MAAA,oBAAoB,CAC/B,SACG,YAAY,kBAAkB,kBAAkB,GAAG,gBAAgB,IAAI;AAM/D,MAAA,qBAAqB,CAChC,SAEA;AAAA,EACE;AAAA,EACA,gBAAA,EAAkB,OAAO;AAAA,EACzB;AACF;"}
|
|
1
|
+
{"version":3,"file":"intlayerAPIHooks.mjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["'use client';\n\nimport type { intlayerAPI } from '@intlayer/api';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from '../components/Auth/useAuth/index';\nimport { useToast } from '../components/Toaster';\nimport { type UseAsyncOptions, useAsync } from './useAsync/useAsync';\nimport { useIntlayerAuth } from './useIntlayerAPI';\n\n/**\n * Hook to handle error logging and toast notifications\n */\nconst useErrorHandling = <T extends UseAsyncOptions<any>>(options: T): T => {\n const { toast } = useToast();\n\n return {\n ...options,\n onError: (errorMessage) => {\n let error;\n\n // If json is valid, parse it\n try {\n if (typeof errorMessage === 'undefined') return;\n\n error = JSON.parse(errorMessage);\n } catch (e) {\n // If json is not valid, set error to the original errorMessage\n\n error = errorMessage;\n }\n\n // render toast for each error if there is more than one\n // otherwise render the toast with the error message\n [error]\n .flatMap((error) => error)\n .forEach((error) =>\n toast({\n title:\n (process.env.NODE_ENV === 'production'\n ? error.title\n : error.code) ?? 'Error',\n description: error.message ?? errorMessage ?? 'An error occurred',\n variant: 'error',\n })\n );\n options.onError?.(errorMessage);\n },\n onSuccess: (data) => {\n if (data.message)\n toast({\n title: data.message,\n description: data.description,\n variant: 'success',\n });\n options.onSuccess?.(data);\n },\n };\n};\n\ntype AuthEnableOptions = {\n requireUser?: boolean;\n requireProject?: boolean;\n requireOrganization?: boolean;\n};\n\n/**\n * Hook to enable authentication\n */\nconst useAuthEnable = <T extends UseAsyncOptions<any>>(\n options: T,\n { requireUser, requireProject, requireOrganization }: AuthEnableOptions = {}\n): T => {\n const configuration = useConfiguration();\n const { csrfToken, oAuth2AccessToken, session } = useAuth({\n intlayerConfiguration: configuration,\n });\n\n const isEnabledOption = options?.enable ?? true;\n const user = session ? session.user : oAuth2AccessToken?.user;\n\n const organization = session\n ? session.organization\n : oAuth2AccessToken?.organization;\n\n const project = session ? session.project : oAuth2AccessToken?.project;\n\n const isUserEnabled = requireUser ? Boolean(user) : true;\n\n const isProjectEnabled = requireProject ? Boolean(project) : true;\n\n const isOrganizationEnabled = requireOrganization\n ? Boolean(organization)\n : true;\n\n const isCSRFEnabled =\n Boolean(csrfToken) ||\n // If auth using session, csrf token is not required\n (!session && Boolean(oAuth2AccessToken));\n\n const isEnabled =\n isEnabledOption &&\n isUserEnabled &&\n isProjectEnabled &&\n isOrganizationEnabled &&\n isCSRFEnabled;\n\n return {\n ...options,\n enable: isEnabled,\n };\n};\n\nconst useAppAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>,\n authOptions?: AuthEnableOptions\n) => {\n // Enhance options using custom hooks\n const optionsWithAuth = useAuthEnable(options ?? {}, authOptions);\n\n const optionsWithErrorHandling = useErrorHandling(optionsWithAuth);\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\nconst useEditorAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const optionsWithErrorHandling = useErrorHandling(options ?? {});\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.login>\n) =>\n useAppAsync('login', useIntlayerAuth().auth.login, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRegister = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.register>\n) =>\n useAppAsync('register', useIntlayerAuth().auth.register, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useLogout = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.logout>\n) =>\n useAppAsync('logout', useIntlayerAuth().auth.logout, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useChangePassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.changePassword>\n) => useAppAsync('changePassword', useIntlayerAuth().auth.changePassword, args);\nexport const useAskResetPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.askResetPassword>\n) =>\n useAppAsync(\n 'askResetPassword',\n useIntlayerAuth().auth.askResetPassword,\n args\n );\nexport const useResetPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.resetPassword>\n) => useAppAsync('resetPassword', useIntlayerAuth().auth.resetPassword, args);\nexport const useDefineNewPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.defineNewPassword>\n) =>\n useAppAsync(\n 'defineNewPassword',\n useIntlayerAuth().auth.defineNewPassword,\n args\n );\nexport const useCheckIfUserHasPassword = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.checkIfUserHasPassword>\n) =>\n useAppAsync(\n 'checkIfUserHasPassword',\n useIntlayerAuth().auth.checkIfUserHasPassword,\n args,\n {\n requireUser: true,\n }\n );\nexport const useVerifyEmail = (\n args?: UseAsyncOptions<typeof intlayerAPI.auth.verifyEmail>\n) => useAppAsync('verifyEmail', useIntlayerAuth().auth.verifyEmail, args);\n\nexport const useGetUserByAccount = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.getUserByAccount>\n) =>\n useAppAsync(\n 'getUserByAccount',\n useIntlayerAuth().user.getUserByAccount,\n args\n );\n\n/**\n * User\n */\n\nexport const useGetUsers = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.getUsers>\n) =>\n useAppAsync(\n 'getUsers',\n useIntlayerAuth().user.getUsers,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\nexport const useCreateUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.createUser>\n) =>\n useAppAsync('createUser', useIntlayerAuth().user.createUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\nexport const useUpdateUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.updateUser>\n) =>\n useAppAsync('updateUser', useIntlayerAuth().user.updateUser, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteUser = (\n args?: UseAsyncOptions<typeof intlayerAPI.user.deleteUser>\n) =>\n useAppAsync('deleteUser', useIntlayerAuth().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.getOrganizations>\n) =>\n useAppAsync(\n 'getOrganizations',\n useIntlayerAuth().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\n\nexport const useAddOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.addOrganization>\n) =>\n useAppAsync(\n 'addOrganization',\n useIntlayerAuth().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useUpdateOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.updateOrganization>\n) =>\n useAppAsync(\n 'updateOrganization',\n useIntlayerAuth().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUpdateOrganizationMembers = (\n args?: UseAsyncOptions<\n typeof intlayerAPI.organization.updateOrganizationMembers\n >\n) =>\n useAppAsync(\n 'updateOrganizationMembers',\n useIntlayerAuth().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useAddOrganizationMember = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.addOrganizationMember>\n) =>\n useAppAsync(\n 'addOrganizationMember',\n useIntlayerAuth().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useDeleteOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.deleteOrganization>\n) =>\n useAppAsync(\n 'deleteOrganization',\n useIntlayerAuth().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useSelectOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.selectOrganization>\n) =>\n useAppAsync(\n 'selectOrganization',\n useIntlayerAuth().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUnselectOrganization = (\n args?: UseAsyncOptions<typeof intlayerAPI.organization.unselectOrganization>\n) =>\n useAppAsync(\n 'unselectOrganization',\n useIntlayerAuth().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.getProjects>\n) =>\n useAppAsync(\n 'getProjects',\n useIntlayerAuth().project.getProjects,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.addProject>\n) =>\n useAppAsync('addProject', useIntlayerAuth().project.addProject, {\n invalidateQueries: ['getProjects'],\n ...args,\n });\nexport const useUpdateProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.updateProject>\n) =>\n useAppAsync('updateProject', useIntlayerAuth().project.updateProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUpdateProjectMembers = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.updateProjectMembers>\n) =>\n useAppAsync(\n 'updateProjectMembers',\n useIntlayerAuth().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useDeleteProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.deleteProject>\n) =>\n useAppAsync('deleteProject', useIntlayerAuth().project.deleteProject, {\n invalidateQueries: ['getProjects', 'getSession'],\n ...args,\n });\nexport const useSelectProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.selectProject>\n) =>\n useAppAsync('selectProject', useIntlayerAuth().project.selectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUnselectProject = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.unselectProject>\n) =>\n useAppAsync('unselectProject', useIntlayerAuth().project.unselectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useAddNewAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.addNewAccessKey>\n) =>\n useAppAsync('addNewAccessKey', useIntlayerAuth().project.addNewAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.deleteAccessKey>\n) =>\n useAppAsync('deleteAccessKey', useIntlayerAuth().project.deleteAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRefreshAccessKey = (\n args?: UseAsyncOptions<typeof intlayerAPI.project.refreshAccessKey>\n) =>\n useAppAsync('refreshAccessKey', useIntlayerAuth().project.refreshAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionaries>\n) =>\n useAppAsync(\n 'getDictionaries',\n useIntlayerAuth().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionariesKeys = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionariesKeys>\n) =>\n useAppAsync(\n 'getDictionariesKeys',\n useIntlayerAuth().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.getDictionary>\n) =>\n useAppAsync(\n 'getDictionary',\n useIntlayerAuth().dictionary.getDictionary,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\nexport const useAddDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.addDictionary>\n) =>\n useAppAsync('addDictionary', useIntlayerAuth().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n ...args,\n });\n\nexport const usePushDictionaries = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.pushDictionaries>\n) =>\n useAppAsync(\n 'pushDictionaries',\n useIntlayerAuth().dictionary.pushDictionaries,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\nexport const useUpdateDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.updateDictionary>\n) =>\n useAppAsync(\n 'updateDictionary',\n useIntlayerAuth().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionary'],\n ...args,\n }\n );\nexport const useDeleteDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.dictionary.deleteDictionary>\n) =>\n useAppAsync(\n 'deleteDictionary',\n useIntlayerAuth().dictionary.deleteDictionary,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\n\n/**\n * Tag\n */\n\nexport const useGetTags = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.getTags>\n) =>\n useAppAsync(\n 'getTags',\n useIntlayerAuth().tag.getTags,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.addTag>\n) =>\n useAppAsync('addTag', useIntlayerAuth().tag.addTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useUpdateTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.updateTag>\n) =>\n useAppAsync('updateTag', useIntlayerAuth().tag.updateTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useDeleteTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.tag.deleteTag>\n) =>\n useAppAsync('deleteTag', useIntlayerAuth().tag.deleteTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\n\n/**\n * Stripe\n */\n\nexport const useGetPricing = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.getPricing>\n) =>\n useAppAsync('getPricing', useIntlayerAuth().stripe.getPricing, {\n store: true,\n cache: true,\n ...args,\n });\n\nexport const useGetSubscription = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.getSubscription>\n) =>\n useAppAsync(\n 'getSubscription',\n useIntlayerAuth().stripe.getSubscription,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\nexport const useCancelSubscription = (\n args?: UseAsyncOptions<typeof intlayerAPI.stripe.cancelSubscription>\n) =>\n useAppAsync(\n 'cancelSubscription',\n useIntlayerAuth().stripe.cancelSubscription,\n { invalidateQueries: ['getSession'], ...args },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\n/**\n * AI\n */\n\nexport const useAuditContentDeclaration = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclaration>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclaration,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationMetadata = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationMetadata>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclarationMetadata,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationField = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditContentDeclarationField>\n) =>\n useAppAsync(\n 'auditContentDeclarationField',\n useIntlayerAuth().ai.auditContentDeclarationField,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditTag = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.auditTag>\n) =>\n useAppAsync('auditTag', useIntlayerAuth().ai.auditTag, args, {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n\nexport const useAskDocQuestion = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.askDocQuestion>\n) => useAppAsync('askDocQuestion', useIntlayerAuth().ai.askDocQuestion, args);\n\nexport const useAutocomplete = (\n args?: UseAsyncOptions<typeof intlayerAPI.ai.autocomplete>\n) => useAppAsync('autocomplete', useIntlayerAuth().ai.autocomplete, args);\n\n/**\n * Editor\n */\n\nexport const useWriteDictionary = (\n args?: UseAsyncOptions<typeof intlayerAPI.editor.writeDictionary>\n) =>\n useEditorAsync(\n 'writeDictionary',\n useIntlayerAuth().editor.writeDictionary,\n args\n );\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B,gBAAgB;AAClB,CAAC;AAEU,MAAA,oBAAoB,CAC/B,SACG,YAAY,kBAAkB,kBAAkB,GAAG,gBAAgB,IAAI;AAE/D,MAAA,kBAAkB,CAC7B,SACG,YAAY,gBAAgB,kBAAkB,GAAG,cAAc,IAAI;AAM3D,MAAA,qBAAqB,CAChC,SAEA;AAAA,EACE;AAAA,EACA,gBAAA,EAAkB,OAAO;AAAA,EACzB;AACF;"}
|
|
@@ -14,14 +14,6 @@ const createDefaultStates = () => ({
|
|
|
14
14
|
errorCount: 0,
|
|
15
15
|
isEnabled: true
|
|
16
16
|
});
|
|
17
|
-
const ensureArray = (value) => {
|
|
18
|
-
if (!value) {
|
|
19
|
-
return [];
|
|
20
|
-
} else if (Array.isArray(value)) {
|
|
21
|
-
return value;
|
|
22
|
-
}
|
|
23
|
-
return [value];
|
|
24
|
-
};
|
|
25
17
|
const getMatchKeys = (selectorsKeys, keysWithArgs) => keysWithArgs.filter((key) => selectorsKeys.includes(key.split("/")[0]));
|
|
26
18
|
const reducer = (state, action) => {
|
|
27
19
|
switch (action.type) {
|
|
@@ -61,10 +53,12 @@ const reducer = (state, action) => {
|
|
|
61
53
|
}
|
|
62
54
|
case "SET_QUERIES_STATE": {
|
|
63
55
|
const { keys, value } = action;
|
|
64
|
-
const keyArray =
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
56
|
+
const keyArray = [keys].flat();
|
|
57
|
+
const allKeys = Object.keys(state.states);
|
|
58
|
+
const matchedKeys = getMatchKeys(keyArray, allKeys);
|
|
59
|
+
if (matchedKeys.length === 0) return state;
|
|
60
|
+
const updatedStates = structuredClone(state.states);
|
|
61
|
+
matchedKeys.forEach((key) => {
|
|
68
62
|
updatedStates[key] = {
|
|
69
63
|
...state.states[key] ?? createDefaultStates(),
|
|
70
64
|
...value
|
|
@@ -77,7 +71,7 @@ const reducer = (state, action) => {
|
|
|
77
71
|
}
|
|
78
72
|
case "RESET_KEY_STATE": {
|
|
79
73
|
const { keys } = action;
|
|
80
|
-
const keyArray =
|
|
74
|
+
const keyArray = [keys].flat();
|
|
81
75
|
if (keyArray.length === 0) return state;
|
|
82
76
|
const allKeys = Object.keys(state.states);
|
|
83
77
|
const matchedKeys = getMatchKeys(keyArray, allKeys);
|
|
@@ -92,7 +86,7 @@ const reducer = (state, action) => {
|
|
|
92
86
|
};
|
|
93
87
|
}
|
|
94
88
|
case "RESET_STATE": {
|
|
95
|
-
const excludeArray =
|
|
89
|
+
const excludeArray = [action.excludeKeys].flat();
|
|
96
90
|
const allKeys = Object.keys(state.states);
|
|
97
91
|
const matchedKeys = getMatchKeys(excludeArray, allKeys);
|
|
98
92
|
const newStates = {};
|