@salesforce/b2c-tooling-sdk / operations/content / detectMetaDefinitionType
Function: detectMetaDefinitionType()
detectMetaDefinitionType(
data,filePath?):"image"|"pagetype"|"componenttype"|"aspecttype"|"cmsrecord"|"customeditortype"|"contentassetpageconfig"|"contentassetcomponentconfig"|"contentassetstructuredcontentdata"|null
Defined in: packages/b2c-tooling-sdk/src/operations/content/validate.ts:129
Detect the metadefinition schema type using a 3-tier strategy:
- File path convention (if filePath provided)
- Property heuristics from data
- Returns null if neither works (caller should use explicit --type or throw)
Parameters
data
Record<string, unknown>
filePath?
string
Returns
"image" | "pagetype" | "componenttype" | "aspecttype" | "cmsrecord" | "customeditortype" | "contentassetpageconfig" | "contentassetcomponentconfig" | "contentassetstructuredcontentdata" | null