Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / operations/jobs / mapCanonicalToOcapiExecution

Function: mapCanonicalToOcapiExecution()

mapCanonicalToOcapiExecution(canonical): object

Defined in: packages/b2c-tooling-sdk/src/operations/jobs/ocapi-mapping.ts:87

Map a canonical JobExecutionInfo back into the raw OCAPI JobExecution (snake_case) shape.

The reverse of mapOcapiExecution. System-job operations (site-archive import/export, CAP install/uninstall) expose the raw OCAPI JobExecution in their public result/error types; when those operations are served over SCAPI, the canonical result is mapped back through this so the public contract stays identical across backends.

Prefers the original OCAPI payload when present in _raw (lossless round-trip for the OCAPI path); otherwise projects the canonical fields.

Parameters

canonical

JobExecutionInfo

Returns

object

Released under the Apache-2.0 License.