@vandenberghinc/volt 1.2.5 → 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 +5 -1
- 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,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author ...
|
|
3
|
-
* @copyright ...
|
|
4
|
-
*/
|
|
5
|
-
import { AnyElement } from "../ui/any_element.js";
|
|
6
|
-
import { Compression } from "./compression.js";
|
|
7
|
-
import type { Mail } from "../../../backend/src/plugins/mail/mail.js";
|
|
8
|
-
/** A file attachment with an internal byte buffer and compression/encoding helpers. */
|
|
9
|
-
export declare class Attachment {
|
|
10
|
-
/** File or directory name. */
|
|
11
|
-
name: string;
|
|
12
|
-
/** Path relative to the dropped root. */
|
|
13
|
-
path: string;
|
|
14
|
-
/** MIME type of the data. */
|
|
15
|
-
mime_type: string;
|
|
16
|
-
/** Charset used for text decoding (if applicable). */
|
|
17
|
-
charset?: string;
|
|
18
|
-
/** Whether the internal buffer is gzip-compressed. */
|
|
19
|
-
compressed: boolean;
|
|
20
|
-
/** Optional original File/Blob source. */
|
|
21
|
-
file?: File | Blob;
|
|
22
|
-
/** Internal raw buffer (compressed or not depending on state). */
|
|
23
|
-
private _bytes;
|
|
24
|
-
/** Create an Attachment from initial metadata and/or bytes. */
|
|
25
|
-
constructor(init: Attachment.Opts);
|
|
26
|
-
/** Current size of the internal buffer in bytes (compressed if flagged). */
|
|
27
|
-
get size(): number;
|
|
28
|
-
/** Get a copy of the internal buffer (leave compression state unchanged). */
|
|
29
|
-
bytes(): Uint8Array;
|
|
30
|
-
/** Replace the internal buffer (optionally update compression flag). */
|
|
31
|
-
set_bytes(bytes: Compression.BytesLike, compressed?: boolean): this;
|
|
32
|
-
/** Ensure the buffer is gzip-compressed (noop if already compressed). */
|
|
33
|
-
compress(options?: Compression.GzipOptions): this;
|
|
34
|
-
/** Ensure the buffer is uncompressed (noop if already uncompressed). */
|
|
35
|
-
decompress(): this;
|
|
36
|
-
/** Return Base64 of the current buffer (compressed or not). */
|
|
37
|
-
to_base64({ url_safe }?: {
|
|
38
|
-
url_safe?: boolean;
|
|
39
|
-
}): string;
|
|
40
|
-
/**
|
|
41
|
-
* Return a string view of the data using a charset.
|
|
42
|
-
* @param decompress Whether to decompress first if compressed. Default true.
|
|
43
|
-
* @param encoding Charset label; defaults to this.charset or "utf-8".
|
|
44
|
-
*/
|
|
45
|
-
to_string(decompress?: boolean, encoding?: string): string;
|
|
46
|
-
/**
|
|
47
|
-
* Parse JSON from the data.
|
|
48
|
-
* @param decompress Whether to decompress first if compressed. Default true.
|
|
49
|
-
*/
|
|
50
|
-
to_json<T = unknown>(decompress?: boolean): T;
|
|
51
|
-
/**
|
|
52
|
-
* Convert this attachment to a backend REST API attachment payload.
|
|
53
|
-
*
|
|
54
|
-
* This returns an object compatible with the server's `Mail.Attachment.RestAPI`
|
|
55
|
-
* shape using either:
|
|
56
|
-
* - `{ content, encoding }` (default; embeds the payload), or
|
|
57
|
-
* - `{ url }` (streams from an http(s)/data URL).
|
|
58
|
-
*
|
|
59
|
-
* @param opts Conversion options.
|
|
60
|
-
* @param opts.encoding Output string encoding for `content`. Defaults to `"base64"`.
|
|
61
|
-
* Supported: `"base64" | "hex" | "utf8"`.
|
|
62
|
-
* Use `"utf8"` only for textual data.
|
|
63
|
-
* @param opts.decompress Whether to decompress before encoding. Defaults to `true`.
|
|
64
|
-
* @param opts.url Optional http(s) or data: URL. When provided, `content`/`encoding`
|
|
65
|
-
* are omitted and the server will stream from this URL.
|
|
66
|
-
*
|
|
67
|
-
* @returns A REST API attachment payload with metadata plus either `{ content, encoding }` or `{ url }`.
|
|
68
|
-
*/
|
|
69
|
-
to_rest_api(opts?: {
|
|
70
|
-
encoding?: "base64" | "hex" | "utf8";
|
|
71
|
-
decompress?: boolean;
|
|
72
|
-
url?: string;
|
|
73
|
-
}): Mail.Attachment.RestAPI;
|
|
74
|
-
/** Clone the attachment, including bytes and metadata. */
|
|
75
|
-
clone(): Attachment;
|
|
76
|
-
}
|
|
77
|
-
export declare namespace Attachment {
|
|
78
|
-
/** Options for constructing an Attachment. */
|
|
79
|
-
interface Opts {
|
|
80
|
-
/** File or directory name. */
|
|
81
|
-
name: string;
|
|
82
|
-
/** Path relative to the dropped root (if available). */
|
|
83
|
-
path?: string;
|
|
84
|
-
/** MIME type of the data. */
|
|
85
|
-
mime_type?: string;
|
|
86
|
-
/** Charset used for text decoding (if applicable). */
|
|
87
|
-
charset?: string;
|
|
88
|
-
/** Initial bytes to load into the attachment. */
|
|
89
|
-
bytes?: Compression.BytesLike;
|
|
90
|
-
/** Original File/Blob (if created from user drop). */
|
|
91
|
-
file?: File | Blob;
|
|
92
|
-
/** Whether bytes are already gzip-compressed. */
|
|
93
|
-
compressed?: boolean;
|
|
94
|
-
}
|
|
95
|
-
/** Create an Attachment from a Blob/File; optionally read and compress. */
|
|
96
|
-
function from_blob(blob: Blob | File, opts?: {
|
|
97
|
-
name?: string;
|
|
98
|
-
read?: boolean;
|
|
99
|
-
compress?: boolean;
|
|
100
|
-
charset?: string | "auto";
|
|
101
|
-
}): Promise<Attachment>;
|
|
102
|
-
/** Parameters for the {@link on_drop} handler. */
|
|
103
|
-
interface OnDropOpts {
|
|
104
|
-
/** Callback invoked per created attachment (files only). */
|
|
105
|
-
callback: (attachment: Attachment) => any;
|
|
106
|
-
/** Whether to read bytes immediately. Default true. */
|
|
107
|
-
read?: boolean;
|
|
108
|
-
/** Whether to gzip after reading. Default false. */
|
|
109
|
-
compress?: boolean;
|
|
110
|
-
/** Max uncompressed size per file (-1 disables). Default 50MB. */
|
|
111
|
-
max_size?: number;
|
|
112
|
-
/** Max cumulative uncompressed size (-1 disables). Default 50MB. */
|
|
113
|
-
total_max_size?: number;
|
|
114
|
-
/** Called at drag start. */
|
|
115
|
-
on_start?: (event: DragEvent) => any;
|
|
116
|
-
/** Called at drag end. */
|
|
117
|
-
on_stop?: (event: DragEvent) => any;
|
|
118
|
-
/** Error callback. */
|
|
119
|
-
on_error?: (error: Error) => any;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Handle drag/drop; recursively traverses directories and adds only files.
|
|
123
|
-
* Uses FS Access API when available, falls back to WebKit entries, otherwise flat files only.
|
|
124
|
-
*/
|
|
125
|
-
function on_drop(node: AnyElement, sink: Attachment[], opts: OnDropOpts): void;
|
|
126
|
-
}
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author ...
|
|
3
|
-
* @copyright ...
|
|
4
|
-
*/
|
|
5
|
-
import { Compression } from "./compression.js";
|
|
6
|
-
/** A file attachment with an internal byte buffer and compression/encoding helpers. */
|
|
7
|
-
export class Attachment {
|
|
8
|
-
/** File or directory name. */
|
|
9
|
-
name;
|
|
10
|
-
/** Path relative to the dropped root. */
|
|
11
|
-
path;
|
|
12
|
-
/** MIME type of the data. */
|
|
13
|
-
mime_type;
|
|
14
|
-
/** Charset used for text decoding (if applicable). */
|
|
15
|
-
charset;
|
|
16
|
-
/** Whether the internal buffer is gzip-compressed. */
|
|
17
|
-
compressed;
|
|
18
|
-
/** Optional original File/Blob source. */
|
|
19
|
-
file;
|
|
20
|
-
/** Internal raw buffer (compressed or not depending on state). */
|
|
21
|
-
_bytes;
|
|
22
|
-
/** Create an Attachment from initial metadata and/or bytes. */
|
|
23
|
-
constructor(init) {
|
|
24
|
-
this.name = init.name;
|
|
25
|
-
this.path = init.path ?? "";
|
|
26
|
-
this.mime_type = init.mime_type ?? "";
|
|
27
|
-
this.charset = init.charset;
|
|
28
|
-
this.file = init.file;
|
|
29
|
-
this.compressed = !!init.compressed;
|
|
30
|
-
this._bytes = init.bytes ? Compression.to_uint8(init.bytes) : new Uint8Array(0);
|
|
31
|
-
}
|
|
32
|
-
/** Current size of the internal buffer in bytes (compressed if flagged). */
|
|
33
|
-
get size() { return this._bytes.byteLength; }
|
|
34
|
-
/** Get a copy of the internal buffer (leave compression state unchanged). */
|
|
35
|
-
bytes() { return new Uint8Array(this._bytes); }
|
|
36
|
-
/** Replace the internal buffer (optionally update compression flag). */
|
|
37
|
-
set_bytes(bytes, compressed = false) {
|
|
38
|
-
this._bytes = Compression.to_uint8(bytes);
|
|
39
|
-
this.compressed = compressed;
|
|
40
|
-
return this;
|
|
41
|
-
}
|
|
42
|
-
/** Ensure the buffer is gzip-compressed (noop if already compressed). */
|
|
43
|
-
compress(options = { level: 9 }) {
|
|
44
|
-
if (!this.compressed) {
|
|
45
|
-
this._bytes = Compression.compress(this._bytes, options);
|
|
46
|
-
this.compressed = true;
|
|
47
|
-
}
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
/** Ensure the buffer is uncompressed (noop if already uncompressed). */
|
|
51
|
-
decompress() {
|
|
52
|
-
if (this.compressed) {
|
|
53
|
-
this._bytes = Compression.decompress(this._bytes);
|
|
54
|
-
this.compressed = false;
|
|
55
|
-
}
|
|
56
|
-
return this;
|
|
57
|
-
}
|
|
58
|
-
/** Return Base64 of the current buffer (compressed or not). */
|
|
59
|
-
to_base64({ url_safe = false } = {}) {
|
|
60
|
-
return Compression.to_base64(this._bytes, { url_safe });
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Return a string view of the data using a charset.
|
|
64
|
-
* @param decompress Whether to decompress first if compressed. Default true.
|
|
65
|
-
* @param encoding Charset label; defaults to this.charset or "utf-8".
|
|
66
|
-
*/
|
|
67
|
-
to_string(decompress = true, encoding) {
|
|
68
|
-
const buf = decompress && this.compressed ? Compression.decompress(this._bytes) : this._bytes;
|
|
69
|
-
const enc = (encoding ?? this.charset ?? "utf-8").toLowerCase();
|
|
70
|
-
if (enc === "utf-8" || enc === "utf8")
|
|
71
|
-
return new TextDecoder().decode(buf);
|
|
72
|
-
try {
|
|
73
|
-
return new TextDecoder(enc).decode(buf);
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
return new TextDecoder().decode(buf);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Parse JSON from the data.
|
|
81
|
-
* @param decompress Whether to decompress first if compressed. Default true.
|
|
82
|
-
*/
|
|
83
|
-
to_json(decompress = true) {
|
|
84
|
-
return JSON.parse(this.to_string(decompress));
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Convert this attachment to a backend REST API attachment payload.
|
|
88
|
-
*
|
|
89
|
-
* This returns an object compatible with the server's `Mail.Attachment.RestAPI`
|
|
90
|
-
* shape using either:
|
|
91
|
-
* - `{ content, encoding }` (default; embeds the payload), or
|
|
92
|
-
* - `{ url }` (streams from an http(s)/data URL).
|
|
93
|
-
*
|
|
94
|
-
* @param opts Conversion options.
|
|
95
|
-
* @param opts.encoding Output string encoding for `content`. Defaults to `"base64"`.
|
|
96
|
-
* Supported: `"base64" | "hex" | "utf8"`.
|
|
97
|
-
* Use `"utf8"` only for textual data.
|
|
98
|
-
* @param opts.decompress Whether to decompress before encoding. Defaults to `true`.
|
|
99
|
-
* @param opts.url Optional http(s) or data: URL. When provided, `content`/`encoding`
|
|
100
|
-
* are omitted and the server will stream from this URL.
|
|
101
|
-
*
|
|
102
|
-
* @returns A REST API attachment payload with metadata plus either `{ content, encoding }` or `{ url }`.
|
|
103
|
-
*/
|
|
104
|
-
to_rest_api(opts = {}) {
|
|
105
|
-
const { encoding = "base64", decompress = true, url } = opts;
|
|
106
|
-
const base = {
|
|
107
|
-
name: this.name,
|
|
108
|
-
path: this.path || undefined,
|
|
109
|
-
mime_type: this.mime_type || undefined,
|
|
110
|
-
charset: this.charset || undefined,
|
|
111
|
-
compressed: this.compressed || undefined,
|
|
112
|
-
};
|
|
113
|
-
if (url) {
|
|
114
|
-
return { ...base, url };
|
|
115
|
-
}
|
|
116
|
-
const bytes = decompress && this.compressed ? Compression.decompress(this._bytes) : this._bytes;
|
|
117
|
-
if (encoding === "base64") {
|
|
118
|
-
return { ...base, content: Compression.to_base64(bytes, { url_safe: false }), encoding };
|
|
119
|
-
}
|
|
120
|
-
if (encoding === "hex") {
|
|
121
|
-
// encode bytes -> hex (lowercase)
|
|
122
|
-
const hex = (() => {
|
|
123
|
-
const v = bytes;
|
|
124
|
-
let out = "";
|
|
125
|
-
for (let i = 0; i < v.length; i++) {
|
|
126
|
-
const h = v[i].toString(16).padStart(2, "0");
|
|
127
|
-
out += h;
|
|
128
|
-
}
|
|
129
|
-
return out;
|
|
130
|
-
})();
|
|
131
|
-
return { ...base, content: hex, encoding };
|
|
132
|
-
}
|
|
133
|
-
if (encoding === "utf8") {
|
|
134
|
-
// textual encoding (may be lossy for binary data)
|
|
135
|
-
const text = new TextDecoder().decode(bytes);
|
|
136
|
-
return { ...base, content: text, encoding };
|
|
137
|
-
}
|
|
138
|
-
// fallback to base64 if unsupported encoding is passed
|
|
139
|
-
return { ...base, content: Compression.to_base64(bytes, { url_safe: false }), encoding: "base64" };
|
|
140
|
-
}
|
|
141
|
-
/** Clone the attachment, including bytes and metadata. */
|
|
142
|
-
clone() {
|
|
143
|
-
return new Attachment({
|
|
144
|
-
name: this.name,
|
|
145
|
-
path: this.path,
|
|
146
|
-
mime_type: this.mime_type,
|
|
147
|
-
charset: this.charset,
|
|
148
|
-
bytes: this.bytes(),
|
|
149
|
-
file: this.file,
|
|
150
|
-
compressed: this.compressed,
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
(function (Attachment) {
|
|
155
|
-
/** Create an Attachment from a Blob/File; optionally read and compress. */
|
|
156
|
-
async function from_blob(blob, opts = {}) {
|
|
157
|
-
const name = (opts.name ?? blob.name) || "blob";
|
|
158
|
-
const mime_type = blob.type || "";
|
|
159
|
-
const charset = (() => {
|
|
160
|
-
const label = opts.charset ?? "auto";
|
|
161
|
-
if (label !== "auto")
|
|
162
|
-
return label;
|
|
163
|
-
const m = /charset\s*=\s*([^;]+)/i.exec(mime_type);
|
|
164
|
-
return m ? m[1].trim().toLowerCase() : undefined;
|
|
165
|
-
})();
|
|
166
|
-
const att = new Attachment({ name, mime_type, charset, file: blob, bytes: new Uint8Array(0), compressed: false });
|
|
167
|
-
if (opts.read !== false) {
|
|
168
|
-
const ab = "arrayBuffer" in blob
|
|
169
|
-
? await blob.arrayBuffer()
|
|
170
|
-
: await new Promise((res, rej) => {
|
|
171
|
-
const r = new FileReader();
|
|
172
|
-
r.onerror = () => rej(r.error);
|
|
173
|
-
r.onload = () => res(r.result);
|
|
174
|
-
r.readAsArrayBuffer(blob);
|
|
175
|
-
});
|
|
176
|
-
att.set_bytes(new Uint8Array(ab), false);
|
|
177
|
-
if (opts.compress)
|
|
178
|
-
att.compress();
|
|
179
|
-
}
|
|
180
|
-
return att;
|
|
181
|
-
}
|
|
182
|
-
Attachment.from_blob = from_blob;
|
|
183
|
-
/**
|
|
184
|
-
* Handle drag/drop; recursively traverses directories and adds only files.
|
|
185
|
-
* Uses FS Access API when available, falls back to WebKit entries, otherwise flat files only.
|
|
186
|
-
*/
|
|
187
|
-
function on_drop(node, sink, opts) {
|
|
188
|
-
let { callback, read = true, compress = false, on_start, on_stop, on_error = (e) => console.error(e), max_size = 50 * 1024 * 1024, total_max_size = 50 * 1024 * 1024, } = opts;
|
|
189
|
-
/** Sum current sink sizes. */
|
|
190
|
-
const sink_total = () => sink.reduce((a, b) => a + b.size, 0);
|
|
191
|
-
/** Guard size constraints. */
|
|
192
|
-
const enforce_sizes = (file) => {
|
|
193
|
-
if (max_size !== -1 && file.size > max_size) {
|
|
194
|
-
on_error(new Error(`Attachment '${file.name}' exceeds the size limit of ${Math.round(max_size / (1024 * 1024))}MB.`));
|
|
195
|
-
return false;
|
|
196
|
-
}
|
|
197
|
-
if (total_max_size !== -1 && (sink_total() + file.size) > total_max_size) {
|
|
198
|
-
on_error(new Error(`Attachment '${file.name}' exceeds the total size limit of ${Math.round(total_max_size / (1024 * 1024))}MB.`));
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
return true;
|
|
202
|
-
};
|
|
203
|
-
/** Push a file as Attachment (respects read/compress). */
|
|
204
|
-
const push_file = async (file, rel_path = "") => {
|
|
205
|
-
if (!enforce_sizes(file))
|
|
206
|
-
return;
|
|
207
|
-
try {
|
|
208
|
-
const att = await Attachment.from_blob(file, { read, compress });
|
|
209
|
-
att.path = rel_path || file.path || file.name;
|
|
210
|
-
sink.push(att);
|
|
211
|
-
callback(att);
|
|
212
|
-
}
|
|
213
|
-
catch (e) {
|
|
214
|
-
on_error(e instanceof Error ? e : new Error(String(e)));
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
/** FS Access API: recursively collect files from a directory handle. */
|
|
218
|
-
const walk_fs_handle = async (handle, prefix = "") => {
|
|
219
|
-
if (handle.kind === "file") {
|
|
220
|
-
const file = await handle.getFile();
|
|
221
|
-
await push_file(file, `${prefix}${file.name}`);
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (handle.kind === "directory") {
|
|
225
|
-
// @ts-ignore: async iterator is standard on Chromium
|
|
226
|
-
for await (const [name, child] of handle.entries()) {
|
|
227
|
-
await walk_fs_handle(child, `${prefix}${name}/`);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
/** WebKit fallback: recursively collect files from a FileSystemEntry directory. */
|
|
232
|
-
const walk_webkit_entry = async (entry, prefix = "") => {
|
|
233
|
-
if (entry.isFile) {
|
|
234
|
-
await new Promise((resolve, reject) => {
|
|
235
|
-
entry.file(async (file) => { try {
|
|
236
|
-
await push_file(file, `${prefix}${file.name}`);
|
|
237
|
-
resolve();
|
|
238
|
-
}
|
|
239
|
-
catch (e) {
|
|
240
|
-
reject(e);
|
|
241
|
-
} }, reject);
|
|
242
|
-
});
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (entry.isDirectory) {
|
|
246
|
-
const reader = entry.createReader();
|
|
247
|
-
const read_all = async () => new Promise((res, rej) => reader.readEntries((ents) => res(ents), rej));
|
|
248
|
-
// readEntries may return partial batches; keep reading until empty
|
|
249
|
-
for (;;) {
|
|
250
|
-
const batch = await read_all();
|
|
251
|
-
if (!batch.length)
|
|
252
|
-
break;
|
|
253
|
-
for (const child of batch) {
|
|
254
|
-
await walk_webkit_entry(child, `${prefix}${entry.name ? entry.name + "/" : ""}${child.name ? "" : ""}`);
|
|
255
|
-
// Note: child.name is already included when recursing into child; build prefix at directory level:
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
node.ondragover = (event) => {
|
|
261
|
-
event.preventDefault();
|
|
262
|
-
event.dataTransfer && (event.dataTransfer.dropEffect = "copy");
|
|
263
|
-
on_start?.(event);
|
|
264
|
-
};
|
|
265
|
-
node.ondragend = (event) => { event.preventDefault(); on_stop?.(event); };
|
|
266
|
-
node.ondrop = (event) => {
|
|
267
|
-
event.preventDefault();
|
|
268
|
-
const items = event.dataTransfer?.items;
|
|
269
|
-
if (!items)
|
|
270
|
-
return;
|
|
271
|
-
// Process each DataTransferItem
|
|
272
|
-
(async () => {
|
|
273
|
-
for (let i = 0; i < items.length; i++) {
|
|
274
|
-
const item = items[i];
|
|
275
|
-
if (item.kind !== "file")
|
|
276
|
-
continue;
|
|
277
|
-
// Prefer FS Access API if available.
|
|
278
|
-
const get_handle = item.getAsFileSystemHandle?.bind(item);
|
|
279
|
-
if (get_handle) {
|
|
280
|
-
try {
|
|
281
|
-
const handle = await get_handle();
|
|
282
|
-
// handle can be file or directory
|
|
283
|
-
await walk_fs_handle(handle, "");
|
|
284
|
-
continue;
|
|
285
|
-
}
|
|
286
|
-
catch { /* fall through to other paths */ }
|
|
287
|
-
}
|
|
288
|
-
// WebKit directory traversal fallback.
|
|
289
|
-
const entry = item.webkitGetAsEntry?.();
|
|
290
|
-
if (entry && (entry.isDirectory || entry.isFile)) {
|
|
291
|
-
try {
|
|
292
|
-
await walk_webkit_entry(entry, "");
|
|
293
|
-
continue;
|
|
294
|
-
}
|
|
295
|
-
catch { /* fall through */ }
|
|
296
|
-
}
|
|
297
|
-
// Basic file fallback: just the file (most browsers).
|
|
298
|
-
const file = item.getAsFile();
|
|
299
|
-
if (file)
|
|
300
|
-
await push_file(file, file.name);
|
|
301
|
-
}
|
|
302
|
-
})().catch((e) => on_error(e instanceof Error ? e : new Error(String(e))));
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
Attachment.on_drop = on_drop;
|
|
306
|
-
})(Attachment || (Attachment = {}));
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Daan van den Bergh
|
|
3
|
-
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
|
-
*/
|
|
5
|
-
import type { Users as UsersBackend } from "../../../backend/src/users.js";
|
|
6
|
-
import { Request } from "./request.js";
|
|
7
|
-
export declare namespace Auth {
|
|
8
|
-
/**
|
|
9
|
-
* Make a sign in request.
|
|
10
|
-
* @param payload The request payload.
|
|
11
|
-
* @docs
|
|
12
|
-
*/
|
|
13
|
-
function sign_in(payload: UsersBackend.Endpoints.SignIn["payload"]): Request.ResultPromiseFromInfo<UsersBackend.Endpoints.SignIn>;
|
|
14
|
-
/**
|
|
15
|
-
* Make a sign up request.
|
|
16
|
-
*
|
|
17
|
-
* Note that a request can be made first without the `payload.code` field,
|
|
18
|
-
* when all other fields are correctly defined it will return a {@link Status.two_factor_auth_required} backend status.
|
|
19
|
-
* Indicating a two-factor authentication challenge is sent, prompt the user to the next screen where the user can fill in the 2fa code.
|
|
20
|
-
* Then retrieve the 2fa code and resubmit the request with the code included.
|
|
21
|
-
*
|
|
22
|
-
* @param payload The request payload.
|
|
23
|
-
* @docs
|
|
24
|
-
*/
|
|
25
|
-
function sign_up(payload: UsersBackend.Endpoints.SignUp["payload"]): Request.ResultPromiseFromInfo<UsersBackend.Endpoints.SignUp>;
|
|
26
|
-
/**
|
|
27
|
-
* Make a sign out request.
|
|
28
|
-
* @docs
|
|
29
|
-
*/
|
|
30
|
-
function sign_out(): Request.ResultPromiseFromInfo<UsersBackend.Endpoints.SignOut>;
|
|
31
|
-
/**
|
|
32
|
-
* Make a send 2FA request.
|
|
33
|
-
* @param payload The request payload.
|
|
34
|
-
* @docs
|
|
35
|
-
*/
|
|
36
|
-
function send_2fa(payload: UsersBackend.Endpoints.Send2FA["payload"]): Request.ResultPromiseFromInfo<UsersBackend.Endpoints.Send2FA>;
|
|
37
|
-
/**
|
|
38
|
-
* Make a forgot password request.
|
|
39
|
-
* @param payload The request payload.
|
|
40
|
-
* @docs
|
|
41
|
-
*/
|
|
42
|
-
function forgot_password(payload: UsersBackend.Endpoints.ForgotPassword["payload"]): Request.ResultPromiseFromInfo<UsersBackend.Endpoints.ForgotPassword>;
|
|
43
|
-
}
|
|
44
|
-
export { Auth as auth };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Daan van den Bergh
|
|
3
|
-
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
|
-
*/
|
|
5
|
-
import { request } from "./request.js";
|
|
6
|
-
// Namespace.
|
|
7
|
-
export var Auth;
|
|
8
|
-
(function (Auth) {
|
|
9
|
-
/**
|
|
10
|
-
* Make a sign in request.
|
|
11
|
-
* @param payload The request payload.
|
|
12
|
-
* @docs
|
|
13
|
-
*/
|
|
14
|
-
function sign_in(payload) {
|
|
15
|
-
return request({
|
|
16
|
-
method: "POST",
|
|
17
|
-
url: "/volt/api/v1/auth/signin",
|
|
18
|
-
data: payload,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
Auth.sign_in = sign_in;
|
|
22
|
-
/**
|
|
23
|
-
* Make a sign up request.
|
|
24
|
-
*
|
|
25
|
-
* Note that a request can be made first without the `payload.code` field,
|
|
26
|
-
* when all other fields are correctly defined it will return a {@link Status.two_factor_auth_required} backend status.
|
|
27
|
-
* Indicating a two-factor authentication challenge is sent, prompt the user to the next screen where the user can fill in the 2fa code.
|
|
28
|
-
* Then retrieve the 2fa code and resubmit the request with the code included.
|
|
29
|
-
*
|
|
30
|
-
* @param payload The request payload.
|
|
31
|
-
* @docs
|
|
32
|
-
*/
|
|
33
|
-
function sign_up(payload) {
|
|
34
|
-
return request({
|
|
35
|
-
method: "POST",
|
|
36
|
-
url: "/volt/api/v1/auth/signup",
|
|
37
|
-
data: payload,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
Auth.sign_up = sign_up;
|
|
41
|
-
/**
|
|
42
|
-
* Make a sign out request.
|
|
43
|
-
* @docs
|
|
44
|
-
*/
|
|
45
|
-
function sign_out() {
|
|
46
|
-
return request({
|
|
47
|
-
method: "POST",
|
|
48
|
-
url: "/volt/api/v1/auth/signout",
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
Auth.sign_out = sign_out;
|
|
52
|
-
/**
|
|
53
|
-
* Make a send 2FA request.
|
|
54
|
-
* @param payload The request payload.
|
|
55
|
-
* @docs
|
|
56
|
-
*/
|
|
57
|
-
function send_2fa(payload) {
|
|
58
|
-
return request({
|
|
59
|
-
method: "POST",
|
|
60
|
-
url: "/volt/api/v1/auth/2fa",
|
|
61
|
-
data: payload,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
Auth.send_2fa = send_2fa;
|
|
65
|
-
/**
|
|
66
|
-
* Make a forgot password request.
|
|
67
|
-
* @param payload The request payload.
|
|
68
|
-
* @docs
|
|
69
|
-
*/
|
|
70
|
-
function forgot_password(payload) {
|
|
71
|
-
return request({
|
|
72
|
-
method: "POST",
|
|
73
|
-
url: "/volt/api/v1/auth/forgot_password",
|
|
74
|
-
data: payload,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
Auth.forgot_password = forgot_password;
|
|
78
|
-
})(Auth || (Auth = {}));
|
|
79
|
-
;
|
|
80
|
-
export { Auth as auth }; // also export as lowercase for compatibility.
|