@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,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSamlMetadata = exports.getNotificationsMetadata = exports.getIpAdressMetadata = exports.getAuditsMetadata = void 0;
|
|
7
|
+
|
|
8
|
+
var _fetch = require("../fetch");
|
|
9
|
+
|
|
10
|
+
async function getMetadata(body) {
|
|
11
|
+
var _data$rows, _data$rows2;
|
|
12
|
+
|
|
13
|
+
const data = await (0, _fetch.Get)('/metadata', body);
|
|
14
|
+
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];
|
|
15
|
+
throw new Error(`metadata not found: ${body.entityName}`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async function getIpMetadata(ip) {
|
|
19
|
+
const data = await (0, _fetch.Get)(`/metadata/ip/${ip}`);
|
|
20
|
+
if (data) return data;
|
|
21
|
+
throw new Error(`ip metadata not found`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const getNotificationsMetadata = async () => getMetadata({
|
|
25
|
+
entityName: 'notifications'
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
exports.getNotificationsMetadata = getNotificationsMetadata;
|
|
29
|
+
|
|
30
|
+
const getSamlMetadata = async () => getMetadata({
|
|
31
|
+
entityName: 'saml'
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
exports.getSamlMetadata = getSamlMetadata;
|
|
35
|
+
|
|
36
|
+
const getAuditsMetadata = async () => getMetadata({
|
|
37
|
+
entityName: 'audits'
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
exports.getAuditsMetadata = getAuditsMetadata;
|
|
41
|
+
|
|
42
|
+
const getIpAdressMetadata = async ip => getIpMetadata(ip);
|
|
43
|
+
|
|
44
|
+
exports.getIpAdressMetadata = getIpAdressMetadata;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getNotifications = getNotifications;
|
|
7
|
+
exports.markAllAsRead = markAllAsRead;
|
|
8
|
+
exports.updateNotificationIsPinned = updateNotificationIsPinned;
|
|
9
|
+
exports.updateNotificationStatus = updateNotificationStatus;
|
|
10
|
+
|
|
11
|
+
var _fetch = require("../fetch");
|
|
12
|
+
|
|
13
|
+
var _constants = require("../constants");
|
|
14
|
+
|
|
15
|
+
async function getNotifications(params) {
|
|
16
|
+
return (0, _fetch.Get)(_constants.urls.notifications.v1, {
|
|
17
|
+
params
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function updateNotificationStatus(params) {
|
|
22
|
+
return (0, _fetch.Put)(`${_constants.urls.notifications.v1}/status`, {
|
|
23
|
+
params
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function updateNotificationIsPinned(params) {
|
|
28
|
+
const {
|
|
29
|
+
notificationId,
|
|
30
|
+
pinStatus
|
|
31
|
+
} = params;
|
|
32
|
+
return (0, _fetch.Put)(`${_constants.urls.notifications.v1}/${pinStatus}`, {
|
|
33
|
+
notificationId
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function markAllAsRead() {
|
|
38
|
+
return (0, _fetch.Post)(`${_constants.urls.notifications.v1}/status/mark-all-read`);
|
|
39
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.downloadReport = downloadReport;
|
|
9
|
+
exports.getReport = getReport;
|
|
10
|
+
exports.getReports = getReports;
|
|
11
|
+
exports.renderReport = renderReport;
|
|
12
|
+
exports.scheduleReport = scheduleReport;
|
|
13
|
+
exports.sendReport = sendReport;
|
|
14
|
+
|
|
15
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
16
|
+
|
|
17
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
18
|
+
|
|
19
|
+
var _fetch = require("../fetch");
|
|
20
|
+
|
|
21
|
+
var _constants = require("../constants");
|
|
22
|
+
|
|
23
|
+
const _excluded = ["dataFilters"],
|
|
24
|
+
_excluded2 = ["templateId", "dataFilters"],
|
|
25
|
+
_excluded3 = ["dataFilters"];
|
|
26
|
+
|
|
27
|
+
async function getReports(body) {
|
|
28
|
+
return (0, _fetch.Get)(`${_constants.urls.reports.service.v2}/tenant-reports`, body);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function getReport(body) {
|
|
32
|
+
return (0, _fetch.Get)(`${_constants.urls.reports.service.v2}/${body.id}/tenant-reports`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function renderReport(_ref) {
|
|
36
|
+
let {
|
|
37
|
+
dataFilters
|
|
38
|
+
} = _ref,
|
|
39
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
40
|
+
const html = await (0, _fetch.Get)(`${_constants.urls.reports.trigger.v1}/preview-report`, (0, _extends2.default)({}, body, {
|
|
41
|
+
dataFilters: btoa(JSON.stringify(dataFilters || {})),
|
|
42
|
+
responseType: 'html'
|
|
43
|
+
}), {
|
|
44
|
+
responseType: 'plain'
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
html
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function scheduleReport(_ref2) {
|
|
52
|
+
let {
|
|
53
|
+
templateId,
|
|
54
|
+
dataFilters
|
|
55
|
+
} = _ref2,
|
|
56
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded2);
|
|
57
|
+
return (0, _fetch.Post)(`${_constants.urls.reports.service.v2}/${templateId}/tenant-reports`, (0, _extends2.default)({}, body, {
|
|
58
|
+
dataFilters: btoa(JSON.stringify(dataFilters || {}))
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function downloadReport(_ref3) {
|
|
63
|
+
let {
|
|
64
|
+
dataFilters
|
|
65
|
+
} = _ref3,
|
|
66
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded3);
|
|
67
|
+
const blob = await (0, _fetch.Get)(`${_constants.urls.reports.trigger.v1}/preview-report`, (0, _extends2.default)({}, body, {
|
|
68
|
+
dataFilters: btoa(JSON.stringify(dataFilters || {}))
|
|
69
|
+
}), {
|
|
70
|
+
responseType: 'blob'
|
|
71
|
+
});
|
|
72
|
+
let contentType = 'text/html';
|
|
73
|
+
let contentExt = 'html';
|
|
74
|
+
|
|
75
|
+
if (body.responseType === 'pdf') {
|
|
76
|
+
contentType = 'application/pdf';
|
|
77
|
+
contentExt = 'pdf';
|
|
78
|
+
} else if (body.responseType === 'image') {
|
|
79
|
+
contentType = 'image/jpeg';
|
|
80
|
+
contentExt = 'jpg';
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const newBlob = new Blob([blob], {
|
|
84
|
+
type: contentType
|
|
85
|
+
});
|
|
86
|
+
const fileURL = URL.createObjectURL(newBlob);
|
|
87
|
+
const tempLink = document.createElement('a');
|
|
88
|
+
tempLink.href = fileURL;
|
|
89
|
+
tempLink.setAttribute('download', `report_${body.name || ''}.${contentExt}`);
|
|
90
|
+
tempLink.click();
|
|
91
|
+
setTimeout(tempLink.remove.bind(tempLink));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async function sendReport(body) {
|
|
95
|
+
return (0, _fetch.Post)(`${_constants.urls.reports.trigger.v1}/tenant-reports`, body);
|
|
96
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.addRole = addRole;
|
|
9
|
+
exports.attachPermissionToRoles = attachPermissionToRoles;
|
|
10
|
+
exports.attachPermissionsToRole = attachPermissionsToRole;
|
|
11
|
+
exports.deleteRole = deleteRole;
|
|
12
|
+
exports.getPermissionCategories = getPermissionCategories;
|
|
13
|
+
exports.getPermissions = getPermissions;
|
|
14
|
+
exports.getRoles = getRoles;
|
|
15
|
+
exports.updateRole = updateRole;
|
|
16
|
+
|
|
17
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
18
|
+
|
|
19
|
+
var _fetch = require("../fetch");
|
|
20
|
+
|
|
21
|
+
var _constants = require("../constants");
|
|
22
|
+
|
|
23
|
+
const _excluded = ["roleId"],
|
|
24
|
+
_excluded2 = ["roleId"],
|
|
25
|
+
_excluded3 = ["permissionId"];
|
|
26
|
+
|
|
27
|
+
async function getRoles() {
|
|
28
|
+
return (0, _fetch.Get)(_constants.urls.identity.roles.v1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function addRole(body) {
|
|
32
|
+
return (0, _fetch.Post)(_constants.urls.identity.roles.v1, body);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function deleteRole({
|
|
36
|
+
roleId
|
|
37
|
+
}) {
|
|
38
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.roles.v1}/${roleId}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function updateRole(_ref) {
|
|
42
|
+
let {
|
|
43
|
+
roleId
|
|
44
|
+
} = _ref,
|
|
45
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
46
|
+
return (0, _fetch.Patch)(`${_constants.urls.identity.roles.v1}/${roleId}`, body);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async function attachPermissionsToRole(_ref2) {
|
|
50
|
+
let {
|
|
51
|
+
roleId
|
|
52
|
+
} = _ref2,
|
|
53
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded2);
|
|
54
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.roles.v1}/${roleId}/permissions`, body);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function getPermissions() {
|
|
58
|
+
return (0, _fetch.Get)(_constants.urls.identity.permissions.v1);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function attachPermissionToRoles(_ref3) {
|
|
62
|
+
let {
|
|
63
|
+
permissionId
|
|
64
|
+
} = _ref3,
|
|
65
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded3);
|
|
66
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.permissions.v1}/${permissionId}/roles`, body);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async function getPermissionCategories() {
|
|
70
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.permissions.v1}/categories`);
|
|
71
|
+
}
|
package/node/routers.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fronteggRefreshTokenUrl = exports.fronteggAuthApiRoutes = void 0;
|
|
7
|
+
|
|
8
|
+
var _constants = require("./constants");
|
|
9
|
+
|
|
10
|
+
const fronteggAuthApiRoutes = [`${_constants.urls.identity.auth.v1}/logout`, `${_constants.urls.identity.auth.v1}/user/saml/postlogin`, `${_constants.urls.identity.auth.v2}/user/oidc/postlogin`, `${_constants.urls.identity.auth.v1}/user`, `${_constants.urls.identity.auth.v1}/user/mfa/verify`, `${_constants.urls.identity.auth.v1}/user/token/refresh`, `${_constants.urls.identity.users.v1}`, `${_constants.urls.identity.auth.v1}/passwordless/magiclink/postlogin`, `${_constants.urls.identity.auth.v1}/passwordless/code/postlogin`, `${_constants.urls.identity.auth.v1}/passwordless/smscode/postlogin`, `${_constants.urls.identity.users.v1}/activate`, `${_constants.urls.identity.users.v1}/invitation/accept`];
|
|
11
|
+
exports.fronteggAuthApiRoutes = fronteggAuthApiRoutes;
|
|
12
|
+
const fronteggRefreshTokenUrl = `${_constants.urls.identity.auth.v1}/user/token/refresh`;
|
|
13
|
+
exports.fronteggRefreshTokenUrl = fronteggRefreshTokenUrl;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addUserRolesForSubTenants = addUserRolesForSubTenants;
|
|
7
|
+
exports.addUserToTenantAndSubTenants = addUserToTenantAndSubTenants;
|
|
8
|
+
exports.loadAllUsers = loadAllUsers;
|
|
9
|
+
exports.removeUserFromTenantAndSubTenants = removeUserFromTenantAndSubTenants;
|
|
10
|
+
exports.removeUserRolesFromSubTenants = removeUserRolesFromSubTenants;
|
|
11
|
+
exports.setUserRolesForSubTenants = setUserRolesForSubTenants;
|
|
12
|
+
|
|
13
|
+
var _fetch = require("../fetch");
|
|
14
|
+
|
|
15
|
+
var _constants = require("../constants");
|
|
16
|
+
|
|
17
|
+
async function loadAllUsers(params) {
|
|
18
|
+
return (0, _fetch.Get)(_constants.urls.identity.subTenants.v1, params);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function addUserToTenantAndSubTenants(body) {
|
|
22
|
+
return (0, _fetch.Post)(_constants.urls.identity.subTenants.v1, body);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function removeUserFromTenantAndSubTenants(body) {
|
|
26
|
+
return (0, _fetch.Delete)(_constants.urls.identity.subTenants.v1, body);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async function addUserRolesForSubTenants(userId, body) {
|
|
30
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async function removeUserRolesFromSubTenants(userId, body) {
|
|
34
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function setUserRolesForSubTenants(userId, body) {
|
|
38
|
+
return (0, _fetch.Patch)(`${_constants.urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ProviderType = exports.PaymentMethodType = exports.ISubscriptionStatus = exports.ISubscriptionCancellationPolicy = void 0;
|
|
7
|
+
let ISubscriptionStatus;
|
|
8
|
+
exports.ISubscriptionStatus = ISubscriptionStatus;
|
|
9
|
+
|
|
10
|
+
(function (ISubscriptionStatus) {
|
|
11
|
+
ISubscriptionStatus["ACTIVE"] = "active";
|
|
12
|
+
ISubscriptionStatus["CANCELED"] = "canceled";
|
|
13
|
+
ISubscriptionStatus["INCOMPLETE"] = "incomplete";
|
|
14
|
+
ISubscriptionStatus["EXPIRED"] = "expired";
|
|
15
|
+
ISubscriptionStatus["TRIALING"] = "trialing";
|
|
16
|
+
ISubscriptionStatus["TRIAL_ENDED"] = "trialEnded";
|
|
17
|
+
})(ISubscriptionStatus || (exports.ISubscriptionStatus = ISubscriptionStatus = {}));
|
|
18
|
+
|
|
19
|
+
let PaymentMethodType;
|
|
20
|
+
exports.PaymentMethodType = PaymentMethodType;
|
|
21
|
+
|
|
22
|
+
(function (PaymentMethodType) {
|
|
23
|
+
PaymentMethodType["UNKNWON"] = "unknown";
|
|
24
|
+
PaymentMethodType["CARD"] = "card";
|
|
25
|
+
})(PaymentMethodType || (exports.PaymentMethodType = PaymentMethodType = {}));
|
|
26
|
+
|
|
27
|
+
let ISubscriptionCancellationPolicy;
|
|
28
|
+
exports.ISubscriptionCancellationPolicy = ISubscriptionCancellationPolicy;
|
|
29
|
+
|
|
30
|
+
(function (ISubscriptionCancellationPolicy) {
|
|
31
|
+
ISubscriptionCancellationPolicy["AT_PERIOD_END"] = "atPeriodEnd";
|
|
32
|
+
})(ISubscriptionCancellationPolicy || (exports.ISubscriptionCancellationPolicy = ISubscriptionCancellationPolicy = {}));
|
|
33
|
+
|
|
34
|
+
let ProviderType;
|
|
35
|
+
exports.ProviderType = ProviderType;
|
|
36
|
+
|
|
37
|
+
(function (ProviderType) {
|
|
38
|
+
ProviderType["Stripe"] = "Stripe";
|
|
39
|
+
})(ProviderType || (exports.ProviderType = ProviderType = {}));
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _subscriptions = require("./subscriptions");
|
|
8
|
+
|
|
9
|
+
Object.keys(_subscriptions).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _subscriptions[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _subscriptions[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _managedSubscriptions = require("./managedSubscriptions");
|
|
21
|
+
|
|
22
|
+
Object.keys(_managedSubscriptions).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _managedSubscriptions[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _managedSubscriptions[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _plans = require("./plans");
|
|
34
|
+
|
|
35
|
+
Object.keys(_plans).forEach(function (key) {
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (key in exports && exports[key] === _plans[key]) return;
|
|
38
|
+
Object.defineProperty(exports, key, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _plans[key];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
var _invoices = require("./invoices");
|
|
47
|
+
|
|
48
|
+
Object.keys(_invoices).forEach(function (key) {
|
|
49
|
+
if (key === "default" || key === "__esModule") return;
|
|
50
|
+
if (key in exports && exports[key] === _invoices[key]) return;
|
|
51
|
+
Object.defineProperty(exports, key, {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return _invoices[key];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
var _paymentMethods = require("./paymentMethods");
|
|
60
|
+
|
|
61
|
+
Object.keys(_paymentMethods).forEach(function (key) {
|
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
|
63
|
+
if (key in exports && exports[key] === _paymentMethods[key]) return;
|
|
64
|
+
Object.defineProperty(exports, key, {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () {
|
|
67
|
+
return _paymentMethods[key];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
var _providers = require("./providers");
|
|
73
|
+
|
|
74
|
+
Object.keys(_providers).forEach(function (key) {
|
|
75
|
+
if (key === "default" || key === "__esModule") return;
|
|
76
|
+
if (key in exports && exports[key] === _providers[key]) return;
|
|
77
|
+
Object.defineProperty(exports, key, {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () {
|
|
80
|
+
return _providers[key];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var _summaries = require("./summaries");
|
|
86
|
+
|
|
87
|
+
Object.keys(_summaries).forEach(function (key) {
|
|
88
|
+
if (key === "default" || key === "__esModule") return;
|
|
89
|
+
if (key in exports && exports[key] === _summaries[key]) return;
|
|
90
|
+
Object.defineProperty(exports, key, {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _summaries[key];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
var _tenantConfiguration = require("./tenantConfiguration");
|
|
99
|
+
|
|
100
|
+
Object.keys(_tenantConfiguration).forEach(function (key) {
|
|
101
|
+
if (key === "default" || key === "__esModule") return;
|
|
102
|
+
if (key in exports && exports[key] === _tenantConfiguration[key]) return;
|
|
103
|
+
Object.defineProperty(exports, key, {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () {
|
|
106
|
+
return _tenantConfiguration[key];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
var _paymentProviders = require("./paymentProviders");
|
|
112
|
+
|
|
113
|
+
Object.keys(_paymentProviders).forEach(function (key) {
|
|
114
|
+
if (key === "default" || key === "__esModule") return;
|
|
115
|
+
if (key in exports && exports[key] === _paymentProviders[key]) return;
|
|
116
|
+
Object.defineProperty(exports, key, {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () {
|
|
119
|
+
return _paymentProviders[key];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
var _enums = require("./enums");
|
|
125
|
+
|
|
126
|
+
Object.keys(_enums).forEach(function (key) {
|
|
127
|
+
if (key === "default" || key === "__esModule") return;
|
|
128
|
+
if (key in exports && exports[key] === _enums[key]) return;
|
|
129
|
+
Object.defineProperty(exports, key, {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () {
|
|
132
|
+
return _enums[key];
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _interfaces = require("./providers/stripe/interfaces");
|
|
8
|
+
|
|
9
|
+
Object.keys(_interfaces).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _interfaces[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _interfaces[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSubscriptionInvoice = getSubscriptionInvoice;
|
|
7
|
+
exports.getSubscriptionInvoicePdf = getSubscriptionInvoicePdf;
|
|
8
|
+
exports.getSubscriptionInvoices = getSubscriptionInvoices;
|
|
9
|
+
|
|
10
|
+
var _fetch = require("../fetch");
|
|
11
|
+
|
|
12
|
+
var _constants = require("../constants");
|
|
13
|
+
|
|
14
|
+
async function getSubscriptionInvoices() {
|
|
15
|
+
return (0, _fetch.Get)(_constants.urls.subscriptions.billing.invoices.v1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async function getSubscriptionInvoice(invoiceId) {
|
|
19
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.invoices.v1}/${invoiceId}`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function getSubscriptionInvoicePdf(invoiceId, outputFileName) {
|
|
23
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.invoices.v1}/${invoiceId}/pdf`, {
|
|
24
|
+
outputFileName
|
|
25
|
+
}, {
|
|
26
|
+
responseType: "blob"
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.cancelManagedSubscription = cancelManagedSubscription;
|
|
7
|
+
exports.getManagedSubscription = getManagedSubscription;
|
|
8
|
+
exports.getManagedSubscriptions = getManagedSubscriptions;
|
|
9
|
+
exports.renewManagedSubscription = renewManagedSubscription;
|
|
10
|
+
exports.updateManagedSubscription = updateManagedSubscription;
|
|
11
|
+
|
|
12
|
+
var _fetch = require("../fetch");
|
|
13
|
+
|
|
14
|
+
var _constants = require("../constants");
|
|
15
|
+
|
|
16
|
+
async function getManagedSubscription(subscriptionId) {
|
|
17
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function getManagedSubscriptions() {
|
|
21
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.managedSubscriptions.v1}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function cancelManagedSubscription(subscriptionId) {
|
|
25
|
+
return (0, _fetch.Put)(`${_constants.urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}/cancellations/`, {});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function renewManagedSubscription(subscriptionId) {
|
|
29
|
+
return (0, _fetch.Put)(`${_constants.urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}/renewals/`, {});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function updateManagedSubscription(subscriptionId, {
|
|
33
|
+
paymentMethodId,
|
|
34
|
+
planId
|
|
35
|
+
}) {
|
|
36
|
+
return (0, _fetch.Put)(`${_constants.urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}`, {
|
|
37
|
+
paymentMethodId,
|
|
38
|
+
planId
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getPaymentMethod = getPaymentMethod;
|
|
9
|
+
exports.getPaymentMethods = getPaymentMethods;
|
|
10
|
+
exports.updatePaymentMethodBillingDetails = updatePaymentMethodBillingDetails;
|
|
11
|
+
|
|
12
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
13
|
+
|
|
14
|
+
var _fetch = require("../fetch");
|
|
15
|
+
|
|
16
|
+
var _constants = require("../constants");
|
|
17
|
+
|
|
18
|
+
const _excluded = ["email"];
|
|
19
|
+
|
|
20
|
+
async function getPaymentMethods() {
|
|
21
|
+
return (0, _fetch.Get)(_constants.urls.subscriptions.billing.paymentMethods.v1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function getPaymentMethod(paymentMethodId) {
|
|
25
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.paymentMethods.v1}/${paymentMethodId}`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function updatePaymentMethodBillingDetails(paymentMethodId, _ref) {
|
|
29
|
+
let {
|
|
30
|
+
email
|
|
31
|
+
} = _ref,
|
|
32
|
+
address = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
33
|
+
return (0, _fetch.Patch)(`${_constants.urls.subscriptions.billing.paymentMethods.v1}/${paymentMethodId}/billing-details`, {
|
|
34
|
+
email,
|
|
35
|
+
address
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getPaymentProviders = getPaymentProviders;
|
|
7
|
+
|
|
8
|
+
var _fetch = require("../fetch");
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
async function getPaymentProviders() {
|
|
13
|
+
return (0, _fetch.Get)(_constants.urls.subscriptions.paymentProviders.v1);
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSubscriptionPlan = getSubscriptionPlan;
|
|
7
|
+
exports.getSubscriptionPlans = getSubscriptionPlans;
|
|
8
|
+
|
|
9
|
+
var _fetch = require("../fetch");
|
|
10
|
+
|
|
11
|
+
var _constants = require("../constants");
|
|
12
|
+
|
|
13
|
+
async function getSubscriptionPlans() {
|
|
14
|
+
return (0, _fetch.Get)(_constants.urls.subscriptions.billing.plans.v1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function getSubscriptionPlan(planId) {
|
|
18
|
+
return (0, _fetch.Get)(`${_constants.urls.subscriptions.billing.plans.v1}/${planId}`);
|
|
19
|
+
}
|