@frontegg/rest-api 2.10.84 → 6.0.1-alpha.2
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/es2015/auth → auth}/index.d.ts +1 -9
- package/auth/index.js +398 -0
- package/{dist/es2015/auth → auth}/interfaces.d.ts +0 -10
- package/auth/interfaces.js +15 -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} +11 -11
- 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 +686 -0
- package/node/auth/interfaces.js +38 -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 +174 -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 -199
- 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.d.ts +0 -439
- package/dist/auth/index.js +0 -1021
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/interfaces.d.ts +0 -411
- 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 -171
- 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.js +0 -924
- package/dist/es2015/auth/index.js.map +0 -1
- 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 -167
- package/dist/es2015/constants.js +0 -168
- 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 -88
- 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 -2867
- 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 -916
- package/src/auth/interfaces.ts +0 -465
- 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 -101
- 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
|
File without changes
|
package/ContextHolder.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export class ContextHolder {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.context = null;
|
|
4
|
+
this.accessToken = null;
|
|
5
|
+
this.user = null;
|
|
6
|
+
|
|
7
|
+
this.onRedirectTo = path => window.location.href = path;
|
|
8
|
+
|
|
9
|
+
this.logout = () => window.location.href = '/account/logout';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static getInstance() {
|
|
13
|
+
if (!ContextHolder.instance) {
|
|
14
|
+
ContextHolder.instance = new ContextHolder();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return ContextHolder.instance;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static setContext(context) {
|
|
21
|
+
ContextHolder.getInstance().context = context;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static setAccessToken(accessToken) {
|
|
25
|
+
ContextHolder.getInstance().accessToken = accessToken;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static setUser(user) {
|
|
29
|
+
ContextHolder.getInstance().user = user;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static setOnRedirectTo(onRedirectTo) {
|
|
33
|
+
ContextHolder.getInstance().onRedirectTo = onRedirectTo;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static setLogout(logout, logoutUrl) {
|
|
37
|
+
ContextHolder.getInstance().logout = callback => {
|
|
38
|
+
if (!callback) {
|
|
39
|
+
ContextHolder.onRedirectTo(logoutUrl);
|
|
40
|
+
} else {
|
|
41
|
+
logout(callback);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static getContext() {
|
|
47
|
+
var _ContextHolder$getIns;
|
|
48
|
+
|
|
49
|
+
return (_ContextHolder$getIns = ContextHolder.getInstance().context) != null ? _ContextHolder$getIns : {
|
|
50
|
+
baseUrl: window.location.href,
|
|
51
|
+
tokenResolver: () => 'my-authentication-token',
|
|
52
|
+
logLevel: 'error'
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static getAccessToken() {
|
|
57
|
+
return ContextHolder.getInstance().accessToken;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static getUser() {
|
|
61
|
+
return ContextHolder.getInstance().user;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
static onRedirectTo(path, opts) {
|
|
65
|
+
return ContextHolder.getInstance().onRedirectTo(path, opts);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static logout(callback) {
|
|
69
|
+
return ContextHolder.getInstance().logout(callback);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
ContextHolder.instance = void 0;
|
|
74
|
+
export const FronteggContext = {
|
|
75
|
+
getContext: () => ContextHolder.getContext(),
|
|
76
|
+
getAccessToken: () => ContextHolder.getAccessToken(),
|
|
77
|
+
getUser: () => ContextHolder.getUser(),
|
|
78
|
+
onRedirectTo: (path, opts) => ContextHolder.onRedirectTo(path, opts),
|
|
79
|
+
logout: callback => ContextHolder.logout(callback)
|
|
80
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { urls } from '../constants';
|
|
2
|
+
import { Put, Get } from '../fetch';
|
|
3
|
+
export async function updateSettings(body) {
|
|
4
|
+
return Put(urls.tenants.accountSettings.v1, body);
|
|
5
|
+
}
|
|
6
|
+
export async function getSettings() {
|
|
7
|
+
return Get(urls.tenants.accountSettings.v1);
|
|
8
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
package/audits/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
const _excluded = ["endpoint", "headerProps"];
|
|
3
|
+
import { Get, PostDownload } from '../fetch';
|
|
4
|
+
import { urls } from '../constants';
|
|
5
|
+
export async function getAudits(params) {
|
|
6
|
+
return Get(urls.audits.v1, params);
|
|
7
|
+
}
|
|
8
|
+
export async function getAuditsStats(params) {
|
|
9
|
+
return Get(`${urls.audits.v1}/stats`, params);
|
|
10
|
+
}
|
|
11
|
+
export async function exportAudits(params) {
|
|
12
|
+
const {
|
|
13
|
+
endpoint,
|
|
14
|
+
headerProps
|
|
15
|
+
} = params,
|
|
16
|
+
restParams = _objectWithoutPropertiesLoose(params, _excluded);
|
|
17
|
+
|
|
18
|
+
return PostDownload(`${urls.audits.v1}/export/${endpoint}`, {
|
|
19
|
+
properties: headerProps
|
|
20
|
+
}, restParams);
|
|
21
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
package/auth/enums.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export let SocialLoginProviders;
|
|
2
|
+
|
|
3
|
+
(function (SocialLoginProviders) {
|
|
4
|
+
SocialLoginProviders["Microsoft"] = "microsoft";
|
|
5
|
+
SocialLoginProviders["Facebook"] = "facebook";
|
|
6
|
+
SocialLoginProviders["Google"] = "google";
|
|
7
|
+
SocialLoginProviders["Github"] = "github";
|
|
8
|
+
})(SocialLoginProviders || (SocialLoginProviders = {}));
|
|
9
|
+
|
|
10
|
+
export let AuthStrategyEnum;
|
|
11
|
+
|
|
12
|
+
(function (AuthStrategyEnum) {
|
|
13
|
+
AuthStrategyEnum["EmailAndPassword"] = "EmailAndPassword";
|
|
14
|
+
AuthStrategyEnum["MagicLink"] = "MagicLink";
|
|
15
|
+
AuthStrategyEnum["Code"] = "Code";
|
|
16
|
+
AuthStrategyEnum["NoLocalAuthentication"] = "NoLocalAuthentication";
|
|
17
|
+
AuthStrategyEnum["SmsCode"] = "SmsCode";
|
|
18
|
+
})(AuthStrategyEnum || (AuthStrategyEnum = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './secutiry-poilicy';
|
|
2
2
|
export * from './enums';
|
|
3
3
|
import { ISamlRolesGroup } from '../teams/interfaces';
|
|
4
|
-
import { IAcceptInvitation, IActivateAccount, IAllowedToRememberMfaDevice, ICreateSamlGroup, IDeleteApiToken, IDisableMfa, IEnrollMfaResponse, IForgotPassword, IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IGetUserById, IGetUserPasswordConfig, ILogin, ILoginResponse, ILoginViaSocialLogin, ILoginViaSocialLoginResponse, ILoginWithMfa, IOidcPostLogin, IOidcConfiguration, IPostLogin, IPreLogin, IRecoverMFAToken, IResendActivationEmail, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, ISignUpResponse, ISignUpUser, ISocialLoginProviderConfiguration, ITenantApiTokensData, IUpdateSamlConfiguration, IUpdateSamlGroup, IUpdateSamlRoles, IUpdateSamlVendorMetadata, IUpdateTenantApiTokensData, IUpdateUserApiTokensData, IUserApiTokensData, IUserIdResponse, IVendorConfig, IVerifyMfa, IVerifyMfaResponse, TestConfig, ISSOPublicConfiguration, IPreLoginWithIdpTypeResponse, IPasswordlessPreLogin, IPasswordlessPostLogin, ICreateSSODomain, IVerifyInviteToken, ISSODomain, ISSOConfigurationDefaultRoles, ISSOConfiguration, IUpdateSSOConfiguration, IOidcPostLoginV2, IExchangeOAuthTokens, IOAuthTokenResponse, ISocialLoginProviderConfigurationV2, ILoginResponseV2, IResetPhoneNumber, IVerifyResetPhoneNumber, IChangePhoneNumber, IVerifyResetPhoneNumberResponse, IResetPhoneNumberResponse, IWebAuthnPreLogin, IWebAuthnPostLogin, IVerifyNewWebAuthnDevice, IWebAuthnPreLoginResponse, ICreateNewDeviceSessionResponse, IAuthStrategiesConfig, ISessionResponse
|
|
4
|
+
import { IAcceptInvitation, IActivateAccount, IAllowedToRememberMfaDevice, ICreateSamlGroup, IDeleteApiToken, IDisableMfa, IEnrollMfaResponse, IForgotPassword, IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IGetUserById, IGetUserPasswordConfig, ILogin, ILoginResponse, ILoginViaSocialLogin, ILoginViaSocialLoginResponse, ILoginWithMfa, IOidcPostLogin, IOidcConfiguration, IPostLogin, IPreLogin, IRecoverMFAToken, IResendActivationEmail, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, ISignUpResponse, ISignUpUser, ISocialLoginProviderConfiguration, ITenantApiTokensData, IUpdateSamlConfiguration, IUpdateSamlGroup, IUpdateSamlRoles, IUpdateSamlVendorMetadata, IUpdateTenantApiTokensData, IUpdateUserApiTokensData, IUserApiTokensData, IUserIdResponse, IVendorConfig, IVerifyMfa, IVerifyMfaResponse, TestConfig, ISSOPublicConfiguration, IPreLoginWithIdpTypeResponse, IPasswordlessPreLogin, IPasswordlessPostLogin, ICreateSSODomain, IVerifyInviteToken, ISSODomain, ISSOConfigurationDefaultRoles, ISSOConfiguration, IUpdateSSOConfiguration, IOidcPostLoginV2, IExchangeOAuthTokens, IOAuthTokenResponse, ISocialLoginProviderConfigurationV2, ILoginResponseV2, IResetPhoneNumber, IVerifyResetPhoneNumber, IChangePhoneNumber, IVerifyResetPhoneNumberResponse, IResetPhoneNumberResponse, IWebAuthnPreLogin, IWebAuthnPostLogin, IVerifyNewWebAuthnDevice, IWebAuthnPreLoginResponse, ICreateNewDeviceSessionResponse, IAuthStrategiesConfig, ISessionResponse } from './interfaces';
|
|
5
5
|
/*****************************************
|
|
6
6
|
* Authentication
|
|
7
7
|
*****************************************/
|
|
@@ -405,14 +405,6 @@ export declare function resetPhoneNumber(body: IResetPhoneNumber): Promise<IRese
|
|
|
405
405
|
* with the token received from the reset phone number request and a code that was sent to the user email
|
|
406
406
|
*/
|
|
407
407
|
export declare function verifyResetPhoneNumber(body: IVerifyResetPhoneNumber): Promise<IVerifyResetPhoneNumberResponse>;
|
|
408
|
-
/**
|
|
409
|
-
* change phone number with verification.
|
|
410
|
-
*/
|
|
411
|
-
export declare function changePhoneNumberWithVerification(body: IChangePhoneNumberWithVerification): Promise<IChangePhoneNumberWithVerificationResponse>;
|
|
412
|
-
/**
|
|
413
|
-
* verify new phone number.
|
|
414
|
-
*/
|
|
415
|
-
export declare function verifyChangePhoneNumber(body: IVerifyChangePhoneNumber): Promise<void>;
|
|
416
408
|
/**
|
|
417
409
|
* change phone number should be called after verify reset phone number with the new phone number
|
|
418
410
|
*/
|
package/auth/index.js
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["type"],
|
|
4
|
+
_excluded2 = ["type"];
|
|
5
|
+
import { getTenants } from '../tenants';
|
|
6
|
+
export * from './secutiry-poilicy';
|
|
7
|
+
export * from './enums';
|
|
8
|
+
import { urls } from '../constants';
|
|
9
|
+
import { ContextHolder } from '../ContextHolder';
|
|
10
|
+
import { Delete, Get, Patch, Post, Put } from '../fetch';
|
|
11
|
+
import { jwtDecode } from '../jwt';
|
|
12
|
+
export async function generateLoginResponse(loginResponse) {
|
|
13
|
+
if (!loginResponse.accessToken) {
|
|
14
|
+
return loginResponse;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
ContextHolder.setAccessToken(loginResponse.accessToken);
|
|
18
|
+
const me = await Get(`${urls.identity.users.v2}/me`);
|
|
19
|
+
const decodedContent = loginResponse.accessToken ? jwtDecode(loginResponse.accessToken) : {};
|
|
20
|
+
|
|
21
|
+
const user = _extends({}, loginResponse, decodedContent, me);
|
|
22
|
+
|
|
23
|
+
ContextHolder.setUser(user);
|
|
24
|
+
return user;
|
|
25
|
+
}
|
|
26
|
+
export async function generateLoginResponseV2(loginResponse) {
|
|
27
|
+
if (!loginResponse.accessToken) {
|
|
28
|
+
return {
|
|
29
|
+
user: loginResponse
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
ContextHolder.setAccessToken(loginResponse.accessToken);
|
|
34
|
+
const [me, tenants] = await Promise.all([Get(`${urls.identity.users.v2}/me`), getTenants()]);
|
|
35
|
+
const decodedContent = loginResponse.accessToken ? jwtDecode(loginResponse.accessToken) : {};
|
|
36
|
+
|
|
37
|
+
const user = _extends({}, loginResponse, decodedContent, me);
|
|
38
|
+
|
|
39
|
+
ContextHolder.setUser(user);
|
|
40
|
+
return {
|
|
41
|
+
user,
|
|
42
|
+
tenants
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export async function generateLoginResponseFromOAuthResponse(oauthResponse) {
|
|
46
|
+
ContextHolder.setAccessToken(oauthResponse.id_token);
|
|
47
|
+
const me = await Get(`${urls.identity.users.v2}/me`);
|
|
48
|
+
const decodedContent = oauthResponse.id_token ? jwtDecode(oauthResponse.id_token) : {};
|
|
49
|
+
|
|
50
|
+
const user = _extends({
|
|
51
|
+
mfaRequired: false,
|
|
52
|
+
accessToken: oauthResponse.id_token,
|
|
53
|
+
refreshToken: oauthResponse.refresh_token
|
|
54
|
+
}, decodedContent, me);
|
|
55
|
+
|
|
56
|
+
ContextHolder.setUser(user);
|
|
57
|
+
return user;
|
|
58
|
+
}
|
|
59
|
+
export async function preLogin(body) {
|
|
60
|
+
try {
|
|
61
|
+
const {
|
|
62
|
+
address
|
|
63
|
+
} = await Post(`${urls.identity.auth.v1}/user/saml/prelogin`, body);
|
|
64
|
+
return address;
|
|
65
|
+
} catch {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export async function preLoginWithIdpType(body) {
|
|
70
|
+
return Post(`${urls.identity.auth.v1}/user/saml/prelogin`, body);
|
|
71
|
+
}
|
|
72
|
+
export async function postLogin(body) {
|
|
73
|
+
const data = await Post(`${urls.identity.auth.v1}/user/saml/postlogin`, body);
|
|
74
|
+
return generateLoginResponse(data);
|
|
75
|
+
}
|
|
76
|
+
export async function oidcPostLogin(body) {
|
|
77
|
+
const data = await Post(`${urls.identity.auth.v1}/user/oidc/postlogin`, body);
|
|
78
|
+
return generateLoginResponse(data);
|
|
79
|
+
}
|
|
80
|
+
export async function login(body) {
|
|
81
|
+
const data = await Post(`${urls.identity.auth.v1}/user`, body);
|
|
82
|
+
return generateLoginResponse(data);
|
|
83
|
+
}
|
|
84
|
+
export async function loginWithMfa(body) {
|
|
85
|
+
const data = await Post(`${urls.identity.auth.v1}/user/mfa/verify`, body);
|
|
86
|
+
return generateLoginResponse(data);
|
|
87
|
+
}
|
|
88
|
+
export async function activateAccount(body) {
|
|
89
|
+
return Post(`${urls.identity.users.v1}/activate`, body);
|
|
90
|
+
}
|
|
91
|
+
export async function getActivateAccountStrategy(params) {
|
|
92
|
+
return Get(`${urls.identity.users.v1}/activate/strategy`, params);
|
|
93
|
+
}
|
|
94
|
+
export async function resendActivationEmail(body) {
|
|
95
|
+
return Post(`${urls.identity.users.v1}/activate/reset`, body);
|
|
96
|
+
}
|
|
97
|
+
export async function acceptInvitation(body) {
|
|
98
|
+
return Post(`${urls.identity.users.v1}/invitation/accept`, body);
|
|
99
|
+
}
|
|
100
|
+
export async function refreshToken() {
|
|
101
|
+
const data = await Post(`${urls.identity.auth.v1}/user/token/refresh`);
|
|
102
|
+
return generateLoginResponse(data);
|
|
103
|
+
}
|
|
104
|
+
export async function refreshTokenV2() {
|
|
105
|
+
const data = await Post(`${urls.identity.auth.v1}/user/token/refresh`);
|
|
106
|
+
return generateLoginResponseV2(data);
|
|
107
|
+
}
|
|
108
|
+
export async function logout() {
|
|
109
|
+
return Post(`${urls.identity.auth.v1}/logout`);
|
|
110
|
+
}
|
|
111
|
+
export async function forgotPassword(body) {
|
|
112
|
+
return Post(`${urls.identity.users.v1}/passwords/reset`, body);
|
|
113
|
+
}
|
|
114
|
+
export async function resetPassword(body) {
|
|
115
|
+
return Post(`${urls.identity.users.v1}/passwords/reset/verify`, body);
|
|
116
|
+
}
|
|
117
|
+
export async function loadPasswordConfig(params) {
|
|
118
|
+
return Get(`${urls.identity.users.v1}/passwords/config`, params);
|
|
119
|
+
}
|
|
120
|
+
export async function recoverMfaToken(body) {
|
|
121
|
+
return Post(`${urls.identity.auth.v1}/user/mfa/recover`, body);
|
|
122
|
+
}
|
|
123
|
+
export async function enrollMfa() {
|
|
124
|
+
return Post(`${urls.identity.users.v1}/mfa/enroll`);
|
|
125
|
+
}
|
|
126
|
+
export async function verifyMfa(body) {
|
|
127
|
+
return Post(`${urls.identity.users.v1}/mfa/enroll/verify`, body);
|
|
128
|
+
}
|
|
129
|
+
export async function disableMfa(body) {
|
|
130
|
+
return Post(`${urls.identity.users.v1}/mfa/disable`, body);
|
|
131
|
+
}
|
|
132
|
+
export async function getSamlConfiguration() {
|
|
133
|
+
return Get(`${urls.team.sso.v1}/saml/configurations`);
|
|
134
|
+
}
|
|
135
|
+
export async function updateSamlConfiguration(body) {
|
|
136
|
+
return Post(`${urls.team.sso.v1}/saml/configurations`, body);
|
|
137
|
+
}
|
|
138
|
+
export async function getSamlVendorConfiguration() {
|
|
139
|
+
return Get(`${urls.team.sso.v1}/saml/configurations/vendor-config`);
|
|
140
|
+
}
|
|
141
|
+
export async function updateSamlVendorMetadata(body) {
|
|
142
|
+
return Put(`${urls.team.sso.v1}/saml/configurations/metadata`, body);
|
|
143
|
+
}
|
|
144
|
+
export async function validateSamlDomain() {
|
|
145
|
+
return Put(`${urls.team.sso.v1}/saml/validations/domain`);
|
|
146
|
+
}
|
|
147
|
+
export async function getSamlRoles() {
|
|
148
|
+
return Get(`${urls.team.sso.v1}/saml/configurations/roles/default`);
|
|
149
|
+
}
|
|
150
|
+
export async function getSamlRolesGroups() {
|
|
151
|
+
return Get(`${urls.team.sso.v2}/saml/configurations/groups`);
|
|
152
|
+
}
|
|
153
|
+
export async function updateSamlRoles({
|
|
154
|
+
roleIds
|
|
155
|
+
}) {
|
|
156
|
+
return Post(`${urls.team.sso.v1}/saml/configurations/roles/default`, {
|
|
157
|
+
roleIds
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
export async function createSamlGroup({
|
|
161
|
+
roleIds,
|
|
162
|
+
group
|
|
163
|
+
}) {
|
|
164
|
+
return Post(`${urls.team.sso.v2}/saml/configurations/groups`, {
|
|
165
|
+
group,
|
|
166
|
+
roleIds
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
export async function updateSamlGroup({
|
|
170
|
+
roleIds,
|
|
171
|
+
group,
|
|
172
|
+
id
|
|
173
|
+
}) {
|
|
174
|
+
return Patch(`${urls.team.sso.v2}/saml/configurations/groups/${id}`, {
|
|
175
|
+
group,
|
|
176
|
+
roleIds
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
export async function deleteSamlGroup({
|
|
180
|
+
id
|
|
181
|
+
}) {
|
|
182
|
+
return Delete(`${urls.team.sso.v2}/saml/configurations/groups/${id}`);
|
|
183
|
+
}
|
|
184
|
+
export async function getOidcConfiguration() {
|
|
185
|
+
return Get(`${urls.team.sso.v1}/oidc/configurations`);
|
|
186
|
+
}
|
|
187
|
+
export async function getSSOPublicConfiguration() {
|
|
188
|
+
return Get(`${urls.team.sso.v2}/configurations/public`);
|
|
189
|
+
}
|
|
190
|
+
export async function getSocialLoginProviders() {
|
|
191
|
+
return Get(urls.identity.sso.v1);
|
|
192
|
+
}
|
|
193
|
+
export async function getSocialLoginProvidersV2() {
|
|
194
|
+
return Get(urls.identity.sso.v2);
|
|
195
|
+
}
|
|
196
|
+
export async function loginViaSocialLogin({
|
|
197
|
+
provider,
|
|
198
|
+
code,
|
|
199
|
+
redirectUri,
|
|
200
|
+
codeVerifier,
|
|
201
|
+
metadata,
|
|
202
|
+
invitationToken,
|
|
203
|
+
state
|
|
204
|
+
}) {
|
|
205
|
+
const params = {
|
|
206
|
+
code
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
if (redirectUri) {
|
|
210
|
+
params.redirectUri = redirectUri;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (codeVerifier) {
|
|
214
|
+
params.code_verifier = codeVerifier;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (state) {
|
|
218
|
+
params.state = state;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return Post(`${urls.identity.auth.v1}/user/sso/${provider}/postlogin`, {
|
|
222
|
+
metadata,
|
|
223
|
+
invitationToken
|
|
224
|
+
}, {
|
|
225
|
+
params
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
export async function getVendorConfig() {
|
|
229
|
+
return Get(`${urls.identity.configurations.v1}/public`);
|
|
230
|
+
}
|
|
231
|
+
export async function signUpUser(body) {
|
|
232
|
+
const {
|
|
233
|
+
shouldActivate,
|
|
234
|
+
authResponse,
|
|
235
|
+
userId,
|
|
236
|
+
tenantId
|
|
237
|
+
} = await Post(`${urls.identity.users.v1}/signUp`, body);
|
|
238
|
+
const loginResponse = !shouldActivate && authResponse ? await generateLoginResponse(authResponse) : undefined;
|
|
239
|
+
return {
|
|
240
|
+
shouldActivate,
|
|
241
|
+
user: loginResponse,
|
|
242
|
+
userId,
|
|
243
|
+
tenantId
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
export async function getCurrentUserSessions() {
|
|
247
|
+
const sessions = await Get(urls.identity.users.sessions.currentUser.v1);
|
|
248
|
+
return sessions;
|
|
249
|
+
}
|
|
250
|
+
export async function deleteSessionForUser(id) {
|
|
251
|
+
await Delete(`${urls.identity.users.sessions.currentUser.v1}/${id}`);
|
|
252
|
+
}
|
|
253
|
+
export async function deleteAllSessionsForUser() {
|
|
254
|
+
await Delete(`${urls.identity.users.sessions.currentUser.v1}/all`);
|
|
255
|
+
}
|
|
256
|
+
export async function getUserApiTokensData() {
|
|
257
|
+
return Get(urls.identity.users.apiTokens.v1);
|
|
258
|
+
}
|
|
259
|
+
export async function getTenantApiTokensData() {
|
|
260
|
+
return Get(urls.identity.tenants.apiTokens.v1);
|
|
261
|
+
}
|
|
262
|
+
export async function updateUserApiTokensData(body) {
|
|
263
|
+
return Post(urls.identity.users.apiTokens.v1, body);
|
|
264
|
+
}
|
|
265
|
+
export async function updateTenantApiTokensData(body) {
|
|
266
|
+
return Post(urls.identity.tenants.apiTokens.v2, body);
|
|
267
|
+
}
|
|
268
|
+
export async function deleteTenantApiToken({
|
|
269
|
+
tokenId
|
|
270
|
+
}) {
|
|
271
|
+
return Delete(`${urls.identity.tenants.apiTokens.v1}/${tokenId}`);
|
|
272
|
+
}
|
|
273
|
+
export async function deleteUserApiToken({
|
|
274
|
+
tokenId
|
|
275
|
+
}) {
|
|
276
|
+
return Delete(`${urls.identity.users.apiTokens.v1}/${tokenId}`);
|
|
277
|
+
}
|
|
278
|
+
export async function getUserById({
|
|
279
|
+
userId
|
|
280
|
+
}) {
|
|
281
|
+
return Get(`${urls.identity.users.v1}/${userId}`);
|
|
282
|
+
}
|
|
283
|
+
export async function checkIfAllowToRememberMfaDevice(mfaToken) {
|
|
284
|
+
return Get(`${urls.identity.configurations.v1}/mfa-policy/allow-remember-device`, {
|
|
285
|
+
mfaToken
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
export async function passwordlessPreLogin(_ref) {
|
|
289
|
+
let {
|
|
290
|
+
type
|
|
291
|
+
} = _ref,
|
|
292
|
+
body = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
293
|
+
|
|
294
|
+
return Post(`${urls.identity.auth.v1}/passwordless/${type.toLocaleLowerCase()}/prelogin`, body);
|
|
295
|
+
}
|
|
296
|
+
export async function passwordlessPostLogin(_ref2) {
|
|
297
|
+
let {
|
|
298
|
+
type
|
|
299
|
+
} = _ref2,
|
|
300
|
+
body = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
301
|
+
|
|
302
|
+
return Post(`${urls.identity.auth.v1}/passwordless/${type.toLocaleLowerCase()}/postlogin`, body);
|
|
303
|
+
}
|
|
304
|
+
export async function verifyInviteToken({
|
|
305
|
+
token
|
|
306
|
+
}) {
|
|
307
|
+
return Post(urls.identity.tenants.invites.verify.v1, {
|
|
308
|
+
token
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
export async function getSSOConfigurations() {
|
|
312
|
+
return Get(`${urls.team.sso.v1}/configurations`);
|
|
313
|
+
}
|
|
314
|
+
export async function createSSOConfiguration(body) {
|
|
315
|
+
return Post(`${urls.team.sso.v1}/configurations`, body);
|
|
316
|
+
}
|
|
317
|
+
export async function updateSSOConfiguration(ssoConfigId, body) {
|
|
318
|
+
return Patch(`${urls.team.sso.v1}/configurations/${ssoConfigId}`, body);
|
|
319
|
+
}
|
|
320
|
+
export async function deleteSSOConfiguration(ssoConfigId) {
|
|
321
|
+
return Delete(`${urls.team.sso.v1}/configurations/${ssoConfigId}`);
|
|
322
|
+
}
|
|
323
|
+
export async function createSSOConfigurationByMetadata(body) {
|
|
324
|
+
return Post(`${urls.team.sso.v1}/configurations/metadata`, body);
|
|
325
|
+
}
|
|
326
|
+
export async function updateSSOConfigurationByMetadata(ssoConfigId, body) {
|
|
327
|
+
return Put(`${urls.team.sso.v1}/configurations/${ssoConfigId}/metadata`, body);
|
|
328
|
+
}
|
|
329
|
+
export async function createSSODomain(ssoConfigId, body) {
|
|
330
|
+
return Post(`${urls.team.sso.v1}/configurations/${ssoConfigId}/domains`, body);
|
|
331
|
+
}
|
|
332
|
+
export async function deleteSSODomain(ssoConfigId, domainId) {
|
|
333
|
+
return Delete(`${urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}`);
|
|
334
|
+
}
|
|
335
|
+
export async function validateSSODomain(ssoConfigId, domainId) {
|
|
336
|
+
return Put(`${urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
|
|
337
|
+
}
|
|
338
|
+
export async function getSSODefaultRoles(ssoConfigId) {
|
|
339
|
+
return Get(`${urls.team.sso.v1}/configurations/${ssoConfigId}/roles`);
|
|
340
|
+
}
|
|
341
|
+
export async function setSSODefaultRoles(ssoConfigId, body) {
|
|
342
|
+
return Put(`${urls.team.sso.v1}/configurations/${ssoConfigId}/roles`, body);
|
|
343
|
+
}
|
|
344
|
+
export async function createSSOGroup(ssoConfigId, body) {
|
|
345
|
+
return Post(`${urls.team.sso.v1}/configurations/${ssoConfigId}/groups`, body);
|
|
346
|
+
}
|
|
347
|
+
export async function updateSSOGroup(ssoConfigId, {
|
|
348
|
+
roleIds,
|
|
349
|
+
group,
|
|
350
|
+
id
|
|
351
|
+
}) {
|
|
352
|
+
return Patch(`${urls.team.sso.v1}/configurations/${ssoConfigId}/groups/${id}`, {
|
|
353
|
+
group,
|
|
354
|
+
roleIds
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
export async function deleteSSOGroup(ssoConfigId, groupId) {
|
|
358
|
+
return Delete(`${urls.team.sso.v1}/configurations/${ssoConfigId}/groups/${groupId}`);
|
|
359
|
+
}
|
|
360
|
+
export async function getSSOGroups(ssoConfigId) {
|
|
361
|
+
return Get(`${urls.team.sso.v1}/configurations/${ssoConfigId}/groups`);
|
|
362
|
+
}
|
|
363
|
+
export async function preLoginV2(body) {
|
|
364
|
+
return Post(`${urls.identity.auth.v2}/user/sso/prelogin`, body);
|
|
365
|
+
}
|
|
366
|
+
export async function oidcPostLoginV2(body) {
|
|
367
|
+
const data = await Post(`${urls.identity.auth.v2}/user/oidc/postlogin`, body);
|
|
368
|
+
return generateLoginResponse(data);
|
|
369
|
+
}
|
|
370
|
+
export async function exchangeOAuthTokens(body) {
|
|
371
|
+
const data = await Post(`${urls.oauth.v1}/token`, body);
|
|
372
|
+
return generateLoginResponseFromOAuthResponse(data);
|
|
373
|
+
}
|
|
374
|
+
export async function resetPhoneNumber(body) {
|
|
375
|
+
return Post(`${urls.identity.users.v1}/phone/reset`, body);
|
|
376
|
+
}
|
|
377
|
+
export async function verifyResetPhoneNumber(body) {
|
|
378
|
+
return Post(`${urls.identity.users.v1}/phone/reset/verify`, body);
|
|
379
|
+
}
|
|
380
|
+
export async function changePhoneNumber(body) {
|
|
381
|
+
return Put(`${urls.identity.users.v1}/phone/change`, body);
|
|
382
|
+
}
|
|
383
|
+
export async function webAuthnPreLogin(body) {
|
|
384
|
+
return Post(`${urls.identity.auth.v1}/webauthn/prelogin`, body);
|
|
385
|
+
}
|
|
386
|
+
export async function webAuthnPostLogin(body) {
|
|
387
|
+
return Post(`${urls.identity.auth.v1}/webauthn/postlogin`, body);
|
|
388
|
+
}
|
|
389
|
+
export async function webAuthnCreateNewDeviceSession() {
|
|
390
|
+
return Post(urls.identity.webAuthnDevices.v1);
|
|
391
|
+
}
|
|
392
|
+
export async function verifyNewDeviceSession(body) {
|
|
393
|
+
return Post(`${urls.identity.webAuthnDevices.v1}/verify`, body);
|
|
394
|
+
}
|
|
395
|
+
export async function getVendorPublicAuthStrategiesConfig() {
|
|
396
|
+
return Get(`${urls.identity.configurations.v1}/auth/strategies/public`);
|
|
397
|
+
}
|
|
398
|
+
;
|
|
@@ -320,16 +320,6 @@ export interface IResetPhoneNumber {
|
|
|
320
320
|
export interface IResetPhoneNumberResponse {
|
|
321
321
|
resetPhoneNumberToken: string;
|
|
322
322
|
}
|
|
323
|
-
export interface IChangePhoneNumberWithVerification {
|
|
324
|
-
phoneNumber: string;
|
|
325
|
-
}
|
|
326
|
-
export interface IChangePhoneNumberWithVerificationResponse {
|
|
327
|
-
changePhoneId: string;
|
|
328
|
-
}
|
|
329
|
-
export interface IVerifyChangePhoneNumber {
|
|
330
|
-
changePhoneId: string;
|
|
331
|
-
code: string;
|
|
332
|
-
}
|
|
333
323
|
export interface IVerifyResetPhoneNumber {
|
|
334
324
|
resetPhoneNumberToken: string;
|
|
335
325
|
code: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './secutiry-poilicy/interfaces';
|
|
2
|
+
;
|
|
3
|
+
;
|
|
4
|
+
;
|
|
5
|
+
;
|
|
6
|
+
;
|
|
7
|
+
;
|
|
8
|
+
;
|
|
9
|
+
export let SecondaryAuthStrategy;
|
|
10
|
+
|
|
11
|
+
(function (SecondaryAuthStrategy) {
|
|
12
|
+
SecondaryAuthStrategy["WebAuthnPlatform"] = "WebAuthnPlatform";
|
|
13
|
+
SecondaryAuthStrategy["WebAuthnCrossPlatform"] = "WebAuthnCrossPlatform";
|
|
14
|
+
SecondaryAuthStrategy["SmsCode"] = "SmsCode";
|
|
15
|
+
})(SecondaryAuthStrategy || (SecondaryAuthStrategy = {}));
|
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Get, Patch, Post } from '../../fetch';
|
|
2
|
+
import { urls } from '../../constants';
|
|
3
|
+
export async function getGlobalSecurityPolicy() {
|
|
4
|
+
return Get(urls.identity.configurations.v1);
|
|
5
|
+
}
|
|
6
|
+
export async function getMfaPolicy() {
|
|
7
|
+
return Get(`${urls.identity.configurations.v1}/mfa-policy`);
|
|
8
|
+
}
|
|
9
|
+
export async function getVendorMfaPolicy() {
|
|
10
|
+
return Get(`${urls.identity.configurations.v1}/mfa-policy/vendor`);
|
|
11
|
+
}
|
|
12
|
+
export async function saveMfaPolicy(body) {
|
|
13
|
+
if (body.id) {
|
|
14
|
+
return Patch(`${urls.identity.configurations.v1}/mfa-policy`, body);
|
|
15
|
+
} else {
|
|
16
|
+
return Post(`${urls.identity.configurations.v1}/mfa-policy`, body);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export async function getLockoutPolicy() {
|
|
20
|
+
return Get(`${urls.identity.configurations.v1}/lockout-policy`);
|
|
21
|
+
}
|
|
22
|
+
export async function saveLockoutPolicy(body) {
|
|
23
|
+
if (body.id) {
|
|
24
|
+
return Patch(`${urls.identity.configurations.v1}/lockout-policy`, body);
|
|
25
|
+
} else {
|
|
26
|
+
return Post(`${urls.identity.configurations.v1}/lockout-policy`, body);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export async function getCaptchaPolicy() {
|
|
30
|
+
try {
|
|
31
|
+
return await Get(`${urls.identity.configurations.v1}/captcha-policy/public`);
|
|
32
|
+
} catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export async function getPasswordHistoryPolicy() {
|
|
37
|
+
return Get(`${urls.identity.configurations.v1}/password-history-policy`);
|
|
38
|
+
}
|
|
39
|
+
export async function savePasswordHistoryPolicy(body) {
|
|
40
|
+
if (body.id) {
|
|
41
|
+
return Patch(`${urls.identity.configurations.v1}/password-history-policy`, body);
|
|
42
|
+
} else {
|
|
43
|
+
return Post(`${urls.identity.configurations.v1}/password-history-policy`, body);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export async function getPasswordConfigPolicy() {
|
|
47
|
+
return Get(`${urls.identity.configurations.v1}/password`);
|
|
48
|
+
}
|