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

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 (188) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/types/QraftContext.d.ts +20 -0
  3. package/dist/types/QraftContext.d.ts.map +1 -0
  4. package/dist/types/ServiceOperation.d.ts +44 -0
  5. package/dist/types/ServiceOperation.d.ts.map +1 -0
  6. package/dist/types/Unstable_QraftSecureRequestFn.d.ts +81 -0
  7. package/dist/types/Unstable_QraftSecureRequestFn.d.ts.map +1 -0
  8. package/dist/types/callbacks/cancelQueries.d.ts +5 -0
  9. package/dist/types/callbacks/cancelQueries.d.ts.map +1 -0
  10. package/dist/types/callbacks/fetchInfiniteQuery.d.ts +7 -0
  11. package/dist/types/callbacks/fetchInfiniteQuery.d.ts.map +1 -0
  12. package/dist/types/callbacks/fetchQuery.d.ts +7 -0
  13. package/dist/types/callbacks/fetchQuery.d.ts.map +1 -0
  14. package/dist/types/callbacks/getInfiniteQueryData.d.ts +6 -0
  15. package/dist/types/callbacks/getInfiniteQueryData.d.ts.map +1 -0
  16. package/dist/types/callbacks/getInfiniteQueryKey.d.ts +5 -0
  17. package/dist/types/callbacks/getInfiniteQueryKey.d.ts.map +1 -0
  18. package/dist/types/callbacks/getInfiniteQueryState.d.ts +5 -0
  19. package/dist/types/callbacks/getInfiniteQueryState.d.ts.map +1 -0
  20. package/dist/types/callbacks/getMutationKey.d.ts +5 -0
  21. package/dist/types/callbacks/getMutationKey.d.ts.map +1 -0
  22. package/dist/types/callbacks/getQueriesData.d.ts +5 -0
  23. package/dist/types/callbacks/getQueriesData.d.ts.map +1 -0
  24. package/dist/types/callbacks/getQueryData.d.ts +5 -0
  25. package/dist/types/callbacks/getQueryData.d.ts.map +1 -0
  26. package/dist/types/callbacks/getQueryKey.d.ts +5 -0
  27. package/dist/types/callbacks/getQueryKey.d.ts.map +1 -0
  28. package/dist/types/callbacks/getQueryState.d.ts +5 -0
  29. package/dist/types/callbacks/getQueryState.d.ts.map +1 -0
  30. package/dist/types/callbacks/index.d.ts +36 -0
  31. package/dist/types/callbacks/index.d.ts.map +1 -0
  32. package/dist/types/callbacks/invalidateQueries.d.ts +5 -0
  33. package/dist/types/callbacks/invalidateQueries.d.ts.map +1 -0
  34. package/dist/types/callbacks/isFetching.d.ts +5 -0
  35. package/dist/types/callbacks/isFetching.d.ts.map +1 -0
  36. package/dist/types/callbacks/isMutating.d.ts +5 -0
  37. package/dist/types/callbacks/isMutating.d.ts.map +1 -0
  38. package/dist/types/callbacks/mutationFn.d.ts +4 -0
  39. package/dist/types/callbacks/mutationFn.d.ts.map +1 -0
  40. package/dist/types/callbacks/operationInvokeFn.d.ts +9 -0
  41. package/dist/types/callbacks/operationInvokeFn.d.ts.map +1 -0
  42. package/dist/types/callbacks/prefetchInfiniteQuery.d.ts +7 -0
  43. package/dist/types/callbacks/prefetchInfiniteQuery.d.ts.map +1 -0
  44. package/dist/types/callbacks/prefetchQuery.d.ts +7 -0
  45. package/dist/types/callbacks/prefetchQuery.d.ts.map +1 -0
  46. package/dist/types/callbacks/queryFn.d.ts +7 -0
  47. package/dist/types/callbacks/queryFn.d.ts.map +1 -0
  48. package/dist/types/callbacks/refetchQueries.d.ts +5 -0
  49. package/dist/types/callbacks/refetchQueries.d.ts.map +1 -0
  50. package/dist/types/callbacks/removeQueries.d.ts +5 -0
  51. package/dist/types/callbacks/removeQueries.d.ts.map +1 -0
  52. package/dist/types/callbacks/resetQueries.d.ts +5 -0
  53. package/dist/types/callbacks/resetQueries.d.ts.map +1 -0
  54. package/dist/types/callbacks/setInfiniteQueryData.d.ts +6 -0
  55. package/dist/types/callbacks/setInfiniteQueryData.d.ts.map +1 -0
  56. package/dist/types/callbacks/setQueriesData.d.ts +5 -0
  57. package/dist/types/callbacks/setQueriesData.d.ts.map +1 -0
  58. package/dist/types/callbacks/setQueryData.d.ts +5 -0
  59. package/dist/types/callbacks/setQueryData.d.ts.map +1 -0
  60. package/dist/types/callbacks/useInfiniteQuery.d.ts +7 -0
  61. package/dist/types/callbacks/useInfiniteQuery.d.ts.map +1 -0
  62. package/dist/types/callbacks/useIsFetching.d.ts +5 -0
  63. package/dist/types/callbacks/useIsFetching.d.ts.map +1 -0
  64. package/dist/types/callbacks/useIsMutating.d.ts +7 -0
  65. package/dist/types/callbacks/useIsMutating.d.ts.map +1 -0
  66. package/dist/types/callbacks/useMutation.d.ts +7 -0
  67. package/dist/types/callbacks/useMutation.d.ts.map +1 -0
  68. package/dist/types/callbacks/useMutationState.d.ts +7 -0
  69. package/dist/types/callbacks/useMutationState.d.ts.map +1 -0
  70. package/dist/types/callbacks/useQueries.d.ts +6 -0
  71. package/dist/types/callbacks/useQueries.d.ts.map +1 -0
  72. package/dist/types/callbacks/useQuery.d.ts +7 -0
  73. package/dist/types/callbacks/useQuery.d.ts.map +1 -0
  74. package/dist/types/callbacks/useSuspenseInfiniteQuery.d.ts +7 -0
  75. package/dist/types/callbacks/useSuspenseInfiniteQuery.d.ts.map +1 -0
  76. package/dist/types/callbacks/useSuspenseQueries.d.ts +6 -0
  77. package/dist/types/callbacks/useSuspenseQueries.d.ts.map +1 -0
  78. package/dist/types/callbacks/useSuspenseQuery.d.ts +7 -0
  79. package/dist/types/callbacks/useSuspenseQuery.d.ts.map +1 -0
  80. package/dist/types/index.d.ts +7 -0
  81. package/dist/types/index.d.ts.map +1 -0
  82. package/dist/types/lib/PartialParameters.type.d.ts +13 -0
  83. package/dist/types/lib/PartialParameters.type.d.ts.map +1 -0
  84. package/dist/types/lib/callQueryClientFetchMethod.d.ts +20 -0
  85. package/dist/types/lib/callQueryClientFetchMethod.d.ts.map +1 -0
  86. package/dist/types/lib/callQueryClientMethodWithMutationFilters.d.ts +11 -0
  87. package/dist/types/lib/callQueryClientMethodWithMutationFilters.d.ts.map +1 -0
  88. package/dist/types/lib/callQueryClientMethodWithQueryFilters.d.ts +11 -0
  89. package/dist/types/lib/callQueryClientMethodWithQueryFilters.d.ts.map +1 -0
  90. package/dist/types/lib/callQueryClientMethodWithQueryKey.d.ts +11 -0
  91. package/dist/types/lib/callQueryClientMethodWithQueryKey.d.ts.map +1 -0
  92. package/dist/types/lib/composeBaseQueryKey.d.ts +6 -0
  93. package/dist/types/lib/composeBaseQueryKey.d.ts.map +1 -0
  94. package/dist/types/lib/composeInfiniteQueryKey.d.ts +4 -0
  95. package/dist/types/lib/composeInfiniteQueryKey.d.ts.map +1 -0
  96. package/dist/types/lib/composeMutationFilters.d.ts +11 -0
  97. package/dist/types/lib/composeMutationFilters.d.ts.map +1 -0
  98. package/dist/types/lib/composeMutationKey.d.ts +10 -0
  99. package/dist/types/lib/composeMutationKey.d.ts.map +1 -0
  100. package/dist/types/lib/composeQueryFilters.d.ts +14 -0
  101. package/dist/types/lib/composeQueryFilters.d.ts.map +1 -0
  102. package/dist/types/lib/composeQueryKey.d.ts +4 -0
  103. package/dist/types/lib/composeQueryKey.d.ts.map +1 -0
  104. package/dist/types/lib/createRecursiveProxy.d.ts +15 -0
  105. package/dist/types/lib/createRecursiveProxy.d.ts.map +1 -0
  106. package/dist/types/lib/jwt-decode/index.d.ts +29 -0
  107. package/dist/types/lib/jwt-decode/index.d.ts.map +1 -0
  108. package/dist/types/lib/jwt-decode/index.test.d.ts +2 -0
  109. package/dist/types/lib/jwt-decode/index.test.d.ts.map +1 -0
  110. package/dist/types/lib/requestFn.d.ts +100 -0
  111. package/dist/types/lib/requestFn.d.ts.map +1 -0
  112. package/dist/types/lib/shelfMerge.d.ts +7 -0
  113. package/dist/types/lib/shelfMerge.d.ts.map +1 -0
  114. package/dist/types/lib/useComposeUseQueryOptions.d.ts +16 -0
  115. package/dist/types/lib/useComposeUseQueryOptions.d.ts.map +1 -0
  116. package/dist/types/lib/useQueryClient.d.ts +9 -0
  117. package/dist/types/lib/useQueryClient.d.ts.map +1 -0
  118. package/dist/types/qraftAPIClient.d.ts +24 -0
  119. package/dist/types/qraftAPIClient.d.ts.map +1 -0
  120. package/dist/types/service-operation/OperationInfiniteData.d.ts +4 -0
  121. package/dist/types/service-operation/OperationInfiniteData.d.ts.map +1 -0
  122. package/dist/types/service-operation/QueryFilters.d.ts +123 -0
  123. package/dist/types/service-operation/QueryFilters.d.ts.map +1 -0
  124. package/dist/types/service-operation/ServiceOperation.d.ts +53 -0
  125. package/dist/types/service-operation/ServiceOperation.d.ts.map +1 -0
  126. package/dist/types/service-operation/ServiceOperationCancelQueries.d.ts +20 -0
  127. package/dist/types/service-operation/ServiceOperationCancelQueries.d.ts.map +1 -0
  128. package/dist/types/service-operation/ServiceOperationFetchInfiniteQuery.d.ts +58 -0
  129. package/dist/types/service-operation/ServiceOperationFetchInfiniteQuery.d.ts.map +1 -0
  130. package/dist/types/service-operation/ServiceOperationFetchQuery.d.ts +49 -0
  131. package/dist/types/service-operation/ServiceOperationFetchQuery.d.ts.map +1 -0
  132. package/dist/types/service-operation/ServiceOperationGetInfiniteQueryData.d.ts +10 -0
  133. package/dist/types/service-operation/ServiceOperationGetInfiniteQueryData.d.ts.map +1 -0
  134. package/dist/types/service-operation/ServiceOperationGetQueriesData.d.ts +18 -0
  135. package/dist/types/service-operation/ServiceOperationGetQueriesData.d.ts.map +1 -0
  136. package/dist/types/service-operation/ServiceOperationGetQueryData.d.ts +9 -0
  137. package/dist/types/service-operation/ServiceOperationGetQueryData.d.ts.map +1 -0
  138. package/dist/types/service-operation/ServiceOperationGetQueryState.d.ts +11 -0
  139. package/dist/types/service-operation/ServiceOperationGetQueryState.d.ts.map +1 -0
  140. package/dist/types/service-operation/ServiceOperationInvalidateQueries.d.ts +26 -0
  141. package/dist/types/service-operation/ServiceOperationInvalidateQueries.d.ts.map +1 -0
  142. package/dist/types/service-operation/ServiceOperationIsFetchingQueries.d.ts +19 -0
  143. package/dist/types/service-operation/ServiceOperationIsFetchingQueries.d.ts.map +1 -0
  144. package/dist/types/service-operation/ServiceOperationIsMutatingQueries.d.ts +19 -0
  145. package/dist/types/service-operation/ServiceOperationIsMutatingQueries.d.ts.map +1 -0
  146. package/dist/types/service-operation/ServiceOperationKey.d.ts +16 -0
  147. package/dist/types/service-operation/ServiceOperationKey.d.ts.map +1 -0
  148. package/dist/types/service-operation/ServiceOperationMutationFn.d.ts +47 -0
  149. package/dist/types/service-operation/ServiceOperationMutationFn.d.ts.map +1 -0
  150. package/dist/types/service-operation/ServiceOperationQueryFn.d.ts +79 -0
  151. package/dist/types/service-operation/ServiceOperationQueryFn.d.ts.map +1 -0
  152. package/dist/types/service-operation/ServiceOperationRefetchQueries.d.ts +30 -0
  153. package/dist/types/service-operation/ServiceOperationRefetchQueries.d.ts.map +1 -0
  154. package/dist/types/service-operation/ServiceOperationRemoveQueries.d.ts +19 -0
  155. package/dist/types/service-operation/ServiceOperationRemoveQueries.d.ts.map +1 -0
  156. package/dist/types/service-operation/ServiceOperationResetQueries.d.ts +20 -0
  157. package/dist/types/service-operation/ServiceOperationResetQueries.d.ts.map +1 -0
  158. package/dist/types/service-operation/ServiceOperationSetInfiniteQueryData.d.ts +10 -0
  159. package/dist/types/service-operation/ServiceOperationSetInfiniteQueryData.d.ts.map +1 -0
  160. package/dist/types/service-operation/ServiceOperationSetQueriesData.d.ts +20 -0
  161. package/dist/types/service-operation/ServiceOperationSetQueriesData.d.ts.map +1 -0
  162. package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts +19 -0
  163. package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts.map +1 -0
  164. package/dist/types/service-operation/ServiceOperationUseInfiniteQuery.d.ts +14 -0
  165. package/dist/types/service-operation/ServiceOperationUseInfiniteQuery.d.ts.map +1 -0
  166. package/dist/types/service-operation/ServiceOperationUseIsFetchingQueries.d.ts +9 -0
  167. package/dist/types/service-operation/ServiceOperationUseIsFetchingQueries.d.ts.map +1 -0
  168. package/dist/types/service-operation/ServiceOperationUseIsMutating.d.ts +9 -0
  169. package/dist/types/service-operation/ServiceOperationUseIsMutating.d.ts.map +1 -0
  170. package/dist/types/service-operation/ServiceOperationUseMutation.d.ts +17 -0
  171. package/dist/types/service-operation/ServiceOperationUseMutation.d.ts.map +1 -0
  172. package/dist/types/service-operation/ServiceOperationUseMutationState.d.ts +46 -0
  173. package/dist/types/service-operation/ServiceOperationUseMutationState.d.ts.map +1 -0
  174. package/dist/types/service-operation/ServiceOperationUseQueries.d.ts +20 -0
  175. package/dist/types/service-operation/ServiceOperationUseQueries.d.ts.map +1 -0
  176. package/dist/types/service-operation/ServiceOperationUseQuery.d.ts +12 -0
  177. package/dist/types/service-operation/ServiceOperationUseQuery.d.ts.map +1 -0
  178. package/dist/types/service-operation/ServiceOperationUseSuspenseInfiniteQuery.d.ts +12 -0
  179. package/dist/types/service-operation/ServiceOperationUseSuspenseInfiniteQuery.d.ts.map +1 -0
  180. package/dist/types/service-operation/ServiceOperationUseSuspenseQueries.d.ts +18 -0
  181. package/dist/types/service-operation/ServiceOperationUseSuspenseQueries.d.ts.map +1 -0
  182. package/dist/types/service-operation/ServiceOperationUseSuspenseQueryQuery.d.ts +10 -0
  183. package/dist/types/service-operation/ServiceOperationUseSuspenseQueryQuery.d.ts.map +1 -0
  184. package/dist/types/service-operation/index.d.ts +2 -0
  185. package/dist/types/service-operation/index.d.ts.map +1 -0
  186. package/package.json +7 -7
  187. package/dist/cjs/index.d.cts +0 -1035
  188. package/dist/esm/index.d.ts +0 -1035
@@ -0,0 +1,7 @@
1
+ import type { DefaultError } from '@tanstack/query-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import type { OperationSchema } from '../lib/requestFn.js';
4
+ import type { QraftClientOptions } from '../qraftAPIClient.js';
5
+ import { ServiceOperationMutation } from '../service-operation/ServiceOperation.js';
6
+ export declare const useMutationState: <TData = unknown, TError = DefaultError, TVariables = unknown, TContext = unknown>(qraftOptions: QraftClientOptions | undefined, schema: OperationSchema, args: Parameters<ServiceOperationMutation<OperationSchema, object | undefined, TVariables, TData>['useMutationState']>) => UseMutationResult<TData, TError, TVariables, TContext>;
7
+ //# sourceMappingURL=useMutationState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMutationState.d.ts","sourceRoot":"","sources":["../../../src/callbacks/useMutationState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,iBAAiB,EAElB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,eAAO,MAAM,gBAAgB,EAAE,CAC7B,KAAK,GAAG,OAAO,EACf,MAAM,GAAG,YAAY,EACrB,UAAU,GAAG,OAAO,EACpB,QAAQ,GAAG,OAAO,EAElB,YAAY,EAAE,kBAAkB,GAAG,SAAS,EAC5C,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,UAAU,CACd,wBAAwB,CACtB,eAAe,EACf,MAAM,GAAG,SAAS,EAClB,UAAU,EACV,KAAK,CACN,CAAC,kBAAkB,CAAC,CACtB,KACE,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAczD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { QueriesResults } from '@tanstack/react-query';
2
+ import type { OperationSchema } from '../lib/requestFn.js';
3
+ import type { QraftClientOptions } from '../qraftAPIClient.js';
4
+ import { ServiceOperationQuery } from '../service-operation/ServiceOperation.js';
5
+ export declare const useQueries: (qraftOptions: QraftClientOptions | undefined, schema: OperationSchema, args: Parameters<ServiceOperationQuery<OperationSchema, unknown, unknown>['useQueries']>) => QueriesResults<never>;
6
+ //# sourceMappingURL=useQueries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQueries.d.ts","sourceRoot":"","sources":["../../../src/callbacks/useQueries.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,EAEf,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,eAAO,MAAM,UAAU,EAAE,CACvB,YAAY,EAAE,kBAAkB,GAAG,SAAS,EAC5C,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,UAAU,CACd,qBAAqB,CAAC,eAAe,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,CACvE,KACE,cAAc,CAAC,KAAK,CA2CxB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { DefaultError } from '@tanstack/query-core';
2
+ import { type UseQueryResult } from '@tanstack/react-query';
3
+ import type { OperationSchema } from '../lib/requestFn.js';
4
+ import type { QraftClientOptions } from '../qraftAPIClient.js';
5
+ import type { ServiceOperationQuery } from '../service-operation/ServiceOperation.js';
6
+ export declare const useQuery: <TData = unknown, TError = DefaultError>(qraftOptions: QraftClientOptions | undefined, schema: OperationSchema, args: Parameters<ServiceOperationQuery<OperationSchema, unknown, unknown>['useQuery']>) => UseQueryResult<TData, TError>;
7
+ //# sourceMappingURL=useQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQuery.d.ts","sourceRoot":"","sources":["../../../src/callbacks/useQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEtF,eAAO,MAAM,QAAQ,EAAE,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,YAAY,EAC5D,YAAY,EAAE,kBAAkB,GAAG,SAAS,EAC5C,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,UAAU,CACd,qBAAqB,CAAC,eAAe,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,CACrE,KACE,cAAc,CAAC,KAAK,EAAE,MAAM,CAKhC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { DefaultError, InfiniteData } from '@tanstack/query-core';
2
+ import { type UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
3
+ import type { OperationSchema } from '../lib/requestFn.js';
4
+ import type { QraftClientOptions } from '../qraftAPIClient.js';
5
+ import type { ServiceOperationQuery } from '../service-operation/ServiceOperation.js';
6
+ export declare const useSuspenseInfiniteQuery: <TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>>(qraftOptions: QraftClientOptions | undefined, schema: OperationSchema, args: Parameters<ServiceOperationQuery<OperationSchema, unknown, unknown>['useSuspenseInfiniteQuery']>) => UseSuspenseInfiniteQueryResult<TData, TError>;
7
+ //# sourceMappingURL=useSuspenseInfiniteQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSuspenseInfiniteQuery.d.ts","sourceRoot":"","sources":["../../../src/callbacks/useSuspenseInfiniteQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEtF,eAAO,MAAM,wBAAwB,EAAE,CACrC,YAAY,EACZ,MAAM,GAAG,YAAY,EACrB,KAAK,GAAG,YAAY,CAAC,YAAY,CAAC,EAElC,YAAY,EAAE,kBAAkB,GAAG,SAAS,EAC5C,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,UAAU,CACd,qBAAqB,CACnB,eAAe,EACf,OAAO,EACP,OAAO,CACR,CAAC,0BAA0B,CAAC,CAC9B,KACE,8BAA8B,CAAC,KAAK,EAAE,MAAM,CAShD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { SuspenseQueriesResults } from '@tanstack/react-query';
2
+ import type { OperationSchema } from '../lib/requestFn.js';
3
+ import type { QraftClientOptions } from '../qraftAPIClient.js';
4
+ import { ServiceOperationQuery } from '../service-operation/ServiceOperation.js';
5
+ export declare const useSuspenseQueries: (qraftOptions: QraftClientOptions | undefined, schema: OperationSchema, args: Parameters<ServiceOperationQuery<OperationSchema, unknown, unknown>['useSuspenseQueries']>) => SuspenseQueriesResults<never>;
6
+ //# sourceMappingURL=useSuspenseQueries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSuspenseQueries.d.ts","sourceRoot":"","sources":["../../../src/callbacks/useSuspenseQueries.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EAEvB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,eAAO,MAAM,kBAAkB,EAAE,CAC/B,YAAY,EAAE,kBAAkB,GAAG,SAAS,EAC5C,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,UAAU,CACd,qBAAqB,CACnB,eAAe,EACf,OAAO,EACP,OAAO,CACR,CAAC,oBAAoB,CAAC,CACxB,KACE,sBAAsB,CAAC,KAAK,CA2ChC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { DefaultError } from '@tanstack/query-core';
2
+ import { type UseQueryResult } from '@tanstack/react-query';
3
+ import type { OperationSchema } from '../lib/requestFn.js';
4
+ import type { QraftClientOptions } from '../qraftAPIClient.js';
5
+ import type { ServiceOperationQuery } from '../service-operation/ServiceOperation.js';
6
+ export declare const useSuspenseQuery: <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData>(qraftOptions: QraftClientOptions | undefined, schema: OperationSchema, args: Parameters<ServiceOperationQuery<OperationSchema, unknown, unknown>['useSuspenseQuery']>) => UseQueryResult<TData, TError>;
7
+ //# sourceMappingURL=useSuspenseQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSuspenseQuery.d.ts","sourceRoot":"","sources":["../../../src/callbacks/useSuspenseQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEtF,eAAO,MAAM,gBAAgB,EAAE,CAC7B,YAAY,GAAG,OAAO,EACtB,MAAM,GAAG,YAAY,EACrB,KAAK,GAAG,YAAY,EAEpB,YAAY,EAAE,kBAAkB,GAAG,SAAS,EAC5C,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,UAAU,CACd,qBAAqB,CAAC,eAAe,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAC7E,KACE,cAAc,CAAC,KAAK,EAAE,MAAM,CAKhC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { qraftAPIClient, type QraftClientOptions } from './qraftAPIClient.js';
2
+ export { QraftContext, type QraftContextValue } from './QraftContext.js';
3
+ export { requestFn, baseRequestFn, urlSerializer, bodySerializer, mergeHeaders, type RequestFn, type RequestFnPayload, type OperationSchema, type RequestFnOptions, type HeadersOptions, } from './lib/requestFn.js';
4
+ export type * from './service-operation/index.js';
5
+ export * from './callbacks/index.js';
6
+ export { QraftSecureRequestFn as Unstable_QraftSecureRequestFn, type QraftSecureRequestFnProps, useSecuritySchemeAuth, createSecureRequestFn, type SecuritySchemeHandlers, type SecuritySchemeCookie, type SecuritySchemeBasic, type SecuritySchemeBearer, type SecuritySchemeAPIKey, } from './Unstable_QraftSecureRequestFn.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,SAAS,EACT,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAC5B,mBAAmB,8BAA8B,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,oBAAoB,IAAI,6BAA6B,EACrD,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Shallow partial 'parameters'.
3
+ * @example
4
+ * ```ts
5
+ * {query?: {page: number, nested: {still: 'not_partial'}}}
6
+ * // =>
7
+ * {query?: {page?: number, nested?: {still: 'not_partial'}}}
8
+ * ```
9
+ */
10
+ export type PartialParameters<T> = T extends object ? {
11
+ [K in keyof T]?: T[K] extends object ? Partial<T[K]> : T[K];
12
+ } : T;
13
+ //# sourceMappingURL=PartialParameters.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PartialParameters.type.d.ts","sourceRoot":"","sources":["../../../src/lib/PartialParameters.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAC/C;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAC/D,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { QueryClient } from '@tanstack/query-core';
2
+ import type { OperationSchema, RequestFn } from './requestFn.js';
3
+ /**
4
+ * Calls a query client fetch method with parameters and options,
5
+ * and automatically composes the `QueryKey` based on the schema and parameters.
6
+ */
7
+ export declare function callQueryClientMethodWithQueryKey<QFMethod extends QueryKeyMethods>(queryFilterMethod: QFMethod, schema: OperationSchema, infinite: boolean, args: QueryClientMethodArgs<QFMethod>): ReturnType<(typeof QueryClient.prototype)[QFMethod]>;
8
+ type QueryClientMethodArgs<QMethod extends keyof QueryClientPrototype> = [
9
+ options: Parameters<QueryClientPrototype[QMethod]>[0] & {
10
+ parameters?: unknown;
11
+ baseUrl?: string;
12
+ requestFn?: RequestFn<unknown>;
13
+ },
14
+ queryClient: QueryClient
15
+ ];
16
+ type QueryKeyMethods = QueryKeyMethod<'fetchQuery'> | QueryKeyMethod<'prefetchQuery'> | QueryKeyMethod<'fetchInfiniteQuery'> | QueryKeyMethod<'prefetchInfiniteQuery'>;
17
+ type QueryClientPrototype = typeof QueryClient.prototype;
18
+ type QueryKeyMethod<QFMethod extends keyof typeof QueryClient.prototype> = QFMethod;
19
+ export {};
20
+ //# sourceMappingURL=callQueryClientFetchMethod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callQueryClientFetchMethod.d.ts","sourceRoot":"","sources":["../../../src/lib/callQueryClientFetchMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGjE;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,SAAS,eAAe,EAEhC,iBAAiB,EAAE,QAAQ,EAC3B,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,OAAO,EACjB,IAAI,EAAE,qBAAqB,CAAC,QAAQ,CAAC,GACpC,UAAU,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAmDtD;AAED,KAAK,qBAAqB,CAAC,OAAO,SAAS,MAAM,oBAAoB,IAAI;IACvE,OAAO,EAAE,UAAU,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACtD,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;KAChC;IACD,WAAW,EAAE,WAAW;CACzB,CAAC;AAEF,KAAK,eAAe,GAChB,cAAc,CAAC,YAAY,CAAC,GAC5B,cAAc,CAAC,eAAe,CAAC,GAC/B,cAAc,CAAC,oBAAoB,CAAC,GACpC,cAAc,CAAC,uBAAuB,CAAC,CAAC;AAE5C,KAAK,oBAAoB,GAAG,OAAO,WAAW,CAAC,SAAS,CAAC;AAEzD,KAAK,cAAc,CAAC,QAAQ,SAAS,MAAM,OAAO,WAAW,CAAC,SAAS,IACrE,QAAQ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { QueryClient } from '@tanstack/query-core';
2
+ import type { OperationSchema } from './requestFn.js';
3
+ /**
4
+ * Calls a query client method with mutation filters and options,
5
+ * and automatically composes the `MutationKey` based on the schema and parameters.
6
+ */
7
+ export declare function callQueryClientMethodWithMutationFilters<QFMethod extends QueryFilterMethods>(queryFilterMethod: QFMethod, schema: OperationSchema, args: [...Parameters<(typeof QueryClient.prototype)[QFMethod]>, QueryClient]): ReturnType<(typeof QueryClient.prototype)[QFMethod]>;
8
+ type QueryFiltersMethod<QFMethod extends keyof typeof QueryClient.prototype> = QFMethod;
9
+ type QueryFilterMethods = QueryFiltersMethod<'isMutating'>;
10
+ export {};
11
+ //# sourceMappingURL=callQueryClientMethodWithMutationFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callQueryClientMethodWithMutationFilters.d.ts","sourceRoot":"","sources":["../../../src/lib/callQueryClientMethodWithMutationFilters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,wCAAwC,CACtD,QAAQ,SAAS,kBAAkB,EAEnC,iBAAiB,EAAE,QAAQ,EAC3B,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,GAC3E,UAAU,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAgBtD;AAED,KAAK,kBAAkB,CAAC,QAAQ,SAAS,MAAM,OAAO,WAAW,CAAC,SAAS,IACzE,QAAQ,CAAC;AAEX,KAAK,kBAAkB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { QueryClient } from '@tanstack/query-core';
2
+ import type { OperationSchema } from './requestFn.js';
3
+ /**
4
+ * Calls a query client method with query filters and options,
5
+ * and automatically composes the `QueryKey` based on the schema and parameters.
6
+ */
7
+ export declare function callQueryClientMethodWithQueryFilters<QFMethod extends QueryFilterMethods>(queryFilterMethod: QFMethod, schema: OperationSchema, args: [...Parameters<(typeof QueryClient.prototype)[QFMethod]>, QueryClient]): ReturnType<(typeof QueryClient.prototype)[QFMethod]>;
8
+ type QueryFiltersMethod<QFMethod extends keyof typeof QueryClient.prototype> = QFMethod;
9
+ type QueryFilterMethods = QueryFiltersMethod<'isFetching'> | QueryFiltersMethod<'getQueriesData'> | QueryFiltersMethod<'setQueriesData'> | QueryFiltersMethod<'removeQueries'> | QueryFiltersMethod<'resetQueries'> | QueryFiltersMethod<'cancelQueries'> | QueryFiltersMethod<'invalidateQueries'> | QueryFiltersMethod<'refetchQueries'>;
10
+ export {};
11
+ //# sourceMappingURL=callQueryClientMethodWithQueryFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callQueryClientMethodWithQueryFilters.d.ts","sourceRoot":"","sources":["../../../src/lib/callQueryClientMethodWithQueryFilters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,QAAQ,SAAS,kBAAkB,EAEnC,iBAAiB,EAAE,QAAQ,EAC3B,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,GAC3E,UAAU,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAgBtD;AAED,KAAK,kBAAkB,CAAC,QAAQ,SAAS,MAAM,OAAO,WAAW,CAAC,SAAS,IACzE,QAAQ,CAAC;AAEX,KAAK,kBAAkB,GACnB,kBAAkB,CAAC,YAAY,CAAC,GAChC,kBAAkB,CAAC,gBAAgB,CAAC,GACpC,kBAAkB,CAAC,gBAAgB,CAAC,GACpC,kBAAkB,CAAC,eAAe,CAAC,GACnC,kBAAkB,CAAC,cAAc,CAAC,GAClC,kBAAkB,CAAC,eAAe,CAAC,GACnC,kBAAkB,CAAC,mBAAmB,CAAC,GACvC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { QueryClient } from '@tanstack/query-core';
2
+ import type { OperationSchema } from './requestFn.js';
3
+ /**
4
+ * Calls a query client method with parameters and options,
5
+ * and automatically composes the `QueryKey` based on the schema and parameters.
6
+ */
7
+ export declare function callQueryClientMethodWithQueryKey<QFMethod extends QueryKeyMethods>(queryFilterMethod: QFMethod, schema: OperationSchema, infinite: boolean, args: [...Parameters<(typeof QueryClient.prototype)[QFMethod]>, QueryClient]): ReturnType<(typeof QueryClient.prototype)[QFMethod]>;
8
+ type QueryKeyMethod<QFMethod extends keyof typeof QueryClient.prototype> = QFMethod;
9
+ type QueryKeyMethods = QueryKeyMethod<'setQueryData'> | QueryKeyMethod<'getQueryData'> | QueryKeyMethod<'getQueryState'> | QueryKeyMethod<'setQueryDefaults'> | QueryKeyMethod<'getQueryDefaults'>;
10
+ export {};
11
+ //# sourceMappingURL=callQueryClientMethodWithQueryKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callQueryClientMethodWithQueryKey.d.ts","sourceRoot":"","sources":["../../../src/lib/callQueryClientMethodWithQueryKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,SAAS,eAAe,EAEhC,iBAAiB,EAAE,QAAQ,EAC3B,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,OAAO,EACjB,IAAI,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,GAC3E,UAAU,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAkBtD;AAED,KAAK,cAAc,CAAC,QAAQ,SAAS,MAAM,OAAO,WAAW,CAAC,SAAS,IACrE,QAAQ,CAAC;AAEX,KAAK,eAAe,GAChB,cAAc,CAAC,cAAc,CAAC,GAC9B,cAAc,CAAC,cAAc,CAAC,GAC9B,cAAc,CAAC,eAAe,CAAC,GAC/B,cAAc,CAAC,kBAAkB,CAAC,GAClC,cAAc,CAAC,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ServiceOperationInfiniteQueryKey, ServiceOperationQueryKey } from '../service-operation/ServiceOperationKey.js';
2
+ import type { OperationSchema } from './requestFn.js';
3
+ export declare function composeBaseQueryKey<TSchema extends OperationSchema, TParams>(schema: TSchema, parameters: TParams | undefined, infinite: undefined): [TSchema, TParams];
4
+ export declare function composeBaseQueryKey<TSchema extends OperationSchema, TParams>(schema: TSchema, parameters: TParams | undefined, infinite: true): ServiceOperationInfiniteQueryKey<TSchema, TParams>;
5
+ export declare function composeBaseQueryKey<TSchema extends OperationSchema, TParams>(schema: TSchema, parameters: TParams | undefined, infinite: false): ServiceOperationQueryKey<TSchema, TParams>;
6
+ //# sourceMappingURL=composeBaseQueryKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeBaseQueryKey.d.ts","sourceRoot":"","sources":["../../../src/lib/composeBaseQueryKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,wBAAwB,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,wBAAgB,mBAAmB,CAAC,OAAO,SAAS,eAAe,EAAE,OAAO,EAC1E,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,OAAO,GAAG,SAAS,EAC/B,QAAQ,EAAE,SAAS,GAClB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACtB,wBAAgB,mBAAmB,CAAC,OAAO,SAAS,eAAe,EAAE,OAAO,EAC1E,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,OAAO,GAAG,SAAS,EAC/B,QAAQ,EAAE,IAAI,GACb,gCAAgC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACtD,wBAAgB,mBAAmB,CAAC,OAAO,SAAS,eAAe,EAAE,OAAO,EAC1E,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,OAAO,GAAG,SAAS,EAC/B,QAAQ,EAAE,KAAK,GACd,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ServiceOperationInfiniteQueryKey } from '../service-operation/ServiceOperationKey.js';
2
+ import type { OperationSchema } from './requestFn.js';
3
+ export declare function composeInfiniteQueryKey<TSchema extends OperationSchema, TParams>(schema: TSchema, parameters: TParams | undefined): ServiceOperationInfiniteQueryKey<TSchema, TParams>;
4
+ //# sourceMappingURL=composeInfiniteQueryKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeInfiniteQueryKey.d.ts","sourceRoot":"","sources":["../../../src/lib/composeInfiniteQueryKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,6CAA6C,CAAC;AAEpG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,wBAAgB,uBAAuB,CACrC,OAAO,SAAS,eAAe,EAC/B,OAAO,EAEP,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,OAAO,GAAG,SAAS,GAC9B,gCAAgC,CAAC,OAAO,EAAE,OAAO,CAAC,CAEpD"}
@@ -0,0 +1,11 @@
1
+ import type { OperationSchema } from './requestFn.js';
2
+ /**
3
+ * Replaces the `parameters` field in the filters with a `mutationKey` field based on the schema.
4
+ * If no filters are provided, a `mutationKey` will be composed schema's base query key.
5
+ * @param schema
6
+ * @param filters
7
+ */
8
+ export declare function composeMutationFilters<Filters extends object>(schema: OperationSchema, filters: Filters | undefined): (Filters & Record<"mutationKey", unknown>) | Omit<Filters & Record<"parameters", unknown>, "parameters"> | {
9
+ mutationKey: [OperationSchema];
10
+ };
11
+ //# sourceMappingURL=composeMutationFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeMutationFilters.d.ts","sourceRoot":"","sources":["../../../src/lib/composeMutationFilters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,SAAS,MAAM,EAC3D,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,OAAO,GAAG,SAAS;;EAgC7B"}
@@ -0,0 +1,10 @@
1
+ import type { ServiceOperationMutationKey } from '../service-operation/ServiceOperationKey.js';
2
+ import type { OperationSchema } from './requestFn.js';
3
+ /**
4
+ * Omit `body` or `requestBody` from mutation parameters if exists
5
+ * and return the rest of the parameters
6
+ */
7
+ export declare function composeMutationKey<TSchema extends OperationSchema>(schema: TSchema, parameters: undefined): ServiceOperationMutationKey<TSchema, undefined>;
8
+ export declare function composeMutationKey<TSchema extends OperationSchema, TParams>(schema: TSchema, parameters: TParams): ServiceOperationMutationKey<TSchema, TParams>;
9
+ export declare function omitMutationPayload<T>(params: T): {};
10
+ //# sourceMappingURL=composeMutationKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeMutationKey.d.ts","sourceRoot":"","sources":["../../../src/lib/composeMutationKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,eAAe,EAChE,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,SAAS,GACpB,2BAA2B,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACnD,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,eAAe,EAAE,OAAO,EACzE,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,OAAO,GAClB,2BAA2B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAgBjD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,MAc/C"}
@@ -0,0 +1,14 @@
1
+ import type { OperationSchema } from './requestFn.js';
2
+ /**
3
+ * Replaces the `parameters` field in the filters with a `queryKey` field based on the schema.
4
+ * If no filters are provided, a `queryKey` will be composed schema's base query key.
5
+ * @param schema
6
+ * @param filters
7
+ */
8
+ export declare function composeQueryFilters<Filters extends {
9
+ infinite: boolean;
10
+ parameters?: object;
11
+ } & Record<string, unknown>>(schema: OperationSchema, filters: Filters | undefined): Omit<Filters, "parameters" | "infinite"> | {
12
+ queryKey: [OperationSchema, undefined];
13
+ };
14
+ //# sourceMappingURL=composeQueryFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeQueryFilters.d.ts","sourceRoot":"","sources":["../../../src/lib/composeQueryFilters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,SAAS;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3B,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS;;EAmCtD"}
@@ -0,0 +1,4 @@
1
+ import type { ServiceOperationQueryKey } from '../service-operation/ServiceOperationKey.js';
2
+ import type { OperationSchema } from './requestFn.js';
3
+ export declare function composeQueryKey<TSchema extends OperationSchema, TParams>(schema: TSchema, parameters: TParams | undefined): ServiceOperationQueryKey<TSchema, TParams>;
4
+ //# sourceMappingURL=composeQueryKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeQueryKey.d.ts","sourceRoot":"","sources":["../../../src/lib/composeQueryKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,wBAAgB,eAAe,CAAC,OAAO,SAAS,eAAe,EAAE,OAAO,EACtE,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,OAAO,GAAG,SAAS,GAC9B,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAE5C"}
@@ -0,0 +1,15 @@
1
+ type ProxyApplyCallback = (path: string[], args: unknown[]) => unknown;
2
+ /**
3
+ * @internal
4
+ * If returns `undefined | null`, the proxy will continue to create a new proxy for the next key.
5
+ */
6
+ type ProxyGetCallback = (path: string[], key: string) => unknown | undefined;
7
+ /**
8
+ * Creates a recursive proxy that calls the `getCallback` and `applyCallback` functions
9
+ * @param getCallback The callback to call when a proxy property is accessed
10
+ * @param applyCallback The callback to call when a proxy is called as a function
11
+ * @param path The current path of the proxy
12
+ */
13
+ export declare function createRecursiveProxy(getCallback: ProxyGetCallback, applyCallback: ProxyApplyCallback, path: string[]): unknown;
14
+ export {};
15
+ //# sourceMappingURL=createRecursiveProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRecursiveProxy.d.ts","sourceRoot":"","sources":["../../../src/lib/createRecursiveProxy.ts"],"names":[],"mappings":"AAAA,KAAK,kBAAkB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AACvE;;;GAGG;AACH,KAAK,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;AAG7E;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,gBAAgB,EAC7B,aAAa,EAAE,kBAAkB,EACjC,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAgCT"}
@@ -0,0 +1,29 @@
1
+ export interface JwtDecodeOptions {
2
+ header?: boolean;
3
+ }
4
+ export interface JwtHeader {
5
+ typ?: string;
6
+ alg?: string;
7
+ kid?: string;
8
+ }
9
+ export interface JwtPayload {
10
+ iss?: string;
11
+ sub?: string;
12
+ aud?: string[] | string;
13
+ exp?: number;
14
+ nbf?: number;
15
+ iat?: number;
16
+ jti?: string;
17
+ }
18
+ export declare class InvalidTokenError extends Error {
19
+ }
20
+ /**
21
+ * Decode a base64 string to a UTF-8 string.
22
+ * Could be used in Node.js or in the browser.
23
+ */
24
+ export declare function b64DecodeUnicode(data: string): string;
25
+ export declare function jwtDecode<T = JwtHeader>(token: string, options: JwtDecodeOptions & {
26
+ header: true;
27
+ }): T;
28
+ export declare function jwtDecode<T = JwtPayload>(token: string, options?: JwtDecodeOptions): T;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/jwt-decode/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAI/C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD;AAwBD,wBAAgB,SAAS,CAAC,CAAC,GAAG,SAAS,EACrC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,gBAAgB,GAAG;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GAC3C,CAAC,CAAC;AACL,wBAAgB,SAAS,CAAC,CAAC,GAAG,UAAU,EACtC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,gBAAgB,GACzB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../src/lib/jwt-decode/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * This function is used to make a request to a specified endpoint.
3
+ *
4
+ * @template T The expected return type of the request.
5
+ *
6
+ * @param schema The schema of the operation to be performed. It includes the OpenAPI path, HTTP method and media type.
7
+ * @param requestInfo The information required to make the request. It includes parameters, headers, body, etc.
8
+ * @param [options] Optional. Additional options for the request. It includes custom urlSerializer, bodySerializer, and fetch function.
9
+ *
10
+ * @returns {Promise<T>} Returns a promise that resolves with the response of the request.
11
+ *
12
+ * @throws {error: object|string, response: Response} Throws an error if the request fails. The error includes the error message and the response from the server.
13
+ */
14
+ export declare function requestFn<T>(schema: OperationSchema, requestInfo: RequestFnInfo, options?: RequestFnOptions): Promise<T>;
15
+ /**
16
+ * This function is used to make a request to a specified endpoint.
17
+ * It's needed to create a custom `requestFn` with a custom `urlSerializer`
18
+ * and `bodySerializer`, with the tree-shaking of the default `requestFn`
19
+ * and its serializers.
20
+ *
21
+ * @template T The expected return type of the request.
22
+ *
23
+ * @param requestSchema The schema of the operation to be performed. It includes the OpenAPI path, HTTP method and media type.
24
+ * @param requestInfo The information required to make the request. It includes parameters, headers, body, etc.
25
+ * @param options The options for the request. It includes urlSerializer, bodySerializer, and fetch function. The 'urlSerializer' and 'bodySerializer' are required.
26
+ *
27
+ * @returns {Promise<T>} Returns a promise that resolves with the response of the request.
28
+ *
29
+ * @throws {error: object|string, response: Response} Throws an error if the request fails. The error includes the error message and the response from the server.
30
+ */
31
+ export declare function baseRequestFn<T>(requestSchema: OperationSchema, requestInfo: RequestFnInfo, options: WithRequired<RequestFnOptions, 'urlSerializer' | 'bodySerializer'>): Promise<T>;
32
+ export declare function urlSerializer(schema: OperationSchema, info: RequestFnPayload): string;
33
+ export declare function mergeHeaders(...allHeaders: (HeadersOptions | undefined)[]): Headers;
34
+ export declare function bodySerializer(schema: OperationSchema, info: RequestFnPayload): string | Blob | FormData | undefined;
35
+ export type HeadersOptions = HeadersInit | Record<string, string | number | boolean | null | undefined>;
36
+ export interface OperationSchema {
37
+ /**
38
+ * Operation path
39
+ * @example /user/{id}
40
+ */
41
+ readonly url: string;
42
+ /**
43
+ * Operation method
44
+ */
45
+ readonly method: 'get' | 'put' | 'post' | 'patch' | 'delete' | 'options' | 'head' | 'trace';
46
+ /**
47
+ * Media type of the request body
48
+ * @example application/json
49
+ */
50
+ readonly mediaType?: string;
51
+ readonly security?: string[];
52
+ }
53
+ export interface RequestFnPayload {
54
+ /**
55
+ * Base URL to use for the request
56
+ * @example 'https://api.example.com'
57
+ */
58
+ baseUrl: string | undefined;
59
+ /**
60
+ * OpenAPI parameters
61
+ * @example
62
+ * ```ts
63
+ * { path: {id: 1}, query: {search: 'hello'} }
64
+ * ```
65
+ */
66
+ readonly parameters?: {
67
+ readonly path?: Record<string, any>;
68
+ readonly header?: Record<string, any>;
69
+ readonly query?: Record<string, any>;
70
+ };
71
+ /**
72
+ * Request body
73
+ * @example { name: 'John' }
74
+ */
75
+ readonly body?: BodyInit | Record<string, unknown> | null;
76
+ /**
77
+ * Tanstack Query Meta
78
+ */
79
+ meta?: Record<string, unknown>;
80
+ /** An AbortSignal to set request's signal. */
81
+ signal?: AbortSignal | null;
82
+ }
83
+ export interface RequestFnInfo extends RequestFnPayload, Omit<RequestInit, 'headers' | 'method' | 'body' | 'signal'> {
84
+ /**
85
+ * Request headers
86
+ * @example { 'X-Auth': '123' }
87
+ */
88
+ readonly headers?: HeadersOptions;
89
+ }
90
+ export interface RequestFnOptions {
91
+ urlSerializer?: typeof urlSerializer;
92
+ bodySerializer?: typeof bodySerializer;
93
+ fetch?: typeof fetch;
94
+ }
95
+ export type RequestFn<T> = typeof requestFn<T>;
96
+ type WithRequired<T, K extends keyof T> = T & {
97
+ [_ in K]: {};
98
+ };
99
+ export {};
100
+ //# sourceMappingURL=requestFn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestFn.d.ts","sourceRoot":"","sources":["../../../src/lib/requestFn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,aAAa,EAC1B,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,CAAC,CAAC,CAMZ;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACnC,aAAa,EAAE,eAAe,EAC9B,WAAW,EAAE,aAAa,EAC1B,OAAO,EAAE,YAAY,CAAC,gBAAgB,EAAE,eAAe,GAAG,gBAAgB,CAAC,GAC1E,OAAO,CAAC,CAAC,CAAC,CAoCZ;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,gBAAgB,GACrB,MAAM,CAqBR;AAoCD,wBAAgB,YAAY,CAAC,GAAG,UAAU,EAAE,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,WAuBzE;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,gBAAgB,wCAwBvB;AA+ED,MAAM,MAAM,cAAc,GACtB,WAAW,GACX,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,MAAM,EACX,KAAK,GACL,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,CAAC;IAEZ;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE;QACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACtC,CAAC;IAEF;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAE1D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,aACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC7D;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,OAAO,aAAa,CAAC;IACrC,cAAc,CAAC,EAAE,OAAO,cAAc,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;AAE/C,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG;KAC3C,CAAC,IAAI,CAAC,GAAG,EAAE;CACb,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Merges objects with provided depth
3
+ * @param depth
4
+ * @param args
5
+ */
6
+ export declare function shelfMerge<T>(depth?: number, ...args: T[]): T;
7
+ //# sourceMappingURL=shelfMerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shelfMerge.d.ts","sourceRoot":"","sources":["../../../src/lib/shelfMerge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,SAAI,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CA6BxD"}
@@ -0,0 +1,16 @@
1
+ import type { QueryClient } from '@tanstack/query-core';
2
+ import type { UseQueryOptions } from '@tanstack/react-query';
3
+ import type { QraftClientOptions } from '../qraftAPIClient.js';
4
+ import type { OperationSchema } from './requestFn.js';
5
+ /**
6
+ * Composes the options for useQuery, useInfiniteQuery, useSuspenseQuery, and useSuspenseQueries.
7
+ * @internal
8
+ */
9
+ export declare function useComposeUseQueryOptions(qraftOptions: QraftClientOptions | undefined, schema: OperationSchema, args: UseQueryOptionsArgs, infinite: boolean): never;
10
+ type UseQueryOptionsArgs = [
11
+ parameters: unknown,
12
+ options?: UseQueryOptions,
13
+ queryClient?: QueryClient
14
+ ];
15
+ export {};
16
+ //# sourceMappingURL=useComposeUseQueryOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComposeUseQueryOptions.d.ts","sourceRoot":"","sources":["../../../src/lib/useComposeUseQueryOptions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,kBAAkB,GAAG,SAAS,EAC5C,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,OAAO,GAChB,KAAK,CAgCP;AAED,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,OAAO;IACnB,OAAO,CAAC,EAAE,eAAe;IACzB,WAAW,CAAC,EAAE,WAAW;CAC1B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ import type { QraftClientOptions } from '../qraftAPIClient.js';
3
+ /**
4
+ * Get the QueryClient from the QraftContext or the provided QueryClient argument.
5
+ * @param qraftOptions if `queryClient` is not provided, will be taken from context
6
+ * @param queryClient If not provided, will be taken this instance
7
+ */
8
+ export declare function useQueryClient(qraftOptions: QraftClientOptions | undefined, queryClient: QueryClient | undefined): QueryClient;
9
+ //# sourceMappingURL=useQueryClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQueryClient.d.ts","sourceRoot":"","sources":["../../../src/lib/useQueryClient.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAEZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,kBAAkB,GAAG,SAAS,EAC5C,WAAW,EAAE,WAAW,GAAG,SAAS,eAOrC"}
@@ -0,0 +1,24 @@
1
+ import type { Context } from 'react';
2
+ import type { OperationSchema } from './lib/requestFn.js';
3
+ import type { QraftContextValue } from './QraftContext.js';
4
+ export interface QraftClientOptions {
5
+ context?: Context<QraftContextValue>;
6
+ }
7
+ export declare const qraftAPIClient: <Services extends ServicesBaseDeclaration<Services>, Callbacks extends ServicesCallbacks>(services: ServicesDeclaration<Services>, callbacks: Callbacks, options?: QraftClientOptions) => Services;
8
+ type ServicesBaseDeclaration<Services> = {
9
+ [service in keyof Services]: {
10
+ [method in keyof Services[service]]: {
11
+ schema: OperationSchema;
12
+ };
13
+ };
14
+ };
15
+ type ServicesDeclaration<Services extends ServicesBaseDeclaration<Services>> = {
16
+ [service in keyof Services]: {
17
+ [method in keyof Services[service]]: {
18
+ schema: Services[service][method]['schema'];
19
+ };
20
+ };
21
+ };
22
+ type ServicesCallbacks = Record<string, (...rest: any[]) => unknown>;
23
+ export {};
24
+ //# sourceMappingURL=qraftAPIClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qraftAPIClient.d.ts","sourceRoot":"","sources":["../../src/qraftAPIClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,cAAc,qKAMf,kBAAkB,aA8B7B,CAAC;AAuCF,KAAK,uBAAuB,CAAC,QAAQ,IAAI;KACtC,OAAO,IAAI,MAAM,QAAQ,GAAG;SAC1B,MAAM,IAAI,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG;YAAE,MAAM,EAAE,eAAe,CAAA;SAAE;KACjE;CACF,CAAC;AAEF,KAAK,mBAAmB,CAAC,QAAQ,SAAS,uBAAuB,CAAC,QAAQ,CAAC,IAAI;KAC5E,OAAO,IAAI,MAAM,QAAQ,GAAG;SAC1B,MAAM,IAAI,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG;YACnC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC7C;KACF;CACF,CAAC;AAEF,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { InfiniteData } from '@tanstack/query-core';
2
+ import type { PartialParameters } from '../lib/PartialParameters.type.js';
3
+ export type OperationInfiniteData<TData, TParams> = InfiniteData<TData, PartialParameters<TParams>>;
4
+ //# sourceMappingURL=OperationInfiniteData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationInfiniteData.d.ts","sourceRoot":"","sources":["../../../src/service-operation/OperationInfiniteData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,MAAM,MAAM,qBAAqB,CAAC,KAAK,EAAE,OAAO,IAAI,YAAY,CAC9D,KAAK,EACL,iBAAiB,CAAC,OAAO,CAAC,CAC3B,CAAC"}