@friggframework/api-module-pipedrive 0.8.0 → 0.8.1
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/models/credential.js +4 -23
- package/package.json +1 -1
package/models/credential.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
const mongoose = require('mongoose');
|
|
2
|
-
const
|
|
3
|
-
const Parent = require('../../../base/models/Credential');
|
|
2
|
+
const { Credential: Parent } = require('@friggframework/module-plugin');
|
|
4
3
|
|
|
5
|
-
const
|
|
6
|
-
const parentModelObject = new Parent();
|
|
7
|
-
|
|
8
|
-
const _schema = new mongoose.Schema({
|
|
4
|
+
const schema = new mongoose.Schema({
|
|
9
5
|
accessToken: {
|
|
10
6
|
type: String,
|
|
11
7
|
trim: true,
|
|
@@ -19,20 +15,5 @@ const _schema = new mongoose.Schema({
|
|
|
19
15
|
companyDomain: { type: String },
|
|
20
16
|
});
|
|
21
17
|
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
_schema,
|
|
25
|
-
parentModelObject
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
class Credential extends Parent {
|
|
29
|
-
static Schema = _schema;
|
|
30
|
-
|
|
31
|
-
static Model = _model;
|
|
32
|
-
|
|
33
|
-
constructor(model = _model) {
|
|
34
|
-
super(model);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
module.exports = Credential;
|
|
18
|
+
const Credential = Parent.discriminator('PipedriveCredentials', schema);
|
|
19
|
+
module.exports = { Credential };
|
package/package.json
CHANGED