@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,120 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
const _excluded = ["eventKey"],
|
|
3
|
+
_excluded2 = ["eventKey"];
|
|
4
|
+
import { urls } from '../constants';
|
|
5
|
+
import { Get, Patch, Post, Delete, Put } from '../fetch';
|
|
6
|
+
export const getSlackConfiguration = () => {
|
|
7
|
+
return Get(`${urls.integrations.configurations.v1}/slack`);
|
|
8
|
+
};
|
|
9
|
+
export const getSlackScope = () => {
|
|
10
|
+
return Get(`${urls.integrations.configurations.v1}/slack/applications`);
|
|
11
|
+
};
|
|
12
|
+
export const getSlackChannels = () => {
|
|
13
|
+
return Get(`${urls.integrations.configurations.v1}/slack/channels`);
|
|
14
|
+
};
|
|
15
|
+
export const postSlackConfiguration = data => {
|
|
16
|
+
if (data.id) {
|
|
17
|
+
return Patch(`${urls.integrations.configurations.v1}/slack/subscription/${data.id}`, data);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return Post(`${urls.integrations.configurations.v1}/slack/subscriptions`, data);
|
|
21
|
+
};
|
|
22
|
+
export const deleteSlackConfiguration = data => {
|
|
23
|
+
return Delete(`${urls.integrations.configurations.v1}/slack/subscriptions/${data.id}`);
|
|
24
|
+
};
|
|
25
|
+
export const postSlackCode = code => {
|
|
26
|
+
return Post(`${urls.integrations.configurations.v1}/slack/applications/registrations`, {
|
|
27
|
+
code
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export const getEmailConfiguration = () => {
|
|
31
|
+
return Get(`${urls.integrations.configurations.v1}/emails`);
|
|
32
|
+
};
|
|
33
|
+
export const postEmailConfiguration = _ref => {
|
|
34
|
+
let {
|
|
35
|
+
eventKey
|
|
36
|
+
} = _ref,
|
|
37
|
+
data = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
38
|
+
|
|
39
|
+
return Post(`${urls.integrations.configurations.v1}/emails/${eventKey}`, data);
|
|
40
|
+
};
|
|
41
|
+
export const patchEmailConfiguration = ({
|
|
42
|
+
eventKey,
|
|
43
|
+
enabled
|
|
44
|
+
}) => {
|
|
45
|
+
return Patch(`${urls.integrations.configurations.v1}/emails/${eventKey}`, {
|
|
46
|
+
enabled
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
export const deleteEmailSubscriptions = (eventKey, subscriptionId) => {
|
|
50
|
+
return Delete(`${urls.integrations.configurations.v1}/emails/${eventKey}/subscriptions/${subscriptionId}`);
|
|
51
|
+
};
|
|
52
|
+
export const putEmailSubscriptions = (subscriptionId, eventKey, data) => {
|
|
53
|
+
return Put(`${urls.integrations.configurations.v1}/emails/${eventKey}/subscriptions/${subscriptionId}`, data);
|
|
54
|
+
};
|
|
55
|
+
export const deleteEmailConfiguration = eventKey => {
|
|
56
|
+
return Delete(`${urls.integrations.configurations.v1}/emails/${eventKey}`);
|
|
57
|
+
};
|
|
58
|
+
export const getSMSConfiguration = () => {
|
|
59
|
+
return Get(`${urls.integrations.configurations.v2}/sms`);
|
|
60
|
+
};
|
|
61
|
+
export const postSMSConfiguration = _ref2 => {
|
|
62
|
+
let {
|
|
63
|
+
eventKey
|
|
64
|
+
} = _ref2,
|
|
65
|
+
data = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
66
|
+
|
|
67
|
+
return Post(`${urls.integrations.configurations.v2}/sms/${eventKey}`, data);
|
|
68
|
+
};
|
|
69
|
+
export const patchSMSConfiguration = ({
|
|
70
|
+
eventKey,
|
|
71
|
+
enabled
|
|
72
|
+
}) => {
|
|
73
|
+
return Patch(`${urls.integrations.configurations.v2}/sms/${eventKey}`, {
|
|
74
|
+
enabled
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
export const deleteSMSSubscriptions = (eventKey, subscriptionId) => {
|
|
78
|
+
return Delete(`${urls.integrations.configurations.v2}/sms/${eventKey}/subscriptions/${subscriptionId}`);
|
|
79
|
+
};
|
|
80
|
+
export const putSMSSubscriptions = (subscriptionId, eventKey, data) => {
|
|
81
|
+
return Put(`${urls.integrations.configurations.v2}/sms/${eventKey}/subscriptions/${subscriptionId}`, data);
|
|
82
|
+
};
|
|
83
|
+
export const deleteSMSConfiguration = eventKey => {
|
|
84
|
+
return Delete(`${urls.integrations.configurations.v2}/sms/${eventKey}`);
|
|
85
|
+
};
|
|
86
|
+
export const getWebhooksConfigurations = () => {
|
|
87
|
+
return Get(urls.webhooks.v1);
|
|
88
|
+
};
|
|
89
|
+
export const postWebhooksConfiguration = data => {
|
|
90
|
+
if (data._id) {
|
|
91
|
+
return Patch(`${urls.webhooks.v1}/${data._id}`, data);
|
|
92
|
+
} else {
|
|
93
|
+
return Post(`${urls.webhooks.v1}/custom`, data);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
export const deleteWebhooksConfiguration = id => {
|
|
97
|
+
return Delete(`${urls.webhooks.v1}/${id}`);
|
|
98
|
+
};
|
|
99
|
+
export const getWebhookLog = (id, offset = 0, limit = 10) => {
|
|
100
|
+
const query = new URLSearchParams({
|
|
101
|
+
id,
|
|
102
|
+
offset: `${offset}`,
|
|
103
|
+
limit: `${limit}`
|
|
104
|
+
});
|
|
105
|
+
return Get(`${urls.webhooks.v1}/logs/?${query.toString()}`);
|
|
106
|
+
};
|
|
107
|
+
export const postWebhookTest = data => {
|
|
108
|
+
return Post(`${urls.webhooks.v1}/test`, data);
|
|
109
|
+
};
|
|
110
|
+
export const postWebhookRetry = id => {
|
|
111
|
+
return Post(`${urls.webhooks.v1}/logs/${id}/retries`);
|
|
112
|
+
};
|
|
113
|
+
export const getCategories = () => {
|
|
114
|
+
return Get(`${urls.events.configurations.v1}/categories`);
|
|
115
|
+
};
|
|
116
|
+
export const getChannelMaps = channels => {
|
|
117
|
+
return Get(urls.events.configurations.v1, {
|
|
118
|
+
channels
|
|
119
|
+
});
|
|
120
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -2,7 +2,7 @@ export const urls = {
|
|
|
2
2
|
vendor: '/vendors',
|
|
3
3
|
identity: {
|
|
4
4
|
webAuthnDevices: {
|
|
5
|
-
v1: '/identity/resources/users/webauthn/v1/devices'
|
|
5
|
+
v1: '/identity/resources/users/webauthn/v1/devices'
|
|
6
6
|
},
|
|
7
7
|
auth: {
|
|
8
8
|
v1: '/identity/resources/auth/v1',
|
|
@@ -12,19 +12,19 @@ export const urls = {
|
|
|
12
12
|
v1: '/identity/resources/users/v1',
|
|
13
13
|
v2: '/identity/resources/users/v2',
|
|
14
14
|
apiTokens: {
|
|
15
|
-
v1: '/identity/resources/users/api-tokens/v1'
|
|
15
|
+
v1: '/identity/resources/users/api-tokens/v1'
|
|
16
16
|
},
|
|
17
17
|
sessions: {
|
|
18
|
-
currentUser: {
|
|
19
|
-
v1: '/identity/resources/users/sessions/v1/me'
|
|
18
|
+
currentUser: {
|
|
19
|
+
v1: '/identity/resources/users/sessions/v1/me'
|
|
20
20
|
},
|
|
21
|
-
configurations: {
|
|
21
|
+
configurations: {
|
|
22
22
|
v1: '/identity/resources/configurations/sessions/v1'
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
invitation: {
|
|
26
26
|
resendAll: {
|
|
27
|
-
v1: '/identity/resources/users/v1/invitation/reset/all'
|
|
27
|
+
v1: '/identity/resources/users/v1/invitation/reset/all'
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
},
|
|
@@ -65,7 +65,7 @@ export const urls = {
|
|
|
65
65
|
team: {
|
|
66
66
|
sso: {
|
|
67
67
|
v1: '/team/resources/sso/v1',
|
|
68
|
-
v2: '/team/resources/sso/v2'
|
|
68
|
+
v2: '/team/resources/sso/v2'
|
|
69
69
|
},
|
|
70
70
|
members: {
|
|
71
71
|
v1: '/team/resources/members/v1'
|
|
@@ -77,7 +77,7 @@ export const urls = {
|
|
|
77
77
|
v1: '/team/resources/stats/v1'
|
|
78
78
|
},
|
|
79
79
|
profile: {
|
|
80
|
-
v1: '/team/resources/profile'
|
|
80
|
+
v1: '/team/resources/profile'
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
tenants: {
|
|
@@ -94,7 +94,7 @@ export const urls = {
|
|
|
94
94
|
integrations: {
|
|
95
95
|
configurations: {
|
|
96
96
|
v1: '/integrations/resources/configurations/v1',
|
|
97
|
-
v2: '/integrations/resources/configurations/v2'
|
|
97
|
+
v2: '/integrations/resources/configurations/v2'
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
subscriptions: {
|
|
@@ -154,7 +154,7 @@ export const urls = {
|
|
|
154
154
|
v1: '/notification'
|
|
155
155
|
},
|
|
156
156
|
audits: {
|
|
157
|
-
v1: '/audits'
|
|
157
|
+
v1: '/audits'
|
|
158
158
|
},
|
|
159
159
|
events: {
|
|
160
160
|
configurations: {
|
|
@@ -166,5 +166,5 @@ export const urls = {
|
|
|
166
166
|
},
|
|
167
167
|
oauth: {
|
|
168
168
|
v1: '/oauth'
|
|
169
|
-
}
|
|
170
|
-
}
|
|
169
|
+
}
|
|
170
|
+
};
|
|
File without changes
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
1
|
export class FronteggApiError extends Error {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
constructor(message: string, statusCode: number) {
|
|
2
|
+
constructor(message, statusCode) {
|
|
6
3
|
super(message);
|
|
4
|
+
this._statusCode = void 0;
|
|
7
5
|
this._statusCode = statusCode;
|
|
8
6
|
}
|
|
9
7
|
|
|
10
|
-
get statusCode()
|
|
8
|
+
get statusCode() {
|
|
11
9
|
return this._statusCode;
|
|
12
10
|
}
|
|
11
|
+
|
|
13
12
|
}
|
package/fetch.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ContextOptions } from './interfaces';
|
|
2
|
+
interface RequestOptions {
|
|
3
|
+
url: string;
|
|
4
|
+
method: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
|
|
5
|
+
body?: any;
|
|
6
|
+
params?: any;
|
|
7
|
+
contentType?: string;
|
|
8
|
+
responseType?: 'json' | 'plain' | 'blob';
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
credentials?: RequestCredentials;
|
|
11
|
+
}
|
|
12
|
+
export declare function getBaseUrl(context: ContextOptions, url: string): string;
|
|
13
|
+
export declare const Get: (url: string, params?: any, opts?: Pick<RequestOptions, "body" | "params" | "contentType" | "responseType" | "headers" | "credentials"> | undefined) => Promise<any>;
|
|
14
|
+
export declare const Post: (url: string, body?: any, opts?: Pick<RequestOptions, "body" | "params" | "contentType" | "responseType" | "headers" | "credentials"> | undefined) => Promise<any>;
|
|
15
|
+
export declare const Patch: (url: string, body?: any, opts?: Pick<RequestOptions, "body" | "params" | "contentType" | "responseType" | "headers" | "credentials"> | undefined) => Promise<any>;
|
|
16
|
+
export declare const Put: (url: string, body?: any, opts?: Pick<RequestOptions, "body" | "params" | "contentType" | "responseType" | "headers" | "credentials"> | undefined) => Promise<any>;
|
|
17
|
+
export declare const Delete: (url: string, body?: any, opts?: Pick<RequestOptions, "body" | "params" | "contentType" | "responseType" | "headers" | "credentials"> | undefined) => Promise<any>;
|
|
18
|
+
export declare const PostDownload: (url: string, body?: any, params?: any, opts?: any) => Promise<any>;
|
|
19
|
+
export {};
|
package/fetch.js
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { ContextHolder } from './ContextHolder';
|
|
3
|
+
import { FronteggApiError } from './error';
|
|
4
|
+
export function getBaseUrl(context, url) {
|
|
5
|
+
let baseUrl;
|
|
6
|
+
|
|
7
|
+
if (typeof context.baseUrl === 'function') {
|
|
8
|
+
baseUrl = context.baseUrl(url);
|
|
9
|
+
} else {
|
|
10
|
+
baseUrl = context.baseUrl;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const prefix = context.urlPrefix || 'frontegg';
|
|
14
|
+
|
|
15
|
+
if (!baseUrl.endsWith('/')) {
|
|
16
|
+
baseUrl += '/';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (!baseUrl.endsWith(prefix)) {
|
|
20
|
+
baseUrl += prefix;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return baseUrl;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async function prepareUrl(context, url, params) {
|
|
27
|
+
const baseUrl = getBaseUrl(context, url);
|
|
28
|
+
const paramsToSend = await buildQueryParams(context, params);
|
|
29
|
+
let finalUrl = url.startsWith('http') ? url : `${baseUrl}${url}`;
|
|
30
|
+
const hasKeys = Object.keys(paramsToSend).length > 0;
|
|
31
|
+
|
|
32
|
+
if (paramsToSend && hasKeys) {
|
|
33
|
+
const urlParams = new URLSearchParams(paramsToSend);
|
|
34
|
+
finalUrl += `?${urlParams}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return finalUrl;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function buildRequestHeaders(context, contentType) {
|
|
41
|
+
var _context$tokenResolve;
|
|
42
|
+
|
|
43
|
+
const authToken = await ((_context$tokenResolve = context == null ? void 0 : context.tokenResolver) != null ? _context$tokenResolve : ContextHolder.getAccessToken)();
|
|
44
|
+
const headers = {};
|
|
45
|
+
|
|
46
|
+
if (authToken) {
|
|
47
|
+
headers.Authorization = `Bearer ${authToken}`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (contentType) {
|
|
51
|
+
headers['Content-Type'] = contentType;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
for (const additionalHeader of await getAdditionalHeaders(context)) {
|
|
55
|
+
headers[`${additionalHeader.key}`] = `${additionalHeader.value}`;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
headers['x-frontegg-source'] = 'frontegg-react';
|
|
59
|
+
return headers;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function buildQueryParams(context, params) {
|
|
63
|
+
if (!params) {
|
|
64
|
+
params = {};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const additionalQueryParams = await getAdditionalQueryParams(context);
|
|
68
|
+
|
|
69
|
+
for (const queryParam of additionalQueryParams) {
|
|
70
|
+
params[queryParam.key] = queryParam.value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const keys = Object.keys(params);
|
|
74
|
+
|
|
75
|
+
for (const key of keys) {
|
|
76
|
+
const value = params[key];
|
|
77
|
+
params[key] = typeof value === 'object' ? JSON.stringify(value) : value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return params;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async function getAdditionalQueryParams(context) {
|
|
84
|
+
let output = [];
|
|
85
|
+
|
|
86
|
+
if (context.additionalQueryParamsResolver) {
|
|
87
|
+
output = await context.additionalQueryParamsResolver();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return output;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async function getAdditionalHeaders(context) {
|
|
94
|
+
let output = [];
|
|
95
|
+
|
|
96
|
+
if (context.additionalHeadersResolver) {
|
|
97
|
+
output = await context.additionalHeadersResolver();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return output;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const sendRequest = async opts => {
|
|
104
|
+
var _opts$method, _ref, _opts$credentials;
|
|
105
|
+
|
|
106
|
+
const context = ContextHolder.getContext();
|
|
107
|
+
const headers = await buildRequestHeaders(context, opts.contentType);
|
|
108
|
+
const url = await prepareUrl(context, opts.url, opts.params);
|
|
109
|
+
const response = await fetch(url, {
|
|
110
|
+
body: opts.body ? opts.contentType === 'application/json' ? JSON.stringify(opts.body) : opts.body : null,
|
|
111
|
+
method: (_opts$method = opts.method) != null ? _opts$method : 'GET',
|
|
112
|
+
headers: _extends({}, headers, opts.headers),
|
|
113
|
+
credentials: (_ref = (_opts$credentials = opts.credentials) != null ? _opts$credentials : context.requestCredentials) != null ? _ref : 'same-origin'
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
if (response.status === 302) {
|
|
117
|
+
window.location.href = await response.text();
|
|
118
|
+
return new Promise(() => {});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (!response.ok) {
|
|
122
|
+
var _context$logLevel, _context$logLevel2;
|
|
123
|
+
|
|
124
|
+
if (response.status === 413) {
|
|
125
|
+
throw new FronteggApiError('Error request is too large', response.status);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
let errorMessage;
|
|
129
|
+
|
|
130
|
+
try {
|
|
131
|
+
errorMessage = await response.text();
|
|
132
|
+
errorMessage = JSON.parse(errorMessage);
|
|
133
|
+
} catch (e) {}
|
|
134
|
+
|
|
135
|
+
if (errorMessage.errors) {
|
|
136
|
+
errorMessage = errorMessage.errors.join(', ');
|
|
137
|
+
} else if (typeof errorMessage !== 'string') {
|
|
138
|
+
errorMessage = `Error ${response.status} - ${response.statusText}`;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (response.status >= 400 && response.status < 500 && ['warn'].includes((_context$logLevel = context.logLevel) != null ? _context$logLevel : '')) console.warn(errorMessage);else if (response.status === 500 && ['warn', 'error'].includes((_context$logLevel2 = context.logLevel) != null ? _context$logLevel2 : '')) console.error(errorMessage);
|
|
142
|
+
throw new FronteggApiError(errorMessage, response.status);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (!opts.responseType || opts.responseType === 'json') {
|
|
146
|
+
try {
|
|
147
|
+
return await response.json();
|
|
148
|
+
} catch (e) {
|
|
149
|
+
return {};
|
|
150
|
+
}
|
|
151
|
+
} else if (opts.responseType === 'blob') {
|
|
152
|
+
const {
|
|
153
|
+
outputFileName
|
|
154
|
+
} = opts.params;
|
|
155
|
+
return await response.blob().then(blob => URL.createObjectURL(blob)).then(url => {
|
|
156
|
+
const tempLink = document.createElement('a');
|
|
157
|
+
tempLink.href = url;
|
|
158
|
+
tempLink.setAttribute('download', outputFileName || 'output');
|
|
159
|
+
tempLink.click();
|
|
160
|
+
});
|
|
161
|
+
} else {
|
|
162
|
+
return await response.text();
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export const Get = async (url, params, opts) => sendRequest(_extends({
|
|
167
|
+
url,
|
|
168
|
+
method: 'GET',
|
|
169
|
+
contentType: 'application/json',
|
|
170
|
+
params
|
|
171
|
+
}, opts));
|
|
172
|
+
export const Post = async (url, body, opts) => sendRequest(_extends({
|
|
173
|
+
url,
|
|
174
|
+
method: 'POST',
|
|
175
|
+
contentType: 'application/json',
|
|
176
|
+
body
|
|
177
|
+
}, opts));
|
|
178
|
+
export const Patch = async (url, body, opts) => sendRequest(_extends({
|
|
179
|
+
url,
|
|
180
|
+
method: 'PATCH',
|
|
181
|
+
contentType: 'application/json',
|
|
182
|
+
body
|
|
183
|
+
}, opts));
|
|
184
|
+
export const Put = async (url, body, opts) => sendRequest(_extends({
|
|
185
|
+
url,
|
|
186
|
+
method: 'PUT',
|
|
187
|
+
contentType: 'application/json',
|
|
188
|
+
body
|
|
189
|
+
}, opts));
|
|
190
|
+
export const Delete = async (url, body, opts) => sendRequest(_extends({
|
|
191
|
+
url,
|
|
192
|
+
method: 'DELETE',
|
|
193
|
+
contentType: 'application/json',
|
|
194
|
+
body
|
|
195
|
+
}, opts));
|
|
196
|
+
export const PostDownload = async (url, body, params, opts) => sendRequest(_extends({
|
|
197
|
+
url,
|
|
198
|
+
method: 'POST',
|
|
199
|
+
contentType: 'application/json',
|
|
200
|
+
responseType: 'blob',
|
|
201
|
+
body,
|
|
202
|
+
params
|
|
203
|
+
}, opts));
|
|
File without changes
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/** @license Frontegg v3.0.3
|
|
2
|
+
*
|
|
3
|
+
* This source code is licensed under the MIT license found in the
|
|
4
|
+
* LICENSE file in the root directory of this source tree.
|
|
5
|
+
*/
|
|
1
6
|
import * as auth from './auth';
|
|
2
7
|
import * as teams from './teams';
|
|
3
8
|
import * as metadata from './metadata';
|
|
@@ -32,32 +37,31 @@ export * from './routers';
|
|
|
32
37
|
import { AuthStrategyEnum, SocialLoginProviders } from './auth';
|
|
33
38
|
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from './subscriptions';
|
|
34
39
|
const api = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
auth,
|
|
41
|
+
teams,
|
|
42
|
+
metadata,
|
|
43
|
+
reports,
|
|
44
|
+
connectivity,
|
|
45
|
+
notifications,
|
|
46
|
+
audits,
|
|
47
|
+
tenants,
|
|
48
|
+
accountSettings,
|
|
49
|
+
roles,
|
|
50
|
+
subscriptions,
|
|
51
|
+
vendor,
|
|
52
|
+
subTenants
|
|
48
53
|
};
|
|
49
|
-
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType
|
|
54
|
+
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType };
|
|
50
55
|
export default {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=index.js.map
|
|
56
|
+
fetch,
|
|
57
|
+
ContextHolder,
|
|
58
|
+
FronteggContext,
|
|
59
|
+
api,
|
|
60
|
+
FronteggApiError,
|
|
61
|
+
AuthStrategyEnum,
|
|
62
|
+
SocialLoginProviders,
|
|
63
|
+
ISubscriptionCancellationPolicy,
|
|
64
|
+
ISubscriptionStatus,
|
|
65
|
+
PaymentMethodType,
|
|
66
|
+
ProviderType
|
|
67
|
+
};
|
|
File without changes
|
package/interfaces.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
package/jwt.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
2
|
+
export class InvalidCharacterError extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function polyfill(input) {
|
|
10
|
+
const str = String(input).replace(/=+$/, '');
|
|
11
|
+
|
|
12
|
+
if (str.length % 4 === 1) {
|
|
13
|
+
throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let output = '';
|
|
17
|
+
|
|
18
|
+
for (let bc = 0, bs, buffer, idx = 0; buffer = str.charAt(idx++); ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0) {
|
|
19
|
+
buffer = chars.indexOf(buffer);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return output;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const atob = typeof window !== 'undefined' && window.atob && window.atob.bind(window) || polyfill;
|
|
26
|
+
|
|
27
|
+
function b64DecodeUnicode(str) {
|
|
28
|
+
return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {
|
|
29
|
+
let code = p.charCodeAt(0).toString(16).toUpperCase();
|
|
30
|
+
|
|
31
|
+
if (code.length < 2) {
|
|
32
|
+
code = '0' + code;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return '%' + code;
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const base64UrlDecode = str => {
|
|
40
|
+
let output = str.replace(/-/g, '+').replace(/_/g, '/');
|
|
41
|
+
|
|
42
|
+
switch (output.length % 4) {
|
|
43
|
+
case 0:
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case 2:
|
|
47
|
+
output += '==';
|
|
48
|
+
break;
|
|
49
|
+
|
|
50
|
+
case 3:
|
|
51
|
+
output += '=';
|
|
52
|
+
break;
|
|
53
|
+
|
|
54
|
+
default:
|
|
55
|
+
throw new Error('Illegal base64url string!');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
return b64DecodeUnicode(output);
|
|
60
|
+
} catch (err) {
|
|
61
|
+
return atob(output);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export class InvalidTokenError extends Error {
|
|
66
|
+
constructor(message) {
|
|
67
|
+
super(message);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
export const jwtDecode = (token, options = {}) => {
|
|
72
|
+
const pos = !!options.header ? 0 : 1;
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
return JSON.parse(base64UrlDecode(token.split('.')[pos]));
|
|
76
|
+
} catch (e) {
|
|
77
|
+
throw new InvalidTokenError('Invalid token specified: ' + e.message);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Get } from '../fetch';
|
|
2
|
+
|
|
3
|
+
async function getMetadata(body) {
|
|
4
|
+
var _data$rows, _data$rows2;
|
|
5
|
+
|
|
6
|
+
const data = await Get('/metadata', body);
|
|
7
|
+
if (data != null && (_data$rows = data.rows) != null && _data$rows[0]) return data == null ? void 0 : (_data$rows2 = data.rows) == null ? void 0 : _data$rows2[0];
|
|
8
|
+
throw new Error(`metadata not found: ${body.entityName}`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async function getIpMetadata(ip) {
|
|
12
|
+
const data = await Get(`/metadata/ip/${ip}`);
|
|
13
|
+
if (data) return data;
|
|
14
|
+
throw new Error(`ip metadata not found`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const getNotificationsMetadata = async () => getMetadata({
|
|
18
|
+
entityName: 'notifications'
|
|
19
|
+
});
|
|
20
|
+
export const getSamlMetadata = async () => getMetadata({
|
|
21
|
+
entityName: 'saml'
|
|
22
|
+
});
|
|
23
|
+
export const getAuditsMetadata = async () => getMetadata({
|
|
24
|
+
entityName: 'audits'
|
|
25
|
+
});
|
|
26
|
+
export const getIpAdressMetadata = async ip => getIpMetadata(ip);
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|