New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@serialized/serialized-client

Package Overview
Dependencies
Maintainers
3
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serialized/serialized-client

Client library for Serialized APIs.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by42.86%
Maintainers
3
Weekly downloads
 
Created
Source

Serialized Javascript & Typescript client

The official Javascript/Typescript client for Serialized.

✨ Features

  • Client for Event Sourcing & CQRS APIs provided by Serialized
  • Works both for Typescript and Javascript on Node version >= 10.
  • Promise-based API that supports async/await
  • Built with Typescript
  • Provides an easy way to implement DDD Aggregates using Event Sourcing.

💡 Getting Started

First, install the Serialized TS/JS client via the npm package manager:

npm install @serialized/serialized-client

Then, import the library and initialize the client instance:

var {Serialized} = require("@serialized/serialized-client")
var serialized = Serialized.create({
    accessKey: "<YOUR_ACCESS_KEY>", 
    secretAccessKey: "<YOUR_SECRET_ACCESS_KEY>"
});

Test the client by storing an event:

var aggregateClient = serialized.aggregates;
var request = {
      aggregateType: 'user-registration',
      aggregateId: uuidv4(),
      event: {
        eventType: 'UserRegistrationStarted',
        data: {
          email: 'johndoe@example.com'
        }
      }
    }
await aggregateClient.storeEvent(request)

❓ Troubleshooting

Encountering an issue? Don't feel afraid to add an issue here on Github or to reach out via Serialized.

📄 Resources

Keywords

FAQs

Package last updated on 21 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc