@shophost/rest-api 2.0.30 → 2.0.31

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 (352) hide show
  1. package/package.json +18 -13
  2. package/scripts/minify.mjs +110 -0
  3. package/src/app.js +1 -53
  4. package/src/core/auth/auth.schema.js +1 -41
  5. package/src/core/auth/auth.util.js +1 -44
  6. package/src/core/auth/better-auth.lib.js +1 -100
  7. package/src/core/auth/generate-password-hash.util.d.ts +0 -3
  8. package/src/core/auth/generate-password-hash.util.js +1 -30
  9. package/src/core/auth/headers.schema.js +1 -22
  10. package/src/core/auth/user.schema.js +1 -30
  11. package/src/core/db/__generated__/client/browser.d.ts +0 -128
  12. package/src/core/db/__generated__/client/browser.js +1 -18
  13. package/src/core/db/__generated__/client/client.d.ts +0 -143
  14. package/src/core/db/__generated__/client/client.js +1 -35
  15. package/src/core/db/__generated__/client/commonInputTypes.js +1 -11
  16. package/src/core/db/__generated__/client/enums.js +1 -200
  17. package/src/core/db/__generated__/client/internal/class.d.ts +0 -343
  18. package/src/core/db/__generated__/client/internal/class.js +1 -55
  19. package/src/core/db/__generated__/client/internal/prismaNamespace.d.ts +0 -234
  20. package/src/core/db/__generated__/client/internal/prismaNamespace.js +1 -541
  21. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.d.ts +0 -15
  22. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js +1 -512
  23. package/src/core/db/__generated__/client/models/Account.d.ts +0 -628
  24. package/src/core/db/__generated__/client/models/Account.js +1 -2
  25. package/src/core/db/__generated__/client/models/Address.d.ts +0 -701
  26. package/src/core/db/__generated__/client/models/Address.js +1 -2
  27. package/src/core/db/__generated__/client/models/Campaign.d.ts +0 -638
  28. package/src/core/db/__generated__/client/models/Campaign.js +1 -2
  29. package/src/core/db/__generated__/client/models/ClosingTimes.d.ts +0 -634
  30. package/src/core/db/__generated__/client/models/ClosingTimes.js +1 -2
  31. package/src/core/db/__generated__/client/models/File.d.ts +0 -752
  32. package/src/core/db/__generated__/client/models/File.js +1 -2
  33. package/src/core/db/__generated__/client/models/Invitation.d.ts +0 -628
  34. package/src/core/db/__generated__/client/models/Invitation.js +1 -2
  35. package/src/core/db/__generated__/client/models/LegalEntity.d.ts +0 -652
  36. package/src/core/db/__generated__/client/models/LegalEntity.js +1 -2
  37. package/src/core/db/__generated__/client/models/Manufacturer.d.ts +0 -679
  38. package/src/core/db/__generated__/client/models/Manufacturer.js +1 -2
  39. package/src/core/db/__generated__/client/models/ManufacturerTranslation.d.ts +0 -628
  40. package/src/core/db/__generated__/client/models/ManufacturerTranslation.js +1 -2
  41. package/src/core/db/__generated__/client/models/Member.d.ts +0 -628
  42. package/src/core/db/__generated__/client/models/Member.js +1 -2
  43. package/src/core/db/__generated__/client/models/Modifier.d.ts +0 -662
  44. package/src/core/db/__generated__/client/models/Modifier.js +1 -2
  45. package/src/core/db/__generated__/client/models/ModifierGroup.d.ts +0 -686
  46. package/src/core/db/__generated__/client/models/ModifierGroup.js +1 -2
  47. package/src/core/db/__generated__/client/models/ModifierGroupTranslation.d.ts +0 -628
  48. package/src/core/db/__generated__/client/models/ModifierGroupTranslation.js +1 -2
  49. package/src/core/db/__generated__/client/models/OpeningTimes.d.ts +0 -634
  50. package/src/core/db/__generated__/client/models/OpeningTimes.js +1 -2
  51. package/src/core/db/__generated__/client/models/Order.d.ts +0 -700
  52. package/src/core/db/__generated__/client/models/Order.js +1 -2
  53. package/src/core/db/__generated__/client/models/OrderItem.d.ts +0 -686
  54. package/src/core/db/__generated__/client/models/OrderItem.js +1 -2
  55. package/src/core/db/__generated__/client/models/OrderItemTranslation.d.ts +0 -628
  56. package/src/core/db/__generated__/client/models/OrderItemTranslation.js +1 -2
  57. package/src/core/db/__generated__/client/models/Organization.d.ts +0 -811
  58. package/src/core/db/__generated__/client/models/Organization.js +1 -2
  59. package/src/core/db/__generated__/client/models/OrganizationConfiguration.d.ts +0 -676
  60. package/src/core/db/__generated__/client/models/OrganizationConfiguration.js +1 -2
  61. package/src/core/db/__generated__/client/models/Payment.d.ts +0 -668
  62. package/src/core/db/__generated__/client/models/Payment.js +1 -2
  63. package/src/core/db/__generated__/client/models/PaymentSession.d.ts +0 -638
  64. package/src/core/db/__generated__/client/models/PaymentSession.js +1 -2
  65. package/src/core/db/__generated__/client/models/Product.d.ts +0 -746
  66. package/src/core/db/__generated__/client/models/Product.js +1 -2
  67. package/src/core/db/__generated__/client/models/ProductCategory.d.ts +0 -689
  68. package/src/core/db/__generated__/client/models/ProductCategory.js +1 -2
  69. package/src/core/db/__generated__/client/models/ProductCategoryTranslation.d.ts +0 -628
  70. package/src/core/db/__generated__/client/models/ProductCategoryTranslation.js +1 -2
  71. package/src/core/db/__generated__/client/models/ProductSnapshot.d.ts +0 -664
  72. package/src/core/db/__generated__/client/models/ProductSnapshot.js +1 -2
  73. package/src/core/db/__generated__/client/models/ProductTranslation.d.ts +0 -628
  74. package/src/core/db/__generated__/client/models/ProductTranslation.js +1 -2
  75. package/src/core/db/__generated__/client/models/Reservation.d.ts +0 -650
  76. package/src/core/db/__generated__/client/models/Reservation.js +1 -2
  77. package/src/core/db/__generated__/client/models/Session.d.ts +0 -628
  78. package/src/core/db/__generated__/client/models/Session.js +1 -2
  79. package/src/core/db/__generated__/client/models/ShippingMethod.d.ts +0 -679
  80. package/src/core/db/__generated__/client/models/ShippingMethod.js +1 -2
  81. package/src/core/db/__generated__/client/models/ShippingZone.d.ts +0 -638
  82. package/src/core/db/__generated__/client/models/ShippingZone.js +1 -2
  83. package/src/core/db/__generated__/client/models/User.d.ts +0 -736
  84. package/src/core/db/__generated__/client/models/User.js +1 -2
  85. package/src/core/db/__generated__/client/models/Verification.d.ts +0 -592
  86. package/src/core/db/__generated__/client/models/Verification.js +1 -2
  87. package/src/core/db/__generated__/client/models.js +1 -2
  88. package/src/core/db/index.js +1 -2
  89. package/src/core/exceptions/http-exception.js +1 -9
  90. package/src/core/hono/hono.js +1 -123
  91. package/src/core/lib/prisma.d.ts +9 -1
  92. package/src/core/lib/prisma.js +1 -11
  93. package/src/core/logging/pino.js +1 -5
  94. package/src/core/notifications/email.service.d.ts +0 -15
  95. package/src/core/notifications/email.service.js +1 -116
  96. package/src/core/openapi/openapi.lib.js +1 -26
  97. package/src/core/types/google-maps.types.js +1 -2
  98. package/src/core/utils/currency.util.js +1 -11
  99. package/src/core/utils/env.util.js +1 -8
  100. package/src/core/utils/object.util.d.ts +0 -10
  101. package/src/core/utils/object.util.js +1 -39
  102. package/src/core/utils/translations.util.js +0 -2
  103. package/src/core/utils/zod.util.d.ts +0 -12
  104. package/src/core/utils/zod.util.js +1 -85
  105. package/src/db.js +1 -3
  106. package/src/features/access/access.handler.js +1 -91
  107. package/src/features/access/access.route.js +1 -220
  108. package/src/features/access/access.schema.js +1 -108
  109. package/src/features/access/access.service.js +1 -294
  110. package/src/features/cart/cart.handler.js +1 -17
  111. package/src/features/cart/cart.route.js +1 -32
  112. package/src/features/cart/cart.schema.js +1 -39
  113. package/src/features/cart/cart.service.d.ts +0 -7
  114. package/src/features/cart/cart.service.js +1 -97
  115. package/src/features/cart/cart.util.js +1 -76
  116. package/src/features/file/file.handler.js +1 -23
  117. package/src/features/file/file.route.js +1 -34
  118. package/src/features/file/file.schema.js +1 -77
  119. package/src/features/file/file.service.d.ts +0 -6
  120. package/src/features/file/file.service.js +1 -66
  121. package/src/features/health/health.handler.js +1 -10
  122. package/src/features/health/health.route.js +1 -25
  123. package/src/features/index.js +1 -16
  124. package/src/features/location/location.handler.js +1 -25
  125. package/src/features/location/location.route.js +1 -56
  126. package/src/features/location/location.schema.js +1 -50
  127. package/src/features/location/location.service.d.ts +0 -3
  128. package/src/features/location/location.service.js +1 -141
  129. package/src/features/manufacturer/manufacturer.handler.js +1 -53
  130. package/src/features/manufacturer/manufacturer.route.js +1 -97
  131. package/src/features/manufacturer/manufacturer.schema.js +1 -125
  132. package/src/features/manufacturer/manufacturer.service.d.ts +0 -19
  133. package/src/features/manufacturer/manufacturer.service.js +1 -190
  134. package/src/features/order/emails/order-confirmation.email.js +1 -229
  135. package/src/features/order/emails/order-notification.email.js +1 -229
  136. package/src/features/order/fulfilment.schema.js +1 -3
  137. package/src/features/order/order.handler.js +1 -54
  138. package/src/features/order/order.route.js +1 -111
  139. package/src/features/order/order.schema.js +1 -158
  140. package/src/features/order/order.service.d.ts +0 -15
  141. package/src/features/order/order.service.js +1 -306
  142. package/src/features/order/recipient.schema.js +1 -38
  143. package/src/features/organization/legal-entity.schema.js +1 -83
  144. package/src/features/organization/organization-configuration.schema.js +1 -115
  145. package/src/features/organization/organization.handler.js +1 -48
  146. package/src/features/organization/organization.route.js +1 -84
  147. package/src/features/organization/organization.schema.js +1 -64
  148. package/src/features/organization/organization.service.d.ts +0 -15
  149. package/src/features/organization/organization.service.js +1 -334
  150. package/src/features/payment/payment.handler.js +1 -16
  151. package/src/features/payment/payment.route.js +1 -22
  152. package/src/features/payment/payment.schema.js +1 -46
  153. package/src/features/payment/payment.service.js +1 -100
  154. package/src/features/payment/stripe.service.js +1 -164
  155. package/src/features/product/product-modifier.schema.js +1 -84
  156. package/src/features/product/product.handler.js +1 -87
  157. package/src/features/product/product.route.js +1 -179
  158. package/src/features/product/product.schema.js +1 -143
  159. package/src/features/product/product.service.d.ts +0 -25
  160. package/src/features/product/product.service.js +1 -440
  161. package/src/features/product-category/product-category.handler.js +1 -59
  162. package/src/features/product-category/product-category.route.js +1 -139
  163. package/src/features/product-category/product-category.schema.js +1 -86
  164. package/src/features/product-category/product-category.service.d.ts +0 -22
  165. package/src/features/product-category/product-category.service.js +1 -220
  166. package/src/features/reservation/emails/reservation-cancellation.email.js +1 -82
  167. package/src/features/reservation/emails/reservation-confirmation.email.js +1 -82
  168. package/src/features/reservation/emails/reservation-notification.email.js +1 -93
  169. package/src/features/reservation/reservation.handler.js +1 -65
  170. package/src/features/reservation/reservation.route.js +1 -167
  171. package/src/features/reservation/reservation.schema.js +1 -51
  172. package/src/features/reservation/reservation.service.d.ts +0 -18
  173. package/src/features/reservation/reservation.service.js +1 -231
  174. package/src/features/shipping/shipping.handler.js +1 -32
  175. package/src/features/shipping/shipping.route.js +1 -51
  176. package/src/features/shipping/shipping.service.d.ts +0 -7
  177. package/src/features/shipping/shipping.service.js +1 -96
  178. package/src/features/shipping-method/shipping-method.handler.js +1 -60
  179. package/src/features/shipping-method/shipping-method.route.js +1 -144
  180. package/src/features/shipping-method/shipping-method.schema.js +1 -48
  181. package/src/features/shipping-method/shipping-method.service.d.ts +0 -25
  182. package/src/features/shipping-method/shipping-method.service.js +1 -229
  183. package/src/features/shipping-method/shipping-zone.schema.js +1 -31
  184. package/src/features/webhook/webhook.handler.js +1 -50
  185. package/src/features/webhook/webhook.route.js +1 -33
  186. package/src/index.js +1 -6
  187. package/src/integrations/next.js +1 -82
  188. package/src/schemas/address.schema.d.ts +0 -8
  189. package/src/schemas/address.schema.js +1 -112
  190. package/src/schemas/currency.schema.d.ts +0 -42
  191. package/src/schemas/currency.schema.js +1 -118
  192. package/src/schemas/error.schema.js +1 -12
  193. package/src/schemas/index.js +1 -29
  194. package/src/schemas/locales.schema.js +1 -238
  195. package/src/schemas/number.schema.js +1 -29
  196. package/src/schemas/pagination.schema.js +1 -54
  197. package/src/schemas/params.schema.js +1 -20
  198. package/src/schemas/queries.schema.js +1 -6
  199. package/src/test/global-setup.d.ts +1 -0
  200. package/src/test/global-setup.js +1 -0
  201. package/src/test/integration/api-fixtures.d.ts +4 -16
  202. package/src/test/integration/api-fixtures.js +1 -225
  203. package/src/test/integration/seed.d.ts +81 -0
  204. package/src/test/integration/seed.js +1 -0
  205. package/src/test/integration/test-helpers.d.ts +107 -924
  206. package/src/test/integration/test-helpers.js +1 -1100
  207. package/src/test/setup-test-env.d.ts +1 -1
  208. package/src/test/setup-test-env.js +1 -29
  209. package/src/app.js.map +0 -1
  210. package/src/core/auth/auth.schema.js.map +0 -1
  211. package/src/core/auth/auth.util.js.map +0 -1
  212. package/src/core/auth/better-auth.lib.js.map +0 -1
  213. package/src/core/auth/generate-password-hash.util.js.map +0 -1
  214. package/src/core/auth/headers.schema.js.map +0 -1
  215. package/src/core/auth/user.schema.js.map +0 -1
  216. package/src/core/db/__generated__/client/browser.js.map +0 -1
  217. package/src/core/db/__generated__/client/client.js.map +0 -1
  218. package/src/core/db/__generated__/client/commonInputTypes.js.map +0 -1
  219. package/src/core/db/__generated__/client/enums.js.map +0 -1
  220. package/src/core/db/__generated__/client/internal/class.js.map +0 -1
  221. package/src/core/db/__generated__/client/internal/prismaNamespace.js.map +0 -1
  222. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js.map +0 -1
  223. package/src/core/db/__generated__/client/models/Account.js.map +0 -1
  224. package/src/core/db/__generated__/client/models/Address.js.map +0 -1
  225. package/src/core/db/__generated__/client/models/Campaign.js.map +0 -1
  226. package/src/core/db/__generated__/client/models/ClosingTimes.js.map +0 -1
  227. package/src/core/db/__generated__/client/models/File.js.map +0 -1
  228. package/src/core/db/__generated__/client/models/Invitation.js.map +0 -1
  229. package/src/core/db/__generated__/client/models/LegalEntity.js.map +0 -1
  230. package/src/core/db/__generated__/client/models/Manufacturer.js.map +0 -1
  231. package/src/core/db/__generated__/client/models/ManufacturerTranslation.js.map +0 -1
  232. package/src/core/db/__generated__/client/models/Member.js.map +0 -1
  233. package/src/core/db/__generated__/client/models/Modifier.js.map +0 -1
  234. package/src/core/db/__generated__/client/models/ModifierGroup.js.map +0 -1
  235. package/src/core/db/__generated__/client/models/ModifierGroupTranslation.js.map +0 -1
  236. package/src/core/db/__generated__/client/models/OpeningTimes.js.map +0 -1
  237. package/src/core/db/__generated__/client/models/Order.js.map +0 -1
  238. package/src/core/db/__generated__/client/models/OrderItem.js.map +0 -1
  239. package/src/core/db/__generated__/client/models/OrderItemTranslation.js.map +0 -1
  240. package/src/core/db/__generated__/client/models/Organization.js.map +0 -1
  241. package/src/core/db/__generated__/client/models/OrganizationConfiguration.js.map +0 -1
  242. package/src/core/db/__generated__/client/models/Payment.js.map +0 -1
  243. package/src/core/db/__generated__/client/models/PaymentSession.js.map +0 -1
  244. package/src/core/db/__generated__/client/models/Product.js.map +0 -1
  245. package/src/core/db/__generated__/client/models/ProductCategory.js.map +0 -1
  246. package/src/core/db/__generated__/client/models/ProductCategoryTranslation.js.map +0 -1
  247. package/src/core/db/__generated__/client/models/ProductSnapshot.js.map +0 -1
  248. package/src/core/db/__generated__/client/models/ProductTranslation.js.map +0 -1
  249. package/src/core/db/__generated__/client/models/Reservation.js.map +0 -1
  250. package/src/core/db/__generated__/client/models/Session.js.map +0 -1
  251. package/src/core/db/__generated__/client/models/ShippingMethod.js.map +0 -1
  252. package/src/core/db/__generated__/client/models/ShippingZone.js.map +0 -1
  253. package/src/core/db/__generated__/client/models/User.js.map +0 -1
  254. package/src/core/db/__generated__/client/models/Verification.js.map +0 -1
  255. package/src/core/db/__generated__/client/models.js.map +0 -1
  256. package/src/core/db/index.js.map +0 -1
  257. package/src/core/exceptions/http-exception.js.map +0 -1
  258. package/src/core/hono/hono.js.map +0 -1
  259. package/src/core/lib/prisma.js.map +0 -1
  260. package/src/core/logging/pino.js.map +0 -1
  261. package/src/core/notifications/email.service.js.map +0 -1
  262. package/src/core/openapi/openapi.lib.js.map +0 -1
  263. package/src/core/types/google-maps.types.js.map +0 -1
  264. package/src/core/utils/currency.util.js.map +0 -1
  265. package/src/core/utils/env.util.js.map +0 -1
  266. package/src/core/utils/object.util.js.map +0 -1
  267. package/src/core/utils/translations.util.js.map +0 -1
  268. package/src/core/utils/zod.util.js.map +0 -1
  269. package/src/db.js.map +0 -1
  270. package/src/features/access/access.handler.js.map +0 -1
  271. package/src/features/access/access.route.js.map +0 -1
  272. package/src/features/access/access.schema.js.map +0 -1
  273. package/src/features/access/access.service.js.map +0 -1
  274. package/src/features/cart/cart.handler.js.map +0 -1
  275. package/src/features/cart/cart.route.js.map +0 -1
  276. package/src/features/cart/cart.schema.js.map +0 -1
  277. package/src/features/cart/cart.service.js.map +0 -1
  278. package/src/features/cart/cart.util.js.map +0 -1
  279. package/src/features/file/file.handler.js.map +0 -1
  280. package/src/features/file/file.route.js.map +0 -1
  281. package/src/features/file/file.schema.js.map +0 -1
  282. package/src/features/file/file.service.js.map +0 -1
  283. package/src/features/health/health.handler.js.map +0 -1
  284. package/src/features/health/health.route.js.map +0 -1
  285. package/src/features/index.js.map +0 -1
  286. package/src/features/location/location.handler.js.map +0 -1
  287. package/src/features/location/location.route.js.map +0 -1
  288. package/src/features/location/location.schema.js.map +0 -1
  289. package/src/features/location/location.service.js.map +0 -1
  290. package/src/features/manufacturer/manufacturer.handler.js.map +0 -1
  291. package/src/features/manufacturer/manufacturer.route.js.map +0 -1
  292. package/src/features/manufacturer/manufacturer.schema.js.map +0 -1
  293. package/src/features/manufacturer/manufacturer.service.js.map +0 -1
  294. package/src/features/order/emails/order-confirmation.email.js.map +0 -1
  295. package/src/features/order/emails/order-notification.email.js.map +0 -1
  296. package/src/features/order/fulfilment.schema.js.map +0 -1
  297. package/src/features/order/order.handler.js.map +0 -1
  298. package/src/features/order/order.route.js.map +0 -1
  299. package/src/features/order/order.schema.js.map +0 -1
  300. package/src/features/order/order.service.js.map +0 -1
  301. package/src/features/order/recipient.schema.js.map +0 -1
  302. package/src/features/organization/legal-entity.schema.js.map +0 -1
  303. package/src/features/organization/organization-configuration.schema.js.map +0 -1
  304. package/src/features/organization/organization.handler.js.map +0 -1
  305. package/src/features/organization/organization.route.js.map +0 -1
  306. package/src/features/organization/organization.schema.js.map +0 -1
  307. package/src/features/organization/organization.service.js.map +0 -1
  308. package/src/features/payment/payment.handler.js.map +0 -1
  309. package/src/features/payment/payment.route.js.map +0 -1
  310. package/src/features/payment/payment.schema.js.map +0 -1
  311. package/src/features/payment/payment.service.js.map +0 -1
  312. package/src/features/payment/stripe.service.js.map +0 -1
  313. package/src/features/product/product-modifier.schema.js.map +0 -1
  314. package/src/features/product/product.handler.js.map +0 -1
  315. package/src/features/product/product.route.js.map +0 -1
  316. package/src/features/product/product.schema.js.map +0 -1
  317. package/src/features/product/product.service.js.map +0 -1
  318. package/src/features/product-category/product-category.handler.js.map +0 -1
  319. package/src/features/product-category/product-category.route.js.map +0 -1
  320. package/src/features/product-category/product-category.schema.js.map +0 -1
  321. package/src/features/product-category/product-category.service.js.map +0 -1
  322. package/src/features/reservation/emails/reservation-cancellation.email.js.map +0 -1
  323. package/src/features/reservation/emails/reservation-confirmation.email.js.map +0 -1
  324. package/src/features/reservation/emails/reservation-notification.email.js.map +0 -1
  325. package/src/features/reservation/reservation.handler.js.map +0 -1
  326. package/src/features/reservation/reservation.route.js.map +0 -1
  327. package/src/features/reservation/reservation.schema.js.map +0 -1
  328. package/src/features/reservation/reservation.service.js.map +0 -1
  329. package/src/features/shipping/shipping.handler.js.map +0 -1
  330. package/src/features/shipping/shipping.route.js.map +0 -1
  331. package/src/features/shipping/shipping.service.js.map +0 -1
  332. package/src/features/shipping-method/shipping-method.handler.js.map +0 -1
  333. package/src/features/shipping-method/shipping-method.route.js.map +0 -1
  334. package/src/features/shipping-method/shipping-method.schema.js.map +0 -1
  335. package/src/features/shipping-method/shipping-method.service.js.map +0 -1
  336. package/src/features/shipping-method/shipping-zone.schema.js.map +0 -1
  337. package/src/features/webhook/webhook.handler.js.map +0 -1
  338. package/src/features/webhook/webhook.route.js.map +0 -1
  339. package/src/index.js.map +0 -1
  340. package/src/integrations/next.js.map +0 -1
  341. package/src/schemas/address.schema.js.map +0 -1
  342. package/src/schemas/currency.schema.js.map +0 -1
  343. package/src/schemas/error.schema.js.map +0 -1
  344. package/src/schemas/index.js.map +0 -1
  345. package/src/schemas/locales.schema.js.map +0 -1
  346. package/src/schemas/number.schema.js.map +0 -1
  347. package/src/schemas/pagination.schema.js.map +0 -1
  348. package/src/schemas/params.schema.js.map +0 -1
  349. package/src/schemas/queries.schema.js.map +0 -1
  350. package/src/test/integration/api-fixtures.js.map +0 -1
  351. package/src/test/integration/test-helpers.js.map +0 -1
  352. package/src/test/setup-test-env.js.map +0 -1
@@ -1,9 +1,5 @@
1
1
  import type * as runtime from "@prisma/client/runtime/client";
2
2
  import type * as Prisma from "../internal/prismaNamespace";
3
- /**
4
- * Model ProductSnapshot
5
- *
6
- */
7
3
  export type ProductSnapshotModel = runtime.Types.Result.DefaultSelection<Prisma.$ProductSnapshotPayload>;
8
4
  export type AggregateProductSnapshot = {
9
5
  _count: ProductSnapshotCountAggregateOutputType | null;
@@ -51,51 +47,13 @@ export type ProductSnapshotCountAggregateInputType = {
51
47
  _all?: true;
52
48
  };
53
49
  export type ProductSnapshotAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
54
- /**
55
- * Filter which ProductSnapshot to aggregate.
56
- */
57
50
  where?: Prisma.ProductSnapshotWhereInput;
58
- /**
59
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
60
- *
61
- * Determine the order of ProductSnapshots to fetch.
62
- */
63
51
  orderBy?: Prisma.ProductSnapshotOrderByWithRelationInput | Prisma.ProductSnapshotOrderByWithRelationInput[];
64
- /**
65
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
66
- *
67
- * Sets the start position
68
- */
69
52
  cursor?: Prisma.ProductSnapshotWhereUniqueInput;
70
- /**
71
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
72
- *
73
- * Take `±n` ProductSnapshots from the position of the cursor.
74
- */
75
53
  take?: number;
76
- /**
77
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
78
- *
79
- * Skip the first `n` ProductSnapshots.
80
- */
81
54
  skip?: number;
82
- /**
83
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
84
- *
85
- * Count returned ProductSnapshots
86
- **/
87
55
  _count?: true | ProductSnapshotCountAggregateInputType;
88
- /**
89
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
90
- *
91
- * Select which fields to find the minimum value
92
- **/
93
56
  _min?: ProductSnapshotMinAggregateInputType;
94
- /**
95
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
96
- *
97
- * Select which fields to find the maximum value
98
- **/
99
57
  _max?: ProductSnapshotMaxAggregateInputType;
100
58
  };
101
59
  export type GetProductSnapshotAggregateType<T extends ProductSnapshotAggregateArgs> = {
@@ -499,27 +457,15 @@ export type ProductSnapshotUncheckedUpdateManyWithoutProductInput = {
499
457
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
500
458
  createdBy?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
501
459
  };
502
- /**
503
- * Count Type ProductSnapshotCountOutputType
504
- */
505
460
  export type ProductSnapshotCountOutputType = {
506
461
  orderItems: number;
507
462
  };
508
463
  export type ProductSnapshotCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
509
464
  orderItems?: boolean | ProductSnapshotCountOutputTypeCountOrderItemsArgs;
510
465
  };
511
- /**
512
- * ProductSnapshotCountOutputType without action
513
- */
514
466
  export type ProductSnapshotCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
515
- /**
516
- * Select specific fields to fetch from the ProductSnapshotCountOutputType
517
- */
518
467
  select?: Prisma.ProductSnapshotCountOutputTypeSelect<ExtArgs> | null;
519
468
  };
520
- /**
521
- * ProductSnapshotCountOutputType without action
522
- */
523
469
  export type ProductSnapshotCountOutputTypeCountOrderItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
524
470
  where?: Prisma.OrderItemWhereInput;
525
471
  };
@@ -597,290 +543,22 @@ export interface ProductSnapshotDelegate<ExtArgs extends runtime.Types.Extension
597
543
  name: 'ProductSnapshot';
598
544
  };
599
545
  };
600
- /**
601
- * Find zero or one ProductSnapshot that matches the filter.
602
- * @param {ProductSnapshotFindUniqueArgs} args - Arguments to find a ProductSnapshot
603
- * @example
604
- * // Get one ProductSnapshot
605
- * const productSnapshot = await prisma.productSnapshot.findUnique({
606
- * where: {
607
- * // ... provide filter here
608
- * }
609
- * })
610
- */
611
546
  findUnique<T extends ProductSnapshotFindUniqueArgs>(args: Prisma.SelectSubset<T, ProductSnapshotFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ProductSnapshotClient<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
612
- /**
613
- * Find one ProductSnapshot that matches the filter or throw an error with `error.code='P2025'`
614
- * if no matches were found.
615
- * @param {ProductSnapshotFindUniqueOrThrowArgs} args - Arguments to find a ProductSnapshot
616
- * @example
617
- * // Get one ProductSnapshot
618
- * const productSnapshot = await prisma.productSnapshot.findUniqueOrThrow({
619
- * where: {
620
- * // ... provide filter here
621
- * }
622
- * })
623
- */
624
547
  findUniqueOrThrow<T extends ProductSnapshotFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, ProductSnapshotFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ProductSnapshotClient<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
625
- /**
626
- * Find the first ProductSnapshot that matches the filter.
627
- * Note, that providing `undefined` is treated as the value not being there.
628
- * Read more here: https://pris.ly/d/null-undefined
629
- * @param {ProductSnapshotFindFirstArgs} args - Arguments to find a ProductSnapshot
630
- * @example
631
- * // Get one ProductSnapshot
632
- * const productSnapshot = await prisma.productSnapshot.findFirst({
633
- * where: {
634
- * // ... provide filter here
635
- * }
636
- * })
637
- */
638
548
  findFirst<T extends ProductSnapshotFindFirstArgs>(args?: Prisma.SelectSubset<T, ProductSnapshotFindFirstArgs<ExtArgs>>): Prisma.Prisma__ProductSnapshotClient<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
639
- /**
640
- * Find the first ProductSnapshot that matches the filter or
641
- * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
642
- * Note, that providing `undefined` is treated as the value not being there.
643
- * Read more here: https://pris.ly/d/null-undefined
644
- * @param {ProductSnapshotFindFirstOrThrowArgs} args - Arguments to find a ProductSnapshot
645
- * @example
646
- * // Get one ProductSnapshot
647
- * const productSnapshot = await prisma.productSnapshot.findFirstOrThrow({
648
- * where: {
649
- * // ... provide filter here
650
- * }
651
- * })
652
- */
653
549
  findFirstOrThrow<T extends ProductSnapshotFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, ProductSnapshotFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ProductSnapshotClient<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
654
- /**
655
- * Find zero or more ProductSnapshots that matches the filter.
656
- * Note, that providing `undefined` is treated as the value not being there.
657
- * Read more here: https://pris.ly/d/null-undefined
658
- * @param {ProductSnapshotFindManyArgs} args - Arguments to filter and select certain fields only.
659
- * @example
660
- * // Get all ProductSnapshots
661
- * const productSnapshots = await prisma.productSnapshot.findMany()
662
- *
663
- * // Get first 10 ProductSnapshots
664
- * const productSnapshots = await prisma.productSnapshot.findMany({ take: 10 })
665
- *
666
- * // Only select the `id`
667
- * const productSnapshotWithIdOnly = await prisma.productSnapshot.findMany({ select: { id: true } })
668
- *
669
- */
670
550
  findMany<T extends ProductSnapshotFindManyArgs>(args?: Prisma.SelectSubset<T, ProductSnapshotFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
671
- /**
672
- * Create a ProductSnapshot.
673
- * @param {ProductSnapshotCreateArgs} args - Arguments to create a ProductSnapshot.
674
- * @example
675
- * // Create one ProductSnapshot
676
- * const ProductSnapshot = await prisma.productSnapshot.create({
677
- * data: {
678
- * // ... data to create a ProductSnapshot
679
- * }
680
- * })
681
- *
682
- */
683
551
  create<T extends ProductSnapshotCreateArgs>(args: Prisma.SelectSubset<T, ProductSnapshotCreateArgs<ExtArgs>>): Prisma.Prisma__ProductSnapshotClient<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
684
- /**
685
- * Create many ProductSnapshots.
686
- * @param {ProductSnapshotCreateManyArgs} args - Arguments to create many ProductSnapshots.
687
- * @example
688
- * // Create many ProductSnapshots
689
- * const productSnapshot = await prisma.productSnapshot.createMany({
690
- * data: [
691
- * // ... provide data here
692
- * ]
693
- * })
694
- *
695
- */
696
552
  createMany<T extends ProductSnapshotCreateManyArgs>(args?: Prisma.SelectSubset<T, ProductSnapshotCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
697
- /**
698
- * Create many ProductSnapshots and returns the data saved in the database.
699
- * @param {ProductSnapshotCreateManyAndReturnArgs} args - Arguments to create many ProductSnapshots.
700
- * @example
701
- * // Create many ProductSnapshots
702
- * const productSnapshot = await prisma.productSnapshot.createManyAndReturn({
703
- * data: [
704
- * // ... provide data here
705
- * ]
706
- * })
707
- *
708
- * // Create many ProductSnapshots and only return the `id`
709
- * const productSnapshotWithIdOnly = await prisma.productSnapshot.createManyAndReturn({
710
- * select: { id: true },
711
- * data: [
712
- * // ... provide data here
713
- * ]
714
- * })
715
- * Note, that providing `undefined` is treated as the value not being there.
716
- * Read more here: https://pris.ly/d/null-undefined
717
- *
718
- */
719
553
  createManyAndReturn<T extends ProductSnapshotCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, ProductSnapshotCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
720
- /**
721
- * Delete a ProductSnapshot.
722
- * @param {ProductSnapshotDeleteArgs} args - Arguments to delete one ProductSnapshot.
723
- * @example
724
- * // Delete one ProductSnapshot
725
- * const ProductSnapshot = await prisma.productSnapshot.delete({
726
- * where: {
727
- * // ... filter to delete one ProductSnapshot
728
- * }
729
- * })
730
- *
731
- */
732
554
  delete<T extends ProductSnapshotDeleteArgs>(args: Prisma.SelectSubset<T, ProductSnapshotDeleteArgs<ExtArgs>>): Prisma.Prisma__ProductSnapshotClient<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
733
- /**
734
- * Update one ProductSnapshot.
735
- * @param {ProductSnapshotUpdateArgs} args - Arguments to update one ProductSnapshot.
736
- * @example
737
- * // Update one ProductSnapshot
738
- * const productSnapshot = await prisma.productSnapshot.update({
739
- * where: {
740
- * // ... provide filter here
741
- * },
742
- * data: {
743
- * // ... provide data here
744
- * }
745
- * })
746
- *
747
- */
748
555
  update<T extends ProductSnapshotUpdateArgs>(args: Prisma.SelectSubset<T, ProductSnapshotUpdateArgs<ExtArgs>>): Prisma.Prisma__ProductSnapshotClient<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
749
- /**
750
- * Delete zero or more ProductSnapshots.
751
- * @param {ProductSnapshotDeleteManyArgs} args - Arguments to filter ProductSnapshots to delete.
752
- * @example
753
- * // Delete a few ProductSnapshots
754
- * const { count } = await prisma.productSnapshot.deleteMany({
755
- * where: {
756
- * // ... provide filter here
757
- * }
758
- * })
759
- *
760
- */
761
556
  deleteMany<T extends ProductSnapshotDeleteManyArgs>(args?: Prisma.SelectSubset<T, ProductSnapshotDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
762
- /**
763
- * Update zero or more ProductSnapshots.
764
- * Note, that providing `undefined` is treated as the value not being there.
765
- * Read more here: https://pris.ly/d/null-undefined
766
- * @param {ProductSnapshotUpdateManyArgs} args - Arguments to update one or more rows.
767
- * @example
768
- * // Update many ProductSnapshots
769
- * const productSnapshot = await prisma.productSnapshot.updateMany({
770
- * where: {
771
- * // ... provide filter here
772
- * },
773
- * data: {
774
- * // ... provide data here
775
- * }
776
- * })
777
- *
778
- */
779
557
  updateMany<T extends ProductSnapshotUpdateManyArgs>(args: Prisma.SelectSubset<T, ProductSnapshotUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
780
- /**
781
- * Update zero or more ProductSnapshots and returns the data updated in the database.
782
- * @param {ProductSnapshotUpdateManyAndReturnArgs} args - Arguments to update many ProductSnapshots.
783
- * @example
784
- * // Update many ProductSnapshots
785
- * const productSnapshot = await prisma.productSnapshot.updateManyAndReturn({
786
- * where: {
787
- * // ... provide filter here
788
- * },
789
- * data: [
790
- * // ... provide data here
791
- * ]
792
- * })
793
- *
794
- * // Update zero or more ProductSnapshots and only return the `id`
795
- * const productSnapshotWithIdOnly = await prisma.productSnapshot.updateManyAndReturn({
796
- * select: { id: true },
797
- * where: {
798
- * // ... provide filter here
799
- * },
800
- * data: [
801
- * // ... provide data here
802
- * ]
803
- * })
804
- * Note, that providing `undefined` is treated as the value not being there.
805
- * Read more here: https://pris.ly/d/null-undefined
806
- *
807
- */
808
558
  updateManyAndReturn<T extends ProductSnapshotUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, ProductSnapshotUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
809
- /**
810
- * Create or update one ProductSnapshot.
811
- * @param {ProductSnapshotUpsertArgs} args - Arguments to update or create a ProductSnapshot.
812
- * @example
813
- * // Update or create a ProductSnapshot
814
- * const productSnapshot = await prisma.productSnapshot.upsert({
815
- * create: {
816
- * // ... data to create a ProductSnapshot
817
- * },
818
- * update: {
819
- * // ... in case it already exists, update
820
- * },
821
- * where: {
822
- * // ... the filter for the ProductSnapshot we want to update
823
- * }
824
- * })
825
- */
826
559
  upsert<T extends ProductSnapshotUpsertArgs>(args: Prisma.SelectSubset<T, ProductSnapshotUpsertArgs<ExtArgs>>): Prisma.Prisma__ProductSnapshotClient<runtime.Types.Result.GetResult<Prisma.$ProductSnapshotPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
827
- /**
828
- * Count the number of ProductSnapshots.
829
- * Note, that providing `undefined` is treated as the value not being there.
830
- * Read more here: https://pris.ly/d/null-undefined
831
- * @param {ProductSnapshotCountArgs} args - Arguments to filter ProductSnapshots to count.
832
- * @example
833
- * // Count the number of ProductSnapshots
834
- * const count = await prisma.productSnapshot.count({
835
- * where: {
836
- * // ... the filter for the ProductSnapshots we want to count
837
- * }
838
- * })
839
- **/
840
560
  count<T extends ProductSnapshotCountArgs>(args?: Prisma.Subset<T, ProductSnapshotCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], ProductSnapshotCountAggregateOutputType> : number>;
841
- /**
842
- * Allows you to perform aggregations operations on a ProductSnapshot.
843
- * Note, that providing `undefined` is treated as the value not being there.
844
- * Read more here: https://pris.ly/d/null-undefined
845
- * @param {ProductSnapshotAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
846
- * @example
847
- * // Ordered by age ascending
848
- * // Where email contains prisma.io
849
- * // Limited to the 10 users
850
- * const aggregations = await prisma.user.aggregate({
851
- * _avg: {
852
- * age: true,
853
- * },
854
- * where: {
855
- * email: {
856
- * contains: "prisma.io",
857
- * },
858
- * },
859
- * orderBy: {
860
- * age: "asc",
861
- * },
862
- * take: 10,
863
- * })
864
- **/
865
561
  aggregate<T extends ProductSnapshotAggregateArgs>(args: Prisma.Subset<T, ProductSnapshotAggregateArgs>): Prisma.PrismaPromise<GetProductSnapshotAggregateType<T>>;
866
- /**
867
- * Group by ProductSnapshot.
868
- * Note, that providing `undefined` is treated as the value not being there.
869
- * Read more here: https://pris.ly/d/null-undefined
870
- * @param {ProductSnapshotGroupByArgs} args - Group by arguments.
871
- * @example
872
- * // Group by city, order by createdAt, get count
873
- * const result = await prisma.user.groupBy({
874
- * by: ['city', 'createdAt'],
875
- * orderBy: {
876
- * createdAt: true
877
- * },
878
- * _count: {
879
- * _all: true
880
- * },
881
- * })
882
- *
883
- **/
884
562
  groupBy<T extends ProductSnapshotGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
885
563
  orderBy: ProductSnapshotGroupByArgs['orderBy'];
886
564
  } : {
@@ -899,46 +577,17 @@ export interface ProductSnapshotDelegate<ExtArgs extends runtime.Types.Extension
899
577
  }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
900
578
  [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
901
579
  }[OrderFields]>(args: Prisma.SubsetIntersection<T, ProductSnapshotGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetProductSnapshotGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
902
- /**
903
- * Fields of the ProductSnapshot model
904
- */
905
580
  readonly fields: ProductSnapshotFieldRefs;
906
581
  }
907
- /**
908
- * The delegate class that acts as a "Promise-like" for ProductSnapshot.
909
- * Why is this prefixed with `Prisma__`?
910
- * Because we want to prevent naming conflicts as mentioned in
911
- * https://github.com/prisma/prisma-client-js/issues/707
912
- */
913
582
  export interface Prisma__ProductSnapshotClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
914
583
  readonly [Symbol.toStringTag]: "PrismaPromise";
915
584
  product<T extends Prisma.ProductDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductDefaultArgs<ExtArgs>>): Prisma.Prisma__ProductClient<runtime.Types.Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
916
585
  latestForProduct<T extends Prisma.ProductSnapshot$latestForProductArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductSnapshot$latestForProductArgs<ExtArgs>>): Prisma.Prisma__ProductClient<runtime.Types.Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
917
586
  orderItems<T extends Prisma.ProductSnapshot$orderItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductSnapshot$orderItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrderItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
918
- /**
919
- * Attaches callbacks for the resolution and/or rejection of the Promise.
920
- * @param onfulfilled The callback to execute when the Promise is resolved.
921
- * @param onrejected The callback to execute when the Promise is rejected.
922
- * @returns A Promise for the completion of which ever callback is executed.
923
- */
924
587
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>;
925
- /**
926
- * Attaches a callback for only the rejection of the Promise.
927
- * @param onrejected The callback to execute when the Promise is rejected.
928
- * @returns A Promise for the completion of the callback.
929
- */
930
588
  catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
931
- /**
932
- * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
933
- * resolved value cannot be modified from the callback.
934
- * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
935
- * @returns A Promise for the completion of the callback.
936
- */
937
589
  finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
938
590
  }
939
- /**
940
- * Fields of the ProductSnapshot model
941
- */
942
591
  export interface ProductSnapshotFieldRefs {
943
592
  readonly id: Prisma.FieldRef<"ProductSnapshot", 'String'>;
944
593
  readonly productId: Prisma.FieldRef<"ProductSnapshot", 'String'>;
@@ -946,416 +595,115 @@ export interface ProductSnapshotFieldRefs {
946
595
  readonly createdAt: Prisma.FieldRef<"ProductSnapshot", 'DateTime'>;
947
596
  readonly createdBy: Prisma.FieldRef<"ProductSnapshot", 'String'>;
948
597
  }
949
- /**
950
- * ProductSnapshot findUnique
951
- */
952
598
  export type ProductSnapshotFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
953
- /**
954
- * Select specific fields to fetch from the ProductSnapshot
955
- */
956
599
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
957
- /**
958
- * Omit specific fields from the ProductSnapshot
959
- */
960
600
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
961
- /**
962
- * Choose, which related nodes to fetch as well
963
- */
964
601
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
965
- /**
966
- * Filter, which ProductSnapshot to fetch.
967
- */
968
602
  where: Prisma.ProductSnapshotWhereUniqueInput;
969
603
  };
970
- /**
971
- * ProductSnapshot findUniqueOrThrow
972
- */
973
604
  export type ProductSnapshotFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
974
- /**
975
- * Select specific fields to fetch from the ProductSnapshot
976
- */
977
605
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
978
- /**
979
- * Omit specific fields from the ProductSnapshot
980
- */
981
606
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
982
- /**
983
- * Choose, which related nodes to fetch as well
984
- */
985
607
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
986
- /**
987
- * Filter, which ProductSnapshot to fetch.
988
- */
989
608
  where: Prisma.ProductSnapshotWhereUniqueInput;
990
609
  };
991
- /**
992
- * ProductSnapshot findFirst
993
- */
994
610
  export type ProductSnapshotFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
995
- /**
996
- * Select specific fields to fetch from the ProductSnapshot
997
- */
998
611
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
999
- /**
1000
- * Omit specific fields from the ProductSnapshot
1001
- */
1002
612
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1003
- /**
1004
- * Choose, which related nodes to fetch as well
1005
- */
1006
613
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
1007
- /**
1008
- * Filter, which ProductSnapshot to fetch.
1009
- */
1010
614
  where?: Prisma.ProductSnapshotWhereInput;
1011
- /**
1012
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1013
- *
1014
- * Determine the order of ProductSnapshots to fetch.
1015
- */
1016
615
  orderBy?: Prisma.ProductSnapshotOrderByWithRelationInput | Prisma.ProductSnapshotOrderByWithRelationInput[];
1017
- /**
1018
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1019
- *
1020
- * Sets the position for searching for ProductSnapshots.
1021
- */
1022
616
  cursor?: Prisma.ProductSnapshotWhereUniqueInput;
1023
- /**
1024
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1025
- *
1026
- * Take `±n` ProductSnapshots from the position of the cursor.
1027
- */
1028
617
  take?: number;
1029
- /**
1030
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1031
- *
1032
- * Skip the first `n` ProductSnapshots.
1033
- */
1034
618
  skip?: number;
1035
- /**
1036
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1037
- *
1038
- * Filter by unique combinations of ProductSnapshots.
1039
- */
1040
619
  distinct?: Prisma.ProductSnapshotScalarFieldEnum | Prisma.ProductSnapshotScalarFieldEnum[];
1041
620
  };
1042
- /**
1043
- * ProductSnapshot findFirstOrThrow
1044
- */
1045
621
  export type ProductSnapshotFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1046
- /**
1047
- * Select specific fields to fetch from the ProductSnapshot
1048
- */
1049
622
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
1050
- /**
1051
- * Omit specific fields from the ProductSnapshot
1052
- */
1053
623
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1054
- /**
1055
- * Choose, which related nodes to fetch as well
1056
- */
1057
624
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
1058
- /**
1059
- * Filter, which ProductSnapshot to fetch.
1060
- */
1061
625
  where?: Prisma.ProductSnapshotWhereInput;
1062
- /**
1063
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1064
- *
1065
- * Determine the order of ProductSnapshots to fetch.
1066
- */
1067
626
  orderBy?: Prisma.ProductSnapshotOrderByWithRelationInput | Prisma.ProductSnapshotOrderByWithRelationInput[];
1068
- /**
1069
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1070
- *
1071
- * Sets the position for searching for ProductSnapshots.
1072
- */
1073
627
  cursor?: Prisma.ProductSnapshotWhereUniqueInput;
1074
- /**
1075
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1076
- *
1077
- * Take `±n` ProductSnapshots from the position of the cursor.
1078
- */
1079
628
  take?: number;
1080
- /**
1081
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1082
- *
1083
- * Skip the first `n` ProductSnapshots.
1084
- */
1085
629
  skip?: number;
1086
- /**
1087
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1088
- *
1089
- * Filter by unique combinations of ProductSnapshots.
1090
- */
1091
630
  distinct?: Prisma.ProductSnapshotScalarFieldEnum | Prisma.ProductSnapshotScalarFieldEnum[];
1092
631
  };
1093
- /**
1094
- * ProductSnapshot findMany
1095
- */
1096
632
  export type ProductSnapshotFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1097
- /**
1098
- * Select specific fields to fetch from the ProductSnapshot
1099
- */
1100
633
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
1101
- /**
1102
- * Omit specific fields from the ProductSnapshot
1103
- */
1104
634
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1105
- /**
1106
- * Choose, which related nodes to fetch as well
1107
- */
1108
635
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
1109
- /**
1110
- * Filter, which ProductSnapshots to fetch.
1111
- */
1112
636
  where?: Prisma.ProductSnapshotWhereInput;
1113
- /**
1114
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1115
- *
1116
- * Determine the order of ProductSnapshots to fetch.
1117
- */
1118
637
  orderBy?: Prisma.ProductSnapshotOrderByWithRelationInput | Prisma.ProductSnapshotOrderByWithRelationInput[];
1119
- /**
1120
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1121
- *
1122
- * Sets the position for listing ProductSnapshots.
1123
- */
1124
638
  cursor?: Prisma.ProductSnapshotWhereUniqueInput;
1125
- /**
1126
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1127
- *
1128
- * Take `±n` ProductSnapshots from the position of the cursor.
1129
- */
1130
639
  take?: number;
1131
- /**
1132
- * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1133
- *
1134
- * Skip the first `n` ProductSnapshots.
1135
- */
1136
640
  skip?: number;
1137
641
  distinct?: Prisma.ProductSnapshotScalarFieldEnum | Prisma.ProductSnapshotScalarFieldEnum[];
1138
642
  };
1139
- /**
1140
- * ProductSnapshot create
1141
- */
1142
643
  export type ProductSnapshotCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1143
- /**
1144
- * Select specific fields to fetch from the ProductSnapshot
1145
- */
1146
644
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
1147
- /**
1148
- * Omit specific fields from the ProductSnapshot
1149
- */
1150
645
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1151
- /**
1152
- * Choose, which related nodes to fetch as well
1153
- */
1154
646
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
1155
- /**
1156
- * The data needed to create a ProductSnapshot.
1157
- */
1158
647
  data: Prisma.XOR<Prisma.ProductSnapshotCreateInput, Prisma.ProductSnapshotUncheckedCreateInput>;
1159
648
  };
1160
- /**
1161
- * ProductSnapshot createMany
1162
- */
1163
649
  export type ProductSnapshotCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1164
- /**
1165
- * The data used to create many ProductSnapshots.
1166
- */
1167
650
  data: Prisma.ProductSnapshotCreateManyInput | Prisma.ProductSnapshotCreateManyInput[];
1168
651
  skipDuplicates?: boolean;
1169
652
  };
1170
- /**
1171
- * ProductSnapshot createManyAndReturn
1172
- */
1173
653
  export type ProductSnapshotCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1174
- /**
1175
- * Select specific fields to fetch from the ProductSnapshot
1176
- */
1177
654
  select?: Prisma.ProductSnapshotSelectCreateManyAndReturn<ExtArgs> | null;
1178
- /**
1179
- * Omit specific fields from the ProductSnapshot
1180
- */
1181
655
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1182
- /**
1183
- * The data used to create many ProductSnapshots.
1184
- */
1185
656
  data: Prisma.ProductSnapshotCreateManyInput | Prisma.ProductSnapshotCreateManyInput[];
1186
657
  skipDuplicates?: boolean;
1187
- /**
1188
- * Choose, which related nodes to fetch as well
1189
- */
1190
658
  include?: Prisma.ProductSnapshotIncludeCreateManyAndReturn<ExtArgs> | null;
1191
659
  };
1192
- /**
1193
- * ProductSnapshot update
1194
- */
1195
660
  export type ProductSnapshotUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1196
- /**
1197
- * Select specific fields to fetch from the ProductSnapshot
1198
- */
1199
661
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
1200
- /**
1201
- * Omit specific fields from the ProductSnapshot
1202
- */
1203
662
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1204
- /**
1205
- * Choose, which related nodes to fetch as well
1206
- */
1207
663
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
1208
- /**
1209
- * The data needed to update a ProductSnapshot.
1210
- */
1211
664
  data: Prisma.XOR<Prisma.ProductSnapshotUpdateInput, Prisma.ProductSnapshotUncheckedUpdateInput>;
1212
- /**
1213
- * Choose, which ProductSnapshot to update.
1214
- */
1215
665
  where: Prisma.ProductSnapshotWhereUniqueInput;
1216
666
  };
1217
- /**
1218
- * ProductSnapshot updateMany
1219
- */
1220
667
  export type ProductSnapshotUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1221
- /**
1222
- * The data used to update ProductSnapshots.
1223
- */
1224
668
  data: Prisma.XOR<Prisma.ProductSnapshotUpdateManyMutationInput, Prisma.ProductSnapshotUncheckedUpdateManyInput>;
1225
- /**
1226
- * Filter which ProductSnapshots to update
1227
- */
1228
669
  where?: Prisma.ProductSnapshotWhereInput;
1229
- /**
1230
- * Limit how many ProductSnapshots to update.
1231
- */
1232
670
  limit?: number;
1233
671
  };
1234
- /**
1235
- * ProductSnapshot updateManyAndReturn
1236
- */
1237
672
  export type ProductSnapshotUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1238
- /**
1239
- * Select specific fields to fetch from the ProductSnapshot
1240
- */
1241
673
  select?: Prisma.ProductSnapshotSelectUpdateManyAndReturn<ExtArgs> | null;
1242
- /**
1243
- * Omit specific fields from the ProductSnapshot
1244
- */
1245
674
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1246
- /**
1247
- * The data used to update ProductSnapshots.
1248
- */
1249
675
  data: Prisma.XOR<Prisma.ProductSnapshotUpdateManyMutationInput, Prisma.ProductSnapshotUncheckedUpdateManyInput>;
1250
- /**
1251
- * Filter which ProductSnapshots to update
1252
- */
1253
676
  where?: Prisma.ProductSnapshotWhereInput;
1254
- /**
1255
- * Limit how many ProductSnapshots to update.
1256
- */
1257
677
  limit?: number;
1258
- /**
1259
- * Choose, which related nodes to fetch as well
1260
- */
1261
678
  include?: Prisma.ProductSnapshotIncludeUpdateManyAndReturn<ExtArgs> | null;
1262
679
  };
1263
- /**
1264
- * ProductSnapshot upsert
1265
- */
1266
680
  export type ProductSnapshotUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1267
- /**
1268
- * Select specific fields to fetch from the ProductSnapshot
1269
- */
1270
681
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
1271
- /**
1272
- * Omit specific fields from the ProductSnapshot
1273
- */
1274
682
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1275
- /**
1276
- * Choose, which related nodes to fetch as well
1277
- */
1278
683
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
1279
- /**
1280
- * The filter to search for the ProductSnapshot to update in case it exists.
1281
- */
1282
684
  where: Prisma.ProductSnapshotWhereUniqueInput;
1283
- /**
1284
- * In case the ProductSnapshot found by the `where` argument doesn't exist, create a new ProductSnapshot with this data.
1285
- */
1286
685
  create: Prisma.XOR<Prisma.ProductSnapshotCreateInput, Prisma.ProductSnapshotUncheckedCreateInput>;
1287
- /**
1288
- * In case the ProductSnapshot was found with the provided `where` argument, update it with this data.
1289
- */
1290
686
  update: Prisma.XOR<Prisma.ProductSnapshotUpdateInput, Prisma.ProductSnapshotUncheckedUpdateInput>;
1291
687
  };
1292
- /**
1293
- * ProductSnapshot delete
1294
- */
1295
688
  export type ProductSnapshotDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1296
- /**
1297
- * Select specific fields to fetch from the ProductSnapshot
1298
- */
1299
689
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
1300
- /**
1301
- * Omit specific fields from the ProductSnapshot
1302
- */
1303
690
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1304
- /**
1305
- * Choose, which related nodes to fetch as well
1306
- */
1307
691
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
1308
- /**
1309
- * Filter which ProductSnapshot to delete.
1310
- */
1311
692
  where: Prisma.ProductSnapshotWhereUniqueInput;
1312
693
  };
1313
- /**
1314
- * ProductSnapshot deleteMany
1315
- */
1316
694
  export type ProductSnapshotDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1317
- /**
1318
- * Filter which ProductSnapshots to delete
1319
- */
1320
695
  where?: Prisma.ProductSnapshotWhereInput;
1321
- /**
1322
- * Limit how many ProductSnapshots to delete.
1323
- */
1324
696
  limit?: number;
1325
697
  };
1326
- /**
1327
- * ProductSnapshot.latestForProduct
1328
- */
1329
698
  export type ProductSnapshot$latestForProductArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1330
- /**
1331
- * Select specific fields to fetch from the Product
1332
- */
1333
699
  select?: Prisma.ProductSelect<ExtArgs> | null;
1334
- /**
1335
- * Omit specific fields from the Product
1336
- */
1337
700
  omit?: Prisma.ProductOmit<ExtArgs> | null;
1338
- /**
1339
- * Choose, which related nodes to fetch as well
1340
- */
1341
701
  include?: Prisma.ProductInclude<ExtArgs> | null;
1342
702
  where?: Prisma.ProductWhereInput;
1343
703
  };
1344
- /**
1345
- * ProductSnapshot.orderItems
1346
- */
1347
704
  export type ProductSnapshot$orderItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1348
- /**
1349
- * Select specific fields to fetch from the OrderItem
1350
- */
1351
705
  select?: Prisma.OrderItemSelect<ExtArgs> | null;
1352
- /**
1353
- * Omit specific fields from the OrderItem
1354
- */
1355
706
  omit?: Prisma.OrderItemOmit<ExtArgs> | null;
1356
- /**
1357
- * Choose, which related nodes to fetch as well
1358
- */
1359
707
  include?: Prisma.OrderItemInclude<ExtArgs> | null;
1360
708
  where?: Prisma.OrderItemWhereInput;
1361
709
  orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[];
@@ -1364,21 +712,9 @@ export type ProductSnapshot$orderItemsArgs<ExtArgs extends runtime.Types.Extensi
1364
712
  skip?: number;
1365
713
  distinct?: Prisma.OrderItemScalarFieldEnum | Prisma.OrderItemScalarFieldEnum[];
1366
714
  };
1367
- /**
1368
- * ProductSnapshot without action
1369
- */
1370
715
  export type ProductSnapshotDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1371
- /**
1372
- * Select specific fields to fetch from the ProductSnapshot
1373
- */
1374
716
  select?: Prisma.ProductSnapshotSelect<ExtArgs> | null;
1375
- /**
1376
- * Omit specific fields from the ProductSnapshot
1377
- */
1378
717
  omit?: Prisma.ProductSnapshotOmit<ExtArgs> | null;
1379
- /**
1380
- * Choose, which related nodes to fetch as well
1381
- */
1382
718
  include?: Prisma.ProductSnapshotInclude<ExtArgs> | null;
1383
719
  };
1384
720
  export {};