GenerateMapping
Source:
src/AWS/B2BI/GenerateMapping.ts
Runtime binding for b2bi:GenerateMapping.
Generates a mapping template (JSONATA or XSLT) from a sample input and
desired output document using AI-assisted mapping — useful for building
self-service EDI onboarding flows where trading partners supply sample
documents. mappingAccuracy reports the model’s confidence. Provide the
implementation with Effect.provide(AWS.B2BI.GenerateMappingHttp).
Generating Mappings
Section titled “Generating Mappings”// init — account-level, no resource argumentconst generateMapping = yield* AWS.B2BI.GenerateMapping();
// runtimeconst result = yield* generateMapping({ inputFileContent: JSON.stringify({ customer: "acme" }), outputFileContent: JSON.stringify({ name: "acme" }), mappingType: "JSONATA",});// result.mappingTemplate, result.mappingAccuracy