@gigapay-dev/contracts 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/build/domains/admin/index.d.ts +150 -0
  2. package/build/domains/admin/index.d.ts.map +1 -0
  3. package/build/domains/admin/index.js +72 -0
  4. package/build/domains/admin/index.js.map +1 -0
  5. package/build/domains/auth/commands.d.ts +294 -0
  6. package/build/domains/auth/commands.d.ts.map +1 -0
  7. package/build/domains/auth/commands.js +116 -0
  8. package/build/domains/auth/commands.js.map +1 -0
  9. package/build/domains/auth/dtos.d.ts +37 -0
  10. package/build/domains/auth/dtos.d.ts.map +1 -0
  11. package/build/domains/auth/dtos.js +26 -0
  12. package/build/domains/auth/dtos.js.map +1 -0
  13. package/build/domains/auth/events.d.ts +35 -0
  14. package/build/domains/auth/events.d.ts.map +1 -0
  15. package/build/domains/auth/events.js +24 -0
  16. package/build/domains/auth/events.js.map +1 -0
  17. package/build/domains/auth/index.d.ts +165 -0
  18. package/build/domains/auth/index.d.ts.map +1 -0
  19. package/build/{commands/products → domains/auth}/index.js +11 -6
  20. package/build/domains/auth/index.js.map +1 -0
  21. package/build/domains/auth/queries.d.ts +75 -0
  22. package/build/domains/auth/queries.d.ts.map +1 -0
  23. package/build/domains/auth/queries.js +25 -0
  24. package/build/domains/auth/queries.js.map +1 -0
  25. package/build/domains/catalog/commands.d.ts +255 -0
  26. package/build/domains/catalog/commands.d.ts.map +1 -0
  27. package/build/domains/catalog/commands.js +82 -0
  28. package/build/domains/catalog/commands.js.map +1 -0
  29. package/build/domains/catalog/dtos.d.ts +89 -0
  30. package/build/domains/catalog/dtos.d.ts.map +1 -0
  31. package/build/domains/catalog/dtos.js +43 -0
  32. package/build/domains/catalog/dtos.js.map +1 -0
  33. package/build/domains/catalog/index.d.ts +194 -0
  34. package/build/domains/catalog/index.d.ts.map +1 -0
  35. package/build/{commands/payment-methods → domains/catalog}/index.js +10 -4
  36. package/build/domains/catalog/index.js.map +1 -0
  37. package/build/domains/catalog/queries.d.ts +168 -0
  38. package/build/domains/catalog/queries.d.ts.map +1 -0
  39. package/build/domains/catalog/queries.js +29 -0
  40. package/build/domains/catalog/queries.js.map +1 -0
  41. package/build/domains/config/index.d.ts +40 -0
  42. package/build/domains/config/index.d.ts.map +1 -0
  43. package/build/domains/config/index.js +18 -0
  44. package/build/domains/config/index.js.map +1 -0
  45. package/build/domains/orders/commands.d.ts +262 -0
  46. package/build/domains/orders/commands.d.ts.map +1 -0
  47. package/build/domains/orders/commands.js +47 -0
  48. package/build/domains/orders/commands.js.map +1 -0
  49. package/build/domains/orders/dtos.d.ts +112 -0
  50. package/build/domains/orders/dtos.d.ts.map +1 -0
  51. package/build/domains/orders/dtos.js +44 -0
  52. package/build/domains/orders/dtos.js.map +1 -0
  53. package/build/domains/orders/events.d.ts +21 -0
  54. package/build/domains/orders/events.d.ts.map +1 -0
  55. package/build/domains/orders/events.js +19 -0
  56. package/build/domains/orders/events.js.map +1 -0
  57. package/build/domains/orders/index.d.ts +381 -0
  58. package/build/domains/orders/index.d.ts.map +1 -0
  59. package/build/domains/orders/index.js +28 -0
  60. package/build/domains/orders/index.js.map +1 -0
  61. package/build/domains/orders/queries.d.ts +532 -0
  62. package/build/domains/orders/queries.d.ts.map +1 -0
  63. package/build/domains/orders/queries.js +40 -0
  64. package/build/domains/orders/queries.js.map +1 -0
  65. package/build/domains/payments/index.d.ts +96 -0
  66. package/build/domains/payments/index.d.ts.map +1 -0
  67. package/build/domains/payments/index.js +34 -0
  68. package/build/domains/payments/index.js.map +1 -0
  69. package/build/domains/products/commands.d.ts +302 -0
  70. package/build/domains/products/commands.d.ts.map +1 -0
  71. package/build/domains/products/commands.js +101 -0
  72. package/build/domains/products/commands.js.map +1 -0
  73. package/build/domains/products/dtos.d.ts +122 -0
  74. package/build/domains/products/dtos.d.ts.map +1 -0
  75. package/build/domains/products/dtos.js +54 -0
  76. package/build/domains/products/dtos.js.map +1 -0
  77. package/build/domains/products/index.d.ts +276 -0
  78. package/build/domains/products/index.d.ts.map +1 -0
  79. package/build/{commands/auth → domains/products}/index.js +10 -6
  80. package/build/domains/products/index.js.map +1 -0
  81. package/build/domains/products/queries.d.ts +334 -0
  82. package/build/domains/products/queries.d.ts.map +1 -0
  83. package/build/domains/products/queries.js +41 -0
  84. package/build/domains/products/queries.js.map +1 -0
  85. package/build/domains/promo-codes/index.d.ts +92 -0
  86. package/build/domains/promo-codes/index.d.ts.map +1 -0
  87. package/build/domains/promo-codes/index.js +40 -0
  88. package/build/domains/promo-codes/index.js.map +1 -0
  89. package/build/domains/stats/index.d.ts +274 -0
  90. package/build/domains/stats/index.d.ts.map +1 -0
  91. package/build/domains/stats/index.js +76 -0
  92. package/build/domains/stats/index.js.map +1 -0
  93. package/build/domains/users/dtos.d.ts +9 -0
  94. package/build/domains/users/dtos.d.ts.map +1 -0
  95. package/build/domains/users/dtos.js +11 -0
  96. package/build/domains/users/dtos.js.map +1 -0
  97. package/build/domains/users/index.d.ts +101 -0
  98. package/build/domains/users/index.d.ts.map +1 -0
  99. package/build/domains/users/index.js +52 -0
  100. package/build/domains/users/index.js.map +1 -0
  101. package/build/index.d.ts +1309 -1
  102. package/build/index.d.ts.map +1 -1
  103. package/build/index.js +34 -1
  104. package/build/index.js.map +1 -1
  105. package/build/shared/api-response.d.ts +17 -0
  106. package/build/shared/api-response.d.ts.map +1 -0
  107. package/build/shared/api-response.js +22 -0
  108. package/build/shared/api-response.js.map +1 -0
  109. package/build/shared/common.d.ts +14 -0
  110. package/build/shared/common.d.ts.map +1 -0
  111. package/build/shared/common.js +8 -0
  112. package/build/shared/common.js.map +1 -0
  113. package/build/shared/errors.d.ts +34 -0
  114. package/build/shared/errors.d.ts.map +1 -0
  115. package/build/shared/errors.js +36 -0
  116. package/build/shared/errors.js.map +1 -0
  117. package/build/shared/index.d.ts +7 -0
  118. package/build/shared/index.d.ts.map +1 -0
  119. package/build/{commands/orders → shared}/index.js +6 -6
  120. package/build/shared/index.js.map +1 -0
  121. package/build/shared/money.d.ts +32 -0
  122. package/build/shared/money.d.ts.map +1 -0
  123. package/build/shared/money.js +20 -0
  124. package/build/shared/money.js.map +1 -0
  125. package/build/shared/pagination.d.ts +27 -0
  126. package/build/shared/pagination.d.ts.map +1 -0
  127. package/build/{commands/common.js → shared/pagination.js} +2 -9
  128. package/build/shared/pagination.js.map +1 -0
  129. package/build/shared/types.d.ts +20 -0
  130. package/build/shared/types.d.ts.map +1 -0
  131. package/build/shared/types.js.map +1 -0
  132. package/package.json +43 -48
  133. package/build/client.d.ts +0 -934
  134. package/build/client.d.ts.map +0 -1
  135. package/build/client.js +0 -184
  136. package/build/client.js.map +0 -1
  137. package/build/commands/api-response.d.ts +0 -19
  138. package/build/commands/api-response.d.ts.map +0 -1
  139. package/build/commands/api-response.js +0 -14
  140. package/build/commands/api-response.js.map +0 -1
  141. package/build/commands/auth/confirm.d.ts +0 -12
  142. package/build/commands/auth/confirm.d.ts.map +0 -1
  143. package/build/commands/auth/confirm.js +0 -12
  144. package/build/commands/auth/confirm.js.map +0 -1
  145. package/build/commands/auth/endpoints.d.ts +0 -115
  146. package/build/commands/auth/endpoints.d.ts.map +0 -1
  147. package/build/commands/auth/endpoints.js +0 -51
  148. package/build/commands/auth/endpoints.js.map +0 -1
  149. package/build/commands/auth/index.d.ts +0 -7
  150. package/build/commands/auth/index.d.ts.map +0 -1
  151. package/build/commands/auth/index.js.map +0 -1
  152. package/build/commands/auth/login.d.ts +0 -21
  153. package/build/commands/auth/login.d.ts.map +0 -1
  154. package/build/commands/auth/login.js +0 -12
  155. package/build/commands/auth/login.js.map +0 -1
  156. package/build/commands/auth/profile.d.ts +0 -19
  157. package/build/commands/auth/profile.d.ts.map +0 -1
  158. package/build/commands/auth/profile.js +0 -11
  159. package/build/commands/auth/profile.js.map +0 -1
  160. package/build/commands/auth/register.d.ts +0 -13
  161. package/build/commands/auth/register.d.ts.map +0 -1
  162. package/build/commands/auth/register.js +0 -12
  163. package/build/commands/auth/register.js.map +0 -1
  164. package/build/commands/auth/reset.d.ts +0 -13
  165. package/build/commands/auth/reset.d.ts.map +0 -1
  166. package/build/commands/auth/reset.js +0 -10
  167. package/build/commands/auth/reset.js.map +0 -1
  168. package/build/commands/common.d.ts +0 -65
  169. package/build/commands/common.d.ts.map +0 -1
  170. package/build/commands/common.js.map +0 -1
  171. package/build/commands/consts.d.ts +0 -2
  172. package/build/commands/consts.d.ts.map +0 -1
  173. package/build/commands/consts.js +0 -5
  174. package/build/commands/consts.js.map +0 -1
  175. package/build/commands/endpoints.d.ts +0 -4643
  176. package/build/commands/endpoints.d.ts.map +0 -1
  177. package/build/commands/endpoints.js +0 -26
  178. package/build/commands/endpoints.js.map +0 -1
  179. package/build/commands/index.d.ts +0 -16
  180. package/build/commands/index.d.ts.map +0 -1
  181. package/build/commands/index.js +0 -32
  182. package/build/commands/index.js.map +0 -1
  183. package/build/commands/orders/create.d.ts +0 -100
  184. package/build/commands/orders/create.d.ts.map +0 -1
  185. package/build/commands/orders/create.js +0 -43
  186. package/build/commands/orders/create.js.map +0 -1
  187. package/build/commands/orders/endpoints.d.ts +0 -742
  188. package/build/commands/orders/endpoints.d.ts.map +0 -1
  189. package/build/commands/orders/endpoints.js +0 -48
  190. package/build/commands/orders/endpoints.js.map +0 -1
  191. package/build/commands/orders/enums.d.ts +0 -8
  192. package/build/commands/orders/enums.d.ts.map +0 -1
  193. package/build/commands/orders/enums.js +0 -26
  194. package/build/commands/orders/enums.js.map +0 -1
  195. package/build/commands/orders/index.d.ts +0 -7
  196. package/build/commands/orders/index.d.ts.map +0 -1
  197. package/build/commands/orders/index.js.map +0 -1
  198. package/build/commands/orders/query.d.ts +0 -104
  199. package/build/commands/orders/query.d.ts.map +0 -1
  200. package/build/commands/orders/query.js +0 -46
  201. package/build/commands/orders/query.js.map +0 -1
  202. package/build/commands/orders/read.d.ts +0 -235
  203. package/build/commands/orders/read.d.ts.map +0 -1
  204. package/build/commands/orders/read.js +0 -84
  205. package/build/commands/orders/read.js.map +0 -1
  206. package/build/commands/orders/update.d.ts +0 -24
  207. package/build/commands/orders/update.d.ts.map +0 -1
  208. package/build/commands/orders/update.js +0 -17
  209. package/build/commands/orders/update.js.map +0 -1
  210. package/build/commands/pagination.d.ts +0 -13
  211. package/build/commands/pagination.d.ts.map +0 -1
  212. package/build/commands/pagination.js +0 -9
  213. package/build/commands/pagination.js.map +0 -1
  214. package/build/commands/payment-methods/create.d.ts +0 -46
  215. package/build/commands/payment-methods/create.d.ts.map +0 -1
  216. package/build/commands/payment-methods/create.js +0 -23
  217. package/build/commands/payment-methods/create.js.map +0 -1
  218. package/build/commands/payment-methods/endpoints.d.ts +0 -537
  219. package/build/commands/payment-methods/endpoints.d.ts.map +0 -1
  220. package/build/commands/payment-methods/endpoints.js +0 -64
  221. package/build/commands/payment-methods/endpoints.js.map +0 -1
  222. package/build/commands/payment-methods/index.d.ts +0 -5
  223. package/build/commands/payment-methods/index.d.ts.map +0 -1
  224. package/build/commands/payment-methods/index.js.map +0 -1
  225. package/build/commands/payment-methods/read.d.ts +0 -72
  226. package/build/commands/payment-methods/read.d.ts.map +0 -1
  227. package/build/commands/payment-methods/read.js +0 -29
  228. package/build/commands/payment-methods/read.js.map +0 -1
  229. package/build/commands/payment-methods/update.d.ts +0 -46
  230. package/build/commands/payment-methods/update.d.ts.map +0 -1
  231. package/build/commands/payment-methods/update.js +0 -20
  232. package/build/commands/payment-methods/update.js.map +0 -1
  233. package/build/commands/products/create.d.ts +0 -242
  234. package/build/commands/products/create.d.ts.map +0 -1
  235. package/build/commands/products/create.js +0 -129
  236. package/build/commands/products/create.js.map +0 -1
  237. package/build/commands/products/endpoints.d.ts +0 -1980
  238. package/build/commands/products/endpoints.d.ts.map +0 -1
  239. package/build/commands/products/endpoints.js +0 -100
  240. package/build/commands/products/endpoints.js.map +0 -1
  241. package/build/commands/products/enums.d.ts +0 -20
  242. package/build/commands/products/enums.d.ts.map +0 -1
  243. package/build/commands/products/enums.js +0 -28
  244. package/build/commands/products/enums.js.map +0 -1
  245. package/build/commands/products/index.d.ts +0 -7
  246. package/build/commands/products/index.d.ts.map +0 -1
  247. package/build/commands/products/index.js.map +0 -1
  248. package/build/commands/products/query.d.ts +0 -80
  249. package/build/commands/products/query.d.ts.map +0 -1
  250. package/build/commands/products/query.js +0 -56
  251. package/build/commands/products/query.js.map +0 -1
  252. package/build/commands/products/read.d.ts +0 -1233
  253. package/build/commands/products/read.d.ts.map +0 -1
  254. package/build/commands/products/read.js +0 -242
  255. package/build/commands/products/read.js.map +0 -1
  256. package/build/commands/products/update.d.ts +0 -85
  257. package/build/commands/products/update.d.ts.map +0 -1
  258. package/build/commands/products/update.js +0 -11
  259. package/build/commands/products/update.js.map +0 -1
  260. package/build/commands/promocode-activations/create.d.ts +0 -19
  261. package/build/commands/promocode-activations/create.d.ts.map +0 -1
  262. package/build/commands/promocode-activations/create.js +0 -11
  263. package/build/commands/promocode-activations/create.js.map +0 -1
  264. package/build/commands/promocode-activations/endpoints.d.ts +0 -158
  265. package/build/commands/promocode-activations/endpoints.d.ts.map +0 -1
  266. package/build/commands/promocode-activations/endpoints.js +0 -39
  267. package/build/commands/promocode-activations/endpoints.js.map +0 -1
  268. package/build/commands/promocode-activations/index.d.ts +0 -5
  269. package/build/commands/promocode-activations/index.d.ts.map +0 -1
  270. package/build/commands/promocode-activations/index.js +0 -21
  271. package/build/commands/promocode-activations/index.js.map +0 -1
  272. package/build/commands/promocode-activations/read.d.ts +0 -22
  273. package/build/commands/promocode-activations/read.d.ts.map +0 -1
  274. package/build/commands/promocode-activations/read.js +0 -15
  275. package/build/commands/promocode-activations/read.js.map +0 -1
  276. package/build/commands/promocode-activations/update.d.ts +0 -19
  277. package/build/commands/promocode-activations/update.d.ts.map +0 -1
  278. package/build/commands/promocode-activations/update.js +0 -11
  279. package/build/commands/promocode-activations/update.js.map +0 -1
  280. package/build/commands/promocodes/create.d.ts +0 -40
  281. package/build/commands/promocodes/create.d.ts.map +0 -1
  282. package/build/commands/promocodes/create.js +0 -19
  283. package/build/commands/promocodes/create.js.map +0 -1
  284. package/build/commands/promocodes/endpoints.d.ts +0 -354
  285. package/build/commands/promocodes/endpoints.d.ts.map +0 -1
  286. package/build/commands/promocodes/endpoints.js +0 -47
  287. package/build/commands/promocodes/endpoints.js.map +0 -1
  288. package/build/commands/promocodes/enums.d.ts +0 -6
  289. package/build/commands/promocodes/enums.d.ts.map +0 -1
  290. package/build/commands/promocodes/enums.js +0 -10
  291. package/build/commands/promocodes/enums.js.map +0 -1
  292. package/build/commands/promocodes/index.d.ts +0 -6
  293. package/build/commands/promocodes/index.d.ts.map +0 -1
  294. package/build/commands/promocodes/index.js +0 -22
  295. package/build/commands/promocodes/index.js.map +0 -1
  296. package/build/commands/promocodes/read.d.ts +0 -46
  297. package/build/commands/promocodes/read.d.ts.map +0 -1
  298. package/build/commands/promocodes/read.js +0 -24
  299. package/build/commands/promocodes/read.js.map +0 -1
  300. package/build/commands/promocodes/update.d.ts +0 -34
  301. package/build/commands/promocodes/update.d.ts.map +0 -1
  302. package/build/commands/promocodes/update.js +0 -17
  303. package/build/commands/promocodes/update.js.map +0 -1
  304. package/build/commands/refresh-sessions/create.d.ts +0 -25
  305. package/build/commands/refresh-sessions/create.d.ts.map +0 -1
  306. package/build/commands/refresh-sessions/create.js +0 -14
  307. package/build/commands/refresh-sessions/create.js.map +0 -1
  308. package/build/commands/refresh-sessions/endpoints.d.ts +0 -216
  309. package/build/commands/refresh-sessions/endpoints.d.ts.map +0 -1
  310. package/build/commands/refresh-sessions/endpoints.js +0 -47
  311. package/build/commands/refresh-sessions/endpoints.js.map +0 -1
  312. package/build/commands/refresh-sessions/enums.d.ts +0 -4
  313. package/build/commands/refresh-sessions/enums.d.ts.map +0 -1
  314. package/build/commands/refresh-sessions/enums.js +0 -9
  315. package/build/commands/refresh-sessions/enums.js.map +0 -1
  316. package/build/commands/refresh-sessions/index.d.ts +0 -6
  317. package/build/commands/refresh-sessions/index.d.ts.map +0 -1
  318. package/build/commands/refresh-sessions/index.js +0 -22
  319. package/build/commands/refresh-sessions/index.js.map +0 -1
  320. package/build/commands/refresh-sessions/read.d.ts +0 -28
  321. package/build/commands/refresh-sessions/read.d.ts.map +0 -1
  322. package/build/commands/refresh-sessions/read.js +0 -18
  323. package/build/commands/refresh-sessions/read.js.map +0 -1
  324. package/build/commands/refresh-sessions/update.d.ts +0 -25
  325. package/build/commands/refresh-sessions/update.d.ts.map +0 -1
  326. package/build/commands/refresh-sessions/update.js +0 -17
  327. package/build/commands/refresh-sessions/update.js.map +0 -1
  328. package/build/commands/settings/endpoints.d.ts +0 -109
  329. package/build/commands/settings/endpoints.d.ts.map +0 -1
  330. package/build/commands/settings/endpoints.js +0 -44
  331. package/build/commands/settings/endpoints.js.map +0 -1
  332. package/build/commands/settings/index.d.ts +0 -4
  333. package/build/commands/settings/index.d.ts.map +0 -1
  334. package/build/commands/settings/index.js +0 -20
  335. package/build/commands/settings/index.js.map +0 -1
  336. package/build/commands/settings/read.d.ts +0 -19
  337. package/build/commands/settings/read.d.ts.map +0 -1
  338. package/build/commands/settings/read.js +0 -11
  339. package/build/commands/settings/read.js.map +0 -1
  340. package/build/commands/settings/update.d.ts +0 -19
  341. package/build/commands/settings/update.d.ts.map +0 -1
  342. package/build/commands/settings/update.js +0 -11
  343. package/build/commands/settings/update.js.map +0 -1
  344. package/build/commands/stats/endpoints.d.ts +0 -68
  345. package/build/commands/stats/endpoints.d.ts.map +0 -1
  346. package/build/commands/stats/endpoints.js +0 -14
  347. package/build/commands/stats/endpoints.js.map +0 -1
  348. package/build/commands/stats/index.d.ts +0 -4
  349. package/build/commands/stats/index.d.ts.map +0 -1
  350. package/build/commands/stats/index.js +0 -20
  351. package/build/commands/stats/index.js.map +0 -1
  352. package/build/commands/stats/query.d.ts +0 -32
  353. package/build/commands/stats/query.d.ts.map +0 -1
  354. package/build/commands/stats/query.js +0 -16
  355. package/build/commands/stats/query.js.map +0 -1
  356. package/build/commands/stats/read.d.ts +0 -31
  357. package/build/commands/stats/read.d.ts.map +0 -1
  358. package/build/commands/stats/read.js +0 -18
  359. package/build/commands/stats/read.js.map +0 -1
  360. package/build/commands/users/create.d.ts +0 -43
  361. package/build/commands/users/create.d.ts.map +0 -1
  362. package/build/commands/users/create.js +0 -20
  363. package/build/commands/users/create.js.map +0 -1
  364. package/build/commands/users/endpoints.d.ts +0 -404
  365. package/build/commands/users/endpoints.d.ts.map +0 -1
  366. package/build/commands/users/endpoints.js +0 -40
  367. package/build/commands/users/endpoints.js.map +0 -1
  368. package/build/commands/users/enums.d.ts +0 -7
  369. package/build/commands/users/enums.d.ts.map +0 -1
  370. package/build/commands/users/enums.js +0 -11
  371. package/build/commands/users/enums.js.map +0 -1
  372. package/build/commands/users/index.d.ts +0 -7
  373. package/build/commands/users/index.d.ts.map +0 -1
  374. package/build/commands/users/index.js +0 -23
  375. package/build/commands/users/index.js.map +0 -1
  376. package/build/commands/users/query.d.ts +0 -53
  377. package/build/commands/users/query.d.ts.map +0 -1
  378. package/build/commands/users/query.js +0 -22
  379. package/build/commands/users/query.js.map +0 -1
  380. package/build/commands/users/read.d.ts +0 -61
  381. package/build/commands/users/read.d.ts.map +0 -1
  382. package/build/commands/users/read.js +0 -29
  383. package/build/commands/users/read.js.map +0 -1
  384. package/build/commands/users/update.d.ts +0 -43
  385. package/build/commands/users/update.d.ts.map +0 -1
  386. package/build/commands/users/update.js +0 -20
  387. package/build/commands/users/update.js.map +0 -1
  388. package/build/types.d.ts +0 -9
  389. package/build/types.d.ts.map +0 -1
  390. package/build/types.js.map +0 -1
  391. /package/build/{types.js → shared/types.js} +0 -0
package/build/client.d.ts DELETED
@@ -1,934 +0,0 @@
1
- import { GetEndpointRequest } from "./commands/endpoints";
2
- type Interceptor = (config: RequestInit) => RequestInit | Promise<RequestInit>;
3
- type ResponseInterceptor = (response: Response) => Response | Promise<Response>;
4
- interface ApiClientConfig {
5
- baseUrl: string;
6
- interceptors?: Interceptor[];
7
- responseInterceptors?: ResponseInterceptor[];
8
- }
9
- export declare class ApiError extends Error {
10
- status: number;
11
- body: unknown;
12
- constructor(status: number, body: unknown);
13
- }
14
- export declare class ApiClient {
15
- private baseUrl;
16
- private interceptors;
17
- private responseInterceptors;
18
- constructor(config: ApiClientConfig);
19
- addInterceptor(interceptor: Interceptor): void;
20
- addResponseInterceptor(interceptor: ResponseInterceptor): void;
21
- private request;
22
- auth: {
23
- login: (data: GetEndpointRequest<"auth", "login">) => Promise<{
24
- accessToken: string;
25
- }>;
26
- register: (data: GetEndpointRequest<"auth", "register">) => Promise<{
27
- accessToken: string;
28
- }>;
29
- refresh: () => Promise<{
30
- accessToken: string;
31
- }>;
32
- reset: (data: GetEndpointRequest<"auth", "reset">) => Promise<void>;
33
- confirm: (params: GetEndpointRequest<"auth", "confirm">) => Promise<{
34
- accessToken: string;
35
- }>;
36
- profile: () => Promise<{
37
- email: string;
38
- id: number;
39
- username: string;
40
- avatar: string | null;
41
- }>;
42
- };
43
- users: {
44
- create: (data: GetEndpointRequest<"users", "create">) => Promise<{
45
- email: string | null;
46
- password: string | null;
47
- status: "ACTIVE" | "BLOCKED";
48
- id: number;
49
- username: string | null;
50
- telegramId: string | null;
51
- picture: string | null;
52
- steamId: string | null;
53
- vkId: string | null;
54
- googleId: string | null;
55
- isConfirmEmail: boolean;
56
- role: "USER" | "ADMIN" | "NO_AUTH";
57
- isOnline: boolean;
58
- createdAt?: Date | null | undefined;
59
- updatedAt?: Date | null | undefined;
60
- blockedAt?: Date | null | undefined;
61
- ordersCount?: number | undefined;
62
- ordersAmount?: number | undefined;
63
- }>;
64
- list: (params?: GetEndpointRequest<"users", "list">) => Promise<{
65
- email: string | null;
66
- password: string | null;
67
- status: "ACTIVE" | "BLOCKED";
68
- id: number;
69
- username: string | null;
70
- telegramId: string | null;
71
- picture: string | null;
72
- steamId: string | null;
73
- vkId: string | null;
74
- googleId: string | null;
75
- isConfirmEmail: boolean;
76
- role: "USER" | "ADMIN" | "NO_AUTH";
77
- isOnline: boolean;
78
- createdAt?: Date | null | undefined;
79
- updatedAt?: Date | null | undefined;
80
- blockedAt?: Date | null | undefined;
81
- ordersCount?: number | undefined;
82
- ordersAmount?: number | undefined;
83
- }[]>;
84
- getById: (params: GetEndpointRequest<"users", "getById">) => Promise<{
85
- email: string | null;
86
- password: string | null;
87
- status: "ACTIVE" | "BLOCKED";
88
- id: number;
89
- username: string | null;
90
- telegramId: string | null;
91
- picture: string | null;
92
- steamId: string | null;
93
- vkId: string | null;
94
- googleId: string | null;
95
- isConfirmEmail: boolean;
96
- role: "USER" | "ADMIN" | "NO_AUTH";
97
- isOnline: boolean;
98
- createdAt?: Date | null | undefined;
99
- updatedAt?: Date | null | undefined;
100
- blockedAt?: Date | null | undefined;
101
- ordersCount?: number | undefined;
102
- ordersAmount?: number | undefined;
103
- }>;
104
- update: (params: GetEndpointRequest<"users", "update">) => Promise<{
105
- email: string | null;
106
- password: string | null;
107
- status: "ACTIVE" | "BLOCKED";
108
- id: number;
109
- username: string | null;
110
- telegramId: string | null;
111
- picture: string | null;
112
- steamId: string | null;
113
- vkId: string | null;
114
- googleId: string | null;
115
- isConfirmEmail: boolean;
116
- role: "USER" | "ADMIN" | "NO_AUTH";
117
- isOnline: boolean;
118
- createdAt?: Date | null | undefined;
119
- updatedAt?: Date | null | undefined;
120
- blockedAt?: Date | null | undefined;
121
- ordersCount?: number | undefined;
122
- ordersAmount?: number | undefined;
123
- }>;
124
- };
125
- orders: {
126
- create: (data: GetEndpointRequest<"orders", "create">) => Promise<{
127
- redirectUrl: string;
128
- }>;
129
- list: (params?: GetEndpointRequest<"orders", "list">) => Promise<{
130
- email: string;
131
- type: "MAIN" | "WEBAPP";
132
- status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
133
- id: number;
134
- designType: string | null;
135
- subtotal: string;
136
- discount: string;
137
- commission: string;
138
- serviceCommission: string;
139
- total: string;
140
- paymentMethodName: string | null;
141
- promocodeValue: string | null;
142
- promocodeDiscount: string | null;
143
- createdAt: Date;
144
- updatedAt: Date;
145
- paymentMethodId?: number | null | undefined;
146
- items?: {
147
- status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
148
- id: number;
149
- variantId: number;
150
- quantity: number;
151
- gameUsername: string | null;
152
- gameUsernameType: string | null;
153
- productId: number;
154
- price: string;
155
- deliveredKey: string | null;
156
- deliveredAt: Date | null;
157
- productTitle?: string | undefined;
158
- variantName?: string | undefined;
159
- }[] | undefined;
160
- promocodeId?: number | null | undefined;
161
- userId?: number | null | undefined;
162
- utmSource?: string | null | undefined;
163
- telegramUsername?: string | null | undefined;
164
- ipAddress?: string | null | undefined;
165
- serviceCommissionPercent?: number | undefined;
166
- acquiringCommissionPercent?: number | undefined;
167
- }[]>;
168
- getById: (params: GetEndpointRequest<"orders", "getById">) => Promise<{
169
- email: string;
170
- type: "MAIN" | "WEBAPP";
171
- status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
172
- id: number;
173
- designType: string | null;
174
- subtotal: string;
175
- discount: string;
176
- commission: string;
177
- serviceCommission: string;
178
- total: string;
179
- paymentMethodName: string | null;
180
- promocodeValue: string | null;
181
- promocodeDiscount: string | null;
182
- createdAt: Date;
183
- updatedAt: Date;
184
- paymentMethodId?: number | null | undefined;
185
- items?: {
186
- status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
187
- id: number;
188
- variantId: number;
189
- quantity: number;
190
- gameUsername: string | null;
191
- gameUsernameType: string | null;
192
- productId: number;
193
- price: string;
194
- deliveredKey: string | null;
195
- deliveredAt: Date | null;
196
- productTitle?: string | undefined;
197
- variantName?: string | undefined;
198
- }[] | undefined;
199
- promocodeId?: number | null | undefined;
200
- userId?: number | null | undefined;
201
- utmSource?: string | null | undefined;
202
- telegramUsername?: string | null | undefined;
203
- ipAddress?: string | null | undefined;
204
- serviceCommissionPercent?: number | undefined;
205
- acquiringCommissionPercent?: number | undefined;
206
- }>;
207
- getUserOrders: (params?: GetEndpointRequest<"orders", "getUserOrders">) => Promise<{
208
- email: string;
209
- type: "MAIN" | "WEBAPP";
210
- status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
211
- id: number;
212
- designType: string | null;
213
- subtotal: string;
214
- discount: string;
215
- commission: string;
216
- serviceCommission: string;
217
- total: string;
218
- paymentMethodName: string | null;
219
- promocodeValue: string | null;
220
- promocodeDiscount: string | null;
221
- createdAt: Date;
222
- updatedAt: Date;
223
- paymentMethodId?: number | null | undefined;
224
- items?: {
225
- status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
226
- id: number;
227
- variantId: number;
228
- quantity: number;
229
- gameUsername: string | null;
230
- gameUsernameType: string | null;
231
- productId: number;
232
- price: string;
233
- deliveredKey: string | null;
234
- deliveredAt: Date | null;
235
- productTitle?: string | undefined;
236
- variantName?: string | undefined;
237
- }[] | undefined;
238
- promocodeId?: number | null | undefined;
239
- userId?: number | null | undefined;
240
- utmSource?: string | null | undefined;
241
- telegramUsername?: string | null | undefined;
242
- ipAddress?: string | null | undefined;
243
- serviceCommissionPercent?: number | undefined;
244
- acquiringCommissionPercent?: number | undefined;
245
- }[]>;
246
- getUserOrderById: (params: GetEndpointRequest<"orders", "getUserOrderById">) => Promise<{
247
- email: string;
248
- type: "MAIN" | "WEBAPP";
249
- status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
250
- id: number;
251
- designType: string | null;
252
- subtotal: string;
253
- discount: string;
254
- commission: string;
255
- serviceCommission: string;
256
- total: string;
257
- paymentMethodName: string | null;
258
- promocodeValue: string | null;
259
- promocodeDiscount: string | null;
260
- createdAt: Date;
261
- updatedAt: Date;
262
- paymentMethodId?: number | null | undefined;
263
- items?: {
264
- status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
265
- id: number;
266
- variantId: number;
267
- quantity: number;
268
- gameUsername: string | null;
269
- gameUsernameType: string | null;
270
- productId: number;
271
- price: string;
272
- deliveredKey: string | null;
273
- deliveredAt: Date | null;
274
- productTitle?: string | undefined;
275
- variantName?: string | undefined;
276
- }[] | undefined;
277
- promocodeId?: number | null | undefined;
278
- userId?: number | null | undefined;
279
- utmSource?: string | null | undefined;
280
- telegramUsername?: string | null | undefined;
281
- ipAddress?: string | null | undefined;
282
- serviceCommissionPercent?: number | undefined;
283
- acquiringCommissionPercent?: number | undefined;
284
- }>;
285
- };
286
- products: {
287
- catalog: (params?: GetEndpointRequest<"products", "catalog">) => Promise<{
288
- items: {
289
- type: string;
290
- id: number;
291
- slug: string;
292
- title: string;
293
- shortDescription: string | null;
294
- coverImageUrl: string | null;
295
- publisher: string | null;
296
- releaseDate: Date | null;
297
- hasMultiplayer: boolean;
298
- hasCoop: boolean;
299
- variants: {
300
- id: number;
301
- price: string;
302
- name: string;
303
- originalPrice: string | null;
304
- platform: string | null;
305
- regionCode: string | null;
306
- }[];
307
- steamRating: number | null;
308
- salesCount: number;
309
- category: {
310
- name: string;
311
- slug: string;
312
- };
313
- genres: {
314
- name: string;
315
- slug: string;
316
- }[];
317
- regions: {
318
- code: string;
319
- name: string;
320
- }[];
321
- minPrice: string | null;
322
- hasDiscount: boolean;
323
- }[];
324
- total: number;
325
- take: number;
326
- skip: number;
327
- }>;
328
- categories: () => Promise<{
329
- id: number;
330
- name: string;
331
- slug: string;
332
- description: string | null;
333
- iconUrl: string | null;
334
- _count: {
335
- products: number;
336
- };
337
- }[]>;
338
- genres: () => Promise<{
339
- id: number;
340
- name: string;
341
- slug: string;
342
- _count: {
343
- products: number;
344
- };
345
- }[]>;
346
- regions: () => Promise<{
347
- code: string;
348
- id: number;
349
- name: string;
350
- _count: {
351
- products: number;
352
- };
353
- }[]>;
354
- getBySlug: (params: GetEndpointRequest<"products", "getBySlug">) => Promise<{
355
- type: string;
356
- status: string;
357
- id: number;
358
- createdAt: Date;
359
- updatedAt: Date;
360
- slug: string;
361
- title: string;
362
- originalTitle: string | null;
363
- description: string | null;
364
- customDescription: string | null;
365
- shortDescription: string | null;
366
- coverImageUrl: string | null;
367
- developer: string | null;
368
- publisher: string | null;
369
- releaseDate: Date | null;
370
- steamAppId: number | null;
371
- hasMultiplayer: boolean;
372
- hasCoop: boolean;
373
- hasSinglePlayer: boolean;
374
- metaTitle: string | null;
375
- metaDescription: string | null;
376
- variants: {
377
- id: number;
378
- price: string;
379
- name: string;
380
- sku: string;
381
- originalPrice: string | null;
382
- topupAmount: string | null;
383
- currency: string | null;
384
- durationDays: number | null;
385
- platform: string | null;
386
- regionCode: string | null;
387
- deliveryType: string;
388
- inStock: boolean;
389
- }[];
390
- steamRating: number | null;
391
- salesCount: number;
392
- category: {
393
- id: number;
394
- name: string;
395
- slug: string;
396
- };
397
- genres: {
398
- id: number;
399
- name: string;
400
- slug: string;
401
- }[];
402
- regions: {
403
- code: string;
404
- id: number;
405
- name: string;
406
- }[];
407
- viewsCount: number;
408
- media: {
409
- type: string;
410
- id: number;
411
- url: string;
412
- alt: string | null;
413
- }[];
414
- tags: {
415
- id: number;
416
- name: string;
417
- slug: string;
418
- }[];
419
- systemRequirements: {
420
- type: string;
421
- os: string | null;
422
- processor: string | null;
423
- memory: string | null;
424
- graphics: string | null;
425
- storage: string | null;
426
- directx: string | null;
427
- network: string | null;
428
- additional: string | null;
429
- }[];
430
- dlcs: {
431
- id: number;
432
- slug: string;
433
- title: string;
434
- coverImageUrl: string | null;
435
- variants: {
436
- price?: any;
437
- originalPrice?: any;
438
- }[];
439
- }[];
440
- }>;
441
- create: (data: GetEndpointRequest<"products", "create">) => Promise<{
442
- type: string;
443
- status: string;
444
- id: number;
445
- createdAt: Date;
446
- updatedAt: Date;
447
- slug: string;
448
- title: string;
449
- originalTitle: string | null;
450
- description: string | null;
451
- customDescription: string | null;
452
- shortDescription: string | null;
453
- coverImageUrl: string | null;
454
- developer: string | null;
455
- publisher: string | null;
456
- releaseDate: Date | null;
457
- steamAppId: number | null;
458
- hasMultiplayer: boolean;
459
- hasCoop: boolean;
460
- hasSinglePlayer: boolean;
461
- metaTitle: string | null;
462
- metaDescription: string | null;
463
- variants: {
464
- id: number;
465
- price: string;
466
- name: string;
467
- sku: string;
468
- originalPrice: string | null;
469
- topupAmount: string | null;
470
- currency: string | null;
471
- durationDays: number | null;
472
- platform: string | null;
473
- regionCode: string | null;
474
- deliveryType: string;
475
- inStock: boolean;
476
- }[];
477
- steamRating: number | null;
478
- salesCount: number;
479
- category: {
480
- id: number;
481
- name: string;
482
- slug: string;
483
- };
484
- genres: {
485
- id: number;
486
- name: string;
487
- slug: string;
488
- }[];
489
- regions: {
490
- code: string;
491
- id: number;
492
- name: string;
493
- }[];
494
- viewsCount: number;
495
- media: {
496
- type: string;
497
- id: number;
498
- url: string;
499
- alt: string | null;
500
- }[];
501
- tags: {
502
- id: number;
503
- name: string;
504
- slug: string;
505
- }[];
506
- systemRequirements: {
507
- type: string;
508
- os: string | null;
509
- processor: string | null;
510
- memory: string | null;
511
- graphics: string | null;
512
- storage: string | null;
513
- directx: string | null;
514
- network: string | null;
515
- additional: string | null;
516
- }[];
517
- dlcs: {
518
- id: number;
519
- slug: string;
520
- title: string;
521
- coverImageUrl: string | null;
522
- variants: {
523
- price?: any;
524
- originalPrice?: any;
525
- }[];
526
- }[];
527
- }>;
528
- update: (params: GetEndpointRequest<"products", "update">) => Promise<{
529
- type: string;
530
- status: string;
531
- id: number;
532
- createdAt: Date;
533
- updatedAt: Date;
534
- slug: string;
535
- title: string;
536
- originalTitle: string | null;
537
- description: string | null;
538
- customDescription: string | null;
539
- shortDescription: string | null;
540
- coverImageUrl: string | null;
541
- developer: string | null;
542
- publisher: string | null;
543
- releaseDate: Date | null;
544
- steamAppId: number | null;
545
- hasMultiplayer: boolean;
546
- hasCoop: boolean;
547
- hasSinglePlayer: boolean;
548
- metaTitle: string | null;
549
- metaDescription: string | null;
550
- variants: {
551
- id: number;
552
- price: string;
553
- name: string;
554
- sku: string;
555
- originalPrice: string | null;
556
- topupAmount: string | null;
557
- currency: string | null;
558
- durationDays: number | null;
559
- platform: string | null;
560
- regionCode: string | null;
561
- deliveryType: string;
562
- inStock: boolean;
563
- }[];
564
- steamRating: number | null;
565
- salesCount: number;
566
- category: {
567
- id: number;
568
- name: string;
569
- slug: string;
570
- };
571
- genres: {
572
- id: number;
573
- name: string;
574
- slug: string;
575
- }[];
576
- regions: {
577
- code: string;
578
- id: number;
579
- name: string;
580
- }[];
581
- viewsCount: number;
582
- media: {
583
- type: string;
584
- id: number;
585
- url: string;
586
- alt: string | null;
587
- }[];
588
- tags: {
589
- id: number;
590
- name: string;
591
- slug: string;
592
- }[];
593
- systemRequirements: {
594
- type: string;
595
- os: string | null;
596
- processor: string | null;
597
- memory: string | null;
598
- graphics: string | null;
599
- storage: string | null;
600
- directx: string | null;
601
- network: string | null;
602
- additional: string | null;
603
- }[];
604
- dlcs: {
605
- id: number;
606
- slug: string;
607
- title: string;
608
- coverImageUrl: string | null;
609
- variants: {
610
- price?: any;
611
- originalPrice?: any;
612
- }[];
613
- }[];
614
- }>;
615
- archive: (params: GetEndpointRequest<"products", "archive">) => Promise<{
616
- status: string;
617
- }>;
618
- createVariant: (params: GetEndpointRequest<"products", "createVariant">) => Promise<void>;
619
- updateVariant: (params: GetEndpointRequest<"products", "updateVariant">) => Promise<void>;
620
- importKeys: (params: GetEndpointRequest<"products", "importKeys">) => Promise<{
621
- imported: number;
622
- }>;
623
- getKeysCount: (params: GetEndpointRequest<"products", "getKeysCount">) => Promise<{
624
- total: number;
625
- available: number;
626
- sold: number;
627
- reserved: number;
628
- }>;
629
- addMedia: (params: GetEndpointRequest<"products", "addMedia">) => Promise<void>;
630
- removeMedia: (params: GetEndpointRequest<"products", "removeMedia">) => Promise<void>;
631
- upsertSystemRequirements: (params: GetEndpointRequest<"products", "upsertSystemRequirements">) => Promise<void>;
632
- };
633
- paymentMethods: {
634
- course: () => Promise<{
635
- USD_RUB: string;
636
- RUB_KZT: string;
637
- USD_KZT: string;
638
- KZT_RUB: string;
639
- }>;
640
- create: (params: GetEndpointRequest<"paymentMethods", "create">) => Promise<{
641
- type: string;
642
- id: number;
643
- createdAt: Date;
644
- updatedAt: Date;
645
- name: string;
646
- image: string;
647
- key: string;
648
- uniqueKey: string;
649
- isActive: boolean;
650
- maxAmount: number;
651
- minAmount: number;
652
- comission: number;
653
- serviceComission: number;
654
- cryptoToken: string | null;
655
- cryptoNetwork: string | null;
656
- secretComission?: number | undefined;
657
- }>;
658
- update: (params: GetEndpointRequest<"paymentMethods", "update">) => Promise<{
659
- type: string;
660
- id: number;
661
- createdAt: Date;
662
- updatedAt: Date;
663
- name: string;
664
- image: string;
665
- key: string;
666
- uniqueKey: string;
667
- isActive: boolean;
668
- maxAmount: number;
669
- minAmount: number;
670
- comission: number;
671
- serviceComission: number;
672
- cryptoToken: string | null;
673
- cryptoNetwork: string | null;
674
- secretComission?: number | undefined;
675
- }>;
676
- list: () => Promise<{
677
- type: string;
678
- id: number;
679
- createdAt: Date;
680
- updatedAt: Date;
681
- name: string;
682
- image: string;
683
- key: string;
684
- uniqueKey: string;
685
- isActive: boolean;
686
- maxAmount: number;
687
- minAmount: number;
688
- comission: number;
689
- serviceComission: number;
690
- cryptoToken: string | null;
691
- cryptoNetwork: string | null;
692
- secretComission?: number | undefined;
693
- }[]>;
694
- listAdmin: () => Promise<{
695
- type: string;
696
- id: number;
697
- createdAt: Date;
698
- updatedAt: Date;
699
- name: string;
700
- image: string;
701
- key: string;
702
- uniqueKey: string;
703
- isActive: boolean;
704
- maxAmount: number;
705
- minAmount: number;
706
- comission: number;
707
- serviceComission: number;
708
- cryptoToken: string | null;
709
- cryptoNetwork: string | null;
710
- secretComission?: number | undefined;
711
- }[]>;
712
- getById: (params: GetEndpointRequest<"paymentMethods", "getById">) => Promise<{
713
- type: string;
714
- id: number;
715
- createdAt: Date;
716
- updatedAt: Date;
717
- name: string;
718
- image: string;
719
- key: string;
720
- uniqueKey: string;
721
- isActive: boolean;
722
- maxAmount: number;
723
- minAmount: number;
724
- comission: number;
725
- serviceComission: number;
726
- cryptoToken: string | null;
727
- cryptoNetwork: string | null;
728
- secretComission?: number | undefined;
729
- }>;
730
- getByIdAdmin: (params: GetEndpointRequest<"paymentMethods", "getByIdAdmin">) => Promise<{
731
- type: string;
732
- id: number;
733
- createdAt: Date;
734
- updatedAt: Date;
735
- name: string;
736
- image: string;
737
- key: string;
738
- uniqueKey: string;
739
- isActive: boolean;
740
- maxAmount: number;
741
- minAmount: number;
742
- comission: number;
743
- serviceComission: number;
744
- cryptoToken: string | null;
745
- cryptoNetwork: string | null;
746
- secretComission?: number | undefined;
747
- }>;
748
- };
749
- promoCodes: {
750
- create: (data: GetEndpointRequest<"promoCodes", "create">) => Promise<{
751
- value: string;
752
- type: "USER" | "AD" | "SYSTEM";
753
- status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
754
- id: number;
755
- discountValue: string;
756
- activated: number;
757
- createdAt?: Date | null | undefined;
758
- updatedAt?: Date | null | undefined;
759
- expiredAt?: Date | null | undefined;
760
- startedAt?: Date | null | undefined;
761
- deletedAt?: Date | null | undefined;
762
- activationLimit?: number | null | undefined;
763
- activationPerUserLimit?: number | null | undefined;
764
- }>;
765
- list: () => Promise<{
766
- value: string;
767
- type: "USER" | "AD" | "SYSTEM";
768
- status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
769
- id: number;
770
- discountValue: string;
771
- activated: number;
772
- createdAt?: Date | null | undefined;
773
- updatedAt?: Date | null | undefined;
774
- expiredAt?: Date | null | undefined;
775
- startedAt?: Date | null | undefined;
776
- deletedAt?: Date | null | undefined;
777
- activationLimit?: number | null | undefined;
778
- activationPerUserLimit?: number | null | undefined;
779
- }[]>;
780
- getById: (params: GetEndpointRequest<"promoCodes", "getById">) => Promise<{
781
- value: string;
782
- type: "USER" | "AD" | "SYSTEM";
783
- status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
784
- id: number;
785
- discountValue: string;
786
- activated: number;
787
- createdAt?: Date | null | undefined;
788
- updatedAt?: Date | null | undefined;
789
- expiredAt?: Date | null | undefined;
790
- startedAt?: Date | null | undefined;
791
- deletedAt?: Date | null | undefined;
792
- activationLimit?: number | null | undefined;
793
- activationPerUserLimit?: number | null | undefined;
794
- }>;
795
- getByValue: (params: GetEndpointRequest<"promoCodes", "getByValue">) => Promise<{
796
- value: string;
797
- type: "USER" | "AD" | "SYSTEM";
798
- status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
799
- id: number;
800
- discountValue: string;
801
- activated: number;
802
- createdAt?: Date | null | undefined;
803
- updatedAt?: Date | null | undefined;
804
- expiredAt?: Date | null | undefined;
805
- startedAt?: Date | null | undefined;
806
- deletedAt?: Date | null | undefined;
807
- activationLimit?: number | null | undefined;
808
- activationPerUserLimit?: number | null | undefined;
809
- }>;
810
- update: (params: GetEndpointRequest<"promoCodes", "update">) => Promise<{
811
- value: string;
812
- type: "USER" | "AD" | "SYSTEM";
813
- status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
814
- id: number;
815
- discountValue: string;
816
- activated: number;
817
- createdAt?: Date | null | undefined;
818
- updatedAt?: Date | null | undefined;
819
- expiredAt?: Date | null | undefined;
820
- startedAt?: Date | null | undefined;
821
- deletedAt?: Date | null | undefined;
822
- activationLimit?: number | null | undefined;
823
- activationPerUserLimit?: number | null | undefined;
824
- }>;
825
- };
826
- promoCodeActivations: {
827
- create: (data: GetEndpointRequest<"promoCodeActivations", "create">) => Promise<{
828
- id: number;
829
- promocodeId: number;
830
- discountValue: string;
831
- refferalId: number;
832
- activatedAt: Date;
833
- }>;
834
- list: () => Promise<{
835
- id: number;
836
- promocodeId: number;
837
- discountValue: string;
838
- refferalId: number;
839
- activatedAt: Date;
840
- }[]>;
841
- getById: (params: GetEndpointRequest<"promoCodeActivations", "getById">) => Promise<{
842
- id: number;
843
- promocodeId: number;
844
- discountValue: string;
845
- refferalId: number;
846
- activatedAt: Date;
847
- }>;
848
- update: (params: GetEndpointRequest<"promoCodeActivations", "update">) => Promise<{
849
- id: number;
850
- promocodeId: number;
851
- discountValue: string;
852
- refferalId: number;
853
- activatedAt: Date;
854
- }>;
855
- };
856
- refreshSessions: {
857
- create: (data: GetEndpointRequest<"refreshSessions", "create">) => Promise<{
858
- status: "ACTIVE" | "EXPIRED" | "BLOCKED" | "TERMINATED";
859
- id: number;
860
- userId: number;
861
- refreshToken: string;
862
- createdAt?: Date | null | undefined;
863
- updatedAt?: Date | null | undefined;
864
- expiredAt?: Date | null | undefined;
865
- }>;
866
- list: () => Promise<{
867
- status: "ACTIVE" | "EXPIRED" | "BLOCKED" | "TERMINATED";
868
- id: number;
869
- userId: number;
870
- refreshToken: string;
871
- createdAt?: Date | null | undefined;
872
- updatedAt?: Date | null | undefined;
873
- expiredAt?: Date | null | undefined;
874
- }[]>;
875
- getById: (params: GetEndpointRequest<"refreshSessions", "getById">) => Promise<{
876
- status: "ACTIVE" | "EXPIRED" | "BLOCKED" | "TERMINATED";
877
- id: number;
878
- userId: number;
879
- refreshToken: string;
880
- createdAt?: Date | null | undefined;
881
- updatedAt?: Date | null | undefined;
882
- expiredAt?: Date | null | undefined;
883
- }>;
884
- update: (params: GetEndpointRequest<"refreshSessions", "update">) => Promise<{
885
- status: "ACTIVE" | "EXPIRED" | "BLOCKED" | "TERMINATED";
886
- id: number;
887
- userId: number;
888
- refreshToken: string;
889
- createdAt?: Date | null | undefined;
890
- updatedAt?: Date | null | undefined;
891
- expiredAt?: Date | null | undefined;
892
- }>;
893
- revoke: (params: GetEndpointRequest<"refreshSessions", "revoke">) => Promise<{
894
- success: boolean;
895
- }>;
896
- };
897
- settings: {
898
- getAll: () => Promise<{
899
- desslyDiscount: string;
900
- serviceEnabled: boolean;
901
- worksEnabled: boolean;
902
- paymentsEnabled: boolean;
903
- }>;
904
- getOne: (params: GetEndpointRequest<"settings", "getOne">) => Promise<{
905
- value: string | boolean;
906
- key: string;
907
- }>;
908
- updateAll: (data: GetEndpointRequest<"settings", "updateAll">) => Promise<{
909
- desslyDiscount: string;
910
- serviceEnabled: boolean;
911
- worksEnabled: boolean;
912
- paymentsEnabled: boolean;
913
- }>;
914
- updateOne: (params: GetEndpointRequest<"settings", "updateOne">) => Promise<{
915
- value: string | boolean;
916
- key: string;
917
- }>;
918
- };
919
- stats: {
920
- list: (params?: GetEndpointRequest<"stats", "list">) => Promise<{
921
- serviceCommission: number;
922
- ordersCount: number;
923
- usersCount: number;
924
- totalAmount: number;
925
- acquiringCommission: number;
926
- totalAmountWithCommission: number;
927
- periodStart?: string | undefined;
928
- periodEnd?: string | undefined;
929
- }>;
930
- };
931
- }
932
- export declare function createApiClient(config: ApiClientConfig): ApiClient;
933
- export {};
934
- //# sourceMappingURL=client.d.ts.map