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

redux-immutable-model

v0.5.11

Published

A redux-based library to support complex data models with minimal coding

Downloads

43

Readme

redux-immutable-model

This module simplifies working with application data models that are backed by RESTful APIs in Redux applications. It is a baseline component of a framework that provides automatically generated code from OpenAPI 3.0 schema specifications.

Objectives

  • Eliminate the need to manually code asynchronous Redux actions (e.g. start, success, error) for CRUD operations on data model objects.
  • Provide object methods to access data model object attributes directly, without needing Immutable paths.
  • Simplify common data model state tracking (instance is new, dirty, ...)
  • Provide application access to relevant instances of data model objects via a data service paradigm. Each data model object has a corresponding service, and that service manages Redux state for all instances of that data model object.
  • Provide simple methods for CRUD operations on an instance via the service.

Integrations

  • Facilitates integration with different security frameworks; application can provide hooks to collect / set required HTTP security components such as cookies and headers.
  • Internationalization support for server / async transaction error messages via custom result processing.

Integration Classes

These classes will be directly accessed by any application using this frameowrk.

  • BaseRIMObject - Implements shared functionality for data model objects, e.g. tracking client state relative to persisted state (isDirty, isNew, ...). See here for more details.
  • BaseRIMService - Provides collection management and API interaction for a a data model component. See here for more details.
  • Configuration - Provides applications the ability to customize behavior of this framework as needed for different types of integrations. See here for more details.

Framework Modules

These modules are generally intended to be internal to the framework.

  • ActionTypes - Defines Redux action types used by this package
  • ExecuteRestAPICall - Performs fetch operations against the data model RESTful APIs, including automatic generation of Redux actions. Invoked via persistence actions in BaseRIMService.
  • ServiceReducers - Includes reducer methods for default CRUD actions / verbs. Invoked via reducer() in BaseRIMService.
  • ReduxAsyncStatus - Constants for default redux status values for async API calls
  • ReduxVerbs - Constants for default verbs, where a verb corresponds to a CRUD action

Running Tests

You must have the environment variable API_URL set with a path that includes the API version for tests to run successfully. Example:

export API_PATH='http://localhost/api/v1'

Changelog

  • 0.5.4-11 - Steps on the path to correct function in a microservice environment with multiple hydrate endpoints
  • 0.5.3 - Fixes bad publish (forgot to build) for 0.5.2
  • 0.5.2 - Fixes #18 - Actions should not require a rimObj
  • 0.5.1 - Fixes #20 - Adds synchronous actions to start / cancel new and edit workflows
  • 0.5.0 - Fixes #15 - getApiHeaders needs to pass verb as well as headers to allow verb-specific behavior