npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@zohodesk/platform-middleware

v0.0.1-beta.29

Published

Generalized Contract for the events from Marketplace App, In-App widgets, CRM-Plus and EFC

Downloads

1,044

Readme

marketplace-sdk

Config Description

| 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.|

Configuration Example

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'
  })

@zohodesk/platform-middleware - 0.0.1-beta.1

  • Events Object mutation issue fixed

@zohodesk/platform-middleware - 0.0.1-beta.2

  • Invoke API request Object information issue fixed

@zohodesk/platform-middleware - 0.0.1-beta.3

  • Added Marketplace Feature Flag to download the assest.
  • SDK changes to prevent the exisiting methods on the given namespace instead of overriding.

@zohodesk/platform-middleware - 0.0.1-beta.4

  • Global namespace overriding issue fix.

@zohodesk/platform-middleware - 0.0.1-beta.5

  • Dev mode changes merge issues fix.

@zohodesk/platform-middleware - 0.0.1-beta.6

  • Properties overriding fix for the getters/setters/invoke.

@zohodesk/platform-middleware - 0.0.1-beta.7

  • 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.

@zohodesk/platform-middleware - 0.0.1-beta.8

  • URL CHANGE ACTION - this action gets dispatched twice to update in history and state, so we filtered to broadcast the event once.

@zohodesk/platform-middleware - 0.0.1-beta.9

  • Platform Instance undefined error - Fixed.

@zohodesk/platform-middleware - 0.0.1-beta.10

  • diaptch function added to SDK global namespace.

@zohodesk/platform-middleware - 0.0.1-beta.11

  • Hook event notify handler added as config from the Application.
  • getState() method is passed instead the state object to event/hooks responseHandler function.

@zohodesk/platform-middleware - 0.0.1-beta.12

  • Hook event response Handler function rejewct handled.
  • Hook reject error message issue fix.
  • Selectn used for data fetch from nested object.

@zohodesk/platform-middleware - 0.0.1-beta.13

  • Event broadcasted before the next(action).

@zohodesk/platform-middleware - 0.0.1-beta.14

  • 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.

@zohodesk/platform-middleware - 0.0.1-beta.15

  • 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.

@zohodesk/platform-middleware - 0.0.1-beta.16

  • Added the config decsription and sample to README file.
  • Fixed validation issues.

@zohodesk/platform-middleware - 0.0.1-beta.17

  • Added the package-lock.json entry in the npmignore.

@zohodesk/platform-middleware - 0.0.1-beta.18

  • 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.

@zohodesk/platform-middleware - 0.0.1-beta.19

  • Update a fix for hookRejectCallback - moved to one of key in the action.

@zohodesk/platform-middleware - 0.0.1-beta.20

  • Promise resolving not working properly - issue fixed
  • Zoho one frame origin fixes for embeddable zoho services.

@zohodesk/platform-middleware - 0.0.1-beta.21

  • Removed unwanted next(action) called in hook rejection

@zohodesk/platform-middleware - 0.0.1-beta.22

  • Throw the error message to the reject callback while problem in responsehandler method

@zohodesk/platform-middleware - 0.0.1-beta.23

  • Hook rejection title and name handling fix

@zohodesk/platform-middleware - 0.0.1-beta.24

  • Hooks handling for without api action
  • Support the customized event name

@zohodesk/platform-middleware - 0.0.1-beta.25

  • Reverting - Hooks handling for without api action from Previous version

@zohodesk/platform-middleware - 0.0.1-beta.26

  • Providing temprorly overrideInvokeMethodToCommonPattern flag hook for ProductSDK method.
  • Flag check for marketplace config validation.

@zohodesk/platform-middleware - 0.0.1-beta.27 & 0.0.1-beta.28

  • Bundling issue fixed

@zohodesk/platform-middleware - 0.0.1-beta.29

  • Handling the multiple event listener functions.
  • Provided the support to prevent the default notification popup for the hook rejection and custom title & message key.