libraryPackage manifestv2.0.5

lib.data-exchange-server

Server-side adapters and execution services for SchemaModel-first data interchange

@lssm-tech/lib.data-exchange-server
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 2.0.5. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
servernode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGElib.data-exchange-serverplatform

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

6 déclarationsSELECT TO INSPECT

@lssm-tech/lib.data-exchange-server

Website: https://contractspec.io

Server-side adapters, execution services, and workflow templates for SchemaModel-first data interchange.

What It Provides

  • File, HTTP, SQL, and storage adapter families.
  • SQL adapters that preserve portable database endpoint metadata while delegating execution to injected clients/provider boundaries.
  • Dry-run, validation, preview, execute, retry, and audit services.
  • WorkflowSpec templates for interchange orchestration.
  • A fail-closed governed projection gateway, revocation reconciliation, and privacy-status projection for ecosystem data sharing.
  • A host-injected SecretProvider envelope sealer that canonicalizes the exact authorization as AES-256-GCM AAD and returns ciphertext-only product envelopes.
  • A bounded HTTPS materialization port that delivers one encrypted dispatch to an exact product ingress without ambient credentials or redirect following.

Usage

Import the root entrypoint from @lssm-tech/lib.data-exchange-server, or use ./adapters, ./governed, ./services, and ./workflow.

Template-Aware Imports

Server dry-runs and executions accept the same import templates as core. This lets users upload partner-specific CSV/JSON/XML layouts while the server previews normalized records before writing them.

ts
import { defineDataExchangeTemplate } from "@lssm-tech/lib.data-exchange-core";
import { dryRunImport, executeImport } from "@lssm-tech/lib.data-exchange-server";

const template = defineDataExchangeTemplate({
	key: "invoices.import",
	version: "1.0.0",
	columns: [
		{
			key: "id",
			label: "Invoice ID",
			targetField: "id",
			required: true,
			sourceAliases: ["Invoice Number", "No facture"],
		},
		{
			key: "amount",
			label: "Amount",
			targetField: "amount",
			format: {
				kind: "number",
				decimalSeparator: ",",
				thousandsSeparator: ".",
			},
		},
	],
});

const preview = await dryRunImport({
	source: {
		kind: "file",
		path: "partner.csv",
		format: "csv",
		codecOptions: { csv: { delimiter: ";", skipRows: 1 } },
	},
	target: { kind: "memory", format: "json" },
	schema: InvoiceImportSchema,
	template,
});

if (preview.issues.every((issue) => issue.severity !== "error")) {
	await executeImport({
		source: {
			kind: "file",
			path: "partner.csv",
			format: "csv",
			codecOptions: { csv: { delimiter: ";", skipRows: 1 } },
		},
		target: { kind: "memory", format: "json" },
		schema: InvoiceImportSchema,
		template,
	});
}

Execution audit entries record whether mappings came from explicit mappings, template resolution, or inference.

Governed projection gateway

@lssm-tech/lib.data-exchange-server/governed evaluates catalog, grant, subject, tenant, audience, purpose, field, time, residency, revision, and revocation-watermark authority before calling the injected source port. A denial is recorded without a payload or field disclosure; an allowed response returns only the exact requested field allowlist.

Revocation reconciliation suspends a share when a required consumer is missing, stale, or reports a failed acknowledgement. Hosts own durable stores, encryption, transport, deletion/export jobs, and operator workflows. The package never assumes that products share a database or that a managed runtime owns customer keys.

The delivery worker accepts provider-neutral consumer and rights-processor ports. Only an explicit applied/complete result advances a terminal success; exceptions are indeterminate and fail closed. Missing bindings are retryable, attempts are leased and bounded, and expired leases can be reclaimed without claiming that an unknown downstream side effect succeeded.

createSecretProviderGovernedEnvelopeSealer resolves a product-owned key reference through an injected binding and SecretProvider. It accepts only a 32-byte AES-256 key, requires payload fields to equal the authorized field allowlist, uses canonical authorization bytes as AAD, appends the GCM tag to the encoded ciphertext, hashes the randomized ciphertext rather than low-entropy plaintext, requires an exact configured key version when one is pinned, and rejects oversized payloads before encryption. It clears its local key copy after sealing. Provider errors are replaced with a redacted failure. The sealer never owns, rotates, serializes, or logs key material.

createGovernedRecoveryIngress is the product-side HTTP trust boundary. It requires a strong server-only bearer, exact application binding, matching idempotency header, bounded strict dispatch body, and schema-valid product evidence. Authentication or binding failures never invoke the product port; product exceptions become a generic 503 without leaking diagnostics.

createGovernedMaterializationIngressRegistry is the independent encrypted-copy boundary. It selects one ingress from the exact source application path and a distinct 32-character-or-longer source-to-receiver bearer. The strict dispatch must match receiver application and region, exact purpose, lawful-basis and consent evidence, fields, grant/revision/watermark, expiry and retention, receiver encryption algorithm/key reference, and idempotency key. Unknown sources, stale authority, plaintext, source subjects, central identity, and forged receipts fail before persistence. Hosts may bind recovery without materialization; materialization requires both an explicit receiver region and at least one source binding.

createGovernedMaterializationHttpPort is the matching source-side transport. It accepts one exact HTTPS origin, source application, strong server-only bearer, and optional injected fetch implementation. Requests carry the delivery ID as their idempotency key, omit ambient credentials, refuse redirects, and use a bounded timeout. Only a 200 application/json receipt under 64 KiB is parsed; the receipt must bind the exact delivery, materialization, and consumer. Network, status, media-type, body-size, parsing, and receipt failures collapse to one redacted unavailable error. The port never decrypts or logs product data.

createGovernedRecoveryHttpPort applies the same exact-origin, strong-bearer, idempotency, no-credentials, no-redirect, bounded-timeout, JSON media-type, and streaming response limits to projection revocation and privacy-rights work. It removes worker lease metadata before transport, rejects application substitution before network I/O, returns a bounded retry result for an explicit downstream status, and collapses network or invalid-receipt outcomes to one redacted error.

Declared capabilities.

Lib Data Exchange Server

Server-side adapters and execution services for SchemaModel-first data interchange

Use it to

  • Adopt server-side adapters and execution services for schemamodel-first data interchange

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/lib.data-exchange-server package constraints do not match the target runtime or platform.

@lssm-tech/lib.data-exchange-server

@lssm-tech/lib.data-exchange-server/adapters

@lssm-tech/lib.data-exchange-server/adapters/file

@lssm-tech/lib.data-exchange-server/adapters/http

@lssm-tech/lib.data-exchange-server/adapters/sql

@lssm-tech/lib.data-exchange-server/adapters/storage

@lssm-tech/lib.data-exchange-server/data-exchange-server.feature

@lssm-tech/lib.data-exchange-server/governed

@lssm-tech/lib.data-exchange-server/services

@lssm-tech/lib.data-exchange-server/services/execution

@lssm-tech/lib.data-exchange-server/services/io

@lssm-tech/lib.data-exchange-server/services/retry

Imports and export paths.

33 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

33 imports

Dependencies and related packages.

Runtime dependencies 6
Development dependencies 3
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
publish:pkg:canarybun publish:pkg --tag canary
buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
devcontractspec-bun-build dev
cleanrimraf dist .turbo
lintbun lint:fix
lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
lint:checknode ../../../../scripts/biome.cjs check .
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
Votre vue

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Votre contexte

The different parts of you

Choose a starting point

Un mélange utile de contexte, de visuels et de guidage discret.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Confort de lecture

Choisir votre langue

La langue de l’interface change uniquement le texte. Les marchés, les prix et les parcours conservent leurs propres paramètres.

Couverture des traductions

Une partie du contenu est affichée en anglais.

Navigation151
Graphe616
Catégories378
Portfolio833
Exemples2 035
Aperçu de la source1 542

D’autres traductions seront ajoutées à mesure que le contenu sera relu.

Cette préférence est enregistrée dans ce navigateur.

Rechercher sur le site

Des points de départ utiles

Aucun résultat. Essayez une expression plus courte, un nom d’opération ou un autre périmètre de recherche.

UN PEU DE PLACE POUR EXPLORER

Trouvez quelque chose à explorer.

Ouvrez un aperçu détaillé sur cette page, essayez une autre perspective ou suivez le détail vers sa propre page.

Fonctionnement des aperçus et des commandes
01

Regarder avant de partir

Survolez un lien ou sélectionnez-le avec Tab pour voir un aperçu. Cliquer sur le lien d’origine ou appuyer sur Entrée ouvre toujours sa destination.

02

Rester dans le contexte

Entrez dans l’aperçu pour explorer ses sections. Depuis un lien sélectionné, utilisez Alt + ↓ pour y entrer au clavier. Échap le ferme.

03

Ouvrir les possibilités

Les lignes dépliables, les choix de perspective et les commandes mises en évidence révèlent davantage. Votre vue adapte le confort de lecture et le contexte exploré.

Un bouton séparé pour voir de plus près

Affichez de petits boutons d’aperçu à côté des liens quand l’espace le permet. Touchez l’œil pour examiner ou le lien pour y aller directement. Ce choix reste dans cet onglet.

Aucun historique de navigation n’est collecté. La réduction des animations suit votre appareil et Votre vue.