@intlayer/design-system 4.1.7 → 4.1.9

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.
Files changed (304) hide show
  1. package/dist/.vite/manifest.json +12 -12
  2. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +2 -1
  3. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
  4. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +2 -1
  5. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
  6. package/dist/components/Auth/useAuth/useOAuth2.d.ts +1 -1
  7. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +2 -2
  8. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +2 -2
  9. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +2 -2
  10. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +2 -2
  11. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +2 -2
  12. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +2 -2
  13. package/dist/{index-CKhNmnU1.cjs → index-NyRxk54x.cjs} +2 -4
  14. package/dist/index-NyRxk54x.cjs.map +1 -0
  15. package/dist/{index-B0Lvoony.js → index-ikcnTPvJ.js} +2 -4
  16. package/dist/index-ikcnTPvJ.js.map +1 -0
  17. package/package.json +22 -19
  18. package/dist/CodeBlockShiki-BlmZyrr7.cjs +0 -29
  19. package/dist/CodeBlockShiki-BlmZyrr7.cjs.map +0 -1
  20. package/dist/CodeBlockShiki-CcpV9SVi.js +0 -29
  21. package/dist/CodeBlockShiki-CcpV9SVi.js.map +0 -1
  22. package/dist/CopyButton-Cxu3goRg.cjs +0 -59
  23. package/dist/CopyButton-Cxu3goRg.cjs.map +0 -1
  24. package/dist/CopyButton-DlcDlf6U.js +0 -60
  25. package/dist/CopyButton-DlcDlf6U.js.map +0 -1
  26. package/dist/Form-0D7KBafQ.cjs +0 -311
  27. package/dist/Form-0D7KBafQ.cjs.map +0 -1
  28. package/dist/Form-7BqwvjVI.cjs +0 -320
  29. package/dist/Form-7BqwvjVI.cjs.map +0 -1
  30. package/dist/Form-B2UufQRJ.cjs +0 -319
  31. package/dist/Form-B2UufQRJ.cjs.map +0 -1
  32. package/dist/Form-BB0kpER9.cjs +0 -301
  33. package/dist/Form-BB0kpER9.cjs.map +0 -1
  34. package/dist/Form-BDcoNTLV.cjs +0 -300
  35. package/dist/Form-BDcoNTLV.cjs.map +0 -1
  36. package/dist/Form-BTogr-fp.js +0 -312
  37. package/dist/Form-BTogr-fp.js.map +0 -1
  38. package/dist/Form-BVkkvSKP.js +0 -312
  39. package/dist/Form-BVkkvSKP.js.map +0 -1
  40. package/dist/Form-Be6Uhb5-.js +0 -312
  41. package/dist/Form-Be6Uhb5-.js.map +0 -1
  42. package/dist/Form-BmQQnl-6.js +0 -312
  43. package/dist/Form-BmQQnl-6.js.map +0 -1
  44. package/dist/Form-BoWOdiwq.js +0 -321
  45. package/dist/Form-BoWOdiwq.js.map +0 -1
  46. package/dist/Form-Bp_ubH9I.cjs +0 -311
  47. package/dist/Form-Bp_ubH9I.cjs.map +0 -1
  48. package/dist/Form-BtqRbgLu.cjs +0 -311
  49. package/dist/Form-BtqRbgLu.cjs.map +0 -1
  50. package/dist/Form-COVZyto7.cjs +0 -311
  51. package/dist/Form-COVZyto7.cjs.map +0 -1
  52. package/dist/Form-CVD_3nCD.js +0 -312
  53. package/dist/Form-CVD_3nCD.js.map +0 -1
  54. package/dist/Form-Cfklj1_H.js +0 -320
  55. package/dist/Form-Cfklj1_H.js.map +0 -1
  56. package/dist/Form-ClAAiVNm.cjs +0 -311
  57. package/dist/Form-ClAAiVNm.cjs.map +0 -1
  58. package/dist/Form-DGLgTAdY.js +0 -302
  59. package/dist/Form-DGLgTAdY.js.map +0 -1
  60. package/dist/Form-DhsgC7kB.js +0 -301
  61. package/dist/Form-DhsgC7kB.js.map +0 -1
  62. package/dist/Form-Dv0uHqbL.cjs +0 -320
  63. package/dist/Form-Dv0uHqbL.cjs.map +0 -1
  64. package/dist/Form-OK9zfg6E.js +0 -321
  65. package/dist/Form-OK9zfg6E.js.map +0 -1
  66. package/dist/components/ContentEditor/ContentEditorCode.cjs +0 -78
  67. package/dist/components/ContentEditor/ContentEditorCode.cjs.map +0 -1
  68. package/dist/components/ContentEditor/ContentEditorCode.d.ts +0 -11
  69. package/dist/components/ContentEditor/ContentEditorCode.d.ts.map +0 -1
  70. package/dist/components/ContentEditor/ContentEditorCode.mjs +0 -78
  71. package/dist/components/ContentEditor/ContentEditorCode.mjs.map +0 -1
  72. package/dist/components/DictionaryEditor/useEditedContentStore.cjs +0 -490
  73. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +0 -1
  74. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +0 -28
  75. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +0 -1
  76. package/dist/components/DictionaryEditor/useEditedContentStore.mjs +0 -490
  77. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +0 -1
  78. package/dist/components/DictionaryEditor/useEditionPanelStore.cjs +0 -15
  79. package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +0 -1
  80. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +0 -15
  81. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts.map +0 -1
  82. package/dist/components/DictionaryEditor/useEditionPanelStore.mjs +0 -15
  83. package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +0 -1
  84. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts +0 -8
  85. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts.map +0 -1
  86. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts +0 -13
  87. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts.map +0 -1
  88. package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts +0 -9
  89. package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts.map +0 -1
  90. package/dist/components/DropDown/types.cjs +0 -2
  91. package/dist/components/DropDown/types.cjs.map +0 -1
  92. package/dist/components/DropDown/types.d.ts +0 -19
  93. package/dist/components/DropDown/types.d.ts.map +0 -1
  94. package/dist/components/DropDown/types.mjs +0 -2
  95. package/dist/components/DropDown/types.mjs.map +0 -1
  96. package/dist/components/IDE/CodeBlock.cjs +0 -54
  97. package/dist/components/IDE/CodeBlock.cjs.map +0 -1
  98. package/dist/components/IDE/CodeBlock.d.ts +0 -12
  99. package/dist/components/IDE/CodeBlock.d.ts.map +0 -1
  100. package/dist/components/IDE/CodeBlock.mjs +0 -54
  101. package/dist/components/IDE/CodeBlock.mjs.map +0 -1
  102. package/dist/components/IDE/CodeBlockLoader.cjs +0 -28
  103. package/dist/components/IDE/CodeBlockLoader.cjs.map +0 -1
  104. package/dist/components/IDE/CodeBlockLoader.d.ts +0 -4
  105. package/dist/components/IDE/CodeBlockLoader.d.ts.map +0 -1
  106. package/dist/components/IDE/CodeBlockLoader.mjs +0 -28
  107. package/dist/components/IDE/CodeBlockLoader.mjs.map +0 -1
  108. package/dist/components/IDE/CodeBlockShiki.d.ts +0 -3
  109. package/dist/components/IDE/CodeBlockShiki.d.ts.map +0 -1
  110. package/dist/components/IDE/CodeRender copy.cjs +0 -141
  111. package/dist/components/IDE/CodeRender copy.cjs.map +0 -1
  112. package/dist/components/IDE/CodeRender copy.d.ts +0 -14
  113. package/dist/components/IDE/CodeRender copy.d.ts.map +0 -1
  114. package/dist/components/IDE/CodeRender copy.mjs +0 -141
  115. package/dist/components/IDE/CodeRender copy.mjs.map +0 -1
  116. package/dist/components/IDE/CodeRender.cjs +0 -49
  117. package/dist/components/IDE/CodeRender.cjs.map +0 -1
  118. package/dist/components/IDE/CodeRender.d.ts +0 -9
  119. package/dist/components/IDE/CodeRender.d.ts.map +0 -1
  120. package/dist/components/IDE/CodeRender.mjs +0 -49
  121. package/dist/components/IDE/CodeRender.mjs.map +0 -1
  122. package/dist/components/IDE/CodeRenderer.cjs +0 -27
  123. package/dist/components/IDE/CodeRenderer.cjs.map +0 -1
  124. package/dist/components/IDE/CodeRenderer.d.ts +0 -5
  125. package/dist/components/IDE/CodeRenderer.d.ts.map +0 -1
  126. package/dist/components/IDE/CodeRenderer.mjs +0 -27
  127. package/dist/components/IDE/CodeRenderer.mjs.map +0 -1
  128. package/dist/components/IDE/EditableCodeBlock.d.ts +0 -9
  129. package/dist/components/IDE/EditableCodeBlock.d.ts.map +0 -1
  130. package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts +0 -13
  131. package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts.map +0 -1
  132. package/dist/design-system.css +0 -235
  133. package/dist/index-Ai6eeqZH.js +0 -702
  134. package/dist/index-Ai6eeqZH.js.map +0 -1
  135. package/dist/index-B-VAyQ9R.js +0 -673
  136. package/dist/index-B-VAyQ9R.js.map +0 -1
  137. package/dist/index-B0Lvoony.js.map +0 -1
  138. package/dist/index-B1nU1-65.cjs +0 -690
  139. package/dist/index-B1nU1-65.cjs.map +0 -1
  140. package/dist/index-B2UElBcQ.cjs +0 -200
  141. package/dist/index-B2UElBcQ.cjs.map +0 -1
  142. package/dist/index-BIV0x_z2.js +0 -206
  143. package/dist/index-BIV0x_z2.js.map +0 -1
  144. package/dist/index-BIyA5LAs.js +0 -691
  145. package/dist/index-BIyA5LAs.js.map +0 -1
  146. package/dist/index-BMzh1_UJ.js +0 -201
  147. package/dist/index-BMzh1_UJ.js.map +0 -1
  148. package/dist/index-BNH9wXVj.cjs +0 -205
  149. package/dist/index-BNH9wXVj.cjs.map +0 -1
  150. package/dist/index-BbqOa6BU.cjs +0 -701
  151. package/dist/index-BbqOa6BU.cjs.map +0 -1
  152. package/dist/index-BdTa-9zc.js +0 -201
  153. package/dist/index-BdTa-9zc.js.map +0 -1
  154. package/dist/index-BqZwP4Lr.js +0 -691
  155. package/dist/index-BqZwP4Lr.js.map +0 -1
  156. package/dist/index-BtZWYJhL.cjs +0 -200
  157. package/dist/index-BtZWYJhL.cjs.map +0 -1
  158. package/dist/index-Buecpjbh.cjs +0 -690
  159. package/dist/index-Buecpjbh.cjs.map +0 -1
  160. package/dist/index-CDEJjmId.js +0 -694
  161. package/dist/index-CDEJjmId.js.map +0 -1
  162. package/dist/index-CKhNmnU1.cjs.map +0 -1
  163. package/dist/index-CTAyk6RY.cjs +0 -693
  164. package/dist/index-CTAyk6RY.cjs.map +0 -1
  165. package/dist/index-CVC2sfEj.js +0 -693
  166. package/dist/index-CVC2sfEj.js.map +0 -1
  167. package/dist/index-CVz0RdK6.js +0 -691
  168. package/dist/index-CVz0RdK6.js.map +0 -1
  169. package/dist/index-CjF2ksU7.cjs +0 -693
  170. package/dist/index-CjF2ksU7.cjs.map +0 -1
  171. package/dist/index-CuQs5759.cjs +0 -692
  172. package/dist/index-CuQs5759.cjs.map +0 -1
  173. package/dist/index-D69JRZcQ.js +0 -206
  174. package/dist/index-D69JRZcQ.js.map +0 -1
  175. package/dist/index-D9oaKvKC.js +0 -201
  176. package/dist/index-D9oaKvKC.js.map +0 -1
  177. package/dist/index-DFc7og1d.cjs +0 -671
  178. package/dist/index-DFc7og1d.cjs.map +0 -1
  179. package/dist/index-DTCehvKe.cjs +0 -200
  180. package/dist/index-DTCehvKe.cjs.map +0 -1
  181. package/dist/index-D_MDocy7.cjs +0 -690
  182. package/dist/index-D_MDocy7.cjs.map +0 -1
  183. package/dist/index-DcWYZrJW.js +0 -672
  184. package/dist/index-DcWYZrJW.js.map +0 -1
  185. package/dist/index-Djo2Jnua.cjs +0 -693
  186. package/dist/index-Djo2Jnua.cjs.map +0 -1
  187. package/dist/index-LFTthFne.js +0 -694
  188. package/dist/index-LFTthFne.js.map +0 -1
  189. package/dist/index-SOIahRpS.cjs +0 -205
  190. package/dist/index-SOIahRpS.cjs.map +0 -1
  191. package/dist/index-T-TjVQoD.js +0 -671
  192. package/dist/index-T-TjVQoD.js.map +0 -1
  193. package/dist/index-f8_VC6c8.cjs +0 -672
  194. package/dist/index-f8_VC6c8.cjs.map +0 -1
  195. package/dist/index-llGIfxqV.cjs +0 -670
  196. package/dist/index-llGIfxqV.cjs.map +0 -1
  197. package/dist/index-xZoGTokf.js +0 -694
  198. package/dist/index-xZoGTokf.js.map +0 -1
  199. package/dist/jsx-runtime-CL03FswV.cjs +0 -506
  200. package/dist/jsx-runtime-CL03FswV.cjs.map +0 -1
  201. package/dist/jsx-runtime-DaNGiM0W.js +0 -945
  202. package/dist/jsx-runtime-DaNGiM0W.js.map +0 -1
  203. package/dist/jsx-runtime-XHKiWCTo.cjs +0 -944
  204. package/dist/jsx-runtime-XHKiWCTo.cjs.map +0 -1
  205. package/dist/jsx-runtime-kmx34TxC.js +0 -507
  206. package/dist/jsx-runtime-kmx34TxC.js.map +0 -1
  207. package/dist/libs/index.cjs +0 -6
  208. package/dist/libs/index.cjs.map +0 -1
  209. package/dist/libs/index.d.ts +0 -2
  210. package/dist/libs/index.d.ts.map +0 -1
  211. package/dist/libs/index.mjs +0 -6
  212. package/dist/libs/index.mjs.map +0 -1
  213. package/dist/libs/intlayer-api/ai.cjs +0 -64
  214. package/dist/libs/intlayer-api/ai.cjs.map +0 -1
  215. package/dist/libs/intlayer-api/ai.d.ts +0 -18
  216. package/dist/libs/intlayer-api/ai.d.ts.map +0 -1
  217. package/dist/libs/intlayer-api/ai.mjs +0 -64
  218. package/dist/libs/intlayer-api/ai.mjs.map +0 -1
  219. package/dist/libs/intlayer-api/auth.cjs +0 -141
  220. package/dist/libs/intlayer-api/auth.cjs.map +0 -1
  221. package/dist/libs/intlayer-api/auth.d.ts +0 -38
  222. package/dist/libs/intlayer-api/auth.d.ts.map +0 -1
  223. package/dist/libs/intlayer-api/auth.mjs +0 -141
  224. package/dist/libs/intlayer-api/auth.mjs.map +0 -1
  225. package/dist/libs/intlayer-api/dictionary.cjs +0 -78
  226. package/dist/libs/intlayer-api/dictionary.cjs.map +0 -1
  227. package/dist/libs/intlayer-api/dictionary.d.ts +0 -22
  228. package/dist/libs/intlayer-api/dictionary.d.ts.map +0 -1
  229. package/dist/libs/intlayer-api/dictionary.mjs +0 -78
  230. package/dist/libs/intlayer-api/dictionary.mjs.map +0 -1
  231. package/dist/libs/intlayer-api/fetcher.cjs +0 -73
  232. package/dist/libs/intlayer-api/fetcher.cjs.map +0 -1
  233. package/dist/libs/intlayer-api/fetcher.d.ts +0 -70
  234. package/dist/libs/intlayer-api/fetcher.d.ts.map +0 -1
  235. package/dist/libs/intlayer-api/fetcher.mjs +0 -73
  236. package/dist/libs/intlayer-api/fetcher.mjs.map +0 -1
  237. package/dist/libs/intlayer-api/index.cjs +0 -24
  238. package/dist/libs/intlayer-api/index.cjs.map +0 -1
  239. package/dist/libs/intlayer-api/index.d.ts +0 -157
  240. package/dist/libs/intlayer-api/index.d.ts.map +0 -1
  241. package/dist/libs/intlayer-api/index.mjs +0 -24
  242. package/dist/libs/intlayer-api/index.mjs.map +0 -1
  243. package/dist/libs/intlayer-api/organization.cjs +0 -96
  244. package/dist/libs/intlayer-api/organization.cjs.map +0 -1
  245. package/dist/libs/intlayer-api/organization.d.ts +0 -26
  246. package/dist/libs/intlayer-api/organization.d.ts.map +0 -1
  247. package/dist/libs/intlayer-api/organization.mjs +0 -96
  248. package/dist/libs/intlayer-api/organization.mjs.map +0 -1
  249. package/dist/libs/intlayer-api/project.cjs +0 -110
  250. package/dist/libs/intlayer-api/project.cjs.map +0 -1
  251. package/dist/libs/intlayer-api/project.d.ts +0 -28
  252. package/dist/libs/intlayer-api/project.d.ts.map +0 -1
  253. package/dist/libs/intlayer-api/project.mjs +0 -110
  254. package/dist/libs/intlayer-api/project.mjs.map +0 -1
  255. package/dist/libs/intlayer-api/stripe.cjs +0 -31
  256. package/dist/libs/intlayer-api/stripe.cjs.map +0 -1
  257. package/dist/libs/intlayer-api/stripe.d.ts +0 -8
  258. package/dist/libs/intlayer-api/stripe.d.ts.map +0 -1
  259. package/dist/libs/intlayer-api/stripe.mjs +0 -31
  260. package/dist/libs/intlayer-api/stripe.mjs.map +0 -1
  261. package/dist/libs/intlayer-api/tag.cjs +0 -52
  262. package/dist/libs/intlayer-api/tag.cjs.map +0 -1
  263. package/dist/libs/intlayer-api/tag.d.ts +0 -16
  264. package/dist/libs/intlayer-api/tag.d.ts.map +0 -1
  265. package/dist/libs/intlayer-api/tag.mjs +0 -52
  266. package/dist/libs/intlayer-api/tag.mjs.map +0 -1
  267. package/dist/libs/intlayer-api/user.cjs +0 -70
  268. package/dist/libs/intlayer-api/user.cjs.map +0 -1
  269. package/dist/libs/intlayer-api/user.d.ts +0 -22
  270. package/dist/libs/intlayer-api/user.d.ts.map +0 -1
  271. package/dist/libs/intlayer-api/user.mjs +0 -70
  272. package/dist/libs/intlayer-api/user.mjs.map +0 -1
  273. package/dist/navigation-CE0LMHcY.cjs +0 -8538
  274. package/dist/navigation-CE0LMHcY.cjs.map +0 -1
  275. package/dist/navigation-DFabQmdZ.js +0 -914
  276. package/dist/navigation-DFabQmdZ.js.map +0 -1
  277. package/dist/navigation-DRtAVQJF.js +0 -8521
  278. package/dist/navigation-DRtAVQJF.js.map +0 -1
  279. package/dist/navigation-a7EfWhxz.cjs +0 -913
  280. package/dist/navigation-a7EfWhxz.cjs.map +0 -1
  281. package/dist/shallow-lhDIFtEp.cjs +0 -48
  282. package/dist/shallow-lhDIFtEp.cjs.map +0 -1
  283. package/dist/shallow-m9BpCkKh.js +0 -49
  284. package/dist/shallow-m9BpCkKh.js.map +0 -1
  285. package/dist/useGetAllDictionaries-B1sqs2IB.cjs +0 -34
  286. package/dist/useGetAllDictionaries-B1sqs2IB.cjs.map +0 -1
  287. package/dist/useGetAllDictionaries-BbH8vTkY.js +0 -35
  288. package/dist/useGetAllDictionaries-BbH8vTkY.js.map +0 -1
  289. package/dist/useGetAllDictionaries-Bgkytpa2.cjs +0 -34
  290. package/dist/useGetAllDictionaries-Bgkytpa2.cjs.map +0 -1
  291. package/dist/useGetAllDictionaries-D8ma3h41.cjs +0 -33
  292. package/dist/useGetAllDictionaries-D8ma3h41.cjs.map +0 -1
  293. package/dist/useGetAllDictionaries-DHgHEbD5.js +0 -34
  294. package/dist/useGetAllDictionaries-DHgHEbD5.js.map +0 -1
  295. package/dist/useGetAllDictionaries-DUzm0rIa.js +0 -35
  296. package/dist/useGetAllDictionaries-DUzm0rIa.js.map +0 -1
  297. package/dist/utils/dictionary.cjs +0 -158
  298. package/dist/utils/dictionary.cjs.map +0 -1
  299. package/dist/utils/dictionary.d.ts +0 -7
  300. package/dist/utils/dictionary.d.ts.map +0 -1
  301. package/dist/utils/dictionary.mjs +0 -158
  302. package/dist/utils/dictionary.mjs.map +0 -1
  303. /package/dist/components/IDE/{CodeBlockclient.d.ts → CodeBlockClient.d.ts} +0 -0
  304. /package/dist/components/IDE/{CodeBlockclient.d.ts.map → CodeBlockClient.d.ts.map} +0 -0
@@ -1,690 +0,0 @@
1
- "use strict";
2
- const client = require("@intlayer/config/client");
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
- const { signal } = new AbortController();
31
- let paramsString = "";
32
- let bodyString = void 0;
33
- const otherOptions = options.map(
34
- ({ body, params: params2, headers, ...otherOptions2 }) => otherOptions2
35
- );
36
- const mergedOptions = deepMerge([fetcherOptions, ...otherOptions]);
37
- const mergedHeaders = deepMerge([
38
- fetcherOptions.headers,
39
- ...options.map((option) => option.headers)
40
- ]);
41
- const params = deepMerge(options.map((option) => option.params));
42
- const method = mergedOptions.method;
43
- if (method !== "GET" && method !== "HEAD") {
44
- const body = deepMerge(options.map((option) => option.body));
45
- if (mergedHeaders?.["Content-Type"] === "application/x-www-form-urlencoded") {
46
- bodyString = new URLSearchParams(
47
- body
48
- ).toString();
49
- } else {
50
- bodyString = JSON.stringify(body);
51
- }
52
- }
53
- if (Object.entries(params).length > 0) {
54
- paramsString = `?${new URLSearchParams(
55
- params
56
- ).toString()}`;
57
- }
58
- const formattedOptions = {
59
- ...mergedOptions,
60
- headers: mergedHeaders,
61
- body: bodyString,
62
- signal
63
- };
64
- const urlResult = `${url}${paramsString}`;
65
- const response = await fetch(urlResult, formattedOptions);
66
- if (!response.ok) {
67
- const result = await response.json();
68
- console.error(result);
69
- throw new Error(JSON.stringify(result.error) ?? "An error occurred");
70
- }
71
- return await response.json();
72
- };
73
- const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
74
- const { backendURL } = client.getConfiguration().editor;
75
- const AI_API_ROUTE = `${backendURL}/api/ai`;
76
- const auditContentDeclaration = async (body, otherOptions = {}) => await fetcher(
77
- `${AI_API_ROUTE}/audit/content-declaration`,
78
- authAPIOptions,
79
- otherOptions,
80
- {
81
- method: "POST",
82
- body
83
- }
84
- );
85
- const auditContentDeclarationField = async (body, otherOptions = {}) => await fetcher(
86
- `${AI_API_ROUTE}/audit/content-declaration/field`,
87
- authAPIOptions,
88
- otherOptions,
89
- {
90
- method: "POST",
91
- body
92
- }
93
- );
94
- const auditContentDeclarationMetadata = async (body, otherOptions = {}) => await fetcher(
95
- `${AI_API_ROUTE}/audit/content-declaration/metadata`,
96
- authAPIOptions,
97
- otherOptions,
98
- {
99
- method: "POST",
100
- body
101
- }
102
- );
103
- const auditTag = async (body, otherOptions = {}) => await fetcher(
104
- `${AI_API_ROUTE}/audit/tag`,
105
- authAPIOptions,
106
- otherOptions,
107
- {
108
- method: "POST",
109
- body
110
- }
111
- );
112
- const askDocQuestion = async (body, otherOptions = {}) => await fetcher(
113
- `${AI_API_ROUTE}/ask`,
114
- authAPIOptions,
115
- otherOptions,
116
- {
117
- method: "POST",
118
- body
119
- }
120
- );
121
- return {
122
- auditContentDeclaration,
123
- auditContentDeclarationField,
124
- auditContentDeclarationMetadata,
125
- auditTag,
126
- askDocQuestion
127
- };
128
- };
129
- getAiAPI();
130
- const getAuthAPI = (authAPIOptions = {}, intlayerConfig) => {
131
- const { backendURL, clientId, clientSecret } = client.getConfiguration().editor;
132
- const AUTH_API_ROUTE = `${backendURL}/api/auth`;
133
- const login = async (user, otherOptions = {}) => await fetcher(
134
- `${AUTH_API_ROUTE}/login`,
135
- authAPIOptions,
136
- otherOptions,
137
- {
138
- method: "POST",
139
- body: user
140
- }
141
- );
142
- const getLoginWithGitHubURL = (params) => {
143
- const searchParams = new URLSearchParams(params);
144
- return `${AUTH_API_ROUTE}/login/github?${searchParams.toString()}`;
145
- };
146
- const getLoginWithGoogleURL = (params) => {
147
- const searchParams = new URLSearchParams(params);
148
- return `${AUTH_API_ROUTE}/login/google?${searchParams.toString()}`;
149
- };
150
- const register = async (user, query = {}, otherOptions = {}) => await fetcher(
151
- `${AUTH_API_ROUTE}/register`,
152
- authAPIOptions,
153
- otherOptions,
154
- {
155
- method: "POST",
156
- body: user,
157
- params: query
158
- }
159
- );
160
- const logout = async (otherOptions = {}) => await fetcher(
161
- `${AUTH_API_ROUTE}/logout`,
162
- authAPIOptions,
163
- otherOptions,
164
- {
165
- method: "POST"
166
- }
167
- );
168
- const askResetPassword = async (email, otherOptions = {}) => await fetcher(
169
- `${AUTH_API_ROUTE}/password/reset`,
170
- authAPIOptions,
171
- otherOptions,
172
- {
173
- method: "POST",
174
- body: { email }
175
- }
176
- );
177
- const resetPassword = async (params, otherOptions = {}) => await fetcher(
178
- `${AUTH_API_ROUTE}/password/reset`,
179
- authAPIOptions,
180
- otherOptions,
181
- { params, method: "POST" }
182
- );
183
- const changePassword = async (data, otherOptions = {}) => await fetcher(
184
- `${AUTH_API_ROUTE}/password`,
185
- authAPIOptions,
186
- otherOptions,
187
- {
188
- method: "PUT",
189
- body: data
190
- }
191
- );
192
- const checkIfUserHasPassword = async (otherOptions = {}) => await fetcher(
193
- `${AUTH_API_ROUTE}/password/has`,
194
- authAPIOptions,
195
- otherOptions,
196
- {
197
- method: "GET"
198
- }
199
- );
200
- const verifyEmail = async ({ userId, secret }, otherOptions = {}) => await fetcher(
201
- `${AUTH_API_ROUTE}/active/${userId}/${secret}`,
202
- authAPIOptions,
203
- otherOptions,
204
- {
205
- method: "PUT"
206
- }
207
- );
208
- const getVerifyEmailStatusURL = (userId) => `${AUTH_API_ROUTE}/verify-email-status/${String(userId)}`;
209
- const createSession = async (data, otherOptions = {}) => await fetcher(
210
- `${AUTH_API_ROUTE}/session`,
211
- authAPIOptions,
212
- otherOptions,
213
- {
214
- method: "POST",
215
- body: data
216
- }
217
- );
218
- const getSession = async (sessionToken, otherOptions = {}) => await fetcher(
219
- `${backendURL}/session`,
220
- authAPIOptions,
221
- otherOptions,
222
- { params: { session_token: sessionToken } }
223
- );
224
- const getCSRFToken = async (otherOptions = {}) => await fetcher(
225
- `${backendURL}/csrf-token`,
226
- authAPIOptions,
227
- otherOptions
228
- );
229
- const getOAuth2AccessToken = async (otherOptions = {}) => await fetcher(
230
- `${backendURL}/oauth2/token`,
231
- authAPIOptions,
232
- otherOptions,
233
- {
234
- method: "POST",
235
- headers: {
236
- "Content-Type": "application/x-www-form-urlencoded"
237
- },
238
- body: {
239
- grant_type: "client_credentials",
240
- client_id: clientId,
241
- client_secret: clientSecret
242
- }
243
- }
244
- );
245
- return {
246
- login,
247
- getLoginWithGitHubURL,
248
- getLoginWithGoogleURL,
249
- register,
250
- logout,
251
- resetPassword,
252
- askResetPassword,
253
- checkIfUserHasPassword,
254
- verifyEmail,
255
- getVerifyEmailStatusURL,
256
- changePassword,
257
- createSession,
258
- getSession,
259
- getCSRFToken,
260
- getOAuth2AccessToken
261
- };
262
- };
263
- getAuthAPI();
264
- const getDictionaryAPI = (authAPIOptions = {}, intlayerConfig) => {
265
- const { backendURL } = client.getConfiguration().editor;
266
- const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;
267
- const getDictionaries = async (filters, otherOptions = {}) => await fetcher(
268
- PROJECT_API_ROUTE,
269
- authAPIOptions,
270
- otherOptions,
271
- {
272
- params: filters
273
- }
274
- );
275
- const getDictionariesKeys = async (otherOptions = {}) => await fetcher(
276
- `${PROJECT_API_ROUTE}/keys`,
277
- authAPIOptions,
278
- otherOptions
279
- );
280
- const getDictionary = async (dictionaryKey, version, otherOptions = {}) => await fetcher(
281
- `${PROJECT_API_ROUTE}/${dictionaryKey}`,
282
- authAPIOptions,
283
- otherOptions,
284
- {
285
- params: version ? { version: version.toString() } : void 0
286
- }
287
- );
288
- const addDictionary = async (dictionary, otherOptions = {}) => await fetcher(
289
- `${PROJECT_API_ROUTE}`,
290
- authAPIOptions,
291
- otherOptions,
292
- {
293
- method: "POST",
294
- body: dictionary
295
- }
296
- );
297
- const pushDictionaries = async (dictionaries, otherOptions = {}) => await fetcher(
298
- `${PROJECT_API_ROUTE}`,
299
- authAPIOptions,
300
- otherOptions,
301
- {
302
- method: "PATCH",
303
- body: { dictionaries }
304
- }
305
- );
306
- const updateDictionary = async (dictionaryId, dictionary, otherOptions = {}) => await fetcher(
307
- `${PROJECT_API_ROUTE}/${dictionaryId}`,
308
- authAPIOptions,
309
- otherOptions,
310
- {
311
- method: "PUT",
312
- body: dictionary
313
- }
314
- );
315
- const deleteDictionary = async (id, otherOptions = {}) => await fetcher(
316
- `${PROJECT_API_ROUTE}`,
317
- authAPIOptions,
318
- otherOptions,
319
- {
320
- method: "DELETE",
321
- body: { id }
322
- }
323
- );
324
- return {
325
- getDictionaries,
326
- getDictionariesKeys,
327
- getDictionary,
328
- pushDictionaries,
329
- addDictionary,
330
- updateDictionary,
331
- deleteDictionary
332
- };
333
- };
334
- getDictionaryAPI();
335
- const getOrganizationAPI = (authAPIOptions = {}, intlayerConfig) => {
336
- const { backendURL } = client.getConfiguration().editor;
337
- const ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;
338
- const getOrganizations = async (filters, otherOptions = {}) => await fetcher(
339
- ORGANIZATION_API_ROUTE,
340
- authAPIOptions,
341
- otherOptions,
342
- {
343
- params: filters
344
- }
345
- );
346
- const getOrganization = async (organizationId, otherOptions = {}) => await fetcher(
347
- `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,
348
- authAPIOptions,
349
- otherOptions
350
- );
351
- const addOrganization = async (organization, otherOptions = {}) => await fetcher(
352
- ORGANIZATION_API_ROUTE,
353
- authAPIOptions,
354
- otherOptions,
355
- {
356
- method: "POST",
357
- body: organization
358
- }
359
- );
360
- const updateOrganization = async (organization, otherOptions = {}) => fetcher(
361
- ORGANIZATION_API_ROUTE,
362
- authAPIOptions,
363
- otherOptions,
364
- {
365
- method: "PUT",
366
- body: organization
367
- }
368
- );
369
- const updateOrganizationMembers = async (body, otherOptions = {}) => fetcher(
370
- `${ORGANIZATION_API_ROUTE}/members`,
371
- authAPIOptions,
372
- otherOptions,
373
- {
374
- method: "PUT",
375
- body
376
- }
377
- );
378
- const addOrganizationMember = async (body, otherOptions = {}) => fetcher(
379
- `${ORGANIZATION_API_ROUTE}/member`,
380
- authAPIOptions,
381
- otherOptions,
382
- {
383
- method: "POST",
384
- body
385
- }
386
- );
387
- const deleteOrganization = async (otherOptions = {}) => await fetcher(
388
- ORGANIZATION_API_ROUTE,
389
- authAPIOptions,
390
- otherOptions,
391
- {
392
- method: "DELETE"
393
- }
394
- );
395
- const selectOrganization = async (organizationId, otherOptions = {}) => await fetcher(
396
- `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,
397
- authAPIOptions,
398
- otherOptions,
399
- {
400
- method: "PUT"
401
- }
402
- );
403
- const unselectOrganization = async (otherOptions = {}) => await fetcher(
404
- `${ORGANIZATION_API_ROUTE}/logout`,
405
- authAPIOptions,
406
- otherOptions,
407
- {
408
- method: "POST"
409
- }
410
- );
411
- return {
412
- getOrganizations,
413
- getOrganization,
414
- addOrganization,
415
- addOrganizationMember,
416
- updateOrganization,
417
- updateOrganizationMembers,
418
- deleteOrganization,
419
- selectOrganization,
420
- unselectOrganization
421
- };
422
- };
423
- getOrganizationAPI();
424
- const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
425
- const { backendURL } = client.getConfiguration().editor;
426
- const PROJECT_API_ROUTE = `${backendURL}/api/project`;
427
- const getProjects = async (filters, otherOptions = {}) => await fetcher(
428
- PROJECT_API_ROUTE,
429
- authAPIOptions,
430
- otherOptions,
431
- {
432
- params: filters
433
- }
434
- );
435
- const addProject = async (project, otherOptions = {}) => await fetcher(
436
- `${PROJECT_API_ROUTE}`,
437
- authAPIOptions,
438
- otherOptions,
439
- {
440
- method: "POST",
441
- body: project
442
- }
443
- );
444
- const updateProject = async (project, otherOptions = {}) => await fetcher(
445
- `${PROJECT_API_ROUTE}`,
446
- authAPIOptions,
447
- otherOptions,
448
- {
449
- method: "PUT",
450
- body: project
451
- }
452
- );
453
- const updateProjectMembers = async (body, otherOptions = {}) => await fetcher(
454
- `${PROJECT_API_ROUTE}/members`,
455
- authAPIOptions,
456
- otherOptions,
457
- {
458
- method: "PUT",
459
- body
460
- }
461
- );
462
- const deleteProject = async (otherOptions = {}) => await fetcher(
463
- `${PROJECT_API_ROUTE}`,
464
- authAPIOptions,
465
- otherOptions,
466
- {
467
- method: "DELETE"
468
- }
469
- );
470
- const selectProject = async (projectId, otherOptions = {}) => await fetcher(
471
- `${PROJECT_API_ROUTE}/${String(projectId)}`,
472
- authAPIOptions,
473
- otherOptions,
474
- {
475
- method: "PUT"
476
- }
477
- );
478
- const unselectProject = async (otherOptions = {}) => await fetcher(
479
- `${PROJECT_API_ROUTE}/logout`,
480
- authAPIOptions,
481
- otherOptions,
482
- {
483
- method: "POST"
484
- }
485
- );
486
- const addNewAccessKey = async (accessKey, otherOptions = {}) => await fetcher(
487
- `${PROJECT_API_ROUTE}/access_key`,
488
- authAPIOptions,
489
- otherOptions,
490
- {
491
- method: "POST",
492
- body: accessKey
493
- }
494
- );
495
- const deleteAccessKey = async (clientId, otherOptions = {}) => await fetcher(
496
- `${PROJECT_API_ROUTE}/access_key`,
497
- authAPIOptions,
498
- otherOptions,
499
- {
500
- method: "DELETE",
501
- body: { clientId }
502
- }
503
- );
504
- const refreshAccessKey = async (clientId, otherOptions = {}) => await fetcher(
505
- `${PROJECT_API_ROUTE}/access_key`,
506
- authAPIOptions,
507
- otherOptions,
508
- {
509
- method: "PATCH",
510
- body: { clientId }
511
- }
512
- );
513
- return {
514
- getProjects,
515
- addProject,
516
- updateProject,
517
- updateProjectMembers,
518
- deleteProject,
519
- selectProject,
520
- unselectProject,
521
- addNewAccessKey,
522
- deleteAccessKey,
523
- refreshAccessKey
524
- };
525
- };
526
- getProjectAPI();
527
- const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
528
- const backendURL = client.getConfiguration().editor.backendURL;
529
- const STRIPE_API_ROUTE = `${backendURL}/api/stripe`;
530
- const getSubscription = async (body, otherOptions = {}) => await fetcher(
531
- `${STRIPE_API_ROUTE}/create-subscription`,
532
- authAPIOptions,
533
- otherOptions,
534
- {
535
- method: "POST",
536
- body
537
- }
538
- );
539
- const cancelSubscription = async (otherOptions = {}) => await fetcher(
540
- `${STRIPE_API_ROUTE}/cancel-subscription`,
541
- authAPIOptions,
542
- otherOptions,
543
- {
544
- method: "POST"
545
- }
546
- );
547
- return {
548
- getSubscription,
549
- cancelSubscription
550
- };
551
- };
552
- const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
553
- const { backendURL } = client.getConfiguration().editor;
554
- const PROJECT_API_ROUTE = `${backendURL}/api/tag`;
555
- const getTags = async (filters, otherOptions = {}) => await fetcher(
556
- PROJECT_API_ROUTE,
557
- authAPIOptions,
558
- otherOptions,
559
- {
560
- params: filters
561
- }
562
- );
563
- const addTag = async (tag, otherOptions = {}) => await fetcher(
564
- `${PROJECT_API_ROUTE}`,
565
- authAPIOptions,
566
- otherOptions,
567
- {
568
- method: "POST",
569
- body: tag
570
- }
571
- );
572
- const updateTag = async (tagId, tag, otherOptions = {}) => await fetcher(
573
- `${PROJECT_API_ROUTE}/${tagId}`,
574
- authAPIOptions,
575
- otherOptions,
576
- {
577
- method: "PUT",
578
- body: tag
579
- }
580
- );
581
- const deleteTag = async (tagId, otherOptions = {}) => await fetcher(
582
- `${PROJECT_API_ROUTE}/${tagId}`,
583
- authAPIOptions,
584
- otherOptions,
585
- {
586
- method: "DELETE"
587
- }
588
- );
589
- return {
590
- getTags,
591
- addTag,
592
- updateTag,
593
- deleteTag
594
- };
595
- };
596
- getTagAPI();
597
- const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
598
- const { backendURL } = client.getConfiguration().editor;
599
- const USER_API_ROUTE = `${backendURL}/api/user`;
600
- const getUsers = async (filters, otherOptions = {}) => await fetcher(
601
- USER_API_ROUTE,
602
- authAPIOptions,
603
- otherOptions,
604
- {
605
- params: filters
606
- }
607
- );
608
- const getUserById = async (userId, otherOptions = {}) => await fetcher(
609
- `${USER_API_ROUTE}/${userId}`,
610
- authAPIOptions,
611
- otherOptions
612
- );
613
- const getUserByEmail = async (email, otherOptions = {}) => await fetcher(
614
- `${USER_API_ROUTE}/email/${email}`,
615
- authAPIOptions,
616
- otherOptions
617
- );
618
- const getUserByAccount = async (providerAccountId, provider, otherOptions = {}) => await fetcher(
619
- `${USER_API_ROUTE}/account/${provider}/${providerAccountId}`,
620
- authAPIOptions,
621
- otherOptions
622
- );
623
- const createUser = async (user, otherOptions = {}) => await fetcher(
624
- `${USER_API_ROUTE}/`,
625
- authAPIOptions,
626
- otherOptions,
627
- {
628
- method: "POST",
629
- body: user
630
- }
631
- );
632
- const updateUser = async (user, otherOptions = {}) => await fetcher(
633
- `${USER_API_ROUTE}`,
634
- authAPIOptions,
635
- otherOptions,
636
- {
637
- method: "PUT",
638
- body: user
639
- }
640
- );
641
- const deleteUser = async (userId, otherOptions = {}) => await fetcher(
642
- `${USER_API_ROUTE}/${userId}`,
643
- authAPIOptions,
644
- otherOptions,
645
- {
646
- method: "DELETE"
647
- }
648
- );
649
- return {
650
- createUser,
651
- getUsers,
652
- getUserById,
653
- getUserByAccount,
654
- getUserByEmail,
655
- updateUser,
656
- deleteUser
657
- };
658
- };
659
- getUserAPI();
660
- const getEditorAPI = (authAPIOptions = {}, intlayerConfig) => {
661
- const { editorURL } = client.getConfiguration().editor;
662
- const PROJECT_API_ROUTE = `${editorURL}/api/dictionary`;
663
- const writeDictionary = async (dictionary, otherOptions = {}) => await fetcher(
664
- `${PROJECT_API_ROUTE}`,
665
- authAPIOptions,
666
- otherOptions,
667
- {
668
- method: "POST",
669
- body: dictionary
670
- }
671
- );
672
- return {
673
- writeDictionary
674
- };
675
- };
676
- getEditorAPI();
677
- const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
678
- organization: getOrganizationAPI(authAPIOptions),
679
- project: getProjectAPI(authAPIOptions),
680
- user: getUserAPI(authAPIOptions),
681
- auth: getAuthAPI(authAPIOptions),
682
- dictionary: getDictionaryAPI(authAPIOptions),
683
- stripe: getStripeAPI(authAPIOptions),
684
- ai: getAiAPI(authAPIOptions),
685
- tag: getTagAPI(authAPIOptions),
686
- editor: getEditorAPI(authAPIOptions)
687
- });
688
- const intlayerAPI = getIntlayerAPI();
689
- exports.intlayerAPI = intlayerAPI;
690
- //# sourceMappingURL=index-B1nU1-65.cjs.map