API Extension Project Files
The project files in which you develop API Extension applications have the structure shown in the following image. You can use the Yeoman Generator to automatically scaffold these files.
|assets||This folder contains the subfolders where you code your custom functions and design your tests. When you run Grunt, all the files in the assets folder are uploaded to your application in Dev Center.|
|Gruntfile.js||This file defines Grunt task configurations and loads Grunt plugins. Grunt tasks automate the repetitive aspects of API Extensions development and are invoked through the command line. You can add custom Grunt tasks to this file if you wish. The default Grunt commands include the following co|
|mozu-config.json||This file stores authentication credentials for the application, sync app, and your Dev Center account.|
|package.json||This file stores npm module metadata (like the package name and version number) and includes a list of dependencies for the application (for example, Grunt dependencies, development tools, and any external Node.js libraries that the application leverages).|
|dist||This folder contains built and optimized assets that result from the Grunt build task.|
|manifest.js files||These files define the relationship between custom functions and the actions they bind to. The build task autogenerates these files based on the settings you specify in the Yeoman scaffolding tool, and then leverages the manifest files to generate the |
The Structure of the Action Files
|Type||Identifies the type of action.|
|Domain||Identifies the domain of the action, which specifies what part of the API hierarchy the action interacts with. For example, |
|Action||Identifies the HTTP or action that runs the custom function. For example, |
Specifies whether the custom function runs before or after the HTTP or Kibo action occurs. For example, for an HTTP action,
This embedded action executes the custom functions associated with it after a price for an order is set.
To see the full list of actions available in API Extensions, refer to the reference documentation.