omniJS – templates?

Am I right in thinking that omniJS doesn’t yet allow us to set the template for a canvas
(or list the templates available to OG) ?

I am wondering about anthing analogous to the (AppleScript / JavaScript for Automation) canvas.template and application.availableTemplates()

( Not urgent – on macOS at least, we can certainly fall back to osascript for this (as below), but templates would be a very useful addition to the API – especially on iOS, which doesn’t have other fallback routes. )

[details=JXA snippet for specific or default template]```javascript
// JXA (ES6) snippet – new document with specific or default template (if no other document active)

// ogFrontDoc :: {useExisting : Bool, templateName: String} -> OG.Document
const ogFrontDoc = dctOptions => {
const
options = dctOptions || {},
optTemplate = options.templateName,
og = Application(‘OmniGraffle’),
xs = og.availableTemplates(),
strTemplate = (optTemplate && elem(optTemplate, xs)) ? (
optTemplate
) : xs[0],
ds = og.documents,
d = options.useExisting && ds.length > 0 ? (
ds.at(0)
) : (() => {
return (
ds.push(og.Document({
template: strTemplate
})),
ds.at(0)
);
})();
return (
og.activate(),
d
);
};