@frontegg/rest-api 2.10.90 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/ContextHolder.d.ts → ContextHolder.d.ts} +0 -0
- package/ContextHolder.js +80 -0
- package/{dist/account-settings → account-settings}/index.d.ts +0 -0
- package/account-settings/index.js +8 -0
- package/{dist/account-settings → account-settings}/interfaces.d.ts +0 -0
- package/account-settings/interfaces.js +1 -0
- package/account-settings/package.json +6 -0
- package/{dist/audits → audits}/index.d.ts +0 -0
- package/audits/index.js +21 -0
- package/{dist/audits → audits}/interfaces.d.ts +0 -0
- package/audits/interfaces.js +1 -0
- package/audits/package.json +6 -0
- package/{dist/auth → auth}/enums.d.ts +0 -0
- package/auth/enums.js +18 -0
- package/{dist/auth → auth}/index.d.ts +0 -0
- package/auth/index.js +409 -0
- package/{dist/auth → auth}/interfaces.d.ts +0 -0
- package/auth/interfaces.js +16 -0
- package/auth/package.json +6 -0
- package/{dist/auth → auth}/secutiry-poilicy/index.d.ts +0 -0
- package/auth/secutiry-poilicy/index.js +48 -0
- package/{dist/auth → auth}/secutiry-poilicy/interfaces.d.ts +0 -0
- package/auth/secutiry-poilicy/interfaces.js +1 -0
- package/{dist/connectivity → connectivity}/index.d.ts +0 -0
- package/connectivity/index.js +120 -0
- package/{dist/connectivity → connectivity}/interfaces.d.ts +0 -0
- package/connectivity/interfaces.js +1 -0
- package/connectivity/package.json +6 -0
- package/{dist/constants.d.ts → constants.d.ts} +0 -0
- package/{src/constants.ts → constants.js} +12 -12
- package/{dist/error.d.ts → error.d.ts} +0 -0
- package/{src/error.ts → error.js} +4 -5
- package/fetch.d.ts +19 -0
- package/fetch.js +203 -0
- package/{dist/es2015/index.d.ts → index.d.ts} +0 -0
- package/{dist/es2015/index.js → index.js} +31 -27
- package/{dist/es2015/interfaces.d.ts → interfaces.d.ts} +0 -0
- package/interfaces.js +1 -0
- package/{dist/es2015/jwt.d.ts → jwt.d.ts} +0 -0
- package/jwt.js +79 -0
- package/{dist/es2015/metadata → metadata}/index.d.ts +0 -0
- package/metadata/index.js +26 -0
- package/{dist/es2015/metadata → metadata}/interfaces.d.ts +0 -0
- package/metadata/interfaces.js +1 -0
- package/metadata/package.json +6 -0
- package/node/ContextHolder.js +90 -0
- package/node/account-settings/index.js +19 -0
- package/node/account-settings/interfaces.js +5 -0
- package/node/audits/index.js +37 -0
- package/node/audits/interfaces.js +5 -0
- package/node/auth/enums.js +26 -0
- package/node/auth/index.js +709 -0
- package/node/auth/interfaces.js +39 -0
- package/node/auth/secutiry-poilicy/index.js +75 -0
- package/node/auth/secutiry-poilicy/interfaces.js +5 -0
- package/node/connectivity/index.js +208 -0
- package/node/connectivity/interfaces.js +5 -0
- package/node/constants.js +177 -0
- package/node/error.js +21 -0
- package/node/fetch.js +234 -0
- package/node/index.js +357 -0
- package/node/interfaces.js +5 -0
- package/node/jwt.js +93 -0
- package/node/metadata/index.js +44 -0
- package/node/metadata/interfaces.js +5 -0
- package/node/notifications/index.js +39 -0
- package/node/notifications/interfaces.js +5 -0
- package/node/reports/index.js +96 -0
- package/node/reports/interfaces.js +5 -0
- package/node/roles/index.js +71 -0
- package/node/roles/interfaces.js +5 -0
- package/node/routers.js +13 -0
- package/node/sub-tenants/index.js +39 -0
- package/node/sub-tenants/interfaces.js +5 -0
- package/node/subscriptions/enums.js +39 -0
- package/node/subscriptions/index.js +135 -0
- package/node/subscriptions/interfaces.js +18 -0
- package/node/subscriptions/invoices.js +28 -0
- package/node/subscriptions/managedSubscriptions.js +40 -0
- package/node/subscriptions/paymentMethods.js +37 -0
- package/node/subscriptions/paymentProviders.js +14 -0
- package/node/subscriptions/plans.js +19 -0
- package/node/subscriptions/providers/index.js +18 -0
- package/node/subscriptions/providers/stripe/index.js +34 -0
- package/node/subscriptions/providers/stripe/interfaces.js +5 -0
- package/node/subscriptions/subscriptions.js +40 -0
- package/node/subscriptions/summaries.js +14 -0
- package/node/subscriptions/tenantConfiguration.js +19 -0
- package/node/teams/index.js +129 -0
- package/node/teams/interfaces.js +5 -0
- package/node/tenants/index.js +29 -0
- package/node/tenants/interfaces.js +5 -0
- package/node/vendor/index.js +16 -0
- package/node/vendor/interfaces.js +5 -0
- package/{dist/es2015/notifications → notifications}/index.d.ts +0 -0
- package/notifications/index.js +24 -0
- package/{dist/es2015/notifications → notifications}/interfaces.d.ts +0 -0
- package/notifications/interfaces.js +1 -0
- package/notifications/package.json +6 -0
- package/package.json +9 -32
- package/{dist/es2015/reports → reports}/index.d.ts +0 -0
- package/reports/index.js +75 -0
- package/{dist/es2015/reports → reports}/interfaces.d.ts +0 -0
- package/reports/interfaces.js +1 -0
- package/reports/package.json +6 -0
- package/{dist/es2015/roles → roles}/index.d.ts +0 -0
- package/roles/index.js +47 -0
- package/{dist/es2015/roles → roles}/interfaces.d.ts +0 -0
- package/roles/interfaces.js +1 -0
- package/roles/package.json +6 -0
- package/{dist/es2015/routers.d.ts → routers.d.ts} +0 -0
- package/routers.js +3 -0
- package/{dist/es2015/sub-tenants → sub-tenants}/index.d.ts +0 -0
- package/sub-tenants/index.js +20 -0
- package/{dist/es2015/sub-tenants → sub-tenants}/interfaces.d.ts +0 -0
- package/sub-tenants/interfaces.js +1 -0
- package/sub-tenants/package.json +6 -0
- package/{dist/es2015/subscriptions → subscriptions}/enums.d.ts +0 -0
- package/subscriptions/enums.js +29 -0
- package/{dist/es2015/subscriptions → subscriptions}/index.d.ts +0 -0
- package/{dist/subscriptions/index.d.ts → subscriptions/index.js} +1 -1
- package/{dist/es2015/subscriptions → subscriptions}/interfaces.d.ts +0 -0
- package/{dist/es2015/subscriptions → subscriptions}/interfaces.js +1 -1
- package/{dist/es2015/subscriptions → subscriptions}/invoices.d.ts +0 -0
- package/subscriptions/invoices.js +15 -0
- package/{dist/es2015/subscriptions → subscriptions}/managedSubscriptions.d.ts +0 -0
- package/subscriptions/managedSubscriptions.js +23 -0
- package/subscriptions/package.json +6 -0
- package/{dist/es2015/subscriptions → subscriptions}/paymentMethods.d.ts +0 -0
- package/subscriptions/paymentMethods.js +21 -0
- package/{dist/es2015/subscriptions → subscriptions}/paymentProviders.d.ts +0 -0
- package/subscriptions/paymentProviders.js +5 -0
- package/{dist/es2015/subscriptions → subscriptions}/plans.d.ts +0 -0
- package/subscriptions/plans.js +8 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/index.d.ts +0 -0
- package/subscriptions/providers/index.js +1 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/stripe/index.d.ts +0 -0
- package/subscriptions/providers/stripe/index.js +17 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/stripe/interfaces.d.ts +0 -0
- package/subscriptions/providers/stripe/interfaces.js +1 -0
- package/{dist/es2015/subscriptions → subscriptions}/subscriptions.d.ts +0 -0
- package/subscriptions/subscriptions.js +23 -0
- package/{dist/es2015/subscriptions → subscriptions}/summaries.d.ts +0 -0
- package/subscriptions/summaries.js +5 -0
- package/{dist/es2015/subscriptions → subscriptions}/tenantConfiguration.d.ts +0 -0
- package/subscriptions/tenantConfiguration.js +8 -0
- package/{dist/es2015/teams → teams}/index.d.ts +0 -0
- package/teams/index.js +81 -0
- package/{dist/es2015/teams → teams}/interfaces.d.ts +0 -0
- package/teams/interfaces.js +1 -0
- package/teams/package.json +6 -0
- package/{dist/es2015/tenants → tenants}/index.d.ts +0 -0
- package/tenants/index.js +14 -0
- package/{dist/es2015/tenants → tenants}/interfaces.d.ts +0 -0
- package/tenants/interfaces.js +1 -0
- package/tenants/package.json +6 -0
- package/{dist/es2015/vendor → vendor}/index.d.ts +0 -0
- package/vendor/index.js +6 -0
- package/{dist/es2015/vendor → vendor}/interfaces.d.ts +0 -0
- package/vendor/interfaces.js +1 -0
- package/vendor/package.json +6 -0
- package/CHANGELOG.md +0 -211
- package/README.md +0 -139
- package/SECURITY.md +0 -13
- package/dist/ContextHolder.js +0 -69
- package/dist/ContextHolder.js.map +0 -1
- package/dist/account-settings/index.js +0 -33
- package/dist/account-settings/index.js.map +0 -1
- package/dist/account-settings/interfaces.js +0 -3
- package/dist/account-settings/interfaces.js.map +0 -1
- package/dist/audits/index.js +0 -59
- package/dist/audits/index.js.map +0 -1
- package/dist/audits/interfaces.js +0 -3
- package/dist/audits/interfaces.js.map +0 -1
- package/dist/auth/enums.js +0 -19
- package/dist/auth/enums.js.map +0 -1
- package/dist/auth/index.js +0 -1042
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/interfaces.js +0 -29
- package/dist/auth/interfaces.js.map +0 -1
- package/dist/auth/secutiry-poilicy/index.js +0 -134
- package/dist/auth/secutiry-poilicy/index.js.map +0 -1
- package/dist/auth/secutiry-poilicy/interfaces.js +0 -3
- package/dist/auth/secutiry-poilicy/interfaces.js.map +0 -1
- package/dist/connectivity/index.js +0 -158
- package/dist/connectivity/index.js.map +0 -1
- package/dist/connectivity/interfaces.js +0 -3
- package/dist/connectivity/interfaces.js.map +0 -1
- package/dist/constants.js +0 -174
- package/dist/constants.js.map +0 -1
- package/dist/error.js +0 -14
- package/dist/error.js.map +0 -1
- package/dist/es2015/ContextHolder.d.ts +0 -29
- package/dist/es2015/ContextHolder.js +0 -65
- package/dist/es2015/ContextHolder.js.map +0 -1
- package/dist/es2015/account-settings/index.d.ts +0 -7
- package/dist/es2015/account-settings/index.js +0 -28
- package/dist/es2015/account-settings/index.js.map +0 -1
- package/dist/es2015/account-settings/interfaces.d.ts +0 -9
- package/dist/es2015/account-settings/interfaces.js +0 -2
- package/dist/es2015/account-settings/interfaces.js.map +0 -1
- package/dist/es2015/audits/index.d.ts +0 -16
- package/dist/es2015/audits/index.js +0 -53
- package/dist/es2015/audits/index.js.map +0 -1
- package/dist/es2015/audits/interfaces.d.ts +0 -61
- package/dist/es2015/audits/interfaces.js +0 -2
- package/dist/es2015/audits/interfaces.js.map +0 -1
- package/dist/es2015/auth/enums.d.ts +0 -13
- package/dist/es2015/auth/enums.js +0 -16
- package/dist/es2015/auth/enums.js.map +0 -1
- package/dist/es2015/auth/index.d.ts +0 -447
- package/dist/es2015/auth/index.js +0 -943
- package/dist/es2015/auth/index.js.map +0 -1
- package/dist/es2015/auth/interfaces.d.ts +0 -430
- package/dist/es2015/auth/interfaces.js +0 -16
- package/dist/es2015/auth/interfaces.js.map +0 -1
- package/dist/es2015/auth/secutiry-poilicy/index.d.ts +0 -41
- package/dist/es2015/auth/secutiry-poilicy/index.js +0 -121
- package/dist/es2015/auth/secutiry-poilicy/index.js.map +0 -1
- package/dist/es2015/auth/secutiry-poilicy/interfaces.d.ts +0 -70
- package/dist/es2015/auth/secutiry-poilicy/interfaces.js +0 -2
- package/dist/es2015/auth/secutiry-poilicy/interfaces.js.map +0 -1
- package/dist/es2015/connectivity/index.d.ts +0 -27
- package/dist/es2015/connectivity/index.js +0 -129
- package/dist/es2015/connectivity/index.js.map +0 -1
- package/dist/es2015/connectivity/interfaces.d.ts +0 -95
- package/dist/es2015/connectivity/interfaces.js +0 -2
- package/dist/es2015/connectivity/interfaces.js.map +0 -1
- package/dist/es2015/constants.d.ts +0 -170
- package/dist/es2015/constants.js +0 -171
- package/dist/es2015/constants.js.map +0 -1
- package/dist/es2015/error.d.ts +0 -5
- package/dist/es2015/error.js +0 -10
- package/dist/es2015/error.js.map +0 -1
- package/dist/es2015/fetch.d.ts +0 -19
- package/dist/es2015/fetch.js +0 -177
- package/dist/es2015/fetch.js.map +0 -1
- package/dist/es2015/index.js.map +0 -1
- package/dist/es2015/interfaces.js +0 -2
- package/dist/es2015/interfaces.js.map +0 -1
- package/dist/es2015/jwt.js +0 -83
- package/dist/es2015/jwt.js.map +0 -1
- package/dist/es2015/metadata/index.js +0 -32
- package/dist/es2015/metadata/index.js.map +0 -1
- package/dist/es2015/metadata/interfaces.js +0 -2
- package/dist/es2015/metadata/interfaces.js.map +0 -1
- package/dist/es2015/notifications/index.js +0 -49
- package/dist/es2015/notifications/index.js.map +0 -1
- package/dist/es2015/notifications/interfaces.js +0 -2
- package/dist/es2015/notifications/interfaces.js.map +0 -1
- package/dist/es2015/reports/index.js +0 -118
- package/dist/es2015/reports/index.js.map +0 -1
- package/dist/es2015/reports/interfaces.js +0 -2
- package/dist/es2015/reports/interfaces.js.map +0 -1
- package/dist/es2015/roles/index.js +0 -99
- package/dist/es2015/roles/index.js.map +0 -1
- package/dist/es2015/roles/interfaces.js +0 -2
- package/dist/es2015/roles/interfaces.js.map +0 -1
- package/dist/es2015/routers.js +0 -17
- package/dist/es2015/routers.js.map +0 -1
- package/dist/es2015/sub-tenants/index.js +0 -42
- package/dist/es2015/sub-tenants/index.js.map +0 -1
- package/dist/es2015/sub-tenants/interfaces.js +0 -2
- package/dist/es2015/sub-tenants/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/enums.js +0 -23
- package/dist/es2015/subscriptions/enums.js.map +0 -1
- package/dist/es2015/subscriptions/index.js +0 -11
- package/dist/es2015/subscriptions/index.js.map +0 -1
- package/dist/es2015/subscriptions/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/invoices.js +0 -43
- package/dist/es2015/subscriptions/invoices.js.map +0 -1
- package/dist/es2015/subscriptions/managedSubscriptions.js +0 -51
- package/dist/es2015/subscriptions/managedSubscriptions.js.map +0 -1
- package/dist/es2015/subscriptions/paymentMethods.js +0 -55
- package/dist/es2015/subscriptions/paymentMethods.js.map +0 -1
- package/dist/es2015/subscriptions/paymentProviders.js +0 -21
- package/dist/es2015/subscriptions/paymentProviders.js.map +0 -1
- package/dist/es2015/subscriptions/plans.js +0 -30
- package/dist/es2015/subscriptions/plans.js.map +0 -1
- package/dist/es2015/subscriptions/providers/index.js +0 -2
- package/dist/es2015/subscriptions/providers/index.js.map +0 -1
- package/dist/es2015/subscriptions/providers/stripe/index.js +0 -57
- package/dist/es2015/subscriptions/providers/stripe/index.js.map +0 -1
- package/dist/es2015/subscriptions/providers/stripe/interfaces.js +0 -2
- package/dist/es2015/subscriptions/providers/stripe/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/subscriptions.js +0 -57
- package/dist/es2015/subscriptions/subscriptions.js.map +0 -1
- package/dist/es2015/subscriptions/summaries.js +0 -21
- package/dist/es2015/subscriptions/summaries.js.map +0 -1
- package/dist/es2015/subscriptions/tenantConfiguration.js +0 -24
- package/dist/es2015/subscriptions/tenantConfiguration.js.map +0 -1
- package/dist/es2015/teams/index.js +0 -228
- package/dist/es2015/teams/index.js.map +0 -1
- package/dist/es2015/teams/interfaces.js +0 -2
- package/dist/es2015/teams/interfaces.js.map +0 -1
- package/dist/es2015/tenants/index.js +0 -57
- package/dist/es2015/tenants/index.js.map +0 -1
- package/dist/es2015/tenants/interfaces.js +0 -2
- package/dist/es2015/tenants/interfaces.js.map +0 -1
- package/dist/es2015/vendor/index.js +0 -23
- package/dist/es2015/vendor/index.js.map +0 -1
- package/dist/es2015/vendor/interfaces.js +0 -2
- package/dist/es2015/vendor/interfaces.js.map +0 -1
- package/dist/fetch.d.ts +0 -19
- package/dist/fetch.js +0 -187
- package/dist/fetch.js.map +0 -1
- package/dist/index.d.ts +0 -83
- package/dist/index.js +0 -98
- package/dist/index.js.map +0 -1
- package/dist/interfaces.d.ts +0 -40
- package/dist/interfaces.js +0 -3
- package/dist/interfaces.js.map +0 -1
- package/dist/jwt.d.ts +0 -13
- package/dist/jwt.js +0 -89
- package/dist/jwt.js.map +0 -1
- package/dist/metadata/index.d.ts +0 -5
- package/dist/metadata/index.js +0 -39
- package/dist/metadata/index.js.map +0 -1
- package/dist/metadata/interfaces.d.ts +0 -46
- package/dist/metadata/interfaces.js +0 -3
- package/dist/metadata/interfaces.js.map +0 -1
- package/dist/notifications/index.d.ts +0 -17
- package/dist/notifications/index.js +0 -56
- package/dist/notifications/index.js.map +0 -1
- package/dist/notifications/interfaces.d.ts +0 -40
- package/dist/notifications/interfaces.js +0 -3
- package/dist/notifications/interfaces.js.map +0 -1
- package/dist/reports/index.d.ts +0 -45
- package/dist/reports/index.js +0 -127
- package/dist/reports/index.js.map +0 -1
- package/dist/reports/interfaces.d.ts +0 -146
- package/dist/reports/interfaces.js +0 -3
- package/dist/reports/interfaces.js.map +0 -1
- package/dist/roles/index.d.ts +0 -34
- package/dist/roles/index.js +0 -110
- package/dist/roles/index.js.map +0 -1
- package/dist/roles/interfaces.d.ts +0 -58
- package/dist/roles/interfaces.js +0 -3
- package/dist/roles/interfaces.js.map +0 -1
- package/dist/routers.d.ts +0 -2
- package/dist/routers.js +0 -20
- package/dist/routers.js.map +0 -1
- package/dist/sub-tenants/index.d.ts +0 -8
- package/dist/sub-tenants/index.js +0 -51
- package/dist/sub-tenants/index.js.map +0 -1
- package/dist/sub-tenants/interfaces.d.ts +0 -87
- package/dist/sub-tenants/interfaces.js +0 -3
- package/dist/sub-tenants/interfaces.js.map +0 -1
- package/dist/subscriptions/enums.d.ts +0 -18
- package/dist/subscriptions/enums.js +0 -26
- package/dist/subscriptions/enums.js.map +0 -1
- package/dist/subscriptions/index.js +0 -23
- package/dist/subscriptions/index.js.map +0 -1
- package/dist/subscriptions/interfaces.d.ts +0 -117
- package/dist/subscriptions/interfaces.js +0 -14
- package/dist/subscriptions/interfaces.js.map +0 -1
- package/dist/subscriptions/invoices.d.ts +0 -13
- package/dist/subscriptions/invoices.js +0 -49
- package/dist/subscriptions/invoices.js.map +0 -1
- package/dist/subscriptions/managedSubscriptions.d.ts +0 -15
- package/dist/subscriptions/managedSubscriptions.js +0 -59
- package/dist/subscriptions/managedSubscriptions.js.map +0 -1
- package/dist/subscriptions/paymentMethods.d.ts +0 -13
- package/dist/subscriptions/paymentMethods.js +0 -61
- package/dist/subscriptions/paymentMethods.js.map +0 -1
- package/dist/subscriptions/paymentProviders.d.ts +0 -5
- package/dist/subscriptions/paymentProviders.js +0 -25
- package/dist/subscriptions/paymentProviders.js.map +0 -1
- package/dist/subscriptions/plans.d.ts +0 -9
- package/dist/subscriptions/plans.js +0 -35
- package/dist/subscriptions/plans.js.map +0 -1
- package/dist/subscriptions/providers/index.d.ts +0 -1
- package/dist/subscriptions/providers/index.js +0 -14
- package/dist/subscriptions/providers/index.js.map +0 -1
- package/dist/subscriptions/providers/stripe/index.d.ts +0 -21
- package/dist/subscriptions/providers/stripe/index.js +0 -65
- package/dist/subscriptions/providers/stripe/index.js.map +0 -1
- package/dist/subscriptions/providers/stripe/interfaces.d.ts +0 -32
- package/dist/subscriptions/providers/stripe/interfaces.js +0 -3
- package/dist/subscriptions/providers/stripe/interfaces.js.map +0 -1
- package/dist/subscriptions/subscriptions.d.ts +0 -21
- package/dist/subscriptions/subscriptions.js +0 -65
- package/dist/subscriptions/subscriptions.js.map +0 -1
- package/dist/subscriptions/summaries.d.ts +0 -5
- package/dist/subscriptions/summaries.js +0 -25
- package/dist/subscriptions/summaries.js.map +0 -1
- package/dist/subscriptions/tenantConfiguration.d.ts +0 -3
- package/dist/subscriptions/tenantConfiguration.js +0 -29
- package/dist/subscriptions/tenantConfiguration.js.map +0 -1
- package/dist/teams/index.d.ts +0 -116
- package/dist/teams/index.js +0 -250
- package/dist/teams/index.js.map +0 -1
- package/dist/teams/interfaces.d.ts +0 -136
- package/dist/teams/interfaces.js +0 -3
- package/dist/teams/interfaces.js.map +0 -1
- package/dist/tenants/index.d.ts +0 -26
- package/dist/tenants/index.js +0 -64
- package/dist/tenants/index.js.map +0 -1
- package/dist/tenants/interfaces.d.ts +0 -30
- package/dist/tenants/interfaces.js +0 -3
- package/dist/tenants/interfaces.js.map +0 -1
- package/dist/umd/index.js +0 -2891
- package/dist/vendor/index.d.ts +0 -6
- package/dist/vendor/index.js +0 -27
- package/dist/vendor/index.js.map +0 -1
- package/dist/vendor/interfaces.d.ts +0 -6
- package/dist/vendor/interfaces.js +0 -3
- package/dist/vendor/interfaces.js.map +0 -1
- package/src/ContextHolder.ts +0 -81
- package/src/account-settings/index.ts +0 -18
- package/src/account-settings/interfaces.ts +0 -10
- package/src/audits/index.ts +0 -35
- package/src/audits/interfaces.ts +0 -70
- package/src/auth/enums.ts +0 -17
- package/src/auth/index.ts +0 -935
- package/src/auth/interfaces.ts +0 -488
- package/src/auth/secutiry-poilicy/index.ts +0 -109
- package/src/auth/secutiry-poilicy/interfaces.ts +0 -81
- package/src/connectivity/index.ts +0 -160
- package/src/connectivity/interfaces.ts +0 -106
- package/src/fetch.ts +0 -220
- package/src/index.ts +0 -86
- package/src/interfaces.ts +0 -47
- package/src/jwt.ts +0 -92
- package/src/metadata/index.ts +0 -24
- package/src/metadata/interfaces.ts +0 -51
- package/src/notifications/index.ts +0 -40
- package/src/notifications/interfaces.ts +0 -45
- package/src/reports/index.ts +0 -116
- package/src/reports/interfaces.ts +0 -167
- package/src/roles/index.ts +0 -80
- package/src/roles/interfaces.ts +0 -64
- package/src/routers.ts +0 -18
- package/src/sub-tenants/index.ts +0 -49
- package/src/sub-tenants/interfaces.ts +0 -100
- package/src/subscriptions/enums.ts +0 -22
- package/src/subscriptions/index.ts +0 -10
- package/src/subscriptions/interfaces.ts +0 -144
- package/src/subscriptions/invoices.ts +0 -42
- package/src/subscriptions/managedSubscriptions.ts +0 -53
- package/src/subscriptions/paymentMethods.ts +0 -47
- package/src/subscriptions/paymentProviders.ts +0 -13
- package/src/subscriptions/plans.ts +0 -19
- package/src/subscriptions/providers/index.ts +0 -1
- package/src/subscriptions/providers/stripe/index.ts +0 -56
- package/src/subscriptions/providers/stripe/interfaces.ts +0 -39
- package/src/subscriptions/subscriptions.ts +0 -63
- package/src/subscriptions/summaries.ts +0 -11
- package/src/subscriptions/tenantConfiguration.ts +0 -23
- package/src/teams/index.ts +0 -224
- package/src/teams/interfaces.ts +0 -163
- package/src/tenants/index.ts +0 -46
- package/src/tenants/interfaces.ts +0 -33
- package/src/vendor/index.ts +0 -12
- package/src/vendor/interfaces.ts +0 -6
- package/yarn-error.log +0 -518
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
var _exportNames = {
|
|
9
|
+
generateLoginResponse: true,
|
|
10
|
+
generateLoginResponseV2: true,
|
|
11
|
+
generateLoginResponseFromOAuthResponse: true,
|
|
12
|
+
preLogin: true,
|
|
13
|
+
preLoginWithIdpType: true,
|
|
14
|
+
postLogin: true,
|
|
15
|
+
oidcPostLogin: true,
|
|
16
|
+
login: true,
|
|
17
|
+
loginWithMfa: true,
|
|
18
|
+
activateAccount: true,
|
|
19
|
+
getActivateAccountStrategy: true,
|
|
20
|
+
resendActivationEmail: true,
|
|
21
|
+
acceptInvitation: true,
|
|
22
|
+
refreshToken: true,
|
|
23
|
+
refreshTokenV2: true,
|
|
24
|
+
logout: true,
|
|
25
|
+
forgotPassword: true,
|
|
26
|
+
resetPassword: true,
|
|
27
|
+
loadPasswordConfig: true,
|
|
28
|
+
recoverMfaToken: true,
|
|
29
|
+
enrollMfa: true,
|
|
30
|
+
verifyMfa: true,
|
|
31
|
+
disableMfa: true,
|
|
32
|
+
getSamlConfiguration: true,
|
|
33
|
+
updateSamlConfiguration: true,
|
|
34
|
+
getSamlVendorConfiguration: true,
|
|
35
|
+
updateSamlVendorMetadata: true,
|
|
36
|
+
validateSamlDomain: true,
|
|
37
|
+
getSamlRoles: true,
|
|
38
|
+
getSamlRolesGroups: true,
|
|
39
|
+
updateSamlRoles: true,
|
|
40
|
+
createSamlGroup: true,
|
|
41
|
+
updateSamlGroup: true,
|
|
42
|
+
deleteSamlGroup: true,
|
|
43
|
+
getOidcConfiguration: true,
|
|
44
|
+
getSSOPublicConfiguration: true,
|
|
45
|
+
getSocialLoginProviders: true,
|
|
46
|
+
getSocialLoginProvidersV2: true,
|
|
47
|
+
loginViaSocialLogin: true,
|
|
48
|
+
getVendorConfig: true,
|
|
49
|
+
signUpUser: true,
|
|
50
|
+
getCurrentUserSessions: true,
|
|
51
|
+
getSessionConfigurations: true,
|
|
52
|
+
createOrUpdateSessionConfigrations: true,
|
|
53
|
+
deleteSessionForUser: true,
|
|
54
|
+
deleteAllSessionsForUser: true,
|
|
55
|
+
getUserApiTokensData: true,
|
|
56
|
+
getTenantApiTokensData: true,
|
|
57
|
+
updateUserApiTokensData: true,
|
|
58
|
+
updateTenantApiTokensData: true,
|
|
59
|
+
deleteTenantApiToken: true,
|
|
60
|
+
deleteUserApiToken: true,
|
|
61
|
+
getUserById: true,
|
|
62
|
+
checkIfAllowToRememberMfaDevice: true,
|
|
63
|
+
passwordlessPreLogin: true,
|
|
64
|
+
passwordlessPostLogin: true,
|
|
65
|
+
verifyInviteToken: true,
|
|
66
|
+
getSSOConfigurations: true,
|
|
67
|
+
createSSOConfiguration: true,
|
|
68
|
+
updateSSOConfiguration: true,
|
|
69
|
+
deleteSSOConfiguration: true,
|
|
70
|
+
createSSOConfigurationByMetadata: true,
|
|
71
|
+
updateSSOConfigurationByMetadata: true,
|
|
72
|
+
createSSODomain: true,
|
|
73
|
+
deleteSSODomain: true,
|
|
74
|
+
validateSSODomain: true,
|
|
75
|
+
getSSODefaultRoles: true,
|
|
76
|
+
setSSODefaultRoles: true,
|
|
77
|
+
createSSOGroup: true,
|
|
78
|
+
updateSSOGroup: true,
|
|
79
|
+
deleteSSOGroup: true,
|
|
80
|
+
getSSOGroups: true,
|
|
81
|
+
preLoginV2: true,
|
|
82
|
+
oidcPostLoginV2: true,
|
|
83
|
+
exchangeOAuthTokens: true,
|
|
84
|
+
resetPhoneNumber: true,
|
|
85
|
+
verifyResetPhoneNumber: true,
|
|
86
|
+
changePhoneNumberWithVerification: true,
|
|
87
|
+
verifyChangePhoneNumber: true,
|
|
88
|
+
changePhoneNumber: true,
|
|
89
|
+
webAuthnPreLogin: true,
|
|
90
|
+
webAuthnPostLogin: true,
|
|
91
|
+
webAuthnCreateNewDeviceSession: true,
|
|
92
|
+
verifyNewDeviceSession: true,
|
|
93
|
+
getVendorPublicAuthStrategiesConfig: true
|
|
94
|
+
};
|
|
95
|
+
exports.acceptInvitation = acceptInvitation;
|
|
96
|
+
exports.activateAccount = activateAccount;
|
|
97
|
+
exports.changePhoneNumber = changePhoneNumber;
|
|
98
|
+
exports.changePhoneNumberWithVerification = changePhoneNumberWithVerification;
|
|
99
|
+
exports.checkIfAllowToRememberMfaDevice = checkIfAllowToRememberMfaDevice;
|
|
100
|
+
exports.createOrUpdateSessionConfigrations = createOrUpdateSessionConfigrations;
|
|
101
|
+
exports.createSSOConfiguration = createSSOConfiguration;
|
|
102
|
+
exports.createSSOConfigurationByMetadata = createSSOConfigurationByMetadata;
|
|
103
|
+
exports.createSSODomain = createSSODomain;
|
|
104
|
+
exports.createSSOGroup = createSSOGroup;
|
|
105
|
+
exports.createSamlGroup = createSamlGroup;
|
|
106
|
+
exports.deleteAllSessionsForUser = deleteAllSessionsForUser;
|
|
107
|
+
exports.deleteSSOConfiguration = deleteSSOConfiguration;
|
|
108
|
+
exports.deleteSSODomain = deleteSSODomain;
|
|
109
|
+
exports.deleteSSOGroup = deleteSSOGroup;
|
|
110
|
+
exports.deleteSamlGroup = deleteSamlGroup;
|
|
111
|
+
exports.deleteSessionForUser = deleteSessionForUser;
|
|
112
|
+
exports.deleteTenantApiToken = deleteTenantApiToken;
|
|
113
|
+
exports.deleteUserApiToken = deleteUserApiToken;
|
|
114
|
+
exports.disableMfa = disableMfa;
|
|
115
|
+
exports.enrollMfa = enrollMfa;
|
|
116
|
+
exports.exchangeOAuthTokens = exchangeOAuthTokens;
|
|
117
|
+
exports.forgotPassword = forgotPassword;
|
|
118
|
+
exports.generateLoginResponse = generateLoginResponse;
|
|
119
|
+
exports.generateLoginResponseFromOAuthResponse = generateLoginResponseFromOAuthResponse;
|
|
120
|
+
exports.generateLoginResponseV2 = generateLoginResponseV2;
|
|
121
|
+
exports.getActivateAccountStrategy = getActivateAccountStrategy;
|
|
122
|
+
exports.getCurrentUserSessions = getCurrentUserSessions;
|
|
123
|
+
exports.getOidcConfiguration = getOidcConfiguration;
|
|
124
|
+
exports.getSSOConfigurations = getSSOConfigurations;
|
|
125
|
+
exports.getSSODefaultRoles = getSSODefaultRoles;
|
|
126
|
+
exports.getSSOGroups = getSSOGroups;
|
|
127
|
+
exports.getSSOPublicConfiguration = getSSOPublicConfiguration;
|
|
128
|
+
exports.getSamlConfiguration = getSamlConfiguration;
|
|
129
|
+
exports.getSamlRoles = getSamlRoles;
|
|
130
|
+
exports.getSamlRolesGroups = getSamlRolesGroups;
|
|
131
|
+
exports.getSamlVendorConfiguration = getSamlVendorConfiguration;
|
|
132
|
+
exports.getSessionConfigurations = getSessionConfigurations;
|
|
133
|
+
exports.getSocialLoginProviders = getSocialLoginProviders;
|
|
134
|
+
exports.getSocialLoginProvidersV2 = getSocialLoginProvidersV2;
|
|
135
|
+
exports.getTenantApiTokensData = getTenantApiTokensData;
|
|
136
|
+
exports.getUserApiTokensData = getUserApiTokensData;
|
|
137
|
+
exports.getUserById = getUserById;
|
|
138
|
+
exports.getVendorConfig = getVendorConfig;
|
|
139
|
+
exports.getVendorPublicAuthStrategiesConfig = getVendorPublicAuthStrategiesConfig;
|
|
140
|
+
exports.loadPasswordConfig = loadPasswordConfig;
|
|
141
|
+
exports.login = login;
|
|
142
|
+
exports.loginViaSocialLogin = loginViaSocialLogin;
|
|
143
|
+
exports.loginWithMfa = loginWithMfa;
|
|
144
|
+
exports.logout = logout;
|
|
145
|
+
exports.oidcPostLogin = oidcPostLogin;
|
|
146
|
+
exports.oidcPostLoginV2 = oidcPostLoginV2;
|
|
147
|
+
exports.passwordlessPostLogin = passwordlessPostLogin;
|
|
148
|
+
exports.passwordlessPreLogin = passwordlessPreLogin;
|
|
149
|
+
exports.postLogin = postLogin;
|
|
150
|
+
exports.preLogin = preLogin;
|
|
151
|
+
exports.preLoginV2 = preLoginV2;
|
|
152
|
+
exports.preLoginWithIdpType = preLoginWithIdpType;
|
|
153
|
+
exports.recoverMfaToken = recoverMfaToken;
|
|
154
|
+
exports.refreshToken = refreshToken;
|
|
155
|
+
exports.refreshTokenV2 = refreshTokenV2;
|
|
156
|
+
exports.resendActivationEmail = resendActivationEmail;
|
|
157
|
+
exports.resetPassword = resetPassword;
|
|
158
|
+
exports.resetPhoneNumber = resetPhoneNumber;
|
|
159
|
+
exports.setSSODefaultRoles = setSSODefaultRoles;
|
|
160
|
+
exports.signUpUser = signUpUser;
|
|
161
|
+
exports.updateSSOConfiguration = updateSSOConfiguration;
|
|
162
|
+
exports.updateSSOConfigurationByMetadata = updateSSOConfigurationByMetadata;
|
|
163
|
+
exports.updateSSOGroup = updateSSOGroup;
|
|
164
|
+
exports.updateSamlConfiguration = updateSamlConfiguration;
|
|
165
|
+
exports.updateSamlGroup = updateSamlGroup;
|
|
166
|
+
exports.updateSamlRoles = updateSamlRoles;
|
|
167
|
+
exports.updateSamlVendorMetadata = updateSamlVendorMetadata;
|
|
168
|
+
exports.updateTenantApiTokensData = updateTenantApiTokensData;
|
|
169
|
+
exports.updateUserApiTokensData = updateUserApiTokensData;
|
|
170
|
+
exports.validateSSODomain = validateSSODomain;
|
|
171
|
+
exports.validateSamlDomain = validateSamlDomain;
|
|
172
|
+
exports.verifyChangePhoneNumber = verifyChangePhoneNumber;
|
|
173
|
+
exports.verifyInviteToken = verifyInviteToken;
|
|
174
|
+
exports.verifyMfa = verifyMfa;
|
|
175
|
+
exports.verifyNewDeviceSession = verifyNewDeviceSession;
|
|
176
|
+
exports.verifyResetPhoneNumber = verifyResetPhoneNumber;
|
|
177
|
+
exports.webAuthnCreateNewDeviceSession = webAuthnCreateNewDeviceSession;
|
|
178
|
+
exports.webAuthnPostLogin = webAuthnPostLogin;
|
|
179
|
+
exports.webAuthnPreLogin = webAuthnPreLogin;
|
|
180
|
+
|
|
181
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
182
|
+
|
|
183
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
184
|
+
|
|
185
|
+
var _tenants = require("../tenants");
|
|
186
|
+
|
|
187
|
+
var _secutiryPoilicy = require("./secutiry-poilicy");
|
|
188
|
+
|
|
189
|
+
Object.keys(_secutiryPoilicy).forEach(function (key) {
|
|
190
|
+
if (key === "default" || key === "__esModule") return;
|
|
191
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
192
|
+
if (key in exports && exports[key] === _secutiryPoilicy[key]) return;
|
|
193
|
+
Object.defineProperty(exports, key, {
|
|
194
|
+
enumerable: true,
|
|
195
|
+
get: function () {
|
|
196
|
+
return _secutiryPoilicy[key];
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
var _enums = require("./enums");
|
|
202
|
+
|
|
203
|
+
Object.keys(_enums).forEach(function (key) {
|
|
204
|
+
if (key === "default" || key === "__esModule") return;
|
|
205
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
206
|
+
if (key in exports && exports[key] === _enums[key]) return;
|
|
207
|
+
Object.defineProperty(exports, key, {
|
|
208
|
+
enumerable: true,
|
|
209
|
+
get: function () {
|
|
210
|
+
return _enums[key];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
var _constants = require("../constants");
|
|
216
|
+
|
|
217
|
+
var _ContextHolder = require("../ContextHolder");
|
|
218
|
+
|
|
219
|
+
var _fetch = require("../fetch");
|
|
220
|
+
|
|
221
|
+
var _jwt = require("../jwt");
|
|
222
|
+
|
|
223
|
+
const _excluded = ["type"],
|
|
224
|
+
_excluded2 = ["type"];
|
|
225
|
+
|
|
226
|
+
async function generateLoginResponse(loginResponse) {
|
|
227
|
+
if (!loginResponse.accessToken) {
|
|
228
|
+
return loginResponse;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
_ContextHolder.ContextHolder.setAccessToken(loginResponse.accessToken);
|
|
232
|
+
|
|
233
|
+
const me = await (0, _fetch.Get)(`${_constants.urls.identity.users.v2}/me`);
|
|
234
|
+
const decodedContent = loginResponse.accessToken ? (0, _jwt.jwtDecode)(loginResponse.accessToken) : {};
|
|
235
|
+
const user = (0, _extends2.default)({}, loginResponse, decodedContent, me);
|
|
236
|
+
|
|
237
|
+
_ContextHolder.ContextHolder.setUser(user);
|
|
238
|
+
|
|
239
|
+
return user;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
async function generateLoginResponseV2(loginResponse) {
|
|
243
|
+
if (!loginResponse.accessToken) {
|
|
244
|
+
return {
|
|
245
|
+
user: loginResponse
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
_ContextHolder.ContextHolder.setAccessToken(loginResponse.accessToken);
|
|
250
|
+
|
|
251
|
+
const [me, tenants] = await Promise.all([(0, _fetch.Get)(`${_constants.urls.identity.users.v2}/me`), (0, _tenants.getTenants)()]);
|
|
252
|
+
const decodedContent = loginResponse.accessToken ? (0, _jwt.jwtDecode)(loginResponse.accessToken) : {};
|
|
253
|
+
const user = (0, _extends2.default)({}, loginResponse, decodedContent, me);
|
|
254
|
+
|
|
255
|
+
_ContextHolder.ContextHolder.setUser(user);
|
|
256
|
+
|
|
257
|
+
return {
|
|
258
|
+
user,
|
|
259
|
+
tenants
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
async function generateLoginResponseFromOAuthResponse(oauthResponse) {
|
|
264
|
+
_ContextHolder.ContextHolder.setAccessToken(oauthResponse.id_token);
|
|
265
|
+
|
|
266
|
+
const me = await (0, _fetch.Get)(`${_constants.urls.identity.users.v2}/me`);
|
|
267
|
+
const decodedContent = oauthResponse.id_token ? (0, _jwt.jwtDecode)(oauthResponse.id_token) : {};
|
|
268
|
+
const user = (0, _extends2.default)({
|
|
269
|
+
mfaRequired: false,
|
|
270
|
+
accessToken: oauthResponse.id_token,
|
|
271
|
+
refreshToken: oauthResponse.refresh_token
|
|
272
|
+
}, decodedContent, me);
|
|
273
|
+
|
|
274
|
+
_ContextHolder.ContextHolder.setUser(user);
|
|
275
|
+
|
|
276
|
+
return user;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
async function preLogin(body) {
|
|
280
|
+
try {
|
|
281
|
+
const {
|
|
282
|
+
address
|
|
283
|
+
} = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/saml/prelogin`, body);
|
|
284
|
+
return address;
|
|
285
|
+
} catch {
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
async function preLoginWithIdpType(body) {
|
|
291
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/saml/prelogin`, body);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
async function postLogin(body) {
|
|
295
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/saml/postlogin`, body);
|
|
296
|
+
return generateLoginResponse(data);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
async function oidcPostLogin(body) {
|
|
300
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/oidc/postlogin`, body);
|
|
301
|
+
return generateLoginResponse(data);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
async function login(body) {
|
|
305
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user`, body);
|
|
306
|
+
return generateLoginResponse(data);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
async function loginWithMfa(body) {
|
|
310
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/verify`, body);
|
|
311
|
+
return generateLoginResponse(data);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
async function activateAccount(body) {
|
|
315
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/activate`, body);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
async function getActivateAccountStrategy(params) {
|
|
319
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.users.v1}/activate/strategy`, params);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
async function resendActivationEmail(body) {
|
|
323
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/activate/reset`, body);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
async function acceptInvitation(body) {
|
|
327
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/invitation/accept`, body);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
async function refreshToken() {
|
|
331
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/token/refresh`);
|
|
332
|
+
return generateLoginResponse(data);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
async function refreshTokenV2() {
|
|
336
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/token/refresh`);
|
|
337
|
+
return generateLoginResponseV2(data);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
async function logout() {
|
|
341
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/logout`);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
async function forgotPassword(body) {
|
|
345
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/passwords/reset`, body);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
async function resetPassword(body) {
|
|
349
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/passwords/reset/verify`, body);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
async function loadPasswordConfig(params) {
|
|
353
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.users.v1}/passwords/config`, params);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
async function recoverMfaToken(body) {
|
|
357
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/recover`, body);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
async function enrollMfa() {
|
|
361
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/mfa/enroll`);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
async function verifyMfa(body) {
|
|
365
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/mfa/enroll/verify`, body);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
async function disableMfa(body) {
|
|
369
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/mfa/disable`, body);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
async function getSamlConfiguration() {
|
|
373
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v1}/saml/configurations`);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
async function updateSamlConfiguration(body) {
|
|
377
|
+
return (0, _fetch.Post)(`${_constants.urls.team.sso.v1}/saml/configurations`, body);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
async function getSamlVendorConfiguration() {
|
|
381
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v1}/saml/configurations/vendor-config`);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
async function updateSamlVendorMetadata(body) {
|
|
385
|
+
return (0, _fetch.Put)(`${_constants.urls.team.sso.v1}/saml/configurations/metadata`, body);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
async function validateSamlDomain() {
|
|
389
|
+
return (0, _fetch.Put)(`${_constants.urls.team.sso.v1}/saml/validations/domain`);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
async function getSamlRoles() {
|
|
393
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v1}/saml/configurations/roles/default`);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
async function getSamlRolesGroups() {
|
|
397
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v2}/saml/configurations/groups`);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
async function updateSamlRoles({
|
|
401
|
+
roleIds
|
|
402
|
+
}) {
|
|
403
|
+
return (0, _fetch.Post)(`${_constants.urls.team.sso.v1}/saml/configurations/roles/default`, {
|
|
404
|
+
roleIds
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
async function createSamlGroup({
|
|
409
|
+
roleIds,
|
|
410
|
+
group
|
|
411
|
+
}) {
|
|
412
|
+
return (0, _fetch.Post)(`${_constants.urls.team.sso.v2}/saml/configurations/groups`, {
|
|
413
|
+
group,
|
|
414
|
+
roleIds
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
async function updateSamlGroup({
|
|
419
|
+
roleIds,
|
|
420
|
+
group,
|
|
421
|
+
id
|
|
422
|
+
}) {
|
|
423
|
+
return (0, _fetch.Patch)(`${_constants.urls.team.sso.v2}/saml/configurations/groups/${id}`, {
|
|
424
|
+
group,
|
|
425
|
+
roleIds
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
async function deleteSamlGroup({
|
|
430
|
+
id
|
|
431
|
+
}) {
|
|
432
|
+
return (0, _fetch.Delete)(`${_constants.urls.team.sso.v2}/saml/configurations/groups/${id}`);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
async function getOidcConfiguration() {
|
|
436
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v1}/oidc/configurations`);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
async function getSSOPublicConfiguration() {
|
|
440
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v2}/configurations/public`);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
async function getSocialLoginProviders() {
|
|
444
|
+
return (0, _fetch.Get)(_constants.urls.identity.sso.v1);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
async function getSocialLoginProvidersV2() {
|
|
448
|
+
return (0, _fetch.Get)(_constants.urls.identity.sso.v2);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
async function loginViaSocialLogin({
|
|
452
|
+
provider,
|
|
453
|
+
code,
|
|
454
|
+
redirectUri,
|
|
455
|
+
codeVerifier,
|
|
456
|
+
metadata,
|
|
457
|
+
invitationToken,
|
|
458
|
+
state
|
|
459
|
+
}) {
|
|
460
|
+
const params = {
|
|
461
|
+
code
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
if (redirectUri) {
|
|
465
|
+
params.redirectUri = redirectUri;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (codeVerifier) {
|
|
469
|
+
params.code_verifier = codeVerifier;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (state) {
|
|
473
|
+
params.state = state;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/sso/${provider}/postlogin`, {
|
|
477
|
+
metadata,
|
|
478
|
+
invitationToken
|
|
479
|
+
}, {
|
|
480
|
+
params
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
async function getVendorConfig() {
|
|
485
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.configurations.v1}/public`);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
async function signUpUser(body) {
|
|
489
|
+
const {
|
|
490
|
+
shouldActivate,
|
|
491
|
+
authResponse,
|
|
492
|
+
userId,
|
|
493
|
+
tenantId
|
|
494
|
+
} = await (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/signUp`, body);
|
|
495
|
+
const loginResponse = !shouldActivate && authResponse ? await generateLoginResponse(authResponse) : undefined;
|
|
496
|
+
return {
|
|
497
|
+
shouldActivate,
|
|
498
|
+
user: loginResponse,
|
|
499
|
+
userId,
|
|
500
|
+
tenantId
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
async function getCurrentUserSessions() {
|
|
505
|
+
return (0, _fetch.Get)(_constants.urls.identity.users.sessions.currentUser.v1);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
async function getSessionConfigurations() {
|
|
509
|
+
return (0, _fetch.Get)(_constants.urls.identity.users.sessions.configurations.v1);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
async function createOrUpdateSessionConfigrations(body) {
|
|
513
|
+
await (0, _fetch.Post)(_constants.urls.identity.users.sessions.configurations.v1, body);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
async function deleteSessionForUser(id) {
|
|
517
|
+
await (0, _fetch.Delete)(`${_constants.urls.identity.users.sessions.currentUser.v1}/${id}`);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
async function deleteAllSessionsForUser() {
|
|
521
|
+
await (0, _fetch.Delete)(`${_constants.urls.identity.users.sessions.currentUser.v1}/all`);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
async function getUserApiTokensData() {
|
|
525
|
+
return (0, _fetch.Get)(_constants.urls.identity.users.apiTokens.v1);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
async function getTenantApiTokensData() {
|
|
529
|
+
return (0, _fetch.Get)(_constants.urls.identity.tenants.apiTokens.v1);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
async function updateUserApiTokensData(body) {
|
|
533
|
+
return (0, _fetch.Post)(_constants.urls.identity.users.apiTokens.v1, body);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
async function updateTenantApiTokensData(body) {
|
|
537
|
+
return (0, _fetch.Post)(_constants.urls.identity.tenants.apiTokens.v2, body);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
async function deleteTenantApiToken({
|
|
541
|
+
tokenId
|
|
542
|
+
}) {
|
|
543
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.tenants.apiTokens.v1}/${tokenId}`);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
async function deleteUserApiToken({
|
|
547
|
+
tokenId
|
|
548
|
+
}) {
|
|
549
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.users.apiTokens.v1}/${tokenId}`);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
async function getUserById({
|
|
553
|
+
userId
|
|
554
|
+
}) {
|
|
555
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.users.v1}/${userId}`);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
async function checkIfAllowToRememberMfaDevice(mfaToken) {
|
|
559
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.configurations.v1}/mfa-policy/allow-remember-device`, {
|
|
560
|
+
mfaToken
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
async function passwordlessPreLogin(_ref) {
|
|
565
|
+
let {
|
|
566
|
+
type
|
|
567
|
+
} = _ref,
|
|
568
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
569
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/passwordless/${type.toLocaleLowerCase()}/prelogin`, body);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
async function passwordlessPostLogin(_ref2) {
|
|
573
|
+
let {
|
|
574
|
+
type
|
|
575
|
+
} = _ref2,
|
|
576
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded2);
|
|
577
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/passwordless/${type.toLocaleLowerCase()}/postlogin`, body);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
async function verifyInviteToken({
|
|
581
|
+
token
|
|
582
|
+
}) {
|
|
583
|
+
return (0, _fetch.Post)(_constants.urls.identity.tenants.invites.verify.v1, {
|
|
584
|
+
token
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
async function getSSOConfigurations() {
|
|
589
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v1}/configurations`);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
async function createSSOConfiguration(body) {
|
|
593
|
+
return (0, _fetch.Post)(`${_constants.urls.team.sso.v1}/configurations`, body);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
async function updateSSOConfiguration(ssoConfigId, body) {
|
|
597
|
+
return (0, _fetch.Patch)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}`, body);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
async function deleteSSOConfiguration(ssoConfigId) {
|
|
601
|
+
return (0, _fetch.Delete)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}`);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
async function createSSOConfigurationByMetadata(body) {
|
|
605
|
+
return (0, _fetch.Post)(`${_constants.urls.team.sso.v1}/configurations/metadata`, body);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
async function updateSSOConfigurationByMetadata(ssoConfigId, body) {
|
|
609
|
+
return (0, _fetch.Put)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/metadata`, body);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
async function createSSODomain(ssoConfigId, body) {
|
|
613
|
+
return (0, _fetch.Post)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/domains`, body);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
async function deleteSSODomain(ssoConfigId, domainId) {
|
|
617
|
+
return (0, _fetch.Delete)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}`);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
async function validateSSODomain(ssoConfigId, domainId) {
|
|
621
|
+
return (0, _fetch.Put)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
async function getSSODefaultRoles(ssoConfigId) {
|
|
625
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/roles`);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
async function setSSODefaultRoles(ssoConfigId, body) {
|
|
629
|
+
return (0, _fetch.Put)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/roles`, body);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
async function createSSOGroup(ssoConfigId, body) {
|
|
633
|
+
return (0, _fetch.Post)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/groups`, body);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
async function updateSSOGroup(ssoConfigId, {
|
|
637
|
+
roleIds,
|
|
638
|
+
group,
|
|
639
|
+
id
|
|
640
|
+
}) {
|
|
641
|
+
return (0, _fetch.Patch)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/groups/${id}`, {
|
|
642
|
+
group,
|
|
643
|
+
roleIds
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
async function deleteSSOGroup(ssoConfigId, groupId) {
|
|
648
|
+
return (0, _fetch.Delete)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/groups/${groupId}`);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
async function getSSOGroups(ssoConfigId) {
|
|
652
|
+
return (0, _fetch.Get)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/groups`);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
async function preLoginV2(body) {
|
|
656
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v2}/user/sso/prelogin`, body);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
async function oidcPostLoginV2(body) {
|
|
660
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v2}/user/oidc/postlogin`, body);
|
|
661
|
+
return generateLoginResponse(data);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
async function exchangeOAuthTokens(body) {
|
|
665
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.oauth.v1}/token`, body);
|
|
666
|
+
return generateLoginResponseFromOAuthResponse(data);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
async function resetPhoneNumber(body) {
|
|
670
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/phone/reset`, body);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
async function verifyResetPhoneNumber(body) {
|
|
674
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/phone/reset/verify`, body);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
async function changePhoneNumberWithVerification(body) {
|
|
678
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/phone`, body);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
async function verifyChangePhoneNumber(body) {
|
|
682
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/phone/verify`, body);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
async function changePhoneNumber(body) {
|
|
686
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.users.v1}/phone/change`, body);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
async function webAuthnPreLogin(body) {
|
|
690
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/webauthn/prelogin`, body);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
async function webAuthnPostLogin(body) {
|
|
694
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/webauthn/postlogin`, body);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
async function webAuthnCreateNewDeviceSession() {
|
|
698
|
+
return (0, _fetch.Post)(_constants.urls.identity.webAuthnDevices.v1);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
async function verifyNewDeviceSession(body) {
|
|
702
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.webAuthnDevices.v1}/verify`, body);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
async function getVendorPublicAuthStrategiesConfig() {
|
|
706
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.configurations.v1}/auth/strategies/public`);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
;
|