@frontegg/rest-api 2.10.89 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/ContextHolder.d.ts → ContextHolder.d.ts} +0 -0
- package/ContextHolder.js +78 -0
- package/{dist/account-settings → account-settings}/index.d.ts +0 -0
- package/account-settings/index.js +8 -0
- package/{dist/account-settings → account-settings}/interfaces.d.ts +0 -0
- package/account-settings/interfaces.js +1 -0
- package/account-settings/package.json +6 -0
- package/{dist/audits → audits}/index.d.ts +0 -0
- package/audits/index.js +21 -0
- package/{dist/audits → audits}/interfaces.d.ts +0 -0
- package/audits/interfaces.js +1 -0
- package/audits/package.json +6 -0
- package/{dist/auth → auth}/enums.d.ts +0 -0
- package/auth/enums.js +18 -0
- package/{dist/es2015/auth → auth}/index.d.ts +1 -1
- 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 +197 -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 +24 -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 +79 -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 -209
- package/README.md +0 -139
- package/SECURITY.md +0 -13
- package/dist/ContextHolder.js +0 -69
- package/dist/ContextHolder.js.map +0 -1
- package/dist/account-settings/index.js +0 -33
- package/dist/account-settings/index.js.map +0 -1
- package/dist/account-settings/interfaces.js +0 -3
- package/dist/account-settings/interfaces.js.map +0 -1
- package/dist/audits/index.js +0 -59
- package/dist/audits/index.js.map +0 -1
- package/dist/audits/interfaces.js +0 -3
- package/dist/audits/interfaces.js.map +0 -1
- package/dist/auth/enums.js +0 -19
- package/dist/auth/enums.js.map +0 -1
- package/dist/auth/index.d.ts +0 -447
- 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.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,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _stripe = require("./stripe");
|
|
8
|
+
|
|
9
|
+
Object.keys(_stripe).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _stripe[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _stripe[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createStripeCustomer = createStripeCustomer;
|
|
7
|
+
exports.createStripePaymentMethodSetupIntentSecret = createStripePaymentMethodSetupIntentSecret;
|
|
8
|
+
exports.createSubscription = createSubscription;
|
|
9
|
+
exports.getStripeCustomer = getStripeCustomer;
|
|
10
|
+
exports.getStripePaymentProviderConfiguration = getStripePaymentProviderConfiguration;
|
|
11
|
+
|
|
12
|
+
var _fetch = require("../../../fetch");
|
|
13
|
+
|
|
14
|
+
var _constants = require("../../../constants");
|
|
15
|
+
|
|
16
|
+
async function createSubscription(request) {
|
|
17
|
+
return (0, _fetch.Post)(_constants.urls.subscriptions.billing.paymentProviders.stripe.subscriptions.v1, request);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function getStripeCustomer(tenantId) {
|
|
21
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.paymentProviders.stripe.customers.v1}/${tenantId}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function createStripeCustomer(request) {
|
|
25
|
+
return (0, _fetch.Post)(`${_constants.urls.subscriptions.billing.paymentProviders.stripe.customers.v1}`, request);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function getStripePaymentProviderConfiguration() {
|
|
29
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.paymentProviders.stripe.publicConfigurations.v1}`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function createStripePaymentMethodSetupIntentSecret(request) {
|
|
33
|
+
return (0, _fetch.Post)(`${_constants.urls.subscriptions.billing.paymentProviders.stripe.setupIntents.v1}`, request);
|
|
34
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.cancelSubscription = cancelSubscription;
|
|
7
|
+
exports.getSubscription = getSubscription;
|
|
8
|
+
exports.getSubscriptions = getSubscriptions;
|
|
9
|
+
exports.renewSubscription = renewSubscription;
|
|
10
|
+
exports.updateSubscription = updateSubscription;
|
|
11
|
+
|
|
12
|
+
var _fetch = require("../fetch");
|
|
13
|
+
|
|
14
|
+
var _constants = require("../constants");
|
|
15
|
+
|
|
16
|
+
async function getSubscriptions() {
|
|
17
|
+
return (0, _fetch.Get)(_constants.urls.subscriptions.billing.subscriptions.v1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function getSubscription(subscriptionId) {
|
|
21
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function cancelSubscription(subscriptionId) {
|
|
25
|
+
return (0, _fetch.Put)(`${_constants.urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}/cancellations/`, {});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function renewSubscription(subscriptionId) {
|
|
29
|
+
return (0, _fetch.Put)(`${_constants.urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}/renewals/`, {});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function updateSubscription(subscriptionId, {
|
|
33
|
+
paymentMethodId,
|
|
34
|
+
planId
|
|
35
|
+
}) {
|
|
36
|
+
return (0, _fetch.Put)(`${_constants.urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}`, {
|
|
37
|
+
paymentMethodId,
|
|
38
|
+
planId
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSubscriptionSummaries = getSubscriptionSummaries;
|
|
7
|
+
|
|
8
|
+
var _fetch = require("../fetch");
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
async function getSubscriptionSummaries(tenantId) {
|
|
13
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.summaries.v1}/${tenantId}`);
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createTenantConfiguration = createTenantConfiguration;
|
|
7
|
+
exports.getTenantConfiguration = getTenantConfiguration;
|
|
8
|
+
|
|
9
|
+
var _fetch = require("../fetch");
|
|
10
|
+
|
|
11
|
+
var _constants = require("../constants");
|
|
12
|
+
|
|
13
|
+
async function getTenantConfiguration(tenantId) {
|
|
14
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.tenantConfiguration.v1}/${tenantId}`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function createTenantConfiguration(request) {
|
|
18
|
+
return (0, _fetch.Post)(`${_constants.urls.subscriptions.billing.tenantConfiguration.v1}`, request);
|
|
19
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.addUser = addUser;
|
|
9
|
+
exports.changePassword = changePassword;
|
|
10
|
+
exports.createInviteUserLink = createInviteUserLink;
|
|
11
|
+
exports.deleteInviteUserLink = deleteInviteUserLink;
|
|
12
|
+
exports.deleteUser = deleteUser;
|
|
13
|
+
exports.getInviteLinkConfiguration = getInviteLinkConfiguration;
|
|
14
|
+
exports.getInviteUserLink = getInviteUserLink;
|
|
15
|
+
exports.getProfile = getProfile;
|
|
16
|
+
exports.loadAvailablePermissions = loadAvailablePermissions;
|
|
17
|
+
exports.loadAvailableRoles = loadAvailableRoles;
|
|
18
|
+
exports.loadStats = loadStats;
|
|
19
|
+
exports.loadUsers = loadUsers;
|
|
20
|
+
exports.resendActivationLink = resendActivationLink;
|
|
21
|
+
exports.resendInvitationLink = resendInvitationLink;
|
|
22
|
+
exports.resendInvitationLinkToAllTenants = resendInvitationLinkToAllTenants;
|
|
23
|
+
exports.updateInviteUserLink = updateInviteUserLink;
|
|
24
|
+
exports.updateProfile = updateProfile;
|
|
25
|
+
exports.updateProfileImage = updateProfileImage;
|
|
26
|
+
exports.updateUser = updateUser;
|
|
27
|
+
|
|
28
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
29
|
+
|
|
30
|
+
var _fetch = require("../fetch");
|
|
31
|
+
|
|
32
|
+
var _constants = require("../constants");
|
|
33
|
+
|
|
34
|
+
async function getProfile(params) {
|
|
35
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.users.v2}/me`, params != null ? params : {
|
|
36
|
+
addRoles: true
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function updateProfile(body) {
|
|
41
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.users.v2}/me`, body);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function updateProfileImage(body) {
|
|
45
|
+
return (0, _fetch.Put)(`${_constants.urls.team.profile.v1}/me/image/v1`, body, {
|
|
46
|
+
responseType: 'plain',
|
|
47
|
+
contentType: undefined
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function changePassword(body) {
|
|
52
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/passwords/change`, body);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function loadUsers(params) {
|
|
56
|
+
var _params$sort, _params$sort$0$id, _params$sort2, _params$sort2$, _params$sort3, _params$sort3$;
|
|
57
|
+
|
|
58
|
+
const filters = (params.filter || []).reduce((p, n) => (0, _extends2.default)({}, p, {
|
|
59
|
+
[n.id]: n.value
|
|
60
|
+
}), {});
|
|
61
|
+
const sorts = (_params$sort = params.sort) != null && _params$sort.length ? {
|
|
62
|
+
sortBy: (_params$sort$0$id = (_params$sort2 = params.sort) == null ? void 0 : (_params$sort2$ = _params$sort2[0]) == null ? void 0 : _params$sort2$.id) != null ? _params$sort$0$id : 'name',
|
|
63
|
+
sortDirection: (_params$sort3 = params.sort) != null && (_params$sort3$ = _params$sort3[0]) != null && _params$sort3$.desc ? 'desc' : 'asc'
|
|
64
|
+
} : null;
|
|
65
|
+
return (0, _fetch.Get)(_constants.urls.team.members.v1, (0, _extends2.default)({
|
|
66
|
+
pageOffset: params.pageOffset,
|
|
67
|
+
pageSize: params.pageSize
|
|
68
|
+
}, filters, sorts));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function addUser(body) {
|
|
72
|
+
return (0, _fetch.Post)(_constants.urls.identity.users.v2, (0, _extends2.default)({}, body, {
|
|
73
|
+
provider: 'local'
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function deleteUser(body) {
|
|
78
|
+
return (0, _fetch.Delete)(`${_constants.urls.team.members.v1}/${body.userId}`);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async function updateUser(body) {
|
|
82
|
+
return (0, _fetch.Put)(_constants.urls.team.members.v1, body);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function createInviteUserLink(body) {
|
|
86
|
+
return (0, _fetch.Post)(_constants.urls.identity.tenants.invites.user.v1, (0, _extends2.default)({}, body));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function updateInviteUserLink(body) {
|
|
90
|
+
return (0, _fetch.Patch)(_constants.urls.identity.tenants.invites.user.v1, (0, _extends2.default)({}, body));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async function deleteInviteUserLink() {
|
|
94
|
+
return (0, _fetch.Delete)(_constants.urls.identity.tenants.invites.user.v1);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
async function getInviteUserLink() {
|
|
98
|
+
return (0, _fetch.Get)(_constants.urls.identity.tenants.invites.user.v1);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
async function getInviteLinkConfiguration() {
|
|
102
|
+
return (0, _fetch.Get)(_constants.urls.identity.tenants.invites.configuration.v1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async function loadAvailableRoles() {
|
|
106
|
+
return (0, _fetch.Get)(_constants.urls.team.roles.v1);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function loadAvailablePermissions() {
|
|
110
|
+
return (0, _fetch.Get)(_constants.urls.identity.permissions.v1);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async function loadStats() {
|
|
114
|
+
return (0, _fetch.Get)(`${_constants.urls.team.stats.v1}/members`);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async function resendActivationLink(body) {
|
|
118
|
+
return (0, _fetch.Post)(`${_constants.urls.team.members.v1}/${body.userId}/resendActivationEmail`, {});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
async function resendInvitationLink(body) {
|
|
122
|
+
return (0, _fetch.Post)(_constants.urls.identity.users.v2, (0, _extends2.default)({}, body, {
|
|
123
|
+
provider: 'local'
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
async function resendInvitationLinkToAllTenants(body) {
|
|
128
|
+
return (0, _fetch.Post)(_constants.urls.identity.users.invitation.resendAll.v1, (0, _extends2.default)({}, body));
|
|
129
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSubTenants = getSubTenants;
|
|
7
|
+
exports.getSubTenantsAsTree = getSubTenantsAsTree;
|
|
8
|
+
exports.getTenants = getTenants;
|
|
9
|
+
exports.switchTenant = switchTenant;
|
|
10
|
+
|
|
11
|
+
var _fetch = require("../fetch");
|
|
12
|
+
|
|
13
|
+
var _constants = require("../constants");
|
|
14
|
+
|
|
15
|
+
async function switchTenant(body) {
|
|
16
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.users.v1}/tenant`, body);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async function getTenants() {
|
|
20
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.users.v2}/me/tenants`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function getSubTenants() {
|
|
24
|
+
return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.v1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function getSubTenantsAsTree() {
|
|
28
|
+
return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.tree.v1);
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getVendorPublicInfo = getVendorPublicInfo;
|
|
7
|
+
|
|
8
|
+
var _fetch = require("../fetch");
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
async function getVendorPublicInfo() {
|
|
13
|
+
return (0, _fetch.Get)(`${_constants.urls.vendor}/public`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
;
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Get, Post, Put } from '../fetch';
|
|
2
|
+
import { urls } from '../constants';
|
|
3
|
+
export async function getNotifications(params) {
|
|
4
|
+
return Get(urls.notifications.v1, {
|
|
5
|
+
params
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export async function updateNotificationStatus(params) {
|
|
9
|
+
return Put(`${urls.notifications.v1}/status`, {
|
|
10
|
+
params
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export async function updateNotificationIsPinned(params) {
|
|
14
|
+
const {
|
|
15
|
+
notificationId,
|
|
16
|
+
pinStatus
|
|
17
|
+
} = params;
|
|
18
|
+
return Put(`${urls.notifications.v1}/${pinStatus}`, {
|
|
19
|
+
notificationId
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export async function markAllAsRead() {
|
|
23
|
+
return Post(`${urls.notifications.v1}/status/mark-all-read`);
|
|
24
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/rest-api",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"author": "Frontegg LTD",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"module": "dist/es2015/index.js",
|
|
9
|
-
"browser": "dist/umd/index.js",
|
|
3
|
+
"version": "3.0.2",
|
|
4
|
+
"main": "./node/index.js",
|
|
10
5
|
"license": "MIT",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"build:cjs": "tsc --module commonjs --target es2015 --outDir dist",
|
|
14
|
-
"build:es2015": "tsc --module es6 --target es2015 --outDir dist/es2015",
|
|
15
|
-
"build:umd": "rm -rf dist/umd && mkdir dist/umd && rollup -c ./rollup.config.js"
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@babel/runtime": "^7.17.2"
|
|
16
8
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"@rollup/plugin-commonjs": "^13.0.0",
|
|
23
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
24
|
-
"@rollup/plugin-node-resolve": "^8.0.1",
|
|
25
|
-
"conventional-changelog-cli": "^2.1.1",
|
|
26
|
-
"rollup": "^2.15.0",
|
|
27
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
28
|
-
"rollup-plugin-typescript2": "^0.27.2",
|
|
29
|
-
"standard-version": "^9.3.0",
|
|
30
|
-
"typescript": "^4.2.4"
|
|
31
|
-
},
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "https://github.com/frontegg/typescript-rest-api.git"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"private": false,
|
|
11
|
+
"module": "./index.js",
|
|
12
|
+
"types": "./index.d.ts"
|
|
13
|
+
}
|
|
File without changes
|
package/reports/index.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["dataFilters"],
|
|
4
|
+
_excluded2 = ["templateId", "dataFilters"],
|
|
5
|
+
_excluded3 = ["dataFilters"];
|
|
6
|
+
import { Get, Post } from '../fetch';
|
|
7
|
+
import { urls } from '../constants';
|
|
8
|
+
export async function getReports(body) {
|
|
9
|
+
return Get(`${urls.reports.service.v2}/tenant-reports`, body);
|
|
10
|
+
}
|
|
11
|
+
export async function getReport(body) {
|
|
12
|
+
return Get(`${urls.reports.service.v2}/${body.id}/tenant-reports`);
|
|
13
|
+
}
|
|
14
|
+
export async function renderReport(_ref) {
|
|
15
|
+
let {
|
|
16
|
+
dataFilters
|
|
17
|
+
} = _ref,
|
|
18
|
+
body = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
|
+
|
|
20
|
+
const html = await Get(`${urls.reports.trigger.v1}/preview-report`, _extends({}, body, {
|
|
21
|
+
dataFilters: btoa(JSON.stringify(dataFilters || {})),
|
|
22
|
+
responseType: 'html'
|
|
23
|
+
}), {
|
|
24
|
+
responseType: 'plain'
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
html
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export async function scheduleReport(_ref2) {
|
|
31
|
+
let {
|
|
32
|
+
templateId,
|
|
33
|
+
dataFilters
|
|
34
|
+
} = _ref2,
|
|
35
|
+
body = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
36
|
+
|
|
37
|
+
return Post(`${urls.reports.service.v2}/${templateId}/tenant-reports`, _extends({}, body, {
|
|
38
|
+
dataFilters: btoa(JSON.stringify(dataFilters || {}))
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
export async function downloadReport(_ref3) {
|
|
42
|
+
let {
|
|
43
|
+
dataFilters
|
|
44
|
+
} = _ref3,
|
|
45
|
+
body = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
46
|
+
|
|
47
|
+
const blob = await Get(`${urls.reports.trigger.v1}/preview-report`, _extends({}, body, {
|
|
48
|
+
dataFilters: btoa(JSON.stringify(dataFilters || {}))
|
|
49
|
+
}), {
|
|
50
|
+
responseType: 'blob'
|
|
51
|
+
});
|
|
52
|
+
let contentType = 'text/html';
|
|
53
|
+
let contentExt = 'html';
|
|
54
|
+
|
|
55
|
+
if (body.responseType === 'pdf') {
|
|
56
|
+
contentType = 'application/pdf';
|
|
57
|
+
contentExt = 'pdf';
|
|
58
|
+
} else if (body.responseType === 'image') {
|
|
59
|
+
contentType = 'image/jpeg';
|
|
60
|
+
contentExt = 'jpg';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const newBlob = new Blob([blob], {
|
|
64
|
+
type: contentType
|
|
65
|
+
});
|
|
66
|
+
const fileURL = URL.createObjectURL(newBlob);
|
|
67
|
+
const tempLink = document.createElement('a');
|
|
68
|
+
tempLink.href = fileURL;
|
|
69
|
+
tempLink.setAttribute('download', `report_${body.name || ''}.${contentExt}`);
|
|
70
|
+
tempLink.click();
|
|
71
|
+
setTimeout(tempLink.remove.bind(tempLink));
|
|
72
|
+
}
|
|
73
|
+
export async function sendReport(body) {
|
|
74
|
+
return Post(`${urls.reports.trigger.v1}/tenant-reports`, body);
|
|
75
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
package/roles/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
const _excluded = ["roleId"],
|
|
3
|
+
_excluded2 = ["roleId"],
|
|
4
|
+
_excluded3 = ["permissionId"];
|
|
5
|
+
import { Delete, Get, Patch, Post, Put } from '../fetch';
|
|
6
|
+
import { urls } from '../constants';
|
|
7
|
+
export async function getRoles() {
|
|
8
|
+
return Get(urls.identity.roles.v1);
|
|
9
|
+
}
|
|
10
|
+
export async function addRole(body) {
|
|
11
|
+
return Post(urls.identity.roles.v1, body);
|
|
12
|
+
}
|
|
13
|
+
export async function deleteRole({
|
|
14
|
+
roleId
|
|
15
|
+
}) {
|
|
16
|
+
return Delete(`${urls.identity.roles.v1}/${roleId}`);
|
|
17
|
+
}
|
|
18
|
+
export async function updateRole(_ref) {
|
|
19
|
+
let {
|
|
20
|
+
roleId
|
|
21
|
+
} = _ref,
|
|
22
|
+
body = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
23
|
+
|
|
24
|
+
return Patch(`${urls.identity.roles.v1}/${roleId}`, body);
|
|
25
|
+
}
|
|
26
|
+
export async function attachPermissionsToRole(_ref2) {
|
|
27
|
+
let {
|
|
28
|
+
roleId
|
|
29
|
+
} = _ref2,
|
|
30
|
+
body = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
31
|
+
|
|
32
|
+
return Put(`${urls.identity.roles.v1}/${roleId}/permissions`, body);
|
|
33
|
+
}
|
|
34
|
+
export async function getPermissions() {
|
|
35
|
+
return Get(urls.identity.permissions.v1);
|
|
36
|
+
}
|
|
37
|
+
export async function attachPermissionToRoles(_ref3) {
|
|
38
|
+
let {
|
|
39
|
+
permissionId
|
|
40
|
+
} = _ref3,
|
|
41
|
+
body = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
42
|
+
|
|
43
|
+
return Put(`${urls.identity.permissions.v1}/${permissionId}/roles`, body);
|
|
44
|
+
}
|
|
45
|
+
export async function getPermissionCategories() {
|
|
46
|
+
return Get(`${urls.identity.permissions.v1}/categories`);
|
|
47
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
package/routers.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { urls } from './constants';
|
|
2
|
+
export const fronteggAuthApiRoutes = [`${urls.identity.auth.v1}/logout`, `${urls.identity.auth.v1}/user/saml/postlogin`, `${urls.identity.auth.v2}/user/oidc/postlogin`, `${urls.identity.auth.v1}/user`, `${urls.identity.auth.v1}/user/mfa/verify`, `${urls.identity.auth.v1}/user/token/refresh`, `${urls.identity.users.v1}`, `${urls.identity.auth.v1}/passwordless/magiclink/postlogin`, `${urls.identity.auth.v1}/passwordless/code/postlogin`, `${urls.identity.auth.v1}/passwordless/smscode/postlogin`, `${urls.identity.users.v1}/activate`, `${urls.identity.users.v1}/invitation/accept`];
|
|
3
|
+
export const fronteggRefreshTokenUrl = `${urls.identity.auth.v1}/user/token/refresh`;
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Delete, Get, Patch, Post } from "../fetch";
|
|
2
|
+
import { urls } from "../constants";
|
|
3
|
+
export async function loadAllUsers(params) {
|
|
4
|
+
return Get(urls.identity.subTenants.v1, params);
|
|
5
|
+
}
|
|
6
|
+
export async function addUserToTenantAndSubTenants(body) {
|
|
7
|
+
return Post(urls.identity.subTenants.v1, body);
|
|
8
|
+
}
|
|
9
|
+
export async function removeUserFromTenantAndSubTenants(body) {
|
|
10
|
+
return Delete(urls.identity.subTenants.v1, body);
|
|
11
|
+
}
|
|
12
|
+
export async function addUserRolesForSubTenants(userId, body) {
|
|
13
|
+
return Post(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
14
|
+
}
|
|
15
|
+
export async function removeUserRolesFromSubTenants(userId, body) {
|
|
16
|
+
return Delete(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
17
|
+
}
|
|
18
|
+
export async function setUserRolesForSubTenants(userId, body) {
|
|
19
|
+
return Patch(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
20
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export let ISubscriptionStatus;
|
|
2
|
+
|
|
3
|
+
(function (ISubscriptionStatus) {
|
|
4
|
+
ISubscriptionStatus["ACTIVE"] = "active";
|
|
5
|
+
ISubscriptionStatus["CANCELED"] = "canceled";
|
|
6
|
+
ISubscriptionStatus["INCOMPLETE"] = "incomplete";
|
|
7
|
+
ISubscriptionStatus["EXPIRED"] = "expired";
|
|
8
|
+
ISubscriptionStatus["TRIALING"] = "trialing";
|
|
9
|
+
ISubscriptionStatus["TRIAL_ENDED"] = "trialEnded";
|
|
10
|
+
})(ISubscriptionStatus || (ISubscriptionStatus = {}));
|
|
11
|
+
|
|
12
|
+
export let PaymentMethodType;
|
|
13
|
+
|
|
14
|
+
(function (PaymentMethodType) {
|
|
15
|
+
PaymentMethodType["UNKNWON"] = "unknown";
|
|
16
|
+
PaymentMethodType["CARD"] = "card";
|
|
17
|
+
})(PaymentMethodType || (PaymentMethodType = {}));
|
|
18
|
+
|
|
19
|
+
export let ISubscriptionCancellationPolicy;
|
|
20
|
+
|
|
21
|
+
(function (ISubscriptionCancellationPolicy) {
|
|
22
|
+
ISubscriptionCancellationPolicy["AT_PERIOD_END"] = "atPeriodEnd";
|
|
23
|
+
})(ISubscriptionCancellationPolicy || (ISubscriptionCancellationPolicy = {}));
|
|
24
|
+
|
|
25
|
+
export let ProviderType;
|
|
26
|
+
|
|
27
|
+
(function (ProviderType) {
|
|
28
|
+
ProviderType["Stripe"] = "Stripe";
|
|
29
|
+
})(ProviderType || (ProviderType = {}));
|
|
File without changes
|