@onlineapps/conn-orch-api-mapper 1.0.6 → 1.0.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/ApiMapper.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/conn-orch-api-mapper",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "API mapping connector for OA Drive - maps cookbook operations to HTTP endpoints",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/ApiMapper.js CHANGED
@@ -175,9 +175,9 @@ class ApiMapper {
175
175
  try {
176
176
  const accessor = getContentAccessor();
177
177
 
178
- // If field is already a Descriptor (has type property), use as-is
179
- if (typeof fieldValue === 'object' && fieldValue !== null && (fieldValue.type === 'file' || fieldValue.type === 'inline')) {
180
- // Already a Descriptor, normalize to ensure completeness
178
+ // If field is already a Descriptor (has _descriptor flag), use as-is
179
+ if (typeof fieldValue === 'object' && fieldValue !== null && (fieldValue._descriptor === true || fieldValue.type === 'file' || fieldValue.type === 'inline')) {
180
+ // Already a Descriptor, normalize to ensure completeness and _descriptor flag
181
181
  normalizedOutput[fieldName] = await accessor.normalizeToDescriptor(fieldValue, {
182
182
  filename: fieldValue.filename,
183
183
  content_type: fieldValue.content_type