The Resource Imports sidebar in Code Repositories offers a centralized interface to manage imported Foundry resources within your TypeScript Functions repository. The sidebar allows you to import, remove, and view details of various resources, including Ontology types, LMS language models, live deployments, and external systems such as REST APIs.
An Ontology is required to import object and link types. To choose an Ontology:
If you have already imported at least one Ontology type, that type's Ontology is automatically selected. To change the Ontology, choose the Edit button next to the selected Ontology's name to open the Ontology selector dialog.
All imported resources within your repository must be associated with the same Ontology. Note that importing resources after changing the Ontology will overwrite any existing imports from other Ontologies.
To import resources using the sidebar:
After confirming your selection, Code Assist will be restarted to re-run the necessary code generation tasks to apply your changes.
Learn more about importing resources of a specific type:
Resources are categorized by type in the sidebar:
Choose the corresponding resource icon at the top of the sidebar to filter by type or use the text input to search by name. To remove a resource, hover over the resource icon and choose the Remove button. To add or remove multiple resources simultaneously, use a selector dialog. To view more details, select an imported resource to open its preview panel.
Some resource types may have dependencies between other resources. For instance, link types are organized under their respective object types. If an imported resource has dependencies, a message like "(1 link type)" will be displayed next to the resource title. To view a resource's dependencies, hover over the resource icon and select the chevron that appears.
Resources must have an API name to be referenced within code in TypeScript Functions repositories. If a resource lacks an API name, a warning is displayed. Hover over the warning sign to learn more or easily configure an API name by choosing Add API name. Alternatively, choose Learn more to see documentation about adding an API name tailored to the specific resource type.
By default, some resource types may not be enabled for use in your repository. The enabled resource types are determined by your functions.json
file. This is the contents of a typical default functions.json
file.
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13
{ "useOntologyApiNames" : true, "enableModelFunctions" : false, "enableModelGraphFunctions" : false, "enableDiscoverImproperOntologyAccess": false, "enableQueries": false, "enableModelMetadata": false, "useDeploymentApiNames": true, "enableVectorProperties": true, "enableTimeSeriesProperties": false, "enableExternalSystems": false, "enableMediaReferenceProperties": false }
Importing resources without enabling the corresponding flag in your functions.json
file may cause checks to fail in your repository. To use imported live deployments, set enableModelFunctions
to true. To use imported sources, set enableExternalSystems
to true.