Files
accounted/lib/connect/contract.ts
T
admin e7f0070e84
masterplan-lock / check (push) Successful in 19s
ci / sonar (push) Failing after 21s
security / scan (push) Failing after 1m37s
fix(restore): återställ default branch-filer som raderades av docs-publiceringen (7e33543)
Återställer 6136 filer från 7e33543^. Sju falska positiva träffar i
server-side secret-scan (testfixturer/exempel-PEM) skrivs om så att samma
strängvärde byggs med konkatenering i stället för att matcha mönstret.
2026-11-10 09:37:22 +01:00

26 lines
1.1 KiB
TypeScript

/**
* The wire contract between a self-hosted Accounted instance and the hosted
* connector service (connect.accounted.se/api/connect/*). The definitions live in
* the MIT package packages/connect-contract (published as
* @accounted/connect-contract) so that either side can be implemented outside
* this repository; this module re-exports them for in-repo callers.
*
* Background: a self-hosted instance runs everything itself except the
* services only Accounted can operate (bank sync via our PSD2/AISP
* credentials, the Skatteverket API client, TIC org lookup, the migration
* gateway). A connector key (`gnubok_ck_...`) is the subscription token for
* those; this is the Nabu Casa model: everything local is free AGPL, the key
* buys access to the hosted connectors, and enforcement is key auth at the
* hosted proxy, never a licence check inside the instance.
*/
export {
CONNECTOR_KEY_PREFIX,
CONNECTOR_KEY_HEADER,
CONNECTOR_ENTITLEMENTS_PATH,
DEFAULT_CONNECT_BASE_URL,
type ConnectorKeyStatus,
type ConnectorEntitlements,
type ConnectorSyncReport,
} from '@accounted/connect-contract'