@merkl/api 0.21.46 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (841) hide show
  1. package/dist/src/cache/index.d.ts +1 -1
  2. package/dist/src/constants.d.ts +8 -8
  3. package/dist/src/eden/index.d.ts +16937 -8167
  4. package/dist/src/eden/index.js +1 -1
  5. package/dist/src/engine/deprecated/dynamicData/implementations/Ajna.d.ts +1 -1
  6. package/dist/src/engine/deprecated/dynamicData/implementations/Badger.d.ts +1 -1
  7. package/dist/src/engine/deprecated/dynamicData/implementations/Clamm.d.ts +1 -1
  8. package/dist/src/engine/deprecated/dynamicData/implementations/Compound.d.ts +1 -1
  9. package/dist/src/engine/deprecated/dynamicData/implementations/CompoundV3.d.ts +1 -1
  10. package/dist/src/engine/deprecated/dynamicData/implementations/Dolomite.d.ts +1 -1
  11. package/dist/src/engine/deprecated/dynamicData/implementations/ERC721.d.ts +2 -2
  12. package/dist/src/engine/deprecated/dynamicData/implementations/ERCMultiToken.d.ts +2 -2
  13. package/dist/src/engine/deprecated/dynamicData/implementations/EigenLayer.d.ts +1 -1
  14. package/dist/src/engine/deprecated/dynamicData/implementations/Encompassing.d.ts +1 -1
  15. package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.d.ts +105 -3
  16. package/dist/src/engine/deprecated/dynamicData/implementations/Erc20Snapshot.d.ts +1 -1
  17. package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.d.ts +1 -1
  18. package/dist/src/engine/deprecated/dynamicData/implementations/Hyperdrive.d.ts +2 -2
  19. package/dist/src/engine/deprecated/dynamicData/implementations/Morpho.d.ts +1 -1
  20. package/dist/src/engine/deprecated/dynamicData/implementations/Radiant.d.ts +1 -1
  21. package/dist/src/engine/deprecated/dynamicData/implementations/Silo.d.ts +1 -1
  22. package/dist/src/engine/deprecated/dynamicData/implementations/UniswapV4.d.ts +1 -1
  23. package/dist/src/engine/deprecated/dynamicData/implementations/Vest.d.ts +1 -1
  24. package/dist/src/engine/deprecated/dynamicData/implementations/default.d.ts +2 -2
  25. package/dist/src/engine/deprecated/dynamicData/utils/fetchA51Strategies.d.ts +1 -1
  26. package/dist/src/engine/deprecated/dynamicData/utils/fetchClamInfo.d.ts +1 -1
  27. package/dist/src/engine/deprecated/dynamicData/utils/fetchLogs.d.ts +1 -1
  28. package/dist/src/engine/deprecated/dynamicData/utils/getCompV2ForksVaults.d.ts +1 -1
  29. package/dist/src/engine/deprecated/dynamicData/utils/getDolomiteMarkets.d.ts +1 -1
  30. package/dist/src/engine/deprecated/dynamicData/utils/getEulerV2Vaults.d.ts +1 -1
  31. package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.d.ts +1 -1
  32. package/dist/src/engine/deprecated/erc20SubTypeProcessors/GenericProcessor.d.ts +6 -6
  33. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/factoryFinder.d.ts +1 -1
  34. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/hardcoded.d.ts +2 -2
  35. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +1 -1
  36. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/treasuryFinder.d.ts +1 -1
  37. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AaveProcessor.d.ts +3 -3
  38. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AnglesLiquid.d.ts +3 -3
  39. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AssetProcessor.d.ts +3 -3
  40. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AuraProcessor.d.ts +4 -4
  41. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.d.ts +4 -4
  42. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.d.ts +4 -4
  43. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.d.ts +4 -4
  44. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.d.ts +3 -3
  45. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BeefyProcessor.d.ts +3 -3
  46. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BunniV2Processor.d.ts +4 -4
  47. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/CompoundProcessor.d.ts +3 -3
  48. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ERC4626Processor.d.ts +3 -3
  49. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EnzymeProcessor.d.ts +3 -3
  50. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.d.ts +3 -3
  51. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.d.ts +3 -3
  52. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerLendProcessor.d.ts +2 -2
  53. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FluidProcessor.d.ts +3 -3
  54. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FraxProcessor.d.ts +3 -3
  55. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaALMProcessor.d.ts +3 -3
  56. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaProcessor.d.ts +3 -3
  57. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GearboxProcessor.d.ts +3 -3
  58. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.d.ts +3 -3
  59. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HoldStationProcessor.d.ts +3 -3
  60. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HourglassProcessor.d.ts +3 -3
  61. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MaverickBPProcessor.d.ts +3 -3
  62. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MetamorphoProcessor.d.ts +3 -3
  63. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.d.ts +3 -3
  64. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleProcessor.d.ts +3 -3
  65. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleYTProcessor.d.ts +3 -3
  66. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RadiantProcessor.d.ts +3 -3
  67. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RfxProcessor.d.ts +3 -3
  68. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/Satlayer.d.ts +3 -3
  69. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraProcessor.d.ts +3 -3
  70. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraYTProcessor.d.ts +3 -3
  71. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpliceProcessor.d.ts +3 -3
  72. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/StabilityProcessor.d.ts +3 -3
  73. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SturdySiloProcessor.d.ts +3 -3
  74. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TempestVaultProcessor.d.ts +3 -3
  75. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TemplateProcessor.d.ts +3 -3
  76. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TorosProcessor.d.ts +3 -3
  77. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/UniswapProcessor.d.ts +3 -3
  78. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/VicunaProcessor.d.ts +3 -3
  79. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/WoofiProcessor.d.ts +3 -3
  80. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.d.ts +3 -3
  81. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveNPoolProcessor.d.ts +3 -3
  82. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveProcessor.d.ts +3 -3
  83. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.d.ts +1 -1
  84. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/stakedCurveProcessor.d.ts +3 -3
  85. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/xU308Processor.d.ts +3 -3
  86. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesPrices.d.ts +3 -3
  87. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound1.d.ts +1 -1
  88. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound2.d.ts +2 -2
  89. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound3.d.ts +2 -2
  90. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound4.d.ts +2 -2
  91. package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeStruct.d.ts +2 -2
  92. package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeToProtocolAndAction.d.ts +3 -3
  93. package/dist/src/engine/implementations/Ajna/metadata.d.ts +5 -5
  94. package/dist/src/engine/implementations/Ajna/tvl.d.ts +2 -2
  95. package/dist/src/engine/implementations/Ambient/metadata.d.ts +5 -5
  96. package/dist/src/engine/implementations/Ambient/tvl.d.ts +2 -2
  97. package/dist/src/engine/implementations/Badger/metadata.d.ts +4 -4
  98. package/dist/src/engine/implementations/Clamm/metadata.d.ts +22 -22
  99. package/dist/src/engine/implementations/Compound/metadata.d.ts +4 -4
  100. package/dist/src/engine/implementations/CompoundV3/metadata.d.ts +4 -4
  101. package/dist/src/engine/implementations/Default/metadata.d.ts +3 -3
  102. package/dist/src/engine/implementations/Dolomite/metadata.d.ts +5 -5
  103. package/dist/src/engine/implementations/EigenLayer/metadata.d.ts +5 -5
  104. package/dist/src/engine/implementations/EigenLayer/tvl.d.ts +2 -2
  105. package/dist/src/engine/implementations/Encompassing/metadata.d.ts +3 -3
  106. package/dist/src/engine/implementations/Erc20/metadata.d.ts +4 -4
  107. package/dist/src/engine/implementations/Erc20/subTypes/detect.d.ts +2 -2
  108. package/dist/src/engine/implementations/Erc20/subTypes/factories.d.ts +4 -4
  109. package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.d.ts +6 -6
  110. package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/tvl.d.ts +4 -4
  111. package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/metadata.d.ts +6 -6
  112. package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/tvl.d.ts +2 -2
  113. package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.d.ts +5 -5
  114. package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/tvl.d.ts +4 -4
  115. package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/metadata.d.ts +6 -6
  116. package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/tvl.d.ts +4 -4
  117. package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/metadata.d.ts +5 -5
  118. package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/tvl.d.ts +4 -4
  119. package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/metadata.d.ts +17 -0
  120. package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/tvl.d.ts +6 -0
  121. package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.d.ts +4 -4
  122. package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/tvl.d.ts +4 -4
  123. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.d.ts +5 -5
  124. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/tvl.d.ts +4 -4
  125. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/metadata.d.ts +18 -0
  126. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/tvl.d.ts +6 -0
  127. package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.d.ts +5 -5
  128. package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/tvl.d.ts +4 -4
  129. package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +3 -2
  130. package/dist/src/engine/implementations/Erc20/tvl.d.ts +4 -4
  131. package/dist/src/engine/implementations/Erc20Snapshot/metadata.d.ts +4 -4
  132. package/dist/src/engine/implementations/Erc721/metadata.d.ts +4 -4
  133. package/dist/src/engine/implementations/ErcMultiToken/metadata.d.ts +6 -6
  134. package/dist/src/engine/implementations/EventBased/metadata.d.ts +5 -5
  135. package/dist/src/engine/implementations/FraxLend/metadataBorrow.d.ts +24 -0
  136. package/dist/src/engine/implementations/FraxLend/metadataCollateral.d.ts +18 -0
  137. package/dist/src/engine/implementations/FraxLend/tvlBorrow.d.ts +7 -0
  138. package/dist/src/engine/implementations/FraxLend/tvlCollateral.d.ts +7 -0
  139. package/dist/src/engine/implementations/Hyperdrive/metadata.d.ts +5 -5
  140. package/dist/src/engine/implementations/Invalid/metadata.d.ts +2 -2
  141. package/dist/src/engine/implementations/Ion/metadata.d.ts +5 -5
  142. package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +7 -7
  143. package/dist/src/engine/implementations/Locker/metadata.d.ts +5 -5
  144. package/dist/src/engine/implementations/Locker/tvl.d.ts +2 -2
  145. package/dist/src/engine/implementations/Morpho/metadata.d.ts +7 -7
  146. package/dist/src/engine/implementations/MultiLog/metadata.d.ts +4 -4
  147. package/dist/src/engine/implementations/MultiLog/tvl.d.ts +3 -3
  148. package/dist/src/engine/implementations/Radiant/metadata.d.ts +4 -4
  149. package/dist/src/engine/implementations/Silo/metadata.d.ts +5 -5
  150. package/dist/src/engine/implementations/UniswapV4/metadata.d.ts +5 -5
  151. package/dist/src/engine/implementations/UniswapV4/tvl.d.ts +2 -2
  152. package/dist/src/engine/implementations/Vest/metadata.d.ts +4 -4
  153. package/dist/src/engine/implementations/morphoBorrow/metadata.d.ts +20 -0
  154. package/dist/src/engine/implementations/morphoBorrow/tvl.d.ts +7 -0
  155. package/dist/src/engine/implementations/morphoCollateral/metadata.d.ts +20 -0
  156. package/dist/src/engine/implementations/morphoCollateral/tvl.d.ts +7 -0
  157. package/dist/src/engine/implementations/morphoSupply/metadata.d.ts +20 -0
  158. package/dist/src/engine/implementations/morphoSupply/tvl.d.ts +7 -0
  159. package/dist/src/engine/metadata/factory.d.ts +1 -1
  160. package/dist/src/engine/tvl/factory.d.ts +2 -2
  161. package/dist/src/engine/tvl/logStates.d.ts +1 -1
  162. package/dist/src/hooks/checkQueryAddressValidity.d.ts +6 -2
  163. package/dist/src/hooks/checkQueryChainIdValidity.d.ts +6 -2
  164. package/dist/src/index.d.ts +5548 -2626
  165. package/dist/src/jobs/{dynamic-data.d.ts → update-v3-caches.d.ts} +4 -1
  166. package/dist/src/libs/computeFee.d.ts +1 -1
  167. package/dist/src/libs/deprecated-merklv3/index.d.ts +3 -3
  168. package/dist/src/libs/merklChainData.d.ts +1 -1
  169. package/dist/src/libs/parse/marketsWithCache.d.ts +1 -1
  170. package/dist/src/libs/positions/EigenLayer/index.d.ts +2 -2
  171. package/dist/src/libs/positions/ajna/index.d.ts +2 -2
  172. package/dist/src/libs/positions/badger/index.d.ts +2 -2
  173. package/dist/src/libs/positions/clamm/index.d.ts +1 -1
  174. package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.d.ts +1 -1
  175. package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.d.ts +1 -1
  176. package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.d.ts +1 -1
  177. package/dist/src/libs/positions/compound/index.d.ts +2 -2
  178. package/dist/src/libs/positions/dolomite/index.d.ts +2 -2
  179. package/dist/src/libs/positions/erc20/index.d.ts +2 -2
  180. package/dist/src/libs/positions/euler/index.d.ts +2 -2
  181. package/dist/src/libs/positions/index.d.ts +1 -1
  182. package/dist/src/libs/positions/morpho/index.d.ts +2 -2
  183. package/dist/src/libs/positions/prepareFetch.d.ts +1 -1
  184. package/dist/src/libs/positions/silo/index.d.ts +2 -2
  185. package/dist/src/libs/positions/types.d.ts +1 -1
  186. package/dist/src/libs/staticCampaigns.d.ts +1 -1
  187. package/dist/src/libs/tokens/balances.d.ts +1 -1
  188. package/dist/src/libs/tokens/tokenInfo.d.ts +1 -1
  189. package/dist/src/modules/v4/accounting/accounting.controller.d.ts +98 -33
  190. package/dist/src/modules/v4/accounting/accounting.repository.d.ts +41 -41
  191. package/dist/src/modules/v4/accounting/accounting.service.d.ts +7 -7
  192. package/dist/src/modules/v4/apr/apr.model.d.ts +8 -8
  193. package/dist/src/modules/v4/apr/apr.service.d.ts +1 -1
  194. package/dist/src/modules/v4/authentication/authentication.controller.d.ts +24 -2
  195. package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +64 -37
  196. package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +4 -4
  197. package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +5 -5
  198. package/dist/src/modules/v4/boost/boost.controller.d.ts +25 -3
  199. package/dist/src/modules/v4/cache/cache.repository.d.ts +1 -1
  200. package/dist/src/modules/v4/cache/cache.service.d.ts +1 -1
  201. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +665 -504
  202. package/dist/src/modules/v4/campaign/campaign.model.d.ts +30 -9
  203. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +191 -191
  204. package/dist/src/modules/v4/campaign/campaign.service.d.ts +415 -319
  205. package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +352 -282
  206. package/dist/src/modules/v4/chain/chain.controller.d.ts +91 -47
  207. package/dist/src/modules/v4/chain/chain.model.d.ts +11 -3
  208. package/dist/src/modules/v4/chain/chain.repository.d.ts +10 -10
  209. package/dist/src/modules/v4/chain/chain.service.d.ts +10 -10
  210. package/dist/src/modules/v4/chainInteraction/chainInteraction.service.d.ts +1 -1
  211. package/dist/src/modules/v4/claims/claims.controller.d.ts +15 -2
  212. package/dist/src/modules/v4/claims/claims.repository.d.ts +1 -1
  213. package/dist/src/modules/v4/claims/claims.service.d.ts +3 -3
  214. package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +47 -7
  215. package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +2 -2
  216. package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +2 -2
  217. package/dist/src/modules/v4/creator/creator.controller.d.ts +160 -88
  218. package/dist/src/modules/v4/creator/creator.model.d.ts +1 -1
  219. package/dist/src/modules/v4/creator/creator.repository.d.ts +20 -20
  220. package/dist/src/modules/v4/creator/creator.service.d.ts +47 -47
  221. package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +1 -1
  222. package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +1 -1
  223. package/dist/src/modules/v4/enso/enso.service.d.ts +17 -17
  224. package/dist/src/modules/v4/explorer/explorer.controller.d.ts +19 -6
  225. package/dist/src/modules/v4/explorer/explorer.model.d.ts +2 -2
  226. package/dist/src/modules/v4/explorer/explorer.repository.d.ts +5 -5
  227. package/dist/src/modules/v4/explorer/explorer.service.d.ts +7 -7
  228. package/dist/src/modules/v4/interaction/interaction.controller.d.ts +39 -8
  229. package/dist/src/modules/v4/interaction/interaction.model.d.ts +1 -1
  230. package/dist/src/modules/v4/interaction/interaction.service.d.ts +2 -2
  231. package/dist/src/modules/v4/kyberzap/kyberzap.service.d.ts +1 -1
  232. package/dist/src/modules/v4/liquidity/implementations/AjnaPositionFetcher.d.ts +2 -2
  233. package/dist/src/modules/v4/liquidity/implementations/BadgerPositionFetcher.d.ts +2 -2
  234. package/dist/src/modules/v4/liquidity/implementations/ClammPositionFetcher.d.ts +2 -2
  235. package/dist/src/modules/v4/liquidity/implementations/DolomitePositionFetcher.d.ts +2 -2
  236. package/dist/src/modules/v4/liquidity/implementations/ERC20PositionFetcher.d.ts +3 -3
  237. package/dist/src/modules/v4/liquidity/implementations/EulerPositionFetcher.d.ts +2 -2
  238. package/dist/src/modules/v4/liquidity/liquidity.controller.d.ts +24 -13
  239. package/dist/src/modules/v4/liquidity/liquidity.model.d.ts +2 -2
  240. package/dist/src/modules/v4/liquidity/liquidity.repository.d.ts +1 -1
  241. package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +42 -22
  242. package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +7 -7
  243. package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +18 -8
  244. package/dist/src/modules/v4/nodes/node.controller.d.ts +65 -0
  245. package/dist/src/modules/v4/nodes/node.model.d.ts +21 -0
  246. package/dist/src/modules/v4/nodes/node.repository.d.ts +21 -0
  247. package/dist/src/modules/v4/nodes/node.service.d.ts +21 -0
  248. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +743 -644
  249. package/dist/src/modules/v4/opportunity/opportunity.converter.d.ts +111 -5
  250. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +116 -81
  251. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +408 -408
  252. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +489 -459
  253. package/dist/src/modules/v4/parse/parse.controller.d.ts +64 -0
  254. package/dist/src/modules/v4/parse/parse.model.d.ts +10 -0
  255. package/dist/src/modules/v4/payload/payload.controller.d.ts +125 -0
  256. package/dist/src/modules/v4/payload/payload.model.d.ts +307 -0
  257. package/dist/src/modules/v4/payload/payload.service.d.ts +27 -0
  258. package/dist/src/modules/v4/price/price.controller.d.ts +93 -50
  259. package/dist/src/modules/v4/price/price.model.d.ts +16 -16
  260. package/dist/src/modules/v4/price/price.repository.d.ts +11 -11
  261. package/dist/src/modules/v4/price/price.service.d.ts +9 -9
  262. package/dist/src/modules/v4/prisma/index.d.ts +1 -1
  263. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +939 -146
  264. package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +12 -14
  265. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +451 -362
  266. package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +40 -19
  267. package/dist/src/modules/v4/protocol/protocol.controller.d.ts +117 -67
  268. package/dist/src/modules/v4/protocol/protocol.model.d.ts +2 -2
  269. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +29 -29
  270. package/dist/src/modules/v4/protocol/protocol.service.d.ts +9 -6
  271. package/dist/src/modules/v4/referral/referral.controller.d.ts +29 -7
  272. package/dist/src/modules/v4/referral/referral.service.d.ts +8 -8
  273. package/dist/src/modules/v4/reward/reward.controller.d.ts +261 -93
  274. package/dist/src/modules/v4/reward/reward.converter.d.ts +1 -1
  275. package/dist/src/modules/v4/reward/reward.model.d.ts +3 -3
  276. package/dist/src/modules/v4/reward/reward.repository.d.ts +55 -54
  277. package/dist/src/modules/v4/reward/reward.service.d.ts +260 -260
  278. package/dist/src/modules/v4/router.d.ts +4706 -2394
  279. package/dist/src/modules/v4/status/status.controller.d.ts +127 -64
  280. package/dist/src/modules/v4/status/status.model.d.ts +10 -10
  281. package/dist/src/modules/v4/status/status.repository.d.ts +35 -35
  282. package/dist/src/modules/v4/status/status.service.d.ts +23 -23
  283. package/dist/src/modules/v4/token/token.controller.d.ts +224 -130
  284. package/dist/src/modules/v4/token/token.model.d.ts +1 -1
  285. package/dist/src/modules/v4/token/token.repository.d.ts +41 -37
  286. package/dist/src/modules/v4/token/token.service.d.ts +106 -101
  287. package/dist/src/modules/v4/turtle/turtle.controller.d.ts +15 -2
  288. package/dist/src/modules/v4/tvl/tvl.model.d.ts +5 -5
  289. package/dist/src/modules/v4/tvl/tvl.service.d.ts +1 -1
  290. package/dist/src/modules/v4/uniswap/uniswap.controller.d.ts +248 -11
  291. package/dist/src/modules/v4/uniswap/uniswap.model.d.ts +3 -3
  292. package/dist/src/modules/v4/uniswap/uniswap.repository.d.ts +4 -4
  293. package/dist/src/modules/v4/uniswap/uniswap.service.d.ts +3 -3
  294. package/dist/src/modules/v4/user/user.controller.d.ts +175 -164
  295. package/dist/src/modules/v4/user/user.model.d.ts +10 -1
  296. package/dist/src/modules/v4/user/user.repository.d.ts +7 -7
  297. package/dist/src/modules/v4/user/user.service.d.ts +7 -7
  298. package/dist/src/plugins/error-handling.plugin.d.ts +7 -3
  299. package/dist/src/routes/v1/allowances.d.ts +18 -5
  300. package/dist/src/routes/v1/balances.d.ts +16 -3
  301. package/dist/src/routes/v1/prices.d.ts +15 -2
  302. package/dist/src/routes/v1/router.d.ts +44 -4
  303. package/dist/src/routes/v1/tokens.d.ts +15 -2
  304. package/dist/src/routes/v2/merkl.d.ts +41 -4
  305. package/dist/src/routes/v2/router.d.ts +41 -4
  306. package/dist/src/routes/v3/app.d.ts +15 -2
  307. package/dist/src/routes/v3/blacklist.d.ts +15 -2
  308. package/dist/src/routes/v3/campaign/delay.d.ts +27 -16
  309. package/dist/src/routes/v3/campaignClaims.d.ts +15 -2
  310. package/dist/src/routes/v3/campaignUnclaimed.d.ts +15 -2
  311. package/dist/src/routes/v3/campaigns.d.ts +17 -4
  312. package/dist/src/routes/v3/campaignsForMainParameter.d.ts +15 -2
  313. package/dist/src/routes/v3/campaignsRewardsReport.d.ts +15 -2
  314. package/dist/src/routes/v3/claims.d.ts +15 -2
  315. package/dist/src/routes/v3/compoundV2.d.ts +15 -2
  316. package/dist/src/routes/v3/createCampaign.d.ts +16 -3
  317. package/dist/src/routes/v3/dolomite.d.ts +15 -2
  318. package/dist/src/routes/v3/euler.d.ts +43 -14
  319. package/dist/src/routes/v3/fetch.d.ts +15 -2
  320. package/dist/src/routes/v3/health.d.ts +15 -2
  321. package/dist/src/routes/v3/lostyield.d.ts +15 -2
  322. package/dist/src/routes/v3/merkl.d.ts +34 -6
  323. package/dist/src/routes/v3/morphoMarkets.d.ts +15 -2
  324. package/dist/src/routes/v3/morphoVaults.d.ts +15 -2
  325. package/dist/src/routes/v3/multiChainPositions.d.ts +15 -2
  326. package/dist/src/routes/v3/opportunity.d.ts +72 -6
  327. package/dist/src/routes/v3/overview.d.ts +15 -2
  328. package/dist/src/routes/v3/parse.d.ts +15 -2
  329. package/dist/src/routes/v3/payload.d.ts +19 -6
  330. package/dist/src/routes/v3/poolInfo.d.ts +18 -5
  331. package/dist/src/routes/v3/positions.d.ts +15 -2
  332. package/dist/src/routes/v3/radiant.d.ts +15 -2
  333. package/dist/src/routes/v3/recipients.d.ts +15 -2
  334. package/dist/src/routes/v3/rewards.d.ts +18 -5
  335. package/dist/src/routes/v3/rewardsReport.d.ts +16 -3
  336. package/dist/src/routes/v3/router.d.ts +608 -55
  337. package/dist/src/routes/v3/silo.d.ts +15 -2
  338. package/dist/src/routes/v3/token.d.ts +16 -3
  339. package/dist/src/routes/v3/twt/participants.d.ts +24 -13
  340. package/dist/src/routes/v3/uniswapv4.d.ts +192 -19
  341. package/dist/src/routes/v3/updates.d.ts +15 -2
  342. package/dist/src/routes/v3/userRewards.d.ts +18 -5
  343. package/dist/src/utils/decodeCalls.d.ts +1 -1
  344. package/dist/src/utils/encodeCalls.d.ts +2 -2
  345. package/dist/src/utils/error.d.ts +8 -4
  346. package/dist/src/utils/generateCardName.d.ts +2 -2
  347. package/dist/src/utils/generic.d.ts +2 -2
  348. package/dist/src/utils/lastBlockBefore.d.ts +1 -1
  349. package/dist/src/utils/logger.d.ts +0 -8
  350. package/dist/src/utils/pricer.d.ts +1 -1
  351. package/dist/src/utils/prices/chainlinkRead.d.ts +1 -1
  352. package/dist/src/utils/prices/curveVirtualPrice.d.ts +1 -1
  353. package/dist/src/utils/prices/getDQUICK.d.ts +1 -1
  354. package/dist/src/utils/prices/priceFetcherFactory.d.ts +1 -1
  355. package/dist/src/utils/prices/services/OnChainCallService.d.ts +1 -1
  356. package/dist/src/utils/prices/services/coinGeckoService.d.ts +1 -1
  357. package/dist/src/utils/prices/services/defillamaService.d.ts +1 -1
  358. package/dist/src/utils/prices/services/dexScreenerService.d.ts +1 -1
  359. package/dist/src/utils/prices/services/erc4626Service.d.ts +1 -1
  360. package/dist/src/utils/prices/services/getERC4626.d.ts +1 -1
  361. package/dist/src/utils/prices/services/indexCoopService.d.ts +1 -1
  362. package/dist/src/utils/prices/services/priceFetcher.d.ts +1 -1
  363. package/dist/src/utils/prices/uniV2Price.d.ts +1 -1
  364. package/dist/src/utils/providers.d.ts +113 -2
  365. package/dist/src/utils/queries/allCampaigns.d.ts +1 -2
  366. package/dist/src/utils/sanitizeChain.d.ts +2 -2
  367. package/dist/src/utils/stryke.d.ts +1 -1
  368. package/dist/src/utils/throw.d.ts +1 -1
  369. package/dist/tsconfig.tsbuildinfo +1 -0
  370. package/package.json +28 -48
  371. package/dist/database/api/.generated/default.d.ts +0 -1
  372. package/dist/database/api/.generated/default.js +0 -1
  373. package/dist/database/api/.generated/drizzle/schema.d.ts +0 -3342
  374. package/dist/database/api/.generated/drizzle/schema.js +0 -928
  375. package/dist/database/api/.generated/drizzle/schema.ts +0 -989
  376. package/dist/database/api/.generated/edge.d.ts +0 -1
  377. package/dist/database/api/.generated/edge.js +0 -725
  378. package/dist/database/api/.generated/index-browser.js +0 -696
  379. package/dist/database/api/.generated/index.d.ts +0 -48645
  380. package/dist/database/api/.generated/index.js +0 -758
  381. package/dist/database/api/.generated/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
  382. package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
  383. package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-3.0.x.so.node +0 -0
  384. package/dist/database/api/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
  385. package/dist/database/api/.generated/package.json +0 -97
  386. package/dist/database/api/.generated/runtime/edge-esm.js +0 -31
  387. package/dist/database/api/.generated/runtime/edge.js +0 -31
  388. package/dist/database/api/.generated/runtime/index-browser.d.ts +0 -365
  389. package/dist/database/api/.generated/runtime/index-browser.js +0 -13
  390. package/dist/database/api/.generated/runtime/library.d.ts +0 -3447
  391. package/dist/database/api/.generated/runtime/library.js +0 -143
  392. package/dist/database/api/.generated/runtime/react-native.js +0 -80
  393. package/dist/database/api/.generated/runtime/wasm.js +0 -32
  394. package/dist/database/api/.generated/schema.prisma +0 -482
  395. package/dist/database/api/.generated/wasm.d.ts +0 -1
  396. package/dist/database/api/.generated/wasm.js +0 -696
  397. package/dist/database/engine/.generated/default.d.ts +0 -1
  398. package/dist/database/engine/.generated/default.js +0 -1
  399. package/dist/database/engine/.generated/edge.d.ts +0 -1
  400. package/dist/database/engine/.generated/edge.js +0 -485
  401. package/dist/database/engine/.generated/index-browser.js +0 -456
  402. package/dist/database/engine/.generated/index.d.ts +0 -22107
  403. package/dist/database/engine/.generated/index.js +0 -518
  404. package/dist/database/engine/.generated/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
  405. package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
  406. package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-3.0.x.so.node +0 -0
  407. package/dist/database/engine/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
  408. package/dist/database/engine/.generated/package.json +0 -97
  409. package/dist/database/engine/.generated/runtime/edge-esm.js +0 -31
  410. package/dist/database/engine/.generated/runtime/edge.js +0 -31
  411. package/dist/database/engine/.generated/runtime/index-browser.d.ts +0 -365
  412. package/dist/database/engine/.generated/runtime/index-browser.js +0 -13
  413. package/dist/database/engine/.generated/runtime/library.d.ts +0 -3447
  414. package/dist/database/engine/.generated/runtime/library.js +0 -143
  415. package/dist/database/engine/.generated/runtime/react-native.js +0 -80
  416. package/dist/database/engine/.generated/runtime/wasm.js +0 -32
  417. package/dist/database/engine/.generated/schema.prisma +0 -248
  418. package/dist/database/engine/.generated/wasm.d.ts +0 -1
  419. package/dist/database/engine/.generated/wasm.js +0 -456
  420. package/dist/database/index.d.ts +0 -29
  421. package/dist/database/index.js +0 -17
  422. package/dist/src/cache/declaration.js +0 -121
  423. package/dist/src/cache/index.js +0 -161
  424. package/dist/src/cache/redis.js +0 -57
  425. package/dist/src/constants.js +0 -93
  426. package/dist/src/engine/deprecated/dynamicData/implementations/Ajna.js +0 -107
  427. package/dist/src/engine/deprecated/dynamicData/implementations/Badger.js +0 -90
  428. package/dist/src/engine/deprecated/dynamicData/implementations/Clamm.js +0 -975
  429. package/dist/src/engine/deprecated/dynamicData/implementations/Compound.js +0 -139
  430. package/dist/src/engine/deprecated/dynamicData/implementations/CompoundV3.js +0 -101
  431. package/dist/src/engine/deprecated/dynamicData/implementations/Dolomite.js +0 -59
  432. package/dist/src/engine/deprecated/dynamicData/implementations/ERC721.js +0 -87
  433. package/dist/src/engine/deprecated/dynamicData/implementations/ERCMultiToken.js +0 -161
  434. package/dist/src/engine/deprecated/dynamicData/implementations/EigenLayer.js +0 -67
  435. package/dist/src/engine/deprecated/dynamicData/implementations/Encompassing.js +0 -26
  436. package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.js +0 -162
  437. package/dist/src/engine/deprecated/dynamicData/implementations/Erc20Snapshot.js +0 -32
  438. package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.js +0 -129
  439. package/dist/src/engine/deprecated/dynamicData/implementations/Hyperdrive.js +0 -112
  440. package/dist/src/engine/deprecated/dynamicData/implementations/Morpho.js +0 -132
  441. package/dist/src/engine/deprecated/dynamicData/implementations/Radiant.js +0 -123
  442. package/dist/src/engine/deprecated/dynamicData/implementations/Silo.js +0 -112
  443. package/dist/src/engine/deprecated/dynamicData/implementations/UniswapV4.js +0 -255
  444. package/dist/src/engine/deprecated/dynamicData/implementations/Vest.js +0 -61
  445. package/dist/src/engine/deprecated/dynamicData/implementations/default.js +0 -5
  446. package/dist/src/engine/deprecated/dynamicData/utils/fetchA51Strategies.js +0 -44
  447. package/dist/src/engine/deprecated/dynamicData/utils/fetchClamInfo.js +0 -27
  448. package/dist/src/engine/deprecated/dynamicData/utils/fetchLogs.js +0 -149
  449. package/dist/src/engine/deprecated/dynamicData/utils/getCompV2ForksVaults.js +0 -141
  450. package/dist/src/engine/deprecated/dynamicData/utils/getContractCreationBlock.js +0 -44
  451. package/dist/src/engine/deprecated/dynamicData/utils/getDolomiteMarkets.js +0 -53
  452. package/dist/src/engine/deprecated/dynamicData/utils/getEulerV2Vaults.js +0 -266
  453. package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.js +0 -27
  454. package/dist/src/engine/deprecated/erc20SubTypeProcessors/GenericProcessor.js +0 -335
  455. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/eulerVaultNames.js +0 -13
  456. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/factoryFinder.js +0 -47
  457. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/getBlacklistedSupply.js +0 -22
  458. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/getCrossCurveTokenPrice.js +0 -13
  459. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/hardcoded.js +0 -30
  460. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/metamorphoTvl.d.ts +0 -1
  461. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/metamorphoTvl.js +0 -35
  462. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/ownerFinder.js +0 -16
  463. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/spliceTVL.js +0 -23
  464. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/treasuryFinder.js +0 -10
  465. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AaveProcessor.js +0 -26
  466. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AnglesLiquid.js +0 -51
  467. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AssetProcessor.js +0 -48
  468. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AuraProcessor.js +0 -113
  469. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.js +0 -111
  470. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.js +0 -86
  471. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.js +0 -101
  472. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.js +0 -81
  473. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BeefyProcessor.js +0 -54
  474. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BunniV2Processor.js +0 -91
  475. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/CompoundProcessor.js +0 -37
  476. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ERC4626Processor.js +0 -37
  477. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EnzymeProcessor.js +0 -52
  478. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.js +0 -54
  479. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.js +0 -51
  480. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerLendProcessor.js +0 -58
  481. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FluidProcessor.js +0 -37
  482. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FraxProcessor.js +0 -42
  483. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaALMProcessor.js +0 -52
  484. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaProcessor.js +0 -67
  485. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GearboxProcessor.js +0 -58
  486. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.js +0 -63
  487. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HoldStationProcessor.js +0 -35
  488. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HourglassProcessor.js +0 -35
  489. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MaverickBPProcessor.js +0 -78
  490. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MetamorphoProcessor.js +0 -48
  491. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.js +0 -82
  492. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleProcessor.js +0 -30
  493. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleYTProcessor.js +0 -30
  494. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RadiantProcessor.js +0 -59
  495. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RfxProcessor.js +0 -71
  496. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/Satlayer.js +0 -28
  497. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraProcessor.js +0 -42
  498. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraYTProcessor.js +0 -40
  499. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpliceProcessor.js +0 -37
  500. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/StabilityProcessor.js +0 -30
  501. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SturdySiloProcessor.js +0 -38
  502. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TempestVaultProcessor.js +0 -83
  503. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TemplateProcessor.js +0 -40
  504. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TorosProcessor.js +0 -34
  505. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/UniswapProcessor.js +0 -72
  506. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/VicunaProcessor.js +0 -36
  507. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/WoofiProcessor.js +0 -41
  508. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.js +0 -60
  509. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveNPoolProcessor.js +0 -102
  510. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveProcessor.js +0 -85
  511. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.js +0 -159
  512. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/stakedCurveProcessor.js +0 -88
  513. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/xU308Processor.js +0 -42
  514. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesPrices.js +0 -28
  515. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound1.js +0 -353
  516. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound2.js +0 -22
  517. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound3.js +0 -22
  518. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound4.js +0 -22
  519. package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeStruct.js +0 -1
  520. package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeToProtocolAndAction.js +0 -155
  521. package/dist/src/engine/implementations/Ajna/metadata.js +0 -59
  522. package/dist/src/engine/implementations/Ajna/tvl.js +0 -91
  523. package/dist/src/engine/implementations/Ambient/metadata.js +0 -36
  524. package/dist/src/engine/implementations/Ambient/tvl.js +0 -178
  525. package/dist/src/engine/implementations/Badger/metadata.js +0 -31
  526. package/dist/src/engine/implementations/Clamm/metadata.js +0 -176
  527. package/dist/src/engine/implementations/Compound/metadata.js +0 -23
  528. package/dist/src/engine/implementations/CompoundV3/metadata.js +0 -23
  529. package/dist/src/engine/implementations/Default/metadata.js +0 -12
  530. package/dist/src/engine/implementations/Dolomite/metadata.js +0 -20
  531. package/dist/src/engine/implementations/EigenLayer/metadata.js +0 -12
  532. package/dist/src/engine/implementations/EigenLayer/tvl.js +0 -60
  533. package/dist/src/engine/implementations/Encompassing/metadata.js +0 -43
  534. package/dist/src/engine/implementations/Erc20/metadata.js +0 -64
  535. package/dist/src/engine/implementations/Erc20/subTypes/detect.js +0 -170
  536. package/dist/src/engine/implementations/Erc20/subTypes/factories.js +0 -69
  537. package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.js +0 -46
  538. package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/tvl.js +0 -51
  539. package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/metadata.js +0 -35
  540. package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/tvl.js +0 -59
  541. package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.js +0 -21
  542. package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/tvl.js +0 -46
  543. package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/metadata.js +0 -40
  544. package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/tvl.js +0 -57
  545. package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/metadata.js +0 -20
  546. package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/tvl.js +0 -52
  547. package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.js +0 -38
  548. package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/tvl.js +0 -83
  549. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.js +0 -24
  550. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/tvl.js +0 -69
  551. package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.js +0 -65
  552. package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/tvl.js +0 -94
  553. package/dist/src/engine/implementations/Erc20/subTypes/index.js +0 -119
  554. package/dist/src/engine/implementations/Erc20/tvl.js +0 -99
  555. package/dist/src/engine/implementations/Erc20Snapshot/metadata.js +0 -11
  556. package/dist/src/engine/implementations/Erc721/metadata.js +0 -13
  557. package/dist/src/engine/implementations/ErcMultiToken/metadata.js +0 -63
  558. package/dist/src/engine/implementations/EventBased/metadata.js +0 -181
  559. package/dist/src/engine/implementations/Hyperdrive/metadata.js +0 -29
  560. package/dist/src/engine/implementations/Invalid/metadata.js +0 -10
  561. package/dist/src/engine/implementations/Ion/metadata.js +0 -16
  562. package/dist/src/engine/implementations/JsonAirdrop/metadata.js +0 -43
  563. package/dist/src/engine/implementations/Locker/metadata.js +0 -36
  564. package/dist/src/engine/implementations/Locker/tvl.js +0 -26
  565. package/dist/src/engine/implementations/Morpho/metadata.js +0 -63
  566. package/dist/src/engine/implementations/MultiLog/metadata.js +0 -36
  567. package/dist/src/engine/implementations/MultiLog/tvl.js +0 -59
  568. package/dist/src/engine/implementations/Radiant/metadata.js +0 -33
  569. package/dist/src/engine/implementations/Silo/metadata.js +0 -20
  570. package/dist/src/engine/implementations/UniswapV4/metadata.js +0 -36
  571. package/dist/src/engine/implementations/UniswapV4/tvl.js +0 -158
  572. package/dist/src/engine/implementations/Vest/metadata.js +0 -13
  573. package/dist/src/engine/metadata/factory.js +0 -76
  574. package/dist/src/engine/tvl/factory.js +0 -87
  575. package/dist/src/engine/tvl/logStates.js +0 -106
  576. package/dist/src/errors/BadRequest.error.js +0 -7
  577. package/dist/src/errors/Conflict.error.js +0 -7
  578. package/dist/src/errors/HttpError.js +0 -17
  579. package/dist/src/errors/InvalidParameter.error.js +0 -7
  580. package/dist/src/errors/NotFound.error.js +0 -12
  581. package/dist/src/errors/Opportunity.error.js +0 -11
  582. package/dist/src/errors/UnableToFindPrice.error.js +0 -7
  583. package/dist/src/errors/Unauthorized.error.js +0 -7
  584. package/dist/src/errors/VoidString.error.js +0 -7
  585. package/dist/src/errors/index.js +0 -6
  586. package/dist/src/guards/BackOffice.guard.js +0 -10
  587. package/dist/src/guards/Engine.guard.js +0 -9
  588. package/dist/src/guards/TokenAuth.guard.js +0 -10
  589. package/dist/src/guards/VerifyJwt.guard.js +0 -13
  590. package/dist/src/hooks/checkQueryAddressValidity.js +0 -7
  591. package/dist/src/hooks/checkQueryChainIdValidity.js +0 -7
  592. package/dist/src/index.js +0 -113
  593. package/dist/src/jobs/dynamic-data.js +0 -159
  594. package/dist/src/jobs/pendings.js +0 -238
  595. package/dist/src/jobs/prices.js +0 -10
  596. package/dist/src/jobs/reward-breakdowns.js +0 -163
  597. package/dist/src/jobs/rewards.js +0 -112
  598. package/dist/src/jobs/set-dungeon-keeper.js +0 -90
  599. package/dist/src/jobs/update-analytics.js +0 -548
  600. package/dist/src/jobs/update-dynamic-data.js +0 -57
  601. package/dist/src/jobs/update-euler-vaults.js +0 -18
  602. package/dist/src/jobs/update-rpc-calls-cache.js +0 -30
  603. package/dist/src/jobs/update-uniswap-v4-pools.js +0 -15
  604. package/dist/src/libs/computeFee.js +0 -34
  605. package/dist/src/libs/deprecated-merklv3/index.js +0 -183
  606. package/dist/src/libs/getTokensList.js +0 -19
  607. package/dist/src/libs/merklChainData.js +0 -116
  608. package/dist/src/libs/parse/marketsWithCache.js +0 -8
  609. package/dist/src/libs/positions/EigenLayer/index.js +0 -54
  610. package/dist/src/libs/positions/ajna/index.js +0 -107
  611. package/dist/src/libs/positions/badger/index.js +0 -80
  612. package/dist/src/libs/positions/clamm/index.js +0 -412
  613. package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.js +0 -36
  614. package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.js +0 -36
  615. package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.js +0 -42
  616. package/dist/src/libs/positions/clamm/thegraph/index.js +0 -163
  617. package/dist/src/libs/positions/compound/index.js +0 -91
  618. package/dist/src/libs/positions/dolomite/index.js +0 -51
  619. package/dist/src/libs/positions/erc20/index.js +0 -55
  620. package/dist/src/libs/positions/euler/index.js +0 -56
  621. package/dist/src/libs/positions/index.js +0 -56
  622. package/dist/src/libs/positions/morpho/index.js +0 -177
  623. package/dist/src/libs/positions/prepareFetch.js +0 -392
  624. package/dist/src/libs/positions/silo/index.js +0 -68
  625. package/dist/src/libs/positions/types.js +0 -1
  626. package/dist/src/libs/staticCampaigns.js +0 -15
  627. package/dist/src/libs/tokens/allowances.js +0 -18
  628. package/dist/src/libs/tokens/balances.js +0 -128
  629. package/dist/src/libs/tokens/tokenInfo.js +0 -22
  630. package/dist/src/modules/v4/accounting/accounting.controller.js +0 -61
  631. package/dist/src/modules/v4/accounting/accounting.model.js +0 -32
  632. package/dist/src/modules/v4/accounting/accounting.repository.js +0 -154
  633. package/dist/src/modules/v4/accounting/accounting.service.js +0 -107
  634. package/dist/src/modules/v4/airflow/airflow.service.js +0 -20
  635. package/dist/src/modules/v4/apr/apr.model.js +0 -13
  636. package/dist/src/modules/v4/apr/apr.service.js +0 -52
  637. package/dist/src/modules/v4/authentication/authentication.controller.js +0 -23
  638. package/dist/src/modules/v4/authentication/authentication.model.js +0 -6
  639. package/dist/src/modules/v4/authentication/authentication.service.js +0 -31
  640. package/dist/src/modules/v4/blacklist/blacklist.controller.js +0 -42
  641. package/dist/src/modules/v4/blacklist/blacklist.model.js +0 -13
  642. package/dist/src/modules/v4/blacklist/blacklist.repository.js +0 -50
  643. package/dist/src/modules/v4/blacklist/blacklist.service.js +0 -31
  644. package/dist/src/modules/v4/boost/boost.controller.js +0 -15
  645. package/dist/src/modules/v4/boost/boost.model.js +0 -14
  646. package/dist/src/modules/v4/boost/boost.service.js +0 -20
  647. package/dist/src/modules/v4/bucket/bucket.model.js +0 -85
  648. package/dist/src/modules/v4/bucket/bucket.service.js +0 -178
  649. package/dist/src/modules/v4/cache/cache.model.js +0 -14
  650. package/dist/src/modules/v4/cache/cache.repository.js +0 -22
  651. package/dist/src/modules/v4/cache/cache.service.js +0 -59
  652. package/dist/src/modules/v4/campaign/campaign.controller.js +0 -174
  653. package/dist/src/modules/v4/campaign/campaign.model.js +0 -140
  654. package/dist/src/modules/v4/campaign/campaign.repository.js +0 -535
  655. package/dist/src/modules/v4/campaign/campaign.service.js +0 -455
  656. package/dist/src/modules/v4/campaign/campaign.test.controller.js +0 -127
  657. package/dist/src/modules/v4/chain/chain.controller.js +0 -44
  658. package/dist/src/modules/v4/chain/chain.model.js +0 -36
  659. package/dist/src/modules/v4/chain/chain.repository.js +0 -79
  660. package/dist/src/modules/v4/chain/chain.service.js +0 -55
  661. package/dist/src/modules/v4/chainInteraction/chainInteraction.service.js +0 -4
  662. package/dist/src/modules/v4/claims/claims.controller.js +0 -19
  663. package/dist/src/modules/v4/claims/claims.model.js +0 -1
  664. package/dist/src/modules/v4/claims/claims.repository.js +0 -39
  665. package/dist/src/modules/v4/claims/claims.service.js +0 -40
  666. package/dist/src/modules/v4/coingecko/coingecko.model.js +0 -1
  667. package/dist/src/modules/v4/coingecko/coingecko.repository.js +0 -9
  668. package/dist/src/modules/v4/coingecko/coingecko.service.js +0 -65
  669. package/dist/src/modules/v4/computedValue/computedValue.controller.js +0 -46
  670. package/dist/src/modules/v4/computedValue/computedValue.model.js +0 -30
  671. package/dist/src/modules/v4/computedValue/computedValue.repository.js +0 -48
  672. package/dist/src/modules/v4/computedValue/computedValue.service.js +0 -23
  673. package/dist/src/modules/v4/creator/creator.controller.js +0 -43
  674. package/dist/src/modules/v4/creator/creator.model.js +0 -42
  675. package/dist/src/modules/v4/creator/creator.repository.js +0 -69
  676. package/dist/src/modules/v4/creator/creator.service.js +0 -92
  677. package/dist/src/modules/v4/dynamicData/dynamicData.model.js +0 -56
  678. package/dist/src/modules/v4/dynamicData/dynamicData.service.js +0 -263
  679. package/dist/src/modules/v4/enso/enso.model.js +0 -147
  680. package/dist/src/modules/v4/enso/enso.service.js +0 -116
  681. package/dist/src/modules/v4/explorer/explorer.controller.js +0 -13
  682. package/dist/src/modules/v4/explorer/explorer.model.js +0 -8
  683. package/dist/src/modules/v4/explorer/explorer.repository.js +0 -23
  684. package/dist/src/modules/v4/explorer/explorer.service.js +0 -24
  685. package/dist/src/modules/v4/icon/icon.model.js +0 -1
  686. package/dist/src/modules/v4/icon/icon.service.js +0 -16
  687. package/dist/src/modules/v4/interaction/interaction.controller.js +0 -45
  688. package/dist/src/modules/v4/interaction/interaction.model.js +0 -25
  689. package/dist/src/modules/v4/interaction/interaction.service.js +0 -95
  690. package/dist/src/modules/v4/kyberzap/kyberzap.model.js +0 -83
  691. package/dist/src/modules/v4/kyberzap/kyberzap.service.js +0 -176
  692. package/dist/src/modules/v4/liquidity/implementations/AjnaPositionFetcher.js +0 -90
  693. package/dist/src/modules/v4/liquidity/implementations/BadgerPositionFetcher.js +0 -69
  694. package/dist/src/modules/v4/liquidity/implementations/ClammPositionFetcher.js +0 -61
  695. package/dist/src/modules/v4/liquidity/implementations/DolomitePositionFetcher.js +0 -45
  696. package/dist/src/modules/v4/liquidity/implementations/ERC20PositionFetcher.js +0 -47
  697. package/dist/src/modules/v4/liquidity/implementations/EulerPositionFetcher.js +0 -40
  698. package/dist/src/modules/v4/liquidity/liquidity.controller.js +0 -16
  699. package/dist/src/modules/v4/liquidity/liquidity.model.js +0 -5
  700. package/dist/src/modules/v4/liquidity/liquidity.repository.js +0 -6
  701. package/dist/src/modules/v4/liquidity/liquidity.service.js +0 -34
  702. package/dist/src/modules/v4/merklRoot/merklRoot.controller.js +0 -31
  703. package/dist/src/modules/v4/merklRoot/merklRoot.model.js +0 -12
  704. package/dist/src/modules/v4/merklRoot/merklRoot.repository.js +0 -56
  705. package/dist/src/modules/v4/merklRoot/merklRoot.service.js +0 -48
  706. package/dist/src/modules/v4/opportunity/opportunity.controller.js +0 -189
  707. package/dist/src/modules/v4/opportunity/opportunity.converter.js +0 -174
  708. package/dist/src/modules/v4/opportunity/opportunity.model.js +0 -132
  709. package/dist/src/modules/v4/opportunity/opportunity.repository.js +0 -515
  710. package/dist/src/modules/v4/opportunity/opportunity.service.js +0 -380
  711. package/dist/src/modules/v4/opportunity/transform-id.pipe.js +0 -6
  712. package/dist/src/modules/v4/opportunity/validate-id.pipe.js +0 -12
  713. package/dist/src/modules/v4/price/price.controller.js +0 -56
  714. package/dist/src/modules/v4/price/price.model.js +0 -12
  715. package/dist/src/modules/v4/price/price.repository.js +0 -22
  716. package/dist/src/modules/v4/price/price.service.js +0 -63
  717. package/dist/src/modules/v4/prisma/index.js +0 -1
  718. package/dist/src/modules/v4/programPayload/programPayload.controller.js +0 -85
  719. package/dist/src/modules/v4/programPayload/programPayload.model.js +0 -179
  720. package/dist/src/modules/v4/programPayload/programPayload.repository.js +0 -7553
  721. package/dist/src/modules/v4/programPayload/programPayload.service.js +0 -240
  722. package/dist/src/modules/v4/protocol/protocol.controller.js +0 -42
  723. package/dist/src/modules/v4/protocol/protocol.model.js +0 -186
  724. package/dist/src/modules/v4/protocol/protocol.repository.js +0 -175
  725. package/dist/src/modules/v4/protocol/protocol.service.js +0 -73
  726. package/dist/src/modules/v4/referral/referral.controller.js +0 -25
  727. package/dist/src/modules/v4/referral/referral.model.js +0 -12
  728. package/dist/src/modules/v4/referral/referral.service.js +0 -171
  729. package/dist/src/modules/v4/reward/reward.controller.js +0 -140
  730. package/dist/src/modules/v4/reward/reward.converter.js +0 -124
  731. package/dist/src/modules/v4/reward/reward.model.js +0 -153
  732. package/dist/src/modules/v4/reward/reward.repository.js +0 -350
  733. package/dist/src/modules/v4/reward/reward.service.js +0 -406
  734. package/dist/src/modules/v4/router.js +0 -93
  735. package/dist/src/modules/v4/status/status.controller.js +0 -68
  736. package/dist/src/modules/v4/status/status.model.js +0 -34
  737. package/dist/src/modules/v4/status/status.repository.js +0 -146
  738. package/dist/src/modules/v4/status/status.service.js +0 -150
  739. package/dist/src/modules/v4/token/token.controller.js +0 -118
  740. package/dist/src/modules/v4/token/token.model.js +0 -87
  741. package/dist/src/modules/v4/token/token.repository.js +0 -192
  742. package/dist/src/modules/v4/token/token.service.js +0 -410
  743. package/dist/src/modules/v4/tracer/tracer.service.js +0 -30
  744. package/dist/src/modules/v4/turtle/turtle.controller.js +0 -20
  745. package/dist/src/modules/v4/turtle/turtle.repository.js +0 -40
  746. package/dist/src/modules/v4/turtle/turtle.service.js +0 -28
  747. package/dist/src/modules/v4/tvl/tvl.model.js +0 -13
  748. package/dist/src/modules/v4/tvl/tvl.service.js +0 -63
  749. package/dist/src/modules/v4/uniswap/uniswap.controller.js +0 -100
  750. package/dist/src/modules/v4/uniswap/uniswap.model.js +0 -46
  751. package/dist/src/modules/v4/uniswap/uniswap.repository.js +0 -12
  752. package/dist/src/modules/v4/uniswap/uniswap.service.js +0 -245
  753. package/dist/src/modules/v4/user/user.controller.js +0 -77
  754. package/dist/src/modules/v4/user/user.model.js +0 -66
  755. package/dist/src/modules/v4/user/user.repository.js +0 -41
  756. package/dist/src/modules/v4/user/user.service.js +0 -102
  757. package/dist/src/plugins/error-handling.plugin.js +0 -34
  758. package/dist/src/routes/v1/allowances.js +0 -115
  759. package/dist/src/routes/v1/balances.js +0 -25
  760. package/dist/src/routes/v1/prices.js +0 -9
  761. package/dist/src/routes/v1/router.js +0 -6
  762. package/dist/src/routes/v1/tokens.js +0 -17
  763. package/dist/src/routes/v2/merkl.js +0 -13
  764. package/dist/src/routes/v2/router.js +0 -3
  765. package/dist/src/routes/v3/app.js +0 -43
  766. package/dist/src/routes/v3/blacklist.js +0 -19
  767. package/dist/src/routes/v3/campaign/delay.js +0 -81
  768. package/dist/src/routes/v3/campaignClaims.js +0 -29
  769. package/dist/src/routes/v3/campaignUnclaimed.js +0 -28
  770. package/dist/src/routes/v3/campaigns.js +0 -136
  771. package/dist/src/routes/v3/campaignsForMainParameter.js +0 -33
  772. package/dist/src/routes/v3/campaignsRewardsReport.js +0 -48
  773. package/dist/src/routes/v3/claims.js +0 -16
  774. package/dist/src/routes/v3/compoundV2.js +0 -9
  775. package/dist/src/routes/v3/createCampaign.js +0 -66
  776. package/dist/src/routes/v3/dolomite.js +0 -12
  777. package/dist/src/routes/v3/euler.js +0 -52
  778. package/dist/src/routes/v3/fetch.js +0 -27
  779. package/dist/src/routes/v3/health.js +0 -13
  780. package/dist/src/routes/v3/lostyield.js +0 -101
  781. package/dist/src/routes/v3/merkl.js +0 -119
  782. package/dist/src/routes/v3/morphoMarkets.js +0 -27
  783. package/dist/src/routes/v3/morphoVaults.js +0 -22
  784. package/dist/src/routes/v3/multiChainPositions.js +0 -70
  785. package/dist/src/routes/v3/opportunity.js +0 -28
  786. package/dist/src/routes/v3/overview.js +0 -72
  787. package/dist/src/routes/v3/parse.js +0 -23
  788. package/dist/src/routes/v3/payload.js +0 -40
  789. package/dist/src/routes/v3/poolInfo.js +0 -88
  790. package/dist/src/routes/v3/positions.js +0 -62
  791. package/dist/src/routes/v3/radiant.js +0 -26
  792. package/dist/src/routes/v3/recipients.js +0 -29
  793. package/dist/src/routes/v3/rewards.js +0 -36
  794. package/dist/src/routes/v3/rewardsReport.js +0 -40
  795. package/dist/src/routes/v3/router.js +0 -70
  796. package/dist/src/routes/v3/silo.js +0 -20
  797. package/dist/src/routes/v3/token.js +0 -24
  798. package/dist/src/routes/v3/twt/participants.js +0 -63
  799. package/dist/src/routes/v3/uniswapv4.js +0 -29
  800. package/dist/src/routes/v3/updates.js +0 -47
  801. package/dist/src/routes/v3/userRewards.js +0 -63
  802. package/dist/src/scripts/fill-coingecko-data.js +0 -3
  803. package/dist/src/scripts/fill-descriptions.js +0 -101
  804. package/dist/src/scripts/fill-unknown-tokens.js +0 -58
  805. package/dist/src/scripts/reparse-opportunities.js +0 -75
  806. package/dist/src/types/external/spectraAPI.js +0 -1
  807. package/dist/src/types/index.js +0 -1
  808. package/dist/src/utils/TailSampler.js +0 -23
  809. package/dist/src/utils/bigintToString.js +0 -20
  810. package/dist/src/utils/caseChanges.js +0 -15
  811. package/dist/src/utils/decodeCalls.js +0 -340
  812. package/dist/src/utils/encodeCalls.js +0 -506
  813. package/dist/src/utils/error.js +0 -114
  814. package/dist/src/utils/execute.js +0 -117
  815. package/dist/src/utils/generateCardName.js +0 -209
  816. package/dist/src/utils/generic.js +0 -43
  817. package/dist/src/utils/hashArray.js +0 -7
  818. package/dist/src/utils/lastBlockBefore.js +0 -78
  819. package/dist/src/utils/logger.js +0 -52
  820. package/dist/src/utils/parseDistributionType.js +0 -16
  821. package/dist/src/utils/pricer.js +0 -189
  822. package/dist/src/utils/prices/chainlinkRead.js +0 -8
  823. package/dist/src/utils/prices/curveVirtualPrice.js +0 -7
  824. package/dist/src/utils/prices/getDQUICK.js +0 -8
  825. package/dist/src/utils/prices/priceFetcherFactory.js +0 -32
  826. package/dist/src/utils/prices/priceService.js +0 -274
  827. package/dist/src/utils/prices/services/OnChainCallService.js +0 -38
  828. package/dist/src/utils/prices/services/coinGeckoService.js +0 -63
  829. package/dist/src/utils/prices/services/defillamaService.js +0 -53
  830. package/dist/src/utils/prices/services/dexScreenerService.js +0 -62
  831. package/dist/src/utils/prices/services/erc4626Service.js +0 -38
  832. package/dist/src/utils/prices/services/getERC4626.js +0 -11
  833. package/dist/src/utils/prices/services/indexCoopService.js +0 -55
  834. package/dist/src/utils/prices/services/priceFetcher.js +0 -1
  835. package/dist/src/utils/prices/uniV2Price.js +0 -40
  836. package/dist/src/utils/providers.js +0 -37
  837. package/dist/src/utils/queries/allCampaigns.js +0 -12
  838. package/dist/src/utils/sanitizeChain.js +0 -6
  839. package/dist/src/utils/stryke.js +0 -4
  840. package/dist/src/utils/throw.js +0 -55
  841. package/dist/tsconfig.package.tsbuildinfo +0 -1
@@ -1,3447 +0,0 @@
1
- /**
2
- * @param this
3
- */
4
- declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client;
5
-
6
- declare type AccelerateEngineConfig = {
7
- inlineSchema: EngineConfig['inlineSchema'];
8
- inlineSchemaHash: EngineConfig['inlineSchemaHash'];
9
- env: EngineConfig['env'];
10
- generator?: {
11
- previewFeatures: string[];
12
- };
13
- inlineDatasources: EngineConfig['inlineDatasources'];
14
- overrideDatasources: EngineConfig['overrideDatasources'];
15
- clientVersion: EngineConfig['clientVersion'];
16
- engineVersion: EngineConfig['engineVersion'];
17
- logEmitter: EngineConfig['logEmitter'];
18
- logQueries?: EngineConfig['logQueries'];
19
- logLevel?: EngineConfig['logLevel'];
20
- tracingHelper: EngineConfig['tracingHelper'];
21
- accelerateUtils?: EngineConfig['accelerateUtils'];
22
- };
23
-
24
- export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw';
25
-
26
- declare type ActiveConnectorType = Exclude<ConnectorType, 'postgres' | 'prisma+postgres'>;
27
-
28
- export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum';
29
-
30
- export declare type AllModelsToStringIndex<TypeMap extends TypeMapDef, Args extends Record<string, any>, K extends PropertyKey> = Args extends {
31
- [P in K]: {
32
- $allModels: infer AllModels;
33
- };
34
- } ? {
35
- [P in K]: Record<TypeMap['meta']['modelProps'], AllModels>;
36
- } : {};
37
-
38
- declare class AnyNull extends NullTypesEnumValue {
39
- }
40
-
41
- export declare type ApplyOmit<T, OmitConfig> = Compute<{
42
- [K in keyof T as OmitValue<OmitConfig, K> extends true ? never : K]: T[K];
43
- }>;
44
-
45
- export declare type Args<T, F extends Operation> = T extends {
46
- [K: symbol]: {
47
- types: {
48
- operations: {
49
- [K in F]: {
50
- args: any;
51
- };
52
- };
53
- };
54
- };
55
- } ? T[symbol]['types']['operations'][F]['args'] : any;
56
-
57
- export declare type Args_3<T, F extends Operation> = Args<T, F>;
58
-
59
- /**
60
- * Original `quaint::ValueType` enum tag from Prisma's `quaint`.
61
- * Query arguments marked with this type are sanitized before being sent to the database.
62
- * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined.
63
- */
64
- declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time';
65
-
66
- /**
67
- * Attributes is a map from string to attribute values.
68
- *
69
- * Note: only the own enumerable keys are counted as valid attribute keys.
70
- */
71
- declare interface Attributes {
72
- [attributeKey: string]: AttributeValue | undefined;
73
- }
74
-
75
- /**
76
- * Attribute values may be any non-nullish primitive value except an object.
77
- *
78
- * null or undefined attribute values are invalid and will result in undefined behavior.
79
- */
80
- declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
81
-
82
- export declare type BaseDMMF = {
83
- readonly datamodel: Omit<DMMF.Datamodel, 'indexes'>;
84
- };
85
-
86
- declare type BatchArgs = {
87
- queries: BatchQuery[];
88
- transaction?: {
89
- isolationLevel?: IsolationLevel;
90
- };
91
- };
92
-
93
- declare type BatchInternalParams = {
94
- requests: RequestParams[];
95
- customDataProxyFetch?: CustomDataProxyFetch;
96
- };
97
-
98
- declare type BatchQuery = {
99
- model: string | undefined;
100
- operation: string;
101
- args: JsArgs | RawQueryArgs;
102
- };
103
-
104
- declare type BatchQueryEngineResult<T> = QueryEngineResultData<T> | Error;
105
-
106
- declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise<any>;
107
-
108
- declare type BatchQueryOptionsCbArgs = {
109
- args: BatchArgs;
110
- query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise<unknown[]>;
111
- __internalParams: BatchInternalParams;
112
- };
113
-
114
- declare type BatchTransactionOptions = {
115
- isolationLevel?: Transaction_2.IsolationLevel;
116
- };
117
-
118
- declare interface BinaryTargetsEnvValue {
119
- fromEnvVar: string | null;
120
- value: string;
121
- native?: boolean;
122
- }
123
-
124
- export declare type Call<F extends Fn, P> = (F & {
125
- params: P;
126
- })['returns'];
127
-
128
- declare interface CallSite {
129
- getLocation(): LocationInFile | null;
130
- }
131
-
132
- export declare type Cast<A, W> = A extends W ? A : W;
133
-
134
- declare type Client = ReturnType<typeof getPrismaClient> extends new () => infer T ? T : never;
135
-
136
- export declare type ClientArg = {
137
- [MethodName in string]: unknown;
138
- };
139
-
140
- export declare type ClientArgs = {
141
- client: ClientArg;
142
- };
143
-
144
- export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin<never, never, never, never>;
145
-
146
- export declare type ClientOptionDef = undefined | {
147
- [K in string]: any;
148
- };
149
-
150
- export declare type ClientOtherOps = {
151
- $queryRaw<T = unknown>(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise<T>;
152
- $queryRawTyped<T>(query: TypedSql<unknown[], T>): PrismaPromise<T[]>;
153
- $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): PrismaPromise<T>;
154
- $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise<number>;
155
- $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise<number>;
156
- $runCommandRaw(command: InputJsonObject): PrismaPromise<JsonObject>;
157
- };
158
-
159
- declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum];
160
-
161
- declare const ColumnTypeEnum: {
162
- readonly Int32: 0;
163
- readonly Int64: 1;
164
- readonly Float: 2;
165
- readonly Double: 3;
166
- readonly Numeric: 4;
167
- readonly Boolean: 5;
168
- readonly Character: 6;
169
- readonly Text: 7;
170
- readonly Date: 8;
171
- readonly Time: 9;
172
- readonly DateTime: 10;
173
- readonly Json: 11;
174
- readonly Enum: 12;
175
- readonly Bytes: 13;
176
- readonly Set: 14;
177
- readonly Uuid: 15;
178
- readonly Int32Array: 64;
179
- readonly Int64Array: 65;
180
- readonly FloatArray: 66;
181
- readonly DoubleArray: 67;
182
- readonly NumericArray: 68;
183
- readonly BooleanArray: 69;
184
- readonly CharacterArray: 70;
185
- readonly TextArray: 71;
186
- readonly DateArray: 72;
187
- readonly TimeArray: 73;
188
- readonly DateTimeArray: 74;
189
- readonly JsonArray: 75;
190
- readonly EnumArray: 76;
191
- readonly BytesArray: 77;
192
- readonly UuidArray: 78;
193
- readonly UnknownNumber: 128;
194
- };
195
-
196
- declare type CompilerWasmLoadingConfig = {
197
- /**
198
- * WASM-bindgen runtime for corresponding module
199
- */
200
- getRuntime: () => {
201
- __wbg_set_wasm(exports: unknown): any;
202
- QueryCompiler: QueryCompilerConstructor;
203
- };
204
- /**
205
- * Loads the raw wasm module for the wasm compiler engine. This configuration is
206
- * generated specifically for each type of client, eg. Node.js client and Edge
207
- * clients will have different implementations.
208
- * @remarks this is a callback on purpose, we only load the wasm if needed.
209
- * @remarks only used by ClientEngine
210
- */
211
- getQueryCompilerWasmModule: () => Promise<unknown>;
212
- };
213
-
214
- export declare type Compute<T> = T extends Function ? T : {
215
- [K in keyof T]: T[K];
216
- } & unknown;
217
-
218
- export declare type ComputeDeep<T> = T extends Function ? T : {
219
- [K in keyof T]: ComputeDeep<T[K]>;
220
- } & unknown;
221
-
222
- declare type ComputedField = {
223
- name: string;
224
- needs: string[];
225
- compute: ResultArgsFieldCompute;
226
- };
227
-
228
- declare type ComputedFieldsMap = {
229
- [fieldName: string]: ComputedField;
230
- };
231
-
232
- declare type ConnectionInfo = {
233
- schemaName?: string;
234
- maxBindValues?: number;
235
- };
236
-
237
- declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'prisma+postgres' | 'sqlserver' | 'cockroachdb';
238
-
239
- declare interface Context {
240
- /**
241
- * Get a value from the context.
242
- *
243
- * @param key key which identifies a context value
244
- */
245
- getValue(key: symbol): unknown;
246
- /**
247
- * Create a new context which inherits from this context and has
248
- * the given key set to the given value.
249
- *
250
- * @param key context key for which to set the value
251
- * @param value value to set for the given key
252
- */
253
- setValue(key: symbol, value: unknown): Context;
254
- /**
255
- * Return a new context which inherits from this context but does
256
- * not contain a value for the given key.
257
- *
258
- * @param key context key for which to clear a value
259
- */
260
- deleteValue(key: symbol): Context;
261
- }
262
-
263
- declare type Context_2<T> = T extends {
264
- [K: symbol]: {
265
- ctx: infer C;
266
- };
267
- } ? C & T & {
268
- /**
269
- * @deprecated Use `$name` instead.
270
- */
271
- name?: string;
272
- $name?: string;
273
- $parent?: unknown;
274
- } : T & {
275
- /**
276
- * @deprecated Use `$name` instead.
277
- */
278
- name?: string;
279
- $name?: string;
280
- $parent?: unknown;
281
- };
282
-
283
- export declare type Count<O> = {
284
- [K in keyof O]: Count<number>;
285
- } & {};
286
-
287
- export declare function createParam(name: string): Param<unknown, string>;
288
-
289
- /**
290
- * Custom fetch function for `DataProxyEngine`.
291
- *
292
- * We can't use the actual type of `globalThis.fetch` because this will result
293
- * in API Extractor referencing Node.js type definitions in the `.d.ts` bundle
294
- * for the client runtime. We can only use such types in internal types that
295
- * don't end up exported anywhere.
296
-
297
- * It's also not possible to write a definition of `fetch` that would accept the
298
- * actual `fetch` function from different environments such as Node.js and
299
- * Cloudflare Workers (with their extensions to `RequestInit` and `Response`).
300
- * `fetch` is used in both covariant and contravariant positions in
301
- * `CustomDataProxyFetch`, making it invariant, so we need the exact same type.
302
- * Even if we removed the argument and left `fetch` in covariant position only,
303
- * then for an extension-supplied function to be assignable to `customDataProxyFetch`,
304
- * the platform-specific (or custom) `fetch` function needs to be assignable
305
- * to our `fetch` definition. This, in turn, requires the third-party `Response`
306
- * to be a subtype of our `Response` (which is not a problem, we could declare
307
- * a minimal `Response` type that only includes what we use) *and* requires the
308
- * third-party `RequestInit` to be a supertype of our `RequestInit` (i.e. we
309
- * have to declare all properties any `RequestInit` implementation in existence
310
- * could possibly have), which is not possible.
311
- *
312
- * Since `@prisma/extension-accelerate` redefines the type of
313
- * `__internalParams.customDataProxyFetch` to its own type anyway (probably for
314
- * exactly this reason), our definition is never actually used and is completely
315
- * ignored, so it doesn't matter, and we can just use `unknown` as the type of
316
- * `fetch` here.
317
- */
318
- declare type CustomDataProxyFetch = (fetch: unknown) => unknown;
319
-
320
- declare class DataLoader<T = unknown> {
321
- private options;
322
- batches: {
323
- [key: string]: Job[];
324
- };
325
- private tickActive;
326
- constructor(options: DataLoaderOptions<T>);
327
- request(request: T): Promise<any>;
328
- private dispatchBatches;
329
- get [Symbol.toStringTag](): string;
330
- }
331
-
332
- declare type DataLoaderOptions<T> = {
333
- singleLoader: (request: T) => Promise<any>;
334
- batchLoader: (request: T[]) => Promise<any[]>;
335
- batchBy: (request: T) => string | undefined;
336
- batchOrder: (requestA: T, requestB: T) => number;
337
- };
338
-
339
- declare type Datasource = {
340
- url?: string;
341
- };
342
-
343
- declare type Datasources = {
344
- [name in string]: Datasource;
345
- };
346
-
347
- declare class DbNull extends NullTypesEnumValue {
348
- }
349
-
350
- export declare const Debug: typeof debugCreate & {
351
- enable(namespace: any): void;
352
- disable(): any;
353
- enabled(namespace: string): boolean;
354
- log: (...args: string[]) => void;
355
- formatters: {};
356
- };
357
-
358
- /**
359
- * Create a new debug instance with the given namespace.
360
- *
361
- * @example
362
- * ```ts
363
- * import Debug from '@prisma/debug'
364
- * const debug = Debug('prisma:client')
365
- * debug('Hello World')
366
- * ```
367
- */
368
- declare function debugCreate(namespace: string): ((...args: any[]) => void) & {
369
- color: string;
370
- enabled: boolean;
371
- namespace: string;
372
- log: (...args: string[]) => void;
373
- extend: () => void;
374
- };
375
-
376
- export declare namespace Decimal {
377
- export type Constructor = typeof Decimal;
378
- export type Instance = Decimal;
379
- export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
380
- export type Modulo = Rounding | 9;
381
- export type Value = string | number | Decimal;
382
-
383
- // http://mikemcl.github.io/decimal.js/#constructor-properties
384
- export interface Config {
385
- precision?: number;
386
- rounding?: Rounding;
387
- toExpNeg?: number;
388
- toExpPos?: number;
389
- minE?: number;
390
- maxE?: number;
391
- crypto?: boolean;
392
- modulo?: Modulo;
393
- defaults?: boolean;
394
- }
395
- }
396
-
397
- export declare class Decimal {
398
- readonly d: number[];
399
- readonly e: number;
400
- readonly s: number;
401
-
402
- constructor(n: Decimal.Value);
403
-
404
- absoluteValue(): Decimal;
405
- abs(): Decimal;
406
-
407
- ceil(): Decimal;
408
-
409
- clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
410
- clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
411
-
412
- comparedTo(n: Decimal.Value): number;
413
- cmp(n: Decimal.Value): number;
414
-
415
- cosine(): Decimal;
416
- cos(): Decimal;
417
-
418
- cubeRoot(): Decimal;
419
- cbrt(): Decimal;
420
-
421
- decimalPlaces(): number;
422
- dp(): number;
423
-
424
- dividedBy(n: Decimal.Value): Decimal;
425
- div(n: Decimal.Value): Decimal;
426
-
427
- dividedToIntegerBy(n: Decimal.Value): Decimal;
428
- divToInt(n: Decimal.Value): Decimal;
429
-
430
- equals(n: Decimal.Value): boolean;
431
- eq(n: Decimal.Value): boolean;
432
-
433
- floor(): Decimal;
434
-
435
- greaterThan(n: Decimal.Value): boolean;
436
- gt(n: Decimal.Value): boolean;
437
-
438
- greaterThanOrEqualTo(n: Decimal.Value): boolean;
439
- gte(n: Decimal.Value): boolean;
440
-
441
- hyperbolicCosine(): Decimal;
442
- cosh(): Decimal;
443
-
444
- hyperbolicSine(): Decimal;
445
- sinh(): Decimal;
446
-
447
- hyperbolicTangent(): Decimal;
448
- tanh(): Decimal;
449
-
450
- inverseCosine(): Decimal;
451
- acos(): Decimal;
452
-
453
- inverseHyperbolicCosine(): Decimal;
454
- acosh(): Decimal;
455
-
456
- inverseHyperbolicSine(): Decimal;
457
- asinh(): Decimal;
458
-
459
- inverseHyperbolicTangent(): Decimal;
460
- atanh(): Decimal;
461
-
462
- inverseSine(): Decimal;
463
- asin(): Decimal;
464
-
465
- inverseTangent(): Decimal;
466
- atan(): Decimal;
467
-
468
- isFinite(): boolean;
469
-
470
- isInteger(): boolean;
471
- isInt(): boolean;
472
-
473
- isNaN(): boolean;
474
-
475
- isNegative(): boolean;
476
- isNeg(): boolean;
477
-
478
- isPositive(): boolean;
479
- isPos(): boolean;
480
-
481
- isZero(): boolean;
482
-
483
- lessThan(n: Decimal.Value): boolean;
484
- lt(n: Decimal.Value): boolean;
485
-
486
- lessThanOrEqualTo(n: Decimal.Value): boolean;
487
- lte(n: Decimal.Value): boolean;
488
-
489
- logarithm(n?: Decimal.Value): Decimal;
490
- log(n?: Decimal.Value): Decimal;
491
-
492
- minus(n: Decimal.Value): Decimal;
493
- sub(n: Decimal.Value): Decimal;
494
-
495
- modulo(n: Decimal.Value): Decimal;
496
- mod(n: Decimal.Value): Decimal;
497
-
498
- naturalExponential(): Decimal;
499
- exp(): Decimal;
500
-
501
- naturalLogarithm(): Decimal;
502
- ln(): Decimal;
503
-
504
- negated(): Decimal;
505
- neg(): Decimal;
506
-
507
- plus(n: Decimal.Value): Decimal;
508
- add(n: Decimal.Value): Decimal;
509
-
510
- precision(includeZeros?: boolean): number;
511
- sd(includeZeros?: boolean): number;
512
-
513
- round(): Decimal;
514
-
515
- sine() : Decimal;
516
- sin() : Decimal;
517
-
518
- squareRoot(): Decimal;
519
- sqrt(): Decimal;
520
-
521
- tangent() : Decimal;
522
- tan() : Decimal;
523
-
524
- times(n: Decimal.Value): Decimal;
525
- mul(n: Decimal.Value) : Decimal;
526
-
527
- toBinary(significantDigits?: number): string;
528
- toBinary(significantDigits: number, rounding: Decimal.Rounding): string;
529
-
530
- toDecimalPlaces(decimalPlaces?: number): Decimal;
531
- toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
532
- toDP(decimalPlaces?: number): Decimal;
533
- toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
534
-
535
- toExponential(decimalPlaces?: number): string;
536
- toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string;
537
-
538
- toFixed(decimalPlaces?: number): string;
539
- toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string;
540
-
541
- toFraction(max_denominator?: Decimal.Value): Decimal[];
542
-
543
- toHexadecimal(significantDigits?: number): string;
544
- toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string;
545
- toHex(significantDigits?: number): string;
546
- toHex(significantDigits: number, rounding?: Decimal.Rounding): string;
547
-
548
- toJSON(): string;
549
-
550
- toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal;
551
-
552
- toNumber(): number;
553
-
554
- toOctal(significantDigits?: number): string;
555
- toOctal(significantDigits: number, rounding: Decimal.Rounding): string;
556
-
557
- toPower(n: Decimal.Value): Decimal;
558
- pow(n: Decimal.Value): Decimal;
559
-
560
- toPrecision(significantDigits?: number): string;
561
- toPrecision(significantDigits: number, rounding: Decimal.Rounding): string;
562
-
563
- toSignificantDigits(significantDigits?: number): Decimal;
564
- toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal;
565
- toSD(significantDigits?: number): Decimal;
566
- toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal;
567
-
568
- toString(): string;
569
-
570
- truncated(): Decimal;
571
- trunc(): Decimal;
572
-
573
- valueOf(): string;
574
-
575
- static abs(n: Decimal.Value): Decimal;
576
- static acos(n: Decimal.Value): Decimal;
577
- static acosh(n: Decimal.Value): Decimal;
578
- static add(x: Decimal.Value, y: Decimal.Value): Decimal;
579
- static asin(n: Decimal.Value): Decimal;
580
- static asinh(n: Decimal.Value): Decimal;
581
- static atan(n: Decimal.Value): Decimal;
582
- static atanh(n: Decimal.Value): Decimal;
583
- static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
584
- static cbrt(n: Decimal.Value): Decimal;
585
- static ceil(n: Decimal.Value): Decimal;
586
- static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
587
- static clone(object?: Decimal.Config): Decimal.Constructor;
588
- static config(object: Decimal.Config): Decimal.Constructor;
589
- static cos(n: Decimal.Value): Decimal;
590
- static cosh(n: Decimal.Value): Decimal;
591
- static div(x: Decimal.Value, y: Decimal.Value): Decimal;
592
- static exp(n: Decimal.Value): Decimal;
593
- static floor(n: Decimal.Value): Decimal;
594
- static hypot(...n: Decimal.Value[]): Decimal;
595
- static isDecimal(object: any): object is Decimal;
596
- static ln(n: Decimal.Value): Decimal;
597
- static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
598
- static log2(n: Decimal.Value): Decimal;
599
- static log10(n: Decimal.Value): Decimal;
600
- static max(...n: Decimal.Value[]): Decimal;
601
- static min(...n: Decimal.Value[]): Decimal;
602
- static mod(x: Decimal.Value, y: Decimal.Value): Decimal;
603
- static mul(x: Decimal.Value, y: Decimal.Value): Decimal;
604
- static noConflict(): Decimal.Constructor; // Browser only
605
- static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal;
606
- static random(significantDigits?: number): Decimal;
607
- static round(n: Decimal.Value): Decimal;
608
- static set(object: Decimal.Config): Decimal.Constructor;
609
- static sign(n: Decimal.Value): number;
610
- static sin(n: Decimal.Value): Decimal;
611
- static sinh(n: Decimal.Value): Decimal;
612
- static sqrt(n: Decimal.Value): Decimal;
613
- static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
614
- static sum(...n: Decimal.Value[]): Decimal;
615
- static tan(n: Decimal.Value): Decimal;
616
- static tanh(n: Decimal.Value): Decimal;
617
- static trunc(n: Decimal.Value): Decimal;
618
-
619
- static readonly default?: Decimal.Constructor;
620
- static readonly Decimal?: Decimal.Constructor;
621
-
622
- static readonly precision: number;
623
- static readonly rounding: Decimal.Rounding;
624
- static readonly toExpNeg: number;
625
- static readonly toExpPos: number;
626
- static readonly minE: number;
627
- static readonly maxE: number;
628
- static readonly crypto: boolean;
629
- static readonly modulo: Decimal.Modulo;
630
-
631
- static readonly ROUND_UP: 0;
632
- static readonly ROUND_DOWN: 1;
633
- static readonly ROUND_CEIL: 2;
634
- static readonly ROUND_FLOOR: 3;
635
- static readonly ROUND_HALF_UP: 4;
636
- static readonly ROUND_HALF_DOWN: 5;
637
- static readonly ROUND_HALF_EVEN: 6;
638
- static readonly ROUND_HALF_CEIL: 7;
639
- static readonly ROUND_HALF_FLOOR: 8;
640
- static readonly EUCLID: 9;
641
- }
642
-
643
- /**
644
- * Interface for any Decimal.js-like library
645
- * Allows us to accept Decimal.js from different
646
- * versions and some compatible alternatives
647
- */
648
- export declare interface DecimalJsLike {
649
- d: number[];
650
- e: number;
651
- s: number;
652
- toFixed(): string;
653
- }
654
-
655
- export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>;
656
-
657
- export declare type DefaultSelection<Payload extends OperationPayload, Args = {}, ClientOptions = {}> = Args extends {
658
- omit: infer LocalOmit;
659
- } ? ApplyOmit<UnwrapPayload<{
660
- default: Payload;
661
- }>['default'], PatchFlat<LocalOmit, ExtractGlobalOmit<ClientOptions, Uncapitalize<Payload['name']>>>> : ApplyOmit<UnwrapPayload<{
662
- default: Payload;
663
- }>['default'], ExtractGlobalOmit<ClientOptions, Uncapitalize<Payload['name']>>>;
664
-
665
- export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void;
666
-
667
- declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client;
668
-
669
- declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"];
670
-
671
- declare type DeserializedResponse = Array<Record<string, unknown>>;
672
-
673
- export declare function deserializeJsonResponse(result: unknown): unknown;
674
-
675
- export declare function deserializeRawResult(response: RawResponse): DeserializedResponse;
676
-
677
- export declare type DevTypeMapDef = {
678
- meta: {
679
- modelProps: string;
680
- };
681
- model: {
682
- [Model in PropertyKey]: {
683
- [Operation in PropertyKey]: DevTypeMapFnDef;
684
- };
685
- };
686
- other: {
687
- [Operation in PropertyKey]: DevTypeMapFnDef;
688
- };
689
- };
690
-
691
- export declare type DevTypeMapFnDef = {
692
- args: any;
693
- result: any;
694
- payload: OperationPayload;
695
- };
696
-
697
- export declare namespace DMMF {
698
- export type Document = ReadonlyDeep_2<{
699
- datamodel: Datamodel;
700
- schema: Schema;
701
- mappings: Mappings;
702
- }>;
703
- export type Mappings = ReadonlyDeep_2<{
704
- modelOperations: ModelMapping[];
705
- otherOperations: {
706
- read: string[];
707
- write: string[];
708
- };
709
- }>;
710
- export type OtherOperationMappings = ReadonlyDeep_2<{
711
- read: string[];
712
- write: string[];
713
- }>;
714
- export type DatamodelEnum = ReadonlyDeep_2<{
715
- name: string;
716
- values: EnumValue[];
717
- dbName?: string | null;
718
- documentation?: string;
719
- }>;
720
- export type SchemaEnum = ReadonlyDeep_2<{
721
- name: string;
722
- values: string[];
723
- }>;
724
- export type EnumValue = ReadonlyDeep_2<{
725
- name: string;
726
- dbName: string | null;
727
- }>;
728
- export type Datamodel = ReadonlyDeep_2<{
729
- models: Model[];
730
- enums: DatamodelEnum[];
731
- types: Model[];
732
- indexes: Index[];
733
- }>;
734
- export type uniqueIndex = ReadonlyDeep_2<{
735
- name: string;
736
- fields: string[];
737
- }>;
738
- export type PrimaryKey = ReadonlyDeep_2<{
739
- name: string | null;
740
- fields: string[];
741
- }>;
742
- export type Model = ReadonlyDeep_2<{
743
- name: string;
744
- dbName: string | null;
745
- schema: string | null;
746
- fields: Field[];
747
- uniqueFields: string[][];
748
- uniqueIndexes: uniqueIndex[];
749
- documentation?: string;
750
- primaryKey: PrimaryKey | null;
751
- isGenerated?: boolean;
752
- }>;
753
- export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported';
754
- export type FieldNamespace = 'model' | 'prisma';
755
- export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes';
756
- export type Field = ReadonlyDeep_2<{
757
- kind: FieldKind;
758
- name: string;
759
- isRequired: boolean;
760
- isList: boolean;
761
- isUnique: boolean;
762
- isId: boolean;
763
- isReadOnly: boolean;
764
- isGenerated?: boolean;
765
- isUpdatedAt?: boolean;
766
- /**
767
- * Describes the data type in the same the way it is defined in the Prisma schema:
768
- * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
769
- */
770
- type: string;
771
- /**
772
- * Native database type, if specified.
773
- * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`,
774
- * `@db.Text` is encoded as `['Text', []]`.
775
- */
776
- nativeType?: [string, string[]] | null;
777
- dbName?: string | null;
778
- hasDefaultValue: boolean;
779
- default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[];
780
- relationFromFields?: string[];
781
- relationToFields?: string[];
782
- relationOnDelete?: string;
783
- relationOnUpdate?: string;
784
- relationName?: string;
785
- documentation?: string;
786
- }>;
787
- export type FieldDefault = ReadonlyDeep_2<{
788
- name: string;
789
- args: Array<string | number>;
790
- }>;
791
- export type FieldDefaultScalar = string | boolean | number;
792
- export type Index = ReadonlyDeep_2<{
793
- model: string;
794
- type: IndexType;
795
- isDefinedOnField: boolean;
796
- name?: string;
797
- dbName?: string;
798
- algorithm?: string;
799
- clustered?: boolean;
800
- fields: IndexField[];
801
- }>;
802
- export type IndexType = 'id' | 'normal' | 'unique' | 'fulltext';
803
- export type IndexField = ReadonlyDeep_2<{
804
- name: string;
805
- sortOrder?: SortOrder;
806
- length?: number;
807
- operatorClass?: string;
808
- }>;
809
- export type SortOrder = 'asc' | 'desc';
810
- export type Schema = ReadonlyDeep_2<{
811
- rootQueryType?: string;
812
- rootMutationType?: string;
813
- inputObjectTypes: {
814
- model?: InputType[];
815
- prisma: InputType[];
816
- };
817
- outputObjectTypes: {
818
- model: OutputType[];
819
- prisma: OutputType[];
820
- };
821
- enumTypes: {
822
- model?: SchemaEnum[];
823
- prisma: SchemaEnum[];
824
- };
825
- fieldRefTypes: {
826
- prisma?: FieldRefType[];
827
- };
828
- }>;
829
- export type Query = ReadonlyDeep_2<{
830
- name: string;
831
- args: SchemaArg[];
832
- output: QueryOutput;
833
- }>;
834
- export type QueryOutput = ReadonlyDeep_2<{
835
- name: string;
836
- isRequired: boolean;
837
- isList: boolean;
838
- }>;
839
- export type TypeRef<AllowedLocations extends FieldLocation> = {
840
- isList: boolean;
841
- type: string;
842
- location: AllowedLocations;
843
- namespace?: FieldNamespace;
844
- };
845
- export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>;
846
- export type SchemaArg = ReadonlyDeep_2<{
847
- name: string;
848
- comment?: string;
849
- isNullable: boolean;
850
- isRequired: boolean;
851
- inputTypes: InputTypeRef[];
852
- deprecation?: Deprecation;
853
- }>;
854
- export type OutputType = ReadonlyDeep_2<{
855
- name: string;
856
- fields: SchemaField[];
857
- }>;
858
- export type SchemaField = ReadonlyDeep_2<{
859
- name: string;
860
- isNullable?: boolean;
861
- outputType: OutputTypeRef;
862
- args: SchemaArg[];
863
- deprecation?: Deprecation;
864
- documentation?: string;
865
- }>;
866
- export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>;
867
- export type Deprecation = ReadonlyDeep_2<{
868
- sinceVersion: string;
869
- reason: string;
870
- plannedRemovalVersion?: string;
871
- }>;
872
- export type InputType = ReadonlyDeep_2<{
873
- name: string;
874
- constraints: {
875
- maxNumFields: number | null;
876
- minNumFields: number | null;
877
- fields?: string[];
878
- };
879
- meta?: {
880
- source?: string;
881
- };
882
- fields: SchemaArg[];
883
- }>;
884
- export type FieldRefType = ReadonlyDeep_2<{
885
- name: string;
886
- allowTypes: FieldRefAllowType[];
887
- fields: SchemaArg[];
888
- }>;
889
- export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>;
890
- export type ModelMapping = ReadonlyDeep_2<{
891
- model: string;
892
- plural: string;
893
- findUnique?: string | null;
894
- findUniqueOrThrow?: string | null;
895
- findFirst?: string | null;
896
- findFirstOrThrow?: string | null;
897
- findMany?: string | null;
898
- create?: string | null;
899
- createMany?: string | null;
900
- createManyAndReturn?: string | null;
901
- update?: string | null;
902
- updateMany?: string | null;
903
- updateManyAndReturn?: string | null;
904
- upsert?: string | null;
905
- delete?: string | null;
906
- deleteMany?: string | null;
907
- aggregate?: string | null;
908
- groupBy?: string | null;
909
- count?: string | null;
910
- findRaw?: string | null;
911
- aggregateRaw?: string | null;
912
- }>;
913
- export enum ModelAction {
914
- findUnique = "findUnique",
915
- findUniqueOrThrow = "findUniqueOrThrow",
916
- findFirst = "findFirst",
917
- findFirstOrThrow = "findFirstOrThrow",
918
- findMany = "findMany",
919
- create = "create",
920
- createMany = "createMany",
921
- createManyAndReturn = "createManyAndReturn",
922
- update = "update",
923
- updateMany = "updateMany",
924
- updateManyAndReturn = "updateManyAndReturn",
925
- upsert = "upsert",
926
- delete = "delete",
927
- deleteMany = "deleteMany",
928
- groupBy = "groupBy",
929
- count = "count",// TODO: count does not actually exist, why?
930
- aggregate = "aggregate",
931
- findRaw = "findRaw",
932
- aggregateRaw = "aggregateRaw"
933
- }
934
- }
935
-
936
- export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel;
937
-
938
- export declare interface DriverAdapter extends Queryable {
939
- /**
940
- * Starts new transaction.
941
- */
942
- transactionContext(): Promise<Result_4<TransactionContext>>;
943
- /**
944
- * Optional method that returns extra connection info
945
- */
946
- getConnectionInfo?(): Result_4<ConnectionInfo>;
947
- }
948
-
949
- /** Client */
950
- export declare type DynamicClientExtensionArgs<C_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
951
- [P in keyof C_]: unknown;
952
- } & {
953
- [K: symbol]: {
954
- ctx: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList> & {
955
- $parent: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList>;
956
- };
957
- };
958
- };
959
-
960
- export declare type DynamicClientExtensionThis<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
961
- [P in keyof ExtArgs['client']]: Return<ExtArgs['client'][P]>;
962
- } & {
963
- [P in Exclude<TypeMap['meta']['modelProps'], keyof ExtArgs['client']>]: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, P>, ExtArgs, ClientOptions>;
964
- } & {
965
- [P in Exclude<keyof TypeMap['other']['operations'], keyof ExtArgs['client']>]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never;
966
- } & {
967
- [P in Exclude<ClientBuiltInProp, keyof ExtArgs['client']>]: DynamicClientExtensionThisBuiltin<TypeMap, TypeMapCb, ExtArgs, ClientOptions>[P];
968
- } & {
969
- [K: symbol]: {
970
- types: TypeMap['other'];
971
- };
972
- };
973
-
974
- export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
975
- $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call<TypeMapCb, {
976
- extArgs: ExtArgs;
977
- }>, ClientOptions>;
978
- $transaction<P extends PrismaPromise<any>[]>(arg: [...P], options?: {
979
- isolationLevel?: TypeMap['meta']['txIsolationLevel'];
980
- }): Promise<UnwrapTuple<P>>;
981
- $transaction<R>(fn: (client: Omit<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList>) => Promise<R>, options?: {
982
- maxWait?: number;
983
- timeout?: number;
984
- isolationLevel?: TypeMap['meta']['txIsolationLevel'];
985
- }): Promise<R>;
986
- $disconnect(): Promise<void>;
987
- $connect(): Promise<void>;
988
- };
989
-
990
- /** Model */
991
- export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
992
- [K in keyof M_]: K extends '$allModels' ? {
993
- [P in keyof M_[K]]?: unknown;
994
- } & {
995
- [K: symbol]: {};
996
- } : K extends TypeMap['meta']['modelProps'] ? {
997
- [P in keyof M_[K]]?: unknown;
998
- } & {
999
- [K: symbol]: {
1000
- ctx: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, K>, ExtArgs, ClientOptions> & {
1001
- $parent: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>;
1002
- } & {
1003
- $name: ModelKey<TypeMap, K>;
1004
- } & {
1005
- /**
1006
- * @deprecated Use `$name` instead.
1007
- */
1008
- name: ModelKey<TypeMap, K>;
1009
- };
1010
- };
1011
- } : never;
1012
- };
1013
-
1014
- export declare type DynamicModelExtensionFluentApi<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, Null, ClientOptions> = {
1015
- [K in keyof TypeMap['model'][M]['payload']['objects']]: <A>(args?: Exact<A, Path<TypeMap['model'][M]['operations'][P]['args']['select'], [K]>>) => PrismaPromise<Path<DynamicModelExtensionFnResultBase<TypeMap, M, {
1016
- select: {
1017
- [P in K]: A;
1018
- };
1019
- }, P, ClientOptions>, [K]> | Null> & DynamicModelExtensionFluentApi<TypeMap, (TypeMap['model'][M]['payload']['objects'][K] & {})['name'], P, Null | Select<TypeMap['model'][M]['payload']['objects'][K], null>, ClientOptions>;
1020
- };
1021
-
1022
- export declare type DynamicModelExtensionFnResult<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, Null, ClientOptions> = P extends FluentOperation ? DynamicModelExtensionFluentApi<TypeMap, M, P, Null, ClientOptions> & PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P, ClientOptions> | Null> : PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P, ClientOptions>>;
1023
-
1024
- export declare type DynamicModelExtensionFnResultBase<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, ClientOptions> = GetResult<TypeMap['model'][M]['payload'], A, P & Operation, ClientOptions>;
1025
-
1026
- export declare type DynamicModelExtensionFnResultNull<P extends PropertyKey> = P extends 'findUnique' | 'findFirst' ? null : never;
1027
-
1028
- export declare type DynamicModelExtensionOperationFn<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, ClientOptions> = {} extends TypeMap['model'][M]['operations'][P]['args'] ? <A extends TypeMap['model'][M]['operations'][P]['args']>(args?: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>, ClientOptions> : <A extends TypeMap['model'][M]['operations'][P]['args']>(args: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>, ClientOptions>;
1029
-
1030
- export declare type DynamicModelExtensionThis<TypeMap extends TypeMapDef, M extends PropertyKey, ExtArgs extends Record<string, any>, ClientOptions> = {
1031
- [P in keyof ExtArgs['model'][Uncapitalize<M & string>]]: Return<ExtArgs['model'][Uncapitalize<M & string>][P]>;
1032
- } & {
1033
- [P in Exclude<keyof TypeMap['model'][M]['operations'], keyof ExtArgs['model'][Uncapitalize<M & string>]>]: DynamicModelExtensionOperationFn<TypeMap, M, P, ClientOptions>;
1034
- } & {
1035
- [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize<M & string>]>]: TypeMap['model'][M]['fields'];
1036
- } & {
1037
- [K: symbol]: {
1038
- types: TypeMap['model'][M];
1039
- };
1040
- };
1041
-
1042
- /** Query */
1043
- export declare type DynamicQueryExtensionArgs<Q_, TypeMap extends TypeMapDef> = {
1044
- [K in keyof Q_]: K extends '$allOperations' ? (args: {
1045
- model?: string;
1046
- operation: string;
1047
- args: any;
1048
- query: (args: any) => PrismaPromise<any>;
1049
- }) => Promise<any> : K extends '$allModels' ? {
1050
- [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb<TypeMap, 'model', keyof TypeMap['model'], keyof TypeMap['model'][keyof TypeMap['model']]['operations']> : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb<TypeMap, 'model', keyof TypeMap['model'], P> : never;
1051
- } : K extends TypeMap['meta']['modelProps'] ? {
1052
- [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb<TypeMap, 'model', ModelKey<TypeMap, K>, keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations']> : P extends keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations'] ? DynamicQueryExtensionCb<TypeMap, 'model', ModelKey<TypeMap, K>, P> : never;
1053
- } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never;
1054
- };
1055
-
1056
- export declare type DynamicQueryExtensionCb<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = <A extends DynamicQueryExtensionCbArgs<TypeMap, _0, _1, _2>>(args: A) => Promise<TypeMap[_0][_1][_2]['result']>;
1057
-
1058
- export declare type DynamicQueryExtensionCbArgs<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = (_1 extends unknown ? _2 extends unknown ? {
1059
- args: DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>;
1060
- model: _0 extends 0 ? undefined : _1;
1061
- operation: _2;
1062
- query: <A extends DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>>(args: A) => PrismaPromise<TypeMap[_0][_1]['operations'][_2]['result']>;
1063
- } : never : never) & {
1064
- query: (args: DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>) => PrismaPromise<TypeMap[_0][_1]['operations'][_2]['result']>;
1065
- };
1066
-
1067
- export declare type DynamicQueryExtensionCbArgsArgs<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args'];
1068
-
1069
- /** Result */
1070
- export declare type DynamicResultExtensionArgs<R_, TypeMap extends TypeMapDef> = {
1071
- [K in keyof R_]: {
1072
- [P in keyof R_[K]]?: {
1073
- needs?: DynamicResultExtensionNeeds<TypeMap, ModelKey<TypeMap, K>, R_[K][P]>;
1074
- compute(data: DynamicResultExtensionData<TypeMap, ModelKey<TypeMap, K>, R_[K][P]>): any;
1075
- };
1076
- };
1077
- };
1078
-
1079
- export declare type DynamicResultExtensionData<TypeMap extends TypeMapDef, M extends PropertyKey, S> = GetFindResult<TypeMap['model'][M]['payload'], {
1080
- select: S;
1081
- }, {}>;
1082
-
1083
- export declare type DynamicResultExtensionNeeds<TypeMap extends TypeMapDef, M extends PropertyKey, S> = {
1084
- [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never;
1085
- } & {
1086
- [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean;
1087
- };
1088
-
1089
- /**
1090
- * Placeholder value for "no text".
1091
- */
1092
- export declare const empty: Sql;
1093
-
1094
- export declare type EmptyToUnknown<T> = T;
1095
-
1096
- declare interface Engine<InteractiveTransactionPayload = unknown> {
1097
- /** The name of the engine. This is meant to be consumed externally */
1098
- readonly name: string;
1099
- onBeforeExit(callback: () => Promise<void>): void;
1100
- start(): Promise<void>;
1101
- stop(): Promise<void>;
1102
- version(forceRun?: boolean): Promise<string> | string;
1103
- request<T>(query: JsonQuery, options: RequestOptions<InteractiveTransactionPayload>): Promise<QueryEngineResultData<T>>;
1104
- requestBatch<T>(queries: JsonQuery[], options: RequestBatchOptions<InteractiveTransactionPayload>): Promise<BatchQueryEngineResult<T>[]>;
1105
- transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise<Transaction_2.InteractiveTransactionInfo<unknown>>;
1106
- transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
1107
- transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
1108
- metrics(options: MetricsOptionsJson): Promise<Metrics>;
1109
- metrics(options: MetricsOptionsPrometheus): Promise<string>;
1110
- applyPendingMigrations(): Promise<void>;
1111
- }
1112
-
1113
- declare interface EngineConfig {
1114
- cwd: string;
1115
- dirname: string;
1116
- datamodelPath: string;
1117
- enableDebugLogs?: boolean;
1118
- allowTriggerPanic?: boolean;
1119
- prismaPath?: string;
1120
- generator?: GeneratorConfig;
1121
- overrideDatasources: Datasources;
1122
- showColors?: boolean;
1123
- logQueries?: boolean;
1124
- logLevel?: 'info' | 'warn';
1125
- env: Record<string, string>;
1126
- flags?: string[];
1127
- clientVersion: string;
1128
- engineVersion: string;
1129
- previewFeatures?: string[];
1130
- engineEndpoint?: string;
1131
- activeProvider?: string;
1132
- logEmitter: LogEmitter;
1133
- transactionOptions: Transaction_2.Options;
1134
- /**
1135
- * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`.
1136
- * If set, this is only used in the library engine, and all queries would be performed through it,
1137
- * rather than Prisma's Rust drivers.
1138
- * @remarks only used by LibraryEngine.ts
1139
- */
1140
- adapter?: ErrorCapturingDriverAdapter;
1141
- /**
1142
- * The contents of the schema encoded into a string
1143
- * @remarks only used by DataProxyEngine.ts
1144
- */
1145
- inlineSchema: string;
1146
- /**
1147
- * The contents of the datasource url saved in a string
1148
- * @remarks only used by DataProxyEngine.ts
1149
- */
1150
- inlineDatasources: GetPrismaClientConfig['inlineDatasources'];
1151
- /**
1152
- * The string hash that was produced for a given schema
1153
- * @remarks only used by DataProxyEngine.ts
1154
- */
1155
- inlineSchemaHash: string;
1156
- /**
1157
- * The helper for interaction with OTEL tracing
1158
- * @remarks enabling is determined by the client and @prisma/instrumentation package
1159
- */
1160
- tracingHelper: TracingHelper;
1161
- /**
1162
- * Information about whether we have not found a schema.prisma file in the
1163
- * default location, and that we fell back to finding the schema.prisma file
1164
- * in the current working directory. This usually means it has been bundled.
1165
- */
1166
- isBundled?: boolean;
1167
- /**
1168
- * Web Assembly module loading configuration
1169
- */
1170
- engineWasm?: EngineWasmLoadingConfig;
1171
- compilerWasm?: CompilerWasmLoadingConfig;
1172
- /**
1173
- * Allows Accelerate to use runtime utilities from the client. These are
1174
- * necessary for the AccelerateEngine to function correctly.
1175
- */
1176
- accelerateUtils?: {
1177
- resolveDatasourceUrl: typeof resolveDatasourceUrl;
1178
- getBatchRequestPayload: typeof getBatchRequestPayload;
1179
- prismaGraphQLToJSError: typeof prismaGraphQLToJSError;
1180
- PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError;
1181
- PrismaClientInitializationError: typeof PrismaClientInitializationError;
1182
- PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError;
1183
- debug: (...args: any[]) => void;
1184
- engineVersion: string;
1185
- clientVersion: string;
1186
- };
1187
- }
1188
-
1189
- declare type EngineEvent<E extends EngineEventType> = E extends QueryEventType ? QueryEvent : LogEvent;
1190
-
1191
- declare type EngineEventType = QueryEventType | LogEventType;
1192
-
1193
- declare type EngineProtocol = 'graphql' | 'json';
1194
-
1195
- declare type EngineSpan = {
1196
- id: EngineSpanId;
1197
- parentId: string | null;
1198
- name: string;
1199
- startTime: HrTime;
1200
- endTime: HrTime;
1201
- kind: EngineSpanKind;
1202
- attributes?: Record<string, unknown>;
1203
- links?: EngineSpanId[];
1204
- };
1205
-
1206
- declare type EngineSpanId = string;
1207
-
1208
- declare type EngineSpanKind = 'client' | 'internal';
1209
-
1210
- declare type EngineWasmLoadingConfig = {
1211
- /**
1212
- * WASM-bindgen runtime for corresponding module
1213
- */
1214
- getRuntime: () => {
1215
- __wbg_set_wasm(exports: unknown): any;
1216
- QueryEngine: QueryEngineConstructor;
1217
- };
1218
- /**
1219
- * Loads the raw wasm module for the wasm query engine. This configuration is
1220
- * generated specifically for each type of client, eg. Node.js client and Edge
1221
- * clients will have different implementations.
1222
- * @remarks this is a callback on purpose, we only load the wasm if needed.
1223
- * @remarks only used by LibraryEngine
1224
- */
1225
- getQueryEngineWasmModule: () => Promise<unknown>;
1226
- };
1227
-
1228
- declare type EnvPaths = {
1229
- rootEnvPath: string | null;
1230
- schemaEnvPath: string | undefined;
1231
- };
1232
-
1233
- declare interface EnvValue {
1234
- fromEnvVar: null | string;
1235
- value: null | string;
1236
- }
1237
-
1238
- export declare type Equals<A, B> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? 1 : 0;
1239
-
1240
- declare type Error_2 = {
1241
- kind: 'GenericJs';
1242
- id: number;
1243
- } | {
1244
- kind: 'UnsupportedNativeDataType';
1245
- type: string;
1246
- } | {
1247
- kind: 'Postgres';
1248
- code: string;
1249
- severity: string;
1250
- message: string;
1251
- detail: string | undefined;
1252
- column: string | undefined;
1253
- hint: string | undefined;
1254
- } | {
1255
- kind: 'Mysql';
1256
- code: number;
1257
- message: string;
1258
- state: string;
1259
- } | {
1260
- kind: 'Sqlite';
1261
- /**
1262
- * Sqlite extended error code: https://www.sqlite.org/rescode.html
1263
- */
1264
- extendedCode: number;
1265
- message: string;
1266
- };
1267
-
1268
- declare interface ErrorCapturingDriverAdapter extends DriverAdapter {
1269
- readonly errorRegistry: ErrorRegistry;
1270
- }
1271
-
1272
- declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal';
1273
-
1274
- declare type ErrorRecord = {
1275
- error: unknown;
1276
- };
1277
-
1278
- declare interface ErrorRegistry {
1279
- consumeError(id: number): ErrorRecord | undefined;
1280
- }
1281
-
1282
- declare interface ErrorWithBatchIndex {
1283
- batchRequestIdx?: number;
1284
- }
1285
-
1286
- declare type EventCallback<E extends ExtendedEventType> = [E] extends ['beforeExit'] ? () => Promise<void> : [E] extends [LogLevel] ? (event: EngineEvent<E>) => void : never;
1287
-
1288
- export declare type Exact<A, W> = (A extends unknown ? (W extends A ? {
1289
- [K in keyof A]: Exact<A[K], W[K]>;
1290
- } : W) : never) | (A extends Narrowable ? A : never);
1291
-
1292
- /**
1293
- * Defines Exception.
1294
- *
1295
- * string or an object with one of (message or name or code) and optional stack
1296
- */
1297
- declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string;
1298
-
1299
- declare interface ExceptionWithCode {
1300
- code: string | number;
1301
- name?: string;
1302
- message?: string;
1303
- stack?: string;
1304
- }
1305
-
1306
- declare interface ExceptionWithMessage {
1307
- code?: string | number;
1308
- message: string;
1309
- name?: string;
1310
- stack?: string;
1311
- }
1312
-
1313
- declare interface ExceptionWithName {
1314
- code?: string | number;
1315
- message?: string;
1316
- name: string;
1317
- stack?: string;
1318
- }
1319
-
1320
- declare type ExtendedEventType = LogLevel | 'beforeExit';
1321
-
1322
- declare type ExtendedSpanOptions = SpanOptions & {
1323
- /** The name of the span */
1324
- name: string;
1325
- internal?: boolean;
1326
- middleware?: boolean;
1327
- /** Whether it propagates context (?=true) */
1328
- active?: boolean;
1329
- /** The context to append the span to */
1330
- context?: Context;
1331
- };
1332
-
1333
- /** $extends, defineExtension */
1334
- export declare interface ExtendsHook<Variant extends 'extends' | 'define', TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, TypeMap extends TypeMapDef = Call<TypeMapCb, {
1335
- extArgs: ExtArgs;
1336
- }>, ClientOptions = {}> {
1337
- extArgs: ExtArgs;
1338
- <R_ extends {
1339
- [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown;
1340
- }, R, M_ extends {
1341
- [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown;
1342
- }, M, Q_ extends {
1343
- [K in TypeMap['meta']['modelProps'] | '$allModels' | keyof TypeMap['other']['operations'] | '$allOperations']?: unknown;
1344
- }, C_ extends {
1345
- [K in string]?: unknown;
1346
- }, C, Args extends InternalArgs = InternalArgs<R, M, {}, C>, MergedArgs extends InternalArgs = MergeExtArgs<TypeMap, ExtArgs, Args>>(extension: ((client: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>) => {
1347
- $extends: {
1348
- extArgs: Args;
1349
- };
1350
- }) | {
1351
- name?: string;
1352
- query?: DynamicQueryExtensionArgs<Q_, TypeMap>;
1353
- result?: DynamicResultExtensionArgs<R_, TypeMap> & R;
1354
- model?: DynamicModelExtensionArgs<M_, TypeMap, TypeMapCb, ExtArgs, ClientOptions> & M;
1355
- client?: DynamicClientExtensionArgs<C_, TypeMap, TypeMapCb, ExtArgs, ClientOptions> & C;
1356
- }): {
1357
- extends: DynamicClientExtensionThis<Call<TypeMapCb, {
1358
- extArgs: MergedArgs;
1359
- }>, TypeMapCb, MergedArgs, ClientOptions>;
1360
- define: (client: any) => {
1361
- $extends: {
1362
- extArgs: Args;
1363
- };
1364
- };
1365
- }[Variant];
1366
- }
1367
-
1368
- export declare type ExtensionArgs = Optional<RequiredExtensionArgs>;
1369
-
1370
- declare namespace Extensions {
1371
- export {
1372
- defineExtension,
1373
- getExtensionContext
1374
- }
1375
- }
1376
- export { Extensions }
1377
-
1378
- declare namespace Extensions_2 {
1379
- export {
1380
- InternalArgs,
1381
- DefaultArgs,
1382
- GetPayloadResultExtensionKeys,
1383
- GetPayloadResultExtensionObject,
1384
- GetPayloadResult,
1385
- GetSelect,
1386
- GetOmit,
1387
- DynamicQueryExtensionArgs,
1388
- DynamicQueryExtensionCb,
1389
- DynamicQueryExtensionCbArgs,
1390
- DynamicQueryExtensionCbArgsArgs,
1391
- DynamicResultExtensionArgs,
1392
- DynamicResultExtensionNeeds,
1393
- DynamicResultExtensionData,
1394
- DynamicModelExtensionArgs,
1395
- DynamicModelExtensionThis,
1396
- DynamicModelExtensionOperationFn,
1397
- DynamicModelExtensionFnResult,
1398
- DynamicModelExtensionFnResultBase,
1399
- DynamicModelExtensionFluentApi,
1400
- DynamicModelExtensionFnResultNull,
1401
- DynamicClientExtensionArgs,
1402
- DynamicClientExtensionThis,
1403
- ClientBuiltInProp,
1404
- DynamicClientExtensionThisBuiltin,
1405
- ExtendsHook,
1406
- MergeExtArgs,
1407
- AllModelsToStringIndex,
1408
- TypeMapDef,
1409
- DevTypeMapDef,
1410
- DevTypeMapFnDef,
1411
- ClientOptionDef,
1412
- ClientOtherOps,
1413
- TypeMapCbDef,
1414
- ModelKey,
1415
- RequiredExtensionArgs as UserArgs
1416
- }
1417
- }
1418
-
1419
- export declare type ExtractGlobalOmit<Options, ModelName extends string> = Options extends {
1420
- omit: {
1421
- [K in ModelName]: infer GlobalOmit;
1422
- };
1423
- } ? GlobalOmit : {};
1424
-
1425
- /**
1426
- * A reference to a specific field of a specific model
1427
- */
1428
- export declare interface FieldRef<Model, FieldType> {
1429
- readonly modelName: Model;
1430
- readonly name: string;
1431
- readonly typeName: FieldType;
1432
- readonly isList: boolean;
1433
- }
1434
-
1435
- declare type Flavour = 'mysql' | 'postgres' | 'sqlite';
1436
-
1437
- export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete';
1438
-
1439
- export declare interface Fn<Params = unknown, Returns = unknown> {
1440
- params: Params;
1441
- returns: Returns;
1442
- }
1443
-
1444
- declare interface GeneratorConfig {
1445
- name: string;
1446
- output: EnvValue | null;
1447
- isCustomOutput?: boolean;
1448
- provider: EnvValue;
1449
- config: {
1450
- /** `output` is a reserved name and will only be available directly at `generator.output` */
1451
- output?: never;
1452
- /** `provider` is a reserved name and will only be available directly at `generator.provider` */
1453
- provider?: never;
1454
- /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */
1455
- binaryTargets?: never;
1456
- /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */
1457
- previewFeatures?: never;
1458
- } & {
1459
- [key: string]: string | string[] | undefined;
1460
- };
1461
- binaryTargets: BinaryTargetsEnvValue[];
1462
- previewFeatures: string[];
1463
- envPaths?: EnvPaths;
1464
- sourceFilePath: string;
1465
- }
1466
-
1467
- export declare type GetAggregateResult<P extends OperationPayload, A> = {
1468
- [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count<A[K]> : {
1469
- [J in keyof A[K] & string]: P['scalars'][J] | null;
1470
- };
1471
- };
1472
-
1473
- declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2<unknown>): QueryEngineBatchRequest;
1474
-
1475
- export declare type GetBatchResult = {
1476
- count: number;
1477
- };
1478
-
1479
- export declare type GetCountResult<A> = A extends {
1480
- select: infer S;
1481
- } ? (S extends true ? number : Count<S>) : number;
1482
-
1483
- declare function getExtensionContext<T>(that: T): Context_2<T>;
1484
-
1485
- export declare type GetFindResult<P extends OperationPayload, A, ClientOptions> = Equals<A, any> extends 1 ? DefaultSelection<P, A, ClientOptions> : A extends {
1486
- select: infer S extends object;
1487
- } & Record<string, unknown> | {
1488
- include: infer I extends object;
1489
- } & Record<string, unknown> ? {
1490
- [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions> | SelectField<P, K> & null : never : K extends '_count' ? Count<GetFindResult<P, (S & I)[K], ClientOptions>> : never : P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions> | SelectField<P, K> & null : never : P extends {
1491
- scalars: {
1492
- [k in K]: infer O;
1493
- };
1494
- } ? O : K extends '_count' ? Count<P['objects']> : never;
1495
- } & (A extends {
1496
- include: any;
1497
- } & Record<string, unknown> ? DefaultSelection<P, A & {
1498
- omit: A['omit'];
1499
- }, ClientOptions> : unknown) : DefaultSelection<P, A, ClientOptions>;
1500
-
1501
- export declare type GetGroupByResult<P extends OperationPayload, A> = A extends {
1502
- by: string[];
1503
- } ? Array<GetAggregateResult<P, A> & {
1504
- [K in A['by'][number]]: P['scalars'][K];
1505
- }> : A extends {
1506
- by: string;
1507
- } ? Array<GetAggregateResult<P, A> & {
1508
- [K in A['by']]: P['scalars'][K];
1509
- }> : {}[];
1510
-
1511
- export declare type GetOmit<BaseKeys extends string, R extends InternalArgs['result'][string], ExtraType = never> = {
1512
- [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType;
1513
- };
1514
-
1515
- export declare type GetPayloadResult<Base extends Record<any, any>, R extends InternalArgs['result'][string]> = Omit<Base, GetPayloadResultExtensionKeys<R>> & GetPayloadResultExtensionObject<R>;
1516
-
1517
- export declare type GetPayloadResultExtensionKeys<R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = KR;
1518
-
1519
- export declare type GetPayloadResultExtensionObject<R extends InternalArgs['result'][string]> = {
1520
- [K in GetPayloadResultExtensionKeys<R>]: R[K] extends () => {
1521
- compute: (...args: any) => infer C;
1522
- } ? C : never;
1523
- };
1524
-
1525
- export declare function getPrismaClient(config: GetPrismaClientConfig): {
1526
- new (optionsArg?: PrismaClientOptions): {
1527
- _originalClient: any;
1528
- _runtimeDataModel: RuntimeDataModel;
1529
- _requestHandler: RequestHandler;
1530
- _connectionPromise?: Promise<any> | undefined;
1531
- _disconnectionPromise?: Promise<any> | undefined;
1532
- _engineConfig: EngineConfig;
1533
- _accelerateEngineConfig: AccelerateEngineConfig;
1534
- _clientVersion: string;
1535
- _errorFormat: ErrorFormat;
1536
- _tracingHelper: TracingHelper;
1537
- _metrics: MetricsClient;
1538
- _middlewares: MiddlewareHandler<QueryMiddleware>;
1539
- _previewFeatures: string[];
1540
- _activeProvider: string;
1541
- _globalOmit?: GlobalOmitOptions | undefined;
1542
- _extensions: MergedExtensionsList;
1543
- _engine: Engine;
1544
- /**
1545
- * A fully constructed/applied Client that references the parent
1546
- * PrismaClient. This is used for Client extensions only.
1547
- */
1548
- _appliedParent: any;
1549
- _createPrismaPromise: PrismaPromiseFactory;
1550
- /**
1551
- * Hook a middleware into the client
1552
- * @param middleware to hook
1553
- */
1554
- $use(middleware: QueryMiddleware): void;
1555
- $on<E extends ExtendedEventType>(eventType: E, callback: EventCallback<E>): void;
1556
- $connect(): Promise<void>;
1557
- /**
1558
- * Disconnect from the database
1559
- */
1560
- $disconnect(): Promise<void>;
1561
- /**
1562
- * Executes a raw query and always returns a number
1563
- */
1564
- $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>): Promise<number>;
1565
- /**
1566
- * Executes a raw query provided through a safe tag function
1567
- * @see https://github.com/prisma/prisma/issues/7142
1568
- *
1569
- * @param query
1570
- * @param values
1571
- * @returns
1572
- */
1573
- $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown, any>;
1574
- /**
1575
- * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections
1576
- * @see https://github.com/prisma/prisma/issues/7142
1577
- *
1578
- * @param query
1579
- * @param values
1580
- * @returns
1581
- */
1582
- $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown, any>;
1583
- /**
1584
- * Executes a raw command only for MongoDB
1585
- *
1586
- * @param command
1587
- * @returns
1588
- */
1589
- $runCommandRaw(command: Record<string, JsInputValue>): PrismaPromise_2<unknown, any>;
1590
- /**
1591
- * Executes a raw query and returns selected data
1592
- */
1593
- $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>): Promise<any>;
1594
- /**
1595
- * Executes a raw query provided through a safe tag function
1596
- * @see https://github.com/prisma/prisma/issues/7142
1597
- *
1598
- * @param query
1599
- * @param values
1600
- * @returns
1601
- */
1602
- $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown, any>;
1603
- /**
1604
- * Counterpart to $queryRaw, that returns strongly typed results
1605
- * @param typedSql
1606
- */
1607
- $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown, any>;
1608
- /**
1609
- * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections
1610
- * @see https://github.com/prisma/prisma/issues/7142
1611
- *
1612
- * @param query
1613
- * @param values
1614
- * @returns
1615
- */
1616
- $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown, any>;
1617
- /**
1618
- * Execute a batch of requests in a transaction
1619
- * @param requests
1620
- * @param options
1621
- */
1622
- _transactionWithArray({ promises, options, }: {
1623
- promises: Array<PrismaPromise_2<any>>;
1624
- options?: BatchTransactionOptions;
1625
- }): Promise<any>;
1626
- /**
1627
- * Perform a long-running transaction
1628
- * @param callback
1629
- * @param options
1630
- * @returns
1631
- */
1632
- _transactionWithCallback({ callback, options, }: {
1633
- callback: (client: Client) => Promise<unknown>;
1634
- options?: Options;
1635
- }): Promise<unknown>;
1636
- _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client;
1637
- /**
1638
- * Execute queries within a transaction
1639
- * @param input a callback or a query list
1640
- * @param options to set timeouts (callback)
1641
- * @returns
1642
- */
1643
- $transaction(input: any, options?: any): Promise<any>;
1644
- /**
1645
- * Runs the middlewares over params before executing a request
1646
- * @param internalParams
1647
- * @returns
1648
- */
1649
- _request(internalParams: InternalRequestParams): Promise<any>;
1650
- _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise<any>;
1651
- readonly $metrics: MetricsClient;
1652
- /**
1653
- * Shortcut for checking a preview flag
1654
- * @param feature preview flag
1655
- * @returns
1656
- */
1657
- _hasPreviewFlag(feature: string): boolean;
1658
- $applyPendingMigrations(): Promise<void>;
1659
- $extends: typeof $extends;
1660
- readonly [Symbol.toStringTag]: string;
1661
- };
1662
- };
1663
-
1664
- /**
1665
- * Config that is stored into the generated client. When the generated client is
1666
- * loaded, this same config is passed to {@link getPrismaClient} which creates a
1667
- * closure with that config around a non-instantiated [[PrismaClient]].
1668
- */
1669
- declare type GetPrismaClientConfig = {
1670
- runtimeDataModel: RuntimeDataModel;
1671
- generator?: GeneratorConfig;
1672
- relativeEnvPaths: {
1673
- rootEnvPath?: string | null;
1674
- schemaEnvPath?: string | null;
1675
- };
1676
- relativePath: string;
1677
- dirname: string;
1678
- filename?: string;
1679
- clientVersion: string;
1680
- engineVersion: string;
1681
- datasourceNames: string[];
1682
- activeProvider: ActiveConnectorType;
1683
- /**
1684
- * The contents of the schema encoded into a string
1685
- * @remarks only used for the purpose of data proxy
1686
- */
1687
- inlineSchema: string;
1688
- /**
1689
- * A special env object just for the data proxy edge runtime.
1690
- * Allows bundlers to inject their own env variables (Vercel).
1691
- * Allows platforms to declare global variables as env (Workers).
1692
- * @remarks only used for the purpose of data proxy
1693
- */
1694
- injectableEdgeEnv?: () => LoadedEnv;
1695
- /**
1696
- * The contents of the datasource url saved in a string.
1697
- * This can either be an env var name or connection string.
1698
- * It is needed by the client to connect to the Data Proxy.
1699
- * @remarks only used for the purpose of data proxy
1700
- */
1701
- inlineDatasources: {
1702
- [name in string]: {
1703
- url: EnvValue;
1704
- };
1705
- };
1706
- /**
1707
- * The string hash that was produced for a given schema
1708
- * @remarks only used for the purpose of data proxy
1709
- */
1710
- inlineSchemaHash: string;
1711
- /**
1712
- * A marker to indicate that the client was not generated via `prisma
1713
- * generate` but was generated via `generate --postinstall` script instead.
1714
- * @remarks used to error for Vercel/Netlify for schema caching issues
1715
- */
1716
- postinstall?: boolean;
1717
- /**
1718
- * Information about the CI where the Prisma Client has been generated. The
1719
- * name of the CI environment is stored at generation time because CI
1720
- * information is not always available at runtime. Moreover, the edge client
1721
- * has no notion of environment variables, so this works around that.
1722
- * @remarks used to error for Vercel/Netlify for schema caching issues
1723
- */
1724
- ciName?: string;
1725
- /**
1726
- * Information about whether we have not found a schema.prisma file in the
1727
- * default location, and that we fell back to finding the schema.prisma file
1728
- * in the current working directory. This usually means it has been bundled.
1729
- */
1730
- isBundled?: boolean;
1731
- /**
1732
- * A boolean that is `false` when the client was generated with --no-engine. At
1733
- * runtime, this means the client will be bound to be using the Data Proxy.
1734
- */
1735
- copyEngine?: boolean;
1736
- /**
1737
- * Optional wasm loading configuration
1738
- */
1739
- engineWasm?: EngineWasmLoadingConfig;
1740
- compilerWasm?: CompilerWasmLoadingConfig;
1741
- };
1742
-
1743
- export declare type GetResult<Payload extends OperationPayload, Args, OperationName extends Operation = 'findUniqueOrThrow', ClientOptions = {}> = {
1744
- findUnique: GetFindResult<Payload, Args, ClientOptions> | null;
1745
- findUniqueOrThrow: GetFindResult<Payload, Args, ClientOptions>;
1746
- findFirst: GetFindResult<Payload, Args, ClientOptions> | null;
1747
- findFirstOrThrow: GetFindResult<Payload, Args, ClientOptions>;
1748
- findMany: GetFindResult<Payload, Args, ClientOptions>[];
1749
- create: GetFindResult<Payload, Args, ClientOptions>;
1750
- createMany: GetBatchResult;
1751
- createManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
1752
- update: GetFindResult<Payload, Args, ClientOptions>;
1753
- updateMany: GetBatchResult;
1754
- updateManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
1755
- upsert: GetFindResult<Payload, Args, ClientOptions>;
1756
- delete: GetFindResult<Payload, Args, ClientOptions>;
1757
- deleteMany: GetBatchResult;
1758
- aggregate: GetAggregateResult<Payload, Args>;
1759
- count: GetCountResult<Args>;
1760
- groupBy: GetGroupByResult<Payload, Args>;
1761
- $queryRaw: unknown;
1762
- $queryRawTyped: unknown;
1763
- $executeRaw: number;
1764
- $queryRawUnsafe: unknown;
1765
- $executeRawUnsafe: number;
1766
- $runCommandRaw: JsonObject;
1767
- findRaw: JsonObject;
1768
- aggregateRaw: JsonObject;
1769
- }[OperationName];
1770
-
1771
- export declare function getRuntime(): GetRuntimeOutput;
1772
-
1773
- declare type GetRuntimeOutput = {
1774
- id: Runtime;
1775
- prettyName: string;
1776
- isEdge: boolean;
1777
- };
1778
-
1779
- export declare type GetSelect<Base extends Record<any, any>, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = {
1780
- [K in KR | keyof Base]?: K extends KR ? boolean : Base[K];
1781
- };
1782
-
1783
- declare type GlobalOmitOptions = {
1784
- [modelName: string]: {
1785
- [fieldName: string]: boolean;
1786
- };
1787
- };
1788
-
1789
- declare type HandleErrorParams = {
1790
- args: JsArgs;
1791
- error: any;
1792
- clientMethod: string;
1793
- callsite?: CallSite;
1794
- transaction?: PrismaPromiseTransaction;
1795
- modelName?: string;
1796
- globalOmit?: GlobalOmitOptions;
1797
- };
1798
-
1799
- declare type HrTime = [number, number];
1800
-
1801
- /**
1802
- * Defines High-Resolution Time.
1803
- *
1804
- * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.
1805
- * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.
1806
- * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.
1807
- * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds:
1808
- * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.
1809
- * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:
1810
- * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
1811
- * This is represented in HrTime format as [1609504210, 150000000].
1812
- */
1813
- declare type HrTime_2 = [number, number];
1814
-
1815
- /**
1816
- * Matches a JSON array.
1817
- * Unlike \`JsonArray\`, readonly arrays are assignable to this type.
1818
- */
1819
- export declare interface InputJsonArray extends ReadonlyArray<InputJsonValue | null> {
1820
- }
1821
-
1822
- /**
1823
- * Matches a JSON object.
1824
- * Unlike \`JsonObject\`, this type allows undefined and read-only properties.
1825
- */
1826
- export declare type InputJsonObject = {
1827
- readonly [Key in string]?: InputJsonValue | null;
1828
- };
1829
-
1830
- /**
1831
- * Matches any valid value that can be used as an input for operations like
1832
- * create and update as the value of a JSON field. Unlike \`JsonValue\`, this
1833
- * type allows read-only arrays and read-only object properties and disallows
1834
- * \`null\` at the top level.
1835
- *
1836
- * \`null\` cannot be used as the value of a JSON field because its meaning
1837
- * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or
1838
- * \`Prisma.DbNull\` to clear the JSON value and set the field to the database
1839
- * NULL value instead.
1840
- *
1841
- * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values
1842
- */
1843
- export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | {
1844
- toJSON(): unknown;
1845
- };
1846
-
1847
- declare type InteractiveTransactionInfo<Payload = unknown> = {
1848
- /**
1849
- * Transaction ID returned by the query engine.
1850
- */
1851
- id: string;
1852
- /**
1853
- * Arbitrary payload the meaning of which depends on the `Engine` implementation.
1854
- * For example, `DataProxyEngine` needs to associate different API endpoints with transactions.
1855
- * In `LibraryEngine` and `BinaryEngine` it is currently not used.
1856
- */
1857
- payload: Payload;
1858
- };
1859
-
1860
- declare type InteractiveTransactionOptions<Payload> = Transaction_2.InteractiveTransactionInfo<Payload>;
1861
-
1862
- export declare type InternalArgs<R = {
1863
- [K in string]: {
1864
- [K in string]: unknown;
1865
- };
1866
- }, M = {
1867
- [K in string]: {
1868
- [K in string]: unknown;
1869
- };
1870
- }, Q = {
1871
- [K in string]: {
1872
- [K in string]: unknown;
1873
- };
1874
- }, C = {
1875
- [K in string]: unknown;
1876
- }> = {
1877
- result: {
1878
- [K in keyof R]: {
1879
- [P in keyof R[K]]: () => R[K][P];
1880
- };
1881
- };
1882
- model: {
1883
- [K in keyof M]: {
1884
- [P in keyof M[K]]: () => M[K][P];
1885
- };
1886
- };
1887
- query: {
1888
- [K in keyof Q]: {
1889
- [P in keyof Q[K]]: () => Q[K][P];
1890
- };
1891
- };
1892
- client: {
1893
- [K in keyof C]: () => C[K];
1894
- };
1895
- };
1896
-
1897
- declare type InternalRequestParams = {
1898
- /**
1899
- * The original client method being called.
1900
- * Even though the rootField / operation can be changed,
1901
- * this method stays as it is, as it's what the user's
1902
- * code looks like
1903
- */
1904
- clientMethod: string;
1905
- /**
1906
- * Name of js model that triggered the request. Might be used
1907
- * for warnings or error messages
1908
- */
1909
- jsModelName?: string;
1910
- callsite?: CallSite;
1911
- transaction?: PrismaPromiseTransaction;
1912
- unpacker?: Unpacker;
1913
- otelParentCtx?: Context;
1914
- /** Used to "desugar" a user input into an "expanded" one */
1915
- argsMapper?: (args?: UserArgs_2) => UserArgs_2;
1916
- /** Used to convert args for middleware and back */
1917
- middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>;
1918
- /** Used for Accelerate client extension via Data Proxy */
1919
- customDataProxyFetch?: CustomDataProxyFetch;
1920
- } & Omit<QueryMiddlewareParams, 'runInTransaction'>;
1921
-
1922
- declare enum IsolationLevel {
1923
- ReadUncommitted = "ReadUncommitted",
1924
- ReadCommitted = "ReadCommitted",
1925
- RepeatableRead = "RepeatableRead",
1926
- Snapshot = "Snapshot",
1927
- Serializable = "Serializable"
1928
- }
1929
-
1930
- declare function isSkip(value: unknown): value is Skip;
1931
-
1932
- export declare function isTypedSql(value: unknown): value is UnknownTypedSql;
1933
-
1934
- export declare type ITXClientDenyList = (typeof denylist)[number];
1935
-
1936
- export declare const itxClientDenyList: readonly (string | symbol)[];
1937
-
1938
- declare interface Job {
1939
- resolve: (data: any) => void;
1940
- reject: (data: any) => void;
1941
- request: any;
1942
- }
1943
-
1944
- /**
1945
- * Create a SQL query for a list of values.
1946
- */
1947
- export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql;
1948
-
1949
- export declare type JsArgs = {
1950
- select?: Selection_2;
1951
- include?: Selection_2;
1952
- omit?: Omission;
1953
- [argName: string]: JsInputValue;
1954
- };
1955
-
1956
- export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef<string, unknown> | JsInputValue[] | Skip | {
1957
- [key: string]: JsInputValue;
1958
- };
1959
-
1960
- declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | {
1961
- [key: string]: JsonArgumentValue;
1962
- };
1963
-
1964
- /**
1965
- * From https://github.com/sindresorhus/type-fest/
1966
- * Matches a JSON array.
1967
- */
1968
- export declare interface JsonArray extends Array<JsonValue> {
1969
- }
1970
-
1971
- export declare type JsonBatchQuery = {
1972
- batch: JsonQuery[];
1973
- transaction?: {
1974
- isolationLevel?: Transaction_2.IsolationLevel;
1975
- };
1976
- };
1977
-
1978
- export declare interface JsonConvertible {
1979
- toJSON(): unknown;
1980
- }
1981
-
1982
- declare type JsonFieldSelection = {
1983
- arguments?: Record<string, JsonArgumentValue> | RawTaggedValue;
1984
- selection: JsonSelectionSet;
1985
- };
1986
-
1987
- declare class JsonNull extends NullTypesEnumValue {
1988
- }
1989
-
1990
- /**
1991
- * From https://github.com/sindresorhus/type-fest/
1992
- * Matches a JSON object.
1993
- * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from.
1994
- */
1995
- export declare type JsonObject = {
1996
- [Key in string]?: JsonValue;
1997
- };
1998
-
1999
- export declare type JsonQuery = {
2000
- modelName?: string;
2001
- action: JsonQueryAction;
2002
- query: JsonFieldSelection;
2003
- };
2004
-
2005
- declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw';
2006
-
2007
- declare type JsonSelectionSet = {
2008
- $scalars?: boolean;
2009
- $composites?: boolean;
2010
- } & {
2011
- [fieldName: string]: boolean | JsonFieldSelection;
2012
- };
2013
-
2014
- /**
2015
- * From https://github.com/sindresorhus/type-fest/
2016
- * Matches any valid JSON value.
2017
- */
2018
- export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null;
2019
-
2020
- export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | {
2021
- [key: string]: JsOutputValue;
2022
- };
2023
-
2024
- export declare type JsPromise<T> = Promise<T> & {};
2025
-
2026
- declare type KnownErrorParams = {
2027
- code: string;
2028
- clientVersion: string;
2029
- meta?: Record<string, unknown>;
2030
- batchRequestIdx?: number;
2031
- };
2032
-
2033
- /**
2034
- * A pointer from the current {@link Span} to another span in the same trace or
2035
- * in a different trace.
2036
- * Few examples of Link usage.
2037
- * 1. Batch Processing: A batch of elements may contain elements associated
2038
- * with one or more traces/spans. Since there can only be one parent
2039
- * SpanContext, Link is used to keep reference to SpanContext of all
2040
- * elements in the batch.
2041
- * 2. Public Endpoint: A SpanContext in incoming client request on a public
2042
- * endpoint is untrusted from service provider perspective. In such case it
2043
- * is advisable to start a new trace with appropriate sampling decision.
2044
- * However, it is desirable to associate incoming SpanContext to new trace
2045
- * initiated on service provider side so two traces (from Client and from
2046
- * Service Provider) can be correlated.
2047
- */
2048
- declare interface Link {
2049
- /** The {@link SpanContext} of a linked span. */
2050
- context: SpanContext;
2051
- /** A set of {@link SpanAttributes} on the link. */
2052
- attributes?: SpanAttributes;
2053
- /** Count of attributes of the link that were dropped due to collection limits */
2054
- droppedAttributesCount?: number;
2055
- }
2056
-
2057
- declare type LoadedEnv = {
2058
- message?: string;
2059
- parsed: {
2060
- [x: string]: string;
2061
- };
2062
- } | undefined;
2063
-
2064
- declare type LocationInFile = {
2065
- fileName: string;
2066
- lineNumber: number | null;
2067
- columnNumber: number | null;
2068
- };
2069
-
2070
- declare type LogDefinition = {
2071
- level: LogLevel;
2072
- emit: 'stdout' | 'event';
2073
- };
2074
-
2075
- /**
2076
- * Typings for the events we emit.
2077
- *
2078
- * @remarks
2079
- * If this is updated, our edge runtime shim needs to be updated as well.
2080
- */
2081
- declare type LogEmitter = {
2082
- on<E extends EngineEventType>(event: E, listener: (event: EngineEvent<E>) => void): LogEmitter;
2083
- emit(event: QueryEventType, payload: QueryEvent): boolean;
2084
- emit(event: LogEventType, payload: LogEvent): boolean;
2085
- };
2086
-
2087
- declare type LogEvent = {
2088
- timestamp: Date;
2089
- message: string;
2090
- target: string;
2091
- };
2092
-
2093
- declare type LogEventType = 'info' | 'warn' | 'error';
2094
-
2095
- declare type LogLevel = 'info' | 'query' | 'warn' | 'error';
2096
-
2097
- /**
2098
- * Generates more strict variant of an enum which, unlike regular enum,
2099
- * throws on non-existing property access. This can be useful in following situations:
2100
- * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input
2101
- * - enum values are generated dynamically from DMMF.
2102
- *
2103
- * In that case, if using normal enums and no compile-time typechecking, using non-existing property
2104
- * will result in `undefined` value being used, which will be accepted. Using strict enum
2105
- * in this case will help to have a runtime exception, telling you that you are probably doing something wrong.
2106
- *
2107
- * Note: if you need to check for existence of a value in the enum you can still use either
2108
- * `in` operator or `hasOwnProperty` function.
2109
- *
2110
- * @param definition
2111
- * @returns
2112
- */
2113
- export declare function makeStrictEnum<T extends Record<PropertyKey, string | number>>(definition: T): T;
2114
-
2115
- export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql<any[], unknown>;
2116
-
2117
- /**
2118
- * Class that holds the list of all extensions, applied to particular instance,
2119
- * as well as resolved versions of the components that need to apply on
2120
- * different levels. Main idea of this class: avoid re-resolving as much of the
2121
- * stuff as possible when new extensions are added while also delaying the
2122
- * resolve until the point it is actually needed. For example, computed fields
2123
- * of the model won't be resolved unless the model is actually queried. Neither
2124
- * adding extensions with `client` component only cause other components to
2125
- * recompute.
2126
- */
2127
- declare class MergedExtensionsList {
2128
- private head?;
2129
- private constructor();
2130
- static empty(): MergedExtensionsList;
2131
- static single(extension: ExtensionArgs): MergedExtensionsList;
2132
- isEmpty(): boolean;
2133
- append(extension: ExtensionArgs): MergedExtensionsList;
2134
- getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined;
2135
- getAllClientExtensions(): ClientArg | undefined;
2136
- getAllModelExtensions(dmmfModelName: string): ModelArg | undefined;
2137
- getAllQueryCallbacks(jsModelName: string, operation: string): any;
2138
- getAllBatchQueryCallbacks(): BatchQueryOptionsCb[];
2139
- }
2140
-
2141
- export declare type MergeExtArgs<TypeMap extends TypeMapDef, ExtArgs extends Record<any, any>, Args extends Record<any, any>> = ComputeDeep<ExtArgs & Args & AllModelsToStringIndex<TypeMap, Args, 'result'> & AllModelsToStringIndex<TypeMap, Args, 'model'>>;
2142
-
2143
- export declare type Metric<T> = {
2144
- key: string;
2145
- value: T;
2146
- labels: Record<string, string>;
2147
- description: string;
2148
- };
2149
-
2150
- export declare type MetricHistogram = {
2151
- buckets: MetricHistogramBucket[];
2152
- sum: number;
2153
- count: number;
2154
- };
2155
-
2156
- export declare type MetricHistogramBucket = [maxValue: number, count: number];
2157
-
2158
- export declare type Metrics = {
2159
- counters: Metric<number>[];
2160
- gauges: Metric<number>[];
2161
- histograms: Metric<MetricHistogram>[];
2162
- };
2163
-
2164
- export declare class MetricsClient {
2165
- private _engine;
2166
- constructor(engine: Engine);
2167
- /**
2168
- * Returns all metrics gathered up to this point in prometheus format.
2169
- * Result of this call can be exposed directly to prometheus scraping endpoint
2170
- *
2171
- * @param options
2172
- * @returns
2173
- */
2174
- prometheus(options?: MetricsOptions): Promise<string>;
2175
- /**
2176
- * Returns all metrics gathered up to this point in prometheus format.
2177
- *
2178
- * @param options
2179
- * @returns
2180
- */
2181
- json(options?: MetricsOptions): Promise<Metrics>;
2182
- }
2183
-
2184
- declare type MetricsOptions = {
2185
- /**
2186
- * Labels to add to every metrics in key-value format
2187
- */
2188
- globalLabels?: Record<string, string>;
2189
- };
2190
-
2191
- declare type MetricsOptionsCommon = {
2192
- globalLabels?: Record<string, string>;
2193
- };
2194
-
2195
- declare type MetricsOptionsJson = {
2196
- format: 'json';
2197
- } & MetricsOptionsCommon;
2198
-
2199
- declare type MetricsOptionsPrometheus = {
2200
- format: 'prometheus';
2201
- } & MetricsOptionsCommon;
2202
-
2203
- declare type MiddlewareArgsMapper<RequestArgs, MiddlewareArgs> = {
2204
- requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs;
2205
- middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs;
2206
- };
2207
-
2208
- declare class MiddlewareHandler<M extends Function> {
2209
- private _middlewares;
2210
- use(middleware: M): void;
2211
- get(id: number): M | undefined;
2212
- has(id: number): boolean;
2213
- length(): number;
2214
- }
2215
-
2216
- export declare type ModelArg = {
2217
- [MethodName in string]: unknown;
2218
- };
2219
-
2220
- export declare type ModelArgs = {
2221
- model: {
2222
- [ModelName in string]: ModelArg;
2223
- };
2224
- };
2225
-
2226
- export declare type ModelKey<TypeMap extends TypeMapDef, M extends PropertyKey> = M extends keyof TypeMap['model'] ? M : Capitalize<M & string>;
2227
-
2228
- export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise<any>;
2229
-
2230
- export declare type ModelQueryOptionsCbArgs = {
2231
- model: string;
2232
- operation: string;
2233
- args: JsArgs;
2234
- query: (args: JsArgs) => Promise<unknown>;
2235
- };
2236
-
2237
- export declare type NameArgs = {
2238
- name?: string;
2239
- };
2240
-
2241
- export declare type Narrow<A> = {
2242
- [K in keyof A]: A[K] extends Function ? A[K] : Narrow<A[K]>;
2243
- } | (A extends Narrowable ? A : never);
2244
-
2245
- export declare type Narrowable = string | number | bigint | boolean | [];
2246
-
2247
- export declare type NeverToUnknown<T> = [T] extends [never] ? unknown : T;
2248
-
2249
- declare class NullTypesEnumValue extends ObjectEnumValue {
2250
- _getNamespace(): string;
2251
- }
2252
-
2253
- /**
2254
- * List of Prisma enums that must use unique objects instead of strings as their values.
2255
- */
2256
- export declare const objectEnumNames: string[];
2257
-
2258
- /**
2259
- * Base class for unique values of object-valued enums.
2260
- */
2261
- export declare abstract class ObjectEnumValue {
2262
- constructor(arg?: symbol);
2263
- abstract _getNamespace(): string;
2264
- _getName(): string;
2265
- toString(): string;
2266
- }
2267
-
2268
- export declare const objectEnumValues: {
2269
- classes: {
2270
- DbNull: typeof DbNull;
2271
- JsonNull: typeof JsonNull;
2272
- AnyNull: typeof AnyNull;
2273
- };
2274
- instances: {
2275
- DbNull: DbNull;
2276
- JsonNull: JsonNull;
2277
- AnyNull: AnyNull;
2278
- };
2279
- };
2280
-
2281
- declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"];
2282
-
2283
- export declare type Omission = Record<string, boolean | Skip>;
2284
-
2285
- declare type Omit_2<T, K extends string | number | symbol> = {
2286
- [P in keyof T as P extends K ? never : P]: T[P];
2287
- };
2288
- export { Omit_2 as Omit }
2289
-
2290
- export declare type OmitValue<Omit, Key> = Key extends keyof Omit ? Omit[Key] : false;
2291
-
2292
- export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw';
2293
-
2294
- export declare type OperationPayload = {
2295
- name: string;
2296
- scalars: {
2297
- [ScalarName in string]: unknown;
2298
- };
2299
- objects: {
2300
- [ObjectName in string]: unknown;
2301
- };
2302
- composites: {
2303
- [CompositeName in string]: unknown;
2304
- };
2305
- };
2306
-
2307
- export declare type Optional<O, K extends keyof any = keyof O> = {
2308
- [P in K & keyof O]?: O[P];
2309
- } & {
2310
- [P in Exclude<keyof O, K>]: O[P];
2311
- };
2312
-
2313
- export declare type OptionalFlat<T> = {
2314
- [K in keyof T]?: T[K];
2315
- };
2316
-
2317
- export declare type OptionalKeys<O> = {
2318
- [K in keyof O]-?: {} extends Pick_2<O, K> ? K : never;
2319
- }[keyof O];
2320
-
2321
- declare type Options = {
2322
- maxWait?: number;
2323
- timeout?: number;
2324
- isolationLevel?: IsolationLevel;
2325
- };
2326
-
2327
- declare type Options_2 = {
2328
- clientVersion: string;
2329
- };
2330
-
2331
- export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
2332
- 0: {
2333
- 0: 0;
2334
- 1: 1;
2335
- };
2336
- 1: {
2337
- 0: 1;
2338
- 1: 1;
2339
- };
2340
- }[A][B];
2341
-
2342
- export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>;
2343
-
2344
- export declare type Param<out $Type, $Value extends string> = {
2345
- readonly name: $Value;
2346
- };
2347
-
2348
- export declare type PatchFlat<O1, O2> = O1 & Omit_2<O2, keyof O1>;
2349
-
2350
- export declare type Path<O, P, Default = never> = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path<O[K], R> : Default : O : never;
2351
-
2352
- export declare type Payload<T, F extends Operation = never> = T extends {
2353
- [K: symbol]: {
2354
- types: {
2355
- payload: any;
2356
- };
2357
- };
2358
- } ? T[symbol]['types']['payload'] : any;
2359
-
2360
- export declare type PayloadToResult<P, O extends Record_2<any, any> = RenameAndNestPayloadKeys<P>> = {
2361
- [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult<O[K][K][number]>[] : O[K][K] extends object ? PayloadToResult<O[K][K]> : O[K][K];
2362
- };
2363
-
2364
- declare type Pick_2<T, K extends string | number | symbol> = {
2365
- [P in keyof T as P extends K ? P : never]: T[P];
2366
- };
2367
- export { Pick_2 as Pick }
2368
-
2369
- export declare class PrismaClientInitializationError extends Error {
2370
- clientVersion: string;
2371
- errorCode?: string;
2372
- retryable?: boolean;
2373
- constructor(message: string, clientVersion: string, errorCode?: string);
2374
- get [Symbol.toStringTag](): string;
2375
- }
2376
-
2377
- export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex {
2378
- code: string;
2379
- meta?: Record<string, unknown>;
2380
- clientVersion: string;
2381
- batchRequestIdx?: number;
2382
- constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams);
2383
- get [Symbol.toStringTag](): string;
2384
- }
2385
-
2386
- export declare type PrismaClientOptions = {
2387
- /**
2388
- * Overwrites the primary datasource url from your schema.prisma file
2389
- */
2390
- datasourceUrl?: string;
2391
- /**
2392
- * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale.
2393
- */
2394
- adapter?: DriverAdapter | null;
2395
- /**
2396
- * Overwrites the datasource url from your schema.prisma file
2397
- */
2398
- datasources?: Datasources;
2399
- /**
2400
- * @default "colorless"
2401
- */
2402
- errorFormat?: ErrorFormat;
2403
- /**
2404
- * The default values for Transaction options
2405
- * maxWait ?= 2000
2406
- * timeout ?= 5000
2407
- */
2408
- transactionOptions?: Transaction_2.Options;
2409
- /**
2410
- * @example
2411
- * \`\`\`
2412
- * // Defaults to stdout
2413
- * log: ['query', 'info', 'warn']
2414
- *
2415
- * // Emit as events
2416
- * log: [
2417
- * { emit: 'stdout', level: 'query' },
2418
- * { emit: 'stdout', level: 'info' },
2419
- * { emit: 'stdout', level: 'warn' }
2420
- * ]
2421
- * \`\`\`
2422
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
2423
- */
2424
- log?: Array<LogLevel | LogDefinition>;
2425
- omit?: GlobalOmitOptions;
2426
- /**
2427
- * @internal
2428
- * You probably don't want to use this. \`__internal\` is used by internal tooling.
2429
- */
2430
- __internal?: {
2431
- debug?: boolean;
2432
- engine?: {
2433
- cwd?: string;
2434
- binaryPath?: string;
2435
- endpoint?: string;
2436
- allowTriggerPanic?: boolean;
2437
- };
2438
- /** This can be used for testing purposes */
2439
- configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig;
2440
- };
2441
- };
2442
-
2443
- export declare class PrismaClientRustPanicError extends Error {
2444
- clientVersion: string;
2445
- constructor(message: string, clientVersion: string);
2446
- get [Symbol.toStringTag](): string;
2447
- }
2448
-
2449
- export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex {
2450
- clientVersion: string;
2451
- batchRequestIdx?: number;
2452
- constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams);
2453
- get [Symbol.toStringTag](): string;
2454
- }
2455
-
2456
- export declare class PrismaClientValidationError extends Error {
2457
- name: string;
2458
- clientVersion: string;
2459
- constructor(message: string, { clientVersion }: Options_2);
2460
- get [Symbol.toStringTag](): string;
2461
- }
2462
-
2463
- declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError;
2464
-
2465
- declare type PrismaOperationSpec<TArgs, TAction = string> = {
2466
- args: TArgs;
2467
- action: TAction;
2468
- model: string;
2469
- };
2470
-
2471
- export declare interface PrismaPromise<T> extends Promise<T> {
2472
- [Symbol.toStringTag]: 'PrismaPromise';
2473
- }
2474
-
2475
- /**
2476
- * Prisma's `Promise` that is backwards-compatible. All additions on top of the
2477
- * original `Promise` are optional so that it can be backwards-compatible.
2478
- * @see [[createPrismaPromise]]
2479
- */
2480
- declare interface PrismaPromise_2<TResult, TSpec extends PrismaOperationSpec<unknown> = any> extends Promise<TResult> {
2481
- get spec(): TSpec;
2482
- /**
2483
- * Extension of the original `.then` function
2484
- * @param onfulfilled same as regular promises
2485
- * @param onrejected same as regular promises
2486
- * @param transaction transaction options
2487
- */
2488
- then<R1 = TResult, R2 = never>(onfulfilled?: (value: TResult) => R1 | PromiseLike<R1>, onrejected?: (error: unknown) => R2 | PromiseLike<R2>, transaction?: PrismaPromiseTransaction): Promise<R1 | R2>;
2489
- /**
2490
- * Extension of the original `.catch` function
2491
- * @param onrejected same as regular promises
2492
- * @param transaction transaction options
2493
- */
2494
- catch<R = never>(onrejected?: ((reason: any) => R | PromiseLike<R>) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<TResult | R>;
2495
- /**
2496
- * Extension of the original `.finally` function
2497
- * @param onfinally same as regular promises
2498
- * @param transaction transaction options
2499
- */
2500
- finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<TResult>;
2501
- /**
2502
- * Called when executing a batch of regular tx
2503
- * @param transaction transaction options for batch tx
2504
- */
2505
- requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike<unknown>;
2506
- }
2507
-
2508
- declare type PrismaPromiseBatchTransaction = {
2509
- kind: 'batch';
2510
- id: number;
2511
- isolationLevel?: IsolationLevel;
2512
- index: number;
2513
- lock: PromiseLike<void>;
2514
- };
2515
-
2516
- declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => Promise<unknown>;
2517
-
2518
- /**
2519
- * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which
2520
- * is essentially a proxy for `Promise`. All the transaction-compatible client
2521
- * methods return one, this allows for pre-preparing queries without executing
2522
- * them until `.then` is called. It's the foundation of Prisma's query batching.
2523
- * @param callback that will be wrapped within our promise implementation
2524
- * @see [[PrismaPromise]]
2525
- * @returns
2526
- */
2527
- declare type PrismaPromiseFactory = <T extends PrismaOperationSpec<unknown>>(callback: PrismaPromiseCallback, op?: T) => PrismaPromise_2<unknown>;
2528
-
2529
- declare type PrismaPromiseInteractiveTransaction<PayloadType = unknown> = {
2530
- kind: 'itx';
2531
- id: string;
2532
- payload: PayloadType;
2533
- };
2534
-
2535
- declare type PrismaPromiseTransaction<PayloadType = unknown> = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction<PayloadType>;
2536
-
2537
- export declare const PrivateResultType: unique symbol;
2538
-
2539
- declare namespace Public {
2540
- export {
2541
- validator
2542
- }
2543
- }
2544
- export { Public }
2545
-
2546
- declare namespace Public_2 {
2547
- export {
2548
- Args,
2549
- Result,
2550
- Payload,
2551
- PrismaPromise,
2552
- Operation,
2553
- Exact
2554
- }
2555
- }
2556
-
2557
- declare type Query = {
2558
- sql: string;
2559
- args: Array<unknown>;
2560
- argTypes: Array<ArgType>;
2561
- };
2562
-
2563
- declare interface Queryable {
2564
- readonly provider: Flavour;
2565
- readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {});
2566
- /**
2567
- * Execute a query given as SQL, interpolating the given parameters,
2568
- * and returning the type-aware result set of the query.
2569
- *
2570
- * This is the preferred way of executing `SELECT` queries.
2571
- */
2572
- queryRaw(params: Query): Promise<Result_4<ResultSet>>;
2573
- /**
2574
- * Execute a query given as SQL, interpolating the given parameters,
2575
- * and returning the number of affected rows.
2576
- *
2577
- * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries,
2578
- * as well as transactional queries.
2579
- */
2580
- executeRaw(params: Query): Promise<Result_4<number>>;
2581
- }
2582
-
2583
- declare type QueryCompiler = {
2584
- compile(request: string): Promise<string>;
2585
- };
2586
-
2587
- declare interface QueryCompilerConstructor {
2588
- new (options: QueryCompilerOptions): QueryCompiler;
2589
- }
2590
-
2591
- declare type QueryCompilerOptions = {
2592
- datamodel: string;
2593
- flavour: Flavour;
2594
- connectionInfo: ConnectionInfo;
2595
- };
2596
-
2597
- declare type QueryEngineBatchGraphQLRequest = {
2598
- batch: QueryEngineRequest[];
2599
- transaction?: boolean;
2600
- isolationLevel?: Transaction_2.IsolationLevel;
2601
- };
2602
-
2603
- declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery;
2604
-
2605
- declare type QueryEngineConfig = {
2606
- datamodel: string;
2607
- configDir: string;
2608
- logQueries: boolean;
2609
- ignoreEnvVarErrors: boolean;
2610
- datasourceOverrides: Record<string, string>;
2611
- env: Record<string, string | undefined>;
2612
- logLevel: QueryEngineLogLevel;
2613
- engineProtocol: EngineProtocol;
2614
- enableTracing: boolean;
2615
- };
2616
-
2617
- declare interface QueryEngineConstructor {
2618
- new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance;
2619
- }
2620
-
2621
- declare type QueryEngineInstance = {
2622
- connect(headers: string, requestId: string): Promise<void>;
2623
- disconnect(headers: string, requestId: string): Promise<void>;
2624
- /**
2625
- * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest`
2626
- * @param headersStr JSON.stringified `QueryEngineRequestHeaders`
2627
- */
2628
- query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise<string>;
2629
- sdlSchema?(): Promise<string>;
2630
- startTransaction(options: string, traceHeaders: string, requestId: string): Promise<string>;
2631
- commitTransaction(id: string, traceHeaders: string, requestId: string): Promise<string>;
2632
- rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise<string>;
2633
- metrics?(options: string): Promise<string>;
2634
- applyPendingMigrations?(): Promise<void>;
2635
- trace(requestId: string): Promise<string | null>;
2636
- };
2637
-
2638
- declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off';
2639
-
2640
- declare type QueryEngineRequest = {
2641
- query: string;
2642
- variables: Object;
2643
- };
2644
-
2645
- declare type QueryEngineResultData<T> = {
2646
- data: T;
2647
- };
2648
-
2649
- declare type QueryEvent = {
2650
- timestamp: Date;
2651
- query: string;
2652
- params: string;
2653
- duration: number;
2654
- target: string;
2655
- };
2656
-
2657
- declare type QueryEventType = 'query';
2658
-
2659
- declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown';
2660
-
2661
- declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise<unknown>) => Promise<unknown>;
2662
-
2663
- declare type QueryMiddlewareParams = {
2664
- /** The model this is executed on */
2665
- model?: string;
2666
- /** The action that is being handled */
2667
- action: Action;
2668
- /** TODO what is this */
2669
- dataPath: string[];
2670
- /** TODO what is this */
2671
- runInTransaction: boolean;
2672
- args?: UserArgs_2;
2673
- };
2674
-
2675
- export declare type QueryOptions = {
2676
- query: {
2677
- [ModelName in string]: {
2678
- [ModelAction in string]: ModelQueryOptionsCb;
2679
- } | QueryOptionsCb;
2680
- };
2681
- };
2682
-
2683
- export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise<any>;
2684
-
2685
- export declare type QueryOptionsCbArgs = {
2686
- model?: string;
2687
- operation: string;
2688
- args: JsArgs | RawQueryArgs;
2689
- query: (args: JsArgs | RawQueryArgs) => Promise<unknown>;
2690
- };
2691
-
2692
- /**
2693
- * Create raw SQL statement.
2694
- */
2695
- export declare function raw(value: string): Sql;
2696
-
2697
- export declare type RawParameters = {
2698
- __prismaRawParameters__: true;
2699
- values: string;
2700
- };
2701
-
2702
- export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]];
2703
-
2704
- declare type RawResponse = {
2705
- columns: string[];
2706
- types: QueryIntrospectionBuiltinType[];
2707
- rows: unknown[][];
2708
- };
2709
-
2710
- declare type RawTaggedValue = {
2711
- $type: 'Raw';
2712
- value: unknown;
2713
- };
2714
-
2715
- /**
2716
- * Supported value or SQL instance.
2717
- */
2718
- export declare type RawValue = Value | Sql;
2719
-
2720
- export declare type ReadonlyDeep<T> = {
2721
- readonly [K in keyof T]: ReadonlyDeep<T[K]>;
2722
- };
2723
-
2724
- declare type ReadonlyDeep_2<O> = {
2725
- +readonly [K in keyof O]: ReadonlyDeep_2<O[K]>;
2726
- };
2727
-
2728
- declare type Record_2<T extends string | number | symbol, U> = {
2729
- [P in T]: U;
2730
- };
2731
- export { Record_2 as Record }
2732
-
2733
- export declare type RenameAndNestPayloadKeys<P> = {
2734
- [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K];
2735
- };
2736
-
2737
- declare type RequestBatchOptions<InteractiveTransactionPayload> = {
2738
- transaction?: TransactionOptions_2<InteractiveTransactionPayload>;
2739
- traceparent?: string;
2740
- numTry?: number;
2741
- containsWrite: boolean;
2742
- customDataProxyFetch?: CustomDataProxyFetch;
2743
- };
2744
-
2745
- declare interface RequestError {
2746
- error: string;
2747
- user_facing_error: {
2748
- is_panic: boolean;
2749
- message: string;
2750
- meta?: Record<string, unknown>;
2751
- error_code?: string;
2752
- batch_request_idx?: number;
2753
- };
2754
- }
2755
-
2756
- declare class RequestHandler {
2757
- client: Client;
2758
- dataloader: DataLoader<RequestParams>;
2759
- private logEmitter?;
2760
- constructor(client: Client, logEmitter?: LogEmitter);
2761
- request(params: RequestParams): Promise<any>;
2762
- mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData<any>): any;
2763
- /**
2764
- * Handles the error and logs it, logging the error is done synchronously waiting for the event
2765
- * handlers to finish.
2766
- */
2767
- handleAndLogRequestError(params: HandleErrorParams): never;
2768
- handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never;
2769
- sanitizeMessage(message: any): any;
2770
- unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any;
2771
- get [Symbol.toStringTag](): string;
2772
- }
2773
-
2774
- declare type RequestOptions<InteractiveTransactionPayload> = {
2775
- traceparent?: string;
2776
- numTry?: number;
2777
- interactiveTransaction?: InteractiveTransactionOptions<InteractiveTransactionPayload>;
2778
- isWrite: boolean;
2779
- customDataProxyFetch?: CustomDataProxyFetch;
2780
- };
2781
-
2782
- declare type RequestParams = {
2783
- modelName?: string;
2784
- action: Action;
2785
- protocolQuery: JsonQuery;
2786
- dataPath: string[];
2787
- clientMethod: string;
2788
- callsite?: CallSite;
2789
- transaction?: PrismaPromiseTransaction;
2790
- extensions: MergedExtensionsList;
2791
- args?: any;
2792
- headers?: Record<string, string>;
2793
- unpacker?: Unpacker;
2794
- otelParentCtx?: Context;
2795
- otelChildCtx?: Context;
2796
- globalOmit?: GlobalOmitOptions;
2797
- customDataProxyFetch?: CustomDataProxyFetch;
2798
- };
2799
-
2800
- declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions;
2801
- export { RequiredExtensionArgs }
2802
- export { RequiredExtensionArgs as UserArgs }
2803
-
2804
- export declare type RequiredKeys<O> = {
2805
- [K in keyof O]-?: {} extends Pick_2<O, K> ? never : K;
2806
- }[keyof O];
2807
-
2808
- declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: {
2809
- inlineDatasources: GetPrismaClientConfig['inlineDatasources'];
2810
- overrideDatasources: Datasources;
2811
- env: Record<string, string | undefined>;
2812
- clientVersion: string;
2813
- }): string;
2814
-
2815
- export declare type Result<T, A, F extends Operation> = T extends {
2816
- [K: symbol]: {
2817
- types: {
2818
- payload: any;
2819
- };
2820
- };
2821
- } ? GetResult<T[symbol]['types']['payload'], A, F> : GetResult<{
2822
- composites: {};
2823
- objects: {};
2824
- scalars: {};
2825
- name: '';
2826
- }, {}, F>;
2827
-
2828
- export declare type Result_2<T, A, F extends Operation> = Result<T, A, F>;
2829
-
2830
- declare namespace Result_3 {
2831
- export {
2832
- Operation,
2833
- FluentOperation,
2834
- Count,
2835
- GetFindResult,
2836
- SelectablePayloadFields,
2837
- SelectField,
2838
- DefaultSelection,
2839
- UnwrapPayload,
2840
- ApplyOmit,
2841
- OmitValue,
2842
- GetCountResult,
2843
- Aggregate,
2844
- GetAggregateResult,
2845
- GetBatchResult,
2846
- GetGroupByResult,
2847
- GetResult,
2848
- ExtractGlobalOmit
2849
- }
2850
- }
2851
-
2852
- declare type Result_4<T> = {
2853
- map<U>(fn: (value: T) => U): Result_4<U>;
2854
- flatMap<U>(fn: (value: T) => Result_4<U>): Result_4<U>;
2855
- } & ({
2856
- readonly ok: true;
2857
- readonly value: T;
2858
- } | {
2859
- readonly ok: false;
2860
- readonly error: Error_2;
2861
- });
2862
-
2863
- export declare type ResultArg = {
2864
- [FieldName in string]: ResultFieldDefinition;
2865
- };
2866
-
2867
- export declare type ResultArgs = {
2868
- result: {
2869
- [ModelName in string]: ResultArg;
2870
- };
2871
- };
2872
-
2873
- export declare type ResultArgsFieldCompute = (model: any) => unknown;
2874
-
2875
- export declare type ResultFieldDefinition = {
2876
- needs?: {
2877
- [FieldName in string]: boolean;
2878
- };
2879
- compute: ResultArgsFieldCompute;
2880
- };
2881
-
2882
- declare interface ResultSet {
2883
- /**
2884
- * List of column types appearing in a database query, in the same order as `columnNames`.
2885
- * They are used within the Query Engine to convert values from JS to Quaint values.
2886
- */
2887
- columnTypes: Array<ColumnType>;
2888
- /**
2889
- * List of column names appearing in a database query, in the same order as `columnTypes`.
2890
- */
2891
- columnNames: Array<string>;
2892
- /**
2893
- * List of rows retrieved from a database query.
2894
- * Each row is a list of values, whose length matches `columnNames` and `columnTypes`.
2895
- */
2896
- rows: Array<Array<unknown>>;
2897
- /**
2898
- * The last ID of an `INSERT` statement, if any.
2899
- * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite.
2900
- */
2901
- lastInsertId?: string;
2902
- }
2903
-
2904
- export declare type Return<T> = T extends (...args: any[]) => infer R ? R : T;
2905
-
2906
- declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown";
2907
-
2908
- export declare type RuntimeDataModel = {
2909
- readonly models: Record<string, RuntimeModel>;
2910
- readonly enums: Record<string, RuntimeEnum>;
2911
- readonly types: Record<string, RuntimeModel>;
2912
- };
2913
-
2914
- declare type RuntimeEnum = Omit<DMMF.DatamodelEnum, 'name'>;
2915
-
2916
- declare type RuntimeModel = Omit<DMMF.Model, 'name'>;
2917
-
2918
- export declare type Select<T, U> = T extends U ? T : never;
2919
-
2920
- export declare type SelectablePayloadFields<K extends PropertyKey, O> = {
2921
- objects: {
2922
- [k in K]: O;
2923
- };
2924
- } | {
2925
- composites: {
2926
- [k in K]: O;
2927
- };
2928
- };
2929
-
2930
- export declare type SelectField<P extends SelectablePayloadFields<any, any>, K extends PropertyKey> = P extends {
2931
- objects: Record<K, any>;
2932
- } ? P['objects'][K] : P extends {
2933
- composites: Record<K, any>;
2934
- } ? P['composites'][K] : never;
2935
-
2936
- declare type Selection_2 = Record<string, boolean | Skip | JsArgs>;
2937
- export { Selection_2 as Selection }
2938
-
2939
- export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery;
2940
-
2941
- declare type SerializeParams = {
2942
- runtimeDataModel: RuntimeDataModel;
2943
- modelName?: string;
2944
- action: Action;
2945
- args?: JsArgs;
2946
- extensions?: MergedExtensionsList;
2947
- callsite?: CallSite;
2948
- clientMethod: string;
2949
- clientVersion: string;
2950
- errorFormat: ErrorFormat;
2951
- previewFeatures: string[];
2952
- globalOmit?: GlobalOmitOptions;
2953
- };
2954
-
2955
- declare class Skip {
2956
- constructor(param?: symbol);
2957
- ifUndefined<T>(value: T | undefined): T | Skip;
2958
- }
2959
-
2960
- export declare const skip: Skip;
2961
-
2962
- /**
2963
- * An interface that represents a span. A span represents a single operation
2964
- * within a trace. Examples of span might include remote procedure calls or a
2965
- * in-process function calls to sub-components. A Trace has a single, top-level
2966
- * "root" Span that in turn may have zero or more child Spans, which in turn
2967
- * may have children.
2968
- *
2969
- * Spans are created by the {@link Tracer.startSpan} method.
2970
- */
2971
- declare interface Span {
2972
- /**
2973
- * Returns the {@link SpanContext} object associated with this Span.
2974
- *
2975
- * Get an immutable, serializable identifier for this span that can be used
2976
- * to create new child spans. Returned SpanContext is usable even after the
2977
- * span ends.
2978
- *
2979
- * @returns the SpanContext object associated with this Span.
2980
- */
2981
- spanContext(): SpanContext;
2982
- /**
2983
- * Sets an attribute to the span.
2984
- *
2985
- * Sets a single Attribute with the key and value passed as arguments.
2986
- *
2987
- * @param key the key for this attribute.
2988
- * @param value the value for this attribute. Setting a value null or
2989
- * undefined is invalid and will result in undefined behavior.
2990
- */
2991
- setAttribute(key: string, value: SpanAttributeValue): this;
2992
- /**
2993
- * Sets attributes to the span.
2994
- *
2995
- * @param attributes the attributes that will be added.
2996
- * null or undefined attribute values
2997
- * are invalid and will result in undefined behavior.
2998
- */
2999
- setAttributes(attributes: SpanAttributes): this;
3000
- /**
3001
- * Adds an event to the Span.
3002
- *
3003
- * @param name the name of the event.
3004
- * @param [attributesOrStartTime] the attributes that will be added; these are
3005
- * associated with this event. Can be also a start time
3006
- * if type is {@type TimeInput} and 3rd param is undefined
3007
- * @param [startTime] start time of the event.
3008
- */
3009
- addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this;
3010
- /**
3011
- * Adds a single link to the span.
3012
- *
3013
- * Links added after the creation will not affect the sampling decision.
3014
- * It is preferred span links be added at span creation.
3015
- *
3016
- * @param link the link to add.
3017
- */
3018
- addLink(link: Link): this;
3019
- /**
3020
- * Adds multiple links to the span.
3021
- *
3022
- * Links added after the creation will not affect the sampling decision.
3023
- * It is preferred span links be added at span creation.
3024
- *
3025
- * @param links the links to add.
3026
- */
3027
- addLinks(links: Link[]): this;
3028
- /**
3029
- * Sets a status to the span. If used, this will override the default Span
3030
- * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value
3031
- * of previous calls to SetStatus on the Span.
3032
- *
3033
- * @param status the SpanStatus to set.
3034
- */
3035
- setStatus(status: SpanStatus): this;
3036
- /**
3037
- * Updates the Span name.
3038
- *
3039
- * This will override the name provided via {@link Tracer.startSpan}.
3040
- *
3041
- * Upon this update, any sampling behavior based on Span name will depend on
3042
- * the implementation.
3043
- *
3044
- * @param name the Span name.
3045
- */
3046
- updateName(name: string): this;
3047
- /**
3048
- * Marks the end of Span execution.
3049
- *
3050
- * Call to End of a Span MUST not have any effects on child spans. Those may
3051
- * still be running and can be ended later.
3052
- *
3053
- * Do not return `this`. The Span generally should not be used after it
3054
- * is ended so chaining is not desired in this context.
3055
- *
3056
- * @param [endTime] the time to set as Span's end time. If not provided,
3057
- * use the current time as the span's end time.
3058
- */
3059
- end(endTime?: TimeInput): void;
3060
- /**
3061
- * Returns the flag whether this span will be recorded.
3062
- *
3063
- * @returns true if this Span is active and recording information like events
3064
- * with the `AddEvent` operation and attributes using `setAttributes`.
3065
- */
3066
- isRecording(): boolean;
3067
- /**
3068
- * Sets exception as a span event
3069
- * @param exception the exception the only accepted values are string or Error
3070
- * @param [time] the time to set as Span's event time. If not provided,
3071
- * use the current time.
3072
- */
3073
- recordException(exception: Exception, time?: TimeInput): void;
3074
- }
3075
-
3076
- /**
3077
- * @deprecated please use {@link Attributes}
3078
- */
3079
- declare type SpanAttributes = Attributes;
3080
-
3081
- /**
3082
- * @deprecated please use {@link AttributeValue}
3083
- */
3084
- declare type SpanAttributeValue = AttributeValue;
3085
-
3086
- declare type SpanCallback<R> = (span?: Span, context?: Context) => R;
3087
-
3088
- /**
3089
- * A SpanContext represents the portion of a {@link Span} which must be
3090
- * serialized and propagated along side of a {@link Baggage}.
3091
- */
3092
- declare interface SpanContext {
3093
- /**
3094
- * The ID of the trace that this span belongs to. It is worldwide unique
3095
- * with practically sufficient probability by being made as 16 randomly
3096
- * generated bytes, encoded as a 32 lowercase hex characters corresponding to
3097
- * 128 bits.
3098
- */
3099
- traceId: string;
3100
- /**
3101
- * The ID of the Span. It is globally unique with practically sufficient
3102
- * probability by being made as 8 randomly generated bytes, encoded as a 16
3103
- * lowercase hex characters corresponding to 64 bits.
3104
- */
3105
- spanId: string;
3106
- /**
3107
- * Only true if the SpanContext was propagated from a remote parent.
3108
- */
3109
- isRemote?: boolean;
3110
- /**
3111
- * Trace flags to propagate.
3112
- *
3113
- * It is represented as 1 byte (bitmap). Bit to represent whether trace is
3114
- * sampled or not. When set, the least significant bit documents that the
3115
- * caller may have recorded trace data. A caller who does not record trace
3116
- * data out-of-band leaves this flag unset.
3117
- *
3118
- * see {@link TraceFlags} for valid flag values.
3119
- */
3120
- traceFlags: number;
3121
- /**
3122
- * Tracing-system-specific info to propagate.
3123
- *
3124
- * The tracestate field value is a `list` as defined below. The `list` is a
3125
- * series of `list-members` separated by commas `,`, and a list-member is a
3126
- * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
3127
- * surrounding `list-members` are ignored. There can be a maximum of 32
3128
- * `list-members` in a `list`.
3129
- * More Info: https://www.w3.org/TR/trace-context/#tracestate-field
3130
- *
3131
- * Examples:
3132
- * Single tracing system (generic format):
3133
- * tracestate: rojo=00f067aa0ba902b7
3134
- * Multiple tracing systems (with different formatting):
3135
- * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
3136
- */
3137
- traceState?: TraceState;
3138
- }
3139
-
3140
- declare enum SpanKind {
3141
- /** Default value. Indicates that the span is used internally. */
3142
- INTERNAL = 0,
3143
- /**
3144
- * Indicates that the span covers server-side handling of an RPC or other
3145
- * remote request.
3146
- */
3147
- SERVER = 1,
3148
- /**
3149
- * Indicates that the span covers the client-side wrapper around an RPC or
3150
- * other remote request.
3151
- */
3152
- CLIENT = 2,
3153
- /**
3154
- * Indicates that the span describes producer sending a message to a
3155
- * broker. Unlike client and server, there is no direct critical path latency
3156
- * relationship between producer and consumer spans.
3157
- */
3158
- PRODUCER = 3,
3159
- /**
3160
- * Indicates that the span describes consumer receiving a message from a
3161
- * broker. Unlike client and server, there is no direct critical path latency
3162
- * relationship between producer and consumer spans.
3163
- */
3164
- CONSUMER = 4
3165
- }
3166
-
3167
- /**
3168
- * Options needed for span creation
3169
- */
3170
- declare interface SpanOptions {
3171
- /**
3172
- * The SpanKind of a span
3173
- * @default {@link SpanKind.INTERNAL}
3174
- */
3175
- kind?: SpanKind;
3176
- /** A span's attributes */
3177
- attributes?: SpanAttributes;
3178
- /** {@link Link}s span to other spans */
3179
- links?: Link[];
3180
- /** A manually specified start time for the created `Span` object. */
3181
- startTime?: TimeInput;
3182
- /** The new span should be a root span. (Ignore parent from context). */
3183
- root?: boolean;
3184
- }
3185
-
3186
- declare interface SpanStatus {
3187
- /** The status code of this message. */
3188
- code: SpanStatusCode;
3189
- /** A developer-facing error message. */
3190
- message?: string;
3191
- }
3192
-
3193
- /**
3194
- * An enumeration of status codes.
3195
- */
3196
- declare enum SpanStatusCode {
3197
- /**
3198
- * The default status.
3199
- */
3200
- UNSET = 0,
3201
- /**
3202
- * The operation has been validated by an Application developer or
3203
- * Operator to have completed successfully.
3204
- */
3205
- OK = 1,
3206
- /**
3207
- * The operation contains an error.
3208
- */
3209
- ERROR = 2
3210
- }
3211
-
3212
- /**
3213
- * A SQL instance can be nested within each other to build SQL strings.
3214
- */
3215
- export declare class Sql {
3216
- readonly values: Value[];
3217
- readonly strings: string[];
3218
- constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]);
3219
- get sql(): string;
3220
- get statement(): string;
3221
- get text(): string;
3222
- inspect(): {
3223
- sql: string;
3224
- statement: string;
3225
- text: string;
3226
- values: unknown[];
3227
- };
3228
- }
3229
-
3230
- /**
3231
- * Create a SQL object from a template string.
3232
- */
3233
- export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql;
3234
-
3235
- /**
3236
- * Defines TimeInput.
3237
- *
3238
- * hrtime, epoch milliseconds, performance.now() or Date
3239
- */
3240
- declare type TimeInput = HrTime_2 | number | Date;
3241
-
3242
- export declare type ToTuple<T> = T extends any[] ? T : [T];
3243
-
3244
- declare interface TraceState {
3245
- /**
3246
- * Create a new TraceState which inherits from this TraceState and has the
3247
- * given key set.
3248
- * The new entry will always be added in the front of the list of states.
3249
- *
3250
- * @param key key of the TraceState entry.
3251
- * @param value value of the TraceState entry.
3252
- */
3253
- set(key: string, value: string): TraceState;
3254
- /**
3255
- * Return a new TraceState which inherits from this TraceState but does not
3256
- * contain the given key.
3257
- *
3258
- * @param key the key for the TraceState entry to be removed.
3259
- */
3260
- unset(key: string): TraceState;
3261
- /**
3262
- * Returns the value to which the specified key is mapped, or `undefined` if
3263
- * this map contains no mapping for the key.
3264
- *
3265
- * @param key with which the specified value is to be associated.
3266
- * @returns the value to which the specified key is mapped, or `undefined` if
3267
- * this map contains no mapping for the key.
3268
- */
3269
- get(key: string): string | undefined;
3270
- /**
3271
- * Serializes the TraceState to a `list` as defined below. The `list` is a
3272
- * series of `list-members` separated by commas `,`, and a list-member is a
3273
- * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
3274
- * surrounding `list-members` are ignored. There can be a maximum of 32
3275
- * `list-members` in a `list`.
3276
- *
3277
- * @returns the serialized string.
3278
- */
3279
- serialize(): string;
3280
- }
3281
-
3282
- declare interface TracingHelper {
3283
- isEnabled(): boolean;
3284
- getTraceParent(context?: Context): string;
3285
- dispatchEngineSpans(spans: EngineSpan[]): void;
3286
- getActiveContext(): Context | undefined;
3287
- runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
3288
- }
3289
-
3290
- declare interface Transaction extends Queryable {
3291
- /**
3292
- * Transaction options.
3293
- */
3294
- readonly options: TransactionOptions;
3295
- /**
3296
- * Commit the transaction.
3297
- */
3298
- commit(): Promise<Result_4<void>>;
3299
- /**
3300
- * Rolls back the transaction.
3301
- */
3302
- rollback(): Promise<Result_4<void>>;
3303
- }
3304
-
3305
- declare namespace Transaction_2 {
3306
- export {
3307
- IsolationLevel,
3308
- Options,
3309
- InteractiveTransactionInfo,
3310
- TransactionHeaders
3311
- }
3312
- }
3313
-
3314
- declare interface TransactionContext extends Queryable {
3315
- /**
3316
- * Starts new transaction.
3317
- */
3318
- startTransaction(): Promise<Result_4<Transaction>>;
3319
- }
3320
-
3321
- declare type TransactionHeaders = {
3322
- traceparent?: string;
3323
- };
3324
-
3325
- declare type TransactionOptions = {
3326
- usePhantomQuery: boolean;
3327
- };
3328
-
3329
- declare type TransactionOptions_2<InteractiveTransactionPayload> = {
3330
- kind: 'itx';
3331
- options: InteractiveTransactionOptions<InteractiveTransactionPayload>;
3332
- } | {
3333
- kind: 'batch';
3334
- options: BatchTransactionOptions;
3335
- };
3336
-
3337
- export declare class TypedSql<Values extends readonly unknown[], Result> {
3338
- [PrivateResultType]: Result;
3339
- constructor(sql: string, values: Values);
3340
- get sql(): string;
3341
- get values(): Values;
3342
- }
3343
-
3344
- export declare type TypeMapCbDef = Fn<{
3345
- extArgs: InternalArgs;
3346
- clientOptions: ClientOptionDef;
3347
- }, TypeMapDef>;
3348
-
3349
- /** Shared */
3350
- export declare type TypeMapDef = Record<any, any>;
3351
-
3352
- declare namespace Types {
3353
- export {
3354
- Result_3 as Result,
3355
- Extensions_2 as Extensions,
3356
- Utils,
3357
- Public_2 as Public,
3358
- isSkip,
3359
- Skip,
3360
- skip,
3361
- UnknownTypedSql,
3362
- OperationPayload as Payload
3363
- }
3364
- }
3365
- export { Types }
3366
-
3367
- declare type UnknownErrorParams = {
3368
- clientVersion: string;
3369
- batchRequestIdx?: number;
3370
- };
3371
-
3372
- export declare type UnknownTypedSql = TypedSql<unknown[], unknown>;
3373
-
3374
- declare type Unpacker = (data: any) => any;
3375
-
3376
- export declare type UnwrapPayload<P> = {} extends P ? unknown : {
3377
- [K in keyof P]: P[K] extends {
3378
- scalars: infer S;
3379
- composites: infer C;
3380
- }[] ? Array<S & UnwrapPayload<C>> : P[K] extends {
3381
- scalars: infer S;
3382
- composites: infer C;
3383
- } | null ? S & UnwrapPayload<C> | Select<P[K], null> : never;
3384
- };
3385
-
3386
- export declare type UnwrapPromise<P> = P extends Promise<infer R> ? R : P;
3387
-
3388
- export declare type UnwrapTuple<Tuple extends readonly unknown[]> = {
3389
- [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise<infer X> ? X : UnwrapPromise<Tuple[K]> : UnwrapPromise<Tuple[K]>;
3390
- };
3391
-
3392
- /**
3393
- * Input that flows from the user into the Client.
3394
- */
3395
- declare type UserArgs_2 = any;
3396
-
3397
- declare namespace Utils {
3398
- export {
3399
- EmptyToUnknown,
3400
- NeverToUnknown,
3401
- PatchFlat,
3402
- Omit_2 as Omit,
3403
- Pick_2 as Pick,
3404
- ComputeDeep,
3405
- Compute,
3406
- OptionalFlat,
3407
- ReadonlyDeep,
3408
- Narrowable,
3409
- Narrow,
3410
- Exact,
3411
- Cast,
3412
- Record_2 as Record,
3413
- UnwrapPromise,
3414
- UnwrapTuple,
3415
- Path,
3416
- Fn,
3417
- Call,
3418
- RequiredKeys,
3419
- OptionalKeys,
3420
- Optional,
3421
- Return,
3422
- ToTuple,
3423
- RenameAndNestPayloadKeys,
3424
- PayloadToResult,
3425
- Select,
3426
- Equals,
3427
- Or,
3428
- JsPromise
3429
- }
3430
- }
3431
-
3432
- declare function validator<V>(): <S>(select: Exact<S, V>) => S;
3433
-
3434
- declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): <S>(select: Exact<S, Args<C[M], O>>) => S;
3435
-
3436
- declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation, P extends keyof Args<C[M], O>>(client: C, model: M, operation: O, prop: P): <S>(select: Exact<S, Args<C[M], O>[P]>) => S;
3437
-
3438
- /**
3439
- * Values supported by SQL engine.
3440
- */
3441
- export declare type Value = unknown;
3442
-
3443
- export declare function warnEnvConflicts(envPaths: any): void;
3444
-
3445
- export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void;
3446
-
3447
- export { }