@intlayer/design-system 4.1.6 → 4.1.8
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/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +6 -2
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +6 -2
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +10 -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 +10 -4
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +2 -2
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +2 -2
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/package.json +22 -19
- package/dist/CodeBlockShiki-BlmZyrr7.cjs +0 -29
- package/dist/CodeBlockShiki-BlmZyrr7.cjs.map +0 -1
- package/dist/CodeBlockShiki-CcpV9SVi.js +0 -29
- package/dist/CodeBlockShiki-CcpV9SVi.js.map +0 -1
- package/dist/CopyButton-Cxu3goRg.cjs +0 -59
- package/dist/CopyButton-Cxu3goRg.cjs.map +0 -1
- package/dist/CopyButton-DlcDlf6U.js +0 -60
- package/dist/CopyButton-DlcDlf6U.js.map +0 -1
- package/dist/Form-0D7KBafQ.cjs +0 -311
- package/dist/Form-0D7KBafQ.cjs.map +0 -1
- package/dist/Form-7BqwvjVI.cjs +0 -320
- package/dist/Form-7BqwvjVI.cjs.map +0 -1
- package/dist/Form-B2UufQRJ.cjs +0 -319
- package/dist/Form-B2UufQRJ.cjs.map +0 -1
- package/dist/Form-BB0kpER9.cjs +0 -301
- package/dist/Form-BB0kpER9.cjs.map +0 -1
- package/dist/Form-BDcoNTLV.cjs +0 -300
- package/dist/Form-BDcoNTLV.cjs.map +0 -1
- package/dist/Form-BTogr-fp.js +0 -312
- package/dist/Form-BTogr-fp.js.map +0 -1
- package/dist/Form-BVkkvSKP.js +0 -312
- package/dist/Form-BVkkvSKP.js.map +0 -1
- package/dist/Form-Be6Uhb5-.js +0 -312
- package/dist/Form-Be6Uhb5-.js.map +0 -1
- package/dist/Form-BmQQnl-6.js +0 -312
- package/dist/Form-BmQQnl-6.js.map +0 -1
- package/dist/Form-BoWOdiwq.js +0 -321
- package/dist/Form-BoWOdiwq.js.map +0 -1
- package/dist/Form-Bp_ubH9I.cjs +0 -311
- package/dist/Form-Bp_ubH9I.cjs.map +0 -1
- package/dist/Form-BtqRbgLu.cjs +0 -311
- package/dist/Form-BtqRbgLu.cjs.map +0 -1
- package/dist/Form-COVZyto7.cjs +0 -311
- package/dist/Form-COVZyto7.cjs.map +0 -1
- package/dist/Form-CVD_3nCD.js +0 -312
- package/dist/Form-CVD_3nCD.js.map +0 -1
- package/dist/Form-Cfklj1_H.js +0 -320
- package/dist/Form-Cfklj1_H.js.map +0 -1
- package/dist/Form-ClAAiVNm.cjs +0 -311
- package/dist/Form-ClAAiVNm.cjs.map +0 -1
- package/dist/Form-DGLgTAdY.js +0 -302
- package/dist/Form-DGLgTAdY.js.map +0 -1
- package/dist/Form-DhsgC7kB.js +0 -301
- package/dist/Form-DhsgC7kB.js.map +0 -1
- package/dist/Form-Dv0uHqbL.cjs +0 -320
- package/dist/Form-Dv0uHqbL.cjs.map +0 -1
- package/dist/Form-OK9zfg6E.js +0 -321
- package/dist/Form-OK9zfg6E.js.map +0 -1
- package/dist/components/ContentEditor/ContentEditorCode.cjs +0 -78
- package/dist/components/ContentEditor/ContentEditorCode.cjs.map +0 -1
- package/dist/components/ContentEditor/ContentEditorCode.d.ts +0 -11
- package/dist/components/ContentEditor/ContentEditorCode.d.ts.map +0 -1
- package/dist/components/ContentEditor/ContentEditorCode.mjs +0 -78
- package/dist/components/ContentEditor/ContentEditorCode.mjs.map +0 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs +0 -490
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +0 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +0 -28
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +0 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs +0 -490
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +0 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.cjs +0 -15
- package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +0 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +0 -15
- package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts.map +0 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.mjs +0 -15
- package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts +0 -8
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts +0 -13
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts +0 -9
- package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts.map +0 -1
- package/dist/components/DropDown/types.cjs +0 -2
- package/dist/components/DropDown/types.cjs.map +0 -1
- package/dist/components/DropDown/types.d.ts +0 -19
- package/dist/components/DropDown/types.d.ts.map +0 -1
- package/dist/components/DropDown/types.mjs +0 -2
- package/dist/components/DropDown/types.mjs.map +0 -1
- package/dist/components/IDE/CodeBlock.cjs +0 -54
- package/dist/components/IDE/CodeBlock.cjs.map +0 -1
- package/dist/components/IDE/CodeBlock.d.ts +0 -12
- package/dist/components/IDE/CodeBlock.d.ts.map +0 -1
- package/dist/components/IDE/CodeBlock.mjs +0 -54
- package/dist/components/IDE/CodeBlock.mjs.map +0 -1
- package/dist/components/IDE/CodeBlockLoader.cjs +0 -28
- package/dist/components/IDE/CodeBlockLoader.cjs.map +0 -1
- package/dist/components/IDE/CodeBlockLoader.d.ts +0 -4
- package/dist/components/IDE/CodeBlockLoader.d.ts.map +0 -1
- package/dist/components/IDE/CodeBlockLoader.mjs +0 -28
- package/dist/components/IDE/CodeBlockLoader.mjs.map +0 -1
- package/dist/components/IDE/CodeBlockShiki.d.ts +0 -3
- package/dist/components/IDE/CodeBlockShiki.d.ts.map +0 -1
- package/dist/components/IDE/CodeRender copy.cjs +0 -141
- package/dist/components/IDE/CodeRender copy.cjs.map +0 -1
- package/dist/components/IDE/CodeRender copy.d.ts +0 -14
- package/dist/components/IDE/CodeRender copy.d.ts.map +0 -1
- package/dist/components/IDE/CodeRender copy.mjs +0 -141
- package/dist/components/IDE/CodeRender copy.mjs.map +0 -1
- package/dist/components/IDE/CodeRender.cjs +0 -49
- package/dist/components/IDE/CodeRender.cjs.map +0 -1
- package/dist/components/IDE/CodeRender.d.ts +0 -9
- package/dist/components/IDE/CodeRender.d.ts.map +0 -1
- package/dist/components/IDE/CodeRender.mjs +0 -49
- package/dist/components/IDE/CodeRender.mjs.map +0 -1
- package/dist/components/IDE/CodeRenderer.cjs +0 -27
- package/dist/components/IDE/CodeRenderer.cjs.map +0 -1
- package/dist/components/IDE/CodeRenderer.d.ts +0 -5
- package/dist/components/IDE/CodeRenderer.d.ts.map +0 -1
- package/dist/components/IDE/CodeRenderer.mjs +0 -27
- package/dist/components/IDE/CodeRenderer.mjs.map +0 -1
- package/dist/components/IDE/EditableCodeBlock.d.ts +0 -9
- package/dist/components/IDE/EditableCodeBlock.d.ts.map +0 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts +0 -13
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts.map +0 -1
- package/dist/design-system.css +0 -235
- package/dist/index-Ai6eeqZH.js +0 -702
- package/dist/index-Ai6eeqZH.js.map +0 -1
- package/dist/index-B-VAyQ9R.js +0 -673
- package/dist/index-B-VAyQ9R.js.map +0 -1
- package/dist/index-B1nU1-65.cjs +0 -690
- package/dist/index-B1nU1-65.cjs.map +0 -1
- package/dist/index-B2UElBcQ.cjs +0 -200
- package/dist/index-B2UElBcQ.cjs.map +0 -1
- package/dist/index-BIV0x_z2.js +0 -206
- package/dist/index-BIV0x_z2.js.map +0 -1
- package/dist/index-BIyA5LAs.js +0 -691
- package/dist/index-BIyA5LAs.js.map +0 -1
- package/dist/index-BMzh1_UJ.js +0 -201
- package/dist/index-BMzh1_UJ.js.map +0 -1
- package/dist/index-BNH9wXVj.cjs +0 -205
- package/dist/index-BNH9wXVj.cjs.map +0 -1
- package/dist/index-BbqOa6BU.cjs +0 -701
- package/dist/index-BbqOa6BU.cjs.map +0 -1
- package/dist/index-BdTa-9zc.js +0 -201
- package/dist/index-BdTa-9zc.js.map +0 -1
- package/dist/index-BqZwP4Lr.js +0 -691
- package/dist/index-BqZwP4Lr.js.map +0 -1
- package/dist/index-BtZWYJhL.cjs +0 -200
- package/dist/index-BtZWYJhL.cjs.map +0 -1
- package/dist/index-Buecpjbh.cjs +0 -690
- package/dist/index-Buecpjbh.cjs.map +0 -1
- package/dist/index-CDEJjmId.js +0 -694
- package/dist/index-CDEJjmId.js.map +0 -1
- package/dist/index-CTAyk6RY.cjs +0 -693
- package/dist/index-CTAyk6RY.cjs.map +0 -1
- package/dist/index-CVC2sfEj.js +0 -693
- package/dist/index-CVC2sfEj.js.map +0 -1
- package/dist/index-CVz0RdK6.js +0 -691
- package/dist/index-CVz0RdK6.js.map +0 -1
- package/dist/index-CjF2ksU7.cjs +0 -693
- package/dist/index-CjF2ksU7.cjs.map +0 -1
- package/dist/index-CuQs5759.cjs +0 -692
- package/dist/index-CuQs5759.cjs.map +0 -1
- package/dist/index-D69JRZcQ.js +0 -206
- package/dist/index-D69JRZcQ.js.map +0 -1
- package/dist/index-D9oaKvKC.js +0 -201
- package/dist/index-D9oaKvKC.js.map +0 -1
- package/dist/index-DFc7og1d.cjs +0 -671
- package/dist/index-DFc7og1d.cjs.map +0 -1
- package/dist/index-DTCehvKe.cjs +0 -200
- package/dist/index-DTCehvKe.cjs.map +0 -1
- package/dist/index-D_MDocy7.cjs +0 -690
- package/dist/index-D_MDocy7.cjs.map +0 -1
- package/dist/index-DcWYZrJW.js +0 -672
- package/dist/index-DcWYZrJW.js.map +0 -1
- package/dist/index-Djo2Jnua.cjs +0 -693
- package/dist/index-Djo2Jnua.cjs.map +0 -1
- package/dist/index-LFTthFne.js +0 -694
- package/dist/index-LFTthFne.js.map +0 -1
- package/dist/index-SOIahRpS.cjs +0 -205
- package/dist/index-SOIahRpS.cjs.map +0 -1
- package/dist/index-T-TjVQoD.js +0 -671
- package/dist/index-T-TjVQoD.js.map +0 -1
- package/dist/index-f8_VC6c8.cjs +0 -672
- package/dist/index-f8_VC6c8.cjs.map +0 -1
- package/dist/index-llGIfxqV.cjs +0 -670
- package/dist/index-llGIfxqV.cjs.map +0 -1
- package/dist/index-xZoGTokf.js +0 -694
- package/dist/index-xZoGTokf.js.map +0 -1
- package/dist/jsx-runtime-CL03FswV.cjs +0 -506
- package/dist/jsx-runtime-CL03FswV.cjs.map +0 -1
- package/dist/jsx-runtime-DaNGiM0W.js +0 -945
- package/dist/jsx-runtime-DaNGiM0W.js.map +0 -1
- package/dist/jsx-runtime-XHKiWCTo.cjs +0 -944
- package/dist/jsx-runtime-XHKiWCTo.cjs.map +0 -1
- package/dist/jsx-runtime-kmx34TxC.js +0 -507
- package/dist/jsx-runtime-kmx34TxC.js.map +0 -1
- package/dist/libs/index.cjs +0 -6
- package/dist/libs/index.cjs.map +0 -1
- package/dist/libs/index.d.ts +0 -2
- package/dist/libs/index.d.ts.map +0 -1
- package/dist/libs/index.mjs +0 -6
- package/dist/libs/index.mjs.map +0 -1
- package/dist/libs/intlayer-api/ai.cjs +0 -64
- package/dist/libs/intlayer-api/ai.cjs.map +0 -1
- package/dist/libs/intlayer-api/ai.d.ts +0 -18
- package/dist/libs/intlayer-api/ai.d.ts.map +0 -1
- package/dist/libs/intlayer-api/ai.mjs +0 -64
- package/dist/libs/intlayer-api/ai.mjs.map +0 -1
- package/dist/libs/intlayer-api/auth.cjs +0 -141
- package/dist/libs/intlayer-api/auth.cjs.map +0 -1
- package/dist/libs/intlayer-api/auth.d.ts +0 -38
- package/dist/libs/intlayer-api/auth.d.ts.map +0 -1
- package/dist/libs/intlayer-api/auth.mjs +0 -141
- package/dist/libs/intlayer-api/auth.mjs.map +0 -1
- package/dist/libs/intlayer-api/dictionary.cjs +0 -78
- package/dist/libs/intlayer-api/dictionary.cjs.map +0 -1
- package/dist/libs/intlayer-api/dictionary.d.ts +0 -22
- package/dist/libs/intlayer-api/dictionary.d.ts.map +0 -1
- package/dist/libs/intlayer-api/dictionary.mjs +0 -78
- package/dist/libs/intlayer-api/dictionary.mjs.map +0 -1
- package/dist/libs/intlayer-api/fetcher.cjs +0 -73
- package/dist/libs/intlayer-api/fetcher.cjs.map +0 -1
- package/dist/libs/intlayer-api/fetcher.d.ts +0 -70
- package/dist/libs/intlayer-api/fetcher.d.ts.map +0 -1
- package/dist/libs/intlayer-api/fetcher.mjs +0 -73
- package/dist/libs/intlayer-api/fetcher.mjs.map +0 -1
- package/dist/libs/intlayer-api/index.cjs +0 -24
- package/dist/libs/intlayer-api/index.cjs.map +0 -1
- package/dist/libs/intlayer-api/index.d.ts +0 -157
- package/dist/libs/intlayer-api/index.d.ts.map +0 -1
- package/dist/libs/intlayer-api/index.mjs +0 -24
- package/dist/libs/intlayer-api/index.mjs.map +0 -1
- package/dist/libs/intlayer-api/organization.cjs +0 -96
- package/dist/libs/intlayer-api/organization.cjs.map +0 -1
- package/dist/libs/intlayer-api/organization.d.ts +0 -26
- package/dist/libs/intlayer-api/organization.d.ts.map +0 -1
- package/dist/libs/intlayer-api/organization.mjs +0 -96
- package/dist/libs/intlayer-api/organization.mjs.map +0 -1
- package/dist/libs/intlayer-api/project.cjs +0 -110
- package/dist/libs/intlayer-api/project.cjs.map +0 -1
- package/dist/libs/intlayer-api/project.d.ts +0 -28
- package/dist/libs/intlayer-api/project.d.ts.map +0 -1
- package/dist/libs/intlayer-api/project.mjs +0 -110
- package/dist/libs/intlayer-api/project.mjs.map +0 -1
- package/dist/libs/intlayer-api/stripe.cjs +0 -31
- package/dist/libs/intlayer-api/stripe.cjs.map +0 -1
- package/dist/libs/intlayer-api/stripe.d.ts +0 -8
- package/dist/libs/intlayer-api/stripe.d.ts.map +0 -1
- package/dist/libs/intlayer-api/stripe.mjs +0 -31
- package/dist/libs/intlayer-api/stripe.mjs.map +0 -1
- package/dist/libs/intlayer-api/tag.cjs +0 -52
- package/dist/libs/intlayer-api/tag.cjs.map +0 -1
- package/dist/libs/intlayer-api/tag.d.ts +0 -16
- package/dist/libs/intlayer-api/tag.d.ts.map +0 -1
- package/dist/libs/intlayer-api/tag.mjs +0 -52
- package/dist/libs/intlayer-api/tag.mjs.map +0 -1
- package/dist/libs/intlayer-api/user.cjs +0 -70
- package/dist/libs/intlayer-api/user.cjs.map +0 -1
- package/dist/libs/intlayer-api/user.d.ts +0 -22
- package/dist/libs/intlayer-api/user.d.ts.map +0 -1
- package/dist/libs/intlayer-api/user.mjs +0 -70
- package/dist/libs/intlayer-api/user.mjs.map +0 -1
- package/dist/navigation-CE0LMHcY.cjs +0 -8538
- package/dist/navigation-CE0LMHcY.cjs.map +0 -1
- package/dist/navigation-DFabQmdZ.js +0 -914
- package/dist/navigation-DFabQmdZ.js.map +0 -1
- package/dist/navigation-DRtAVQJF.js +0 -8521
- package/dist/navigation-DRtAVQJF.js.map +0 -1
- package/dist/navigation-a7EfWhxz.cjs +0 -913
- package/dist/navigation-a7EfWhxz.cjs.map +0 -1
- package/dist/shallow-lhDIFtEp.cjs +0 -48
- package/dist/shallow-lhDIFtEp.cjs.map +0 -1
- package/dist/shallow-m9BpCkKh.js +0 -49
- package/dist/shallow-m9BpCkKh.js.map +0 -1
- package/dist/useGetAllDictionaries-B1sqs2IB.cjs +0 -34
- package/dist/useGetAllDictionaries-B1sqs2IB.cjs.map +0 -1
- package/dist/useGetAllDictionaries-BbH8vTkY.js +0 -35
- package/dist/useGetAllDictionaries-BbH8vTkY.js.map +0 -1
- package/dist/useGetAllDictionaries-Bgkytpa2.cjs +0 -34
- package/dist/useGetAllDictionaries-Bgkytpa2.cjs.map +0 -1
- package/dist/useGetAllDictionaries-D8ma3h41.cjs +0 -33
- package/dist/useGetAllDictionaries-D8ma3h41.cjs.map +0 -1
- package/dist/useGetAllDictionaries-DHgHEbD5.js +0 -34
- package/dist/useGetAllDictionaries-DHgHEbD5.js.map +0 -1
- package/dist/useGetAllDictionaries-DUzm0rIa.js +0 -35
- package/dist/useGetAllDictionaries-DUzm0rIa.js.map +0 -1
- package/dist/utils/dictionary.cjs +0 -158
- package/dist/utils/dictionary.cjs.map +0 -1
- package/dist/utils/dictionary.d.ts +0 -7
- package/dist/utils/dictionary.d.ts.map +0 -1
- package/dist/utils/dictionary.mjs +0 -158
- package/dist/utils/dictionary.mjs.map +0 -1
- /package/dist/components/IDE/{CodeBlockclient.d.ts → CodeBlockClient.d.ts} +0 -0
- /package/dist/components/IDE/{CodeBlockclient.d.ts.map → CodeBlockClient.d.ts.map} +0 -0
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AddDictionaryBody, AddDictionaryResult, DeleteDictionaryParam, DeleteDictionaryResult, GetDictionariesParams, GetDictionariesResult, UpdateDictionaryParam, UpdateDictionaryBody, UpdateDictionaryResult, PushDictionariesBody, PushDictionariesResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetDictionariesKeysResult } from '@intlayer/backend';
|
|
2
|
-
import { IntlayerConfig } from '@intlayer/config/client';
|
|
3
|
-
import { FetcherOptions } from './fetcher';
|
|
4
|
-
export declare const getDictionaryAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
5
|
-
getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
|
|
6
|
-
getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
|
|
7
|
-
getDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
|
|
8
|
-
pushDictionaries: (dictionaries: PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
|
|
9
|
-
addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
|
|
10
|
-
updateDictionary: (dictionaryId: UpdateDictionaryParam["dictionaryId"], dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
|
|
11
|
-
deleteDictionary: (id: DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
|
|
12
|
-
};
|
|
13
|
-
export declare const dictionaryAPI: {
|
|
14
|
-
getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
|
|
15
|
-
getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
|
|
16
|
-
getDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
|
|
17
|
-
pushDictionaries: (dictionaries: PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
|
|
18
|
-
addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
|
|
19
|
-
updateDictionary: (dictionaryId: UpdateDictionaryParam["dictionaryId"], dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
|
|
20
|
-
deleteDictionary: (id: DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=dictionary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { getConfiguration } from "@intlayer/config/client";
|
|
2
|
-
import { fetcher } from "./fetcher.mjs";
|
|
3
|
-
const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
4
|
-
const { backendURL } = (intlayerConfig ?? getConfiguration()).editor;
|
|
5
|
-
const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;
|
|
6
|
-
const getDictionaries = async (filters, otherOptions = {}) => await fetcher(
|
|
7
|
-
PROJECT_API_ROUTE,
|
|
8
|
-
authAPIOptions,
|
|
9
|
-
otherOptions,
|
|
10
|
-
{
|
|
11
|
-
params: filters
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
const getDictionariesKeys = async (otherOptions = {}) => await fetcher(
|
|
15
|
-
`${PROJECT_API_ROUTE}/keys`,
|
|
16
|
-
authAPIOptions,
|
|
17
|
-
otherOptions
|
|
18
|
-
);
|
|
19
|
-
const getDictionary = async (dictionaryKey, version, otherOptions = {}) => await fetcher(
|
|
20
|
-
`${PROJECT_API_ROUTE}/${dictionaryKey}`,
|
|
21
|
-
authAPIOptions,
|
|
22
|
-
otherOptions,
|
|
23
|
-
{
|
|
24
|
-
params: version ? { version: version.toString() } : void 0
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
const addDictionary = async (dictionary, otherOptions = {}) => await fetcher(
|
|
28
|
-
`${PROJECT_API_ROUTE}`,
|
|
29
|
-
authAPIOptions,
|
|
30
|
-
otherOptions,
|
|
31
|
-
{
|
|
32
|
-
method: "POST",
|
|
33
|
-
body: dictionary
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
const pushDictionaries = async (dictionaries, otherOptions = {}) => await fetcher(
|
|
37
|
-
`${PROJECT_API_ROUTE}`,
|
|
38
|
-
authAPIOptions,
|
|
39
|
-
otherOptions,
|
|
40
|
-
{
|
|
41
|
-
method: "PATCH",
|
|
42
|
-
body: { dictionaries }
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
const updateDictionary = async (dictionaryId, dictionary, otherOptions = {}) => await fetcher(
|
|
46
|
-
`${PROJECT_API_ROUTE}/${dictionaryId}`,
|
|
47
|
-
authAPIOptions,
|
|
48
|
-
otherOptions,
|
|
49
|
-
{
|
|
50
|
-
method: "PUT",
|
|
51
|
-
body: dictionary
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
const deleteDictionary = async (id, otherOptions = {}) => await fetcher(
|
|
55
|
-
`${PROJECT_API_ROUTE}`,
|
|
56
|
-
authAPIOptions,
|
|
57
|
-
otherOptions,
|
|
58
|
-
{
|
|
59
|
-
method: "DELETE",
|
|
60
|
-
body: { id }
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
return {
|
|
64
|
-
getDictionaries,
|
|
65
|
-
getDictionariesKeys,
|
|
66
|
-
getDictionary,
|
|
67
|
-
pushDictionaries,
|
|
68
|
-
addDictionary,
|
|
69
|
-
updateDictionary,
|
|
70
|
-
deleteDictionary
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
const dictionaryAPI = getDictionaryAPI();
|
|
74
|
-
export {
|
|
75
|
-
dictionaryAPI,
|
|
76
|
-
getDictionaryAPI
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=dictionary.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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;"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fetcherOptions = {
|
|
4
|
-
method: "GET",
|
|
5
|
-
// Default HTTP method
|
|
6
|
-
headers: {
|
|
7
|
-
"Content-Type": "application/json"
|
|
8
|
-
// Default content type
|
|
9
|
-
},
|
|
10
|
-
credentials: "include"
|
|
11
|
-
// Include cookies in the request
|
|
12
|
-
};
|
|
13
|
-
const removeUndefined = (obj) => {
|
|
14
|
-
Object.keys(obj).forEach((key) => {
|
|
15
|
-
if (obj[key] === void 0) {
|
|
16
|
-
delete obj[key];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
return obj;
|
|
20
|
-
};
|
|
21
|
-
const deepMerge = (objects) => objects.reduce((acc, obj) => {
|
|
22
|
-
const acc1 = acc ?? {};
|
|
23
|
-
const obj1 = removeUndefined(obj ?? {});
|
|
24
|
-
if (typeof acc1 === "object" && typeof obj1 === "object") {
|
|
25
|
-
return { ...acc1, ...obj1 };
|
|
26
|
-
}
|
|
27
|
-
return obj1 ?? acc1;
|
|
28
|
-
}, {});
|
|
29
|
-
const fetcher = async (url, ...options) => {
|
|
30
|
-
let paramsString = "";
|
|
31
|
-
let bodyString = void 0;
|
|
32
|
-
const otherOptions = options.map(
|
|
33
|
-
({ body, params: params2, headers, ...otherOptions2 }) => otherOptions2
|
|
34
|
-
);
|
|
35
|
-
const mergedOptions = deepMerge([fetcherOptions, ...otherOptions]);
|
|
36
|
-
const mergedHeaders = deepMerge([
|
|
37
|
-
fetcherOptions.headers,
|
|
38
|
-
...options.map((option) => option.headers)
|
|
39
|
-
]);
|
|
40
|
-
const params = deepMerge(options.map((option) => option.params));
|
|
41
|
-
const method = mergedOptions.method;
|
|
42
|
-
if (method !== "GET" && method !== "HEAD") {
|
|
43
|
-
const body = deepMerge(options.map((option) => option.body));
|
|
44
|
-
if (mergedHeaders?.["Content-Type"] === "application/x-www-form-urlencoded") {
|
|
45
|
-
bodyString = new URLSearchParams(
|
|
46
|
-
body
|
|
47
|
-
).toString();
|
|
48
|
-
} else {
|
|
49
|
-
bodyString = JSON.stringify(body);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (Object.entries(params).length > 0) {
|
|
53
|
-
paramsString = `?${new URLSearchParams(
|
|
54
|
-
params
|
|
55
|
-
).toString()}`;
|
|
56
|
-
}
|
|
57
|
-
const formattedOptions = {
|
|
58
|
-
...mergedOptions,
|
|
59
|
-
headers: mergedHeaders,
|
|
60
|
-
body: bodyString
|
|
61
|
-
};
|
|
62
|
-
const urlResult = `${url}${paramsString}`;
|
|
63
|
-
const response = await fetch(urlResult, formattedOptions);
|
|
64
|
-
if (!response.ok) {
|
|
65
|
-
const result = await response.json();
|
|
66
|
-
console.error(result);
|
|
67
|
-
throw new Error(JSON.stringify(result.error) ?? "An error occurred");
|
|
68
|
-
}
|
|
69
|
-
return await response.json();
|
|
70
|
-
};
|
|
71
|
-
exports.fetcher = fetcher;
|
|
72
|
-
exports.fetcherOptions = fetcherOptions;
|
|
73
|
-
//# sourceMappingURL=fetcher.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetcher.cjs","sources":["../../../src/libs/intlayer-api/fetcher.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', // Include cookies in the request\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 // 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 };\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 console.error(result);\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"],"names":["params","otherOptions"],"mappings":";;AAwBO,MAAM,iBAAiC;AAAA,EAC5C,QAAQ;AAAA;AAAA,EACR,SAAS;AAAA,IACP,gBAAgB;AAAA;AAAA,EAClB;AAAA,EACA,aAAa;AAAA;AACf;AASA,MAAM,kBAAkB,CAAC,QAAgB;AACvC,SAAO,KAAK,GAAG,EAAE,QAAQ,CAAC,QAAQ;AAC5B,QAAA,IAAI,GAAuB,MAAM,QAAW;AAC9C,aAAO,IAAI,GAAuB;AAAA,IAAA;AAAA,EACpC,CACD;AACM,SAAA;AACT;AAUA,MAAM,YAAY,CAAmB,YACnC,QAAQ,OAAO,CAAC,KAAK,QAAQ;AACrB,QAAA,OAAW,OAAO,CAAC;AACzB,QAAM,OAAU,gBAAgB,OAAO,EAAE;AAEzC,MAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;AAExD,WAAO,EAAE,GAAG,MAAM,GAAG,KAAK;AAAA,EAAA;AAI5B,SAAO,QAAQ;AACjB,GAAG,EAAO;AAiDC,MAAA,UAAU,OACrB,QACG,YACY;AAEf,MAAI,eAAe;AACnB,MAAI,aAAiC;AAGrC,QAAM,eAAe,QAAQ;AAAA,IAC3B,CAAC,EAAE,MAAM,QAAAA,SAAQ,SAAS,GAAGC,oBAAmBA;AAAAA,EAClD;AAGA,QAAM,gBAAgB,UAAU,CAAC,gBAAgB,GAAG,YAAY,CAAC;AAGjE,QAAM,gBAAgB,UAAU;AAAA,IAC9B,eAAe;AAAA,IACf,GAAG,QAAQ,IAAI,CAAC,WAAW,OAAO,OAAO;AAAA,EAAA,CAC1C;AAGK,QAAA,SAAS,UAAU,QAAQ,IAAI,CAAC,WAAW,OAAO,MAAM,CAAC;AAE/D,QAAM,SAAS,cAAc;AAGzB,MAAA,WAAW,SAAS,WAAW,QAAQ;AAEnC,UAAA,OAAO,UAAU,QAAQ,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC;AAEzD,QAAA,gBAAgB,cAAmC,MACnD,qCACA;AAEA,mBAAa,IAAI;AAAA,QACf;AAAA,QACA,SAAS;AAAA,IAAA,OACN;AAEQ,mBAAA,KAAK,UAAU,IAAI;AAAA,IAAA;AAAA,EAClC;AAIF,MAAI,OAAO,QAAQ,MAAM,EAAE,SAAS,GAAG;AACrC,mBAAe,IAAI,IAAI;AAAA,MACrB;AAAA,IAAA,EACA,SAAU,CAAA;AAAA,EAAA;AAId,QAAM,mBAAgC;AAAA,IACpC,GAAG;AAAA,IACH,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAGA,QAAM,YAAY,GAAG,GAAG,GAAG,YAAY;AAGvC,QAAM,WAAW,MAAM,MAAM,WAAW,gBAAgB;AAEpD,MAAA,CAAC,SAAS,IAAI;AACV,UAAA,SAAS,MAAM,SAAS,KAAK;AAEnC,YAAQ,MAAM,MAAM;AAGpB,UAAM,IAAI,MAAM,KAAK,UAAU,OAAO,KAAK,KAAK,mBAAmB;AAAA,EAAA;AAE9D,SAAA,MAAM,SAAS,KAAK;AAC7B;;;"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definition for options used in the fetcher function.
|
|
3
|
-
* Extends the standard RequestInit interface (excluding 'body'),
|
|
4
|
-
* and adds 'body' and 'params' properties for convenience.
|
|
5
|
-
*/
|
|
6
|
-
export type FetcherOptions = Omit<RequestInit, 'body'> & {
|
|
7
|
-
/**
|
|
8
|
-
* Body of the request. Should be a key-value pair object.
|
|
9
|
-
*/
|
|
10
|
-
body?: Record<string, unknown>;
|
|
11
|
-
/**
|
|
12
|
-
* Query parameters to be appended to the URL.
|
|
13
|
-
*/
|
|
14
|
-
params?: Record<string, string | string[] | undefined> | string[] | URLSearchParams;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Default options for the fetcher function.
|
|
18
|
-
* Sets the default method to 'GET', the 'Content-Type' header to 'application/json',
|
|
19
|
-
* and includes credentials in the request.
|
|
20
|
-
*/
|
|
21
|
-
export declare const fetcherOptions: FetcherOptions;
|
|
22
|
-
/**
|
|
23
|
-
* Fetcher function to make HTTP requests.
|
|
24
|
-
* It merges default options with user-provided options,
|
|
25
|
-
* handles query parameters and request body,
|
|
26
|
-
* and returns the parsed JSON response.
|
|
27
|
-
*
|
|
28
|
-
* @template T - The expected type of the response data.
|
|
29
|
-
* @param url - The endpoint URL.
|
|
30
|
-
* @param options - Additional options to customize the request.
|
|
31
|
-
* @returns A promise that resolves with the response data of type T.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```typescript
|
|
35
|
-
* // Making a GET request with query parameters
|
|
36
|
-
* const data = await fetcher<MyResponseType>('https://api.example.com/data', {
|
|
37
|
-
* params: { search: 'query' },
|
|
38
|
-
* });
|
|
39
|
-
*
|
|
40
|
-
* // Making a POST request with a JSON body
|
|
41
|
-
* const result = await fetcher<AnotherResponseType>('https://api.example.com/submit', {
|
|
42
|
-
* method: 'POST',
|
|
43
|
-
* body: { key: 'value' },
|
|
44
|
-
* });
|
|
45
|
-
*
|
|
46
|
-
* // Merge body, headers, and params
|
|
47
|
-
* const result = await fetcher<AnotherResponseType>('https://api.example.com/submit', {
|
|
48
|
-
* method: 'POST',
|
|
49
|
-
* body: { key: 'value' },
|
|
50
|
-
* headers: { 'Content-Type': 'application/json' },
|
|
51
|
-
* params: { search: 'query' },
|
|
52
|
-
* },
|
|
53
|
-
* {
|
|
54
|
-
* headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
55
|
-
* params: { page: 1 },
|
|
56
|
-
* });
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* Result:
|
|
60
|
-
* ```typescript
|
|
61
|
-
* {
|
|
62
|
-
* method: 'POST',
|
|
63
|
-
* headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
64
|
-
* params: { page: 1, search: 'query' },
|
|
65
|
-
* body: { key: 'value' },
|
|
66
|
-
* }
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
export declare const fetcher: <T>(url: string, ...options: FetcherOptions[]) => Promise<T>;
|
|
70
|
-
//# sourceMappingURL=fetcher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../../src/libs/intlayer-api/fetcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG;IACvD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAC7C,MAAM,EAAE,GACR,eAAe,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,cAM5B,CAAC;AAwCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,OAAO,GAAU,CAAC,OACxB,MAAM,cACC,cAAc,EAAE,KAC3B,OAAO,CAAC,CAAC,CAuEX,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
const fetcherOptions = {
|
|
2
|
-
method: "GET",
|
|
3
|
-
// Default HTTP method
|
|
4
|
-
headers: {
|
|
5
|
-
"Content-Type": "application/json"
|
|
6
|
-
// Default content type
|
|
7
|
-
},
|
|
8
|
-
credentials: "include"
|
|
9
|
-
// Include cookies in the request
|
|
10
|
-
};
|
|
11
|
-
const removeUndefined = (obj) => {
|
|
12
|
-
Object.keys(obj).forEach((key) => {
|
|
13
|
-
if (obj[key] === void 0) {
|
|
14
|
-
delete obj[key];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return obj;
|
|
18
|
-
};
|
|
19
|
-
const deepMerge = (objects) => objects.reduce((acc, obj) => {
|
|
20
|
-
const acc1 = acc ?? {};
|
|
21
|
-
const obj1 = removeUndefined(obj ?? {});
|
|
22
|
-
if (typeof acc1 === "object" && typeof obj1 === "object") {
|
|
23
|
-
return { ...acc1, ...obj1 };
|
|
24
|
-
}
|
|
25
|
-
return obj1 ?? acc1;
|
|
26
|
-
}, {});
|
|
27
|
-
const fetcher = async (url, ...options) => {
|
|
28
|
-
let paramsString = "";
|
|
29
|
-
let bodyString = void 0;
|
|
30
|
-
const otherOptions = options.map(
|
|
31
|
-
({ body, params: params2, headers, ...otherOptions2 }) => otherOptions2
|
|
32
|
-
);
|
|
33
|
-
const mergedOptions = deepMerge([fetcherOptions, ...otherOptions]);
|
|
34
|
-
const mergedHeaders = deepMerge([
|
|
35
|
-
fetcherOptions.headers,
|
|
36
|
-
...options.map((option) => option.headers)
|
|
37
|
-
]);
|
|
38
|
-
const params = deepMerge(options.map((option) => option.params));
|
|
39
|
-
const method = mergedOptions.method;
|
|
40
|
-
if (method !== "GET" && method !== "HEAD") {
|
|
41
|
-
const body = deepMerge(options.map((option) => option.body));
|
|
42
|
-
if (mergedHeaders?.["Content-Type"] === "application/x-www-form-urlencoded") {
|
|
43
|
-
bodyString = new URLSearchParams(
|
|
44
|
-
body
|
|
45
|
-
).toString();
|
|
46
|
-
} else {
|
|
47
|
-
bodyString = JSON.stringify(body);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (Object.entries(params).length > 0) {
|
|
51
|
-
paramsString = `?${new URLSearchParams(
|
|
52
|
-
params
|
|
53
|
-
).toString()}`;
|
|
54
|
-
}
|
|
55
|
-
const formattedOptions = {
|
|
56
|
-
...mergedOptions,
|
|
57
|
-
headers: mergedHeaders,
|
|
58
|
-
body: bodyString
|
|
59
|
-
};
|
|
60
|
-
const urlResult = `${url}${paramsString}`;
|
|
61
|
-
const response = await fetch(urlResult, formattedOptions);
|
|
62
|
-
if (!response.ok) {
|
|
63
|
-
const result = await response.json();
|
|
64
|
-
console.error(result);
|
|
65
|
-
throw new Error(JSON.stringify(result.error) ?? "An error occurred");
|
|
66
|
-
}
|
|
67
|
-
return await response.json();
|
|
68
|
-
};
|
|
69
|
-
export {
|
|
70
|
-
fetcher,
|
|
71
|
-
fetcherOptions
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=fetcher.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetcher.mjs","sources":["../../../src/libs/intlayer-api/fetcher.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', // Include cookies in the request\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 // 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 };\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 console.error(result);\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"],"names":["params","otherOptions"],"mappings":"AAwBO,MAAM,iBAAiC;AAAA,EAC5C,QAAQ;AAAA;AAAA,EACR,SAAS;AAAA,IACP,gBAAgB;AAAA;AAAA,EAClB;AAAA,EACA,aAAa;AAAA;AACf;AASA,MAAM,kBAAkB,CAAC,QAAgB;AACvC,SAAO,KAAK,GAAG,EAAE,QAAQ,CAAC,QAAQ;AAC5B,QAAA,IAAI,GAAuB,MAAM,QAAW;AAC9C,aAAO,IAAI,GAAuB;AAAA,IAAA;AAAA,EACpC,CACD;AACM,SAAA;AACT;AAUA,MAAM,YAAY,CAAmB,YACnC,QAAQ,OAAO,CAAC,KAAK,QAAQ;AACrB,QAAA,OAAW,OAAO,CAAC;AACzB,QAAM,OAAU,gBAAgB,OAAO,EAAE;AAEzC,MAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;AAExD,WAAO,EAAE,GAAG,MAAM,GAAG,KAAK;AAAA,EAAA;AAI5B,SAAO,QAAQ;AACjB,GAAG,EAAO;AAiDC,MAAA,UAAU,OACrB,QACG,YACY;AAEf,MAAI,eAAe;AACnB,MAAI,aAAiC;AAGrC,QAAM,eAAe,QAAQ;AAAA,IAC3B,CAAC,EAAE,MAAM,QAAAA,SAAQ,SAAS,GAAGC,oBAAmBA;AAAAA,EAClD;AAGA,QAAM,gBAAgB,UAAU,CAAC,gBAAgB,GAAG,YAAY,CAAC;AAGjE,QAAM,gBAAgB,UAAU;AAAA,IAC9B,eAAe;AAAA,IACf,GAAG,QAAQ,IAAI,CAAC,WAAW,OAAO,OAAO;AAAA,EAAA,CAC1C;AAGK,QAAA,SAAS,UAAU,QAAQ,IAAI,CAAC,WAAW,OAAO,MAAM,CAAC;AAE/D,QAAM,SAAS,cAAc;AAGzB,MAAA,WAAW,SAAS,WAAW,QAAQ;AAEnC,UAAA,OAAO,UAAU,QAAQ,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC;AAEzD,QAAA,gBAAgB,cAAmC,MACnD,qCACA;AAEA,mBAAa,IAAI;AAAA,QACf;AAAA,QACA,SAAS;AAAA,IAAA,OACN;AAEQ,mBAAA,KAAK,UAAU,IAAI;AAAA,IAAA;AAAA,EAClC;AAIF,MAAI,OAAO,QAAQ,MAAM,EAAE,SAAS,GAAG;AACrC,mBAAe,IAAI,IAAI;AAAA,MACrB;AAAA,IAAA,EACA,SAAU,CAAA;AAAA,EAAA;AAId,QAAM,mBAAgC;AAAA,IACpC,GAAG;AAAA,IACH,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAGA,QAAM,YAAY,GAAG,GAAG,GAAG,YAAY;AAGvC,QAAM,WAAW,MAAM,MAAM,WAAW,gBAAgB;AAEpD,MAAA,CAAC,SAAS,IAAI;AACV,UAAA,SAAS,MAAM,SAAS,KAAK;AAEnC,YAAQ,MAAM,MAAM;AAGpB,UAAM,IAAI,MAAM,KAAK,UAAU,OAAO,KAAK,KAAK,mBAAmB;AAAA,EAAA;AAE9D,SAAA,MAAM,SAAS,KAAK;AAC7B;"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const libs_intlayerApi_ai = require("./ai.cjs");
|
|
4
|
-
const libs_intlayerApi_auth = require("./auth.cjs");
|
|
5
|
-
const libs_intlayerApi_dictionary = require("./dictionary.cjs");
|
|
6
|
-
const libs_intlayerApi_organization = require("./organization.cjs");
|
|
7
|
-
const libs_intlayerApi_project = require("./project.cjs");
|
|
8
|
-
const libs_intlayerApi_stripe = require("./stripe.cjs");
|
|
9
|
-
const libs_intlayerApi_tag = require("./tag.cjs");
|
|
10
|
-
const libs_intlayerApi_user = require("./user.cjs");
|
|
11
|
-
const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
12
|
-
organization: libs_intlayerApi_organization.getOrganizationAPI(authAPIOptions, intlayerConfig),
|
|
13
|
-
project: libs_intlayerApi_project.getProjectAPI(authAPIOptions, intlayerConfig),
|
|
14
|
-
user: libs_intlayerApi_user.getUserAPI(authAPIOptions, intlayerConfig),
|
|
15
|
-
auth: libs_intlayerApi_auth.getAuthAPI(authAPIOptions, intlayerConfig),
|
|
16
|
-
dictionary: libs_intlayerApi_dictionary.getDictionaryAPI(authAPIOptions, intlayerConfig),
|
|
17
|
-
stripe: libs_intlayerApi_stripe.getStripeAPI(authAPIOptions, intlayerConfig),
|
|
18
|
-
ai: libs_intlayerApi_ai.getAiAPI(authAPIOptions, intlayerConfig),
|
|
19
|
-
tag: libs_intlayerApi_tag.getTagAPI(authAPIOptions, intlayerConfig)
|
|
20
|
-
});
|
|
21
|
-
const intlayerAPI = getIntlayerAPI();
|
|
22
|
-
exports.getIntlayerAPI = getIntlayerAPI;
|
|
23
|
-
exports.intlayerAPI = intlayerAPI;
|
|
24
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;"}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { IntlayerConfig } from '@intlayer/config/client';
|
|
2
|
-
import { FetcherOptions } from './fetcher';
|
|
3
|
-
export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
4
|
-
organization: {
|
|
5
|
-
getOrganizations: (filters?: import('@intlayer/backend').GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetOrganizationsResult>;
|
|
6
|
-
getOrganization: (organizationId: import('@intlayer/backend').GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetOrganizationResult>;
|
|
7
|
-
addOrganization: (organization: import('@intlayer/backend').AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddOrganizationResult>;
|
|
8
|
-
addOrganizationMember: (body: import('@intlayer/backend').AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddOrganizationMemberResult>;
|
|
9
|
-
updateOrganization: (organization: import('@intlayer/backend').UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateOrganizationResult>;
|
|
10
|
-
updateOrganizationMembers: (body: import('@intlayer/backend').UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateOrganizationMembersResult>;
|
|
11
|
-
deleteOrganization: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteOrganizationResult>;
|
|
12
|
-
selectOrganization: (organizationId: import('@intlayer/backend').SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').SelectOrganizationResult>;
|
|
13
|
-
unselectOrganization: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UnselectOrganizationResult>;
|
|
14
|
-
};
|
|
15
|
-
project: {
|
|
16
|
-
getProjects: (filters?: import('@intlayer/backend').GetProjectsParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetProjectsResult>;
|
|
17
|
-
addProject: (project: import('@intlayer/backend').AddProjectBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddProjectResult>;
|
|
18
|
-
updateProject: (project: import('@intlayer/backend').UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateProjectResult>;
|
|
19
|
-
updateProjectMembers: (body: import('@intlayer/backend').UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateProjectMembersResult>;
|
|
20
|
-
deleteProject: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteProjectResult>;
|
|
21
|
-
selectProject: (projectId: import('@intlayer/backend').SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').SelectProjectResult>;
|
|
22
|
-
unselectProject: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UnselectProjectResult>;
|
|
23
|
-
addNewAccessKey: (accessKey: import('@intlayer/backend').AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddNewAccessKeyResponse>;
|
|
24
|
-
deleteAccessKey: (clientId: import('@intlayer/backend').DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteAccessKeyResponse>;
|
|
25
|
-
refreshAccessKey: (clientId: import('@intlayer/backend').RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').RefreshAccessKeyResponse>;
|
|
26
|
-
};
|
|
27
|
-
user: {
|
|
28
|
-
createUser: (user: import('@intlayer/backend').CreateUserBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').CreateUserResult>;
|
|
29
|
-
getUsers: (filters?: import('@intlayer/backend').GetUsersParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetUsersResult>;
|
|
30
|
-
getUserById: (userId: import('@intlayer/backend').GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetUserByIdResult>;
|
|
31
|
-
getUserByAccount: (providerAccountId: import('@intlayer/backend').GetUserByAccountParams["providerAccountId"], provider: import('@intlayer/backend').GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetUserByAccountResult>;
|
|
32
|
-
getUserByEmail: (email: import('@intlayer/backend').GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetUserByEmailResult>;
|
|
33
|
-
updateUser: (user: import('@intlayer/backend').UpdateUserBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateUserResult>;
|
|
34
|
-
deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateUserResult>;
|
|
35
|
-
};
|
|
36
|
-
auth: {
|
|
37
|
-
login: (user: import('@intlayer/backend').LoginBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').LoginResult>;
|
|
38
|
-
getLoginWithGitHubURL: (params: import('@intlayer/backend').GithubLoginQueryParams) => string;
|
|
39
|
-
getLoginWithGoogleURL: (params: import('@intlayer/backend').GoogleLoginQueryParams) => string;
|
|
40
|
-
register: (user: import('@intlayer/backend').RegisterBody, query?: import('@intlayer/backend').RegisterQuery, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').RegisterResult>;
|
|
41
|
-
logout: (otherOptions?: FetcherOptions) => Promise<void>;
|
|
42
|
-
resetPassword: (params: import('@intlayer/backend').ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').ResetPasswordResult>;
|
|
43
|
-
askResetPassword: (email: import('@intlayer/backend').AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AskResetPasswordResult>;
|
|
44
|
-
checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').CheckIfUserHasPasswordResult>;
|
|
45
|
-
verifyEmail: ({ userId, secret }: import('@intlayer/backend').ValidEmailParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').ValidEmailResult>;
|
|
46
|
-
getVerifyEmailStatusURL: (userId: string | import('@intlayer/backend').UserAPI["_id"]) => string;
|
|
47
|
-
changePassword: (data: import('@intlayer/backend').UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdatePasswordResult>;
|
|
48
|
-
createSession: (data: import('@intlayer/backend').CreateSessionBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').CreateSessionResult>;
|
|
49
|
-
getSession: (sessionToken?: import('@intlayer/backend').GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetSessionInformationResult>;
|
|
50
|
-
getCSRFToken: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').SetCSRFTokenResult>;
|
|
51
|
-
getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetOAuth2TokenResult>;
|
|
52
|
-
};
|
|
53
|
-
dictionary: {
|
|
54
|
-
getDictionaries: (filters?: import('@intlayer/backend').GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetDictionariesResult>;
|
|
55
|
-
getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetDictionariesKeysResult>;
|
|
56
|
-
getDictionary: (dictionaryKey: import('@intlayer/backend').GetDictionaryParams["dictionaryKey"], version?: import('@intlayer/backend').GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetDictionaryResult>;
|
|
57
|
-
pushDictionaries: (dictionaries: import('@intlayer/backend').PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').PushDictionariesResult>;
|
|
58
|
-
addDictionary: (dictionary: import('@intlayer/backend').AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddDictionaryResult>;
|
|
59
|
-
updateDictionary: (dictionaryId: import('@intlayer/backend').UpdateDictionaryParam["dictionaryId"], dictionary: import('@intlayer/backend').UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateDictionaryResult>;
|
|
60
|
-
deleteDictionary: (id: import('@intlayer/backend').DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteDictionaryResult>;
|
|
61
|
-
};
|
|
62
|
-
stripe: {
|
|
63
|
-
getSubscription: (body?: import('@intlayer/backend').GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetCheckoutSessionResult>;
|
|
64
|
-
cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetCheckoutSessionResult>;
|
|
65
|
-
};
|
|
66
|
-
ai: {
|
|
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
|
-
askDocQuestion: (body?: import('@intlayer/backend').AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AskDocQuestionResult>;
|
|
72
|
-
};
|
|
73
|
-
tag: {
|
|
74
|
-
getTags: (filters?: import('@intlayer/backend').GetTagsParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetTagsResult>;
|
|
75
|
-
addTag: (tag: import('@intlayer/backend').AddTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddTagResult>;
|
|
76
|
-
updateTag: (tagId: import('@intlayer/backend').UpdateTagParams["tagId"], tag: import('@intlayer/backend').UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateTagResult>;
|
|
77
|
-
deleteTag: (tagId: import('@intlayer/backend').DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteTagResult>;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
export declare const intlayerAPI: {
|
|
81
|
-
organization: {
|
|
82
|
-
getOrganizations: (filters?: import('@intlayer/backend').GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetOrganizationsResult>;
|
|
83
|
-
getOrganization: (organizationId: import('@intlayer/backend').GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetOrganizationResult>;
|
|
84
|
-
addOrganization: (organization: import('@intlayer/backend').AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddOrganizationResult>;
|
|
85
|
-
addOrganizationMember: (body: import('@intlayer/backend').AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddOrganizationMemberResult>;
|
|
86
|
-
updateOrganization: (organization: import('@intlayer/backend').UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateOrganizationResult>;
|
|
87
|
-
updateOrganizationMembers: (body: import('@intlayer/backend').UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateOrganizationMembersResult>;
|
|
88
|
-
deleteOrganization: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteOrganizationResult>;
|
|
89
|
-
selectOrganization: (organizationId: import('@intlayer/backend').SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').SelectOrganizationResult>;
|
|
90
|
-
unselectOrganization: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UnselectOrganizationResult>;
|
|
91
|
-
};
|
|
92
|
-
project: {
|
|
93
|
-
getProjects: (filters?: import('@intlayer/backend').GetProjectsParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetProjectsResult>;
|
|
94
|
-
addProject: (project: import('@intlayer/backend').AddProjectBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddProjectResult>;
|
|
95
|
-
updateProject: (project: import('@intlayer/backend').UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateProjectResult>;
|
|
96
|
-
updateProjectMembers: (body: import('@intlayer/backend').UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateProjectMembersResult>;
|
|
97
|
-
deleteProject: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteProjectResult>;
|
|
98
|
-
selectProject: (projectId: import('@intlayer/backend').SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').SelectProjectResult>;
|
|
99
|
-
unselectProject: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UnselectProjectResult>;
|
|
100
|
-
addNewAccessKey: (accessKey: import('@intlayer/backend').AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddNewAccessKeyResponse>;
|
|
101
|
-
deleteAccessKey: (clientId: import('@intlayer/backend').DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteAccessKeyResponse>;
|
|
102
|
-
refreshAccessKey: (clientId: import('@intlayer/backend').RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').RefreshAccessKeyResponse>;
|
|
103
|
-
};
|
|
104
|
-
user: {
|
|
105
|
-
createUser: (user: import('@intlayer/backend').CreateUserBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').CreateUserResult>;
|
|
106
|
-
getUsers: (filters?: import('@intlayer/backend').GetUsersParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetUsersResult>;
|
|
107
|
-
getUserById: (userId: import('@intlayer/backend').GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetUserByIdResult>;
|
|
108
|
-
getUserByAccount: (providerAccountId: import('@intlayer/backend').GetUserByAccountParams["providerAccountId"], provider: import('@intlayer/backend').GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetUserByAccountResult>;
|
|
109
|
-
getUserByEmail: (email: import('@intlayer/backend').GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetUserByEmailResult>;
|
|
110
|
-
updateUser: (user: import('@intlayer/backend').UpdateUserBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateUserResult>;
|
|
111
|
-
deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateUserResult>;
|
|
112
|
-
};
|
|
113
|
-
auth: {
|
|
114
|
-
login: (user: import('@intlayer/backend').LoginBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').LoginResult>;
|
|
115
|
-
getLoginWithGitHubURL: (params: import('@intlayer/backend').GithubLoginQueryParams) => string;
|
|
116
|
-
getLoginWithGoogleURL: (params: import('@intlayer/backend').GoogleLoginQueryParams) => string;
|
|
117
|
-
register: (user: import('@intlayer/backend').RegisterBody, query?: import('@intlayer/backend').RegisterQuery, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').RegisterResult>;
|
|
118
|
-
logout: (otherOptions?: FetcherOptions) => Promise<void>;
|
|
119
|
-
resetPassword: (params: import('@intlayer/backend').ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').ResetPasswordResult>;
|
|
120
|
-
askResetPassword: (email: import('@intlayer/backend').AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AskResetPasswordResult>;
|
|
121
|
-
checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').CheckIfUserHasPasswordResult>;
|
|
122
|
-
verifyEmail: ({ userId, secret }: import('@intlayer/backend').ValidEmailParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').ValidEmailResult>;
|
|
123
|
-
getVerifyEmailStatusURL: (userId: string | import('@intlayer/backend').UserAPI["_id"]) => string;
|
|
124
|
-
changePassword: (data: import('@intlayer/backend').UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdatePasswordResult>;
|
|
125
|
-
createSession: (data: import('@intlayer/backend').CreateSessionBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').CreateSessionResult>;
|
|
126
|
-
getSession: (sessionToken?: import('@intlayer/backend').GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetSessionInformationResult>;
|
|
127
|
-
getCSRFToken: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').SetCSRFTokenResult>;
|
|
128
|
-
getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetOAuth2TokenResult>;
|
|
129
|
-
};
|
|
130
|
-
dictionary: {
|
|
131
|
-
getDictionaries: (filters?: import('@intlayer/backend').GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetDictionariesResult>;
|
|
132
|
-
getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetDictionariesKeysResult>;
|
|
133
|
-
getDictionary: (dictionaryKey: import('@intlayer/backend').GetDictionaryParams["dictionaryKey"], version?: import('@intlayer/backend').GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetDictionaryResult>;
|
|
134
|
-
pushDictionaries: (dictionaries: import('@intlayer/backend').PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').PushDictionariesResult>;
|
|
135
|
-
addDictionary: (dictionary: import('@intlayer/backend').AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddDictionaryResult>;
|
|
136
|
-
updateDictionary: (dictionaryId: import('@intlayer/backend').UpdateDictionaryParam["dictionaryId"], dictionary: import('@intlayer/backend').UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateDictionaryResult>;
|
|
137
|
-
deleteDictionary: (id: import('@intlayer/backend').DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteDictionaryResult>;
|
|
138
|
-
};
|
|
139
|
-
stripe: {
|
|
140
|
-
getSubscription: (body?: import('@intlayer/backend').GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetCheckoutSessionResult>;
|
|
141
|
-
cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetCheckoutSessionResult>;
|
|
142
|
-
};
|
|
143
|
-
ai: {
|
|
144
|
-
auditContentDeclaration: (body?: import('@intlayer/backend').AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationResult>;
|
|
145
|
-
auditContentDeclarationField: (body?: import('@intlayer/backend').AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationFieldResult>;
|
|
146
|
-
auditContentDeclarationMetadata: (body?: import('@intlayer/backend').AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationMetadataResult>;
|
|
147
|
-
auditTag: (body?: import('@intlayer/backend').AuditTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AuditTagResult>;
|
|
148
|
-
askDocQuestion: (body?: import('@intlayer/backend').AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AskDocQuestionResult>;
|
|
149
|
-
};
|
|
150
|
-
tag: {
|
|
151
|
-
getTags: (filters?: import('@intlayer/backend').GetTagsParams, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').GetTagsResult>;
|
|
152
|
-
addTag: (tag: import('@intlayer/backend').AddTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').AddTagResult>;
|
|
153
|
-
updateTag: (tagId: import('@intlayer/backend').UpdateTagParams["tagId"], tag: import('@intlayer/backend').UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').UpdateTagResult>;
|
|
154
|
-
deleteTag: (tagId: import('@intlayer/backend').DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import('@intlayer/backend').DeleteTagResult>;
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { getAiAPI } from "./ai.mjs";
|
|
2
|
-
import { getAuthAPI } from "./auth.mjs";
|
|
3
|
-
import { getDictionaryAPI } from "./dictionary.mjs";
|
|
4
|
-
import { getOrganizationAPI } from "./organization.mjs";
|
|
5
|
-
import { getProjectAPI } from "./project.mjs";
|
|
6
|
-
import { getStripeAPI } from "./stripe.mjs";
|
|
7
|
-
import { getTagAPI } from "./tag.mjs";
|
|
8
|
-
import { getUserAPI } from "./user.mjs";
|
|
9
|
-
const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
10
|
-
organization: getOrganizationAPI(authAPIOptions, intlayerConfig),
|
|
11
|
-
project: getProjectAPI(authAPIOptions, intlayerConfig),
|
|
12
|
-
user: getUserAPI(authAPIOptions, intlayerConfig),
|
|
13
|
-
auth: getAuthAPI(authAPIOptions, intlayerConfig),
|
|
14
|
-
dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),
|
|
15
|
-
stripe: getStripeAPI(authAPIOptions, intlayerConfig),
|
|
16
|
-
ai: getAiAPI(authAPIOptions, intlayerConfig),
|
|
17
|
-
tag: getTagAPI(authAPIOptions, intlayerConfig)
|
|
18
|
-
});
|
|
19
|
-
const intlayerAPI = getIntlayerAPI();
|
|
20
|
-
export {
|
|
21
|
-
getIntlayerAPI,
|
|
22
|
-
intlayerAPI
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=index.mjs.map
|