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 - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

lib/AggregateClient.d.ts

27

lib/AggregateClient.js

@@ -9,2 +9,25 @@ 'use strict';

AggregateClient.prototype.checkExists = async function (aggregateType, aggregateId) {
return (await this.axiosClient.head(`/aggregates/${aggregateType}/${aggregateId}`, this.axiosConfig())).data;
}
AggregateClient.prototype.loadAggregate = async function (aggregateType, aggregateId, params) {
const config = this.axiosConfig();
config.params = params;
return (await this.axiosClient.get(`/aggregates/${aggregateType}/${aggregateId}`, config)).data;
}
AggregateClient.prototype.deleteAggregate = async function (aggregateType, aggregateId, deleteToken) {
if (deleteToken) {
let config = this.axiosConfig();
config.params = {
deleteToken: deleteToken
};
return (await this.axiosClient.get(`/aggregates/${aggregateType}/${aggregateId}`, config)).data;
} else {
return (await this.axiosClient.delete(`/aggregates/${aggregateType}/${aggregateId}`, this.axiosConfig())).data;
}
}
AggregateClient.prototype.save = async function (aggregateRoot, consistencyCheck = true) {

@@ -42,6 +65,2 @@ const uncommittedEvents = aggregateRoot.getUncommittedEvents();

AggregateClient.prototype.checkExists = async function (aggregateRoot) {
return (await this.axiosClient.head(`/aggregates/${aggregateRoot.aggregateType}/${aggregateRoot.aggregateId}/events`, this.axiosConfig())).data;
}
AggregateClient.prototype.load = async function (aggregateRoot) {

@@ -48,0 +67,0 @@ const response = (await this.axiosClient.get(`/aggregates/${aggregateRoot.aggregateType}/${aggregateRoot.aggregateId}`, this.axiosConfig())).data;

@@ -14,5 +14,23 @@ 'use strict';

FeedsClient.prototype.loadFeed = async function (feedName) {
return (await this.axiosClient.get(`/feeds/${feedName}`)).data;
const config = this.axiosConfig();
config.params = params;
return (await this.axiosClient.get(`/feeds/${feedName}`, config)).data;
}
FeedsClient.prototype.getCurrentSequenceNumber = async function (feedName) {
const headers = (await this.axiosClient.head(`/feeds/${feedName}`)).headers;
return headers['Serialized-SequenceNumber-Current']
}
FeedsClient.prototype.getGlobalSequenceNumber = async function () {
const headers = (await this.axiosClient.head(`/feeds/_all`)).headers;
return headers['Serialized-SequenceNumber-Current']
}
FeedsClient.prototype.loadAllFeed = async function (feedName, params) {
const config = this.axiosConfig();
config.params = params;
return (await this.axiosClient.get(`/feeds/_all`, config)).data;
}
module.exports = FeedsClient;

28

lib/ProjectionsClient.js

@@ -9,2 +9,14 @@ 'use strict';

ProjectionsClient.prototype.createOrUpdateDefinition = async function (request) {
return (await this.axiosClient.put(`/projections/definitions/${request.projectionName}`, request, this.axiosConfig())).data;
}
ProjectionsClient.prototype.deleteProjectionDefinition = async function (request) {
return (await this.axiosClient.delete(`/projections/definitions/${request.projectionName}`, this.axiosConfig())).data;
}
ProjectionsClient.prototype.getProjectionDefinition = async function (projectionName) {
return (await this.axiosClient.get(`/projections/definitions/${projectionName}`, this.axiosConfig())).data;
}
ProjectionsClient.prototype.getSingleProjection = async function (projectionName, projectionId, awaitCreation) {

@@ -18,18 +30,18 @@ const config = this.axiosConfig();

ProjectionsClient.prototype.getAggregatedProjection = async function (projectionName) {
return (await this.axiosClient.get(`/projections/aggregated/${projectionName}`, this.axiosConfig())).data;
ProjectionsClient.prototype.recreateSingleProjections = async function (projectionName) {
return (await this.axiosClient.delete(`/projections/single/${projectionName}`, this.axiosConfig())).data;
}
ProjectionsClient.prototype.createOrUpdateDefinition = async function (request) {
return (await this.axiosClient.put(`/projections/definitions/${request.projectionName}`, request, this.axiosConfig())).data;
ProjectionsClient.prototype.listSingleProjections = async function (projectionName) {
return (await this.axiosClient.get(`/projections/single/${projectionName}`, this.axiosConfig())).data;
}
ProjectionsClient.prototype.getProjectionDefinition = async function (projectionName) {
return (await this.axiosClient.get(`/projections/definitions/${projectionName}`, this.axiosConfig())).data;
ProjectionsClient.prototype.getAggregatedProjection = async function (projectionName) {
return (await this.axiosClient.get(`/projections/aggregated/${projectionName}`, this.axiosConfig())).data;
}
ProjectionsClient.prototype.listSingleProjections = async function (projectionName) {
return (await this.axiosClient.get(`/projections/single/${projectionName}`, this.axiosConfig())).data;
ProjectionsClient.prototype.recreateAggregatedProjection = async function (projectionName) {
return (await this.axiosClient.delete(`/projections/aggregated/${projectionName}`, this.axiosConfig())).data;
}
module.exports = ProjectionsClient;

@@ -9,2 +9,34 @@ 'use strict';

ReactionsClient.prototype.createOrUpdateReactionDefinition = async function (request) {
return (await this.axiosClient.put(`/reactions/definitions`, request, this.axiosConfig())).data;
}
ReactionsClient.prototype.getReactionDefinition = async function (reactionName) {
return (await this.axiosClient.get(`/reactions/definitions/${reactionName}`, this.axiosConfig())).data;
}
ReactionsClient.prototype.listReactionDefinitions = async function () {
return (await this.axiosClient.get(`/reactions/definitions`, this.axiosConfig())).data;
}
ReactionsClient.prototype.listScheduledReactions = async function () {
return (await this.axiosClient.get(`/reactions/scheduled`, this.axiosConfig())).data;
}
ReactionsClient.prototype.deleteScheduledReaction = async function (reactionId) {
return (await this.axiosClient.delete(`/reactions/scheduled/${reactionId}`, this.axiosConfig())).data;
}
ReactionsClient.prototype.executeScheduledReaction = async function (reactionId) {
return (await this.axiosClient.post(`/reactions/scheduled/${reactionId}`, this.axiosConfig())).data;
}
ReactionsClient.prototype.listTriggeredReactions = async function () {
return (await this.axiosClient.get(`/reactions/triggered`, this.axiosConfig())).data;
}
ReactionsClient.prototype.reExecuteTriggeredReaction = async function () {
return (await this.axiosClient.post(`/reactions/triggered/:reactionId`, this.axiosConfig())).data;
}
module.exports = ReactionsClient;
{
"name": "@serialized/serialized-client",
"version": "0.3.0",
"version": "0.4.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "typings": "./index.d.ts",

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