1import type * as b2bi from "@distilled.cloud/aws/b2bi";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `b2bi:CreateStarterMappingTemplate`.
7 *
8 * Generates a starter mapping template (JSONATA or XSLT) for a given X12
9 * transaction set — a scaffold covering every field of the transaction that
10 * can be edited down to the desired mapping. Optionally writes the template
11 * to S3 via `outputSampleLocation`. Provide the implementation with
12 * `Effect.provide(AWS.B2BI.CreateStarterMappingTemplateHttp)`.
13 * ### Generating Mappings
14 * **Example:** Scaffold a JSONATA Template for X12 850
15 * ```typescript
16 * // init — account-level, no resource argument
17 * const createStarterMappingTemplate =
18 * yield* AWS.B2BI.CreateStarterMappingTemplate();
19 *
20 * // runtime
21 * const result = yield* createStarterMappingTemplate({
22 * mappingType: "JSONATA",
23 * templateDetails: {
24 * x12: { transactionSet: "X12_850", version: "VERSION_4010" },
25 * },
26 * });
27 * // result.mappingTemplate — the generated starter template
28 * ```
29 *
30 * @binding
31 */
32export interface CreateStarterMappingTemplate extends Binding.Service<
33 CreateStarterMappingTemplate,
34 "AWS.B2BI.CreateStarterMappingTemplate",
35 () => Effect.Effect<
36 (
37 request: b2bi.CreateStarterMappingTemplateRequest,
38 ) => Effect.Effect<
39 b2bi.CreateStarterMappingTemplateResponse,
40 b2bi.CreateStarterMappingTemplateError
41 >
42 >
43> {}
44export const CreateStarterMappingTemplate =
45 Binding.Service<CreateStarterMappingTemplate>(
46 "AWS.B2BI.CreateStarterMappingTemplate",
47 );