TestConversion
Source:
src/AWS/B2BI/TestConversion.ts
Runtime binding for b2bi:TestConversion.
Synchronously converts an inline JSON or XML document into an outbound
X12 EDI document — the inline counterpart of an outbound transformer’s
conversion step. Provide the implementation with
Effect.provide(AWS.B2BI.TestConversionHttp).
Converting Documents to EDI
Section titled “Converting Documents to EDI”// init — account-level, no resource argumentconst testConversion = yield* AWS.B2BI.TestConversion();
// runtimeconst result = yield* testConversion({ source: { fileFormat: "JSON", inputFile: { fileContent } }, target: { fileFormat: "X12", formatDetails: { x12: { transactionSet: "X12_850", version: "VERSION_4010" }, }, },});// result.convertedFileContent — the generated X12 document