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

@xapp/dynamo-service

Package Overview
Dependencies
Maintainers
5
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xapp/dynamo-service - npm Package Compare versions

Comparing version 0.0.47 to 0.0.48

xapp-dynamo-service-0.0.47.tgz

6

dist/service/TableService.d.ts

@@ -7,2 +7,5 @@ import { ConditionExpression, DynamoService, QueryParams, QueryResult, ScanParams, ScanResult, UpdateBody, UpdateReturnType } from "./DynamoService";

}
export interface PutAllReturn<T> {
unprocessed: T[];
}
export declare class TableService<T extends object> {

@@ -21,2 +24,3 @@ readonly tableName: string;

put(obj: T, condition?: ConditionExpression): Promise<T>;
putAll(obj: T[]): Promise<PutAllReturn<T>>;
update(key: Partial<T>, obj: UpdateBody<T>): Promise<void>;

@@ -39,3 +43,3 @@ update(key: Partial<T>, obj: UpdateBody<T>, conditionExpression: ConditionExpression): Promise<void>;

scan<P extends keyof T>(params: ScanParams, projection: P | P[]): Promise<ScanResult<Pick<T, P>>>;
delete(key: Partial<T>): Promise<void>;
delete(key: Partial<T> | Partial<T>[]): Promise<void>;
private convertObjFromDynamo(dynamoObj);

@@ -42,0 +46,0 @@ private convertObjFromDynamo<P>(dynamoObj);

@@ -70,2 +70,14 @@ "use strict";

}
putAll(obj) {
obj.forEach(o => Object_1.throwIfDoesNotContain(o, this.requiredKeys));
const putObjs = (this.props.trimUnknown) ?
obj.map(o => Object_1.subset(o, this.knownKeys)) :
obj;
const converted = putObjs.map(p => this.convertObjToDynamo(p));
return this.db.put(this.tableName, converted).then(unprocessed => {
return {
unprocessed: unprocessed
};
});
}
update(key, obj, conditionExpression, returnType) {

@@ -72,0 +84,0 @@ Object_1.throwIfDoesContain(obj.remove, this.constantKeys.concat(this.requiredKeys));

2

package.json
{
"name": "@xapp/dynamo-service",
"version": "0.0.47",
"version": "0.0.48",
"description": "A dynamo help class which will help maintain data integrity.",

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

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