fastapi-rtk 2.8.0 → 2.9.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 (445) hide show
  1. package/dist/.external/cjs/yup@1.7.1/yup/index.esm.cjs +1 -435
  2. package/dist/.external/esm/yup@1.7.1/yup/index.esm.mjs +2 -436
  3. package/dist/.external/lib/type-fest/index.d.ts +95 -0
  4. package/dist/.external/lib/type-fest/source/async-return-type.d.ts +25 -0
  5. package/dist/.external/lib/type-fest/source/asyncify.d.ts +33 -0
  6. package/dist/.external/lib/type-fest/source/basic.d.ts +45 -0
  7. package/dist/.external/lib/type-fest/source/camel-case.d.ts +73 -0
  8. package/dist/.external/lib/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
  9. package/dist/.external/lib/type-fest/source/camel-cased-properties.d.ts +36 -0
  10. package/dist/.external/lib/type-fest/source/conditional-except.d.ts +45 -0
  11. package/dist/.external/lib/type-fest/source/conditional-keys.d.ts +47 -0
  12. package/dist/.external/lib/type-fest/source/conditional-pick.d.ts +44 -0
  13. package/dist/.external/lib/type-fest/source/delimiter-case.d.ts +93 -0
  14. package/dist/.external/lib/type-fest/source/delimiter-cased-properties-deep.d.ts +60 -0
  15. package/dist/.external/lib/type-fest/source/delimiter-cased-properties.d.ts +37 -0
  16. package/dist/.external/lib/type-fest/source/entries.d.ts +62 -0
  17. package/dist/.external/lib/type-fest/source/entry.d.ts +65 -0
  18. package/dist/.external/lib/type-fest/source/exact.d.ts +73 -0
  19. package/dist/.external/lib/type-fest/source/except.d.ts +57 -0
  20. package/dist/.external/lib/type-fest/source/fixed-length-array.d.ts +43 -0
  21. package/dist/.external/lib/type-fest/source/get.d.ts +184 -0
  22. package/dist/.external/lib/type-fest/source/has-optional-keys.d.ts +21 -0
  23. package/dist/.external/lib/type-fest/source/has-required-keys.d.ts +59 -0
  24. package/dist/.external/lib/type-fest/source/includes.d.ts +22 -0
  25. package/dist/.external/lib/type-fest/source/internal.d.ts +59 -0
  26. package/dist/.external/lib/type-fest/source/invariant-of.d.ts +76 -0
  27. package/dist/.external/lib/type-fest/source/iterable-element.d.ts +54 -0
  28. package/dist/.external/lib/type-fest/source/join.d.ts +30 -0
  29. package/dist/.external/lib/type-fest/source/jsonify.d.ts +90 -0
  30. package/dist/.external/lib/type-fest/source/kebab-case.d.ts +38 -0
  31. package/dist/.external/lib/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
  32. package/dist/.external/lib/type-fest/source/kebab-cased-properties.d.ts +30 -0
  33. package/dist/.external/lib/type-fest/source/last-array-element.d.ts +28 -0
  34. package/dist/.external/lib/type-fest/source/literal-to-primitive.d.ts +36 -0
  35. package/dist/.external/lib/type-fest/source/literal-union.d.ts +35 -0
  36. package/dist/.external/lib/type-fest/source/merge-exclusive.d.ts +41 -0
  37. package/dist/.external/lib/type-fest/source/merge.d.ts +27 -0
  38. package/dist/.external/lib/type-fest/source/multidimensional-array.d.ts +43 -0
  39. package/dist/.external/lib/type-fest/source/multidimensional-readonly-array.d.ts +47 -0
  40. package/dist/.external/lib/type-fest/source/mutable.d.ts +5 -0
  41. package/dist/.external/lib/type-fest/source/numeric.d.ts +170 -0
  42. package/dist/.external/lib/type-fest/source/observable-like.d.ts +62 -0
  43. package/dist/.external/lib/type-fest/source/opaque.d.ts +107 -0
  44. package/dist/.external/lib/type-fest/source/optional-keys-of.d.ts +38 -0
  45. package/dist/.external/lib/type-fest/source/package-json.d.ts +663 -0
  46. package/dist/.external/lib/type-fest/source/partial-deep.d.ts +113 -0
  47. package/dist/.external/lib/type-fest/source/partial-on-undefined-deep.d.ts +70 -0
  48. package/dist/.external/lib/type-fest/source/pascal-case.d.ts +38 -0
  49. package/dist/.external/lib/type-fest/source/pascal-cased-properties-deep.d.ts +54 -0
  50. package/dist/.external/lib/type-fest/source/pascal-cased-properties.d.ts +34 -0
  51. package/dist/.external/lib/type-fest/source/primitive.d.ts +13 -0
  52. package/dist/.external/lib/type-fest/source/promisable.d.ts +25 -0
  53. package/dist/.external/lib/type-fest/source/promise-value.d.ts +29 -0
  54. package/dist/.external/lib/type-fest/source/readonly-deep.d.ts +85 -0
  55. package/dist/.external/lib/type-fest/source/readonly-tuple.d.ts +41 -0
  56. package/dist/.external/lib/type-fest/source/remove-index-signature.d.ts +104 -0
  57. package/dist/.external/lib/type-fest/source/replace.d.ts +67 -0
  58. package/dist/.external/lib/type-fest/source/require-all-or-none.d.ts +36 -0
  59. package/dist/.external/lib/type-fest/source/require-at-least-one.d.ts +35 -0
  60. package/dist/.external/lib/type-fest/source/require-exactly-one.d.ts +34 -0
  61. package/dist/.external/lib/type-fest/source/required-keys-of.d.ts +29 -0
  62. package/dist/.external/lib/type-fest/source/schema.d.ts +72 -0
  63. package/dist/.external/lib/type-fest/source/screaming-snake-case.d.ts +33 -0
  64. package/dist/.external/lib/type-fest/source/set-non-nullable.d.ts +35 -0
  65. package/dist/.external/lib/type-fest/source/set-optional.d.ts +35 -0
  66. package/dist/.external/lib/type-fest/source/set-required.d.ts +35 -0
  67. package/dist/.external/lib/type-fest/source/set-return-type.d.ts +31 -0
  68. package/dist/.external/lib/type-fest/source/simplify.d.ts +83 -0
  69. package/dist/.external/lib/type-fest/source/snake-case.d.ts +38 -0
  70. package/dist/.external/lib/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
  71. package/dist/.external/lib/type-fest/source/snake-cased-properties.d.ts +30 -0
  72. package/dist/.external/lib/type-fest/source/split.d.ts +29 -0
  73. package/dist/.external/lib/type-fest/source/spread.d.ts +85 -0
  74. package/dist/.external/lib/type-fest/source/string-key-of.d.ts +25 -0
  75. package/dist/.external/lib/type-fest/source/stringified.d.ts +23 -0
  76. package/dist/.external/lib/type-fest/source/trim.d.ts +25 -0
  77. package/dist/.external/lib/type-fest/source/tsconfig-json.d.ts +1172 -0
  78. package/dist/.external/lib/type-fest/source/typed-array.d.ts +17 -0
  79. package/dist/.external/lib/type-fest/source/union-to-intersection.d.ts +60 -0
  80. package/dist/.external/lib/type-fest/source/value-of.d.ts +42 -0
  81. package/dist/.external/lib/type-fest/source/writable.d.ts +40 -0
  82. package/dist/api/cjs/ApiProvider/ApiProvider.cjs +80 -0
  83. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideApi.cjs +26 -25
  84. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideBulk.cjs +5 -3
  85. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideForm.cjs +1 -1
  86. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useApiActions.cjs +15 -15
  87. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useStreamingData.cjs +2 -2
  88. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/getValidationSchema.cjs +1 -1
  89. package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/LangContext.cjs +20 -6
  90. package/dist/api/cjs/Provider/Provider.cjs +51 -0
  91. package/dist/{core/cjs/Wrappers → api/cjs}/Provider/hooks/useProvideAuth.cjs +18 -17
  92. package/dist/{core/cjs/Wrappers → api/cjs}/Provider/hooks/useProvideInfo.cjs +6 -4
  93. package/dist/api/cjs/Provider/hooks/useProvideLang.cjs +76 -0
  94. package/dist/api/cjs/_virtual/_commonjsHelpers.cjs +6 -0
  95. package/dist/api/cjs/_virtual/index.cjs +5 -0
  96. package/dist/api/cjs/_virtual/index2.cjs +5 -0
  97. package/dist/api/cjs/_virtual/index3.cjs +6 -0
  98. package/dist/api/cjs/_virtual/index4.cjs +4 -0
  99. package/dist/api/cjs/adapters/AdaptersContext.cjs +10 -0
  100. package/dist/api/cjs/auth/authFetch.cjs +63 -0
  101. package/dist/api/cjs/auth/userCRUD.cjs +20 -0
  102. package/dist/api/cjs/fetchers/createItem.cjs +14 -0
  103. package/dist/api/cjs/fetchers/deleteItem.cjs +14 -0
  104. package/dist/api/cjs/fetchers/downloadItems.cjs +33 -0
  105. package/dist/api/cjs/fetchers/formCreateItem.cjs +18 -0
  106. package/dist/api/cjs/fetchers/formUpdateItem.cjs +18 -0
  107. package/dist/api/cjs/fetchers/getInfo.cjs +10 -0
  108. package/dist/api/cjs/fetchers/getItem.cjs +14 -0
  109. package/dist/api/cjs/fetchers/getItems.cjs +13 -0
  110. package/dist/api/cjs/fetchers/postBulkAction.cjs +14 -0
  111. package/dist/api/cjs/fetchers/request.cjs +9 -0
  112. package/dist/api/cjs/fetchers/updateItem.cjs +14 -0
  113. package/dist/api/cjs/fetchers/uploadItems.cjs +24 -0
  114. package/dist/{core → api}/cjs/hooks/auth/useAuth.cjs +1 -1
  115. package/dist/{core → api}/cjs/hooks/auth/useInfo.cjs +1 -1
  116. package/dist/api/cjs/hooks/useDidUpdate.cjs +20 -0
  117. package/dist/api/cjs/index.cjs +75 -0
  118. package/dist/{utils/cjs → api/cjs/utils}/convertToFormData/convertToFormData.cjs +5 -5
  119. package/dist/{utils/cjs → api/cjs/utils}/createFetchParams/createFetchParams.cjs +1 -3
  120. package/dist/api/esm/ApiProvider/ApiProvider.mjs +80 -0
  121. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideApi.mjs +19 -18
  122. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideBulk.mjs +5 -3
  123. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideForm.mjs +1 -1
  124. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useApiActions.mjs +15 -15
  125. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useStreamingData.mjs +1 -1
  126. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/getValidationSchema.mjs +2 -2
  127. package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/LangContext.mjs +21 -7
  128. package/dist/api/esm/Provider/Provider.mjs +51 -0
  129. package/dist/{core/esm/Wrappers → api/esm}/Provider/hooks/useProvideAuth.mjs +16 -15
  130. package/dist/{core/esm/Wrappers → api/esm}/Provider/hooks/useProvideInfo.mjs +5 -3
  131. package/dist/api/esm/Provider/hooks/useProvideLang.mjs +76 -0
  132. package/dist/api/esm/_virtual/_commonjsHelpers.mjs +6 -0
  133. package/dist/api/esm/_virtual/index.mjs +5 -0
  134. package/dist/api/esm/_virtual/index2.mjs +5 -0
  135. package/dist/api/esm/_virtual/index3.mjs +7 -0
  136. package/dist/api/esm/_virtual/index4.mjs +4 -0
  137. package/dist/api/esm/adapters/AdaptersContext.mjs +10 -0
  138. package/dist/api/esm/auth/authFetch.mjs +63 -0
  139. package/dist/api/esm/auth/userCRUD.mjs +20 -0
  140. package/dist/api/esm/fetchers/createItem.mjs +14 -0
  141. package/dist/api/esm/fetchers/deleteItem.mjs +14 -0
  142. package/dist/api/esm/fetchers/downloadItems.mjs +33 -0
  143. package/dist/api/esm/fetchers/formCreateItem.mjs +18 -0
  144. package/dist/api/esm/fetchers/formUpdateItem.mjs +18 -0
  145. package/dist/api/esm/fetchers/getInfo.mjs +10 -0
  146. package/dist/api/esm/fetchers/getItem.mjs +14 -0
  147. package/dist/api/esm/fetchers/getItems.mjs +13 -0
  148. package/dist/api/esm/fetchers/postBulkAction.mjs +14 -0
  149. package/dist/api/esm/fetchers/request.mjs +9 -0
  150. package/dist/api/esm/fetchers/updateItem.mjs +14 -0
  151. package/dist/api/esm/fetchers/uploadItems.mjs +24 -0
  152. package/dist/{core → api}/esm/hooks/auth/useAuth.mjs +1 -1
  153. package/dist/{core → api}/esm/hooks/auth/useInfo.mjs +1 -1
  154. package/dist/api/esm/hooks/useDidUpdate.mjs +20 -0
  155. package/dist/api/esm/index.mjs +75 -0
  156. package/dist/{utils/esm → api/esm/utils}/convertToFormData/convertToFormData.mjs +5 -5
  157. package/dist/{utils/esm → api/esm/utils}/createFetchParams/createFetchParams.mjs +1 -3
  158. package/dist/api/lib/ApiProvider/ApiProvider.d.ts +17 -0
  159. package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/Contexts/BulkActionsContext.d.ts +1 -1
  160. package/dist/api/lib/ApiProvider/Contexts/FormContext.d.ts +5 -0
  161. package/dist/api/lib/ApiProvider/hooks/types.d.ts +150 -0
  162. package/dist/api/lib/ApiProvider/hooks/useProvideBulk.d.ts +7 -0
  163. package/dist/api/lib/ApiProvider/hooks/useProvideForm.d.ts +2 -0
  164. package/dist/api/lib/ApiProvider/hooks/utils/useApiActions.d.ts +11 -0
  165. package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/hooks/utils/useStreamingData.d.ts +26 -26
  166. package/dist/api/lib/ApiProvider/types.d.ts +51 -0
  167. package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getDefaultValues.d.ts +2 -2
  168. package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getValidationSchema.d.ts +1 -1
  169. package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/AuthContext.d.ts +1 -1
  170. package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/InfoContext.d.ts +1 -1
  171. package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/types.d.ts +5 -4
  172. package/dist/api/lib/Provider/Provider.d.ts +14 -0
  173. package/dist/api/lib/Provider/hooks/types.d.ts +22 -0
  174. package/dist/api/lib/Provider/hooks/useProvideAuth.d.ts +17 -0
  175. package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideInfo.d.ts +2 -2
  176. package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideLang.d.ts +1 -2
  177. package/dist/api/lib/Provider/types.d.ts +35 -0
  178. package/dist/api/lib/adapters/AdaptersContext.d.ts +10 -0
  179. package/dist/api/lib/adapters/types.d.ts +69 -0
  180. package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/authFetch.d.ts +13 -7
  181. package/dist/api/lib/auth/types.d.ts +40 -0
  182. package/dist/api/lib/auth/userCRUD.d.ts +22 -0
  183. package/dist/{core/lib/Wrappers/ApiProvider/utils/bulkActions/types.d.ts → api/lib/fetchers/bulkActions.types.d.ts} +3 -3
  184. package/dist/api/lib/fetchers/createItem.d.ts +4 -0
  185. package/dist/api/lib/fetchers/deleteItem.d.ts +4 -0
  186. package/dist/api/lib/fetchers/downloadItems.d.ts +4 -0
  187. package/dist/api/lib/fetchers/formCreateItem.d.ts +4 -0
  188. package/dist/api/lib/fetchers/formUpdateItem.d.ts +4 -0
  189. package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/getInfo.d.ts +3 -1
  190. package/dist/api/lib/fetchers/getItem.d.ts +4 -0
  191. package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/getItems.d.ts +3 -1
  192. package/dist/api/lib/fetchers/postBulkAction.d.ts +4 -0
  193. package/dist/api/lib/fetchers/request.d.ts +7 -0
  194. package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/types.d.ts +3 -7
  195. package/dist/api/lib/fetchers/updateItem.d.ts +4 -0
  196. package/dist/api/lib/fetchers/uploadItems.d.ts +3 -0
  197. package/dist/api/lib/fetchers/uploadItems.test.d.ts +1 -0
  198. package/dist/{core → api}/lib/hooks/auth/types.d.ts +2 -39
  199. package/dist/api/lib/hooks/auth/useAuth.test.d.ts +1 -0
  200. package/dist/api/lib/hooks/auth/useInfo.test.d.ts +1 -0
  201. package/dist/api/lib/hooks/useDidUpdate.d.ts +3 -0
  202. package/dist/api/lib/index.d.ts +35 -0
  203. package/dist/api/lib/utils/convertToFormData/convertToFormData.d.ts +17 -0
  204. package/dist/api/lib/utils/convertToFormData/convertToFormData.test.d.ts +1 -0
  205. package/dist/{utils/lib → api/lib/utils}/createFetchParams/createFetchParams.d.ts +3 -4
  206. package/dist/api/lib/utils/createFetchParams/createFetchParams.test.d.ts +1 -0
  207. package/dist/{utils/lib → api/lib/utils}/parseResponse/parseResponse.d.ts +1 -2
  208. package/dist/api/lib/utils/parseResponse/parseResponse.test.d.ts +1 -0
  209. package/dist/constants/cjs/index.cjs +16 -2
  210. package/dist/constants/esm/index.mjs +16 -2
  211. package/dist/core/cjs/Dialogs/AddDialog.cjs +2 -2
  212. package/dist/core/cjs/Dialogs/EditDialog.cjs +2 -2
  213. package/dist/core/cjs/Menu/UserMenu/UserMenu.cjs +2 -2
  214. package/dist/core/cjs/Modals/CommonModal.cjs +2 -2
  215. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useActions.cjs +5 -5
  216. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/Cell.cjs +4 -4
  217. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.cjs +4 -4
  218. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.cjs +4 -4
  219. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/useColumns.cjs +5 -5
  220. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.cjs +9 -9
  221. package/dist/core/cjs/Wrappers/ApiProvider/ApiProvider.cjs +8 -74
  222. package/dist/core/cjs/Wrappers/Provider/Provider.cjs +18 -47
  223. package/dist/core/cjs/adapters/web/cookieTransport.cjs +15 -0
  224. package/dist/core/cjs/adapters/web/index.cjs +23 -0
  225. package/dist/core/cjs/adapters/web/webFileDownloadAdapter.cjs +16 -0
  226. package/dist/core/cjs/adapters/web/webFormDataAdapter.cjs +8 -0
  227. package/dist/core/cjs/adapters/web/webNetworkAdapter.cjs +6 -0
  228. package/dist/core/cjs/adapters/web/webOAuthOpener.cjs +26 -0
  229. package/dist/core/cjs/adapters/web/webStorageAdapter.cjs +21 -0
  230. package/dist/core/cjs/fab-react-toolkit-patch/api/hooks/useProvideApi.cjs +7 -12
  231. package/dist/core/cjs/fab-react-toolkit-patch/api/hooks/useProvideBulk.cjs +2 -2
  232. package/dist/core/cjs/fab-react-toolkit-patch/api/utils/api/downloadItems.cjs +5 -3
  233. package/dist/core/cjs/fab-react-toolkit-patch/api/utils/api/getItems.cjs +6 -5
  234. package/dist/core/cjs/fab-react-toolkit-patch/auth/utils/authFetch.cjs +19 -15
  235. package/dist/core/cjs/fab-react-toolkit-patch/auth/utils/userCRUD.cjs +9 -6
  236. package/dist/core/cjs/hooks/api/useBulkActions.cjs +2 -5
  237. package/dist/core/cjs/hooks/api/useForms.cjs +5 -5
  238. package/dist/core/cjs/index.cjs +83 -6
  239. package/dist/core/esm/Dialogs/AddDialog.mjs +1 -1
  240. package/dist/core/esm/Dialogs/EditDialog.mjs +1 -1
  241. package/dist/core/esm/Menu/UserMenu/UserMenu.mjs +1 -1
  242. package/dist/core/esm/Modals/CommonModal.mjs +1 -1
  243. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useActions.mjs +1 -1
  244. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/Cell.mjs +1 -1
  245. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.mjs +1 -1
  246. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.mjs +1 -1
  247. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/useColumns.mjs +1 -1
  248. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.mjs +1 -1
  249. package/dist/core/esm/Wrappers/ApiProvider/ApiProvider.mjs +5 -73
  250. package/dist/core/esm/Wrappers/Provider/Provider.mjs +15 -46
  251. package/dist/core/esm/adapters/web/cookieTransport.mjs +15 -0
  252. package/dist/core/esm/adapters/web/index.mjs +23 -0
  253. package/dist/core/esm/adapters/web/webFileDownloadAdapter.mjs +16 -0
  254. package/dist/core/esm/adapters/web/webFormDataAdapter.mjs +8 -0
  255. package/dist/core/esm/adapters/web/webNetworkAdapter.mjs +6 -0
  256. package/dist/core/esm/adapters/web/webOAuthOpener.mjs +26 -0
  257. package/dist/core/esm/adapters/web/webStorageAdapter.mjs +21 -0
  258. package/dist/core/esm/fab-react-toolkit-patch/api/hooks/useProvideApi.mjs +1 -6
  259. package/dist/core/esm/fab-react-toolkit-patch/api/hooks/useProvideBulk.mjs +1 -1
  260. package/dist/core/esm/fab-react-toolkit-patch/api/utils/api/downloadItems.mjs +5 -3
  261. package/dist/core/esm/fab-react-toolkit-patch/api/utils/api/getItems.mjs +4 -3
  262. package/dist/core/esm/fab-react-toolkit-patch/auth/utils/authFetch.mjs +15 -11
  263. package/dist/core/esm/fab-react-toolkit-patch/auth/utils/userCRUD.mjs +8 -5
  264. package/dist/core/esm/hooks/api/useBulkActions.mjs +2 -5
  265. package/dist/core/esm/hooks/api/useForms.mjs +1 -1
  266. package/dist/core/esm/index.mjs +21 -4
  267. package/dist/core/lib/Tables/NextGenDataGrid/types.d.ts +1 -1
  268. package/dist/core/lib/Wrappers/ApiProvider/ApiProvider.d.ts +4 -17
  269. package/dist/core/lib/Wrappers/ApiProvider/types.d.ts +3 -47
  270. package/dist/core/lib/Wrappers/Provider/Provider.d.ts +4 -14
  271. package/dist/core/lib/Wrappers/Provider/types.d.ts +6 -27
  272. package/dist/core/lib/adapters/web/cookieTransport.d.ts +2 -0
  273. package/dist/core/lib/adapters/web/index.d.ts +9 -0
  274. package/dist/core/lib/adapters/web/webAdapters.test.d.ts +1 -0
  275. package/dist/core/lib/adapters/web/webFileDownloadAdapter.d.ts +2 -0
  276. package/dist/core/lib/adapters/web/webFormDataAdapter.d.ts +2 -0
  277. package/dist/core/lib/adapters/web/webNetworkAdapter.d.ts +2 -0
  278. package/dist/core/lib/adapters/web/webOAuthOpener.d.ts +2 -0
  279. package/dist/core/lib/adapters/web/webStorageAdapter.d.ts +3 -0
  280. package/dist/core/lib/fab-react-toolkit-patch/api/hooks/useProvideApi.d.ts +1 -1
  281. package/dist/core/lib/fab-react-toolkit-patch/api/hooks/useProvideBulk.d.ts +1 -1
  282. package/dist/core/lib/fab-react-toolkit-patch/api/utils/api/downloadItems.d.ts +2 -2
  283. package/dist/core/lib/fab-react-toolkit-patch/api/utils/api/getItems.d.ts +3 -2
  284. package/dist/core/lib/fab-react-toolkit-patch/auth/utils/authFetch.d.ts +11 -6
  285. package/dist/core/lib/fab-react-toolkit-patch/auth/utils/userCRUD.d.ts +5 -3
  286. package/dist/core/lib/hooks/api/types.d.ts +1 -59
  287. package/dist/core/lib/hooks/api/useForms.d.ts +1 -1
  288. package/dist/core/lib/index.d.ts +5 -6
  289. package/dist/core/lib/test-helpers/types.d.ts +1 -1
  290. package/dist/jsonforms/lib/test-helpers/inputWrap.d.ts +2 -2
  291. package/dist/react-native-adapters/cjs/asyncStorageAdapter.cjs +8 -0
  292. package/dist/react-native-adapters/cjs/bearerTransport.cjs +29 -0
  293. package/dist/react-native-adapters/cjs/createReactNativeAdapters.cjs +24 -0
  294. package/dist/react-native-adapters/cjs/index.cjs +16 -0
  295. package/dist/react-native-adapters/cjs/rnFileDownloadAdapter.cjs +24 -0
  296. package/dist/react-native-adapters/cjs/rnFormDataAdapter.cjs +15 -0
  297. package/dist/react-native-adapters/cjs/rnNetworkAdapter.cjs +9 -0
  298. package/dist/react-native-adapters/cjs/rnOAuthOpener.cjs +9 -0
  299. package/dist/react-native-adapters/esm/asyncStorageAdapter.mjs +8 -0
  300. package/dist/react-native-adapters/esm/bearerTransport.mjs +29 -0
  301. package/dist/react-native-adapters/esm/createReactNativeAdapters.mjs +24 -0
  302. package/dist/react-native-adapters/esm/index.mjs +16 -0
  303. package/dist/react-native-adapters/esm/rnFileDownloadAdapter.mjs +24 -0
  304. package/dist/react-native-adapters/esm/rnFormDataAdapter.mjs +15 -0
  305. package/dist/react-native-adapters/esm/rnNetworkAdapter.mjs +9 -0
  306. package/dist/react-native-adapters/esm/rnOAuthOpener.mjs +9 -0
  307. package/dist/react-native-adapters/lib/asyncStorageAdapter.d.ts +7 -0
  308. package/dist/react-native-adapters/lib/asyncStorageAdapter.test.d.ts +1 -0
  309. package/dist/react-native-adapters/lib/bearerTransport.d.ts +5 -0
  310. package/dist/react-native-adapters/lib/bearerTransport.test.d.ts +1 -0
  311. package/dist/react-native-adapters/lib/createReactNativeAdapters.d.ts +11 -0
  312. package/dist/react-native-adapters/lib/createReactNativeAdapters.test.d.ts +1 -0
  313. package/dist/react-native-adapters/lib/index.d.ts +8 -0
  314. package/dist/react-native-adapters/lib/rnFileDownloadAdapter.d.ts +7 -0
  315. package/dist/react-native-adapters/lib/rnFileDownloadAdapter.test.d.ts +1 -0
  316. package/dist/react-native-adapters/lib/rnFormDataAdapter.d.ts +2 -0
  317. package/dist/react-native-adapters/lib/rnFormDataAdapter.test.d.ts +1 -0
  318. package/dist/react-native-adapters/lib/rnNetworkAdapter.d.ts +4 -0
  319. package/dist/react-native-adapters/lib/rnNetworkAdapter.test.d.ts +1 -0
  320. package/dist/react-native-adapters/lib/rnOAuthOpener.d.ts +5 -0
  321. package/dist/react-native-adapters/lib/rnOAuthOpener.test.d.ts +1 -0
  322. package/dist/react-native-adapters/lib/types.d.ts +23 -0
  323. package/dist/utils/cjs/Memoizer/MemoWrapper.cjs +2 -2
  324. package/dist/utils/cjs/Memoizer/RenderWrapper.cjs +2 -2
  325. package/dist/utils/cjs/index.cjs +2 -6
  326. package/dist/utils/cjs/randomId/randomId.cjs +4 -0
  327. package/dist/utils/esm/Memoizer/MemoWrapper.mjs +1 -1
  328. package/dist/utils/esm/Memoizer/RenderWrapper.mjs +1 -1
  329. package/dist/utils/esm/index.mjs +2 -6
  330. package/dist/utils/esm/randomId/randomId.mjs +4 -0
  331. package/dist/utils/lib/index.d.ts +1 -3
  332. package/dist/utils/lib/randomId/index.d.ts +1 -0
  333. package/dist/utils/lib/randomId/randomId.d.ts +2 -0
  334. package/dist/utils/lib/randomId/randomId.test.d.ts +1 -0
  335. package/package.json +11 -1
  336. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/createItem.cjs +0 -14
  337. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/deleteItem.cjs +0 -13
  338. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/downloadItems.cjs +0 -39
  339. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formCreateItem.cjs +0 -12
  340. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formUpdateItem.cjs +0 -16
  341. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getInfo.cjs +0 -9
  342. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItem.cjs +0 -13
  343. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItems.cjs +0 -9
  344. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/updateItem.cjs +0 -14
  345. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/uploadItems.cjs +0 -26
  346. package/dist/core/cjs/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.cjs +0 -14
  347. package/dist/core/cjs/Wrappers/Provider/hooks/useProvideLang.cjs +0 -45
  348. package/dist/core/cjs/Wrappers/Provider/utils/authFetch.cjs +0 -99
  349. package/dist/core/cjs/Wrappers/Provider/utils/userCRUD.cjs +0 -32
  350. package/dist/core/esm/Wrappers/ApiProvider/utils/api/createItem.mjs +0 -14
  351. package/dist/core/esm/Wrappers/ApiProvider/utils/api/deleteItem.mjs +0 -13
  352. package/dist/core/esm/Wrappers/ApiProvider/utils/api/downloadItems.mjs +0 -39
  353. package/dist/core/esm/Wrappers/ApiProvider/utils/api/formCreateItem.mjs +0 -12
  354. package/dist/core/esm/Wrappers/ApiProvider/utils/api/formUpdateItem.mjs +0 -16
  355. package/dist/core/esm/Wrappers/ApiProvider/utils/api/getInfo.mjs +0 -9
  356. package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItem.mjs +0 -13
  357. package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItems.mjs +0 -9
  358. package/dist/core/esm/Wrappers/ApiProvider/utils/api/updateItem.mjs +0 -14
  359. package/dist/core/esm/Wrappers/ApiProvider/utils/api/uploadItems.mjs +0 -26
  360. package/dist/core/esm/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.mjs +0 -14
  361. package/dist/core/esm/Wrappers/Provider/hooks/useProvideLang.mjs +0 -45
  362. package/dist/core/esm/Wrappers/Provider/utils/authFetch.mjs +0 -99
  363. package/dist/core/esm/Wrappers/Provider/utils/userCRUD.mjs +0 -32
  364. package/dist/core/lib/Wrappers/ApiProvider/Contexts/FormContext.d.ts +0 -5
  365. package/dist/core/lib/Wrappers/ApiProvider/hooks/types.d.ts +0 -90
  366. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.d.ts +0 -8
  367. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideForm.d.ts +0 -2
  368. package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.d.ts +0 -11
  369. package/dist/core/lib/Wrappers/ApiProvider/utils/api/createItem.d.ts +0 -3
  370. package/dist/core/lib/Wrappers/ApiProvider/utils/api/deleteItem.d.ts +0 -3
  371. package/dist/core/lib/Wrappers/ApiProvider/utils/api/downloadItems.d.ts +0 -3
  372. package/dist/core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.d.ts +0 -3
  373. package/dist/core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.d.ts +0 -3
  374. package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItem.d.ts +0 -3
  375. package/dist/core/lib/Wrappers/ApiProvider/utils/api/updateItem.d.ts +0 -3
  376. package/dist/core/lib/Wrappers/ApiProvider/utils/api/uploadItems.d.ts +0 -2
  377. package/dist/core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.d.ts +0 -3
  378. package/dist/core/lib/Wrappers/Provider/hooks/types.d.ts +0 -24
  379. package/dist/core/lib/Wrappers/Provider/hooks/useProvideAuth.d.ts +0 -17
  380. package/dist/core/lib/Wrappers/Provider/utils/userCRUD.d.ts +0 -19
  381. package/dist/utils/lib/convertToFormData/convertToFormData.d.ts +0 -15
  382. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/Contexts/BulkActionsContext.cjs +0 -0
  383. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/Contexts/FormContext.cjs +0 -0
  384. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useLatest.cjs +0 -0
  385. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/convertInfo.cjs +0 -0
  386. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/createQueryParams.cjs +0 -0
  387. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/getDefaultValues.cjs +0 -0
  388. /package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/AuthContext.cjs +0 -0
  389. /package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/InfoContext.cjs +0 -0
  390. /package/dist/{core → api}/cjs/translations/de.cjs +0 -0
  391. /package/dist/{utils/cjs → api/cjs/utils}/parseResponse/parseResponse.cjs +0 -0
  392. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/Contexts/BulkActionsContext.mjs +0 -0
  393. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/Contexts/FormContext.mjs +0 -0
  394. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useLatest.mjs +0 -0
  395. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/convertInfo.mjs +0 -0
  396. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/createQueryParams.mjs +0 -0
  397. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/getDefaultValues.mjs +0 -0
  398. /package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/AuthContext.mjs +0 -0
  399. /package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/InfoContext.mjs +0 -0
  400. /package/dist/{core → api}/esm/translations/de.mjs +0 -0
  401. /package/dist/{utils/esm → api/esm/utils}/parseResponse/parseResponse.mjs +0 -0
  402. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideApi.test.d.ts → api/lib/ApiProvider/ApiProvider.test.d.ts} +0 -0
  403. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/Contexts/ApiContext.d.ts +0 -0
  404. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/hooks/useProvideApi.d.ts +0 -0
  405. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.test.d.ts → api/lib/ApiProvider/hooks/useProvideApi.test.d.ts} +0 -0
  406. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideForm.test.d.ts → api/lib/ApiProvider/hooks/useProvideBulk.test.d.ts} +0 -0
  407. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.test.d.ts → api/lib/ApiProvider/hooks/useProvideForm.test.d.ts} +0 -0
  408. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useLatest.test.d.ts → api/lib/ApiProvider/hooks/utils/useApiActions.test.d.ts} +0 -0
  409. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/hooks/utils/useLatest.d.ts +0 -0
  410. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useStreamingData.test.d.ts → api/lib/ApiProvider/hooks/utils/useLatest.test.d.ts} +0 -0
  411. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/createItem.test.d.ts → api/lib/ApiProvider/hooks/utils/useStreamingData.test.d.ts} +0 -0
  412. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/convertInfo.d.ts +0 -0
  413. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/convertInfo.test.d.ts +0 -0
  414. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/createQueryParams.d.ts +0 -0
  415. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/createQueryParams.test.d.ts +0 -0
  416. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getDefaultValues.test.d.ts +0 -0
  417. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getValidationSchema.test.d.ts +0 -0
  418. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/types.d.ts +0 -0
  419. /package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/LangContext.d.ts +0 -0
  420. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/deleteItem.test.d.ts → api/lib/Provider/Provider.test.d.ts} +0 -0
  421. /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideAuth.test.d.ts +0 -0
  422. /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideInfo.test.d.ts +0 -0
  423. /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideLang.test.d.ts +0 -0
  424. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/downloadItems.test.d.ts → api/lib/__tests__/purity.test.d.ts} +0 -0
  425. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.test.d.ts → api/lib/__tests__/smoke.test.d.ts} +0 -0
  426. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.test.d.ts → api/lib/adapters/AdaptersContext.test.d.ts} +0 -0
  427. /package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/authFetch.test.d.ts +0 -0
  428. /package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/userCRUD.test.d.ts +0 -0
  429. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getInfo.test.d.ts → api/lib/fetchers/createItem.test.d.ts} +0 -0
  430. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getItem.test.d.ts → api/lib/fetchers/deleteItem.test.d.ts} +0 -0
  431. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getItems.test.d.ts → api/lib/fetchers/downloadItems.test.d.ts} +0 -0
  432. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/updateItem.test.d.ts → api/lib/fetchers/formCreateItem.test.d.ts} +0 -0
  433. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/uploadItems.test.d.ts → api/lib/fetchers/formUpdateItem.test.d.ts} +0 -0
  434. /package/dist/{core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.test.d.ts → api/lib/fetchers/getInfo.test.d.ts} +0 -0
  435. /package/dist/{core/lib/hooks/auth/useAuth.test.d.ts → api/lib/fetchers/getItem.test.d.ts} +0 -0
  436. /package/dist/{core/lib/hooks/auth/useInfo.test.d.ts → api/lib/fetchers/getItems.test.d.ts} +0 -0
  437. /package/dist/{utils/lib/convertToFormData/convertToFormData.test.d.ts → api/lib/fetchers/postBulkAction.test.d.ts} +0 -0
  438. /package/dist/{utils/lib/createFetchParams/createFetchParams.test.d.ts → api/lib/fetchers/request.test.d.ts} +0 -0
  439. /package/dist/{utils/lib/parseResponse/parseResponse.test.d.ts → api/lib/fetchers/updateItem.test.d.ts} +0 -0
  440. /package/dist/{core → api}/lib/hooks/auth/useAuth.d.ts +0 -0
  441. /package/dist/{core → api}/lib/hooks/auth/useInfo.d.ts +0 -0
  442. /package/dist/{core → api}/lib/translations/de.d.ts +0 -0
  443. /package/dist/{utils/lib → api/lib/utils}/convertToFormData/index.d.ts +0 -0
  444. /package/dist/{utils/lib → api/lib/utils}/createFetchParams/index.d.ts +0 -0
  445. /package/dist/{utils/lib → api/lib/utils}/parseResponse/index.d.ts +0 -0
@@ -1,99 +0,0 @@
1
- import { urlJoin, createFetchParams } from "fastapi-rtk/utils";
2
- async function authSignin(baseUrl, { username, password }) {
3
- const formData = new FormData();
4
- formData.append("username", username);
5
- formData.append("password", password);
6
- const { fetchPath, options } = createFetchParams({
7
- path: urlJoin(baseUrl, "auth/login"),
8
- method: "POST"
9
- });
10
- const res = await fetch(fetchPath, {
11
- ...options,
12
- headers: {
13
- "Content-Type": "application/x-www-form-urlencoded"
14
- },
15
- // #MUSTASSERT #MUSTANY URLSearchParams accepts FormData at runtime, but the DOM lib types omit that constructor overload
16
- body: new URLSearchParams(formData)
17
- });
18
- if (!res.ok) {
19
- if (res.status === 400) {
20
- throw new Error("Username or password wrong.");
21
- } else {
22
- throw new Error("Failed to sign in.");
23
- }
24
- }
25
- }
26
- async function authSignout(baseUrl) {
27
- const { fetchPath, options } = createFetchParams({
28
- path: urlJoin(baseUrl, "auth/logout"),
29
- method: "POST"
30
- });
31
- const res = await fetch(fetchPath, options);
32
- if (!res.ok) {
33
- throw new Error("Failed to sign out.");
34
- }
35
- }
36
- async function authResetPassword(baseUrl, newPassword, { email }) {
37
- const { fetchPath, options } = createFetchParams({
38
- path: urlJoin(baseUrl, "auth/forgot-password"),
39
- method: "POST",
40
- body: { email }
41
- });
42
- const forgotPasswordRes = await fetch(fetchPath, options);
43
- if (!forgotPasswordRes.ok) {
44
- throw new Error("Could not request token to reset password");
45
- }
46
- const jsonResponse = await forgotPasswordRes.json();
47
- const { token } = jsonResponse;
48
- const { fetchPath: fetchPath2, options: options2 } = createFetchParams({
49
- path: urlJoin(baseUrl, "auth/reset-password"),
50
- method: "POST",
51
- body: { token, password: newPassword }
52
- });
53
- const resetPasswordRes = await fetch(fetchPath2, options2);
54
- if (!resetPasswordRes.ok) {
55
- throw new Error("Could not reset password");
56
- }
57
- }
58
- function authOAuthSignin(baseUrl, provider, popup, afterSigninPopup) {
59
- const url = urlJoin(baseUrl, "auth/login", provider);
60
- if (!popup) {
61
- window.location.href = urlJoin(baseUrl, "auth/login", provider);
62
- return;
63
- }
64
- const width = 500;
65
- const height = 500;
66
- const left = window.screenLeft + window.outerWidth / 2 - width / 2;
67
- const top = window.screenTop + window.outerHeight / 2 - height / 2;
68
- const authWindow = window.open(
69
- url + "?popup=true",
70
- "auth",
71
- `toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${width}, height=${height}, top=${top}, left=${left}`
72
- );
73
- const pollTimer = window.setInterval(function() {
74
- if (authWindow.closed !== false) {
75
- window.clearInterval(pollTimer);
76
- afterSigninPopup == null ? void 0 : afterSigninPopup();
77
- }
78
- }, 200);
79
- }
80
- async function authInfo(baseUrl, signal) {
81
- const { fetchPath, options } = createFetchParams({
82
- path: urlJoin(baseUrl, "info/"),
83
- method: "GET"
84
- });
85
- const res = await fetch(fetchPath, { signal, ...options });
86
- const data = await res.json();
87
- if (!res.ok) {
88
- const errorMessage = typeof data.detail === "string" ? data.detail : JSON.stringify(data.detail, null, 2);
89
- throw new Error(errorMessage);
90
- }
91
- return data;
92
- }
93
- export {
94
- authInfo,
95
- authOAuthSignin,
96
- authResetPassword,
97
- authSignin,
98
- authSignout
99
- };
@@ -1,32 +0,0 @@
1
- import { createFetchParams, urlJoin } from "fastapi-rtk/utils";
2
- async function getUser(baseUrl, signal) {
3
- const { fetchPath, options } = createFetchParams({
4
- path: urlJoin(baseUrl, "auth/user"),
5
- method: "GET"
6
- });
7
- const res = await fetch(fetchPath, { signal, ...options });
8
- const data = await res.json();
9
- if (!res.ok) {
10
- const errorMessage = typeof data.detail === "string" ? data.detail : JSON.stringify(data.detail, null, 2);
11
- throw new Error(errorMessage);
12
- }
13
- return data;
14
- }
15
- async function updateUser(baseUrl, userData) {
16
- const { fetchPath, options } = createFetchParams({
17
- path: urlJoin(baseUrl, "auth/user"),
18
- method: "PUT",
19
- body: userData
20
- });
21
- const res = await fetch(fetchPath, options);
22
- const data = await res.json();
23
- if (!res.ok) {
24
- const errorMessage = typeof data.detail === "string" ? data.detail : JSON.stringify(data.detail, null, 2);
25
- throw new Error(errorMessage);
26
- }
27
- return data;
28
- }
29
- export {
30
- getUser,
31
- updateUser
32
- };
@@ -1,5 +0,0 @@
1
- import { FormsContextValue } from '../../../hooks/api/types';
2
- export declare const FormContextViewProvider: import('react').Provider<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData> | null>, useFormViewProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>>) => FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>;
3
- export declare const FormContextAddProvider: import('react').Provider<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData> | null>, useFormAddProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>>) => FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>;
4
- export declare const FormContextEditProvider: import('react').Provider<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData> | null>, useFormEditProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>>) => FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>;
5
- export declare const FormContextDeleteProvider: import('react').Provider<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData> | null>, useFormDeleteProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>>) => FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>;
@@ -1,90 +0,0 @@
1
- import { convertId } from 'fastapi-rtk/utils';
2
- import { InfiniteData, QueryKey, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseQueryOptions, UseQueryResult } from '../../../../../.external/lib/@tanstack/react-query';
3
- import { RefObject } from 'react';
4
- import { createItem } from '../utils/api/createItem';
5
- import { deleteItem } from '../utils/api/deleteItem';
6
- import { downloadItems } from '../utils/api/downloadItems';
7
- import { formCreateItem } from '../utils/api/formCreateItem';
8
- import { formUpdateItem } from '../utils/api/formUpdateItem';
9
- import { getInfo } from '../utils/api/getInfo';
10
- import { getItem } from '../utils/api/getItem';
11
- import { getItems } from '../utils/api/getItems';
12
- import { updateItem } from '../utils/api/updateItem';
13
- import { uploadItems } from '../utils/api/uploadItems';
14
- import { postBulk } from '../utils/bulkActions/postBulkAction';
15
- import { DataPage, PrimaryKey, StreamingPage } from 'fastapi-rtk/api-types';
16
- import { CoreConvertedInfo, QueryParams } from '../utils/types';
17
- export type { DataPage, StreamingPage };
18
- /** An entry identifier as accepted by the action functions before conversion. */
19
- export type EntryId = Parameters<typeof convertId>[0];
20
- /** The converted `/_info` data as held by the info query, tagged with the resource path. */
21
- export type InfoQueryData = CoreConvertedInfo & {
22
- path: string;
23
- };
24
- /** The set of API functions the provider hooks dispatch through. */
25
- export interface ApiFunctions {
26
- getItem: typeof getItem;
27
- getItems: typeof getItems;
28
- createItem: typeof createItem;
29
- updateItem: typeof updateItem;
30
- deleteItem: typeof deleteItem;
31
- downloadItems: typeof downloadItems;
32
- uploadItems: typeof uploadItems;
33
- getInfo: typeof getInfo;
34
- formCreateItem: typeof formCreateItem;
35
- formUpdateItem: typeof formUpdateItem;
36
- }
37
- /** The set of bulk-action functions the bulk provider dispatches through. */
38
- export interface BulkFunctions {
39
- postBulk: typeof postBulk;
40
- }
41
- /** A relation reference seeded into the query filters by the provider. */
42
- export interface RelationParam {
43
- foreign_key?: string;
44
- type?: string;
45
- id?: PrimaryKey | null;
46
- id_?: PrimaryKey | null;
47
- }
48
- /** The arguments accepted by `useApiActions`. */
49
- export interface UseApiActionsParams {
50
- api: ApiFunctions;
51
- path: string;
52
- pathRef: RefObject<string>;
53
- infoRef: RefObject<InfoQueryData | undefined>;
54
- queryParamsRef: RefObject<QueryParams | null>;
55
- currentLanguage: string;
56
- }
57
- /** The options accepted by the provider's download action. */
58
- export interface DownloadActionOptions {
59
- export_mode?: string;
60
- delimiter?: string;
61
- quotechar?: string;
62
- }
63
- /** The options accepted by the provider's upload action. */
64
- export interface UploadActionOptions {
65
- delimiter?: string;
66
- quotechar?: string;
67
- }
68
- /** The arguments accepted by `useStreamingData`. */
69
- export interface UseStreamingDataParams {
70
- streamingMode: boolean;
71
- dataQuery: UseQueryResult<DataPage | null>;
72
- streamingQuery: UseInfiniteQueryResult<InfiniteData<StreamingPage | null>>;
73
- streamingQueryKey: QueryKey;
74
- }
75
- /** The configuration object accepted by `useProvideApi`. */
76
- export interface UseProvideApiParams {
77
- path: string;
78
- initialQueryParams?: QueryParams;
79
- relation?: RelationParam;
80
- fetchInfo?: boolean;
81
- clearInfoOnRefetch?: boolean;
82
- clearDataOnRefetch?: boolean;
83
- refetchInfoBasedOnLang?: boolean;
84
- refetchDataBasedOnLang?: boolean;
85
- resetQueryParamsOnPathChange?: boolean;
86
- infoQueryProps?: Partial<UseQueryOptions<InfoQueryData>>;
87
- dataQueryProps?: Partial<UseQueryOptions<DataPage | null>>;
88
- streamingQueryProps?: Partial<UseInfiniteQueryOptions<StreamingPage | null, Error, InfiniteData<StreamingPage | null>, QueryKey, number>>;
89
- streaming?: boolean;
90
- }
@@ -1,8 +0,0 @@
1
- import { BulkActionsContextValue } from '../../../hooks/api/types';
2
- import { BulkFunctions } from './types';
3
- export declare const defaultBulk: {
4
- postBulk: (path: string, handler: string, data: import('../utils/bulkActions/types').BulkActionPayload, options?: import('../utils/api/types').FetchOptions) => Promise<import('../utils/bulkActions/types').BulkActionResponse>;
5
- };
6
- export declare const useProvideBulk: (params: {
7
- path: string;
8
- }, bulk?: BulkFunctions) => BulkActionsContextValue;
@@ -1,2 +0,0 @@
1
- import { FormsContextValue } from '../../../hooks/api/types';
2
- export declare const useProvideForm: () => import('../../../../../.external/lib/zustand').UseBoundStore<import('../../../../../.external/lib/zustand').StoreApi<FormsContextValue<import('../../../../../.external/lib/mantine-react-table').MRT_RowData>>>;
@@ -1,11 +0,0 @@
1
- import { MRT_RowData } from '../../../../../../.external/lib/mantine-react-table';
2
- import { DownloadActionOptions, EntryId, UploadActionOptions, UseApiActionsParams } from '../types';
3
- export declare const useApiActions: (params: UseApiActionsParams) => {
4
- getEntry: (id: EntryId) => Promise<MRT_RowData>;
5
- addEntry: (item: MRT_RowData) => Promise<MRT_RowData>;
6
- updateEntry: (id: EntryId, item: MRT_RowData) => Promise<MRT_RowData>;
7
- deleteEntry: (id: EntryId) => Promise<MRT_RowData | null>;
8
- download: (label?: string, { export_mode, delimiter, quotechar }?: DownloadActionOptions) => Promise<void>;
9
- upload: (file: File, { delimiter, quotechar }?: UploadActionOptions) => Promise<import('../../utils/api/types').UploadResponse>;
10
- getItemURL: (type: string, item: string | File) => string;
11
- };
@@ -1,3 +0,0 @@
1
- import { MRT_RowData } from '../../../../../../.external/lib/mantine-react-table';
2
- import { FetchOptions } from './types';
3
- export declare const createItem: (path: string, data: MRT_RowData, options?: FetchOptions) => Promise<MRT_RowData>;
@@ -1,3 +0,0 @@
1
- import { MRT_RowData } from '../../../../../../.external/lib/mantine-react-table';
2
- import { FetchOptions, ItemId } from './types';
3
- export declare const deleteItem: (path: string, id: ItemId, options?: FetchOptions) => Promise<MRT_RowData | null>;
@@ -1,3 +0,0 @@
1
- import { QueryParams } from 'fastapi-rtk/api-types';
2
- import { DownloadOptions } from './types';
3
- export declare const downloadItems: (path: string, queryParams?: QueryParams, { label, export_mode, delimiter, quotechar }?: DownloadOptions) => Promise<void>;
@@ -1,3 +0,0 @@
1
- import { MRT_RowData } from '../../../../../../.external/lib/mantine-react-table';
2
- import { FetchOptions } from './types';
3
- export declare const formCreateItem: (path: string, data: MRT_RowData, options?: FetchOptions) => Promise<MRT_RowData>;
@@ -1,3 +0,0 @@
1
- import { MRT_RowData } from '../../../../../../.external/lib/mantine-react-table';
2
- import { FetchOptions, ItemId } from './types';
3
- export declare const formUpdateItem: (path: string, id: ItemId, data: MRT_RowData, options?: FetchOptions) => Promise<MRT_RowData>;
@@ -1,3 +0,0 @@
1
- import { MRT_RowData } from '../../../../../../.external/lib/mantine-react-table';
2
- import { FetchOptions, ItemId } from './types';
3
- export declare const getItem: (path: string, id: ItemId, options?: FetchOptions) => Promise<MRT_RowData>;
@@ -1,3 +0,0 @@
1
- import { MRT_RowData } from '../../../../../../.external/lib/mantine-react-table';
2
- import { FetchOptions, ItemId } from './types';
3
- export declare const updateItem: (path: string, id: ItemId, data: MRT_RowData, options?: FetchOptions) => Promise<MRT_RowData>;
@@ -1,2 +0,0 @@
1
- import { UploadOptions, UploadResponse } from './types';
2
- export declare const uploadItems: (path: string, file: File, { delimiter, quotechar }?: UploadOptions) => Promise<UploadResponse>;
@@ -1,3 +0,0 @@
1
- import { FetchOptions } from '../api/types';
2
- import { BulkActionPayload, BulkActionResponse } from './types';
3
- export declare const postBulk: (path: string, handler: string, data: BulkActionPayload, options?: FetchOptions) => Promise<BulkActionResponse>;
@@ -1,24 +0,0 @@
1
- import { AppApiInfo } from 'fastapi-rtk/api-types';
2
- import { AuthUser } from '../../../hooks/auth/types';
3
- export interface SigninCredentials {
4
- username: string;
5
- password: string;
6
- }
7
- export interface AuthDependencies {
8
- getUser: (baseUrl: string, signal?: AbortSignal) => Promise<AuthUser>;
9
- update: (baseUrl: string, userData: Partial<AuthUser>) => Promise<AuthUser>;
10
- signin: (baseUrl: string, credentials: SigninCredentials) => Promise<void>;
11
- signout: (baseUrl: string) => Promise<void>;
12
- resetPassword: (baseUrl: string, newPassword: string, user: {
13
- email: string;
14
- }) => Promise<void>;
15
- oauthSignin: (baseUrl: string, provider: string, popup: boolean, afterSigninPopup?: () => void) => void;
16
- }
17
- export interface InfoDependencies {
18
- getInfo: (baseUrl: string, signal?: AbortSignal) => Promise<AppApiInfo[]>;
19
- fab?: boolean;
20
- }
21
- export interface ProvideAuthError {
22
- message: string;
23
- originalError: Error;
24
- }
@@ -1,17 +0,0 @@
1
- import { UseQueryOptions } from '../../../../../.external/lib/@tanstack/react-query';
2
- import { AuthUser } from '../../../hooks/auth/types';
3
- import { AuthDependencies, SigninCredentials } from './types';
4
- export declare function useProvideAuth(baseURL: string, authQueryProps?: Partial<UseQueryOptions<AuthUser>>, auth?: AuthDependencies): {
5
- user: AuthUser | null | undefined;
6
- loading: boolean;
7
- error: string | null;
8
- query: import('../../../../../.external/lib/@tanstack/react-query').UseQueryResult<AuthUser, Error>;
9
- signin: ({ username, password }: SigninCredentials) => Promise<void>;
10
- signout: () => Promise<void>;
11
- update: (data: Partial<AuthUser>) => Promise<void>;
12
- resetPassword: (password: string) => Promise<void>;
13
- oauthSignin: (provider: string, popup: boolean) => void;
14
- refetch: (options?: import('../../../../../.external/lib/@tanstack/react-query').RefetchOptions) => Promise<import('../../../../../.external/lib/@tanstack/react-query').QueryObserverResult<AuthUser, Error>>;
15
- resetError: () => void;
16
- oauth_signin: (provider: string, popup: boolean) => void;
17
- };
@@ -1,19 +0,0 @@
1
- import { AuthUser } from '../../../hooks/auth/types';
2
- /**
3
- * Fetches the current user's information.
4
- *
5
- * @param baseUrl - The base URL of the user endpoint.
6
- * @param signal - The signal to use for the fetch request.
7
- * @returns The user's information as a JSON object.
8
- * @throws {Error} Throws an error if fetching the user information fails.
9
- */
10
- export declare function getUser(baseUrl: string, signal?: AbortSignal): Promise<AuthUser>;
11
- /**
12
- * Updates the current user's information.
13
- *
14
- * @param baseUrl - The base URL of the user endpoint.
15
- * @param userData - The new user data to update.
16
- * @returns The updated user's information as a JSON object.
17
- * @throws {Error} Throws an error if updating the user information fails.
18
- */
19
- export declare function updateUser(baseUrl: string, userData: Partial<AuthUser>): Promise<AuthUser>;
@@ -1,15 +0,0 @@
1
- /**
2
- * Converts a plain object to a FormData instance.
3
- *
4
- * - If the value is an array:
5
- * - An empty array appends a null.
6
- * - Otherwise the array is split into Files and non-Files.
7
- * - Each File is appended separately under the same key.
8
- * - Non-File values are appended as a JSON string.
9
- * - An object (excluding File) is appended as a JSON string.
10
- * - Otherwise the value is appended as-is.
11
- *
12
- * @param data - The object containing key-value pairs to be converted.
13
- * @returns A FormData instance populated with the processed data.
14
- */
15
- export declare const convertToFormData: <T extends object>(data: T) => FormData;
File without changes
File without changes
File without changes
File without changes
File without changes