|
| 1 | +import { browser } from '$app/environment'; |
| 2 | +import { goto } from '$app/navigation'; |
| 3 | +import { base } from '$app/paths'; |
1 | 4 | import { page } from '$app/stores';
|
2 |
| -import { derived, get, writable } from 'svelte/store'; |
3 |
| -import { sdk } from './sdk'; |
4 |
| -import { organization, type Organization, type OrganizationError } from './organization'; |
| 5 | +import { trackEvent } from '$lib/actions/analytics'; |
| 6 | +import LimitReached from '$lib/components/billing/alerts/limitReached.svelte'; |
| 7 | +import MarkedForDeletion from '$lib/components/billing/alerts/markedForDeletion.svelte'; |
| 8 | +import MissingPaymentMethod from '$lib/components/billing/alerts/missingPaymentMethod.svelte'; |
| 9 | +import newDevUpgradePro from '$lib/components/billing/alerts/newDevUpgradePro.svelte'; |
| 10 | +import PaymentAuthRequired from '$lib/components/billing/alerts/paymentAuthRequired.svelte'; |
| 11 | +import PaymentMandate from '$lib/components/billing/alerts/paymentMandate.svelte'; |
| 12 | +import { BillingPlan, NEW_DEV_PRO_UPGRADE_COUPON } from '$lib/constants'; |
| 13 | +import { cachedStore } from '$lib/helpers/cache'; |
| 14 | +import { sizeToBytes, type Size } from '$lib/helpers/sizeConvertion'; |
5 | 15 | import type {
|
6 |
| - InvoiceList, |
7 | 16 | AddressesList,
|
| 17 | + Aggregation, |
8 | 18 | Invoice,
|
| 19 | + InvoiceList, |
9 | 20 | PaymentList,
|
10 |
| - PlansMap, |
11 | 21 | PaymentMethodData,
|
12 | 22 | Plan,
|
13 |
| - Aggregation |
| 23 | + PlansMap |
14 | 24 | } from '$lib/sdk/billing';
|
15 | 25 | import { isCloud } from '$lib/system';
|
16 |
| -import { cachedStore } from '$lib/helpers/cache'; |
| 26 | +import { activeHeaderAlert, orgMissingPaymentMethod } from '$routes/(console)/store'; |
17 | 27 | import { Query } from '@appwrite.io/console';
|
| 28 | +import { derived, get, writable } from 'svelte/store'; |
18 | 29 | import { headerAlert } from './headerAlert';
|
19 |
| -import PaymentAuthRequired from '$lib/components/billing/alerts/paymentAuthRequired.svelte'; |
20 | 30 | import { addNotification, notifications } from './notifications';
|
21 |
| -import { goto } from '$app/navigation'; |
22 |
| -import { base } from '$app/paths'; |
23 |
| -import { activeHeaderAlert, orgMissingPaymentMethod } from '$routes/(console)/store'; |
24 |
| -import MarkedForDeletion from '$lib/components/billing/alerts/markedForDeletion.svelte'; |
25 |
| -import { BillingPlan, NEW_DEV_PRO_UPGRADE_COUPON } from '$lib/constants'; |
26 |
| -import PaymentMandate from '$lib/components/billing/alerts/paymentMandate.svelte'; |
27 |
| -import MissingPaymentMethod from '$lib/components/billing/alerts/missingPaymentMethod.svelte'; |
28 |
| -import LimitReached from '$lib/components/billing/alerts/limitReached.svelte'; |
29 |
| -import { trackEvent } from '$lib/actions/analytics'; |
30 |
| -import newDevUpgradePro from '$lib/components/billing/alerts/newDevUpgradePro.svelte'; |
31 |
| -import { sizeToBytes, type Size } from '$lib/helpers/sizeConvertion'; |
32 |
| -import { user } from './user'; |
33 |
| -import { browser } from '$app/environment'; |
| 31 | +import { organization, type Organization, type OrganizationError } from './organization'; |
34 | 32 | import { canSeeBilling } from './roles';
|
| 33 | +import { sdk } from './sdk'; |
| 34 | +import { user } from './user'; |
35 | 35 |
|
36 | 36 | export type Tier = 'tier-0' | 'tier-1' | 'tier-2' | 'auto-1' | 'cont-1' | 'ent-1';
|
37 | 37 |
|
@@ -130,7 +130,8 @@ export type PlanServices =
|
130 | 130 | | 'users'
|
131 | 131 | | 'usersAddon'
|
132 | 132 | | 'webhooks'
|
133 |
| - | 'authPhone'; |
| 133 | + | 'authPhone' |
| 134 | + | 'imageTransformations'; |
134 | 135 |
|
135 | 136 | export function getServiceLimit(serviceId: PlanServices, tier: Tier = null, plan?: Plan): number {
|
136 | 137 | if (!isCloud) return 0;
|
|
0 commit comments