Generalized Contract for the events from Marketplace App, In-App widgets, CRM-Plus and EFC
npm install @zohodesk/platform-middleware| Params | Description |
| --- | --- |
| marketplace | Object type. This has the mutliple options as below in the example. |
| featureFlags | Object type. To idenfy wether the assets of the feature specified needs to be loaded or not. For example {isMarketplaceNeeded: true}|
| postProductSDKAssetsFetch | Function type. This is function will get called when the SDK assets are fetched and loaded. |
| locale | String type. To notify the extensions or platform related integration about the user's current locale. For example en-US. |
| eventListeners | Object To which all the SDK calls will be routed. For Example { DESK_EVENT: deskEventHandler } |
| globalNameSpace | String type. The spcified string is converted to object with SDK methods. For example: If ZOHODESK is provided the generated SDK will be accessible as ZOHODESK.get. |
| events | Object type. To specify the events to be exposed to integrations/extensions. |
| renderWidgetActionConstant | String type. To identify the action which triggers the Widget Rendering. |
| isPromiseBasedAction | Boolean type. This denotes the actions that gets dispatched in the Application is in the instance of Promise.|
javascript
platformMiddleware({
marketplace: {
renderHandler: getDeskPluginManager, // Function
postAssestsFetch: postAssetsFetch, // Function
isDevMode: isDevMode, //Function
requestHandler: RequestHandler, // Funtion
notifyHandler:notifyHandler //Function
},
featureFlags: {
isMarketplaceNeeded: true
},
postProductSDKAssetsFetch:()=>{ ZOHODESK.sdkPromise.res() },
locale: 'en',
eventListeners: { DESK_EVENT: deskEventHandler },
globalNameSpace: 'ZOHODESK',
events: PlatformEvents,
renderWidgetActionConstant: 'RENDER_WIDGETS'
})
`$3
* Events Object mutation issue fixed
$3
* Invoke API request Object information issue fixed
$3
* Added Marketplace Feature Flag to download the assest.
* SDK changes to prevent the exisiting methods on the given namespace instead of overriding.
$3
* Global namespace overriding issue fix.
$3
* Dev mode changes merge issues fix.
$3
* Properties overriding fix for the getters/setters/invoke.$3
* CRM PLUS case - events should broadcast after the state update.
* Addded the function support to the events and hooks for data construction.
* Issue fix for the Hook events which called twice.
$3
* URL CHANGE ACTION - this action gets dispatched twice to update in history and state, so we filtered to broadcast the event once.
$3
* Platform Instance undefined error - Fixed.
$3
* diaptch function added to SDK global namespace.
$3
* Hook event notify handler added as config from the Application.
* getState() method is passed instead the state object to event/hooks responseHandler function.
$3
* Hook event response Handler function rejewct handled.
* Hook reject error message issue fix.
* Selectn used for data fetch from nested object.
$3
* Event broadcasted before the next(action).
$3
* Added the callback support for the ProductSDK post assets fetch.
* The callback function should be specified in the config object while intializing the middleware as
`postProductSDKAssetsFetch`.$3
* Added the config support to know the action type. For example the actions can be of promise based from the web worker implementation.
* The
`isPromiseBasedAction` config needs to be passed as a boolean value while intializing the middleware.$3
* Added the config decsription and sample to README file.
* Fixed validation issues.
$3
* Added the package-lock.json entry in the npmignore.
$3
* Provided the event name configuration as a function and array support for events names.
* Provided the
`getPrevState` function to the responseHandler function.
* Provided the `hookRejectCallback` function in the action payload to listen the notification of the hookRejection.$3
* Update a fix for hookRejectCallback - moved to one of key in the action.$3
* Promise resolving not working properly - issue fixed
* Zoho one frame origin fixes for embeddable zoho services.$3
* Removed unwanted next(action) called in hook rejection$3
* Throw the error message to the reject callback while problem in responsehandler method$3
* Hook rejection title and name handling fix$3
* Hooks handling for without api action
* Support the customized event name$3
* Reverting - Hooks handling for without api action from Previous version$3
* Providing temprorly overrideInvokeMethodToCommonPattern flag hook for ProductSDK method.
* Flag check for marketplace config validation.$3
* Bundling issue fixed$3
* Handling the multiple event listener functions.
* Provided the support to prevent the default notification popup for the hook rejection and custom title & message key.$3
* The top bar for CRMPlus and ZohoOne is not functioning, even after the help widget is rendered. This issue needs to be addressed.$3
* Support multiple widgets based on eventListenerName and scopeName`.