Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bf2166b
feat: implement BAA addon management
lohanidamodar Feb 24, 2026
b93b07d
Merge remote-tracking branch 'origin/main' into feat-baa
lohanidamodar Feb 26, 2026
fa54499
update sdk
lohanidamodar Feb 26, 2026
599ce48
Update BAA addon handling and pricing in console settings
lohanidamodar Mar 1, 2026
2465da5
Merge remote-tracking branch 'origin/main' into feat-baa
lohanidamodar Mar 1, 2026
12db4e6
typo
lohanidamodar Mar 1, 2026
23dd014
format
lohanidamodar Mar 1, 2026
dd159cf
rename addon display name
lohanidamodar Mar 1, 2026
214ba5c
Update BAA addon methods and console dependency version
lohanidamodar Mar 3, 2026
e50b147
Fix typo in BAA addon name and update type for error handling in BAAE…
lohanidamodar Mar 3, 2026
7488e57
Merge remote-tracking branch 'origin/main' into feat-baa
lohanidamodar Mar 3, 2026
f63879a
Fix migration changes
lohanidamodar Mar 3, 2026
fdc0387
Merge remote-tracking branch 'origin/main' into feat-baa
lohanidamodar Mar 8, 2026
2189d93
bun update
lohanidamodar Mar 8, 2026
165cea1
upgrade console package
lohanidamodar Mar 8, 2026
55c9b4c
Merge remote-tracking branch 'origin/main' into feat-baa
lohanidamodar Mar 18, 2026
3c15f67
Merge origin/main into feat-baa
lohanidamodar Apr 5, 2026
3665c85
Fix build failures after main merge and address review comments
lohanidamodar Apr 5, 2026
deb54b0
chore: sync with main and update console SDK to 1fb0624
lohanidamodar Apr 5, 2026
a3b99b6
fix: use server-side proration and update SDK for BAA addon
lohanidamodar Apr 6, 2026
4c84512
fix: address PR review - move BAA logic to component, load price in +…
lohanidamodar Apr 6, 2026
0459896
revert: remove unrelated import change in indexes/create.svelte
lohanidamodar Apr 6, 2026
8be2c4c
revert: remove unrelated SDK import changes
lohanidamodar Apr 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@467cd21",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@24e07fc",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3",
"@appwrite.io/pink-legacy": "^1.0.3",
Expand Down
2 changes: 2 additions & 0 deletions src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ export enum Submit {
MessagingTopicSubscriberDelete = 'submit_messaging_topic_subscriber_delete',
ApplyQuickFilter = 'submit_apply_quick_filter',
RequestBAA = 'submit_request_baa',
BAAAddonEnable = 'submit_baa_addon_enable',
BAAAddonDisable = 'submit_baa_addon_disable',
RequestSoc2 = 'submit_request_soc2',
SiteCreate = 'submit_site_create',
SiteDelete = 'submit_site_delete',
Expand Down
3 changes: 2 additions & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export enum Dependencies {
MESSAGING_TOPIC_SUBSCRIBERS = 'dependency:messaging_topic_subscribers',
SITE = 'dependency:site',
SITES = 'dependency:sites',
SITES_DOMAINS = 'dependency:sites_domains'
SITES_DOMAINS = 'dependency:sites_domains',
ADDONS = 'dependency:addons'
}

export const defaultScopes: string[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const load: PageLoad = async ({ parent, depends, url, route }) => {
depends(Dependencies.CREDIT);
depends(Dependencies.INVOICES);
depends(Dependencies.ADDRESS);
depends(Dependencies.ADDONS);
// aggregation reloads on page param changes
depends(Dependencies.BILLING_AGGREGATION);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,17 @@
};

// addons (additional members, projects, etc.)
const billingAddonNames: Record<string, string> = {
addon_baa: 'HIPAA BAA'
};

const addons = (currentAggregation?.resources || [])
.filter((r) => r.amount > 0 && currentPlan?.addons?.[r.resourceId]?.price > 0)
.filter(
(r) =>
r.amount > 0 &&
(currentPlan?.addons?.[r.resourceId]?.price > 0 ||
r.resourceId.startsWith('addon_'))
)
.map((addon) => ({
id: `addon-${addon.resourceId}`,
expandable: false,
Expand All @@ -260,7 +269,8 @@
? 'Additional members'
: addon.resourceId === 'projects'
? 'Additional projects'
: `${addon.resourceId} overage (${formatNum(addon.value)})`,
: (billingAddonNames[addon.resourceId] ??
`${addon.resourceId} overage (${formatNum(addon.value)})`),
usage: '',
price: formatCurrency(addon.amount)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

{#if isCloud}
<DownloadDPA />
<Baa locale={data.locale} countryList={data.countryList} />
<Baa addons={data.addons} addonPrice={data.addonPrice} />
<Soc2 locale={data.locale} countryList={data.countryList} />
{/if}

Expand Down
24 changes: 21 additions & 3 deletions src/routes/(console)/organization-[organization]/settings/+page.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,45 @@
import type { PageLoad } from './$types';
import { Dependencies } from '$lib/constants';
import { sdk } from '$lib/stores/sdk';
import { Query } from '@appwrite.io/console';
import { Addon, Query } from '@appwrite.io/console';
import { isCloud } from '$lib/system';

export const load: PageLoad = async ({ depends, params, parent }) => {
const { countryList, locale } = await parent();
depends(Dependencies.ORGANIZATION);
depends(Dependencies.ADDONS);

const [projects, invoices] = await Promise.all([
const [projects, invoices, addons, addonPrice] = await Promise.all([
sdk.forConsole.projects.list({
queries: [Query.equal('teamId', params.organization), Query.select(['$id', 'name'])]
}),
isCloud
? sdk.forConsole.organizations.listInvoices({
organizationId: params.organization
})
: undefined
: undefined,
isCloud
? sdk.forConsole.organizations
.listAddons({
organizationId: params.organization
})
.catch(() => null)
: null,
isCloud
? sdk.forConsole.organizations
.getAddonPrice({
organizationId: params.organization,
addon: Addon.Baa
})
.catch(() => null)
: null
]);

return {
projects,
invoices,
addons,
addonPrice,
countryList,
locale
};
Expand Down
Loading
Loading