@onlineapps/conn-orch-api-mapper 1.0.14 → 1.0.15
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.
- package/package.json +1 -1
- package/src/ApiMapper.js +3 -1
package/package.json
CHANGED
package/src/ApiMapper.js
CHANGED
|
@@ -269,6 +269,7 @@ class ApiMapper {
|
|
|
269
269
|
*/
|
|
270
270
|
async _convertToDescriptor(output, schema, getContentResolver, logPrefix, context, fieldName = null) {
|
|
271
271
|
const fieldLabel = fieldName ? `field '${fieldName}'` : 'output';
|
|
272
|
+
const forceFile = schema?.type === 'file';
|
|
272
273
|
|
|
273
274
|
// Format 1: Base64-encoded data from HTTP response (primary format for distributed services)
|
|
274
275
|
if (output && typeof output === 'object' && output.data && output.encoding === 'base64') {
|
|
@@ -368,7 +369,8 @@ class ApiMapper {
|
|
|
368
369
|
context: {
|
|
369
370
|
workflow_id: context.workflow_id || 'standalone',
|
|
370
371
|
step_id: context.step_id || 'api-mapper'
|
|
371
|
-
}
|
|
372
|
+
},
|
|
373
|
+
...(forceFile ? { forceFile: true } : {})
|
|
372
374
|
});
|
|
373
375
|
}
|
|
374
376
|
|