mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
feat(premium): native Nordic prices and subscribing during grace (#3274)
This commit is contained in:
1 parent
0ef1cd14c3
commit
7a4aa42d4b
84 files changed
+7720
-4589
No files matched your search
@@ -222,6 +222,22 @@ describe('buildNamedFluxerEnvOverrides', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('maps the four ISK Stripe price variables', () => {
|
||||
const overrides = buildNamedFluxerEnvOverrides({
|
||||
FLUXER_STRIPE_PRICE_MONTHLY_ISK: 'price_monthly_isk',
|
||||
FLUXER_STRIPE_PRICE_YEARLY_ISK: 'price_yearly_isk',
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_MONTH_ISK: 'price_gift_1_month_isk',
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_YEAR_ISK: 'price_gift_1_year_isk',
|
||||
});
|
||||
|
||||
expect((overrides.integrations as {stripe: {prices: unknown}}).stripe.prices).toEqual({
|
||||
monthly_isk: 'price_monthly_isk',
|
||||
yearly_isk: 'price_yearly_isk',
|
||||
gift_1_month_isk: 'price_gift_1_month_isk',
|
||||
gift_1_year_isk: 'price_gift_1_year_isk',
|
||||
});
|
||||
});
|
||||
|
||||
test('the Stripe price blob applies on its own when no individual price var is set', () => {
|
||||
const overrides = buildNamedFluxerEnvOverrides({
|
||||
FLUXER_STRIPE_PRICES: '{"monthly_brl":"price_blob_monthly_brl","yearly_brl":"price_blob_yearly_brl"}',
|
||||
|
||||
@@ -24,7 +24,7 @@ const API_SETTINGS_NOT_FORWARDED: Record<string, string> = {
|
||||
FLUXER_API_AUTOMATED_MESSAGE_DELETION_DELAY_DAYS: 'automated account actions run only on the hosted service',
|
||||
...Object.fromEntries(
|
||||
['MONTHLY', 'YEARLY', 'GIFT_1_MONTH', 'GIFT_1_YEAR'].flatMap((slot) =>
|
||||
['USD', 'EUR', 'BRL', 'DKK', 'INR', 'NOK', 'PLN', 'SEK', 'TRY'].map((currency) => [
|
||||
['USD', 'EUR', 'BRL', 'DKK', 'INR', 'ISK', 'NOK', 'PLN', 'SEK', 'TRY'].map((currency) => [
|
||||
`FLUXER_STRIPE_PRICE_${slot}_${currency}`,
|
||||
'FLUXER_STRIPE_PRICES or the dashboard sets prices',
|
||||
]),
|
||||
|
||||
@@ -189,6 +189,7 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
|
||||
FLUXER_STRIPE_PRICE_MONTHLY_BRL: {path: ['integrations', 'stripe', 'prices', 'monthly_brl']},
|
||||
FLUXER_STRIPE_PRICE_MONTHLY_DKK: {path: ['integrations', 'stripe', 'prices', 'monthly_dkk']},
|
||||
FLUXER_STRIPE_PRICE_MONTHLY_INR: {path: ['integrations', 'stripe', 'prices', 'monthly_inr']},
|
||||
FLUXER_STRIPE_PRICE_MONTHLY_ISK: {path: ['integrations', 'stripe', 'prices', 'monthly_isk']},
|
||||
FLUXER_STRIPE_PRICE_MONTHLY_NOK: {path: ['integrations', 'stripe', 'prices', 'monthly_nok']},
|
||||
FLUXER_STRIPE_PRICE_MONTHLY_PLN: {path: ['integrations', 'stripe', 'prices', 'monthly_pln']},
|
||||
FLUXER_STRIPE_PRICE_MONTHLY_SEK: {path: ['integrations', 'stripe', 'prices', 'monthly_sek']},
|
||||
@@ -198,6 +199,7 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
|
||||
FLUXER_STRIPE_PRICE_YEARLY_BRL: {path: ['integrations', 'stripe', 'prices', 'yearly_brl']},
|
||||
FLUXER_STRIPE_PRICE_YEARLY_DKK: {path: ['integrations', 'stripe', 'prices', 'yearly_dkk']},
|
||||
FLUXER_STRIPE_PRICE_YEARLY_INR: {path: ['integrations', 'stripe', 'prices', 'yearly_inr']},
|
||||
FLUXER_STRIPE_PRICE_YEARLY_ISK: {path: ['integrations', 'stripe', 'prices', 'yearly_isk']},
|
||||
FLUXER_STRIPE_PRICE_YEARLY_NOK: {path: ['integrations', 'stripe', 'prices', 'yearly_nok']},
|
||||
FLUXER_STRIPE_PRICE_YEARLY_PLN: {path: ['integrations', 'stripe', 'prices', 'yearly_pln']},
|
||||
FLUXER_STRIPE_PRICE_YEARLY_SEK: {path: ['integrations', 'stripe', 'prices', 'yearly_sek']},
|
||||
@@ -210,6 +212,8 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_YEAR_DKK: {path: ['integrations', 'stripe', 'prices', 'gift_1_year_dkk']},
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_MONTH_NOK: {path: ['integrations', 'stripe', 'prices', 'gift_1_month_nok']},
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_YEAR_NOK: {path: ['integrations', 'stripe', 'prices', 'gift_1_year_nok']},
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_MONTH_ISK: {path: ['integrations', 'stripe', 'prices', 'gift_1_month_isk']},
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_YEAR_ISK: {path: ['integrations', 'stripe', 'prices', 'gift_1_year_isk']},
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_MONTH_BRL: {path: ['integrations', 'stripe', 'prices', 'gift_1_month_brl']},
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_MONTH_INR: {path: ['integrations', 'stripe', 'prices', 'gift_1_month_inr']},
|
||||
FLUXER_STRIPE_PRICE_GIFT_1_MONTH_PLN: {path: ['integrations', 'stripe', 'prices', 'gift_1_month_pln']},
|
||||
|
||||
@@ -31,6 +31,7 @@ const EU_EEA_COUNTRY_CODES = [
|
||||
'IS',
|
||||
'LI',
|
||||
'NO',
|
||||
'AX',
|
||||
] as const;
|
||||
const EU_EEA_COUNTRY_CODE_SET: ReadonlySet<string> = new Set(EU_EEA_COUNTRY_CODES);
|
||||
|
||||
|
||||
Reference in new issue
Block a user