@friggframework/api-module-42matters
Advanced tools
Comparing version 0.0.6-v1-alpha.7 to 0.0.6-v1-alpha-package-update.0
31
api.js
@@ -1,6 +0,5 @@ | ||
const { OAuth2Requester } = require('@friggframework/module-plugin'); | ||
const { get } = require('@friggframework/assertions'); | ||
const { ApiKeyRequester, ModuleConstants, get } = require('@friggframework/core-rollup'); | ||
class Api extends OAuth2Requester { | ||
class Api extends ApiKeyRequester { | ||
constructor(params) { | ||
@@ -40,2 +39,28 @@ super(params); | ||
getAuthorizationRequirements() { | ||
return { | ||
url: null, | ||
type: ModuleConstants.authType.apiKey, | ||
data: { | ||
jsonSchema: { | ||
type: 'object', | ||
required: ['access_token'], | ||
properties: { | ||
access_token: { | ||
type: 'string', | ||
title: 'Access Token', | ||
}, | ||
}, | ||
}, | ||
uiSchema: { | ||
clientKey: { | ||
'ui:help': | ||
'To obtain your Access Token, log in to 42Matters Launchpad and click Access Token under API.', | ||
'ui:placeholder': 'Access Token', | ||
}, | ||
}, | ||
}, | ||
}; | ||
} | ||
// API METHODS | ||
@@ -42,0 +67,0 @@ |
@@ -12,5 +12,3 @@ require('dotenv').config(); | ||
requiredAuthMethods: { | ||
getToken: async function(api, params){ | ||
return api.setTokens({access_token: api.access_token}); | ||
}, | ||
setAuthParams: async function(api, params){}, | ||
getEntityDetails: async function(api, callbackParams, tokenResponse, userId) { | ||
@@ -17,0 +15,0 @@ return { |
@@ -1,2 +0,2 @@ | ||
const { globalSetup } = require('@friggframework/test-environment'); | ||
const { globalSetup } = require('@friggframework/core-rollup'); | ||
module.exports = globalSetup; |
@@ -1,2 +0,2 @@ | ||
const { globalTeardown } = require('@friggframework/test-environment'); | ||
const { globalTeardown } = require('@friggframework/core-rollup'); | ||
module.exports = globalTeardown; |
{ | ||
"name": "@friggframework/api-module-42matters", | ||
"version": "0.0.6-v1-alpha.7", | ||
"version": "0.0.6-v1-alpha-package-update.0", | ||
"prettier": "@friggframework/prettier-config", | ||
@@ -14,7 +14,2 @@ "description": "", | ||
"devDependencies": { | ||
"@friggframework/assertions": "^1.0.22-v1-alpha.6", | ||
"@friggframework/eslint-config": "^1.0.21-v1-alpha.4", | ||
"@friggframework/logs": "^1.0.24-v1-alpha.4", | ||
"@friggframework/module-plugin": "^1.1.16-v1-alpha.7", | ||
"@friggframework/test-environment": "^1.1.21-v1-alpha.4", | ||
"dotenv": "^16.3.1", | ||
@@ -30,5 +25,6 @@ "eslint": "^8.49.0", | ||
"dependencies": { | ||
"@friggframework/core": "^0.2.0", | ||
"md5": "^2.3.0" | ||
}, | ||
"gitHead": "b5ae7333eb660a8014a7c27a08b5c8cb1938ff1c" | ||
"gitHead": "741dafe34c2d0187e9942ce655437c63a8a0943b" | ||
} |
require('dotenv').config(); | ||
const { Api } = require('../api'); | ||
const Authenticator = require("@friggframework/test-environment/Authenticator"); | ||
@@ -5,0 +4,0 @@ describe('42matters API Tests', () => { |
@@ -0,9 +1,18 @@ | ||
const { connectToDatabase, disconnectFromDatabase, createObjectId, Auther } = require('@friggframework/core-rollup'); | ||
//require('dotenv').config(); | ||
const { Definition} = require('../definition'); | ||
const { Auther } = require('@friggframework/module-plugin'); | ||
const {connectToDatabase, disconnectFromDatabase, createObjectId} = require('@friggframework/database/mongo'); | ||
const { Authenticator, testDefinition } = require("@friggframework/test-environment"); | ||
const { | ||
testDefinitionRequiredAuthMethods, | ||
testAutherDefinition | ||
} = require("@friggframework/test-environment"); | ||
describe('42matters Auther Tests', () => { | ||
let auther, authUrl; | ||
const mocks = { | ||
getAccountStatus: { | ||
status: 'active', | ||
} | ||
} | ||
testAutherDefinition(Definition, mocks) | ||
describe('42matters Module Live Tests', () => { | ||
let auther; | ||
beforeAll(async () => { | ||
@@ -35,5 +44,5 @@ await connectToDatabase(); | ||
}); | ||
it('Should test the Definition methods', async () => { | ||
await testDefinition(auther.api, Definition,undefined,undefined,auther.userId); | ||
}) | ||
it('Should test the Definition methods individually', async () => { | ||
await testDefinitionRequiredAuthMethods(auther.api, Definition,undefined,undefined,auther.userId); | ||
}); | ||
}); | ||
@@ -40,0 +49,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15568
5
374
2
+ Added@friggframework/core@^0.2.0
+ Added@friggframework/assertions@1.0.9(transitive)
+ Added@friggframework/core@0.2.15(transitive)
+ Added@friggframework/errors@1.1.7(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedaws-sdk@2.1692.0(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbuffer@4.9.2(transitive)
+ Addedcall-bind@1.0.8(transitive)
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addedcommon-tags@1.8.2(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedevents@1.1.1(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.7(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedieee754@1.1.13(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arguments@1.2.0(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-generator-function@1.1.0(transitive)
+ Addedis-regex@1.2.1(transitive)
+ Addedis-typed-array@1.1.15(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedjmespath@0.16.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlodash.get@4.4.2(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedmoment@2.30.1(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedpunycode@1.3.2(transitive)
+ Addedquerystring@0.2.0(transitive)
+ Addedsafe-regex-test@1.1.0(transitive)
+ Addedsax@1.2.1(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedurl@0.10.3(transitive)
+ Addedutil@0.12.5(transitive)
+ Addeduuid@8.0.0(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedwhich-typed-array@1.1.18(transitive)
+ Addedxml2js@0.6.2(transitive)
+ Addedxmlbuilder@11.0.1(transitive)