@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
|
@@ -63,13 +63,12 @@ const fetcher = async (url, ...options) => {
|
|
|
63
63
|
const response = await fetch(urlResult, formattedOptions);
|
|
64
64
|
if (!response.ok) {
|
|
65
65
|
const result = await response.json();
|
|
66
|
-
console.error(result);
|
|
67
66
|
throw new Error(JSON.stringify(result.error) ?? "An error occurred");
|
|
68
67
|
}
|
|
69
68
|
return await response.json();
|
|
70
69
|
};
|
|
71
70
|
const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
72
|
-
const
|
|
71
|
+
const backendURL = getConfiguration().editor.backendURL;
|
|
73
72
|
const AI_API_ROUTE = `${backendURL}/api/ai`;
|
|
74
73
|
const auditContentDeclaration = async (body, otherOptions = {}) => await fetcher(
|
|
75
74
|
`${AI_API_ROUTE}/audit/dictionary`,
|
|
@@ -116,12 +115,22 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
116
115
|
body
|
|
117
116
|
}
|
|
118
117
|
);
|
|
118
|
+
const autocomplete = async (body, otherOptions = {}) => await fetcher(
|
|
119
|
+
`${AI_API_ROUTE}/autocomplete`,
|
|
120
|
+
authAPIOptions,
|
|
121
|
+
otherOptions,
|
|
122
|
+
{
|
|
123
|
+
method: "POST",
|
|
124
|
+
body
|
|
125
|
+
}
|
|
126
|
+
);
|
|
119
127
|
return {
|
|
120
128
|
auditContentDeclaration,
|
|
121
129
|
auditContentDeclarationField,
|
|
122
130
|
auditContentDeclarationMetadata,
|
|
123
131
|
auditTag,
|
|
124
|
-
askDocQuestion
|
|
132
|
+
askDocQuestion,
|
|
133
|
+
autocomplete
|
|
125
134
|
};
|
|
126
135
|
};
|
|
127
136
|
getAiAPI();
|
|
@@ -178,6 +187,15 @@ const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
178
187
|
otherOptions,
|
|
179
188
|
{ params, method: "POST" }
|
|
180
189
|
);
|
|
190
|
+
const defineNewPassword = async (data, otherOptions = {}) => await fetcher(
|
|
191
|
+
`${AUTH_API_ROUTE}/password/define`,
|
|
192
|
+
authAPIOptions,
|
|
193
|
+
otherOptions,
|
|
194
|
+
{
|
|
195
|
+
method: "POST",
|
|
196
|
+
body: data
|
|
197
|
+
}
|
|
198
|
+
);
|
|
181
199
|
const changePassword = async (data, otherOptions = {}) => await fetcher(
|
|
182
200
|
`${AUTH_API_ROUTE}/password`,
|
|
183
201
|
authAPIOptions,
|
|
@@ -247,6 +265,7 @@ const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
247
265
|
register,
|
|
248
266
|
logout,
|
|
249
267
|
resetPassword,
|
|
268
|
+
defineNewPassword,
|
|
250
269
|
askResetPassword,
|
|
251
270
|
checkIfUserHasPassword,
|
|
252
271
|
verifyEmail,
|
|
@@ -260,7 +279,7 @@ const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
260
279
|
};
|
|
261
280
|
getAuthAPI();
|
|
262
281
|
const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
263
|
-
const
|
|
282
|
+
const backendURL = getConfiguration().editor.backendURL;
|
|
264
283
|
const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;
|
|
265
284
|
const getDictionaries = async (filters, otherOptions = {}) => await fetcher(
|
|
266
285
|
PROJECT_API_ROUTE,
|
|
@@ -283,13 +302,13 @@ const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
283
302
|
params: version ? { version: version.toString() } : void 0
|
|
284
303
|
}
|
|
285
304
|
);
|
|
286
|
-
const addDictionary = async (
|
|
305
|
+
const addDictionary = async (body, otherOptions = {}) => await fetcher(
|
|
287
306
|
`${PROJECT_API_ROUTE}`,
|
|
288
307
|
authAPIOptions,
|
|
289
308
|
otherOptions,
|
|
290
309
|
{
|
|
291
310
|
method: "POST",
|
|
292
|
-
body
|
|
311
|
+
body
|
|
293
312
|
}
|
|
294
313
|
);
|
|
295
314
|
const pushDictionaries = async (dictionaries, otherOptions = {}) => await fetcher(
|
|
@@ -359,7 +378,7 @@ const getEditorAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
359
378
|
};
|
|
360
379
|
getEditorAPI();
|
|
361
380
|
const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
362
|
-
const
|
|
381
|
+
const backendURL = getConfiguration().editor.backendURL;
|
|
363
382
|
const ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;
|
|
364
383
|
const getOrganizations = async (filters, otherOptions = {}) => await fetcher(
|
|
365
384
|
ORGANIZATION_API_ROUTE,
|
|
@@ -448,7 +467,7 @@ const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
448
467
|
};
|
|
449
468
|
getOrganizationAPI();
|
|
450
469
|
const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
451
|
-
const
|
|
470
|
+
const backendURL = getConfiguration().editor.backendURL;
|
|
452
471
|
const PROJECT_API_ROUTE = `${backendURL}/api/project`;
|
|
453
472
|
const getProjects = async (filters, otherOptions = {}) => await fetcher(
|
|
454
473
|
PROJECT_API_ROUTE,
|
|
@@ -563,6 +582,15 @@ getProjectAPI();
|
|
|
563
582
|
const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
564
583
|
const backendURL = getConfiguration().editor.backendURL;
|
|
565
584
|
const STRIPE_API_ROUTE = `${backendURL}/api/stripe`;
|
|
585
|
+
const getPricing = async (body, otherOptions = {}) => await fetcher(
|
|
586
|
+
`${STRIPE_API_ROUTE}/pricing`,
|
|
587
|
+
authAPIOptions,
|
|
588
|
+
otherOptions,
|
|
589
|
+
{
|
|
590
|
+
method: "POST",
|
|
591
|
+
body
|
|
592
|
+
}
|
|
593
|
+
);
|
|
566
594
|
const getSubscription = async (body, otherOptions = {}) => await fetcher(
|
|
567
595
|
`${STRIPE_API_ROUTE}/create-subscription`,
|
|
568
596
|
authAPIOptions,
|
|
@@ -581,12 +609,13 @@ const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
581
609
|
}
|
|
582
610
|
);
|
|
583
611
|
return {
|
|
612
|
+
getPricing,
|
|
584
613
|
getSubscription,
|
|
585
614
|
cancelSubscription
|
|
586
615
|
};
|
|
587
616
|
};
|
|
588
617
|
const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
589
|
-
const
|
|
618
|
+
const backendURL = getConfiguration().editor.backendURL;
|
|
590
619
|
const PROJECT_API_ROUTE = `${backendURL}/api/tag`;
|
|
591
620
|
const getTags = async (filters, otherOptions = {}) => await fetcher(
|
|
592
621
|
PROJECT_API_ROUTE,
|
|
@@ -631,7 +660,7 @@ const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
631
660
|
};
|
|
632
661
|
getTagAPI();
|
|
633
662
|
const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
634
|
-
const
|
|
663
|
+
const backendURL = getConfiguration().editor.backendURL;
|
|
635
664
|
const USER_API_ROUTE = `${backendURL}/api/user`;
|
|
636
665
|
const getUsers = async (filters, otherOptions = {}) => await fetcher(
|
|
637
666
|
USER_API_ROUTE,
|
|
@@ -708,4 +737,4 @@ const intlayerAPI = getIntlayerAPI();
|
|
|
708
737
|
export {
|
|
709
738
|
intlayerAPI as i
|
|
710
739
|
};
|
|
711
|
-
//# sourceMappingURL=index-
|
|
740
|
+
//# sourceMappingURL=index-DixKT3Hi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DixKT3Hi.js","sources":["../../api/src/fetcher.ts","../../api/src/getIntlayerAPI/ai.ts","../../api/src/getIntlayerAPI/auth.ts","../../api/src/getIntlayerAPI/dictionary.ts","../../api/src/getIntlayerAPI/editor.ts","../../api/src/getIntlayerAPI/organization.ts","../../api/src/getIntlayerAPI/project.ts","../../api/src/getIntlayerAPI/stripe.ts","../../api/src/getIntlayerAPI/tag.ts","../../api/src/getIntlayerAPI/user.ts","../../api/src/getIntlayerAPI/index.ts"],"sourcesContent":["/**\n * Type definition for options used in the fetcher function.\n * Extends the standard RequestInit interface (excluding 'body'),\n * and adds 'body' and 'params' properties for convenience.\n */\nexport type FetcherOptions = Omit<RequestInit, 'body'> & {\n /**\n * Body of the request. Should be a key-value pair object.\n */\n body?: Record<string, unknown>;\n /**\n * Query parameters to be appended to the URL.\n */\n params?:\n | Record<string, string | string[] | undefined>\n | string[]\n | URLSearchParams;\n};\n\n/**\n * Default options for the fetcher function.\n * Sets the default method to 'GET', the 'Content-Type' header to 'application/json',\n * and includes credentials in the request.\n */\nexport const fetcherOptions: FetcherOptions = {\n method: 'GET', // Default HTTP method\n headers: {\n 'Content-Type': 'application/json', // Default content type\n },\n credentials: 'include',\n};\n\n/**\n * Utility function to remove properties with undefined values from an object.\n * This helps prevent sending undefined values in the request options.\n *\n * @param obj - The object to clean.\n * @returns The cleaned object without undefined values.\n */\nconst removeUndefined = (obj: object) => {\n Object.keys(obj).forEach((key) => {\n if (obj[key as keyof typeof obj] === undefined) {\n delete obj[key as keyof typeof obj];\n }\n });\n return obj;\n};\n\n/**\n * Deeply merges an array of objects into a single object.\n * Later objects in the array overwrite properties of earlier ones.\n *\n * @template T - The type of objects being merged.\n * @param objects - An array of objects to merge.\n * @returns The merged object.\n */\nconst deepMerge = <T extends object>(objects: (T | undefined)[]): T =>\n objects.reduce((acc, obj) => {\n const acc1: T = (acc ?? {}) as T;\n const obj1: T = removeUndefined(obj ?? {}) as T;\n\n if (typeof acc1 === 'object' && typeof obj1 === 'object') {\n // Merge the two objects\n return { ...acc1, ...obj1 };\n }\n\n // If one of them is not an object, return the defined one\n return obj1 ?? acc1;\n }, {} as T)!;\n\n/**\n * Fetcher function to make HTTP requests.\n * It merges default options with user-provided options,\n * handles query parameters and request body,\n * and returns the parsed JSON response.\n *\n * @template T - The expected type of the response data.\n * @param url - The endpoint URL.\n * @param options - Additional options to customize the request.\n * @returns A promise that resolves with the response data of type T.\n *\n * @example\n * ```typescript\n * // Making a GET request with query parameters\n * const data = await fetcher<MyResponseType>('https://api.example.com/data', {\n * params: { search: 'query' },\n * });\n *\n * // Making a POST request with a JSON body\n * const result = await fetcher<AnotherResponseType>('https://api.example.com/submit', {\n * method: 'POST',\n * body: { key: 'value' },\n * });\n *\n * // Merge body, headers, and params\n * const result = await fetcher<AnotherResponseType>('https://api.example.com/submit', {\n * method: 'POST',\n * body: { key: 'value' },\n * headers: { 'Content-Type': 'application/json' },\n * params: { search: 'query' },\n * },\n * {\n * headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n * params: { page: 1 },\n * });\n * ```\n *\n * Result:\n * ```typescript\n * {\n * method: 'POST',\n * headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n * params: { page: 1, search: 'query' },\n * body: { key: 'value' },\n * }\n * ```\n */\nexport const fetcher = async <T>(\n url: string,\n ...options: FetcherOptions[]\n): Promise<T> => {\n const { signal } = new AbortController();\n\n // Initialize query parameters string and request body string\n let paramsString = '';\n let bodyString: string | undefined = undefined;\n\n // Extract other options excluding 'body', 'params', and 'headers'\n const otherOptions = options.map(\n ({ body, params, headers, ...otherOptions }) => otherOptions\n );\n\n // Merge default options with user-provided options\n const mergedOptions = deepMerge([fetcherOptions, ...otherOptions]);\n\n // Merge default headers with user-provided headers\n const mergedHeaders = deepMerge([\n fetcherOptions.headers,\n ...options.map((option) => option.headers),\n ]);\n\n // Merge query parameters\n const params = deepMerge(options.map((option) => option.params));\n\n const method = mergedOptions.method;\n\n // If the request method is not 'GET' or 'HEAD', prepare the request body\n if (method !== 'GET' && method !== 'HEAD') {\n // Merge all 'body' options\n const body = deepMerge(options.map((option) => option.body));\n if (\n mergedHeaders?.['Content-Type' as keyof HeadersInit] ===\n 'application/x-www-form-urlencoded'\n ) {\n // If the content type is 'application/x-www-form-urlencoded', encode the body accordingly\n bodyString = new URLSearchParams(\n body as Record<string, string>\n ).toString();\n } else {\n // Otherwise, stringify the body as JSON\n bodyString = JSON.stringify(body);\n }\n }\n\n // If there are query parameters, append them to the URL\n if (Object.entries(params).length > 0) {\n paramsString = `?${new URLSearchParams(\n params as Record<string, string>\n ).toString()}`;\n }\n\n // Prepare the final request options\n const formattedOptions: RequestInit = {\n ...mergedOptions,\n headers: mergedHeaders,\n body: bodyString,\n signal,\n };\n\n // Construct the full URL with query parameters\n const urlResult = `${url}${paramsString}`;\n\n // Make the HTTP request using fetch\n const response = await fetch(urlResult, formattedOptions);\n\n if (!response.ok) {\n const result = await response.json();\n\n // You can customize the error message or include more details\n throw new Error(JSON.stringify(result.error) ?? 'An error occurred');\n }\n return await response.json();\n};\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationFieldBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationFieldResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationMetadataBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationMetadataResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditTagBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditTagResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AskDocQuestionBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AskDocQuestionResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AutocompleteBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AutocompleteResponse,\n // @ts-ignore: @intlayer/backend is not built yet\n} from '@intlayer/backend';\n\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getAiAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const AI_API_ROUTE = `${backendURL}/api/ai`;\n\n /**\n * Audits a content declaration file\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclaration = async (\n body?: AuditContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationResult>(\n `${AI_API_ROUTE}/audit/dictionary`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration field\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationField = async (\n body?: AuditContentDeclarationFieldBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationFieldResult>(\n `${AI_API_ROUTE}/audit/dictionary/field`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file to retrieve title, description and tags\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationMetadata = async (\n body?: AuditContentDeclarationMetadataBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationMetadataResult>(\n `${AI_API_ROUTE}/audit/dictionary/metadata`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a tag\n * @param body - Audit tag parameters.\n * @returns Audited tag content.\n */\n const auditTag = async (\n body?: AuditTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditTagResult>(\n `${AI_API_ROUTE}/audit/tag`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Asks a question to the AI related to the documentation\n */\n const askDocQuestion = async (\n body?: AskDocQuestionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AskDocQuestionResult>(\n `${AI_API_ROUTE}/ask`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n const autocomplete = async (\n body?: AutocompleteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AutocompleteResponse>(\n `${AI_API_ROUTE}/autocomplete`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n return {\n auditContentDeclaration,\n auditContentDeclarationField,\n auditContentDeclarationMetadata,\n auditTag,\n askDocQuestion,\n autocomplete,\n };\n};\n\nexport const userAPI = getAiAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AskResetPasswordBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AskResetPasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n CreateSessionBody,\n // @ts-ignore: @intlayer/backend is not built yet\n CreateSessionResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetSessionInformationQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n GithubLoginQueryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GoogleLoginQueryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetSessionInformationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n LoginBody,\n // @ts-ignore: @intlayer/backend is not built yet\n LoginResult,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterBody,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterResult,\n // @ts-ignore: @intlayer/backend is not built yet\n ResetPasswordParams,\n // @ts-ignore: @intlayer/backend is not built yet\n ResetPasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DefinePasswordBody,\n // @ts-ignore: @intlayer/backend is not built yet\n DefinePasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdatePasswordBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdatePasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n ValidEmailParams,\n // @ts-ignore: @intlayer/backend is not built yet\n ValidEmailResult,\n // @ts-ignore: @intlayer/backend is not built yet\n SetCSRFTokenResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOAuth2TokenBody,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOAuth2TokenResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UserAPI,\n // @ts-ignore: @intlayer/backend is not built yet\n CheckIfUserHasPasswordResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getAuthAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const { backendURL, clientId, clientSecret } = (\n intlayerConfig ?? getConfiguration()\n ).editor;\n const AUTH_API_ROUTE = `${backendURL}/api/auth`;\n\n /**\n * Logs in a user with the provided credentials.\n * @param user - User credentials.\n */\n const login = async (user: LoginBody, otherOptions: FetcherOptions = {}) =>\n await fetcher<LoginResult>(\n `${AUTH_API_ROUTE}/login`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n }\n );\n\n /**\n * Gets the login with GitHub URL.\n * @param params - The parameters for the login with GitHub URL.\n * @returns The login with GitHub URL.\n */\n const getLoginWithGitHubURL = (params: GithubLoginQueryParams): string => {\n const searchParams = new URLSearchParams(params);\n\n return `${AUTH_API_ROUTE}/login/github?${searchParams.toString()}`;\n };\n\n /**\n * Gets the login with Google URL.\n * @param params - The parameters for the login with Google URL.\n * @returns The login with Google URL.\n */\n const getLoginWithGoogleURL = (params: GoogleLoginQueryParams): string => {\n const searchParams = new URLSearchParams(params);\n\n return `${AUTH_API_ROUTE}/login/google?${searchParams.toString()}`;\n };\n\n /**\n * Registers a new user with the provided credentials.\n * @param user - User credentials.\n * @returns User object.\n */\n const register = async (\n user: RegisterBody,\n query: RegisterQuery = {},\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<RegisterResult>(\n `${AUTH_API_ROUTE}/register`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n params: query,\n }\n );\n\n /**\n * Signs out the user.\n * @returns User object.\n */\n const logout = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<void>(\n `${AUTH_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Ask to resets the password of a user with the provided email address.\n * @param email - Email address of the user.\n * @returns User object.\n */\n const askResetPassword = async (\n email: AskResetPasswordBody['email'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AskResetPasswordResult>(\n `${AUTH_API_ROUTE}/password/reset`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { email },\n }\n );\n\n /**\n * Resets the password of a user with the provided email address.\n * @param email - Email address of the user.\n * @returns User object.\n */\n const resetPassword = async (\n params: ResetPasswordParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ResetPasswordResult>(\n `${AUTH_API_ROUTE}/password/reset`,\n authAPIOptions,\n otherOptions,\n { params, method: 'POST' }\n );\n\n /**\n * Changes the password of a user with the provided data.\n * @param data - New password and confirmation.\n * @returns User object.\n */\n const defineNewPassword = async (\n data: DefinePasswordBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DefinePasswordResult>(\n `${AUTH_API_ROUTE}/password/define`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: data,\n }\n );\n\n /**\n * Changes the password of a user with the provided data.\n * @param data - New password and confirmation.\n * @returns User object.\n */\n const changePassword = async (\n data: UpdatePasswordBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdatePasswordResult>(\n `${AUTH_API_ROUTE}/password`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: data,\n }\n );\n\n /**\n * Checks if a user has a password.\n * @param params - User ID.\n * @returns User object.\n */\n const checkIfUserHasPassword = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<CheckIfUserHasPasswordResult>(\n `${AUTH_API_ROUTE}/password/has`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n }\n );\n\n /**\n * Verifies the email address of a user with the provided token.\n * @param params - User ID and secret key.\n * @returns User object.\n */\n const verifyEmail = async (\n { userId, secret }: ValidEmailParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ValidEmailResult>(\n `${AUTH_API_ROUTE}/active/${userId}/${secret}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Gets the verify email status URL to use in the SSE.\n * @param userId - User ID.\n * @returns The verify email status URL.\n */\n const getVerifyEmailStatusURL = (userId: string | UserAPI['_id']) =>\n `${AUTH_API_ROUTE}/verify-email-status/${String(userId)}`;\n\n /**\n * Creates a session for a user.\n * @param params - User ID and secret key.\n * @returns User object.\n */\n const createSession = async (\n data: CreateSessionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CreateSessionResult>(\n `${AUTH_API_ROUTE}/session`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: data,\n }\n );\n\n /**\n * Gets a session and user.\n * @param sessionToken - Session token.\n * @param otherOptions - Fetcher options.\n * @returns Session and user information.\n */\n const getSession = async (\n sessionToken?: GetSessionInformationQuery['session_token'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetSessionInformationResult>(\n `${backendURL}/session`,\n authAPIOptions,\n otherOptions,\n { params: { session_token: sessionToken } }\n );\n\n /**\n * Gets the CSRF token.\n * @param otherOptions - Fetcher options.\n * @returns The CSRF token.\n */\n const getCSRFToken = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<SetCSRFTokenResult>(\n `${backendURL}/csrf-token`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Gets an oAuth2 accessToken\n * @return The token information\n */\n const getOAuth2AccessToken = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetOAuth2TokenResult>(\n `${backendURL}/oauth2/token`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: {\n grant_type: 'client_credentials',\n client_id: clientId!,\n client_secret: clientSecret!,\n } satisfies GetOAuth2TokenBody,\n }\n );\n\n return {\n login,\n getLoginWithGitHubURL,\n getLoginWithGoogleURL,\n register,\n logout,\n resetPassword,\n defineNewPassword,\n askResetPassword,\n checkIfUserHasPassword,\n verifyEmail,\n getVerifyEmailStatusURL,\n changePassword,\n createSession,\n getSession,\n getCSRFToken,\n getOAuth2AccessToken,\n };\n};\n\nexport const authAPI = getAuthAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddDictionaryBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteDictionaryParam,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryParam,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n PushDictionariesBody,\n // @ts-ignore: @intlayer/backend is not built yet\n PushDictionariesResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesKeysResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getDictionaryAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;\n\n /**\n * Retrieves a list of dictionaries based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getDictionaries = async (\n filters?: GetDictionariesParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetDictionariesResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Retrieves a list of dictionary keys related to the project.\n */\n const getDictionariesKeys = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetDictionariesKeysResult>(\n `${PROJECT_API_ROUTE}/keys`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Retrieves a dictionary by its key and version.\n * @param dictionaryKey - Dictionary key.\n * @param version - Dictionary version of content.\n */\n const getDictionary = async (\n dictionaryKey: GetDictionaryParams['dictionaryKey'],\n version?: GetDictionaryQuery['version'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetDictionaryResult>(\n `${PROJECT_API_ROUTE}/${dictionaryKey}`,\n authAPIOptions,\n otherOptions,\n {\n params: version ? { version: version.toString() } : undefined,\n }\n );\n\n /**\n * Adds a new dictionary to the database.\n * @param dictionary - Dictionary data.\n */\n const addDictionary = async (\n body: AddDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n const pushDictionaries = async (\n dictionaries: PushDictionariesBody['dictionaries'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<PushDictionariesResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PATCH',\n body: { dictionaries },\n }\n );\n\n /**\n * Updates an existing dictionary in the database.\n * @param dictionary - Updated dictionary data.\n */\n const updateDictionary = async (\n dictionaryId: UpdateDictionaryParam['dictionaryId'],\n dictionary: UpdateDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateDictionaryResult>(\n `${PROJECT_API_ROUTE}/${dictionaryId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: dictionary,\n }\n );\n\n /**\n * Deletes a dictionary from the database by its ID.\n * @param id - Dictionary ID.\n */\n const deleteDictionary = async (\n id: DeleteDictionaryParam['dictionaryId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n body: { id },\n }\n );\n\n return {\n getDictionaries,\n getDictionariesKeys,\n getDictionary,\n pushDictionaries,\n addDictionary,\n updateDictionary,\n deleteDictionary,\n };\n};\n\nexport const dictionaryAPI = getDictionaryAPI();\n","import {\n getConfiguration as getLocaleConfiguration,\n type IntlayerConfig,\n} from '@intlayer/config/client';\nimport type {\n // @ts-ignore: intlayer-editor is not built yet\n GetConfigurationResult,\n // @ts-ignore: intlayer-editor is not built yet\n WriteContentDeclarationBody,\n // @ts-ignore: intlayer-editor is not built yet\n WriteContentDeclarationResult,\n // @ts-ignore: intlayer-editor is not built yet\n} from 'intlayer-editor';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getEditorAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const { editorURL } = (intlayerConfig ?? getLocaleConfiguration()).editor;\n const EDITOR_API_ROUTE = `${editorURL}/api`;\n\n /**\n * Get the Intlayer configuration\n */\n const getConfiguration = async (\n otherOptions: FetcherOptions = {}\n ): Promise<GetConfigurationResult> => {\n const response = await fetcher<GetConfigurationResult>(\n `${EDITOR_API_ROUTE}/config`,\n authAPIOptions,\n otherOptions\n );\n\n return response.data;\n };\n\n /**\n * Adds a new dictionary to the database.\n * @param dictionary - Dictionary data.\n */\n const writeDictionary = async (\n dictionary: WriteContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) => {\n await fetcher<WriteContentDeclarationResult>(\n `${EDITOR_API_ROUTE}/dictionary`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { dictionary },\n }\n );\n };\n\n return {\n getConfiguration,\n writeDictionary,\n };\n};\n\nexport const editorAPI = getEditorAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationParam,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationsParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationsResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectOrganizationParam,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UnselectOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationMembersBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationMembersResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationMemberBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationMemberResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getOrganizationAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;\n\n /**\n * Retrieves a list of organizations based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getOrganizations = async (\n filters?: GetOrganizationsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetOrganizationsResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Retrieves an organization by its ID.\n * @param organizationId - Organization ID.\n */\n const getOrganization = async (\n organizationId: GetOrganizationParam['organizationId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Adds a new organization to the database.\n * @param organization - Organization data.\n */\n const addOrganization = async (\n organization: AddOrganizationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: organization,\n }\n );\n\n /**\n * Updates an existing organization in the database.\n * @param organization - Updated organization data.\n */\n const updateOrganization = async (\n organization: UpdateOrganizationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: organization,\n }\n );\n\n /**\n * Update members to the organization in the database.\n * @param body - Updated organization members data.\n */\n const updateOrganizationMembers = async (\n body: UpdateOrganizationMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationMembersResult>(\n `${ORGANIZATION_API_ROUTE}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /**\n * Add member to the organization in the database.\n * @param body - Updated organization members data.\n */\n const addOrganizationMember = async (\n body: AddOrganizationMemberBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<AddOrganizationMemberResult>(\n `${ORGANIZATION_API_ROUTE}/member`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Deletes an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const deleteOrganization = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<DeleteOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Select an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const selectOrganization = async (\n organizationId: SelectOrganizationParam['organizationId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SelectOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Unselect an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const unselectOrganization = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<UnselectOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getOrganizations,\n getOrganization,\n addOrganization,\n addOrganizationMember,\n updateOrganization,\n updateOrganizationMembers,\n deleteOrganization,\n selectOrganization,\n unselectOrganization,\n };\n};\n\nexport const organizationAPI = getOrganizationAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddProjectBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetProjectsParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetProjectsResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateProjectBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectProjectParam,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UnselectProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AddNewAccessKeyBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddNewAccessKeyResponse,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteAccessKeyBody,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteAccessKeyResponse,\n // @ts-ignore: @intlayer/backend is not built yet\n RefreshAccessKeyBody,\n // @ts-ignore: @intlayer/backend is not built yet\n RefreshAccessKeyResponse,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateProjectMembersBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateProjectMembersResult,\n // @ts-ignore @intlayer/backend is not build yet\n PushProjectConfigurationBody,\n // @ts-ignore @intlayer/backend is not build yet\n PushProjectConfigurationResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getProjectAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const PROJECT_API_ROUTE = `${backendURL}/api/project`;\n\n /**\n * Retrieves a list of projects based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getProjects = async (\n filters?: GetProjectsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetProjectsResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Adds a new project to the database.\n * @param project - Project data.\n */\n const addProject = async (\n project: AddProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: project,\n }\n );\n\n /**\n * Updates an existing project in the database.\n * @param project - Updated project data.\n */\n const updateProject = async (\n project: UpdateProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: project,\n }\n );\n\n /**\n * Updates project members in the database.\n * @param project - Updated project data.\n */\n const updateProjectMembers = async (\n body: UpdateProjectMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateProjectMembersResult>(\n `${PROJECT_API_ROUTE}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /** Pushes a project configuration to the database.\n * @param projectConfiguration - Project configuration data.\n */\n const pushProjectConfiguration = async (\n projectConfiguration: PushProjectConfigurationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<PushProjectConfigurationResult>(\n `${PROJECT_API_ROUTE}/configuration`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: projectConfiguration,\n }\n );\n\n /**\n * Deletes a project from the database by its ID.\n * @param id - Project ID.\n */\n const deleteProject = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<DeleteProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Select a project from the database by its ID.\n * @param projectId - Organization ID.\n */\n const selectProject = async (\n projectId: SelectProjectParam['projectId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SelectProjectResult>(\n `${PROJECT_API_ROUTE}/${String(projectId)}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Unselect a project from the database by its ID.\n * @param projectId - Project ID.\n */\n const unselectProject = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<UnselectProjectResult>(\n `${PROJECT_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Add a new access key to a project.\n * @param accessKey - Access key data.\n * @param otherOptions - Fetcher options.\n * @returns The new access key.\n */\n const addNewAccessKey = async (\n accessKey: AddNewAccessKeyBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddNewAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: accessKey,\n }\n );\n\n /**\n * Delete a project access key.\n * @param clientId - Access key client ID.\n * @param otherOptions - Fetcher options.\n * @returns The deleted project.\n */\n const deleteAccessKey = async (\n clientId: DeleteAccessKeyBody['clientId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n body: { clientId },\n }\n );\n\n /**\n * Refreshes an access key from a project.\n * @param clientId - The ID of the client to refresh.\n * @param projectId - The ID of the project to refresh the access key from.\n * @returns The new access key.\n */\n const refreshAccessKey = async (\n clientId: RefreshAccessKeyBody['clientId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<RefreshAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PATCH',\n body: { clientId },\n }\n );\n\n return {\n getProjects,\n addProject,\n updateProject,\n updateProjectMembers,\n pushProjectConfiguration,\n deleteProject,\n selectProject,\n unselectProject,\n addNewAccessKey,\n deleteAccessKey,\n refreshAccessKey,\n };\n};\n\nexport const projectAPI = getProjectAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n GetCheckoutSessionBody,\n // @ts-ignore: @intlayer/backend is not built yet\n GetCheckoutSessionResult,\n // @ts-ignore @intlayer/backend is not build yet\n GetPricingBody,\n // @ts-ignore @intlayer/backend is not build yet\n GetPricingResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getStripeAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL = (intlayerConfig ?? getConfiguration()).editor.backendURL;\n const STRIPE_API_ROUTE = `${backendURL}/api/stripe`;\n\n /**\n * Get a pricing plan calculated for a given promotion code.\n * @param body - Pricing plan body.\n */\n const getPricing = async (\n body?: GetPricingBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetPricingResult>(\n `${STRIPE_API_ROUTE}/pricing`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Retrieves a checkout session.\n * @param body - Checkout session body.\n */\n const getSubscription = async (\n body?: GetCheckoutSessionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetCheckoutSessionResult>(\n `${STRIPE_API_ROUTE}/create-subscription`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Cancels a subscription.\n * @param body - Checkout session body.\n */\n const cancelSubscription = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetCheckoutSessionResult>(\n `${STRIPE_API_ROUTE}/cancel-subscription`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getPricing,\n getSubscription,\n cancelSubscription,\n };\n};\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddTagBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddTagResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteTagParams,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteTagResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetTagsParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetTagsResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateTagBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateTagParams,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateTagResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getTagAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const PROJECT_API_ROUTE = `${backendURL}/api/tag`;\n\n /**\n * Retrieves a list of tags based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getTags = async (\n filters?: GetTagsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetTagsResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Adds a new tag to the database.\n * @param tag - Tag data.\n */\n const addTag = async (tag: AddTagBody, otherOptions: FetcherOptions = {}) =>\n await fetcher<AddTagResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: tag,\n }\n );\n\n /**\n * Updates an existing tag in the database.\n * @param tag - Updated tag data.\n */\n const updateTag = async (\n tagId: UpdateTagParams['tagId'],\n tag: UpdateTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateTagResult>(\n `${PROJECT_API_ROUTE}/${tagId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: tag,\n }\n );\n\n /**\n * Deletes a tag from the database by its ID.\n * @param tagId - Tag ID.\n */\n const deleteTag = async (\n tagId: DeleteTagParams['tagId'],\n\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteTagResult>(\n `${PROJECT_API_ROUTE}/${tagId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n return {\n getTags,\n addTag,\n updateTag,\n deleteTag,\n };\n};\n\nexport const tagAPI = getTagAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n CreateUserBody,\n // @ts-ignore: @intlayer/backend is not built yet\n CreateUserResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByAccountParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByAccountResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByEmailParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByEmailResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByIdParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByIdResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUsersParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUsersResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateUserBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateUserResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getUserAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const USER_API_ROUTE = `${backendURL}/api/user`;\n\n /**\n * Retrieves a list of users based on filters and pagination.\n * @param filters - Filters and pagination options.\n * @returns List of users.\n */\n const getUsers = async (\n filters?: GetUsersParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUsersResult>(\n USER_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Retrieves a user by ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const getUserById = async (\n userId: GetUserByIdParams['userId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByIdResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Retrieves a user by email.\n * @param email - User email.\n * @returns User object.\n */\n const getUserByEmail = async (\n email: GetUserByEmailParams['email'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByEmailResult>(\n `${USER_API_ROUTE}/email/${email}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Retrieves a user by account.\n * @param providerAccountId - The provider account ID.\n * @param provider - The provider of the account.\n */\n const getUserByAccount = async (\n providerAccountId: GetUserByAccountParams['providerAccountId'],\n provider: GetUserByAccountParams['provider'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByAccountResult>(\n `${USER_API_ROUTE}/account/${provider}/${providerAccountId}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Creates a new user.\n * @param user - User credentials.\n * @returns User object.\n */\n const createUser = async (\n user: CreateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CreateUserResult>(\n `${USER_API_ROUTE}/`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n }\n );\n\n /**\n * Updates the user with the provided data.\n * @param user - Updated user data.\n * @returns User object.\n */\n const updateUser = async (\n user: UpdateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: user,\n }\n );\n\n /**\n * Deletes a user with the provided ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const deleteUser = async (\n userId: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n return {\n createUser,\n getUsers,\n getUserById,\n getUserByAccount,\n getUserByEmail,\n updateUser,\n deleteUser,\n };\n};\n\nexport const userAPI = getUserAPI();\n","import { type IntlayerConfig } from '@intlayer/config/client';\nimport type { FetcherOptions } from '../fetcher';\nimport { getAiAPI } from './ai';\nimport { getAuthAPI } from './auth';\nimport { getDictionaryAPI } from './dictionary';\nimport { getEditorAPI } from './editor';\nimport { getOrganizationAPI } from './organization';\nimport { getProjectAPI } from './project';\nimport { getStripeAPI } from './stripe';\nimport { getTagAPI } from './tag';\nimport { getUserAPI } from './user';\n\nexport const getIntlayerAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => ({\n organization: getOrganizationAPI(authAPIOptions, intlayerConfig),\n project: getProjectAPI(authAPIOptions, intlayerConfig),\n user: getUserAPI(authAPIOptions, intlayerConfig),\n auth: getAuthAPI(authAPIOptions, intlayerConfig),\n dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),\n stripe: getStripeAPI(authAPIOptions, intlayerConfig),\n ai: getAiAPI(authAPIOptions, intlayerConfig),\n tag: getTagAPI(authAPIOptions, intlayerConfig),\n editor: getEditorAPI(authAPIOptions, intlayerConfig),\n});\n\nexport const intlayerAPI = getIntlayerAPI();\n"],"names":["params","otherOptions","getLocaleConfiguration","getConfiguration"],"mappings":";AAwBO,MAAM,iBAAiC;AAAA,EAC5C,QAAQ;AAAA;AAAA,EACR,SAAS;AAAA,IACP,gBAAgB;AAAA;AAAA,EAClB;AAAA,EACA,aAAa;AACf;AASA,MAAM,kBAAkB,CAAC,QAAgB;AACvC,SAAO,KAAK,GAAG,EAAE,QAAQ,CAAC,QAAQ;AAC5B,QAAA,IAAI,GAAuB,MAAM,QAAW;AA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AAA,EAC7C,QAAQ,aAAa,cAA8B;AACrD;AAEO,MAAM,cAAc,eAAe;"}
|
|
@@ -64,13 +64,12 @@ const fetcher = async (url, ...options) => {
|
|
|
64
64
|
const response = await fetch(urlResult, formattedOptions);
|
|
65
65
|
if (!response.ok) {
|
|
66
66
|
const result = await response.json();
|
|
67
|
-
console.error(result);
|
|
68
67
|
throw new Error(JSON.stringify(result.error) ?? "An error occurred");
|
|
69
68
|
}
|
|
70
69
|
return await response.json();
|
|
71
70
|
};
|
|
72
71
|
const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
73
|
-
const
|
|
72
|
+
const backendURL = client.getConfiguration().editor.backendURL;
|
|
74
73
|
const AI_API_ROUTE = `${backendURL}/api/ai`;
|
|
75
74
|
const auditContentDeclaration = async (body, otherOptions = {}) => await fetcher(
|
|
76
75
|
`${AI_API_ROUTE}/audit/dictionary`,
|
|
@@ -117,12 +116,22 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
117
116
|
body
|
|
118
117
|
}
|
|
119
118
|
);
|
|
119
|
+
const autocomplete = async (body, otherOptions = {}) => await fetcher(
|
|
120
|
+
`${AI_API_ROUTE}/autocomplete`,
|
|
121
|
+
authAPIOptions,
|
|
122
|
+
otherOptions,
|
|
123
|
+
{
|
|
124
|
+
method: "POST",
|
|
125
|
+
body
|
|
126
|
+
}
|
|
127
|
+
);
|
|
120
128
|
return {
|
|
121
129
|
auditContentDeclaration,
|
|
122
130
|
auditContentDeclarationField,
|
|
123
131
|
auditContentDeclarationMetadata,
|
|
124
132
|
auditTag,
|
|
125
|
-
askDocQuestion
|
|
133
|
+
askDocQuestion,
|
|
134
|
+
autocomplete
|
|
126
135
|
};
|
|
127
136
|
};
|
|
128
137
|
getAiAPI();
|
|
@@ -179,6 +188,15 @@ const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
179
188
|
otherOptions,
|
|
180
189
|
{ params, method: "POST" }
|
|
181
190
|
);
|
|
191
|
+
const defineNewPassword = async (data, otherOptions = {}) => await fetcher(
|
|
192
|
+
`${AUTH_API_ROUTE}/password/define`,
|
|
193
|
+
authAPIOptions,
|
|
194
|
+
otherOptions,
|
|
195
|
+
{
|
|
196
|
+
method: "POST",
|
|
197
|
+
body: data
|
|
198
|
+
}
|
|
199
|
+
);
|
|
182
200
|
const changePassword = async (data, otherOptions = {}) => await fetcher(
|
|
183
201
|
`${AUTH_API_ROUTE}/password`,
|
|
184
202
|
authAPIOptions,
|
|
@@ -248,6 +266,7 @@ const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
248
266
|
register,
|
|
249
267
|
logout,
|
|
250
268
|
resetPassword,
|
|
269
|
+
defineNewPassword,
|
|
251
270
|
askResetPassword,
|
|
252
271
|
checkIfUserHasPassword,
|
|
253
272
|
verifyEmail,
|
|
@@ -261,7 +280,7 @@ const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
261
280
|
};
|
|
262
281
|
getAuthAPI();
|
|
263
282
|
const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
264
|
-
const
|
|
283
|
+
const backendURL = client.getConfiguration().editor.backendURL;
|
|
265
284
|
const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;
|
|
266
285
|
const getDictionaries = async (filters, otherOptions = {}) => await fetcher(
|
|
267
286
|
PROJECT_API_ROUTE,
|
|
@@ -284,13 +303,13 @@ const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
284
303
|
params: version ? { version: version.toString() } : void 0
|
|
285
304
|
}
|
|
286
305
|
);
|
|
287
|
-
const addDictionary = async (
|
|
306
|
+
const addDictionary = async (body, otherOptions = {}) => await fetcher(
|
|
288
307
|
`${PROJECT_API_ROUTE}`,
|
|
289
308
|
authAPIOptions,
|
|
290
309
|
otherOptions,
|
|
291
310
|
{
|
|
292
311
|
method: "POST",
|
|
293
|
-
body
|
|
312
|
+
body
|
|
294
313
|
}
|
|
295
314
|
);
|
|
296
315
|
const pushDictionaries = async (dictionaries, otherOptions = {}) => await fetcher(
|
|
@@ -360,7 +379,7 @@ const getEditorAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
360
379
|
};
|
|
361
380
|
getEditorAPI();
|
|
362
381
|
const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
363
|
-
const
|
|
382
|
+
const backendURL = client.getConfiguration().editor.backendURL;
|
|
364
383
|
const ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;
|
|
365
384
|
const getOrganizations = async (filters, otherOptions = {}) => await fetcher(
|
|
366
385
|
ORGANIZATION_API_ROUTE,
|
|
@@ -449,7 +468,7 @@ const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
449
468
|
};
|
|
450
469
|
getOrganizationAPI();
|
|
451
470
|
const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
452
|
-
const
|
|
471
|
+
const backendURL = client.getConfiguration().editor.backendURL;
|
|
453
472
|
const PROJECT_API_ROUTE = `${backendURL}/api/project`;
|
|
454
473
|
const getProjects = async (filters, otherOptions = {}) => await fetcher(
|
|
455
474
|
PROJECT_API_ROUTE,
|
|
@@ -564,6 +583,15 @@ getProjectAPI();
|
|
|
564
583
|
const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
565
584
|
const backendURL = client.getConfiguration().editor.backendURL;
|
|
566
585
|
const STRIPE_API_ROUTE = `${backendURL}/api/stripe`;
|
|
586
|
+
const getPricing = async (body, otherOptions = {}) => await fetcher(
|
|
587
|
+
`${STRIPE_API_ROUTE}/pricing`,
|
|
588
|
+
authAPIOptions,
|
|
589
|
+
otherOptions,
|
|
590
|
+
{
|
|
591
|
+
method: "POST",
|
|
592
|
+
body
|
|
593
|
+
}
|
|
594
|
+
);
|
|
567
595
|
const getSubscription = async (body, otherOptions = {}) => await fetcher(
|
|
568
596
|
`${STRIPE_API_ROUTE}/create-subscription`,
|
|
569
597
|
authAPIOptions,
|
|
@@ -582,12 +610,13 @@ const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
582
610
|
}
|
|
583
611
|
);
|
|
584
612
|
return {
|
|
613
|
+
getPricing,
|
|
585
614
|
getSubscription,
|
|
586
615
|
cancelSubscription
|
|
587
616
|
};
|
|
588
617
|
};
|
|
589
618
|
const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
590
|
-
const
|
|
619
|
+
const backendURL = client.getConfiguration().editor.backendURL;
|
|
591
620
|
const PROJECT_API_ROUTE = `${backendURL}/api/tag`;
|
|
592
621
|
const getTags = async (filters, otherOptions = {}) => await fetcher(
|
|
593
622
|
PROJECT_API_ROUTE,
|
|
@@ -632,7 +661,7 @@ const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
632
661
|
};
|
|
633
662
|
getTagAPI();
|
|
634
663
|
const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
635
|
-
const
|
|
664
|
+
const backendURL = client.getConfiguration().editor.backendURL;
|
|
636
665
|
const USER_API_ROUTE = `${backendURL}/api/user`;
|
|
637
666
|
const getUsers = async (filters, otherOptions = {}) => await fetcher(
|
|
638
667
|
USER_API_ROUTE,
|
|
@@ -707,4 +736,4 @@ const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
|
707
736
|
});
|
|
708
737
|
const intlayerAPI = getIntlayerAPI();
|
|
709
738
|
exports.intlayerAPI = intlayerAPI;
|
|
710
|
-
//# sourceMappingURL=index-
|
|
739
|
+
//# sourceMappingURL=index-a_-DkvMQ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-a_-DkvMQ.cjs","sources":["../../api/src/fetcher.ts","../../api/src/getIntlayerAPI/ai.ts","../../api/src/getIntlayerAPI/auth.ts","../../api/src/getIntlayerAPI/dictionary.ts","../../api/src/getIntlayerAPI/editor.ts","../../api/src/getIntlayerAPI/organization.ts","../../api/src/getIntlayerAPI/project.ts","../../api/src/getIntlayerAPI/stripe.ts","../../api/src/getIntlayerAPI/tag.ts","../../api/src/getIntlayerAPI/user.ts","../../api/src/getIntlayerAPI/index.ts"],"sourcesContent":["/**\n * Type definition for options used in the fetcher function.\n * Extends the standard RequestInit interface (excluding 'body'),\n * and adds 'body' and 'params' properties for convenience.\n */\nexport type FetcherOptions = Omit<RequestInit, 'body'> & {\n /**\n * Body of the request. Should be a key-value pair object.\n */\n body?: Record<string, unknown>;\n /**\n * Query parameters to be appended to the URL.\n */\n params?:\n | Record<string, string | string[] | undefined>\n | string[]\n | URLSearchParams;\n};\n\n/**\n * Default options for the fetcher function.\n * Sets the default method to 'GET', the 'Content-Type' header to 'application/json',\n * and includes credentials in the request.\n */\nexport const fetcherOptions: FetcherOptions = {\n method: 'GET', // Default HTTP method\n headers: {\n 'Content-Type': 'application/json', // Default content type\n },\n credentials: 'include',\n};\n\n/**\n * Utility function to remove properties with undefined values from an object.\n * This helps prevent sending undefined values in the request options.\n *\n * @param obj - The object to clean.\n * @returns The cleaned object without undefined values.\n */\nconst removeUndefined = (obj: object) => {\n Object.keys(obj).forEach((key) => {\n if (obj[key as keyof typeof obj] === undefined) {\n delete obj[key as keyof typeof obj];\n }\n });\n return obj;\n};\n\n/**\n * Deeply merges an array of objects into a single object.\n * Later objects in the array overwrite properties of earlier ones.\n *\n * @template T - The type of objects being merged.\n * @param objects - An array of objects to merge.\n * @returns The merged object.\n */\nconst deepMerge = <T extends object>(objects: (T | undefined)[]): T =>\n objects.reduce((acc, obj) => {\n const acc1: T = (acc ?? {}) as T;\n const obj1: T = removeUndefined(obj ?? {}) as T;\n\n if (typeof acc1 === 'object' && typeof obj1 === 'object') {\n // Merge the two objects\n return { ...acc1, ...obj1 };\n }\n\n // If one of them is not an object, return the defined one\n return obj1 ?? acc1;\n }, {} as T)!;\n\n/**\n * Fetcher function to make HTTP requests.\n * It merges default options with user-provided options,\n * handles query parameters and request body,\n * and returns the parsed JSON response.\n *\n * @template T - The expected type of the response data.\n * @param url - The endpoint URL.\n * @param options - Additional options to customize the request.\n * @returns A promise that resolves with the response data of type T.\n *\n * @example\n * ```typescript\n * // Making a GET request with query parameters\n * const data = await fetcher<MyResponseType>('https://api.example.com/data', {\n * params: { search: 'query' },\n * });\n *\n * // Making a POST request with a JSON body\n * const result = await fetcher<AnotherResponseType>('https://api.example.com/submit', {\n * method: 'POST',\n * body: { key: 'value' },\n * });\n *\n * // Merge body, headers, and params\n * const result = await fetcher<AnotherResponseType>('https://api.example.com/submit', {\n * method: 'POST',\n * body: { key: 'value' },\n * headers: { 'Content-Type': 'application/json' },\n * params: { search: 'query' },\n * },\n * {\n * headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n * params: { page: 1 },\n * });\n * ```\n *\n * Result:\n * ```typescript\n * {\n * method: 'POST',\n * headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n * params: { page: 1, search: 'query' },\n * body: { key: 'value' },\n * }\n * ```\n */\nexport const fetcher = async <T>(\n url: string,\n ...options: FetcherOptions[]\n): Promise<T> => {\n const { signal } = new AbortController();\n\n // Initialize query parameters string and request body string\n let paramsString = '';\n let bodyString: string | undefined = undefined;\n\n // Extract other options excluding 'body', 'params', and 'headers'\n const otherOptions = options.map(\n ({ body, params, headers, ...otherOptions }) => otherOptions\n );\n\n // Merge default options with user-provided options\n const mergedOptions = deepMerge([fetcherOptions, ...otherOptions]);\n\n // Merge default headers with user-provided headers\n const mergedHeaders = deepMerge([\n fetcherOptions.headers,\n ...options.map((option) => option.headers),\n ]);\n\n // Merge query parameters\n const params = deepMerge(options.map((option) => option.params));\n\n const method = mergedOptions.method;\n\n // If the request method is not 'GET' or 'HEAD', prepare the request body\n if (method !== 'GET' && method !== 'HEAD') {\n // Merge all 'body' options\n const body = deepMerge(options.map((option) => option.body));\n if (\n mergedHeaders?.['Content-Type' as keyof HeadersInit] ===\n 'application/x-www-form-urlencoded'\n ) {\n // If the content type is 'application/x-www-form-urlencoded', encode the body accordingly\n bodyString = new URLSearchParams(\n body as Record<string, string>\n ).toString();\n } else {\n // Otherwise, stringify the body as JSON\n bodyString = JSON.stringify(body);\n }\n }\n\n // If there are query parameters, append them to the URL\n if (Object.entries(params).length > 0) {\n paramsString = `?${new URLSearchParams(\n params as Record<string, string>\n ).toString()}`;\n }\n\n // Prepare the final request options\n const formattedOptions: RequestInit = {\n ...mergedOptions,\n headers: mergedHeaders,\n body: bodyString,\n signal,\n };\n\n // Construct the full URL with query parameters\n const urlResult = `${url}${paramsString}`;\n\n // Make the HTTP request using fetch\n const response = await fetch(urlResult, formattedOptions);\n\n if (!response.ok) {\n const result = await response.json();\n\n // You can customize the error message or include more details\n throw new Error(JSON.stringify(result.error) ?? 'An error occurred');\n }\n return await response.json();\n};\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationFieldBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationFieldResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationMetadataBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationMetadataResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditTagBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditTagResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AskDocQuestionBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AskDocQuestionResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AutocompleteBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AutocompleteResponse,\n // @ts-ignore: @intlayer/backend is not built yet\n} from '@intlayer/backend';\n\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getAiAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const AI_API_ROUTE = `${backendURL}/api/ai`;\n\n /**\n * Audits a content declaration file\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclaration = async (\n body?: AuditContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationResult>(\n `${AI_API_ROUTE}/audit/dictionary`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration field\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationField = async (\n body?: AuditContentDeclarationFieldBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationFieldResult>(\n `${AI_API_ROUTE}/audit/dictionary/field`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file to retrieve title, description and tags\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationMetadata = async (\n body?: AuditContentDeclarationMetadataBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationMetadataResult>(\n `${AI_API_ROUTE}/audit/dictionary/metadata`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a tag\n * @param body - Audit tag parameters.\n * @returns Audited tag content.\n */\n const auditTag = async (\n body?: AuditTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditTagResult>(\n `${AI_API_ROUTE}/audit/tag`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Asks a question to the AI related to the documentation\n */\n const askDocQuestion = async (\n body?: AskDocQuestionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AskDocQuestionResult>(\n `${AI_API_ROUTE}/ask`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n const autocomplete = async (\n body?: AutocompleteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AutocompleteResponse>(\n `${AI_API_ROUTE}/autocomplete`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n return {\n auditContentDeclaration,\n auditContentDeclarationField,\n auditContentDeclarationMetadata,\n auditTag,\n askDocQuestion,\n autocomplete,\n };\n};\n\nexport const userAPI = getAiAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AskResetPasswordBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AskResetPasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n CreateSessionBody,\n // @ts-ignore: @intlayer/backend is not built yet\n CreateSessionResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetSessionInformationQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n GithubLoginQueryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GoogleLoginQueryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetSessionInformationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n LoginBody,\n // @ts-ignore: @intlayer/backend is not built yet\n LoginResult,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterBody,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterResult,\n // @ts-ignore: @intlayer/backend is not built yet\n ResetPasswordParams,\n // @ts-ignore: @intlayer/backend is not built yet\n ResetPasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DefinePasswordBody,\n // @ts-ignore: @intlayer/backend is not built yet\n DefinePasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdatePasswordBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdatePasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n ValidEmailParams,\n // @ts-ignore: @intlayer/backend is not built yet\n ValidEmailResult,\n // @ts-ignore: @intlayer/backend is not built yet\n SetCSRFTokenResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOAuth2TokenBody,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOAuth2TokenResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UserAPI,\n // @ts-ignore: @intlayer/backend is not built yet\n CheckIfUserHasPasswordResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getAuthAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const { backendURL, clientId, clientSecret } = (\n intlayerConfig ?? getConfiguration()\n ).editor;\n const AUTH_API_ROUTE = `${backendURL}/api/auth`;\n\n /**\n * Logs in a user with the provided credentials.\n * @param user - User credentials.\n */\n const login = async (user: LoginBody, otherOptions: FetcherOptions = {}) =>\n await fetcher<LoginResult>(\n `${AUTH_API_ROUTE}/login`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n }\n );\n\n /**\n * Gets the login with GitHub URL.\n * @param params - The parameters for the login with GitHub URL.\n * @returns The login with GitHub URL.\n */\n const getLoginWithGitHubURL = (params: GithubLoginQueryParams): string => {\n const searchParams = new URLSearchParams(params);\n\n return `${AUTH_API_ROUTE}/login/github?${searchParams.toString()}`;\n };\n\n /**\n * Gets the login with Google URL.\n * @param params - The parameters for the login with Google URL.\n * @returns The login with Google URL.\n */\n const getLoginWithGoogleURL = (params: GoogleLoginQueryParams): string => {\n const searchParams = new URLSearchParams(params);\n\n return `${AUTH_API_ROUTE}/login/google?${searchParams.toString()}`;\n };\n\n /**\n * Registers a new user with the provided credentials.\n * @param user - User credentials.\n * @returns User object.\n */\n const register = async (\n user: RegisterBody,\n query: RegisterQuery = {},\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<RegisterResult>(\n `${AUTH_API_ROUTE}/register`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n params: query,\n }\n );\n\n /**\n * Signs out the user.\n * @returns User object.\n */\n const logout = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<void>(\n `${AUTH_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Ask to resets the password of a user with the provided email address.\n * @param email - Email address of the user.\n * @returns User object.\n */\n const askResetPassword = async (\n email: AskResetPasswordBody['email'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AskResetPasswordResult>(\n `${AUTH_API_ROUTE}/password/reset`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { email },\n }\n );\n\n /**\n * Resets the password of a user with the provided email address.\n * @param email - Email address of the user.\n * @returns User object.\n */\n const resetPassword = async (\n params: ResetPasswordParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ResetPasswordResult>(\n `${AUTH_API_ROUTE}/password/reset`,\n authAPIOptions,\n otherOptions,\n { params, method: 'POST' }\n );\n\n /**\n * Changes the password of a user with the provided data.\n * @param data - New password and confirmation.\n * @returns User object.\n */\n const defineNewPassword = async (\n data: DefinePasswordBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DefinePasswordResult>(\n `${AUTH_API_ROUTE}/password/define`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: data,\n }\n );\n\n /**\n * Changes the password of a user with the provided data.\n * @param data - New password and confirmation.\n * @returns User object.\n */\n const changePassword = async (\n data: UpdatePasswordBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdatePasswordResult>(\n `${AUTH_API_ROUTE}/password`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: data,\n }\n );\n\n /**\n * Checks if a user has a password.\n * @param params - User ID.\n * @returns User object.\n */\n const checkIfUserHasPassword = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<CheckIfUserHasPasswordResult>(\n `${AUTH_API_ROUTE}/password/has`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n }\n );\n\n /**\n * Verifies the email address of a user with the provided token.\n * @param params - User ID and secret key.\n * @returns User object.\n */\n const verifyEmail = async (\n { userId, secret }: ValidEmailParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ValidEmailResult>(\n `${AUTH_API_ROUTE}/active/${userId}/${secret}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Gets the verify email status URL to use in the SSE.\n * @param userId - User ID.\n * @returns The verify email status URL.\n */\n const getVerifyEmailStatusURL = (userId: string | UserAPI['_id']) =>\n `${AUTH_API_ROUTE}/verify-email-status/${String(userId)}`;\n\n /**\n * Creates a session for a user.\n * @param params - User ID and secret key.\n * @returns User object.\n */\n const createSession = async (\n data: CreateSessionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CreateSessionResult>(\n `${AUTH_API_ROUTE}/session`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: data,\n }\n );\n\n /**\n * Gets a session and user.\n * @param sessionToken - Session token.\n * @param otherOptions - Fetcher options.\n * @returns Session and user information.\n */\n const getSession = async (\n sessionToken?: GetSessionInformationQuery['session_token'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetSessionInformationResult>(\n `${backendURL}/session`,\n authAPIOptions,\n otherOptions,\n { params: { session_token: sessionToken } }\n );\n\n /**\n * Gets the CSRF token.\n * @param otherOptions - Fetcher options.\n * @returns The CSRF token.\n */\n const getCSRFToken = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<SetCSRFTokenResult>(\n `${backendURL}/csrf-token`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Gets an oAuth2 accessToken\n * @return The token information\n */\n const getOAuth2AccessToken = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetOAuth2TokenResult>(\n `${backendURL}/oauth2/token`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: {\n grant_type: 'client_credentials',\n client_id: clientId!,\n client_secret: clientSecret!,\n } satisfies GetOAuth2TokenBody,\n }\n );\n\n return {\n login,\n getLoginWithGitHubURL,\n getLoginWithGoogleURL,\n register,\n logout,\n resetPassword,\n defineNewPassword,\n askResetPassword,\n checkIfUserHasPassword,\n verifyEmail,\n getVerifyEmailStatusURL,\n changePassword,\n createSession,\n getSession,\n getCSRFToken,\n getOAuth2AccessToken,\n };\n};\n\nexport const authAPI = getAuthAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddDictionaryBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteDictionaryParam,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryParam,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n PushDictionariesBody,\n // @ts-ignore: @intlayer/backend is not built yet\n PushDictionariesResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesKeysResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getDictionaryAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;\n\n /**\n * Retrieves a list of dictionaries based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getDictionaries = async (\n filters?: GetDictionariesParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetDictionariesResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Retrieves a list of dictionary keys related to the project.\n */\n const getDictionariesKeys = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetDictionariesKeysResult>(\n `${PROJECT_API_ROUTE}/keys`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Retrieves a dictionary by its key and version.\n * @param dictionaryKey - Dictionary key.\n * @param version - Dictionary version of content.\n */\n const getDictionary = async (\n dictionaryKey: GetDictionaryParams['dictionaryKey'],\n version?: GetDictionaryQuery['version'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetDictionaryResult>(\n `${PROJECT_API_ROUTE}/${dictionaryKey}`,\n authAPIOptions,\n otherOptions,\n {\n params: version ? { version: version.toString() } : undefined,\n }\n );\n\n /**\n * Adds a new dictionary to the database.\n * @param dictionary - Dictionary data.\n */\n const addDictionary = async (\n body: AddDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n const pushDictionaries = async (\n dictionaries: PushDictionariesBody['dictionaries'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<PushDictionariesResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PATCH',\n body: { dictionaries },\n }\n );\n\n /**\n * Updates an existing dictionary in the database.\n * @param dictionary - Updated dictionary data.\n */\n const updateDictionary = async (\n dictionaryId: UpdateDictionaryParam['dictionaryId'],\n dictionary: UpdateDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateDictionaryResult>(\n `${PROJECT_API_ROUTE}/${dictionaryId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: dictionary,\n }\n );\n\n /**\n * Deletes a dictionary from the database by its ID.\n * @param id - Dictionary ID.\n */\n const deleteDictionary = async (\n id: DeleteDictionaryParam['dictionaryId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n body: { id },\n }\n );\n\n return {\n getDictionaries,\n getDictionariesKeys,\n getDictionary,\n pushDictionaries,\n addDictionary,\n updateDictionary,\n deleteDictionary,\n };\n};\n\nexport const dictionaryAPI = getDictionaryAPI();\n","import {\n getConfiguration as getLocaleConfiguration,\n type IntlayerConfig,\n} from '@intlayer/config/client';\nimport type {\n // @ts-ignore: intlayer-editor is not built yet\n GetConfigurationResult,\n // @ts-ignore: intlayer-editor is not built yet\n WriteContentDeclarationBody,\n // @ts-ignore: intlayer-editor is not built yet\n WriteContentDeclarationResult,\n // @ts-ignore: intlayer-editor is not built yet\n} from 'intlayer-editor';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getEditorAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const { editorURL } = (intlayerConfig ?? getLocaleConfiguration()).editor;\n const EDITOR_API_ROUTE = `${editorURL}/api`;\n\n /**\n * Get the Intlayer configuration\n */\n const getConfiguration = async (\n otherOptions: FetcherOptions = {}\n ): Promise<GetConfigurationResult> => {\n const response = await fetcher<GetConfigurationResult>(\n `${EDITOR_API_ROUTE}/config`,\n authAPIOptions,\n otherOptions\n );\n\n return response.data;\n };\n\n /**\n * Adds a new dictionary to the database.\n * @param dictionary - Dictionary data.\n */\n const writeDictionary = async (\n dictionary: WriteContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) => {\n await fetcher<WriteContentDeclarationResult>(\n `${EDITOR_API_ROUTE}/dictionary`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { dictionary },\n }\n );\n };\n\n return {\n getConfiguration,\n writeDictionary,\n };\n};\n\nexport const editorAPI = getEditorAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationParam,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationsParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationsResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectOrganizationParam,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UnselectOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationMembersBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationMembersResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationMemberBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationMemberResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getOrganizationAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;\n\n /**\n * Retrieves a list of organizations based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getOrganizations = async (\n filters?: GetOrganizationsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetOrganizationsResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Retrieves an organization by its ID.\n * @param organizationId - Organization ID.\n */\n const getOrganization = async (\n organizationId: GetOrganizationParam['organizationId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Adds a new organization to the database.\n * @param organization - Organization data.\n */\n const addOrganization = async (\n organization: AddOrganizationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: organization,\n }\n );\n\n /**\n * Updates an existing organization in the database.\n * @param organization - Updated organization data.\n */\n const updateOrganization = async (\n organization: UpdateOrganizationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: organization,\n }\n );\n\n /**\n * Update members to the organization in the database.\n * @param body - Updated organization members data.\n */\n const updateOrganizationMembers = async (\n body: UpdateOrganizationMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationMembersResult>(\n `${ORGANIZATION_API_ROUTE}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /**\n * Add member to the organization in the database.\n * @param body - Updated organization members data.\n */\n const addOrganizationMember = async (\n body: AddOrganizationMemberBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<AddOrganizationMemberResult>(\n `${ORGANIZATION_API_ROUTE}/member`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Deletes an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const deleteOrganization = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<DeleteOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Select an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const selectOrganization = async (\n organizationId: SelectOrganizationParam['organizationId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SelectOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Unselect an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const unselectOrganization = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<UnselectOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getOrganizations,\n getOrganization,\n addOrganization,\n addOrganizationMember,\n updateOrganization,\n updateOrganizationMembers,\n deleteOrganization,\n selectOrganization,\n unselectOrganization,\n };\n};\n\nexport const organizationAPI = getOrganizationAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddProjectBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetProjectsParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetProjectsResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateProjectBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectProjectParam,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UnselectProjectResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AddNewAccessKeyBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddNewAccessKeyResponse,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteAccessKeyBody,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteAccessKeyResponse,\n // @ts-ignore: @intlayer/backend is not built yet\n RefreshAccessKeyBody,\n // @ts-ignore: @intlayer/backend is not built yet\n RefreshAccessKeyResponse,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateProjectMembersBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateProjectMembersResult,\n // @ts-ignore @intlayer/backend is not build yet\n PushProjectConfigurationBody,\n // @ts-ignore @intlayer/backend is not build yet\n PushProjectConfigurationResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getProjectAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const PROJECT_API_ROUTE = `${backendURL}/api/project`;\n\n /**\n * Retrieves a list of projects based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getProjects = async (\n filters?: GetProjectsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetProjectsResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Adds a new project to the database.\n * @param project - Project data.\n */\n const addProject = async (\n project: AddProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: project,\n }\n );\n\n /**\n * Updates an existing project in the database.\n * @param project - Updated project data.\n */\n const updateProject = async (\n project: UpdateProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: project,\n }\n );\n\n /**\n * Updates project members in the database.\n * @param project - Updated project data.\n */\n const updateProjectMembers = async (\n body: UpdateProjectMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateProjectMembersResult>(\n `${PROJECT_API_ROUTE}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /** Pushes a project configuration to the database.\n * @param projectConfiguration - Project configuration data.\n */\n const pushProjectConfiguration = async (\n projectConfiguration: PushProjectConfigurationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<PushProjectConfigurationResult>(\n `${PROJECT_API_ROUTE}/configuration`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: projectConfiguration,\n }\n );\n\n /**\n * Deletes a project from the database by its ID.\n * @param id - Project ID.\n */\n const deleteProject = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<DeleteProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Select a project from the database by its ID.\n * @param projectId - Organization ID.\n */\n const selectProject = async (\n projectId: SelectProjectParam['projectId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SelectProjectResult>(\n `${PROJECT_API_ROUTE}/${String(projectId)}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Unselect a project from the database by its ID.\n * @param projectId - Project ID.\n */\n const unselectProject = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<UnselectProjectResult>(\n `${PROJECT_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Add a new access key to a project.\n * @param accessKey - Access key data.\n * @param otherOptions - Fetcher options.\n * @returns The new access key.\n */\n const addNewAccessKey = async (\n accessKey: AddNewAccessKeyBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddNewAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: accessKey,\n }\n );\n\n /**\n * Delete a project access key.\n * @param clientId - Access key client ID.\n * @param otherOptions - Fetcher options.\n * @returns The deleted project.\n */\n const deleteAccessKey = async (\n clientId: DeleteAccessKeyBody['clientId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n body: { clientId },\n }\n );\n\n /**\n * Refreshes an access key from a project.\n * @param clientId - The ID of the client to refresh.\n * @param projectId - The ID of the project to refresh the access key from.\n * @returns The new access key.\n */\n const refreshAccessKey = async (\n clientId: RefreshAccessKeyBody['clientId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<RefreshAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PATCH',\n body: { clientId },\n }\n );\n\n return {\n getProjects,\n addProject,\n updateProject,\n updateProjectMembers,\n pushProjectConfiguration,\n deleteProject,\n selectProject,\n unselectProject,\n addNewAccessKey,\n deleteAccessKey,\n refreshAccessKey,\n };\n};\n\nexport const projectAPI = getProjectAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n GetCheckoutSessionBody,\n // @ts-ignore: @intlayer/backend is not built yet\n GetCheckoutSessionResult,\n // @ts-ignore @intlayer/backend is not build yet\n GetPricingBody,\n // @ts-ignore @intlayer/backend is not build yet\n GetPricingResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getStripeAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL = (intlayerConfig ?? getConfiguration()).editor.backendURL;\n const STRIPE_API_ROUTE = `${backendURL}/api/stripe`;\n\n /**\n * Get a pricing plan calculated for a given promotion code.\n * @param body - Pricing plan body.\n */\n const getPricing = async (\n body?: GetPricingBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetPricingResult>(\n `${STRIPE_API_ROUTE}/pricing`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Retrieves a checkout session.\n * @param body - Checkout session body.\n */\n const getSubscription = async (\n body?: GetCheckoutSessionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetCheckoutSessionResult>(\n `${STRIPE_API_ROUTE}/create-subscription`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Cancels a subscription.\n * @param body - Checkout session body.\n */\n const cancelSubscription = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetCheckoutSessionResult>(\n `${STRIPE_API_ROUTE}/cancel-subscription`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getPricing,\n getSubscription,\n cancelSubscription,\n };\n};\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddTagBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddTagResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteTagParams,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteTagResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetTagsParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetTagsResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateTagBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateTagParams,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateTagResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getTagAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const PROJECT_API_ROUTE = `${backendURL}/api/tag`;\n\n /**\n * Retrieves a list of tags based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getTags = async (\n filters?: GetTagsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetTagsResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Adds a new tag to the database.\n * @param tag - Tag data.\n */\n const addTag = async (tag: AddTagBody, otherOptions: FetcherOptions = {}) =>\n await fetcher<AddTagResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: tag,\n }\n );\n\n /**\n * Updates an existing tag in the database.\n * @param tag - Updated tag data.\n */\n const updateTag = async (\n tagId: UpdateTagParams['tagId'],\n tag: UpdateTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateTagResult>(\n `${PROJECT_API_ROUTE}/${tagId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: tag,\n }\n );\n\n /**\n * Deletes a tag from the database by its ID.\n * @param tagId - Tag ID.\n */\n const deleteTag = async (\n tagId: DeleteTagParams['tagId'],\n\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteTagResult>(\n `${PROJECT_API_ROUTE}/${tagId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n return {\n getTags,\n addTag,\n updateTag,\n deleteTag,\n };\n};\n\nexport const tagAPI = getTagAPI();\n","import type {\n // @ts-ignore: @intlayer/backend is not built yet\n CreateUserBody,\n // @ts-ignore: @intlayer/backend is not built yet\n CreateUserResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByAccountParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByAccountResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByEmailParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByEmailResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByIdParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUserByIdResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUsersParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetUsersResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateUserBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateUserResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getUserAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor.backendURL ?? getConfiguration().editor.backendURL;\n const USER_API_ROUTE = `${backendURL}/api/user`;\n\n /**\n * Retrieves a list of users based on filters and pagination.\n * @param filters - Filters and pagination options.\n * @returns List of users.\n */\n const getUsers = async (\n filters?: GetUsersParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUsersResult>(\n USER_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Retrieves a user by ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const getUserById = async (\n userId: GetUserByIdParams['userId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByIdResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Retrieves a user by email.\n * @param email - User email.\n * @returns User object.\n */\n const getUserByEmail = async (\n email: GetUserByEmailParams['email'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByEmailResult>(\n `${USER_API_ROUTE}/email/${email}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Retrieves a user by account.\n * @param providerAccountId - The provider account ID.\n * @param provider - The provider of the account.\n */\n const getUserByAccount = async (\n providerAccountId: GetUserByAccountParams['providerAccountId'],\n provider: GetUserByAccountParams['provider'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByAccountResult>(\n `${USER_API_ROUTE}/account/${provider}/${providerAccountId}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Creates a new user.\n * @param user - User credentials.\n * @returns User object.\n */\n const createUser = async (\n user: CreateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CreateUserResult>(\n `${USER_API_ROUTE}/`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n }\n );\n\n /**\n * Updates the user with the provided data.\n * @param user - Updated user data.\n * @returns User object.\n */\n const updateUser = async (\n user: UpdateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: user,\n }\n );\n\n /**\n * Deletes a user with the provided ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const deleteUser = async (\n userId: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n return {\n createUser,\n getUsers,\n getUserById,\n getUserByAccount,\n getUserByEmail,\n updateUser,\n deleteUser,\n };\n};\n\nexport const userAPI = getUserAPI();\n","import { type IntlayerConfig } from '@intlayer/config/client';\nimport type { FetcherOptions } from '../fetcher';\nimport { getAiAPI } from './ai';\nimport { getAuthAPI } from './auth';\nimport { getDictionaryAPI } from './dictionary';\nimport { getEditorAPI } from './editor';\nimport { getOrganizationAPI } from './organization';\nimport { getProjectAPI } from './project';\nimport { getStripeAPI } from './stripe';\nimport { getTagAPI } from './tag';\nimport { getUserAPI } from './user';\n\nexport const getIntlayerAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => ({\n organization: getOrganizationAPI(authAPIOptions, intlayerConfig),\n project: getProjectAPI(authAPIOptions, intlayerConfig),\n user: getUserAPI(authAPIOptions, intlayerConfig),\n auth: getAuthAPI(authAPIOptions, intlayerConfig),\n dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),\n stripe: getStripeAPI(authAPIOptions, intlayerConfig),\n ai: getAiAPI(authAPIOptions, intlayerConfig),\n tag: getTagAPI(authAPIOptions, intlayerConfig),\n editor: getEditorAPI(authAPIOptions, intlayerConfig),\n});\n\nexport const intlayerAPI = getIntlayerAPI();\n"],"names":["params","otherOptions","getConfiguration","getLocaleConfiguration"],"mappings":";;AAwBO,MAAM,iBAAiC;AAAA,EAC5C,QAAQ;AAAA;AAAA,EACR,SAAS;AAAA,IACP,gBAAgB;AAAA;AAAA,EAClB;AAAA,EACA,aAAa;AACf;AASA,MAAM,kBAAkB,CAAC,QAAgB;AACvC,SAAO,KAAK,GAAG,EAAE,QAAQ,CAAC,QAAQ;AAC5B,QAAA,IAAI,GAAuB,MAAM,QAAW;AAC9C,aAAO,IAAI,GAAuB;AAAA,IAAA;AAAA,EACpC,CACD;AACM,SAAA;AACT;AAUA,MAAM,YAAY,CAAmB,YACnC,QAAQ,OAAO,CAAC,KAAK,QAAQ;AACrB,QAAA,OAAW,OAAO,CAAC;AACzB,QAAM,OAAU,gBAAgB,OAAO,EAAE;AAEzC,MAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;AAExD,WAAO,EAAE,GAAG,MAAM,GAAG,KAAK;AAAA,EAAA;AAI5B,SAAO,QAAQ;AACjB,GAAG,EAAO;AAiDC,MAAA,UAAU,OACrB,QACG,YACY;AACf,QAAM,EAAE,WAAW,IAAI,gBAAgB;AAGvC,MAAI,eAAe;AACnB,MAAI,aAAiC;AAGrC,QAAM,eAAe,QAAQ;AAAA,IAC3B,CAAC,EAAE,MAAM,QAAAA,SAAQ,SAAS,GAAGC,oBAAmBA;AAAAA,EAClD;AAGA,QAAM,gBAAgB,UAAU,CAAC,gBAAgB,GAAG,YAAY,CAAC;AAGjE,QAAM,gBAAgB,UAAU;AAAA,IAC9B,eAAe;AAAA,IACf,G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