@frontegg/rest-api 2.10.90 → 3.0.1
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 +114 -0
- package/{dist/account-settings → account-settings}/index.d.ts +0 -0
- package/account-settings/index.js +47 -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 +74 -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 +2102 -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 +257 -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 +114 -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} +13 -13
- package/{dist/error.d.ts → error.d.ts} +0 -0
- package/error.js +36 -0
- package/fetch.d.ts +19 -0
- package/fetch.js +557 -0
- package/{dist/es2015/index.d.ts → index.d.ts} +0 -0
- package/{dist/es2015/index.js → index.js} +32 -28
- 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 +105 -0
- package/{dist/es2015/metadata → metadata}/index.d.ts +0 -0
- package/metadata/index.js +166 -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 +126 -0
- package/node/account-settings/index.js +61 -0
- package/node/account-settings/interfaces.js +5 -0
- package/node/audits/index.js +90 -0
- package/node/audits/interfaces.js +5 -0
- package/node/auth/enums.js +26 -0
- package/node/auth/index.js +2327 -0
- package/node/auth/interfaces.js +39 -0
- package/node/auth/secutiry-poilicy/index.js +279 -0
- package/node/auth/secutiry-poilicy/interfaces.js +5 -0
- package/node/connectivity/index.js +201 -0
- package/node/connectivity/interfaces.js +5 -0
- package/node/constants.js +177 -0
- package/node/error.js +50 -0
- package/node/fetch.js +589 -0
- package/node/index.js +359 -0
- package/node/interfaces.js +5 -0
- package/node/jwt.js +125 -0
- package/node/metadata/index.js +188 -0
- package/node/metadata/interfaces.js +5 -0
- package/node/notifications/index.js +115 -0
- package/node/notifications/interfaces.js +5 -0
- package/node/reports/index.js +205 -0
- package/node/reports/interfaces.js +5 -0
- package/node/roles/index.js +209 -0
- package/node/roles/interfaces.js +5 -0
- package/node/routers.js +13 -0
- package/node/sub-tenants/index.js +153 -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 +88 -0
- package/node/subscriptions/managedSubscriptions.js +135 -0
- package/node/subscriptions/paymentMethods.js +91 -0
- package/node/subscriptions/paymentProviders.js +38 -0
- package/node/subscriptions/plans.js +61 -0
- package/node/subscriptions/providers/index.js +18 -0
- package/node/subscriptions/providers/stripe/index.js +130 -0
- package/node/subscriptions/providers/stripe/interfaces.js +5 -0
- package/node/subscriptions/subscriptions.js +135 -0
- package/node/subscriptions/summaries.js +38 -0
- package/node/subscriptions/tenantConfiguration.js +61 -0
- package/node/teams/index.js +478 -0
- package/node/teams/interfaces.js +5 -0
- package/node/tenants/index.js +107 -0
- package/node/tenants/interfaces.js +5 -0
- package/node/vendor/index.js +40 -0
- package/node/vendor/interfaces.js +5 -0
- package/{dist/es2015/notifications → notifications}/index.d.ts +0 -0
- package/notifications/index.js +99 -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 +185 -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 +188 -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 +135 -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 +73 -0
- package/{dist/es2015/subscriptions → subscriptions}/managedSubscriptions.d.ts +0 -0
- package/subscriptions/managedSubscriptions.js +118 -0
- package/subscriptions/package.json +6 -0
- package/{dist/es2015/subscriptions → subscriptions}/paymentMethods.d.ts +0 -0
- package/subscriptions/paymentMethods.js +75 -0
- package/{dist/es2015/subscriptions → subscriptions}/paymentProviders.d.ts +0 -0
- package/subscriptions/paymentProviders.js +25 -0
- package/{dist/es2015/subscriptions → subscriptions}/plans.d.ts +0 -0
- package/subscriptions/plans.js +47 -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 +113 -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 +118 -0
- package/{dist/es2015/subscriptions → subscriptions}/summaries.d.ts +0 -0
- package/subscriptions/summaries.js +25 -0
- package/{dist/es2015/subscriptions → subscriptions}/tenantConfiguration.d.ts +0 -0
- package/subscriptions/tenantConfiguration.js +47 -0
- package/{dist/es2015/teams → teams}/index.d.ts +0 -0
- package/teams/index.js +445 -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 +91 -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 +27 -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/error.ts +0 -13
- 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/auth/interfaces.ts
DELETED
|
@@ -1,488 +0,0 @@
|
|
|
1
|
-
import { ITenantsResponse, IUserProfile } from '..';
|
|
2
|
-
import { AuthStrategyEnum, SocialLoginProviders } from "./enums";
|
|
3
|
-
import { ISamlRolesGroup } from '../teams/interfaces';
|
|
4
|
-
|
|
5
|
-
export * from './secutiry-poilicy/interfaces';
|
|
6
|
-
|
|
7
|
-
export type IPreLogin = { email: string };
|
|
8
|
-
export type IPostLogin = {
|
|
9
|
-
RelayState: string;
|
|
10
|
-
SAMLResponse: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type IPreLoginWithIdpTypeResponse = {
|
|
14
|
-
address: string;
|
|
15
|
-
idpType: 'saml' | 'oidc';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type IOidcPostLogin = {
|
|
19
|
-
code: string;
|
|
20
|
-
state: string;
|
|
21
|
-
redirectUri?: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type IOidcPostLoginV2 = {
|
|
25
|
-
code: string;
|
|
26
|
-
RelayState: string;
|
|
27
|
-
redirectUri?: string;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type ILogin = { email: string; password: string; recaptchaToken?: string; invitationToken?: string; };
|
|
31
|
-
|
|
32
|
-
export type ILoginResponse = IUserProfile & {
|
|
33
|
-
mfaRequired: boolean;
|
|
34
|
-
accessToken: string;
|
|
35
|
-
refreshToken: string;
|
|
36
|
-
expires: string;
|
|
37
|
-
expiresIn: number;
|
|
38
|
-
mfaToken?: string; // for multi-factor authentication
|
|
39
|
-
qrCode?: string;
|
|
40
|
-
recoveryCode?: string;
|
|
41
|
-
emailVerified?: boolean;
|
|
42
|
-
redirectLocation?: string;
|
|
43
|
-
userEmail?: string;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export type ILoginResponseV2 = {
|
|
47
|
-
user: ILoginResponse,
|
|
48
|
-
tenants?: ITenantsResponse[]
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type ILoginWithMfa = {
|
|
52
|
-
mfaToken: string;
|
|
53
|
-
value: string;
|
|
54
|
-
rememberDevice?: boolean;
|
|
55
|
-
invitationToken?: string;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export type IActivateAccount = {
|
|
59
|
-
userId: string;
|
|
60
|
-
token: string;
|
|
61
|
-
password?: string;
|
|
62
|
-
recaptchaToken?: string;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export type IAcceptInvitation = {
|
|
66
|
-
userId: string;
|
|
67
|
-
token: string;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export type IResendActivationEmail = { email: string };
|
|
71
|
-
|
|
72
|
-
export type IForgotPassword = { email: string };
|
|
73
|
-
|
|
74
|
-
export type IResetPassword = {
|
|
75
|
-
token: string;
|
|
76
|
-
userId: string;
|
|
77
|
-
password: string;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export type IRecoverMFAToken = {
|
|
81
|
-
email: string;
|
|
82
|
-
recoveryCode: string;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export type IEnrollMfaResponse = {
|
|
86
|
-
qrCode: string; // QR Code image as base64
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export type IVerifyMfa = {
|
|
90
|
-
token: string;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export type IVerifyMfaResponse = {
|
|
94
|
-
recoveryCode: string;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export type IDisableMfa = {
|
|
98
|
-
token: string;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export type ISamlConfiguration = {
|
|
102
|
-
enabled: boolean;
|
|
103
|
-
domain?: string;
|
|
104
|
-
validated?: boolean;
|
|
105
|
-
generatedVerification?: string;
|
|
106
|
-
ssoEndpoint?: string;
|
|
107
|
-
publicCertificate?: string;
|
|
108
|
-
signRequest?: boolean;
|
|
109
|
-
createdAt?: Date;
|
|
110
|
-
updatedAt?: Date;
|
|
111
|
-
acsUrl?: string;
|
|
112
|
-
spEntityId?: string;
|
|
113
|
-
isSamlActive?: boolean;
|
|
114
|
-
oidcClientId?: string;
|
|
115
|
-
oidcSecret?: string;
|
|
116
|
-
type?: string;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export type IOidcConfiguration = {
|
|
120
|
-
active: boolean;
|
|
121
|
-
redirectUri?: string;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
export type ISSOPublicConfiguration = {
|
|
125
|
-
isActive: boolean;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export type IUpdateSamlConfiguration = Omit<ISamlConfiguration, 'validated' | 'generatedVerification' | 'createdAt' | 'updatedAt'>;
|
|
129
|
-
export type ISamlVendorConfigResponse = {
|
|
130
|
-
acsUrl: string;
|
|
131
|
-
spEntityId: string;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export type ISamlVendorMetadata = {
|
|
135
|
-
id: string;
|
|
136
|
-
vendorId: string;
|
|
137
|
-
entityName: 'saml';
|
|
138
|
-
configuration: ISamlVendorConfigResponse;
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export type IUpdateSamlVendorMetadata = {
|
|
142
|
-
metadata: string;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export interface ISocialLoginProviderConfiguration {
|
|
146
|
-
type: SocialLoginProviders;
|
|
147
|
-
clientId: string;
|
|
148
|
-
redirectUrl: string;
|
|
149
|
-
active: boolean;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export interface ISocialLoginProviderConfigurationV2 {
|
|
153
|
-
type: SocialLoginProviders;
|
|
154
|
-
clientId?: string | null;
|
|
155
|
-
redirectUrl: string;
|
|
156
|
-
active: boolean;
|
|
157
|
-
authorizationUrl?: string | null;
|
|
158
|
-
customised: boolean;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export interface ILoginViaSocialLogin {
|
|
162
|
-
code: string;
|
|
163
|
-
redirectUri?: string;
|
|
164
|
-
provider: SocialLoginProviders;
|
|
165
|
-
afterAuthRedirectUrl?: string;
|
|
166
|
-
codeVerifier?: string;
|
|
167
|
-
metadata?: string;
|
|
168
|
-
invitationToken?: string;
|
|
169
|
-
state?: string
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export interface ILoginViaSocialLoginResponse {
|
|
173
|
-
email: string;
|
|
174
|
-
isNewUser: boolean;
|
|
175
|
-
userId?: string;
|
|
176
|
-
tenantId?: string;
|
|
177
|
-
name: string;
|
|
178
|
-
accessToken: string;
|
|
179
|
-
mfaRequired: boolean;
|
|
180
|
-
userEmail?: string;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export interface ISetSocialLoginError {
|
|
184
|
-
error: string;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface IVendorConfig {
|
|
188
|
-
allowSignups: boolean;
|
|
189
|
-
allowNotVerifiedUsersLogin: boolean;
|
|
190
|
-
apiTokensEnabled: boolean;
|
|
191
|
-
forcePermissions: boolean;
|
|
192
|
-
authStrategy: AuthStrategyEnum;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export interface ISignUpUser {
|
|
196
|
-
email: string;
|
|
197
|
-
companyName: string;
|
|
198
|
-
recaptchaToken?: string;
|
|
199
|
-
name?: string;
|
|
200
|
-
password?: string;
|
|
201
|
-
phoneNumber?: string;
|
|
202
|
-
metadata?: string /** JSON */
|
|
203
|
-
;
|
|
204
|
-
roleIds?: string[];
|
|
205
|
-
invitationToken?: string;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export interface ISignUpResponse {
|
|
209
|
-
shouldActivate: boolean;
|
|
210
|
-
user?: ILoginResponse;
|
|
211
|
-
userId?: string;
|
|
212
|
-
tenantId?: string;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export interface ISessionResponse {
|
|
216
|
-
id: string;
|
|
217
|
-
expires?: Date;
|
|
218
|
-
ipAddress?: string;
|
|
219
|
-
userAgent?: string;
|
|
220
|
-
createdAt?: Date;
|
|
221
|
-
current?: boolean;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export interface ISessionIdleTimeoutConfiguration {
|
|
225
|
-
isActive: boolean;
|
|
226
|
-
timeout: number;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
export interface ISessionTimeoutConfiguration {
|
|
230
|
-
isActive: boolean;
|
|
231
|
-
timeout: number;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export interface ISessionConcurrentConfiguration {
|
|
235
|
-
isActive: boolean;
|
|
236
|
-
maxSessions: number;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export interface ISessionConfigurations {
|
|
240
|
-
sessionTimeoutConfiguration?: ISessionTimeoutConfiguration;
|
|
241
|
-
sessionIdleTimeoutConfiguration?: ISessionIdleTimeoutConfiguration;
|
|
242
|
-
sessionConcurrentConfiguration?: ISessionConcurrentConfiguration;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export interface IUserApiTokensData {
|
|
246
|
-
clientId?: string;
|
|
247
|
-
description: string;
|
|
248
|
-
metadata?: any;
|
|
249
|
-
secret?: string;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export interface ITenantApiTokensData {
|
|
253
|
-
clientId?: string;
|
|
254
|
-
description: string;
|
|
255
|
-
tenantId?: string;
|
|
256
|
-
createdByUserId?: string;
|
|
257
|
-
metadata?: any;
|
|
258
|
-
secret?: string;
|
|
259
|
-
roleIds?: string[];
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export interface IUpdateUserApiTokensData {
|
|
263
|
-
description: string;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export interface IUpdateTenantApiTokensData {
|
|
267
|
-
description: string;
|
|
268
|
-
roleIds: string[];
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export interface IDeleteApiToken {
|
|
272
|
-
tokenId: string;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export interface IUpdateSamlRoles {
|
|
276
|
-
roleIds: string[];
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export interface IUpdateSamlGroup {
|
|
280
|
-
id: string;
|
|
281
|
-
group: string;
|
|
282
|
-
roleIds: string[];
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export interface ICreateSamlGroup {
|
|
286
|
-
group: string;
|
|
287
|
-
roleIds?: string[];
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export type IGetUserById = { userId: string };
|
|
291
|
-
|
|
292
|
-
export interface IUserIdResponse {
|
|
293
|
-
id: string;
|
|
294
|
-
name: string;
|
|
295
|
-
deletedAt: null;
|
|
296
|
-
metadata: any;
|
|
297
|
-
tenantId: string;
|
|
298
|
-
vendorId: string;
|
|
299
|
-
createdAt: Date;
|
|
300
|
-
updatedAt: Date;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface IGetUserPasswordConfig {
|
|
304
|
-
userId: string;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export interface IGetActivateAccountStrategy {
|
|
308
|
-
userId: string;
|
|
309
|
-
token: string;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export interface IGetActivateAccountStrategyResponse {
|
|
313
|
-
shouldSetPassword: boolean;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export interface IAllowedToRememberMfaDevice {
|
|
317
|
-
isAllowedToRemember: boolean;
|
|
318
|
-
mfaDeviceExpiration: number;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
export interface IPasswordlessPreLogin {
|
|
322
|
-
email: string;
|
|
323
|
-
recaptchaToken?: string;
|
|
324
|
-
type: AuthStrategyEnum;
|
|
325
|
-
invitationToken?: string;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
export interface IPasswordlessPostLogin {
|
|
329
|
-
token: string;
|
|
330
|
-
recaptchaToken?: string;
|
|
331
|
-
type: AuthStrategyEnum;
|
|
332
|
-
invitationToken?: string;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export interface IVerifyInviteToken {
|
|
336
|
-
token: string;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
export interface ICreateSSODomain {
|
|
340
|
-
domain: string;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export interface ISSODomain {
|
|
344
|
-
id: string
|
|
345
|
-
domain: string;
|
|
346
|
-
validated: boolean;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export interface ISSOConfigurationDefaultRoles {
|
|
350
|
-
roleIds: string[]
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
export interface ISSOConfiguration {
|
|
354
|
-
id: string;
|
|
355
|
-
enabled: boolean;
|
|
356
|
-
generatedVerification: string;
|
|
357
|
-
ssoEndpoint: string;
|
|
358
|
-
publicCertificate: string;
|
|
359
|
-
signRequest: boolean;
|
|
360
|
-
createdAt?: string;
|
|
361
|
-
updatedAt?: string;
|
|
362
|
-
acsUrl: string;
|
|
363
|
-
type: string;
|
|
364
|
-
spEntityId: string;
|
|
365
|
-
oidcClientId: string;
|
|
366
|
-
oidcSecret: string;
|
|
367
|
-
domains: ISSODomain[];
|
|
368
|
-
roleIds: string[];
|
|
369
|
-
groups: ISamlRolesGroup[]
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
export interface IExchangeOAuthTokens {
|
|
373
|
-
code: string;
|
|
374
|
-
redirect_uri: string;
|
|
375
|
-
code_verifier: string;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
export interface IOAuthTokenResponse {
|
|
379
|
-
access_token: string;
|
|
380
|
-
expires_in?: number;
|
|
381
|
-
id_token: string;
|
|
382
|
-
refresh_token: string;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
export type IUpdateSSOConfiguration = Partial<Omit<ISSOConfiguration, 'id' | 'createdAt' | 'updatedAt' | 'domains'>>
|
|
386
|
-
|
|
387
|
-
export interface IResetPhoneNumber {
|
|
388
|
-
email: string;
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
export interface IResetPhoneNumberResponse {
|
|
392
|
-
resetPhoneNumberToken: string;
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
export interface IChangePhoneNumberWithVerification {
|
|
396
|
-
phoneNumber: string;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
export interface IChangePhoneNumberWithVerificationResponse {
|
|
400
|
-
changePhoneId: string;
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
export interface IVerifyChangePhoneNumber {
|
|
404
|
-
changePhoneId: string;
|
|
405
|
-
code: string;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
export interface IVerifyResetPhoneNumber {
|
|
409
|
-
resetPhoneNumberToken: string;
|
|
410
|
-
code: string
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
export interface IVerifyResetPhoneNumberResponse {
|
|
414
|
-
changePhoneNumberToken: string;
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
export interface IChangePhoneNumber {
|
|
418
|
-
changePhoneNumberToken: string;
|
|
419
|
-
phoneNumber: string;
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
interface WebAuthnLoginResponse {
|
|
423
|
-
clientDataJSON: string;
|
|
424
|
-
authenticatorData: string;
|
|
425
|
-
signature: string;
|
|
426
|
-
userHandle?: string;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export interface IWebAuthnPreLogin {
|
|
430
|
-
email: string;
|
|
431
|
-
recaptchaToken?: string;
|
|
432
|
-
};
|
|
433
|
-
|
|
434
|
-
interface AllowCredentials {
|
|
435
|
-
type: string;
|
|
436
|
-
id: string;
|
|
437
|
-
transports?: string[];
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
export interface IWebAuthnPreLoginResponse {
|
|
441
|
-
challenge: string;
|
|
442
|
-
allowCredentials?: AllowCredentials[];
|
|
443
|
-
timeout?: number;
|
|
444
|
-
rpId?: string;
|
|
445
|
-
userVerification?: UserVerificationRequirement;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
export interface IWebAuthnPostLogin {
|
|
449
|
-
id: string;
|
|
450
|
-
recaptchaToken?: string;
|
|
451
|
-
invitationToken?: string;
|
|
452
|
-
response: WebAuthnLoginResponse
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
export interface ICreateNewDeviceSessionResponse {
|
|
456
|
-
rp: { name: string; id: string; icon?: string };
|
|
457
|
-
user: { id: string; name: string; displayName: string; };
|
|
458
|
-
challenge: string;
|
|
459
|
-
pubKeyCredParams: Array<{ type: 'public-key'; alg: number }>;
|
|
460
|
-
excludeCredentials?: AllowCredentials[];
|
|
461
|
-
timeout?: number;
|
|
462
|
-
authenticatorSelection?: AuthenticatorSelectionCriteria;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
interface IWebAuthnRegisterResponse {
|
|
466
|
-
clientDataJSON: string;
|
|
467
|
-
attestationObject: string;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
export interface IVerifyNewWebAuthnDevice {
|
|
471
|
-
id: string;
|
|
472
|
-
response: IWebAuthnRegisterResponse
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
export enum SecondaryAuthStrategy {
|
|
476
|
-
WebAuthnPlatform = 'WebAuthnPlatform',
|
|
477
|
-
WebAuthnCrossPlatform = 'WebAuthnCrossPlatform',
|
|
478
|
-
SmsCode = 'SmsCode'
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
export interface IAuthStrategyConfig {
|
|
482
|
-
strategy: SecondaryAuthStrategy;
|
|
483
|
-
isActive: boolean;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
export interface IAuthStrategiesConfig {
|
|
487
|
-
secondaryAuthStrategies: IAuthStrategyConfig[]
|
|
488
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ISaveSecurityPolicyMfa,
|
|
3
|
-
ISaveSecurityPolicyLockout,
|
|
4
|
-
ISecurityPolicyMfa,
|
|
5
|
-
ISecurityPolicyLockout,
|
|
6
|
-
ISecurityPolicyCaptcha,
|
|
7
|
-
ISecurityPolicyPasswordHistory,
|
|
8
|
-
ISaveSecurityPolicyPasswordHistory,
|
|
9
|
-
ISecurityPolicyPasswordConfig, ISecurityPolicy,
|
|
10
|
-
} from './interfaces';
|
|
11
|
-
import {Get, Patch, Post} from '../../fetch';
|
|
12
|
-
import {urls} from '../../constants';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Get global secure access configuration
|
|
16
|
-
*/
|
|
17
|
-
export async function getGlobalSecurityPolicy(): Promise<ISecurityPolicy> {
|
|
18
|
-
console.debug('getGlobalSecurityPolicy()');
|
|
19
|
-
return Get(urls.identity.configurations.v1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get Mfa configuration from security policy
|
|
24
|
-
*/
|
|
25
|
-
export async function getMfaPolicy(): Promise<ISecurityPolicyMfa> {
|
|
26
|
-
console.debug('getMfaPolicy()');
|
|
27
|
-
return Get(`${urls.identity.configurations.v1}/mfa-policy`);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get Mfa configuration from security policy
|
|
32
|
-
*/
|
|
33
|
-
export async function getVendorMfaPolicy(): Promise<ISecurityPolicyMfa> {
|
|
34
|
-
console.debug('getVendorMfaPolicy()');
|
|
35
|
-
return Get(`${urls.identity.configurations.v1}/mfa-policy/vendor`);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Create/Update Mfa configuration from security policy
|
|
40
|
-
*/
|
|
41
|
-
export async function saveMfaPolicy(body: ISaveSecurityPolicyMfa): Promise<ISecurityPolicyMfa> {
|
|
42
|
-
console.debug('saveMfaPolicy()');
|
|
43
|
-
if (body.id) {
|
|
44
|
-
return Patch(`${urls.identity.configurations.v1}/mfa-policy`, body);
|
|
45
|
-
} else {
|
|
46
|
-
return Post(`${urls.identity.configurations.v1}/mfa-policy`, body);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Get Lockout configuration from security policy
|
|
52
|
-
*/
|
|
53
|
-
export async function getLockoutPolicy(): Promise<ISecurityPolicyLockout> {
|
|
54
|
-
console.debug('getLockoutPolicy()');
|
|
55
|
-
return Get(`${urls.identity.configurations.v1}/lockout-policy`);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Create/Update Lockout configuration from security policy
|
|
60
|
-
*/
|
|
61
|
-
export async function saveLockoutPolicy(body: ISaveSecurityPolicyLockout): Promise<ISecurityPolicyLockout> {
|
|
62
|
-
console.debug('saveLockoutPolicy()');
|
|
63
|
-
if (body.id) {
|
|
64
|
-
return Patch(`${urls.identity.configurations.v1}/lockout-policy`, body);
|
|
65
|
-
} else {
|
|
66
|
-
return Post(`${urls.identity.configurations.v1}/lockout-policy`, body);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Get Captcha configuration from security policy
|
|
72
|
-
*/
|
|
73
|
-
export async function getCaptchaPolicy(): Promise<ISecurityPolicyCaptcha | null> {
|
|
74
|
-
try {
|
|
75
|
-
return await Get(`${urls.identity.configurations.v1}/captcha-policy/public`);
|
|
76
|
-
} catch {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Get Password History configuration from security policy
|
|
83
|
-
*/
|
|
84
|
-
export async function getPasswordHistoryPolicy(): Promise<ISecurityPolicyPasswordHistory> {
|
|
85
|
-
console.debug('getPasswordHistoryPolicy()');
|
|
86
|
-
return Get(`${urls.identity.configurations.v1}/password-history-policy`);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Create/Update Password History configuration from security policy
|
|
91
|
-
*/
|
|
92
|
-
export async function savePasswordHistoryPolicy(
|
|
93
|
-
body: ISaveSecurityPolicyPasswordHistory
|
|
94
|
-
): Promise<ISecurityPolicyPasswordHistory> {
|
|
95
|
-
console.debug('savePasswordHistoryPolicy()');
|
|
96
|
-
if (body.id) {
|
|
97
|
-
return Patch(`${urls.identity.configurations.v1}/password-history-policy`, body);
|
|
98
|
-
} else {
|
|
99
|
-
return Post(`${urls.identity.configurations.v1}/password-history-policy`, body);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* load vendor password configuration.
|
|
105
|
-
*/
|
|
106
|
-
export async function getPasswordConfigPolicy(): Promise<ISecurityPolicyPasswordConfig> {
|
|
107
|
-
console.debug('getPasswordConfigPolicy()');
|
|
108
|
-
return Get(`${urls.identity.configurations.v1}/password`);
|
|
109
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
export type EnforceMFAType = 'DontForce' | 'Force' | 'ForceExceptSAML';
|
|
2
|
-
|
|
3
|
-
export interface ISecurityPolicy {
|
|
4
|
-
id: string;
|
|
5
|
-
enforceMFAType?: EnforceMFAType;
|
|
6
|
-
createdAt: Date;
|
|
7
|
-
updatedAt: Date;
|
|
8
|
-
allowOverrideEnforcePasswordHistory: boolean;
|
|
9
|
-
allowOverridePasswordComplexity: boolean;
|
|
10
|
-
allowOverridePasswordExpiration: boolean;
|
|
11
|
-
allowSignups: boolean;
|
|
12
|
-
apiTokensEnabled: boolean;
|
|
13
|
-
cookieSameSite: string;
|
|
14
|
-
defaultRefreshTokenExpiration: number;
|
|
15
|
-
defaultTokenExpiration: number;
|
|
16
|
-
publicKey: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface ISecurityPolicyMfa {
|
|
20
|
-
id: string;
|
|
21
|
-
enforceMFAType: EnforceMFAType;
|
|
22
|
-
createdAt: Date;
|
|
23
|
-
updatedAt: Date;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface ISaveSecurityPolicyMfa {
|
|
27
|
-
id?: string;
|
|
28
|
-
enforceMFAType: EnforceMFAType;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface ISecurityPolicyLockout {
|
|
32
|
-
id: string;
|
|
33
|
-
enabled: boolean;
|
|
34
|
-
maxAttempts: number;
|
|
35
|
-
createdAt: Date;
|
|
36
|
-
updatedAt: Date;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface ISaveSecurityPolicyLockout {
|
|
40
|
-
id?: string;
|
|
41
|
-
enabled: boolean;
|
|
42
|
-
maxAttempts: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface ISecurityPolicyCaptcha {
|
|
46
|
-
id: string;
|
|
47
|
-
siteKey: string;
|
|
48
|
-
enabled: boolean;
|
|
49
|
-
createdAt: Date;
|
|
50
|
-
updatedAt: Date;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface ISaveSecurityPolicyCaptcha {
|
|
54
|
-
id?: string;
|
|
55
|
-
siteKey: string;
|
|
56
|
-
enabled: boolean;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface ISecurityPolicyPasswordHistory {
|
|
60
|
-
id: string;
|
|
61
|
-
enabled: boolean;
|
|
62
|
-
historySize: number;
|
|
63
|
-
createdAt: Date;
|
|
64
|
-
updatedAt: Date;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface ISaveSecurityPolicyPasswordHistory {
|
|
68
|
-
id?: string;
|
|
69
|
-
enabled: boolean;
|
|
70
|
-
historySize: number;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface TestConfig {
|
|
74
|
-
allowPassphrases: boolean;
|
|
75
|
-
maxLength: number;
|
|
76
|
-
minLength: number;
|
|
77
|
-
minPhraseLength: number;
|
|
78
|
-
minOptionalTestsToPass: number;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export type ISecurityPolicyPasswordConfig = Partial<TestConfig>;
|