@intlayer/design-system 5.8.1 → 6.0.0-canary.1
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 +34 -106
- package/dist/better-auth.CMQ3rA-I-7umXOENE.js.map +1 -1
- package/dist/better-auth.CMQ3rA-I-C2nBKRMa.cjs.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.cjs +3 -1
- package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts +3 -0
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.mjs +3 -1
- package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -1
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/CopyButton/CopyButton.content.cjs +3 -1
- package/dist/components/CopyButton/CopyButton.content.cjs.map +1 -1
- package/dist/components/CopyButton/CopyButton.content.d.ts +3 -0
- package/dist/components/CopyButton/CopyButton.content.d.ts.map +1 -1
- package/dist/components/CopyButton/CopyButton.content.mjs +3 -1
- package/dist/components/CopyButton/CopyButton.content.mjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +7 -3
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +7 -3
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +83 -34
- 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 +83 -34
- 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 +12 -8
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs +27 -13
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +27 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +27 -13
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs +9 -4
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +9 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs +9 -4
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +29 -25
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +27 -23
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +37 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +64 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +37 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +25 -12
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +25 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +25 -12
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +4 -5
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +4 -5
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +25 -12
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +25 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +25 -12
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +36 -31
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +36 -31
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +32 -28
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +32 -5
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +32 -28
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +2 -5
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +2 -5
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs +9 -4
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +9 -0
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs +9 -4
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.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/VersionSwitcherDropDown/VersionSwitcherContext.cjs +4 -6
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts +3 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +4 -6
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs +7 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +7 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs +7 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs +9 -6
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +9 -4
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs +9 -6
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +28 -14
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +29 -2
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +28 -14
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs +2 -2
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.d.ts.map +1 -1
- package/dist/components/DropDown/index.mjs +2 -2
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -5
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -5
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.cjs.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +2 -2
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -1
- package/dist/components/ExpandCollapse/expandCollapse.content.cjs +5 -2
- package/dist/components/ExpandCollapse/expandCollapse.content.cjs.map +1 -1
- package/dist/components/ExpandCollapse/expandCollapse.content.d.ts +3 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.d.ts.map +1 -1
- package/dist/components/ExpandCollapse/expandCollapse.content.mjs +5 -2
- package/dist/components/ExpandCollapse/expandCollapse.content.mjs.map +1 -1
- package/dist/components/Flags/Flag.cjs +2 -1
- package/dist/components/Flags/Flag.cjs.map +1 -1
- package/dist/components/Flags/Flag.d.ts.map +1 -1
- package/dist/components/Flags/Flag.mjs +2 -1
- package/dist/components/Flags/Flag.mjs.map +1 -1
- package/dist/components/IDE/Code.cjs +8 -8
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.mjs +8 -8
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.d.ts +1 -1
- package/dist/components/IDE/CodeBlockClient.d.ts.map +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +1 -3
- package/dist/components/IDE/CodeContext.cjs.map +1 -1
- package/dist/components/IDE/CodeContext.mjs +1 -3
- package/dist/components/IDE/CodeContext.mjs.map +1 -1
- package/dist/components/IDE/code.content.cjs +5 -2
- package/dist/components/IDE/code.content.cjs.map +1 -1
- package/dist/components/IDE/code.content.d.ts +5 -0
- package/dist/components/IDE/code.content.d.ts.map +1 -1
- package/dist/components/IDE/code.content.mjs +5 -2
- package/dist/components/IDE/code.content.mjs.map +1 -1
- package/dist/components/IDE/copyCode.content.cjs +5 -2
- package/dist/components/IDE/copyCode.content.cjs.map +1 -1
- package/dist/components/IDE/copyCode.content.d.ts +5 -0
- package/dist/components/IDE/copyCode.content.d.ts.map +1 -1
- package/dist/components/IDE/copyCode.content.mjs +5 -2
- package/dist/components/IDE/copyCode.content.mjs.map +1 -1
- package/dist/components/Input/Checkbox.cjs.map +1 -1
- package/dist/components/Input/Checkbox.d.ts +2 -2
- package/dist/components/Input/Checkbox.d.ts.map +1 -1
- package/dist/components/Input/Checkbox.mjs.map +1 -1
- package/dist/components/Loader/index.content.cjs +6 -1
- package/dist/components/Loader/index.content.cjs.map +1 -1
- package/dist/components/Loader/index.content.d.ts +33 -2
- package/dist/components/Loader/index.content.d.ts.map +1 -1
- package/dist/components/Loader/index.content.mjs +6 -1
- package/dist/components/Loader/index.content.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +1 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +1 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +1 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs +17 -8
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +17 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +17 -8
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +13 -6
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +13 -0
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +13 -6
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +2 -4
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.mjs +2 -4
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +1 -3
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +1 -3
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs +2 -4
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.mjs +2 -4
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +1 -3
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +1 -3
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +1 -3
- 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 +1 -3
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/Table/table.content.cjs +3 -1
- package/dist/components/Table/table.content.cjs.map +1 -1
- package/dist/components/Table/table.content.d.ts +3 -0
- package/dist/components/Table/table.content.d.ts.map +1 -1
- package/dist/components/Table/table.content.mjs +3 -1
- package/dist/components/Table/table.content.mjs.map +1 -1
- package/dist/components/Tag/index.cjs +22 -88
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.d.ts +5 -5
- package/dist/components/Tag/index.mjs +22 -88
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.cjs +20 -21
- package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.d.ts.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.mjs +20 -21
- package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
- package/dist/hooks/auth.cjs +26 -11
- package/dist/hooks/auth.cjs.map +1 -1
- package/dist/hooks/auth.mjs +26 -11
- package/dist/hooks/auth.mjs.map +1 -1
- package/dist/hooks/index.cjs +65 -66
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +4 -8
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/reactQuery.cjs +648 -0
- package/dist/hooks/reactQuery.cjs.map +1 -0
- package/dist/hooks/reactQuery.d.ts +899 -0
- package/dist/hooks/reactQuery.d.ts.map +1 -0
- package/dist/hooks/reactQuery.mjs +646 -0
- package/dist/hooks/reactQuery.mjs.map +1 -0
- package/dist/hooks/useAuth/useOAuth2.cjs +13 -10
- package/dist/hooks/useAuth/useOAuth2.cjs.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.d.ts +1 -1
- package/dist/hooks/useAuth/useOAuth2.d.ts.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.mjs +13 -10
- package/dist/hooks/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/hooks/useAuth/useSession.cjs +23 -26
- package/dist/hooks/useAuth/useSession.cjs.map +1 -1
- package/dist/hooks/useAuth/useSession.d.ts +4 -352
- package/dist/hooks/useAuth/useSession.d.ts.map +1 -1
- package/dist/hooks/useAuth/useSession.mjs +23 -26
- package/dist/hooks/useAuth/useSession.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.cjs +2 -3
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs +2 -3
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/hooks/useUser/index.cjs +6 -9
- package/dist/hooks/useUser/index.cjs.map +1 -1
- package/dist/hooks/useUser/index.d.ts +2 -18
- package/dist/hooks/useUser/index.d.ts.map +1 -1
- package/dist/hooks/useUser/index.mjs +6 -9
- package/dist/hooks/useUser/index.mjs.map +1 -1
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/providers/ReactQueryProvider.cjs +85 -0
- package/dist/providers/ReactQueryProvider.cjs.map +1 -0
- package/dist/providers/ReactQueryProvider.d.ts +13 -0
- package/dist/providers/ReactQueryProvider.d.ts.map +1 -0
- package/dist/providers/ReactQueryProvider.mjs +85 -0
- package/dist/providers/ReactQueryProvider.mjs.map +1 -0
- package/dist/providers/index.cjs +5 -0
- package/dist/{hooks/useAsync → providers}/index.cjs.map +1 -1
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.mjs +5 -0
- package/dist/{hooks/useAsync → providers}/index.mjs.map +1 -1
- package/package.json +30 -20
- package/dist/hooks/intlayerAPIHooks.cjs +0 -542
- package/dist/hooks/intlayerAPIHooks.cjs.map +0 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +0 -968
- package/dist/hooks/intlayerAPIHooks.d.ts.map +0 -1
- package/dist/hooks/intlayerAPIHooks.mjs +0 -542
- package/dist/hooks/intlayerAPIHooks.mjs.map +0 -1
- package/dist/hooks/useAsync/index.cjs +0 -8
- package/dist/hooks/useAsync/index.d.ts +0 -3
- package/dist/hooks/useAsync/index.d.ts.map +0 -1
- package/dist/hooks/useAsync/index.mjs +0 -8
- package/dist/hooks/useAsync/useAsync.cjs +0 -244
- package/dist/hooks/useAsync/useAsync.cjs.map +0 -1
- package/dist/hooks/useAsync/useAsync.d.ts +0 -73
- package/dist/hooks/useAsync/useAsync.d.ts.map +0 -1
- package/dist/hooks/useAsync/useAsync.mjs +0 -244
- package/dist/hooks/useAsync/useAsync.mjs.map +0 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +0 -150
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +0 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts +0 -52
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +0 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs +0 -150
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +0 -1
- package/dist/hooks/useAsync/useAsyncWrapper.cjs +0 -10
- package/dist/hooks/useAsync/useAsyncWrapper.cjs.map +0 -1
- package/dist/hooks/useAsync/useAsyncWrapper.d.ts +0 -37
- package/dist/hooks/useAsync/useAsyncWrapper.d.ts.map +0 -1
- package/dist/hooks/useAsync/useAsyncWrapper.mjs +0 -10
- package/dist/hooks/useAsync/useAsyncWrapper.mjs.map +0 -1
- package/dist/hooks/useGetAllDictionaries.cjs +0 -35
- package/dist/hooks/useGetAllDictionaries.cjs.map +0 -1
- package/dist/hooks/useGetAllDictionaries.d.ts +0 -11
- package/dist/hooks/useGetAllDictionaries.d.ts.map +0 -1
- package/dist/hooks/useGetAllDictionaries.mjs +0 -35
- package/dist/hooks/useGetAllDictionaries.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactQuery.mjs","sources":["../../src/hooks/reactQuery.ts"],"sourcesContent":["'use client';\n\nimport {\n GetCheckoutSessionBody,\n GetDictionariesKeysResult,\n GetDictionariesParams,\n GetDictionaryParams,\n GetDictionaryQuery,\n GetOrganizationsParams,\n GetPricingBody,\n GetPricingResult,\n GetProjectsParams,\n GetTagsParams,\n GetUsersParams,\n SearchDocUtilParams,\n} from '@intlayer/backend';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport {\n QueryKey,\n useMutation,\n useQuery,\n useQueryClient,\n UseQueryOptions,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { getAuthAPI } from './auth';\nimport { useAuth } from './useAuth';\nimport { useIntlayerAuth, useIntlayerOAuth } from './useIntlayerAPI';\n\nexport { useQueryClient };\n\ntype AuthEnableOptions = {\n requireUser?: boolean;\n requireProject?: boolean;\n requireOrganization?: boolean;\n};\n\n/**\n * Hook to enable authentication\n */\nconst useAuthEnable = ({\n requireUser,\n requireProject,\n requireOrganization,\n}: AuthEnableOptions) => {\n const configuration = useConfiguration();\n const { oAuth2AccessToken, session } = useAuth({\n intlayerConfiguration: configuration,\n });\n\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 isEnabled = isUserEnabled && isProjectEnabled && isOrganizationEnabled;\n\n return {\n enable: isEnabled,\n };\n};\n\nexport const useAppQuery = <\n TQueryFnData,\n TError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n requireUser?: boolean;\n requireProject?: boolean;\n requireOrganization?: boolean;\n }\n): UseQueryResult<TData, TError> => {\n const { requireUser, requireProject, requireOrganization, ...rest } = options;\n const { enable } = useAuthEnable({\n requireUser,\n requireProject,\n requireOrganization,\n });\n\n const result = useQuery({\n ...rest,\n enabled: (rest as any).enabled === false ? false : enable,\n } as any);\n\n return result as unknown as UseQueryResult<TData, TError>;\n};\n\n// Removed unused useEditorMutation\n\n/**\n * Auth\n */\n\nexport const useLogin = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['login'],\n mutationFn: (\n ...args: Parameters<ReturnType<typeof getAuthAPI>['signInEmail']>\n ) => intlayerAuth.signInEmail(...args),\n meta: {\n invalidateQueries: [['session']],\n },\n });\n};\n\nexport const useGetVerifyEmailStatus = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['getVerifyEmailStatus'],\n mutationFn: (\n args: Parameters<ReturnType<typeof getAuthAPI>['verifyEmailSession']>\n ) => intlayerAuth.verifyEmailSession(...args),\n });\n};\n\nexport const useRegister = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['register'],\n mutationFn: (\n ...args: Parameters<ReturnType<typeof getAuthAPI>['signUpEmail']>\n ) => intlayerAuth.signUpEmail(...args),\n meta: {\n invalidateQueries: [['session']],\n },\n });\n};\n\nexport const useLogout = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['logout'],\n mutationFn: (\n ...args: Parameters<ReturnType<typeof getAuthAPI>['signOut']>\n ) => intlayerAuth.signOut(...args),\n meta: {\n invalidateQueries: [\n ['session'],\n ['users'],\n ['organizations'],\n ['projects'],\n ['dictionaries'],\n ['tags'],\n ],\n },\n });\n};\n\nexport const useChangePassword = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['changePassword'],\n mutationFn: (\n ...args: Parameters<\n ReturnType<typeof getAuthAPI>['changePasswordSession']\n >\n ) => intlayerAuth.changePasswordSession(...args),\n });\n};\n\nexport const useAskResetPassword = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['askResetPassword'],\n mutationFn: (\n ...args: Parameters<\n ReturnType<typeof getAuthAPI>['requestPasswordResetSession']\n >\n ) => intlayerAuth.requestPasswordResetSession(...args),\n });\n};\n\nexport const useResetPassword = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['resetPassword'],\n mutationFn: (\n ...args: Parameters<ReturnType<typeof getAuthAPI>['resetPassword']>\n ) => intlayerAuth.resetPassword(...args),\n });\n};\n\nexport const useVerifyEmail = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['verifyEmail'],\n mutationFn: (\n ...args: Parameters<ReturnType<typeof getAuthAPI>['verifyEmailSession']>\n ) => intlayerAuth.verifyEmailSession(...args),\n });\n};\n\nexport const useGetUserByAccount = () => {\n const intlayerAuth = useIntlayerAuth();\n\n return useMutation({\n mutationKey: ['user'],\n mutationFn: (\n ...args: Parameters<ReturnType<typeof getAuthAPI>['accountInfo']>\n ) => intlayerAuth.accountInfo(...args),\n });\n};\n\n/**\n * User\n */\n\nexport const useGetUsers = (\n filters?: GetUsersParams,\n options?: UseQueryOptions\n) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useAppQuery({\n queryKey: ['users', filters],\n queryFn: () => intlayerOAuth.user.getUsers(filters),\n requireUser: true,\n ...options,\n });\n};\n\nexport const useCreateUser = () => {\n const intlayerAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['users'],\n mutationFn: intlayerAuth.user.updateUser,\n });\n};\n\nexport const useUpdateUser = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['users'],\n mutationFn: intlayerOAuth.user.updateUser,\n });\n};\n\nexport const useDeleteUser = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['users'],\n mutationFn: intlayerOAuth.user.deleteUser,\n });\n};\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = (filters?: GetOrganizationsParams) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useAppQuery({\n queryKey: ['organizations', filters],\n queryFn: ({ signal }) =>\n intlayerOAuth.organization.getOrganizations(filters, { signal }),\n requireUser: true,\n });\n};\n\nexport const useAddOrganization = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['organizations'],\n mutationFn: intlayerOAuth.organization.addOrganization,\n });\n};\n\nexport const useUpdateOrganization = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['organizations'],\n mutationFn: intlayerOAuth.organization.updateOrganization,\n });\n};\n\nexport const useUpdateOrganizationMembers = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['organizations'],\n mutationFn: intlayerOAuth.organization.updateOrganizationMembers,\n meta: {\n invalidateQueries: [['organizations'], ['users']],\n },\n });\n};\n\nexport const useAddOrganizationMember = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['organizations'],\n mutationFn: intlayerOAuth.organization.addOrganizationMember,\n meta: {\n invalidateQueries: [['organizations']],\n },\n });\n};\n\nexport const useDeleteOrganization = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['organizations'],\n mutationFn: intlayerOAuth.organization.deleteOrganization,\n meta: {\n invalidateQueries: [['organizations']],\n },\n });\n};\n\nexport const useSelectOrganization = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['session-organizations'],\n mutationFn: intlayerOAuth.organization.selectOrganization,\n meta: {\n invalidateQueries: [\n ['session'],\n ['organizations'],\n ['projects'],\n ['dictionaries'],\n ['tags'],\n ['subscription'],\n ['users'],\n ],\n },\n });\n};\n\nexport const useUnselectOrganization = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['session-organizations'],\n mutationFn: intlayerOAuth.organization.unselectOrganization,\n meta: {\n invalidateQueries: [\n ['session'],\n ['organizations'],\n ['projects'],\n ['dictionaries'],\n ['tags'],\n ['subscription'],\n ['users'],\n ],\n },\n });\n};\n\n/**\n * Project\n */\n\nexport const useGetProjects = (filters?: GetProjectsParams) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useAppQuery({\n queryKey: ['projects', filters],\n queryFn: ({ signal }) =>\n intlayerOAuth.project.getProjects(filters, { signal }),\n requireUser: true,\n requireOrganization: true,\n });\n};\n\nexport const useAddProject = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['projects'],\n mutationFn: intlayerOAuth.project.addProject,\n meta: {\n invalidateQueries: [['projects']],\n },\n });\n};\n\nexport const useUpdateProject = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['projects'],\n mutationFn: intlayerOAuth.project.updateProject,\n meta: {\n invalidateQueries: [['projects']],\n },\n });\n};\n\nexport const useUpdateProjectMembers = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['projects'],\n mutationFn: intlayerOAuth.project.updateProjectMembers,\n meta: {\n invalidateQueries: [['projects']],\n },\n });\n};\n\nexport const useDeleteProject = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['projects'],\n mutationFn: intlayerOAuth.project.deleteProject,\n meta: {\n invalidateQueries: [['projects']],\n },\n });\n};\n\nexport const useSelectProject = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['session-projects'],\n mutationFn: intlayerOAuth.project.selectProject,\n meta: {\n invalidateQueries: [\n ['projects'],\n ['dictionaries'],\n ['tags'],\n ['subscription'],\n ['users'],\n ['session'],\n ],\n },\n });\n};\n\nexport const useUnselectProject = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['session-projects'],\n mutationFn: intlayerOAuth.project.unselectProject,\n meta: {\n invalidateQueries: [\n ['projects'],\n ['dictionaries'],\n ['tags'],\n ['subscription'],\n ['users'],\n ['session'],\n ],\n },\n });\n};\n\nexport const useAddNewAccessKey = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['projects'],\n mutationFn: intlayerOAuth.project.addNewAccessKey,\n meta: {\n invalidateQueries: [['projects']],\n },\n });\n};\n\nexport const useDeleteAccessKey = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['projects'],\n mutationFn: intlayerOAuth.project.deleteAccessKey,\n meta: {\n invalidateQueries: [['projects']],\n },\n });\n};\n\nexport const useRefreshAccessKey = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['projects'],\n mutationFn: intlayerOAuth.project.refreshAccessKey,\n meta: {\n invalidateQueries: [['projects']],\n },\n });\n};\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = (filters?: GetDictionariesParams) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useAppQuery({\n queryKey: ['dictionaries', filters],\n queryFn: ({ signal }) =>\n intlayerOAuth.dictionary.getDictionaries(filters, { signal }),\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n};\n\nexport const useGetDictionariesKeys = (\n options?: Partial<UseQueryOptions<GetDictionariesKeysResult>>\n) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useAppQuery({\n queryKey: ['dictionariesKeys', options],\n queryFn: intlayerOAuth.dictionary.getDictionariesKeys,\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n ...options,\n });\n};\n\nexport const useGetDictionary = (\n dictionaryKey: GetDictionaryParams['dictionaryKey'],\n version?: GetDictionaryQuery['version']\n) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useAppQuery({\n queryKey: ['dictionary', dictionaryKey],\n queryFn: ({ signal }) =>\n intlayerOAuth.dictionary.getDictionary(dictionaryKey, version, {\n signal,\n }),\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n};\n\nexport const useAddDictionary = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['dictionaries'],\n mutationFn: intlayerOAuth.dictionary.addDictionary,\n meta: {\n invalidateQueries: [['dictionaries'], ['dictionariesKeys']],\n },\n });\n};\n\nexport const usePushDictionaries = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['dictionaries'],\n mutationFn: intlayerOAuth.dictionary.pushDictionaries,\n meta: {\n invalidateQueries: [['dictionaries'], ['dictionariesKeys']],\n },\n });\n};\n\nexport const useUpdateDictionary = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['dictionaries'],\n mutationFn: intlayerOAuth.dictionary.updateDictionary,\n meta: {\n invalidateQueries: [['dictionaries'], ['dictionariesKeys']],\n },\n });\n};\n\nexport const useDeleteDictionary = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['dictionaries'],\n mutationFn: intlayerOAuth.dictionary.deleteDictionary,\n meta: {\n invalidateQueries: [['dictionaries'], ['dictionariesKeys']],\n },\n });\n};\n\n/**\n * Tag\n */\n\nexport const useGetTags = (filters?: GetTagsParams) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useAppQuery({\n queryKey: ['tags', filters],\n queryFn: ({ signal }) => intlayerOAuth.tag.getTags(filters, { signal }),\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n};\n\nexport const useAddTag = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['tags'],\n mutationFn: intlayerOAuth.tag.addTag,\n meta: {\n invalidateQueries: [['tags']],\n },\n });\n};\n\nexport const useUpdateTag = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['tags'],\n mutationFn: (v: { tagId: string; tag: any }) =>\n intlayerOAuth.tag.updateTag(v.tagId, v.tag),\n meta: {\n invalidateQueries: [['tags']],\n },\n });\n};\n\nexport const useDeleteTag = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['tags'],\n mutationFn: intlayerOAuth.tag.deleteTag,\n meta: {\n invalidateQueries: [['tags']],\n },\n });\n};\n\n/**\n * Stripe\n */\n\nexport const useGetPricing = (\n body: GetPricingBody,\n options?: Partial<UseQueryOptions<GetPricingResult>>\n) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useQuery({\n queryKey: ['pricing', body],\n queryFn: ({ signal }) => intlayerOAuth.stripe.getPricing(body, { signal }),\n ...options,\n });\n};\n\nexport const useGetSubscription = (body: GetCheckoutSessionBody) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useAppQuery({\n queryKey: ['subscription', body],\n queryFn: ({ signal }) =>\n intlayerOAuth.stripe.getSubscription(body, { signal }),\n requireUser: true,\n requireOrganization: true,\n });\n};\n\nexport const useCancelSubscription = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['subscription'],\n mutationFn: intlayerOAuth.stripe.cancelSubscription,\n meta: {\n invalidateQueries: [['session'], ['subscription']],\n },\n });\n};\n\n/**\n * AI\n */\n\nexport const useTranslateJSONDeclaration = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['ai-translateJSON'],\n mutationFn: intlayerOAuth.ai.translateJSON,\n });\n};\n\nexport const useAuditContentDeclaration = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['ai-auditContentDeclaration'],\n mutationFn: intlayerOAuth.ai.auditContentDeclaration,\n });\n};\n\nexport const useAuditContentDeclarationMetadata = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['ai-auditContentDeclarationMetadata'],\n mutationFn: intlayerOAuth.ai.auditContentDeclarationMetadata,\n });\n};\n\nexport const useAuditContentDeclarationField = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['ai-auditContentDeclarationField'],\n mutationFn: intlayerOAuth.ai.auditContentDeclarationField,\n });\n};\n\nexport const useAuditTag = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['ai-auditTag'],\n mutationFn: intlayerOAuth.ai.auditTag,\n });\n};\n\nexport const useAskDocQuestion = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: [],\n mutationFn: intlayerOAuth.ai.askDocQuestion,\n });\n};\n\nexport const useAutocomplete = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['ai-autocomplete'],\n mutationFn: intlayerOAuth.ai.autocomplete,\n });\n};\n\n/**\n * Search\n */\n\nexport const useSearchDoc = (params?: SearchDocUtilParams) => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useQuery({\n queryKey: ['search', params],\n queryFn: () => intlayerOAuth.search.searchDoc(params),\n });\n};\n\n/**\n * Newsletter\n */\n\nexport const useSubscribeToNewsletter = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['newsletter'],\n mutationFn: intlayerOAuth.newsletter.subscribeToNewsletter,\n });\n};\n\nexport const useUnsubscribeFromNewsletter = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['newsletter'],\n mutationFn: intlayerOAuth.newsletter.unsubscribeFromNewsletter,\n });\n};\n\nexport const useGetNewsletterStatus = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['newsletter'],\n mutationFn: intlayerOAuth.newsletter.getNewsletterStatus,\n });\n};\n\n/**\n * Editor\n */\n\nexport const useGetEditorDictionaries = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useQuery({\n queryKey: ['editor', 'dictionaries'],\n queryFn: intlayerOAuth.editor.getDictionaries,\n });\n};\n\nexport const useWriteDictionary = () => {\n const intlayerOAuth = useIntlayerOAuth();\n\n return useMutation({\n mutationKey: ['editor', 'dictionaries'],\n mutationFn: intlayerOAuth.editor.writeDictionary,\n });\n};\n"],"names":[],"mappings":";;;;;;;;;AAwCA,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AACF,MAAyB;AACvB,QAAM,gBAAgB,iBAAA;AACtB,QAAM,EAAE,mBAAmB,QAAA,IAAY,QAAQ;AAAA,IAC7C,uBAAuB;AAAA,EAAA,CACxB;AAED,QAAM,OAAO,UAAU,QAAQ,OAAO,mBAAmB;AAEzD,QAAM,eAAe,UACjB,QAAQ,eACR,mBAAmB;AAEvB,QAAM,UAAU,UAAU,QAAQ,UAAU,mBAAmB;AAE/D,QAAM,gBAAgB,cAAc,QAAQ,IAAI,IAAI;AAEpD,QAAM,mBAAmB,iBAAiB,QAAQ,OAAO,IAAI;AAE7D,QAAM,wBAAwB,sBAC1B,QAAQ,YAAY,IACpB;AAEJ,QAAM,YAAY,iBAAiB,oBAAoB;AAEvD,SAAO;AAAA,IACL,QAAQ;AAAA,EAAA;AAEZ;AAEO,MAAM,cAAc,CAMzB,YAKkC;AAClC,QAAM,EAAE,aAAa,gBAAgB,qBAAqB,GAAG,SAAS;AACtE,QAAM,EAAE,OAAA,IAAW,cAAc;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,QAAM,SAAS,SAAS;AAAA,IACtB,GAAG;AAAA,IACH,SAAU,KAAa,YAAY,QAAQ,QAAQ;AAAA,EAAA,CAC7C;AAER,SAAO;AACT;AAQO,MAAM,WAAW,MAAM;AAC5B,QAAM,eAAe,gBAAA;AAErB,SAAO,YAAY;AAAA,IACjB,aAAa,CAAC,OAAO;AAAA,IACrB,YAAY,IACP,SACA,aAAa,YAAY,GAAG,IAAI;AAAA,IACrC,MAAM;AAAA,MACJ,mBAAmB,CAAC,CAAC,SAAS,CAAC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;AAAA,IACjB,aAAa,CAAC,YAAY;AAAA,IAC1B,YAAY,cAAc,WAAW;AAAA,EAAA,CACtC;AACH;AAMO,MAAM,2BAA2B,MAAM;AAC5C,QAAM,gBAAgB,iBAAA;AAEtB,SAAO,SAAS;AAAA,IACd,UAAU,CAAC,UAAU,cAAc;AAAA,IACnC,SAAS,cAAc,OAAO;AAAA,EAAA,CAC/B;AACH;AAEO,MAAM,qBAAqB,MAAM;AACtC,QAAM,gBAAgB,iBAAA;AAEtB,SAAO,YAAY;AAAA,IACjB,aAAa,CAAC,UAAU,cAAc;AAAA,IACtC,YAAY,cAAc,OAAO;AAAA,EAAA,CAClC;AACH;"}
|
|
@@ -4,20 +4,23 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const api = require("@intlayer/api");
|
|
5
5
|
const configuration = require("@intlayer/config/built");
|
|
6
6
|
const editorReact = require("@intlayer/editor-react");
|
|
7
|
-
const
|
|
7
|
+
const reactQuery = require("@tanstack/react-query");
|
|
8
8
|
const useOAuth2 = (intlayerConfiguration) => {
|
|
9
9
|
const configuration$1 = editorReact.useConfiguration();
|
|
10
10
|
const config = intlayerConfiguration ?? configuration$1 ?? configuration;
|
|
11
11
|
const intlayerAPI = api.getOAuthAPI(config);
|
|
12
|
-
const { data } =
|
|
13
|
-
"
|
|
14
|
-
intlayerAPI.getOAuth2AccessToken,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
const { data } = reactQuery.useQuery({
|
|
13
|
+
queryKey: ["oAuth2AccessToken"],
|
|
14
|
+
queryFn: intlayerAPI.getOAuth2AccessToken,
|
|
15
|
+
enabled: !!(config.editor.clientId && config.editor.clientSecret),
|
|
16
|
+
staleTime: 0,
|
|
17
|
+
gcTime: 0,
|
|
18
|
+
refetchOnWindowFocus: false,
|
|
19
|
+
refetchOnMount: false,
|
|
20
|
+
refetchOnReconnect: false,
|
|
21
|
+
refetchInterval: false,
|
|
22
|
+
refetchIntervalInBackground: false
|
|
23
|
+
});
|
|
21
24
|
const oAuth2AccessToken = data?.data;
|
|
22
25
|
return {
|
|
23
26
|
oAuth2AccessToken
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOAuth2.cjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getOAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport {
|
|
1
|
+
{"version":3,"file":"useOAuth2.cjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getOAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getOAuthAPI(config);\n\n const { data } = useQuery({\n queryKey: ['oAuth2AccessToken'],\n queryFn: intlayerAPI.getOAuth2AccessToken,\n enabled: !!(config.editor.clientId && config.editor.clientSecret),\n staleTime: 0,\n gcTime: 0,\n refetchOnWindowFocus: false,\n refetchOnMount: false,\n refetchOnReconnect: false,\n refetchInterval: false,\n refetchIntervalInBackground: false,\n });\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":["configuration","useConfiguration","defaultConfiguration","getOAuthAPI","useQuery"],"mappings":";;;;;;;AAQO,MAAM,YAAY,CAAC,0BAA2C;AACnE,QAAMA,kBAAgBC,YAAAA,iBAAA;AACtB,QAAM,SAAS,yBAAyBD,mBAAiBE;AACzD,QAAM,cAAcC,IAAAA,YAAY,MAAM;AAEtC,QAAM,EAAE,KAAA,IAASC,oBAAS;AAAA,IACxB,UAAU,CAAC,mBAAmB;AAAA,IAC9B,SAAS,YAAY;AAAA,IACrB,SAAS,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;AAAA,IACpD,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,sBAAsB;AAAA,IACtB,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,IACpB,iBAAiB;AAAA,IACjB,6BAA6B;AAAA,EAAA,CAC9B;AAED,QAAM,oBAAoB,MAAM;AAEhC,SAAO;AAAA,IACL;AAAA,EAAA;AAEJ;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
2
2
|
export declare const useOAuth2: (intlayerConfiguration?: IntlayerConfig) => {
|
|
3
|
-
oAuth2AccessToken:
|
|
3
|
+
oAuth2AccessToken: any;
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=useOAuth2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOAuth2.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,eAAO,MAAM,SAAS,GAAI,wBAAwB,cAAc;;
|
|
1
|
+
{"version":3,"file":"useOAuth2.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,eAAO,MAAM,SAAS,GAAI,wBAAwB,cAAc;;CAuB/D,CAAC"}
|
|
@@ -2,20 +2,23 @@
|
|
|
2
2
|
import { getOAuthAPI } from "@intlayer/api";
|
|
3
3
|
import configuration from "@intlayer/config/built";
|
|
4
4
|
import { useConfiguration } from "@intlayer/editor-react";
|
|
5
|
-
import {
|
|
5
|
+
import { useQuery } from "@tanstack/react-query";
|
|
6
6
|
const useOAuth2 = (intlayerConfiguration) => {
|
|
7
7
|
const configuration$1 = useConfiguration();
|
|
8
8
|
const config = intlayerConfiguration ?? configuration$1 ?? configuration;
|
|
9
9
|
const intlayerAPI = getOAuthAPI(config);
|
|
10
|
-
const { data } =
|
|
11
|
-
"
|
|
12
|
-
intlayerAPI.getOAuth2AccessToken,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
const { data } = useQuery({
|
|
11
|
+
queryKey: ["oAuth2AccessToken"],
|
|
12
|
+
queryFn: intlayerAPI.getOAuth2AccessToken,
|
|
13
|
+
enabled: !!(config.editor.clientId && config.editor.clientSecret),
|
|
14
|
+
staleTime: 0,
|
|
15
|
+
gcTime: 0,
|
|
16
|
+
refetchOnWindowFocus: false,
|
|
17
|
+
refetchOnMount: false,
|
|
18
|
+
refetchOnReconnect: false,
|
|
19
|
+
refetchInterval: false,
|
|
20
|
+
refetchIntervalInBackground: false
|
|
21
|
+
});
|
|
19
22
|
const oAuth2AccessToken = data?.data;
|
|
20
23
|
return {
|
|
21
24
|
oAuth2AccessToken
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOAuth2.mjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getOAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport {
|
|
1
|
+
{"version":3,"file":"useOAuth2.mjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getOAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getOAuthAPI(config);\n\n const { data } = useQuery({\n queryKey: ['oAuth2AccessToken'],\n queryFn: intlayerAPI.getOAuth2AccessToken,\n enabled: !!(config.editor.clientId && config.editor.clientSecret),\n staleTime: 0,\n gcTime: 0,\n refetchOnWindowFocus: false,\n refetchOnMount: false,\n refetchOnReconnect: false,\n refetchInterval: false,\n refetchIntervalInBackground: false,\n });\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":["configuration","defaultConfiguration"],"mappings":";;;;;AAQO,MAAM,YAAY,CAAC,0BAA2C;AACnE,QAAMA,kBAAgB,iBAAA;AACtB,QAAM,SAAS,yBAAyBA,mBAAiBC;AACzD,QAAM,cAAc,YAAY,MAAM;AAEtC,QAAM,EAAE,KAAA,IAAS,SAAS;AAAA,IACxB,UAAU,CAAC,mBAAmB;AAAA,IAC9B,SAAS,YAAY;AAAA,IACrB,SAAS,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;AAAA,IACpD,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,sBAAsB;AAAA,IACtB,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,IACpB,iBAAiB;AAAA,IACjB,6BAA6B;AAAA,EAAA,CAC9B;AAED,QAAM,oBAAoB,MAAM;AAEhC,SAAO;AAAA,IACL;AAAA,EAAA;AAEJ;"}
|
|
@@ -3,43 +3,40 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const configuration = require("@intlayer/config/built");
|
|
5
5
|
const editorReact = require("@intlayer/editor-react");
|
|
6
|
+
const reactQuery = require("@tanstack/react-query");
|
|
6
7
|
const hooks_auth = require("../auth.cjs");
|
|
7
|
-
|
|
8
|
-
require("../useAsync/useAsyncStateStore.cjs");
|
|
8
|
+
require("@intlayer/api");
|
|
9
9
|
const useSession = (sessionProp, intlayerConfiguration) => {
|
|
10
10
|
const configuration$1 = editorReact.useConfiguration();
|
|
11
11
|
const config = intlayerConfiguration ?? configuration$1 ?? configuration;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
setData: setSession,
|
|
17
|
-
isFetched
|
|
18
|
-
} = hooks_useAsync_useAsync.useAsync(
|
|
19
|
-
"getSession",
|
|
20
|
-
async () => {
|
|
12
|
+
const queryClient = reactQuery.useQueryClient();
|
|
13
|
+
const { data, isFetched, refetch } = reactQuery.useQuery({
|
|
14
|
+
queryKey: ["session"],
|
|
15
|
+
queryFn: async () => {
|
|
21
16
|
const intlayerAPI = hooks_auth.getAuthAPI(config);
|
|
22
17
|
const result = await intlayerAPI.getSession();
|
|
23
18
|
return result.data;
|
|
24
19
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"getDictionaries"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
);
|
|
20
|
+
staleTime: 0,
|
|
21
|
+
gcTime: 0,
|
|
22
|
+
enabled: !sessionProp,
|
|
23
|
+
refetchOnWindowFocus: false,
|
|
24
|
+
refetchOnMount: false,
|
|
25
|
+
refetchOnReconnect: false,
|
|
26
|
+
refetchInterval: false,
|
|
27
|
+
refetchIntervalInBackground: false
|
|
28
|
+
});
|
|
38
29
|
const session = data ?? (isFetched ? null : void 0);
|
|
30
|
+
const setSession = (nextSession) => queryClient.setQueryData(["session"], nextSession);
|
|
31
|
+
const fetchSession = async () => {
|
|
32
|
+
const res = await refetch();
|
|
33
|
+
return res.data;
|
|
34
|
+
};
|
|
35
|
+
const revalidateSession = fetchSession;
|
|
39
36
|
return {
|
|
40
37
|
session,
|
|
41
|
-
fetchSession
|
|
42
|
-
revalidateSession
|
|
38
|
+
fetchSession,
|
|
39
|
+
revalidateSession,
|
|
43
40
|
setSession
|
|
44
41
|
};
|
|
45
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSession.cjs","sources":["../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport type { SessionAPI } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { getAuthAPI } from '../auth';\nimport {
|
|
1
|
+
{"version":3,"file":"useSession.cjs","sources":["../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport type { SessionAPI } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useQuery } from '@tanstack/react-query';\nimport { getAuthAPI } from '../auth';\nimport { useQueryClient } from '../reactQuery';\n\nexport const useSession = (\n sessionProp?: SessionAPI | null,\n intlayerConfiguration?: IntlayerConfig\n) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n\n const queryClient = useQueryClient();\n\n const { data, isFetched, refetch } = useQuery({\n queryKey: ['session'],\n queryFn: async () => {\n const intlayerAPI = getAuthAPI(config);\n const result = await intlayerAPI.getSession();\n return result.data as unknown as SessionAPI;\n },\n staleTime: 0,\n gcTime: 0,\n enabled: !sessionProp,\n refetchOnWindowFocus: false,\n refetchOnMount: false,\n refetchOnReconnect: false,\n refetchInterval: false,\n refetchIntervalInBackground: false,\n });\n\n const session = data ?? (isFetched ? null : undefined);\n\n const setSession = (nextSession: SessionAPI | null) =>\n queryClient.setQueryData(['session'], nextSession);\n\n const fetchSession = async (): Promise<SessionAPI | null | undefined> => {\n const res = await refetch();\n return res.data as SessionAPI | null | undefined;\n };\n\n const revalidateSession = fetchSession;\n\n return {\n session,\n fetchSession,\n revalidateSession,\n setSession,\n };\n};\n"],"names":["configuration","useConfiguration","defaultConfiguration","useQueryClient","useQuery","getAuthAPI"],"mappings":";;;;;;;;AAUO,MAAM,aAAa,CACxB,aACA,0BACG;AACH,QAAMA,kBAAgBC,YAAAA,iBAAA;AACtB,QAAM,SAAS,yBAAyBD,mBAAiBE;AAEzD,QAAM,cAAcC,WAAAA,eAAA;AAEpB,QAAM,EAAE,MAAM,WAAW,QAAA,IAAYC,WAAAA,SAAS;AAAA,IAC5C,UAAU,CAAC,SAAS;AAAA,IACpB,SAAS,YAAY;AACnB,YAAM,cAAcC,WAAAA,WAAW,MAAM;AACrC,YAAM,SAAS,MAAM,YAAY,WAAA;AACjC,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC;AAAA,IACV,sBAAsB;AAAA,IACtB,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,IACpB,iBAAiB;AAAA,IACjB,6BAA6B;AAAA,EAAA,CAC9B;AAED,QAAM,UAAU,SAAS,YAAY,OAAO;AAE5C,QAAM,aAAa,CAAC,gBAClB,YAAY,aAAa,CAAC,SAAS,GAAG,WAAW;AAEnD,QAAM,eAAe,YAAoD;AACvE,UAAM,MAAM,MAAM,QAAA;AAClB,WAAO,IAAI;AAAA,EACb;AAEA,QAAM,oBAAoB;AAE1B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;;"}
|
|
@@ -1,357 +1,9 @@
|
|
|
1
1
|
import { SessionAPI } from '@intlayer/backend';
|
|
2
2
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
3
3
|
export declare const useSession: (sessionProp?: SessionAPI | null, intlayerConfiguration?: IntlayerConfig) => {
|
|
4
|
-
session:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
createdAt: Date;
|
|
9
|
-
updatedAt: Date;
|
|
10
|
-
token: string;
|
|
11
|
-
ipAddress?: string | null | undefined;
|
|
12
|
-
userAgent?: string | null | undefined;
|
|
13
|
-
id: string;
|
|
14
|
-
activeOrganizationId?: string | undefined;
|
|
15
|
-
activeProjectId?: string | undefined;
|
|
16
|
-
};
|
|
17
|
-
user: {
|
|
18
|
-
email: string;
|
|
19
|
-
name: string;
|
|
20
|
-
image?: string | null | undefined;
|
|
21
|
-
createdAt: Date;
|
|
22
|
-
updatedAt: Date;
|
|
23
|
-
emailVerified: boolean;
|
|
24
|
-
phone?: string | undefined;
|
|
25
|
-
dateOfBirth?: Date | undefined;
|
|
26
|
-
id: string;
|
|
27
|
-
emailsList?: {
|
|
28
|
-
newsLetter: boolean;
|
|
29
|
-
} | undefined;
|
|
30
|
-
customerId?: string | undefined;
|
|
31
|
-
role?: string | undefined;
|
|
32
|
-
lang?: string | undefined;
|
|
33
|
-
};
|
|
34
|
-
organization?: {
|
|
35
|
-
name: string;
|
|
36
|
-
membersIds: string[];
|
|
37
|
-
adminsIds: string[];
|
|
38
|
-
id: string;
|
|
39
|
-
creatorId: string;
|
|
40
|
-
plan?: {
|
|
41
|
-
type: import('@intlayer/backend').PlanType;
|
|
42
|
-
creatorId?: string | undefined;
|
|
43
|
-
subscriptionId?: string | undefined;
|
|
44
|
-
customerId?: string | undefined;
|
|
45
|
-
priceId?: string | undefined;
|
|
46
|
-
status?: "active" | "canceled" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | undefined;
|
|
47
|
-
period?: "MONTHLY" | "YEARLY" | undefined;
|
|
48
|
-
id: string;
|
|
49
|
-
createdAt: number;
|
|
50
|
-
updatedAt: number;
|
|
51
|
-
} | undefined;
|
|
52
|
-
createdAt: number;
|
|
53
|
-
updatedAt: number;
|
|
54
|
-
} | null | undefined;
|
|
55
|
-
project?: {
|
|
56
|
-
organizationId: string;
|
|
57
|
-
name: string;
|
|
58
|
-
membersIds: string[];
|
|
59
|
-
adminsIds: string[];
|
|
60
|
-
creatorId: string;
|
|
61
|
-
configuration?: {
|
|
62
|
-
internationalization: {
|
|
63
|
-
locales: import('intlayer').Locales[];
|
|
64
|
-
defaultLocale: import('intlayer').Locales;
|
|
65
|
-
};
|
|
66
|
-
editor: {
|
|
67
|
-
applicationURL: string;
|
|
68
|
-
cmsURL: string;
|
|
69
|
-
};
|
|
70
|
-
} | undefined;
|
|
71
|
-
id: string;
|
|
72
|
-
createdAt: number;
|
|
73
|
-
updatedAt: number;
|
|
74
|
-
oAuth2Access: {
|
|
75
|
-
name: string;
|
|
76
|
-
grants: string[];
|
|
77
|
-
expiresAt?: Date | undefined;
|
|
78
|
-
clientId: string;
|
|
79
|
-
clientSecret: string;
|
|
80
|
-
accessToken: string[];
|
|
81
|
-
userId: string;
|
|
82
|
-
id: string;
|
|
83
|
-
createdAt: number;
|
|
84
|
-
updatedAt: number;
|
|
85
|
-
}[];
|
|
86
|
-
} | null | undefined;
|
|
87
|
-
id: string;
|
|
88
|
-
permissions: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Permission[];
|
|
89
|
-
roles: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Roles[];
|
|
90
|
-
authType: "session" | "oauth2" | null;
|
|
91
|
-
} | null | undefined;
|
|
92
|
-
fetchSession: () => Promise<{
|
|
93
|
-
session: {
|
|
94
|
-
userId: string;
|
|
95
|
-
expiresAt: Date;
|
|
96
|
-
createdAt: Date;
|
|
97
|
-
updatedAt: Date;
|
|
98
|
-
token: string;
|
|
99
|
-
ipAddress?: string | null | undefined;
|
|
100
|
-
userAgent?: string | null | undefined;
|
|
101
|
-
id: string;
|
|
102
|
-
activeOrganizationId?: string | undefined;
|
|
103
|
-
activeProjectId?: string | undefined;
|
|
104
|
-
};
|
|
105
|
-
user: {
|
|
106
|
-
email: string;
|
|
107
|
-
name: string;
|
|
108
|
-
image?: string | null | undefined;
|
|
109
|
-
createdAt: Date;
|
|
110
|
-
updatedAt: Date;
|
|
111
|
-
emailVerified: boolean;
|
|
112
|
-
phone?: string | undefined;
|
|
113
|
-
dateOfBirth?: Date | undefined;
|
|
114
|
-
id: string;
|
|
115
|
-
emailsList?: {
|
|
116
|
-
newsLetter: boolean;
|
|
117
|
-
} | undefined;
|
|
118
|
-
customerId?: string | undefined;
|
|
119
|
-
role?: string | undefined;
|
|
120
|
-
lang?: string | undefined;
|
|
121
|
-
};
|
|
122
|
-
organization?: {
|
|
123
|
-
name: string;
|
|
124
|
-
membersIds: string[];
|
|
125
|
-
adminsIds: string[];
|
|
126
|
-
id: string;
|
|
127
|
-
creatorId: string;
|
|
128
|
-
plan?: {
|
|
129
|
-
type: import('@intlayer/backend').PlanType;
|
|
130
|
-
creatorId?: string | undefined;
|
|
131
|
-
subscriptionId?: string | undefined;
|
|
132
|
-
customerId?: string | undefined;
|
|
133
|
-
priceId?: string | undefined;
|
|
134
|
-
status?: "active" | "canceled" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | undefined;
|
|
135
|
-
period?: "MONTHLY" | "YEARLY" | undefined;
|
|
136
|
-
id: string;
|
|
137
|
-
createdAt: number;
|
|
138
|
-
updatedAt: number;
|
|
139
|
-
} | undefined;
|
|
140
|
-
createdAt: number;
|
|
141
|
-
updatedAt: number;
|
|
142
|
-
} | null | undefined;
|
|
143
|
-
project?: {
|
|
144
|
-
organizationId: string;
|
|
145
|
-
name: string;
|
|
146
|
-
membersIds: string[];
|
|
147
|
-
adminsIds: string[];
|
|
148
|
-
creatorId: string;
|
|
149
|
-
configuration?: {
|
|
150
|
-
internationalization: {
|
|
151
|
-
locales: import('intlayer').Locales[];
|
|
152
|
-
defaultLocale: import('intlayer').Locales;
|
|
153
|
-
};
|
|
154
|
-
editor: {
|
|
155
|
-
applicationURL: string;
|
|
156
|
-
cmsURL: string;
|
|
157
|
-
};
|
|
158
|
-
} | undefined;
|
|
159
|
-
id: string;
|
|
160
|
-
createdAt: number;
|
|
161
|
-
updatedAt: number;
|
|
162
|
-
oAuth2Access: {
|
|
163
|
-
name: string;
|
|
164
|
-
grants: string[];
|
|
165
|
-
expiresAt?: Date | undefined;
|
|
166
|
-
clientId: string;
|
|
167
|
-
clientSecret: string;
|
|
168
|
-
accessToken: string[];
|
|
169
|
-
userId: string;
|
|
170
|
-
id: string;
|
|
171
|
-
createdAt: number;
|
|
172
|
-
updatedAt: number;
|
|
173
|
-
}[];
|
|
174
|
-
} | null | undefined;
|
|
175
|
-
id: string;
|
|
176
|
-
permissions: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Permission[];
|
|
177
|
-
roles: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Roles[];
|
|
178
|
-
authType: "session" | "oauth2" | null;
|
|
179
|
-
}>;
|
|
180
|
-
revalidateSession: () => Promise<{
|
|
181
|
-
session: {
|
|
182
|
-
userId: string;
|
|
183
|
-
expiresAt: Date;
|
|
184
|
-
createdAt: Date;
|
|
185
|
-
updatedAt: Date;
|
|
186
|
-
token: string;
|
|
187
|
-
ipAddress?: string | null | undefined;
|
|
188
|
-
userAgent?: string | null | undefined;
|
|
189
|
-
id: string;
|
|
190
|
-
activeOrganizationId?: string | undefined;
|
|
191
|
-
activeProjectId?: string | undefined;
|
|
192
|
-
};
|
|
193
|
-
user: {
|
|
194
|
-
email: string;
|
|
195
|
-
name: string;
|
|
196
|
-
image?: string | null | undefined;
|
|
197
|
-
createdAt: Date;
|
|
198
|
-
updatedAt: Date;
|
|
199
|
-
emailVerified: boolean;
|
|
200
|
-
phone?: string | undefined;
|
|
201
|
-
dateOfBirth?: Date | undefined;
|
|
202
|
-
id: string;
|
|
203
|
-
emailsList?: {
|
|
204
|
-
newsLetter: boolean;
|
|
205
|
-
} | undefined;
|
|
206
|
-
customerId?: string | undefined;
|
|
207
|
-
role?: string | undefined;
|
|
208
|
-
lang?: string | undefined;
|
|
209
|
-
};
|
|
210
|
-
organization?: {
|
|
211
|
-
name: string;
|
|
212
|
-
membersIds: string[];
|
|
213
|
-
adminsIds: string[];
|
|
214
|
-
id: string;
|
|
215
|
-
creatorId: string;
|
|
216
|
-
plan?: {
|
|
217
|
-
type: import('@intlayer/backend').PlanType;
|
|
218
|
-
creatorId?: string | undefined;
|
|
219
|
-
subscriptionId?: string | undefined;
|
|
220
|
-
customerId?: string | undefined;
|
|
221
|
-
priceId?: string | undefined;
|
|
222
|
-
status?: "active" | "canceled" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | undefined;
|
|
223
|
-
period?: "MONTHLY" | "YEARLY" | undefined;
|
|
224
|
-
id: string;
|
|
225
|
-
createdAt: number;
|
|
226
|
-
updatedAt: number;
|
|
227
|
-
} | undefined;
|
|
228
|
-
createdAt: number;
|
|
229
|
-
updatedAt: number;
|
|
230
|
-
} | null | undefined;
|
|
231
|
-
project?: {
|
|
232
|
-
organizationId: string;
|
|
233
|
-
name: string;
|
|
234
|
-
membersIds: string[];
|
|
235
|
-
adminsIds: string[];
|
|
236
|
-
creatorId: string;
|
|
237
|
-
configuration?: {
|
|
238
|
-
internationalization: {
|
|
239
|
-
locales: import('intlayer').Locales[];
|
|
240
|
-
defaultLocale: import('intlayer').Locales;
|
|
241
|
-
};
|
|
242
|
-
editor: {
|
|
243
|
-
applicationURL: string;
|
|
244
|
-
cmsURL: string;
|
|
245
|
-
};
|
|
246
|
-
} | undefined;
|
|
247
|
-
id: string;
|
|
248
|
-
createdAt: number;
|
|
249
|
-
updatedAt: number;
|
|
250
|
-
oAuth2Access: {
|
|
251
|
-
name: string;
|
|
252
|
-
grants: string[];
|
|
253
|
-
expiresAt?: Date | undefined;
|
|
254
|
-
clientId: string;
|
|
255
|
-
clientSecret: string;
|
|
256
|
-
accessToken: string[];
|
|
257
|
-
userId: string;
|
|
258
|
-
id: string;
|
|
259
|
-
createdAt: number;
|
|
260
|
-
updatedAt: number;
|
|
261
|
-
}[];
|
|
262
|
-
} | null | undefined;
|
|
263
|
-
id: string;
|
|
264
|
-
permissions: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Permission[];
|
|
265
|
-
roles: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Roles[];
|
|
266
|
-
authType: "session" | "oauth2" | null;
|
|
267
|
-
}>;
|
|
268
|
-
setSession: (data: {
|
|
269
|
-
session: {
|
|
270
|
-
userId: string;
|
|
271
|
-
expiresAt: Date;
|
|
272
|
-
createdAt: Date;
|
|
273
|
-
updatedAt: Date;
|
|
274
|
-
token: string;
|
|
275
|
-
ipAddress?: string | null | undefined;
|
|
276
|
-
userAgent?: string | null | undefined;
|
|
277
|
-
id: string;
|
|
278
|
-
activeOrganizationId?: string | undefined;
|
|
279
|
-
activeProjectId?: string | undefined;
|
|
280
|
-
};
|
|
281
|
-
user: {
|
|
282
|
-
email: string;
|
|
283
|
-
name: string;
|
|
284
|
-
image?: string | null | undefined;
|
|
285
|
-
createdAt: Date;
|
|
286
|
-
updatedAt: Date;
|
|
287
|
-
emailVerified: boolean;
|
|
288
|
-
phone?: string | undefined;
|
|
289
|
-
dateOfBirth?: Date | undefined;
|
|
290
|
-
id: string;
|
|
291
|
-
emailsList?: {
|
|
292
|
-
newsLetter: boolean;
|
|
293
|
-
} | undefined;
|
|
294
|
-
customerId?: string | undefined;
|
|
295
|
-
role?: string | undefined;
|
|
296
|
-
lang?: string | undefined;
|
|
297
|
-
};
|
|
298
|
-
organization?: {
|
|
299
|
-
name: string;
|
|
300
|
-
membersIds: string[];
|
|
301
|
-
adminsIds: string[];
|
|
302
|
-
id: string;
|
|
303
|
-
creatorId: string;
|
|
304
|
-
plan?: {
|
|
305
|
-
type: import('@intlayer/backend').PlanType;
|
|
306
|
-
creatorId?: string | undefined;
|
|
307
|
-
subscriptionId?: string | undefined;
|
|
308
|
-
customerId?: string | undefined;
|
|
309
|
-
priceId?: string | undefined;
|
|
310
|
-
status?: "active" | "canceled" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | undefined;
|
|
311
|
-
period?: "MONTHLY" | "YEARLY" | undefined;
|
|
312
|
-
id: string;
|
|
313
|
-
createdAt: number;
|
|
314
|
-
updatedAt: number;
|
|
315
|
-
} | undefined;
|
|
316
|
-
createdAt: number;
|
|
317
|
-
updatedAt: number;
|
|
318
|
-
} | null | undefined;
|
|
319
|
-
project?: {
|
|
320
|
-
organizationId: string;
|
|
321
|
-
name: string;
|
|
322
|
-
membersIds: string[];
|
|
323
|
-
adminsIds: string[];
|
|
324
|
-
creatorId: string;
|
|
325
|
-
configuration?: {
|
|
326
|
-
internationalization: {
|
|
327
|
-
locales: import('intlayer').Locales[];
|
|
328
|
-
defaultLocale: import('intlayer').Locales;
|
|
329
|
-
};
|
|
330
|
-
editor: {
|
|
331
|
-
applicationURL: string;
|
|
332
|
-
cmsURL: string;
|
|
333
|
-
};
|
|
334
|
-
} | undefined;
|
|
335
|
-
id: string;
|
|
336
|
-
createdAt: number;
|
|
337
|
-
updatedAt: number;
|
|
338
|
-
oAuth2Access: {
|
|
339
|
-
name: string;
|
|
340
|
-
grants: string[];
|
|
341
|
-
expiresAt?: Date | undefined;
|
|
342
|
-
clientId: string;
|
|
343
|
-
clientSecret: string;
|
|
344
|
-
accessToken: string[];
|
|
345
|
-
userId: string;
|
|
346
|
-
id: string;
|
|
347
|
-
createdAt: number;
|
|
348
|
-
updatedAt: number;
|
|
349
|
-
}[];
|
|
350
|
-
} | null | undefined;
|
|
351
|
-
id: string;
|
|
352
|
-
permissions: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Permission[];
|
|
353
|
-
roles: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Roles[];
|
|
354
|
-
authType: "session" | "oauth2" | null;
|
|
355
|
-
} | null) => void;
|
|
4
|
+
session: any;
|
|
5
|
+
fetchSession: () => Promise<SessionAPI | null | undefined>;
|
|
6
|
+
revalidateSession: () => Promise<SessionAPI | null | undefined>;
|
|
7
|
+
setSession: (nextSession: SessionAPI | null) => unknown;
|
|
356
8
|
};
|
|
357
9
|
//# sourceMappingURL=useSession.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useSession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"useSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useSession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM9D,eAAO,MAAM,UAAU,GACrB,cAAc,UAAU,GAAG,IAAI,EAC/B,wBAAwB,cAAc;;wBA6BP,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;6BAAtC,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;8BAHpC,UAAU,GAAG,IAAI;CAgBnD,CAAC"}
|