Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rest-client-sdk

Package Overview
Dependencies
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rest-client-sdk - npm Package Compare versions

Comparing version 2.0.0-rc.2 to 2.0.0-rc.3

2

package.json
{
"name": "rest-client-sdk",
"version": "2.0.0-rc.2",
"version": "2.0.0-rc.3",
"description": "Rest Client SDK for API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -37,3 +37,8 @@ # Mapado Rest Client JS SDK [![Build Status](https://travis-ci.org/mapado/rest-client-js-sdk.svg?branch=master)](https://travis-ci.org/mapado/rest-client-js-sdk) [![Greenkeeper badge](https://badges.greenkeeper.io/mapado/rest-client-js-sdk.svg)](https://greenkeeper.io/)

productMetadata.setRelationList([
new Relation('categoryList', Relation.ONE_TO_MANY),
new Relation(
Relation.ONE_TO_MANY, // type: Relation.ONE_TO_MANY or Relation.MANY_TO_ONE
'categories', // targetMetadataKey: must match the first argument of `ClassMetadata` constructor of the target entity
'category_list', // serializedKey: the key returned from your API
'categoryList', // attributeName: optional, the name in your entity, default to the `serializedKey` attribute
),
]);

@@ -47,3 +52,3 @@

categoryMetadata.setRelationList([
new Relation('product', Relation.MANY_TO_ONE),
new Relation(Relation.MANY_TO_ONE, 'product', 'product'),
]);

@@ -50,0 +55,0 @@

class Relation {
constructor(type, relationKey, serializedKey /* , targetEntity */) {
constructor(type, targetMetadataKey, serializedKey, attributeName = null) {
this.type = type;
this.targetMetadataKey = targetMetadataKey;
this.serializedKey = serializedKey;
this.relationKey = relationKey;
// this.targetEntity = targetEntity;
this.attributeName = attributeName || this.serializedKey;
}

@@ -8,0 +8,0 @@

@@ -172,3 +172,3 @@ import { isImmutable } from 'immutable';

relationList.forEach((newRelationValue, relationKey) => {
relationList.forEach((newRelationValue, relationAttributeName) => {
const oldRelationValue = findOldRelation(

@@ -185,3 +185,3 @@ newRelationValue,

) {
dirtyFields[key][relationKey] = newRelationValue;
dirtyFields[key][relationAttributeName] = newRelationValue;

@@ -204,6 +204,9 @@ return;

if (dirtyFields[key][relationKey]) {
Object.assign(dirtyFields[key][relationKey], recursiveDiff);
if (dirtyFields[key][relationAttributeName]) {
Object.assign(
dirtyFields[key][relationAttributeName],
recursiveDiff
);
} else {
dirtyFields[key][relationKey] = recursiveDiff;
dirtyFields[key][relationAttributeName] = recursiveDiff;
}

@@ -260,3 +263,3 @@ }

const relationMetadata = this.mapping.getClassMetadataByKey(
currentRelation.relationKey
currentRelation.targetMetadataKey
);

@@ -267,3 +270,3 @@

`relation metadata is not set for relation ${classMetadata.key}.${
currentRelation.relationKey
currentRelation.targetMetadataKey
}`

@@ -270,0 +273,0 @@ );

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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