This adds a new api endpoint "/defaultInitInfo/:type/:name" which returns the default init info for a component. This api endpoint calls a user specified callback to modify the initInfo, getDefaultInitInfo. This is useful for generating and setting an access token or setting up custom defaults for extensionSettings or other properties in the initInfo.
Related Issue
Motivation and Context
I got tired of manually adding an access token and IMS orgId when developing the Tags extension for AEP Web SDK. Also we have a drop down that gets data from the extensionSettings part of initInfo to select the Alloy instance. This errors out when the extensionSettings is {"foo": "bar }.
This change will save our team lots of time and frustration as before now we have had to copy and paste tokens, and remember how to get the instance name picker to work.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
This adds a new api endpoint "/defaultInitInfo/:type/:name" which returns the default init info for a component. This api endpoint calls a user specified callback to modify the initInfo,
getDefaultInitInfo
. This is useful for generating and setting an access token or setting up custom defaults for extensionSettings or other properties in the initInfo.Related Issue
Motivation and Context
I got tired of manually adding an access token and IMS orgId when developing the Tags extension for AEP Web SDK. Also we have a drop down that gets data from the extensionSettings part of initInfo to select the Alloy instance. This errors out when the extensionSettings is
{"foo": "bar }
.This change will save our team lots of time and frustration as before now we have had to copy and paste tokens, and remember how to get the instance name picker to work.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: