@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/roles/interfaces.ts"],"names":[],"mappings":""}
|
package/dist/routers.d.ts
DELETED
package/dist/routers.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fronteggRefreshTokenUrl = exports.fronteggAuthApiRoutes = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
exports.fronteggAuthApiRoutes = [
|
|
6
|
-
`${constants_1.urls.identity.auth.v1}/logout`,
|
|
7
|
-
`${constants_1.urls.identity.auth.v1}/user/saml/postlogin`,
|
|
8
|
-
`${constants_1.urls.identity.auth.v2}/user/oidc/postlogin`,
|
|
9
|
-
`${constants_1.urls.identity.auth.v1}/user`,
|
|
10
|
-
`${constants_1.urls.identity.auth.v1}/user/mfa/verify`,
|
|
11
|
-
`${constants_1.urls.identity.auth.v1}/user/token/refresh`,
|
|
12
|
-
`${constants_1.urls.identity.users.v1}`,
|
|
13
|
-
`${constants_1.urls.identity.auth.v1}/passwordless/magiclink/postlogin`,
|
|
14
|
-
`${constants_1.urls.identity.auth.v1}/passwordless/code/postlogin`,
|
|
15
|
-
`${constants_1.urls.identity.auth.v1}/passwordless/smscode/postlogin`,
|
|
16
|
-
`${constants_1.urls.identity.users.v1}/activate`,
|
|
17
|
-
`${constants_1.urls.identity.users.v1}/invitation/accept`
|
|
18
|
-
];
|
|
19
|
-
exports.fronteggRefreshTokenUrl = `${constants_1.urls.identity.auth.v1}/user/token/refresh`;
|
|
20
|
-
//# sourceMappingURL=routers.js.map
|
package/dist/routers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routers.js","sourceRoot":"","sources":["../src/routers.ts"],"names":[],"mappings":";;;AAAA,2CAAmC;AAEtB,QAAA,qBAAqB,GAAG;IACnC,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS;IACjC,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,sBAAsB;IAC9C,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,sBAAsB;IAC9C,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO;IAC/B,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,kBAAkB;IAC1C,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB;IAC7C,GAAG,gBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE;IAC3B,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,mCAAmC;IAC3D,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,8BAA8B;IACtD,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,iCAAiC;IACzD,GAAG,gBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW;IACpC,GAAG,gBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,oBAAoB;CAC9C,CAAA;AAEY,QAAA,uBAAuB,GAAG,GAAG,gBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PaginationResult } from "../interfaces";
|
|
2
|
-
import { AddUserToSubTenantsRequest, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateUserRolesForSubTenantsRequestDto } from "./interfaces";
|
|
3
|
-
export declare function loadAllUsers(params: ILoadAllUsers): Promise<PaginationResult<ISubTenantUser>>;
|
|
4
|
-
export declare function addUserToTenantAndSubTenants(body: AddUserToSubTenantsRequest): Promise<void>;
|
|
5
|
-
export declare function removeUserFromTenantAndSubTenants(body: RemoveUserFromSubTenantsRequest): Promise<void>;
|
|
6
|
-
export declare function addUserRolesForSubTenants(userId: string, body: UpdateUserRolesForSubTenantsRequestDto): Promise<void>;
|
|
7
|
-
export declare function removeUserRolesFromSubTenants(userId: string, body: UpdateUserRolesForSubTenantsRequestDto): Promise<void>;
|
|
8
|
-
export declare function setUserRolesForSubTenants(userId: string, body: UpdateUserRolesForSubTenantsRequestDto): Promise<void>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.setUserRolesForSubTenants = exports.removeUserRolesFromSubTenants = exports.addUserRolesForSubTenants = exports.removeUserFromTenantAndSubTenants = exports.addUserToTenantAndSubTenants = exports.loadAllUsers = void 0;
|
|
13
|
-
const fetch_1 = require("../fetch");
|
|
14
|
-
const constants_1 = require("../constants");
|
|
15
|
-
function loadAllUsers(params) {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
return fetch_1.Get(constants_1.urls.identity.subTenants.v1, params);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
exports.loadAllUsers = loadAllUsers;
|
|
21
|
-
function addUserToTenantAndSubTenants(body) {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
return fetch_1.Post(constants_1.urls.identity.subTenants.v1, body);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.addUserToTenantAndSubTenants = addUserToTenantAndSubTenants;
|
|
27
|
-
function removeUserFromTenantAndSubTenants(body) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return fetch_1.Delete(constants_1.urls.identity.subTenants.v1, body);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
exports.removeUserFromTenantAndSubTenants = removeUserFromTenantAndSubTenants;
|
|
33
|
-
function addUserRolesForSubTenants(userId, body) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
return fetch_1.Post(`${constants_1.urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
exports.addUserRolesForSubTenants = addUserRolesForSubTenants;
|
|
39
|
-
function removeUserRolesFromSubTenants(userId, body) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
return fetch_1.Delete(`${constants_1.urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
exports.removeUserRolesFromSubTenants = removeUserRolesFromSubTenants;
|
|
45
|
-
function setUserRolesForSubTenants(userId, body) {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
return fetch_1.Patch(`${constants_1.urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
exports.setUserRolesForSubTenants = setUserRolesForSubTenants;
|
|
51
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sub-tenants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oCAAoD;AACpD,4CAAoC;AASpC,SAAsB,YAAY,CAChC,MAAqB;;QAErB,OAAO,WAAG,CAAC,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;CAAA;AAJD,oCAIC;AAED,SAAsB,4BAA4B,CAChD,IAAgC;;QAEhC,OAAO,YAAI,CAAC,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;CAAA;AAJD,oEAIC;AAED,SAAsB,iCAAiC,CACrD,IAAqC;;QAErC,OAAO,cAAM,CAAC,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;CAAA;AAJD,8EAIC;AAED,SAAsB,yBAAyB,CAC7C,MAAc,EACd,IAA4C;;QAE5C,OAAO,YAAI,CAAC,GAAG,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;CAAA;AALD,8DAKC;AAED,SAAsB,6BAA6B,CACjD,MAAc,EACd,IAA4C;;QAE5C,OAAO,cAAM,CAAC,GAAG,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;CAAA;AALD,sEAKC;AAED,SAAsB,yBAAyB,CAC7C,MAAc,EACd,IAA4C;;QAE5C,OAAO,aAAK,CAAC,GAAG,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvE,CAAC;CAAA;AALD,8DAKC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
export declare type ILoadAllUsers = {
|
|
2
|
-
_offset: number;
|
|
3
|
-
_limit: number;
|
|
4
|
-
_filter: string;
|
|
5
|
-
_sortBy: string;
|
|
6
|
-
_order: "ASC" | "DESC";
|
|
7
|
-
};
|
|
8
|
-
export declare type ISubTenantUserRole = {
|
|
9
|
-
id: string;
|
|
10
|
-
vendorId: string;
|
|
11
|
-
tenantId: string;
|
|
12
|
-
key: string;
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
isDefault: boolean;
|
|
16
|
-
firstUserRole: boolean;
|
|
17
|
-
level: number;
|
|
18
|
-
createdAt: Date;
|
|
19
|
-
updatedAt: Date;
|
|
20
|
-
permissions: string[];
|
|
21
|
-
};
|
|
22
|
-
export declare type ISubTenantUserPermission = {
|
|
23
|
-
id: string;
|
|
24
|
-
key: string;
|
|
25
|
-
name: string;
|
|
26
|
-
description: string;
|
|
27
|
-
createdAt: Date;
|
|
28
|
-
updatedAt: Date;
|
|
29
|
-
roleIds: string[];
|
|
30
|
-
categoryId: string;
|
|
31
|
-
fePermission: boolean;
|
|
32
|
-
};
|
|
33
|
-
export declare type ISubTenantUserTenant = {
|
|
34
|
-
tenantId: string;
|
|
35
|
-
roles: ISubTenantUserRole[];
|
|
36
|
-
permissions: ISubTenantUserPermission[];
|
|
37
|
-
activated: boolean;
|
|
38
|
-
lastLogin: Date;
|
|
39
|
-
};
|
|
40
|
-
export declare type ISubTenantUser = {
|
|
41
|
-
id: string;
|
|
42
|
-
sub: string;
|
|
43
|
-
email: string;
|
|
44
|
-
verified: boolean;
|
|
45
|
-
mfaEnrolled: boolean;
|
|
46
|
-
mfaBypass?: boolean;
|
|
47
|
-
name?: string;
|
|
48
|
-
phoneNumber?: string;
|
|
49
|
-
profilePictureUrl?: string;
|
|
50
|
-
provider: string;
|
|
51
|
-
tenantId: string;
|
|
52
|
-
tenantIds: string[];
|
|
53
|
-
isLocked?: boolean;
|
|
54
|
-
tenants: ISubTenantUserTenant[];
|
|
55
|
-
invisible?: true;
|
|
56
|
-
superUser?: true;
|
|
57
|
-
metadata: string;
|
|
58
|
-
createdAt: Date;
|
|
59
|
-
};
|
|
60
|
-
export interface AddUserToSubTenantsRequestUserDto {
|
|
61
|
-
email: string;
|
|
62
|
-
name?: string;
|
|
63
|
-
}
|
|
64
|
-
export interface AddUserToSubTenantsRequestTenantDto {
|
|
65
|
-
tenantId: string;
|
|
66
|
-
roleIds?: string[];
|
|
67
|
-
}
|
|
68
|
-
export interface AddUserToSubTenantsRequest {
|
|
69
|
-
user: AddUserToSubTenantsRequestUserDto;
|
|
70
|
-
subTenants: AddUserToSubTenantsRequestTenantDto[];
|
|
71
|
-
}
|
|
72
|
-
export interface RemoveUserFromSubTenantsRequestTenantDto {
|
|
73
|
-
tenantId: string;
|
|
74
|
-
}
|
|
75
|
-
export interface RemoveUserFromSubTenantsRequest {
|
|
76
|
-
userId: string;
|
|
77
|
-
subTenants: RemoveUserFromSubTenantsRequestTenantDto[];
|
|
78
|
-
}
|
|
79
|
-
export interface UpdateUserRolesForSubTenantRequestDto {
|
|
80
|
-
tenantId: string;
|
|
81
|
-
roleIds: string[];
|
|
82
|
-
}
|
|
83
|
-
export interface UpdateUserRolesForSubTenantsRequestDto {
|
|
84
|
-
subTenantsRoles: UpdateUserRolesForSubTenantRequestDto[];
|
|
85
|
-
ipAddress?: string;
|
|
86
|
-
userAgent?: string;
|
|
87
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/sub-tenants/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare enum ISubscriptionStatus {
|
|
2
|
-
ACTIVE = "active",
|
|
3
|
-
CANCELED = "canceled",
|
|
4
|
-
INCOMPLETE = "incomplete",
|
|
5
|
-
EXPIRED = "expired",
|
|
6
|
-
TRIALING = "trialing",
|
|
7
|
-
TRIAL_ENDED = "trialEnded"
|
|
8
|
-
}
|
|
9
|
-
export declare enum PaymentMethodType {
|
|
10
|
-
UNKNWON = "unknown",
|
|
11
|
-
CARD = "card"
|
|
12
|
-
}
|
|
13
|
-
export declare enum ISubscriptionCancellationPolicy {
|
|
14
|
-
AT_PERIOD_END = "atPeriodEnd"
|
|
15
|
-
}
|
|
16
|
-
export declare enum ProviderType {
|
|
17
|
-
Stripe = "Stripe"
|
|
18
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProviderType = exports.ISubscriptionCancellationPolicy = exports.PaymentMethodType = exports.ISubscriptionStatus = void 0;
|
|
4
|
-
var ISubscriptionStatus;
|
|
5
|
-
(function (ISubscriptionStatus) {
|
|
6
|
-
ISubscriptionStatus["ACTIVE"] = "active";
|
|
7
|
-
ISubscriptionStatus["CANCELED"] = "canceled";
|
|
8
|
-
ISubscriptionStatus["INCOMPLETE"] = "incomplete";
|
|
9
|
-
ISubscriptionStatus["EXPIRED"] = "expired";
|
|
10
|
-
ISubscriptionStatus["TRIALING"] = "trialing";
|
|
11
|
-
ISubscriptionStatus["TRIAL_ENDED"] = "trialEnded";
|
|
12
|
-
})(ISubscriptionStatus = exports.ISubscriptionStatus || (exports.ISubscriptionStatus = {}));
|
|
13
|
-
var PaymentMethodType;
|
|
14
|
-
(function (PaymentMethodType) {
|
|
15
|
-
PaymentMethodType["UNKNWON"] = "unknown";
|
|
16
|
-
PaymentMethodType["CARD"] = "card";
|
|
17
|
-
})(PaymentMethodType = exports.PaymentMethodType || (exports.PaymentMethodType = {}));
|
|
18
|
-
var ISubscriptionCancellationPolicy;
|
|
19
|
-
(function (ISubscriptionCancellationPolicy) {
|
|
20
|
-
ISubscriptionCancellationPolicy["AT_PERIOD_END"] = "atPeriodEnd";
|
|
21
|
-
})(ISubscriptionCancellationPolicy = exports.ISubscriptionCancellationPolicy || (exports.ISubscriptionCancellationPolicy = {}));
|
|
22
|
-
var ProviderType;
|
|
23
|
-
(function (ProviderType) {
|
|
24
|
-
ProviderType["Stripe"] = "Stripe";
|
|
25
|
-
})(ProviderType = exports.ProviderType || (exports.ProviderType = {}));
|
|
26
|
-
//# sourceMappingURL=enums.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/subscriptions/enums.ts"],"names":[],"mappings":";;;AAAA,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,GAAnB,2BAAmB,KAAnB,2BAAmB,QAO9B;AAGD,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAED,IAAY,+BAEX;AAFD,WAAY,+BAA+B;IACzC,gEAA6B,CAAA;AAC/B,CAAC,EAFW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAE1C;AAED,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,iCAAiB,CAAA;AACnB,CAAC,EAFW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAEvB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./subscriptions"), exports);
|
|
14
|
-
__exportStar(require("./managedSubscriptions"), exports);
|
|
15
|
-
__exportStar(require("./plans"), exports);
|
|
16
|
-
__exportStar(require("./invoices"), exports);
|
|
17
|
-
__exportStar(require("./paymentMethods"), exports);
|
|
18
|
-
__exportStar(require("./providers"), exports);
|
|
19
|
-
__exportStar(require("./summaries"), exports);
|
|
20
|
-
__exportStar(require("./tenantConfiguration"), exports);
|
|
21
|
-
__exportStar(require("./paymentProviders"), exports);
|
|
22
|
-
__exportStar(require("./enums"), exports);
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/subscriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,yDAAuC;AACvC,0CAAwB;AACxB,6CAA2B;AAC3B,mDAAiC;AACjC,8CAA4B;AAC5B,8CAA4B;AAC5B,wDAAsC;AACtC,qDAAmC;AACnC,0CAAwB"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./enums";
|
|
2
|
-
export * from "./providers/stripe/interfaces";
|
|
3
|
-
export interface IPlanResponse {
|
|
4
|
-
id: string;
|
|
5
|
-
externalId: string;
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
price: IPlanResponsePriceResponse;
|
|
9
|
-
slug: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IPlanResponsePriceResponse {
|
|
12
|
-
id: string;
|
|
13
|
-
externalId: string;
|
|
14
|
-
currency: string;
|
|
15
|
-
amount: number;
|
|
16
|
-
}
|
|
17
|
-
export interface ISubscriptionResponse {
|
|
18
|
-
id: string;
|
|
19
|
-
externalId: string;
|
|
20
|
-
externallyManaged: boolean;
|
|
21
|
-
startDate: string;
|
|
22
|
-
currentPeriodStart: string;
|
|
23
|
-
currentPeriodEnd: string;
|
|
24
|
-
status: ISubscriptionStatus;
|
|
25
|
-
cancellation: ISubscriptionCancellationResponse | null;
|
|
26
|
-
trialEnd?: string;
|
|
27
|
-
plan: ISubscriptionPlanResponse;
|
|
28
|
-
}
|
|
29
|
-
export interface ISubscriptionPlanResponse {
|
|
30
|
-
slug: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ISubscriptionCancellationResponse {
|
|
33
|
-
policy: ISubscriptionCancellationPolicy;
|
|
34
|
-
}
|
|
35
|
-
export interface ISubscriptionInvoiceResponse {
|
|
36
|
-
id: string;
|
|
37
|
-
externalId: string;
|
|
38
|
-
subscriptionId: string;
|
|
39
|
-
paymentDate: string;
|
|
40
|
-
totalAmount: number;
|
|
41
|
-
currency: string;
|
|
42
|
-
paid: boolean;
|
|
43
|
-
receiptNumber: string;
|
|
44
|
-
}
|
|
45
|
-
export declare type ISubscriptionPaymentMethodResponse = ISubscriptionPaymentMethodDefaultResponse | ISubscriptionPaymentMethodCardResponse;
|
|
46
|
-
export interface ISubscriptionPaymentMethodDefaultResponse {
|
|
47
|
-
id: string;
|
|
48
|
-
externalId: string;
|
|
49
|
-
type: PaymentMethodType.UNKNWON;
|
|
50
|
-
isDefault: boolean;
|
|
51
|
-
}
|
|
52
|
-
export interface ISubscriptionPaymentMethodCardResponse {
|
|
53
|
-
id: string;
|
|
54
|
-
externalId: string;
|
|
55
|
-
type: PaymentMethodType.CARD;
|
|
56
|
-
isDefault: boolean;
|
|
57
|
-
last4: string;
|
|
58
|
-
expMonth: number;
|
|
59
|
-
expYear: number;
|
|
60
|
-
brand: string;
|
|
61
|
-
billingDetails: BillingDetailsResponse;
|
|
62
|
-
}
|
|
63
|
-
export interface ISubscriptionSummariesResponse {
|
|
64
|
-
tenantConfigurationId: string;
|
|
65
|
-
providerType: ProviderType;
|
|
66
|
-
subscriptionId: string;
|
|
67
|
-
externallyManaged: boolean;
|
|
68
|
-
currentPlanId: string;
|
|
69
|
-
paymentMethodId: string;
|
|
70
|
-
defaultPlanId: string;
|
|
71
|
-
}
|
|
72
|
-
export interface BillingDetailsResponse {
|
|
73
|
-
name: string;
|
|
74
|
-
email?: string;
|
|
75
|
-
address?: BillingDetailsAddress;
|
|
76
|
-
}
|
|
77
|
-
export interface BillingDetailsAddress {
|
|
78
|
-
addressLine1?: string;
|
|
79
|
-
addressLine2?: string;
|
|
80
|
-
city?: string;
|
|
81
|
-
state?: string;
|
|
82
|
-
postalCode?: string;
|
|
83
|
-
country?: string;
|
|
84
|
-
}
|
|
85
|
-
export interface ISubscriptionUpdatePaymentMethodBillingDetails {
|
|
86
|
-
email?: string;
|
|
87
|
-
address?: BillingDetailsAddress;
|
|
88
|
-
}
|
|
89
|
-
export interface ITenantConfigurationResponse {
|
|
90
|
-
id: string;
|
|
91
|
-
vendorId: string;
|
|
92
|
-
tenantId: string;
|
|
93
|
-
externallyManaged: string;
|
|
94
|
-
paymentProviderType: ProviderType;
|
|
95
|
-
mappingId: string;
|
|
96
|
-
}
|
|
97
|
-
export interface ICreateTenantConfigurationRequest {
|
|
98
|
-
tenantId: string;
|
|
99
|
-
externallyManaged?: string;
|
|
100
|
-
providerType: ProviderType;
|
|
101
|
-
}
|
|
102
|
-
export interface ICreateTenantConfigurationResponse {
|
|
103
|
-
id: string;
|
|
104
|
-
}
|
|
105
|
-
export interface IPaymentProviderResponse {
|
|
106
|
-
providerType: ProviderType;
|
|
107
|
-
name: string;
|
|
108
|
-
status: string;
|
|
109
|
-
}
|
|
110
|
-
export interface IUpdateSubscriptionRequest {
|
|
111
|
-
paymentMethodId: string;
|
|
112
|
-
planId: string;
|
|
113
|
-
}
|
|
114
|
-
export interface IUpdateManagedSubscriptionRequest {
|
|
115
|
-
paymentMethodId: string;
|
|
116
|
-
planId: string;
|
|
117
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./providers/stripe/interfaces"), exports);
|
|
14
|
-
//# sourceMappingURL=interfaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/subscriptions/interfaces.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,gEAA8C"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ISubscriptionInvoiceResponse } from "./interfaces";
|
|
2
|
-
/**
|
|
3
|
-
* Get subscription invoices
|
|
4
|
-
*/
|
|
5
|
-
export declare function getSubscriptionInvoices(): Promise<ISubscriptionInvoiceResponse[]>;
|
|
6
|
-
/**
|
|
7
|
-
* Get subscription invoice
|
|
8
|
-
*/
|
|
9
|
-
export declare function getSubscriptionInvoice(invoiceId: string): Promise<ISubscriptionInvoiceResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Get subscription invoice pdf file
|
|
12
|
-
*/
|
|
13
|
-
export declare function getSubscriptionInvoicePdf(invoiceId: string, outputFileName?: string): Promise<void>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getSubscriptionInvoicePdf = exports.getSubscriptionInvoice = exports.getSubscriptionInvoices = void 0;
|
|
13
|
-
const fetch_1 = require("../fetch");
|
|
14
|
-
const constants_1 = require("../constants");
|
|
15
|
-
/**
|
|
16
|
-
* Get subscription invoices
|
|
17
|
-
*/
|
|
18
|
-
function getSubscriptionInvoices() {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
console.debug("getSubscriptionInvoices()");
|
|
21
|
-
return fetch_1.Get(constants_1.urls.subscriptions.billing.invoices.v1);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
exports.getSubscriptionInvoices = getSubscriptionInvoices;
|
|
25
|
-
/**
|
|
26
|
-
* Get subscription invoice
|
|
27
|
-
*/
|
|
28
|
-
function getSubscriptionInvoice(invoiceId) {
|
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
console.debug("getSubscriptionInvoice()", { invoiceId });
|
|
31
|
-
return fetch_1.Get(`${constants_1.urls.subscriptions.billing.invoices.v1}/${invoiceId}`);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
exports.getSubscriptionInvoice = getSubscriptionInvoice;
|
|
35
|
-
/**
|
|
36
|
-
* Get subscription invoice pdf file
|
|
37
|
-
*/
|
|
38
|
-
function getSubscriptionInvoicePdf(invoiceId, outputFileName) {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
console.debug("getSubscriptionInvoicePdf()", { invoiceId });
|
|
41
|
-
return fetch_1.Get(`${constants_1.urls.subscriptions.billing.invoices.v1}/${invoiceId}/pdf`, {
|
|
42
|
-
outputFileName,
|
|
43
|
-
}, {
|
|
44
|
-
responseType: "blob",
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
exports.getSubscriptionInvoicePdf = getSubscriptionInvoicePdf;
|
|
49
|
-
//# sourceMappingURL=invoices.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../src/subscriptions/invoices.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oCAA+B;AAC/B,4CAAoC;AAEpC;;GAEG;AACH,SAAsB,uBAAuB;;QAG3C,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC3C,OAAO,WAAG,CAAC,gBAAI,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC;CAAA;AALD,0DAKC;AAED;;GAEG;AACH,SAAsB,sBAAsB,CAC1C,SAAiB;;QAEjB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;QACzD,OAAO,WAAG,CAAC,GAAG,gBAAI,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,SAAS,EAAE,CAAC,CAAC;IACvE,CAAC;CAAA;AALD,wDAKC;AAED;;GAEG;AACH,SAAsB,yBAAyB,CAC7C,SAAiB,EACjB,cAAuB;;QAEvB,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;QAC5D,OAAO,WAAG,CACR,GAAG,gBAAI,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;AAdD,8DAcC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ISubscriptionResponse, IUpdateManagedSubscriptionRequest } from "./interfaces";
|
|
2
|
-
export declare function getManagedSubscription(subscriptionId: string): Promise<ISubscriptionResponse>;
|
|
3
|
-
export declare function getManagedSubscriptions(): Promise<ISubscriptionResponse[]>;
|
|
4
|
-
/**
|
|
5
|
-
* Cancel tenant subscription
|
|
6
|
-
*/
|
|
7
|
-
export declare function cancelManagedSubscription(subscriptionId: string): Promise<void>;
|
|
8
|
-
/**
|
|
9
|
-
* Renew tenant subscription
|
|
10
|
-
*/
|
|
11
|
-
export declare function renewManagedSubscription(subscriptionId: string): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Upgrade/Downgrade tenant subscription plan
|
|
14
|
-
*/
|
|
15
|
-
export declare function updateManagedSubscription(subscriptionId: string, { paymentMethodId, planId }: IUpdateManagedSubscriptionRequest): Promise<void>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.updateManagedSubscription = exports.renewManagedSubscription = exports.cancelManagedSubscription = exports.getManagedSubscriptions = exports.getManagedSubscription = void 0;
|
|
13
|
-
const fetch_1 = require("../fetch");
|
|
14
|
-
const constants_1 = require("../constants");
|
|
15
|
-
function getManagedSubscription(subscriptionId) {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
console.debug('getManagedSubscription()', { subscriptionId });
|
|
18
|
-
return fetch_1.Get(`${constants_1.urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}`);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
exports.getManagedSubscription = getManagedSubscription;
|
|
22
|
-
function getManagedSubscriptions() {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
console.debug('getManagedSubscriptions()');
|
|
25
|
-
return fetch_1.Get(`${constants_1.urls.subscriptions.managedSubscriptions.v1}`);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
exports.getManagedSubscriptions = getManagedSubscriptions;
|
|
29
|
-
/**
|
|
30
|
-
* Cancel tenant subscription
|
|
31
|
-
*/
|
|
32
|
-
function cancelManagedSubscription(subscriptionId) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
console.debug("cancelManagedSubscription()", { subscriptionId });
|
|
35
|
-
return fetch_1.Put(`${constants_1.urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}/cancellations/`, {});
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
exports.cancelManagedSubscription = cancelManagedSubscription;
|
|
39
|
-
/**
|
|
40
|
-
* Renew tenant subscription
|
|
41
|
-
*/
|
|
42
|
-
function renewManagedSubscription(subscriptionId) {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
console.debug("renewManagedSubscription()", { subscriptionId });
|
|
45
|
-
return fetch_1.Put(`${constants_1.urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}/renewals/`, {});
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
exports.renewManagedSubscription = renewManagedSubscription;
|
|
49
|
-
/**
|
|
50
|
-
* Upgrade/Downgrade tenant subscription plan
|
|
51
|
-
*/
|
|
52
|
-
function updateManagedSubscription(subscriptionId, { paymentMethodId, planId }) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
console.debug("updateManagedSubscription()", { subscriptionId });
|
|
55
|
-
return fetch_1.Put(`${constants_1.urls.subscriptions.managedSubscriptions.v1}/${subscriptionId}`, { paymentMethodId, planId });
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
exports.updateManagedSubscription = updateManagedSubscription;
|
|
59
|
-
//# sourceMappingURL=managedSubscriptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"managedSubscriptions.js","sourceRoot":"","sources":["../../src/subscriptions/managedSubscriptions.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oCAAoC;AACpC,4CAAoC;AAEpC,SAAsB,sBAAsB,CAAC,cAAsB;;QAC/D,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,EAAC,cAAc,EAAC,CAAC,CAAC;QAC5D,OAAO,WAAG,CAAC,GAAG,gBAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,IAAI,cAAc,EAAE,CAAC,CAAA;IACjF,CAAC;CAAA;AAHD,wDAGC;AAED,SAAsB,uBAAuB;;QACzC,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC3C,OAAO,WAAG,CAAC,GAAG,gBAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAA;IAC/D,CAAC;CAAA;AAHD,0DAGC;AAED;;GAEG;AACH,SAAsB,yBAAyB,CAC7C,cAAsB;;QAEpB,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;QACjE,OAAO,WAAG,CACR,GAAG,gBAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,IAAI,cAAc,iBAAiB,EAChF,EAAE,CACH,CAAC;IACN,CAAC;CAAA;AARD,8DAQC;AAED;;GAEG;AACH,SAAsB,wBAAwB,CAC5C,cAAsB;;QAEpB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;QAChE,OAAO,WAAG,CACR,GAAG,gBAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,IAAI,cAAc,YAAY,EAC3E,EAAE,CACH,CAAC;IACN,CAAC;CAAA;AARD,4DAQC;AAED;;GAEG;AACH,SAAsB,yBAAyB,CAC7C,cAAsB,EACtB,EAAE,eAAe,EAAE,MAAM,EAAqC;;QAE5D,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;QACjE,OAAO,WAAG,CACR,GAAG,gBAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,IAAI,cAAc,EAAE,EACjE,EAAE,eAAe,EAAE,MAAM,EAAE,CAC5B,CAAC;IACN,CAAC;CAAA;AATD,8DASC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ISubscriptionPaymentMethodResponse, ISubscriptionUpdatePaymentMethodBillingDetails } from "./interfaces";
|
|
2
|
-
/**
|
|
3
|
-
* Get payment methods
|
|
4
|
-
*/
|
|
5
|
-
export declare function getPaymentMethods(): Promise<ISubscriptionPaymentMethodResponse[]>;
|
|
6
|
-
/**
|
|
7
|
-
* Get payment method
|
|
8
|
-
*/
|
|
9
|
-
export declare function getPaymentMethod(paymentMethodId: string): Promise<ISubscriptionPaymentMethodResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Update payment method billing details
|
|
12
|
-
*/
|
|
13
|
-
export declare function updatePaymentMethodBillingDetails(paymentMethodId: string, { email, ...address }: ISubscriptionUpdatePaymentMethodBillingDetails): Promise<ISubscriptionUpdatePaymentMethodBillingDetails>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
-
var t = {};
|
|
13
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
-
t[p] = s[p];
|
|
15
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
-
t[p[i]] = s[p[i]];
|
|
19
|
-
}
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.updatePaymentMethodBillingDetails = exports.getPaymentMethod = exports.getPaymentMethods = void 0;
|
|
24
|
-
const fetch_1 = require("../fetch");
|
|
25
|
-
const constants_1 = require("../constants");
|
|
26
|
-
/**
|
|
27
|
-
* Get payment methods
|
|
28
|
-
*/
|
|
29
|
-
function getPaymentMethods() {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
console.debug("getPaymentMethods()");
|
|
32
|
-
return fetch_1.Get(constants_1.urls.subscriptions.billing.paymentMethods.v1);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
exports.getPaymentMethods = getPaymentMethods;
|
|
36
|
-
/**
|
|
37
|
-
* Get payment method
|
|
38
|
-
*/
|
|
39
|
-
function getPaymentMethod(paymentMethodId) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
console.debug("getPaymentMethod()", { paymentMethodId });
|
|
42
|
-
return fetch_1.Get(`${constants_1.urls.subscriptions.billing.paymentMethods.v1}/${paymentMethodId}`);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
exports.getPaymentMethod = getPaymentMethod;
|
|
46
|
-
/**
|
|
47
|
-
* Update payment method billing details
|
|
48
|
-
*/
|
|
49
|
-
function updatePaymentMethodBillingDetails(paymentMethodId, _a) {
|
|
50
|
-
var { email } = _a, address = __rest(_a, ["email"]);
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
console.debug("updatePaymentMethodBillingDetails()", {
|
|
53
|
-
paymentMethodId,
|
|
54
|
-
email,
|
|
55
|
-
address,
|
|
56
|
-
});
|
|
57
|
-
return fetch_1.Patch(`${constants_1.urls.subscriptions.billing.paymentMethods.v1}/${paymentMethodId}/billing-details`, { email, address });
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
exports.updatePaymentMethodBillingDetails = updatePaymentMethodBillingDetails;
|
|
61
|
-
//# sourceMappingURL=paymentMethods.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paymentMethods.js","sourceRoot":"","sources":["../../src/subscriptions/paymentMethods.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,oCAAsC;AACtC,4CAAoC;AAEpC;;GAEG;AACH,SAAsB,iBAAiB;;QAGrC,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACrC,OAAO,WAAG,CAAC,gBAAI,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IAC3D,CAAC;CAAA;AALD,8CAKC;AAED;;GAEG;AACH,SAAsB,gBAAgB,CACpC,eAAuB;;QAEvB,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,EAAE,eAAe,EAAE,CAAC,CAAC;QACzD,OAAO,WAAG,CACR,GAAG,gBAAI,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,IAAI,eAAe,EAAE,CACrE,CAAC;IACJ,CAAC;CAAA;AAPD,4CAOC;AAED;;GAEG;AACH,SAAsB,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,aAAK,CACV,GAAG,gBAAI,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,IAAI,eAAe,kBAAkB,EACpF,EAAE,KAAK,EAAE,OAAO,EAAE,CACnB,CAAC;;CACH;AAbD,8EAaC"}
|