@vandenberghinc/volt 1.1.26 → 1.1.28
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/backend/dist/cjs/{blacklist.d.ts → backend/src/blacklist.d.ts} +5 -3
- package/backend/dist/cjs/{blacklist.js → backend/src/blacklist.js} +8 -5
- package/backend/dist/cjs/{cli.js → backend/src/cli.js} +29 -47
- package/backend/dist/cjs/backend/src/database/collection.d.ts +1543 -0
- package/backend/dist/cjs/backend/src/database/collection.js +3042 -0
- package/backend/dist/cjs/backend/src/database/database.d.ts +66 -0
- package/backend/dist/cjs/{database → backend/src/database}/database.js +48 -43
- package/backend/dist/cjs/backend/src/database/filters/filters.d.ts +6 -0
- package/backend/dist/cjs/backend/src/database/filters/filters.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.js +443 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.d.ts +50 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.d.ts +76 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.d.ts +75 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.d.ts +219 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.d.ts +5 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.js +355 -0
- package/backend/dist/cjs/backend/src/database/flatten.d.ts +75 -0
- package/backend/dist/cjs/{logger.js → backend/src/database/flatten.js} +18 -7
- package/backend/dist/cjs/backend/src/database/flatten_test.js +175 -0
- package/backend/dist/cjs/backend/src/database/quota/quota.d.ts +461 -0
- package/backend/dist/cjs/backend/src/database/quota/quota.js +1014 -0
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.d.ts +534 -0
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.js +1087 -0
- package/backend/dist/cjs/backend/src/database/quota/safe_int.d.ts +293 -0
- package/backend/dist/cjs/backend/src/database/quota/safe_int.js +573 -0
- package/backend/dist/{esm → cjs/backend/src}/endpoint.d.ts +69 -46
- package/backend/dist/cjs/{endpoint.js → backend/src/endpoint.js} +87 -101
- package/backend/dist/cjs/backend/src/errors/index.d.ts +7 -0
- package/backend/dist/cjs/backend/src/errors/index.js +25 -0
- package/backend/dist/{esm/utils.d.ts → cjs/backend/src/errors/internal_external.d.ts} +14 -22
- package/backend/dist/cjs/backend/src/errors/internal_external.js +85 -0
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/backend/dist/cjs/{mutex.js → backend/src/errors/invalid_usage_error.js} +20 -37
- package/backend/dist/cjs/backend/src/errors/system_error.d.ts +230 -0
- package/backend/dist/cjs/backend/src/errors/system_error.js +393 -0
- package/backend/dist/cjs/backend/src/events.d.ts +54 -0
- package/backend/dist/cjs/backend/src/events.js +15 -0
- package/backend/dist/cjs/{frontend.js → backend/src/frontend.js} +1 -1
- package/backend/dist/cjs/{image_endpoint.d.ts → backend/src/image_endpoint.d.ts} +16 -1
- package/backend/dist/cjs/{image_endpoint.js → backend/src/image_endpoint.js} +3 -5
- package/backend/dist/cjs/backend/src/logger.d.ts +5 -0
- package/backend/dist/cjs/backend/src/logger.js +15 -0
- package/backend/dist/cjs/backend/src/meta.d.ts +64 -0
- package/backend/dist/cjs/{meta.js → backend/src/meta.js} +9 -12
- package/backend/dist/cjs/backend/src/payments/paddle.d.ts +326 -0
- package/backend/dist/cjs/{payments → backend/src/payments}/paddle.js +377 -327
- package/backend/dist/cjs/backend/src/plugins/browser.d.ts +1 -0
- package/backend/dist/cjs/backend/src/plugins/browser.js +15 -0
- package/backend/dist/cjs/backend/src/plugins/mail/mail.d.ts +248 -0
- package/backend/dist/cjs/backend/src/plugins/mail/mail.js +379 -0
- package/backend/dist/{esm → cjs/backend/src}/plugins/mail/ui.d.ts +23 -0
- package/backend/dist/cjs/backend/src/plugins/pdf.d.ts +1 -0
- package/backend/dist/cjs/backend/src/rate_limit.d.ts +145 -0
- package/backend/dist/cjs/backend/src/rate_limit.js +549 -0
- package/backend/dist/cjs/{route.d.ts → backend/src/route.d.ts} +3 -10
- package/backend/dist/cjs/{route.js → backend/src/route.js} +23 -21
- package/backend/dist/cjs/backend/src/server.d.ts +485 -0
- package/backend/dist/cjs/{server.js → backend/src/server.js} +688 -873
- package/backend/dist/cjs/backend/src/splash_screen.d.ts +80 -0
- package/backend/dist/cjs/{splash_screen.js → backend/src/splash_screen.js} +24 -3
- package/backend/dist/cjs/backend/src/status.d.ts +74 -0
- package/backend/dist/cjs/{status.js → backend/src/status.js} +64 -64
- package/backend/dist/cjs/backend/src/stream.d.ts +376 -0
- package/backend/dist/cjs/{stream.js → backend/src/stream.js} +299 -276
- package/backend/dist/cjs/backend/src/users.d.ts +807 -0
- package/backend/dist/cjs/backend/src/users.js +1971 -0
- package/backend/dist/cjs/backend/src/utils.d.ts +16 -0
- package/backend/dist/cjs/{utils.js → backend/src/utils.js} +14 -77
- package/backend/dist/{esm → cjs/backend/src}/view.d.ts +33 -11
- package/backend/dist/cjs/backend/src/view.js +508 -0
- package/backend/dist/{esm → cjs/backend/src}/volt.d.ts +10 -1
- package/backend/dist/cjs/{volt.js → backend/src/volt.js} +8 -5
- package/backend/dist/cjs/frontend/src/modules/request.d.ts +70 -0
- package/backend/dist/cjs/frontend/src/modules/request.js +99 -0
- package/backend/dist/esm/{blacklist.d.ts → backend/src/blacklist.d.ts} +5 -3
- package/backend/dist/esm/{blacklist.js → backend/src/blacklist.js} +9 -6
- package/backend/dist/esm/{cli.js → backend/src/cli.js} +43 -60
- package/backend/dist/esm/backend/src/database/collection.d.ts +1543 -0
- package/backend/dist/esm/backend/src/database/collection.js +3510 -0
- package/backend/dist/esm/backend/src/database/database.d.ts +66 -0
- package/backend/dist/esm/{database → backend/src/database}/database.js +62 -103
- package/backend/dist/esm/backend/src/database/document.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/document.js +558 -0
- package/backend/dist/esm/backend/src/database/filters/filters.d.ts +6 -0
- package/backend/dist/esm/backend/src/database/filters/filters.js +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter.js +3 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.js +505 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.js +712 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.d.ts +50 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.d.ts +76 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.js +44 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.d.ts +75 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.d.ts +219 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.js +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.d.ts +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.js +405 -0
- package/backend/dist/esm/backend/src/database/flatten.d.ts +75 -0
- package/backend/dist/esm/backend/src/database/flatten.js +22 -0
- package/backend/dist/esm/backend/src/database/flatten_test.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/flatten_test.js +174 -0
- package/backend/dist/esm/backend/src/database/quota/quota.d.ts +461 -0
- package/backend/dist/esm/backend/src/database/quota/quota.js +1118 -0
- package/backend/dist/esm/backend/src/database/quota/quota_v1.d.ts +534 -0
- package/backend/dist/esm/backend/src/database/quota/quota_v1.js +1242 -0
- package/backend/dist/esm/backend/src/database/quota/safe_int.d.ts +293 -0
- package/backend/dist/esm/backend/src/database/quota/safe_int.js +602 -0
- package/backend/dist/{cjs → esm/backend/src}/endpoint.d.ts +69 -46
- package/backend/dist/esm/{endpoint.js → backend/src/endpoint.js} +136 -127
- package/backend/dist/esm/backend/src/errors/index.d.ts +7 -0
- package/backend/dist/esm/backend/src/errors/index.js +7 -0
- package/backend/dist/{cjs/utils.d.ts → esm/backend/src/errors/internal_external.d.ts} +14 -22
- package/backend/dist/esm/backend/src/errors/internal_external.js +70 -0
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.js +30 -0
- package/backend/dist/esm/backend/src/errors/system_error.d.ts +230 -0
- package/backend/dist/esm/backend/src/errors/system_error.js +402 -0
- package/backend/dist/esm/backend/src/events.d.ts +54 -0
- package/backend/dist/esm/backend/src/events.js +5 -0
- package/backend/dist/esm/{frontend.js → backend/src/frontend.js} +1 -1
- package/backend/dist/esm/{image_endpoint.d.ts → backend/src/image_endpoint.d.ts} +16 -1
- package/backend/dist/esm/{image_endpoint.js → backend/src/image_endpoint.js} +16 -20
- package/backend/dist/esm/backend/src/logger.d.ts +5 -0
- package/backend/dist/esm/backend/src/logger.js +8 -0
- package/backend/dist/esm/backend/src/meta.d.ts +64 -0
- package/backend/dist/esm/{meta.js → backend/src/meta.js} +15 -54
- package/backend/dist/esm/backend/src/payments/paddle.d.ts +326 -0
- package/backend/dist/esm/{payments → backend/src/payments}/paddle.js +417 -452
- package/backend/dist/esm/backend/src/plugins/browser.d.ts +1 -0
- package/backend/dist/esm/backend/src/plugins/browser.js +170 -0
- package/backend/dist/esm/backend/src/plugins/mail/mail.d.ts +248 -0
- package/backend/dist/esm/backend/src/plugins/mail/mail.js +389 -0
- package/backend/dist/{cjs → esm/backend/src}/plugins/mail/ui.d.ts +23 -0
- package/backend/dist/esm/{plugins → backend/src/plugins}/mail/ui.js +3 -6
- package/backend/dist/esm/backend/src/plugins/pdf.d.ts +1 -0
- package/backend/dist/esm/{plugins → backend/src/plugins}/pdf.js +3 -3
- package/backend/dist/esm/backend/src/rate_limit.d.ts +145 -0
- package/backend/dist/esm/backend/src/rate_limit.js +667 -0
- package/backend/dist/esm/{route.d.ts → backend/src/route.d.ts} +3 -10
- package/backend/dist/esm/{route.js → backend/src/route.js} +26 -21
- package/backend/dist/esm/backend/src/server.d.ts +485 -0
- package/backend/dist/esm/{server.js → backend/src/server.js} +891 -1441
- package/backend/dist/esm/backend/src/splash_screen.d.ts +80 -0
- package/backend/dist/esm/{splash_screen.js → backend/src/splash_screen.js} +42 -55
- package/backend/dist/esm/backend/src/status.d.ts +74 -0
- package/backend/dist/esm/backend/src/status.js +199 -0
- package/backend/dist/esm/backend/src/stream.d.ts +376 -0
- package/backend/dist/esm/{stream.js → backend/src/stream.js} +327 -292
- package/backend/dist/esm/backend/src/users.d.ts +809 -0
- package/backend/dist/esm/backend/src/users.js +2140 -0
- package/backend/dist/esm/backend/src/utils.d.ts +16 -0
- package/backend/dist/esm/{utils.js → backend/src/utils.js} +20 -81
- package/backend/dist/{cjs → esm/backend/src}/view.d.ts +33 -11
- package/backend/dist/esm/{view.js → backend/src/view.js} +266 -86
- package/backend/dist/{cjs → esm/backend/src}/volt.d.ts +10 -1
- package/backend/dist/esm/{volt.js → backend/src/volt.js} +7 -4
- package/backend/dist/esm/frontend/src/modules/request.d.ts +70 -0
- package/backend/dist/esm/frontend/src/modules/request.js +117 -0
- package/frontend/dist/backend/src/database/collection.d.ts +1543 -0
- package/frontend/dist/backend/src/database/collection.js +3510 -0
- package/frontend/dist/backend/src/database/database.d.ts +66 -0
- package/frontend/dist/backend/src/database/database.js +196 -0
- package/frontend/dist/backend/src/database/filters/filters.d.ts +6 -0
- package/frontend/dist/backend/src/database/filters/filters.js +1 -0
- package/frontend/dist/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/frontend/dist/backend/src/database/filters/strict_filter.js +3 -0
- package/frontend/dist/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/frontend/dist/backend/src/database/filters/strict_update_filter.js +5 -0
- package/frontend/dist/backend/src/database/flatten.d.ts +75 -0
- package/frontend/dist/backend/src/database/flatten.js +22 -0
- package/frontend/dist/backend/src/endpoint.d.ts +204 -0
- package/frontend/dist/backend/src/endpoint.js +570 -0
- package/frontend/dist/backend/src/errors/index.d.ts +7 -0
- package/frontend/dist/backend/src/errors/index.js +7 -0
- package/frontend/dist/backend/src/errors/internal_external.d.ts +38 -0
- package/frontend/dist/backend/src/errors/internal_external.js +70 -0
- package/frontend/dist/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/frontend/dist/backend/src/errors/invalid_usage_error.js +30 -0
- package/frontend/dist/backend/src/errors/system_error.d.ts +230 -0
- package/frontend/dist/backend/src/errors/system_error.js +402 -0
- package/frontend/dist/backend/src/events.d.ts +54 -0
- package/frontend/dist/backend/src/events.js +5 -0
- package/frontend/dist/backend/src/frontend.d.ts +11 -0
- package/frontend/dist/backend/src/frontend.js +12 -0
- package/frontend/dist/backend/src/image_endpoint.d.ts +39 -0
- package/frontend/dist/backend/src/image_endpoint.js +202 -0
- package/frontend/dist/backend/src/meta.d.ts +64 -0
- package/frontend/dist/backend/src/meta.js +110 -0
- package/frontend/dist/backend/src/payments/paddle.d.ts +326 -0
- package/frontend/dist/backend/src/payments/paddle.js +2256 -0
- package/frontend/dist/backend/src/plugins/mail/mail.d.ts +248 -0
- package/frontend/dist/backend/src/plugins/mail/mail.js +389 -0
- package/{backend/dist/esm/plugins/mail.d.ts → frontend/dist/backend/src/plugins/mail/ui.d.ts} +23 -0
- package/{backend/dist/esm/plugins/mail.js → frontend/dist/backend/src/plugins/mail/ui.js} +3 -6
- package/frontend/dist/backend/src/rate_limit.d.ts +145 -0
- package/frontend/dist/backend/src/rate_limit.js +673 -0
- package/frontend/dist/backend/src/route.d.ts +35 -0
- package/frontend/dist/backend/src/route.js +212 -0
- package/frontend/dist/backend/src/server.d.ts +485 -0
- package/frontend/dist/backend/src/server.js +2670 -0
- package/frontend/dist/backend/src/splash_screen.d.ts +80 -0
- package/frontend/dist/backend/src/splash_screen.js +135 -0
- package/frontend/dist/backend/src/status.d.ts +74 -0
- package/frontend/dist/backend/src/status.js +199 -0
- package/frontend/dist/backend/src/stream.d.ts +376 -0
- package/frontend/dist/backend/src/stream.js +1007 -0
- package/frontend/dist/backend/src/users.d.ts +807 -0
- package/frontend/dist/backend/src/users.js +2118 -0
- package/frontend/dist/backend/src/utils.d.ts +16 -0
- package/frontend/dist/backend/src/utils.js +241 -0
- package/frontend/dist/backend/src/view.d.ts +162 -0
- package/frontend/dist/backend/src/view.js +720 -0
- package/frontend/dist/frontend/src/elements/base.d.ts +4414 -0
- package/frontend/dist/{elements → frontend/src/elements}/base.js +3624 -260
- package/frontend/dist/frontend/src/elements/module.d.ts +95 -0
- package/frontend/dist/{elements → frontend/src/elements}/module.js +53 -52
- package/frontend/dist/frontend/src/elements/types.d.ts +52 -0
- package/frontend/dist/frontend/src/elements/types.js +5 -0
- package/frontend/dist/frontend/src/modules/attachment.d.ts +126 -0
- package/frontend/dist/frontend/src/modules/attachment.js +306 -0
- package/frontend/dist/frontend/src/modules/auth.d.ts +44 -0
- package/frontend/dist/frontend/src/modules/auth.js +80 -0
- package/frontend/dist/{modules → frontend/src/modules}/color.js +2 -2
- package/frontend/dist/frontend/src/modules/compression.d.ts +39 -0
- package/frontend/dist/frontend/src/modules/compression.js +102 -0
- package/frontend/dist/frontend/src/modules/cookies.d.ts +44 -0
- package/frontend/dist/frontend/src/modules/cookies.js +143 -0
- package/frontend/dist/frontend/src/modules/events.d.ts +31 -0
- package/frontend/dist/frontend/src/modules/events.js +74 -0
- package/frontend/dist/frontend/src/modules/google.d.ts +23 -0
- package/frontend/dist/frontend/src/modules/google.js +52 -0
- package/frontend/dist/frontend/src/modules/meta.d.ts +14 -0
- package/frontend/dist/{modules → frontend/src/modules}/meta.js +9 -7
- package/frontend/dist/{modules → frontend/src/modules}/paddle.d.ts +37 -134
- package/frontend/dist/{modules → frontend/src/modules}/paddle.js +620 -568
- package/frontend/dist/frontend/src/modules/request.d.ts +70 -0
- package/frontend/dist/frontend/src/modules/request.js +117 -0
- package/frontend/dist/frontend/src/modules/settings.d.ts +3 -0
- package/frontend/dist/frontend/src/modules/settings.js +5 -0
- package/frontend/dist/frontend/src/modules/statics.d.ts +21 -0
- package/frontend/dist/{modules → frontend/src/modules}/statics.js +15 -18
- package/frontend/dist/frontend/src/modules/support.d.ts +30 -0
- package/frontend/dist/frontend/src/modules/support.js +53 -0
- package/frontend/dist/{modules → frontend/src/modules}/theme.d.ts +67 -0
- package/frontend/dist/{modules → frontend/src/modules}/theme.js +68 -38
- package/frontend/dist/frontend/src/modules/themes.d.ts +12 -0
- package/frontend/dist/frontend/src/modules/themes.js +22 -0
- package/frontend/dist/frontend/src/modules/user.d.ts +164 -0
- package/frontend/dist/frontend/src/modules/user.js +268 -0
- package/frontend/dist/frontend/src/modules/utils.d.ts +176 -0
- package/frontend/dist/frontend/src/modules/utils.js +569 -0
- package/frontend/dist/frontend/src/types/gradient.d.ts +29 -0
- package/frontend/dist/{types → frontend/src/types}/gradient.js +14 -18
- package/frontend/dist/frontend/src/ui/border_button.d.ts +94 -0
- package/frontend/dist/{ui → frontend/src/ui}/border_button.js +7 -13
- package/frontend/dist/frontend/src/ui/button.d.ts +28 -0
- package/frontend/dist/{ui → frontend/src/ui}/button.js +21 -12
- package/frontend/dist/frontend/src/ui/canvas.d.ts +138 -0
- package/frontend/dist/{ui → frontend/src/ui}/canvas.js +88 -55
- package/frontend/dist/frontend/src/ui/checkbox.d.ts +74 -0
- package/frontend/dist/{ui → frontend/src/ui}/checkbox.js +80 -41
- package/frontend/dist/{ui → frontend/src/ui}/code.d.ts +73 -6
- package/frontend/dist/{ui → frontend/src/ui}/code.js +55 -52
- package/frontend/dist/{ui → frontend/src/ui}/context_menu.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/context_menu.js +12 -17
- package/frontend/dist/{ui → frontend/src/ui}/css.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/css.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/divider.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/divider.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/dropdown.d.ts +57 -2
- package/frontend/dist/{ui → frontend/src/ui}/dropdown.js +87 -94
- package/frontend/dist/{ui → frontend/src/ui}/for_each.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/for_each.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/form.d.ts +6 -2
- package/frontend/dist/{ui → frontend/src/ui}/form.js +10 -7
- package/frontend/dist/frontend/src/ui/frame_modes.d.ts +37 -0
- package/frontend/dist/{ui → frontend/src/ui}/frame_modes.js +16 -22
- package/frontend/dist/{ui → frontend/src/ui}/google_map.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/google_map.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/gradient.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/gradient.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/image.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/image.js +5 -5
- package/frontend/dist/frontend/src/ui/input.d.ts +392 -0
- package/frontend/dist/{ui → frontend/src/ui}/input.js +346 -360
- package/frontend/dist/{ui → frontend/src/ui}/link.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/link.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/list.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/list.js +12 -6
- package/frontend/dist/frontend/src/ui/loader_button.d.ts +80 -0
- package/frontend/dist/{ui → frontend/src/ui}/loader_button.js +35 -47
- package/frontend/dist/frontend/src/ui/loaders.d.ts +57 -0
- package/frontend/dist/{ui → frontend/src/ui}/loaders.js +11 -11
- package/frontend/dist/{ui → frontend/src/ui}/popup.d.ts +11 -6
- package/frontend/dist/{ui → frontend/src/ui}/popup.js +32 -18
- package/frontend/dist/frontend/src/ui/pseudo.d.ts +44 -0
- package/frontend/dist/{ui → frontend/src/ui}/pseudo.js +84 -8
- package/frontend/dist/{ui → frontend/src/ui}/scroller.d.ts +14 -2
- package/frontend/dist/{ui → frontend/src/ui}/scroller.js +37 -43
- package/frontend/dist/{ui → frontend/src/ui}/slider.d.ts +5 -1
- package/frontend/dist/{ui → frontend/src/ui}/slider.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/spacer.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/spacer.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/span.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/span.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/stack.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/stack.js +3 -9
- package/frontend/dist/frontend/src/ui/steps.d.ts +131 -0
- package/frontend/dist/{ui → frontend/src/ui}/steps.js +30 -45
- package/frontend/dist/{ui → frontend/src/ui}/style.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/style.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/switch.d.ts +5 -1
- package/frontend/dist/{ui → frontend/src/ui}/switch.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/table.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/table.js +6 -6
- package/frontend/dist/{ui → frontend/src/ui}/tabs.d.ts +45 -3
- package/frontend/dist/{ui → frontend/src/ui}/tabs.js +65 -40
- package/frontend/dist/{ui → frontend/src/ui}/text.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/text.js +3 -3
- package/frontend/dist/frontend/src/ui/title.d.ts +91 -0
- package/frontend/dist/frontend/src/ui/title.js +272 -0
- package/frontend/dist/{ui → frontend/src/ui}/view.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/view.js +3 -3
- package/frontend/dist/{volt.d.ts → frontend/src/volt.d.ts} +3 -0
- package/frontend/dist/{volt.js → frontend/src/volt.js} +4 -0
- package/frontend/tools/bundle_d_ts.js +71 -0
- package/frontend/tools/convert_to_jsdoc_input.txt +9452 -0
- package/frontend/tools/convert_to_jsdoc_output.txt +7626 -0
- package/frontend/tools/convert_to_jsdoc_tmp.js +345 -0
- package/package.json +11 -12
- package/backend/dist/cjs/database/collection.d.ts +0 -160
- package/backend/dist/cjs/database/collection.js +0 -842
- package/backend/dist/cjs/database/database.d.ts +0 -121
- package/backend/dist/cjs/database/document.d.ts +0 -131
- package/backend/dist/cjs/database/document.js +0 -224
- package/backend/dist/cjs/database.d.ts +0 -502
- package/backend/dist/cjs/database.js +0 -2248
- package/backend/dist/cjs/logger.d.ts +0 -3
- package/backend/dist/cjs/meta.d.ts +0 -50
- package/backend/dist/cjs/mutex.d.ts +0 -24
- package/backend/dist/cjs/payments/paddle.d.ts +0 -160
- package/backend/dist/cjs/plugins/browser.d.ts +0 -36
- package/backend/dist/cjs/plugins/browser.js +0 -198
- package/backend/dist/cjs/plugins/css.d.ts +0 -11
- package/backend/dist/cjs/plugins/css.js +0 -80
- package/backend/dist/cjs/plugins/mail.d.ts +0 -277
- package/backend/dist/cjs/plugins/mail.js +0 -1370
- package/backend/dist/cjs/plugins/ts/compiler.d.ts +0 -139
- package/backend/dist/cjs/plugins/ts/compiler.js +0 -750
- package/backend/dist/cjs/plugins/ts/preprocessing.d.ts +0 -14
- package/backend/dist/cjs/plugins/ts/preprocessing.js +0 -440
- package/backend/dist/cjs/rate_limit.d.ts +0 -63
- package/backend/dist/cjs/rate_limit.js +0 -348
- package/backend/dist/cjs/request.deprc.d.ts +0 -48
- package/backend/dist/cjs/request.deprc.js +0 -572
- package/backend/dist/cjs/response.deprc.d.ts +0 -55
- package/backend/dist/cjs/response.deprc.js +0 -275
- package/backend/dist/cjs/server.d.ts +0 -342
- package/backend/dist/cjs/splash_screen.d.ts +0 -35
- package/backend/dist/cjs/status.d.ts +0 -61
- package/backend/dist/cjs/stream.d.ts +0 -79
- package/backend/dist/cjs/users.d.ts +0 -111
- package/backend/dist/cjs/users.js +0 -1817
- package/backend/dist/cjs/view.js +0 -352
- package/backend/dist/cjs/vinc.dev.d.ts +0 -3
- package/backend/dist/cjs/vinc.dev.js +0 -7
- package/backend/dist/css/adyen.css +0 -92
- package/backend/dist/css/volt.css +0 -70
- package/backend/dist/esm/database/collection.d.ts +0 -160
- package/backend/dist/esm/database/collection.js +0 -1328
- package/backend/dist/esm/database/database.d.ts +0 -121
- package/backend/dist/esm/database/document.d.ts +0 -131
- package/backend/dist/esm/database/document.js +0 -247
- package/backend/dist/esm/database.d.ts +0 -502
- package/backend/dist/esm/database.js +0 -2423
- package/backend/dist/esm/file_watcher.js +0 -329
- package/backend/dist/esm/logger.d.ts +0 -3
- package/backend/dist/esm/logger.js +0 -11
- package/backend/dist/esm/meta.d.ts +0 -50
- package/backend/dist/esm/mutex.d.ts +0 -24
- package/backend/dist/esm/mutex.js +0 -48
- package/backend/dist/esm/payments/paddle.d.ts +0 -160
- package/backend/dist/esm/plugins/browser.d.ts +0 -36
- package/backend/dist/esm/plugins/browser.js +0 -176
- package/backend/dist/esm/plugins/css.d.ts +0 -11
- package/backend/dist/esm/plugins/css.js +0 -90
- package/backend/dist/esm/plugins/ts/compiler.d.ts +0 -139
- package/backend/dist/esm/plugins/ts/compiler.js +0 -1194
- package/backend/dist/esm/plugins/ts/preprocessing.d.ts +0 -14
- package/backend/dist/esm/plugins/ts/preprocessing.js +0 -726
- package/backend/dist/esm/rate_limit.d.ts +0 -63
- package/backend/dist/esm/rate_limit.js +0 -417
- package/backend/dist/esm/request.deprc.d.ts +0 -48
- package/backend/dist/esm/request.deprc.js +0 -572
- package/backend/dist/esm/response.deprc.d.ts +0 -55
- package/backend/dist/esm/response.deprc.js +0 -275
- package/backend/dist/esm/server.d.ts +0 -342
- package/backend/dist/esm/splash_screen.d.ts +0 -35
- package/backend/dist/esm/status.d.ts +0 -61
- package/backend/dist/esm/status.js +0 -197
- package/backend/dist/esm/stream.d.ts +0 -79
- package/backend/dist/esm/users.d.ts +0 -111
- package/backend/dist/esm/users.js +0 -1935
- package/backend/dist/esm/vinc.dev.d.ts +0 -3
- package/backend/dist/esm/vinc.dev.js +0 -7
- package/frontend/dist/elements/base.d.ts +0 -9889
- package/frontend/dist/elements/module.d.ts +0 -30
- package/frontend/dist/modules/array.d.ts +0 -94
- package/frontend/dist/modules/array.js +0 -634
- package/frontend/dist/modules/auth.d.ts +0 -46
- package/frontend/dist/modules/auth.js +0 -139
- package/frontend/dist/modules/colors.d.ts +0 -1
- package/frontend/dist/modules/colors.js +0 -417
- package/frontend/dist/modules/compression.d.ts +0 -6
- package/frontend/dist/modules/compression.js +0 -999
- package/frontend/dist/modules/cookies.d.ts +0 -18
- package/frontend/dist/modules/cookies.js +0 -167
- package/frontend/dist/modules/date.d.ts +0 -142
- package/frontend/dist/modules/date.js +0 -493
- package/frontend/dist/modules/events.d.ts +0 -8
- package/frontend/dist/modules/events.js +0 -91
- package/frontend/dist/modules/google.d.ts +0 -11
- package/frontend/dist/modules/google.js +0 -54
- package/frontend/dist/modules/meta.d.ts +0 -10
- package/frontend/dist/modules/mutex.d.ts +0 -7
- package/frontend/dist/modules/mutex.js +0 -51
- package/frontend/dist/modules/number.d.ts +0 -16
- package/frontend/dist/modules/number.js +0 -23
- package/frontend/dist/modules/object.d.ts +0 -52
- package/frontend/dist/modules/object.js +0 -383
- package/frontend/dist/modules/scheme.d.ts +0 -227
- package/frontend/dist/modules/scheme.js +0 -531
- package/frontend/dist/modules/settings.d.ts +0 -3
- package/frontend/dist/modules/settings.js +0 -4
- package/frontend/dist/modules/statics.d.ts +0 -5
- package/frontend/dist/modules/string.d.ts +0 -124
- package/frontend/dist/modules/string.js +0 -745
- package/frontend/dist/modules/support.d.ts +0 -19
- package/frontend/dist/modules/support.js +0 -103
- package/frontend/dist/modules/themes.d.ts +0 -8
- package/frontend/dist/modules/themes.js +0 -18
- package/frontend/dist/modules/user.d.ts +0 -59
- package/frontend/dist/modules/user.js +0 -280
- package/frontend/dist/modules/utils.d.ts +0 -87
- package/frontend/dist/modules/utils.js +0 -923
- package/frontend/dist/types/gradient.d.ts +0 -12
- package/frontend/dist/ui/border_button.d.ts +0 -152
- package/frontend/dist/ui/button.d.ts +0 -21
- package/frontend/dist/ui/canvas.d.ts +0 -56
- package/frontend/dist/ui/checkbox.d.ts +0 -52
- package/frontend/dist/ui/frame_modes.d.ts +0 -25
- package/frontend/dist/ui/input.d.ts +0 -241
- package/frontend/dist/ui/loader_button.d.ts +0 -93
- package/frontend/dist/ui/loaders.d.ts +0 -57
- package/frontend/dist/ui/pseudo.d.ts +0 -16
- package/frontend/dist/ui/steps.d.ts +0 -59
- package/frontend/dist/ui/title.d.ts +0 -21
- package/frontend/dist/ui/title.js +0 -121
- package/frontend/examples/dashboard/dashboard.ts +0 -776
- /package/backend/dist/cjs/{cli.d.ts → backend/src/cli.d.ts} +0 -0
- /package/backend/dist/cjs/{file_watcher.d.ts → backend/src/database/document.d.ts} +0 -0
- /package/backend/dist/cjs/{file_watcher.js → backend/src/database/document.js} +0 -0
- /package/backend/dist/cjs/{plugins/pdf.d.ts → backend/src/database/filters/strict_filter_test.d.ts} +0 -0
- /package/backend/dist/{esm/file_watcher.d.ts → cjs/backend/src/database/filters/strict_filter_test_v0.d.ts} +0 -0
- /package/backend/dist/{esm/plugins/pdf.d.ts → cjs/backend/src/database/flatten_test.d.ts} +0 -0
- /package/backend/dist/cjs/{frontend.d.ts → backend/src/frontend.d.ts} +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/communication.d.ts +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/communication.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/mail/ui.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/pdf.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/thread_monitor.d.ts +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/thread_monitor.js +0 -0
- /package/backend/dist/cjs/{vinc.d.ts → backend/src/vinc.d.ts} +0 -0
- /package/backend/dist/cjs/{vinc.js → backend/src/vinc.js} +0 -0
- /package/backend/dist/esm/{cli.d.ts → backend/src/cli.d.ts} +0 -0
- /package/backend/dist/esm/{frontend.d.ts → backend/src/frontend.d.ts} +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/communication.d.ts +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/communication.js +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/thread_monitor.d.ts +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/thread_monitor.js +0 -0
- /package/backend/dist/esm/{vinc.d.ts → backend/src/vinc.d.ts} +0 -0
- /package/backend/dist/esm/{vinc.js → backend/src/vinc.js} +0 -0
- /package/frontend/dist/{elements → frontend/src/elements}/register_element.d.ts +0 -0
- /package/frontend/dist/{elements → frontend/src/elements}/register_element.js +0 -0
- /package/frontend/dist/{modules → frontend/src/modules}/color.d.ts +0 -0
- /package/frontend/dist/{ui → frontend/src/ui}/ui.d.ts +0 -0
- /package/frontend/dist/{ui → frontend/src/ui}/ui.js +0 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
import * as vlib from "@vandenberghinc/vlib";
|
|
6
|
+
import { Server } from "../server.js";
|
|
7
|
+
import type { Request } from "../../../frontend/src/modules/request.js";
|
|
8
|
+
/**
|
|
9
|
+
* The product object.
|
|
10
|
+
* @warning This object is publicly accessible by the frontend.
|
|
11
|
+
*/
|
|
12
|
+
export type Product = Product.OneTime | Product.Subscription;
|
|
13
|
+
export declare namespace Product {
|
|
14
|
+
/** The interface for a one-time product. */
|
|
15
|
+
interface OneTime {
|
|
16
|
+
/**
|
|
17
|
+
* The id of product
|
|
18
|
+
* @warning The id can not be changed
|
|
19
|
+
* @warning The id must be unique across all your products.
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/** The name of the product. */
|
|
23
|
+
name: string;
|
|
24
|
+
/** The price of the product, digits after the decimal are the minor units (e.g. cents). */
|
|
25
|
+
price: number;
|
|
26
|
+
/** The ISO currency code of the price. */
|
|
27
|
+
currency: string;
|
|
28
|
+
/** The tax category https://developer.paddle.com/api-reference/products/create-product. */
|
|
29
|
+
tax_category: string;
|
|
30
|
+
/** The icon url of the product, may also be an endpoint url of your website. */
|
|
31
|
+
icon?: string;
|
|
32
|
+
/** The products description. */
|
|
33
|
+
description: string;
|
|
34
|
+
/** Is this product a subscription product. */
|
|
35
|
+
is_subscription?: false;
|
|
36
|
+
/** System attribute. */
|
|
37
|
+
price_id?: string;
|
|
38
|
+
/** System attribute. */
|
|
39
|
+
paddle_prod_id?: string;
|
|
40
|
+
}
|
|
41
|
+
/** The interface for a subscription product. */
|
|
42
|
+
interface Subscription extends Omit<OneTime, "is_subscription"> {
|
|
43
|
+
/** The recurring frequency, when this is defined a product will become a subscription product. */
|
|
44
|
+
frequency: number;
|
|
45
|
+
/** The recurring interval, when this is defined a product will become a subscription product. */
|
|
46
|
+
interval: 'day' | 'week' | 'month' | 'year';
|
|
47
|
+
/** The plans for this subscription product. Every item is a product object. However, attributes `currency`, `frequency`, `interval`, `tax_category` and `icon` can either be defined in the subscription product or on each individual plan. */
|
|
48
|
+
plans: Product.Subscription[];
|
|
49
|
+
/** The trial settings for this product. Leave undefined to disable a trialing period. This attribute will be ignored for one-time payments. */
|
|
50
|
+
trial?: {
|
|
51
|
+
/** The trial frequency. */
|
|
52
|
+
frequency: number;
|
|
53
|
+
/** The trial interval. */
|
|
54
|
+
interval: 'day' | 'week' | 'month' | 'year';
|
|
55
|
+
} | null;
|
|
56
|
+
/** Is this product a subscription product. */
|
|
57
|
+
is_subscription: true;
|
|
58
|
+
/** System attribute. */
|
|
59
|
+
subscription_id?: string;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The payment billing details.
|
|
64
|
+
* @warning This object should not be exposed to the public unless authenticated.
|
|
65
|
+
*/
|
|
66
|
+
export interface PaymentBillingDetails {
|
|
67
|
+
name?: string;
|
|
68
|
+
email?: string;
|
|
69
|
+
business?: string;
|
|
70
|
+
vat_id?: string;
|
|
71
|
+
address?: string;
|
|
72
|
+
city?: string;
|
|
73
|
+
postal_code?: string;
|
|
74
|
+
province?: string;
|
|
75
|
+
country?: string;
|
|
76
|
+
tax_identifier?: string;
|
|
77
|
+
}
|
|
78
|
+
/** A payment line item. */
|
|
79
|
+
export interface LineItem {
|
|
80
|
+
product: string;
|
|
81
|
+
item_id: string;
|
|
82
|
+
paddle_prod_id: string;
|
|
83
|
+
quantity: number;
|
|
84
|
+
tax_rate: number;
|
|
85
|
+
tax: number;
|
|
86
|
+
discount: number;
|
|
87
|
+
subtotal: number;
|
|
88
|
+
total: number;
|
|
89
|
+
status: "paid" | "refunded" | "refunding";
|
|
90
|
+
}
|
|
91
|
+
/** Nested types for the {@link LineItem} interface. */
|
|
92
|
+
export declare namespace LineItem {
|
|
93
|
+
/** Validation schema. */
|
|
94
|
+
const Schema: vlib.Schema.Entries.Opts;
|
|
95
|
+
}
|
|
96
|
+
/** An expanded payment line item. */
|
|
97
|
+
export interface ExpandedLineItem extends Omit<LineItem, 'product'> {
|
|
98
|
+
product: Product;
|
|
99
|
+
}
|
|
100
|
+
/** The possible values for {@link Payment.status} */
|
|
101
|
+
export type PaymentStatus = 'open' | 'paid' | 'past_due' | 'unknown';
|
|
102
|
+
export declare const PaymentStatusValues: PaymentStatus[];
|
|
103
|
+
/** The interface for a saved payment. */
|
|
104
|
+
export interface Payment {
|
|
105
|
+
id: string;
|
|
106
|
+
uid: string;
|
|
107
|
+
/** The paddle customer id. */
|
|
108
|
+
cus_id: string;
|
|
109
|
+
tran_id: string;
|
|
110
|
+
timestamp: number;
|
|
111
|
+
status: PaymentStatus;
|
|
112
|
+
line_items: LineItem[];
|
|
113
|
+
billing_details: PaymentBillingDetails;
|
|
114
|
+
sub_id?: string;
|
|
115
|
+
}
|
|
116
|
+
/** The interface for retrieving payments. */
|
|
117
|
+
export interface GetPaymentsOpts<Public extends boolean = false> {
|
|
118
|
+
/** The user id. */
|
|
119
|
+
uid: string;
|
|
120
|
+
/** Since days. */
|
|
121
|
+
days?: number;
|
|
122
|
+
/** Limit */
|
|
123
|
+
limit?: number;
|
|
124
|
+
/** Filter by status. */
|
|
125
|
+
status?: PaymentStatus | PaymentStatus[];
|
|
126
|
+
/** Anonymizes the billing details if the payment uid is undefined. */
|
|
127
|
+
for_public?: Public;
|
|
128
|
+
}
|
|
129
|
+
/** Nested types for the {@link Payment} interface. */
|
|
130
|
+
export declare namespace Payment {
|
|
131
|
+
/**
|
|
132
|
+
* Semi-public payment object
|
|
133
|
+
* where billing_details are omitted if the uid is undefined.
|
|
134
|
+
*/
|
|
135
|
+
type Public = vlib.Types.Optional<Payment, "billing_details">;
|
|
136
|
+
/** Get as public or full by generic. */
|
|
137
|
+
type PublicBy<IsPublic extends boolean> = IsPublic extends true ? Public : Payment;
|
|
138
|
+
/**
|
|
139
|
+
* Check if a payment should be anonymized,
|
|
140
|
+
* if so return a public version of the payment.
|
|
141
|
+
*/
|
|
142
|
+
function anonymize(payment: Payment): Public;
|
|
143
|
+
}
|
|
144
|
+
/** The expanded payment interface. */
|
|
145
|
+
export interface ExpandedPayment extends Omit<Payment, 'line_items'> {
|
|
146
|
+
line_items: ExpandedLineItem[];
|
|
147
|
+
}
|
|
148
|
+
/** The possible values for {@link Subscriptino.status} */
|
|
149
|
+
export type SubscriptionStatus = 'active' | 'cancelling' | 'cancelled';
|
|
150
|
+
/** The interface for a subscription. */
|
|
151
|
+
export interface Subscription {
|
|
152
|
+
uid: string;
|
|
153
|
+
id: string;
|
|
154
|
+
cus_id: string;
|
|
155
|
+
status: SubscriptionStatus;
|
|
156
|
+
plans: string[];
|
|
157
|
+
}
|
|
158
|
+
/** The interface for an active subscription. */
|
|
159
|
+
export interface ActiveSubscription {
|
|
160
|
+
uid: string;
|
|
161
|
+
prod_id: string;
|
|
162
|
+
sub_id: string;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The paddle payments class.
|
|
166
|
+
*
|
|
167
|
+
* Sandbox env: https://sandbox-vendors.paddle.com
|
|
168
|
+
*
|
|
169
|
+
* @nav Backend/Payments
|
|
170
|
+
* @docs
|
|
171
|
+
* @deprecated Using stripe from now on.
|
|
172
|
+
*/
|
|
173
|
+
export declare class Paddle {
|
|
174
|
+
type: string;
|
|
175
|
+
private client_key;
|
|
176
|
+
private sandbox;
|
|
177
|
+
private inclusive_tax;
|
|
178
|
+
private products;
|
|
179
|
+
private server;
|
|
180
|
+
private _host;
|
|
181
|
+
private _headers;
|
|
182
|
+
private webhook_key?;
|
|
183
|
+
private _has_create_products_permission?;
|
|
184
|
+
private _last_products_db;
|
|
185
|
+
private _webhook_conf_db;
|
|
186
|
+
private _sub_db;
|
|
187
|
+
private _active_sub_db;
|
|
188
|
+
private _pay_db;
|
|
189
|
+
private performance;
|
|
190
|
+
constructor({ api_key, client_key, sandbox, products, inclusive_tax, _server, }: Paddle.Opts & {
|
|
191
|
+
_server: Server;
|
|
192
|
+
});
|
|
193
|
+
private _req;
|
|
194
|
+
private _add_subscription;
|
|
195
|
+
private _delete_subscription;
|
|
196
|
+
private _check_subscription;
|
|
197
|
+
private _get_active_subscriptions;
|
|
198
|
+
private _save_subscription;
|
|
199
|
+
private _load_subscription;
|
|
200
|
+
private _get_subscriptions;
|
|
201
|
+
private _save_payment;
|
|
202
|
+
private _load_payment;
|
|
203
|
+
private _load_payment_for_public;
|
|
204
|
+
private _load_payment_by_transaction;
|
|
205
|
+
private _load_payment_by_transaction_for_public;
|
|
206
|
+
private _delete_payment;
|
|
207
|
+
_delete_user(uid: string): Promise<void>;
|
|
208
|
+
_get_all_active_subscriptions(): Promise<ActiveSubscription[]>;
|
|
209
|
+
private _get_product_by_paddle_prod_id;
|
|
210
|
+
private _get_products;
|
|
211
|
+
private _get_prices;
|
|
212
|
+
private _check_product;
|
|
213
|
+
private _cancel_subscription;
|
|
214
|
+
private _initialize_products;
|
|
215
|
+
_initialize(): Promise<void>;
|
|
216
|
+
private _exec_user_callback;
|
|
217
|
+
private _payment_webhook;
|
|
218
|
+
private _subscription_webhook;
|
|
219
|
+
private _subscription_cancelled_webhook;
|
|
220
|
+
private _adjustment_webhook;
|
|
221
|
+
private _create_webhook;
|
|
222
|
+
get_product(id: string): Promise<Product | null>;
|
|
223
|
+
get_product(id: string, throw_err: true): Promise<Product>;
|
|
224
|
+
get_product(id: string, throw_err: boolean): Promise<Product | null>;
|
|
225
|
+
get_product_sync(id: string): Product | null;
|
|
226
|
+
get_product_sync(id: string, throw_err: true): Product;
|
|
227
|
+
get_product_sync(id: string, throw_err: boolean): Product | null;
|
|
228
|
+
get_payment(id: string, opts?: {
|
|
229
|
+
for_public?: boolean;
|
|
230
|
+
}): Promise<vlib.Types.Optional<Payment, "billing_details">>;
|
|
231
|
+
get_payments<Public extends boolean = false>({ uid, days, limit, status, for_public, }: GetPaymentsOpts<Public>): Promise<Payment.PublicBy<Public>[]>;
|
|
232
|
+
get_refundable_payments<Public extends boolean = false>({ uid, days, limit, for_public, }: Omit<GetPaymentsOpts<Public>, "status">): Promise<Payment.PublicBy<Public>[]>;
|
|
233
|
+
get_refunded_payments<Public extends boolean = false>({ uid, days, limit, for_public, }: Omit<GetPaymentsOpts<Public>, "status">): Promise<Payment.PublicBy<Public>[]>;
|
|
234
|
+
get_refunding_payments<Public extends boolean = false>({ uid, days, limit, for_public, }: Omit<GetPaymentsOpts<Public>, "status">): Promise<Payment.PublicBy<Public>[]>;
|
|
235
|
+
create_refund(payment: Payment | string, line_items?: LineItem[] | undefined, reason?: string): Promise<void>;
|
|
236
|
+
cancel_subscription(uid: string, products: string | (string | Product)[], _throw_no_cancelled_err?: boolean): Promise<void>;
|
|
237
|
+
cancel_subscription_by_id(subscription: string | Subscription, immediate?: boolean): Promise<void>;
|
|
238
|
+
get_active_subscriptions(uid: string): Promise<string[]>;
|
|
239
|
+
get_subscriptions(uid: string): Promise<Subscription[]>;
|
|
240
|
+
is_subscribed(uid: string, product: string): Promise<boolean>;
|
|
241
|
+
generate_invoice(payment: Payment | ExpandedPayment): Promise<Buffer>;
|
|
242
|
+
dev_cancel_all_subscriptions(): Promise<void>;
|
|
243
|
+
}
|
|
244
|
+
/** Nested types for the {@link Paddle} class */
|
|
245
|
+
export declare namespace Paddle {
|
|
246
|
+
/** Constructor options. */
|
|
247
|
+
interface Opts {
|
|
248
|
+
/** The paddle API key. */
|
|
249
|
+
api_key: string;
|
|
250
|
+
/** The paddle client key. */
|
|
251
|
+
client_key: string;
|
|
252
|
+
/** Whether to use the sandbox environment. */
|
|
253
|
+
sandbox?: boolean;
|
|
254
|
+
/** The list of products to be created. */
|
|
255
|
+
products?: Product[];
|
|
256
|
+
/** Whether to include tax in the prices. */
|
|
257
|
+
inclusive_tax?: boolean;
|
|
258
|
+
}
|
|
259
|
+
/** Paddle api request error. */
|
|
260
|
+
class RequestError extends Error {
|
|
261
|
+
status_code?: number;
|
|
262
|
+
constructor(err: string, status_code?: number);
|
|
263
|
+
}
|
|
264
|
+
/** The types for the frontend endpoints. */
|
|
265
|
+
namespace Endpoints {
|
|
266
|
+
/** The initialize payment endpoint. */
|
|
267
|
+
type InitPayment = Request.Info<"POST", "/volt/api/v1/payments/init", {
|
|
268
|
+
items: {
|
|
269
|
+
product: Product;
|
|
270
|
+
quantity: number;
|
|
271
|
+
}[];
|
|
272
|
+
}, {
|
|
273
|
+
message: string;
|
|
274
|
+
}, undefined>;
|
|
275
|
+
/** The get products endpoint. */
|
|
276
|
+
type GetProducts = Request.Info<"GET", "/volt/api/v1/payments/products", undefined, Product[], undefined>;
|
|
277
|
+
/** The get payment endpoint. */
|
|
278
|
+
type GetPayment = Request.Info<"GET", "/volt/api/v1/payments/payment", {
|
|
279
|
+
id: string;
|
|
280
|
+
}, Payment.Public, undefined>;
|
|
281
|
+
/** The get payments endpoint. */
|
|
282
|
+
type GetPayments = Request.Info<"GET", "/volt/api/v1/payments/payments", {
|
|
283
|
+
days?: number;
|
|
284
|
+
limit?: number;
|
|
285
|
+
status?: string | string[];
|
|
286
|
+
}, Payment.Public[], undefined>;
|
|
287
|
+
/** The get refundable payments endpoint. */
|
|
288
|
+
type GetRefundablePayments = Request.Info<"GET", "/volt/api/v1/payments/payments/refundable", {
|
|
289
|
+
days?: number;
|
|
290
|
+
limit?: number;
|
|
291
|
+
}, Payment.Public[], undefined>;
|
|
292
|
+
/** The get refunded payments endpoint. */
|
|
293
|
+
type GetRefundedPayments = Request.Info<"GET", "/volt/api/v1/payments/payments/refunded", {
|
|
294
|
+
days?: number;
|
|
295
|
+
limit?: number;
|
|
296
|
+
}, Payment.Public[], undefined>;
|
|
297
|
+
/** The get refunding payments endpoint. */
|
|
298
|
+
type GetRefundingPayments = Request.Info<"GET", "/volt/api/v1/payments/payments/refunding", {
|
|
299
|
+
days?: number;
|
|
300
|
+
limit?: number;
|
|
301
|
+
}, Payment.Public[], undefined>;
|
|
302
|
+
/** The refund payment endpoint. */
|
|
303
|
+
type RefundPayment = Request.Info<"POST", "/volt/api/v1/payments/refund", {
|
|
304
|
+
payment: string | Payment;
|
|
305
|
+
line_items?: LineItem[];
|
|
306
|
+
reason?: string;
|
|
307
|
+
}, undefined, undefined>;
|
|
308
|
+
/** The cancel subscription endpoint. */
|
|
309
|
+
type CancelSubscription = Request.Info<"DELETE", "/volt/api/v1/payments/subscription", {
|
|
310
|
+
product: string;
|
|
311
|
+
}, undefined, undefined>;
|
|
312
|
+
/** The is subscribed endpoint. */
|
|
313
|
+
type IsSubscribed = Request.Info<"GET", "/volt/api/v1/payments/subscribed", {
|
|
314
|
+
product: string;
|
|
315
|
+
}, {
|
|
316
|
+
is_subscribed: boolean;
|
|
317
|
+
}, undefined>;
|
|
318
|
+
/** The get active subscriptions endpoint. */
|
|
319
|
+
type GetActiveSubscriptions = Request.Info<"GET", "/volt/api/v1/payments/active_subscriptions", undefined, {
|
|
320
|
+
subscriptions: string[];
|
|
321
|
+
}, undefined>;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* @todo if undeprecate: ASK claude to audit.
|
|
326
|
+
*/
|