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 declaracionesSELECT 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 importaciones

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
Tu vista

Make room for your context.

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

Tu contexto

The different parts of you

Choose a starting point

Una mezcla útil de contexto, imágenes y orientación discreta.

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

Comodidad de lectura

Elige tu idioma

El idioma de la interfaz solo cambia el texto. Los mercados, precios y flujos de trabajo conservan sus propios ajustes.

Cobertura de traducción

Parte del contenido se muestra en inglés.

Navegación151
Grafo616
Categorías188
Portafolio332
Ejemplos2035
Vista previa de la fuente41

Se añadirán más traducciones a medida que se revise el contenido.

Esta preferencia se guarda en este navegador.

Buscar en el sitio web

Puntos de partida útiles

Sin resultados. Prueba una frase más corta, un nombre de operación u otro ámbito de búsqueda.

UN POCO DE ESPACIO PARA EXPLORAR

Encuentra algo que explorar.

Abre una vista detallada en esta página, prueba otra perspectiva o sigue el detalle a su propia página.

Cómo funcionan las vistas previas y los controles
01

Mirar antes de salir

Pasa el cursor por un enlace o enfócalo con Tab para ver una vista previa. Hacer clic en el enlace original o pulsar Intro siempre abre su destino.

02

Mantener el contexto

Entra en la vista previa para explorar sus secciones. Usa Alt + ↓ desde un enlace enfocado para entrar con el teclado. Escape la cierra.

03

Abrir las posibilidades

Las filas desplegables, las perspectivas y los controles destacados revelan más. Tu vista cambia la comodidad de lectura y el contexto que exploras.

Un botón separado para mirar más de cerca

Muestra pequeños botones de vista previa junto a los enlaces donde haya espacio. Toca el ojo para inspeccionar o el enlace para ir directamente. Esta elección permanece en esta pestaña.

No se recoge historial de navegación. El movimiento reducido sigue tu dispositivo y Tu vista.