UNPKG

sfcc-schemas

Version:

Salesforce Commerce Cloud import and export schemas validator

172 lines (164 loc) 5.61 kB
<!doctype html> <html> <head> <title>meta cheatsheet</title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <meta charset="utf-8" /> <link href="https://fonts.googleapis.com/css?family=Lato&display=swap" rel="stylesheet" /> <style> table, table th, table td { border: 1px solid #ccc; border-collapse: collapse; text-align: left; vertical-align: top; } table { width: 100%; margin-bottom: 20px; } td, th { padding: 10px; } th.obj { font-weight: normal; background-color: #e5eaff; } th.obj h3 { font-weight: bold; text-transform: capitalize; } th { background-color: #eee; font-weight: normal; } * { box-sizing: border-box; } body { font-family: 'Lato', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-size: 16px; font-weight: 400; color: #444; } code { font-family: Monaco, Menlo, Consolas, 'Courier New', monospace !important; font-size: 0.75rem; line-height: 0.75rem; white-space: normal; color: #e01e5a; padding: 2px 3px 1px; font-variant-ligatures: none; tab-size: 4; background-color: #f7f7f9; border: 1px solid#e1e1e8; border-radius: 3px; display: inline-block; margin-top: 5px; } </style> </head> <body> <h2>System object extensions</h2> <% _.forEach(extensions, function(item) { %> <h3>${item.typeid}</h3> <table class="relative-table" style="text-align: left;width: 100.0%;"> <thead> <tr> <th style="width: 15%">attribute</th> <th style="width: 15%">description</th> <th>note</th> <th style="width: 6%">type</th> <th style="width: 6%">values</th> <th style="width: 6%">minlength</th> <th style="width: 6%">fieldlength</th> <th style="width: 6%">localizable</th> <th style="width: 6%">mandatory</th> <th style="width: 6%">externally managed</th> </tr> </thead> <tbody> <% if ( item.attributedefinitions ) { %> <% _.forEach(item.attributedefinitions.attributedefinition, function(attr) { %> <tr> <th style="width: 15%">${attr.attributeid}</th> <td style="width: 15%">${attr.displayname}</td> <td>${attr.description}</td> <td style="width: 6%">${attr.type}</td> <td style="width: 6%"> <% if ( attr.valuedefinitions ) { _.forEach(attr.valuedefinitions.valuedefinition, function(val) { %> <code>${val.value}</code> ${val.value !== val.display ? ' (' + val.display + ')' : ''} <br /> <% }); } %> </td> <td style="width: 6%">${attr.minlength}</td> <td style="width: 6%">${attr.fieldlength}</td> <td style="width: 6%">${attr.localizableflag ? 'YES' : ''}</td> <td style="width: 6%">${attr.mandatoryflag ? 'YES' : ''}</td> <td style="width: 6%">${attr.externallymanagedflag ? 'YES' : ''}</td> </tr> <% }); %> <% } %> </tbody> </table> <% }); %> <h2>Custom objects</h2> <% _.forEach(definitions, function(item) { %> <h3>${item.typeid}</h3> <p>Display name: ${item.displayname}</p> <% if (item.description && item.displayname !== item.description) { %> <p>Description: ${item.description}</p> <%}%> <p>Staging mode: ${item.stagingmode}</p> <p>Storage scope: ${item.storagescope}</p> <p>Retention: ${item.retentiondays} days</p> <p>keys: <code>${item.keydefinition && item.keydefinition.attributeid}</code></p> <table class="relative-table" style="text-align: left;width: 100.0%;"> <thead> <tr> <th style="width: 15%">attribute</th> <th style="width: 15%">description</th> <th>note</th> <th style="width: 6%">type</th> <th style="width: 6%">values</th> <th style="width: 6%">minlength</th> <th style="width: 6%">fieldlength</th> <th style="width: 6%">localizable</th> <th style="width: 6%">mandatory</th> <th style="width: 6%">externally managed</th> </tr> </thead> <tbody> <% if ( item.attributedefinitions ) { %> <% _.forEach(item.attributedefinitions.attributedefinition, function(attr) { %> <tr> <th style="width: 15%">${attr.attributeid}</th> <td style="width: 15%">${attr.displayname}</td> <td>${attr.description}</td> <td style="width: 6%">${attr.type}</td> <td style="width: 6%"> <% if ( attr.valuedefinitions ) { _.forEach(attr.valuedefinitions.valuedefinition, function(val) { %> <code>${val.value}</code> ${val.value !== val.display ? ' (' + val.display + ')' : ''} <br /> <% }); } %> </td> <td style="width: 6%">${attr.minlength}</td> <td style="width: 6%">${attr.fieldlength}</td> <td style="width: 6%">${attr.localizableflag ? 'YES' : ''}</td> <td style="width: 6%">${attr.mandatoryflag ? 'YES' : ''}</td> <td style="width: 6%">${attr.externallymanagedflag ? 'YES' : ''}</td> </tr> <% }); %> <% } %> </tbody> </table> <% }); %> <br /> <br /> <small>generated by metacheatsheet</small> </body> </html>