{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thebridge-dev/json-schema/thebridge-dev-app-config-response-dto-schema.json",
  "title": "AppConfigResponseDto",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thebridge-dev-openapi.json#/components/schemas/AppConfigResponseDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique ID (Read only)"
    },
    "name": {
      "type": "string",
      "description": "Name of the app"
    },
    "domain": {
      "type": "string",
      "description": "Unique domain name of the app (Read only)"
    },
    "apiUrl": {
      "type": "string",
      "description": "URL to your api (to receive webhooks etc). **Must be HTTPS**"
    },
    "uiUrl": {
      "type": "string",
      "description": "URL to your frontend app (for onboarding redirects etc). **Must be HTTPS**"
    },
    "logo": {
      "type": "string",
      "description": "URL to your logo"
    },
    "websiteUrl": {
      "type": "string",
      "description": "URL to your website or landing page. E.g. Branded emails will link to this URL, checkout process will redirect to `/payment-success` and `/payment-cancel`"
    },
    "webhookUrl": {
      "type": "string",
      "description": "Events like tenant and user updates will be sent to this webhook url"
    },
    "privacyPolicyUrl": {
      "type": "string",
      "description": "URL to a page on your website containing a Privacy policy for your app users. E.g. checkout process will link to this url."
    },
    "termsOfServiceUrl": {
      "type": "string",
      "description": "URL to a page on your website containing a Terms of service for your app users. E.g. checkout process will link to this url."
    },
    "emailSenderName": {
      "type": "string",
      "description": "Emails sent from Nblocks will have this sender name"
    },
    "emailSenderEmail": {
      "type": "string",
      "description": "Emails sent from Nblocks will have this sender email. You'll have to verify this email before"
    },
    "paymentsAutoRedirect": {
      "type": "boolean"
    },
    "stripeEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if Stripe is enabled"
    },
    "stripeSetupStatus": {
      "description": "Status of Stripe setup process",
      "enum": [
        "completed",
        "pending",
        "failed"
      ],
      "type": "string"
    },
    "stripeSetupError": {
      "type": [
        "string",
        "null"
      ],
      "description": "Error message if Stripe setup failed"
    },
    "stripeLastWebhookAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ],
      "description": "Last time a Stripe webhook event was received and verified. Null means none has been verified yet."
    },
    "stripeLastWebhookRejectedAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ],
      "description": "Last time a Stripe webhook event was rejected"
    },
    "stripeLastWebhookRejectionReason": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why the last Stripe webhook event was rejected: `no_signing_secret`, `signature_mismatch` or `raw_body_missing`"
    },
    "stripeWebhookRejectionStreak": {
      "type": "number",
      "description": "Rejected Stripe webhook events since the last verified one, counted at most once per minute. 3 or more means events are being rejected persistently."
    },
    "allowedTokenPrivileges": {
      "description": "Allowed privileges for API tokens",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "passkeysEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if passkeys login is enabled"
    },
    "mfaEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if MFA is enabled"
    },
    "magicLinkEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if Login with Magic Link is enabled"
    },
    "googleSsoEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if Google Social login / SSO is enabled"
    },
    "linkedinSsoEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if LinkedIn Social login / SSO is enabled"
    },
    "azureAdSsoEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if Azure AD SSO is enabled"
    },
    "azureMarketplaceEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if Azure marketplace is enabled"
    },
    "appleSsoEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if Apple Social login / SSO is enable"
    },
    "githubSsoEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if Github Social login / SSO is enable"
    },
    "facebookSsoEnabled": {
      "type": "boolean",
      "description": "Boolean value telling the user if Facebook Social login / SSO is enable"
    },
    "onboardingFlow": {
      "description": "Configure how users will be onboarded",
      "enum": [
        "B2B",
        "B2C"
      ],
      "type": "string"
    },
    "tenantSelfSignup": {
      "type": "boolean",
      "description": "Allow self signup (relates to cloud views, payment providers etc)"
    },
    "redirectUris": {
      "description": "Allowed redirect uris",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "allowedOrigins": {
      "description": "Allowed origins for SDK mode (CORS + origin validation)",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "defaultCallbackUri": {
      "type": "string",
      "description": "Default handover/callback uri used by Nblocks"
    },
    "accessTokenTTL": {
      "type": "number",
      "description": "TTL for access token, default 1 hour"
    },
    "refreshTokenTTL": {
      "type": "number",
      "description": "TTL for refresh token, default 1 week"
    },
    "webhookSecretSet": {
      "type": "boolean",
      "description": "Whether a webhook signing secret has been minted"
    },
    "webhookEventFilter": {
      "description": "Event types delivered to the webhook URL",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "webhookEnabled": {
      "type": "boolean",
      "description": "Whether webhook delivery is on"
    },
    "webhookConsecutiveFailures": {
      "type": "number",
      "description": "Consecutive failed deliveries (auto-disable at 50)"
    }
  },
  "required": [
    "id",
    "name",
    "domain",
    "apiUrl",
    "uiUrl",
    "logo",
    "websiteUrl",
    "webhookUrl",
    "privacyPolicyUrl",
    "termsOfServiceUrl",
    "paymentsAutoRedirect",
    "stripeEnabled",
    "passkeysEnabled",
    "mfaEnabled",
    "magicLinkEnabled",
    "googleSsoEnabled",
    "linkedinSsoEnabled",
    "azureAdSsoEnabled",
    "azureMarketplaceEnabled",
    "appleSsoEnabled",
    "githubSsoEnabled",
    "facebookSsoEnabled",
    "onboardingFlow",
    "tenantSelfSignup",
    "redirectUris",
    "allowedOrigins",
    "defaultCallbackUri",
    "accessTokenTTL",
    "refreshTokenTTL",
    "webhookSecretSet",
    "webhookEventFilter",
    "webhookEnabled",
    "webhookConsecutiveFailures"
  ]
}