@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.
- package/frontend/assets/admin/admin.png +0 -0
- package/frontend/assets/admin/password.webp +0 -0
- package/frontend/assets/icons/arrow.v1.webp +0 -0
- package/frontend/assets/icons/copy.webp +0 -0
- package/frontend/assets/payments/arrow.long.webp +0 -0
- package/frontend/assets/payments/arrow.long2.webp +0 -0
- package/frontend/assets/payments/cancelled.webp +0 -0
- package/frontend/assets/payments/check.sign.webp +0 -0
- package/frontend/assets/payments/check.webp +0 -0
- package/frontend/assets/payments/close.webp +0 -0
- package/frontend/assets/payments/error.webp +0 -0
- package/frontend/assets/payments/exclamation.webp +0 -0
- package/frontend/assets/payments/minus.webp +0 -0
- package/frontend/assets/payments/party.webp +0 -0
- package/frontend/assets/payments/plus.webp +0 -0
- package/frontend/assets/payments/shopping_cart.webp +0 -0
- package/frontend/assets/payments/trash.webp +0 -0
- package/package.json +6 -2
- package/.libris/config.json +0 -82
- package/backend/dist/cjs/backend/src/blacklist.d.ts +0 -12
- package/backend/dist/cjs/backend/src/blacklist.js +0 -78
- package/backend/dist/cjs/backend/src/cli.d.ts +0 -2
- package/backend/dist/cjs/backend/src/cli.js +0 -198
- package/backend/dist/cjs/backend/src/database/collection.d.ts +0 -1765
- package/backend/dist/cjs/backend/src/database/collection.js +0 -3301
- package/backend/dist/cjs/backend/src/database/database.d.ts +0 -92
- package/backend/dist/cjs/backend/src/database/database.js +0 -170
- package/backend/dist/cjs/backend/src/database/document.d.ts +0 -1
- package/backend/dist/cjs/backend/src/database/document.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/filters.d.ts +0 -6
- package/backend/dist/cjs/backend/src/database/filters/filters.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.d.ts +0 -223
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.d.ts +0 -1
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.js +0 -443
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.d.ts +0 -1
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.d.ts +0 -50
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.d.ts +0 -76
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.d.ts +0 -75
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.d.ts +0 -219
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.d.ts +0 -165
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.d.ts +0 -5
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.js +0 -355
- package/backend/dist/cjs/backend/src/database/flatten.d.ts +0 -78
- package/backend/dist/cjs/backend/src/database/flatten.js +0 -53
- package/backend/dist/cjs/backend/src/database/flatten_test.d.ts +0 -1
- package/backend/dist/cjs/backend/src/database/flatten_test.js +0 -175
- package/backend/dist/cjs/backend/src/database/quota/quoata_v2.d.ts +0 -533
- package/backend/dist/cjs/backend/src/database/quota/quoata_v2.js +0 -1046
- package/backend/dist/cjs/backend/src/database/quota/quota.d.ts +0 -551
- package/backend/dist/cjs/backend/src/database/quota/quota.js +0 -1108
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.d.ts +0 -534
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.js +0 -1087
- package/backend/dist/cjs/backend/src/database/quota/safe_int.d.ts +0 -412
- package/backend/dist/cjs/backend/src/database/quota/safe_int.js +0 -745
- package/backend/dist/cjs/backend/src/endpoint.d.ts +0 -346
- package/backend/dist/cjs/backend/src/endpoint.js +0 -468
- package/backend/dist/cjs/backend/src/errors/index.d.ts +0 -7
- package/backend/dist/cjs/backend/src/errors/index.js +0 -25
- package/backend/dist/cjs/backend/src/errors/internal_external.d.ts +0 -52
- package/backend/dist/cjs/backend/src/errors/internal_external.js +0 -95
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.d.ts +0 -41
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.js +0 -47
- package/backend/dist/cjs/backend/src/errors/system_error.d.ts +0 -261
- package/backend/dist/cjs/backend/src/errors/system_error.js +0 -436
- package/backend/dist/cjs/backend/src/events.d.ts +0 -97
- package/backend/dist/cjs/backend/src/events.js +0 -15
- package/backend/dist/cjs/backend/src/frontend.d.ts +0 -11
- package/backend/dist/cjs/backend/src/frontend.js +0 -37
- package/backend/dist/cjs/backend/src/image_endpoint.d.ts +0 -44
- package/backend/dist/cjs/backend/src/image_endpoint.js +0 -185
- package/backend/dist/cjs/backend/src/index.d.ts +0 -23
- package/backend/dist/cjs/backend/src/index.js +0 -70
- package/backend/dist/cjs/backend/src/logger.d.ts +0 -5
- package/backend/dist/cjs/backend/src/logger.js +0 -15
- package/backend/dist/cjs/backend/src/meta.d.ts +0 -112
- package/backend/dist/cjs/backend/src/meta.js +0 -181
- package/backend/dist/cjs/backend/src/payments/paddle.d.ts +0 -329
- package/backend/dist/cjs/backend/src/payments/paddle.js +0 -1996
- package/backend/dist/cjs/backend/src/payments/stripe/checkout.d.ts +0 -113
- package/backend/dist/cjs/backend/src/payments/stripe/checkout.js +0 -295
- package/backend/dist/cjs/backend/src/payments/stripe/customers.d.ts +0 -17
- package/backend/dist/cjs/backend/src/payments/stripe/customers.js +0 -164
- package/backend/dist/cjs/backend/src/payments/stripe/error.d.ts +0 -74
- package/backend/dist/cjs/backend/src/payments/stripe/error.js +0 -64
- package/backend/dist/cjs/backend/src/payments/stripe/events.d.ts +0 -155
- package/backend/dist/cjs/backend/src/payments/stripe/events.js +0 -15
- package/backend/dist/cjs/backend/src/payments/stripe/meters.d.ts +0 -105
- package/backend/dist/cjs/backend/src/payments/stripe/meters.js +0 -230
- package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.d.ts +0 -58
- package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.js +0 -109
- package/backend/dist/cjs/backend/src/payments/stripe/products.d.ts +0 -519
- package/backend/dist/cjs/backend/src/payments/stripe/products.js +0 -650
- package/backend/dist/cjs/backend/src/payments/stripe/stripe.d.ts +0 -215
- package/backend/dist/cjs/backend/src/payments/stripe/stripe.js +0 -468
- package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.d.ts +0 -172
- package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.js +0 -557
- package/backend/dist/cjs/backend/src/payments/stripe/utils.d.ts +0 -63
- package/backend/dist/cjs/backend/src/payments/stripe/utils.js +0 -118
- package/backend/dist/cjs/backend/src/payments/stripe/webhooks.d.ts +0 -105
- package/backend/dist/cjs/backend/src/payments/stripe/webhooks.js +0 -627
- package/backend/dist/cjs/backend/src/plugins/browser.d.ts +0 -1
- package/backend/dist/cjs/backend/src/plugins/browser.js +0 -15
- package/backend/dist/cjs/backend/src/plugins/communication.d.ts +0 -70
- package/backend/dist/cjs/backend/src/plugins/communication.js +0 -196
- package/backend/dist/cjs/backend/src/plugins/mail/mail.d.ts +0 -255
- package/backend/dist/cjs/backend/src/plugins/mail/mail.js +0 -381
- package/backend/dist/cjs/backend/src/plugins/mail/ui.d.ts +0 -297
- package/backend/dist/cjs/backend/src/plugins/mail/ui.js +0 -1370
- package/backend/dist/cjs/backend/src/plugins/pdf.d.ts +0 -1
- package/backend/dist/cjs/backend/src/plugins/pdf.js +0 -1456
- package/backend/dist/cjs/backend/src/plugins/thread_monitor.d.ts +0 -18
- package/backend/dist/cjs/backend/src/plugins/thread_monitor.js +0 -116
- package/backend/dist/cjs/backend/src/rate_limit.d.ts +0 -148
- package/backend/dist/cjs/backend/src/rate_limit.js +0 -543
- package/backend/dist/cjs/backend/src/route.d.ts +0 -39
- package/backend/dist/cjs/backend/src/route.js +0 -172
- package/backend/dist/cjs/backend/src/server.d.ts +0 -502
- package/backend/dist/cjs/backend/src/server.js +0 -1713
- package/backend/dist/cjs/backend/src/server.old.d.ts +0 -594
- package/backend/dist/cjs/backend/src/server.old.js +0 -2058
- package/backend/dist/cjs/backend/src/splash_screen.d.ts +0 -93
- package/backend/dist/cjs/backend/src/splash_screen.js +0 -119
- package/backend/dist/cjs/backend/src/status.d.ts +0 -89
- package/backend/dist/cjs/backend/src/status.js +0 -211
- package/backend/dist/cjs/backend/src/stream.d.ts +0 -494
- package/backend/dist/cjs/backend/src/stream.js +0 -1370
- package/backend/dist/cjs/backend/src/users.d.ts +0 -926
- package/backend/dist/cjs/backend/src/users.js +0 -2223
- package/backend/dist/cjs/backend/src/utils.d.ts +0 -22
- package/backend/dist/cjs/backend/src/utils.js +0 -626
- package/backend/dist/cjs/backend/src/view.d.ts +0 -115
- package/backend/dist/cjs/backend/src/view.js +0 -519
- package/backend/dist/cjs/backend/src/vinc.d.ts +0 -6
- package/backend/dist/cjs/backend/src/vinc.js +0 -40
- package/backend/dist/cjs/backend/src/volt.d.ts +0 -24
- package/backend/dist/cjs/backend/src/volt.js +0 -72
- package/backend/dist/cjs/frontend/src/modules/request.d.ts +0 -70
- package/backend/dist/cjs/frontend/src/modules/request.js +0 -99
- package/backend/dist/cjs/package.json +0 -1
- package/backend/dist/esm/backend/src/blacklist.d.ts +0 -12
- package/backend/dist/esm/backend/src/blacklist.js +0 -52
- package/backend/dist/esm/backend/src/cli.d.ts +0 -2
- package/backend/dist/esm/backend/src/cli.js +0 -211
- package/backend/dist/esm/backend/src/database/collection.d.ts +0 -1765
- package/backend/dist/esm/backend/src/database/collection.js +0 -3779
- package/backend/dist/esm/backend/src/database/database.d.ts +0 -92
- package/backend/dist/esm/backend/src/database/database.js +0 -214
- package/backend/dist/esm/backend/src/database/document.d.ts +0 -1
- package/backend/dist/esm/backend/src/database/document.js +0 -558
- package/backend/dist/esm/backend/src/database/filters/filters.d.ts +0 -6
- package/backend/dist/esm/backend/src/database/filters/filters.js +0 -1
- package/backend/dist/esm/backend/src/database/filters/strict_filter.d.ts +0 -223
- package/backend/dist/esm/backend/src/database/filters/strict_filter.js +0 -3
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.d.ts +0 -1
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.js +0 -505
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.d.ts +0 -1
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.js +0 -712
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.d.ts +0 -50
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.js +0 -5
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.d.ts +0 -76
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.js +0 -44
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.d.ts +0 -75
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.js +0 -5
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.d.ts +0 -219
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.js +0 -1
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.d.ts +0 -165
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.js +0 -5
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.d.ts +0 -5
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.js +0 -415
- package/backend/dist/esm/backend/src/database/flatten.d.ts +0 -78
- package/backend/dist/esm/backend/src/database/flatten.js +0 -22
- package/backend/dist/esm/backend/src/database/flatten_test.d.ts +0 -1
- package/backend/dist/esm/backend/src/database/flatten_test.js +0 -174
- package/backend/dist/esm/backend/src/database/quota/quoata_v2.d.ts +0 -533
- package/backend/dist/esm/backend/src/database/quota/quoata_v2.js +0 -1155
- package/backend/dist/esm/backend/src/database/quota/quota.d.ts +0 -551
- package/backend/dist/esm/backend/src/database/quota/quota.js +0 -1219
- package/backend/dist/esm/backend/src/database/quota/quota_v1.d.ts +0 -534
- package/backend/dist/esm/backend/src/database/quota/quota_v1.js +0 -1242
- package/backend/dist/esm/backend/src/database/quota/safe_int.d.ts +0 -412
- package/backend/dist/esm/backend/src/database/quota/safe_int.js +0 -810
- package/backend/dist/esm/backend/src/endpoint.d.ts +0 -346
- package/backend/dist/esm/backend/src/endpoint.js +0 -479
- package/backend/dist/esm/backend/src/errors/index.d.ts +0 -7
- package/backend/dist/esm/backend/src/errors/index.js +0 -7
- package/backend/dist/esm/backend/src/errors/internal_external.d.ts +0 -52
- package/backend/dist/esm/backend/src/errors/internal_external.js +0 -86
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.d.ts +0 -41
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.js +0 -33
- package/backend/dist/esm/backend/src/errors/system_error.d.ts +0 -261
- package/backend/dist/esm/backend/src/errors/system_error.js +0 -444
- package/backend/dist/esm/backend/src/events.d.ts +0 -97
- package/backend/dist/esm/backend/src/events.js +0 -5
- package/backend/dist/esm/backend/src/frontend.d.ts +0 -11
- package/backend/dist/esm/backend/src/frontend.js +0 -12
- package/backend/dist/esm/backend/src/image_endpoint.d.ts +0 -44
- package/backend/dist/esm/backend/src/image_endpoint.js +0 -196
- package/backend/dist/esm/backend/src/index.d.ts +0 -23
- package/backend/dist/esm/backend/src/index.js +0 -26
- package/backend/dist/esm/backend/src/logger.d.ts +0 -5
- package/backend/dist/esm/backend/src/logger.js +0 -8
- package/backend/dist/esm/backend/src/meta.d.ts +0 -112
- package/backend/dist/esm/backend/src/meta.js +0 -152
- package/backend/dist/esm/backend/src/payments/paddle.d.ts +0 -329
- package/backend/dist/esm/backend/src/payments/paddle.js +0 -2276
- package/backend/dist/esm/backend/src/payments/stripe/checkout.d.ts +0 -113
- package/backend/dist/esm/backend/src/payments/stripe/checkout.js +0 -356
- package/backend/dist/esm/backend/src/payments/stripe/customers.d.ts +0 -17
- package/backend/dist/esm/backend/src/payments/stripe/customers.js +0 -193
- package/backend/dist/esm/backend/src/payments/stripe/error.d.ts +0 -74
- package/backend/dist/esm/backend/src/payments/stripe/error.js +0 -51
- package/backend/dist/esm/backend/src/payments/stripe/events.d.ts +0 -155
- package/backend/dist/esm/backend/src/payments/stripe/events.js +0 -5
- package/backend/dist/esm/backend/src/payments/stripe/meters.d.ts +0 -105
- package/backend/dist/esm/backend/src/payments/stripe/meters.js +0 -318
- package/backend/dist/esm/backend/src/payments/stripe/payment_methods.d.ts +0 -58
- package/backend/dist/esm/backend/src/payments/stripe/payment_methods.js +0 -135
- package/backend/dist/esm/backend/src/payments/stripe/products.d.ts +0 -519
- package/backend/dist/esm/backend/src/payments/stripe/products.js +0 -896
- package/backend/dist/esm/backend/src/payments/stripe/stripe.d.ts +0 -215
- package/backend/dist/esm/backend/src/payments/stripe/stripe.js +0 -464
- package/backend/dist/esm/backend/src/payments/stripe/subscriptions.d.ts +0 -172
- package/backend/dist/esm/backend/src/payments/stripe/subscriptions.js +0 -754
- package/backend/dist/esm/backend/src/payments/stripe/utils.d.ts +0 -63
- package/backend/dist/esm/backend/src/payments/stripe/utils.js +0 -131
- package/backend/dist/esm/backend/src/payments/stripe/webhooks.d.ts +0 -105
- package/backend/dist/esm/backend/src/payments/stripe/webhooks.js +0 -752
- package/backend/dist/esm/backend/src/plugins/browser.d.ts +0 -1
- package/backend/dist/esm/backend/src/plugins/browser.js +0 -170
- package/backend/dist/esm/backend/src/plugins/communication.d.ts +0 -70
- package/backend/dist/esm/backend/src/plugins/communication.js +0 -169
- package/backend/dist/esm/backend/src/plugins/mail/mail.d.ts +0 -255
- package/backend/dist/esm/backend/src/plugins/mail/mail.js +0 -396
- package/backend/dist/esm/backend/src/plugins/mail/ui.d.ts +0 -297
- package/backend/dist/esm/backend/src/plugins/mail/ui.js +0 -1400
- package/backend/dist/esm/backend/src/plugins/pdf.d.ts +0 -1
- package/backend/dist/esm/backend/src/plugins/pdf.js +0 -1694
- package/backend/dist/esm/backend/src/plugins/thread_monitor.d.ts +0 -18
- package/backend/dist/esm/backend/src/plugins/thread_monitor.js +0 -120
- package/backend/dist/esm/backend/src/rate_limit.d.ts +0 -148
- package/backend/dist/esm/backend/src/rate_limit.js +0 -667
- package/backend/dist/esm/backend/src/route.d.ts +0 -39
- package/backend/dist/esm/backend/src/route.js +0 -222
- package/backend/dist/esm/backend/src/server.d.ts +0 -502
- package/backend/dist/esm/backend/src/server.js +0 -2034
- package/backend/dist/esm/backend/src/server.old.d.ts +0 -594
- package/backend/dist/esm/backend/src/server.old.js +0 -2630
- package/backend/dist/esm/backend/src/splash_screen.d.ts +0 -93
- package/backend/dist/esm/backend/src/splash_screen.js +0 -156
- package/backend/dist/esm/backend/src/status.d.ts +0 -89
- package/backend/dist/esm/backend/src/status.js +0 -213
- package/backend/dist/esm/backend/src/stream.d.ts +0 -494
- package/backend/dist/esm/backend/src/stream.js +0 -1611
- package/backend/dist/esm/backend/src/users.d.ts +0 -926
- package/backend/dist/esm/backend/src/users.js +0 -2423
- package/backend/dist/esm/backend/src/utils.d.ts +0 -22
- package/backend/dist/esm/backend/src/utils.js +0 -463
- package/backend/dist/esm/backend/src/view.d.ts +0 -115
- package/backend/dist/esm/backend/src/view.js +0 -584
- package/backend/dist/esm/backend/src/vinc.d.ts +0 -6
- package/backend/dist/esm/backend/src/vinc.js +0 -6
- package/backend/dist/esm/backend/src/volt.d.ts +0 -24
- package/backend/dist/esm/backend/src/volt.js +0 -27
- package/backend/dist/esm/frontend/src/modules/request.d.ts +0 -70
- package/backend/dist/esm/frontend/src/modules/request.js +0 -117
- package/backend/old/file_watcher.ts +0 -359
- package/backend/old/request.deprc.js +0 -626
- package/backend/old/response.deprc.js +0 -354
- package/frontend/dist/backend/src/database/collection.d.ts +0 -1765
- package/frontend/dist/backend/src/database/collection.js +0 -3779
- package/frontend/dist/backend/src/database/database.d.ts +0 -92
- package/frontend/dist/backend/src/database/database.js +0 -214
- package/frontend/dist/backend/src/database/filters/filters.d.ts +0 -6
- package/frontend/dist/backend/src/database/filters/filters.js +0 -1
- package/frontend/dist/backend/src/database/filters/strict_filter.d.ts +0 -223
- package/frontend/dist/backend/src/database/filters/strict_filter.js +0 -3
- package/frontend/dist/backend/src/database/filters/strict_update_filter.d.ts +0 -165
- package/frontend/dist/backend/src/database/filters/strict_update_filter.js +0 -5
- package/frontend/dist/backend/src/database/flatten.d.ts +0 -78
- package/frontend/dist/backend/src/database/flatten.js +0 -22
- package/frontend/dist/backend/src/endpoint.d.ts +0 -346
- package/frontend/dist/backend/src/endpoint.js +0 -479
- package/frontend/dist/backend/src/errors/index.d.ts +0 -7
- package/frontend/dist/backend/src/errors/index.js +0 -7
- package/frontend/dist/backend/src/errors/internal_external.d.ts +0 -52
- package/frontend/dist/backend/src/errors/internal_external.js +0 -86
- package/frontend/dist/backend/src/errors/invalid_usage_error.d.ts +0 -41
- package/frontend/dist/backend/src/errors/invalid_usage_error.js +0 -33
- package/frontend/dist/backend/src/errors/system_error.d.ts +0 -261
- package/frontend/dist/backend/src/errors/system_error.js +0 -444
- package/frontend/dist/backend/src/events.d.ts +0 -97
- package/frontend/dist/backend/src/events.js +0 -5
- package/frontend/dist/backend/src/frontend.d.ts +0 -11
- package/frontend/dist/backend/src/frontend.js +0 -12
- package/frontend/dist/backend/src/image_endpoint.d.ts +0 -44
- package/frontend/dist/backend/src/image_endpoint.js +0 -196
- package/frontend/dist/backend/src/meta.d.ts +0 -112
- package/frontend/dist/backend/src/meta.js +0 -152
- package/frontend/dist/backend/src/payments/paddle.d.ts +0 -329
- package/frontend/dist/backend/src/payments/paddle.js +0 -2276
- package/frontend/dist/backend/src/payments/stripe/checkout.d.ts +0 -113
- package/frontend/dist/backend/src/payments/stripe/checkout.js +0 -356
- package/frontend/dist/backend/src/payments/stripe/customers.d.ts +0 -17
- package/frontend/dist/backend/src/payments/stripe/customers.js +0 -193
- package/frontend/dist/backend/src/payments/stripe/error.d.ts +0 -74
- package/frontend/dist/backend/src/payments/stripe/error.js +0 -51
- package/frontend/dist/backend/src/payments/stripe/events.d.ts +0 -155
- package/frontend/dist/backend/src/payments/stripe/events.js +0 -5
- package/frontend/dist/backend/src/payments/stripe/meters.d.ts +0 -105
- package/frontend/dist/backend/src/payments/stripe/meters.js +0 -318
- package/frontend/dist/backend/src/payments/stripe/payment_methods.d.ts +0 -58
- package/frontend/dist/backend/src/payments/stripe/payment_methods.js +0 -135
- package/frontend/dist/backend/src/payments/stripe/products.d.ts +0 -519
- package/frontend/dist/backend/src/payments/stripe/products.js +0 -896
- package/frontend/dist/backend/src/payments/stripe/stripe.d.ts +0 -215
- package/frontend/dist/backend/src/payments/stripe/stripe.js +0 -464
- package/frontend/dist/backend/src/payments/stripe/subscriptions.d.ts +0 -172
- package/frontend/dist/backend/src/payments/stripe/subscriptions.js +0 -754
- package/frontend/dist/backend/src/payments/stripe/utils.d.ts +0 -63
- package/frontend/dist/backend/src/payments/stripe/utils.js +0 -131
- package/frontend/dist/backend/src/payments/stripe/webhooks.d.ts +0 -105
- package/frontend/dist/backend/src/payments/stripe/webhooks.js +0 -752
- package/frontend/dist/backend/src/plugins/mail/mail.d.ts +0 -255
- package/frontend/dist/backend/src/plugins/mail/mail.js +0 -396
- package/frontend/dist/backend/src/plugins/mail/ui.d.ts +0 -297
- package/frontend/dist/backend/src/plugins/mail/ui.js +0 -1400
- package/frontend/dist/backend/src/rate_limit.d.ts +0 -148
- package/frontend/dist/backend/src/rate_limit.js +0 -667
- package/frontend/dist/backend/src/route.d.ts +0 -39
- package/frontend/dist/backend/src/route.js +0 -222
- package/frontend/dist/backend/src/server.d.ts +0 -502
- package/frontend/dist/backend/src/server.js +0 -2034
- package/frontend/dist/backend/src/splash_screen.d.ts +0 -93
- package/frontend/dist/backend/src/splash_screen.js +0 -156
- package/frontend/dist/backend/src/status.d.ts +0 -89
- package/frontend/dist/backend/src/status.js +0 -213
- package/frontend/dist/backend/src/stream.d.ts +0 -494
- package/frontend/dist/backend/src/stream.js +0 -1611
- package/frontend/dist/backend/src/users.d.ts +0 -926
- package/frontend/dist/backend/src/users.js +0 -2423
- package/frontend/dist/backend/src/utils.d.ts +0 -22
- package/frontend/dist/backend/src/utils.js +0 -463
- package/frontend/dist/backend/src/view.d.ts +0 -115
- package/frontend/dist/backend/src/view.js +0 -584
- package/frontend/dist/frontend/src/elements/base.d.ts +0 -3743
- package/frontend/dist/frontend/src/elements/base.js +0 -12151
- package/frontend/dist/frontend/src/elements/module.d.ts +0 -95
- package/frontend/dist/frontend/src/elements/module.js +0 -216
- package/frontend/dist/frontend/src/elements/register_element.d.ts +0 -3
- package/frontend/dist/frontend/src/elements/register_element.js +0 -22
- package/frontend/dist/frontend/src/elements/resize_query_manager.d.ts +0 -0
- package/frontend/dist/frontend/src/elements/resize_query_manager.js +0 -150
- package/frontend/dist/frontend/src/elements/types.d.ts +0 -52
- package/frontend/dist/frontend/src/elements/types.js +0 -5
- package/frontend/dist/frontend/src/index.d.ts +0 -21
- package/frontend/dist/frontend/src/index.js +0 -29
- package/frontend/dist/frontend/src/modules/attachment.d.ts +0 -126
- package/frontend/dist/frontend/src/modules/attachment.js +0 -306
- package/frontend/dist/frontend/src/modules/auth.d.ts +0 -44
- package/frontend/dist/frontend/src/modules/auth.js +0 -80
- package/frontend/dist/frontend/src/modules/color.d.ts +0 -160
- package/frontend/dist/frontend/src/modules/color.js +0 -316
- package/frontend/dist/frontend/src/modules/compression.d.ts +0 -39
- package/frontend/dist/frontend/src/modules/compression.js +0 -102
- package/frontend/dist/frontend/src/modules/cookies.d.ts +0 -44
- package/frontend/dist/frontend/src/modules/cookies.js +0 -143
- package/frontend/dist/frontend/src/modules/events.d.ts +0 -31
- package/frontend/dist/frontend/src/modules/events.js +0 -79
- package/frontend/dist/frontend/src/modules/google.d.ts +0 -23
- package/frontend/dist/frontend/src/modules/google.js +0 -52
- package/frontend/dist/frontend/src/modules/meta.d.ts +0 -14
- package/frontend/dist/frontend/src/modules/meta.js +0 -48
- package/frontend/dist/frontend/src/modules/paddle.d.ts +0 -1207
- package/frontend/dist/frontend/src/modules/paddle.js +0 -2594
- package/frontend/dist/frontend/src/modules/request.d.ts +0 -70
- package/frontend/dist/frontend/src/modules/request.js +0 -117
- package/frontend/dist/frontend/src/modules/settings.d.ts +0 -3
- package/frontend/dist/frontend/src/modules/settings.js +0 -5
- package/frontend/dist/frontend/src/modules/statics.d.ts +0 -21
- package/frontend/dist/frontend/src/modules/statics.js +0 -43
- package/frontend/dist/frontend/src/modules/stripe/cart.d.ts +0 -112
- package/frontend/dist/frontend/src/modules/stripe/cart.js +0 -321
- package/frontend/dist/frontend/src/modules/stripe/checkout.d.ts +0 -7
- package/frontend/dist/frontend/src/modules/stripe/checkout.js +0 -37
- package/frontend/dist/frontend/src/modules/stripe/index.m.d.ts +0 -6
- package/frontend/dist/frontend/src/modules/stripe/index.m.js +0 -6
- package/frontend/dist/frontend/src/modules/stripe/payments.d.ts +0 -58
- package/frontend/dist/frontend/src/modules/stripe/payments.js +0 -92
- package/frontend/dist/frontend/src/modules/support.d.ts +0 -30
- package/frontend/dist/frontend/src/modules/support.js +0 -53
- package/frontend/dist/frontend/src/modules/theme.d.ts +0 -133
- package/frontend/dist/frontend/src/modules/theme.js +0 -406
- package/frontend/dist/frontend/src/modules/themes.d.ts +0 -12
- package/frontend/dist/frontend/src/modules/themes.js +0 -22
- package/frontend/dist/frontend/src/modules/user.d.ts +0 -164
- package/frontend/dist/frontend/src/modules/user.js +0 -270
- package/frontend/dist/frontend/src/modules/utils.d.ts +0 -176
- package/frontend/dist/frontend/src/modules/utils.js +0 -569
- package/frontend/dist/frontend/src/types/gradient.d.ts +0 -29
- package/frontend/dist/frontend/src/types/gradient.js +0 -79
- package/frontend/dist/frontend/src/ui/border_button.d.ts +0 -94
- package/frontend/dist/frontend/src/ui/border_button.js +0 -228
- package/frontend/dist/frontend/src/ui/button.d.ts +0 -241
- package/frontend/dist/frontend/src/ui/button.js +0 -682
- package/frontend/dist/frontend/src/ui/canvas.d.ts +0 -138
- package/frontend/dist/frontend/src/ui/canvas.js +0 -444
- package/frontend/dist/frontend/src/ui/checkbox.d.ts +0 -74
- package/frontend/dist/frontend/src/ui/checkbox.js +0 -321
- package/frontend/dist/frontend/src/ui/code.d.ts +0 -235
- package/frontend/dist/frontend/src/ui/code.js +0 -1007
- package/frontend/dist/frontend/src/ui/context_menu.d.ts +0 -36
- package/frontend/dist/frontend/src/ui/context_menu.js +0 -205
- package/frontend/dist/frontend/src/ui/css.d.ts +0 -16
- package/frontend/dist/frontend/src/ui/css.js +0 -48
- package/frontend/dist/frontend/src/ui/divider.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/divider.js +0 -78
- package/frontend/dist/frontend/src/ui/dropdown.d.ts +0 -176
- package/frontend/dist/frontend/src/ui/dropdown.js +0 -481
- package/frontend/dist/frontend/src/ui/for_each.d.ts +0 -37
- package/frontend/dist/frontend/src/ui/for_each.js +0 -92
- package/frontend/dist/frontend/src/ui/form.d.ts +0 -34
- package/frontend/dist/frontend/src/ui/form.js +0 -233
- package/frontend/dist/frontend/src/ui/frame_modes.d.ts +0 -37
- package/frontend/dist/frontend/src/ui/frame_modes.js +0 -108
- package/frontend/dist/frontend/src/ui/google_map.d.ts +0 -24
- package/frontend/dist/frontend/src/ui/google_map.js +0 -106
- package/frontend/dist/frontend/src/ui/gradient.d.ts +0 -25
- package/frontend/dist/frontend/src/ui/gradient.js +0 -131
- package/frontend/dist/frontend/src/ui/image.d.ts +0 -111
- package/frontend/dist/frontend/src/ui/image.js +0 -576
- package/frontend/dist/frontend/src/ui/input.d.ts +0 -392
- package/frontend/dist/frontend/src/ui/input.js +0 -1201
- package/frontend/dist/frontend/src/ui/link.d.ts +0 -25
- package/frontend/dist/frontend/src/ui/link.js +0 -140
- package/frontend/dist/frontend/src/ui/list.d.ts +0 -37
- package/frontend/dist/frontend/src/ui/list.js +0 -170
- package/frontend/dist/frontend/src/ui/loader_button.d.ts +0 -80
- package/frontend/dist/frontend/src/ui/loader_button.js +0 -193
- package/frontend/dist/frontend/src/ui/loaders.d.ts +0 -57
- package/frontend/dist/frontend/src/ui/loaders.js +0 -157
- package/frontend/dist/frontend/src/ui/popup.d.ts +0 -94
- package/frontend/dist/frontend/src/ui/popup.js +0 -510
- package/frontend/dist/frontend/src/ui/pseudo.d.ts +0 -44
- package/frontend/dist/frontend/src/ui/pseudo.js +0 -154
- package/frontend/dist/frontend/src/ui/scroller.d.ts +0 -105
- package/frontend/dist/frontend/src/ui/scroller.js +0 -1253
- package/frontend/dist/frontend/src/ui/slider.d.ts +0 -45
- package/frontend/dist/frontend/src/ui/slider.js +0 -217
- package/frontend/dist/frontend/src/ui/spacer.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/spacer.js +0 -78
- package/frontend/dist/frontend/src/ui/span.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/span.js +0 -73
- package/frontend/dist/frontend/src/ui/stack.d.ts +0 -66
- package/frontend/dist/frontend/src/ui/stack.js +0 -335
- package/frontend/dist/frontend/src/ui/steps.d.ts +0 -131
- package/frontend/dist/frontend/src/ui/steps.js +0 -308
- package/frontend/dist/frontend/src/ui/style.d.ts +0 -17
- package/frontend/dist/frontend/src/ui/style.js +0 -73
- package/frontend/dist/frontend/src/ui/switch.d.ts +0 -69
- package/frontend/dist/frontend/src/ui/switch.js +0 -357
- package/frontend/dist/frontend/src/ui/table.d.ts +0 -100
- package/frontend/dist/frontend/src/ui/table.js +0 -405
- package/frontend/dist/frontend/src/ui/tabs.d.ts +0 -111
- package/frontend/dist/frontend/src/ui/tabs.js +0 -424
- package/frontend/dist/frontend/src/ui/text.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/text.js +0 -83
- package/frontend/dist/frontend/src/ui/title.d.ts +0 -91
- package/frontend/dist/frontend/src/ui/title.js +0 -272
- package/frontend/dist/frontend/src/ui/ui.d.ts +0 -35
- package/frontend/dist/frontend/src/ui/ui.js +0 -38
- package/frontend/dist/frontend/src/ui/view.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/view.js +0 -88
- package/frontend/dist/frontend/src/volt.d.ts +0 -20
- package/frontend/dist/frontend/src/volt.js +0 -27
- package/frontend/examples/theme/theme.ts +0 -58
- package/frontend/tools/bundle_d_ts.js +0 -71
- package/frontend/tools/convert_to_jsdoc_input.txt +0 -9452
- package/frontend/tools/convert_to_jsdoc_output.txt +0 -7626
- package/frontend/tools/convert_to_jsdoc_tmp.js +0 -345
- package/frontend/tools/scan_mixed_imports.js +0 -69
- /package/frontend/{dist/frontend/src/css → css}/adyen.css +0 -0
- /package/frontend/{dist/frontend/src/css → css}/volt.css +0 -0
|
@@ -1,494 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Daan van den Bergh
|
|
3
|
-
* @copyright © 2025 - 2025 Daan van den Bergh. All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
import * as vlib from "@vandenberghinc/vlib";
|
|
6
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
7
|
-
import { ServerHttp2Stream, IncomingHttpHeaders, Http2ServerRequest, Http2ServerResponse } from 'http2';
|
|
8
|
-
import { Transform } from "node:stream";
|
|
9
|
-
/** A generic map of request parameters. */
|
|
10
|
-
export type Params = Record<string, any>;
|
|
11
|
-
/** Alias for {@link Params}. */
|
|
12
|
-
export type Parameters = Params;
|
|
13
|
-
/** Allowed values for an HTTP response header. */
|
|
14
|
-
export type ResponseHeaderValue = string | number | boolean | null | undefined;
|
|
15
|
-
/** A map of HTTP response headers. */
|
|
16
|
-
export type ResponseHeaders = Record<string, ResponseHeaderValue>;
|
|
17
|
-
/** Supported response body shapes. */
|
|
18
|
-
type ResponseBody = undefined | string | boolean | number | any[] | Record<string, any> | Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>;
|
|
19
|
-
/**
|
|
20
|
-
* The http2 stream wrapper object.
|
|
21
|
-
*
|
|
22
|
-
* @property headers The request headers.
|
|
23
|
-
*
|
|
24
|
-
* @nav Stream
|
|
25
|
-
* @docs
|
|
26
|
-
*/
|
|
27
|
-
export declare class Stream {
|
|
28
|
-
/** The request headers. */
|
|
29
|
-
headers: IncomingHttpHeaders | IncomingMessage['headers'];
|
|
30
|
-
/** Whether this stream is an HTTP/2 stream. */
|
|
31
|
-
http2: boolean;
|
|
32
|
-
/** Whether this stream is an HTTP/1.1 stream (when false, it's an HTTP/2 stream). */
|
|
33
|
-
http1: boolean;
|
|
34
|
-
/** The status code of the sent response. */
|
|
35
|
-
status_code: number | undefined;
|
|
36
|
-
/** Whether the response has been finished. */
|
|
37
|
-
finished: boolean;
|
|
38
|
-
/** The received body potentially decompressed as string. */
|
|
39
|
-
body: string;
|
|
40
|
-
/** The raw body as a Buffer, potentially decompressed. */
|
|
41
|
-
raw_body: Buffer;
|
|
42
|
-
/** The body wired exactly as is, not decompressed etc. */
|
|
43
|
-
wire_body: Buffer;
|
|
44
|
-
/** The internal promise that resolves when the body is fully received. */
|
|
45
|
-
private promise;
|
|
46
|
-
/** The cached value of {@link normalize_ip} */
|
|
47
|
-
private _normalized_ip;
|
|
48
|
-
private s?;
|
|
49
|
-
private req?;
|
|
50
|
-
private res?;
|
|
51
|
-
private _ip;
|
|
52
|
-
private _port;
|
|
53
|
-
private _method;
|
|
54
|
-
private _params;
|
|
55
|
-
private _is_query_params;
|
|
56
|
-
private _endpoint;
|
|
57
|
-
private _query_string;
|
|
58
|
-
private _cookies;
|
|
59
|
-
private _uid;
|
|
60
|
-
private res_cookies;
|
|
61
|
-
private res_headers;
|
|
62
|
-
/**
|
|
63
|
-
* Create a new Stream wrapper for HTTP/1.1 or HTTP/2.
|
|
64
|
-
*
|
|
65
|
-
* @param stream The HTTP/2 stream (when using HTTP/2).
|
|
66
|
-
* @param headers The request headers.
|
|
67
|
-
* @param req The HTTP/1.1 request (when using HTTP/1.1).
|
|
68
|
-
* @param res The HTTP/1.1/HTTP/2 response object.
|
|
69
|
-
*/
|
|
70
|
-
constructor(stream?: ServerHttp2Stream, headers?: IncomingHttpHeaders | IncomingMessage['headers'], req?: IncomingMessage | Http2ServerRequest, res?: ServerResponse | Http2ServerResponse);
|
|
71
|
-
/**
|
|
72
|
-
* Receive and buffer the request body, handling optional gzip/deflate decompression.
|
|
73
|
-
* Sets {@link body} and resolves the internal promise used by {@link join}.
|
|
74
|
-
*/
|
|
75
|
-
private _recv_body;
|
|
76
|
-
/**
|
|
77
|
-
* Parse and cache the request endpoint and query string.
|
|
78
|
-
* Populates {@link _endpoint} and {@link _query_string}.
|
|
79
|
-
* @private
|
|
80
|
-
*/
|
|
81
|
-
private _parse_endoint;
|
|
82
|
-
/**
|
|
83
|
-
* Parse and cache request parameters from the query string or JSON body.
|
|
84
|
-
* Returns the parsed params map.
|
|
85
|
-
*/
|
|
86
|
-
_parse_params(): Record<string, any> | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Parses & returns the cookies cookies,
|
|
89
|
-
* while assigning it to {@link _cookies}
|
|
90
|
-
*
|
|
91
|
-
* @warning On subsequent calls cookies will be parsed again.
|
|
92
|
-
*/
|
|
93
|
-
private _parse_cookies;
|
|
94
|
-
/**
|
|
95
|
-
* Wait until the request body is fully received.
|
|
96
|
-
* Resolves when the internal receive promise completes.
|
|
97
|
-
*/
|
|
98
|
-
join(): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Get the request's ip.
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```ts
|
|
104
|
-
* const ip = stream.ip;
|
|
105
|
-
* ```
|
|
106
|
-
* @docs
|
|
107
|
-
*/
|
|
108
|
-
get ip(): string;
|
|
109
|
-
/**
|
|
110
|
-
* Retrieve the normalized IP address, suitable for rate limiting and logging.
|
|
111
|
-
* @throws {Error} If the IP is invalid.
|
|
112
|
-
* @returns The normalized IP.
|
|
113
|
-
* @docs
|
|
114
|
-
*/
|
|
115
|
-
normalized_ip(): string;
|
|
116
|
-
/**
|
|
117
|
-
* Get the request's port.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```ts
|
|
121
|
-
* const port = stream.port;
|
|
122
|
-
* ```
|
|
123
|
-
* @docs
|
|
124
|
-
*/
|
|
125
|
-
get port(): number;
|
|
126
|
-
/**
|
|
127
|
-
* Get the request method.
|
|
128
|
-
*
|
|
129
|
-
* @example
|
|
130
|
-
* ```ts
|
|
131
|
-
* const method = stream.method;
|
|
132
|
-
* ```
|
|
133
|
-
* @docs
|
|
134
|
-
*/
|
|
135
|
-
get method(): string;
|
|
136
|
-
/**
|
|
137
|
-
* Get the request's endpoint. This will not include the query string.
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* ```ts
|
|
141
|
-
* const endpoint = stream.endpoint;
|
|
142
|
-
* ```
|
|
143
|
-
* @docs
|
|
144
|
-
*/
|
|
145
|
-
get endpoint(): string;
|
|
146
|
-
/**
|
|
147
|
-
* Get the request's query or body params.
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```ts
|
|
151
|
-
* const params = stream.params;
|
|
152
|
-
* ```
|
|
153
|
-
* @docs
|
|
154
|
-
*/
|
|
155
|
-
get params(): Record<string, any>;
|
|
156
|
-
/** Add a param (used by the server backend for path parameters). */
|
|
157
|
-
add_param(name: string, value: any): void;
|
|
158
|
-
/**
|
|
159
|
-
* Get a single query or body parameter with an optional type cast.
|
|
160
|
-
*
|
|
161
|
-
* @warning Throws an error when the parameter does not exist or when the type is different from the specified type(s), unless parameter `def` is defined.
|
|
162
|
-
*
|
|
163
|
-
* @param name The name of the parameter.
|
|
164
|
-
* @param type The type cast of the parameters, valid types are `[null, "boolean", "number", "string", "array", "object"]`.
|
|
165
|
-
* @param def
|
|
166
|
-
* The default value to return when the parameter does not exist.
|
|
167
|
-
*
|
|
168
|
-
* If the parameter is not defined and `def` is `undefined` then this function will throw an error.
|
|
169
|
-
* When `def` is `undefined` errors will be thrown, when `def` is `null` and the parameter is undefined then `null` will be returned as the default value.
|
|
170
|
-
*
|
|
171
|
-
* Errors will always be thrown when the incorrect type has been sent by the user.
|
|
172
|
-
* @example
|
|
173
|
-
* ```ts
|
|
174
|
-
* const param = stream.param("myparameter", "number", 10);
|
|
175
|
-
* ```
|
|
176
|
-
* @docs
|
|
177
|
-
*/
|
|
178
|
-
param<T = any>(name: string, type?: string | string[] | null, def?: any): T;
|
|
179
|
-
/**
|
|
180
|
-
* Get the request's cookies
|
|
181
|
-
*
|
|
182
|
-
* @example
|
|
183
|
-
* ```ts
|
|
184
|
-
* const cookies = stream.cookies;
|
|
185
|
-
* ```
|
|
186
|
-
* @docs
|
|
187
|
-
*/
|
|
188
|
-
get cookies(): Record<string, any>;
|
|
189
|
-
/**
|
|
190
|
-
* Check if the stream is destroyed.
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
* ```ts
|
|
194
|
-
* const ip = stream.destroyed;
|
|
195
|
-
* ```
|
|
196
|
-
* @docs
|
|
197
|
-
*/
|
|
198
|
-
get destroyed(): boolean;
|
|
199
|
-
/**
|
|
200
|
-
* Get the authenticated uid; `undefined` when the request was not authenticated.
|
|
201
|
-
*
|
|
202
|
-
* @example
|
|
203
|
-
* ```ts
|
|
204
|
-
* const uid = stream.uid;
|
|
205
|
-
* ```
|
|
206
|
-
* @docs
|
|
207
|
-
*/
|
|
208
|
-
get uid(): string | undefined;
|
|
209
|
-
set uid(value: string | undefined);
|
|
210
|
-
/**
|
|
211
|
-
* Apply templates to an in-memory body.
|
|
212
|
-
* Only applies to string bodies to avoid corrupting binary payloads.
|
|
213
|
-
*/
|
|
214
|
-
private apply_templates_to_body;
|
|
215
|
-
/**
|
|
216
|
-
* Create a transform stream that applies templates across chunk boundaries.
|
|
217
|
-
* This avoids missing replacements when a template key is split between chunks.
|
|
218
|
-
*/
|
|
219
|
-
private create_template_replace_transform;
|
|
220
|
-
/** Create output headers for http2. */
|
|
221
|
-
private create_http2_headers;
|
|
222
|
-
/** Assign http headers to response. */
|
|
223
|
-
private set_http1_headers;
|
|
224
|
-
/**
|
|
225
|
-
* Send a response.
|
|
226
|
-
* @example
|
|
227
|
-
* ```ts
|
|
228
|
-
* stream.send({status: 200, data: "Hello World!"});
|
|
229
|
-
* ```
|
|
230
|
-
* @docs
|
|
231
|
-
*/
|
|
232
|
-
send<Data extends ResponseBody = ResponseBody>({ status, headers, data, compress, from_file, templates, }: {
|
|
233
|
-
/** The response status. */
|
|
234
|
-
status?: number;
|
|
235
|
-
/** The response headers. */
|
|
236
|
-
headers?: ResponseHeaders;
|
|
237
|
-
/** The data of the response body to send. */
|
|
238
|
-
data?: Data;
|
|
239
|
-
/** Whether the response should be gzip-compressed. */
|
|
240
|
-
compress?: boolean;
|
|
241
|
-
/** Load data from a file, using a cached path will have a slight performance improvement */
|
|
242
|
-
from_file?: string | vlib.Path;
|
|
243
|
-
/** Apply template replacements (e.g. { "{{__VOLT_NONCE__}}": nonce }) */
|
|
244
|
-
templates?: Record<string, any>;
|
|
245
|
-
}): this;
|
|
246
|
-
/**
|
|
247
|
-
* Send a response
|
|
248
|
-
*
|
|
249
|
-
* @param options The response options.
|
|
250
|
-
* @param options.status The response status.
|
|
251
|
-
* @param options.headers The response headers.
|
|
252
|
-
* @param options.data The data of the response body to send.
|
|
253
|
-
* @param options.compress Whether the response should be gzip-compressed.
|
|
254
|
-
* @example
|
|
255
|
-
* ```ts
|
|
256
|
-
* stream.success({data: "Hello World!"});
|
|
257
|
-
* ```
|
|
258
|
-
* @docs
|
|
259
|
-
*/
|
|
260
|
-
success<Data extends ResponseBody = ResponseBody>({ status, headers, data, from_file, compress }?: {
|
|
261
|
-
status?: number;
|
|
262
|
-
headers?: ResponseHeaders;
|
|
263
|
-
data?: Data;
|
|
264
|
-
compress?: boolean;
|
|
265
|
-
from_file?: string | vlib.Path;
|
|
266
|
-
}): this;
|
|
267
|
-
/**
|
|
268
|
-
* Send an error response
|
|
269
|
-
*
|
|
270
|
-
* @param options The error response options.
|
|
271
|
-
* @param options.message The error message.
|
|
272
|
-
* @param options.type The error type.
|
|
273
|
-
* @param options.invalid_fields The invalid fields when validation fails.
|
|
274
|
-
* @param options.status The response status.
|
|
275
|
-
* @param options.headers The response headers.
|
|
276
|
-
* @param options.compress Whether the response should be gzip-compressed.
|
|
277
|
-
* @param options.data Optional data to include in the error response, nested in the JSON response under field `data`.
|
|
278
|
-
* @example
|
|
279
|
-
* ```ts
|
|
280
|
-
* stream.error({ message: "Some error occurred", status: 400 });
|
|
281
|
-
* ```
|
|
282
|
-
* @docs
|
|
283
|
-
*/
|
|
284
|
-
error<ErrorData extends ResponseBody = ResponseBody>({ message, type, invalid_fields, status, headers, compress, data, }: {
|
|
285
|
-
message: string;
|
|
286
|
-
type?: string;
|
|
287
|
-
invalid_fields?: Record<string, string>;
|
|
288
|
-
status?: number;
|
|
289
|
-
headers?: ResponseHeaders;
|
|
290
|
-
compress?: boolean;
|
|
291
|
-
data?: ErrorData;
|
|
292
|
-
}): this;
|
|
293
|
-
/**
|
|
294
|
-
* Stream a response through a transform pipeline with an optional gzip step and a hard byte limit.
|
|
295
|
-
*
|
|
296
|
-
* @param options Pipeline options.
|
|
297
|
-
* @param options.status The HTTP status code to send.
|
|
298
|
-
* @param options.headers The response headers to send.
|
|
299
|
-
* @param options.body The readable stream to pipe into the response.
|
|
300
|
-
* @param options.transforms Optional transform streams applied in order.
|
|
301
|
-
* @param options.compress When true, gzip-compresses the streamed response if the client supports it.
|
|
302
|
-
* @param options.max_bytes The maximum number of bytes allowed to be written to the client.
|
|
303
|
-
* Set to `-1` for unlimited (use with caution).
|
|
304
|
-
*/
|
|
305
|
-
pipeline({ status, headers, body, transforms, compress, max_bytes, }: {
|
|
306
|
-
status?: number;
|
|
307
|
-
headers?: ResponseHeaders;
|
|
308
|
-
body: NodeJS.ReadableStream;
|
|
309
|
-
transforms?: Transform[];
|
|
310
|
-
compress?: boolean;
|
|
311
|
-
max_bytes?: number;
|
|
312
|
-
}): this;
|
|
313
|
-
/**
|
|
314
|
-
* Add a new header to the response data.
|
|
315
|
-
*
|
|
316
|
-
* @param name The header name.
|
|
317
|
-
* @param value The header value.
|
|
318
|
-
* @example
|
|
319
|
-
* ```ts
|
|
320
|
-
* stream.set_header("Connection", "close");
|
|
321
|
-
* ```
|
|
322
|
-
* @docs
|
|
323
|
-
*/
|
|
324
|
-
set_header(name: string, value: ResponseHeaderValue): this;
|
|
325
|
-
/**
|
|
326
|
-
* Add new headers to the response data.
|
|
327
|
-
*
|
|
328
|
-
* @param headers The new response headers.
|
|
329
|
-
* @example
|
|
330
|
-
* ```ts
|
|
331
|
-
* stream.set_headers({"Connection": "close"});
|
|
332
|
-
* ```
|
|
333
|
-
* @docs
|
|
334
|
-
*/
|
|
335
|
-
set_headers(headers?: ResponseHeaders): this;
|
|
336
|
-
/**
|
|
337
|
-
* Get an added response header.
|
|
338
|
-
*
|
|
339
|
-
* @param name The header name.
|
|
340
|
-
* @example
|
|
341
|
-
* ```ts
|
|
342
|
-
* stream.get_header("Connection");
|
|
343
|
-
* ```
|
|
344
|
-
* @docs
|
|
345
|
-
*/
|
|
346
|
-
get_header(name: string): ResponseHeaderValue | undefined;
|
|
347
|
-
/**
|
|
348
|
-
* Remove header names from the response data.
|
|
349
|
-
*
|
|
350
|
-
* @param names The header names to remove.
|
|
351
|
-
* @example
|
|
352
|
-
* ```ts
|
|
353
|
-
* stream.remove_header("Connection", "User-Agent");
|
|
354
|
-
* ```
|
|
355
|
-
* @docs
|
|
356
|
-
*/
|
|
357
|
-
remove_header(...names: string[]): this;
|
|
358
|
-
/**
|
|
359
|
-
* Alias of {@link remove_header}.
|
|
360
|
-
*
|
|
361
|
-
* @param names The header names to remove.
|
|
362
|
-
*/
|
|
363
|
-
remove_headers(...names: string[]): this;
|
|
364
|
-
/**
|
|
365
|
-
* Set a cookie to be sent with the response.
|
|
366
|
-
*
|
|
367
|
-
* Accepts either:
|
|
368
|
-
* 1) a pre-built cookie header string (used as-is, no validation), or
|
|
369
|
-
* 2) a structured object describing the cookie, from which a standards-compliant
|
|
370
|
-
* cookie string will be generated.
|
|
371
|
-
*
|
|
372
|
-
* If a cookie with the same name already exists in the pending response list,
|
|
373
|
-
* it will be replaced.
|
|
374
|
-
*
|
|
375
|
-
* @warning Cookies are only included in the response when using `send()`,
|
|
376
|
-
* `success()` or `error()`.
|
|
377
|
-
*
|
|
378
|
-
* @example
|
|
379
|
-
* ```ts
|
|
380
|
-
* stream.set_cookie("sid=abc123; Path=/; SameSite=Lax; Secure; HttpOnly");
|
|
381
|
-
*
|
|
382
|
-
* stream.set_cookie({
|
|
383
|
-
* name: "sid",
|
|
384
|
-
* value: session_id,
|
|
385
|
-
* http_only: true,
|
|
386
|
-
* secure: true,
|
|
387
|
-
* same_site: "Lax",
|
|
388
|
-
* path: "/",
|
|
389
|
-
* max_age: 60 * 60 * 24 * 14,
|
|
390
|
-
* });
|
|
391
|
-
* ```
|
|
392
|
-
*/
|
|
393
|
-
set_cookie(cookie: string | {
|
|
394
|
-
/** Cookie name (required). */
|
|
395
|
-
name: string;
|
|
396
|
-
/** Cookie value. Will be URI-encoded. Defaults to empty string. */
|
|
397
|
-
value?: string | number | boolean | null;
|
|
398
|
-
/** Cookie path attribute. Defaults to "/". */
|
|
399
|
-
path?: string;
|
|
400
|
-
/** Cookie domain attribute. */
|
|
401
|
-
domain?: string;
|
|
402
|
-
/** Max-Age in seconds. Must be a finite number. */
|
|
403
|
-
max_age?: number;
|
|
404
|
-
/** Expiration date (Date or preformatted HTTP date string). */
|
|
405
|
-
expires?: Date | string;
|
|
406
|
-
/** Adds the Secure attribute (HTTPS only). */
|
|
407
|
-
secure?: boolean;
|
|
408
|
-
/** Adds the HttpOnly attribute (not accessible to JS). */
|
|
409
|
-
http_only?: boolean;
|
|
410
|
-
/**
|
|
411
|
-
* SameSite attribute.
|
|
412
|
-
* Use "Lax" for most session cookies.
|
|
413
|
-
* Use "None" only together with `secure: true`.
|
|
414
|
-
*/
|
|
415
|
-
same_site?: "Strict" | "Lax" | "None";
|
|
416
|
-
/**
|
|
417
|
-
* Cookie name prefix.
|
|
418
|
-
* "__Host-" requires: secure=true, path="/", and no domain.
|
|
419
|
-
* "__Secure-" requires: secure=true.
|
|
420
|
-
*/
|
|
421
|
-
prefix?: "__Host-" | "__Secure-";
|
|
422
|
-
/**
|
|
423
|
-
* Additional raw attributes appended verbatim.
|
|
424
|
-
* Example: ["Priority=High"]
|
|
425
|
-
*/
|
|
426
|
-
extra?: string[];
|
|
427
|
-
}): this;
|
|
428
|
-
/**
|
|
429
|
-
* Set cookies that will be sent with the response.
|
|
430
|
-
*
|
|
431
|
-
* @warning Will only be added to the response when the user uses `send()`, `success()` or `error()`.
|
|
432
|
-
* @param cookies The cookie strings.
|
|
433
|
-
* @example
|
|
434
|
-
* ```ts
|
|
435
|
-
* stream.set_cookies("MyCookie1=Hello World;", "MyCookie2=Hello Universe;");
|
|
436
|
-
* ```
|
|
437
|
-
* @docs
|
|
438
|
-
*/
|
|
439
|
-
set_cookies(...cookies: string[]): this;
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* A stream that passed the `authenticated: true` attribute of an {@link Endpoint}.
|
|
443
|
-
*
|
|
444
|
-
* @nav Stream
|
|
445
|
-
* @docs
|
|
446
|
-
*/
|
|
447
|
-
export type AuthStream = Stream & {
|
|
448
|
-
get uid(): string;
|
|
449
|
-
};
|
|
450
|
-
/**
|
|
451
|
-
* The API error field from {@link APIErrorResult}.
|
|
452
|
-
*
|
|
453
|
-
* @note This should be compatible with the frontend {@link Utils.RequestResult} interface.
|
|
454
|
-
*
|
|
455
|
-
* @nav Stream
|
|
456
|
-
* @docs
|
|
457
|
-
*/
|
|
458
|
-
export interface APIError {
|
|
459
|
-
/** The error message. */
|
|
460
|
-
message: string;
|
|
461
|
-
/** The error type. */
|
|
462
|
-
type?: string;
|
|
463
|
-
/** The error status code. */
|
|
464
|
-
status?: number;
|
|
465
|
-
/** The invalid fields, when the error is a validation error. */
|
|
466
|
-
invalid_fields?: Record<string, string>;
|
|
467
|
-
}
|
|
468
|
-
/** The request data template base. */
|
|
469
|
-
type RequestDataBase = unknown | null | undefined | number | boolean | string | any[] | Record<string, any>;
|
|
470
|
-
/**
|
|
471
|
-
* The error response received by the frontend generated by the {@link Stream.error} method from the backend.
|
|
472
|
-
* This interface can be used to create response interfaces in the backend, imported by the frontend.
|
|
473
|
-
*
|
|
474
|
-
* @note This should be compatible with the frontend {@link Utils.RequestResult} interface.
|
|
475
|
-
*
|
|
476
|
-
* @nav Stream
|
|
477
|
-
* @docs
|
|
478
|
-
*/
|
|
479
|
-
export interface APIErrorResult<ErrorData extends RequestDataBase = unknown> {
|
|
480
|
-
/** The error object. */
|
|
481
|
-
error: APIError;
|
|
482
|
-
/** The data that was sent with the error response, always optional in case of body parsing failure */
|
|
483
|
-
data?: ErrorData;
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* The request result from {@link Stream.error}, {@link Stream.success} or {@link Stream.send}.
|
|
487
|
-
*
|
|
488
|
-
* @note This should be compatible with the frontend {@link Utils.RequestResult} interface.
|
|
489
|
-
*
|
|
490
|
-
* @nav Stream
|
|
491
|
-
* @docs
|
|
492
|
-
*/
|
|
493
|
-
export type APIResult<SuccessData extends RequestDataBase = unknown, ErrorData extends RequestDataBase = unknown> = APIErrorResult<ErrorData> | SuccessData;
|
|
494
|
-
export {};
|