@ethisyscore/plugin-ui 1.131.1 → 1.133.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,7 +102,11 @@ var ConnectorMappingService = class {
102
102
  requestFieldMap: body.requestFieldMap,
103
103
  responseFieldPaths: body.responseFieldPaths,
104
104
  staticRequestFields: body.staticRequestFields,
105
- sampleArgs: body.sampleArgs
105
+ sampleArgs: body.sampleArgs,
106
+ // Omitted, not null, when absent: null would mean "clear the column" on the mapping PUT, and the
107
+ // test endpoint reads absence as "not sent".
108
+ ...body.requestTemplates !== void 0 && { requestTemplates: body.requestTemplates },
109
+ ...body.responseItemFieldPaths !== void 0 && { responseItemFieldPaths: body.responseItemFieldPaths }
106
110
  });
107
111
  return response ?? {
108
112
  success: false,
@@ -606,7 +610,7 @@ function useMappingTranslationEditor({
606
610
  [editor, mappings, updateMapping]
607
611
  );
608
612
  const onTestMapping = react.useCallback(
609
- async (request) => {
613
+ async (request, extras) => {
610
614
  if (!editor || !connectorId) {
611
615
  return testUnavailable("No connector or operation selected.");
612
616
  }
@@ -625,7 +629,12 @@ function useMappingTranslationEditor({
625
629
  // The editor's DRAFT static params, not the persisted row's, so the dry-run exercises the
626
630
  // unsaved discriminator the operator is actually testing.
627
631
  staticRequestFields: request.staticRequestFields ?? null,
628
- sampleArgs: request.sampleArgs
632
+ sampleArgs: request.sampleArgs,
633
+ // Only the members the editor showed; absent stays absent all the way to the wire.
634
+ ...extras?.requestTemplates !== void 0 && { requestTemplates: extras.requestTemplates },
635
+ ...extras?.responseItemFieldPaths !== void 0 && {
636
+ responseItemFieldPaths: extras.responseItemFieldPaths
637
+ }
629
638
  }
630
639
  });
631
640
  },