Optionaloptions: ApplicationTemplateListOptions
which catalog to read, and whether to merge the templates of the tenant
a promise that resolves to the template versions
Read the application template catalog. The default source is the public
catalog that the Admin UI uses on Ping's CDN; it is requested without any
credential of the tenant, and through the proxy settings of the library.
The paths of the CDN are what the Admin UI happens to use, not a documented
interface. A catalog that the caller has (catalog) or a URL that the
caller names (url) is used instead. A catalog that was downloaded is kept
for the state until refresh is set. Unless the cache is on, the library
writes no file: the result holds the catalog and what identifies the
download (etag, lastModified, fetchedAt), so that a caller can save it.
With the cache on (state.setUseTemplateCatalogCache(true)), the catalog
of the default source is kept in a directory
(state.setTemplateCatalogCachePath, default ~/.frodo/AppTemplates) as
<channel>.json (the decoded catalog, which can be copied to a machine
that cannot reach the source and given there as catalog) and
<channel>.meta.json. A copy younger than maxAgeMs (default one hour) is
used with no request. An older one is asked about with its ETag and
Last-Modified, so a copy that is current costs no download (304). If the
source cannot be reached or fails on its side, the old copy is used and the
result says so (cache: 'stale-after-error'). refresh asks the source now
but still conditionally; ignoreCache downloads without validators. A
catalog the caller hands over and a URL the caller names are never kept.
The files are not trusted: they go through the same limits and checks as a
download, and one that fails them is replaced. A write that fails never
fails the read.
When air-gapped mode is on (state.setAirGapped), no request is made: the
copy in the cache is used, whatever its age, and without one the call fails
with the error code AIR_GAPPED; an explicit catalog and a URL the caller
names still work. metadata.cache says what the cache did.
Optionaloptions: ApplicationTemplateCatalogOptions
which catalog to read
a promise that resolves to the catalog and its metadata
Read the application templates that the tenant defines itself (the IDM
configuration entities appTemplate/<id>). The Admin UI merges them over
the catalog and marks them as overrides.
a promise that resolves to the templates of the tenant, each with its _id
Read the template that an application record was made from, and say
whether that version exists, whether it is the newest one and whether the
tenant defines it itself. Nothing is thrown for a template that does not
exist: found and versionExists say so. Because it is not known whether
a record made from a template of the tenant keeps the name with the suffix
-override that the Admin UI shows, both forms are matched. A template that
cannot be read at all (the catalog is unreachable or not a catalog) throws,
with the source named in the message.
the application record, or its templateName and templateVersion
Optionaloptions: ApplicationTemplateListOptions
which catalog to read, and whether to merge the templates of the tenant
a promise that resolves to the resolution
List the template versions of the catalog with the templates of the tenant merged over them (a template of the tenant with the id of a catalog template replaces it), sorted by name and version. A summary of each version is returned, without the form definition. Set
includeOverridesto false to list the catalog alone, which needs no connection to a tenant.