@frontegg/rest-api 2.10.90 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/ContextHolder.d.ts → ContextHolder.d.ts} +0 -0
- package/ContextHolder.js +114 -0
- package/{dist/account-settings → account-settings}/index.d.ts +0 -0
- package/account-settings/index.js +47 -0
- package/{dist/account-settings → account-settings}/interfaces.d.ts +0 -0
- package/account-settings/interfaces.js +1 -0
- package/account-settings/package.json +6 -0
- package/{dist/audits → audits}/index.d.ts +0 -0
- package/audits/index.js +74 -0
- package/{dist/audits → audits}/interfaces.d.ts +0 -0
- package/audits/interfaces.js +1 -0
- package/audits/package.json +6 -0
- package/{dist/auth → auth}/enums.d.ts +0 -0
- package/auth/enums.js +18 -0
- package/{dist/auth → auth}/index.d.ts +0 -0
- package/auth/index.js +2102 -0
- package/{dist/auth → auth}/interfaces.d.ts +0 -0
- package/auth/interfaces.js +16 -0
- package/auth/package.json +6 -0
- package/{dist/auth → auth}/secutiry-poilicy/index.d.ts +0 -0
- package/auth/secutiry-poilicy/index.js +257 -0
- package/{dist/auth → auth}/secutiry-poilicy/interfaces.d.ts +0 -0
- package/auth/secutiry-poilicy/interfaces.js +1 -0
- package/{dist/connectivity → connectivity}/index.d.ts +0 -0
- package/connectivity/index.js +114 -0
- package/{dist/connectivity → connectivity}/interfaces.d.ts +0 -0
- package/connectivity/interfaces.js +1 -0
- package/connectivity/package.json +6 -0
- package/{dist/constants.d.ts → constants.d.ts} +0 -0
- package/{src/constants.ts → constants.js} +13 -13
- package/{dist/error.d.ts → error.d.ts} +0 -0
- package/error.js +36 -0
- package/fetch.d.ts +19 -0
- package/fetch.js +557 -0
- package/{dist/es2015/index.d.ts → index.d.ts} +0 -0
- package/{dist/es2015/index.js → index.js} +32 -28
- package/{dist/es2015/interfaces.d.ts → interfaces.d.ts} +0 -0
- package/interfaces.js +1 -0
- package/{dist/es2015/jwt.d.ts → jwt.d.ts} +0 -0
- package/jwt.js +105 -0
- package/{dist/es2015/metadata → metadata}/index.d.ts +0 -0
- package/metadata/index.js +166 -0
- package/{dist/es2015/metadata → metadata}/interfaces.d.ts +0 -0
- package/metadata/interfaces.js +1 -0
- package/metadata/package.json +6 -0
- package/node/ContextHolder.js +126 -0
- package/node/account-settings/index.js +61 -0
- package/node/account-settings/interfaces.js +5 -0
- package/node/audits/index.js +90 -0
- package/node/audits/interfaces.js +5 -0
- package/node/auth/enums.js +26 -0
- package/node/auth/index.js +2327 -0
- package/node/auth/interfaces.js +39 -0
- package/node/auth/secutiry-poilicy/index.js +279 -0
- package/node/auth/secutiry-poilicy/interfaces.js +5 -0
- package/node/connectivity/index.js +201 -0
- package/node/connectivity/interfaces.js +5 -0
- package/node/constants.js +177 -0
- package/node/error.js +50 -0
- package/node/fetch.js +589 -0
- package/node/index.js +359 -0
- package/node/interfaces.js +5 -0
- package/node/jwt.js +125 -0
- package/node/metadata/index.js +188 -0
- package/node/metadata/interfaces.js +5 -0
- package/node/notifications/index.js +115 -0
- package/node/notifications/interfaces.js +5 -0
- package/node/reports/index.js +205 -0
- package/node/reports/interfaces.js +5 -0
- package/node/roles/index.js +209 -0
- package/node/roles/interfaces.js +5 -0
- package/node/routers.js +13 -0
- package/node/sub-tenants/index.js +153 -0
- package/node/sub-tenants/interfaces.js +5 -0
- package/node/subscriptions/enums.js +39 -0
- package/node/subscriptions/index.js +135 -0
- package/node/subscriptions/interfaces.js +18 -0
- package/node/subscriptions/invoices.js +88 -0
- package/node/subscriptions/managedSubscriptions.js +135 -0
- package/node/subscriptions/paymentMethods.js +91 -0
- package/node/subscriptions/paymentProviders.js +38 -0
- package/node/subscriptions/plans.js +61 -0
- package/node/subscriptions/providers/index.js +18 -0
- package/node/subscriptions/providers/stripe/index.js +130 -0
- package/node/subscriptions/providers/stripe/interfaces.js +5 -0
- package/node/subscriptions/subscriptions.js +135 -0
- package/node/subscriptions/summaries.js +38 -0
- package/node/subscriptions/tenantConfiguration.js +61 -0
- package/node/teams/index.js +478 -0
- package/node/teams/interfaces.js +5 -0
- package/node/tenants/index.js +107 -0
- package/node/tenants/interfaces.js +5 -0
- package/node/vendor/index.js +40 -0
- package/node/vendor/interfaces.js +5 -0
- package/{dist/es2015/notifications → notifications}/index.d.ts +0 -0
- package/notifications/index.js +99 -0
- package/{dist/es2015/notifications → notifications}/interfaces.d.ts +0 -0
- package/notifications/interfaces.js +1 -0
- package/notifications/package.json +6 -0
- package/package.json +9 -32
- package/{dist/es2015/reports → reports}/index.d.ts +0 -0
- package/reports/index.js +185 -0
- package/{dist/es2015/reports → reports}/interfaces.d.ts +0 -0
- package/reports/interfaces.js +1 -0
- package/reports/package.json +6 -0
- package/{dist/es2015/roles → roles}/index.d.ts +0 -0
- package/roles/index.js +188 -0
- package/{dist/es2015/roles → roles}/interfaces.d.ts +0 -0
- package/roles/interfaces.js +1 -0
- package/roles/package.json +6 -0
- package/{dist/es2015/routers.d.ts → routers.d.ts} +0 -0
- package/routers.js +3 -0
- package/{dist/es2015/sub-tenants → sub-tenants}/index.d.ts +0 -0
- package/sub-tenants/index.js +135 -0
- package/{dist/es2015/sub-tenants → sub-tenants}/interfaces.d.ts +0 -0
- package/sub-tenants/interfaces.js +1 -0
- package/sub-tenants/package.json +6 -0
- package/{dist/es2015/subscriptions → subscriptions}/enums.d.ts +0 -0
- package/subscriptions/enums.js +29 -0
- package/{dist/es2015/subscriptions → subscriptions}/index.d.ts +0 -0
- package/{dist/subscriptions/index.d.ts → subscriptions/index.js} +1 -1
- package/{dist/es2015/subscriptions → subscriptions}/interfaces.d.ts +0 -0
- package/{dist/es2015/subscriptions → subscriptions}/interfaces.js +1 -1
- package/{dist/es2015/subscriptions → subscriptions}/invoices.d.ts +0 -0
- package/subscriptions/invoices.js +73 -0
- package/{dist/es2015/subscriptions → subscriptions}/managedSubscriptions.d.ts +0 -0
- package/subscriptions/managedSubscriptions.js +118 -0
- package/subscriptions/package.json +6 -0
- package/{dist/es2015/subscriptions → subscriptions}/paymentMethods.d.ts +0 -0
- package/subscriptions/paymentMethods.js +75 -0
- package/{dist/es2015/subscriptions → subscriptions}/paymentProviders.d.ts +0 -0
- package/subscriptions/paymentProviders.js +25 -0
- package/{dist/es2015/subscriptions → subscriptions}/plans.d.ts +0 -0
- package/subscriptions/plans.js +47 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/index.d.ts +0 -0
- package/subscriptions/providers/index.js +1 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/stripe/index.d.ts +0 -0
- package/subscriptions/providers/stripe/index.js +113 -0
- package/{dist/es2015/subscriptions → subscriptions}/providers/stripe/interfaces.d.ts +0 -0
- package/subscriptions/providers/stripe/interfaces.js +1 -0
- package/{dist/es2015/subscriptions → subscriptions}/subscriptions.d.ts +0 -0
- package/subscriptions/subscriptions.js +118 -0
- package/{dist/es2015/subscriptions → subscriptions}/summaries.d.ts +0 -0
- package/subscriptions/summaries.js +25 -0
- package/{dist/es2015/subscriptions → subscriptions}/tenantConfiguration.d.ts +0 -0
- package/subscriptions/tenantConfiguration.js +47 -0
- package/{dist/es2015/teams → teams}/index.d.ts +0 -0
- package/teams/index.js +445 -0
- package/{dist/es2015/teams → teams}/interfaces.d.ts +0 -0
- package/teams/interfaces.js +1 -0
- package/teams/package.json +6 -0
- package/{dist/es2015/tenants → tenants}/index.d.ts +0 -0
- package/tenants/index.js +91 -0
- package/{dist/es2015/tenants → tenants}/interfaces.d.ts +0 -0
- package/tenants/interfaces.js +1 -0
- package/tenants/package.json +6 -0
- package/{dist/es2015/vendor → vendor}/index.d.ts +0 -0
- package/vendor/index.js +27 -0
- package/{dist/es2015/vendor → vendor}/interfaces.d.ts +0 -0
- package/vendor/interfaces.js +1 -0
- package/vendor/package.json +6 -0
- package/CHANGELOG.md +0 -211
- package/README.md +0 -139
- package/SECURITY.md +0 -13
- package/dist/ContextHolder.js +0 -69
- package/dist/ContextHolder.js.map +0 -1
- package/dist/account-settings/index.js +0 -33
- package/dist/account-settings/index.js.map +0 -1
- package/dist/account-settings/interfaces.js +0 -3
- package/dist/account-settings/interfaces.js.map +0 -1
- package/dist/audits/index.js +0 -59
- package/dist/audits/index.js.map +0 -1
- package/dist/audits/interfaces.js +0 -3
- package/dist/audits/interfaces.js.map +0 -1
- package/dist/auth/enums.js +0 -19
- package/dist/auth/enums.js.map +0 -1
- package/dist/auth/index.js +0 -1042
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/interfaces.js +0 -29
- package/dist/auth/interfaces.js.map +0 -1
- package/dist/auth/secutiry-poilicy/index.js +0 -134
- package/dist/auth/secutiry-poilicy/index.js.map +0 -1
- package/dist/auth/secutiry-poilicy/interfaces.js +0 -3
- package/dist/auth/secutiry-poilicy/interfaces.js.map +0 -1
- package/dist/connectivity/index.js +0 -158
- package/dist/connectivity/index.js.map +0 -1
- package/dist/connectivity/interfaces.js +0 -3
- package/dist/connectivity/interfaces.js.map +0 -1
- package/dist/constants.js +0 -174
- package/dist/constants.js.map +0 -1
- package/dist/error.js +0 -14
- package/dist/error.js.map +0 -1
- package/dist/es2015/ContextHolder.d.ts +0 -29
- package/dist/es2015/ContextHolder.js +0 -65
- package/dist/es2015/ContextHolder.js.map +0 -1
- package/dist/es2015/account-settings/index.d.ts +0 -7
- package/dist/es2015/account-settings/index.js +0 -28
- package/dist/es2015/account-settings/index.js.map +0 -1
- package/dist/es2015/account-settings/interfaces.d.ts +0 -9
- package/dist/es2015/account-settings/interfaces.js +0 -2
- package/dist/es2015/account-settings/interfaces.js.map +0 -1
- package/dist/es2015/audits/index.d.ts +0 -16
- package/dist/es2015/audits/index.js +0 -53
- package/dist/es2015/audits/index.js.map +0 -1
- package/dist/es2015/audits/interfaces.d.ts +0 -61
- package/dist/es2015/audits/interfaces.js +0 -2
- package/dist/es2015/audits/interfaces.js.map +0 -1
- package/dist/es2015/auth/enums.d.ts +0 -13
- package/dist/es2015/auth/enums.js +0 -16
- package/dist/es2015/auth/enums.js.map +0 -1
- package/dist/es2015/auth/index.d.ts +0 -447
- package/dist/es2015/auth/index.js +0 -943
- package/dist/es2015/auth/index.js.map +0 -1
- package/dist/es2015/auth/interfaces.d.ts +0 -430
- package/dist/es2015/auth/interfaces.js +0 -16
- package/dist/es2015/auth/interfaces.js.map +0 -1
- package/dist/es2015/auth/secutiry-poilicy/index.d.ts +0 -41
- package/dist/es2015/auth/secutiry-poilicy/index.js +0 -121
- package/dist/es2015/auth/secutiry-poilicy/index.js.map +0 -1
- package/dist/es2015/auth/secutiry-poilicy/interfaces.d.ts +0 -70
- package/dist/es2015/auth/secutiry-poilicy/interfaces.js +0 -2
- package/dist/es2015/auth/secutiry-poilicy/interfaces.js.map +0 -1
- package/dist/es2015/connectivity/index.d.ts +0 -27
- package/dist/es2015/connectivity/index.js +0 -129
- package/dist/es2015/connectivity/index.js.map +0 -1
- package/dist/es2015/connectivity/interfaces.d.ts +0 -95
- package/dist/es2015/connectivity/interfaces.js +0 -2
- package/dist/es2015/connectivity/interfaces.js.map +0 -1
- package/dist/es2015/constants.d.ts +0 -170
- package/dist/es2015/constants.js +0 -171
- package/dist/es2015/constants.js.map +0 -1
- package/dist/es2015/error.d.ts +0 -5
- package/dist/es2015/error.js +0 -10
- package/dist/es2015/error.js.map +0 -1
- package/dist/es2015/fetch.d.ts +0 -19
- package/dist/es2015/fetch.js +0 -177
- package/dist/es2015/fetch.js.map +0 -1
- package/dist/es2015/index.js.map +0 -1
- package/dist/es2015/interfaces.js +0 -2
- package/dist/es2015/interfaces.js.map +0 -1
- package/dist/es2015/jwt.js +0 -83
- package/dist/es2015/jwt.js.map +0 -1
- package/dist/es2015/metadata/index.js +0 -32
- package/dist/es2015/metadata/index.js.map +0 -1
- package/dist/es2015/metadata/interfaces.js +0 -2
- package/dist/es2015/metadata/interfaces.js.map +0 -1
- package/dist/es2015/notifications/index.js +0 -49
- package/dist/es2015/notifications/index.js.map +0 -1
- package/dist/es2015/notifications/interfaces.js +0 -2
- package/dist/es2015/notifications/interfaces.js.map +0 -1
- package/dist/es2015/reports/index.js +0 -118
- package/dist/es2015/reports/index.js.map +0 -1
- package/dist/es2015/reports/interfaces.js +0 -2
- package/dist/es2015/reports/interfaces.js.map +0 -1
- package/dist/es2015/roles/index.js +0 -99
- package/dist/es2015/roles/index.js.map +0 -1
- package/dist/es2015/roles/interfaces.js +0 -2
- package/dist/es2015/roles/interfaces.js.map +0 -1
- package/dist/es2015/routers.js +0 -17
- package/dist/es2015/routers.js.map +0 -1
- package/dist/es2015/sub-tenants/index.js +0 -42
- package/dist/es2015/sub-tenants/index.js.map +0 -1
- package/dist/es2015/sub-tenants/interfaces.js +0 -2
- package/dist/es2015/sub-tenants/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/enums.js +0 -23
- package/dist/es2015/subscriptions/enums.js.map +0 -1
- package/dist/es2015/subscriptions/index.js +0 -11
- package/dist/es2015/subscriptions/index.js.map +0 -1
- package/dist/es2015/subscriptions/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/invoices.js +0 -43
- package/dist/es2015/subscriptions/invoices.js.map +0 -1
- package/dist/es2015/subscriptions/managedSubscriptions.js +0 -51
- package/dist/es2015/subscriptions/managedSubscriptions.js.map +0 -1
- package/dist/es2015/subscriptions/paymentMethods.js +0 -55
- package/dist/es2015/subscriptions/paymentMethods.js.map +0 -1
- package/dist/es2015/subscriptions/paymentProviders.js +0 -21
- package/dist/es2015/subscriptions/paymentProviders.js.map +0 -1
- package/dist/es2015/subscriptions/plans.js +0 -30
- package/dist/es2015/subscriptions/plans.js.map +0 -1
- package/dist/es2015/subscriptions/providers/index.js +0 -2
- package/dist/es2015/subscriptions/providers/index.js.map +0 -1
- package/dist/es2015/subscriptions/providers/stripe/index.js +0 -57
- package/dist/es2015/subscriptions/providers/stripe/index.js.map +0 -1
- package/dist/es2015/subscriptions/providers/stripe/interfaces.js +0 -2
- package/dist/es2015/subscriptions/providers/stripe/interfaces.js.map +0 -1
- package/dist/es2015/subscriptions/subscriptions.js +0 -57
- package/dist/es2015/subscriptions/subscriptions.js.map +0 -1
- package/dist/es2015/subscriptions/summaries.js +0 -21
- package/dist/es2015/subscriptions/summaries.js.map +0 -1
- package/dist/es2015/subscriptions/tenantConfiguration.js +0 -24
- package/dist/es2015/subscriptions/tenantConfiguration.js.map +0 -1
- package/dist/es2015/teams/index.js +0 -228
- package/dist/es2015/teams/index.js.map +0 -1
- package/dist/es2015/teams/interfaces.js +0 -2
- package/dist/es2015/teams/interfaces.js.map +0 -1
- package/dist/es2015/tenants/index.js +0 -57
- package/dist/es2015/tenants/index.js.map +0 -1
- package/dist/es2015/tenants/interfaces.js +0 -2
- package/dist/es2015/tenants/interfaces.js.map +0 -1
- package/dist/es2015/vendor/index.js +0 -23
- package/dist/es2015/vendor/index.js.map +0 -1
- package/dist/es2015/vendor/interfaces.js +0 -2
- package/dist/es2015/vendor/interfaces.js.map +0 -1
- package/dist/fetch.d.ts +0 -19
- package/dist/fetch.js +0 -187
- package/dist/fetch.js.map +0 -1
- package/dist/index.d.ts +0 -83
- package/dist/index.js +0 -98
- package/dist/index.js.map +0 -1
- package/dist/interfaces.d.ts +0 -40
- package/dist/interfaces.js +0 -3
- package/dist/interfaces.js.map +0 -1
- package/dist/jwt.d.ts +0 -13
- package/dist/jwt.js +0 -89
- package/dist/jwt.js.map +0 -1
- package/dist/metadata/index.d.ts +0 -5
- package/dist/metadata/index.js +0 -39
- package/dist/metadata/index.js.map +0 -1
- package/dist/metadata/interfaces.d.ts +0 -46
- package/dist/metadata/interfaces.js +0 -3
- package/dist/metadata/interfaces.js.map +0 -1
- package/dist/notifications/index.d.ts +0 -17
- package/dist/notifications/index.js +0 -56
- package/dist/notifications/index.js.map +0 -1
- package/dist/notifications/interfaces.d.ts +0 -40
- package/dist/notifications/interfaces.js +0 -3
- package/dist/notifications/interfaces.js.map +0 -1
- package/dist/reports/index.d.ts +0 -45
- package/dist/reports/index.js +0 -127
- package/dist/reports/index.js.map +0 -1
- package/dist/reports/interfaces.d.ts +0 -146
- package/dist/reports/interfaces.js +0 -3
- package/dist/reports/interfaces.js.map +0 -1
- package/dist/roles/index.d.ts +0 -34
- package/dist/roles/index.js +0 -110
- package/dist/roles/index.js.map +0 -1
- package/dist/roles/interfaces.d.ts +0 -58
- package/dist/roles/interfaces.js +0 -3
- package/dist/roles/interfaces.js.map +0 -1
- package/dist/routers.d.ts +0 -2
- package/dist/routers.js +0 -20
- package/dist/routers.js.map +0 -1
- package/dist/sub-tenants/index.d.ts +0 -8
- package/dist/sub-tenants/index.js +0 -51
- package/dist/sub-tenants/index.js.map +0 -1
- package/dist/sub-tenants/interfaces.d.ts +0 -87
- package/dist/sub-tenants/interfaces.js +0 -3
- package/dist/sub-tenants/interfaces.js.map +0 -1
- package/dist/subscriptions/enums.d.ts +0 -18
- package/dist/subscriptions/enums.js +0 -26
- package/dist/subscriptions/enums.js.map +0 -1
- package/dist/subscriptions/index.js +0 -23
- package/dist/subscriptions/index.js.map +0 -1
- package/dist/subscriptions/interfaces.d.ts +0 -117
- package/dist/subscriptions/interfaces.js +0 -14
- package/dist/subscriptions/interfaces.js.map +0 -1
- package/dist/subscriptions/invoices.d.ts +0 -13
- package/dist/subscriptions/invoices.js +0 -49
- package/dist/subscriptions/invoices.js.map +0 -1
- package/dist/subscriptions/managedSubscriptions.d.ts +0 -15
- package/dist/subscriptions/managedSubscriptions.js +0 -59
- package/dist/subscriptions/managedSubscriptions.js.map +0 -1
- package/dist/subscriptions/paymentMethods.d.ts +0 -13
- package/dist/subscriptions/paymentMethods.js +0 -61
- package/dist/subscriptions/paymentMethods.js.map +0 -1
- package/dist/subscriptions/paymentProviders.d.ts +0 -5
- package/dist/subscriptions/paymentProviders.js +0 -25
- package/dist/subscriptions/paymentProviders.js.map +0 -1
- package/dist/subscriptions/plans.d.ts +0 -9
- package/dist/subscriptions/plans.js +0 -35
- package/dist/subscriptions/plans.js.map +0 -1
- package/dist/subscriptions/providers/index.d.ts +0 -1
- package/dist/subscriptions/providers/index.js +0 -14
- package/dist/subscriptions/providers/index.js.map +0 -1
- package/dist/subscriptions/providers/stripe/index.d.ts +0 -21
- package/dist/subscriptions/providers/stripe/index.js +0 -65
- package/dist/subscriptions/providers/stripe/index.js.map +0 -1
- package/dist/subscriptions/providers/stripe/interfaces.d.ts +0 -32
- package/dist/subscriptions/providers/stripe/interfaces.js +0 -3
- package/dist/subscriptions/providers/stripe/interfaces.js.map +0 -1
- package/dist/subscriptions/subscriptions.d.ts +0 -21
- package/dist/subscriptions/subscriptions.js +0 -65
- package/dist/subscriptions/subscriptions.js.map +0 -1
- package/dist/subscriptions/summaries.d.ts +0 -5
- package/dist/subscriptions/summaries.js +0 -25
- package/dist/subscriptions/summaries.js.map +0 -1
- package/dist/subscriptions/tenantConfiguration.d.ts +0 -3
- package/dist/subscriptions/tenantConfiguration.js +0 -29
- package/dist/subscriptions/tenantConfiguration.js.map +0 -1
- package/dist/teams/index.d.ts +0 -116
- package/dist/teams/index.js +0 -250
- package/dist/teams/index.js.map +0 -1
- package/dist/teams/interfaces.d.ts +0 -136
- package/dist/teams/interfaces.js +0 -3
- package/dist/teams/interfaces.js.map +0 -1
- package/dist/tenants/index.d.ts +0 -26
- package/dist/tenants/index.js +0 -64
- package/dist/tenants/index.js.map +0 -1
- package/dist/tenants/interfaces.d.ts +0 -30
- package/dist/tenants/interfaces.js +0 -3
- package/dist/tenants/interfaces.js.map +0 -1
- package/dist/umd/index.js +0 -2891
- package/dist/vendor/index.d.ts +0 -6
- package/dist/vendor/index.js +0 -27
- package/dist/vendor/index.js.map +0 -1
- package/dist/vendor/interfaces.d.ts +0 -6
- package/dist/vendor/interfaces.js +0 -3
- package/dist/vendor/interfaces.js.map +0 -1
- package/src/ContextHolder.ts +0 -81
- package/src/account-settings/index.ts +0 -18
- package/src/account-settings/interfaces.ts +0 -10
- package/src/audits/index.ts +0 -35
- package/src/audits/interfaces.ts +0 -70
- package/src/auth/enums.ts +0 -17
- package/src/auth/index.ts +0 -935
- package/src/auth/interfaces.ts +0 -488
- package/src/auth/secutiry-poilicy/index.ts +0 -109
- package/src/auth/secutiry-poilicy/interfaces.ts +0 -81
- package/src/connectivity/index.ts +0 -160
- package/src/connectivity/interfaces.ts +0 -106
- package/src/error.ts +0 -13
- package/src/fetch.ts +0 -220
- package/src/index.ts +0 -86
- package/src/interfaces.ts +0 -47
- package/src/jwt.ts +0 -92
- package/src/metadata/index.ts +0 -24
- package/src/metadata/interfaces.ts +0 -51
- package/src/notifications/index.ts +0 -40
- package/src/notifications/interfaces.ts +0 -45
- package/src/reports/index.ts +0 -116
- package/src/reports/interfaces.ts +0 -167
- package/src/roles/index.ts +0 -80
- package/src/roles/interfaces.ts +0 -64
- package/src/routers.ts +0 -18
- package/src/sub-tenants/index.ts +0 -49
- package/src/sub-tenants/interfaces.ts +0 -100
- package/src/subscriptions/enums.ts +0 -22
- package/src/subscriptions/index.ts +0 -10
- package/src/subscriptions/interfaces.ts +0 -144
- package/src/subscriptions/invoices.ts +0 -42
- package/src/subscriptions/managedSubscriptions.ts +0 -53
- package/src/subscriptions/paymentMethods.ts +0 -47
- package/src/subscriptions/paymentProviders.ts +0 -13
- package/src/subscriptions/plans.ts +0 -19
- package/src/subscriptions/providers/index.ts +0 -1
- package/src/subscriptions/providers/stripe/index.ts +0 -56
- package/src/subscriptions/providers/stripe/interfaces.ts +0 -39
- package/src/subscriptions/subscriptions.ts +0 -63
- package/src/subscriptions/summaries.ts +0 -11
- package/src/subscriptions/tenantConfiguration.ts +0 -23
- package/src/teams/index.ts +0 -224
- package/src/teams/interfaces.ts +0 -163
- package/src/tenants/index.ts +0 -46
- package/src/tenants/interfaces.ts +0 -33
- package/src/vendor/index.ts +0 -12
- package/src/vendor/interfaces.ts +0 -6
- package/yarn-error.log +0 -518
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
-
var t = {};
|
|
12
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
-
t[p] = s[p];
|
|
14
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
-
t[p[i]] = s[p[i]];
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
|
-
import { Get, Post } from '../fetch';
|
|
22
|
-
import { urls } from '../constants';
|
|
23
|
-
/**
|
|
24
|
-
* Get all active tenant reports from reports service by active vendor.
|
|
25
|
-
* Optional: pass filters and sort options to reports.
|
|
26
|
-
*
|
|
27
|
-
* @returns list of reports objects
|
|
28
|
-
*/
|
|
29
|
-
export function getReports(body) {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
console.debug('getReports()', body);
|
|
32
|
-
return Get(`${urls.reports.service.v2}/tenant-reports`, body);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Get report record by id.
|
|
37
|
-
*
|
|
38
|
-
* @returns list of report object
|
|
39
|
-
* @throws exception if report not found.
|
|
40
|
-
*/
|
|
41
|
-
export function getReport(body) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
console.debug('getReport()', body);
|
|
44
|
-
return Get(`${urls.reports.service.v2}/${body.id}/tenant-reports`);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Render report by id.
|
|
49
|
-
* Optional: pass data filters if exists to render report by specific data.
|
|
50
|
-
*
|
|
51
|
-
* @returns html content of the rendered reports
|
|
52
|
-
* @throws exception if report not found or the data api unreached.
|
|
53
|
-
*/
|
|
54
|
-
export function renderReport(_a) {
|
|
55
|
-
var { dataFilters } = _a, body = __rest(_a, ["dataFilters"]);
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
console.debug('renderReport()', body);
|
|
58
|
-
const html = yield Get(`${urls.reports.trigger.v1}/preview-report`, Object.assign(Object.assign({}, body), { dataFilters: btoa(JSON.stringify(dataFilters || {})), responseType: 'html' }), { responseType: 'plain' });
|
|
59
|
-
return { html };
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* schedule report by providing cron expression and data filters.
|
|
64
|
-
*
|
|
65
|
-
* @returns the updated report object
|
|
66
|
-
* @throws exception if report not found or the data api unreached.
|
|
67
|
-
*/
|
|
68
|
-
export function scheduleReport(_a) {
|
|
69
|
-
var { templateId, dataFilters } = _a, body = __rest(_a, ["templateId", "dataFilters"]);
|
|
70
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
console.debug('scheduleReport()', body);
|
|
72
|
-
return Post(`${urls.reports.service.v2}/${templateId}/tenant-reports`, Object.assign(Object.assign({}, body), { dataFilters: btoa(JSON.stringify(dataFilters || {})) }));
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* download report as file in specific format.
|
|
77
|
-
* this function will add a href element with url to trigger file download.
|
|
78
|
-
* Optional: pass data filters if exists to generate report by specific data.
|
|
79
|
-
*
|
|
80
|
-
* @throws exception if report not found or the data api unreached.
|
|
81
|
-
*/
|
|
82
|
-
export function downloadReport(_a) {
|
|
83
|
-
var { dataFilters } = _a, body = __rest(_a, ["dataFilters"]);
|
|
84
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
console.debug('downloadReport()', body);
|
|
86
|
-
const blob = yield Get(`${urls.reports.trigger.v1}/preview-report`, Object.assign(Object.assign({}, body), { dataFilters: btoa(JSON.stringify(dataFilters || {})) }), { responseType: 'blob' });
|
|
87
|
-
let contentType = 'text/html';
|
|
88
|
-
let contentExt = 'html';
|
|
89
|
-
if (body.responseType === 'pdf') {
|
|
90
|
-
contentType = 'application/pdf';
|
|
91
|
-
contentExt = 'pdf';
|
|
92
|
-
}
|
|
93
|
-
else if (body.responseType === 'image') {
|
|
94
|
-
contentType = 'image/jpeg';
|
|
95
|
-
contentExt = 'jpg';
|
|
96
|
-
}
|
|
97
|
-
const newBlob = new Blob([blob], { type: contentType });
|
|
98
|
-
const fileURL = URL.createObjectURL(newBlob);
|
|
99
|
-
const tempLink = document.createElement('a');
|
|
100
|
-
tempLink.href = fileURL;
|
|
101
|
-
tempLink.setAttribute('download', `report_${body.name || ''}.${contentExt}`);
|
|
102
|
-
tempLink.click();
|
|
103
|
-
setTimeout(tempLink.remove.bind(tempLink));
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* send report to specific email address.
|
|
108
|
-
* Optional: pass data filters if exists to send report by specific data.
|
|
109
|
-
*
|
|
110
|
-
* @throws exception if report not found or the data api unreached.
|
|
111
|
-
*/
|
|
112
|
-
export function sendReport(body) {
|
|
113
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
console.debug('sendReport()', body);
|
|
115
|
-
return Post(`${urls.reports.trigger.v1}/tenant-reports`, body);
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/reports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,OAAO,EAAC,GAAG,EAAE,IA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QACxB,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,UAAU,IAAI,CAAC,IAAI,IAAI,EAAE,IAAI,UAAU,EAAE,CAAC,CAAC;QAC7E,QAAQ,CAAC,KAAK,EAAE,CAAC;QACjB,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;;CAC5C;AAED;;;;;GAKG;AACH,MAAM,UAAgB,UAAU,CAAC,IAAiB;;QAChD,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/reports/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
-
var t = {};
|
|
12
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
-
t[p] = s[p];
|
|
14
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
-
t[p[i]] = s[p[i]];
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
|
-
import { Delete, Get, Patch, Post, Put } from '../fetch';
|
|
22
|
-
import { urls } from '../constants';
|
|
23
|
-
/**
|
|
24
|
-
* Gets tenant related roles
|
|
25
|
-
*/
|
|
26
|
-
export function getRoles() {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
console.debug('getRoles()');
|
|
29
|
-
return Get(urls.identity.roles.v1);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Adds tenant related roles
|
|
34
|
-
* @param body: IAddRole
|
|
35
|
-
*/
|
|
36
|
-
export function addRole(body) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
console.debug('addRole()', body);
|
|
39
|
-
return Post(urls.identity.roles.v1, body);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Deletes role given role ID
|
|
44
|
-
*/
|
|
45
|
-
export function deleteRole({ roleId }) {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
console.debug('deleteRole()', roleId);
|
|
48
|
-
return Delete(`${urls.identity.roles.v1}/${roleId}`);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Updates role using a given role ID and IUpdateRole object
|
|
53
|
-
*/
|
|
54
|
-
export function updateRole(_a) {
|
|
55
|
-
var { roleId } = _a, body = __rest(_a, ["roleId"]);
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
console.debug('updateRole()', roleId, body);
|
|
58
|
-
return Patch(`${urls.identity.roles.v1}/${roleId}`, body);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Attaches permissions to role given a role ID
|
|
63
|
-
*/
|
|
64
|
-
export function attachPermissionsToRole(_a) {
|
|
65
|
-
var { roleId } = _a, body = __rest(_a, ["roleId"]);
|
|
66
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
console.debug('attachPermissionsToRole()', roleId, body);
|
|
68
|
-
return Put(`${urls.identity.roles.v1}/${roleId}/permissions`, body);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Gets all vendor permissions
|
|
73
|
-
*/
|
|
74
|
-
export function getPermissions() {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
console.debug('getPermissions()');
|
|
77
|
-
return Get(urls.identity.permissions.v1);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Associate permission to roles
|
|
82
|
-
*/
|
|
83
|
-
export function attachPermissionToRoles(_a) {
|
|
84
|
-
var { permissionId } = _a, body = __rest(_a, ["permissionId"]);
|
|
85
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
console.debug('attachPermissionToRoles()');
|
|
87
|
-
return Put(`${urls.identity.permissions.v1}/${permissionId}/roles`, body);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Gets all vendor categories including the permissions
|
|
92
|
-
*/
|
|
93
|
-
export function getPermissionCategories() {
|
|
94
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
console.debug('getPermissionCategories()');
|
|
96
|
-
return Get(`${urls.identity.permissions.v1}/categories`);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/roles/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAUA,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,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AC,CAAC;QACzD,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,MAAM,cAAc,EAAE,IAAI,CAAC,CAAC;;CACrE;AAED;;GAEG;AACH,MAAM,UAAgB,cAAc;;QAClC,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAClC,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC3C,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,UAAgB,uBAAuB,CAAC,EAG2B;QAH3B,EACE,YAAY,OAEa,EADtB,IAAI,cAFT,gBAGC,CADQ;;QAErD,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC3C,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,YAAY,QAAQ,EAAE,IAAI,CAAC,CAAC;;CAC3E;AAED;;GAEG;AACH,MAAM,UAAgB,uBAAuB;;QAC3C,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC3C,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,CAAC;IAC3D,CAAC;CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/roles/interfaces.ts"],"names":[],"mappings":""}
|
package/dist/es2015/routers.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { urls } from './constants';
|
|
2
|
-
export const fronteggAuthApiRoutes = [
|
|
3
|
-
`${urls.identity.auth.v1}/logout`,
|
|
4
|
-
`${urls.identity.auth.v1}/user/saml/postlogin`,
|
|
5
|
-
`${urls.identity.auth.v2}/user/oidc/postlogin`,
|
|
6
|
-
`${urls.identity.auth.v1}/user`,
|
|
7
|
-
`${urls.identity.auth.v1}/user/mfa/verify`,
|
|
8
|
-
`${urls.identity.auth.v1}/user/token/refresh`,
|
|
9
|
-
`${urls.identity.users.v1}`,
|
|
10
|
-
`${urls.identity.auth.v1}/passwordless/magiclink/postlogin`,
|
|
11
|
-
`${urls.identity.auth.v1}/passwordless/code/postlogin`,
|
|
12
|
-
`${urls.identity.auth.v1}/passwordless/smscode/postlogin`,
|
|
13
|
-
`${urls.identity.users.v1}/activate`,
|
|
14
|
-
`${urls.identity.users.v1}/invitation/accept`
|
|
15
|
-
];
|
|
16
|
-
export const fronteggRefreshTokenUrl = `${urls.identity.auth.v1}/user/token/refresh`;
|
|
17
|
-
//# sourceMappingURL=routers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routers.js","sourceRoot":"","sources":["../../src/routers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS;IACjC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,sBAAsB;IAC9C,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,sBAAsB;IAC9C,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO;IAC/B,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,kBAAkB;IAC1C,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB;IAC7C,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE;IAC3B,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,mCAAmC;IAC3D,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,8BAA8B;IACtD,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,iCAAiC;IACzD,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW;IACpC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,oBAAoB;CAC9C,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Delete, Get, Patch, Post } from "../fetch";
|
|
11
|
-
import { urls } from "../constants";
|
|
12
|
-
export function loadAllUsers(params) {
|
|
13
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
-
return Get(urls.identity.subTenants.v1, params);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
export function addUserToTenantAndSubTenants(body) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
return Post(urls.identity.subTenants.v1, body);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export function removeUserFromTenantAndSubTenants(body) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
return Delete(urls.identity.subTenants.v1, body);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
export function addUserRolesForSubTenants(userId, body) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return Post(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
export function removeUserRolesFromSubTenants(userId, body) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
return Delete(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
export function setUserRolesForSubTenants(userId, body) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
return Patch(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sub-tenants/index.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AASpC,MAAM,UAAgB,YAAY,CAChC,MAAqB;;QAErB,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;CAAA;AAED,MAAM,UAAgB,4BAA4B,CAChD,IAAgC;;QAEhC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;CAAA;AAED,MAAM,UAAgB,iCAAiC,CACrD,IAAqC;;QAErC,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;CAAA;AAED,MAAM,UAAgB,yBAAyB,CAC7C,MAAc,EACd,IAA4C;;QAE5C,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;CAAA;AAED,MAAM,UAAgB,6BAA6B,CACjD,MAAc,EACd,IAA4C;;QAE5C,OAAO,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;CAAA;AAED,MAAM,UAAgB,yBAAyB,CAC7C,MAAc,EACd,IAA4C;;QAE5C,OAAO,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvE,CAAC;CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/sub-tenants/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export var ISubscriptionStatus;
|
|
2
|
-
(function (ISubscriptionStatus) {
|
|
3
|
-
ISubscriptionStatus["ACTIVE"] = "active";
|
|
4
|
-
ISubscriptionStatus["CANCELED"] = "canceled";
|
|
5
|
-
ISubscriptionStatus["INCOMPLETE"] = "incomplete";
|
|
6
|
-
ISubscriptionStatus["EXPIRED"] = "expired";
|
|
7
|
-
ISubscriptionStatus["TRIALING"] = "trialing";
|
|
8
|
-
ISubscriptionStatus["TRIAL_ENDED"] = "trialEnded";
|
|
9
|
-
})(ISubscriptionStatus || (ISubscriptionStatus = {}));
|
|
10
|
-
export var PaymentMethodType;
|
|
11
|
-
(function (PaymentMethodType) {
|
|
12
|
-
PaymentMethodType["UNKNWON"] = "unknown";
|
|
13
|
-
PaymentMethodType["CARD"] = "card";
|
|
14
|
-
})(PaymentMethodType || (PaymentMethodType = {}));
|
|
15
|
-
export var ISubscriptionCancellationPolicy;
|
|
16
|
-
(function (ISubscriptionCancellationPolicy) {
|
|
17
|
-
ISubscriptionCancellationPolicy["AT_PERIOD_END"] = "atPeriodEnd";
|
|
18
|
-
})(ISubscriptionCancellationPolicy || (ISubscriptionCancellationPolicy = {}));
|
|
19
|
-
export var ProviderType;
|
|
20
|
-
(function (ProviderType) {
|
|
21
|
-
ProviderType["Stripe"] = "Stripe";
|
|
22
|
-
})(ProviderType || (ProviderType = {}));
|
|
23
|
-
//# sourceMappingURL=enums.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/subscriptions/enums.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,gDAAyB,CAAA;IACzB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;IACrB,iDAA0B,CAAA;AAC5B,CAAC,EAPW,mBAAmB,KAAnB,mBAAmB,QAO9B;AAGD,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,+BAEX;AAFD,WAAY,+BAA+B;IACzC,gEAA6B,CAAA;AAC/B,CAAC,EAFW,+BAA+B,KAA/B,+BAA+B,QAE1C;AAED,MAAM,CAAN,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,iCAAiB,CAAA;AACnB,CAAC,EAFW,YAAY,KAAZ,YAAY,QAEvB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './subscriptions';
|
|
2
|
-
export * from './managedSubscriptions';
|
|
3
|
-
export * from './plans';
|
|
4
|
-
export * from './invoices';
|
|
5
|
-
export * from './paymentMethods';
|
|
6
|
-
export * from './providers';
|
|
7
|
-
export * from './summaries';
|
|
8
|
-
export * from './tenantConfiguration';
|
|
9
|
-
export * from './paymentProviders';
|
|
10
|
-
export * from './enums';
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/subscriptions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/subscriptions/interfaces.ts"],"names":[],"mappings":"AAOA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Get } from "../fetch";
|
|
11
|
-
import { urls } from "../constants";
|
|
12
|
-
/**
|
|
13
|
-
* Get subscription invoices
|
|
14
|
-
*/
|
|
15
|
-
export function getSubscriptionInvoices() {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
console.debug("getSubscriptionInvoices()");
|
|
18
|
-
return Get(urls.subscriptions.billing.invoices.v1);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get subscription invoice
|
|
23
|
-
*/
|
|
24
|
-
export function getSubscriptionInvoice(invoiceId) {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
console.debug("getSubscriptionInvoice()", { invoiceId });
|
|
27
|
-
return Get(`${urls.subscriptions.billing.invoices.v1}/${invoiceId}`);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Get subscription invoice pdf file
|
|
32
|
-
*/
|
|
33
|
-
export function getSubscriptionInvoicePdf(invoiceId, outputFileName) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
console.debug("getSubscriptionInvoicePdf()", { invoiceId });
|
|
36
|
-
return Get(`${urls.subscriptions.billing.invoices.v1}/${invoiceId}/pdf`, {
|
|
37
|
-
outputFileName,
|
|
38
|
-
}, {
|
|
39
|
-
responseType: "blob",
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=invoices.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../../src/subscriptions/invoices.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC;;GAEG;AACH,MAAM,UAAgB,uBAAuB;;QAG3C,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC3C,OAAO,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,UAAgB,sBAAsB,CAC1C,SAAiB;;QAEjB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;QACzD,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,SAAS,EAAE,CAAC,CAAC;IACvE,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,UAAgB,yBAAyB,CAC7C,SAAiB,EACjB,cAAuB;;QAEvB,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;QAC5D,OAAO,GAAG,CACR,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,SAAS,MAAM,EAC5D;YACE,cAAc;SACf,EACD;YACE,YAAY,EAAE,MAAM;SACrB,CACF,CAAC;IACJ,CAAC;CAAA"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Get, Put } from "../fetch";
|
|
11
|
-
import { urls } from "../constants";
|
|
12
|
-
export function getManagedSubscription(subscriptionId) {
|
|
13
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
-
console.debug('getManagedSubscription()', { subscriptionId });
|
|
15
|
-
return Get(`${urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}`);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
export function getManagedSubscriptions() {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
console.debug('getManagedSubscriptions()');
|
|
21
|
-
return Get(`${urls.subscriptions.managedSubscriptions.v1}`);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Cancel tenant subscription
|
|
26
|
-
*/
|
|
27
|
-
export function cancelManagedSubscription(subscriptionId) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
console.debug("cancelManagedSubscription()", { subscriptionId });
|
|
30
|
-
return Put(`${urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}/cancellations/`, {});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Renew tenant subscription
|
|
35
|
-
*/
|
|
36
|
-
export function renewManagedSubscription(subscriptionId) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
console.debug("renewManagedSubscription()", { subscriptionId });
|
|
39
|
-
return Put(`${urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}/renewals/`, {});
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Upgrade/Downgrade tenant subscription plan
|
|
44
|
-
*/
|
|
45
|
-
export function updateManagedSubscription(subscriptionId, { paymentMethodId, planId }) {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
console.debug("updateManagedSubscription()", { subscriptionId });
|
|
48
|
-
return Put(`${urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}`, { paymentMethodId, planId });
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=managedSubscriptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"managedSubscriptions.js","sourceRoot":"","sources":["../../../src/subscriptions/managedSubscriptions.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CA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E,eAAe,EAAE,MAAM,EAAE,CAC5B,CAAC;IACN,CAAC;CAAA"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
-
var t = {};
|
|
12
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
-
t[p] = s[p];
|
|
14
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
-
t[p[i]] = s[p[i]];
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
|
-
import { Get, Patch } from "../fetch";
|
|
22
|
-
import { urls } from "../constants";
|
|
23
|
-
/**
|
|
24
|
-
* Get payment methods
|
|
25
|
-
*/
|
|
26
|
-
export function getPaymentMethods() {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
console.debug("getPaymentMethods()");
|
|
29
|
-
return Get(urls.subscriptions.billing.paymentMethods.v1);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Get payment method
|
|
34
|
-
*/
|
|
35
|
-
export function getPaymentMethod(paymentMethodId) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
console.debug("getPaymentMethod()", { paymentMethodId });
|
|
38
|
-
return Get(`${urls.subscriptions.billing.paymentMethods.v1}/${paymentMethodId}`);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Update payment method billing details
|
|
43
|
-
*/
|
|
44
|
-
export function updatePaymentMethodBillingDetails(paymentMethodId, _a) {
|
|
45
|
-
var { email } = _a, address = __rest(_a, ["email"]);
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
console.debug("updatePaymentMethodBillingDetails()", {
|
|
48
|
-
paymentMethodId,
|
|
49
|
-
email,
|
|
50
|
-
address,
|
|
51
|
-
});
|
|
52
|
-
return Patch(`${urls.subscriptions.billing.paymentMethods.v1}/${paymentMethodId}/billing-details`, { email, address });
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=paymentMethods.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paymentMethods.js","sourceRoot":"","sources":["../../../src/subscriptions/paymentMethods.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC;;GAEG;AACH,MAAM,UAAgB,iBAAiB;;QAGrC,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACrC,OAAO,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IAC3D,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,UAAgB,gBAAgB,CACpC,eAAuB;;QAEvB,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,EAAE,eAAe,EAAE,CAAC,CAAC;QACzD,OAAO,GAAG,CACR,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,IAAI,eAAe,EAAE,CACrE,CAAC;IACJ,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,UAAgB,iCAAiC,CACrD,eAAuB,EACvB,EAAqE;QAArE,EAAE,KAAK,OAA8D,EAAzD,OAAO,cAAnB,SAAqB,CAAF;;QAEnB,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE;YACnD,eAAe;YACf,KAAK;YACL,OAAO;SACR,CAAC,CAAC;QACH,OAAO,KAAK,CACV,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,IAAI,eAAe,kBAAkB,EACpF,EAAE,KAAK,EAAE,OAAO,EAAE,CACnB,CAAC;;CACH"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Get } from "../fetch";
|
|
11
|
-
import { urls } from "../constants";
|
|
12
|
-
/**
|
|
13
|
-
* Gets payment providers for vendor
|
|
14
|
-
*/
|
|
15
|
-
export function getPaymentProviders() {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
console.debug("getPaymentProviders()");
|
|
18
|
-
return Get(urls.subscriptions.paymentProviders.v1);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=paymentProviders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paymentProviders.js","sourceRoot":"","sources":["../../../src/subscriptions/paymentProviders.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC;;GAEG;AACH,MAAM,UAAgB,mBAAmB;;QAGvC,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACvC,OAAO,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC;CAAA"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Get } from '../fetch';
|
|
11
|
-
import { urls } from '../constants';
|
|
12
|
-
/**
|
|
13
|
-
* Gets subscription plans
|
|
14
|
-
*/
|
|
15
|
-
export function getSubscriptionPlans() {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
console.debug('getSubscriptionPlans()');
|
|
18
|
-
return Get(urls.subscriptions.billing.plans.v1);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Gets subscription plan singular
|
|
23
|
-
*/
|
|
24
|
-
export function getSubscriptionPlan(planId) {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
console.debug('getSubscriptionPlan()');
|
|
27
|
-
return Get(`${urls.subscriptions.billing.plans.v1}/${planId}`);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=plans.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plans.js","sourceRoot":"","sources":["../../../src/subscriptions/plans.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAElC;;GAEG;AACH,MAAM,UAAgB,oBAAoB;;QACxC,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACxC,OAAO,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,UAAgB,mBAAmB,CAAC,MAAc;;QACtD,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACvC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/subscriptions/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|