@qwickapps/server 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -0
- package/dist/core/control-panel.d.ts.map +1 -1
- package/dist/core/control-panel.js +114 -0
- package/dist/core/control-panel.js.map +1 -1
- package/dist/core/types.d.ts +19 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/plugins/auth/adapter-wrapper.d.ts +47 -0
- package/dist/plugins/auth/adapter-wrapper.d.ts.map +1 -0
- package/dist/plugins/auth/adapter-wrapper.js +166 -0
- package/dist/plugins/auth/adapter-wrapper.js.map +1 -0
- package/dist/plugins/auth/adapter-wrapper.test.d.ts +7 -0
- package/dist/plugins/auth/adapter-wrapper.test.d.ts.map +1 -0
- package/dist/plugins/auth/adapter-wrapper.test.js +303 -0
- package/dist/plugins/auth/adapter-wrapper.test.js.map +1 -0
- package/dist/plugins/auth/config-store.d.ts +11 -0
- package/dist/plugins/auth/config-store.d.ts.map +1 -0
- package/dist/plugins/auth/config-store.js +232 -0
- package/dist/plugins/auth/config-store.js.map +1 -0
- package/dist/plugins/auth/config-store.test.d.ts +7 -0
- package/dist/plugins/auth/config-store.test.d.ts.map +1 -0
- package/dist/plugins/auth/config-store.test.js +299 -0
- package/dist/plugins/auth/config-store.test.js.map +1 -0
- package/dist/plugins/auth/env-config.d.ts +51 -1
- package/dist/plugins/auth/env-config.d.ts.map +1 -1
- package/dist/plugins/auth/env-config.js +640 -7
- package/dist/plugins/auth/env-config.js.map +1 -1
- package/dist/plugins/auth/index.d.ts +6 -2
- package/dist/plugins/auth/index.d.ts.map +1 -1
- package/dist/plugins/auth/index.js +5 -1
- package/dist/plugins/auth/index.js.map +1 -1
- package/dist/plugins/auth/types.d.ts +106 -0
- package/dist/plugins/auth/types.d.ts.map +1 -1
- package/dist/plugins/bans/bans-plugin.d.ts.map +1 -1
- package/dist/plugins/bans/bans-plugin.js +12 -3
- package/dist/plugins/bans/bans-plugin.js.map +1 -1
- package/dist/plugins/devices/__tests__/devices-plugin.test.d.ts +11 -0
- package/dist/plugins/devices/__tests__/devices-plugin.test.d.ts.map +1 -0
- package/dist/plugins/devices/__tests__/devices-plugin.test.js +410 -0
- package/dist/plugins/devices/__tests__/devices-plugin.test.js.map +1 -0
- package/dist/plugins/devices/__tests__/token-utils.test.d.ts +7 -0
- package/dist/plugins/devices/__tests__/token-utils.test.d.ts.map +1 -0
- package/dist/plugins/devices/__tests__/token-utils.test.js +197 -0
- package/dist/plugins/devices/__tests__/token-utils.test.js.map +1 -0
- package/dist/plugins/devices/adapters/compute-adapter.d.ts +36 -0
- package/dist/plugins/devices/adapters/compute-adapter.d.ts.map +1 -0
- package/dist/plugins/devices/adapters/compute-adapter.js +100 -0
- package/dist/plugins/devices/adapters/compute-adapter.js.map +1 -0
- package/dist/plugins/devices/adapters/index.d.ts +12 -0
- package/dist/plugins/devices/adapters/index.d.ts.map +1 -0
- package/dist/plugins/devices/adapters/index.js +10 -0
- package/dist/plugins/devices/adapters/index.js.map +1 -0
- package/dist/plugins/devices/adapters/mobile-adapter.d.ts +41 -0
- package/dist/plugins/devices/adapters/mobile-adapter.d.ts.map +1 -0
- package/dist/plugins/devices/adapters/mobile-adapter.js +131 -0
- package/dist/plugins/devices/adapters/mobile-adapter.js.map +1 -0
- package/dist/plugins/devices/devices-plugin.d.ts +70 -0
- package/dist/plugins/devices/devices-plugin.d.ts.map +1 -0
- package/dist/plugins/devices/devices-plugin.js +453 -0
- package/dist/plugins/devices/devices-plugin.js.map +1 -0
- package/dist/plugins/devices/index.d.ts +18 -0
- package/dist/plugins/devices/index.d.ts.map +1 -0
- package/dist/plugins/devices/index.js +18 -0
- package/dist/plugins/devices/index.js.map +1 -0
- package/dist/plugins/devices/stores/index.d.ts +9 -0
- package/dist/plugins/devices/stores/index.d.ts.map +1 -0
- package/dist/plugins/devices/stores/index.js +9 -0
- package/dist/plugins/devices/stores/index.js.map +1 -0
- package/dist/plugins/devices/stores/postgres-store.d.ts +26 -0
- package/dist/plugins/devices/stores/postgres-store.d.ts.map +1 -0
- package/dist/plugins/devices/stores/postgres-store.js +199 -0
- package/dist/plugins/devices/stores/postgres-store.js.map +1 -0
- package/dist/plugins/devices/token-utils.d.ts +100 -0
- package/dist/plugins/devices/token-utils.d.ts.map +1 -0
- package/dist/plugins/devices/token-utils.js +162 -0
- package/dist/plugins/devices/token-utils.js.map +1 -0
- package/dist/plugins/devices/types.d.ts +307 -0
- package/dist/plugins/devices/types.d.ts.map +1 -0
- package/dist/plugins/devices/types.js +10 -0
- package/dist/plugins/devices/types.js.map +1 -0
- package/dist/plugins/index.d.ts +18 -4
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +16 -2
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/notifications/__tests__/notifications-manager.test.d.ts +5 -0
- package/dist/plugins/notifications/__tests__/notifications-manager.test.d.ts.map +1 -0
- package/dist/plugins/notifications/__tests__/notifications-manager.test.js +470 -0
- package/dist/plugins/notifications/__tests__/notifications-manager.test.js.map +1 -0
- package/dist/plugins/notifications/index.d.ts +71 -0
- package/dist/plugins/notifications/index.d.ts.map +1 -0
- package/dist/plugins/notifications/index.js +72 -0
- package/dist/plugins/notifications/index.js.map +1 -0
- package/dist/plugins/notifications/notifications-manager.d.ts +182 -0
- package/dist/plugins/notifications/notifications-manager.d.ts.map +1 -0
- package/dist/plugins/notifications/notifications-manager.js +610 -0
- package/dist/plugins/notifications/notifications-manager.js.map +1 -0
- package/dist/plugins/notifications/notifications-plugin.d.ts +83 -0
- package/dist/plugins/notifications/notifications-plugin.d.ts.map +1 -0
- package/dist/plugins/notifications/notifications-plugin.js +337 -0
- package/dist/plugins/notifications/notifications-plugin.js.map +1 -0
- package/dist/plugins/notifications/types.d.ts +164 -0
- package/dist/plugins/notifications/types.d.ts.map +1 -0
- package/dist/plugins/notifications/types.js +9 -0
- package/dist/plugins/notifications/types.js.map +1 -0
- package/dist/plugins/parental/__tests__/parental-plugin.test.d.ts +12 -0
- package/dist/plugins/parental/__tests__/parental-plugin.test.d.ts.map +1 -0
- package/dist/plugins/parental/__tests__/parental-plugin.test.js +349 -0
- package/dist/plugins/parental/__tests__/parental-plugin.test.js.map +1 -0
- package/dist/plugins/parental/adapters/index.d.ts +8 -0
- package/dist/plugins/parental/adapters/index.d.ts.map +1 -0
- package/dist/plugins/parental/adapters/index.js +7 -0
- package/dist/plugins/parental/adapters/index.js.map +1 -0
- package/dist/plugins/parental/adapters/kids-adapter.d.ts +24 -0
- package/dist/plugins/parental/adapters/kids-adapter.d.ts.map +1 -0
- package/dist/plugins/parental/adapters/kids-adapter.js +174 -0
- package/dist/plugins/parental/adapters/kids-adapter.js.map +1 -0
- package/dist/plugins/parental/index.d.ts +14 -0
- package/dist/plugins/parental/index.d.ts.map +1 -0
- package/dist/plugins/parental/index.js +15 -0
- package/dist/plugins/parental/index.js.map +1 -0
- package/dist/plugins/parental/parental-plugin.d.ts +88 -0
- package/dist/plugins/parental/parental-plugin.d.ts.map +1 -0
- package/dist/plugins/parental/parental-plugin.js +666 -0
- package/dist/plugins/parental/parental-plugin.js.map +1 -0
- package/dist/plugins/parental/stores/index.d.ts +7 -0
- package/dist/plugins/parental/stores/index.d.ts.map +1 -0
- package/dist/plugins/parental/stores/index.js +7 -0
- package/dist/plugins/parental/stores/index.js.map +1 -0
- package/dist/plugins/parental/stores/postgres-store.d.ts +10 -0
- package/dist/plugins/parental/stores/postgres-store.d.ts.map +1 -0
- package/dist/plugins/parental/stores/postgres-store.js +209 -0
- package/dist/plugins/parental/stores/postgres-store.js.map +1 -0
- package/dist/plugins/parental/types.d.ts +154 -0
- package/dist/plugins/parental/types.d.ts.map +1 -0
- package/dist/plugins/parental/types.js +10 -0
- package/dist/plugins/parental/types.js.map +1 -0
- package/dist/plugins/profiles/__tests__/profiles-plugin.test.d.ts +11 -0
- package/dist/plugins/profiles/__tests__/profiles-plugin.test.d.ts.map +1 -0
- package/dist/plugins/profiles/__tests__/profiles-plugin.test.js +243 -0
- package/dist/plugins/profiles/__tests__/profiles-plugin.test.js.map +1 -0
- package/dist/plugins/profiles/index.d.ts +12 -0
- package/dist/plugins/profiles/index.d.ts.map +1 -0
- package/dist/plugins/profiles/index.js +13 -0
- package/dist/plugins/profiles/index.js.map +1 -0
- package/dist/plugins/profiles/profiles-plugin.d.ts +71 -0
- package/dist/plugins/profiles/profiles-plugin.d.ts.map +1 -0
- package/dist/plugins/profiles/profiles-plugin.js +481 -0
- package/dist/plugins/profiles/profiles-plugin.js.map +1 -0
- package/dist/plugins/profiles/stores/index.d.ts +9 -0
- package/dist/plugins/profiles/stores/index.d.ts.map +1 -0
- package/dist/plugins/profiles/stores/index.js +9 -0
- package/dist/plugins/profiles/stores/index.js.map +1 -0
- package/dist/plugins/profiles/stores/postgres-store.d.ts +18 -0
- package/dist/plugins/profiles/stores/postgres-store.d.ts.map +1 -0
- package/dist/plugins/profiles/stores/postgres-store.js +310 -0
- package/dist/plugins/profiles/stores/postgres-store.js.map +1 -0
- package/dist/plugins/profiles/types.d.ts +289 -0
- package/dist/plugins/profiles/types.d.ts.map +1 -0
- package/dist/plugins/profiles/types.js +10 -0
- package/dist/plugins/profiles/types.js.map +1 -0
- package/dist/plugins/rate-limit/__tests__/rate-limit-plugin.test.d.ts +7 -0
- package/dist/plugins/rate-limit/__tests__/rate-limit-plugin.test.d.ts.map +1 -0
- package/dist/plugins/rate-limit/__tests__/rate-limit-plugin.test.js +220 -0
- package/dist/plugins/rate-limit/__tests__/rate-limit-plugin.test.js.map +1 -0
- package/dist/plugins/rate-limit/cleanup.d.ts +40 -0
- package/dist/plugins/rate-limit/cleanup.d.ts.map +1 -0
- package/dist/plugins/rate-limit/cleanup.js +72 -0
- package/dist/plugins/rate-limit/cleanup.js.map +1 -0
- package/dist/plugins/rate-limit/env-config.d.ts +91 -0
- package/dist/plugins/rate-limit/env-config.d.ts.map +1 -0
- package/dist/plugins/rate-limit/env-config.js +318 -0
- package/dist/plugins/rate-limit/env-config.js.map +1 -0
- package/dist/plugins/rate-limit/index.d.ts +76 -0
- package/dist/plugins/rate-limit/index.d.ts.map +1 -0
- package/dist/plugins/rate-limit/index.js +79 -0
- package/dist/plugins/rate-limit/index.js.map +1 -0
- package/dist/plugins/rate-limit/middleware.d.ts +40 -0
- package/dist/plugins/rate-limit/middleware.d.ts.map +1 -0
- package/dist/plugins/rate-limit/middleware.js +169 -0
- package/dist/plugins/rate-limit/middleware.js.map +1 -0
- package/dist/plugins/rate-limit/rate-limit-plugin.d.ts +44 -0
- package/dist/plugins/rate-limit/rate-limit-plugin.d.ts.map +1 -0
- package/dist/plugins/rate-limit/rate-limit-plugin.js +354 -0
- package/dist/plugins/rate-limit/rate-limit-plugin.js.map +1 -0
- package/dist/plugins/rate-limit/rate-limit-service.d.ts +110 -0
- package/dist/plugins/rate-limit/rate-limit-service.d.ts.map +1 -0
- package/dist/plugins/rate-limit/rate-limit-service.js +172 -0
- package/dist/plugins/rate-limit/rate-limit-service.js.map +1 -0
- package/dist/plugins/rate-limit/stores/cache-store.d.ts +33 -0
- package/dist/plugins/rate-limit/stores/cache-store.d.ts.map +1 -0
- package/dist/plugins/rate-limit/stores/cache-store.js +225 -0
- package/dist/plugins/rate-limit/stores/cache-store.js.map +1 -0
- package/dist/plugins/rate-limit/stores/index.d.ts +8 -0
- package/dist/plugins/rate-limit/stores/index.d.ts.map +1 -0
- package/dist/plugins/rate-limit/stores/index.js +8 -0
- package/dist/plugins/rate-limit/stores/index.js.map +1 -0
- package/dist/plugins/rate-limit/stores/postgres-store.d.ts +34 -0
- package/dist/plugins/rate-limit/stores/postgres-store.d.ts.map +1 -0
- package/dist/plugins/rate-limit/stores/postgres-store.js +320 -0
- package/dist/plugins/rate-limit/stores/postgres-store.js.map +1 -0
- package/dist/plugins/rate-limit/strategies/fixed-window.d.ts +21 -0
- package/dist/plugins/rate-limit/strategies/fixed-window.d.ts.map +1 -0
- package/dist/plugins/rate-limit/strategies/fixed-window.js +97 -0
- package/dist/plugins/rate-limit/strategies/fixed-window.js.map +1 -0
- package/dist/plugins/rate-limit/strategies/index.d.ts +14 -0
- package/dist/plugins/rate-limit/strategies/index.d.ts.map +1 -0
- package/dist/plugins/rate-limit/strategies/index.js +27 -0
- package/dist/plugins/rate-limit/strategies/index.js.map +1 -0
- package/dist/plugins/rate-limit/strategies/sliding-window.d.ts +22 -0
- package/dist/plugins/rate-limit/strategies/sliding-window.d.ts.map +1 -0
- package/dist/plugins/rate-limit/strategies/sliding-window.js +122 -0
- package/dist/plugins/rate-limit/strategies/sliding-window.js.map +1 -0
- package/dist/plugins/rate-limit/strategies/token-bucket.d.ts +28 -0
- package/dist/plugins/rate-limit/strategies/token-bucket.d.ts.map +1 -0
- package/dist/plugins/rate-limit/strategies/token-bucket.js +121 -0
- package/dist/plugins/rate-limit/strategies/token-bucket.js.map +1 -0
- package/dist/plugins/rate-limit/types.d.ts +265 -0
- package/dist/plugins/rate-limit/types.d.ts.map +1 -0
- package/dist/plugins/rate-limit/types.js +9 -0
- package/dist/plugins/rate-limit/types.js.map +1 -0
- package/dist/plugins/subscriptions/__tests__/subscriptions-plugin.test.d.ts +11 -0
- package/dist/plugins/subscriptions/__tests__/subscriptions-plugin.test.d.ts.map +1 -0
- package/dist/plugins/subscriptions/__tests__/subscriptions-plugin.test.js +305 -0
- package/dist/plugins/subscriptions/__tests__/subscriptions-plugin.test.js.map +1 -0
- package/dist/plugins/subscriptions/index.d.ts +12 -0
- package/dist/plugins/subscriptions/index.d.ts.map +1 -0
- package/dist/plugins/subscriptions/index.js +13 -0
- package/dist/plugins/subscriptions/index.js.map +1 -0
- package/dist/plugins/subscriptions/stores/index.d.ts +9 -0
- package/dist/plugins/subscriptions/stores/index.d.ts.map +1 -0
- package/dist/plugins/subscriptions/stores/index.js +9 -0
- package/dist/plugins/subscriptions/stores/index.js.map +1 -0
- package/dist/plugins/subscriptions/stores/postgres-store.d.ts +14 -0
- package/dist/plugins/subscriptions/stores/postgres-store.d.ts.map +1 -0
- package/dist/plugins/subscriptions/stores/postgres-store.js +359 -0
- package/dist/plugins/subscriptions/stores/postgres-store.js.map +1 -0
- package/dist/plugins/subscriptions/subscriptions-plugin.d.ts +82 -0
- package/dist/plugins/subscriptions/subscriptions-plugin.d.ts.map +1 -0
- package/dist/plugins/subscriptions/subscriptions-plugin.js +449 -0
- package/dist/plugins/subscriptions/subscriptions-plugin.js.map +1 -0
- package/dist/plugins/subscriptions/types.d.ts +308 -0
- package/dist/plugins/subscriptions/types.d.ts.map +1 -0
- package/dist/plugins/subscriptions/types.js +10 -0
- package/dist/plugins/subscriptions/types.js.map +1 -0
- package/dist/plugins/usage/__tests__/usage-plugin.test.d.ts +11 -0
- package/dist/plugins/usage/__tests__/usage-plugin.test.d.ts.map +1 -0
- package/dist/plugins/usage/__tests__/usage-plugin.test.js +218 -0
- package/dist/plugins/usage/__tests__/usage-plugin.test.js.map +1 -0
- package/dist/plugins/usage/index.d.ts +12 -0
- package/dist/plugins/usage/index.d.ts.map +1 -0
- package/dist/plugins/usage/index.js +13 -0
- package/dist/plugins/usage/index.js.map +1 -0
- package/dist/plugins/usage/stores/index.d.ts +9 -0
- package/dist/plugins/usage/stores/index.d.ts.map +1 -0
- package/dist/plugins/usage/stores/index.js +9 -0
- package/dist/plugins/usage/stores/index.js.map +1 -0
- package/dist/plugins/usage/stores/postgres-store.d.ts +14 -0
- package/dist/plugins/usage/stores/postgres-store.d.ts.map +1 -0
- package/dist/plugins/usage/stores/postgres-store.js +146 -0
- package/dist/plugins/usage/stores/postgres-store.js.map +1 -0
- package/dist/plugins/usage/types.d.ts +195 -0
- package/dist/plugins/usage/types.d.ts.map +1 -0
- package/dist/plugins/usage/types.js +10 -0
- package/dist/plugins/usage/types.js.map +1 -0
- package/dist/plugins/usage/usage-plugin.d.ts +51 -0
- package/dist/plugins/usage/usage-plugin.d.ts.map +1 -0
- package/dist/plugins/usage/usage-plugin.js +412 -0
- package/dist/plugins/usage/usage-plugin.js.map +1 -0
- package/dist/plugins/users/__tests__/postgres-store.test.d.ts +10 -0
- package/dist/plugins/users/__tests__/postgres-store.test.d.ts.map +1 -0
- package/dist/plugins/users/__tests__/postgres-store.test.js +229 -0
- package/dist/plugins/users/__tests__/postgres-store.test.js.map +1 -0
- package/dist/plugins/users/__tests__/users-plugin.test.js +3 -0
- package/dist/plugins/users/__tests__/users-plugin.test.js.map +1 -1
- package/dist/plugins/users/index.d.ts +2 -2
- package/dist/plugins/users/index.d.ts.map +1 -1
- package/dist/plugins/users/index.js +1 -1
- package/dist/plugins/users/index.js.map +1 -1
- package/dist/plugins/users/stores/postgres-store.d.ts.map +1 -1
- package/dist/plugins/users/stores/postgres-store.js +76 -0
- package/dist/plugins/users/stores/postgres-store.js.map +1 -1
- package/dist/plugins/users/types.d.ts +74 -6
- package/dist/plugins/users/types.d.ts.map +1 -1
- package/dist/plugins/users/users-plugin.d.ts +15 -1
- package/dist/plugins/users/users-plugin.d.ts.map +1 -1
- package/dist/plugins/users/users-plugin.js +29 -0
- package/dist/plugins/users/users-plugin.js.map +1 -1
- package/dist-ui/assets/index-CynOqPkb.js +469 -0
- package/dist-ui/assets/{index-BY8OxNgO.js.map → index-CynOqPkb.js.map} +1 -1
- package/dist-ui/index.html +1 -1
- package/dist-ui-lib/api/controlPanelApi.d.ts +187 -0
- package/dist-ui-lib/components/StatCard.d.ts +16 -0
- package/dist-ui-lib/dashboard/widgets/AuthStatusWidget.d.ts +9 -0
- package/dist-ui-lib/dashboard/widgets/IntegrationStatusWidget.d.ts +9 -0
- package/dist-ui-lib/dashboard/widgets/NotificationsStatsWidget.d.ts +12 -0
- package/dist-ui-lib/dashboard/widgets/index.d.ts +3 -0
- package/dist-ui-lib/index.js +3579 -2379
- package/dist-ui-lib/index.js.map +1 -1
- package/dist-ui-lib/pages/IntegrationsPage.d.ts +1 -0
- package/dist-ui-lib/pages/NotificationsPage.d.ts +9 -0
- package/dist-ui-lib/pages/RateLimitPage.d.ts +1 -0
- package/dist-ui-lib/utils/formatters.d.ts +19 -0
- package/package.json +1 -1
- package/src/core/control-panel.ts +128 -0
- package/src/core/types.ts +17 -0
- package/src/index.ts +216 -0
- package/src/plugins/auth/adapter-wrapper.test.ts +395 -0
- package/src/plugins/auth/adapter-wrapper.ts +205 -0
- package/src/plugins/auth/config-store.test.ts +417 -0
- package/src/plugins/auth/config-store.ts +305 -0
- package/src/plugins/auth/env-config.ts +714 -7
- package/src/plugins/auth/index.ts +22 -1
- package/src/plugins/auth/types.ts +138 -0
- package/src/plugins/bans/bans-plugin.ts +15 -3
- package/src/plugins/devices/__tests__/devices-plugin.test.ts +551 -0
- package/src/plugins/devices/__tests__/token-utils.test.ts +264 -0
- package/src/plugins/devices/adapters/compute-adapter.ts +139 -0
- package/src/plugins/devices/adapters/index.ts +13 -0
- package/src/plugins/devices/adapters/mobile-adapter.ts +179 -0
- package/src/plugins/devices/devices-plugin.ts +538 -0
- package/src/plugins/devices/index.ts +69 -0
- package/src/plugins/devices/stores/index.ts +9 -0
- package/src/plugins/devices/stores/postgres-store.ts +304 -0
- package/src/plugins/devices/token-utils.ts +213 -0
- package/src/plugins/devices/types.ts +351 -0
- package/src/plugins/index.ts +267 -0
- package/src/plugins/notifications/__tests__/notifications-manager.test.ts +637 -0
- package/src/plugins/notifications/index.ts +91 -0
- package/src/plugins/notifications/notifications-manager.ts +773 -0
- package/src/plugins/notifications/notifications-plugin.ts +398 -0
- package/src/plugins/notifications/types.ts +207 -0
- package/src/plugins/parental/__tests__/parental-plugin.test.ts +465 -0
- package/src/plugins/parental/adapters/index.ts +8 -0
- package/src/plugins/parental/adapters/kids-adapter.ts +206 -0
- package/src/plugins/parental/index.ts +55 -0
- package/src/plugins/parental/parental-plugin.ts +759 -0
- package/src/plugins/parental/stores/index.ts +7 -0
- package/src/plugins/parental/stores/postgres-store.ts +304 -0
- package/src/plugins/parental/types.ts +180 -0
- package/src/plugins/profiles/__tests__/profiles-plugin.test.ts +321 -0
- package/src/plugins/profiles/index.ts +49 -0
- package/src/plugins/profiles/profiles-plugin.ts +546 -0
- package/src/plugins/profiles/stores/index.ts +9 -0
- package/src/plugins/profiles/stores/postgres-store.ts +439 -0
- package/src/plugins/profiles/types.ts +338 -0
- package/src/plugins/rate-limit/__tests__/rate-limit-plugin.test.ts +259 -0
- package/src/plugins/rate-limit/cleanup.ts +117 -0
- package/src/plugins/rate-limit/env-config.ts +400 -0
- package/src/plugins/rate-limit/index.ts +128 -0
- package/src/plugins/rate-limit/middleware.ts +212 -0
- package/src/plugins/rate-limit/rate-limit-plugin.ts +400 -0
- package/src/plugins/rate-limit/rate-limit-service.ts +228 -0
- package/src/plugins/rate-limit/stores/cache-store.ts +261 -0
- package/src/plugins/rate-limit/stores/index.ts +8 -0
- package/src/plugins/rate-limit/stores/postgres-store.ts +402 -0
- package/src/plugins/rate-limit/strategies/fixed-window.ts +116 -0
- package/src/plugins/rate-limit/strategies/index.ts +30 -0
- package/src/plugins/rate-limit/strategies/sliding-window.ts +157 -0
- package/src/plugins/rate-limit/strategies/token-bucket.ts +154 -0
- package/src/plugins/rate-limit/types.ts +338 -0
- package/src/plugins/subscriptions/__tests__/subscriptions-plugin.test.ts +404 -0
- package/src/plugins/subscriptions/index.ts +51 -0
- package/src/plugins/subscriptions/stores/index.ts +9 -0
- package/src/plugins/subscriptions/stores/postgres-store.ts +482 -0
- package/src/plugins/subscriptions/subscriptions-plugin.ts +530 -0
- package/src/plugins/subscriptions/types.ts +355 -0
- package/src/plugins/usage/__tests__/usage-plugin.test.ts +288 -0
- package/src/plugins/usage/index.ts +39 -0
- package/src/plugins/usage/stores/index.ts +9 -0
- package/src/plugins/usage/stores/postgres-store.ts +213 -0
- package/src/plugins/usage/types.ts +222 -0
- package/src/plugins/usage/usage-plugin.ts +484 -0
- package/src/plugins/users/__tests__/postgres-store.test.ts +326 -0
- package/src/plugins/users/__tests__/users-plugin.test.ts +3 -0
- package/src/plugins/users/index.ts +6 -0
- package/src/plugins/users/stores/postgres-store.ts +104 -0
- package/src/plugins/users/types.ts +82 -6
- package/src/plugins/users/users-plugin.ts +37 -0
- package/ui/src/App.tsx +36 -14
- package/ui/src/api/controlPanelApi.ts +329 -6
- package/ui/src/components/StatCard.tsx +58 -0
- package/ui/src/dashboard/builtInWidgets.tsx +7 -1
- package/ui/src/dashboard/widgets/AuthStatusWidget.tsx +143 -0
- package/ui/src/dashboard/widgets/IntegrationStatusWidget.tsx +135 -0
- package/ui/src/dashboard/widgets/NotificationsStatsWidget.tsx +167 -0
- package/ui/src/dashboard/widgets/index.ts +3 -0
- package/ui/src/pages/AuthPage.tsx +986 -142
- package/ui/src/pages/IntegrationsPage.tsx +288 -0
- package/ui/src/pages/NotificationsPage.tsx +417 -0
- package/ui/src/pages/RateLimitPage.tsx +292 -0
- package/ui/src/utils/formatters.ts +33 -0
- package/dist-ui/assets/index-BY8OxNgO.js +0 -465
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Devices Plugin Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for device management with adapter support.
|
|
5
|
+
* Supports different device types through adapters (compute, mobile, IoT).
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Core device record in the database
|
|
11
|
+
*/
|
|
12
|
+
export interface Device {
|
|
13
|
+
/** Primary key - UUID */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Organization ID for multi-tenant isolation */
|
|
16
|
+
org_id?: string;
|
|
17
|
+
/** Owner user ID */
|
|
18
|
+
user_id?: string;
|
|
19
|
+
/** Adapter type that created this device */
|
|
20
|
+
adapter_type: string;
|
|
21
|
+
/** Device name */
|
|
22
|
+
name: string;
|
|
23
|
+
/** First 8 characters of token for identification */
|
|
24
|
+
token_prefix?: string;
|
|
25
|
+
/** Token expiration time */
|
|
26
|
+
token_expires_at: Date;
|
|
27
|
+
/** Last time device was seen */
|
|
28
|
+
last_seen_at?: Date;
|
|
29
|
+
/** Last known IP address */
|
|
30
|
+
last_ip?: string;
|
|
31
|
+
/** Whether device is active */
|
|
32
|
+
is_active: boolean;
|
|
33
|
+
/** Adapter-specific metadata */
|
|
34
|
+
metadata: Record<string, unknown>;
|
|
35
|
+
/** When the device was created */
|
|
36
|
+
created_at: Date;
|
|
37
|
+
/** When the device was last updated */
|
|
38
|
+
updated_at: Date;
|
|
39
|
+
/** Soft delete timestamp */
|
|
40
|
+
deleted_at?: Date;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Device with token (returned only on create)
|
|
44
|
+
*/
|
|
45
|
+
export interface DeviceWithToken extends Device {
|
|
46
|
+
/** Raw token (only returned on create, never stored) */
|
|
47
|
+
token: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Device creation payload (adapter-agnostic)
|
|
51
|
+
*/
|
|
52
|
+
export interface CreateDeviceInput {
|
|
53
|
+
/** Organization ID */
|
|
54
|
+
org_id?: string;
|
|
55
|
+
/** Owner user ID */
|
|
56
|
+
user_id?: string;
|
|
57
|
+
/** Device name */
|
|
58
|
+
name: string;
|
|
59
|
+
/** Token validity in days (default: 90) */
|
|
60
|
+
token_validity_days?: number;
|
|
61
|
+
/** Adapter-specific fields */
|
|
62
|
+
metadata?: Record<string, unknown>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Device update payload
|
|
66
|
+
*/
|
|
67
|
+
export interface UpdateDeviceInput {
|
|
68
|
+
/** Device name */
|
|
69
|
+
name?: string;
|
|
70
|
+
/** Whether device is active */
|
|
71
|
+
is_active?: boolean;
|
|
72
|
+
/** Adapter-specific metadata */
|
|
73
|
+
metadata?: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Device search parameters
|
|
77
|
+
*/
|
|
78
|
+
export interface DeviceSearchParams {
|
|
79
|
+
/** Organization ID filter */
|
|
80
|
+
org_id?: string;
|
|
81
|
+
/** User ID filter */
|
|
82
|
+
user_id?: string;
|
|
83
|
+
/** Adapter type filter */
|
|
84
|
+
adapter_type?: string;
|
|
85
|
+
/** Active status filter */
|
|
86
|
+
is_active?: boolean;
|
|
87
|
+
/** Search query (searches name) */
|
|
88
|
+
query?: string;
|
|
89
|
+
/** Page number (1-indexed) */
|
|
90
|
+
page?: number;
|
|
91
|
+
/** Items per page */
|
|
92
|
+
limit?: number;
|
|
93
|
+
/** Sort field */
|
|
94
|
+
sortBy?: 'name' | 'created_at' | 'last_seen_at';
|
|
95
|
+
/** Sort direction */
|
|
96
|
+
sortOrder?: 'asc' | 'desc';
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Paginated device list response
|
|
100
|
+
*/
|
|
101
|
+
export interface DeviceListResponse {
|
|
102
|
+
devices: Device[];
|
|
103
|
+
total: number;
|
|
104
|
+
page: number;
|
|
105
|
+
limit: number;
|
|
106
|
+
totalPages: number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Token verification result
|
|
110
|
+
*/
|
|
111
|
+
export interface TokenVerificationResult {
|
|
112
|
+
/** Whether the token is valid */
|
|
113
|
+
valid: boolean;
|
|
114
|
+
/** The device if valid */
|
|
115
|
+
device?: Device;
|
|
116
|
+
/** Error message if invalid */
|
|
117
|
+
error?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Validation result from adapter
|
|
121
|
+
*/
|
|
122
|
+
export interface ValidationResult {
|
|
123
|
+
/** Whether validation passed */
|
|
124
|
+
valid: boolean;
|
|
125
|
+
/** Error messages if invalid */
|
|
126
|
+
errors?: string[];
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Device adapter interface - all adapters must implement this
|
|
130
|
+
*/
|
|
131
|
+
export interface DeviceAdapter {
|
|
132
|
+
/** Adapter name (e.g., 'compute', 'mobile', 'iot') */
|
|
133
|
+
name: string;
|
|
134
|
+
/** Token prefix for this adapter (e.g., 'qwf_dev', 'qwb_mob') */
|
|
135
|
+
tokenPrefix: string;
|
|
136
|
+
/**
|
|
137
|
+
* Validate device input before creation
|
|
138
|
+
*/
|
|
139
|
+
validateDeviceInput(input: CreateDeviceInput): ValidationResult;
|
|
140
|
+
/**
|
|
141
|
+
* Transform input for storage (add adapter-specific defaults)
|
|
142
|
+
*/
|
|
143
|
+
transformForStorage(input: CreateDeviceInput): Record<string, unknown>;
|
|
144
|
+
/**
|
|
145
|
+
* Transform row from storage to typed device
|
|
146
|
+
*/
|
|
147
|
+
transformFromStorage(row: Record<string, unknown>): Record<string, unknown>;
|
|
148
|
+
/**
|
|
149
|
+
* Hook called after device is created (optional)
|
|
150
|
+
*/
|
|
151
|
+
onDeviceCreated?(device: Device): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* Hook called after device is deleted (optional)
|
|
154
|
+
*/
|
|
155
|
+
onDeviceDeleted?(device: Device): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Hook called when device token is verified (optional)
|
|
158
|
+
*/
|
|
159
|
+
onDeviceVerified?(device: Device, ip?: string): Promise<void>;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Device store interface - all storage backends must implement this
|
|
163
|
+
*/
|
|
164
|
+
export interface DeviceStore {
|
|
165
|
+
/** Store name (e.g., 'postgres', 'memory') */
|
|
166
|
+
name: string;
|
|
167
|
+
/**
|
|
168
|
+
* Initialize the store (create tables, etc.)
|
|
169
|
+
*/
|
|
170
|
+
initialize(): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Get a device by ID
|
|
173
|
+
*/
|
|
174
|
+
getById(id: string): Promise<Device | null>;
|
|
175
|
+
/**
|
|
176
|
+
* Get a device by token hash
|
|
177
|
+
*/
|
|
178
|
+
getByTokenHash(tokenHash: string): Promise<Device | null>;
|
|
179
|
+
/**
|
|
180
|
+
* Create a new device (stores token hash, not raw token)
|
|
181
|
+
*/
|
|
182
|
+
create(input: CreateDeviceInput & {
|
|
183
|
+
tokenHash: string;
|
|
184
|
+
tokenPrefix: string;
|
|
185
|
+
tokenExpiresAt: Date;
|
|
186
|
+
adapterType: string;
|
|
187
|
+
}): Promise<Device>;
|
|
188
|
+
/**
|
|
189
|
+
* Update an existing device
|
|
190
|
+
*/
|
|
191
|
+
update(id: string, input: UpdateDeviceInput): Promise<Device | null>;
|
|
192
|
+
/**
|
|
193
|
+
* Soft delete a device
|
|
194
|
+
*/
|
|
195
|
+
delete(id: string): Promise<boolean>;
|
|
196
|
+
/**
|
|
197
|
+
* Search/list devices
|
|
198
|
+
*/
|
|
199
|
+
search(params: DeviceSearchParams): Promise<DeviceListResponse>;
|
|
200
|
+
/**
|
|
201
|
+
* Update last seen timestamp
|
|
202
|
+
*/
|
|
203
|
+
updateLastSeen(id: string, ip?: string): Promise<void>;
|
|
204
|
+
/**
|
|
205
|
+
* Regenerate token for a device (returns new token hash and prefix)
|
|
206
|
+
*/
|
|
207
|
+
updateToken(id: string, tokenHash: string, tokenPrefix: string, expiresAt: Date): Promise<boolean>;
|
|
208
|
+
/**
|
|
209
|
+
* Cleanup expired tokens
|
|
210
|
+
*/
|
|
211
|
+
cleanupExpired(): Promise<number>;
|
|
212
|
+
/**
|
|
213
|
+
* Shutdown the store
|
|
214
|
+
*/
|
|
215
|
+
shutdown(): Promise<void>;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* PostgreSQL device store configuration
|
|
219
|
+
*/
|
|
220
|
+
export interface PostgresDeviceStoreConfig {
|
|
221
|
+
/** PostgreSQL pool instance or a function that returns one (for lazy initialization) */
|
|
222
|
+
pool: unknown | (() => unknown);
|
|
223
|
+
/** Devices table name (default: 'devices') */
|
|
224
|
+
tableName?: string;
|
|
225
|
+
/** Schema name (default: 'public') */
|
|
226
|
+
schema?: string;
|
|
227
|
+
/** Auto-create tables on init (default: true) */
|
|
228
|
+
autoCreateTables?: boolean;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* API configuration
|
|
232
|
+
*/
|
|
233
|
+
export interface DevicesApiConfig {
|
|
234
|
+
/** API route prefix (default: '/devices') */
|
|
235
|
+
prefix?: string;
|
|
236
|
+
/** Enable CRUD endpoints */
|
|
237
|
+
crud?: boolean;
|
|
238
|
+
/** Enable token verification endpoint */
|
|
239
|
+
verify?: boolean;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Devices plugin configuration
|
|
243
|
+
*/
|
|
244
|
+
export interface DevicesPluginConfig {
|
|
245
|
+
/** Device storage backend */
|
|
246
|
+
store: DeviceStore;
|
|
247
|
+
/** Device adapter (defines device type) */
|
|
248
|
+
adapter: DeviceAdapter;
|
|
249
|
+
/** Default token validity in days (default: 90) */
|
|
250
|
+
defaultTokenValidityDays?: number;
|
|
251
|
+
/** API configuration */
|
|
252
|
+
api?: DevicesApiConfig;
|
|
253
|
+
/** Enable debug logging */
|
|
254
|
+
debug?: boolean;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Compute device metadata (QwickForge - laptops, containers)
|
|
258
|
+
*/
|
|
259
|
+
export interface ComputeDeviceMetadata {
|
|
260
|
+
/** Hostname of the device */
|
|
261
|
+
hostname?: string;
|
|
262
|
+
/** Operating system (darwin, linux, win32) */
|
|
263
|
+
os?: string;
|
|
264
|
+
/** OS version */
|
|
265
|
+
os_version?: string;
|
|
266
|
+
/** CPU architecture (x64, arm64) */
|
|
267
|
+
arch?: string;
|
|
268
|
+
/** CLI capabilities */
|
|
269
|
+
cli_capabilities?: string[];
|
|
270
|
+
/** Container ID if running in container */
|
|
271
|
+
container_id?: string;
|
|
272
|
+
/** Node.js version */
|
|
273
|
+
node_version?: string;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Mobile device metadata (QwickBot - phones, tablets)
|
|
277
|
+
*/
|
|
278
|
+
export interface MobileDeviceMetadata {
|
|
279
|
+
/** Device model (iPhone 15 Pro, Pixel 8) */
|
|
280
|
+
device_model?: string;
|
|
281
|
+
/** OS name (iOS, Android) */
|
|
282
|
+
os_name?: string;
|
|
283
|
+
/** OS version */
|
|
284
|
+
os_version?: string;
|
|
285
|
+
/** App version */
|
|
286
|
+
app_version?: string;
|
|
287
|
+
/** Push notification token (FCM/APNs) */
|
|
288
|
+
push_token?: string;
|
|
289
|
+
/** Screen width */
|
|
290
|
+
screen_width?: number;
|
|
291
|
+
/** Screen height */
|
|
292
|
+
screen_height?: number;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* IoT device metadata (future - robots, sensors)
|
|
296
|
+
*/
|
|
297
|
+
export interface IoTDeviceMetadata {
|
|
298
|
+
/** Firmware version */
|
|
299
|
+
firmware_version?: string;
|
|
300
|
+
/** Available sensors */
|
|
301
|
+
sensors?: string[];
|
|
302
|
+
/** Device capabilities */
|
|
303
|
+
capabilities?: string[];
|
|
304
|
+
/** MAC address */
|
|
305
|
+
mac_address?: string;
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/devices/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,gBAAgB,EAAE,IAAI,CAAC;IACvB,gCAAgC;IAChC,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+B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AE,MAAM,CAAC;IACpB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,uBAAuB;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Devices Plugin Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for device management with adapter support.
|
|
5
|
+
* Supports different device types through adapters (compute, mobile, IoT).
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plugins/devices/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -17,14 +17,28 @@ export { createPostgresPlugin, getPostgres, hasPostgres } from './postgres-plugi
|
|
|
17
17
|
export type { PostgresPluginConfig, PostgresInstance, TransactionCallback } from './postgres-plugin.js';
|
|
18
18
|
export { createCachePlugin, getCache, hasCache } from './cache-plugin.js';
|
|
19
19
|
export type { CachePluginConfig, CacheInstance } from './cache-plugin.js';
|
|
20
|
-
export { createAuthPlugin, createAuthPluginFromEnv, getAuthStatus, isAuthenticated, getAuthenticatedUser, getAccessToken, requireAuth, requireRoles, requireAnyRole, auth0Adapter, basicAdapter, supabaseAdapter, supertokensAdapter, isAuthenticatedRequest, } from './auth/index.js';
|
|
21
|
-
export type { AuthPluginConfig, AuthAdapter, AuthenticatedUser, AuthenticatedRequest, Auth0AdapterConfig, SupabaseAdapterConfig, BasicAdapterConfig, SupertokensAdapterConfig, AuthPluginState, AuthEnvPluginOptions, AuthConfigStatus, } from './auth/index.js';
|
|
22
|
-
export { createUsersPlugin, getUserStore, getUserById, getUserByEmail, findOrCreateUser, postgresUserStore, } from './users/index.js';
|
|
23
|
-
export type { UsersPluginConfig, UserStore, User, CreateUserInput, UpdateUserInput, UserSearchParams, UserListResponse, PostgresUserStoreConfig, UserSyncConfig, UsersApiConfig, UsersUiConfig, } from './users/index.js';
|
|
20
|
+
export { createAuthPlugin, createAuthPluginFromEnv, getAuthStatus, setAuthConfigStore, postgresAuthConfigStore, isAuthenticated, getAuthenticatedUser, getAccessToken, requireAuth, requireRoles, requireAnyRole, auth0Adapter, basicAdapter, supabaseAdapter, supertokensAdapter, isAuthenticatedRequest, } from './auth/index.js';
|
|
21
|
+
export type { AuthPluginConfig, AuthAdapter, AuthenticatedUser, AuthenticatedRequest, Auth0AdapterConfig, SupabaseAdapterConfig, BasicAdapterConfig, SupertokensAdapterConfig, AuthPluginState, AuthEnvPluginOptions, AuthConfigStatus, AuthConfigStore, PostgresAuthConfigStoreConfig, } from './auth/index.js';
|
|
22
|
+
export { createUsersPlugin, getUserStore, getUserById, getUserByEmail, getUserByIdentifier, linkUserIdentifiers, findOrCreateUser, postgresUserStore, } from './users/index.js';
|
|
23
|
+
export type { UsersPluginConfig, UserStore, User, CreateUserInput, UpdateUserInput, UserSearchParams, UserListResponse, PostgresUserStoreConfig, UserSyncConfig, UsersApiConfig, UsersUiConfig, UserIdentifiers, StoredIdentifiers, } from './users/index.js';
|
|
24
24
|
export { createBansPlugin, getBanStore, isUserBanned, isEmailBanned, getActiveBan, banUser, unbanUser, listActiveBans, postgresBanStore, } from './bans/index.js';
|
|
25
25
|
export type { BansPluginConfig, BanStore, Ban, CreateBanInput, RemoveBanInput, BanCallbacks, PostgresBanStoreConfig, } from './bans/index.js';
|
|
26
26
|
export { createEntitlementsPlugin, getEntitlementSource, isSourceReadonly, getEntitlements, refreshEntitlements, hasEntitlement, hasAnyEntitlement, hasAllEntitlements, grantEntitlement, revokeEntitlement, setEntitlements, getAvailableEntitlements, getEntitlementStats, invalidateEntitlementCache, storeExternalIdMapping, invalidateByExternalId, requireEntitlement, requireAnyEntitlement, requireAllEntitlements, postgresEntitlementSource, } from './entitlements/index.js';
|
|
27
27
|
export type { EntitlementsPluginConfig, EntitlementSource, EntitlementResult, EntitlementDefinition, EntitlementCallbacks, EntitlementsCacheConfig, EntitlementsApiConfig, PostgresEntitlementSourceConfig, UserEntitlement, CachedEntitlements, EntitlementStats, } from './entitlements/index.js';
|
|
28
28
|
export { createPreferencesPlugin, getPreferencesStore, getPreferences, updatePreferences, deletePreferences, getDefaultPreferences, postgresPreferencesStore, deepMerge, } from './preferences/index.js';
|
|
29
29
|
export type { PreferencesPluginConfig, PreferencesStore, UserPreferences, PostgresPreferencesStoreConfig, PreferencesApiConfig, } from './preferences/index.js';
|
|
30
|
+
export { createRateLimitPlugin, createRateLimitPluginFromEnv, getRateLimitConfigStatus, postgresRateLimitStore, createRateLimitCache, createNoOpCache, createSlidingWindowStrategy, createFixedWindowStrategy, createTokenBucketStrategy, getStrategy, rateLimitMiddleware, rateLimitStatusMiddleware, RateLimitService, getRateLimitService, isLimited, checkLimit, incrementLimit, getRemainingRequests, getLimitStatus, clearLimit, createCleanupJob, } from './rate-limit/index.js';
|
|
31
|
+
export type { RateLimitPluginConfig, RateLimitEnvPluginOptions, RateLimitStrategy, LimitStatus, Strategy, StrategyOptions, StrategyContext, StoredLimit, IncrementOptions, RateLimitStore, PostgresRateLimitStoreConfig, CachedLimit, RateLimitCache, RateLimitCacheConfig, RateLimitMiddlewareOptions, CheckLimitOptions, CleanupJob, CleanupJobConfig, } from './rate-limit/index.js';
|
|
32
|
+
export { createDevicesPlugin, getDeviceStore, getDeviceAdapter, registerDevice, verifyDeviceToken, getDeviceById, updateDevice, deleteDevice, regenerateToken, listUserDevices, listOrgDevices, deactivateDevice, activateDevice, cleanupExpiredTokens, postgresDeviceStore, computeDeviceAdapter, mobileDeviceAdapter, generateDeviceToken, generatePairingCode, hashToken, verifyToken, isValidTokenFormat, isTokenExpired, getTokenExpiration, DeviceTokens, } from './devices/index.js';
|
|
33
|
+
export type { Device, DeviceWithToken, CreateDeviceInput, UpdateDeviceInput, DeviceSearchParams, DeviceListResponse, TokenVerificationResult, DeviceAdapter, ValidationResult as DeviceValidationResult, DeviceStore, DevicesPluginConfig, DevicesApiConfig, PostgresDeviceStoreConfig, ComputeDeviceMetadata, MobileDeviceMetadata, IoTDeviceMetadata, ComputeAdapterConfig, MobileAdapterConfig, DeviceTokenPair, } from './devices/index.js';
|
|
34
|
+
export { createProfilesPlugin, getProfileStore, createProfile, getProfileById, updateProfile, deleteProfile, listUserProfiles, getDefaultProfile, setDefaultProfile, getProfilesByAgeGroup, getChildProfiles, getProfileAge, checkTimeRestrictions, getContentFilterLevel, canAccessContent, postgresProfileStore, } from './profiles/index.js';
|
|
35
|
+
export type { Profile, CreateProfileInput, UpdateProfileInput, ProfileSearchParams, ProfileListResponse, TimeRestrictionResult, ContentFilterLevel, AgeGroup, ProfileStore, ProfilesPluginConfig, ProfilesApiConfig, PostgresProfileStoreConfig, AgeThresholds, QwickBotProfileMetadata, GamingProfileMetadata, } from './profiles/index.js';
|
|
36
|
+
export { createSubscriptionsPlugin, getSubscriptionsStore, createTier, getTierBySlug, getTierById, listTiers, getTierEntitlements, setTierEntitlements, getUserSubscription, createUserSubscription, updateUserSubscription, cancelSubscription, getUserTierSlug, getFeatureLimit, hasFeature, checkFeatureLimit, ensureUserSubscription, postgresSubscriptionsStore, } from './subscriptions/index.js';
|
|
37
|
+
export type { SubscriptionTier, SubscriptionEntitlement, UserSubscription, UserSubscriptionWithTier, SubscriptionStatus, FeatureLimitResult, CreateTierInput, UpdateTierInput, CreateEntitlementInput, CreateUserSubscriptionInput, UpdateUserSubscriptionInput, SubscriptionsStore, SubscriptionsPluginConfig, SubscriptionsApiConfig, PostgresSubscriptionsStoreConfig, } from './subscriptions/index.js';
|
|
38
|
+
export { createUsagePlugin, getUsageStore, getDailyUsage, incrementUsage, checkUsageLimit, getFeatureUsageStatus, getDailyUsageSummary, resetUsage, getRemainingQuota, canUseFeature, postgresUsageStore, } from './usage/index.js';
|
|
39
|
+
export type { DailyUsage, MonthlyUsage, UsageIncrementResult, UsageStatus, UsageSummary, UsageStore, UsagePluginConfig, UsageApiConfig, UsageCleanupConfig, PostgresUsageStoreConfig, } from './usage/index.js';
|
|
40
|
+
export { createParentalPlugin, getParentalStore, getParentalAdapter, getGuardianSettings, createGuardianSettings, updateGuardianSettings, setPin, verifyPin, incrementFailedPinAttempts, resetFailedPinAttempts, getRestrictions, createRestriction, updateRestriction, deleteRestriction, pauseProfile, resumeProfile, checkProfileAccess, logActivity, getActivityLog, postgresParentalStore, kidsAdapter, } from './parental/index.js';
|
|
41
|
+
export type { GuardianSettings, ProfileRestriction, ActivityLog, AccessCheckResult, CreateGuardianSettingsInput, UpdateGuardianSettingsInput, CreateRestrictionInput, LogActivityInput, ParentalAdapter, ParentalStore, ParentalPluginConfig, ParentalApiConfig, PostgresParentalStoreConfig, KidsAdapterConfig, } from './parental/index.js';
|
|
42
|
+
export { createNotificationsPlugin, NotificationsManager, getNotificationsManager, hasNotificationsManager, broadcastToDevice, broadcastToUser, broadcastToAll, } from './notifications/index.js';
|
|
43
|
+
export type { NotificationsPluginConfig, SSEClient, NotifyPayload, SSEEvent, NotificationsStats, ConnectionHealth, NotificationsManagerInterface, } from './notifications/index.js';
|
|
30
44
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,YAAY,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACtF,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAExG,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1E,YAAY,EAAE,i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WAAW,EACX,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,yBAAyB,EACzB,SAAS,EACT,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC"}
|
package/dist/plugins/index.js
CHANGED
|
@@ -11,13 +11,27 @@ export { createFrontendAppPlugin } from './frontend-app-plugin.js';
|
|
|
11
11
|
export { createPostgresPlugin, getPostgres, hasPostgres } from './postgres-plugin.js';
|
|
12
12
|
export { createCachePlugin, getCache, hasCache } from './cache-plugin.js';
|
|
13
13
|
// Auth plugin
|
|
14
|
-
export { createAuthPlugin, createAuthPluginFromEnv, getAuthStatus, isAuthenticated, getAuthenticatedUser, getAccessToken, requireAuth, requireRoles, requireAnyRole, auth0Adapter, basicAdapter, supabaseAdapter, supertokensAdapter, isAuthenticatedRequest, } from './auth/index.js';
|
|
14
|
+
export { createAuthPlugin, createAuthPluginFromEnv, getAuthStatus, setAuthConfigStore, postgresAuthConfigStore, isAuthenticated, getAuthenticatedUser, getAccessToken, requireAuth, requireRoles, requireAnyRole, auth0Adapter, basicAdapter, supabaseAdapter, supertokensAdapter, isAuthenticatedRequest, } from './auth/index.js';
|
|
15
15
|
// Users plugin
|
|
16
|
-
export { createUsersPlugin, getUserStore, getUserById, getUserByEmail, findOrCreateUser, postgresUserStore, } from './users/index.js';
|
|
16
|
+
export { createUsersPlugin, getUserStore, getUserById, getUserByEmail, getUserByIdentifier, linkUserIdentifiers, findOrCreateUser, postgresUserStore, } from './users/index.js';
|
|
17
17
|
// Bans plugin (separate from Users, depends on Users)
|
|
18
18
|
export { createBansPlugin, getBanStore, isUserBanned, isEmailBanned, getActiveBan, banUser, unbanUser, listActiveBans, postgresBanStore, } from './bans/index.js';
|
|
19
19
|
// Entitlements plugin
|
|
20
20
|
export { createEntitlementsPlugin, getEntitlementSource, isSourceReadonly, getEntitlements, refreshEntitlements, hasEntitlement, hasAnyEntitlement, hasAllEntitlements, grantEntitlement, revokeEntitlement, setEntitlements, getAvailableEntitlements, getEntitlementStats, invalidateEntitlementCache, storeExternalIdMapping, invalidateByExternalId, requireEntitlement, requireAnyEntitlement, requireAllEntitlements, postgresEntitlementSource, } from './entitlements/index.js';
|
|
21
21
|
// Preferences plugin (depends on Users)
|
|
22
22
|
export { createPreferencesPlugin, getPreferencesStore, getPreferences, updatePreferences, deletePreferences, getDefaultPreferences, postgresPreferencesStore, deepMerge, } from './preferences/index.js';
|
|
23
|
+
// Rate Limit plugin
|
|
24
|
+
export { createRateLimitPlugin, createRateLimitPluginFromEnv, getRateLimitConfigStatus, postgresRateLimitStore, createRateLimitCache, createNoOpCache, createSlidingWindowStrategy, createFixedWindowStrategy, createTokenBucketStrategy, getStrategy, rateLimitMiddleware, rateLimitStatusMiddleware, RateLimitService, getRateLimitService, isLimited, checkLimit, incrementLimit, getRemainingRequests, getLimitStatus, clearLimit, createCleanupJob, } from './rate-limit/index.js';
|
|
25
|
+
// Devices plugin
|
|
26
|
+
export { createDevicesPlugin, getDeviceStore, getDeviceAdapter, registerDevice, verifyDeviceToken, getDeviceById, updateDevice, deleteDevice, regenerateToken, listUserDevices, listOrgDevices, deactivateDevice, activateDevice, cleanupExpiredTokens, postgresDeviceStore, computeDeviceAdapter, mobileDeviceAdapter, generateDeviceToken, generatePairingCode, hashToken, verifyToken, isValidTokenFormat, isTokenExpired, getTokenExpiration, DeviceTokens, } from './devices/index.js';
|
|
27
|
+
// Profiles plugin
|
|
28
|
+
export { createProfilesPlugin, getProfileStore, createProfile, getProfileById, updateProfile, deleteProfile, listUserProfiles, getDefaultProfile, setDefaultProfile, getProfilesByAgeGroup, getChildProfiles, getProfileAge, checkTimeRestrictions, getContentFilterLevel, canAccessContent, postgresProfileStore, } from './profiles/index.js';
|
|
29
|
+
// Subscriptions plugin
|
|
30
|
+
export { createSubscriptionsPlugin, getSubscriptionsStore, createTier, getTierBySlug, getTierById, listTiers, getTierEntitlements, setTierEntitlements, getUserSubscription, createUserSubscription, updateUserSubscription, cancelSubscription, getUserTierSlug, getFeatureLimit, hasFeature, checkFeatureLimit, ensureUserSubscription, postgresSubscriptionsStore, } from './subscriptions/index.js';
|
|
31
|
+
// Usage plugin
|
|
32
|
+
export { createUsagePlugin, getUsageStore, getDailyUsage, incrementUsage, checkUsageLimit, getFeatureUsageStatus, getDailyUsageSummary, resetUsage, getRemainingQuota, canUseFeature, postgresUsageStore, } from './usage/index.js';
|
|
33
|
+
// Parental plugin
|
|
34
|
+
export { createParentalPlugin, getParentalStore, getParentalAdapter, getGuardianSettings, createGuardianSettings, updateGuardianSettings, setPin, verifyPin, incrementFailedPinAttempts, resetFailedPinAttempts, getRestrictions, createRestriction, updateRestriction, deleteRestriction, pauseProfile, resumeProfile, checkProfileAccess, logActivity, getActivityLog, postgresParentalStore, kidsAdapter, } from './parental/index.js';
|
|
35
|
+
// Notifications plugin
|
|
36
|
+
export { createNotificationsPlugin, NotificationsManager, getNotificationsManager, hasNotificationsManager, broadcastToDevice, broadcastToUser, broadcastToAll, } from './notifications/index.js';
|
|
23
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB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Ae,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,qBAAqB,EACrB,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAkB7B,uBAAuB;AACvB,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications-manager.test.d.ts","sourceRoot":"","sources":["../../../../src/plugins/notifications/__tests__/notifications-manager.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|