document-drive 5.0.0-staging.9 → 5.0.1-staging.2

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