Files
AFFiNE-Mirror/packages/frontend/admin/src/config.json
DarkSky 762b702e46 feat: sync rcat data (#13628)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* RevenueCat support: public webhook endpoint, webhook handler/service,
nightly reconciliation and per-user sync; subscriptions now expose
provider and iapStore; new user-facing error for App Store/Play-managed
subscriptions.
* **Chores**
* Multi-provider subscription schema (Provider, IapStore); Stripe
credentials moved into payment.stripe (top-level apiKey/webhookKey
deprecated); new payment.revenuecat config and defaults added.
* **Tests**
  * Comprehensive RevenueCat integration test suite and snapshots.
* **Documentation**
  * Admin config descriptions updated with deprecation guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-23 08:52:23 +00:00

428 lines
13 KiB
JSON

{
"metrics": {
"enabled": {
"type": "Boolean",
"desc": "Enable metric and tracing collection"
}
},
"crypto": {
"privateKey": {
"type": "String",
"desc": "The private key for used by the crypto module to create signed tokens or encrypt data.",
"env": "AFFINE_PRIVATE_KEY"
}
},
"job": {
"queue": {
"type": "Object",
"desc": "The config for job queues",
"link": "https://api.docs.bullmq.io/interfaces/v5.QueueOptions.html"
},
"worker": {
"type": "Object",
"desc": "The config for job workers",
"link": "https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html"
},
"queues.copilot": {
"type": "Object",
"desc": "The config for copilot job queue"
},
"queues.doc": {
"type": "Object",
"desc": "The config for doc job queue"
},
"queues.indexer": {
"type": "Object",
"desc": "The config for indexer job queue"
},
"queues.notification": {
"type": "Object",
"desc": "The config for notification job queue"
},
"queues.nightly": {
"type": "Object",
"desc": "The config for nightly job queue"
}
},
"throttle": {
"enabled": {
"type": "Boolean",
"desc": "Whether the throttler is enabled."
},
"throttlers.default": {
"type": "Object",
"desc": "The config for the default throttler."
},
"throttlers.strict": {
"type": "Object",
"desc": "The config for the strict throttler."
}
},
"auth": {
"allowSignup": {
"type": "Boolean",
"desc": "Whether allow new registrations."
},
"allowSignupForOauth": {
"type": "Boolean",
"desc": "Whether allow new registrations via configured oauth."
},
"requireEmailDomainVerification": {
"type": "Boolean",
"desc": "Whether require email domain record verification before accessing restricted resources."
},
"requireEmailVerification": {
"type": "Boolean",
"desc": "Whether require email verification before accessing restricted resources(not implemented)."
},
"passwordRequirements": {
"type": "Object",
"desc": "The password strength requirements when set new password."
},
"session.ttl": {
"type": "Number",
"desc": "Application auth expiration time in seconds."
},
"session.ttr": {
"type": "Number",
"desc": "Application auth time to refresh in seconds."
}
},
"mailer": {
"SMTP.name": {
"type": "String",
"desc": "Name of the email server (e.g. your domain name)",
"env": "MAILER_SERVERNAME"
},
"SMTP.host": {
"type": "String",
"desc": "Host of the email server (e.g. smtp.gmail.com)",
"env": "MAILER_HOST"
},
"SMTP.port": {
"type": "Number",
"desc": "Port of the email server (they commonly are 25, 465 or 587)",
"env": "MAILER_PORT"
},
"SMTP.username": {
"type": "String",
"desc": "Username used to authenticate the email server",
"env": "MAILER_USER"
},
"SMTP.password": {
"type": "String",
"desc": "Password used to authenticate the email server",
"env": "MAILER_PASSWORD"
},
"SMTP.sender": {
"type": "String",
"desc": "Sender of all the emails (e.g. \"AFFiNE Team <noreply@affine.pro>\")",
"env": "MAILER_SENDER"
},
"SMTP.ignoreTLS": {
"type": "Boolean",
"desc": "Whether ignore email server's TSL certification verification. Enable it for self-signed certificates.",
"env": "MAILER_IGNORE_TLS"
},
"fallbackDomains": {
"type": "Array",
"desc": "The emails from these domains are always sent using the fallback SMTP server."
},
"fallbackSMTP.name": {
"type": "String",
"desc": "Name of the fallback email server (e.g. your domain name)"
},
"fallbackSMTP.host": {
"type": "String",
"desc": "Host of the email server (e.g. smtp.gmail.com)"
},
"fallbackSMTP.port": {
"type": "Number",
"desc": "Port of the email server (they commonly are 25, 465 or 587)"
},
"fallbackSMTP.username": {
"type": "String",
"desc": "Username used to authenticate the email server"
},
"fallbackSMTP.password": {
"type": "String",
"desc": "Password used to authenticate the email server"
},
"fallbackSMTP.sender": {
"type": "String",
"desc": "Sender of all the emails (e.g. \"AFFiNE Team <noreply@affine.pro>\")"
},
"fallbackSMTP.ignoreTLS": {
"type": "Boolean",
"desc": "Whether ignore email server's TSL certification verification. Enable it for self-signed certificates."
}
},
"doc": {
"experimental.yocto": {
"type": "Boolean",
"desc": "Use `y-octo` to merge updates at the same time when merging using Yjs."
},
"history.interval": {
"type": "Number",
"desc": "The minimum time interval in milliseconds of creating a new history snapshot when doc get updated."
}
},
"storages": {
"avatar.publicPath": {
"type": "String",
"desc": "The public accessible path prefix for user avatars."
},
"avatar.storage": {
"type": "Object",
"desc": "The config of storage for user avatars."
},
"blob.storage": {
"type": "Object",
"desc": "The config of storage for all uploaded blobs(images, videos, etc.)."
}
},
"websocket": {
"transports": {
"type": "Array",
"desc": "The enabled transports for accepting websocket traffics.",
"link": "https://docs.nestjs.com/websockets/gateways#transports"
},
"maxHttpBufferSize": {
"type": "Number",
"desc": "How many bytes or characters a message can be, before closing the session (to avoid DoS)."
}
},
"server": {
"name": {
"type": "String",
"desc": "A recognizable name for the server. Will be shown when connected with AFFiNE Desktop."
},
"externalUrl": {
"type": "String",
"desc": "Base url of AFFiNE server, used for generating external urls.\nDefault to be `[server.protocol]://[server.host][:server.port]` if not specified.\n ",
"env": "AFFINE_SERVER_EXTERNAL_URL"
},
"https": {
"type": "Boolean",
"desc": "Whether the server is hosted on a ssl enabled domain (https://).",
"env": "AFFINE_SERVER_HTTPS"
},
"host": {
"type": "String",
"desc": "Where the server get deployed(FQDN).",
"env": "AFFINE_SERVER_HOST"
},
"hosts": {
"type": "Array",
"desc": "Multiple hosts the server will accept requests from."
},
"port": {
"type": "Number",
"desc": "Which port the server will listen on.",
"env": "AFFINE_SERVER_PORT"
},
"path": {
"type": "String",
"desc": "Subpath where the server get deployed if there is one.(e.g. /affine)",
"env": "AFFINE_SERVER_SUB_PATH"
}
},
"flags": {
"earlyAccessControl": {
"type": "Boolean",
"desc": "Only allow users with early access features to access the app"
},
"allowGuestDemoWorkspace": {
"type": "Boolean",
"desc": "Whether allow guest users to create demo workspaces."
}
},
"docService": {
"endpoint": {
"type": "String",
"desc": "The endpoint of the doc service.",
"env": "DOC_SERVICE_ENDPOINT"
}
},
"client": {
"versionControl.enabled": {
"type": "Boolean",
"desc": "Whether check version of client before accessing the server."
},
"versionControl.requiredVersion": {
"type": "String",
"desc": "Allowed version range of the app that allowed to access the server. Requires 'client/versionControl.enabled' to be true to take effect."
}
},
"captcha": {
"enabled": {
"type": "Boolean",
"desc": "Check captcha challenge when user authenticating the app."
},
"config": {
"type": "Object",
"desc": "The config for the captcha plugin."
}
},
"copilot": {
"enabled": {
"type": "Boolean",
"desc": "Whether to enable the copilot plugin. <br> Document: <a href=\"https://docs.affine.pro/self-host-affine/administer/ai\" target=\"_blank\">https://docs.affine.pro/self-host-affine/administer/ai</a>"
},
"scenarios": {
"type": "Object",
"desc": "Use custom models in scenarios and override default settings."
},
"providers.openai": {
"type": "Object",
"desc": "The config for the openai provider.",
"link": "https://github.com/openai/openai-node"
},
"providers.fal": {
"type": "Object",
"desc": "The config for the fal provider."
},
"providers.gemini": {
"type": "Object",
"desc": "The config for the gemini provider."
},
"providers.geminiVertex": {
"type": "Object",
"desc": "The config for the gemini provider in Google Vertex AI."
},
"providers.perplexity": {
"type": "Object",
"desc": "The config for the perplexity provider."
},
"providers.anthropic": {
"type": "Object",
"desc": "The config for the anthropic provider."
},
"providers.anthropicVertex": {
"type": "Object",
"desc": "The config for the anthropic provider in Google Vertex AI."
},
"providers.morph": {
"type": "Object",
"desc": "The config for the morph provider."
},
"unsplash": {
"type": "Object",
"desc": "The config for the unsplash key."
},
"exa": {
"type": "Object",
"desc": "The config for the exa web search key."
},
"storage": {
"type": "Object",
"desc": "The config for the storage provider."
}
},
"indexer": {
"enabled": {
"type": "Boolean",
"desc": "Enable indexer plugin",
"env": "AFFINE_INDEXER_ENABLED"
},
"provider.type": {
"type": "String",
"desc": "Indexer search service provider name",
"env": "AFFINE_INDEXER_SEARCH_PROVIDER"
},
"provider.endpoint": {
"type": "String",
"desc": "Indexer search service endpoint",
"env": "AFFINE_INDEXER_SEARCH_ENDPOINT"
},
"provider.apiKey": {
"type": "String",
"desc": "Indexer search service api key. Optional for elasticsearch",
"link": "https://www.elastic.co/guide/server/current/api-key.html",
"env": "AFFINE_INDEXER_SEARCH_API_KEY"
},
"provider.username": {
"type": "String",
"desc": "Indexer search service auth username, if not set, basic auth will be disabled. Optional for elasticsearch",
"link": "https://www.elastic.co/guide/en/elasticsearch/reference/current/http-clients.html",
"env": "AFFINE_INDEXER_SEARCH_USERNAME"
},
"provider.password": {
"type": "String",
"desc": "Indexer search service auth password, if not set, basic auth will be disabled. Optional for elasticsearch",
"env": "AFFINE_INDEXER_SEARCH_PASSWORD"
},
"autoIndex.batchSize": {
"type": "Number",
"desc": "Number of workspaces automatically indexed per batch"
}
},
"customerIo": {
"enabled": {
"type": "Boolean",
"desc": "Enable customer.io integration"
},
"token": {
"type": "String",
"desc": "Customer.io token"
}
},
"oauth": {
"providers.google": {
"type": "Object",
"desc": "Google OAuth provider config",
"link": "https://developers.google.com/identity/protocols/oauth2/web-server"
},
"providers.github": {
"type": "Object",
"desc": "GitHub OAuth provider config",
"link": "https://docs.github.com/en/apps/oauth-apps"
},
"providers.oidc": {
"type": "Object",
"desc": "OIDC OAuth provider config",
"link": "https://openid.net/specs/openid-connect-core-1_0.html"
},
"providers.apple": {
"type": "Object",
"desc": "Apple OAuth provider config",
"link": "https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/implementing_sign_in_with_apple_in_your_app"
}
},
"payment": {
"enabled": {
"type": "Boolean",
"desc": "Whether enable payment plugin"
},
"showLifetimePrice": {
"type": "Boolean",
"desc": "Whether enable lifetime price and allow user to pay for it."
},
"apiKey": {
"type": "String",
"desc": "[Deprecated] Stripe API key. Use payment.stripe.apiKey instead.",
"env": "STRIPE_API_KEY"
},
"webhookKey": {
"type": "String",
"desc": "[Deprecated] Stripe webhook key. Use payment.stripe.webhookKey instead.",
"env": "STRIPE_WEBHOOK_KEY"
},
"stripe": {
"type": "Object",
"desc": "Stripe sdk options and credentials",
"link": "https://docs.stripe.com/api"
},
"revenuecat": {
"type": "Object",
"desc": "RevenueCat integration configs",
"link": "https://www.revenuecat.com/docs/"
}
},
"worker": {
"allowedOrigin": {
"type": "Array",
"desc": "Allowed origin"
}
}
}