diff --git a/.gitignore b/.gitignore index 031f4a1f91..2f74d4c156 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store .envrc .vscode +.zed node_modules /build /.svelte-kit diff --git a/package.json b/package.json index 6efe344514..beb42a69fb 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "e2e:ui": "playwright test tests/e2e --ui" }, "dependencies": { - "@appwrite.io/console": "^1.3.2", + "@appwrite.io/console": "^1.4.0", "@appwrite.io/pink": "0.25.0", "@appwrite.io/pink-icons": "0.25.0", "@popperjs/core": "^2.11.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6911738dc..10a5907f57 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@appwrite.io/console': - specifier: ^1.3.2 - version: 1.3.2 + specifier: ^1.4.0 + version: 1.4.0 '@appwrite.io/pink': specifier: 0.25.0 version: 0.25.0 @@ -193,8 +193,8 @@ packages: '@analytics/type-utils@0.6.2': resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==} - '@appwrite.io/console@1.3.2': - resolution: {integrity: sha512-3OKKlhXbEqgWPZxdJjmzVZkOoBbJBkOiTqqQWP9ZnuBNEXwIkaXsneMjkPYS3IEBLkJ9zNMON7rH8kkEgMnEgw==} + '@appwrite.io/console@1.4.0': + resolution: {integrity: sha512-hN4UWdXff/9Xmy53hhglTFBe7TUC7BEJXqjoiewupLWIpcMq90dY4f00t0VncVZW3amUsQUYHbCgUuAHatLA/Q==} '@appwrite.io/pink-icons@0.25.0': resolution: {integrity: sha512-0O3i2oEuh5mWvjO80i+X6rbzrWLJ1m5wmv2/M3a1p2PyBJsFxN8xQMTEmTn3Wl/D26SsM7SpzbdW6gmfgoVU9Q==} @@ -3723,7 +3723,7 @@ snapshots: '@analytics/type-utils@0.6.2': {} - '@appwrite.io/console@1.3.2': {} + '@appwrite.io/console@1.4.0': {} '@appwrite.io/pink-icons@0.25.0': {} diff --git a/src/lib/components/backupDatabaseAlert.svelte b/src/lib/components/backupDatabaseAlert.svelte index dd1b30559a..4aec42b1a6 100644 --- a/src/lib/components/backupDatabaseAlert.svelte +++ b/src/lib/components/backupDatabaseAlert.svelte @@ -1,6 +1,5 @@ {#if $showPolicyAlert && isCloud && $organization?.$id && $page.url.pathname.match(/\/databases\/database-[^/]+$/)} - {@const isFreePlan = $organization?.billingPlan === BillingPlan.FREE} + {@const isFreePlan = $organization?.billingPlan === BillingPlan.Tier0} {@const subtitle = isFreePlan ? 'Upgrade your plan to ensure your data stays safe and backed up' diff --git a/src/lib/components/backupRestoreBox.svelte b/src/lib/components/backupRestoreBox.svelte index 842c15e19e..2882f5f854 100644 --- a/src/lib/components/backupRestoreBox.svelte +++ b/src/lib/components/backupRestoreBox.svelte @@ -1,10 +1,10 @@ -{#if $organization?.$id && $organization?.billingPlan === BillingPlan.FREE && $readOnly && !hideBillingHeaderRoutes.includes($page.url.pathname)} +{#if $organization?.$id && $organization?.billingPlan === BillingPlan.Tier0 && $readOnly && !hideBillingHeaderRoutes.includes($page.url.pathname)} diff --git a/src/lib/components/billing/alerts/missingPaymentMethod.svelte b/src/lib/components/billing/alerts/missingPaymentMethod.svelte index 1dbfda5659..e279a3f472 100644 --- a/src/lib/components/billing/alerts/missingPaymentMethod.svelte +++ b/src/lib/components/billing/alerts/missingPaymentMethod.svelte @@ -1,14 +1,14 @@ -{#if ($orgMissingPaymentMethod.billingPlan === BillingPlan.PRO || $orgMissingPaymentMethod.billingPlan === BillingPlan.SCALE) && !$orgMissingPaymentMethod.paymentMethodId && !$orgMissingPaymentMethod.backupPaymentMethodId && !hideBillingHeaderRoutes.includes($page.url.pathname)} +{#if ($orgMissingPaymentMethod.billingPlan === BillingPlan.Tier1 || $orgMissingPaymentMethod.billingPlan === BillingPlan.Tier2) && !$orgMissingPaymentMethod.paymentMethodId && !$orgMissingPaymentMethod.backupPaymentMethodId && !hideBillingHeaderRoutes.includes($page.url.pathname)} diff --git a/src/lib/components/billing/alerts/newDevUpgradePro.svelte b/src/lib/components/billing/alerts/newDevUpgradePro.svelte index c58ad72683..ef835b2ec6 100644 --- a/src/lib/components/billing/alerts/newDevUpgradePro.svelte +++ b/src/lib/components/billing/alerts/newDevUpgradePro.svelte @@ -2,7 +2,7 @@ import { base } from '$app/paths'; import { page } from '$app/stores'; import { trackEvent } from '$lib/actions/analytics'; - import { BillingPlan } from '$lib/constants'; + import { BillingPlan } from '@appwrite.io/console'; import { Button } from '$lib/elements/forms'; import { organization } from '$lib/stores/organization'; import { activeHeaderAlert } from '$routes/(console)/store'; @@ -21,7 +21,7 @@ } -{#if show && $organization?.$id && $organization?.billingPlan === BillingPlan.FREE && !$page.url.pathname.includes('/console/account')} +{#if show && $organization?.$id && $organization?.billingPlan === BillingPlan.Tier0 && !$page.url.pathname.includes('/console/account')}
Get $50 Cloud credits for Appwrite Pro. diff --git a/src/lib/components/billing/alerts/paymentMandate.svelte b/src/lib/components/billing/alerts/paymentMandate.svelte index fa7f75a858..8a7e06b16e 100644 --- a/src/lib/components/billing/alerts/paymentMandate.svelte +++ b/src/lib/components/billing/alerts/paymentMandate.svelte @@ -8,8 +8,7 @@ import { confirmSetup } from '$lib/stores/stripe'; async function verifyPaymentMethod() { - const method = await sdk.forConsole.billing.setupPaymentMandate( - $organization.$id, + const method = await sdk.forConsole.account.updatePaymentMethodMandateOptions( $paymentMissingMandate.$id ); await confirmSetup(method.clientSecret, method.$id); diff --git a/src/lib/components/billing/couponInput.svelte b/src/lib/components/billing/couponInput.svelte index 369619afed..2375bb5754 100644 --- a/src/lib/components/billing/couponInput.svelte +++ b/src/lib/components/billing/couponInput.svelte @@ -1,15 +1,15 @@

- Your payment method will be charged this amount plus usage fees every 30 days {!currentPlan.trialDays + Your payment method will be charged this amount plus usage fees every 30 days {!currentPlan.trial ? `starting ${toLocaleDate(billingPayDate.toString())}` : ` after your trial period ends on ${toLocaleDate(trialEndDate.toString())}`}.

diff --git a/src/lib/components/billing/planComparisonBox.svelte b/src/lib/components/billing/planComparisonBox.svelte index c48dabfc38..1ab5d8fad2 100644 --- a/src/lib/components/billing/planComparisonBox.svelte +++ b/src/lib/components/billing/planComparisonBox.svelte @@ -1,10 +1,10 @@ {#if billingPlan} @@ -24,7 +24,7 @@ name="plan" bind:group={billingPlan} disabled={anyOrgFree || !selfService} - value={BillingPlan.FREE} + value={BillingPlan.Tier0} tooltipShow={anyOrgFree} tooltipText="You are limited to 1 Free organization per account." padding={1.5}> @@ -34,7 +34,7 @@ class:u-opacity-50={disabled}>

{tierFree.name} - {#if $organization?.billingPlan === BillingPlan.FREE && !isNewOrg} + {#if $organization?.billingPlan === BillingPlan.Tier0 && !isNewOrg} Current plan {/if}

@@ -54,7 +54,7 @@ name="plan" disabled={!selfService} bind:group={billingPlan} - value={BillingPlan.PRO} + value={BillingPlan.Tier1} padding={1.5}>

{tierPro.name} - {#if $organization?.billingPlan === BillingPlan.PRO && !isNewOrg} + {#if $organization?.billingPlan === BillingPlan.Tier1 && !isNewOrg} Current plan {/if}

@@ -76,18 +76,18 @@ - {#if $organization?.billingPlan === BillingPlan.SCALE} + {#if $organization?.billingPlan === BillingPlan.Tier2}
  • {tierScale.name} - {#if $organization?.billingPlan === BillingPlan.SCALE && !isNewOrg} + {#if $organization?.billingPlan === BillingPlan.Tier2 && !isNewOrg} Current plan {/if}

    diff --git a/src/lib/components/billing/selectPaymentMethod.svelte b/src/lib/components/billing/selectPaymentMethod.svelte index 937d6bc67c..1f57582caf 100644 --- a/src/lib/components/billing/selectPaymentMethod.svelte +++ b/src/lib/components/billing/selectPaymentMethod.svelte @@ -1,14 +1,15 @@ {#if isFree} - Usage on the {$plansInfo?.get(BillingPlan.FREE).name} plan is limited for the following resources. + Usage on the {$plansInfo?.get(BillingPlan.Tier0).name} plan is limited for the following resources. Next billing period: {toLocaleDate(nextDate)}. - {:else if org.billingPlan === BillingPlan.PRO} + {:else if org.billingPlan === BillingPlan.Tier1}

    Usage on the Pro plan will be charged at the end of each billing period at the following rates. Next billing period: {toLocaleDate(nextDate)}.

    - {:else if org.billingPlan === BillingPlan.SCALE} + {:else if org.billingPlan === BillingPlan.Tier2}

    Usage on the Scale plan will be charged at the end of each billing period at the following rates. Next billing period: {toLocaleDate(nextDate)}. diff --git a/src/lib/components/billing/validateCreditModal.svelte b/src/lib/components/billing/validateCreditModal.svelte index 961e041442..a540506dbe 100644 --- a/src/lib/components/billing/validateCreditModal.svelte +++ b/src/lib/components/billing/validateCreditModal.svelte @@ -18,7 +18,7 @@ async function addCoupon() { try { - const response = await sdk.forConsole.billing.getCoupon(coupon); + const response = await sdk.forConsole.console.getCoupon(coupon); couponData = response; dispatch('validation', couponData); coupon = null; diff --git a/src/lib/components/bottomModalAlert.svelte b/src/lib/components/bottomModalAlert.svelte index 03ace8873f..f4392cb9a6 100644 --- a/src/lib/components/bottomModalAlert.svelte +++ b/src/lib/components/bottomModalAlert.svelte @@ -10,7 +10,7 @@ } from '$lib/stores/bottom-alerts'; import { onMount } from 'svelte'; import { organization } from '$lib/stores/organization'; - import { BillingPlan } from '$lib/constants'; + import { BillingPlan } from '@appwrite.io/console'; import { upgradeURL } from '$lib/stores/billing'; import { addBottomModalAlerts } from '$routes/(console)/bottomAlerts'; import { project } from '$routes/(console)/project-[project]/store'; @@ -74,10 +74,10 @@ case 'free': return false; case 'pro': - return organizationPlan === BillingPlan.FREE; + return organizationPlan === BillingPlan.Tier0; case 'scale': return ( - organizationPlan === BillingPlan.FREE || organizationPlan === BillingPlan.PRO + organizationPlan === BillingPlan.Tier0 || organizationPlan === BillingPlan.Tier1 ); } } diff --git a/src/lib/components/creditCardInfo.svelte b/src/lib/components/creditCardInfo.svelte index f187431340..27301a97e9 100644 --- a/src/lib/components/creditCardInfo.svelte +++ b/src/lib/components/creditCardInfo.svelte @@ -1,10 +1,10 @@

    diff --git a/src/lib/components/roles/upgrade.svelte b/src/lib/components/roles/upgrade.svelte index 9e54874762..ab0d519671 100644 --- a/src/lib/components/roles/upgrade.svelte +++ b/src/lib/components/roles/upgrade.svelte @@ -3,17 +3,17 @@ import { upgradeURL } from '$lib/stores/billing'; import { isCloud } from '$lib/system'; import { organization } from '$lib/stores/organization'; - import { BillingPlan } from '$lib/constants'; + import { BillingPlan } from '@appwrite.io/console'; import Button from '$lib/elements/forms/button.svelte'; {#if isCloud} - {#if $organization?.billingPlan !== BillingPlan.FREE} + {#if $organization?.billingPlan !== BillingPlan.Tier0}

    Roles - {#if $organization?.billingPlan === BillingPlan.FREE} + {#if $organization?.billingPlan === BillingPlan.Tier0} Pro plan {/if}

    @@ -27,7 +27,7 @@

    Roles - {#if $organization?.billingPlan === BillingPlan.FREE} + {#if $organization?.billingPlan === BillingPlan.Tier0} Pro plan {/if}

    diff --git a/src/lib/components/support.svelte b/src/lib/components/support.svelte index 66d922d410..7e2ec964e9 100644 --- a/src/lib/components/support.svelte +++ b/src/lib/components/support.svelte @@ -6,7 +6,7 @@ import { showSupportModal } from '$routes/(console)/wizard/support/store'; import { isCloud } from '$lib/system'; import { organization } from '$lib/stores/organization'; - import { BillingPlan } from '$lib/constants'; + import { BillingPlan } from '@appwrite.io/console'; import { trackEvent } from '$lib/actions/analytics'; import { localeTimezoneName, utcHourToLocaleHour } from '$lib/helpers/date'; import { upgradeURL } from '$lib/stores/billing'; @@ -14,8 +14,8 @@ export let show = false; $: isPaid = - $organization?.billingPlan === BillingPlan.PRO || - $organization?.billingPlan === BillingPlan.SCALE; + $organization?.billingPlan === BillingPlan.Tier1 || + $organization?.billingPlan === BillingPlan.Tier2; $: supportTimings = `${utcHourToLocaleHour('16:00')} - ${utcHourToLocaleHour('00:00')} ${localeTimezoneName()}`; @@ -30,7 +30,7 @@

    {/if}
    - {#if $organization?.billingPlan === BillingPlan.FREE} + {#if $organization?.billingPlan === BillingPlan.Tier0} to increase your log retention for a longer period. {/if} diff --git a/src/lib/layout/containerButton.svelte b/src/lib/layout/containerButton.svelte index e0b0512d35..f1fc32b7bd 100644 --- a/src/lib/layout/containerButton.svelte +++ b/src/lib/layout/containerButton.svelte @@ -1,13 +1,13 @@ diff --git a/src/routes/(console)/apply-credit/+page.svelte b/src/routes/(console)/apply-credit/+page.svelte index a621bff958..1c7b6b8b88 100644 --- a/src/routes/(console)/apply-credit/+page.svelte +++ b/src/routes/(console)/apply-credit/+page.svelte @@ -8,7 +8,7 @@ EstimatedTotalBox, SelectPaymentMethod } from '$lib/components/billing'; - import { BillingPlan, Dependencies } from '$lib/constants'; + import { Dependencies } from '$lib/constants'; import { Button, Form, FormList, InputSelect, InputTags, InputText } from '$lib/elements/forms'; import { toLocaleDate } from '$lib/helpers/date'; import { @@ -16,13 +16,12 @@ WizardSecondaryContent, WizardSecondaryFooter } from '$lib/layout'; - import { type PaymentList } from '$lib/sdk/billing'; import { app } from '$lib/stores/app'; import { campaigns } from '$lib/stores/campaigns'; import { addNotification } from '$lib/stores/notifications'; import { organizationList, type Organization } from '$lib/stores/organization'; import { sdk } from '$lib/stores/sdk'; - import { ID } from '@appwrite.io/console'; + import { ID, BillingPlan, type Models } from '@appwrite.io/console'; import { onMount } from 'svelte'; import { writable } from 'svelte/store'; @@ -49,7 +48,7 @@ let formComponent: Form; let couponForm: Form; let isSubmitting = writable(false); - let methods: PaymentList; + let methods: Models.PaymentMethodList; let paymentMethodId: string; let collaborators: string[]; let taxId: string; @@ -69,7 +68,7 @@ let coupon: string; let couponData = data?.couponData; let campaign = campaigns.get(data?.couponData?.campaign ?? data?.campaign); - let billingPlan = BillingPlan.PRO; + let billingPlan = BillingPlan.Tier1; onMount(async () => { await loadPaymentMethods(); @@ -86,7 +85,7 @@ }); async function loadPaymentMethods() { - const methodList = await sdk.forConsole.billing.listPaymentMethods(); + const methodList = await sdk.forConsole.account.listPaymentMethods(); const filteredMethods = methodList.paymentMethods.filter((method) => !!method?.last4); methods = { paymentMethods: filteredMethods, total: filteredMethods.length }; paymentMethodId = @@ -101,21 +100,21 @@ let org: Organization; // Create new org if (selectedOrgId === newOrgId) { - org = await sdk.forConsole.billing.createOrganization( + org = (await sdk.forConsole.organizations.create( newOrgId, name, billingPlan, paymentMethodId - ); + )) as unknown as Organization; } // Upgrade existing org - else if (selectedOrg?.billingPlan === BillingPlan.FREE) { - org = await sdk.forConsole.billing.updatePlan( + else if (selectedOrg?.billingPlan === BillingPlan.Tier0) { + org = (await sdk.forConsole.organizations.updatePlan( selectedOrg.$id, billingPlan, paymentMethodId, null - ); + )) as unknown as Organization; } // Existing pro org else { @@ -124,12 +123,12 @@ // Add coupon if (couponData?.code) { - await sdk.forConsole.billing.addCredit(org.$id, couponData.code); + await sdk.forConsole.organizations.addCredit(org.$id, couponData.code); } // Add budget if (billingBudget) { - await sdk.forConsole.billing.updateBudget(org.$id, billingBudget, [75]); + await sdk.forConsole.organizations.updateBudget(org.$id, billingBudget, [75]); } // Add collaborators @@ -148,7 +147,7 @@ // Add tax ID if (taxId) { - await sdk.forConsole.billing.updateTaxId(org.$id, taxId); + await sdk.forConsole.organizations.setBillingTaxId(org.$id, taxId); } trackEvent(Submit.CreditRedeem, { coupon: couponData.code, @@ -172,7 +171,7 @@ async function addCoupon() { try { - const response = await sdk.forConsole.billing.getCoupon(coupon); + const response = await sdk.forConsole.console.getCoupon(coupon); couponData = response; coupon = null; addNotification({ @@ -212,7 +211,7 @@ placeholder="Select organization" id="organization" /> {/if} - {#if selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.PRO || !selectedOrg?.paymentMethodId)} + {#if selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.Tier1 || !selectedOrg?.paymentMethodId)} {#if selectedOrgId === newOrgId}
    {/if} - {#if selectedOrg?.$id && selectedOrg?.billingPlan !== BillingPlan.FREE} + {#if selectedOrg?.$id && selectedOrg?.billingPlan !== BillingPlan.Tier0}
    diff --git a/src/routes/(console)/apply-credit/+page.ts b/src/routes/(console)/apply-credit/+page.ts index 96b06dd30d..6338e838af 100644 --- a/src/routes/(console)/apply-credit/+page.ts +++ b/src/routes/(console)/apply-credit/+page.ts @@ -11,7 +11,7 @@ export const load: PageLoad = async ({ url }) => { let couponData: Coupon; const code = url.searchParams.get('code'); try { - couponData = await sdk.forConsole.billing.getCoupon(code); + couponData = await sdk.forConsole.console.getCoupon(code); } catch (e) { redirect(303, base); } diff --git a/src/routes/(console)/create-organization/+page.svelte b/src/routes/(console)/create-organization/+page.svelte index 137ede330a..463f35ab25 100644 --- a/src/routes/(console)/create-organization/+page.svelte +++ b/src/routes/(console)/create-organization/+page.svelte @@ -11,24 +11,24 @@ } from '$lib/components/billing'; import ValidateCreditModal from '$lib/components/billing/validateCreditModal.svelte'; import Default from '$lib/components/roles/default.svelte'; - import { BillingPlan, Dependencies } from '$lib/constants'; + import { Dependencies } from '$lib/constants'; import { Button, Form, FormList, InputTags, InputText, Label } from '$lib/elements/forms'; import { WizardSecondaryContainer, WizardSecondaryContent, WizardSecondaryFooter } from '$lib/layout'; - import type { Coupon, PaymentList } from '$lib/sdk/billing'; + import type { Coupon } from '$lib/sdk/billing'; import { tierToPlan } from '$lib/stores/billing'; import { addNotification } from '$lib/stores/notifications'; import { organizationList, type Organization } from '$lib/stores/organization'; import { sdk } from '$lib/stores/sdk'; - import { ID } from '@appwrite.io/console'; + import { ID, BillingPlan, type Models } from '@appwrite.io/console'; import { onMount } from 'svelte'; import { writable } from 'svelte/store'; $: anyOrgFree = $organizationList.teams?.some( - (org) => (org as Organization)?.billingPlan === BillingPlan.FREE + (org) => (org as Organization)?.billingPlan === BillingPlan.Tier0 ); const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$/i; let previousPage: string = base; @@ -41,9 +41,9 @@ let formComponent: Form; let isSubmitting = writable(false); - let methods: PaymentList; + let methods: Models.PaymentMethodList; let name: string; - let billingPlan: BillingPlan = BillingPlan.FREE; + let billingPlan: BillingPlan = BillingPlan.Tier0; let paymentMethodId: string; let collaborators: string[] = []; let couponData: Partial = { @@ -60,7 +60,7 @@ if ($page.url.searchParams.has('coupon')) { const coupon = $page.url.searchParams.get('coupon'); try { - const response = await sdk.forConsole.billing.getCoupon(coupon); + const response = await sdk.forConsole.console.getCoupon(coupon); couponData = response; } catch (e) { couponData = { @@ -80,12 +80,12 @@ } } if (anyOrgFree) { - billingPlan = BillingPlan.PRO; + billingPlan = BillingPlan.Tier1; } }); async function loadPaymentMethods() { - methods = await sdk.forConsole.billing.listPaymentMethods(); + methods = await sdk.forConsole.account.listPaymentMethods(); paymentMethodId = methods.paymentMethods.find((method) => !!method?.last4)?.$id ?? null; } @@ -93,31 +93,31 @@ try { let org: Organization; - if (billingPlan === BillingPlan.FREE) { - org = await sdk.forConsole.billing.createOrganization( + if (billingPlan === BillingPlan.Tier0) { + org = (await sdk.forConsole.organizations.create( ID.unique(), name, - BillingPlan.FREE, + BillingPlan.Tier0, null, null - ); + )) as unknown as Organization; } else { - org = await sdk.forConsole.billing.createOrganization( + org = (await sdk.forConsole.organizations.create( ID.unique(), name, billingPlan, paymentMethodId, null - ); + )) as unknown as Organization; //Add budget if (billingBudget) { - await sdk.forConsole.billing.updateBudget(org.$id, billingBudget, [75]); + await sdk.forConsole.organizations.updateBudget(org.$id, billingBudget, [75]); } //Add coupon if (couponData?.code) { - await sdk.forConsole.billing.addCredit(org.$id, couponData.code); + await sdk.forConsole.organizations.addCredit(org.$id, couponData.code); trackEvent(Submit.CreditRedeem); } @@ -137,7 +137,7 @@ // Add tax ID if (taxId) { - await sdk.forConsole.billing.updateTaxId(org.$id, taxId); + await sdk.forConsole.organizations.setBillingTaxId(org.$id, taxId); } } @@ -163,7 +163,7 @@ } } - $: if (billingPlan !== BillingPlan.FREE) { + $: if (billingPlan !== BillingPlan.Tier0) { loadPaymentMethods(); } @@ -190,7 +190,7 @@ .

    - {#if billingPlan !== BillingPlan.FREE} + {#if billingPlan !== BillingPlan.Tier0} - + {#if !couponData?.code}

    - {#if $organization?.billingPlan === BillingPlan.FREE} + {#if $organization?.billingPlan === BillingPlan.Tier0} Budget caps are a Pro plan feature @@ -92,7 +93,7 @@ - {#if $organization?.billingPlan === BillingPlan.FREE} + {#if $organization?.billingPlan === BillingPlan.Tier0}
    - {#if $organization?.billingPlan !== BillingPlan.FREE && extraUsage > 0} + {#if $organization?.billingPlan !== BillingPlan.Tier0 && extraUsage > 0} Add-ons
    - {$organization?.billingPlan === BillingPlan.FREE + {$organization?.billingPlan === BillingPlan.Tier0 ? formatCurrency(0) : formatCurrency(currentInvoice?.amount ?? 0)}
    @@ -159,7 +158,7 @@
    - {#if $organization?.billingPlan === BillingPlan.FREE} + {#if $organization?.billingPlan === BillingPlan.Tier0}