@frontegg/rest-api 2.10.90 → 3.0.3
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/{dist/ContextHolder.d.ts → ContextHolder.d.ts} +0 -0
- package/ContextHolder.js +80 -0
- package/{dist/account-settings → account-settings}/index.d.ts +0 -0
- package/account-settings/index.js +8 -0
- package/{dist/account-settings → account-settings}/interfaces.d.ts +0 -0
- package/account-settings/interfaces.js +1 -0
- package/account-settings/package.json +6 -0
- package/{dist/audits → audits}/index.d.ts +0 -0
- package/audits/index.js +21 -0
- package/{dist/audits → audits}/interfaces.d.ts +0 -0
- package/audits/interfaces.js +1 -0
- package/audits/package.json +6 -0
- package/{dist/auth → auth}/enums.d.ts +0 -0
- package/auth/enums.js +18 -0
- package/{dist/auth → auth}/index.d.ts +0 -0
- package/auth/index.js +409 -0
- package/{dist/auth → auth}/interfaces.d.ts +0 -0
- package/auth/interfaces.js +16 -0
- package/auth/package.json +6 -0
- package/{dist/auth → auth}/secutiry-poilicy/index.d.ts +0 -0
- package/auth/secutiry-poilicy/index.js +48 -0
- package/{dist/auth → auth}/secutiry-poilicy/interfaces.d.ts +0 -0
- package/auth/secutiry-poilicy/interfaces.js +1 -0
- package/{dist/connectivity → connectivity}/index.d.ts +0 -0
- package/connectivity/index.js +120 -0
- package/{dist/connectivity → connectivity}/interfaces.d.ts +0 -0
- package/connectivity/interfaces.js +1 -0
- package/connectivity/package.json +6 -0
- package/{dist/constants.d.ts → constants.d.ts} +0 -0
- package/{src/constants.ts → constants.js} +12 -12
- package/{dist/error.d.ts → error.d.ts} +0 -0
- package/{src/error.ts → error.js} +4 -5
- package/fetch.d.ts +19 -0
- package/fetch.js +203 -0
- package/{dist/es2015/index.d.ts → index.d.ts} +0 -0
- package/{dist/es2015/index.js → index.js} +31 -27
- package/{dist/es2015/interfaces.d.ts → interfaces.d.ts} +0 -0
- package/interfaces.js +1 -0
- package/{dist/es2015/jwt.d.ts → jwt.d.ts} +0 -0
- package/jwt.js +79 -0
- package/{dist/es2015/metadata → metadata}/index.d.ts +0 -0
- package/metadata/index.js +26 -0
- package/{dist/es2015/metadata → metadata}/interfaces.d.ts +0 -0
- package/metadata/interfaces.js +1 -0
- package/metadata/package.json +6 -0
- package/node/ContextHolder.js +90 -0
- package/node/account-settings/index.js +19 -0
- package/node/account-settings/interfaces.js +5 -0
- package/node/audits/index.js +37 -0
- package/node/audits/interfaces.js +5 -0
- package/node/auth/enums.js +26 -0
- package/node/auth/index.js +709 -0
- package/node/auth/interfaces.js +39 -0
- package/node/auth/secutiry-poilicy/index.js +75 -0
- package/node/auth/secutiry-poilicy/interfaces.js +5 -0
- package/node/connectivity/index.js +208 -0
- package/node/connectivity/interfaces.js +5 -0
- package/node/constants.js +177 -0
- package/node/error.js +21 -0
- package/node/fetch.js +234 -0
- package/node/index.js +357 -0
- package/node/interfaces.js +5 -0
- package/node/jwt.js +93 -0
- package/node/metadata/index.js +44 -0
- package/node/metadata/interfaces.js +5 -0
- package/node/notifications/index.js +39 -0
- package/node/notifications/interfaces.js +5 -0
- package/node/reports/index.js +96 -0
- package/node/reports/interfaces.js +5 -0
- package/node/roles/index.js +71 -0
- package/node/roles/interfaces.js +5 -0
- package/node/routers.js +13 -0
- package/node/sub-tenants/index.js +39 -0
- package/node/sub-tenants/interfaces.js +5 -0
- package/node/subscriptions/enums.js +39 -0
- package/node/subscriptions/index.js +135 -0
- package/node/subscriptions/interfaces.js +18 -0
- package/node/subscriptions/invoices.js +28 -0
- package/node/subscriptions/managedSubscriptions.js +40 -0
- package/node/subscriptions/paymentMethods.js +37 -0
- package/node/subscriptions/paymentProviders.js +14 -0
- package/node/subscriptions/plans.js +19 -0
- package/node/subscriptions/providers/index.js +18 -0
- package/node/subscriptions/providers/stripe/index.js +34 -0
- package/node/subscriptions/providers/stripe/interfaces.js +5 -0
- package/node/subscriptions/subscriptions.js +40 -0
- package/node/subscriptions/summaries.js +14 -0
- package/node/subscriptions/tenantConfiguration.js +19 -0
- package/node/teams/index.js +129 -0
- package/node/teams/interfaces.js +5 -0
- package/node/tenants/index.js +29 -0
- package/node/tenants/interfaces.js +5 -0
- package/node/vendor/index.js +16 -0
- package/node/vendor/interfaces.js +5 -0
- package/{dist/es2015/notifications → notifications}/index.d.ts +0 -0
- package/notifications/index.js +24 -0
- package/{dist/es2015/notifications → notifications}/interfaces.d.ts +0 -0
- package/notifications/interfaces.js +1 -0
- package/notifications/package.json +6 -0
- package/package.json +9 -32
- package/{dist/es2015/reports → reports}/index.d.ts +0 -0
- package/reports/index.js +75 -0
- package/{dist/es2015/reports → reports}/interfaces.d.ts +0 -0
- package/reports/interfaces.js +1 -0
- package/reports/package.json +6 -0
- package/{dist/es2015/roles → roles}/index.d.ts +0 -0
- package/roles/index.js +47 -0
- package/{dist/es2015/roles → roles}/interfaces.d.ts +0 -0
- package/roles/interfaces.js +1 -0
- package/roles/package.json +6 -0
- package/{dist/es2015/routers.d.ts → routers.d.ts} +0 -0
- package/routers.js +3 -0
- package/{dist/es2015/sub-tenants → sub-tenants}/index.d.ts +0 -0
- package/sub-tenants/index.js +20 -0
- package/{dist/es2015/sub-tenants → sub-tenants}/interfaces.d.ts +0 -0
- package/sub-tenants/interfaces.js +1 -0
- package/sub-tenants/package.json +6 -0
- package/{dist/es2015/subscriptions → subscriptions}/enums.d.ts +0 -0
- package/subscriptions/enums.js +29 -0
- package/{dist/es2015/subscriptions → subscriptions}/index.d.ts +0 -0
- package/{dist/subscriptions/index.d.ts → subscriptions/index.js} +1 -1
- package/{dist/es2015/subscriptions → subscriptions}/interfaces.d.ts +0 -0
- package/{dist/es2015/subscriptions → subscriptions}/interfaces.js +1 -1
- package/{dist/es2015/subscriptions → subscriptions}/invoices.d.ts +0 -0
- package/subscriptions/invoices.js +15 -0
- package/{dist/es2015/subscriptions → subscriptions}/managedSubscriptions.d.ts +0 -0
- package/subscriptions/managedSubscriptions.js +23 -0
- package/subscriptions/package.json +6 -0
- package/{dist/es2015/subscriptions → subscriptions}/paymentMethods.d.ts +0 -0
- package/subscriptions/paymentMethods.js +21 -0
- package/{dist/es2015/subscriptions → subscriptions}/paymentProviders.d.ts +0 -0
- package/subscriptions/paymentProviders.js +5 -0
- package/{dist/es2015/subscriptions → subscriptions}/plans.d.ts +0 -0
- package/subscriptions/plans.js +8 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/index.d.ts +0 -0
- package/subscriptions/providers/index.js +1 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/stripe/index.d.ts +0 -0
- package/subscriptions/providers/stripe/index.js +17 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/stripe/interfaces.d.ts +0 -0
- package/subscriptions/providers/stripe/interfaces.js +1 -0
- package/{dist/es2015/subscriptions → subscriptions}/subscriptions.d.ts +0 -0
- package/subscriptions/subscriptions.js +23 -0
- package/{dist/es2015/subscriptions → subscriptions}/summaries.d.ts +0 -0
- package/subscriptions/summaries.js +5 -0
- package/{dist/es2015/subscriptions → subscriptions}/tenantConfiguration.d.ts +0 -0
- package/subscriptions/tenantConfiguration.js +8 -0
- package/{dist/es2015/teams → teams}/index.d.ts +0 -0
- package/teams/index.js +81 -0
- package/{dist/es2015/teams → teams}/interfaces.d.ts +0 -0
- package/teams/interfaces.js +1 -0
- package/teams/package.json +6 -0
- package/{dist/es2015/tenants → tenants}/index.d.ts +0 -0
- package/tenants/index.js +14 -0
- package/{dist/es2015/tenants → tenants}/interfaces.d.ts +0 -0
- package/tenants/interfaces.js +1 -0
- package/tenants/package.json +6 -0
- package/{dist/es2015/vendor → vendor}/index.d.ts +0 -0
- package/vendor/index.js +6 -0
- package/{dist/es2015/vendor → vendor}/interfaces.d.ts +0 -0
- package/vendor/interfaces.js +1 -0
- package/vendor/package.json +6 -0
- package/CHANGELOG.md +0 -211
- package/README.md +0 -139
- package/SECURITY.md +0 -13
- package/dist/ContextHolder.js +0 -69
- package/dist/ContextHolder.js.map +0 -1
- package/dist/account-settings/index.js +0 -33
- package/dist/account-settings/index.js.map +0 -1
- package/dist/account-settings/interfaces.js +0 -3
- package/dist/account-settings/interfaces.js.map +0 -1
- package/dist/audits/index.js +0 -59
- package/dist/audits/index.js.map +0 -1
- package/dist/audits/interfaces.js +0 -3
- package/dist/audits/interfaces.js.map +0 -1
- package/dist/auth/enums.js +0 -19
- package/dist/auth/enums.js.map +0 -1
- package/dist/auth/index.js +0 -1042
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/interfaces.js +0 -29
- package/dist/auth/interfaces.js.map +0 -1
- package/dist/auth/secutiry-poilicy/index.js +0 -134
- package/dist/auth/secutiry-poilicy/index.js.map +0 -1
- package/dist/auth/secutiry-poilicy/interfaces.js +0 -3
- package/dist/auth/secutiry-poilicy/interfaces.js.map +0 -1
- package/dist/connectivity/index.js +0 -158
- package/dist/connectivity/index.js.map +0 -1
- package/dist/connectivity/interfaces.js +0 -3
- package/dist/connectivity/interfaces.js.map +0 -1
- package/dist/constants.js +0 -174
- package/dist/constants.js.map +0 -1
- package/dist/error.js +0 -14
- package/dist/error.js.map +0 -1
- package/dist/es2015/ContextHolder.d.ts +0 -29
- package/dist/es2015/ContextHolder.js +0 -65
- package/dist/es2015/ContextHolder.js.map +0 -1
- package/dist/es2015/account-settings/index.d.ts +0 -7
- package/dist/es2015/account-settings/index.js +0 -28
- package/dist/es2015/account-settings/index.js.map +0 -1
- package/dist/es2015/account-settings/interfaces.d.ts +0 -9
- package/dist/es2015/account-settings/interfaces.js +0 -2
- package/dist/es2015/account-settings/interfaces.js.map +0 -1
- package/dist/es2015/audits/index.d.ts +0 -16
- package/dist/es2015/audits/index.js +0 -53
- package/dist/es2015/audits/index.js.map +0 -1
- package/dist/es2015/audits/interfaces.d.ts +0 -61
- package/dist/es2015/audits/interfaces.js +0 -2
- package/dist/es2015/audits/interfaces.js.map +0 -1
- package/dist/es2015/auth/enums.d.ts +0 -13
- package/dist/es2015/auth/enums.js +0 -16
- package/dist/es2015/auth/enums.js.map +0 -1
- package/dist/es2015/auth/index.d.ts +0 -447
- package/dist/es2015/auth/index.js +0 -943
- package/dist/es2015/auth/index.js.map +0 -1
- package/dist/es2015/auth/interfaces.d.ts +0 -430
- package/dist/es2015/auth/interfaces.js +0 -16
- package/dist/es2015/auth/interfaces.js.map +0 -1
- package/dist/es2015/auth/secutiry-poilicy/index.d.ts +0 -41
- package/dist/es2015/auth/secutiry-poilicy/index.js +0 -121
- package/dist/es2015/auth/secutiry-poilicy/index.js.map +0 -1
- package/dist/es2015/auth/secutiry-poilicy/interfaces.d.ts +0 -70
- package/dist/es2015/auth/secutiry-poilicy/interfaces.js +0 -2
- package/dist/es2015/auth/secutiry-poilicy/interfaces.js.map +0 -1
- package/dist/es2015/connectivity/index.d.ts +0 -27
- package/dist/es2015/connectivity/index.js +0 -129
- package/dist/es2015/connectivity/index.js.map +0 -1
- package/dist/es2015/connectivity/interfaces.d.ts +0 -95
- package/dist/es2015/connectivity/interfaces.js +0 -2
- package/dist/es2015/connectivity/interfaces.js.map +0 -1
- package/dist/es2015/constants.d.ts +0 -170
- package/dist/es2015/constants.js +0 -171
- package/dist/es2015/constants.js.map +0 -1
- package/dist/es2015/error.d.ts +0 -5
- package/dist/es2015/error.js +0 -10
- package/dist/es2015/error.js.map +0 -1
- package/dist/es2015/fetch.d.ts +0 -19
- package/dist/es2015/fetch.js +0 -177
- package/dist/es2015/fetch.js.map +0 -1
- package/dist/es2015/index.js.map +0 -1
- package/dist/es2015/interfaces.js +0 -2
- package/dist/es2015/interfaces.js.map +0 -1
- package/dist/es2015/jwt.js +0 -83
- package/dist/es2015/jwt.js.map +0 -1
- package/dist/es2015/metadata/index.js +0 -32
- package/dist/es2015/metadata/index.js.map +0 -1
- package/dist/es2015/metadata/interfaces.js +0 -2
- package/dist/es2015/metadata/interfaces.js.map +0 -1
- package/dist/es2015/notifications/index.js +0 -49
- package/dist/es2015/notifications/index.js.map +0 -1
- package/dist/es2015/notifications/interfaces.js +0 -2
- package/dist/es2015/notifications/interfaces.js.map +0 -1
- package/dist/es2015/reports/index.js +0 -118
- package/dist/es2015/reports/index.js.map +0 -1
- package/dist/es2015/reports/interfaces.js +0 -2
- package/dist/es2015/reports/interfaces.js.map +0 -1
- package/dist/es2015/roles/index.js +0 -99
- package/dist/es2015/roles/index.js.map +0 -1
- package/dist/es2015/roles/interfaces.js +0 -2
- package/dist/es2015/roles/interfaces.js.map +0 -1
- package/dist/es2015/routers.js +0 -17
- package/dist/es2015/routers.js.map +0 -1
- package/dist/es2015/sub-tenants/index.js +0 -42
- package/dist/es2015/sub-tenants/index.js.map +0 -1
- package/dist/es2015/sub-tenants/interfaces.js +0 -2
- package/dist/es2015/sub-tenants/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/enums.js +0 -23
- package/dist/es2015/subscriptions/enums.js.map +0 -1
- package/dist/es2015/subscriptions/index.js +0 -11
- package/dist/es2015/subscriptions/index.js.map +0 -1
- package/dist/es2015/subscriptions/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/invoices.js +0 -43
- package/dist/es2015/subscriptions/invoices.js.map +0 -1
- package/dist/es2015/subscriptions/managedSubscriptions.js +0 -51
- package/dist/es2015/subscriptions/managedSubscriptions.js.map +0 -1
- package/dist/es2015/subscriptions/paymentMethods.js +0 -55
- package/dist/es2015/subscriptions/paymentMethods.js.map +0 -1
- package/dist/es2015/subscriptions/paymentProviders.js +0 -21
- package/dist/es2015/subscriptions/paymentProviders.js.map +0 -1
- package/dist/es2015/subscriptions/plans.js +0 -30
- package/dist/es2015/subscriptions/plans.js.map +0 -1
- package/dist/es2015/subscriptions/providers/index.js +0 -2
- package/dist/es2015/subscriptions/providers/index.js.map +0 -1
- package/dist/es2015/subscriptions/providers/stripe/index.js +0 -57
- package/dist/es2015/subscriptions/providers/stripe/index.js.map +0 -1
- package/dist/es2015/subscriptions/providers/stripe/interfaces.js +0 -2
- package/dist/es2015/subscriptions/providers/stripe/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/subscriptions.js +0 -57
- package/dist/es2015/subscriptions/subscriptions.js.map +0 -1
- package/dist/es2015/subscriptions/summaries.js +0 -21
- package/dist/es2015/subscriptions/summaries.js.map +0 -1
- package/dist/es2015/subscriptions/tenantConfiguration.js +0 -24
- package/dist/es2015/subscriptions/tenantConfiguration.js.map +0 -1
- package/dist/es2015/teams/index.js +0 -228
- package/dist/es2015/teams/index.js.map +0 -1
- package/dist/es2015/teams/interfaces.js +0 -2
- package/dist/es2015/teams/interfaces.js.map +0 -1
- package/dist/es2015/tenants/index.js +0 -57
- package/dist/es2015/tenants/index.js.map +0 -1
- package/dist/es2015/tenants/interfaces.js +0 -2
- package/dist/es2015/tenants/interfaces.js.map +0 -1
- package/dist/es2015/vendor/index.js +0 -23
- package/dist/es2015/vendor/index.js.map +0 -1
- package/dist/es2015/vendor/interfaces.js +0 -2
- package/dist/es2015/vendor/interfaces.js.map +0 -1
- package/dist/fetch.d.ts +0 -19
- package/dist/fetch.js +0 -187
- package/dist/fetch.js.map +0 -1
- package/dist/index.d.ts +0 -83
- package/dist/index.js +0 -98
- package/dist/index.js.map +0 -1
- package/dist/interfaces.d.ts +0 -40
- package/dist/interfaces.js +0 -3
- package/dist/interfaces.js.map +0 -1
- package/dist/jwt.d.ts +0 -13
- package/dist/jwt.js +0 -89
- package/dist/jwt.js.map +0 -1
- package/dist/metadata/index.d.ts +0 -5
- package/dist/metadata/index.js +0 -39
- package/dist/metadata/index.js.map +0 -1
- package/dist/metadata/interfaces.d.ts +0 -46
- package/dist/metadata/interfaces.js +0 -3
- package/dist/metadata/interfaces.js.map +0 -1
- package/dist/notifications/index.d.ts +0 -17
- package/dist/notifications/index.js +0 -56
- package/dist/notifications/index.js.map +0 -1
- package/dist/notifications/interfaces.d.ts +0 -40
- package/dist/notifications/interfaces.js +0 -3
- package/dist/notifications/interfaces.js.map +0 -1
- package/dist/reports/index.d.ts +0 -45
- package/dist/reports/index.js +0 -127
- package/dist/reports/index.js.map +0 -1
- package/dist/reports/interfaces.d.ts +0 -146
- package/dist/reports/interfaces.js +0 -3
- package/dist/reports/interfaces.js.map +0 -1
- package/dist/roles/index.d.ts +0 -34
- package/dist/roles/index.js +0 -110
- package/dist/roles/index.js.map +0 -1
- package/dist/roles/interfaces.d.ts +0 -58
- package/dist/roles/interfaces.js +0 -3
- package/dist/roles/interfaces.js.map +0 -1
- package/dist/routers.d.ts +0 -2
- package/dist/routers.js +0 -20
- package/dist/routers.js.map +0 -1
- package/dist/sub-tenants/index.d.ts +0 -8
- package/dist/sub-tenants/index.js +0 -51
- package/dist/sub-tenants/index.js.map +0 -1
- package/dist/sub-tenants/interfaces.d.ts +0 -87
- package/dist/sub-tenants/interfaces.js +0 -3
- package/dist/sub-tenants/interfaces.js.map +0 -1
- package/dist/subscriptions/enums.d.ts +0 -18
- package/dist/subscriptions/enums.js +0 -26
- package/dist/subscriptions/enums.js.map +0 -1
- package/dist/subscriptions/index.js +0 -23
- package/dist/subscriptions/index.js.map +0 -1
- package/dist/subscriptions/interfaces.d.ts +0 -117
- package/dist/subscriptions/interfaces.js +0 -14
- package/dist/subscriptions/interfaces.js.map +0 -1
- package/dist/subscriptions/invoices.d.ts +0 -13
- package/dist/subscriptions/invoices.js +0 -49
- package/dist/subscriptions/invoices.js.map +0 -1
- package/dist/subscriptions/managedSubscriptions.d.ts +0 -15
- package/dist/subscriptions/managedSubscriptions.js +0 -59
- package/dist/subscriptions/managedSubscriptions.js.map +0 -1
- package/dist/subscriptions/paymentMethods.d.ts +0 -13
- package/dist/subscriptions/paymentMethods.js +0 -61
- package/dist/subscriptions/paymentMethods.js.map +0 -1
- package/dist/subscriptions/paymentProviders.d.ts +0 -5
- package/dist/subscriptions/paymentProviders.js +0 -25
- package/dist/subscriptions/paymentProviders.js.map +0 -1
- package/dist/subscriptions/plans.d.ts +0 -9
- package/dist/subscriptions/plans.js +0 -35
- package/dist/subscriptions/plans.js.map +0 -1
- package/dist/subscriptions/providers/index.d.ts +0 -1
- package/dist/subscriptions/providers/index.js +0 -14
- package/dist/subscriptions/providers/index.js.map +0 -1
- package/dist/subscriptions/providers/stripe/index.d.ts +0 -21
- package/dist/subscriptions/providers/stripe/index.js +0 -65
- package/dist/subscriptions/providers/stripe/index.js.map +0 -1
- package/dist/subscriptions/providers/stripe/interfaces.d.ts +0 -32
- package/dist/subscriptions/providers/stripe/interfaces.js +0 -3
- package/dist/subscriptions/providers/stripe/interfaces.js.map +0 -1
- package/dist/subscriptions/subscriptions.d.ts +0 -21
- package/dist/subscriptions/subscriptions.js +0 -65
- package/dist/subscriptions/subscriptions.js.map +0 -1
- package/dist/subscriptions/summaries.d.ts +0 -5
- package/dist/subscriptions/summaries.js +0 -25
- package/dist/subscriptions/summaries.js.map +0 -1
- package/dist/subscriptions/tenantConfiguration.d.ts +0 -3
- package/dist/subscriptions/tenantConfiguration.js +0 -29
- package/dist/subscriptions/tenantConfiguration.js.map +0 -1
- package/dist/teams/index.d.ts +0 -116
- package/dist/teams/index.js +0 -250
- package/dist/teams/index.js.map +0 -1
- package/dist/teams/interfaces.d.ts +0 -136
- package/dist/teams/interfaces.js +0 -3
- package/dist/teams/interfaces.js.map +0 -1
- package/dist/tenants/index.d.ts +0 -26
- package/dist/tenants/index.js +0 -64
- package/dist/tenants/index.js.map +0 -1
- package/dist/tenants/interfaces.d.ts +0 -30
- package/dist/tenants/interfaces.js +0 -3
- package/dist/tenants/interfaces.js.map +0 -1
- package/dist/umd/index.js +0 -2891
- package/dist/vendor/index.d.ts +0 -6
- package/dist/vendor/index.js +0 -27
- package/dist/vendor/index.js.map +0 -1
- package/dist/vendor/interfaces.d.ts +0 -6
- package/dist/vendor/interfaces.js +0 -3
- package/dist/vendor/interfaces.js.map +0 -1
- package/src/ContextHolder.ts +0 -81
- package/src/account-settings/index.ts +0 -18
- package/src/account-settings/interfaces.ts +0 -10
- package/src/audits/index.ts +0 -35
- package/src/audits/interfaces.ts +0 -70
- package/src/auth/enums.ts +0 -17
- package/src/auth/index.ts +0 -935
- package/src/auth/interfaces.ts +0 -488
- package/src/auth/secutiry-poilicy/index.ts +0 -109
- package/src/auth/secutiry-poilicy/interfaces.ts +0 -81
- package/src/connectivity/index.ts +0 -160
- package/src/connectivity/interfaces.ts +0 -106
- package/src/fetch.ts +0 -220
- package/src/index.ts +0 -86
- package/src/interfaces.ts +0 -47
- package/src/jwt.ts +0 -92
- package/src/metadata/index.ts +0 -24
- package/src/metadata/interfaces.ts +0 -51
- package/src/notifications/index.ts +0 -40
- package/src/notifications/interfaces.ts +0 -45
- package/src/reports/index.ts +0 -116
- package/src/reports/interfaces.ts +0 -167
- package/src/roles/index.ts +0 -80
- package/src/roles/interfaces.ts +0 -64
- package/src/routers.ts +0 -18
- package/src/sub-tenants/index.ts +0 -49
- package/src/sub-tenants/interfaces.ts +0 -100
- package/src/subscriptions/enums.ts +0 -22
- package/src/subscriptions/index.ts +0 -10
- package/src/subscriptions/interfaces.ts +0 -144
- package/src/subscriptions/invoices.ts +0 -42
- package/src/subscriptions/managedSubscriptions.ts +0 -53
- package/src/subscriptions/paymentMethods.ts +0 -47
- package/src/subscriptions/paymentProviders.ts +0 -13
- package/src/subscriptions/plans.ts +0 -19
- package/src/subscriptions/providers/index.ts +0 -1
- package/src/subscriptions/providers/stripe/index.ts +0 -56
- package/src/subscriptions/providers/stripe/interfaces.ts +0 -39
- package/src/subscriptions/subscriptions.ts +0 -63
- package/src/subscriptions/summaries.ts +0 -11
- package/src/subscriptions/tenantConfiguration.ts +0 -23
- package/src/teams/index.ts +0 -224
- package/src/teams/interfaces.ts +0 -163
- package/src/tenants/index.ts +0 -46
- package/src/tenants/interfaces.ts +0 -33
- package/src/vendor/index.ts +0 -12
- package/src/vendor/interfaces.ts +0 -6
- package/yarn-error.log +0 -518
package/src/metadata/index.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Get } from '../fetch';
|
|
2
|
-
import { IAuditsMetadata, IGetMetadata, IMetadataIp, INotificationMetadata, ISamlMetadata } from './interfaces';
|
|
3
|
-
|
|
4
|
-
async function getMetadata(body: IGetMetadata) {
|
|
5
|
-
const data = await Get('/metadata', body);
|
|
6
|
-
if (data?.rows?.[0]) return data?.rows?.[0];
|
|
7
|
-
|
|
8
|
-
throw new Error(`metadata not found: ${body.entityName}`);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
async function getIpMetadata(ip: string) {
|
|
12
|
-
const data = await Get(`/metadata/ip/${ip}`);
|
|
13
|
-
if (data) return data;
|
|
14
|
-
|
|
15
|
-
throw new Error(`ip metadata not found`);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const getNotificationsMetadata = async (): Promise<INotificationMetadata> =>
|
|
19
|
-
getMetadata({ entityName: 'notifications' });
|
|
20
|
-
export const getSamlMetadata = async (): Promise<ISamlMetadata> => getMetadata({ entityName: 'saml' });
|
|
21
|
-
|
|
22
|
-
export const getAuditsMetadata = async (): Promise<IAuditsMetadata> => getMetadata({ entityName: 'audits' });
|
|
23
|
-
|
|
24
|
-
export const getIpAdressMetadata = async (ip: string): Promise<IMetadataIp> => getIpMetadata(ip);
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export type IGetMetadata = Pick<IBaseMetadata, 'entityName'>;
|
|
2
|
-
|
|
3
|
-
interface IBaseMetadata {
|
|
4
|
-
entityName: 'saml' | 'notifications' | 'audits';
|
|
5
|
-
id: string;
|
|
6
|
-
createdAt: string;
|
|
7
|
-
updatedAt: string;
|
|
8
|
-
properties: any[];
|
|
9
|
-
vendorId: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type IMetadataTheme = {
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
styles: any;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export interface INotificationMetadata extends IBaseMetadata {
|
|
19
|
-
entityName: 'notifications';
|
|
20
|
-
channels: string[];
|
|
21
|
-
channelsConfig: string[];
|
|
22
|
-
severities: any[];
|
|
23
|
-
theme: IMetadataTheme;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface ISamlMetadata extends IBaseMetadata {
|
|
27
|
-
entityName: 'saml';
|
|
28
|
-
isActive: boolean;
|
|
29
|
-
configuration: {
|
|
30
|
-
acsUrl: string;
|
|
31
|
-
spEntityId: string;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface IAuditsMetadata extends IBaseMetadata {
|
|
36
|
-
entityName: 'audits';
|
|
37
|
-
theme: IMetadataTheme;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface IMetadataIp {
|
|
41
|
-
latitude: number;
|
|
42
|
-
longitude: number;
|
|
43
|
-
city: string | null;
|
|
44
|
-
country_name: string | null;
|
|
45
|
-
country_code: string | null;
|
|
46
|
-
zip: string | null;
|
|
47
|
-
location: {
|
|
48
|
-
country_flag?: string | null;
|
|
49
|
-
country_flag_emoji?: string | null;
|
|
50
|
-
};
|
|
51
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {Get, Post, Put} from '../fetch';
|
|
2
|
-
import {urls} from '../constants';
|
|
3
|
-
import {ILoadMessages, IMessage, IUpdateNotificationStatus, IUpdateNotificationIsPinned} from './interfaces';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* get Notifications
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export async function getNotifications(params: ILoadMessages): Promise<Array<IMessage>> {
|
|
10
|
-
console.debug('getNotifications()');
|
|
11
|
-
return Get(urls.notifications.v1, {params});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* update Notification status
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export async function updateNotificationStatus(params: IUpdateNotificationStatus): Promise<void> {
|
|
19
|
-
console.debug('getNotifications()');
|
|
20
|
-
return Put(`${urls.notifications.v1}/status`, {params});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* update Notification pin status
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
export async function updateNotificationIsPinned(params: IUpdateNotificationIsPinned): Promise<any> {
|
|
28
|
-
const {notificationId, pinStatus} = params;
|
|
29
|
-
console.debug('getNotifications()');
|
|
30
|
-
return Put(`${urls.notifications.v1}/${pinStatus}`, {notificationId});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* mark all notifications as read
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
export async function markAllAsRead(): Promise<void> {
|
|
38
|
-
console.debug('getNotifications()');
|
|
39
|
-
return Post(`${urls.notifications.v1}/status/mark-all-read`);
|
|
40
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export interface ILoadMessages {
|
|
2
|
-
count: number;
|
|
3
|
-
offset: number;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface IMessages {
|
|
7
|
-
data: Array<IMessage>;
|
|
8
|
-
current: number;
|
|
9
|
-
total: number | null;
|
|
10
|
-
unreadCount: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface IMessage {
|
|
14
|
-
actions: INotificationAction[];
|
|
15
|
-
id: string;
|
|
16
|
-
title: string;
|
|
17
|
-
body: string;
|
|
18
|
-
severity: string;
|
|
19
|
-
url: string;
|
|
20
|
-
viewed: boolean;
|
|
21
|
-
createdAt: string;
|
|
22
|
-
status: string;
|
|
23
|
-
isPinned: boolean;
|
|
24
|
-
key: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface INotificationAction {
|
|
28
|
-
visualization: string;
|
|
29
|
-
id: string;
|
|
30
|
-
name: string;
|
|
31
|
-
url: string;
|
|
32
|
-
method: string;
|
|
33
|
-
createdAt: string;
|
|
34
|
-
updatedAt: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface IUpdateNotificationStatus {
|
|
38
|
-
notificationId: string;
|
|
39
|
-
status: 'read' | 'unread' | 'archived';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IUpdateNotificationIsPinned {
|
|
43
|
-
pinStatus: 'pin' | 'unpin';
|
|
44
|
-
notificationId: string;
|
|
45
|
-
}
|
package/src/reports/index.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/* tslint:disable:no-console */
|
|
2
|
-
import {
|
|
3
|
-
IDownloadReport,
|
|
4
|
-
IGetReport,
|
|
5
|
-
IGetReports,
|
|
6
|
-
IRenderReport,
|
|
7
|
-
IRenderReportResponse,
|
|
8
|
-
IReportRecord,
|
|
9
|
-
IScheduleReport,
|
|
10
|
-
ISendReport,
|
|
11
|
-
} from './interfaces';
|
|
12
|
-
import {Get, Post} from '../fetch';
|
|
13
|
-
import {urls} from '../constants';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Get all active tenant reports from reports service by active vendor.
|
|
17
|
-
* Optional: pass filters and sort options to reports.
|
|
18
|
-
*
|
|
19
|
-
* @returns list of reports objects
|
|
20
|
-
*/
|
|
21
|
-
export async function getReports(body: IGetReports): Promise<IReportRecord[]> {
|
|
22
|
-
console.debug('getReports()', body);
|
|
23
|
-
return Get(`${urls.reports.service.v2}/tenant-reports`, body);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Get report record by id.
|
|
28
|
-
*
|
|
29
|
-
* @returns list of report object
|
|
30
|
-
* @throws exception if report not found.
|
|
31
|
-
*/
|
|
32
|
-
export async function getReport(body: IGetReport): Promise<IReportRecord> {
|
|
33
|
-
console.debug('getReport()', body);
|
|
34
|
-
return Get(`${urls.reports.service.v2}/${body.id}/tenant-reports`);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Render report by id.
|
|
39
|
-
* Optional: pass data filters if exists to render report by specific data.
|
|
40
|
-
*
|
|
41
|
-
* @returns html content of the rendered reports
|
|
42
|
-
* @throws exception if report not found or the data api unreached.
|
|
43
|
-
*/
|
|
44
|
-
export async function renderReport({dataFilters, ...body}: IRenderReport): Promise<IRenderReportResponse> {
|
|
45
|
-
console.debug('renderReport()', body);
|
|
46
|
-
const html = await Get(`${urls.reports.trigger.v1}/preview-report`,
|
|
47
|
-
{
|
|
48
|
-
...body,
|
|
49
|
-
dataFilters: btoa(JSON.stringify(dataFilters || {})),
|
|
50
|
-
responseType: 'html',
|
|
51
|
-
},
|
|
52
|
-
{responseType: 'plain'}
|
|
53
|
-
);
|
|
54
|
-
return {html};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* schedule report by providing cron expression and data filters.
|
|
59
|
-
*
|
|
60
|
-
* @returns the updated report object
|
|
61
|
-
* @throws exception if report not found or the data api unreached.
|
|
62
|
-
*/
|
|
63
|
-
export async function scheduleReport({templateId, dataFilters, ...body}: IScheduleReport): Promise<IReportRecord> {
|
|
64
|
-
console.debug('scheduleReport()', body);
|
|
65
|
-
return Post(`${urls.reports.service.v2}/${templateId}/tenant-reports`, {
|
|
66
|
-
...body,
|
|
67
|
-
dataFilters: btoa(JSON.stringify(dataFilters || {})),
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* download report as file in specific format.
|
|
73
|
-
* this function will add a href element with url to trigger file download.
|
|
74
|
-
* Optional: pass data filters if exists to generate report by specific data.
|
|
75
|
-
*
|
|
76
|
-
* @throws exception if report not found or the data api unreached.
|
|
77
|
-
*/
|
|
78
|
-
export async function downloadReport({dataFilters, ...body}: IDownloadReport): Promise<void> {
|
|
79
|
-
console.debug('downloadReport()', body);
|
|
80
|
-
const blob = await Get(`${urls.reports.trigger.v1}/preview-report`,
|
|
81
|
-
{
|
|
82
|
-
...body,
|
|
83
|
-
dataFilters: btoa(JSON.stringify(dataFilters || {})),
|
|
84
|
-
},
|
|
85
|
-
{responseType: 'blob'}
|
|
86
|
-
);
|
|
87
|
-
let contentType = 'text/html';
|
|
88
|
-
let contentExt = 'html';
|
|
89
|
-
if (body.responseType === 'pdf') {
|
|
90
|
-
contentType = 'application/pdf';
|
|
91
|
-
contentExt = 'pdf';
|
|
92
|
-
} else if (body.responseType === 'image') {
|
|
93
|
-
contentType = 'image/jpeg';
|
|
94
|
-
contentExt = 'jpg';
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const newBlob = new Blob([blob], {type: contentType});
|
|
98
|
-
|
|
99
|
-
const fileURL = URL.createObjectURL(newBlob);
|
|
100
|
-
const tempLink = document.createElement('a');
|
|
101
|
-
tempLink.href = fileURL;
|
|
102
|
-
tempLink.setAttribute('download', `report_${body.name || ''}.${contentExt}`);
|
|
103
|
-
tempLink.click();
|
|
104
|
-
setTimeout(tempLink.remove.bind(tempLink));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* send report to specific email address.
|
|
109
|
-
* Optional: pass data filters if exists to send report by specific data.
|
|
110
|
-
*
|
|
111
|
-
* @throws exception if report not found or the data api unreached.
|
|
112
|
-
*/
|
|
113
|
-
export async function sendReport(body: ISendReport): Promise<void> {
|
|
114
|
-
console.debug('sendReport()', body);
|
|
115
|
-
return Post(`${urls.reports.trigger.v1}/tenant-reports`, body);
|
|
116
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { IFronteggRecord } from '../interfaces';
|
|
2
|
-
|
|
3
|
-
export interface ReportSchedule {
|
|
4
|
-
interval: 'daily' | 'weekly' | 'monthly' | 'custom';
|
|
5
|
-
cron: string;
|
|
6
|
-
tz: string;
|
|
7
|
-
active: boolean;
|
|
8
|
-
dataFilters?: { [K in string]: any };
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface IReportRecord extends IFronteggRecord {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
schedule?: ReportSchedule;
|
|
16
|
-
status: string;
|
|
17
|
-
updatedAt: string;
|
|
18
|
-
createdAt: string;
|
|
19
|
-
htmlTemplate: string;
|
|
20
|
-
customerListApiUrl: string;
|
|
21
|
-
type: 'html' | 'pdf' | 'image';
|
|
22
|
-
dataFilters?: {
|
|
23
|
-
type: string;
|
|
24
|
-
config: DataFilter;
|
|
25
|
-
}[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface DataFilterBase {
|
|
29
|
-
name: string;
|
|
30
|
-
label: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface DataFilterText extends DataFilterBase {
|
|
34
|
-
type: 'text';
|
|
35
|
-
placeholder?: string;
|
|
36
|
-
defaultValue?: string;
|
|
37
|
-
validation?: 'email' | 'url' | 'phone' | string;
|
|
38
|
-
validationError?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface DataFilterNumber extends DataFilterBase {
|
|
42
|
-
type: 'number';
|
|
43
|
-
placeholder?: string;
|
|
44
|
-
defaultValue?: string;
|
|
45
|
-
min?: string;
|
|
46
|
-
max?: string;
|
|
47
|
-
integer: boolean;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface DataFilterBoolean extends DataFilterBase {
|
|
51
|
-
type: 'boolean';
|
|
52
|
-
defaultValue?: boolean;
|
|
53
|
-
trueLabel?: string;
|
|
54
|
-
falseLabel?: string;
|
|
55
|
-
trueValue?: string;
|
|
56
|
-
falseValue?: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface DataFilterSelect extends DataFilterBase {
|
|
60
|
-
type: 'select';
|
|
61
|
-
placeholder?: string;
|
|
62
|
-
defaultValue?: any;
|
|
63
|
-
options: { label: string; value: any }[];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface DataFilterMultiSelect extends DataFilterBase {
|
|
67
|
-
type: 'multi-select';
|
|
68
|
-
placeholder?: string;
|
|
69
|
-
defaultValue?: any[];
|
|
70
|
-
options: { label: string; value: any }[];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface DataFilterDate extends DataFilterBase {
|
|
74
|
-
type: 'date';
|
|
75
|
-
defaultValue?: {
|
|
76
|
-
startDate?: number;
|
|
77
|
-
endDate?: number;
|
|
78
|
-
};
|
|
79
|
-
placeholder?: {
|
|
80
|
-
startDate?: number;
|
|
81
|
-
endDate?: number;
|
|
82
|
-
};
|
|
83
|
-
isRange?: boolean;
|
|
84
|
-
maxDate?: {
|
|
85
|
-
type: 'fixed' | 'from-now';
|
|
86
|
-
value: number;
|
|
87
|
-
};
|
|
88
|
-
minDate?: {
|
|
89
|
-
type: 'fixed' | 'from-now';
|
|
90
|
-
value: number;
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface DataFilterRelativeDate extends DataFilterBase {
|
|
95
|
-
type: 'relative-date';
|
|
96
|
-
defaultValue?: {
|
|
97
|
-
type: 'current' | 'last';
|
|
98
|
-
period: 'seconds' | 'minutes' | 'hours' | 'day' | 'week' | 'month' | 'year';
|
|
99
|
-
value: number;
|
|
100
|
-
};
|
|
101
|
-
periods: ('seconds' | 'minutes' | 'hours' | 'day' | 'week' | 'month' | 'year')[];
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export type DataFilter =
|
|
105
|
-
| DataFilterText
|
|
106
|
-
| DataFilterNumber
|
|
107
|
-
| DataFilterBoolean
|
|
108
|
-
| DataFilterSelect
|
|
109
|
-
| DataFilterMultiSelect
|
|
110
|
-
| DataFilterDate
|
|
111
|
-
| DataFilterRelativeDate;
|
|
112
|
-
|
|
113
|
-
export type ReportColumnsNames = 'name' | 'schedule' | 'status' | 'updatedAt' | 'createdAt';
|
|
114
|
-
|
|
115
|
-
export interface IReportFilterBy {
|
|
116
|
-
column: ReportColumnsNames;
|
|
117
|
-
filterType: 'equal';
|
|
118
|
-
value: any;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface IReportsFilter {
|
|
122
|
-
query?: string;
|
|
123
|
-
filterBy?: IReportFilterBy;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface IReportsSort {
|
|
127
|
-
column: ReportColumnsNames;
|
|
128
|
-
direction: 'asc' | 'desc';
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export interface IGetReports {
|
|
132
|
-
filters?: IReportsFilter;
|
|
133
|
-
sort?: IReportsSort;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export interface IGetReport {
|
|
137
|
-
id: string;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface IRenderReport {
|
|
141
|
-
templateId: string;
|
|
142
|
-
dataFilters?: any;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface IRenderReportResponse {
|
|
146
|
-
html: string;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface IScheduleReport {
|
|
150
|
-
templateId: string;
|
|
151
|
-
schedule: ReportSchedule;
|
|
152
|
-
status: string;
|
|
153
|
-
dataFilters: any;
|
|
154
|
-
type: 'html' | 'pdf' | 'image';
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export interface IDownloadReport {
|
|
158
|
-
templateId: string;
|
|
159
|
-
name: string;
|
|
160
|
-
dataFilters: any;
|
|
161
|
-
responseType: 'image' | 'pdf' | 'html';
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export interface ISendReport {
|
|
165
|
-
templateId: string;
|
|
166
|
-
to: string[];
|
|
167
|
-
}
|
package/src/roles/index.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IRole,
|
|
3
|
-
IRolePermission,
|
|
4
|
-
IRolePermissionCategory,
|
|
5
|
-
IAddRole,
|
|
6
|
-
IDeleteRole,
|
|
7
|
-
IUpdateRole,
|
|
8
|
-
IAttachPermissionsToRole,
|
|
9
|
-
IAttachPermissionToRoles,
|
|
10
|
-
} from './interfaces';
|
|
11
|
-
import {Delete, Get, Patch, Post, Put} from '../fetch';
|
|
12
|
-
import {urls} from '../constants';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Gets tenant related roles
|
|
16
|
-
*/
|
|
17
|
-
export async function getRoles(): Promise<IRole[]> {
|
|
18
|
-
console.debug('getRoles()');
|
|
19
|
-
return Get(urls.identity.roles.v1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Adds tenant related roles
|
|
24
|
-
* @param body: IAddRole
|
|
25
|
-
*/
|
|
26
|
-
export async function addRole(body: IAddRole): Promise<IRole> {
|
|
27
|
-
console.debug('addRole()', body);
|
|
28
|
-
return Post(urls.identity.roles.v1, body);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Deletes role given role ID
|
|
33
|
-
*/
|
|
34
|
-
export async function deleteRole({roleId}: IDeleteRole): Promise<void> {
|
|
35
|
-
console.debug('deleteRole()', roleId);
|
|
36
|
-
return Delete(`${urls.identity.roles.v1}/${roleId}`);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Updates role using a given role ID and IUpdateRole object
|
|
41
|
-
*/
|
|
42
|
-
export async function updateRole({roleId, ...body}: IUpdateRole): Promise<IRole> {
|
|
43
|
-
console.debug('updateRole()', roleId, body);
|
|
44
|
-
return Patch(`${urls.identity.roles.v1}/${roleId}`, body);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Attaches permissions to role given a role ID
|
|
49
|
-
*/
|
|
50
|
-
export async function attachPermissionsToRole({roleId, ...body}: IAttachPermissionsToRole): Promise<IRole> {
|
|
51
|
-
console.debug('attachPermissionsToRole()', roleId, body);
|
|
52
|
-
return Put(`${urls.identity.roles.v1}/${roleId}/permissions`, body);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Gets all vendor permissions
|
|
57
|
-
*/
|
|
58
|
-
export async function getPermissions(): Promise<IRolePermission[]> {
|
|
59
|
-
console.debug('getPermissions()');
|
|
60
|
-
return Get(urls.identity.permissions.v1);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Associate permission to roles
|
|
65
|
-
*/
|
|
66
|
-
export async function attachPermissionToRoles({
|
|
67
|
-
permissionId,
|
|
68
|
-
...body
|
|
69
|
-
}: IAttachPermissionToRoles): Promise<IRolePermission> {
|
|
70
|
-
console.debug('attachPermissionToRoles()');
|
|
71
|
-
return Put(`${urls.identity.permissions.v1}/${permissionId}/roles`, body);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Gets all vendor categories including the permissions
|
|
76
|
-
*/
|
|
77
|
-
export async function getPermissionCategories(): Promise<IRolePermissionCategory[]> {
|
|
78
|
-
console.debug('getPermissionCategories()');
|
|
79
|
-
return Get(`${urls.identity.permissions.v1}/categories`);
|
|
80
|
-
}
|
package/src/roles/interfaces.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export type IRole = {
|
|
2
|
-
id: string;
|
|
3
|
-
key: string;
|
|
4
|
-
isDefault: boolean;
|
|
5
|
-
name: string;
|
|
6
|
-
description?: null;
|
|
7
|
-
permissions: string[];
|
|
8
|
-
tenantId?: string;
|
|
9
|
-
vendorId: string;
|
|
10
|
-
createdAt: Date;
|
|
11
|
-
updatedAt: Date;
|
|
12
|
-
};
|
|
13
|
-
export type IRolePermission = {
|
|
14
|
-
id: string;
|
|
15
|
-
key: string;
|
|
16
|
-
name: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
categoryId: string;
|
|
19
|
-
fePermission: boolean;
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
updatedAt: Date;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type IRolePermissionCategory = {
|
|
25
|
-
id: string;
|
|
26
|
-
name: string;
|
|
27
|
-
description: string;
|
|
28
|
-
feCategory: boolean;
|
|
29
|
-
permissionIds: string[];
|
|
30
|
-
createdAt: Date;
|
|
31
|
-
updatedAt: Date;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type IAddRole = {
|
|
35
|
-
key: string;
|
|
36
|
-
name: string;
|
|
37
|
-
description: string;
|
|
38
|
-
isDefault: boolean;
|
|
39
|
-
level: number;
|
|
40
|
-
permissions: string[];
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export type IUpdateRole = {
|
|
44
|
-
roleId: string;
|
|
45
|
-
key?: string;
|
|
46
|
-
name?: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
isDefault?: boolean;
|
|
49
|
-
level?: number;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export type IDeleteRole = {
|
|
53
|
-
roleId: string;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export type IAttachPermissionsToRole = {
|
|
57
|
-
roleId: string;
|
|
58
|
-
permissionIds: string[];
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export type IAttachPermissionToRoles = {
|
|
62
|
-
permissionId: string;
|
|
63
|
-
roleIds: string[];
|
|
64
|
-
};
|
package/src/routers.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { urls } from './constants';
|
|
2
|
-
|
|
3
|
-
export const fronteggAuthApiRoutes = [
|
|
4
|
-
`${urls.identity.auth.v1}/logout`,
|
|
5
|
-
`${urls.identity.auth.v1}/user/saml/postlogin`,
|
|
6
|
-
`${urls.identity.auth.v2}/user/oidc/postlogin`,
|
|
7
|
-
`${urls.identity.auth.v1}/user`,
|
|
8
|
-
`${urls.identity.auth.v1}/user/mfa/verify`,
|
|
9
|
-
`${urls.identity.auth.v1}/user/token/refresh`,
|
|
10
|
-
`${urls.identity.users.v1}`,
|
|
11
|
-
`${urls.identity.auth.v1}/passwordless/magiclink/postlogin`,
|
|
12
|
-
`${urls.identity.auth.v1}/passwordless/code/postlogin`,
|
|
13
|
-
`${urls.identity.auth.v1}/passwordless/smscode/postlogin`,
|
|
14
|
-
`${urls.identity.users.v1}/activate`,
|
|
15
|
-
`${urls.identity.users.v1}/invitation/accept`
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
export const fronteggRefreshTokenUrl = `${urls.identity.auth.v1}/user/token/refresh`;
|
package/src/sub-tenants/index.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { PaginationResult } from "../interfaces";
|
|
2
|
-
import { Delete, Get, Patch, Post } from "../fetch";
|
|
3
|
-
import { urls } from "../constants";
|
|
4
|
-
import {
|
|
5
|
-
AddUserToSubTenantsRequest,
|
|
6
|
-
ILoadAllUsers,
|
|
7
|
-
ISubTenantUser,
|
|
8
|
-
RemoveUserFromSubTenantsRequest,
|
|
9
|
-
UpdateUserRolesForSubTenantsRequestDto,
|
|
10
|
-
} from "./interfaces";
|
|
11
|
-
|
|
12
|
-
export async function loadAllUsers(
|
|
13
|
-
params: ILoadAllUsers
|
|
14
|
-
): Promise<PaginationResult<ISubTenantUser>> {
|
|
15
|
-
return Get(urls.identity.subTenants.v1, params);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export async function addUserToTenantAndSubTenants(
|
|
19
|
-
body: AddUserToSubTenantsRequest
|
|
20
|
-
): Promise<void> {
|
|
21
|
-
return Post(urls.identity.subTenants.v1, body);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export async function removeUserFromTenantAndSubTenants(
|
|
25
|
-
body: RemoveUserFromSubTenantsRequest
|
|
26
|
-
): Promise<void> {
|
|
27
|
-
return Delete(urls.identity.subTenants.v1, body);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export async function addUserRolesForSubTenants(
|
|
31
|
-
userId: string,
|
|
32
|
-
body: UpdateUserRolesForSubTenantsRequestDto
|
|
33
|
-
): Promise<void> {
|
|
34
|
-
return Post(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export async function removeUserRolesFromSubTenants(
|
|
38
|
-
userId: string,
|
|
39
|
-
body: UpdateUserRolesForSubTenantsRequestDto
|
|
40
|
-
): Promise<void> {
|
|
41
|
-
return Delete(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export async function setUserRolesForSubTenants(
|
|
45
|
-
userId: string,
|
|
46
|
-
body: UpdateUserRolesForSubTenantsRequestDto
|
|
47
|
-
): Promise<void> {
|
|
48
|
-
return Patch(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
49
|
-
}
|