- 05 Dec 2022
-
DarkLight
-
PDF
Overview - Code Files
- Updated on 05 Dec 2022
-
DarkLight
-
PDF
adapter.js
This file contains the adapter code that is exposed to the rest of the Itential Automation Platform (IAP). Public methods in this file can be called from other parts of IAP so that actions from the adapter can be provided to the other system. The Adapter Builder makes a method in this file for each action within the API. This file also extends the adapterBase.js file so that it has access to all the adapterBase methods, and the Adapter Utils. It is assumed that you will modify the methods in this file as needed to make use of essential capabilities and add any needed logic.
adapterBase.js
This file contains generic adapter methods. It should not be modified because when an adapter is migrated, this file is replaced with a newer version. This file includes the connect and healthcheck methods, which also should not be modified. If there is a need to modify these methods, you can override them in the adapter.js file.
-
AdapterBase.js is a file the Adapter Builder owns, and when the adapter is updated, the adapterBase.js will be replaced with a newer version. Therefore, any changes you make will be overwritten.
-
If you find a bug in adapterBase.js, or you want to add another capability, open a ticket for the Itential Adapter Team and we will make the requested modifications and then migrate the fix to all adapters.
Adapter Utils
Most of the adapter code lives here. The Adapter Utils provide all the essential capabilities, including translation, filtering, authentication, throttling, retries, redirects, mock data results, etc.