@commercejs/platform 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/README.md +156 -0
  2. package/dist/__tests__/platform.drizzle.test.d.ts +2 -0
  3. package/dist/__tests__/platform.drizzle.test.d.ts.map +1 -0
  4. package/dist/__tests__/platform.drizzle.test.js +27 -0
  5. package/dist/__tests__/platform.drizzle.test.js.map +1 -0
  6. package/dist/__tests__/platform.prisma.test.d.ts +2 -0
  7. package/dist/__tests__/platform.prisma.test.d.ts.map +1 -0
  8. package/dist/__tests__/platform.prisma.test.js +27 -0
  9. package/dist/__tests__/platform.prisma.test.js.map +1 -0
  10. package/dist/__tests__/platform.suite.d.ts +8 -0
  11. package/dist/__tests__/platform.suite.d.ts.map +1 -0
  12. package/dist/__tests__/platform.suite.js +406 -0
  13. package/dist/__tests__/platform.suite.js.map +1 -0
  14. package/dist/adapter.d.ts +20 -0
  15. package/dist/adapter.d.ts.map +1 -0
  16. package/dist/adapter.js +122 -0
  17. package/dist/adapter.js.map +1 -0
  18. package/dist/database/drizzle/client.d.ts +13 -0
  19. package/dist/database/drizzle/client.d.ts.map +1 -0
  20. package/dist/database/drizzle/client.js +29 -0
  21. package/dist/database/drizzle/client.js.map +1 -0
  22. package/dist/database/drizzle/index.d.ts +5 -0
  23. package/dist/database/drizzle/index.d.ts.map +1 -0
  24. package/dist/database/drizzle/index.js +7 -0
  25. package/dist/database/drizzle/index.js.map +1 -0
  26. package/dist/database/drizzle/migrate.d.ts +9 -0
  27. package/dist/database/drizzle/migrate.d.ts.map +1 -0
  28. package/dist/database/drizzle/migrate.js +317 -0
  29. package/dist/database/drizzle/migrate.js.map +1 -0
  30. package/dist/database/drizzle/queries/brands.d.ts +26 -0
  31. package/dist/database/drizzle/queries/brands.d.ts.map +1 -0
  32. package/dist/database/drizzle/queries/brands.js +19 -0
  33. package/dist/database/drizzle/queries/brands.js.map +1 -0
  34. package/dist/database/drizzle/queries/cart.d.ts +61 -0
  35. package/dist/database/drizzle/queries/cart.d.ts.map +1 -0
  36. package/dist/database/drizzle/queries/cart.js +57 -0
  37. package/dist/database/drizzle/queries/cart.js.map +1 -0
  38. package/dist/database/drizzle/queries/catalog.d.ts +149 -0
  39. package/dist/database/drizzle/queries/catalog.d.ts.map +1 -0
  40. package/dist/database/drizzle/queries/catalog.js +88 -0
  41. package/dist/database/drizzle/queries/catalog.js.map +1 -0
  42. package/dist/database/drizzle/queries/countries.d.ts +22 -0
  43. package/dist/database/drizzle/queries/countries.d.ts.map +1 -0
  44. package/dist/database/drizzle/queries/countries.js +19 -0
  45. package/dist/database/drizzle/queries/countries.js.map +1 -0
  46. package/dist/database/drizzle/queries/customers.d.ts +87 -0
  47. package/dist/database/drizzle/queries/customers.d.ts.map +1 -0
  48. package/dist/database/drizzle/queries/customers.js +41 -0
  49. package/dist/database/drizzle/queries/customers.js.map +1 -0
  50. package/dist/database/drizzle/queries/index.d.ts +12 -0
  51. package/dist/database/drizzle/queries/index.d.ts.map +1 -0
  52. package/dist/database/drizzle/queries/index.js +28 -0
  53. package/dist/database/drizzle/queries/index.js.map +1 -0
  54. package/dist/database/drizzle/queries/orders.d.ts +74 -0
  55. package/dist/database/drizzle/queries/orders.d.ts.map +1 -0
  56. package/dist/database/drizzle/queries/orders.js +39 -0
  57. package/dist/database/drizzle/queries/orders.js.map +1 -0
  58. package/dist/database/drizzle/queries/promotions.d.ts +61 -0
  59. package/dist/database/drizzle/queries/promotions.d.ts.map +1 -0
  60. package/dist/database/drizzle/queries/promotions.js +39 -0
  61. package/dist/database/drizzle/queries/promotions.js.map +1 -0
  62. package/dist/database/drizzle/queries/returns.d.ts +62 -0
  63. package/dist/database/drizzle/queries/returns.d.ts.map +1 -0
  64. package/dist/database/drizzle/queries/returns.js +58 -0
  65. package/dist/database/drizzle/queries/returns.js.map +1 -0
  66. package/dist/database/drizzle/queries/reviews.d.ts +25 -0
  67. package/dist/database/drizzle/queries/reviews.d.ts.map +1 -0
  68. package/dist/database/drizzle/queries/reviews.js +57 -0
  69. package/dist/database/drizzle/queries/reviews.js.map +1 -0
  70. package/dist/database/drizzle/queries/store.d.ts +22 -0
  71. package/dist/database/drizzle/queries/store.d.ts.map +1 -0
  72. package/dist/database/drizzle/queries/store.js +14 -0
  73. package/dist/database/drizzle/queries/store.js.map +1 -0
  74. package/dist/database/drizzle/queries/wishlists.d.ts +31 -0
  75. package/dist/database/drizzle/queries/wishlists.d.ts.map +1 -0
  76. package/dist/database/drizzle/queries/wishlists.js +44 -0
  77. package/dist/database/drizzle/queries/wishlists.js.map +1 -0
  78. package/dist/database/drizzle/schema/brands.d.ts +196 -0
  79. package/dist/database/drizzle/schema/brands.d.ts.map +1 -0
  80. package/dist/database/drizzle/schema/brands.js +17 -0
  81. package/dist/database/drizzle/schema/brands.js.map +1 -0
  82. package/dist/database/drizzle/schema/carts.d.ts +294 -0
  83. package/dist/database/drizzle/schema/carts.d.ts.map +1 -0
  84. package/dist/database/drizzle/schema/carts.js +28 -0
  85. package/dist/database/drizzle/schema/carts.js.map +1 -0
  86. package/dist/database/drizzle/schema/categories.d.ts +215 -0
  87. package/dist/database/drizzle/schema/categories.d.ts.map +1 -0
  88. package/dist/database/drizzle/schema/categories.js +18 -0
  89. package/dist/database/drizzle/schema/categories.js.map +1 -0
  90. package/dist/database/drizzle/schema/countries.d.ts +158 -0
  91. package/dist/database/drizzle/schema/countries.d.ts.map +1 -0
  92. package/dist/database/drizzle/schema/countries.js +15 -0
  93. package/dist/database/drizzle/schema/countries.js.map +1 -0
  94. package/dist/database/drizzle/schema/customers.d.ts +469 -0
  95. package/dist/database/drizzle/schema/customers.d.ts.map +1 -0
  96. package/dist/database/drizzle/schema/customers.js +33 -0
  97. package/dist/database/drizzle/schema/customers.js.map +1 -0
  98. package/dist/database/drizzle/schema/index.d.ts +13 -0
  99. package/dist/database/drizzle/schema/index.d.ts.map +1 -0
  100. package/dist/database/drizzle/schema/index.js +16 -0
  101. package/dist/database/drizzle/schema/index.js.map +1 -0
  102. package/dist/database/drizzle/schema/orders.d.ts +722 -0
  103. package/dist/database/drizzle/schema/orders.d.ts.map +1 -0
  104. package/dist/database/drizzle/schema/orders.js +63 -0
  105. package/dist/database/drizzle/schema/orders.js.map +1 -0
  106. package/dist/database/drizzle/schema/products.d.ts +1180 -0
  107. package/dist/database/drizzle/schema/products.d.ts.map +1 -0
  108. package/dist/database/drizzle/schema/products.js +99 -0
  109. package/dist/database/drizzle/schema/products.js.map +1 -0
  110. package/dist/database/drizzle/schema/promotions.d.ts +474 -0
  111. package/dist/database/drizzle/schema/promotions.d.ts.map +1 -0
  112. package/dist/database/drizzle/schema/promotions.js +34 -0
  113. package/dist/database/drizzle/schema/promotions.js.map +1 -0
  114. package/dist/database/drizzle/schema/returns.d.ts +467 -0
  115. package/dist/database/drizzle/schema/returns.d.ts.map +1 -0
  116. package/dist/database/drizzle/schema/returns.js +34 -0
  117. package/dist/database/drizzle/schema/returns.js.map +1 -0
  118. package/dist/database/drizzle/schema/reviews.d.ts +175 -0
  119. package/dist/database/drizzle/schema/reviews.d.ts.map +1 -0
  120. package/dist/database/drizzle/schema/reviews.js +17 -0
  121. package/dist/database/drizzle/schema/reviews.js.map +1 -0
  122. package/dist/database/drizzle/schema/store.d.ts +350 -0
  123. package/dist/database/drizzle/schema/store.d.ts.map +1 -0
  124. package/dist/database/drizzle/schema/store.js +25 -0
  125. package/dist/database/drizzle/schema/store.js.map +1 -0
  126. package/dist/database/drizzle/schema/wishlists.d.ts +167 -0
  127. package/dist/database/drizzle/schema/wishlists.d.ts.map +1 -0
  128. package/dist/database/drizzle/schema/wishlists.js +19 -0
  129. package/dist/database/drizzle/schema/wishlists.js.map +1 -0
  130. package/dist/database/drizzle/seed.d.ts +6 -0
  131. package/dist/database/drizzle/seed.d.ts.map +1 -0
  132. package/dist/database/drizzle/seed.js +166 -0
  133. package/dist/database/drizzle/seed.js.map +1 -0
  134. package/dist/database/index.d.ts +8 -0
  135. package/dist/database/index.d.ts.map +1 -0
  136. package/dist/database/index.js +12 -0
  137. package/dist/database/index.js.map +1 -0
  138. package/dist/database/prisma/client.d.ts +13 -0
  139. package/dist/database/prisma/client.d.ts.map +1 -0
  140. package/dist/database/prisma/client.js +25 -0
  141. package/dist/database/prisma/client.js.map +1 -0
  142. package/dist/database/prisma/generated/browser.d.ts +135 -0
  143. package/dist/database/prisma/generated/browser.d.ts.map +1 -0
  144. package/dist/database/prisma/generated/browser.js +18 -0
  145. package/dist/database/prisma/generated/browser.js.map +1 -0
  146. package/dist/database/prisma/generated/client.d.ts +152 -0
  147. package/dist/database/prisma/generated/client.d.ts.map +1 -0
  148. package/dist/database/prisma/generated/client.js +33 -0
  149. package/dist/database/prisma/generated/client.js.map +1 -0
  150. package/dist/database/prisma/generated/commonInputTypes.d.ts +344 -0
  151. package/dist/database/prisma/generated/commonInputTypes.d.ts.map +1 -0
  152. package/dist/database/prisma/generated/commonInputTypes.js +11 -0
  153. package/dist/database/prisma/generated/commonInputTypes.js.map +1 -0
  154. package/dist/database/prisma/generated/enums.d.ts +2 -0
  155. package/dist/database/prisma/generated/enums.d.ts.map +1 -0
  156. package/dist/database/prisma/generated/enums.js +11 -0
  157. package/dist/database/prisma/generated/enums.js.map +1 -0
  158. package/dist/database/prisma/generated/internal/class.d.ts +402 -0
  159. package/dist/database/prisma/generated/internal/class.d.ts.map +1 -0
  160. package/dist/database/prisma/generated/internal/class.js +42 -0
  161. package/dist/database/prisma/generated/internal/class.js.map +1 -0
  162. package/dist/database/prisma/generated/internal/prismaNamespace.d.ts +2735 -0
  163. package/dist/database/prisma/generated/internal/prismaNamespace.d.ts.map +1 -0
  164. package/dist/database/prisma/generated/internal/prismaNamespace.js +415 -0
  165. package/dist/database/prisma/generated/internal/prismaNamespace.js.map +1 -0
  166. package/dist/database/prisma/generated/internal/prismaNamespaceBrowser.d.ts +400 -0
  167. package/dist/database/prisma/generated/internal/prismaNamespaceBrowser.d.ts.map +1 -0
  168. package/dist/database/prisma/generated/internal/prismaNamespaceBrowser.js +386 -0
  169. package/dist/database/prisma/generated/internal/prismaNamespaceBrowser.js.map +1 -0
  170. package/dist/database/prisma/generated/models/Brand.d.ts +1141 -0
  171. package/dist/database/prisma/generated/models/Brand.d.ts.map +1 -0
  172. package/dist/database/prisma/generated/models/Brand.js +2 -0
  173. package/dist/database/prisma/generated/models/Brand.js.map +1 -0
  174. package/dist/database/prisma/generated/models/Cart.d.ts +1464 -0
  175. package/dist/database/prisma/generated/models/Cart.d.ts.map +1 -0
  176. package/dist/database/prisma/generated/models/Cart.js +2 -0
  177. package/dist/database/prisma/generated/models/Cart.js.map +1 -0
  178. package/dist/database/prisma/generated/models/CartItem.d.ts +1487 -0
  179. package/dist/database/prisma/generated/models/CartItem.d.ts.map +1 -0
  180. package/dist/database/prisma/generated/models/CartItem.js +2 -0
  181. package/dist/database/prisma/generated/models/CartItem.js.map +1 -0
  182. package/dist/database/prisma/generated/models/Category.d.ts +1717 -0
  183. package/dist/database/prisma/generated/models/Category.d.ts.map +1 -0
  184. package/dist/database/prisma/generated/models/Category.js +2 -0
  185. package/dist/database/prisma/generated/models/Category.js.map +1 -0
  186. package/dist/database/prisma/generated/models/Country.d.ts +1076 -0
  187. package/dist/database/prisma/generated/models/Country.d.ts.map +1 -0
  188. package/dist/database/prisma/generated/models/Country.js +2 -0
  189. package/dist/database/prisma/generated/models/Country.js.map +1 -0
  190. package/dist/database/prisma/generated/models/Coupon.d.ts +1242 -0
  191. package/dist/database/prisma/generated/models/Coupon.d.ts.map +1 -0
  192. package/dist/database/prisma/generated/models/Coupon.js +2 -0
  193. package/dist/database/prisma/generated/models/Coupon.js.map +1 -0
  194. package/dist/database/prisma/generated/models/Customer.d.ts +1536 -0
  195. package/dist/database/prisma/generated/models/Customer.d.ts.map +1 -0
  196. package/dist/database/prisma/generated/models/Customer.js +2 -0
  197. package/dist/database/prisma/generated/models/Customer.js.map +1 -0
  198. package/dist/database/prisma/generated/models/CustomerAddress.d.ts +1519 -0
  199. package/dist/database/prisma/generated/models/CustomerAddress.d.ts.map +1 -0
  200. package/dist/database/prisma/generated/models/CustomerAddress.js +2 -0
  201. package/dist/database/prisma/generated/models/CustomerAddress.js.map +1 -0
  202. package/dist/database/prisma/generated/models/Order.d.ts +2136 -0
  203. package/dist/database/prisma/generated/models/Order.d.ts.map +1 -0
  204. package/dist/database/prisma/generated/models/Order.js +2 -0
  205. package/dist/database/prisma/generated/models/Order.js.map +1 -0
  206. package/dist/database/prisma/generated/models/OrderHistory.d.ts +1204 -0
  207. package/dist/database/prisma/generated/models/OrderHistory.d.ts.map +1 -0
  208. package/dist/database/prisma/generated/models/OrderHistory.js +2 -0
  209. package/dist/database/prisma/generated/models/OrderHistory.js.map +1 -0
  210. package/dist/database/prisma/generated/models/OrderItem.d.ts +1464 -0
  211. package/dist/database/prisma/generated/models/OrderItem.d.ts.map +1 -0
  212. package/dist/database/prisma/generated/models/OrderItem.js +2 -0
  213. package/dist/database/prisma/generated/models/OrderItem.js.map +1 -0
  214. package/dist/database/prisma/generated/models/Product.d.ts +2969 -0
  215. package/dist/database/prisma/generated/models/Product.d.ts.map +1 -0
  216. package/dist/database/prisma/generated/models/Product.js +2 -0
  217. package/dist/database/prisma/generated/models/Product.js.map +1 -0
  218. package/dist/database/prisma/generated/models/ProductAttribute.d.ts +1239 -0
  219. package/dist/database/prisma/generated/models/ProductAttribute.d.ts.map +1 -0
  220. package/dist/database/prisma/generated/models/ProductAttribute.js +2 -0
  221. package/dist/database/prisma/generated/models/ProductAttribute.js.map +1 -0
  222. package/dist/database/prisma/generated/models/ProductCategory.d.ts +1154 -0
  223. package/dist/database/prisma/generated/models/ProductCategory.d.ts.map +1 -0
  224. package/dist/database/prisma/generated/models/ProductCategory.js +2 -0
  225. package/dist/database/prisma/generated/models/ProductCategory.js.map +1 -0
  226. package/dist/database/prisma/generated/models/ProductImage.d.ts +1242 -0
  227. package/dist/database/prisma/generated/models/ProductImage.d.ts.map +1 -0
  228. package/dist/database/prisma/generated/models/ProductImage.js +2 -0
  229. package/dist/database/prisma/generated/models/ProductImage.js.map +1 -0
  230. package/dist/database/prisma/generated/models/ProductOption.d.ts +1328 -0
  231. package/dist/database/prisma/generated/models/ProductOption.d.ts.map +1 -0
  232. package/dist/database/prisma/generated/models/ProductOption.js +2 -0
  233. package/dist/database/prisma/generated/models/ProductOption.js.map +1 -0
  234. package/dist/database/prisma/generated/models/ProductOptionValue.d.ts +1207 -0
  235. package/dist/database/prisma/generated/models/ProductOptionValue.d.ts.map +1 -0
  236. package/dist/database/prisma/generated/models/ProductOptionValue.js +2 -0
  237. package/dist/database/prisma/generated/models/ProductOptionValue.js.map +1 -0
  238. package/dist/database/prisma/generated/models/ProductTag.d.ts +1099 -0
  239. package/dist/database/prisma/generated/models/ProductTag.d.ts.map +1 -0
  240. package/dist/database/prisma/generated/models/ProductTag.js +2 -0
  241. package/dist/database/prisma/generated/models/ProductTag.js.map +1 -0
  242. package/dist/database/prisma/generated/models/ProductVariant.d.ts +1543 -0
  243. package/dist/database/prisma/generated/models/ProductVariant.d.ts.map +1 -0
  244. package/dist/database/prisma/generated/models/ProductVariant.js +2 -0
  245. package/dist/database/prisma/generated/models/ProductVariant.js.map +1 -0
  246. package/dist/database/prisma/generated/models/Promotion.d.ts +1658 -0
  247. package/dist/database/prisma/generated/models/Promotion.d.ts.map +1 -0
  248. package/dist/database/prisma/generated/models/Promotion.js +2 -0
  249. package/dist/database/prisma/generated/models/Promotion.js.map +1 -0
  250. package/dist/database/prisma/generated/models/Return.d.ts +1448 -0
  251. package/dist/database/prisma/generated/models/Return.d.ts.map +1 -0
  252. package/dist/database/prisma/generated/models/Return.js +2 -0
  253. package/dist/database/prisma/generated/models/Return.js.map +1 -0
  254. package/dist/database/prisma/generated/models/ReturnItem.d.ts +1417 -0
  255. package/dist/database/prisma/generated/models/ReturnItem.d.ts.map +1 -0
  256. package/dist/database/prisma/generated/models/ReturnItem.js +2 -0
  257. package/dist/database/prisma/generated/models/ReturnItem.js.map +1 -0
  258. package/dist/database/prisma/generated/models/Review.d.ts +1142 -0
  259. package/dist/database/prisma/generated/models/Review.d.ts.map +1 -0
  260. package/dist/database/prisma/generated/models/Review.js +2 -0
  261. package/dist/database/prisma/generated/models/Review.js.map +1 -0
  262. package/dist/database/prisma/generated/models/StoreInfo.d.ts +1356 -0
  263. package/dist/database/prisma/generated/models/StoreInfo.d.ts.map +1 -0
  264. package/dist/database/prisma/generated/models/StoreInfo.js +2 -0
  265. package/dist/database/prisma/generated/models/StoreInfo.js.map +1 -0
  266. package/dist/database/prisma/generated/models/Wishlist.d.ts +1090 -0
  267. package/dist/database/prisma/generated/models/Wishlist.d.ts.map +1 -0
  268. package/dist/database/prisma/generated/models/Wishlist.js +2 -0
  269. package/dist/database/prisma/generated/models/Wishlist.js.map +1 -0
  270. package/dist/database/prisma/generated/models/WishlistItem.d.ts +1169 -0
  271. package/dist/database/prisma/generated/models/WishlistItem.d.ts.map +1 -0
  272. package/dist/database/prisma/generated/models/WishlistItem.js +2 -0
  273. package/dist/database/prisma/generated/models/WishlistItem.js.map +1 -0
  274. package/dist/database/prisma/generated/models.d.ts +28 -0
  275. package/dist/database/prisma/generated/models.d.ts.map +1 -0
  276. package/dist/database/prisma/generated/models.js +2 -0
  277. package/dist/database/prisma/generated/models.js.map +1 -0
  278. package/dist/database/prisma/index.d.ts +5 -0
  279. package/dist/database/prisma/index.d.ts.map +1 -0
  280. package/dist/database/prisma/index.js +7 -0
  281. package/dist/database/prisma/index.js.map +1 -0
  282. package/dist/database/prisma/migrate.d.ts +8 -0
  283. package/dist/database/prisma/migrate.d.ts.map +1 -0
  284. package/dist/database/prisma/migrate.js +323 -0
  285. package/dist/database/prisma/migrate.js.map +1 -0
  286. package/dist/database/prisma/queries/brands.d.ts +26 -0
  287. package/dist/database/prisma/queries/brands.d.ts.map +1 -0
  288. package/dist/database/prisma/queries/brands.js +17 -0
  289. package/dist/database/prisma/queries/brands.js.map +1 -0
  290. package/dist/database/prisma/queries/cart.d.ts +61 -0
  291. package/dist/database/prisma/queries/cart.d.ts.map +1 -0
  292. package/dist/database/prisma/queries/cart.js +68 -0
  293. package/dist/database/prisma/queries/cart.js.map +1 -0
  294. package/dist/database/prisma/queries/catalog.d.ts +149 -0
  295. package/dist/database/prisma/queries/catalog.d.ts.map +1 -0
  296. package/dist/database/prisma/queries/catalog.js +94 -0
  297. package/dist/database/prisma/queries/catalog.js.map +1 -0
  298. package/dist/database/prisma/queries/countries.d.ts +22 -0
  299. package/dist/database/prisma/queries/countries.d.ts.map +1 -0
  300. package/dist/database/prisma/queries/countries.js +17 -0
  301. package/dist/database/prisma/queries/countries.js.map +1 -0
  302. package/dist/database/prisma/queries/customers.d.ts +87 -0
  303. package/dist/database/prisma/queries/customers.d.ts.map +1 -0
  304. package/dist/database/prisma/queries/customers.js +32 -0
  305. package/dist/database/prisma/queries/customers.js.map +1 -0
  306. package/dist/database/prisma/queries/index.d.ts +12 -0
  307. package/dist/database/prisma/queries/index.d.ts.map +1 -0
  308. package/dist/database/prisma/queries/index.js +28 -0
  309. package/dist/database/prisma/queries/index.js.map +1 -0
  310. package/dist/database/prisma/queries/orders.d.ts +74 -0
  311. package/dist/database/prisma/queries/orders.d.ts.map +1 -0
  312. package/dist/database/prisma/queries/orders.js +49 -0
  313. package/dist/database/prisma/queries/orders.js.map +1 -0
  314. package/dist/database/prisma/queries/promotions.d.ts +81 -0
  315. package/dist/database/prisma/queries/promotions.d.ts.map +1 -0
  316. package/dist/database/prisma/queries/promotions.js +31 -0
  317. package/dist/database/prisma/queries/promotions.js.map +1 -0
  318. package/dist/database/prisma/queries/returns.d.ts +102 -0
  319. package/dist/database/prisma/queries/returns.d.ts.map +1 -0
  320. package/dist/database/prisma/queries/returns.js +50 -0
  321. package/dist/database/prisma/queries/returns.js.map +1 -0
  322. package/dist/database/prisma/queries/reviews.d.ts +25 -0
  323. package/dist/database/prisma/queries/reviews.d.ts.map +1 -0
  324. package/dist/database/prisma/queries/reviews.js +50 -0
  325. package/dist/database/prisma/queries/reviews.js.map +1 -0
  326. package/dist/database/prisma/queries/store.d.ts +22 -0
  327. package/dist/database/prisma/queries/store.d.ts.map +1 -0
  328. package/dist/database/prisma/queries/store.js +31 -0
  329. package/dist/database/prisma/queries/store.js.map +1 -0
  330. package/dist/database/prisma/queries/wishlists.d.ts +37 -0
  331. package/dist/database/prisma/queries/wishlists.d.ts.map +1 -0
  332. package/dist/database/prisma/queries/wishlists.js +37 -0
  333. package/dist/database/prisma/queries/wishlists.js.map +1 -0
  334. package/dist/database/prisma/seed.d.ts +5 -0
  335. package/dist/database/prisma/seed.d.ts.map +1 -0
  336. package/dist/database/prisma/seed.js +127 -0
  337. package/dist/database/prisma/seed.js.map +1 -0
  338. package/dist/domains/brands.d.ts +5 -0
  339. package/dist/domains/brands.d.ts.map +1 -0
  340. package/dist/domains/brands.js +21 -0
  341. package/dist/domains/brands.js.map +1 -0
  342. package/dist/domains/cart.d.ts +11 -0
  343. package/dist/domains/cart.d.ts.map +1 -0
  344. package/dist/domains/cart.js +110 -0
  345. package/dist/domains/cart.js.map +1 -0
  346. package/dist/domains/catalog.d.ts +7 -0
  347. package/dist/domains/catalog.d.ts.map +1 -0
  348. package/dist/domains/catalog.js +157 -0
  349. package/dist/domains/catalog.js.map +1 -0
  350. package/dist/domains/checkout.d.ts +11 -0
  351. package/dist/domains/checkout.d.ts.map +1 -0
  352. package/dist/domains/checkout.js +174 -0
  353. package/dist/domains/checkout.js.map +1 -0
  354. package/dist/domains/countries.d.ts +5 -0
  355. package/dist/domains/countries.d.ts.map +1 -0
  356. package/dist/domains/countries.js +21 -0
  357. package/dist/domains/countries.js.map +1 -0
  358. package/dist/domains/customers.d.ts +17 -0
  359. package/dist/domains/customers.d.ts.map +1 -0
  360. package/dist/domains/customers.js +179 -0
  361. package/dist/domains/customers.js.map +1 -0
  362. package/dist/domains/helpers.d.ts +14 -0
  363. package/dist/domains/helpers.d.ts.map +1 -0
  364. package/dist/domains/helpers.js +46 -0
  365. package/dist/domains/helpers.js.map +1 -0
  366. package/dist/domains/not-supported.d.ts +31 -0
  367. package/dist/domains/not-supported.d.ts.map +1 -0
  368. package/dist/domains/not-supported.js +43 -0
  369. package/dist/domains/not-supported.js.map +1 -0
  370. package/dist/domains/orders.d.ts +12 -0
  371. package/dist/domains/orders.d.ts.map +1 -0
  372. package/dist/domains/orders.js +184 -0
  373. package/dist/domains/orders.js.map +1 -0
  374. package/dist/domains/promotions.d.ts +6 -0
  375. package/dist/domains/promotions.d.ts.map +1 -0
  376. package/dist/domains/promotions.js +56 -0
  377. package/dist/domains/promotions.js.map +1 -0
  378. package/dist/domains/returns.d.ts +15 -0
  379. package/dist/domains/returns.d.ts.map +1 -0
  380. package/dist/domains/returns.js +83 -0
  381. package/dist/domains/returns.js.map +1 -0
  382. package/dist/domains/reviews.d.ts +16 -0
  383. package/dist/domains/reviews.d.ts.map +1 -0
  384. package/dist/domains/reviews.js +60 -0
  385. package/dist/domains/reviews.js.map +1 -0
  386. package/dist/domains/store.d.ts +5 -0
  387. package/dist/domains/store.d.ts.map +1 -0
  388. package/dist/domains/store.js +45 -0
  389. package/dist/domains/store.js.map +1 -0
  390. package/dist/domains/wishlist.d.ts +9 -0
  391. package/dist/domains/wishlist.d.ts.map +1 -0
  392. package/dist/domains/wishlist.js +76 -0
  393. package/dist/domains/wishlist.js.map +1 -0
  394. package/dist/index.d.ts +9 -0
  395. package/dist/index.d.ts.map +1 -0
  396. package/dist/index.js +15 -0
  397. package/dist/index.js.map +1 -0
  398. package/dist/types.d.ts +8 -0
  399. package/dist/types.d.ts.map +1 -0
  400. package/dist/types.js +5 -0
  401. package/dist/types.js.map +1 -0
  402. package/package.json +49 -0
@@ -0,0 +1,1242 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace.js";
3
+ /**
4
+ * Model Coupon
5
+ *
6
+ */
7
+ export type CouponModel = runtime.Types.Result.DefaultSelection<Prisma.$CouponPayload>;
8
+ export type AggregateCoupon = {
9
+ _count: CouponCountAggregateOutputType | null;
10
+ _avg: CouponAvgAggregateOutputType | null;
11
+ _sum: CouponSumAggregateOutputType | null;
12
+ _min: CouponMinAggregateOutputType | null;
13
+ _max: CouponMaxAggregateOutputType | null;
14
+ };
15
+ export type CouponAvgAggregateOutputType = {
16
+ timesUsed: number | null;
17
+ };
18
+ export type CouponSumAggregateOutputType = {
19
+ timesUsed: number | null;
20
+ };
21
+ export type CouponMinAggregateOutputType = {
22
+ id: string | null;
23
+ code: string | null;
24
+ promotionId: string | null;
25
+ isValid: boolean | null;
26
+ invalidReason: string | null;
27
+ timesUsed: number | null;
28
+ };
29
+ export type CouponMaxAggregateOutputType = {
30
+ id: string | null;
31
+ code: string | null;
32
+ promotionId: string | null;
33
+ isValid: boolean | null;
34
+ invalidReason: string | null;
35
+ timesUsed: number | null;
36
+ };
37
+ export type CouponCountAggregateOutputType = {
38
+ id: number;
39
+ code: number;
40
+ promotionId: number;
41
+ isValid: number;
42
+ invalidReason: number;
43
+ timesUsed: number;
44
+ _all: number;
45
+ };
46
+ export type CouponAvgAggregateInputType = {
47
+ timesUsed?: true;
48
+ };
49
+ export type CouponSumAggregateInputType = {
50
+ timesUsed?: true;
51
+ };
52
+ export type CouponMinAggregateInputType = {
53
+ id?: true;
54
+ code?: true;
55
+ promotionId?: true;
56
+ isValid?: true;
57
+ invalidReason?: true;
58
+ timesUsed?: true;
59
+ };
60
+ export type CouponMaxAggregateInputType = {
61
+ id?: true;
62
+ code?: true;
63
+ promotionId?: true;
64
+ isValid?: true;
65
+ invalidReason?: true;
66
+ timesUsed?: true;
67
+ };
68
+ export type CouponCountAggregateInputType = {
69
+ id?: true;
70
+ code?: true;
71
+ promotionId?: true;
72
+ isValid?: true;
73
+ invalidReason?: true;
74
+ timesUsed?: true;
75
+ _all?: true;
76
+ };
77
+ export type CouponAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
78
+ /**
79
+ * Filter which Coupon to aggregate.
80
+ */
81
+ where?: Prisma.CouponWhereInput;
82
+ /**
83
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
84
+ *
85
+ * Determine the order of Coupons to fetch.
86
+ */
87
+ orderBy?: Prisma.CouponOrderByWithRelationInput | Prisma.CouponOrderByWithRelationInput[];
88
+ /**
89
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
90
+ *
91
+ * Sets the start position
92
+ */
93
+ cursor?: Prisma.CouponWhereUniqueInput;
94
+ /**
95
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
96
+ *
97
+ * Take `±n` Coupons from the position of the cursor.
98
+ */
99
+ take?: number;
100
+ /**
101
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
102
+ *
103
+ * Skip the first `n` Coupons.
104
+ */
105
+ skip?: number;
106
+ /**
107
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
108
+ *
109
+ * Count returned Coupons
110
+ **/
111
+ _count?: true | CouponCountAggregateInputType;
112
+ /**
113
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
114
+ *
115
+ * Select which fields to average
116
+ **/
117
+ _avg?: CouponAvgAggregateInputType;
118
+ /**
119
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
120
+ *
121
+ * Select which fields to sum
122
+ **/
123
+ _sum?: CouponSumAggregateInputType;
124
+ /**
125
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
126
+ *
127
+ * Select which fields to find the minimum value
128
+ **/
129
+ _min?: CouponMinAggregateInputType;
130
+ /**
131
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
132
+ *
133
+ * Select which fields to find the maximum value
134
+ **/
135
+ _max?: CouponMaxAggregateInputType;
136
+ };
137
+ export type GetCouponAggregateType<T extends CouponAggregateArgs> = {
138
+ [P in keyof T & keyof AggregateCoupon]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateCoupon[P]> : Prisma.GetScalarType<T[P], AggregateCoupon[P]>;
139
+ };
140
+ export type CouponGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
141
+ where?: Prisma.CouponWhereInput;
142
+ orderBy?: Prisma.CouponOrderByWithAggregationInput | Prisma.CouponOrderByWithAggregationInput[];
143
+ by: Prisma.CouponScalarFieldEnum[] | Prisma.CouponScalarFieldEnum;
144
+ having?: Prisma.CouponScalarWhereWithAggregatesInput;
145
+ take?: number;
146
+ skip?: number;
147
+ _count?: CouponCountAggregateInputType | true;
148
+ _avg?: CouponAvgAggregateInputType;
149
+ _sum?: CouponSumAggregateInputType;
150
+ _min?: CouponMinAggregateInputType;
151
+ _max?: CouponMaxAggregateInputType;
152
+ };
153
+ export type CouponGroupByOutputType = {
154
+ id: string;
155
+ code: string;
156
+ promotionId: string;
157
+ isValid: boolean;
158
+ invalidReason: string | null;
159
+ timesUsed: number;
160
+ _count: CouponCountAggregateOutputType | null;
161
+ _avg: CouponAvgAggregateOutputType | null;
162
+ _sum: CouponSumAggregateOutputType | null;
163
+ _min: CouponMinAggregateOutputType | null;
164
+ _max: CouponMaxAggregateOutputType | null;
165
+ };
166
+ type GetCouponGroupByPayload<T extends CouponGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<CouponGroupByOutputType, T['by']> & {
167
+ [P in ((keyof T) & (keyof CouponGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], CouponGroupByOutputType[P]> : Prisma.GetScalarType<T[P], CouponGroupByOutputType[P]>;
168
+ }>>;
169
+ export type CouponWhereInput = {
170
+ AND?: Prisma.CouponWhereInput | Prisma.CouponWhereInput[];
171
+ OR?: Prisma.CouponWhereInput[];
172
+ NOT?: Prisma.CouponWhereInput | Prisma.CouponWhereInput[];
173
+ id?: Prisma.StringFilter<"Coupon"> | string;
174
+ code?: Prisma.StringFilter<"Coupon"> | string;
175
+ promotionId?: Prisma.StringFilter<"Coupon"> | string;
176
+ isValid?: Prisma.BoolFilter<"Coupon"> | boolean;
177
+ invalidReason?: Prisma.StringNullableFilter<"Coupon"> | string | null;
178
+ timesUsed?: Prisma.IntFilter<"Coupon"> | number;
179
+ promotion?: Prisma.XOR<Prisma.PromotionScalarRelationFilter, Prisma.PromotionWhereInput>;
180
+ };
181
+ export type CouponOrderByWithRelationInput = {
182
+ id?: Prisma.SortOrder;
183
+ code?: Prisma.SortOrder;
184
+ promotionId?: Prisma.SortOrder;
185
+ isValid?: Prisma.SortOrder;
186
+ invalidReason?: Prisma.SortOrderInput | Prisma.SortOrder;
187
+ timesUsed?: Prisma.SortOrder;
188
+ promotion?: Prisma.PromotionOrderByWithRelationInput;
189
+ };
190
+ export type CouponWhereUniqueInput = Prisma.AtLeast<{
191
+ id?: string;
192
+ code?: string;
193
+ AND?: Prisma.CouponWhereInput | Prisma.CouponWhereInput[];
194
+ OR?: Prisma.CouponWhereInput[];
195
+ NOT?: Prisma.CouponWhereInput | Prisma.CouponWhereInput[];
196
+ promotionId?: Prisma.StringFilter<"Coupon"> | string;
197
+ isValid?: Prisma.BoolFilter<"Coupon"> | boolean;
198
+ invalidReason?: Prisma.StringNullableFilter<"Coupon"> | string | null;
199
+ timesUsed?: Prisma.IntFilter<"Coupon"> | number;
200
+ promotion?: Prisma.XOR<Prisma.PromotionScalarRelationFilter, Prisma.PromotionWhereInput>;
201
+ }, "id" | "code">;
202
+ export type CouponOrderByWithAggregationInput = {
203
+ id?: Prisma.SortOrder;
204
+ code?: Prisma.SortOrder;
205
+ promotionId?: Prisma.SortOrder;
206
+ isValid?: Prisma.SortOrder;
207
+ invalidReason?: Prisma.SortOrderInput | Prisma.SortOrder;
208
+ timesUsed?: Prisma.SortOrder;
209
+ _count?: Prisma.CouponCountOrderByAggregateInput;
210
+ _avg?: Prisma.CouponAvgOrderByAggregateInput;
211
+ _max?: Prisma.CouponMaxOrderByAggregateInput;
212
+ _min?: Prisma.CouponMinOrderByAggregateInput;
213
+ _sum?: Prisma.CouponSumOrderByAggregateInput;
214
+ };
215
+ export type CouponScalarWhereWithAggregatesInput = {
216
+ AND?: Prisma.CouponScalarWhereWithAggregatesInput | Prisma.CouponScalarWhereWithAggregatesInput[];
217
+ OR?: Prisma.CouponScalarWhereWithAggregatesInput[];
218
+ NOT?: Prisma.CouponScalarWhereWithAggregatesInput | Prisma.CouponScalarWhereWithAggregatesInput[];
219
+ id?: Prisma.StringWithAggregatesFilter<"Coupon"> | string;
220
+ code?: Prisma.StringWithAggregatesFilter<"Coupon"> | string;
221
+ promotionId?: Prisma.StringWithAggregatesFilter<"Coupon"> | string;
222
+ isValid?: Prisma.BoolWithAggregatesFilter<"Coupon"> | boolean;
223
+ invalidReason?: Prisma.StringNullableWithAggregatesFilter<"Coupon"> | string | null;
224
+ timesUsed?: Prisma.IntWithAggregatesFilter<"Coupon"> | number;
225
+ };
226
+ export type CouponCreateInput = {
227
+ id?: string;
228
+ code: string;
229
+ isValid?: boolean;
230
+ invalidReason?: string | null;
231
+ timesUsed?: number;
232
+ promotion: Prisma.PromotionCreateNestedOneWithoutCouponsInput;
233
+ };
234
+ export type CouponUncheckedCreateInput = {
235
+ id?: string;
236
+ code: string;
237
+ promotionId: string;
238
+ isValid?: boolean;
239
+ invalidReason?: string | null;
240
+ timesUsed?: number;
241
+ };
242
+ export type CouponUpdateInput = {
243
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
244
+ code?: Prisma.StringFieldUpdateOperationsInput | string;
245
+ isValid?: Prisma.BoolFieldUpdateOperationsInput | boolean;
246
+ invalidReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
247
+ timesUsed?: Prisma.IntFieldUpdateOperationsInput | number;
248
+ promotion?: Prisma.PromotionUpdateOneRequiredWithoutCouponsNestedInput;
249
+ };
250
+ export type CouponUncheckedUpdateInput = {
251
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
252
+ code?: Prisma.StringFieldUpdateOperationsInput | string;
253
+ promotionId?: Prisma.StringFieldUpdateOperationsInput | string;
254
+ isValid?: Prisma.BoolFieldUpdateOperationsInput | boolean;
255
+ invalidReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
256
+ timesUsed?: Prisma.IntFieldUpdateOperationsInput | number;
257
+ };
258
+ export type CouponCreateManyInput = {
259
+ id?: string;
260
+ code: string;
261
+ promotionId: string;
262
+ isValid?: boolean;
263
+ invalidReason?: string | null;
264
+ timesUsed?: number;
265
+ };
266
+ export type CouponUpdateManyMutationInput = {
267
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
268
+ code?: Prisma.StringFieldUpdateOperationsInput | string;
269
+ isValid?: Prisma.BoolFieldUpdateOperationsInput | boolean;
270
+ invalidReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
271
+ timesUsed?: Prisma.IntFieldUpdateOperationsInput | number;
272
+ };
273
+ export type CouponUncheckedUpdateManyInput = {
274
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
275
+ code?: Prisma.StringFieldUpdateOperationsInput | string;
276
+ promotionId?: Prisma.StringFieldUpdateOperationsInput | string;
277
+ isValid?: Prisma.BoolFieldUpdateOperationsInput | boolean;
278
+ invalidReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
279
+ timesUsed?: Prisma.IntFieldUpdateOperationsInput | number;
280
+ };
281
+ export type CouponListRelationFilter = {
282
+ every?: Prisma.CouponWhereInput;
283
+ some?: Prisma.CouponWhereInput;
284
+ none?: Prisma.CouponWhereInput;
285
+ };
286
+ export type CouponOrderByRelationAggregateInput = {
287
+ _count?: Prisma.SortOrder;
288
+ };
289
+ export type CouponCountOrderByAggregateInput = {
290
+ id?: Prisma.SortOrder;
291
+ code?: Prisma.SortOrder;
292
+ promotionId?: Prisma.SortOrder;
293
+ isValid?: Prisma.SortOrder;
294
+ invalidReason?: Prisma.SortOrder;
295
+ timesUsed?: Prisma.SortOrder;
296
+ };
297
+ export type CouponAvgOrderByAggregateInput = {
298
+ timesUsed?: Prisma.SortOrder;
299
+ };
300
+ export type CouponMaxOrderByAggregateInput = {
301
+ id?: Prisma.SortOrder;
302
+ code?: Prisma.SortOrder;
303
+ promotionId?: Prisma.SortOrder;
304
+ isValid?: Prisma.SortOrder;
305
+ invalidReason?: Prisma.SortOrder;
306
+ timesUsed?: Prisma.SortOrder;
307
+ };
308
+ export type CouponMinOrderByAggregateInput = {
309
+ id?: Prisma.SortOrder;
310
+ code?: Prisma.SortOrder;
311
+ promotionId?: Prisma.SortOrder;
312
+ isValid?: Prisma.SortOrder;
313
+ invalidReason?: Prisma.SortOrder;
314
+ timesUsed?: Prisma.SortOrder;
315
+ };
316
+ export type CouponSumOrderByAggregateInput = {
317
+ timesUsed?: Prisma.SortOrder;
318
+ };
319
+ export type CouponCreateNestedManyWithoutPromotionInput = {
320
+ create?: Prisma.XOR<Prisma.CouponCreateWithoutPromotionInput, Prisma.CouponUncheckedCreateWithoutPromotionInput> | Prisma.CouponCreateWithoutPromotionInput[] | Prisma.CouponUncheckedCreateWithoutPromotionInput[];
321
+ connectOrCreate?: Prisma.CouponCreateOrConnectWithoutPromotionInput | Prisma.CouponCreateOrConnectWithoutPromotionInput[];
322
+ createMany?: Prisma.CouponCreateManyPromotionInputEnvelope;
323
+ connect?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
324
+ };
325
+ export type CouponUncheckedCreateNestedManyWithoutPromotionInput = {
326
+ create?: Prisma.XOR<Prisma.CouponCreateWithoutPromotionInput, Prisma.CouponUncheckedCreateWithoutPromotionInput> | Prisma.CouponCreateWithoutPromotionInput[] | Prisma.CouponUncheckedCreateWithoutPromotionInput[];
327
+ connectOrCreate?: Prisma.CouponCreateOrConnectWithoutPromotionInput | Prisma.CouponCreateOrConnectWithoutPromotionInput[];
328
+ createMany?: Prisma.CouponCreateManyPromotionInputEnvelope;
329
+ connect?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
330
+ };
331
+ export type CouponUpdateManyWithoutPromotionNestedInput = {
332
+ create?: Prisma.XOR<Prisma.CouponCreateWithoutPromotionInput, Prisma.CouponUncheckedCreateWithoutPromotionInput> | Prisma.CouponCreateWithoutPromotionInput[] | Prisma.CouponUncheckedCreateWithoutPromotionInput[];
333
+ connectOrCreate?: Prisma.CouponCreateOrConnectWithoutPromotionInput | Prisma.CouponCreateOrConnectWithoutPromotionInput[];
334
+ upsert?: Prisma.CouponUpsertWithWhereUniqueWithoutPromotionInput | Prisma.CouponUpsertWithWhereUniqueWithoutPromotionInput[];
335
+ createMany?: Prisma.CouponCreateManyPromotionInputEnvelope;
336
+ set?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
337
+ disconnect?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
338
+ delete?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
339
+ connect?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
340
+ update?: Prisma.CouponUpdateWithWhereUniqueWithoutPromotionInput | Prisma.CouponUpdateWithWhereUniqueWithoutPromotionInput[];
341
+ updateMany?: Prisma.CouponUpdateManyWithWhereWithoutPromotionInput | Prisma.CouponUpdateManyWithWhereWithoutPromotionInput[];
342
+ deleteMany?: Prisma.CouponScalarWhereInput | Prisma.CouponScalarWhereInput[];
343
+ };
344
+ export type CouponUncheckedUpdateManyWithoutPromotionNestedInput = {
345
+ create?: Prisma.XOR<Prisma.CouponCreateWithoutPromotionInput, Prisma.CouponUncheckedCreateWithoutPromotionInput> | Prisma.CouponCreateWithoutPromotionInput[] | Prisma.CouponUncheckedCreateWithoutPromotionInput[];
346
+ connectOrCreate?: Prisma.CouponCreateOrConnectWithoutPromotionInput | Prisma.CouponCreateOrConnectWithoutPromotionInput[];
347
+ upsert?: Prisma.CouponUpsertWithWhereUniqueWithoutPromotionInput | Prisma.CouponUpsertWithWhereUniqueWithoutPromotionInput[];
348
+ createMany?: Prisma.CouponCreateManyPromotionInputEnvelope;
349
+ set?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
350
+ disconnect?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
351
+ delete?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
352
+ connect?: Prisma.CouponWhereUniqueInput | Prisma.CouponWhereUniqueInput[];
353
+ update?: Prisma.CouponUpdateWithWhereUniqueWithoutPromotionInput | Prisma.CouponUpdateWithWhereUniqueWithoutPromotionInput[];
354
+ updateMany?: Prisma.CouponUpdateManyWithWhereWithoutPromotionInput | Prisma.CouponUpdateManyWithWhereWithoutPromotionInput[];
355
+ deleteMany?: Prisma.CouponScalarWhereInput | Prisma.CouponScalarWhereInput[];
356
+ };
357
+ export type CouponCreateWithoutPromotionInput = {
358
+ id?: string;
359
+ code: string;
360
+ isValid?: boolean;
361
+ invalidReason?: string | null;
362
+ timesUsed?: number;
363
+ };
364
+ export type CouponUncheckedCreateWithoutPromotionInput = {
365
+ id?: string;
366
+ code: string;
367
+ isValid?: boolean;
368
+ invalidReason?: string | null;
369
+ timesUsed?: number;
370
+ };
371
+ export type CouponCreateOrConnectWithoutPromotionInput = {
372
+ where: Prisma.CouponWhereUniqueInput;
373
+ create: Prisma.XOR<Prisma.CouponCreateWithoutPromotionInput, Prisma.CouponUncheckedCreateWithoutPromotionInput>;
374
+ };
375
+ export type CouponCreateManyPromotionInputEnvelope = {
376
+ data: Prisma.CouponCreateManyPromotionInput | Prisma.CouponCreateManyPromotionInput[];
377
+ };
378
+ export type CouponUpsertWithWhereUniqueWithoutPromotionInput = {
379
+ where: Prisma.CouponWhereUniqueInput;
380
+ update: Prisma.XOR<Prisma.CouponUpdateWithoutPromotionInput, Prisma.CouponUncheckedUpdateWithoutPromotionInput>;
381
+ create: Prisma.XOR<Prisma.CouponCreateWithoutPromotionInput, Prisma.CouponUncheckedCreateWithoutPromotionInput>;
382
+ };
383
+ export type CouponUpdateWithWhereUniqueWithoutPromotionInput = {
384
+ where: Prisma.CouponWhereUniqueInput;
385
+ data: Prisma.XOR<Prisma.CouponUpdateWithoutPromotionInput, Prisma.CouponUncheckedUpdateWithoutPromotionInput>;
386
+ };
387
+ export type CouponUpdateManyWithWhereWithoutPromotionInput = {
388
+ where: Prisma.CouponScalarWhereInput;
389
+ data: Prisma.XOR<Prisma.CouponUpdateManyMutationInput, Prisma.CouponUncheckedUpdateManyWithoutPromotionInput>;
390
+ };
391
+ export type CouponScalarWhereInput = {
392
+ AND?: Prisma.CouponScalarWhereInput | Prisma.CouponScalarWhereInput[];
393
+ OR?: Prisma.CouponScalarWhereInput[];
394
+ NOT?: Prisma.CouponScalarWhereInput | Prisma.CouponScalarWhereInput[];
395
+ id?: Prisma.StringFilter<"Coupon"> | string;
396
+ code?: Prisma.StringFilter<"Coupon"> | string;
397
+ promotionId?: Prisma.StringFilter<"Coupon"> | string;
398
+ isValid?: Prisma.BoolFilter<"Coupon"> | boolean;
399
+ invalidReason?: Prisma.StringNullableFilter<"Coupon"> | string | null;
400
+ timesUsed?: Prisma.IntFilter<"Coupon"> | number;
401
+ };
402
+ export type CouponCreateManyPromotionInput = {
403
+ id?: string;
404
+ code: string;
405
+ isValid?: boolean;
406
+ invalidReason?: string | null;
407
+ timesUsed?: number;
408
+ };
409
+ export type CouponUpdateWithoutPromotionInput = {
410
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
411
+ code?: Prisma.StringFieldUpdateOperationsInput | string;
412
+ isValid?: Prisma.BoolFieldUpdateOperationsInput | boolean;
413
+ invalidReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
414
+ timesUsed?: Prisma.IntFieldUpdateOperationsInput | number;
415
+ };
416
+ export type CouponUncheckedUpdateWithoutPromotionInput = {
417
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
418
+ code?: Prisma.StringFieldUpdateOperationsInput | string;
419
+ isValid?: Prisma.BoolFieldUpdateOperationsInput | boolean;
420
+ invalidReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
421
+ timesUsed?: Prisma.IntFieldUpdateOperationsInput | number;
422
+ };
423
+ export type CouponUncheckedUpdateManyWithoutPromotionInput = {
424
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
425
+ code?: Prisma.StringFieldUpdateOperationsInput | string;
426
+ isValid?: Prisma.BoolFieldUpdateOperationsInput | boolean;
427
+ invalidReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
428
+ timesUsed?: Prisma.IntFieldUpdateOperationsInput | number;
429
+ };
430
+ export type CouponSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
431
+ id?: boolean;
432
+ code?: boolean;
433
+ promotionId?: boolean;
434
+ isValid?: boolean;
435
+ invalidReason?: boolean;
436
+ timesUsed?: boolean;
437
+ promotion?: boolean | Prisma.PromotionDefaultArgs<ExtArgs>;
438
+ }, ExtArgs["result"]["coupon"]>;
439
+ export type CouponSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
440
+ id?: boolean;
441
+ code?: boolean;
442
+ promotionId?: boolean;
443
+ isValid?: boolean;
444
+ invalidReason?: boolean;
445
+ timesUsed?: boolean;
446
+ promotion?: boolean | Prisma.PromotionDefaultArgs<ExtArgs>;
447
+ }, ExtArgs["result"]["coupon"]>;
448
+ export type CouponSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
449
+ id?: boolean;
450
+ code?: boolean;
451
+ promotionId?: boolean;
452
+ isValid?: boolean;
453
+ invalidReason?: boolean;
454
+ timesUsed?: boolean;
455
+ promotion?: boolean | Prisma.PromotionDefaultArgs<ExtArgs>;
456
+ }, ExtArgs["result"]["coupon"]>;
457
+ export type CouponSelectScalar = {
458
+ id?: boolean;
459
+ code?: boolean;
460
+ promotionId?: boolean;
461
+ isValid?: boolean;
462
+ invalidReason?: boolean;
463
+ timesUsed?: boolean;
464
+ };
465
+ export type CouponOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "promotionId" | "isValid" | "invalidReason" | "timesUsed", ExtArgs["result"]["coupon"]>;
466
+ export type CouponInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
467
+ promotion?: boolean | Prisma.PromotionDefaultArgs<ExtArgs>;
468
+ };
469
+ export type CouponIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
470
+ promotion?: boolean | Prisma.PromotionDefaultArgs<ExtArgs>;
471
+ };
472
+ export type CouponIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
473
+ promotion?: boolean | Prisma.PromotionDefaultArgs<ExtArgs>;
474
+ };
475
+ export type $CouponPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
476
+ name: "Coupon";
477
+ objects: {
478
+ promotion: Prisma.$PromotionPayload<ExtArgs>;
479
+ };
480
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
481
+ id: string;
482
+ code: string;
483
+ promotionId: string;
484
+ isValid: boolean;
485
+ invalidReason: string | null;
486
+ timesUsed: number;
487
+ }, ExtArgs["result"]["coupon"]>;
488
+ composites: {};
489
+ };
490
+ export type CouponGetPayload<S extends boolean | null | undefined | CouponDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$CouponPayload, S>;
491
+ export type CouponCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<CouponFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
492
+ select?: CouponCountAggregateInputType | true;
493
+ };
494
+ export interface CouponDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
495
+ [K: symbol]: {
496
+ types: Prisma.TypeMap<ExtArgs>['model']['Coupon'];
497
+ meta: {
498
+ name: 'Coupon';
499
+ };
500
+ };
501
+ /**
502
+ * Find zero or one Coupon that matches the filter.
503
+ * @param {CouponFindUniqueArgs} args - Arguments to find a Coupon
504
+ * @example
505
+ * // Get one Coupon
506
+ * const coupon = await prisma.coupon.findUnique({
507
+ * where: {
508
+ * // ... provide filter here
509
+ * }
510
+ * })
511
+ */
512
+ findUnique<T extends CouponFindUniqueArgs>(args: Prisma.SelectSubset<T, CouponFindUniqueArgs<ExtArgs>>): Prisma.Prisma__CouponClient<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
513
+ /**
514
+ * Find one Coupon that matches the filter or throw an error with `error.code='P2025'`
515
+ * if no matches were found.
516
+ * @param {CouponFindUniqueOrThrowArgs} args - Arguments to find a Coupon
517
+ * @example
518
+ * // Get one Coupon
519
+ * const coupon = await prisma.coupon.findUniqueOrThrow({
520
+ * where: {
521
+ * // ... provide filter here
522
+ * }
523
+ * })
524
+ */
525
+ findUniqueOrThrow<T extends CouponFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, CouponFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__CouponClient<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
526
+ /**
527
+ * Find the first Coupon that matches the filter.
528
+ * Note, that providing `undefined` is treated as the value not being there.
529
+ * Read more here: https://pris.ly/d/null-undefined
530
+ * @param {CouponFindFirstArgs} args - Arguments to find a Coupon
531
+ * @example
532
+ * // Get one Coupon
533
+ * const coupon = await prisma.coupon.findFirst({
534
+ * where: {
535
+ * // ... provide filter here
536
+ * }
537
+ * })
538
+ */
539
+ findFirst<T extends CouponFindFirstArgs>(args?: Prisma.SelectSubset<T, CouponFindFirstArgs<ExtArgs>>): Prisma.Prisma__CouponClient<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
540
+ /**
541
+ * Find the first Coupon that matches the filter or
542
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
543
+ * Note, that providing `undefined` is treated as the value not being there.
544
+ * Read more here: https://pris.ly/d/null-undefined
545
+ * @param {CouponFindFirstOrThrowArgs} args - Arguments to find a Coupon
546
+ * @example
547
+ * // Get one Coupon
548
+ * const coupon = await prisma.coupon.findFirstOrThrow({
549
+ * where: {
550
+ * // ... provide filter here
551
+ * }
552
+ * })
553
+ */
554
+ findFirstOrThrow<T extends CouponFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, CouponFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__CouponClient<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
555
+ /**
556
+ * Find zero or more Coupons that matches the filter.
557
+ * Note, that providing `undefined` is treated as the value not being there.
558
+ * Read more here: https://pris.ly/d/null-undefined
559
+ * @param {CouponFindManyArgs} args - Arguments to filter and select certain fields only.
560
+ * @example
561
+ * // Get all Coupons
562
+ * const coupons = await prisma.coupon.findMany()
563
+ *
564
+ * // Get first 10 Coupons
565
+ * const coupons = await prisma.coupon.findMany({ take: 10 })
566
+ *
567
+ * // Only select the `id`
568
+ * const couponWithIdOnly = await prisma.coupon.findMany({ select: { id: true } })
569
+ *
570
+ */
571
+ findMany<T extends CouponFindManyArgs>(args?: Prisma.SelectSubset<T, CouponFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
572
+ /**
573
+ * Create a Coupon.
574
+ * @param {CouponCreateArgs} args - Arguments to create a Coupon.
575
+ * @example
576
+ * // Create one Coupon
577
+ * const Coupon = await prisma.coupon.create({
578
+ * data: {
579
+ * // ... data to create a Coupon
580
+ * }
581
+ * })
582
+ *
583
+ */
584
+ create<T extends CouponCreateArgs>(args: Prisma.SelectSubset<T, CouponCreateArgs<ExtArgs>>): Prisma.Prisma__CouponClient<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
585
+ /**
586
+ * Create many Coupons.
587
+ * @param {CouponCreateManyArgs} args - Arguments to create many Coupons.
588
+ * @example
589
+ * // Create many Coupons
590
+ * const coupon = await prisma.coupon.createMany({
591
+ * data: [
592
+ * // ... provide data here
593
+ * ]
594
+ * })
595
+ *
596
+ */
597
+ createMany<T extends CouponCreateManyArgs>(args?: Prisma.SelectSubset<T, CouponCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
598
+ /**
599
+ * Create many Coupons and returns the data saved in the database.
600
+ * @param {CouponCreateManyAndReturnArgs} args - Arguments to create many Coupons.
601
+ * @example
602
+ * // Create many Coupons
603
+ * const coupon = await prisma.coupon.createManyAndReturn({
604
+ * data: [
605
+ * // ... provide data here
606
+ * ]
607
+ * })
608
+ *
609
+ * // Create many Coupons and only return the `id`
610
+ * const couponWithIdOnly = await prisma.coupon.createManyAndReturn({
611
+ * select: { id: true },
612
+ * data: [
613
+ * // ... provide data here
614
+ * ]
615
+ * })
616
+ * Note, that providing `undefined` is treated as the value not being there.
617
+ * Read more here: https://pris.ly/d/null-undefined
618
+ *
619
+ */
620
+ createManyAndReturn<T extends CouponCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, CouponCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
621
+ /**
622
+ * Delete a Coupon.
623
+ * @param {CouponDeleteArgs} args - Arguments to delete one Coupon.
624
+ * @example
625
+ * // Delete one Coupon
626
+ * const Coupon = await prisma.coupon.delete({
627
+ * where: {
628
+ * // ... filter to delete one Coupon
629
+ * }
630
+ * })
631
+ *
632
+ */
633
+ delete<T extends CouponDeleteArgs>(args: Prisma.SelectSubset<T, CouponDeleteArgs<ExtArgs>>): Prisma.Prisma__CouponClient<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
634
+ /**
635
+ * Update one Coupon.
636
+ * @param {CouponUpdateArgs} args - Arguments to update one Coupon.
637
+ * @example
638
+ * // Update one Coupon
639
+ * const coupon = await prisma.coupon.update({
640
+ * where: {
641
+ * // ... provide filter here
642
+ * },
643
+ * data: {
644
+ * // ... provide data here
645
+ * }
646
+ * })
647
+ *
648
+ */
649
+ update<T extends CouponUpdateArgs>(args: Prisma.SelectSubset<T, CouponUpdateArgs<ExtArgs>>): Prisma.Prisma__CouponClient<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
650
+ /**
651
+ * Delete zero or more Coupons.
652
+ * @param {CouponDeleteManyArgs} args - Arguments to filter Coupons to delete.
653
+ * @example
654
+ * // Delete a few Coupons
655
+ * const { count } = await prisma.coupon.deleteMany({
656
+ * where: {
657
+ * // ... provide filter here
658
+ * }
659
+ * })
660
+ *
661
+ */
662
+ deleteMany<T extends CouponDeleteManyArgs>(args?: Prisma.SelectSubset<T, CouponDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
663
+ /**
664
+ * Update zero or more Coupons.
665
+ * Note, that providing `undefined` is treated as the value not being there.
666
+ * Read more here: https://pris.ly/d/null-undefined
667
+ * @param {CouponUpdateManyArgs} args - Arguments to update one or more rows.
668
+ * @example
669
+ * // Update many Coupons
670
+ * const coupon = await prisma.coupon.updateMany({
671
+ * where: {
672
+ * // ... provide filter here
673
+ * },
674
+ * data: {
675
+ * // ... provide data here
676
+ * }
677
+ * })
678
+ *
679
+ */
680
+ updateMany<T extends CouponUpdateManyArgs>(args: Prisma.SelectSubset<T, CouponUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
681
+ /**
682
+ * Update zero or more Coupons and returns the data updated in the database.
683
+ * @param {CouponUpdateManyAndReturnArgs} args - Arguments to update many Coupons.
684
+ * @example
685
+ * // Update many Coupons
686
+ * const coupon = await prisma.coupon.updateManyAndReturn({
687
+ * where: {
688
+ * // ... provide filter here
689
+ * },
690
+ * data: [
691
+ * // ... provide data here
692
+ * ]
693
+ * })
694
+ *
695
+ * // Update zero or more Coupons and only return the `id`
696
+ * const couponWithIdOnly = await prisma.coupon.updateManyAndReturn({
697
+ * select: { id: true },
698
+ * where: {
699
+ * // ... provide filter here
700
+ * },
701
+ * data: [
702
+ * // ... provide data here
703
+ * ]
704
+ * })
705
+ * Note, that providing `undefined` is treated as the value not being there.
706
+ * Read more here: https://pris.ly/d/null-undefined
707
+ *
708
+ */
709
+ updateManyAndReturn<T extends CouponUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, CouponUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
710
+ /**
711
+ * Create or update one Coupon.
712
+ * @param {CouponUpsertArgs} args - Arguments to update or create a Coupon.
713
+ * @example
714
+ * // Update or create a Coupon
715
+ * const coupon = await prisma.coupon.upsert({
716
+ * create: {
717
+ * // ... data to create a Coupon
718
+ * },
719
+ * update: {
720
+ * // ... in case it already exists, update
721
+ * },
722
+ * where: {
723
+ * // ... the filter for the Coupon we want to update
724
+ * }
725
+ * })
726
+ */
727
+ upsert<T extends CouponUpsertArgs>(args: Prisma.SelectSubset<T, CouponUpsertArgs<ExtArgs>>): Prisma.Prisma__CouponClient<runtime.Types.Result.GetResult<Prisma.$CouponPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
728
+ /**
729
+ * Count the number of Coupons.
730
+ * Note, that providing `undefined` is treated as the value not being there.
731
+ * Read more here: https://pris.ly/d/null-undefined
732
+ * @param {CouponCountArgs} args - Arguments to filter Coupons to count.
733
+ * @example
734
+ * // Count the number of Coupons
735
+ * const count = await prisma.coupon.count({
736
+ * where: {
737
+ * // ... the filter for the Coupons we want to count
738
+ * }
739
+ * })
740
+ **/
741
+ count<T extends CouponCountArgs>(args?: Prisma.Subset<T, CouponCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], CouponCountAggregateOutputType> : number>;
742
+ /**
743
+ * Allows you to perform aggregations operations on a Coupon.
744
+ * Note, that providing `undefined` is treated as the value not being there.
745
+ * Read more here: https://pris.ly/d/null-undefined
746
+ * @param {CouponAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
747
+ * @example
748
+ * // Ordered by age ascending
749
+ * // Where email contains prisma.io
750
+ * // Limited to the 10 users
751
+ * const aggregations = await prisma.user.aggregate({
752
+ * _avg: {
753
+ * age: true,
754
+ * },
755
+ * where: {
756
+ * email: {
757
+ * contains: "prisma.io",
758
+ * },
759
+ * },
760
+ * orderBy: {
761
+ * age: "asc",
762
+ * },
763
+ * take: 10,
764
+ * })
765
+ **/
766
+ aggregate<T extends CouponAggregateArgs>(args: Prisma.Subset<T, CouponAggregateArgs>): Prisma.PrismaPromise<GetCouponAggregateType<T>>;
767
+ /**
768
+ * Group by Coupon.
769
+ * Note, that providing `undefined` is treated as the value not being there.
770
+ * Read more here: https://pris.ly/d/null-undefined
771
+ * @param {CouponGroupByArgs} args - Group by arguments.
772
+ * @example
773
+ * // Group by city, order by createdAt, get count
774
+ * const result = await prisma.user.groupBy({
775
+ * by: ['city', 'createdAt'],
776
+ * orderBy: {
777
+ * createdAt: true
778
+ * },
779
+ * _count: {
780
+ * _all: true
781
+ * },
782
+ * })
783
+ *
784
+ **/
785
+ groupBy<T extends CouponGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
786
+ orderBy: CouponGroupByArgs['orderBy'];
787
+ } : {
788
+ orderBy?: CouponGroupByArgs['orderBy'];
789
+ }, OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>, ByFields extends Prisma.MaybeTupleToUnion<T['by']>, ByValid extends Prisma.Has<ByFields, OrderFields>, HavingFields extends Prisma.GetHavingFields<T['having']>, HavingValid extends Prisma.Has<ByFields, HavingFields>, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? {
790
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
791
+ Error,
792
+ 'Field ',
793
+ P,
794
+ ` in "having" needs to be provided in "by"`
795
+ ];
796
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
797
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
798
+ }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
799
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
800
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
801
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
802
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, CouponGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetCouponGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
803
+ /**
804
+ * Fields of the Coupon model
805
+ */
806
+ readonly fields: CouponFieldRefs;
807
+ }
808
+ /**
809
+ * The delegate class that acts as a "Promise-like" for Coupon.
810
+ * Why is this prefixed with `Prisma__`?
811
+ * Because we want to prevent naming conflicts as mentioned in
812
+ * https://github.com/prisma/prisma-client-js/issues/707
813
+ */
814
+ export interface Prisma__CouponClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
815
+ readonly [Symbol.toStringTag]: "PrismaPromise";
816
+ promotion<T extends Prisma.PromotionDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PromotionDefaultArgs<ExtArgs>>): Prisma.Prisma__PromotionClient<runtime.Types.Result.GetResult<Prisma.$PromotionPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
817
+ /**
818
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
819
+ * @param onfulfilled The callback to execute when the Promise is resolved.
820
+ * @param onrejected The callback to execute when the Promise is rejected.
821
+ * @returns A Promise for the completion of which ever callback is executed.
822
+ */
823
+ 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>;
824
+ /**
825
+ * Attaches a callback for only the rejection of the Promise.
826
+ * @param onrejected The callback to execute when the Promise is rejected.
827
+ * @returns A Promise for the completion of the callback.
828
+ */
829
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
830
+ /**
831
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
832
+ * resolved value cannot be modified from the callback.
833
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
834
+ * @returns A Promise for the completion of the callback.
835
+ */
836
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
837
+ }
838
+ /**
839
+ * Fields of the Coupon model
840
+ */
841
+ export interface CouponFieldRefs {
842
+ readonly id: Prisma.FieldRef<"Coupon", 'String'>;
843
+ readonly code: Prisma.FieldRef<"Coupon", 'String'>;
844
+ readonly promotionId: Prisma.FieldRef<"Coupon", 'String'>;
845
+ readonly isValid: Prisma.FieldRef<"Coupon", 'Boolean'>;
846
+ readonly invalidReason: Prisma.FieldRef<"Coupon", 'String'>;
847
+ readonly timesUsed: Prisma.FieldRef<"Coupon", 'Int'>;
848
+ }
849
+ /**
850
+ * Coupon findUnique
851
+ */
852
+ export type CouponFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
853
+ /**
854
+ * Select specific fields to fetch from the Coupon
855
+ */
856
+ select?: Prisma.CouponSelect<ExtArgs> | null;
857
+ /**
858
+ * Omit specific fields from the Coupon
859
+ */
860
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
861
+ /**
862
+ * Choose, which related nodes to fetch as well
863
+ */
864
+ include?: Prisma.CouponInclude<ExtArgs> | null;
865
+ /**
866
+ * Filter, which Coupon to fetch.
867
+ */
868
+ where: Prisma.CouponWhereUniqueInput;
869
+ };
870
+ /**
871
+ * Coupon findUniqueOrThrow
872
+ */
873
+ export type CouponFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
874
+ /**
875
+ * Select specific fields to fetch from the Coupon
876
+ */
877
+ select?: Prisma.CouponSelect<ExtArgs> | null;
878
+ /**
879
+ * Omit specific fields from the Coupon
880
+ */
881
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
882
+ /**
883
+ * Choose, which related nodes to fetch as well
884
+ */
885
+ include?: Prisma.CouponInclude<ExtArgs> | null;
886
+ /**
887
+ * Filter, which Coupon to fetch.
888
+ */
889
+ where: Prisma.CouponWhereUniqueInput;
890
+ };
891
+ /**
892
+ * Coupon findFirst
893
+ */
894
+ export type CouponFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
895
+ /**
896
+ * Select specific fields to fetch from the Coupon
897
+ */
898
+ select?: Prisma.CouponSelect<ExtArgs> | null;
899
+ /**
900
+ * Omit specific fields from the Coupon
901
+ */
902
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
903
+ /**
904
+ * Choose, which related nodes to fetch as well
905
+ */
906
+ include?: Prisma.CouponInclude<ExtArgs> | null;
907
+ /**
908
+ * Filter, which Coupon to fetch.
909
+ */
910
+ where?: Prisma.CouponWhereInput;
911
+ /**
912
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
913
+ *
914
+ * Determine the order of Coupons to fetch.
915
+ */
916
+ orderBy?: Prisma.CouponOrderByWithRelationInput | Prisma.CouponOrderByWithRelationInput[];
917
+ /**
918
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
919
+ *
920
+ * Sets the position for searching for Coupons.
921
+ */
922
+ cursor?: Prisma.CouponWhereUniqueInput;
923
+ /**
924
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
925
+ *
926
+ * Take `±n` Coupons from the position of the cursor.
927
+ */
928
+ take?: number;
929
+ /**
930
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
931
+ *
932
+ * Skip the first `n` Coupons.
933
+ */
934
+ skip?: number;
935
+ /**
936
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
937
+ *
938
+ * Filter by unique combinations of Coupons.
939
+ */
940
+ distinct?: Prisma.CouponScalarFieldEnum | Prisma.CouponScalarFieldEnum[];
941
+ };
942
+ /**
943
+ * Coupon findFirstOrThrow
944
+ */
945
+ export type CouponFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
946
+ /**
947
+ * Select specific fields to fetch from the Coupon
948
+ */
949
+ select?: Prisma.CouponSelect<ExtArgs> | null;
950
+ /**
951
+ * Omit specific fields from the Coupon
952
+ */
953
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
954
+ /**
955
+ * Choose, which related nodes to fetch as well
956
+ */
957
+ include?: Prisma.CouponInclude<ExtArgs> | null;
958
+ /**
959
+ * Filter, which Coupon to fetch.
960
+ */
961
+ where?: Prisma.CouponWhereInput;
962
+ /**
963
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
964
+ *
965
+ * Determine the order of Coupons to fetch.
966
+ */
967
+ orderBy?: Prisma.CouponOrderByWithRelationInput | Prisma.CouponOrderByWithRelationInput[];
968
+ /**
969
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
970
+ *
971
+ * Sets the position for searching for Coupons.
972
+ */
973
+ cursor?: Prisma.CouponWhereUniqueInput;
974
+ /**
975
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
976
+ *
977
+ * Take `±n` Coupons from the position of the cursor.
978
+ */
979
+ take?: number;
980
+ /**
981
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
982
+ *
983
+ * Skip the first `n` Coupons.
984
+ */
985
+ skip?: number;
986
+ /**
987
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
988
+ *
989
+ * Filter by unique combinations of Coupons.
990
+ */
991
+ distinct?: Prisma.CouponScalarFieldEnum | Prisma.CouponScalarFieldEnum[];
992
+ };
993
+ /**
994
+ * Coupon findMany
995
+ */
996
+ export type CouponFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
997
+ /**
998
+ * Select specific fields to fetch from the Coupon
999
+ */
1000
+ select?: Prisma.CouponSelect<ExtArgs> | null;
1001
+ /**
1002
+ * Omit specific fields from the Coupon
1003
+ */
1004
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
1005
+ /**
1006
+ * Choose, which related nodes to fetch as well
1007
+ */
1008
+ include?: Prisma.CouponInclude<ExtArgs> | null;
1009
+ /**
1010
+ * Filter, which Coupons to fetch.
1011
+ */
1012
+ where?: Prisma.CouponWhereInput;
1013
+ /**
1014
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1015
+ *
1016
+ * Determine the order of Coupons to fetch.
1017
+ */
1018
+ orderBy?: Prisma.CouponOrderByWithRelationInput | Prisma.CouponOrderByWithRelationInput[];
1019
+ /**
1020
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1021
+ *
1022
+ * Sets the position for listing Coupons.
1023
+ */
1024
+ cursor?: Prisma.CouponWhereUniqueInput;
1025
+ /**
1026
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1027
+ *
1028
+ * Take `±n` Coupons from the position of the cursor.
1029
+ */
1030
+ take?: number;
1031
+ /**
1032
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1033
+ *
1034
+ * Skip the first `n` Coupons.
1035
+ */
1036
+ skip?: number;
1037
+ distinct?: Prisma.CouponScalarFieldEnum | Prisma.CouponScalarFieldEnum[];
1038
+ };
1039
+ /**
1040
+ * Coupon create
1041
+ */
1042
+ export type CouponCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1043
+ /**
1044
+ * Select specific fields to fetch from the Coupon
1045
+ */
1046
+ select?: Prisma.CouponSelect<ExtArgs> | null;
1047
+ /**
1048
+ * Omit specific fields from the Coupon
1049
+ */
1050
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
1051
+ /**
1052
+ * Choose, which related nodes to fetch as well
1053
+ */
1054
+ include?: Prisma.CouponInclude<ExtArgs> | null;
1055
+ /**
1056
+ * The data needed to create a Coupon.
1057
+ */
1058
+ data: Prisma.XOR<Prisma.CouponCreateInput, Prisma.CouponUncheckedCreateInput>;
1059
+ };
1060
+ /**
1061
+ * Coupon createMany
1062
+ */
1063
+ export type CouponCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1064
+ /**
1065
+ * The data used to create many Coupons.
1066
+ */
1067
+ data: Prisma.CouponCreateManyInput | Prisma.CouponCreateManyInput[];
1068
+ };
1069
+ /**
1070
+ * Coupon createManyAndReturn
1071
+ */
1072
+ export type CouponCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1073
+ /**
1074
+ * Select specific fields to fetch from the Coupon
1075
+ */
1076
+ select?: Prisma.CouponSelectCreateManyAndReturn<ExtArgs> | null;
1077
+ /**
1078
+ * Omit specific fields from the Coupon
1079
+ */
1080
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
1081
+ /**
1082
+ * The data used to create many Coupons.
1083
+ */
1084
+ data: Prisma.CouponCreateManyInput | Prisma.CouponCreateManyInput[];
1085
+ /**
1086
+ * Choose, which related nodes to fetch as well
1087
+ */
1088
+ include?: Prisma.CouponIncludeCreateManyAndReturn<ExtArgs> | null;
1089
+ };
1090
+ /**
1091
+ * Coupon update
1092
+ */
1093
+ export type CouponUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1094
+ /**
1095
+ * Select specific fields to fetch from the Coupon
1096
+ */
1097
+ select?: Prisma.CouponSelect<ExtArgs> | null;
1098
+ /**
1099
+ * Omit specific fields from the Coupon
1100
+ */
1101
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
1102
+ /**
1103
+ * Choose, which related nodes to fetch as well
1104
+ */
1105
+ include?: Prisma.CouponInclude<ExtArgs> | null;
1106
+ /**
1107
+ * The data needed to update a Coupon.
1108
+ */
1109
+ data: Prisma.XOR<Prisma.CouponUpdateInput, Prisma.CouponUncheckedUpdateInput>;
1110
+ /**
1111
+ * Choose, which Coupon to update.
1112
+ */
1113
+ where: Prisma.CouponWhereUniqueInput;
1114
+ };
1115
+ /**
1116
+ * Coupon updateMany
1117
+ */
1118
+ export type CouponUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1119
+ /**
1120
+ * The data used to update Coupons.
1121
+ */
1122
+ data: Prisma.XOR<Prisma.CouponUpdateManyMutationInput, Prisma.CouponUncheckedUpdateManyInput>;
1123
+ /**
1124
+ * Filter which Coupons to update
1125
+ */
1126
+ where?: Prisma.CouponWhereInput;
1127
+ /**
1128
+ * Limit how many Coupons to update.
1129
+ */
1130
+ limit?: number;
1131
+ };
1132
+ /**
1133
+ * Coupon updateManyAndReturn
1134
+ */
1135
+ export type CouponUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1136
+ /**
1137
+ * Select specific fields to fetch from the Coupon
1138
+ */
1139
+ select?: Prisma.CouponSelectUpdateManyAndReturn<ExtArgs> | null;
1140
+ /**
1141
+ * Omit specific fields from the Coupon
1142
+ */
1143
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
1144
+ /**
1145
+ * The data used to update Coupons.
1146
+ */
1147
+ data: Prisma.XOR<Prisma.CouponUpdateManyMutationInput, Prisma.CouponUncheckedUpdateManyInput>;
1148
+ /**
1149
+ * Filter which Coupons to update
1150
+ */
1151
+ where?: Prisma.CouponWhereInput;
1152
+ /**
1153
+ * Limit how many Coupons to update.
1154
+ */
1155
+ limit?: number;
1156
+ /**
1157
+ * Choose, which related nodes to fetch as well
1158
+ */
1159
+ include?: Prisma.CouponIncludeUpdateManyAndReturn<ExtArgs> | null;
1160
+ };
1161
+ /**
1162
+ * Coupon upsert
1163
+ */
1164
+ export type CouponUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1165
+ /**
1166
+ * Select specific fields to fetch from the Coupon
1167
+ */
1168
+ select?: Prisma.CouponSelect<ExtArgs> | null;
1169
+ /**
1170
+ * Omit specific fields from the Coupon
1171
+ */
1172
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
1173
+ /**
1174
+ * Choose, which related nodes to fetch as well
1175
+ */
1176
+ include?: Prisma.CouponInclude<ExtArgs> | null;
1177
+ /**
1178
+ * The filter to search for the Coupon to update in case it exists.
1179
+ */
1180
+ where: Prisma.CouponWhereUniqueInput;
1181
+ /**
1182
+ * In case the Coupon found by the `where` argument doesn't exist, create a new Coupon with this data.
1183
+ */
1184
+ create: Prisma.XOR<Prisma.CouponCreateInput, Prisma.CouponUncheckedCreateInput>;
1185
+ /**
1186
+ * In case the Coupon was found with the provided `where` argument, update it with this data.
1187
+ */
1188
+ update: Prisma.XOR<Prisma.CouponUpdateInput, Prisma.CouponUncheckedUpdateInput>;
1189
+ };
1190
+ /**
1191
+ * Coupon delete
1192
+ */
1193
+ export type CouponDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1194
+ /**
1195
+ * Select specific fields to fetch from the Coupon
1196
+ */
1197
+ select?: Prisma.CouponSelect<ExtArgs> | null;
1198
+ /**
1199
+ * Omit specific fields from the Coupon
1200
+ */
1201
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
1202
+ /**
1203
+ * Choose, which related nodes to fetch as well
1204
+ */
1205
+ include?: Prisma.CouponInclude<ExtArgs> | null;
1206
+ /**
1207
+ * Filter which Coupon to delete.
1208
+ */
1209
+ where: Prisma.CouponWhereUniqueInput;
1210
+ };
1211
+ /**
1212
+ * Coupon deleteMany
1213
+ */
1214
+ export type CouponDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1215
+ /**
1216
+ * Filter which Coupons to delete
1217
+ */
1218
+ where?: Prisma.CouponWhereInput;
1219
+ /**
1220
+ * Limit how many Coupons to delete.
1221
+ */
1222
+ limit?: number;
1223
+ };
1224
+ /**
1225
+ * Coupon without action
1226
+ */
1227
+ export type CouponDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1228
+ /**
1229
+ * Select specific fields to fetch from the Coupon
1230
+ */
1231
+ select?: Prisma.CouponSelect<ExtArgs> | null;
1232
+ /**
1233
+ * Omit specific fields from the Coupon
1234
+ */
1235
+ omit?: Prisma.CouponOmit<ExtArgs> | null;
1236
+ /**
1237
+ * Choose, which related nodes to fetch as well
1238
+ */
1239
+ include?: Prisma.CouponInclude<ExtArgs> | null;
1240
+ };
1241
+ export {};
1242
+ //# sourceMappingURL=Coupon.d.ts.map