@vandenberghinc/volt 1.2.4 → 1.2.6

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 (489) hide show
  1. package/frontend/assets/admin/admin.png +0 -0
  2. package/frontend/assets/admin/password.webp +0 -0
  3. package/frontend/assets/icons/arrow.v1.webp +0 -0
  4. package/frontend/assets/icons/copy.webp +0 -0
  5. package/frontend/assets/payments/arrow.long.webp +0 -0
  6. package/frontend/assets/payments/arrow.long2.webp +0 -0
  7. package/frontend/assets/payments/cancelled.webp +0 -0
  8. package/frontend/assets/payments/check.sign.webp +0 -0
  9. package/frontend/assets/payments/check.webp +0 -0
  10. package/frontend/assets/payments/close.webp +0 -0
  11. package/frontend/assets/payments/error.webp +0 -0
  12. package/frontend/assets/payments/exclamation.webp +0 -0
  13. package/frontend/assets/payments/minus.webp +0 -0
  14. package/frontend/assets/payments/party.webp +0 -0
  15. package/frontend/assets/payments/plus.webp +0 -0
  16. package/frontend/assets/payments/shopping_cart.webp +0 -0
  17. package/frontend/assets/payments/trash.webp +0 -0
  18. package/package.json +6 -2
  19. package/.libris/config.json +0 -82
  20. package/backend/dist/cjs/backend/src/blacklist.d.ts +0 -12
  21. package/backend/dist/cjs/backend/src/blacklist.js +0 -78
  22. package/backend/dist/cjs/backend/src/cli.d.ts +0 -2
  23. package/backend/dist/cjs/backend/src/cli.js +0 -198
  24. package/backend/dist/cjs/backend/src/database/collection.d.ts +0 -1765
  25. package/backend/dist/cjs/backend/src/database/collection.js +0 -3301
  26. package/backend/dist/cjs/backend/src/database/database.d.ts +0 -92
  27. package/backend/dist/cjs/backend/src/database/database.js +0 -170
  28. package/backend/dist/cjs/backend/src/database/document.d.ts +0 -1
  29. package/backend/dist/cjs/backend/src/database/document.js +0 -15
  30. package/backend/dist/cjs/backend/src/database/filters/filters.d.ts +0 -6
  31. package/backend/dist/cjs/backend/src/database/filters/filters.js +0 -15
  32. package/backend/dist/cjs/backend/src/database/filters/strict_filter.d.ts +0 -223
  33. package/backend/dist/cjs/backend/src/database/filters/strict_filter.js +0 -15
  34. package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.d.ts +0 -1
  35. package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.js +0 -443
  36. package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.d.ts +0 -1
  37. package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.js +0 -15
  38. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.d.ts +0 -50
  39. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.js +0 -15
  40. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.d.ts +0 -76
  41. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.js +0 -15
  42. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.d.ts +0 -75
  43. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.js +0 -15
  44. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.d.ts +0 -219
  45. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.js +0 -15
  46. package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.d.ts +0 -165
  47. package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.js +0 -15
  48. package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.d.ts +0 -5
  49. package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.js +0 -355
  50. package/backend/dist/cjs/backend/src/database/flatten.d.ts +0 -78
  51. package/backend/dist/cjs/backend/src/database/flatten.js +0 -53
  52. package/backend/dist/cjs/backend/src/database/flatten_test.d.ts +0 -1
  53. package/backend/dist/cjs/backend/src/database/flatten_test.js +0 -175
  54. package/backend/dist/cjs/backend/src/database/quota/quoata_v2.d.ts +0 -533
  55. package/backend/dist/cjs/backend/src/database/quota/quoata_v2.js +0 -1046
  56. package/backend/dist/cjs/backend/src/database/quota/quota.d.ts +0 -551
  57. package/backend/dist/cjs/backend/src/database/quota/quota.js +0 -1108
  58. package/backend/dist/cjs/backend/src/database/quota/quota_v1.d.ts +0 -534
  59. package/backend/dist/cjs/backend/src/database/quota/quota_v1.js +0 -1087
  60. package/backend/dist/cjs/backend/src/database/quota/safe_int.d.ts +0 -412
  61. package/backend/dist/cjs/backend/src/database/quota/safe_int.js +0 -745
  62. package/backend/dist/cjs/backend/src/endpoint.d.ts +0 -346
  63. package/backend/dist/cjs/backend/src/endpoint.js +0 -468
  64. package/backend/dist/cjs/backend/src/errors/index.d.ts +0 -7
  65. package/backend/dist/cjs/backend/src/errors/index.js +0 -25
  66. package/backend/dist/cjs/backend/src/errors/internal_external.d.ts +0 -52
  67. package/backend/dist/cjs/backend/src/errors/internal_external.js +0 -95
  68. package/backend/dist/cjs/backend/src/errors/invalid_usage_error.d.ts +0 -41
  69. package/backend/dist/cjs/backend/src/errors/invalid_usage_error.js +0 -47
  70. package/backend/dist/cjs/backend/src/errors/system_error.d.ts +0 -261
  71. package/backend/dist/cjs/backend/src/errors/system_error.js +0 -436
  72. package/backend/dist/cjs/backend/src/events.d.ts +0 -97
  73. package/backend/dist/cjs/backend/src/events.js +0 -15
  74. package/backend/dist/cjs/backend/src/frontend.d.ts +0 -11
  75. package/backend/dist/cjs/backend/src/frontend.js +0 -37
  76. package/backend/dist/cjs/backend/src/image_endpoint.d.ts +0 -44
  77. package/backend/dist/cjs/backend/src/image_endpoint.js +0 -185
  78. package/backend/dist/cjs/backend/src/index.d.ts +0 -23
  79. package/backend/dist/cjs/backend/src/index.js +0 -70
  80. package/backend/dist/cjs/backend/src/logger.d.ts +0 -5
  81. package/backend/dist/cjs/backend/src/logger.js +0 -15
  82. package/backend/dist/cjs/backend/src/meta.d.ts +0 -112
  83. package/backend/dist/cjs/backend/src/meta.js +0 -181
  84. package/backend/dist/cjs/backend/src/payments/paddle.d.ts +0 -329
  85. package/backend/dist/cjs/backend/src/payments/paddle.js +0 -1996
  86. package/backend/dist/cjs/backend/src/payments/stripe/checkout.d.ts +0 -113
  87. package/backend/dist/cjs/backend/src/payments/stripe/checkout.js +0 -295
  88. package/backend/dist/cjs/backend/src/payments/stripe/customers.d.ts +0 -17
  89. package/backend/dist/cjs/backend/src/payments/stripe/customers.js +0 -164
  90. package/backend/dist/cjs/backend/src/payments/stripe/error.d.ts +0 -74
  91. package/backend/dist/cjs/backend/src/payments/stripe/error.js +0 -64
  92. package/backend/dist/cjs/backend/src/payments/stripe/events.d.ts +0 -155
  93. package/backend/dist/cjs/backend/src/payments/stripe/events.js +0 -15
  94. package/backend/dist/cjs/backend/src/payments/stripe/meters.d.ts +0 -105
  95. package/backend/dist/cjs/backend/src/payments/stripe/meters.js +0 -230
  96. package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.d.ts +0 -58
  97. package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.js +0 -109
  98. package/backend/dist/cjs/backend/src/payments/stripe/products.d.ts +0 -519
  99. package/backend/dist/cjs/backend/src/payments/stripe/products.js +0 -650
  100. package/backend/dist/cjs/backend/src/payments/stripe/stripe.d.ts +0 -215
  101. package/backend/dist/cjs/backend/src/payments/stripe/stripe.js +0 -468
  102. package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.d.ts +0 -172
  103. package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.js +0 -557
  104. package/backend/dist/cjs/backend/src/payments/stripe/utils.d.ts +0 -63
  105. package/backend/dist/cjs/backend/src/payments/stripe/utils.js +0 -118
  106. package/backend/dist/cjs/backend/src/payments/stripe/webhooks.d.ts +0 -105
  107. package/backend/dist/cjs/backend/src/payments/stripe/webhooks.js +0 -627
  108. package/backend/dist/cjs/backend/src/plugins/browser.d.ts +0 -1
  109. package/backend/dist/cjs/backend/src/plugins/browser.js +0 -15
  110. package/backend/dist/cjs/backend/src/plugins/communication.d.ts +0 -70
  111. package/backend/dist/cjs/backend/src/plugins/communication.js +0 -196
  112. package/backend/dist/cjs/backend/src/plugins/mail/mail.d.ts +0 -255
  113. package/backend/dist/cjs/backend/src/plugins/mail/mail.js +0 -381
  114. package/backend/dist/cjs/backend/src/plugins/mail/ui.d.ts +0 -297
  115. package/backend/dist/cjs/backend/src/plugins/mail/ui.js +0 -1370
  116. package/backend/dist/cjs/backend/src/plugins/pdf.d.ts +0 -1
  117. package/backend/dist/cjs/backend/src/plugins/pdf.js +0 -1456
  118. package/backend/dist/cjs/backend/src/plugins/thread_monitor.d.ts +0 -18
  119. package/backend/dist/cjs/backend/src/plugins/thread_monitor.js +0 -116
  120. package/backend/dist/cjs/backend/src/rate_limit.d.ts +0 -148
  121. package/backend/dist/cjs/backend/src/rate_limit.js +0 -543
  122. package/backend/dist/cjs/backend/src/route.d.ts +0 -39
  123. package/backend/dist/cjs/backend/src/route.js +0 -172
  124. package/backend/dist/cjs/backend/src/server.d.ts +0 -502
  125. package/backend/dist/cjs/backend/src/server.js +0 -1713
  126. package/backend/dist/cjs/backend/src/server.old.d.ts +0 -594
  127. package/backend/dist/cjs/backend/src/server.old.js +0 -2058
  128. package/backend/dist/cjs/backend/src/splash_screen.d.ts +0 -93
  129. package/backend/dist/cjs/backend/src/splash_screen.js +0 -119
  130. package/backend/dist/cjs/backend/src/status.d.ts +0 -89
  131. package/backend/dist/cjs/backend/src/status.js +0 -211
  132. package/backend/dist/cjs/backend/src/stream.d.ts +0 -494
  133. package/backend/dist/cjs/backend/src/stream.js +0 -1370
  134. package/backend/dist/cjs/backend/src/users.d.ts +0 -926
  135. package/backend/dist/cjs/backend/src/users.js +0 -2223
  136. package/backend/dist/cjs/backend/src/utils.d.ts +0 -22
  137. package/backend/dist/cjs/backend/src/utils.js +0 -626
  138. package/backend/dist/cjs/backend/src/view.d.ts +0 -115
  139. package/backend/dist/cjs/backend/src/view.js +0 -519
  140. package/backend/dist/cjs/backend/src/vinc.d.ts +0 -6
  141. package/backend/dist/cjs/backend/src/vinc.js +0 -40
  142. package/backend/dist/cjs/backend/src/volt.d.ts +0 -24
  143. package/backend/dist/cjs/backend/src/volt.js +0 -72
  144. package/backend/dist/cjs/frontend/src/modules/request.d.ts +0 -70
  145. package/backend/dist/cjs/frontend/src/modules/request.js +0 -99
  146. package/backend/dist/cjs/package.json +0 -1
  147. package/backend/dist/esm/backend/src/blacklist.d.ts +0 -12
  148. package/backend/dist/esm/backend/src/blacklist.js +0 -52
  149. package/backend/dist/esm/backend/src/cli.d.ts +0 -2
  150. package/backend/dist/esm/backend/src/cli.js +0 -211
  151. package/backend/dist/esm/backend/src/database/collection.d.ts +0 -1765
  152. package/backend/dist/esm/backend/src/database/collection.js +0 -3779
  153. package/backend/dist/esm/backend/src/database/database.d.ts +0 -92
  154. package/backend/dist/esm/backend/src/database/database.js +0 -214
  155. package/backend/dist/esm/backend/src/database/document.d.ts +0 -1
  156. package/backend/dist/esm/backend/src/database/document.js +0 -558
  157. package/backend/dist/esm/backend/src/database/filters/filters.d.ts +0 -6
  158. package/backend/dist/esm/backend/src/database/filters/filters.js +0 -1
  159. package/backend/dist/esm/backend/src/database/filters/strict_filter.d.ts +0 -223
  160. package/backend/dist/esm/backend/src/database/filters/strict_filter.js +0 -3
  161. package/backend/dist/esm/backend/src/database/filters/strict_filter_test.d.ts +0 -1
  162. package/backend/dist/esm/backend/src/database/filters/strict_filter_test.js +0 -505
  163. package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.d.ts +0 -1
  164. package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.js +0 -712
  165. package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.d.ts +0 -50
  166. package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.js +0 -5
  167. package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.d.ts +0 -76
  168. package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.js +0 -44
  169. package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.d.ts +0 -75
  170. package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.js +0 -5
  171. package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.d.ts +0 -219
  172. package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.js +0 -1
  173. package/backend/dist/esm/backend/src/database/filters/strict_update_filter.d.ts +0 -165
  174. package/backend/dist/esm/backend/src/database/filters/strict_update_filter.js +0 -5
  175. package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.d.ts +0 -5
  176. package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.js +0 -415
  177. package/backend/dist/esm/backend/src/database/flatten.d.ts +0 -78
  178. package/backend/dist/esm/backend/src/database/flatten.js +0 -22
  179. package/backend/dist/esm/backend/src/database/flatten_test.d.ts +0 -1
  180. package/backend/dist/esm/backend/src/database/flatten_test.js +0 -174
  181. package/backend/dist/esm/backend/src/database/quota/quoata_v2.d.ts +0 -533
  182. package/backend/dist/esm/backend/src/database/quota/quoata_v2.js +0 -1155
  183. package/backend/dist/esm/backend/src/database/quota/quota.d.ts +0 -551
  184. package/backend/dist/esm/backend/src/database/quota/quota.js +0 -1219
  185. package/backend/dist/esm/backend/src/database/quota/quota_v1.d.ts +0 -534
  186. package/backend/dist/esm/backend/src/database/quota/quota_v1.js +0 -1242
  187. package/backend/dist/esm/backend/src/database/quota/safe_int.d.ts +0 -412
  188. package/backend/dist/esm/backend/src/database/quota/safe_int.js +0 -810
  189. package/backend/dist/esm/backend/src/endpoint.d.ts +0 -346
  190. package/backend/dist/esm/backend/src/endpoint.js +0 -479
  191. package/backend/dist/esm/backend/src/errors/index.d.ts +0 -7
  192. package/backend/dist/esm/backend/src/errors/index.js +0 -7
  193. package/backend/dist/esm/backend/src/errors/internal_external.d.ts +0 -52
  194. package/backend/dist/esm/backend/src/errors/internal_external.js +0 -86
  195. package/backend/dist/esm/backend/src/errors/invalid_usage_error.d.ts +0 -41
  196. package/backend/dist/esm/backend/src/errors/invalid_usage_error.js +0 -33
  197. package/backend/dist/esm/backend/src/errors/system_error.d.ts +0 -261
  198. package/backend/dist/esm/backend/src/errors/system_error.js +0 -444
  199. package/backend/dist/esm/backend/src/events.d.ts +0 -97
  200. package/backend/dist/esm/backend/src/events.js +0 -5
  201. package/backend/dist/esm/backend/src/frontend.d.ts +0 -11
  202. package/backend/dist/esm/backend/src/frontend.js +0 -12
  203. package/backend/dist/esm/backend/src/image_endpoint.d.ts +0 -44
  204. package/backend/dist/esm/backend/src/image_endpoint.js +0 -196
  205. package/backend/dist/esm/backend/src/index.d.ts +0 -23
  206. package/backend/dist/esm/backend/src/index.js +0 -26
  207. package/backend/dist/esm/backend/src/logger.d.ts +0 -5
  208. package/backend/dist/esm/backend/src/logger.js +0 -8
  209. package/backend/dist/esm/backend/src/meta.d.ts +0 -112
  210. package/backend/dist/esm/backend/src/meta.js +0 -152
  211. package/backend/dist/esm/backend/src/payments/paddle.d.ts +0 -329
  212. package/backend/dist/esm/backend/src/payments/paddle.js +0 -2276
  213. package/backend/dist/esm/backend/src/payments/stripe/checkout.d.ts +0 -113
  214. package/backend/dist/esm/backend/src/payments/stripe/checkout.js +0 -356
  215. package/backend/dist/esm/backend/src/payments/stripe/customers.d.ts +0 -17
  216. package/backend/dist/esm/backend/src/payments/stripe/customers.js +0 -193
  217. package/backend/dist/esm/backend/src/payments/stripe/error.d.ts +0 -74
  218. package/backend/dist/esm/backend/src/payments/stripe/error.js +0 -51
  219. package/backend/dist/esm/backend/src/payments/stripe/events.d.ts +0 -155
  220. package/backend/dist/esm/backend/src/payments/stripe/events.js +0 -5
  221. package/backend/dist/esm/backend/src/payments/stripe/meters.d.ts +0 -105
  222. package/backend/dist/esm/backend/src/payments/stripe/meters.js +0 -318
  223. package/backend/dist/esm/backend/src/payments/stripe/payment_methods.d.ts +0 -58
  224. package/backend/dist/esm/backend/src/payments/stripe/payment_methods.js +0 -135
  225. package/backend/dist/esm/backend/src/payments/stripe/products.d.ts +0 -519
  226. package/backend/dist/esm/backend/src/payments/stripe/products.js +0 -896
  227. package/backend/dist/esm/backend/src/payments/stripe/stripe.d.ts +0 -215
  228. package/backend/dist/esm/backend/src/payments/stripe/stripe.js +0 -464
  229. package/backend/dist/esm/backend/src/payments/stripe/subscriptions.d.ts +0 -172
  230. package/backend/dist/esm/backend/src/payments/stripe/subscriptions.js +0 -754
  231. package/backend/dist/esm/backend/src/payments/stripe/utils.d.ts +0 -63
  232. package/backend/dist/esm/backend/src/payments/stripe/utils.js +0 -131
  233. package/backend/dist/esm/backend/src/payments/stripe/webhooks.d.ts +0 -105
  234. package/backend/dist/esm/backend/src/payments/stripe/webhooks.js +0 -752
  235. package/backend/dist/esm/backend/src/plugins/browser.d.ts +0 -1
  236. package/backend/dist/esm/backend/src/plugins/browser.js +0 -170
  237. package/backend/dist/esm/backend/src/plugins/communication.d.ts +0 -70
  238. package/backend/dist/esm/backend/src/plugins/communication.js +0 -169
  239. package/backend/dist/esm/backend/src/plugins/mail/mail.d.ts +0 -255
  240. package/backend/dist/esm/backend/src/plugins/mail/mail.js +0 -396
  241. package/backend/dist/esm/backend/src/plugins/mail/ui.d.ts +0 -297
  242. package/backend/dist/esm/backend/src/plugins/mail/ui.js +0 -1400
  243. package/backend/dist/esm/backend/src/plugins/pdf.d.ts +0 -1
  244. package/backend/dist/esm/backend/src/plugins/pdf.js +0 -1694
  245. package/backend/dist/esm/backend/src/plugins/thread_monitor.d.ts +0 -18
  246. package/backend/dist/esm/backend/src/plugins/thread_monitor.js +0 -120
  247. package/backend/dist/esm/backend/src/rate_limit.d.ts +0 -148
  248. package/backend/dist/esm/backend/src/rate_limit.js +0 -667
  249. package/backend/dist/esm/backend/src/route.d.ts +0 -39
  250. package/backend/dist/esm/backend/src/route.js +0 -222
  251. package/backend/dist/esm/backend/src/server.d.ts +0 -502
  252. package/backend/dist/esm/backend/src/server.js +0 -2034
  253. package/backend/dist/esm/backend/src/server.old.d.ts +0 -594
  254. package/backend/dist/esm/backend/src/server.old.js +0 -2630
  255. package/backend/dist/esm/backend/src/splash_screen.d.ts +0 -93
  256. package/backend/dist/esm/backend/src/splash_screen.js +0 -156
  257. package/backend/dist/esm/backend/src/status.d.ts +0 -89
  258. package/backend/dist/esm/backend/src/status.js +0 -213
  259. package/backend/dist/esm/backend/src/stream.d.ts +0 -494
  260. package/backend/dist/esm/backend/src/stream.js +0 -1611
  261. package/backend/dist/esm/backend/src/users.d.ts +0 -926
  262. package/backend/dist/esm/backend/src/users.js +0 -2423
  263. package/backend/dist/esm/backend/src/utils.d.ts +0 -22
  264. package/backend/dist/esm/backend/src/utils.js +0 -463
  265. package/backend/dist/esm/backend/src/view.d.ts +0 -115
  266. package/backend/dist/esm/backend/src/view.js +0 -584
  267. package/backend/dist/esm/backend/src/vinc.d.ts +0 -6
  268. package/backend/dist/esm/backend/src/vinc.js +0 -6
  269. package/backend/dist/esm/backend/src/volt.d.ts +0 -24
  270. package/backend/dist/esm/backend/src/volt.js +0 -27
  271. package/backend/dist/esm/frontend/src/modules/request.d.ts +0 -70
  272. package/backend/dist/esm/frontend/src/modules/request.js +0 -117
  273. package/backend/old/file_watcher.ts +0 -359
  274. package/backend/old/request.deprc.js +0 -626
  275. package/backend/old/response.deprc.js +0 -354
  276. package/frontend/dist/backend/src/database/collection.d.ts +0 -1765
  277. package/frontend/dist/backend/src/database/collection.js +0 -3779
  278. package/frontend/dist/backend/src/database/database.d.ts +0 -92
  279. package/frontend/dist/backend/src/database/database.js +0 -214
  280. package/frontend/dist/backend/src/database/filters/filters.d.ts +0 -6
  281. package/frontend/dist/backend/src/database/filters/filters.js +0 -1
  282. package/frontend/dist/backend/src/database/filters/strict_filter.d.ts +0 -223
  283. package/frontend/dist/backend/src/database/filters/strict_filter.js +0 -3
  284. package/frontend/dist/backend/src/database/filters/strict_update_filter.d.ts +0 -165
  285. package/frontend/dist/backend/src/database/filters/strict_update_filter.js +0 -5
  286. package/frontend/dist/backend/src/database/flatten.d.ts +0 -78
  287. package/frontend/dist/backend/src/database/flatten.js +0 -22
  288. package/frontend/dist/backend/src/endpoint.d.ts +0 -346
  289. package/frontend/dist/backend/src/endpoint.js +0 -479
  290. package/frontend/dist/backend/src/errors/index.d.ts +0 -7
  291. package/frontend/dist/backend/src/errors/index.js +0 -7
  292. package/frontend/dist/backend/src/errors/internal_external.d.ts +0 -52
  293. package/frontend/dist/backend/src/errors/internal_external.js +0 -86
  294. package/frontend/dist/backend/src/errors/invalid_usage_error.d.ts +0 -41
  295. package/frontend/dist/backend/src/errors/invalid_usage_error.js +0 -33
  296. package/frontend/dist/backend/src/errors/system_error.d.ts +0 -261
  297. package/frontend/dist/backend/src/errors/system_error.js +0 -444
  298. package/frontend/dist/backend/src/events.d.ts +0 -97
  299. package/frontend/dist/backend/src/events.js +0 -5
  300. package/frontend/dist/backend/src/frontend.d.ts +0 -11
  301. package/frontend/dist/backend/src/frontend.js +0 -12
  302. package/frontend/dist/backend/src/image_endpoint.d.ts +0 -44
  303. package/frontend/dist/backend/src/image_endpoint.js +0 -196
  304. package/frontend/dist/backend/src/meta.d.ts +0 -112
  305. package/frontend/dist/backend/src/meta.js +0 -152
  306. package/frontend/dist/backend/src/payments/paddle.d.ts +0 -329
  307. package/frontend/dist/backend/src/payments/paddle.js +0 -2276
  308. package/frontend/dist/backend/src/payments/stripe/checkout.d.ts +0 -113
  309. package/frontend/dist/backend/src/payments/stripe/checkout.js +0 -356
  310. package/frontend/dist/backend/src/payments/stripe/customers.d.ts +0 -17
  311. package/frontend/dist/backend/src/payments/stripe/customers.js +0 -193
  312. package/frontend/dist/backend/src/payments/stripe/error.d.ts +0 -74
  313. package/frontend/dist/backend/src/payments/stripe/error.js +0 -51
  314. package/frontend/dist/backend/src/payments/stripe/events.d.ts +0 -155
  315. package/frontend/dist/backend/src/payments/stripe/events.js +0 -5
  316. package/frontend/dist/backend/src/payments/stripe/meters.d.ts +0 -105
  317. package/frontend/dist/backend/src/payments/stripe/meters.js +0 -318
  318. package/frontend/dist/backend/src/payments/stripe/payment_methods.d.ts +0 -58
  319. package/frontend/dist/backend/src/payments/stripe/payment_methods.js +0 -135
  320. package/frontend/dist/backend/src/payments/stripe/products.d.ts +0 -519
  321. package/frontend/dist/backend/src/payments/stripe/products.js +0 -896
  322. package/frontend/dist/backend/src/payments/stripe/stripe.d.ts +0 -215
  323. package/frontend/dist/backend/src/payments/stripe/stripe.js +0 -464
  324. package/frontend/dist/backend/src/payments/stripe/subscriptions.d.ts +0 -172
  325. package/frontend/dist/backend/src/payments/stripe/subscriptions.js +0 -754
  326. package/frontend/dist/backend/src/payments/stripe/utils.d.ts +0 -63
  327. package/frontend/dist/backend/src/payments/stripe/utils.js +0 -131
  328. package/frontend/dist/backend/src/payments/stripe/webhooks.d.ts +0 -105
  329. package/frontend/dist/backend/src/payments/stripe/webhooks.js +0 -752
  330. package/frontend/dist/backend/src/plugins/mail/mail.d.ts +0 -255
  331. package/frontend/dist/backend/src/plugins/mail/mail.js +0 -396
  332. package/frontend/dist/backend/src/plugins/mail/ui.d.ts +0 -297
  333. package/frontend/dist/backend/src/plugins/mail/ui.js +0 -1400
  334. package/frontend/dist/backend/src/rate_limit.d.ts +0 -148
  335. package/frontend/dist/backend/src/rate_limit.js +0 -667
  336. package/frontend/dist/backend/src/route.d.ts +0 -39
  337. package/frontend/dist/backend/src/route.js +0 -222
  338. package/frontend/dist/backend/src/server.d.ts +0 -502
  339. package/frontend/dist/backend/src/server.js +0 -2034
  340. package/frontend/dist/backend/src/splash_screen.d.ts +0 -93
  341. package/frontend/dist/backend/src/splash_screen.js +0 -156
  342. package/frontend/dist/backend/src/status.d.ts +0 -89
  343. package/frontend/dist/backend/src/status.js +0 -213
  344. package/frontend/dist/backend/src/stream.d.ts +0 -494
  345. package/frontend/dist/backend/src/stream.js +0 -1611
  346. package/frontend/dist/backend/src/users.d.ts +0 -926
  347. package/frontend/dist/backend/src/users.js +0 -2423
  348. package/frontend/dist/backend/src/utils.d.ts +0 -22
  349. package/frontend/dist/backend/src/utils.js +0 -463
  350. package/frontend/dist/backend/src/view.d.ts +0 -115
  351. package/frontend/dist/backend/src/view.js +0 -584
  352. package/frontend/dist/frontend/src/elements/base.d.ts +0 -3743
  353. package/frontend/dist/frontend/src/elements/base.js +0 -12151
  354. package/frontend/dist/frontend/src/elements/module.d.ts +0 -95
  355. package/frontend/dist/frontend/src/elements/module.js +0 -216
  356. package/frontend/dist/frontend/src/elements/register_element.d.ts +0 -3
  357. package/frontend/dist/frontend/src/elements/register_element.js +0 -22
  358. package/frontend/dist/frontend/src/elements/resize_query_manager.d.ts +0 -0
  359. package/frontend/dist/frontend/src/elements/resize_query_manager.js +0 -150
  360. package/frontend/dist/frontend/src/elements/types.d.ts +0 -52
  361. package/frontend/dist/frontend/src/elements/types.js +0 -5
  362. package/frontend/dist/frontend/src/index.d.ts +0 -21
  363. package/frontend/dist/frontend/src/index.js +0 -29
  364. package/frontend/dist/frontend/src/modules/attachment.d.ts +0 -126
  365. package/frontend/dist/frontend/src/modules/attachment.js +0 -306
  366. package/frontend/dist/frontend/src/modules/auth.d.ts +0 -44
  367. package/frontend/dist/frontend/src/modules/auth.js +0 -80
  368. package/frontend/dist/frontend/src/modules/color.d.ts +0 -160
  369. package/frontend/dist/frontend/src/modules/color.js +0 -316
  370. package/frontend/dist/frontend/src/modules/compression.d.ts +0 -39
  371. package/frontend/dist/frontend/src/modules/compression.js +0 -102
  372. package/frontend/dist/frontend/src/modules/cookies.d.ts +0 -44
  373. package/frontend/dist/frontend/src/modules/cookies.js +0 -143
  374. package/frontend/dist/frontend/src/modules/events.d.ts +0 -31
  375. package/frontend/dist/frontend/src/modules/events.js +0 -79
  376. package/frontend/dist/frontend/src/modules/google.d.ts +0 -23
  377. package/frontend/dist/frontend/src/modules/google.js +0 -52
  378. package/frontend/dist/frontend/src/modules/meta.d.ts +0 -14
  379. package/frontend/dist/frontend/src/modules/meta.js +0 -48
  380. package/frontend/dist/frontend/src/modules/paddle.d.ts +0 -1207
  381. package/frontend/dist/frontend/src/modules/paddle.js +0 -2594
  382. package/frontend/dist/frontend/src/modules/request.d.ts +0 -70
  383. package/frontend/dist/frontend/src/modules/request.js +0 -117
  384. package/frontend/dist/frontend/src/modules/settings.d.ts +0 -3
  385. package/frontend/dist/frontend/src/modules/settings.js +0 -5
  386. package/frontend/dist/frontend/src/modules/statics.d.ts +0 -21
  387. package/frontend/dist/frontend/src/modules/statics.js +0 -43
  388. package/frontend/dist/frontend/src/modules/stripe/cart.d.ts +0 -112
  389. package/frontend/dist/frontend/src/modules/stripe/cart.js +0 -321
  390. package/frontend/dist/frontend/src/modules/stripe/checkout.d.ts +0 -7
  391. package/frontend/dist/frontend/src/modules/stripe/checkout.js +0 -37
  392. package/frontend/dist/frontend/src/modules/stripe/index.m.d.ts +0 -6
  393. package/frontend/dist/frontend/src/modules/stripe/index.m.js +0 -6
  394. package/frontend/dist/frontend/src/modules/stripe/payments.d.ts +0 -58
  395. package/frontend/dist/frontend/src/modules/stripe/payments.js +0 -92
  396. package/frontend/dist/frontend/src/modules/support.d.ts +0 -30
  397. package/frontend/dist/frontend/src/modules/support.js +0 -53
  398. package/frontend/dist/frontend/src/modules/theme.d.ts +0 -133
  399. package/frontend/dist/frontend/src/modules/theme.js +0 -406
  400. package/frontend/dist/frontend/src/modules/themes.d.ts +0 -12
  401. package/frontend/dist/frontend/src/modules/themes.js +0 -22
  402. package/frontend/dist/frontend/src/modules/user.d.ts +0 -164
  403. package/frontend/dist/frontend/src/modules/user.js +0 -270
  404. package/frontend/dist/frontend/src/modules/utils.d.ts +0 -176
  405. package/frontend/dist/frontend/src/modules/utils.js +0 -569
  406. package/frontend/dist/frontend/src/types/gradient.d.ts +0 -29
  407. package/frontend/dist/frontend/src/types/gradient.js +0 -79
  408. package/frontend/dist/frontend/src/ui/border_button.d.ts +0 -94
  409. package/frontend/dist/frontend/src/ui/border_button.js +0 -228
  410. package/frontend/dist/frontend/src/ui/button.d.ts +0 -241
  411. package/frontend/dist/frontend/src/ui/button.js +0 -682
  412. package/frontend/dist/frontend/src/ui/canvas.d.ts +0 -138
  413. package/frontend/dist/frontend/src/ui/canvas.js +0 -444
  414. package/frontend/dist/frontend/src/ui/checkbox.d.ts +0 -74
  415. package/frontend/dist/frontend/src/ui/checkbox.js +0 -321
  416. package/frontend/dist/frontend/src/ui/code.d.ts +0 -235
  417. package/frontend/dist/frontend/src/ui/code.js +0 -1007
  418. package/frontend/dist/frontend/src/ui/context_menu.d.ts +0 -36
  419. package/frontend/dist/frontend/src/ui/context_menu.js +0 -205
  420. package/frontend/dist/frontend/src/ui/css.d.ts +0 -16
  421. package/frontend/dist/frontend/src/ui/css.js +0 -48
  422. package/frontend/dist/frontend/src/ui/divider.d.ts +0 -15
  423. package/frontend/dist/frontend/src/ui/divider.js +0 -78
  424. package/frontend/dist/frontend/src/ui/dropdown.d.ts +0 -176
  425. package/frontend/dist/frontend/src/ui/dropdown.js +0 -481
  426. package/frontend/dist/frontend/src/ui/for_each.d.ts +0 -37
  427. package/frontend/dist/frontend/src/ui/for_each.js +0 -92
  428. package/frontend/dist/frontend/src/ui/form.d.ts +0 -34
  429. package/frontend/dist/frontend/src/ui/form.js +0 -233
  430. package/frontend/dist/frontend/src/ui/frame_modes.d.ts +0 -37
  431. package/frontend/dist/frontend/src/ui/frame_modes.js +0 -108
  432. package/frontend/dist/frontend/src/ui/google_map.d.ts +0 -24
  433. package/frontend/dist/frontend/src/ui/google_map.js +0 -106
  434. package/frontend/dist/frontend/src/ui/gradient.d.ts +0 -25
  435. package/frontend/dist/frontend/src/ui/gradient.js +0 -131
  436. package/frontend/dist/frontend/src/ui/image.d.ts +0 -111
  437. package/frontend/dist/frontend/src/ui/image.js +0 -576
  438. package/frontend/dist/frontend/src/ui/input.d.ts +0 -392
  439. package/frontend/dist/frontend/src/ui/input.js +0 -1201
  440. package/frontend/dist/frontend/src/ui/link.d.ts +0 -25
  441. package/frontend/dist/frontend/src/ui/link.js +0 -140
  442. package/frontend/dist/frontend/src/ui/list.d.ts +0 -37
  443. package/frontend/dist/frontend/src/ui/list.js +0 -170
  444. package/frontend/dist/frontend/src/ui/loader_button.d.ts +0 -80
  445. package/frontend/dist/frontend/src/ui/loader_button.js +0 -193
  446. package/frontend/dist/frontend/src/ui/loaders.d.ts +0 -57
  447. package/frontend/dist/frontend/src/ui/loaders.js +0 -157
  448. package/frontend/dist/frontend/src/ui/popup.d.ts +0 -94
  449. package/frontend/dist/frontend/src/ui/popup.js +0 -510
  450. package/frontend/dist/frontend/src/ui/pseudo.d.ts +0 -44
  451. package/frontend/dist/frontend/src/ui/pseudo.js +0 -154
  452. package/frontend/dist/frontend/src/ui/scroller.d.ts +0 -105
  453. package/frontend/dist/frontend/src/ui/scroller.js +0 -1253
  454. package/frontend/dist/frontend/src/ui/slider.d.ts +0 -45
  455. package/frontend/dist/frontend/src/ui/slider.js +0 -217
  456. package/frontend/dist/frontend/src/ui/spacer.d.ts +0 -15
  457. package/frontend/dist/frontend/src/ui/spacer.js +0 -78
  458. package/frontend/dist/frontend/src/ui/span.d.ts +0 -15
  459. package/frontend/dist/frontend/src/ui/span.js +0 -73
  460. package/frontend/dist/frontend/src/ui/stack.d.ts +0 -66
  461. package/frontend/dist/frontend/src/ui/stack.js +0 -335
  462. package/frontend/dist/frontend/src/ui/steps.d.ts +0 -131
  463. package/frontend/dist/frontend/src/ui/steps.js +0 -308
  464. package/frontend/dist/frontend/src/ui/style.d.ts +0 -17
  465. package/frontend/dist/frontend/src/ui/style.js +0 -73
  466. package/frontend/dist/frontend/src/ui/switch.d.ts +0 -69
  467. package/frontend/dist/frontend/src/ui/switch.js +0 -357
  468. package/frontend/dist/frontend/src/ui/table.d.ts +0 -100
  469. package/frontend/dist/frontend/src/ui/table.js +0 -405
  470. package/frontend/dist/frontend/src/ui/tabs.d.ts +0 -111
  471. package/frontend/dist/frontend/src/ui/tabs.js +0 -424
  472. package/frontend/dist/frontend/src/ui/text.d.ts +0 -15
  473. package/frontend/dist/frontend/src/ui/text.js +0 -83
  474. package/frontend/dist/frontend/src/ui/title.d.ts +0 -91
  475. package/frontend/dist/frontend/src/ui/title.js +0 -272
  476. package/frontend/dist/frontend/src/ui/ui.d.ts +0 -35
  477. package/frontend/dist/frontend/src/ui/ui.js +0 -38
  478. package/frontend/dist/frontend/src/ui/view.d.ts +0 -15
  479. package/frontend/dist/frontend/src/ui/view.js +0 -88
  480. package/frontend/dist/frontend/src/volt.d.ts +0 -20
  481. package/frontend/dist/frontend/src/volt.js +0 -27
  482. package/frontend/examples/theme/theme.ts +0 -58
  483. package/frontend/tools/bundle_d_ts.js +0 -71
  484. package/frontend/tools/convert_to_jsdoc_input.txt +0 -9452
  485. package/frontend/tools/convert_to_jsdoc_output.txt +0 -7626
  486. package/frontend/tools/convert_to_jsdoc_tmp.js +0 -345
  487. package/frontend/tools/scan_mixed_imports.js +0 -69
  488. /package/frontend/{dist/frontend/src/css → css}/adyen.css +0 -0
  489. /package/frontend/{dist/frontend/src/css → css}/volt.css +0 -0
@@ -1,594 +0,0 @@
1
- /**
2
- * @author Daan van den Bergh
3
- * @copyright © 2022 - 2025 Daan van den Bergh.
4
- */
5
- import * as vlib from "@vandenberghinc/vlib";
6
- import { Meta } from './meta.js';
7
- import * as MailUI from './plugins/mail/ui.js';
8
- import { Mail } from "./plugins/mail/mail.js";
9
- import { Status } from "./status.js";
10
- import { Endpoint } from "./endpoint.js";
11
- import { Database } from "./database/database.js";
12
- import { Users } from "./users.js";
13
- import { Paddle, Payment } from "./payments/paddle.js";
14
- import { RateLimits, RateLimitServer, RateLimitClient } from "./rate_limit.js";
15
- import { Route } from "./route.js";
16
- import { EventCallback, EventName, Events } from './events.js';
17
- import { Stripe } from "./payments/stripe/stripe.js";
18
- /** Nested types for the {@link Server} class. */
19
- export declare namespace Server {
20
- /**
21
- * Options for constructing a server.
22
- * @docs
23
- */
24
- interface Opts {
25
- /** Whether the server is in production mode or in development mode. */
26
- production?: boolean;
27
- /** The IP address where the server will run. */
28
- ip?: string;
29
- /** The port where the server will run. Leave `null` to run on port `80` for HTTP and `443` for HTTPS. */
30
- port?: number;
31
- /** The full domain url without `http://` or `https://`. */
32
- domain: string;
33
- /** Used to indicate if the current server is the primary node. */
34
- is_primary?: boolean;
35
- /** The path to a persistent directory where some files such as logs, status info etc will be saved. */
36
- source: string;
37
- /** The database settings, see {@link Database.Opts}. */
38
- database: string | Database.Opts;
39
- /** Array with paths to static directories or static directory objects, see {@link Server.StaticDirectory}. */
40
- statics?: Array<string | vlib.Path | Server.StaticDirectory>;
41
- /** The path to the favicon. */
42
- favicon?: string;
43
- /** Your company information, see {@link Server.CompanyInfo}. */
44
- company: Server.CompanyInfo;
45
- /** The default meta object. */
46
- meta?: Meta | Meta.Opts;
47
- /** The TLS settings for HTTPS, see {@link Server.TLSConfig}. */
48
- tls?: Server.TLSConfig;
49
- /** The mail options. */
50
- mail?: Mail.Opts;
51
- /**
52
- * The rate limit server and client settings. Rate limiting works with a centralizer websocket server and secondary clients.
53
- * By default rate limiting is enabled but can be disabled by explicitly setting `rate_limit` to `false`.
54
- */
55
- rate_limit?: false | {
56
- /** The primary server rate limit settings. */
57
- server?: RateLimitServer.Opts;
58
- /** The rate limit client settings. */
59
- client?: RateLimitClient.Opts;
60
- };
61
- /** An array with names of crypto keys. Keys will be generated and stored in the database when they do not exist, and accessible as `Server.keys.$name`. Items may be a string (name) or an object with `name` and `length`, see {@link Server.KeyOpts}. */
62
- keys?: (string | Server.KeyOpts)[];
63
- /** The arguments for the payment class, see {@link Server.PaymentOpts}. */
64
- payments?: Server.PaymentOpts;
65
- /** Override the default headers generated by volt. Leave `default_headers` undefined to let volt automatically generate default headers. */
66
- default_headers?: Record<string, any>;
67
- /** The Google Tag ID. */
68
- google_tag?: string;
69
- /** Additional options for managing the {@link Users} class. */
70
- users?: Users.Opts;
71
- /** Enable threading behaviour when in production mode. */
72
- threading?: false | true | {
73
- /** Wether to enable threading behaviour. */
74
- enabled: boolean;
75
- /** The number of processes when threading is enabled. By default, the number of CPU's will be used. */
76
- threads?: number;
77
- };
78
- /** Boolean indicating if the development server is being run offline. */
79
- offline?: boolean;
80
- /**
81
- * Additional endpoints to add to the sitemap. By default all endpoints where attribute `view` is defined are added.
82
- * @note Regex based endpoints are not added to the default sitemap so they should perhaps they should partially be included here.
83
- */
84
- additional_sitemap_endpoints?: string[];
85
- /**
86
- * Optional settings for the service daemons. Pass `false` to disable, see {@link vlib.Daemon.Opts}.
87
- * The {@link vlib.Daemon.Opts.name} field will be defined with a default value of `domain.replaceAll(".", "")`.
88
- * The {@link vlib.Daemon.Opts.logs}, {@link vlib.Daemon.Opts.errors} fields will be defined with a default value of `<source>/daemon/<name>`.
89
- */
90
- daemon?: false | vlib.Types.Optional<vlib.Daemon.Opts, "name">;
91
- /** The active log level. */
92
- log_level?: number;
93
- }
94
- /**
95
- * Key options for the {@link Server.Opts} interface.
96
- * @docs
97
- */
98
- interface KeyOpts {
99
- /** The name of the key. */
100
- name: string;
101
- /** The length of the key. */
102
- length: number;
103
- }
104
- /**
105
- * Company profile information used in invoices, emails, and branding.
106
- * @experimental
107
- * @docs
108
- */
109
- interface CompanyInfo {
110
- /** The name of your company. */
111
- name: string;
112
- /** The legal name of your company. */
113
- legal_name: string;
114
- /** The street name of your company's address. */
115
- street: string;
116
- /** The house number or house name of your company's address. */
117
- house_number: string;
118
- /** The postal/zip code of your company's address. */
119
- postal_code: string;
120
- /** The city of your company's address. */
121
- city: string;
122
- /** The province or state of your company's address. */
123
- province: string;
124
- /** The country name of your company's address. */
125
- country: string;
126
- /** The two-letter ISO country code of your company's location. */
127
- country_code: string;
128
- /** The tax ID of your company. */
129
- tax_id?: string;
130
- /** The type of company. */
131
- type?: string;
132
- /** The endpoint URL path of your company's icon (PNG). Must be an endpoint URL since access to the file path is also required for creating invoices. */
133
- icon?: string;
134
- /** The endpoint URL path of your company's stroke icon (PNG). In payment invoices the stroke icon precedes the default icon. Must be an endpoint URL since access to the file path is also required for creating invoices. */
135
- stroke_icon?: string;
136
- /** The file path of your company's icon (PNG), automatically retrieved from the {@link Server.CompanyInfo.icon} property when possible. */
137
- icon_path?: string;
138
- /** The file path of your company's stroke icon (PNG), automatically retrieved from the {@link Server.CompanyInfo.stroke_icon} property when possible. */
139
- stroke_icon_path?: string;
140
- }
141
- /**
142
- * TLS certificate configuration for enabling HTTPS.
143
- * @docs
144
- */
145
- interface TLSConfig {
146
- /** The path to the certificate. */
147
- cert: string;
148
- /** The path to the private key file. */
149
- key: string;
150
- /** The path to the CA bundle file. */
151
- ca?: string | null;
152
- /** The passphrase of the private key. */
153
- passphrase?: string;
154
- }
155
- /**
156
- * Description of a static directory or file that should be served.
157
- * @docs
158
- */
159
- interface StaticDirectory {
160
- /** The path to the static directory or file. */
161
- path: string;
162
- /** The base endpoint of the static directory, by default the path's name will be used.*/
163
- endpoint?: string;
164
- /** Enable caching for the static endpoints; this value will be used for parameter `Endpoint.cache`. */
165
- cache?: number | boolean;
166
- /** Define a specific cache policy per endpoint from this static directory as `{<endpoint>: <cache>}`; the cache value will be used for parameter `Endpoint.cache`. */
167
- endpoints_cache?: Record<string, boolean | number>;
168
- /** An array of paths to exclude. The array may contain regexes. */
169
- exclude?: Array<string | RegExp>;
170
- }
171
- /**
172
- * A definition of a registered endpoint, can be used to export params and response types to the frontend.
173
- * @prop params The inferred interface of the endpoint parameters, note that the runtime value of this property is always `undefined`.
174
- * @prop Params Alias for property {@link Server.RegisteredEndpoint.params}.
175
- * @docs
176
- */
177
- type RegisteredEndpoint<M extends Endpoint.Method, E extends string | RegExp, P extends Record<string, any>> = {
178
- /** The HTTP method for the endpoint (e.g. GET, POST). */
179
- method: M;
180
- /** A pascal cased alias for the endpoint, for type exports conforming with `Params`. */
181
- Method: M;
182
- /**
183
- * The route's endpoint endpoint, string or regex,
184
- * use `route.endpoint_str` for the string representation.
185
- */
186
- endpoint: E;
187
- /** A pascal cased alias for the method, for type exports conforming with `Params`. */
188
- Endpoint: E;
189
- /** The endpoint route. */
190
- route: Route;
191
- /**
192
- * The inferred params type, can be used to export the params payload type.
193
- * @warning This value is `undefined` at runtime, but contains the correct params payload type at compile time.
194
- */
195
- Params: P;
196
- };
197
- /**
198
- * The payment options.
199
- * @docs
200
- */
201
- type PaymentOpts = (Paddle.Opts & {
202
- /** The payment provider type. */
203
- type: "paddle";
204
- });
205
- }
206
- /**
207
- * The server class.
208
- * @note Automatically runs on HTTP/HTTPS depending on the constructor options.
209
- *
210
- * @nav Server
211
- * @docs
212
- */
213
- export declare class Server {
214
- /**
215
- * A temporary directory which holds the cached endpoint data.
216
- * For instance if we bundle JS then we save it to file and serve it from the file,
217
- * similar for transformed image endpoints.
218
- *
219
- * Note that upon each server start, we should clear this cache and remove all files inside this dir.
220
- */
221
- endpoint_cache_dir: vlib.Path;
222
- /** The binded ip address. */
223
- ip: string;
224
- /** The binded http port. */
225
- port: number;
226
- /** The binded https port. */
227
- https_port: number;
228
- /** The raw domain. */
229
- domain: string;
230
- /** The full domain name with http/https depending if tls is enabled. */
231
- full_domain: string;
232
- /** The persistent storage source directory. */
233
- source: vlib.Path;
234
- /** Is the primary thread. */
235
- is_primary: boolean;
236
- /** Is in production mode. */
237
- production: boolean;
238
- /** The company information. */
239
- company: Server.CompanyInfo;
240
- /** The default meta information. */
241
- meta: Meta;
242
- /** Is running in offline mode. */
243
- offline: boolean;
244
- /** The database instance. */
245
- db: Database;
246
- /** The rate limit instance. */
247
- rate_limit?: RateLimitServer | RateLimitClient;
248
- /** The added endpoints. */
249
- endpoints: Map<string, Endpoint>;
250
- /** The added error endpoints. */
251
- err_endpoints: Map<number, Endpoint>;
252
- /** A record of keys used for hashing. */
253
- keys: Record<string, string>;
254
- /** Alias for the `Status` module. */
255
- status: typeof Status;
256
- /** Alias for the `RateLimits` module. */
257
- rate_limits: typeof RateLimits;
258
- /** The file logger. */
259
- log: vlib.logging.FileLogger;
260
- /** The users instance. */
261
- users: Users;
262
- /** The payments instance. */
263
- payments?: Stripe;
264
- /** Daemon instance to manage a live daemon. */
265
- daemon?: vlib.Daemon;
266
- /** The mail instance. */
267
- mail?: Mail;
268
- csp: Record<string, string>;
269
- statics_aspect_ratios: Map<string | RegExp, any>;
270
- google_tag?: string;
271
- rate_limit_api_key: string | undefined;
272
- performance: vlib.Performance;
273
- /** The events map @internal */
274
- events: vlib.Events<Events>;
275
- private favicon?;
276
- private statics;
277
- private _user_keys_opts;
278
- private additional_sitemap_endpoints;
279
- private tls?;
280
- private default_headers;
281
- private http;
282
- private https;
283
- private threading;
284
- private _keys_db;
285
- private _sys_keys_db;
286
- private _website_status_db;
287
- /**
288
- * Construct a new server instance.
289
- * @docs
290
- */
291
- constructor({ ip, port, // leave undefined for blank detection.
292
- domain, is_primary, source, database, statics, favicon, company, meta, tls, mail, rate_limit, keys, payments, default_headers, google_tag, users, production, threading, offline, additional_sitemap_endpoints, log_level, daemon, }: Server.Opts);
293
- /** Get a content type (MIME) from a file extension. */
294
- /**
295
- * Get a content type (MIME) from a file extension. The file extension should include the leading dot, e.g. ".html".
296
- * @docs
297
- */
298
- get_content_type(extension: string): string;
299
- /**
300
- * Set the logging verbosity level.
301
- * @docs
302
- */
303
- set_log_level(level: number): void;
304
- /**
305
- * Generate a cryptographically secure random key as a hex string.
306
- * @docs
307
- */
308
- generate_crypto_key(length?: number): string;
309
- /**
310
- * Create an HMAC hash using the provided key and data.
311
- * @docs
312
- */
313
- hmac(key: string, data: string, algo?: string): string;
314
- /**
315
- * Create a hash (no key) of the given data using the specified algorithm.
316
- * @docs
317
- */
318
- hash(data: string | object, algo?: string): string;
319
- private _init_default_headers;
320
- private _set_header_defaults;
321
- private _create_default_endpoints;
322
- private _create_sitemap;
323
- private _create_robots_txt;
324
- private _initialize_statics;
325
- /** Initialize the system and user defined keys. */
326
- _initialize_keys(): Promise<void>;
327
- /**
328
- * Checks if an endpoint route already exists.
329
- * @param method HTTP method
330
- * @param endpoint String path or RegExp
331
- */
332
- private _check_duplicate_route;
333
- private _serve;
334
- /** The promise of database initialization and connecting. */
335
- private _db_init_promise;
336
- /** Is initialized. */
337
- private _initialized;
338
- /** Is initialized by a worker. */
339
- private _initialized_by_worker;
340
- /**
341
- * Initialize the server.
342
- * @returns A promise that resolves when the server has been initialized.
343
- * @docs
344
- */
345
- initialize({ worker, }?: {
346
- /**
347
- * By default the server is initialized as web server.
348
- *
349
- * However, when using worker threads, the web server parts are skipped.
350
- * Only essential operations such as database, users, payments etc. are initialized.
351
- * Therefore the server can still be used within a worker threads without
352
- * the overhead of creating http/https servers, endpoints, static files, etc.
353
- *
354
- * The user-defined initialize callbacks are still executed but the `worker` is passed as indication.
355
- */
356
- worker?: boolean;
357
- }): Promise<void>;
358
- /**
359
- * Find an endpoint by route or string.
360
- * @docs
361
- */
362
- find_endpoint(route: Route): Endpoint | undefined;
363
- find_endpoint(endpoint: string, method?: string): Endpoint | undefined;
364
- /**
365
- * Start the server.
366
- *
367
- * @example
368
- * {Start}
369
- * Start the server.
370
- * ```
371
- * const server = new volt.Server({ ... });
372
- * await server.start();
373
- * ```
374
- * @docs
375
- */
376
- start(): Promise<void>;
377
- /**
378
- * Stop the server.
379
- * @note After stopping the server we can no longer restart the server.
380
- *
381
- * @example
382
- * {Stop}
383
- * Stop the server.
384
- * ```
385
- * const server = new volt.Server({ ... });
386
- * await server.start();
387
- * ...
388
- * await server.stop();
389
- * ```
390
- *
391
- * @docs
392
- */
393
- stop(): Promise<void>;
394
- /**
395
- * Add an event callback.
396
- * See {@link Events} for more info.
397
- * @docs
398
- */
399
- on<N extends EventName>(name: N, callback: EventCallback<N>): this;
400
- /**
401
- * Remove an event callback.
402
- * See {@link Events} for more info.
403
- * @docs
404
- */
405
- off<N extends EventName>(name: N, callback: EventCallback<N>): this;
406
- /**
407
- * Add a single endpoint.
408
- * Only supports a single endpoint due to parameter inference.
409
- * @note An error is thrown when the endpoint route already exists.
410
- * @template Response User inputted response type that will be returned as response, optionaly typing used for consistency.
411
- * @template S system template for inferring the endpoint callback parameters.
412
- * @param endpoint The endpoint or endpoint options to add.
413
- * @returns A registered endpoint object that can for instance be used to infer the endpoint parameters.
414
- *
415
- * @docs
416
- */
417
- endpoint<const M extends Endpoint.Method = "GET", const E extends string | RegExp = string, const S extends vlib.Schema.Entries.Opts = {}>(endpoint: Endpoint<M, E, S> | ConstructorParameters<typeof Endpoint<M, E, S>>[0]): Server.RegisteredEndpoint<M, E, vlib.Schema.Entries.Infer<S>>;
418
- /**
419
- * Add an endpoint per error status code.
420
- * @param status_code
421
- * The status code of the error.
422
- *
423
- * The supported status codes are:
424
- * * `*` For all errors not specifically defined.
425
- * * `status >= 400`
426
- * @param endpoint The error endpoint or error endpoint options.
427
- *
428
- * @note
429
- * Best practice is to define a universal `/error` endpoint using `Endpoint.templates` to render the error details.
430
- * Then this endpoint can be cloned using `Endpoint.clone()` and defined with specific template values per status code.
431
- *
432
- * @docs
433
- */
434
- error_endpoint<const S extends vlib.Schema.Entries.Opts = {}>(status_code: "*" | number, endpoint: Endpoint<any, any, S> | Omit<Endpoint.Opts<any, any, S>, "method" | "endpoint">): this;
435
- /**
436
- * Add an url to the Content-Security-Policy. This function does not overwrite the existing key's value.
437
- * @warning This function no longer has any effect when `Server.start()` has been called.
438
- * @param key The Content-Security-Policy key, e.g. `script-src`.
439
- * @param value The value to add to the Content-Security-Policy key.
440
- * @example
441
- * ...
442
- * server.add_csp("script-src", "somewebsite.com");
443
- * server.add_csp("upgrade-insecure-requests");
444
- * @docs
445
- */
446
- add_csp(key: string, value?: null | string | string[]): void;
447
- /**
448
- * Remove an url from the Content-Security-Policy. This function does not overwrite the existing key's value.
449
- * @warning This function no longer has any effect when `Server.start()` has been called.
450
- * @param key The Content-Security-Policy key, e.g. `script-src`.
451
- * @param value The value to remove from the Content-Security-Policy key.
452
- * @example
453
- * ...
454
- * server.remove_csp("script-src", "somewebsite.com");
455
- * server.remove_csp("upgrade-insecure-requests");
456
- * @docs
457
- */
458
- remove_csp(key: string, value?: null | string): void;
459
- /**
460
- * Delete an key from the Content-Security-Policy.
461
- * @warning This function no longer has any effect when `Server.start()` has been called.
462
- * @param key The Content-Security-Policy key, e.g. `script-src`.
463
- * @example
464
- * ...
465
- * server.del_csp("script-src");
466
- * server.del_csp("upgrade-insecure-requests");
467
- * @docs
468
- */
469
- del_csp(key: string): void;
470
- /**
471
- * This function is meant to be used when the server is in production mode, it will make an API request to your server through the defined `Server.domain` parameter.
472
- * @note This function can be called without initializing the server.
473
- * @param type The wanted output type. Either an `object` or a `string` type for CLI purposes.
474
- * @docs
475
- */
476
- fetch_status(type?: "object" | "string"): Promise<string | Record<string, any>>;
477
- /**
478
- * Generate a key and csr for tls.
479
- * @docs
480
- */
481
- generate_ssl_key({ output_path, ec, }: {
482
- output_path: string;
483
- ec?: boolean;
484
- }): Promise<void>;
485
- /**
486
- * Generate a csr for tls.
487
- * @docs
488
- */
489
- generate_csr({ output_path, key_path, name, domain, organization_unit, country_code, province, city, }: {
490
- output_path: string;
491
- key_path: string;
492
- name: string;
493
- domain: string;
494
- organization_unit: string;
495
- country_code: string;
496
- province: string;
497
- city: string;
498
- }): Promise<void>;
499
- /** Called for each product in a successful one-time payment. Override to implement your logic. */
500
- on_payment({ product, payment }: {
501
- product: any;
502
- payment: any;
503
- }): Promise<void>;
504
- /** Called for each product in a successful subscription. Override to implement your logic. */
505
- on_subscription({ product, payment }: {
506
- product: any;
507
- payment: any;
508
- }): Promise<void>;
509
- /** Called when a cancellation succeeds. Override to implement your logic. */
510
- on_cancellation({ payment, line_items }: {
511
- payment: any;
512
- line_items: any[];
513
- }): Promise<void>;
514
- /** Called when a refund succeeds. The line items array are the items that were refunded. */
515
- on_refund({ payment, line_items }: {
516
- payment: any;
517
- line_items: any[];
518
- }): Promise<void>;
519
- /** Called when a refund fails. The line items array are the items where the refund failed. */
520
- on_failed_refund({ payment, line_items }: {
521
- payment: any;
522
- line_items: any[];
523
- }): Promise<void>;
524
- /** Called when a chargeback occurs. The line items array are the items that were charged back. */
525
- on_chargeback({ payment, line_items }: {
526
- payment: any;
527
- line_items: any[];
528
- }): Promise<void>;
529
- /** Called when a chargeback fails. The line items array are the items where the chargeback failed. */
530
- on_failed_chargeback({ payment, line_items }: {
531
- payment: any;
532
- line_items: any[];
533
- }): Promise<void>;
534
- /** Build the base email layout used by the various transactional email builders. */
535
- private _mail_template;
536
- /** Helper that renders a list of payment line items for use in transactional emails. */
537
- private _render_mail_payment_line_items;
538
- /** Assert mail is configured. */
539
- assert_mail(): asserts this is {
540
- mail: Mail;
541
- };
542
- /**
543
- * Build the 2FA verification email content.
544
- */
545
- on_2fa_mail({ code, username, email, date, ip, device }: {
546
- code: string;
547
- username: string;
548
- email: string;
549
- date: string;
550
- ip: string;
551
- device: string;
552
- }): any;
553
- /**
554
- * Build the successful payment email content.
555
- */
556
- on_payment_mail({ payment }: {
557
- payment: Payment;
558
- }): MailUI.MailElement;
559
- /**
560
- * Build the failed payment email content.
561
- */
562
- on_failed_payment_mail({ payment }: {
563
- payment: Payment;
564
- }): MailUI.MailElement;
565
- /** Build the successful cancellation email content. */
566
- on_cancellation_mail({ payment, line_items }: {
567
- payment: any;
568
- line_items: any[];
569
- }): any;
570
- /** Build the failed cancellation email content. */
571
- on_failed_cancellation_mail({ payment }: {
572
- payment: any;
573
- }): any;
574
- /** Build the successful refund email content. */
575
- on_refund_mail({ payment, line_items }: {
576
- payment: any;
577
- line_items: any[];
578
- }): any;
579
- /** Build the failed refund email content. */
580
- on_failed_refund_mail({ payment, line_items }: {
581
- payment: any;
582
- line_items: any[];
583
- }): any;
584
- /** Build the successful chargeback email content. */
585
- on_chargeback_mail({ payment, line_items }: {
586
- payment: any;
587
- line_items: any[];
588
- }): any;
589
- /** Build the failed chargeback email content. */
590
- on_failed_chargeback_mail({ payment, line_items }: {
591
- payment: any;
592
- line_items: any[];
593
- }): any;
594
- }