Promise type should include null for both the resolved value
(.catch(() => null)) and the ternary false branch (null).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fetch the organization's primary and backup payment methods via
organizations.getPaymentMethod() instead of filtering account.listPaymentMethods().
The account endpoint only returns the current user's own cards, so if
a different team member added the org's payment method it was invisible
and the billing page incorrectly showed "Add a payment method".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reverted trivial import reordering in sdk.ts, indexes.svelte, and
store.ts caused by SDK update — not part of BAA feature.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move 3DS confirm-addon validation logic from +page.svelte into BAA.svelte
where it belongs. Move addonPrice fetching to +page.ts load function so
data is available before render. Convert BAAEnableModal and
BAADisableModal to Svelte 5 syntax ($props, $state, $bindable).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace client-side proration calculation in BAAEnableModal with
server-side getAddonPrice API call. Update SDK to 24e07fc which adds
confirmAddonPayment (renamed from validateAddonPayment) and
getAddonPrice methods. Remove hard-coded $350 price in favor of
server-returned monthlyPrice. Show loading spinner while fetching
price. Update 409 notification message for clarity.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update @appwrite.io/console SDK from a1b2dc2 to 1fb0624. The new SDK
includes both BAA addon methods and the previously missing Webhooks
class and TablesDBIndexType enum, so the local compat shims
(src/lib/sdk/webhooks.ts, src/lib/sdk/compat.ts) are removed and
imports updated to use the official SDK exports.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Webhooks SDK shim and TablesDBIndexType compat enum to resolve
missing exports from the feature-branch SDK version (a1b2dc2) after
merging main's Webhooks and TablesDB index type changes
- Fix nullable error type in BAADisableModal (string | null)
- Guard against invalid invoice dates in proration calculation
- Show prorated amount in price breakdown Total row instead of monthly
- Add notification on silent 409 (addon already exists)
- Handle PaymentAuthentication response in handleReEnable
- Show error notification when BAA addon lookup fails or addonId is null
- Improve error handling for addon validation redirect flow
The file picker was showing a hardcoded "10MB" limit which didn't
reflect the actual upload limit. Now reads the plan-based fileSize
limit on cloud and displays it dynamically using humanFileSize().
On self-hosted the size hint is hidden since the limit depends on
server configuration.
- Standardize `bun run` prefix across all commands table entries
- Fix database types table: mark vectorsdb as not yet implemented, dedicateddb as cross-repo
- Remove inaccurate DedicatedDB/Compute service claim from console docs
- Add $bindable() usage context in Svelte 5 runes example
- Note Dependencies enum has 66+ keys for cache invalidation
- Mention isSelfHosted alongside isCloud for feature gating
- Add explanatory comment in CLAUDE.md for @AGENTS.md syntax
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>