fintalk-pkg 2.8.1 → 3.0.0

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.
@@ -1,5 +1,4 @@
1
1
  const dynamoose = require("dynamoose");
2
- dynamoose.model.defaults.set({ create: false, waitForActive: false });
3
2
  var Schema = dynamoose.Schema;
4
3
 
5
4
  var AudioCacheSchema = new Schema({
@@ -9,4 +8,4 @@ var AudioCacheSchema = new Schema({
9
8
  timestamps: true
10
9
  });
11
10
 
12
- module.exports = dynamoose.model("fintalk-orchestrator-audio-cache", AudioCacheSchema, {"expires": {"ttl": (72 * (60 * 60)), "attribute": "ttl" }});
11
+ module.exports = dynamoose.model("fintalk-orchestrator-audio-cache", AudioCacheSchema, { create: false, waitForActive: false, "expires": {"ttl": (72 * (60 * 60)), "attribute": "ttl" }});
@@ -1,6 +1,5 @@
1
1
  const dynamoose = require("dynamoose");
2
2
 
3
- dynamoose.model.defaults.set({ create: false, waitForActive: false });
4
3
  const Schema = dynamoose.Schema;
5
4
 
6
5
  const AuxStructureSchema = new Schema(
@@ -20,4 +19,4 @@ const AuxStructureSchema = new Schema(
20
19
  },
21
20
  );
22
21
 
23
- module.exports = dynamoose.model("fintalk-orchestrator-aux-structure", AuxStructureSchema);
22
+ module.exports = dynamoose.model("fintalk-orchestrator-aux-structure", AuxStructureSchema, { create: false, waitForActive: false });
@@ -1,5 +1,4 @@
1
1
  const dynamoose = require("dynamoose");
2
- dynamoose.model.defaults.set({ create: false, waitForActive: false });
3
2
  var Schema = dynamoose.Schema;
4
3
 
5
4
  var ConversationSchema = new Schema({
@@ -23,10 +22,14 @@ var ConversationSchema = new Schema({
23
22
  intentName: { type: String, required: false },
24
23
  }
25
24
  }]
26
- }
25
+ },
26
+ cpf: { type: String, required: false },
27
+ whatsappId: { type: String, required: false },
28
+ name: { type: String, required: false },
29
+ sessionId: { type: String, required: false },
27
30
  }, {
28
31
  saveUnknown: true,
29
32
  timestamps: true
30
33
  });
31
34
 
32
- module.exports = dynamoose.model("fintalk-orchestrator-conversations", ConversationSchema, {"expires": {"ttl": 2592000000, "attribute": "expires" }});
35
+ module.exports = dynamoose.model("fintalk-orchestrator-conversations", ConversationSchema, { create: false, waitForActive: false, "expires": {"ttl": 2592000000, "attribute": "expires" }});
package/model/Customer.js CHANGED
@@ -1,7 +1,5 @@
1
1
  const dynamoose = require("dynamoose");
2
2
 
3
- dynamoose.model.defaults.set({ create: false, waitForActive: false });
4
-
5
3
  var Schema = dynamoose.Schema;
6
4
 
7
5
  var CustomerSchema = new Schema({
@@ -138,7 +136,7 @@ var CustomerSchema = new Schema({
138
136
  },
139
137
  {
140
138
  timestamps: true,
141
- saveUnknown: ['postbackHeaders.**']
139
+ saveUnknown: ["postbackHeaders.**"]
142
140
  });
143
141
 
144
142
  /* creditCards: [{ type: mongoose.Schema.Types.ObjectId, ref: "CreditCard" }],*/
@@ -1,5 +1,4 @@
1
1
  const dynamoose = require("dynamoose");
2
- dynamoose.model.defaults.set({ create: false, waitForActive: false });
3
2
  var Schema = dynamoose.Schema;
4
3
 
5
4
  const TransactionStatus = {
@@ -41,6 +40,6 @@ var TransactionSchema = new Schema({
41
40
  saveUnknown: true
42
41
  });
43
42
 
44
- const Transaction = dynamoose.model(`payment-get-data-${process.env.STAGE}-transaction`, TransactionSchema, {"expires": {"ttl": 3600000 }});
43
+ const Transaction = dynamoose.model(`payment-get-data-${process.env.STAGE}-transaction`, TransactionSchema, { create: false, waitForActive: false, "expires": {"ttl": 3600000 }});
45
44
 
46
45
  module.exports = { Transaction, TransactionStatus };
package/model/Vars.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const dynamoose = require("dynamoose");
2
- dynamoose.model.defaults.set({ create: false, waitForActive: false });
3
2
  var Schema = dynamoose.Schema;
4
3
 
5
4
  var VarsSchema = new Schema({
@@ -9,4 +8,4 @@ var VarsSchema = new Schema({
9
8
  timestamps: false
10
9
  });
11
10
 
12
- module.exports = dynamoose.model(`fintalk-orchestrator-${process.env.BOT}-vars`, VarsSchema);
11
+ module.exports = dynamoose.model(`fintalk-orchestrator-${process.env.BOT}-vars`, VarsSchema, { create: false, waitForActive: false });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fintalk-pkg",
3
- "version": "2.8.1",
3
+ "version": "3.0.0",
4
4
  "description": "Common code between projects",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,7 +24,7 @@
24
24
  "uuid": "^8.0.0"
25
25
  },
26
26
  "dependencies": {
27
- "dynamoose": "~2.8.8",
27
+ "dynamoose": "~4.0.4",
28
28
  "fintalk-logger": "~1.1.3"
29
29
  }
30
30
  }
@@ -1,33 +0,0 @@
1
- name: Sonarqube Checks
2
-
3
- on:
4
- push:
5
- branches:
6
- - '*'
7
- pull_request:
8
- types: [opened, synchronize, reopened]
9
-
10
- jobs:
11
- build:
12
- name: Build
13
- runs-on: self-hosted
14
- permissions: read-all
15
- steps:
16
- - uses: actions/checkout@v2
17
- with:
18
- fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
19
- - uses: sonarsource/sonarqube-scan-action@master
20
- with:
21
- args: >
22
- -Dsonar.projectKey=fintalk-ai_${{ github.event.repository.name }}
23
- env:
24
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
25
- SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
26
- # If you wish to fail your job when the Quality Gate is red, uncomment the
27
- # following lines. This would typically be used to fail a deployment.
28
- # We do not recommend to use this in a pull request. Prefer using pull request
29
- # decoration instead.
30
- # - uses: sonarsource/sonarqube-quality-gate-action@master
31
- # timeout-minutes: 5
32
- # env:
33
- # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}