@intlayer/design-system 5.1.8 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +9 -9
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +2 -2
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +2 -2
- package/dist/components/Auth/useAuth/index.cjs.map +1 -1
- package/dist/components/Auth/useAuth/index.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/index.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.cjs +3 -3
- package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.mjs +3 -3
- package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.cjs +3 -3
- package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.mjs +3 -3
- package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.cjs +3 -3
- package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useSession.mjs +3 -3
- package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +2 -2
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +1 -1
- package/dist/components/Form/FormBase.d.ts.map +1 -1
- package/dist/components/Form/FormField.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
- package/dist/components/Form/elements/FormElement.d.ts.map +1 -1
- package/dist/components/Form/elements/MultiselectElement.d.ts.map +1 -1
- package/dist/components/Form/elements/SelectElement.d.ts.map +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.d.ts.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +1 -1
- package/dist/components/IDE/CodeContext.mjs +1 -1
- package/dist/components/IDE/createFileTree.d.ts.map +1 -1
- package/dist/components/Link/Link.cjs +2 -2
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +2 -2
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Loader/spinner.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +1 -1
- package/dist/components/MaxWidthSmoother/index.d.ts.map +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.mjs +1 -1
- package/dist/components/Navbar/Burger.d.ts.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +1 -1
- package/dist/components/Navbar/MobileNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +1 -1
- package/dist/components/Navbar/index.cjs +1 -1
- package/dist/components/Navbar/index.d.ts.map +1 -1
- package/dist/components/Navbar/index.mjs +1 -1
- package/dist/components/SwitchSelector/index.cjs +1 -1
- package/dist/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.d.ts.map +1 -1
- package/dist/components/Toaster/useToast.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsyncWrapper.d.ts.map +1 -1
- package/dist/hooks/useDevice.d.ts.map +1 -1
- package/dist/hooks/useGetAllDictionaries.d.ts +1 -1
- package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
- package/dist/hooks/useGetElementOrWindow.d.ts.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/useItemSelector.d.ts.map +1 -1
- package/dist/hooks/usePersistedStore.d.ts.map +1 -1
- package/dist/hooks/useScrollBlockage/index.d.ts.map +1 -1
- package/dist/hooks/useScrollDetection.d.ts.map +1 -1
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/{index-a_-DkvMQ.cjs → index-DSM_b0c2.cjs} +29 -29
- package/dist/index-DSM_b0c2.cjs.map +1 -0
- package/dist/{index-DixKT3Hi.js → index-Dpe_-poI.js} +31 -31
- package/dist/index-Dpe_-poI.js.map +1 -0
- package/dist/tailwind.css +2 -2
- package/dist/utils/camelCase.d.ts.map +1 -1
- package/dist/utils/capitalize.d.ts.map +1 -1
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/isElementAtTopAndNotCovered.d.ts.map +1 -1
- package/dist/utils/object.d.ts.map +1 -1
- package/dist/zod-BV4nCGJE.js.map +1 -1
- package/dist/zod-DSrtTSD_.cjs.map +1 -1
- package/package.json +19 -19
- package/dist/index-DixKT3Hi.js.map +0 -1
- package/dist/index-a_-DkvMQ.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useScrollBlockage/index.tsx"],"names":[],"mappings":"AAQA,KAAK,8BAA8B,GAAG;IACpC,aAAa,EAAE,SAAS,CAAC;IACzB,GAAG,EAAE,SAAS,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useScrollBlockage/index.tsx"],"names":[],"mappings":"AAQA,KAAK,8BAA8B,GAAG;IACpC,aAAa,EAAE,SAAS,CAAC;IACzB,GAAG,EAAE,SAAS,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,sBAAsB,GAAG,8BAA8B;;CAkChE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollDetection.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollDetection.ts"],"names":[],"mappings":"AAOA,KAAK,uBAAuB,GAAG;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"useScrollDetection.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollDetection.ts"],"names":[],"mappings":"AAOA,KAAK,uBAAuB,GAAG;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,uBAAuB;;;CA8EjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-BCuMWKyy.js","sources":["../../../../node_modules/.pnpm/zustand@4.5.6_@types+react@19.0.10_immer@9.0.21_react@
|
|
1
|
+
{"version":3,"file":"index-BCuMWKyy.js","sources":["../../../../node_modules/.pnpm/zustand@4.5.6_@types+react@19.0.10_immer@9.0.21_react@18.3.1/node_modules/zustand/esm/react/shallow.mjs","../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":["import ReactExports from 'react';\n\nfunction shallow(objA, objB) {\n if (Object.is(objA, objB)) {\n return true;\n }\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n if (objA instanceof Map && objB instanceof Map) {\n if (objA.size !== objB.size) return false;\n for (const [key, value] of objA) {\n if (!Object.is(value, objB.get(key))) {\n return false;\n }\n }\n return true;\n }\n if (objA instanceof Set && objB instanceof Set) {\n if (objA.size !== objB.size) return false;\n for (const value of objA) {\n if (!objB.has(value)) {\n return false;\n }\n }\n return true;\n }\n const keysA = Object.keys(objA);\n if (keysA.length !== Object.keys(objB).length) {\n return false;\n }\n for (const keyA of keysA) {\n if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {\n return false;\n }\n }\n return true;\n}\n\nconst { useRef } = ReactExports;\nfunction useShallow(selector) {\n const prev = useRef();\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","'use client';\n\nimport { useEffect } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetElementOrWindow } from '../useGetElementOrWindow';\n\nimport { useScrollBlockageStore } from './useScrollBlockageStore';\n\ntype useScrollBlockagePropsReadOnly = {\n disableScroll: undefined;\n key: undefined;\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\ntype useScrollBlockageProps = {\n disableScroll: boolean;\n key: string; // The key to identify the blockage to avoid conflicts. Required if disableScroll is defined\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\nexport const useScrollBlockage = (\n props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly\n) => {\n const {\n disableScroll = false,\n element,\n key = 'unnamed_blocker',\n } = props ?? {};\n\n const { isElementScrollBlocked, addBlockage, removeBlockage } =\n useScrollBlockageStore(\n useShallow((s) => ({\n isElementScrollBlocked: s.isElementScrollBlocked,\n addBlockage: s.addBlockage,\n removeBlockage: s.removeBlockage,\n }))\n );\n\n const containerElement = useGetElementOrWindow(element);\n\n useEffect(() => {\n const el = element ?? window.document.body;\n\n if (disableScroll) {\n addBlockage(key, el);\n } else {\n removeBlockage(key, el);\n }\n }, [addBlockage, disableScroll, element, key, removeBlockage]);\n\n const isScrollBlocked = containerElement\n ? isElementScrollBlocked(containerElement)\n : false;\n\n return { isScrollBlocked };\n};\n"],"names":[],"mappings":";;;;AAEA,SAAS,QAAQ,MAAM,MAAM;AAC3B,MAAI,OAAO,GAAG,MAAM,IAAI,GAAG;AACzB,WAAO;AAAA,EACX;AACE,MAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,OAAO,SAAS,YAAY,SAAS,MAAM;AAC1F,WAAO;AAAA,EACX;AACE,MAAI,gBAAgB,OAAO,gBAAgB,KAAK;AAC9C,QAAI,KAAK,SAAS,KAAK,KAAM,QAAO;AACpC,eAAW,CAAC,KAAK,KAAK,KAAK,MAAM;AAC/B,UAAI,CAAC,OAAO,GAAG,OAAO,KAAK,IAAI,GAAG,CAAC,GAAG;AACpC,eAAO;AAAA,MACf;AAAA,IACA;AACI,WAAO;AAAA,EACX;AACE,MAAI,gBAAgB,OAAO,gBAAgB,KAAK;AAC9C,QAAI,KAAK,SAAS,KAAK,KAAM,QAAO;AACpC,eAAW,SAAS,MAAM;AACxB,UAAI,CAAC,KAAK,IAAI,KAAK,GAAG;AACpB,eAAO;AAAA,MACf;AAAA,IACA;AACI,WAAO;AAAA,EACX;AACE,QAAM,QAAQ,OAAO,KAAK,IAAI;AAC9B,MAAI,MAAM,WAAW,OAAO,KAAK,IAAI,EAAE,QAAQ;AAC7C,WAAO;AAAA,EACX;AACE,aAAW,QAAQ,OAAO;AACxB,QAAI,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,IAAI,KAAK,CAAC,OAAO,GAAG,KAAK,IAAI,GAAG,KAAK,IAAI,CAAC,GAAG;AAC3F,aAAO;AAAA,IACb;AAAA,EACA;AACE,SAAO;AACT;AAEA,MAAM,EAAE,OAAQ,IAAG;AACnB,SAAS,WAAW,UAAU;AAC5B,QAAM,OAAO,OAAQ;AACrB,SAAO,CAAC,UAAU;AAChB,UAAM,OAAO,SAAS,KAAK;AAC3B,WAAO,QAAQ,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU,KAAK,UAAU;AAAA,EACpE;AACH;AC1Ba,MAAA,oBAAoB,CAC/B,UACG;AACG,QAAA;AAAA,IACJ,gBAAgB;AAAA,IAChB;AAAA,IACA,MAAM;AAAA,EACR,IAAI,SAAS,CAAC;AAEd,QAAM,EAAE,wBAAwB,aAAa,eAC3C,IAAA;AAAA,IACE,WAAW,CAAC,OAAO;AAAA,MACjB,wBAAwB,EAAE;AAAA,MAC1B,aAAa,EAAE;AAAA,MACf,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AAEI,QAAA,mBAAmB,sBAAsB,OAAO;AAEtD,YAAU,MAAM;AACR,UAAA,KAAK,WAAW,OAAO,SAAS;AAEtC,QAAI,eAAe;AACjB,kBAAY,KAAK,EAAE;AAAA,IAAA,OACd;AACL,qBAAe,KAAK,EAAE;AAAA,IAAA;AAAA,EACxB,GACC,CAAC,aAAa,eAAe,SAAS,KAAK,cAAc,CAAC;AAE7D,QAAM,kBAAkB,mBACpB,uBAAuB,gBAAgB,IACvC;AAEJ,SAAO,EAAE,gBAAgB;AAC3B;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-BYzBot7l.cjs","sources":["../../../../node_modules/.pnpm/zustand@4.5.6_@types+react@19.0.10_immer@9.0.21_react@
|
|
1
|
+
{"version":3,"file":"index-BYzBot7l.cjs","sources":["../../../../node_modules/.pnpm/zustand@4.5.6_@types+react@19.0.10_immer@9.0.21_react@18.3.1/node_modules/zustand/esm/react/shallow.mjs","../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":["import ReactExports from 'react';\n\nfunction shallow(objA, objB) {\n if (Object.is(objA, objB)) {\n return true;\n }\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n if (objA instanceof Map && objB instanceof Map) {\n if (objA.size !== objB.size) return false;\n for (const [key, value] of objA) {\n if (!Object.is(value, objB.get(key))) {\n return false;\n }\n }\n return true;\n }\n if (objA instanceof Set && objB instanceof Set) {\n if (objA.size !== objB.size) return false;\n for (const value of objA) {\n if (!objB.has(value)) {\n return false;\n }\n }\n return true;\n }\n const keysA = Object.keys(objA);\n if (keysA.length !== Object.keys(objB).length) {\n return false;\n }\n for (const keyA of keysA) {\n if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {\n return false;\n }\n }\n return true;\n}\n\nconst { useRef } = ReactExports;\nfunction useShallow(selector) {\n const prev = useRef();\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","'use client';\n\nimport { useEffect } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetElementOrWindow } from '../useGetElementOrWindow';\n\nimport { useScrollBlockageStore } from './useScrollBlockageStore';\n\ntype useScrollBlockagePropsReadOnly = {\n disableScroll: undefined;\n key: undefined;\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\ntype useScrollBlockageProps = {\n disableScroll: boolean;\n key: string; // The key to identify the blockage to avoid conflicts. Required if disableScroll is defined\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\nexport const useScrollBlockage = (\n props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly\n) => {\n const {\n disableScroll = false,\n element,\n key = 'unnamed_blocker',\n } = props ?? {};\n\n const { isElementScrollBlocked, addBlockage, removeBlockage } =\n useScrollBlockageStore(\n useShallow((s) => ({\n isElementScrollBlocked: s.isElementScrollBlocked,\n addBlockage: s.addBlockage,\n removeBlockage: s.removeBlockage,\n }))\n );\n\n const containerElement = useGetElementOrWindow(element);\n\n useEffect(() => {\n const el = element ?? window.document.body;\n\n if (disableScroll) {\n addBlockage(key, el);\n } else {\n removeBlockage(key, el);\n }\n }, [addBlockage, disableScroll, element, key, removeBlockage]);\n\n const isScrollBlocked = containerElement\n ? isElementScrollBlocked(containerElement)\n : false;\n\n return { isScrollBlocked };\n};\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;AC1Ba,MAAA,oBAAoB,CAC/B,UACG;AACG,QAAA;AAAA,IACJ,gBAAgB;AAAA,IAChB;AAAA,IACA,MAAM;AAAA,EACR,IAAI,SAAS,CAAC;AAEd,QAAM,EAAE,wBAAwB,aAAa,eAC3C,IAAAA,+CAAA;AAAA,IACE,WAAW,CAAC,OAAO;AAAA,MACjB,wBAAwB,EAAE;AAAA,MAC1B,aAAa,EAAE;AAAA,MACf,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AAEI,QAAA,mBAAmBC,kDAAsB,OAAO;AAEtDC,eAAAA,UAAU,MAAM;AACR,UAAA,KAAK,WAAW,OAAO,SAAS;AAEtC,QAAI,eAAe;AACjB,kBAAY,KAAK,EAAE;AAAA,IAAA,OACd;AACL,qBAAe,KAAK,EAAE;AAAA,IAAA;AAAA,EACxB,GACC,CAAC,aAAa,eAAe,SAAS,KAAK,cAAc,CAAC;AAE7D,QAAM,kBAAkB,mBACpB,uBAAuB,gBAAgB,IACvC;AAEJ,SAAO,EAAE,gBAAgB;AAC3B;;;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
2
|
+
const configuration = require("@intlayer/config/built");
|
|
3
3
|
const fetcherOptions = {
|
|
4
4
|
method: "GET",
|
|
5
5
|
// Default HTTP method
|
|
@@ -68,8 +68,8 @@ const fetcher = async (url, ...options) => {
|
|
|
68
68
|
}
|
|
69
69
|
return await response.json();
|
|
70
70
|
};
|
|
71
|
-
const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
72
|
-
const backendURL =
|
|
71
|
+
const getAiAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
72
|
+
const { backendURL } = intlayerConfig.editor;
|
|
73
73
|
const AI_API_ROUTE = `${backendURL}/api/ai`;
|
|
74
74
|
const auditContentDeclaration = async (body, otherOptions = {}) => await fetcher(
|
|
75
75
|
`${AI_API_ROUTE}/audit/dictionary`,
|
|
@@ -135,8 +135,8 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
135
135
|
};
|
|
136
136
|
};
|
|
137
137
|
getAiAPI();
|
|
138
|
-
const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
139
|
-
const { backendURL, clientId, clientSecret } =
|
|
138
|
+
const getAuthAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
139
|
+
const { backendURL, clientId, clientSecret } = intlayerConfig.editor;
|
|
140
140
|
const AUTH_API_ROUTE = `${backendURL}/api/auth`;
|
|
141
141
|
const login = async (user, otherOptions = {}) => await fetcher(
|
|
142
142
|
`${AUTH_API_ROUTE}/login`,
|
|
@@ -279,8 +279,8 @@ const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
279
279
|
};
|
|
280
280
|
};
|
|
281
281
|
getAuthAPI();
|
|
282
|
-
const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
283
|
-
const backendURL =
|
|
282
|
+
const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
283
|
+
const { backendURL } = intlayerConfig.editor;
|
|
284
284
|
const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;
|
|
285
285
|
const getDictionaries = async (filters, otherOptions = {}) => await fetcher(
|
|
286
286
|
PROJECT_API_ROUTE,
|
|
@@ -350,8 +350,8 @@ const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
350
350
|
};
|
|
351
351
|
};
|
|
352
352
|
getDictionaryAPI();
|
|
353
|
-
const getEditorAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
354
|
-
const { editorURL } =
|
|
353
|
+
const getEditorAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
354
|
+
const { editorURL } = intlayerConfig.editor;
|
|
355
355
|
const EDITOR_API_ROUTE = `${editorURL}/api`;
|
|
356
356
|
const getConfiguration = async (otherOptions = {}) => {
|
|
357
357
|
const response = await fetcher(
|
|
@@ -378,8 +378,8 @@ const getEditorAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
378
378
|
};
|
|
379
379
|
};
|
|
380
380
|
getEditorAPI();
|
|
381
|
-
const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
382
|
-
const backendURL =
|
|
381
|
+
const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
382
|
+
const { backendURL } = intlayerConfig.editor;
|
|
383
383
|
const ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;
|
|
384
384
|
const getOrganizations = async (filters, otherOptions = {}) => await fetcher(
|
|
385
385
|
ORGANIZATION_API_ROUTE,
|
|
@@ -467,8 +467,8 @@ const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
467
467
|
};
|
|
468
468
|
};
|
|
469
469
|
getOrganizationAPI();
|
|
470
|
-
const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
471
|
-
const backendURL =
|
|
470
|
+
const getProjectAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
471
|
+
const { backendURL } = intlayerConfig.editor;
|
|
472
472
|
const PROJECT_API_ROUTE = `${backendURL}/api/project`;
|
|
473
473
|
const getProjects = async (filters, otherOptions = {}) => await fetcher(
|
|
474
474
|
PROJECT_API_ROUTE,
|
|
@@ -580,8 +580,8 @@ const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
580
580
|
};
|
|
581
581
|
};
|
|
582
582
|
getProjectAPI();
|
|
583
|
-
const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
584
|
-
const backendURL =
|
|
583
|
+
const getStripeAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
584
|
+
const { backendURL } = intlayerConfig.editor;
|
|
585
585
|
const STRIPE_API_ROUTE = `${backendURL}/api/stripe`;
|
|
586
586
|
const getPricing = async (body, otherOptions = {}) => await fetcher(
|
|
587
587
|
`${STRIPE_API_ROUTE}/pricing`,
|
|
@@ -615,8 +615,8 @@ const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
615
615
|
cancelSubscription
|
|
616
616
|
};
|
|
617
617
|
};
|
|
618
|
-
const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
619
|
-
const backendURL =
|
|
618
|
+
const getTagAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
619
|
+
const { backendURL } = intlayerConfig.editor;
|
|
620
620
|
const PROJECT_API_ROUTE = `${backendURL}/api/tag`;
|
|
621
621
|
const getTags = async (filters, otherOptions = {}) => await fetcher(
|
|
622
622
|
PROJECT_API_ROUTE,
|
|
@@ -660,8 +660,8 @@ const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
660
660
|
};
|
|
661
661
|
};
|
|
662
662
|
getTagAPI();
|
|
663
|
-
const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
664
|
-
const backendURL =
|
|
663
|
+
const getUserAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
664
|
+
const { backendURL } = intlayerConfig.editor;
|
|
665
665
|
const USER_API_ROUTE = `${backendURL}/api/user`;
|
|
666
666
|
const getUsers = async (filters, otherOptions = {}) => await fetcher(
|
|
667
667
|
USER_API_ROUTE,
|
|
@@ -724,16 +724,16 @@ const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
724
724
|
};
|
|
725
725
|
getUserAPI();
|
|
726
726
|
const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
727
|
-
organization: getOrganizationAPI(authAPIOptions),
|
|
728
|
-
project: getProjectAPI(authAPIOptions),
|
|
729
|
-
user: getUserAPI(authAPIOptions),
|
|
730
|
-
auth: getAuthAPI(authAPIOptions),
|
|
731
|
-
dictionary: getDictionaryAPI(authAPIOptions),
|
|
732
|
-
stripe: getStripeAPI(authAPIOptions),
|
|
733
|
-
ai: getAiAPI(authAPIOptions),
|
|
734
|
-
tag: getTagAPI(authAPIOptions),
|
|
735
|
-
editor: getEditorAPI(authAPIOptions)
|
|
727
|
+
organization: getOrganizationAPI(authAPIOptions, intlayerConfig),
|
|
728
|
+
project: getProjectAPI(authAPIOptions, intlayerConfig),
|
|
729
|
+
user: getUserAPI(authAPIOptions, intlayerConfig),
|
|
730
|
+
auth: getAuthAPI(authAPIOptions, intlayerConfig),
|
|
731
|
+
dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),
|
|
732
|
+
stripe: getStripeAPI(authAPIOptions, intlayerConfig),
|
|
733
|
+
ai: getAiAPI(authAPIOptions, intlayerConfig),
|
|
734
|
+
tag: getTagAPI(authAPIOptions, intlayerConfig),
|
|
735
|
+
editor: getEditorAPI(authAPIOptions, intlayerConfig)
|
|
736
736
|
});
|
|
737
737
|
const intlayerAPI = getIntlayerAPI();
|
|
738
738
|
exports.intlayerAPI = intlayerAPI;
|
|
739
|
-
//# sourceMappingURL=index-
|
|
739
|
+
//# sourceMappingURL=index-DSM_b0c2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DSM_b0c2.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 type { IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getAiAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig: IntlayerConfig = configuration\n) => {\n const { backendURL } = intlayerConfig.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/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 type { IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getAuthAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig: IntlayerConfig = configuration\n) => {\n const { backendURL, clientId, clientSecret } = intlayerConfig.editor;\n\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 type { IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getDictionaryAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig: IntlayerConfig = configuration\n) => {\n const { backendURL } = intlayerConfig.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 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 type { IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\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 = configuration\n) => {\n const { editorURL } = intlayerConfig.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 type { IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getOrganizationAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig: IntlayerConfig = configuration\n) => {\n const { backendURL } = intlayerConfig.editor;\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 type { IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getProjectAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig: IntlayerConfig = configuration\n) => {\n const { backendURL } = intlayerConfig.editor;\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 type { IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getStripeAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig: IntlayerConfig = configuration\n) => {\n const { backendURL } = intlayerConfig.editor;\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 type { IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getTagAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig: IntlayerConfig = configuration\n) => {\n const { backendURL } = intlayerConfig.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","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 { type IntlayerConfig } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport const getUserAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig: IntlayerConfig = configuration\n) => {\n const { backendURL } = intlayerConfig.editor;\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"],"mappings":";;AAwBO,MAAM,iBAAiC;AAAA,EAC5C,QAAQ;AAAA;AAAA,EACR,SAAS;AAAA,IACP,gBAAgB;AAAA;AAAA,EAClB;AAAA,EACA,aAAa;AACf;A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W,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;AAAA,EAC7C,QAAQ,aAAa,gBAAgB,cAAc;AACrD;AAEO,MAAM,cAAc,eAAe;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import configuration from "@intlayer/config/built";
|
|
2
2
|
const fetcherOptions = {
|
|
3
3
|
method: "GET",
|
|
4
4
|
// Default HTTP method
|
|
@@ -67,8 +67,8 @@ const fetcher = async (url, ...options) => {
|
|
|
67
67
|
}
|
|
68
68
|
return await response.json();
|
|
69
69
|
};
|
|
70
|
-
const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
71
|
-
const backendURL =
|
|
70
|
+
const getAiAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
71
|
+
const { backendURL } = intlayerConfig.editor;
|
|
72
72
|
const AI_API_ROUTE = `${backendURL}/api/ai`;
|
|
73
73
|
const auditContentDeclaration = async (body, otherOptions = {}) => await fetcher(
|
|
74
74
|
`${AI_API_ROUTE}/audit/dictionary`,
|
|
@@ -134,8 +134,8 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
136
|
getAiAPI();
|
|
137
|
-
const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
138
|
-
const { backendURL, clientId, clientSecret } =
|
|
137
|
+
const getAuthAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
138
|
+
const { backendURL, clientId, clientSecret } = intlayerConfig.editor;
|
|
139
139
|
const AUTH_API_ROUTE = `${backendURL}/api/auth`;
|
|
140
140
|
const login = async (user, otherOptions = {}) => await fetcher(
|
|
141
141
|
`${AUTH_API_ROUTE}/login`,
|
|
@@ -278,8 +278,8 @@ const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
278
278
|
};
|
|
279
279
|
};
|
|
280
280
|
getAuthAPI();
|
|
281
|
-
const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
282
|
-
const backendURL =
|
|
281
|
+
const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
282
|
+
const { backendURL } = intlayerConfig.editor;
|
|
283
283
|
const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;
|
|
284
284
|
const getDictionaries = async (filters, otherOptions = {}) => await fetcher(
|
|
285
285
|
PROJECT_API_ROUTE,
|
|
@@ -349,10 +349,10 @@ const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
349
349
|
};
|
|
350
350
|
};
|
|
351
351
|
getDictionaryAPI();
|
|
352
|
-
const getEditorAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
353
|
-
const { editorURL } =
|
|
352
|
+
const getEditorAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
353
|
+
const { editorURL } = intlayerConfig.editor;
|
|
354
354
|
const EDITOR_API_ROUTE = `${editorURL}/api`;
|
|
355
|
-
const getConfiguration
|
|
355
|
+
const getConfiguration = async (otherOptions = {}) => {
|
|
356
356
|
const response = await fetcher(
|
|
357
357
|
`${EDITOR_API_ROUTE}/config`,
|
|
358
358
|
authAPIOptions,
|
|
@@ -372,13 +372,13 @@ const getEditorAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
372
372
|
);
|
|
373
373
|
};
|
|
374
374
|
return {
|
|
375
|
-
getConfiguration
|
|
375
|
+
getConfiguration,
|
|
376
376
|
writeDictionary
|
|
377
377
|
};
|
|
378
378
|
};
|
|
379
379
|
getEditorAPI();
|
|
380
|
-
const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
381
|
-
const backendURL =
|
|
380
|
+
const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
381
|
+
const { backendURL } = intlayerConfig.editor;
|
|
382
382
|
const ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;
|
|
383
383
|
const getOrganizations = async (filters, otherOptions = {}) => await fetcher(
|
|
384
384
|
ORGANIZATION_API_ROUTE,
|
|
@@ -466,8 +466,8 @@ const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
466
466
|
};
|
|
467
467
|
};
|
|
468
468
|
getOrganizationAPI();
|
|
469
|
-
const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
470
|
-
const backendURL =
|
|
469
|
+
const getProjectAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
470
|
+
const { backendURL } = intlayerConfig.editor;
|
|
471
471
|
const PROJECT_API_ROUTE = `${backendURL}/api/project`;
|
|
472
472
|
const getProjects = async (filters, otherOptions = {}) => await fetcher(
|
|
473
473
|
PROJECT_API_ROUTE,
|
|
@@ -579,8 +579,8 @@ const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
579
579
|
};
|
|
580
580
|
};
|
|
581
581
|
getProjectAPI();
|
|
582
|
-
const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
583
|
-
const backendURL =
|
|
582
|
+
const getStripeAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
583
|
+
const { backendURL } = intlayerConfig.editor;
|
|
584
584
|
const STRIPE_API_ROUTE = `${backendURL}/api/stripe`;
|
|
585
585
|
const getPricing = async (body, otherOptions = {}) => await fetcher(
|
|
586
586
|
`${STRIPE_API_ROUTE}/pricing`,
|
|
@@ -614,8 +614,8 @@ const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
614
614
|
cancelSubscription
|
|
615
615
|
};
|
|
616
616
|
};
|
|
617
|
-
const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
618
|
-
const backendURL =
|
|
617
|
+
const getTagAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
618
|
+
const { backendURL } = intlayerConfig.editor;
|
|
619
619
|
const PROJECT_API_ROUTE = `${backendURL}/api/tag`;
|
|
620
620
|
const getTags = async (filters, otherOptions = {}) => await fetcher(
|
|
621
621
|
PROJECT_API_ROUTE,
|
|
@@ -659,8 +659,8 @@ const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
659
659
|
};
|
|
660
660
|
};
|
|
661
661
|
getTagAPI();
|
|
662
|
-
const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
663
|
-
const backendURL =
|
|
662
|
+
const getUserAPI = (authAPIOptions = {}, intlayerConfig = configuration) => {
|
|
663
|
+
const { backendURL } = intlayerConfig.editor;
|
|
664
664
|
const USER_API_ROUTE = `${backendURL}/api/user`;
|
|
665
665
|
const getUsers = async (filters, otherOptions = {}) => await fetcher(
|
|
666
666
|
USER_API_ROUTE,
|
|
@@ -723,18 +723,18 @@ const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
723
723
|
};
|
|
724
724
|
getUserAPI();
|
|
725
725
|
const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
726
|
-
organization: getOrganizationAPI(authAPIOptions),
|
|
727
|
-
project: getProjectAPI(authAPIOptions),
|
|
728
|
-
user: getUserAPI(authAPIOptions),
|
|
729
|
-
auth: getAuthAPI(authAPIOptions),
|
|
730
|
-
dictionary: getDictionaryAPI(authAPIOptions),
|
|
731
|
-
stripe: getStripeAPI(authAPIOptions),
|
|
732
|
-
ai: getAiAPI(authAPIOptions),
|
|
733
|
-
tag: getTagAPI(authAPIOptions),
|
|
734
|
-
editor: getEditorAPI(authAPIOptions)
|
|
726
|
+
organization: getOrganizationAPI(authAPIOptions, intlayerConfig),
|
|
727
|
+
project: getProjectAPI(authAPIOptions, intlayerConfig),
|
|
728
|
+
user: getUserAPI(authAPIOptions, intlayerConfig),
|
|
729
|
+
auth: getAuthAPI(authAPIOptions, intlayerConfig),
|
|
730
|
+
dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),
|
|
731
|
+
stripe: getStripeAPI(authAPIOptions, intlayerConfig),
|
|
732
|
+
ai: getAiAPI(authAPIOptions, intlayerConfig),
|
|
733
|
+
tag: getTagAPI(authAPIOptions, intlayerConfig),
|
|
734
|
+
editor: getEditorAPI(authAPIOptions, intlayerConfig)
|
|
735
735
|
});
|
|
736
736
|
const intlayerAPI = getIntlayerAPI();
|
|
737
737
|
export {
|
|
738
738
|
intlayerAPI as i
|
|
739
739
|
};
|
|
740
|
-
//# sourceMappingURL=index-
|
|
740
|
+
//# sourceMappingURL=index-Dpe_-poI.js.map
|