@openapi-qraft/react 1.11.0-beta.1 → 1.11.0-beta.3

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 (555) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/QraftContext.js +31 -0
  3. package/dist/cjs/QraftContext.js.map +1 -0
  4. package/dist/cjs/ServiceOperation.js +17 -0
  5. package/dist/cjs/ServiceOperation.js.map +1 -0
  6. package/dist/cjs/Unstable_QraftSecureRequestFn.js +214 -0
  7. package/dist/cjs/Unstable_QraftSecureRequestFn.js.map +1 -0
  8. package/dist/cjs/callbacks/cancelQueries.js +36 -0
  9. package/dist/cjs/callbacks/cancelQueries.js.map +1 -0
  10. package/dist/cjs/callbacks/fetchInfiniteQuery.js +37 -0
  11. package/dist/cjs/callbacks/fetchInfiniteQuery.js.map +1 -0
  12. package/dist/cjs/callbacks/fetchQuery.js +37 -0
  13. package/dist/cjs/callbacks/fetchQuery.js.map +1 -0
  14. package/dist/cjs/callbacks/getInfiniteQueryData.js +37 -0
  15. package/dist/cjs/callbacks/getInfiniteQueryData.js.map +1 -0
  16. package/dist/cjs/callbacks/getInfiniteQueryKey.js +32 -0
  17. package/dist/cjs/callbacks/getInfiniteQueryKey.js.map +1 -0
  18. package/dist/cjs/callbacks/getInfiniteQueryState.js +37 -0
  19. package/dist/cjs/callbacks/getInfiniteQueryState.js.map +1 -0
  20. package/dist/cjs/callbacks/getMutationKey.js +32 -0
  21. package/dist/cjs/callbacks/getMutationKey.js.map +1 -0
  22. package/dist/cjs/callbacks/getQueriesData.js +36 -0
  23. package/dist/cjs/callbacks/getQueriesData.js.map +1 -0
  24. package/dist/cjs/callbacks/getQueryData.js +37 -0
  25. package/dist/cjs/callbacks/getQueryData.js.map +1 -0
  26. package/dist/cjs/callbacks/getQueryKey.js +32 -0
  27. package/dist/cjs/callbacks/getQueryKey.js.map +1 -0
  28. package/dist/cjs/callbacks/getQueryState.js +37 -0
  29. package/dist/cjs/callbacks/getQueryState.js.map +1 -0
  30. package/dist/cjs/callbacks/index.js +131 -0
  31. package/dist/cjs/callbacks/index.js.map +1 -0
  32. package/dist/cjs/callbacks/invalidateQueries.js +36 -0
  33. package/dist/cjs/callbacks/invalidateQueries.js.map +1 -0
  34. package/dist/cjs/callbacks/isFetching.js +36 -0
  35. package/dist/cjs/callbacks/isFetching.js.map +1 -0
  36. package/dist/cjs/callbacks/isMutating.js +36 -0
  37. package/dist/cjs/callbacks/isMutating.js.map +1 -0
  38. package/dist/cjs/callbacks/mutationFn.js +35 -0
  39. package/dist/cjs/callbacks/mutationFn.js.map +1 -0
  40. package/dist/cjs/callbacks/operationInvokeFn.js +41 -0
  41. package/dist/cjs/callbacks/operationInvokeFn.js.map +1 -0
  42. package/dist/cjs/callbacks/prefetchInfiniteQuery.js +37 -0
  43. package/dist/cjs/callbacks/prefetchInfiniteQuery.js.map +1 -0
  44. package/dist/cjs/callbacks/prefetchQuery.js +37 -0
  45. package/dist/cjs/callbacks/prefetchQuery.js.map +1 -0
  46. package/dist/cjs/callbacks/queryFn.js +39 -0
  47. package/dist/cjs/callbacks/queryFn.js.map +1 -0
  48. package/dist/cjs/callbacks/refetchQueries.js +36 -0
  49. package/dist/cjs/callbacks/refetchQueries.js.map +1 -0
  50. package/dist/cjs/callbacks/removeQueries.js +36 -0
  51. package/dist/cjs/callbacks/removeQueries.js.map +1 -0
  52. package/dist/cjs/callbacks/resetQueries.js +36 -0
  53. package/dist/cjs/callbacks/resetQueries.js.map +1 -0
  54. package/dist/cjs/callbacks/setInfiniteQueryData.js +37 -0
  55. package/dist/cjs/callbacks/setInfiniteQueryData.js.map +1 -0
  56. package/dist/cjs/callbacks/setQueriesData.js +36 -0
  57. package/dist/cjs/callbacks/setQueriesData.js.map +1 -0
  58. package/dist/cjs/callbacks/setQueryData.js +37 -0
  59. package/dist/cjs/callbacks/setQueryData.js.map +1 -0
  60. package/dist/cjs/callbacks/useInfiniteQuery.js +36 -0
  61. package/dist/cjs/callbacks/useInfiniteQuery.js.map +1 -0
  62. package/dist/cjs/callbacks/useIsFetching.js +39 -0
  63. package/dist/cjs/callbacks/useIsFetching.js.map +1 -0
  64. package/dist/cjs/callbacks/useIsMutating.js +39 -0
  65. package/dist/cjs/callbacks/useIsMutating.js.map +1 -0
  66. package/dist/cjs/callbacks/useMutation.js +66 -0
  67. package/dist/cjs/callbacks/useMutation.js.map +1 -0
  68. package/dist/cjs/callbacks/useMutationState.js +42 -0
  69. package/dist/cjs/callbacks/useMutationState.js.map +1 -0
  70. package/dist/cjs/callbacks/useQueries.js +69 -0
  71. package/dist/cjs/callbacks/useQueries.js.map +1 -0
  72. package/dist/cjs/callbacks/useQuery.js +36 -0
  73. package/dist/cjs/callbacks/useQuery.js.map +1 -0
  74. package/dist/cjs/callbacks/useSuspenseInfiniteQuery.js +36 -0
  75. package/dist/cjs/callbacks/useSuspenseInfiniteQuery.js.map +1 -0
  76. package/dist/cjs/callbacks/useSuspenseQueries.js +69 -0
  77. package/dist/cjs/callbacks/useSuspenseQueries.js.map +1 -0
  78. package/dist/cjs/callbacks/useSuspenseQuery.js +36 -0
  79. package/dist/cjs/callbacks/useSuspenseQuery.js.map +1 -0
  80. package/dist/cjs/index.js +63 -0
  81. package/dist/cjs/index.js.map +1 -0
  82. package/dist/cjs/lib/PartialParameters.type.js +17 -0
  83. package/dist/cjs/lib/PartialParameters.type.js.map +1 -0
  84. package/dist/cjs/lib/callQueryClientFetchMethod.js +69 -0
  85. package/dist/cjs/lib/callQueryClientFetchMethod.js.map +1 -0
  86. package/dist/cjs/lib/callQueryClientMethodWithMutationFilters.js +42 -0
  87. package/dist/cjs/lib/callQueryClientMethodWithMutationFilters.js.map +1 -0
  88. package/dist/cjs/lib/callQueryClientMethodWithQueryFilters.js +42 -0
  89. package/dist/cjs/lib/callQueryClientMethodWithQueryFilters.js.map +1 -0
  90. package/dist/cjs/lib/callQueryClientMethodWithQueryKey.js +41 -0
  91. package/dist/cjs/lib/callQueryClientMethodWithQueryKey.js.map +1 -0
  92. package/dist/cjs/lib/composeBaseQueryKey.js +34 -0
  93. package/dist/cjs/lib/composeBaseQueryKey.js.map +1 -0
  94. package/dist/cjs/lib/composeInfiniteQueryKey.js +32 -0
  95. package/dist/cjs/lib/composeInfiniteQueryKey.js.map +1 -0
  96. package/dist/cjs/lib/composeMutationFilters.js +55 -0
  97. package/dist/cjs/lib/composeMutationFilters.js.map +1 -0
  98. package/dist/cjs/lib/composeMutationKey.js +52 -0
  99. package/dist/cjs/lib/composeMutationKey.js.map +1 -0
  100. package/dist/cjs/lib/composeQueryFilters.js +57 -0
  101. package/dist/cjs/lib/composeQueryFilters.js.map +1 -0
  102. package/dist/cjs/lib/composeQueryKey.js +32 -0
  103. package/dist/cjs/lib/composeQueryKey.js.map +1 -0
  104. package/dist/cjs/lib/createRecursiveProxy.js +49 -0
  105. package/dist/cjs/lib/createRecursiveProxy.js.map +1 -0
  106. package/dist/cjs/lib/jwt-decode/index.js +91 -0
  107. package/dist/cjs/lib/jwt-decode/index.js.map +1 -0
  108. package/dist/cjs/lib/requestFn.js +202 -0
  109. package/dist/cjs/lib/requestFn.js.map +1 -0
  110. package/dist/cjs/lib/shelfMerge.js +53 -0
  111. package/dist/cjs/lib/shelfMerge.js.map +1 -0
  112. package/dist/cjs/lib/useComposeUseQueryOptions.js +56 -0
  113. package/dist/cjs/lib/useComposeUseQueryOptions.js.map +1 -0
  114. package/dist/cjs/lib/useQueryClient.js +38 -0
  115. package/dist/cjs/lib/useQueryClient.js.map +1 -0
  116. package/dist/cjs/qraftAPIClient.js +77 -0
  117. package/dist/cjs/qraftAPIClient.js.map +1 -0
  118. package/dist/cjs/service-operation/OperationInfiniteData.js +17 -0
  119. package/dist/cjs/service-operation/OperationInfiniteData.js.map +1 -0
  120. package/dist/cjs/service-operation/QueryFilters.js +17 -0
  121. package/dist/cjs/service-operation/QueryFilters.js.map +1 -0
  122. package/dist/cjs/service-operation/ServiceOperation.js +17 -0
  123. package/dist/cjs/service-operation/ServiceOperation.js.map +1 -0
  124. package/dist/cjs/service-operation/ServiceOperationCancelQueries.js +17 -0
  125. package/dist/cjs/service-operation/ServiceOperationCancelQueries.js.map +1 -0
  126. package/dist/cjs/service-operation/ServiceOperationFetchInfiniteQuery.js +17 -0
  127. package/dist/cjs/service-operation/ServiceOperationFetchInfiniteQuery.js.map +1 -0
  128. package/dist/cjs/service-operation/ServiceOperationFetchQuery.js +17 -0
  129. package/dist/cjs/service-operation/ServiceOperationFetchQuery.js.map +1 -0
  130. package/dist/cjs/service-operation/ServiceOperationGetInfiniteQueryData.js +17 -0
  131. package/dist/cjs/service-operation/ServiceOperationGetInfiniteQueryData.js.map +1 -0
  132. package/dist/cjs/service-operation/ServiceOperationGetQueriesData.js +17 -0
  133. package/dist/cjs/service-operation/ServiceOperationGetQueriesData.js.map +1 -0
  134. package/dist/cjs/service-operation/ServiceOperationGetQueryData.js +17 -0
  135. package/dist/cjs/service-operation/ServiceOperationGetQueryData.js.map +1 -0
  136. package/dist/cjs/service-operation/ServiceOperationGetQueryState.js +17 -0
  137. package/dist/cjs/service-operation/ServiceOperationGetQueryState.js.map +1 -0
  138. package/dist/cjs/service-operation/ServiceOperationInvalidateQueries.js +17 -0
  139. package/dist/cjs/service-operation/ServiceOperationInvalidateQueries.js.map +1 -0
  140. package/dist/cjs/service-operation/ServiceOperationIsFetchingQueries.js +17 -0
  141. package/dist/cjs/service-operation/ServiceOperationIsFetchingQueries.js.map +1 -0
  142. package/dist/cjs/service-operation/ServiceOperationIsMutatingQueries.js +17 -0
  143. package/dist/cjs/service-operation/ServiceOperationIsMutatingQueries.js.map +1 -0
  144. package/dist/cjs/service-operation/ServiceOperationKey.js +17 -0
  145. package/dist/cjs/service-operation/ServiceOperationKey.js.map +1 -0
  146. package/dist/cjs/service-operation/ServiceOperationMutationFn.js +17 -0
  147. package/dist/cjs/service-operation/ServiceOperationMutationFn.js.map +1 -0
  148. package/dist/cjs/service-operation/ServiceOperationQueryFn.js +17 -0
  149. package/dist/cjs/service-operation/ServiceOperationQueryFn.js.map +1 -0
  150. package/dist/cjs/service-operation/ServiceOperationRefetchQueries.js +17 -0
  151. package/dist/cjs/service-operation/ServiceOperationRefetchQueries.js.map +1 -0
  152. package/dist/cjs/service-operation/ServiceOperationRemoveQueries.js +17 -0
  153. package/dist/cjs/service-operation/ServiceOperationRemoveQueries.js.map +1 -0
  154. package/dist/cjs/service-operation/ServiceOperationResetQueries.js +17 -0
  155. package/dist/cjs/service-operation/ServiceOperationResetQueries.js.map +1 -0
  156. package/dist/cjs/service-operation/ServiceOperationSetInfiniteQueryData.js +17 -0
  157. package/dist/cjs/service-operation/ServiceOperationSetInfiniteQueryData.js.map +1 -0
  158. package/dist/cjs/service-operation/ServiceOperationSetQueriesData.js +17 -0
  159. package/dist/cjs/service-operation/ServiceOperationSetQueriesData.js.map +1 -0
  160. package/dist/cjs/service-operation/ServiceOperationSetQueryData.js +17 -0
  161. package/dist/cjs/service-operation/ServiceOperationSetQueryData.js.map +1 -0
  162. package/dist/cjs/service-operation/ServiceOperationUseInfiniteQuery.js +17 -0
  163. package/dist/cjs/service-operation/ServiceOperationUseInfiniteQuery.js.map +1 -0
  164. package/dist/cjs/service-operation/ServiceOperationUseIsFetchingQueries.js +17 -0
  165. package/dist/cjs/service-operation/ServiceOperationUseIsFetchingQueries.js.map +1 -0
  166. package/dist/cjs/service-operation/ServiceOperationUseIsMutating.js +17 -0
  167. package/dist/cjs/service-operation/ServiceOperationUseIsMutating.js.map +1 -0
  168. package/dist/cjs/service-operation/ServiceOperationUseMutation.js +17 -0
  169. package/dist/cjs/service-operation/ServiceOperationUseMutation.js.map +1 -0
  170. package/dist/cjs/service-operation/ServiceOperationUseMutationState.js +17 -0
  171. package/dist/cjs/service-operation/ServiceOperationUseMutationState.js.map +1 -0
  172. package/dist/cjs/service-operation/ServiceOperationUseQueries.js +17 -0
  173. package/dist/cjs/service-operation/ServiceOperationUseQueries.js.map +1 -0
  174. package/dist/cjs/service-operation/ServiceOperationUseQuery.js +17 -0
  175. package/dist/cjs/service-operation/ServiceOperationUseQuery.js.map +1 -0
  176. package/dist/cjs/service-operation/ServiceOperationUseSuspenseInfiniteQuery.js +17 -0
  177. package/dist/cjs/service-operation/ServiceOperationUseSuspenseInfiniteQuery.js.map +1 -0
  178. package/dist/cjs/service-operation/ServiceOperationUseSuspenseQueries.js +17 -0
  179. package/dist/cjs/service-operation/ServiceOperationUseSuspenseQueries.js.map +1 -0
  180. package/dist/cjs/service-operation/ServiceOperationUseSuspenseQueryQuery.js +17 -0
  181. package/dist/cjs/service-operation/ServiceOperationUseSuspenseQueryQuery.js.map +1 -0
  182. package/dist/cjs/service-operation/index.js +17 -0
  183. package/dist/cjs/service-operation/index.js.map +1 -0
  184. package/dist/esm/QraftContext.js +7 -0
  185. package/dist/esm/QraftContext.js.map +1 -0
  186. package/dist/esm/ServiceOperation.js +1 -0
  187. package/dist/esm/ServiceOperation.js.map +1 -0
  188. package/dist/esm/Unstable_QraftSecureRequestFn.js +190 -0
  189. package/dist/esm/Unstable_QraftSecureRequestFn.js.map +1 -0
  190. package/dist/esm/callbacks/cancelQueries.js +12 -0
  191. package/dist/esm/callbacks/cancelQueries.js.map +1 -0
  192. package/dist/esm/callbacks/fetchInfiniteQuery.js +13 -0
  193. package/dist/esm/callbacks/fetchInfiniteQuery.js.map +1 -0
  194. package/dist/esm/callbacks/fetchQuery.js +13 -0
  195. package/dist/esm/callbacks/fetchQuery.js.map +1 -0
  196. package/dist/esm/callbacks/getInfiniteQueryData.js +13 -0
  197. package/dist/esm/callbacks/getInfiniteQueryData.js.map +1 -0
  198. package/dist/esm/callbacks/getInfiniteQueryKey.js +8 -0
  199. package/dist/esm/callbacks/getInfiniteQueryKey.js.map +1 -0
  200. package/dist/esm/callbacks/getInfiniteQueryState.js +13 -0
  201. package/dist/esm/callbacks/getInfiniteQueryState.js.map +1 -0
  202. package/dist/esm/callbacks/getMutationKey.js +8 -0
  203. package/dist/esm/callbacks/getMutationKey.js.map +1 -0
  204. package/dist/esm/callbacks/getQueriesData.js +12 -0
  205. package/dist/esm/callbacks/getQueriesData.js.map +1 -0
  206. package/dist/esm/callbacks/getQueryData.js +13 -0
  207. package/dist/esm/callbacks/getQueryData.js.map +1 -0
  208. package/dist/esm/callbacks/getQueryKey.js +8 -0
  209. package/dist/esm/callbacks/getQueryKey.js.map +1 -0
  210. package/dist/esm/callbacks/getQueryState.js +13 -0
  211. package/dist/esm/callbacks/getQueryState.js.map +1 -0
  212. package/dist/esm/callbacks/index.js +73 -0
  213. package/dist/esm/callbacks/index.js.map +1 -0
  214. package/dist/esm/callbacks/invalidateQueries.js +12 -0
  215. package/dist/esm/callbacks/invalidateQueries.js.map +1 -0
  216. package/dist/esm/callbacks/isFetching.js +12 -0
  217. package/dist/esm/callbacks/isFetching.js.map +1 -0
  218. package/dist/esm/callbacks/isMutating.js +12 -0
  219. package/dist/esm/callbacks/isMutating.js.map +1 -0
  220. package/dist/esm/callbacks/mutationFn.js +11 -0
  221. package/dist/esm/callbacks/mutationFn.js.map +1 -0
  222. package/dist/esm/callbacks/operationInvokeFn.js +17 -0
  223. package/dist/esm/callbacks/operationInvokeFn.js.map +1 -0
  224. package/dist/esm/callbacks/prefetchInfiniteQuery.js +13 -0
  225. package/dist/esm/callbacks/prefetchInfiniteQuery.js.map +1 -0
  226. package/dist/esm/callbacks/prefetchQuery.js +13 -0
  227. package/dist/esm/callbacks/prefetchQuery.js.map +1 -0
  228. package/dist/esm/callbacks/queryFn.js +15 -0
  229. package/dist/esm/callbacks/queryFn.js.map +1 -0
  230. package/dist/esm/callbacks/refetchQueries.js +12 -0
  231. package/dist/esm/callbacks/refetchQueries.js.map +1 -0
  232. package/dist/esm/callbacks/removeQueries.js +12 -0
  233. package/dist/esm/callbacks/removeQueries.js.map +1 -0
  234. package/dist/esm/callbacks/resetQueries.js +12 -0
  235. package/dist/esm/callbacks/resetQueries.js.map +1 -0
  236. package/dist/esm/callbacks/setInfiniteQueryData.js +13 -0
  237. package/dist/esm/callbacks/setInfiniteQueryData.js.map +1 -0
  238. package/dist/esm/callbacks/setQueriesData.js +12 -0
  239. package/dist/esm/callbacks/setQueriesData.js.map +1 -0
  240. package/dist/esm/callbacks/setQueryData.js +13 -0
  241. package/dist/esm/callbacks/setQueryData.js.map +1 -0
  242. package/dist/esm/callbacks/useInfiniteQuery.js +14 -0
  243. package/dist/esm/callbacks/useInfiniteQuery.js.map +1 -0
  244. package/dist/esm/callbacks/useIsFetching.js +15 -0
  245. package/dist/esm/callbacks/useIsFetching.js.map +1 -0
  246. package/dist/esm/callbacks/useIsMutating.js +17 -0
  247. package/dist/esm/callbacks/useIsMutating.js.map +1 -0
  248. package/dist/esm/callbacks/useMutation.js +44 -0
  249. package/dist/esm/callbacks/useMutation.js.map +1 -0
  250. package/dist/esm/callbacks/useMutationState.js +20 -0
  251. package/dist/esm/callbacks/useMutationState.js.map +1 -0
  252. package/dist/esm/callbacks/useQueries.js +47 -0
  253. package/dist/esm/callbacks/useQueries.js.map +1 -0
  254. package/dist/esm/callbacks/useQuery.js +14 -0
  255. package/dist/esm/callbacks/useQuery.js.map +1 -0
  256. package/dist/esm/callbacks/useSuspenseInfiniteQuery.js +14 -0
  257. package/dist/esm/callbacks/useSuspenseInfiniteQuery.js.map +1 -0
  258. package/dist/esm/callbacks/useSuspenseQueries.js +47 -0
  259. package/dist/esm/callbacks/useSuspenseQueries.js.map +1 -0
  260. package/dist/esm/callbacks/useSuspenseQuery.js +14 -0
  261. package/dist/esm/callbacks/useSuspenseQuery.js.map +1 -0
  262. package/dist/esm/index.js +15 -1206
  263. package/dist/esm/index.js.map +1 -1
  264. package/dist/esm/lib/PartialParameters.type.js +1 -0
  265. package/dist/esm/lib/PartialParameters.type.js.map +1 -0
  266. package/dist/esm/lib/callQueryClientFetchMethod.js +45 -0
  267. package/dist/esm/lib/callQueryClientFetchMethod.js.map +1 -0
  268. package/dist/esm/lib/callQueryClientMethodWithMutationFilters.js +18 -0
  269. package/dist/esm/lib/callQueryClientMethodWithMutationFilters.js.map +1 -0
  270. package/dist/esm/lib/callQueryClientMethodWithQueryFilters.js +18 -0
  271. package/dist/esm/lib/callQueryClientMethodWithQueryFilters.js.map +1 -0
  272. package/dist/esm/lib/callQueryClientMethodWithQueryKey.js +17 -0
  273. package/dist/esm/lib/callQueryClientMethodWithQueryKey.js.map +1 -0
  274. package/dist/esm/lib/composeBaseQueryKey.js +10 -0
  275. package/dist/esm/lib/composeBaseQueryKey.js.map +1 -0
  276. package/dist/esm/lib/composeInfiniteQueryKey.js +8 -0
  277. package/dist/esm/lib/composeInfiniteQueryKey.js.map +1 -0
  278. package/dist/esm/lib/composeMutationFilters.js +31 -0
  279. package/dist/esm/lib/composeMutationFilters.js.map +1 -0
  280. package/dist/esm/lib/composeMutationKey.js +27 -0
  281. package/dist/esm/lib/composeMutationKey.js.map +1 -0
  282. package/dist/esm/lib/composeQueryFilters.js +33 -0
  283. package/dist/esm/lib/composeQueryFilters.js.map +1 -0
  284. package/dist/esm/lib/composeQueryKey.js +8 -0
  285. package/dist/esm/lib/composeQueryKey.js.map +1 -0
  286. package/dist/esm/lib/createRecursiveProxy.js +25 -0
  287. package/dist/esm/lib/createRecursiveProxy.js.map +1 -0
  288. package/dist/esm/lib/jwt-decode/index.js +65 -0
  289. package/dist/esm/lib/jwt-decode/index.js.map +1 -0
  290. package/dist/esm/lib/requestFn.js +174 -0
  291. package/dist/esm/lib/requestFn.js.map +1 -0
  292. package/dist/esm/lib/shelfMerge.js +29 -0
  293. package/dist/esm/lib/shelfMerge.js.map +1 -0
  294. package/dist/esm/lib/useComposeUseQueryOptions.js +32 -0
  295. package/dist/esm/lib/useComposeUseQueryOptions.js.map +1 -0
  296. package/dist/esm/lib/useQueryClient.js +16 -0
  297. package/dist/esm/lib/useQueryClient.js.map +1 -0
  298. package/dist/esm/qraftAPIClient.js +53 -0
  299. package/dist/esm/qraftAPIClient.js.map +1 -0
  300. package/dist/esm/service-operation/OperationInfiniteData.js +1 -0
  301. package/dist/esm/service-operation/OperationInfiniteData.js.map +1 -0
  302. package/dist/esm/service-operation/QueryFilters.js +1 -0
  303. package/dist/esm/service-operation/QueryFilters.js.map +1 -0
  304. package/dist/esm/service-operation/ServiceOperation.js +1 -0
  305. package/dist/esm/service-operation/ServiceOperation.js.map +1 -0
  306. package/dist/esm/service-operation/ServiceOperationCancelQueries.js +1 -0
  307. package/dist/esm/service-operation/ServiceOperationCancelQueries.js.map +1 -0
  308. package/dist/esm/service-operation/ServiceOperationFetchInfiniteQuery.js +1 -0
  309. package/dist/esm/service-operation/ServiceOperationFetchInfiniteQuery.js.map +1 -0
  310. package/dist/esm/service-operation/ServiceOperationFetchQuery.js +1 -0
  311. package/dist/esm/service-operation/ServiceOperationFetchQuery.js.map +1 -0
  312. package/dist/esm/service-operation/ServiceOperationGetInfiniteQueryData.js +1 -0
  313. package/dist/esm/service-operation/ServiceOperationGetInfiniteQueryData.js.map +1 -0
  314. package/dist/esm/service-operation/ServiceOperationGetQueriesData.js +1 -0
  315. package/dist/esm/service-operation/ServiceOperationGetQueriesData.js.map +1 -0
  316. package/dist/esm/service-operation/ServiceOperationGetQueryData.js +1 -0
  317. package/dist/esm/service-operation/ServiceOperationGetQueryData.js.map +1 -0
  318. package/dist/esm/service-operation/ServiceOperationGetQueryState.js +1 -0
  319. package/dist/esm/service-operation/ServiceOperationGetQueryState.js.map +1 -0
  320. package/dist/esm/service-operation/ServiceOperationInvalidateQueries.js +1 -0
  321. package/dist/esm/service-operation/ServiceOperationInvalidateQueries.js.map +1 -0
  322. package/dist/esm/service-operation/ServiceOperationIsFetchingQueries.js +1 -0
  323. package/dist/esm/service-operation/ServiceOperationIsFetchingQueries.js.map +1 -0
  324. package/dist/esm/service-operation/ServiceOperationIsMutatingQueries.js +1 -0
  325. package/dist/esm/service-operation/ServiceOperationIsMutatingQueries.js.map +1 -0
  326. package/dist/esm/service-operation/ServiceOperationKey.js +1 -0
  327. package/dist/esm/service-operation/ServiceOperationKey.js.map +1 -0
  328. package/dist/esm/service-operation/ServiceOperationMutationFn.js +1 -0
  329. package/dist/esm/service-operation/ServiceOperationMutationFn.js.map +1 -0
  330. package/dist/esm/service-operation/ServiceOperationQueryFn.js +1 -0
  331. package/dist/esm/service-operation/ServiceOperationQueryFn.js.map +1 -0
  332. package/dist/esm/service-operation/ServiceOperationRefetchQueries.js +1 -0
  333. package/dist/esm/service-operation/ServiceOperationRefetchQueries.js.map +1 -0
  334. package/dist/esm/service-operation/ServiceOperationRemoveQueries.js +1 -0
  335. package/dist/esm/service-operation/ServiceOperationRemoveQueries.js.map +1 -0
  336. package/dist/esm/service-operation/ServiceOperationResetQueries.js +1 -0
  337. package/dist/esm/service-operation/ServiceOperationResetQueries.js.map +1 -0
  338. package/dist/esm/service-operation/ServiceOperationSetInfiniteQueryData.js +1 -0
  339. package/dist/esm/service-operation/ServiceOperationSetInfiniteQueryData.js.map +1 -0
  340. package/dist/esm/service-operation/ServiceOperationSetQueriesData.js +1 -0
  341. package/dist/esm/service-operation/ServiceOperationSetQueriesData.js.map +1 -0
  342. package/dist/esm/service-operation/ServiceOperationSetQueryData.js +1 -0
  343. package/dist/esm/service-operation/ServiceOperationSetQueryData.js.map +1 -0
  344. package/dist/esm/service-operation/ServiceOperationUseInfiniteQuery.js +1 -0
  345. package/dist/esm/service-operation/ServiceOperationUseInfiniteQuery.js.map +1 -0
  346. package/dist/esm/service-operation/ServiceOperationUseIsFetchingQueries.js +1 -0
  347. package/dist/esm/service-operation/ServiceOperationUseIsFetchingQueries.js.map +1 -0
  348. package/dist/esm/service-operation/ServiceOperationUseIsMutating.js +1 -0
  349. package/dist/esm/service-operation/ServiceOperationUseIsMutating.js.map +1 -0
  350. package/dist/esm/service-operation/ServiceOperationUseMutation.js +1 -0
  351. package/dist/esm/service-operation/ServiceOperationUseMutation.js.map +1 -0
  352. package/dist/esm/service-operation/ServiceOperationUseMutationState.js +1 -0
  353. package/dist/esm/service-operation/ServiceOperationUseMutationState.js.map +1 -0
  354. package/dist/esm/service-operation/ServiceOperationUseQueries.js +1 -0
  355. package/dist/esm/service-operation/ServiceOperationUseQueries.js.map +1 -0
  356. package/dist/esm/service-operation/ServiceOperationUseQuery.js +1 -0
  357. package/dist/esm/service-operation/ServiceOperationUseQuery.js.map +1 -0
  358. package/dist/esm/service-operation/ServiceOperationUseSuspenseInfiniteQuery.js +1 -0
  359. package/dist/esm/service-operation/ServiceOperationUseSuspenseInfiniteQuery.js.map +1 -0
  360. package/dist/esm/service-operation/ServiceOperationUseSuspenseQueries.js +1 -0
  361. package/dist/esm/service-operation/ServiceOperationUseSuspenseQueries.js.map +1 -0
  362. package/dist/esm/service-operation/ServiceOperationUseSuspenseQueryQuery.js +1 -0
  363. package/dist/esm/service-operation/ServiceOperationUseSuspenseQueryQuery.js.map +1 -0
  364. package/dist/esm/service-operation/index.js +1 -0
  365. package/dist/esm/service-operation/index.js.map +1 -0
  366. package/dist/types/QraftContext.d.ts +20 -0
  367. package/dist/types/QraftContext.d.ts.map +1 -0
  368. package/dist/types/ServiceOperation.d.ts +44 -0
  369. package/dist/types/ServiceOperation.d.ts.map +1 -0
  370. package/dist/types/Unstable_QraftSecureRequestFn.d.ts +81 -0
  371. package/dist/types/Unstable_QraftSecureRequestFn.d.ts.map +1 -0
  372. package/dist/types/callbacks/cancelQueries.d.ts +5 -0
  373. package/dist/types/callbacks/cancelQueries.d.ts.map +1 -0
  374. package/dist/types/callbacks/fetchInfiniteQuery.d.ts +7 -0
  375. package/dist/types/callbacks/fetchInfiniteQuery.d.ts.map +1 -0
  376. package/dist/types/callbacks/fetchQuery.d.ts +7 -0
  377. package/dist/types/callbacks/fetchQuery.d.ts.map +1 -0
  378. package/dist/types/callbacks/getInfiniteQueryData.d.ts +6 -0
  379. package/dist/types/callbacks/getInfiniteQueryData.d.ts.map +1 -0
  380. package/dist/types/callbacks/getInfiniteQueryKey.d.ts +5 -0
  381. package/dist/types/callbacks/getInfiniteQueryKey.d.ts.map +1 -0
  382. package/dist/types/callbacks/getInfiniteQueryState.d.ts +5 -0
  383. package/dist/types/callbacks/getInfiniteQueryState.d.ts.map +1 -0
  384. package/dist/types/callbacks/getMutationKey.d.ts +5 -0
  385. package/dist/types/callbacks/getMutationKey.d.ts.map +1 -0
  386. package/dist/types/callbacks/getQueriesData.d.ts +5 -0
  387. package/dist/types/callbacks/getQueriesData.d.ts.map +1 -0
  388. package/dist/types/callbacks/getQueryData.d.ts +5 -0
  389. package/dist/types/callbacks/getQueryData.d.ts.map +1 -0
  390. package/dist/types/callbacks/getQueryKey.d.ts +5 -0
  391. package/dist/types/callbacks/getQueryKey.d.ts.map +1 -0
  392. package/dist/types/callbacks/getQueryState.d.ts +5 -0
  393. package/dist/types/callbacks/getQueryState.d.ts.map +1 -0
  394. package/dist/types/callbacks/index.d.ts +36 -0
  395. package/dist/types/callbacks/index.d.ts.map +1 -0
  396. package/dist/types/callbacks/invalidateQueries.d.ts +5 -0
  397. package/dist/types/callbacks/invalidateQueries.d.ts.map +1 -0
  398. package/dist/types/callbacks/isFetching.d.ts +5 -0
  399. package/dist/types/callbacks/isFetching.d.ts.map +1 -0
  400. package/dist/types/callbacks/isMutating.d.ts +5 -0
  401. package/dist/types/callbacks/isMutating.d.ts.map +1 -0
  402. package/dist/types/callbacks/mutationFn.d.ts +4 -0
  403. package/dist/types/callbacks/mutationFn.d.ts.map +1 -0
  404. package/dist/types/callbacks/operationInvokeFn.d.ts +9 -0
  405. package/dist/types/callbacks/operationInvokeFn.d.ts.map +1 -0
  406. package/dist/types/callbacks/prefetchInfiniteQuery.d.ts +7 -0
  407. package/dist/types/callbacks/prefetchInfiniteQuery.d.ts.map +1 -0
  408. package/dist/types/callbacks/prefetchQuery.d.ts +7 -0
  409. package/dist/types/callbacks/prefetchQuery.d.ts.map +1 -0
  410. package/dist/types/callbacks/queryFn.d.ts +7 -0
  411. package/dist/types/callbacks/queryFn.d.ts.map +1 -0
  412. package/dist/types/callbacks/refetchQueries.d.ts +5 -0
  413. package/dist/types/callbacks/refetchQueries.d.ts.map +1 -0
  414. package/dist/types/callbacks/removeQueries.d.ts +5 -0
  415. package/dist/types/callbacks/removeQueries.d.ts.map +1 -0
  416. package/dist/types/callbacks/resetQueries.d.ts +5 -0
  417. package/dist/types/callbacks/resetQueries.d.ts.map +1 -0
  418. package/dist/types/callbacks/setInfiniteQueryData.d.ts +6 -0
  419. package/dist/types/callbacks/setInfiniteQueryData.d.ts.map +1 -0
  420. package/dist/types/callbacks/setQueriesData.d.ts +5 -0
  421. package/dist/types/callbacks/setQueriesData.d.ts.map +1 -0
  422. package/dist/types/callbacks/setQueryData.d.ts +5 -0
  423. package/dist/types/callbacks/setQueryData.d.ts.map +1 -0
  424. package/dist/types/callbacks/useInfiniteQuery.d.ts +7 -0
  425. package/dist/types/callbacks/useInfiniteQuery.d.ts.map +1 -0
  426. package/dist/types/callbacks/useIsFetching.d.ts +5 -0
  427. package/dist/types/callbacks/useIsFetching.d.ts.map +1 -0
  428. package/dist/types/callbacks/useIsMutating.d.ts +7 -0
  429. package/dist/types/callbacks/useIsMutating.d.ts.map +1 -0
  430. package/dist/types/callbacks/useMutation.d.ts +7 -0
  431. package/dist/types/callbacks/useMutation.d.ts.map +1 -0
  432. package/dist/types/callbacks/useMutationState.d.ts +7 -0
  433. package/dist/types/callbacks/useMutationState.d.ts.map +1 -0
  434. package/dist/types/callbacks/useQueries.d.ts +6 -0
  435. package/dist/types/callbacks/useQueries.d.ts.map +1 -0
  436. package/dist/types/callbacks/useQuery.d.ts +7 -0
  437. package/dist/types/callbacks/useQuery.d.ts.map +1 -0
  438. package/dist/types/callbacks/useSuspenseInfiniteQuery.d.ts +7 -0
  439. package/dist/types/callbacks/useSuspenseInfiniteQuery.d.ts.map +1 -0
  440. package/dist/types/callbacks/useSuspenseQueries.d.ts +6 -0
  441. package/dist/types/callbacks/useSuspenseQueries.d.ts.map +1 -0
  442. package/dist/types/callbacks/useSuspenseQuery.d.ts +7 -0
  443. package/dist/types/callbacks/useSuspenseQuery.d.ts.map +1 -0
  444. package/dist/types/index.d.ts +7 -0
  445. package/dist/types/index.d.ts.map +1 -0
  446. package/dist/types/lib/PartialParameters.type.d.ts +13 -0
  447. package/dist/types/lib/PartialParameters.type.d.ts.map +1 -0
  448. package/dist/types/lib/callQueryClientFetchMethod.d.ts +20 -0
  449. package/dist/types/lib/callQueryClientFetchMethod.d.ts.map +1 -0
  450. package/dist/types/lib/callQueryClientMethodWithMutationFilters.d.ts +11 -0
  451. package/dist/types/lib/callQueryClientMethodWithMutationFilters.d.ts.map +1 -0
  452. package/dist/types/lib/callQueryClientMethodWithQueryFilters.d.ts +11 -0
  453. package/dist/types/lib/callQueryClientMethodWithQueryFilters.d.ts.map +1 -0
  454. package/dist/types/lib/callQueryClientMethodWithQueryKey.d.ts +11 -0
  455. package/dist/types/lib/callQueryClientMethodWithQueryKey.d.ts.map +1 -0
  456. package/dist/types/lib/composeBaseQueryKey.d.ts +6 -0
  457. package/dist/types/lib/composeBaseQueryKey.d.ts.map +1 -0
  458. package/dist/types/lib/composeInfiniteQueryKey.d.ts +4 -0
  459. package/dist/types/lib/composeInfiniteQueryKey.d.ts.map +1 -0
  460. package/dist/types/lib/composeMutationFilters.d.ts +11 -0
  461. package/dist/types/lib/composeMutationFilters.d.ts.map +1 -0
  462. package/dist/types/lib/composeMutationKey.d.ts +10 -0
  463. package/dist/types/lib/composeMutationKey.d.ts.map +1 -0
  464. package/dist/types/lib/composeQueryFilters.d.ts +14 -0
  465. package/dist/types/lib/composeQueryFilters.d.ts.map +1 -0
  466. package/dist/types/lib/composeQueryKey.d.ts +4 -0
  467. package/dist/types/lib/composeQueryKey.d.ts.map +1 -0
  468. package/dist/types/lib/createRecursiveProxy.d.ts +15 -0
  469. package/dist/types/lib/createRecursiveProxy.d.ts.map +1 -0
  470. package/dist/types/lib/jwt-decode/index.d.ts +29 -0
  471. package/dist/types/lib/jwt-decode/index.d.ts.map +1 -0
  472. package/dist/types/lib/jwt-decode/index.test.d.ts +2 -0
  473. package/dist/types/lib/jwt-decode/index.test.d.ts.map +1 -0
  474. package/dist/types/lib/requestFn.d.ts +100 -0
  475. package/dist/types/lib/requestFn.d.ts.map +1 -0
  476. package/dist/types/lib/shelfMerge.d.ts +7 -0
  477. package/dist/types/lib/shelfMerge.d.ts.map +1 -0
  478. package/dist/types/lib/useComposeUseQueryOptions.d.ts +16 -0
  479. package/dist/types/lib/useComposeUseQueryOptions.d.ts.map +1 -0
  480. package/dist/types/lib/useQueryClient.d.ts +9 -0
  481. package/dist/types/lib/useQueryClient.d.ts.map +1 -0
  482. package/dist/types/qraftAPIClient.d.ts +24 -0
  483. package/dist/types/qraftAPIClient.d.ts.map +1 -0
  484. package/dist/types/service-operation/OperationInfiniteData.d.ts +4 -0
  485. package/dist/types/service-operation/OperationInfiniteData.d.ts.map +1 -0
  486. package/dist/types/service-operation/QueryFilters.d.ts +123 -0
  487. package/dist/types/service-operation/QueryFilters.d.ts.map +1 -0
  488. package/dist/types/service-operation/ServiceOperation.d.ts +53 -0
  489. package/dist/types/service-operation/ServiceOperation.d.ts.map +1 -0
  490. package/dist/types/service-operation/ServiceOperationCancelQueries.d.ts +20 -0
  491. package/dist/types/service-operation/ServiceOperationCancelQueries.d.ts.map +1 -0
  492. package/dist/types/service-operation/ServiceOperationFetchInfiniteQuery.d.ts +58 -0
  493. package/dist/types/service-operation/ServiceOperationFetchInfiniteQuery.d.ts.map +1 -0
  494. package/dist/types/service-operation/ServiceOperationFetchQuery.d.ts +49 -0
  495. package/dist/types/service-operation/ServiceOperationFetchQuery.d.ts.map +1 -0
  496. package/dist/types/service-operation/ServiceOperationGetInfiniteQueryData.d.ts +10 -0
  497. package/dist/types/service-operation/ServiceOperationGetInfiniteQueryData.d.ts.map +1 -0
  498. package/dist/types/service-operation/ServiceOperationGetQueriesData.d.ts +18 -0
  499. package/dist/types/service-operation/ServiceOperationGetQueriesData.d.ts.map +1 -0
  500. package/dist/types/service-operation/ServiceOperationGetQueryData.d.ts +9 -0
  501. package/dist/types/service-operation/ServiceOperationGetQueryData.d.ts.map +1 -0
  502. package/dist/types/service-operation/ServiceOperationGetQueryState.d.ts +11 -0
  503. package/dist/types/service-operation/ServiceOperationGetQueryState.d.ts.map +1 -0
  504. package/dist/types/service-operation/ServiceOperationInvalidateQueries.d.ts +26 -0
  505. package/dist/types/service-operation/ServiceOperationInvalidateQueries.d.ts.map +1 -0
  506. package/dist/types/service-operation/ServiceOperationIsFetchingQueries.d.ts +19 -0
  507. package/dist/types/service-operation/ServiceOperationIsFetchingQueries.d.ts.map +1 -0
  508. package/dist/types/service-operation/ServiceOperationIsMutatingQueries.d.ts +19 -0
  509. package/dist/types/service-operation/ServiceOperationIsMutatingQueries.d.ts.map +1 -0
  510. package/dist/types/service-operation/ServiceOperationKey.d.ts +16 -0
  511. package/dist/types/service-operation/ServiceOperationKey.d.ts.map +1 -0
  512. package/dist/types/service-operation/ServiceOperationMutationFn.d.ts +47 -0
  513. package/dist/types/service-operation/ServiceOperationMutationFn.d.ts.map +1 -0
  514. package/dist/types/service-operation/ServiceOperationQueryFn.d.ts +79 -0
  515. package/dist/types/service-operation/ServiceOperationQueryFn.d.ts.map +1 -0
  516. package/dist/types/service-operation/ServiceOperationRefetchQueries.d.ts +30 -0
  517. package/dist/types/service-operation/ServiceOperationRefetchQueries.d.ts.map +1 -0
  518. package/dist/types/service-operation/ServiceOperationRemoveQueries.d.ts +19 -0
  519. package/dist/types/service-operation/ServiceOperationRemoveQueries.d.ts.map +1 -0
  520. package/dist/types/service-operation/ServiceOperationResetQueries.d.ts +20 -0
  521. package/dist/types/service-operation/ServiceOperationResetQueries.d.ts.map +1 -0
  522. package/dist/types/service-operation/ServiceOperationSetInfiniteQueryData.d.ts +10 -0
  523. package/dist/types/service-operation/ServiceOperationSetInfiniteQueryData.d.ts.map +1 -0
  524. package/dist/types/service-operation/ServiceOperationSetQueriesData.d.ts +20 -0
  525. package/dist/types/service-operation/ServiceOperationSetQueriesData.d.ts.map +1 -0
  526. package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts +19 -0
  527. package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts.map +1 -0
  528. package/dist/types/service-operation/ServiceOperationUseInfiniteQuery.d.ts +14 -0
  529. package/dist/types/service-operation/ServiceOperationUseInfiniteQuery.d.ts.map +1 -0
  530. package/dist/types/service-operation/ServiceOperationUseIsFetchingQueries.d.ts +9 -0
  531. package/dist/types/service-operation/ServiceOperationUseIsFetchingQueries.d.ts.map +1 -0
  532. package/dist/types/service-operation/ServiceOperationUseIsMutating.d.ts +9 -0
  533. package/dist/types/service-operation/ServiceOperationUseIsMutating.d.ts.map +1 -0
  534. package/dist/types/service-operation/ServiceOperationUseMutation.d.ts +17 -0
  535. package/dist/types/service-operation/ServiceOperationUseMutation.d.ts.map +1 -0
  536. package/dist/types/service-operation/ServiceOperationUseMutationState.d.ts +46 -0
  537. package/dist/types/service-operation/ServiceOperationUseMutationState.d.ts.map +1 -0
  538. package/dist/types/service-operation/ServiceOperationUseQueries.d.ts +20 -0
  539. package/dist/types/service-operation/ServiceOperationUseQueries.d.ts.map +1 -0
  540. package/dist/types/service-operation/ServiceOperationUseQuery.d.ts +12 -0
  541. package/dist/types/service-operation/ServiceOperationUseQuery.d.ts.map +1 -0
  542. package/dist/types/service-operation/ServiceOperationUseSuspenseInfiniteQuery.d.ts +12 -0
  543. package/dist/types/service-operation/ServiceOperationUseSuspenseInfiniteQuery.d.ts.map +1 -0
  544. package/dist/types/service-operation/ServiceOperationUseSuspenseQueries.d.ts +18 -0
  545. package/dist/types/service-operation/ServiceOperationUseSuspenseQueries.d.ts.map +1 -0
  546. package/dist/types/service-operation/ServiceOperationUseSuspenseQueryQuery.d.ts +10 -0
  547. package/dist/types/service-operation/ServiceOperationUseSuspenseQueryQuery.d.ts.map +1 -0
  548. package/dist/types/service-operation/index.d.ts +2 -0
  549. package/dist/types/service-operation/index.d.ts.map +1 -0
  550. package/package.json +10 -15
  551. package/src/index.ts +1 -1
  552. package/dist/cjs/index.cjs +0 -1267
  553. package/dist/cjs/index.cjs.map +0 -1
  554. package/dist/cjs/index.d.cts +0 -1035
  555. package/dist/esm/index.d.ts +0 -1035
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var useComposeUseQueryOptions_exports = {};
21
+ __export(useComposeUseQueryOptions_exports, {
22
+ useComposeUseQueryOptions: () => useComposeUseQueryOptions
23
+ });
24
+ module.exports = __toCommonJS(useComposeUseQueryOptions_exports);
25
+ var import_react = require("react");
26
+ var import_QraftContext = require("../QraftContext.js");
27
+ var import_composeInfiniteQueryKey = require("./composeInfiniteQueryKey.js");
28
+ var import_composeQueryKey = require("./composeQueryKey.js");
29
+ var import_shelfMerge = require("./shelfMerge.js");
30
+ var import_useQueryClient = require("./useQueryClient.js");
31
+ function useComposeUseQueryOptions(qraftOptions, schema, args, infinite) {
32
+ const [parameters, options, queryClient] = args;
33
+ const contextValue = (0, import_react.useContext)(qraftOptions?.context ?? import_QraftContext.QraftContext);
34
+ if (!contextValue?.requestFn)
35
+ throw new Error(`QraftContext.requestFn not found`);
36
+ const queryFn = options?.queryFn ?? // @ts-expect-error - Too complex to type
37
+ function({ queryKey: [, queryParams], signal, meta, pageParam }) {
38
+ return contextValue.requestFn(schema, {
39
+ // @ts-expect-error - Too complex to type
40
+ parameters: infinite ? (0, import_shelfMerge.shelfMerge)(2, queryParams, pageParam) : queryParams,
41
+ baseUrl: contextValue.baseUrl,
42
+ signal,
43
+ meta
44
+ });
45
+ };
46
+ const queryKey = Array.isArray(parameters) ? parameters : infinite ? (0, import_composeInfiniteQueryKey.composeInfiniteQueryKey)(schema, parameters) : (0, import_composeQueryKey.composeQueryKey)(schema, parameters);
47
+ return [
48
+ { ...options, queryFn, queryKey },
49
+ (0, import_useQueryClient.useQueryClient)(qraftOptions, queryClient)
50
+ ];
51
+ }
52
+ // Annotate the CommonJS export names for ESM import in node:
53
+ 0 && (module.exports = {
54
+ useComposeUseQueryOptions
55
+ });
56
+ //# sourceMappingURL=useComposeUseQueryOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/useComposeUseQueryOptions.ts"],"sourcesContent":["'use client';\n\nimport { useContext } from 'react';\n\nimport type { QueryClient } from '@tanstack/query-core';\nimport type { UseQueryOptions } from '@tanstack/react-query';\n\nimport type { QraftClientOptions } from '../qraftAPIClient.js';\nimport { QraftContext } from '../QraftContext.js';\nimport type { ServiceOperationQueryKey } from '../service-operation/ServiceOperationKey.js';\nimport { composeInfiniteQueryKey } from './composeInfiniteQueryKey.js';\nimport { composeQueryKey } from './composeQueryKey.js';\nimport type { OperationSchema } from './requestFn.js';\nimport { shelfMerge } from './shelfMerge.js';\nimport { useQueryClient } from './useQueryClient.js';\n\n/**\n * Composes the options for useQuery, useInfiniteQuery, useSuspenseQuery, and useSuspenseQueries.\n * @internal\n */\nexport function useComposeUseQueryOptions(\n qraftOptions: QraftClientOptions | undefined,\n schema: OperationSchema,\n args: UseQueryOptionsArgs,\n infinite: boolean\n): never {\n const [parameters, options, queryClient] = args;\n\n const contextValue = useContext(qraftOptions?.context ?? QraftContext);\n if (!contextValue?.requestFn)\n throw new Error(`QraftContext.requestFn not found`);\n\n const queryFn =\n options?.queryFn ??\n // @ts-expect-error - Too complex to type\n function ({ queryKey: [, queryParams], signal, meta, pageParam }) {\n return contextValue.requestFn(schema, {\n // @ts-expect-error - Too complex to type\n parameters: infinite\n ? (shelfMerge(2, queryParams, pageParam) as never)\n : queryParams,\n baseUrl: contextValue.baseUrl,\n signal,\n meta,\n });\n };\n\n const queryKey = Array.isArray(parameters)\n ? (parameters as ServiceOperationQueryKey<OperationSchema, unknown>)\n : infinite\n ? composeInfiniteQueryKey(schema, parameters)\n : composeQueryKey(schema, parameters);\n\n return [\n { ...options, queryFn, queryKey },\n useQueryClient(qraftOptions, queryClient),\n ] as never;\n}\n\ntype UseQueryOptionsArgs = [\n parameters: unknown,\n options?: UseQueryOptions,\n queryClient?: QueryClient,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA2B;AAM3B,0BAA6B;AAE7B,qCAAwC;AACxC,6BAAgC;AAEhC,wBAA2B;AAC3B,4BAA+B;AAMxB,SAAS,0BACd,cACA,QACA,MACA,UACO;AACP,QAAM,CAAC,YAAY,SAAS,WAAW,IAAI;AAE3C,QAAM,mBAAe,yBAAW,cAAc,WAAW,gCAAY;AACrE,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI,MAAM,kCAAkC;AAEpD,QAAM,UACJ,SAAS;AAAA,EAET,SAAU,EAAE,UAAU,CAAC,EAAE,WAAW,GAAG,QAAQ,MAAM,UAAU,GAAG;AAChE,WAAO,aAAa,UAAU,QAAQ;AAAA;AAAA,MAEpC,YAAY,eACP,8BAAW,GAAG,aAAa,SAAS,IACrC;AAAA,MACJ,SAAS,aAAa;AAAA,MACtB;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAEF,QAAM,WAAW,MAAM,QAAQ,UAAU,IACpC,aACD,eACE,wDAAwB,QAAQ,UAAU,QAC1C,wCAAgB,QAAQ,UAAU;AAExC,SAAO;AAAA,IACL,EAAE,GAAG,SAAS,SAAS,SAAS;AAAA,QAChC,sCAAe,cAAc,WAAW;AAAA,EAC1C;AACF;","names":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var useQueryClient_exports = {};
21
+ __export(useQueryClient_exports, {
22
+ useQueryClient: () => useQueryClient
23
+ });
24
+ module.exports = __toCommonJS(useQueryClient_exports);
25
+ var import_react = require("react");
26
+ var import_react_query = require("@tanstack/react-query");
27
+ var import_QraftContext = require("../QraftContext.js");
28
+ function useQueryClient(qraftOptions, queryClient) {
29
+ const queryClientByContext = (0, import_react.useContext)(
30
+ qraftOptions?.context ?? import_QraftContext.QraftContext
31
+ )?.queryClient;
32
+ return (0, import_react_query.useQueryClient)(queryClient ?? queryClientByContext);
33
+ }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ useQueryClient
37
+ });
38
+ //# sourceMappingURL=useQueryClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/useQueryClient.ts"],"sourcesContent":["'use client';\n\nimport { useContext } from 'react';\n\nimport {\n QueryClient,\n useQueryClient as useQueryClientTanstack,\n} from '@tanstack/react-query';\n\nimport type { QraftClientOptions } from '../qraftAPIClient.js';\nimport { QraftContext } from '../QraftContext.js';\n\n/**\n * Get the QueryClient from the QraftContext or the provided QueryClient argument.\n * @param qraftOptions if `queryClient` is not provided, will be taken from context\n * @param queryClient If not provided, will be taken this instance\n */\nexport function useQueryClient(\n qraftOptions: QraftClientOptions | undefined,\n queryClient: QueryClient | undefined\n) {\n const queryClientByContext = useContext(\n qraftOptions?.context ?? QraftContext\n )?.queryClient;\n\n return useQueryClientTanstack(queryClient ?? queryClientByContext);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA2B;AAE3B,yBAGO;AAGP,0BAA6B;AAOtB,SAAS,eACd,cACA,aACA;AACA,QAAM,2BAAuB;AAAA,IAC3B,cAAc,WAAW;AAAA,EAC3B,GAAG;AAEH,aAAO,mBAAAA,gBAAuB,eAAe,oBAAoB;AACnE;","names":["useQueryClientTanstack"]}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var qraftAPIClient_exports = {};
20
+ __export(qraftAPIClient_exports, {
21
+ qraftAPIClient: () => qraftAPIClient
22
+ });
23
+ module.exports = __toCommonJS(qraftAPIClient_exports);
24
+ var import_createRecursiveProxy = require("./lib/createRecursiveProxy.js");
25
+ const qraftAPIClient = (services, callbacks, options) => {
26
+ return (0, import_createRecursiveProxy.createRecursiveProxy)(
27
+ function getCallback(getPath, key) {
28
+ if (getPath.length !== 2 || key !== "schema") return;
29
+ const serviceOperation = getByPath(services, getPath);
30
+ if (!isServiceOperation(serviceOperation))
31
+ throw new Error(`Service operation not found: ${getPath.join(".")}`);
32
+ return serviceOperation.schema;
33
+ },
34
+ function applyCallback(applyPath, args) {
35
+ const { path, callbackName } = extractCallbackDetails(applyPath);
36
+ if (!(callbackName in callbacks))
37
+ throw new Error(`Function ${callbackName} is not supported`);
38
+ const serviceOperation = getByPath(services, path);
39
+ if (!isServiceOperation(serviceOperation))
40
+ throw new Error(`Service operation not found: ${path.join(".")}`);
41
+ return callbacks[callbackName](
42
+ options,
43
+ serviceOperation.schema,
44
+ args
45
+ );
46
+ },
47
+ []
48
+ );
49
+ };
50
+ function extractCallbackDetails(applyPath) {
51
+ if (applyPath.length === 2) {
52
+ return {
53
+ path: applyPath,
54
+ callbackName: "operationInvokeFn"
55
+ };
56
+ } else {
57
+ return {
58
+ path: applyPath.slice(0, -1),
59
+ // The last arg is for instance `.useMutation` or `.useQuery()`
60
+ callbackName: applyPath[applyPath.length - 1]
61
+ };
62
+ }
63
+ }
64
+ function isServiceOperation(input) {
65
+ return input !== null && typeof input === "object" && "schema" in input;
66
+ }
67
+ function getByPath(obj, path) {
68
+ return path.reduce((acc, key) => {
69
+ if (acc && typeof acc === "object" && key in acc)
70
+ return acc[key];
71
+ }, obj);
72
+ }
73
+ // Annotate the CommonJS export names for ESM import in node:
74
+ 0 && (module.exports = {
75
+ qraftAPIClient
76
+ });
77
+ //# sourceMappingURL=qraftAPIClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/qraftAPIClient.ts"],"sourcesContent":["import type { Context } from 'react';\n\nimport type * as operationInvokeModule from './callbacks/operationInvokeFn.js';\nimport { createRecursiveProxy } from './lib/createRecursiveProxy.js';\nimport type { OperationSchema } from './lib/requestFn.js';\nimport type { QraftContextValue } from './QraftContext.js';\n\nexport interface QraftClientOptions {\n context?: Context<QraftContextValue>;\n}\n\nexport const qraftAPIClient = <\n Services extends ServicesBaseDeclaration<Services>,\n Callbacks extends ServicesCallbacks,\n>(\n services: ServicesDeclaration<Services>,\n callbacks: Callbacks,\n options?: QraftClientOptions\n): Services => {\n return createRecursiveProxy(\n function getCallback(getPath, key) {\n if (getPath.length !== 2 || key !== 'schema') return; // todo::maybe return callback?\n\n const serviceOperation = getByPath(services, getPath);\n if (!isServiceOperation(serviceOperation))\n throw new Error(`Service operation not found: ${getPath.join('.')}`);\n return serviceOperation.schema;\n },\n function applyCallback(applyPath, args) {\n const { path, callbackName } = extractCallbackDetails(applyPath);\n\n if (!(callbackName in callbacks))\n throw new Error(`Function ${callbackName} is not supported`);\n\n const serviceOperation = getByPath(services, path);\n\n if (!isServiceOperation(serviceOperation))\n throw new Error(`Service operation not found: ${path.join('.')}`);\n\n return callbacks[callbackName as keyof Callbacks](\n options,\n serviceOperation.schema,\n args\n );\n },\n []\n ) as never;\n};\n\n/**\n * Extracts Callback details from the applyPath\n * @param applyPath\n */\nfunction extractCallbackDetails(applyPath: string[]) {\n // <service>.<operation>()\n if (applyPath.length === 2) {\n return {\n path: applyPath,\n callbackName: 'operationInvokeFn' satisfies Extract<\n keyof typeof operationInvokeModule,\n 'operationInvokeFn'\n >,\n };\n } else {\n // <service>.<operation>.<method>()\n return {\n path: applyPath.slice(0, -1),\n // The last arg is for instance `.useMutation` or `.useQuery()`\n callbackName: applyPath[applyPath.length - 1],\n };\n }\n}\n\nfunction isServiceOperation(\n input: unknown\n): input is { schema: OperationSchema } {\n return input !== null && typeof input === 'object' && 'schema' in input;\n}\n\nfunction getByPath(obj: Record<string, unknown>, path: string[]) {\n return path.reduce<unknown>((acc, key) => {\n if (acc && typeof acc === 'object' && key in acc)\n return acc[key as keyof typeof acc];\n }, obj);\n}\n\ntype ServicesBaseDeclaration<Services> = {\n [service in keyof Services]: {\n [method in keyof Services[service]]: { schema: OperationSchema };\n };\n};\n\ntype ServicesDeclaration<Services extends ServicesBaseDeclaration<Services>> = {\n [service in keyof Services]: {\n [method in keyof Services[service]]: {\n schema: Services[service][method]['schema'];\n };\n };\n};\n\ntype ServicesCallbacks = Record<string, (...rest: any[]) => unknown>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kCAAqC;AAQ9B,MAAM,iBAAiB,CAI5B,UACA,WACA,YACa;AACb,aAAO;AAAA,IACL,SAAS,YAAY,SAAS,KAAK;AACjC,UAAI,QAAQ,WAAW,KAAK,QAAQ,SAAU;AAE9C,YAAM,mBAAmB,UAAU,UAAU,OAAO;AACpD,UAAI,CAAC,mBAAmB,gBAAgB;AACtC,cAAM,IAAI,MAAM,gCAAgC,QAAQ,KAAK,GAAG,CAAC,EAAE;AACrE,aAAO,iBAAiB;AAAA,IAC1B;AAAA,IACA,SAAS,cAAc,WAAW,MAAM;AACtC,YAAM,EAAE,MAAM,aAAa,IAAI,uBAAuB,SAAS;AAE/D,UAAI,EAAE,gBAAgB;AACpB,cAAM,IAAI,MAAM,YAAY,YAAY,mBAAmB;AAE7D,YAAM,mBAAmB,UAAU,UAAU,IAAI;AAEjD,UAAI,CAAC,mBAAmB,gBAAgB;AACtC,cAAM,IAAI,MAAM,gCAAgC,KAAK,KAAK,GAAG,CAAC,EAAE;AAElE,aAAO,UAAU,YAA+B;AAAA,QAC9C;AAAA,QACA,iBAAiB;AAAA,QACjB;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACF;AAMA,SAAS,uBAAuB,WAAqB;AAEnD,MAAI,UAAU,WAAW,GAAG;AAC1B,WAAO;AAAA,MACL,MAAM;AAAA,MACN,cAAc;AAAA,IAIhB;AAAA,EACF,OAAO;AAEL,WAAO;AAAA,MACL,MAAM,UAAU,MAAM,GAAG,EAAE;AAAA;AAAA,MAE3B,cAAc,UAAU,UAAU,SAAS,CAAC;AAAA,IAC9C;AAAA,EACF;AACF;AAEA,SAAS,mBACP,OACsC;AACtC,SAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,YAAY;AACpE;AAEA,SAAS,UAAU,KAA8B,MAAgB;AAC/D,SAAO,KAAK,OAAgB,CAAC,KAAK,QAAQ;AACxC,QAAI,OAAO,OAAO,QAAQ,YAAY,OAAO;AAC3C,aAAO,IAAI,GAAuB;AAAA,EACtC,GAAG,GAAG;AACR;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var OperationInfiniteData_exports = {};
16
+ module.exports = __toCommonJS(OperationInfiniteData_exports);
17
+ //# sourceMappingURL=OperationInfiniteData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/OperationInfiniteData.ts"],"sourcesContent":["import type { InfiniteData } from '@tanstack/query-core';\n\nimport type { PartialParameters } from '../lib/PartialParameters.type.js';\n\nexport type OperationInfiniteData<TData, TParams> = InfiniteData<\n TData,\n PartialParameters<TParams>\n>;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var QueryFilters_exports = {};
16
+ module.exports = __toCommonJS(QueryFilters_exports);
17
+ //# sourceMappingURL=QueryFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/QueryFilters.ts"],"sourcesContent":["import type { DefaultError, FetchStatus, Query } from '@tanstack/query-core';\n\nimport type { PartialParameters } from '../lib/PartialParameters.type.js';\nimport type { OperationInfiniteData } from './OperationInfiniteData.js';\nimport type {\n ServiceOperationBaseQueryKey,\n ServiceOperationInfiniteQueryKey,\n ServiceOperationQueryKey,\n} from './ServiceOperationKey.js';\n\nexport type QueryTypeFilter = 'all' | 'active' | 'inactive';\n\ninterface QueryFiltersBase<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> {\n /**\n * Include queries matching this predicate function\n */\n predicate?: TInfinite extends true\n ? QueryFilterInfinitePredicate<TSchema, TData, TParams, TError>\n : TInfinite extends false\n ? QueryFilterRegularPredicate<TSchema, TData, TParams, TError>\n : (query: string) => boolean;\n\n /**\n * Filter to active queries, inactive queries or all queries\n */\n type?: QueryTypeFilter;\n\n /**\n * Include or exclude stale queries\n */\n stale?: boolean;\n\n /**\n * Include queries matching their fetchStatus\n */\n fetchStatus?: FetchStatus;\n}\n\ninterface QueryFiltersByQueryKeyBase<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> extends QueryFiltersBase<TSchema, TData, TInfinite, TParams, TError> {\n infinite?: never;\n parameters?: never;\n}\n\ninterface QueryFiltersByExactQueryKey<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> extends QueryFiltersByQueryKeyBase<\n TSchema,\n TData,\n TInfinite,\n TParams,\n TError\n > {\n /**\n * Include queries matching this query key\n */\n queryKey: ServiceOperationBaseQueryKey<TSchema, TInfinite, TParams>;\n\n /**\n * Match query key exactly\n */\n exact: true;\n}\n\ninterface QueryFiltersWeakExactQueryKey<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> extends QueryFiltersByQueryKeyBase<\n TSchema,\n TData,\n TInfinite,\n TParams,\n TError\n > {\n /**\n * Include queries matching this query key\n */\n queryKey?: ServiceOperationBaseQueryKey<\n TSchema,\n TInfinite,\n PartialParameters<TParams>\n >;\n\n /**\n * Match query key exactly\n */\n exact?: false;\n}\n\nexport type QueryFiltersByQueryKey<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> =\n | QueryFiltersByExactQueryKey<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersWeakExactQueryKey<TSchema, TData, TInfinite, TParams, TError>;\n\ninterface QueryFiltersByParametersBase<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> extends QueryFiltersBase<TSchema, TData, TInfinite, TParams, TError> {\n /**\n * Is the query infinite\n */\n infinite?: TInfinite;\n\n queryKey?: never;\n}\n\ninterface QueryFiltersByExactParameters<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> extends QueryFiltersByParametersBase<\n TSchema,\n TData,\n TInfinite,\n TParams,\n TError\n > {\n /**\n * Match query key exactly\n */\n exact: true;\n\n /**\n * Include queries matching parameters\n */\n parameters: TParams;\n}\n\ninterface QueryFiltersByWeakParameters<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> extends QueryFiltersByParametersBase<\n TSchema,\n TData,\n TInfinite,\n TParams,\n TError\n > {\n /**\n * Match query key exactly\n */\n exact?: false;\n\n /**\n * Include queries matching parameters\n */\n parameters?: PartialParameters<TParams>;\n}\n\nexport type QueryFiltersByParameters<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> =\n | QueryFiltersByExactParameters<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersByWeakParameters<TSchema, TData, TInfinite, TParams, TError>;\n\ninterface QueryFilterInfinitePredicate<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n /**\n * Include queries matching this predicate function\n */\n (\n query: Query<\n OperationInfiniteData<TData, TParams>,\n TError,\n OperationInfiniteData<TData, TParams>,\n ServiceOperationInfiniteQueryKey<TSchema, TParams>\n >\n ): boolean;\n}\n\ninterface QueryFilterRegularPredicate<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n /**\n * Include queries matching this predicate function\n */\n (\n query: Query<\n TData,\n TError,\n TData,\n ServiceOperationQueryKey<TSchema, TParams>\n >\n ): boolean;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperation_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperation_exports);
17
+ //# sourceMappingURL=ServiceOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperation.ts"],"sourcesContent":["import type { DefaultError } from '@tanstack/query-core';\n\nimport type { ServiceOperationCancelQueries } from './ServiceOperationCancelQueries.js';\nimport type { ServiceOperationFetchInfiniteQuery } from './ServiceOperationFetchInfiniteQuery.js';\nimport type { ServiceOperationFetchQuery } from './ServiceOperationFetchQuery.js';\nimport type { ServiceOperationGetInfiniteQueryData } from './ServiceOperationGetInfiniteQueryData.js';\nimport type { ServiceOperationGetQueriesData } from './ServiceOperationGetQueriesData.js';\nimport type { ServiceOperationGetQueryData } from './ServiceOperationGetQueryData.js';\nimport type { ServiceOperationGetQueryState } from './ServiceOperationGetQueryState.js';\nimport type { ServiceOperationInvalidateQueries } from './ServiceOperationInvalidateQueries.js';\nimport type { ServiceOperationIsFetchingQueries } from './ServiceOperationIsFetchingQueries.js';\nimport type { ServiceOperationIsMutatingQueries } from './ServiceOperationIsMutatingQueries.js';\nimport type { ServiceOperationMutationFn } from './ServiceOperationMutationFn.js';\nimport type { ServiceOperationQueryFn } from './ServiceOperationQueryFn.js';\nimport type { ServiceOperationRefetchQueries } from './ServiceOperationRefetchQueries.js';\nimport type { ServiceOperationRemoveQueries } from './ServiceOperationRemoveQueries.js';\nimport type { ServiceOperationResetQueries } from './ServiceOperationResetQueries.js';\nimport type { ServiceOperationSetInfiniteQueryData } from './ServiceOperationSetInfiniteQueryData.js';\nimport type { ServiceOperationSetQueriesData } from './ServiceOperationSetQueriesData.js';\nimport type { ServiceOperationSetQueryData } from './ServiceOperationSetQueryData.js';\nimport type { ServiceOperationUseInfiniteQuery } from './ServiceOperationUseInfiniteQuery.js';\nimport type { ServiceOperationUseIsFetchingQueries } from './ServiceOperationUseIsFetchingQueries.js';\nimport type { ServiceOperationUseIsMutating } from './ServiceOperationUseIsMutating.js';\nimport type { ServiceOperationUseMutation } from './ServiceOperationUseMutation.js';\nimport type { ServiceOperationUseMutationState } from './ServiceOperationUseMutationState.js';\nimport type { ServiceOperationUseQueries } from './ServiceOperationUseQueries.js';\nimport type { ServiceOperationUseQuery } from './ServiceOperationUseQuery.js';\nimport type { ServiceOperationUseSuspenseInfiniteQuery } from './ServiceOperationUseSuspenseInfiniteQuery.js';\nimport type { ServiceOperationUseSuspenseQueries } from './ServiceOperationUseSuspenseQueries.js';\nimport type { ServiceOperationUseSuspenseQueryQuery } from './ServiceOperationUseSuspenseQueryQuery.js';\n\nexport interface ServiceOperationQuery<\n TSchema extends { url: string; method: string },\n TData,\n TParams,\n TError = DefaultError,\n> extends ServiceOperationUseQuery<TSchema, TData, TParams, TError>,\n ServiceOperationUseQueries<TSchema, TData, TParams, TError>,\n ServiceOperationUseSuspenseQueries<TSchema, TData, TParams, TError>,\n ServiceOperationUseInfiniteQuery<TSchema, TData, TParams, TError>,\n ServiceOperationUseSuspenseQueryQuery<TSchema, TData, TParams, TError>,\n ServiceOperationUseSuspenseInfiniteQuery<TSchema, TData, TParams, TError>,\n ServiceOperationUseIsFetchingQueries<TSchema, TData, TParams, TError>,\n ServiceOperationQueryFn<TSchema, TData, TParams>,\n ServiceOperationFetchQuery<TSchema, TData, TParams, TError>,\n ServiceOperationFetchInfiniteQuery<TSchema, TData, TParams, TError>,\n ServiceOperationGetQueryData<TSchema, TData, TParams>,\n ServiceOperationGetQueryState<TSchema, TData, TParams, TError>,\n ServiceOperationGetQueriesData<TSchema, TData, TParams, TError>,\n ServiceOperationGetInfiniteQueryData<TSchema, TData, TParams>,\n ServiceOperationSetQueryData<TSchema, TData, TParams>,\n ServiceOperationSetQueriesData<TSchema, TData, TParams, TError>,\n ServiceOperationSetInfiniteQueryData<TSchema, TData, TParams>,\n ServiceOperationInvalidateQueries<TSchema, TData, TParams, TError>,\n ServiceOperationCancelQueries<TSchema, TData, TParams, TError>,\n ServiceOperationRemoveQueries<TSchema, TData, TParams, TError>,\n ServiceOperationResetQueries<TSchema, TData, TParams, TError>,\n ServiceOperationRefetchQueries<TSchema, TData, TParams, TError>,\n ServiceOperationIsFetchingQueries<TSchema, TData, TParams, TError> {\n schema: TSchema;\n types: {\n parameters: TParams;\n data: TData;\n error: TError;\n };\n}\n\nexport interface ServiceOperationMutation<\n TSchema extends { url: string; method: string },\n TBody,\n TData,\n TParams,\n TError = DefaultError,\n> extends ServiceOperationUseMutation<TSchema, TBody, TData, TParams, TError>,\n ServiceOperationUseIsMutating<TSchema, TBody, TData, TParams, TError>,\n ServiceOperationUseMutationState<TSchema, TBody, TData, TParams, TError>,\n ServiceOperationIsMutatingQueries<TSchema, TBody, TData, TParams, TError>,\n ServiceOperationMutationFn<TSchema, TBody, TData, TParams> {\n schema: TSchema;\n types: {\n parameters: TParams;\n data: TData;\n error: TError;\n body: TBody;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationCancelQueries_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationCancelQueries_exports);
17
+ //# sourceMappingURL=ServiceOperationCancelQueries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationCancelQueries.ts"],"sourcesContent":["import type {\n CancelOptions,\n DefaultError,\n QueryClient,\n} from '@tanstack/query-core';\n\nimport type {\n QueryFiltersByParameters,\n QueryFiltersByQueryKey,\n} from './QueryFilters.js';\n\nexport interface ServiceOperationCancelQueries<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n cancelQueries<TInfinite extends boolean>(\n filters:\n | QueryFiltersByParameters<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersByQueryKey<TSchema, TData, TInfinite, TParams, TError>,\n options: CancelOptions,\n queryClient: QueryClient\n ): Promise<void>;\n\n cancelQueries<TInfinite extends boolean>(\n filters:\n | QueryFiltersByParameters<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersByQueryKey<TSchema, TData, TInfinite, TParams, TError>,\n queryClient: QueryClient\n ): Promise<void>;\n\n cancelQueries(queryClient: QueryClient): Promise<void>;\n}\n\n/**\n * @internal\n */\nexport interface ServiceOperationCancelQueriesCallback<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> extends ServiceOperationCancelQueries<TSchema, TData, TParams, TError> {\n cancelQueries<TInfinite extends boolean>(\n filters:\n | QueryFiltersByParameters<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersByQueryKey<TSchema, TData, TInfinite, TParams, TError>\n | QueryClient,\n options?: CancelOptions | QueryClient,\n queryClient?: QueryClient\n ): Promise<void>;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationFetchInfiniteQuery_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationFetchInfiniteQuery_exports);
17
+ //# sourceMappingURL=ServiceOperationFetchInfiniteQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationFetchInfiniteQuery.ts"],"sourcesContent":["import type {\n DefaultError,\n FetchQueryOptions,\n GetNextPageParamFunction,\n InitialPageParam,\n QueryClient,\n QueryFunction,\n} from '@tanstack/query-core';\n\nimport type { PartialParameters } from '../lib/PartialParameters.type.js';\nimport type { RequestFn } from '../lib/requestFn.js';\nimport type { OperationInfiniteData } from './OperationInfiniteData.js';\nimport type {\n ServiceOperationInfiniteQueryKey,\n ServiceOperationQueryKey,\n} from './ServiceOperationKey.js';\n\nexport interface ServiceOperationFetchInfiniteQuery<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n fetchInfiniteQuery<TPageParam extends TParams>(\n options:\n | (FetchInfiniteQueryOptionsByQueryKey<\n TSchema,\n TData,\n TParams,\n TPageParam,\n TError\n > &\n FetchInfiniteQueryOptionsQueryFn<TSchema, TData, TParams>)\n | (FetchInfiniteQueryOptionsByParameters<\n TSchema,\n TData,\n TParams,\n TPageParam,\n TError\n > &\n FetchInfiniteQueryOptionsQueryFn<TSchema, TData, TParams>),\n queryClient: QueryClient\n ): Promise<OperationInfiniteData<TData, TParams>>;\n\n prefetchInfiniteQuery<TPageParam extends TParams>(\n options:\n | (FetchInfiniteQueryOptionsByQueryKey<\n TSchema,\n TData,\n TParams,\n TPageParam,\n TError\n > &\n FetchInfiniteQueryOptionsQueryFn<TSchema, TData, TParams>)\n | (FetchInfiniteQueryOptionsByParameters<\n TSchema,\n TData,\n TParams,\n TPageParam,\n TError\n > &\n FetchInfiniteQueryOptionsQueryFn<TSchema, TData, TParams>),\n queryClient: QueryClient\n ): Promise<void>;\n}\n\ntype FetchInfiniteQueryPages<TData = unknown, TPageParam = unknown> =\n | {\n pages?: never;\n }\n | {\n pages: number;\n getNextPageParam: GetNextPageParamFunction<\n PartialParameters<TPageParam>,\n TData\n >;\n };\n\ntype FetchInfiniteQueryOptionsBase<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TPageParam = unknown,\n TError = DefaultError,\n> = Omit<\n FetchQueryOptions<\n TData,\n TError,\n OperationInfiniteData<TData, TParams>,\n ServiceOperationQueryKey<TSchema, TParams>,\n TPageParam\n >,\n 'queryKey'\n> &\n InitialPageParam<PartialParameters<TPageParam>> &\n FetchInfiniteQueryPages<TData, TPageParam>;\n\ntype FetchInfiniteQueryOptionsByQueryKey<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TPageParam = {},\n TError = DefaultError,\n> = FetchInfiniteQueryOptionsBase<\n TSchema,\n TData,\n TParams,\n TPageParam,\n TError\n> & {\n /**\n * Fetch Queries by query key\n */\n queryKey?: ServiceOperationInfiniteQueryKey<TSchema, TParams>;\n parameters?: never;\n};\ntype FetchInfiniteQueryOptionsByParameters<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TPageParam = {},\n TError = DefaultError,\n> = FetchInfiniteQueryOptionsBase<\n TSchema,\n TData,\n TParams,\n TPageParam,\n TError\n> & {\n /**\n * Fetch Queries by parameters\n */\n parameters?: TParams;\n queryKey?: never;\n};\n\ntype FetchInfiniteQueryOptionsQueryFn<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n> =\n | {\n queryFn?: QueryFunction<\n TData,\n ServiceOperationInfiniteQueryKey<TSchema, TParams>\n >;\n }\n | {\n requestFn: RequestFn<TData>;\n /**\n * Base URL to use for the request (used in the `queryFn`)\n * @example 'https://api.example.com'\n */\n baseUrl: string | undefined;\n queryFn?: never; // Workaround to fix union type error\n };\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationFetchQuery_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationFetchQuery_exports);
17
+ //# sourceMappingURL=ServiceOperationFetchQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationFetchQuery.ts"],"sourcesContent":["import type {\n DefaultError,\n FetchQueryOptions,\n QueryClient,\n QueryFunction,\n} from '@tanstack/query-core';\n\nimport type { RequestFn } from '../lib/requestFn.js';\nimport type { ServiceOperationQueryKey } from './ServiceOperationKey.js';\n\nexport interface ServiceOperationFetchQuery<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n fetchQuery(\n options:\n | (FetchQueryOptionsByQueryKey<TSchema, TData, TParams, TError> &\n FetchQueryOptionsQueryFn<TSchema, TData, TParams>)\n | (FetchQueryOptionsByParameters<TSchema, TData, TParams, TError> &\n FetchQueryOptionsQueryFn<TSchema, TData, TParams>),\n queryClient: QueryClient\n ): Promise<TData>;\n\n prefetchQuery(\n options:\n | (FetchQueryOptionsByQueryKey<TSchema, TData, TParams, TError> &\n FetchQueryOptionsQueryFn<TSchema, TData, TParams>)\n | (FetchQueryOptionsByParameters<TSchema, TData, TParams, TError> &\n FetchQueryOptionsQueryFn<TSchema, TData, TParams>),\n queryClient: QueryClient\n ): Promise<void>;\n}\n\ntype FetchQueryOptionsBase<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> = Omit<\n FetchQueryOptions<\n TData,\n TError,\n TData,\n ServiceOperationQueryKey<TSchema, TParams>\n >,\n 'queryKey' | 'queryFn'\n>;\n\ninterface FetchQueryOptionsByQueryKey<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> extends FetchQueryOptionsBase<TSchema, TData, TParams, TError> {\n /**\n * Fetch Queries by query key\n */\n queryKey?: ServiceOperationQueryKey<TSchema, TParams>;\n}\n\ninterface FetchQueryOptionsByParameters<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> extends FetchQueryOptionsBase<TSchema, TData, TParams, TError> {\n /**\n * Fetch Queries by parameters\n */\n parameters?: TParams;\n queryKey?: never;\n}\n\ntype FetchQueryOptionsQueryFn<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n> =\n | {\n queryFn?: QueryFunction<\n TData,\n ServiceOperationQueryKey<TSchema, TParams>\n >;\n }\n | {\n requestFn: RequestFn<TData>;\n /**\n * Base URL to use for the request (used in the `queryFn`)\n * @example 'https://api.example.com'\n */\n baseUrl: string | undefined;\n queryFn?: never; // Workaround to fix union type error\n };\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationGetInfiniteQueryData_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationGetInfiniteQueryData_exports);
17
+ //# sourceMappingURL=ServiceOperationGetInfiniteQueryData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationGetInfiniteQueryData.ts"],"sourcesContent":["import type { QueryClient } from '@tanstack/query-core';\n\nimport type { OperationInfiniteData } from './OperationInfiniteData.js';\nimport type { ServiceOperationInfiniteQueryKey } from './ServiceOperationKey.js';\n\nexport interface ServiceOperationGetInfiniteQueryData<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n> {\n getInfiniteQueryData(\n parameters: TParams | ServiceOperationInfiniteQueryKey<TSchema, TParams>,\n queryClient: QueryClient\n ): OperationInfiniteData<TData, TParams> | undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationGetQueriesData_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationGetQueriesData_exports);
17
+ //# sourceMappingURL=ServiceOperationGetQueriesData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationGetQueriesData.ts"],"sourcesContent":["import type { DefaultError, NoInfer, QueryClient } from '@tanstack/query-core';\n\nimport type { OperationInfiniteData } from './OperationInfiniteData.js';\nimport type {\n QueryFiltersByParameters,\n QueryFiltersByQueryKey,\n} from './QueryFilters.js';\nimport type {\n ServiceOperationInfiniteQueryKey,\n ServiceOperationQueryKey,\n} from './ServiceOperationKey.js';\n\nexport interface ServiceOperationGetQueriesData<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {}, // todo::try to replace `TParams = {}` with `TParams = undefined`\n TError = DefaultError,\n> {\n getQueriesData<TInfinite extends boolean>(\n filters:\n | QueryFiltersByParameters<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersByQueryKey<TSchema, TData, TInfinite, TParams, TError>,\n queryClient: QueryClient\n ): TInfinite extends true\n ? Array<\n [\n queryKey: ServiceOperationInfiniteQueryKey<TSchema, TParams>,\n data: NoInfer<OperationInfiniteData<TData, TParams>> | undefined,\n ]\n >\n : Array<\n [\n queryKey: ServiceOperationQueryKey<TSchema, TParams>,\n data: TData | undefined,\n ]\n >;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationGetQueryData_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationGetQueryData_exports);
17
+ //# sourceMappingURL=ServiceOperationGetQueryData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationGetQueryData.ts"],"sourcesContent":["import type { QueryClient } from '@tanstack/query-core';\n\nimport type { ServiceOperationQueryKey } from './ServiceOperationKey.js';\n\nexport interface ServiceOperationGetQueryData<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n> {\n getQueryData(\n parameters: TParams | ServiceOperationQueryKey<TSchema, TParams>,\n queryClient: QueryClient\n ): TData | undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationGetQueryState_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationGetQueryState_exports);
17
+ //# sourceMappingURL=ServiceOperationGetQueryState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationGetQueryState.ts"],"sourcesContent":["import type {\n DefaultError,\n QueryClient,\n QueryState,\n} from '@tanstack/query-core';\n\nimport type { OperationInfiniteData } from './OperationInfiniteData.js';\nimport type {\n ServiceOperationInfiniteQueryKey,\n ServiceOperationQueryKey,\n} from './ServiceOperationKey.js';\n\nexport interface ServiceOperationGetQueryState<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n getQueryState(\n parameters: TParams | ServiceOperationQueryKey<TSchema, TParams>,\n queryClient: QueryClient\n ): QueryState<TData, TError> | undefined;\n\n getInfiniteQueryState(\n parameters: TParams | ServiceOperationInfiniteQueryKey<TSchema, TParams>,\n queryClient: QueryClient\n ): QueryState<OperationInfiniteData<TData, TParams>, TError> | undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationInvalidateQueries_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationInvalidateQueries_exports);
17
+ //# sourceMappingURL=ServiceOperationInvalidateQueries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationInvalidateQueries.ts"],"sourcesContent":["import type {\n DefaultError,\n InvalidateOptions,\n QueryClient,\n} from '@tanstack/query-core';\n\nimport type {\n QueryFiltersByParameters,\n QueryFiltersByQueryKey,\n QueryTypeFilter,\n} from './QueryFilters.js';\n\nexport type InvalidateQueryFilters<\n TSchema extends { url: string; method: string },\n TData,\n TInfinite extends boolean,\n TParams = {},\n TError = DefaultError,\n> = (\n | QueryFiltersByParameters<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersByQueryKey<TSchema, TData, TInfinite, TParams, TError>\n) & {\n refetchType?: QueryTypeFilter | 'none';\n};\n\nexport interface ServiceOperationInvalidateQueries<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n invalidateQueries<TInfinite extends boolean>(\n filters: InvalidateQueryFilters<TSchema, TData, TInfinite, TParams, TError>,\n options: InvalidateOptions,\n queryClient: QueryClient\n ): Promise<void>;\n\n invalidateQueries<TInfinite extends boolean>(\n filters: InvalidateQueryFilters<TSchema, TData, TInfinite, TParams, TError>,\n queryClient: QueryClient\n ): Promise<void>;\n\n invalidateQueries(queryClient: QueryClient): Promise<void>;\n}\n\n/**\n * @internal\n */\nexport interface ServiceOperationInvalidateQueriesCallback<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> extends ServiceOperationInvalidateQueries<TSchema, TData, TParams, TError> {\n invalidateQueries<TInfinite extends boolean>(\n filters:\n | InvalidateQueryFilters<TSchema, TData, TInfinite, TParams, TError>\n | QueryClient,\n options?: InvalidateOptions | QueryClient,\n queryClient?: QueryClient\n ): Promise<void>;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationIsFetchingQueries_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationIsFetchingQueries_exports);
17
+ //# sourceMappingURL=ServiceOperationIsFetchingQueries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationIsFetchingQueries.ts"],"sourcesContent":["import type { DefaultError, QueryClient } from '@tanstack/query-core';\n\nimport type {\n QueryFiltersByParameters,\n QueryFiltersByQueryKey,\n} from './QueryFilters.js';\n\nexport interface ServiceOperationIsFetchingQueries<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n isFetching<TInfinite extends boolean>(\n filters:\n | QueryFiltersByParameters<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersByQueryKey<TSchema, TData, TInfinite, TParams, TError>,\n queryClient: QueryClient\n ): number;\n\n isFetching(queryClient: QueryClient): number;\n}\n\n/**\n * @internal\n */\nexport interface ServiceOperationIsFetchingQueriesCallback<\n TSchema extends { url: string; method: string },\n TData,\n TParams = {},\n TError = DefaultError,\n> extends ServiceOperationIsFetchingQueries<TSchema, TData, TParams, TError> {\n refetchQueries<TInfinite extends boolean>(\n filters:\n | QueryFiltersByParameters<TSchema, TData, TInfinite, TParams, TError>\n | QueryFiltersByQueryKey<TSchema, TData, TInfinite, TParams, TError>\n | QueryClient,\n queryClient?: QueryClient\n ): number;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationIsMutatingQueries_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationIsMutatingQueries_exports);
17
+ //# sourceMappingURL=ServiceOperationIsMutatingQueries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationIsMutatingQueries.ts"],"sourcesContent":["import type { DefaultError, QueryClient } from '@tanstack/query-core';\n\nimport type {\n MutationFiltersByMutationKey,\n MutationFiltersByParameters,\n} from './ServiceOperationUseMutationState.js';\n\nexport interface ServiceOperationIsMutatingQueries<\n TSchema extends { url: string; method: string },\n TBody,\n TData,\n TParams = {},\n TError = DefaultError,\n> {\n isMutating<TContext>(\n filters:\n | MutationFiltersByParameters<TBody, TData, TParams, TError, TContext>\n | MutationFiltersByMutationKey<\n TSchema,\n TBody,\n TData,\n TParams,\n TError,\n TContext\n >,\n queryClient: QueryClient\n ): number;\n\n isMutating(queryClient: QueryClient): number;\n}\n\n/**\n * @internal\n */\nexport interface ServiceOperationIsMutatingQueriesCallback<\n TSchema extends { url: string; method: string },\n TBody,\n TData,\n TParams = {},\n TError = DefaultError,\n> extends ServiceOperationIsMutatingQueries<\n TSchema,\n TBody,\n TData,\n TParams,\n TError\n > {\n isMutating<TContext>(\n filters:\n | MutationFiltersByParameters<TBody, TData, TParams, TError, TContext>\n | MutationFiltersByMutationKey<\n TSchema,\n TBody,\n TData,\n TParams,\n TError,\n TContext\n >\n | QueryClient,\n queryClient?: QueryClient\n ): number;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationKey_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationKey_exports);
17
+ //# sourceMappingURL=ServiceOperationKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationKey.ts"],"sourcesContent":["export type ServiceOperationBaseQueryKey<\n S extends { url: string; method: string },\n Infinite extends boolean,\n T,\n> = [S & { infinite: Infinite }, T];\n\nexport type ServiceOperationQueryKey<\n S extends { url: string; method: string },\n T,\n> = ServiceOperationBaseQueryKey<S, false, T>;\n\nexport type ServiceOperationInfiniteQueryKey<\n S extends { url: string; method: string },\n T,\n> = ServiceOperationBaseQueryKey<S, true, T>;\n\nexport type ServiceOperationMutationKey<\n S extends Record<'url' | 'method', string>,\n T,\n> = NonNullable<T> extends never ? [S] : [S, T];\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationMutationFn_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationMutationFn_exports);
17
+ //# sourceMappingURL=ServiceOperationMutationFn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/service-operation/ServiceOperationMutationFn.ts"],"sourcesContent":["interface QueryFnBaseUrlOptions {\n /**\n * Base URL to use for the request\n * @example 'https://api.example.com'\n */\n baseUrl: string;\n}\n\ninterface ServiceOperationMutationFnOptionsBase<TBody, TParams> {\n parameters: TParams;\n body: TBody;\n}\n\ninterface ServiceOperationMutationFnOptions<TBody, TParams>\n extends ServiceOperationMutationFnOptionsBase<TBody, TParams> {\n baseUrl?: never;\n}\n\ninterface ServiceOperationMutationFnOptionsWithBaseUrl<TBody, TParams>\n extends ServiceOperationMutationFnOptionsBase<TBody, TParams>,\n QueryFnBaseUrlOptions {}\n\nexport interface ServiceOperationMutationFn<\n TSchema extends { url: string; method: string },\n TBody,\n TData,\n TParams,\n> {\n /**\n * @deprecated Use `<service>.<operation>(...)` instead.\n */\n mutationFn(\n client: (\n schema: TSchema,\n options: {\n parameters: TParams;\n body: TBody;\n }\n ) => TData,\n options: {\n parameters: TParams;\n body: TBody;\n }\n ): TData;\n\n /**\n * @deprecated Use `<service>.<operation>(...)` instead.\n */\n mutationFn(\n client: (\n schema: TSchema,\n options: {\n parameters: TParams;\n body: TBody;\n }\n ) => Promise<TData>,\n options: {\n parameters: TParams;\n body: TBody;\n }\n ): Promise<TData>;\n\n <TOptions extends ServiceOperationMutationFnOptions<TBody, TParams>>(\n options: TOptions,\n client: (schema: TSchema, options: TOptions) => TData\n ): TData;\n\n <\n TOptions extends ServiceOperationMutationFnOptionsWithBaseUrl<\n TBody,\n TParams\n >,\n >(\n options: TOptions,\n client: (schema: TSchema, options: TOptions) => TData\n ): TData;\n\n <TOptions extends ServiceOperationMutationFnOptions<TBody, TParams>>(\n options: TOptions,\n client: (schema: TSchema, options: TOptions) => Promise<TData>\n ): Promise<TData>;\n\n <\n TOptions extends ServiceOperationMutationFnOptionsWithBaseUrl<\n TBody,\n TParams\n >,\n >(\n options: TOptions,\n client: (schema: TSchema, options: TOptions) => Promise<TData>\n ): Promise<TData>;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ServiceOperationQueryFn_exports = {};
16
+ module.exports = __toCommonJS(ServiceOperationQueryFn_exports);
17
+ //# sourceMappingURL=ServiceOperationQueryFn.js.map