fintalk-pkg 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,16 +1,32 @@
1
- module.exports = {
2
-
3
- //EXTERNALS
4
- Dynamoose: require("dynamoose"),
1
+ const dynamoose = require("dynamoose");
2
+ const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb');
3
+
4
+ const marshallOptions = {
5
+ removeUndefinedValues: true,
6
+ convertClassInstanceToMap: true
7
+ };
8
+ dynamoose.aws.converter = () => ({
9
+ marshall: (obj) => marshall(obj, marshallOptions),
10
+ unmarshall: (obj) => unmarshall(obj),
11
+ convertToAttr: (obj) => marshall(obj, marshallOptions),
12
+ convertToNative: (obj) => unmarshall(obj)
13
+ });
5
14
 
6
- //SCHEMAS
7
- CustomerSchema : require("./model/Customer"),
8
- TransactionSchema : require("./model/Transaction"),
9
- AuxSchema: require("./model/AuxStructure"),
15
+ const CustomerSchema = require("./model/Customer");
16
+ const TransactionSchema = require("./model/Transaction");
17
+ const AuxSchema = require("./model/AuxStructure");
18
+ const BaseController = require("./base/BaseController");
19
+ const FlowControl = require("./base/FlowControl");
20
+ const Logger = require("./base/Logger");
10
21
 
11
- BaseController : require("./base/BaseController"),
12
- FlowControl : require("./base/FlowControl"),
13
- Logger : require("./base/Logger")
22
+ module.exports = {
23
+ Dynamoose: dynamoose,
24
+ CustomerSchema,
25
+ TransactionSchema,
26
+ AuxSchema,
27
+ BaseController,
28
+ FlowControl,
29
+ Logger,
14
30
  };
15
31
 
16
32
  console.info("Lib Exported!");
@@ -1,4 +1,18 @@
1
1
  const dynamoose = require("dynamoose");
2
+ const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb');
3
+
4
+ const marshallOptions = {
5
+ removeUndefinedValues: true,
6
+ convertClassInstanceToMap: true
7
+ };
8
+
9
+ dynamoose.aws.converter = () => ({
10
+ marshall: (obj) => marshall(obj, marshallOptions),
11
+ unmarshall: (obj) => unmarshall(obj),
12
+ convertToAttr: (obj) => marshall(obj, marshallOptions),
13
+ convertToNative: (obj) => unmarshall(obj)
14
+ });
15
+
2
16
  var Schema = dynamoose.Schema;
3
17
 
4
18
  var AudioCacheSchema = new Schema({
@@ -1,4 +1,17 @@
1
1
  const dynamoose = require("dynamoose");
2
+ const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb');
3
+
4
+ const marshallOptions = {
5
+ removeUndefinedValues: true,
6
+ convertClassInstanceToMap: true
7
+ };
8
+
9
+ dynamoose.aws.converter = () => ({
10
+ marshall: (obj) => marshall(obj, marshallOptions),
11
+ unmarshall: (obj) => unmarshall(obj),
12
+ convertToAttr: (obj) => marshall(obj, marshallOptions),
13
+ convertToNative: (obj) => unmarshall(obj)
14
+ });
2
15
 
3
16
  const Schema = dynamoose.Schema;
4
17
 
@@ -1,4 +1,18 @@
1
1
  const dynamoose = require("dynamoose");
2
+ const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb');
3
+
4
+ const marshallOptions = {
5
+ removeUndefinedValues: true,
6
+ convertClassInstanceToMap: true
7
+ };
8
+
9
+ dynamoose.aws.converter = () => ({
10
+ marshall: (obj) => marshall(obj, marshallOptions),
11
+ unmarshall: (obj) => unmarshall(obj),
12
+ convertToAttr: (obj) => marshall(obj, marshallOptions),
13
+ convertToNative: (obj) => unmarshall(obj)
14
+ });
15
+
2
16
  var Schema = dynamoose.Schema;
3
17
 
4
18
  var ConversationSchema = new Schema({
package/model/Customer.js CHANGED
@@ -1,4 +1,17 @@
1
1
  const dynamoose = require("dynamoose");
2
+ const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb');
3
+
4
+ const marshallOptions = {
5
+ removeUndefinedValues: true,
6
+ convertClassInstanceToMap: true
7
+ };
8
+
9
+ dynamoose.aws.converter = () => ({
10
+ marshall: (obj) => marshall(obj, marshallOptions),
11
+ unmarshall: (obj) => unmarshall(obj),
12
+ convertToAttr: (obj) => marshall(obj, marshallOptions),
13
+ convertToNative: (obj) => unmarshall(obj)
14
+ });
2
15
 
3
16
  var Schema = dynamoose.Schema;
4
17
 
@@ -1,4 +1,18 @@
1
1
  const dynamoose = require("dynamoose");
2
+ const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb');
3
+
4
+ const marshallOptions = {
5
+ removeUndefinedValues: true,
6
+ convertClassInstanceToMap: true
7
+ };
8
+
9
+ dynamoose.aws.converter = () => ({
10
+ marshall: (obj) => marshall(obj, marshallOptions),
11
+ unmarshall: (obj) => unmarshall(obj),
12
+ convertToAttr: (obj) => marshall(obj, marshallOptions),
13
+ convertToNative: (obj) => unmarshall(obj)
14
+ });
15
+
2
16
  var Schema = dynamoose.Schema;
3
17
 
4
18
  const TransactionStatus = {
package/model/Vars.js CHANGED
@@ -1,4 +1,18 @@
1
1
  const dynamoose = require("dynamoose");
2
+ const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb');
3
+
4
+ const marshallOptions = {
5
+ removeUndefinedValues: true,
6
+ convertClassInstanceToMap: true
7
+ };
8
+
9
+ dynamoose.aws.converter = () => ({
10
+ marshall: (obj) => marshall(obj, marshallOptions),
11
+ unmarshall: (obj) => unmarshall(obj),
12
+ convertToAttr: (obj) => marshall(obj, marshallOptions),
13
+ convertToNative: (obj) => unmarshall(obj)
14
+ });
15
+
2
16
  var Schema = dynamoose.Schema;
3
17
 
4
18
  var VarsSchema = new Schema({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fintalk-pkg",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "Common code between projects",
5
5
  "main": "index.js",
6
6
  "scripts": {