@intlayer/design-system 3.5.5 → 3.5.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 +241 -17
- package/dist/CodeBlockShiki-BlmZyrr7.cjs +29 -0
- package/dist/CodeBlockShiki-BlmZyrr7.cjs.map +1 -0
- package/dist/CodeBlockShiki-CcpV9SVi.js +29 -0
- package/dist/CodeBlockShiki-CcpV9SVi.js.map +1 -0
- package/dist/Form-BB0kpER9.cjs +301 -0
- package/dist/Form-BB0kpER9.cjs.map +1 -0
- package/dist/Form-BDcoNTLV.cjs.map +1 -1
- package/dist/Form-DGLgTAdY.js +302 -0
- package/dist/Form-DGLgTAdY.js.map +1 -0
- package/dist/Form-DhsgC7kB.js.map +1 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +11 -11
- package/dist/components/Breadcrumb/index.cjs +5 -2
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +5 -2
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/ClickOutsideDiv/index.cjs +26 -0
- package/dist/components/ClickOutsideDiv/index.cjs.map +1 -0
- package/dist/components/ClickOutsideDiv/index.d.ts +6 -0
- package/dist/components/ClickOutsideDiv/index.d.ts.map +1 -0
- package/dist/components/ClickOutsideDiv/index.mjs +26 -0
- package/dist/components/ClickOutsideDiv/index.mjs.map +1 -0
- package/dist/components/ContentEditor/ContentEditorCode.cjs +78 -0
- package/dist/components/ContentEditor/ContentEditorCode.cjs.map +1 -0
- package/dist/components/ContentEditor/ContentEditorCode.d.ts +11 -0
- package/dist/components/ContentEditor/ContentEditorCode.d.ts.map +1 -0
- package/dist/components/ContentEditor/ContentEditorCode.mjs +78 -0
- package/dist/components/ContentEditor/ContentEditorCode.mjs.map +1 -0
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +30 -26
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +2 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +30 -26
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +3 -3
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +3 -3
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +4 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +4 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +161 -69
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +163 -71
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +123 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +14 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +123 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +9 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +15 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +15 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +6 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +9 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +12 -4
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +12 -4
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +7 -5
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +7 -5
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +117 -55
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts +4 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +115 -53
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts +8 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts +13 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts +9 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +10 -10
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +10 -10
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +23 -10
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +23 -10
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +2 -4
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +3 -5
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +13 -13
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +13 -13
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +73 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts +7 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +73 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +37 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts +14 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +37 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs +8 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts +3 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs +8 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs +54 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +10 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs +55 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/index.cjs +5 -0
- package/dist/components/DictionaryFieldEditor/index.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/index.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/index.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/index.mjs +6 -1
- package/dist/components/DictionaryFieldEditor/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.cjs +5 -1
- package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs +6 -2
- package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -8
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -8
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Form/FormLabel.cjs +6 -2
- 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 +6 -2
- package/dist/components/Form/FormLabel.mjs.map +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/EditableFieldTextAreaElement.d.ts +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
- package/dist/components/Form/elements/SelectElement.d.ts.map +1 -1
- package/dist/components/IDE/Code.cjs +77 -0
- package/dist/components/IDE/Code.cjs.map +1 -0
- package/dist/components/IDE/Code.d.ts +18 -0
- package/dist/components/IDE/Code.d.ts.map +1 -0
- package/dist/components/IDE/Code.mjs +77 -0
- package/dist/components/IDE/Code.mjs.map +1 -0
- package/dist/components/IDE/CodeBlock.cjs +54 -0
- package/dist/components/IDE/CodeBlock.cjs.map +1 -0
- package/dist/components/IDE/CodeBlock.d.ts +12 -0
- package/dist/components/IDE/CodeBlock.d.ts.map +1 -0
- package/dist/components/IDE/CodeBlock.mjs +54 -0
- package/dist/components/IDE/CodeBlock.mjs.map +1 -0
- package/dist/components/IDE/CodeBlockClient.cjs +55 -0
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -0
- package/dist/components/IDE/CodeBlockClient.mjs +55 -0
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -0
- package/dist/components/IDE/CodeBlockLoader.cjs +28 -0
- package/dist/components/IDE/CodeBlockLoader.cjs.map +1 -0
- package/dist/components/IDE/CodeBlockLoader.d.ts +4 -0
- package/dist/components/IDE/CodeBlockLoader.d.ts.map +1 -0
- package/dist/components/IDE/CodeBlockLoader.mjs +28 -0
- package/dist/components/IDE/CodeBlockLoader.mjs.map +1 -0
- package/dist/components/IDE/CodeBlockServer.cjs +53 -0
- package/dist/components/IDE/CodeBlockServer.cjs.map +1 -0
- package/dist/components/IDE/CodeBlockServer.d.ts +12 -0
- package/dist/components/IDE/CodeBlockServer.d.ts.map +1 -0
- package/dist/components/IDE/CodeBlockServer.mjs +53 -0
- package/dist/components/IDE/CodeBlockServer.mjs.map +1 -0
- package/dist/components/IDE/CodeBlockShiki.d.ts +3 -0
- package/dist/components/IDE/CodeBlockShiki.d.ts.map +1 -0
- package/dist/components/IDE/CodeBlockclient.d.ts +12 -0
- package/dist/components/IDE/CodeBlockclient.d.ts.map +1 -0
- package/dist/components/IDE/CodeConditionalRenderer.cjs +20 -0
- package/dist/components/IDE/CodeConditionalRenderer.cjs.map +1 -0
- package/dist/components/IDE/CodeConditionalRenderer.d.ts +4 -0
- package/dist/components/IDE/CodeConditionalRenderer.d.ts.map +1 -0
- package/dist/components/IDE/CodeConditionalRenderer.mjs +20 -0
- package/dist/components/IDE/CodeConditionalRenderer.mjs.map +1 -0
- package/dist/components/IDE/CodeContext.cjs +57 -0
- package/dist/components/IDE/CodeContext.cjs.map +1 -0
- package/dist/components/IDE/CodeContext.d.ts +26 -0
- package/dist/components/IDE/CodeContext.d.ts.map +1 -0
- package/dist/components/IDE/CodeContext.mjs +57 -0
- package/dist/components/IDE/CodeContext.mjs.map +1 -0
- package/dist/components/IDE/CodeFormatSelector.cjs +30 -0
- package/dist/components/IDE/CodeFormatSelector.cjs.map +1 -0
- package/dist/components/IDE/CodeFormatSelector.d.ts +3 -0
- package/dist/components/IDE/CodeFormatSelector.d.ts.map +1 -0
- package/dist/components/IDE/CodeFormatSelector.mjs +30 -0
- package/dist/components/IDE/CodeFormatSelector.mjs.map +1 -0
- package/dist/components/IDE/CodeRenderer.cjs +27 -0
- package/dist/components/IDE/CodeRenderer.cjs.map +1 -0
- package/dist/components/IDE/CodeRenderer.d.ts +5 -0
- package/dist/components/IDE/CodeRenderer.d.ts.map +1 -0
- package/dist/components/IDE/CodeRenderer.mjs +27 -0
- package/dist/components/IDE/CodeRenderer.mjs.map +1 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.cjs +28 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.cjs.map +1 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts +3 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts.map +1 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.mjs +28 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -0
- package/dist/components/IDE/EditableCodeBlock.d.ts +9 -0
- package/dist/components/IDE/EditableCodeBlock.d.ts.map +1 -0
- package/dist/components/IDE/MarkDownRender.cjs +2 -3
- package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
- package/dist/components/IDE/MarkDownRender.mjs +1 -2
- package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/components/IDE/PackageManagerSelector.cjs +20 -0
- package/dist/components/IDE/PackageManagerSelector.cjs.map +1 -0
- package/dist/components/IDE/PackageManagerSelector.d.ts +3 -0
- package/dist/components/IDE/PackageManagerSelector.d.ts.map +1 -0
- package/dist/components/IDE/PackageManagerSelector.mjs +20 -0
- package/dist/components/IDE/PackageManagerSelector.mjs.map +1 -0
- package/dist/components/IDE/index.cjs +2 -2
- package/dist/components/IDE/index.d.ts +1 -1
- package/dist/components/IDE/index.d.ts.map +1 -1
- package/dist/components/IDE/index.mjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts +13 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +218 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts +8 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +218 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +42 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts +15 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +42 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.cjs +8 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.cjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.d.ts +3 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.mjs +8 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.mjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs +118 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +18 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +119 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -0
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +14 -22
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +14 -22
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs +20 -26
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts +2 -0
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +20 -26
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +3 -3
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +3 -3
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +4 -0
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +5 -1
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/index.cjs +16 -4
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +15 -3
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +8 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +9 -2
- package/dist/hooks/intlayerAPIHooks.cjs +80 -5
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +12 -2
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +80 -5
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +1 -5
- 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 +1 -5
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.cjs +4 -2
- package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.d.ts +4 -1
- package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
- package/dist/hooks/useGetAllDictionaries.mjs +4 -2
- package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +11 -2
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/usePersistedStore.cjs +17 -5
- package/dist/hooks/usePersistedStore.cjs.map +1 -1
- package/dist/hooks/usePersistedStore.d.ts.map +1 -1
- package/dist/hooks/usePersistedStore.mjs +17 -5
- package/dist/hooks/usePersistedStore.mjs.map +1 -1
- package/dist/libs/intlayer-api/ai.cjs +33 -3
- package/dist/libs/intlayer-api/ai.cjs.map +1 -1
- package/dist/libs/intlayer-api/ai.d.ts +9 -3
- package/dist/libs/intlayer-api/ai.d.ts.map +1 -1
- package/dist/libs/intlayer-api/ai.mjs +33 -3
- package/dist/libs/intlayer-api/ai.mjs.map +1 -1
- package/dist/libs/intlayer-api/dictionary.cjs +2 -2
- package/dist/libs/intlayer-api/dictionary.cjs.map +1 -1
- package/dist/libs/intlayer-api/dictionary.d.ts +3 -3
- package/dist/libs/intlayer-api/dictionary.d.ts.map +1 -1
- package/dist/libs/intlayer-api/dictionary.mjs +2 -2
- package/dist/libs/intlayer-api/dictionary.mjs.map +1 -1
- package/dist/libs/intlayer-api/index.cjs +3 -1
- package/dist/libs/intlayer-api/index.cjs.map +1 -1
- package/dist/libs/intlayer-api/index.d.ts +22 -4
- package/dist/libs/intlayer-api/index.d.ts.map +1 -1
- package/dist/libs/intlayer-api/index.mjs +3 -1
- package/dist/libs/intlayer-api/index.mjs.map +1 -1
- package/dist/libs/intlayer-api/tag.cjs +52 -0
- package/dist/libs/intlayer-api/tag.cjs.map +1 -0
- package/dist/libs/intlayer-api/tag.d.ts +16 -0
- package/dist/libs/intlayer-api/tag.d.ts.map +1 -0
- package/dist/libs/intlayer-api/tag.mjs +52 -0
- package/dist/libs/intlayer-api/tag.mjs.map +1 -0
- package/dist/tailwind.css +1 -1
- package/package.json +13 -14
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult } from '@intlayer/backend';
|
|
2
2
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
3
3
|
import { FetcherOptions } from './fetcher';
|
|
4
4
|
export declare const getAiAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
5
|
-
|
|
5
|
+
auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
|
|
6
|
+
auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
|
|
7
|
+
auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
|
|
8
|
+
auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
|
|
6
9
|
};
|
|
7
10
|
export declare const userAPI: {
|
|
8
|
-
|
|
11
|
+
auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
|
|
12
|
+
auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
|
|
13
|
+
auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
|
|
14
|
+
auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
|
|
9
15
|
};
|
|
10
16
|
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/libs/intlayer-api/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/libs/intlayer-api/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,EACnC,qCAAqC,EACrC,6BAA6B,EAC7B,YAAY,EACZ,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,QAAQ,oBACH,cAAc,mBACb,cAAc;qCAWtB,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;CAkB/B,CAAC;AAEF,eAAO,MAAM,OAAO;qCA9ET,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;CAoBC,CAAC"}
|
|
@@ -3,8 +3,35 @@ import { fetcher } from "./fetcher.mjs";
|
|
|
3
3
|
const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
4
4
|
const { backendURL } = (intlayerConfig ?? getConfiguration()).editor;
|
|
5
5
|
const AI_API_ROUTE = `${backendURL}/api/ai`;
|
|
6
|
-
const
|
|
7
|
-
`${AI_API_ROUTE}/audit`,
|
|
6
|
+
const auditContentDeclaration = async (body, otherOptions = {}) => await fetcher(
|
|
7
|
+
`${AI_API_ROUTE}/audit/content-declaration`,
|
|
8
|
+
authAPIOptions,
|
|
9
|
+
otherOptions,
|
|
10
|
+
{
|
|
11
|
+
method: "POST",
|
|
12
|
+
body
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
const auditContentDeclarationField = async (body, otherOptions = {}) => await fetcher(
|
|
16
|
+
`${AI_API_ROUTE}/audit/content-declaration/field`,
|
|
17
|
+
authAPIOptions,
|
|
18
|
+
otherOptions,
|
|
19
|
+
{
|
|
20
|
+
method: "POST",
|
|
21
|
+
body
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
const auditContentDeclarationMetadata = async (body, otherOptions = {}) => await fetcher(
|
|
25
|
+
`${AI_API_ROUTE}/audit/content-declaration/metadata`,
|
|
26
|
+
authAPIOptions,
|
|
27
|
+
otherOptions,
|
|
28
|
+
{
|
|
29
|
+
method: "POST",
|
|
30
|
+
body
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
const auditTag = async (body, otherOptions = {}) => await fetcher(
|
|
34
|
+
`${AI_API_ROUTE}/audit/tag`,
|
|
8
35
|
authAPIOptions,
|
|
9
36
|
otherOptions,
|
|
10
37
|
{
|
|
@@ -13,7 +40,10 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
13
40
|
}
|
|
14
41
|
);
|
|
15
42
|
return {
|
|
16
|
-
|
|
43
|
+
auditContentDeclaration,
|
|
44
|
+
auditContentDeclarationField,
|
|
45
|
+
auditContentDeclarationMetadata,
|
|
46
|
+
auditTag
|
|
17
47
|
};
|
|
18
48
|
};
|
|
19
49
|
const userAPI = getAiAPI();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.mjs","sources":["../../../src/libs/intlayer-api/ai.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"ai.mjs","sources":["../../../src/libs/intlayer-api/ai.ts"],"sourcesContent":["import type {\n AuditContentDeclarationBody,\n AuditContentDeclarationFieldBody,\n AuditContentDeclarationFieldResult,\n AuditContentDeclarationMetadataBody,\n AuditContentDeclarationMetadataResult,\n AuditContentDeclarationResult,\n AuditTagBody,\n AuditTagResult,\n} from '@intlayer/backend';\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 } = (intlayerConfig ?? getConfiguration()).editor;\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/content-declaration`,\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/content-declaration/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/content-declaration/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 return {\n auditContentDeclaration,\n auditContentDeclarationField,\n auditContentDeclarationMetadata,\n auditTag,\n };\n};\n\nexport const userAPI = getAiAPI();\n"],"names":[],"mappings":";;AAaO,MAAM,WAAW,CACtB,iBAAiC,IACjC,mBACG;AACH,QAAM,EAAE,WAAgB,KAAA,kBAAkB,iBAAoB,GAAA;AACxD,QAAA,eAAe,GAAG,UAAU;AAOlC,QAAM,0BAA0B,OAC9B,MACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AAOF,QAAM,+BAA+B,OACnC,MACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AAOF,QAAM,kCAAkC,OACtC,MACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AAOF,QAAM,WAAW,OACf,MACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AAEK,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,UAAU,SAAS;"}
|
|
@@ -44,8 +44,8 @@ const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
44
44
|
body: { dictionaries }
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
const updateDictionary = async (dictionary, otherOptions = {}) => await libs_intlayerApi_fetcher.fetcher(
|
|
48
|
-
`${PROJECT_API_ROUTE}`,
|
|
47
|
+
const updateDictionary = async (dictionaryId, dictionary, otherOptions = {}) => await libs_intlayerApi_fetcher.fetcher(
|
|
48
|
+
`${PROJECT_API_ROUTE}/${dictionaryId}`,
|
|
49
49
|
authAPIOptions,
|
|
50
50
|
otherOptions,
|
|
51
51
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.cjs","sources":["../../../src/libs/intlayer-api/dictionary.ts"],"sourcesContent":["import type {\n AddDictionaryBody,\n AddDictionaryResult,\n DeleteDictionaryParam,\n DeleteDictionaryResult,\n GetDictionariesParams,\n GetDictionariesResult,\n UpdateDictionaryBody,\n UpdateDictionaryResult,\n PushDictionariesBody,\n PushDictionariesResult,\n GetDictionaryParams,\n GetDictionaryQuery,\n GetDictionaryResult,\n GetDictionariesKeysResult,\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 } = (intlayerConfig ?? getConfiguration()).editor;\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 dictionary: AddDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: dictionary,\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 dictionary: UpdateDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\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"],"names":["getConfiguration","fetcher"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"dictionary.cjs","sources":["../../../src/libs/intlayer-api/dictionary.ts"],"sourcesContent":["import type {\n AddDictionaryBody,\n AddDictionaryResult,\n DeleteDictionaryParam,\n DeleteDictionaryResult,\n GetDictionariesParams,\n GetDictionariesResult,\n UpdateDictionaryParam,\n UpdateDictionaryBody,\n UpdateDictionaryResult,\n PushDictionariesBody,\n PushDictionariesResult,\n GetDictionaryParams,\n GetDictionaryQuery,\n GetDictionaryResult,\n GetDictionariesKeysResult,\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 } = (intlayerConfig ?? getConfiguration()).editor;\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 dictionary: AddDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: dictionary,\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"],"names":["getConfiguration","fetcher"],"mappings":";;;;AAoBO,MAAM,mBAAmB,CAC9B,iBAAiC,IACjC,mBACG;AACH,QAAM,EAAE,WAAgB,KAAA,kBAAkBA,OAAAA,iBAAoB,GAAA;AACxD,QAAA,oBAAoB,GAAG,UAAU;AAMvC,QAAM,kBAAkB,OACtB,SACA,eAA+B,CAAA,MAE/B,MAAMC,yBAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAKF,QAAM,sBAAsB,OAAO,eAA+B,CAAA,MAChE,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,EACF;AAOF,QAAM,gBAAgB,OACpB,eACA,SACA,eAA+B,OAE/B,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB,IAAI,aAAa;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ,UAAU,EAAE,SAAS,QAAQ,eAAe;AAAA,IAAA;AAAA,EAExD;AAMF,QAAM,gBAAgB,OACpB,YACA,eAA+B,CAAA,MAE/B,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EAEV;AAEF,QAAM,mBAAmB,OACvB,cACA,eAA+B,CAAA,MAE/B,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM,EAAE,aAAa;AAAA,IAAA;AAAA,EAEzB;AAMF,QAAM,mBAAmB,OACvB,cACA,YACA,eAA+B,OAE/B,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB,IAAI,YAAY;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EAEV;AAMF,QAAM,mBAAmB,OACvB,IACA,eAA+B,CAAA,MAE/B,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM,EAAE,GAAG;AAAA,IAAA;AAAA,EAEf;AAEK,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,gBAAgB,iBAAiB;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddDictionaryBody, AddDictionaryResult, DeleteDictionaryParam, DeleteDictionaryResult, GetDictionariesParams, GetDictionariesResult, UpdateDictionaryBody, UpdateDictionaryResult, PushDictionariesBody, PushDictionariesResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetDictionariesKeysResult } from '@intlayer/backend';
|
|
1
|
+
import { AddDictionaryBody, AddDictionaryResult, DeleteDictionaryParam, DeleteDictionaryResult, GetDictionariesParams, GetDictionariesResult, UpdateDictionaryParam, UpdateDictionaryBody, UpdateDictionaryResult, PushDictionariesBody, PushDictionariesResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetDictionariesKeysResult } from '@intlayer/backend';
|
|
2
2
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
3
3
|
import { FetcherOptions } from './fetcher';
|
|
4
4
|
export declare const getDictionaryAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
@@ -7,7 +7,7 @@ export declare const getDictionaryAPI: (authAPIOptions?: FetcherOptions, intlaye
|
|
|
7
7
|
getDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
|
|
8
8
|
pushDictionaries: (dictionaries: PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
|
|
9
9
|
addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
|
|
10
|
-
updateDictionary: (dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
|
|
10
|
+
updateDictionary: (dictionaryId: UpdateDictionaryParam["dictionaryId"], dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
|
|
11
11
|
deleteDictionary: (id: DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
|
|
12
12
|
};
|
|
13
13
|
export declare const dictionaryAPI: {
|
|
@@ -16,7 +16,7 @@ export declare const dictionaryAPI: {
|
|
|
16
16
|
getDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
|
|
17
17
|
pushDictionaries: (dictionaries: PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
|
|
18
18
|
addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
|
|
19
|
-
updateDictionary: (dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
|
|
19
|
+
updateDictionary: (dictionaryId: UpdateDictionaryParam["dictionaryId"], dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
|
|
20
20
|
deleteDictionary: (id: DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=dictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/libs/intlayer-api/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,gBAAgB,oBACX,cAAc,mBACb,cAAc;gCAUnB,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;gCAfhB,iBAAiB,iBACf,cAAc;
|
|
1
|
+
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/libs/intlayer-api/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,gBAAgB,oBACX,cAAc,mBACb,cAAc;gCAUnB,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;gCAfhB,iBAAiB,iBACf,cAAc;qCA+Bd,qBAAqB,CAAC,cAAc,CAAC,cACvC,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAqB/B,CAAC;AAEF,eAAO,MAAM,aAAa;gCAzHZ,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;gCAfhB,iBAAiB,iBACf,cAAc;qCA+Bd,qBAAqB,CAAC,cAAc,CAAC,cACvC,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAuBe,CAAC"}
|
|
@@ -42,8 +42,8 @@ const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
42
42
|
body: { dictionaries }
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
const updateDictionary = async (dictionary, otherOptions = {}) => await fetcher(
|
|
46
|
-
`${PROJECT_API_ROUTE}`,
|
|
45
|
+
const updateDictionary = async (dictionaryId, dictionary, otherOptions = {}) => await fetcher(
|
|
46
|
+
`${PROJECT_API_ROUTE}/${dictionaryId}`,
|
|
47
47
|
authAPIOptions,
|
|
48
48
|
otherOptions,
|
|
49
49
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.mjs","sources":["../../../src/libs/intlayer-api/dictionary.ts"],"sourcesContent":["import type {\n AddDictionaryBody,\n AddDictionaryResult,\n DeleteDictionaryParam,\n DeleteDictionaryResult,\n GetDictionariesParams,\n GetDictionariesResult,\n UpdateDictionaryBody,\n UpdateDictionaryResult,\n PushDictionariesBody,\n PushDictionariesResult,\n GetDictionaryParams,\n GetDictionaryQuery,\n GetDictionaryResult,\n GetDictionariesKeysResult,\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 } = (intlayerConfig ?? getConfiguration()).editor;\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 dictionary: AddDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: dictionary,\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 dictionary: UpdateDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\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"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"dictionary.mjs","sources":["../../../src/libs/intlayer-api/dictionary.ts"],"sourcesContent":["import type {\n AddDictionaryBody,\n AddDictionaryResult,\n DeleteDictionaryParam,\n DeleteDictionaryResult,\n GetDictionariesParams,\n GetDictionariesResult,\n UpdateDictionaryParam,\n UpdateDictionaryBody,\n UpdateDictionaryResult,\n PushDictionariesBody,\n PushDictionariesResult,\n GetDictionaryParams,\n GetDictionaryQuery,\n GetDictionaryResult,\n GetDictionariesKeysResult,\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 } = (intlayerConfig ?? getConfiguration()).editor;\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 dictionary: AddDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: dictionary,\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"],"names":[],"mappings":";;AAoBO,MAAM,mBAAmB,CAC9B,iBAAiC,IACjC,mBACG;AACH,QAAM,EAAE,WAAgB,KAAA,kBAAkB,iBAAoB,GAAA;AACxD,QAAA,oBAAoB,GAAG,UAAU;AAMvC,QAAM,kBAAkB,OACtB,SACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAKF,QAAM,sBAAsB,OAAO,eAA+B,CAAA,MAChE,MAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,EACF;AAOF,QAAM,gBAAgB,OACpB,eACA,SACA,eAA+B,OAE/B,MAAM;AAAA,IACJ,GAAG,iBAAiB,IAAI,aAAa;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ,UAAU,EAAE,SAAS,QAAQ,eAAe;AAAA,IAAA;AAAA,EAExD;AAMF,QAAM,gBAAgB,OACpB,YACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EAEV;AAEF,QAAM,mBAAmB,OACvB,cACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM,EAAE,aAAa;AAAA,IAAA;AAAA,EAEzB;AAMF,QAAM,mBAAmB,OACvB,cACA,YACA,eAA+B,OAE/B,MAAM;AAAA,IACJ,GAAG,iBAAiB,IAAI,YAAY;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EAEV;AAMF,QAAM,mBAAmB,OACvB,IACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM,EAAE,GAAG;AAAA,IAAA;AAAA,EAEf;AAEK,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,gBAAgB,iBAAiB;"}
|
|
@@ -6,6 +6,7 @@ const libs_intlayerApi_dictionary = require("./dictionary.cjs");
|
|
|
6
6
|
const libs_intlayerApi_organization = require("./organization.cjs");
|
|
7
7
|
const libs_intlayerApi_project = require("./project.cjs");
|
|
8
8
|
const libs_intlayerApi_stripe = require("./stripe.cjs");
|
|
9
|
+
const libs_intlayerApi_tag = require("./tag.cjs");
|
|
9
10
|
const libs_intlayerApi_user = require("./user.cjs");
|
|
10
11
|
const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
11
12
|
organization: libs_intlayerApi_organization.getOrganizationAPI(authAPIOptions, intlayerConfig),
|
|
@@ -14,7 +15,8 @@ const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
|
14
15
|
auth: libs_intlayerApi_auth.getAuthAPI(authAPIOptions, intlayerConfig),
|
|
15
16
|
dictionary: libs_intlayerApi_dictionary.getDictionaryAPI(authAPIOptions, intlayerConfig),
|
|
16
17
|
stripe: libs_intlayerApi_stripe.getStripeAPI(authAPIOptions, intlayerConfig),
|
|
17
|
-
ai: libs_intlayerApi_ai.getAiAPI(authAPIOptions, intlayerConfig)
|
|
18
|
+
ai: libs_intlayerApi_ai.getAiAPI(authAPIOptions, intlayerConfig),
|
|
19
|
+
tag: libs_intlayerApi_tag.getTagAPI(authAPIOptions, intlayerConfig)
|
|
18
20
|
});
|
|
19
21
|
const intlayerAPI = getIntlayerAPI();
|
|
20
22
|
exports.getIntlayerAPI = getIntlayerAPI;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/libs/intlayer-api/index.ts"],"sourcesContent":["import { type IntlayerConfig } from '@intlayer/config/client';\nimport { getAiAPI } from './ai';\nimport { getAuthAPI } from './auth';\nimport { getDictionaryAPI } from './dictionary';\nimport type { FetcherOptions } from './fetcher';\nimport { getOrganizationAPI } from './organization';\nimport { getProjectAPI } from './project';\nimport { getStripeAPI } from './stripe';\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});\n\nexport const intlayerAPI = getIntlayerAPI();\n"],"names":["getOrganizationAPI","getProjectAPI","getUserAPI","getAuthAPI","getDictionaryAPI","getStripeAPI","getAiAPI"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/libs/intlayer-api/index.ts"],"sourcesContent":["import { type IntlayerConfig } from '@intlayer/config/client';\nimport { getAiAPI } from './ai';\nimport { getAuthAPI } from './auth';\nimport { getDictionaryAPI } from './dictionary';\nimport type { FetcherOptions } from './fetcher';\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});\n\nexport const intlayerAPI = getIntlayerAPI();\n"],"names":["getOrganizationAPI","getProjectAPI","getUserAPI","getAuthAPI","getDictionaryAPI","getStripeAPI","getAiAPI","getTagAPI"],"mappings":";;;;;;;;;;AAWO,MAAM,iBAAiB,CAC5B,iBAAiC,IACjC,oBACI;AAAA,EACJ,cAAcA,8BAAAA,mBAAmB,gBAAgB,cAAc;AAAA,EAC/D,SAASC,yBAAAA,cAAc,gBAAgB,cAAc;AAAA,EACrD,MAAMC,sBAAAA,WAAW,gBAAgB,cAAc;AAAA,EAC/C,MAAMC,sBAAAA,WAAW,gBAAgB,cAAc;AAAA,EAC/C,YAAYC,4BAAAA,iBAAiB,gBAAgB,cAAc;AAAA,EAC3D,QAAQC,wBAAAA,aAAa,gBAAgB,cAAc;AAAA,EACnD,IAAIC,oBAAAA,SAAS,gBAAgB,cAAc;AAAA,EAC3C,KAAKC,qBAAAA,UAAU,gBAAgB,cAAc;AAC/C;AAEO,MAAM,cAAc,eAAe;;;"}
|
|
@@ -56,7 +56,7 @@ export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerC
|
|
|
56
56
|
getDictionary: (dictionaryKey: import('@intlayer/backend').GetDictionaryParams["dictionaryKey"], version?: import('@intlayer/backend').GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetDictionaryResult>;
|
|
57
57
|
pushDictionaries: (dictionaries: import('@intlayer/backend').PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').PushDictionariesResult>;
|
|
58
58
|
addDictionary: (dictionary: import('@intlayer/backend').AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddDictionaryResult>;
|
|
59
|
-
updateDictionary: (dictionary: import('@intlayer/backend').UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateDictionaryResult>;
|
|
59
|
+
updateDictionary: (dictionaryId: import('@intlayer/backend').UpdateDictionaryParam["dictionaryId"], dictionary: import('@intlayer/backend').UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateDictionaryResult>;
|
|
60
60
|
deleteDictionary: (id: import('@intlayer/backend').DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteDictionaryResult>;
|
|
61
61
|
};
|
|
62
62
|
stripe: {
|
|
@@ -64,7 +64,16 @@ export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerC
|
|
|
64
64
|
cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetCheckoutSessionResult>;
|
|
65
65
|
};
|
|
66
66
|
ai: {
|
|
67
|
-
|
|
67
|
+
auditContentDeclaration: (body?: import('@intlayer/backend').AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationResult>;
|
|
68
|
+
auditContentDeclarationField: (body?: import('@intlayer/backend').AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationFieldResult>;
|
|
69
|
+
auditContentDeclarationMetadata: (body?: import('@intlayer/backend').AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationMetadataResult>;
|
|
70
|
+
auditTag: (body?: import('@intlayer/backend').AuditTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditTagResult>;
|
|
71
|
+
};
|
|
72
|
+
tag: {
|
|
73
|
+
getTags: (filters?: import('@intlayer/backend').GetTagsParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetTagsResult>;
|
|
74
|
+
addTag: (tag: import('@intlayer/backend').AddTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddTagResult>;
|
|
75
|
+
updateTag: (tagId: import('@intlayer/backend').UpdateTagParams["tagId"], tag: import('@intlayer/backend').UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateTagResult>;
|
|
76
|
+
deleteTag: (tagId: import('@intlayer/backend').DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteTagResult>;
|
|
68
77
|
};
|
|
69
78
|
};
|
|
70
79
|
export declare const intlayerAPI: {
|
|
@@ -123,7 +132,7 @@ export declare const intlayerAPI: {
|
|
|
123
132
|
getDictionary: (dictionaryKey: import('@intlayer/backend').GetDictionaryParams["dictionaryKey"], version?: import('@intlayer/backend').GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetDictionaryResult>;
|
|
124
133
|
pushDictionaries: (dictionaries: import('@intlayer/backend').PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').PushDictionariesResult>;
|
|
125
134
|
addDictionary: (dictionary: import('@intlayer/backend').AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddDictionaryResult>;
|
|
126
|
-
updateDictionary: (dictionary: import('@intlayer/backend').UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateDictionaryResult>;
|
|
135
|
+
updateDictionary: (dictionaryId: import('@intlayer/backend').UpdateDictionaryParam["dictionaryId"], dictionary: import('@intlayer/backend').UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateDictionaryResult>;
|
|
127
136
|
deleteDictionary: (id: import('@intlayer/backend').DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteDictionaryResult>;
|
|
128
137
|
};
|
|
129
138
|
stripe: {
|
|
@@ -131,7 +140,16 @@ export declare const intlayerAPI: {
|
|
|
131
140
|
cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetCheckoutSessionResult>;
|
|
132
141
|
};
|
|
133
142
|
ai: {
|
|
134
|
-
|
|
143
|
+
auditContentDeclaration: (body?: import('@intlayer/backend').AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationResult>;
|
|
144
|
+
auditContentDeclarationField: (body?: import('@intlayer/backend').AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationFieldResult>;
|
|
145
|
+
auditContentDeclarationMetadata: (body?: import('@intlayer/backend').AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationMetadataResult>;
|
|
146
|
+
auditTag: (body?: import('@intlayer/backend').AuditTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditTagResult>;
|
|
147
|
+
};
|
|
148
|
+
tag: {
|
|
149
|
+
getTags: (filters?: import('@intlayer/backend').GetTagsParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetTagsResult>;
|
|
150
|
+
addTag: (tag: import('@intlayer/backend').AddTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddTagResult>;
|
|
151
|
+
updateTag: (tagId: import('@intlayer/backend').UpdateTagParams["tagId"], tag: import('@intlayer/backend').UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateTagResult>;
|
|
152
|
+
deleteTag: (tagId: import('@intlayer/backend').DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteTagResult>;
|
|
135
153
|
};
|
|
136
154
|
};
|
|
137
155
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/libs/intlayer-api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/libs/intlayer-api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAOhD,eAAO,MAAM,cAAc,oBACT,cAAc,mBACb,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU/B,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmB,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { getDictionaryAPI } from "./dictionary.mjs";
|
|
|
4
4
|
import { getOrganizationAPI } from "./organization.mjs";
|
|
5
5
|
import { getProjectAPI } from "./project.mjs";
|
|
6
6
|
import { getStripeAPI } from "./stripe.mjs";
|
|
7
|
+
import { getTagAPI } from "./tag.mjs";
|
|
7
8
|
import { getUserAPI } from "./user.mjs";
|
|
8
9
|
const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
9
10
|
organization: getOrganizationAPI(authAPIOptions, intlayerConfig),
|
|
@@ -12,7 +13,8 @@ const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
|
12
13
|
auth: getAuthAPI(authAPIOptions, intlayerConfig),
|
|
13
14
|
dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),
|
|
14
15
|
stripe: getStripeAPI(authAPIOptions, intlayerConfig),
|
|
15
|
-
ai: getAiAPI(authAPIOptions, intlayerConfig)
|
|
16
|
+
ai: getAiAPI(authAPIOptions, intlayerConfig),
|
|
17
|
+
tag: getTagAPI(authAPIOptions, intlayerConfig)
|
|
16
18
|
});
|
|
17
19
|
const intlayerAPI = getIntlayerAPI();
|
|
18
20
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/libs/intlayer-api/index.ts"],"sourcesContent":["import { type IntlayerConfig } from '@intlayer/config/client';\nimport { getAiAPI } from './ai';\nimport { getAuthAPI } from './auth';\nimport { getDictionaryAPI } from './dictionary';\nimport type { FetcherOptions } from './fetcher';\nimport { getOrganizationAPI } from './organization';\nimport { getProjectAPI } from './project';\nimport { getStripeAPI } from './stripe';\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});\n\nexport const intlayerAPI = getIntlayerAPI();\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/libs/intlayer-api/index.ts"],"sourcesContent":["import { type IntlayerConfig } from '@intlayer/config/client';\nimport { getAiAPI } from './ai';\nimport { getAuthAPI } from './auth';\nimport { getDictionaryAPI } from './dictionary';\nimport type { FetcherOptions } from './fetcher';\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});\n\nexport const intlayerAPI = getIntlayerAPI();\n"],"names":[],"mappings":";;;;;;;;AAWO,MAAM,iBAAiB,CAC5B,iBAAiC,IACjC,oBACI;AAAA,EACJ,cAAc,mBAAmB,gBAAgB,cAAc;AAAA,EAC/D,SAAS,cAAc,gBAAgB,cAAc;AAAA,EACrD,MAAM,WAAW,gBAAgB,cAAc;AAAA,EAC/C,MAAM,WAAW,gBAAgB,cAAc;AAAA,EAC/C,YAAY,iBAAiB,gBAAgB,cAAc;AAAA,EAC3D,QAAQ,aAAa,gBAAgB,cAAc;AAAA,EACnD,IAAI,SAAS,gBAAgB,cAAc;AAAA,EAC3C,KAAK,UAAU,gBAAgB,cAAc;AAC/C;AAEO,MAAM,cAAc,eAAe;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const client = require("@intlayer/config/client");
|
|
4
|
+
const libs_intlayerApi_fetcher = require("./fetcher.cjs");
|
|
5
|
+
const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
6
|
+
const { backendURL } = (intlayerConfig ?? client.getConfiguration()).editor;
|
|
7
|
+
const PROJECT_API_ROUTE = `${backendURL}/api/tag`;
|
|
8
|
+
const getTags = async (filters, otherOptions = {}) => await libs_intlayerApi_fetcher.fetcher(
|
|
9
|
+
PROJECT_API_ROUTE,
|
|
10
|
+
authAPIOptions,
|
|
11
|
+
otherOptions,
|
|
12
|
+
{
|
|
13
|
+
params: filters
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
const addTag = async (tag, otherOptions = {}) => await libs_intlayerApi_fetcher.fetcher(
|
|
17
|
+
`${PROJECT_API_ROUTE}`,
|
|
18
|
+
authAPIOptions,
|
|
19
|
+
otherOptions,
|
|
20
|
+
{
|
|
21
|
+
method: "POST",
|
|
22
|
+
body: tag
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
const updateTag = async (tagId, tag, otherOptions = {}) => await libs_intlayerApi_fetcher.fetcher(
|
|
26
|
+
`${PROJECT_API_ROUTE}/${tagId}`,
|
|
27
|
+
authAPIOptions,
|
|
28
|
+
otherOptions,
|
|
29
|
+
{
|
|
30
|
+
method: "PUT",
|
|
31
|
+
body: tag
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
const deleteTag = async (tagId, otherOptions = {}) => await libs_intlayerApi_fetcher.fetcher(
|
|
35
|
+
`${PROJECT_API_ROUTE}/${tagId}`,
|
|
36
|
+
authAPIOptions,
|
|
37
|
+
otherOptions,
|
|
38
|
+
{
|
|
39
|
+
method: "DELETE"
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
return {
|
|
43
|
+
getTags,
|
|
44
|
+
addTag,
|
|
45
|
+
updateTag,
|
|
46
|
+
deleteTag
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
const tagAPI = getTagAPI();
|
|
50
|
+
exports.getTagAPI = getTagAPI;
|
|
51
|
+
exports.tagAPI = tagAPI;
|
|
52
|
+
//# sourceMappingURL=tag.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.cjs","sources":["../../../src/libs/intlayer-api/tag.ts"],"sourcesContent":["import type {\n AddTagBody,\n AddTagResult,\n DeleteTagParams,\n DeleteTagResult,\n GetTagsParams,\n GetTagsResult,\n UpdateTagBody,\n UpdateTagParams,\n UpdateTagResult,\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 } = (intlayerConfig ?? getConfiguration()).editor;\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"],"names":["getConfiguration","fetcher"],"mappings":";;;;AAcO,MAAM,YAAY,CACvB,iBAAiC,IACjC,mBACG;AACH,QAAM,EAAE,WAAgB,KAAA,kBAAkBA,OAAAA,iBAAoB,GAAA;AACxD,QAAA,oBAAoB,GAAG,UAAU;AAMvC,QAAM,UAAU,OACd,SACA,eAA+B,CAAA,MAE/B,MAAMC,yBAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAMF,QAAM,SAAS,OAAO,KAAiB,eAA+B,CAAA,MACpE,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EAEV;AAMF,QAAM,YAAY,OAChB,OACA,KACA,eAA+B,OAE/B,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB,IAAI,KAAK;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EAEV;AAMF,QAAM,YAAY,OAChB,OAEA,eAA+B,CAAA,MAE/B,MAAMA,yBAAA;AAAA,IACJ,GAAG,iBAAiB,IAAI,KAAK;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAEK,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,SAAS,UAAU;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AddTagBody, AddTagResult, DeleteTagParams, DeleteTagResult, GetTagsParams, GetTagsResult, UpdateTagBody, UpdateTagParams, UpdateTagResult } from '@intlayer/backend';
|
|
2
|
+
import { IntlayerConfig } from '@intlayer/config/client';
|
|
3
|
+
import { FetcherOptions } from './fetcher';
|
|
4
|
+
export declare const getTagAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
5
|
+
getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
|
|
6
|
+
addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
|
|
7
|
+
updateTag: (tagId: UpdateTagParams["tagId"], tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
|
|
8
|
+
deleteTag: (tagId: DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
|
|
9
|
+
};
|
|
10
|
+
export declare const tagAPI: {
|
|
11
|
+
getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
|
|
12
|
+
addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
|
|
13
|
+
updateTag: (tagId: UpdateTagParams["tagId"], tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
|
|
14
|
+
deleteTag: (tagId: DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/libs/intlayer-api/tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,SAAS,oBACJ,cAAc,mBACb,cAAc;wBAUnB,aAAa,iBACT,cAAc;kBAeH,UAAU,iBAAgB,cAAc;uBAgB1D,eAAe,CAAC,OAAO,CAAC,OAC1B,aAAa,iBACJ,cAAc;uBAiBrB,eAAe,CAAC,OAAO,CAAC,iBAEjB,cAAc;CAiB/B,CAAC;AAEF,eAAO,MAAM,MAAM;wBAxEL,aAAa,iBACT,cAAc;kBAeH,UAAU,iBAAgB,cAAc;uBAgB1D,eAAe,CAAC,OAAO,CAAC,OAC1B,aAAa,iBACJ,cAAc;uBAiBrB,eAAe,CAAC,OAAO,CAAC,iBAEjB,cAAc;CAmBC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { getConfiguration } from "@intlayer/config/client";
|
|
2
|
+
import { fetcher } from "./fetcher.mjs";
|
|
3
|
+
const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
4
|
+
const { backendURL } = (intlayerConfig ?? getConfiguration()).editor;
|
|
5
|
+
const PROJECT_API_ROUTE = `${backendURL}/api/tag`;
|
|
6
|
+
const getTags = async (filters, otherOptions = {}) => await fetcher(
|
|
7
|
+
PROJECT_API_ROUTE,
|
|
8
|
+
authAPIOptions,
|
|
9
|
+
otherOptions,
|
|
10
|
+
{
|
|
11
|
+
params: filters
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
const addTag = async (tag, otherOptions = {}) => await fetcher(
|
|
15
|
+
`${PROJECT_API_ROUTE}`,
|
|
16
|
+
authAPIOptions,
|
|
17
|
+
otherOptions,
|
|
18
|
+
{
|
|
19
|
+
method: "POST",
|
|
20
|
+
body: tag
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
const updateTag = async (tagId, tag, otherOptions = {}) => await fetcher(
|
|
24
|
+
`${PROJECT_API_ROUTE}/${tagId}`,
|
|
25
|
+
authAPIOptions,
|
|
26
|
+
otherOptions,
|
|
27
|
+
{
|
|
28
|
+
method: "PUT",
|
|
29
|
+
body: tag
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
const deleteTag = async (tagId, otherOptions = {}) => await fetcher(
|
|
33
|
+
`${PROJECT_API_ROUTE}/${tagId}`,
|
|
34
|
+
authAPIOptions,
|
|
35
|
+
otherOptions,
|
|
36
|
+
{
|
|
37
|
+
method: "DELETE"
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
return {
|
|
41
|
+
getTags,
|
|
42
|
+
addTag,
|
|
43
|
+
updateTag,
|
|
44
|
+
deleteTag
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const tagAPI = getTagAPI();
|
|
48
|
+
export {
|
|
49
|
+
getTagAPI,
|
|
50
|
+
tagAPI
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=tag.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.mjs","sources":["../../../src/libs/intlayer-api/tag.ts"],"sourcesContent":["import type {\n AddTagBody,\n AddTagResult,\n DeleteTagParams,\n DeleteTagResult,\n GetTagsParams,\n GetTagsResult,\n UpdateTagBody,\n UpdateTagParams,\n UpdateTagResult,\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 } = (intlayerConfig ?? getConfiguration()).editor;\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"],"names":[],"mappings":";;AAcO,MAAM,YAAY,CACvB,iBAAiC,IACjC,mBACG;AACH,QAAM,EAAE,WAAgB,KAAA,kBAAkB,iBAAoB,GAAA;AACxD,QAAA,oBAAoB,GAAG,UAAU;AAMvC,QAAM,UAAU,OACd,SACA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAMF,QAAM,SAAS,OAAO,KAAiB,eAA+B,CAAA,MACpE,MAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EAEV;AAMF,QAAM,YAAY,OAChB,OACA,KACA,eAA+B,OAE/B,MAAM;AAAA,IACJ,GAAG,iBAAiB,IAAI,KAAK;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EAEV;AAMF,QAAM,YAAY,OAChB,OAEA,eAA+B,CAAA,MAE/B,MAAM;AAAA,IACJ,GAAG,iBAAiB,IAAI,KAAK;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAEK,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,SAAS,UAAU;"}
|