@lokalise/harmony 1.29.5-exp-teamSwitch.2 → 1.30.0

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 (301) hide show
  1. package/dist/harmony.cjs +21 -20
  2. package/dist/harmony.cjs.map +1 -1
  3. package/dist/harmony.mjs +25 -24
  4. package/dist/harmony100.cjs +6 -132
  5. package/dist/harmony100.cjs.map +1 -1
  6. package/dist/harmony100.mjs +5 -131
  7. package/dist/harmony100.mjs.map +1 -1
  8. package/dist/harmony101.cjs +132 -12
  9. package/dist/harmony101.cjs.map +1 -1
  10. package/dist/harmony101.mjs +131 -11
  11. package/dist/harmony101.mjs.map +1 -1
  12. package/dist/harmony102.cjs +13 -6
  13. package/dist/harmony102.cjs.map +1 -1
  14. package/dist/harmony102.mjs +12 -5
  15. package/dist/harmony102.mjs.map +1 -1
  16. package/dist/harmony103.cjs +5 -40
  17. package/dist/harmony103.cjs.map +1 -1
  18. package/dist/harmony103.mjs +5 -40
  19. package/dist/harmony103.mjs.map +1 -1
  20. package/dist/harmony104.cjs +33 -53
  21. package/dist/harmony104.cjs.map +1 -1
  22. package/dist/harmony104.mjs +34 -54
  23. package/dist/harmony104.mjs.map +1 -1
  24. package/dist/harmony105.cjs +59 -6
  25. package/dist/harmony105.cjs.map +1 -1
  26. package/dist/harmony105.mjs +59 -6
  27. package/dist/harmony105.mjs.map +1 -1
  28. package/dist/harmony106.cjs +7 -6
  29. package/dist/harmony106.cjs.map +1 -1
  30. package/dist/harmony106.mjs +6 -5
  31. package/dist/harmony106.mjs.map +1 -1
  32. package/dist/harmony107.cjs +1 -1
  33. package/dist/harmony107.mjs +1 -1
  34. package/dist/harmony108.cjs +1 -1
  35. package/dist/harmony108.mjs +1 -1
  36. package/dist/harmony109.cjs +95 -61
  37. package/dist/harmony109.cjs.map +1 -1
  38. package/dist/harmony109.mjs +95 -61
  39. package/dist/harmony109.mjs.map +1 -1
  40. package/dist/harmony110.cjs +13 -88
  41. package/dist/harmony110.cjs.map +1 -1
  42. package/dist/harmony110.mjs +13 -88
  43. package/dist/harmony110.mjs.map +1 -1
  44. package/dist/harmony111.cjs +15 -19
  45. package/dist/harmony111.cjs.map +1 -1
  46. package/dist/harmony111.mjs +14 -18
  47. package/dist/harmony111.mjs.map +1 -1
  48. package/dist/harmony112.cjs +34 -94
  49. package/dist/harmony112.cjs.map +1 -1
  50. package/dist/harmony112.mjs +34 -94
  51. package/dist/harmony112.mjs.map +1 -1
  52. package/dist/harmony113.cjs +26 -11
  53. package/dist/harmony113.cjs.map +1 -1
  54. package/dist/harmony113.mjs +26 -11
  55. package/dist/harmony113.mjs.map +1 -1
  56. package/dist/harmony114.cjs +60 -12
  57. package/dist/harmony114.cjs.map +1 -1
  58. package/dist/harmony114.mjs +60 -12
  59. package/dist/harmony114.mjs.map +1 -1
  60. package/dist/harmony115.cjs +88 -36
  61. package/dist/harmony115.cjs.map +1 -1
  62. package/dist/harmony115.mjs +88 -36
  63. package/dist/harmony115.mjs.map +1 -1
  64. package/dist/harmony116.cjs +19 -29
  65. package/dist/harmony116.cjs.map +1 -1
  66. package/dist/harmony116.mjs +18 -28
  67. package/dist/harmony116.mjs.map +1 -1
  68. package/dist/harmony117.cjs +13 -7
  69. package/dist/harmony117.cjs.map +1 -1
  70. package/dist/harmony117.mjs +13 -7
  71. package/dist/harmony117.mjs.map +1 -1
  72. package/dist/harmony118.cjs +15 -57
  73. package/dist/harmony118.cjs.map +1 -1
  74. package/dist/harmony118.mjs +15 -57
  75. package/dist/harmony118.mjs.map +1 -1
  76. package/dist/harmony119.cjs +15 -59
  77. package/dist/harmony119.cjs.map +1 -1
  78. package/dist/harmony119.mjs +15 -59
  79. package/dist/harmony119.mjs.map +1 -1
  80. package/dist/harmony120.cjs +12 -19
  81. package/dist/harmony120.cjs.map +1 -1
  82. package/dist/harmony120.mjs +11 -18
  83. package/dist/harmony120.mjs.map +1 -1
  84. package/dist/harmony121.cjs +15 -12
  85. package/dist/harmony121.cjs.map +1 -1
  86. package/dist/harmony121.mjs +15 -12
  87. package/dist/harmony121.mjs.map +1 -1
  88. package/dist/harmony122.cjs +19 -13
  89. package/dist/harmony122.cjs.map +1 -1
  90. package/dist/harmony122.mjs +19 -13
  91. package/dist/harmony122.mjs.map +1 -1
  92. package/dist/harmony123.cjs +10 -14
  93. package/dist/harmony123.cjs.map +1 -1
  94. package/dist/harmony123.mjs +10 -14
  95. package/dist/harmony123.mjs.map +1 -1
  96. package/dist/harmony124.cjs +7 -11
  97. package/dist/harmony124.cjs.map +1 -1
  98. package/dist/harmony124.mjs +7 -11
  99. package/dist/harmony124.mjs.map +1 -1
  100. package/dist/harmony125.cjs +56 -15
  101. package/dist/harmony125.cjs.map +1 -1
  102. package/dist/harmony125.mjs +56 -15
  103. package/dist/harmony125.mjs.map +1 -1
  104. package/dist/harmony126.cjs +59 -20
  105. package/dist/harmony126.cjs.map +1 -1
  106. package/dist/harmony126.mjs +59 -20
  107. package/dist/harmony126.mjs.map +1 -1
  108. package/dist/harmony127.cjs +19 -13
  109. package/dist/harmony127.cjs.map +1 -1
  110. package/dist/harmony127.mjs +18 -12
  111. package/dist/harmony127.mjs.map +1 -1
  112. package/dist/harmony129.cjs +1 -1
  113. package/dist/harmony129.mjs +1 -1
  114. package/dist/harmony132.cjs +1 -1
  115. package/dist/harmony132.mjs +1 -1
  116. package/dist/harmony15.cjs +1 -1
  117. package/dist/harmony15.mjs +1 -1
  118. package/dist/harmony22.cjs +2 -2
  119. package/dist/harmony22.mjs +2 -2
  120. package/dist/harmony23.cjs +1 -1
  121. package/dist/harmony23.mjs +1 -1
  122. package/dist/harmony24.cjs +1 -1
  123. package/dist/harmony24.mjs +1 -1
  124. package/dist/harmony25.cjs +1 -1
  125. package/dist/harmony25.mjs +1 -1
  126. package/dist/harmony30.cjs +11 -1
  127. package/dist/harmony30.cjs.map +1 -1
  128. package/dist/harmony30.mjs +13 -3
  129. package/dist/harmony30.mjs.map +1 -1
  130. package/dist/harmony31.cjs +0 -9
  131. package/dist/harmony31.cjs.map +1 -1
  132. package/dist/harmony31.mjs +3 -12
  133. package/dist/harmony31.mjs.map +1 -1
  134. package/dist/harmony36.cjs +6 -5
  135. package/dist/harmony36.cjs.map +1 -1
  136. package/dist/harmony36.mjs +6 -5
  137. package/dist/harmony36.mjs.map +1 -1
  138. package/dist/harmony37.cjs +6 -14
  139. package/dist/harmony37.cjs.map +1 -1
  140. package/dist/harmony37.mjs +7 -15
  141. package/dist/harmony37.mjs.map +1 -1
  142. package/dist/harmony38.cjs +15 -7
  143. package/dist/harmony38.cjs.map +1 -1
  144. package/dist/harmony38.mjs +15 -7
  145. package/dist/harmony38.mjs.map +1 -1
  146. package/dist/harmony39.cjs +7 -11
  147. package/dist/harmony39.cjs.map +1 -1
  148. package/dist/harmony39.mjs +9 -13
  149. package/dist/harmony39.mjs.map +1 -1
  150. package/dist/harmony40.cjs +8 -8
  151. package/dist/harmony40.cjs.map +1 -1
  152. package/dist/harmony40.mjs +8 -8
  153. package/dist/harmony40.mjs.map +1 -1
  154. package/dist/harmony41.cjs +14 -12
  155. package/dist/harmony41.cjs.map +1 -1
  156. package/dist/harmony41.mjs +14 -12
  157. package/dist/harmony41.mjs.map +1 -1
  158. package/dist/harmony42.cjs +8 -8
  159. package/dist/harmony42.cjs.map +1 -1
  160. package/dist/harmony42.mjs +9 -9
  161. package/dist/harmony42.mjs.map +1 -1
  162. package/dist/harmony43.cjs +9 -9
  163. package/dist/harmony43.cjs.map +1 -1
  164. package/dist/harmony43.mjs +10 -10
  165. package/dist/harmony43.mjs.map +1 -1
  166. package/dist/harmony44.cjs +12 -14
  167. package/dist/harmony44.cjs.map +1 -1
  168. package/dist/harmony44.mjs +12 -14
  169. package/dist/harmony44.mjs.map +1 -1
  170. package/dist/harmony45.cjs +10 -10
  171. package/dist/harmony45.cjs.map +1 -1
  172. package/dist/harmony45.mjs +10 -10
  173. package/dist/harmony45.mjs.map +1 -1
  174. package/dist/harmony46.cjs +8 -8
  175. package/dist/harmony46.cjs.map +1 -1
  176. package/dist/harmony46.mjs +8 -8
  177. package/dist/harmony46.mjs.map +1 -1
  178. package/dist/harmony47.cjs +7 -7
  179. package/dist/harmony47.cjs.map +1 -1
  180. package/dist/harmony47.mjs +7 -7
  181. package/dist/harmony47.mjs.map +1 -1
  182. package/dist/harmony48.cjs +14 -12
  183. package/dist/harmony48.cjs.map +1 -1
  184. package/dist/harmony48.mjs +14 -12
  185. package/dist/harmony48.mjs.map +1 -1
  186. package/dist/harmony49.cjs +12 -14
  187. package/dist/harmony49.cjs.map +1 -1
  188. package/dist/harmony49.mjs +12 -14
  189. package/dist/harmony49.mjs.map +1 -1
  190. package/dist/harmony50.cjs +8 -8
  191. package/dist/harmony50.cjs.map +1 -1
  192. package/dist/harmony50.mjs +8 -8
  193. package/dist/harmony50.mjs.map +1 -1
  194. package/dist/harmony51.cjs +9 -5
  195. package/dist/harmony51.cjs.map +1 -1
  196. package/dist/harmony51.mjs +12 -8
  197. package/dist/harmony51.mjs.map +1 -1
  198. package/dist/harmony59.cjs +22 -4
  199. package/dist/harmony59.cjs.map +1 -1
  200. package/dist/harmony59.mjs +22 -4
  201. package/dist/harmony59.mjs.map +1 -1
  202. package/dist/harmony62.cjs +1 -7
  203. package/dist/harmony62.cjs.map +1 -1
  204. package/dist/harmony62.mjs +1 -7
  205. package/dist/harmony62.mjs.map +1 -1
  206. package/dist/harmony67.cjs +1 -1
  207. package/dist/harmony67.mjs +1 -1
  208. package/dist/harmony69.cjs +1 -1
  209. package/dist/harmony69.mjs +1 -1
  210. package/dist/harmony70.cjs +1 -1
  211. package/dist/harmony70.mjs +1 -1
  212. package/dist/harmony71.cjs +1 -1
  213. package/dist/harmony71.mjs +1 -1
  214. package/dist/harmony72.cjs +2 -2
  215. package/dist/harmony72.mjs +2 -2
  216. package/dist/harmony73.cjs +2 -2
  217. package/dist/harmony73.mjs +2 -2
  218. package/dist/harmony74.cjs +2 -2
  219. package/dist/harmony74.mjs +2 -2
  220. package/dist/harmony75.cjs +2 -2
  221. package/dist/harmony75.mjs +2 -2
  222. package/dist/harmony76.cjs +3 -3
  223. package/dist/harmony76.mjs +3 -3
  224. package/dist/harmony77.cjs +6 -6
  225. package/dist/harmony77.mjs +6 -6
  226. package/dist/harmony80.cjs +2 -2
  227. package/dist/harmony80.mjs +2 -2
  228. package/dist/harmony82.cjs +7 -12
  229. package/dist/harmony82.cjs.map +1 -1
  230. package/dist/harmony82.mjs +6 -11
  231. package/dist/harmony82.mjs.map +1 -1
  232. package/dist/harmony83.cjs +8 -20
  233. package/dist/harmony83.cjs.map +1 -1
  234. package/dist/harmony83.mjs +8 -20
  235. package/dist/harmony83.mjs.map +1 -1
  236. package/dist/harmony84.cjs +6 -3
  237. package/dist/harmony84.cjs.map +1 -1
  238. package/dist/harmony84.mjs +6 -3
  239. package/dist/harmony84.mjs.map +1 -1
  240. package/dist/harmony85.cjs +57 -9
  241. package/dist/harmony85.cjs.map +1 -1
  242. package/dist/harmony85.mjs +56 -8
  243. package/dist/harmony85.mjs.map +1 -1
  244. package/dist/harmony86.cjs +42 -9
  245. package/dist/harmony86.cjs.map +1 -1
  246. package/dist/harmony86.mjs +41 -8
  247. package/dist/harmony86.mjs.map +1 -1
  248. package/dist/harmony87.cjs +5 -57
  249. package/dist/harmony87.cjs.map +1 -1
  250. package/dist/harmony87.mjs +5 -57
  251. package/dist/harmony87.mjs.map +1 -1
  252. package/dist/harmony88.cjs +9 -42
  253. package/dist/harmony88.cjs.map +1 -1
  254. package/dist/harmony88.mjs +8 -41
  255. package/dist/harmony88.mjs.map +1 -1
  256. package/dist/harmony89.cjs +25 -6
  257. package/dist/harmony89.cjs.map +1 -1
  258. package/dist/harmony89.mjs +24 -5
  259. package/dist/harmony89.mjs.map +1 -1
  260. package/dist/harmony90.cjs +3 -6
  261. package/dist/harmony90.cjs.map +1 -1
  262. package/dist/harmony90.mjs +3 -6
  263. package/dist/harmony90.mjs.map +1 -1
  264. package/dist/harmony91.cjs +21 -24
  265. package/dist/harmony91.cjs.map +1 -1
  266. package/dist/harmony91.mjs +20 -23
  267. package/dist/harmony91.mjs.map +1 -1
  268. package/dist/harmony92.cjs +9 -3
  269. package/dist/harmony92.cjs.map +1 -1
  270. package/dist/harmony92.mjs +9 -3
  271. package/dist/harmony92.mjs.map +1 -1
  272. package/dist/harmony93.cjs +9 -19
  273. package/dist/harmony93.cjs.map +1 -1
  274. package/dist/harmony93.mjs +11 -21
  275. package/dist/harmony93.mjs.map +1 -1
  276. package/dist/harmony94.cjs +20 -11
  277. package/dist/harmony94.cjs.map +1 -1
  278. package/dist/harmony94.mjs +20 -11
  279. package/dist/harmony94.mjs.map +1 -1
  280. package/dist/harmony95.cjs +99 -18
  281. package/dist/harmony95.cjs.map +1 -1
  282. package/dist/harmony95.mjs +82 -18
  283. package/dist/harmony95.mjs.map +1 -1
  284. package/dist/harmony96.cjs +18 -14
  285. package/dist/harmony96.cjs.map +1 -1
  286. package/dist/harmony96.mjs +18 -14
  287. package/dist/harmony96.mjs.map +1 -1
  288. package/dist/harmony97.cjs +11 -96
  289. package/dist/harmony97.cjs.map +1 -1
  290. package/dist/harmony97.mjs +11 -79
  291. package/dist/harmony97.mjs.map +1 -1
  292. package/dist/types/src/features/publicApi/hooks/useCreateScoreMutation.d.ts +29 -0
  293. package/dist/types/src/features/publicApi/node.d.ts +1 -1
  294. package/dist/types/src/features/publicApi/score.d.ts +115 -0
  295. package/dist/types/src/features/publicApi/team.d.ts +0 -61
  296. package/dist/types/src/features/publicApi/types/scoreTypes.d.ts +73 -11
  297. package/dist/types/src/features/publicApi/types/teamTypes.d.ts +0 -10
  298. package/dist/types/tests/utils/apiHelpers.d.ts +0 -1
  299. package/package.json +1 -1
  300. package/dist/types/src/features/publicApi/hooks/useSwitchTeamMutation.d.ts +0 -15
  301. package/dist/types/src/features/publicApi/hooks/useSwitchTeamMutation.test.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"harmony97.cjs","sources":["../node_modules/react-resize-detector/build/utils.js"],"sourcesContent":["import * as React from 'react';\nimport debounce from 'lodash/debounce.js';\nimport throttle from 'lodash/throttle.js';\n\n/**\n * Wraps the resize callback with a lodash debounce / throttle based on the refresh mode\n */\nconst patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {\n switch (refreshMode) {\n case 'debounce':\n return debounce(resizeCallback, refreshRate, refreshOptions);\n case 'throttle':\n return throttle(resizeCallback, refreshRate, refreshOptions);\n default:\n return resizeCallback;\n }\n};\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nconst useCallbackRef = \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(callback) => {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => ((...args) => { var _a; return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args); }), []);\n};\n/** `useRef` hook doesn't handle conditional rendering or dynamic ref changes.\n * This hook creates a proxy that ensures that `refElement` is updated whenever the ref is changed. */\nconst useRefProxy = \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(targetRef) => {\n // we are going to use this ref to store the last element that was passed to the hook\n const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);\n // if targetRef is passed, we need to update the refElement\n // we have to use setTimeout because ref get assigned after the hook is called\n // in the future releases we are going to remove targetRef and force users to use ref returned by the hook\n if (targetRef) {\n setTimeout(() => {\n if (targetRef.current !== refElement) {\n setRefElement(targetRef.current);\n }\n }, 0);\n }\n // this is a memo that will be called every time the ref is changed\n // This proxy will properly call setState either when the ref is called as a function or when `.current` is set\n // we call setState inside to trigger rerender\n const refProxy = React.useMemo(() => new Proxy((node) => {\n if (node !== refElement) {\n setRefElement(node);\n }\n }, {\n get(target, prop) {\n if (prop === 'current') {\n return refElement;\n }\n return target[prop];\n },\n set(target, prop, value) {\n if (prop === 'current') {\n setRefElement(value);\n }\n else {\n target[prop] = value;\n }\n return true;\n },\n }), [refElement]);\n return { refProxy, refElement, setRefElement };\n};\n/** Calculates the dimensions of the element based on the current box model.\n * @see https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model\n */\nconst getDimensions = (entry, box) => {\n // Value\t Border\t Padding\t Inner Content\n // ---------------------------------------------------\n // 'border-box'\t Yes\t Yes\t Yes\n // 'content-box'\t No\t No\t Yes\n // undefined No\t No?\t Yes\n if (box === 'border-box') {\n return {\n width: entry.borderBoxSize[0].inlineSize,\n height: entry.borderBoxSize[0].blockSize,\n };\n }\n if (box === 'content-box') {\n return {\n width: entry.contentBoxSize[0].inlineSize,\n height: entry.contentBoxSize[0].blockSize,\n };\n }\n return {\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n };\n};\n\nexport { getDimensions, patchResizeCallback, useCallbackRef, useRefProxy };\n//# sourceMappingURL=utils.js.map\n"],"names":["debounce","throttle","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOK,MAAC,sBAAsB,CAAC,gBAAgB,aAAa,aAAa,mBAAmB;AACtF,UAAQ,aAAW;AAAA,IACf,KAAK;AACD,aAAOA,iBAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D,KAAK;AACD,aAAOC,iBAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D;AACI,aAAO;AAAA,EACnB;AACA;AAKK,MAAC;AAAA;AAAA,EAEN,CAAC,aAAa;AACV,UAAM,cAAcC,iBAAM,OAAO,QAAQ;AACzCA,qBAAM,UAAU,MAAM;AAClB,kBAAY,UAAU;AAAA,IAC9B,CAAK;AACD,WAAOA,iBAAM,QAAQ,MAAO,IAAI,SAAS;AAAE,UAAI;AAAI,cAAQ,KAAK,YAAY,aAAa,QAAQ,OAAO,SAAS,SAAS,GAAG,KAAK,aAAa,GAAG,IAAI;AAAA,IAAI,GAAG,CAAA,CAAE;AAAA,EACnK;AAAA;AAGK,MAAC;AAAA;AAAA,EAEN,CAAC,cAAc;AAEX,UAAM,CAAC,YAAY,aAAa,IAAIA,iBAAM,UAAU,cAAc,QAAQ,cAAc,SAAS,SAAS,UAAU,YAAY,IAAI;AAIpI,QAAI,WAAW;AACX,iBAAW,MAAM;AACb,YAAI,UAAU,YAAY,YAAY;AAClC,wBAAc,UAAU,OAAO;AAAA,QAC/C;AAAA,MACS,GAAE,CAAC;AAAA,IACZ;AAII,UAAM,WAAWA,iBAAM,QAAQ,MAAM,IAAI,MAAM,CAAC,SAAS;AACrD,UAAI,SAAS,YAAY;AACrB,sBAAc,IAAI;AAAA,MAC9B;AAAA,IACA,GAAO;AAAA,MACC,IAAI,QAAQ,MAAM;AACd,YAAI,SAAS,WAAW;AACpB,iBAAO;AAAA,QACvB;AACY,eAAO,OAAO,IAAI;AAAA,MACrB;AAAA,MACD,IAAI,QAAQ,MAAM,OAAO;AACrB,YAAI,SAAS,WAAW;AACpB,wBAAc,KAAK;AAAA,QACnC,OACiB;AACD,iBAAO,IAAI,IAAI;AAAA,QAC/B;AACY,eAAO;AAAA,MACV;AAAA,IACT,CAAK,GAAG,CAAC,UAAU,CAAC;AAChB,WAAO,EAAE,UAAU,YAAY,cAAe;AAAA,EAClD;AAAA;AAIK,MAAC,gBAAgB,CAAC,OAAO,QAAQ;AAMlC,MAAI,QAAQ,cAAc;AACtB,WAAO;AAAA,MACH,OAAO,MAAM,cAAc,CAAC,EAAE;AAAA,MAC9B,QAAQ,MAAM,cAAc,CAAC,EAAE;AAAA,IAClC;AAAA,EACT;AACI,MAAI,QAAQ,eAAe;AACvB,WAAO;AAAA,MACH,OAAO,MAAM,eAAe,CAAC,EAAE;AAAA,MAC/B,QAAQ,MAAM,eAAe,CAAC,EAAE;AAAA,IACnC;AAAA,EACT;AACI,SAAO;AAAA,IACH,OAAO,MAAM,YAAY;AAAA,IACzB,QAAQ,MAAM,YAAY;AAAA,EAC7B;AACL;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"harmony97.cjs","sources":["../src/features/auth/frontend/events/NewJwtIssuedEvent.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { parseJwtTokenPayload } from '@features/auth/core/utils/jwtTokenPayload'\nimport type { JwtToken } from '@features/publicApi/types/userTokenTypes'\n\ntype NewJwtIssuedEventDetail = {\n\ttoken: JwtToken\n\tpayload: JwtTokenPayload | undefined\n}\n\n/**\n * This event is emitted when a new JWT token is issued or refreshed.\n */\nexport class NewJwtIssuedEvent extends CustomEvent<NewJwtIssuedEventDetail> {\n\tstatic readonly eventName = 'new-jwt-issued' as const\n\n\tconstructor(token: JwtToken) {\n\t\tsuper(NewJwtIssuedEvent.eventName, {\n\t\t\tdetail: { token, payload: parseJwtTokenPayload(token.accessToken) },\n\t\t})\n\t}\n}\n\nexport const isNewJwtIssuedEvent = (event: Event): event is NewJwtIssuedEvent =>\n\tevent.type === NewJwtIssuedEvent.eventName\n\ndeclare global {\n\tinterface WindowEventMap {\n\t\t[NewJwtIssuedEvent.eventName]: NewJwtIssuedEvent\n\t}\n}\n"],"names":["parseJwtTokenPayload"],"mappings":";;;;;;AAYO,MAAM,qBAAN,MAAM,2BAA0B,YAAqC;AAAA,EAG3E,YAAY,OAAiB;AAC5B,UAAM,mBAAkB,WAAW;AAAA,MAClC,QAAQ,EAAE,OAAO,SAASA,gBAAAA,qBAAqB,MAAM,WAAW,EAAE;AAAA,IAAA,CAClE;AAAA,EAAA;AAEH;AAPC,cADY,oBACI,aAAY;AADtB,IAAM,oBAAN;;"}
@@ -1,85 +1,17 @@
1
- import * as React from "react";
2
- import debounce from "./harmony107.mjs";
3
- import throttle from "./harmony108.mjs";
4
- const patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {
5
- switch (refreshMode) {
6
- case "debounce":
7
- return debounce(resizeCallback, refreshRate, refreshOptions);
8
- case "throttle":
9
- return throttle(resizeCallback, refreshRate, refreshOptions);
10
- default:
11
- return resizeCallback;
12
- }
13
- };
14
- const useCallbackRef = (
15
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- (callback) => {
17
- const callbackRef = React.useRef(callback);
18
- React.useEffect(() => {
19
- callbackRef.current = callback;
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { parseJwtTokenPayload } from "./harmony15.mjs";
5
+ const _NewJwtIssuedEvent = class _NewJwtIssuedEvent extends CustomEvent {
6
+ constructor(token) {
7
+ super(_NewJwtIssuedEvent.eventName, {
8
+ detail: { token, payload: parseJwtTokenPayload(token.accessToken) }
20
9
  });
21
- return React.useMemo(() => (...args) => {
22
- var _a;
23
- return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args);
24
- }, []);
25
- }
26
- );
27
- const useRefProxy = (
28
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
- (targetRef) => {
30
- const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
31
- if (targetRef) {
32
- setTimeout(() => {
33
- if (targetRef.current !== refElement) {
34
- setRefElement(targetRef.current);
35
- }
36
- }, 0);
37
- }
38
- const refProxy = React.useMemo(() => new Proxy((node) => {
39
- if (node !== refElement) {
40
- setRefElement(node);
41
- }
42
- }, {
43
- get(target, prop) {
44
- if (prop === "current") {
45
- return refElement;
46
- }
47
- return target[prop];
48
- },
49
- set(target, prop, value) {
50
- if (prop === "current") {
51
- setRefElement(value);
52
- } else {
53
- target[prop] = value;
54
- }
55
- return true;
56
- }
57
- }), [refElement]);
58
- return { refProxy, refElement, setRefElement };
59
- }
60
- );
61
- const getDimensions = (entry, box) => {
62
- if (box === "border-box") {
63
- return {
64
- width: entry.borderBoxSize[0].inlineSize,
65
- height: entry.borderBoxSize[0].blockSize
66
- };
67
- }
68
- if (box === "content-box") {
69
- return {
70
- width: entry.contentBoxSize[0].inlineSize,
71
- height: entry.contentBoxSize[0].blockSize
72
- };
73
10
  }
74
- return {
75
- width: entry.contentRect.width,
76
- height: entry.contentRect.height
77
- };
78
11
  };
12
+ __publicField(_NewJwtIssuedEvent, "eventName", "new-jwt-issued");
13
+ let NewJwtIssuedEvent = _NewJwtIssuedEvent;
79
14
  export {
80
- getDimensions,
81
- patchResizeCallback,
82
- useCallbackRef,
83
- useRefProxy
15
+ NewJwtIssuedEvent
84
16
  };
85
17
  //# sourceMappingURL=harmony97.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony97.mjs","sources":["../node_modules/react-resize-detector/build/utils.js"],"sourcesContent":["import * as React from 'react';\nimport debounce from 'lodash/debounce.js';\nimport throttle from 'lodash/throttle.js';\n\n/**\n * Wraps the resize callback with a lodash debounce / throttle based on the refresh mode\n */\nconst patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {\n switch (refreshMode) {\n case 'debounce':\n return debounce(resizeCallback, refreshRate, refreshOptions);\n case 'throttle':\n return throttle(resizeCallback, refreshRate, refreshOptions);\n default:\n return resizeCallback;\n }\n};\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nconst useCallbackRef = \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(callback) => {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => ((...args) => { var _a; return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args); }), []);\n};\n/** `useRef` hook doesn't handle conditional rendering or dynamic ref changes.\n * This hook creates a proxy that ensures that `refElement` is updated whenever the ref is changed. */\nconst useRefProxy = \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(targetRef) => {\n // we are going to use this ref to store the last element that was passed to the hook\n const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);\n // if targetRef is passed, we need to update the refElement\n // we have to use setTimeout because ref get assigned after the hook is called\n // in the future releases we are going to remove targetRef and force users to use ref returned by the hook\n if (targetRef) {\n setTimeout(() => {\n if (targetRef.current !== refElement) {\n setRefElement(targetRef.current);\n }\n }, 0);\n }\n // this is a memo that will be called every time the ref is changed\n // This proxy will properly call setState either when the ref is called as a function or when `.current` is set\n // we call setState inside to trigger rerender\n const refProxy = React.useMemo(() => new Proxy((node) => {\n if (node !== refElement) {\n setRefElement(node);\n }\n }, {\n get(target, prop) {\n if (prop === 'current') {\n return refElement;\n }\n return target[prop];\n },\n set(target, prop, value) {\n if (prop === 'current') {\n setRefElement(value);\n }\n else {\n target[prop] = value;\n }\n return true;\n },\n }), [refElement]);\n return { refProxy, refElement, setRefElement };\n};\n/** Calculates the dimensions of the element based on the current box model.\n * @see https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model\n */\nconst getDimensions = (entry, box) => {\n // Value\t Border\t Padding\t Inner Content\n // ---------------------------------------------------\n // 'border-box'\t Yes\t Yes\t Yes\n // 'content-box'\t No\t No\t Yes\n // undefined No\t No?\t Yes\n if (box === 'border-box') {\n return {\n width: entry.borderBoxSize[0].inlineSize,\n height: entry.borderBoxSize[0].blockSize,\n };\n }\n if (box === 'content-box') {\n return {\n width: entry.contentBoxSize[0].inlineSize,\n height: entry.contentBoxSize[0].blockSize,\n };\n }\n return {\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n };\n};\n\nexport { getDimensions, patchResizeCallback, useCallbackRef, useRefProxy };\n//# sourceMappingURL=utils.js.map\n"],"names":[],"mappings":";;;AAOK,MAAC,sBAAsB,CAAC,gBAAgB,aAAa,aAAa,mBAAmB;AACtF,UAAQ,aAAW;AAAA,IACf,KAAK;AACD,aAAO,SAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D,KAAK;AACD,aAAO,SAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D;AACI,aAAO;AAAA,EACnB;AACA;AAKK,MAAC;AAAA;AAAA,EAEN,CAAC,aAAa;AACV,UAAM,cAAc,MAAM,OAAO,QAAQ;AACzC,UAAM,UAAU,MAAM;AAClB,kBAAY,UAAU;AAAA,IAC9B,CAAK;AACD,WAAO,MAAM,QAAQ,MAAO,IAAI,SAAS;AAAE,UAAI;AAAI,cAAQ,KAAK,YAAY,aAAa,QAAQ,OAAO,SAAS,SAAS,GAAG,KAAK,aAAa,GAAG,IAAI;AAAA,IAAI,GAAG,CAAA,CAAE;AAAA,EACnK;AAAA;AAGK,MAAC;AAAA;AAAA,EAEN,CAAC,cAAc;AAEX,UAAM,CAAC,YAAY,aAAa,IAAI,MAAM,UAAU,cAAc,QAAQ,cAAc,SAAS,SAAS,UAAU,YAAY,IAAI;AAIpI,QAAI,WAAW;AACX,iBAAW,MAAM;AACb,YAAI,UAAU,YAAY,YAAY;AAClC,wBAAc,UAAU,OAAO;AAAA,QAC/C;AAAA,MACS,GAAE,CAAC;AAAA,IACZ;AAII,UAAM,WAAW,MAAM,QAAQ,MAAM,IAAI,MAAM,CAAC,SAAS;AACrD,UAAI,SAAS,YAAY;AACrB,sBAAc,IAAI;AAAA,MAC9B;AAAA,IACA,GAAO;AAAA,MACC,IAAI,QAAQ,MAAM;AACd,YAAI,SAAS,WAAW;AACpB,iBAAO;AAAA,QACvB;AACY,eAAO,OAAO,IAAI;AAAA,MACrB;AAAA,MACD,IAAI,QAAQ,MAAM,OAAO;AACrB,YAAI,SAAS,WAAW;AACpB,wBAAc,KAAK;AAAA,QACnC,OACiB;AACD,iBAAO,IAAI,IAAI;AAAA,QAC/B;AACY,eAAO;AAAA,MACV;AAAA,IACT,CAAK,GAAG,CAAC,UAAU,CAAC;AAChB,WAAO,EAAE,UAAU,YAAY,cAAe;AAAA,EAClD;AAAA;AAIK,MAAC,gBAAgB,CAAC,OAAO,QAAQ;AAMlC,MAAI,QAAQ,cAAc;AACtB,WAAO;AAAA,MACH,OAAO,MAAM,cAAc,CAAC,EAAE;AAAA,MAC9B,QAAQ,MAAM,cAAc,CAAC,EAAE;AAAA,IAClC;AAAA,EACT;AACI,MAAI,QAAQ,eAAe;AACvB,WAAO;AAAA,MACH,OAAO,MAAM,eAAe,CAAC,EAAE;AAAA,MAC/B,QAAQ,MAAM,eAAe,CAAC,EAAE;AAAA,IACnC;AAAA,EACT;AACI,SAAO;AAAA,IACH,OAAO,MAAM,YAAY;AAAA,IACzB,QAAQ,MAAM,YAAY;AAAA,EAC7B;AACL;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"harmony97.mjs","sources":["../src/features/auth/frontend/events/NewJwtIssuedEvent.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { parseJwtTokenPayload } from '@features/auth/core/utils/jwtTokenPayload'\nimport type { JwtToken } from '@features/publicApi/types/userTokenTypes'\n\ntype NewJwtIssuedEventDetail = {\n\ttoken: JwtToken\n\tpayload: JwtTokenPayload | undefined\n}\n\n/**\n * This event is emitted when a new JWT token is issued or refreshed.\n */\nexport class NewJwtIssuedEvent extends CustomEvent<NewJwtIssuedEventDetail> {\n\tstatic readonly eventName = 'new-jwt-issued' as const\n\n\tconstructor(token: JwtToken) {\n\t\tsuper(NewJwtIssuedEvent.eventName, {\n\t\t\tdetail: { token, payload: parseJwtTokenPayload(token.accessToken) },\n\t\t})\n\t}\n}\n\nexport const isNewJwtIssuedEvent = (event: Event): event is NewJwtIssuedEvent =>\n\tevent.type === NewJwtIssuedEvent.eventName\n\ndeclare global {\n\tinterface WindowEventMap {\n\t\t[NewJwtIssuedEvent.eventName]: NewJwtIssuedEvent\n\t}\n}\n"],"names":[],"mappings":";;;;AAYO,MAAM,qBAAN,MAAM,2BAA0B,YAAqC;AAAA,EAG3E,YAAY,OAAiB;AAC5B,UAAM,mBAAkB,WAAW;AAAA,MAClC,QAAQ,EAAE,OAAO,SAAS,qBAAqB,MAAM,WAAW,EAAE;AAAA,IAAA,CAClE;AAAA,EAAA;AAEH;AAPC,cADY,oBACI,aAAY;AADtB,IAAM,oBAAN;"}
@@ -0,0 +1,29 @@
1
+ import { HeaderBuilder } from '../../auth/core/headers/headerBuilder';
2
+ import { ApiMutationOverrides } from '../../../utils/types/apiMutationOverrides';
3
+ import { Wretch } from 'wretch';
4
+ import { CreateScorePathParams, CreateScoreRequestBody, CreateScoreResponseBody } from '../types/scoreTypes';
5
+ import { BaseApiEndpointHeader } from '../types/sharedTypes';
6
+ /**
7
+ * A react-router wrapper about the createProject public API endpoint
8
+ *
9
+ * @param wretchClient - Wretch instance configured to a public API instance.
10
+ * @param headers - A header builder instance to resolve the headers for the request.
11
+ * @param overrides - Additional options to pass to the query.
12
+ */
13
+ export declare function useCreateScoreMutation<T>(wretchClient: Wretch<T>, headers: HeaderBuilder<BaseApiEndpointHeader>, overrides?: ApiMutationOverrides<CreateScoreResponseBody, CreateScoreRequestBody & CreateScorePathParams>): import('@tanstack/react-query').UseMutationResult<{
14
+ issues: {
15
+ category: string;
16
+ comment: string;
17
+ severity: "critical" | "major" | "minor" | "neutral";
18
+ }[];
19
+ score: number;
20
+ hasMajorIssue: boolean;
21
+ hasCriticalIssue: boolean;
22
+ }, undefined, {
23
+ segmentId: number;
24
+ sourceLanguageId: number;
25
+ } & {
26
+ projectId: string;
27
+ keyId: number;
28
+ languageId: string;
29
+ }, undefined>;
@@ -8,6 +8,7 @@ export * from './teamUsers';
8
8
  export * from './userToken';
9
9
  export * from './hooks/useAddLanguagesToProjectMutation';
10
10
  export * from './hooks/useBulkUpdateProjectLanguagesMutation';
11
+ export * from './hooks/useCreateScoreMutation';
11
12
  export * from './hooks/useCreateProjectMutation';
12
13
  export * from './hooks/useDeleteScoreMutation';
13
14
  export * from './hooks/useDeleteProjectMutation';
@@ -23,7 +24,6 @@ export * from './hooks/useListTeamsQuery';
23
24
  export * from './hooks/useRetrieveContributorQuery';
24
25
  export * from './hooks/useRetrieveProjectQuery';
25
26
  export * from './hooks/useRetrieveTeamQuery';
26
- export * from './hooks/useSwitchTeamMutation';
27
27
  export * from './hooks/useUpdateProjectMutation';
28
28
  export * from './types/contributorTypes';
29
29
  export * from './types/languageTypes';
@@ -171,3 +171,118 @@ export declare const deleteScore: import('@lokalise/api-contracts').DeleteRouteD
171
171
  }, {
172
172
  'X-LOKALISE-PLUGIN': string;
173
173
  }>]>>, false, true>;
174
+ export declare const createScore: import('@lokalise/api-contracts').PayloadRouteDefinition<{
175
+ projectId: string;
176
+ keyId: number;
177
+ languageId: string;
178
+ }, import('zod').ZodObject<{
179
+ segmentId: import('zod').ZodNumber;
180
+ sourceLanguageId: import('zod').ZodNumber;
181
+ }, "strip", import('zod').ZodTypeAny, {
182
+ segmentId: number;
183
+ sourceLanguageId: number;
184
+ }, {
185
+ segmentId: number;
186
+ sourceLanguageId: number;
187
+ }>, import('zod').ZodObject<{
188
+ score: import('zod').ZodNumber;
189
+ hasCriticalIssue: import('zod').ZodBoolean;
190
+ hasMajorIssue: import('zod').ZodBoolean;
191
+ issues: import('zod').ZodArray<import('zod').ZodObject<{
192
+ category: import('zod').ZodString;
193
+ comment: import('zod').ZodString;
194
+ severity: import('zod').ZodEnum<["critical", "major", "minor", "neutral"]>;
195
+ }, "strip", import('zod').ZodTypeAny, {
196
+ category: string;
197
+ comment: string;
198
+ severity: "critical" | "major" | "minor" | "neutral";
199
+ }, {
200
+ category: string;
201
+ comment: string;
202
+ severity: "critical" | "major" | "minor" | "neutral";
203
+ }>, "many">;
204
+ }, "strip", import('zod').ZodTypeAny, {
205
+ issues: {
206
+ category: string;
207
+ comment: string;
208
+ severity: "critical" | "major" | "minor" | "neutral";
209
+ }[];
210
+ score: number;
211
+ hasMajorIssue: boolean;
212
+ hasCriticalIssue: boolean;
213
+ }, {
214
+ issues: {
215
+ category: string;
216
+ comment: string;
217
+ severity: "critical" | "major" | "minor" | "neutral";
218
+ }[];
219
+ score: number;
220
+ hasMajorIssue: boolean;
221
+ hasCriticalIssue: boolean;
222
+ }>, import('zod').ZodObject<{
223
+ projectId: import('zod').ZodString;
224
+ keyId: import('zod').ZodNumber;
225
+ languageId: import('zod').ZodString;
226
+ }, "strip", import('zod').ZodTypeAny, {
227
+ projectId: string;
228
+ keyId: number;
229
+ languageId: string;
230
+ }, {
231
+ projectId: string;
232
+ keyId: number;
233
+ languageId: string;
234
+ }>, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
235
+ authorization: import('zod').ZodString;
236
+ }, "strip", import('zod').ZodTypeAny, {
237
+ authorization: string;
238
+ }, {
239
+ authorization: string;
240
+ }>, import('zod').ZodObject<{
241
+ AUTHORIZATION: import('zod').ZodString;
242
+ }, "strip", import('zod').ZodTypeAny, {
243
+ AUTHORIZATION: string;
244
+ }, {
245
+ AUTHORIZATION: string;
246
+ }>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
247
+ 'X-API-Token': import('zod').ZodString;
248
+ }, "strip", import('zod').ZodTypeAny, {
249
+ 'X-API-Token': string;
250
+ }, {
251
+ 'X-API-Token': string;
252
+ }>, import('zod').ZodObject<{
253
+ 'X-Api-Token': import('zod').ZodString;
254
+ }, "strip", import('zod').ZodTypeAny, {
255
+ 'X-Api-Token': string;
256
+ }, {
257
+ 'X-Api-Token': string;
258
+ }>, import('zod').ZodObject<{
259
+ 'x-api-token': import('zod').ZodString;
260
+ }, "strip", import('zod').ZodTypeAny, {
261
+ 'x-api-token': string;
262
+ }, {
263
+ 'x-api-token': string;
264
+ }>, import('zod').ZodObject<{
265
+ 'X-API-TOKEN': import('zod').ZodString;
266
+ }, "strip", import('zod').ZodTypeAny, {
267
+ 'X-API-TOKEN': string;
268
+ }, {
269
+ 'X-API-TOKEN': string;
270
+ }>]>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
271
+ 'X-Lokalise-Plugin': import('zod').ZodString;
272
+ }, "strip", import('zod').ZodTypeAny, {
273
+ 'X-Lokalise-Plugin': string;
274
+ }, {
275
+ 'X-Lokalise-Plugin': string;
276
+ }>, import('zod').ZodObject<{
277
+ 'x-lokalise-plugin': import('zod').ZodString;
278
+ }, "strip", import('zod').ZodTypeAny, {
279
+ 'x-lokalise-plugin': string;
280
+ }, {
281
+ 'x-lokalise-plugin': string;
282
+ }>, import('zod').ZodObject<{
283
+ 'X-LOKALISE-PLUGIN': import('zod').ZodString;
284
+ }, "strip", import('zod').ZodTypeAny, {
285
+ 'X-LOKALISE-PLUGIN': string;
286
+ }, {
287
+ 'X-LOKALISE-PLUGIN': string;
288
+ }>]>>, false, false>;
@@ -374,64 +374,3 @@ export declare const retrieveTeam: import('@lokalise/api-contracts').GetRouteDef
374
374
  }, {
375
375
  'X-LOKALISE-PLUGIN': string;
376
376
  }>]>>, false, false>;
377
- export declare const switchTeam: import('@lokalise/api-contracts').PayloadRouteDefinition<never, import('zod').ZodObject<{
378
- id: import('zod').ZodNumber;
379
- }, "strip", import('zod').ZodTypeAny, {
380
- id: number;
381
- }, {
382
- id: number;
383
- }>, import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodVoid>>, undefined, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
384
- authorization: import('zod').ZodString;
385
- }, "strip", import('zod').ZodTypeAny, {
386
- authorization: string;
387
- }, {
388
- authorization: string;
389
- }>, import('zod').ZodObject<{
390
- AUTHORIZATION: import('zod').ZodString;
391
- }, "strip", import('zod').ZodTypeAny, {
392
- AUTHORIZATION: string;
393
- }, {
394
- AUTHORIZATION: string;
395
- }>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
396
- 'X-API-Token': import('zod').ZodString;
397
- }, "strip", import('zod').ZodTypeAny, {
398
- 'X-API-Token': string;
399
- }, {
400
- 'X-API-Token': string;
401
- }>, import('zod').ZodObject<{
402
- 'X-Api-Token': import('zod').ZodString;
403
- }, "strip", import('zod').ZodTypeAny, {
404
- 'X-Api-Token': string;
405
- }, {
406
- 'X-Api-Token': string;
407
- }>, import('zod').ZodObject<{
408
- 'x-api-token': import('zod').ZodString;
409
- }, "strip", import('zod').ZodTypeAny, {
410
- 'x-api-token': string;
411
- }, {
412
- 'x-api-token': string;
413
- }>, import('zod').ZodObject<{
414
- 'X-API-TOKEN': import('zod').ZodString;
415
- }, "strip", import('zod').ZodTypeAny, {
416
- 'X-API-TOKEN': string;
417
- }, {
418
- 'X-API-TOKEN': string;
419
- }>]>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
420
- 'X-Lokalise-Plugin': import('zod').ZodString;
421
- }, "strip", import('zod').ZodTypeAny, {
422
- 'X-Lokalise-Plugin': string;
423
- }, {
424
- 'X-Lokalise-Plugin': string;
425
- }>, import('zod').ZodObject<{
426
- 'x-lokalise-plugin': import('zod').ZodString;
427
- }, "strip", import('zod').ZodTypeAny, {
428
- 'x-lokalise-plugin': string;
429
- }, {
430
- 'x-lokalise-plugin': string;
431
- }>, import('zod').ZodObject<{
432
- 'X-LOKALISE-PLUGIN': import('zod').ZodString;
433
- }, "strip", import('zod').ZodTypeAny, {
434
- 'X-LOKALISE-PLUGIN': string;
435
- }, {
436
- 'X-LOKALISE-PLUGIN': string;
437
- }>]>>, false, false>;
@@ -1,15 +1,4 @@
1
1
  import { z } from 'zod';
2
- export declare const GET_SCORE_REQUEST_QUERY_SCHEMA: z.ZodObject<{
3
- projectId: z.ZodString;
4
- translationId: z.ZodNumber;
5
- }, "strip", z.ZodTypeAny, {
6
- projectId: string;
7
- translationId: number;
8
- }, {
9
- projectId: string;
10
- translationId: number;
11
- }>;
12
- export type GetScoreRequestQuery = z.infer<typeof GET_SCORE_REQUEST_QUERY_SCHEMA>;
13
2
  export declare const SEVERITY_ENUM: z.ZodEnum<["critical", "major", "minor", "neutral"]>;
14
3
  export type Severity = z.infer<typeof SEVERITY_ENUM>;
15
4
  export declare const ISSUE_SCHEMA: z.ZodObject<{
@@ -26,6 +15,17 @@ export declare const ISSUE_SCHEMA: z.ZodObject<{
26
15
  severity: "critical" | "major" | "minor" | "neutral";
27
16
  }>;
28
17
  export type Issue = z.infer<typeof ISSUE_SCHEMA>;
18
+ export declare const GET_SCORE_REQUEST_QUERY_SCHEMA: z.ZodObject<{
19
+ projectId: z.ZodString;
20
+ translationId: z.ZodNumber;
21
+ }, "strip", z.ZodTypeAny, {
22
+ projectId: string;
23
+ translationId: number;
24
+ }, {
25
+ projectId: string;
26
+ translationId: number;
27
+ }>;
28
+ export type GetScoreRequestQuery = z.infer<typeof GET_SCORE_REQUEST_QUERY_SCHEMA>;
29
29
  export declare const GET_SCORE_RESPONSE_SCHEMA: z.ZodObject<{
30
30
  score: z.ZodNumber;
31
31
  hasMajorIssue: z.ZodBoolean;
@@ -79,3 +79,65 @@ export declare const DELETE_SCORE_PATH_PARAMS_SCHEMA: z.ZodObject<{
79
79
  export type DeleteScorePathParms = z.infer<typeof DELETE_SCORE_PATH_PARAMS_SCHEMA>;
80
80
  export declare const DELETE_SCORE_RESPONSE_SCHEMA: z.ZodNull;
81
81
  export type DeleteScoreResponseBody = z.infer<typeof DELETE_SCORE_RESPONSE_SCHEMA>;
82
+ export declare const CREATE_SCORE_PATH_PARAMS_SCHEMA: z.ZodObject<{
83
+ projectId: z.ZodString;
84
+ keyId: z.ZodNumber;
85
+ languageId: z.ZodString;
86
+ }, "strip", z.ZodTypeAny, {
87
+ projectId: string;
88
+ keyId: number;
89
+ languageId: string;
90
+ }, {
91
+ projectId: string;
92
+ keyId: number;
93
+ languageId: string;
94
+ }>;
95
+ export type CreateScorePathParams = z.infer<typeof CREATE_SCORE_PATH_PARAMS_SCHEMA>;
96
+ export declare const CREATE_SCORE_REQUEST_BODY_SCHEMA: z.ZodObject<{
97
+ segmentId: z.ZodNumber;
98
+ sourceLanguageId: z.ZodNumber;
99
+ }, "strip", z.ZodTypeAny, {
100
+ segmentId: number;
101
+ sourceLanguageId: number;
102
+ }, {
103
+ segmentId: number;
104
+ sourceLanguageId: number;
105
+ }>;
106
+ export type CreateScoreRequestBody = z.infer<typeof CREATE_SCORE_REQUEST_BODY_SCHEMA>;
107
+ export declare const CREATE_SCORE_RESPONSE_SCHEMA: z.ZodObject<{
108
+ score: z.ZodNumber;
109
+ hasCriticalIssue: z.ZodBoolean;
110
+ hasMajorIssue: z.ZodBoolean;
111
+ issues: z.ZodArray<z.ZodObject<{
112
+ category: z.ZodString;
113
+ comment: z.ZodString;
114
+ severity: z.ZodEnum<["critical", "major", "minor", "neutral"]>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ category: string;
117
+ comment: string;
118
+ severity: "critical" | "major" | "minor" | "neutral";
119
+ }, {
120
+ category: string;
121
+ comment: string;
122
+ severity: "critical" | "major" | "minor" | "neutral";
123
+ }>, "many">;
124
+ }, "strip", z.ZodTypeAny, {
125
+ issues: {
126
+ category: string;
127
+ comment: string;
128
+ severity: "critical" | "major" | "minor" | "neutral";
129
+ }[];
130
+ score: number;
131
+ hasMajorIssue: boolean;
132
+ hasCriticalIssue: boolean;
133
+ }, {
134
+ issues: {
135
+ category: string;
136
+ comment: string;
137
+ severity: "critical" | "major" | "minor" | "neutral";
138
+ }[];
139
+ score: number;
140
+ hasMajorIssue: boolean;
141
+ hasCriticalIssue: boolean;
142
+ }>;
143
+ export type CreateScoreResponseBody = z.infer<typeof CREATE_SCORE_RESPONSE_SCHEMA>;
@@ -412,13 +412,3 @@ export declare const RETRIEVE_TEAM_RESPONSE_SCHEMA: z.ZodObject<{
412
412
  };
413
413
  }>;
414
414
  export type RetrieveTeamResponse = z.infer<typeof RETRIEVE_TEAM_RESPONSE_SCHEMA>;
415
- export declare const SWITCH_TEAM_REQUEST_BODY_SCHEMA: z.ZodObject<{
416
- id: z.ZodNumber;
417
- }, "strip", z.ZodTypeAny, {
418
- id: number;
419
- }, {
420
- id: number;
421
- }>;
422
- export type SwitchTeamRequestBody = z.infer<typeof SWITCH_TEAM_REQUEST_BODY_SCHEMA>;
423
- export declare const SWITCH_TEAM_RESPONSE_SCHEMA: z.ZodOptional<z.ZodNullable<z.ZodVoid>>;
424
- export type SwitchTeamResponse = z.infer<typeof SWITCH_TEAM_RESPONSE_SCHEMA>;
@@ -11,7 +11,6 @@ export declare const apiHeaderBuilder: HeaderBuilder<{
11
11
  authorization: `Bearer ${string}`;
12
12
  }>;
13
13
  export declare const mockGetResponse: (url: string, responseData?: JsonBodyType) => void;
14
- export declare const mockPostResponse: (url: string, responseData?: JsonBodyType) => void;
15
14
  type RenderQueryHookArgs = {
16
15
  client: typeof apiWretchClient;
17
16
  builder: typeof apiHeaderBuilder;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/harmony",
3
- "version": "1.29.5-exp-teamSwitch.2",
3
+ "version": "1.30.0",
4
4
  "author": {
5
5
  "name": "Lokalise",
6
6
  "url": "https://lokalise.com/"
@@ -1,15 +0,0 @@
1
- import { HeaderBuilder } from '../../auth/core/headers/headerBuilder';
2
- import { ApiMutationOverrides } from '../../../utils/types/apiMutationOverrides';
3
- import { Wretch } from 'wretch';
4
- import { ProjectApiBaseHeaders } from '../types/projectTypes';
5
- import { SwitchTeamRequestBody, SwitchTeamResponse } from '../types/teamTypes';
6
- /**
7
- * A react-query wrapper about the team switch public API endpoint
8
- *
9
- * @param wretchClient - Wretch instance configured to a public API instance.
10
- * @param headers - Headers to include in the request.
11
- * @param overrides - Additional options to pass to the query.
12
- */
13
- export declare function useSwitchTeamMutation<T>(wretchClient: Wretch<T>, headers: HeaderBuilder<ProjectApiBaseHeaders>, overrides?: ApiMutationOverrides<SwitchTeamResponse, SwitchTeamRequestBody>): import('@tanstack/react-query').UseMutationResult<void | null, undefined, {
14
- id: number;
15
- }, undefined>;