forest-express
Advanced tools
Comparing version 0.1.10 to 0.1.11
@@ -12,2 +12,8 @@ 'use strict'; | ||
.then(function (schema) { | ||
function hasIntercomIntegration() { | ||
return opts.integrations && opts.integrations.intercom && | ||
opts.integrations.intercom.apiKey && | ||
opts.integrations.intercom.appId; | ||
} | ||
function hasStripeIntegration() { | ||
@@ -18,2 +24,22 @@ return opts.integrations && opts.integrations.stripe && | ||
function setupIntercomIntegration() { | ||
schema.fields.push({ | ||
field: 'intercom_conversations', | ||
type: ['String'], | ||
reference: 'intercom_conversations.id', | ||
column: null, | ||
isSearchable: false, | ||
integration: 'intercom' | ||
}); | ||
schema.fields.push({ | ||
field: 'intercom_attributes', | ||
type: ['String'], | ||
reference: 'intercom_attributes.id', | ||
column: null, | ||
isSearchable: false, | ||
integration: 'intercom' | ||
}); | ||
} | ||
function setupStripeIntegration() { | ||
@@ -48,2 +74,8 @@ schema.fields.push({ | ||
if (hasIntercomIntegration() && | ||
opts.integrations.intercom.userCollection === | ||
implementation.getModelName(model)) { | ||
setupIntercomIntegration(); | ||
} | ||
if (hasStripeIntegration() && | ||
@@ -50,0 +82,0 @@ opts.integrations.stripe.userCollection === |
{ | ||
"name": "forest-express", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "The official Express liana for Forest", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
54478
1512