Files
zeekay 1c7d419444 refactor(api): finish the caller move, and stop tracking build output
Frontend, plugin server, MCP service, Stripe app, CLI, Playwright and the CI
scripts now say /v1/. Three of these were invisible to a plain search for the
literal, and each would have silently stopped matching:

- api.ts PROJECT_ID_REGEX, which guards against null/undefined project ids
- isExternalLink's scheme test in lib/utils/url.ts
- the exporter's interview-token redaction

Two more that a naive sweep would have missed: our own cloud hosts precede the
path in test assertions and pagination fixtures (us.hanzo.ai/api/…,
testserver/api/…), and stripe-app.json's CSP connect-src had to move or the
deployed app's /v1/ fetches would be blocked by the browser.

Also stops tracking the compiled InsightsQL parser. Building it locally is what
makes the URLconf boot at all, and an earlier commit of mine swept the output
into git along with this worktree's absolute path; .gitignore now keeps it out.

Still at /api/, named rather than assumed: the plugin server's own Express
routes (the ingress splits on that prefix and lives in another repo), the SDK
aliases the ingress routes to the Rust fleets, the cross-region EU->US spend
redirect, and the MCP tool tests that assert paths from generated handlers --
those move with the regeneration, not before it.
2026-08-08 18:58:46 -07:00

133 lines
4.7 KiB
JSON

{
"$schema": "https://stripe.com/stripe-app.schema.json",
"id": "com.insights.stripe",
"name": "Insights",
"version": "1.3.0",
"icon": "./assets/logomark.png",
"provisioning": {
"base_url": "https://us.hanzo.ai/v1/partners/stripe/",
"oauth_scopes": [
"query:read",
"project:read",
"feature_flag:read",
"experiment:read",
"customer_journey:read",
"insight:read"
],
"oauth_token_endpoint": "https://us.hanzo.ai/v1/partners/stripe/oauth/token",
"oauth_client_id": "3pFZtlNOg7UEBtr8t0rBAEbI8E4GBf1YqIC2L4jJ",
"oauth_client_secret_secret_store_key": "oauth_client_secret",
"account_configuration_schema": "{\"type\":\"object\",\"properties\":{\"region\":{\"type\":\"string\",\"enum\":[\"US\",\"EU\"],\"description\":\"Which Insights region to connect the Stripe account to\"},\"organization_name\":{\"type\":\"string\",\"description\":\"Name for the Insights organization\"}},\"required\":[\"region\"],\"additionalProperties\":false}",
"capabilities": ["resources:update_service"],
"deep_link_purposes": ["dashboard"],
"llm_context": "https://hanzo.ai/stripe/llm-context.md"
},
"ui_extension": {
"views": [
{
"viewport": "stripe.dashboard.home.overview",
"component": "Home"
},
{
"viewport": "stripe.dashboard.fullpage",
"component": "FullPage"
},
{
"viewport": "settings",
"component": "Settings"
},
{
"viewport": "onboarding",
"component": "Onboarding"
}
],
"content_security_policy": {
"connect-src": ["https://us.hanzo.ai/v1/", "https://eu.hanzo.ai/v1/"],
"purpose": "Connect to Insights API to populate the UI with Insights data"
}
},
"extensions": null,
"permissions": [
{
"permission": "secret_write",
"purpose": "Store Insights OAuth tokens securely"
},
{
"permission": "balance_transaction_source_read",
"purpose": "Read balance transactions for data syncing"
},
{
"permission": "charge_read",
"purpose": "Read charges and refunds for data syncing"
},
{
"permission": "customer_read",
"purpose": "Read customers for data syncing"
},
{
"permission": "dispute_read",
"purpose": "Read disputes for data syncing"
},
{
"permission": "payout_read",
"purpose": "Read payouts for data syncing"
},
{
"permission": "product_read",
"purpose": "Read products for data syncing"
},
{
"permission": "credit_note_read",
"purpose": "Read credit notes for data syncing"
},
{
"permission": "invoice_read",
"purpose": "Read invoices and invoice items for data syncing"
},
{
"permission": "plan_read",
"purpose": "Read prices/plans for data syncing"
},
{
"permission": "subscription_read",
"purpose": "Read subscriptions for data syncing"
},
{
"permission": "application_fee_read",
"purpose": "Read application fees for data syncing"
},
{
"permission": "transfer_read",
"purpose": "Read transfers for data syncing"
},
{
"permission": "connected_account_read",
"purpose": "Read connected accounts for data syncing"
},
{
"permission": "payment_method_read",
"purpose": "Read payment methods for data syncing"
},
{
"permission": "provisioning_account_request_write",
"purpose": "Allows Insights Stripe app to create and sign in to Insights accounts."
}
],
"post_install_action": {
"type": "onboarding"
},
"constants": {
"INSIGHTS_DASHBOARD_URL": "https://app.hanzo.ai",
"INSIGHTS_EU_BASE_URL": "https://eu.hanzo.ai",
"INSIGHTS_NEW_SOURCE_URL": "https://app.hanzo.ai/data-warehouse/new-source?kind=Stripe",
"INSIGHTS_US_BASE_URL": "https://us.hanzo.ai"
},
"allowed_redirect_uris": [
"https://us.hanzo.ai/integrations/stripe/callback",
"https://eu.hanzo.ai/integrations/stripe/callback",
"https://app.hanzo.ai/integrations/stripe/callback"
],
"distribution_type": "public",
"stripe_api_access_type": "oauth"
}