rename syncWebHooks to syncAutomations
This commit is contained in:
parent
e1eda14204
commit
d271bbdadb
|
@ -90,8 +90,8 @@ export const useScimIntegration = () => {
|
||||||
return useFeature(Feature.SCIM)
|
return useFeature(Feature.SCIM)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useSyncWebhook = () => {
|
export const useSyncAutomations = () => {
|
||||||
return useFeature(Feature.SYNC_WEBHOOKS)
|
return useFeature(Feature.SYNC_AUTOMATIONS)
|
||||||
}
|
}
|
||||||
|
|
||||||
// QUOTAS
|
// QUOTAS
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
export let blockIdx
|
export let blockIdx
|
||||||
export let lastStep
|
export let lastStep
|
||||||
|
|
||||||
let syncWebhooksEnabled = $licensing.syncWebhooksEnabled
|
let syncAutomationsEnabled = $licensing.syncAutomationsEnabled
|
||||||
let collectBlockAllowedSteps = [TriggerStepID.APP, TriggerStepID.WEBHOOK]
|
let collectBlockAllowedSteps = [TriggerStepID.APP, TriggerStepID.WEBHOOK]
|
||||||
let selectedAction
|
let selectedAction
|
||||||
let actionVal
|
let actionVal
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
message: "Please configure SMTP",
|
message: "Please configure SMTP",
|
||||||
},
|
},
|
||||||
COLLECT: {
|
COLLECT: {
|
||||||
disabled: !lastStep || !syncWebhooksEnabled || collectBlockExists,
|
disabled: !lastStep || !syncAutomationsEnabled || collectBlockExists,
|
||||||
message: collectDisabledMessage(),
|
message: collectDisabledMessage(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
<div class="item-body">
|
<div class="item-body">
|
||||||
<Icon name={action.icon} />
|
<Icon name={action.icon} />
|
||||||
<Body size="XS">{action.name}</Body>
|
<Body size="XS">{action.name}</Body>
|
||||||
{#if isDisabled && !syncWebhooksEnabled}
|
{#if isDisabled && !syncAutomationsEnabled}
|
||||||
<div class="tag-color">
|
<div class="tag-color">
|
||||||
<Tags>
|
<Tags>
|
||||||
<Tag icon="LockClosed">Business</Tag>
|
<Tag icon="LockClosed">Business</Tag>
|
||||||
|
|
|
@ -116,8 +116,8 @@ export const createLicensingStore = () => {
|
||||||
const auditLogsEnabled = license.features.includes(
|
const auditLogsEnabled = license.features.includes(
|
||||||
Constants.Features.AUDIT_LOGS
|
Constants.Features.AUDIT_LOGS
|
||||||
)
|
)
|
||||||
const syncWebhooksEnabled = license.features.includes(
|
const syncAutomationsEnabled = license.features.includes(
|
||||||
Constants.Features.SYNC_WEBHOOKS
|
Constants.Features.SYNC_AUTOMATIONS
|
||||||
)
|
)
|
||||||
store.update(state => {
|
store.update(state => {
|
||||||
return {
|
return {
|
||||||
|
@ -133,7 +133,7 @@ export const createLicensingStore = () => {
|
||||||
environmentVariablesEnabled,
|
environmentVariablesEnabled,
|
||||||
auditLogsEnabled,
|
auditLogsEnabled,
|
||||||
enforceableSSO,
|
enforceableSSO,
|
||||||
syncWebhooksEnabled,
|
syncAutomationsEnabled,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -70,7 +70,7 @@ export const Features = {
|
||||||
ENFORCEABLE_SSO: "enforceableSSO",
|
ENFORCEABLE_SSO: "enforceableSSO",
|
||||||
BRANDING: "branding",
|
BRANDING: "branding",
|
||||||
SCIM: "scim",
|
SCIM: "scim",
|
||||||
SYNC_WEBHOOKS: "syncWebhooks",
|
SYNC_AUTOMATIONS: "syncAutoamtions",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role IDs
|
// Role IDs
|
||||||
|
|
|
@ -83,7 +83,7 @@ export async function trigger(ctx: BBContext) {
|
||||||
// incase the user has produced a schema to bind to
|
// incase the user has produced a schema to bind to
|
||||||
let hasCollectStep = sdk.automations.utils.checkForCollectStep(target)
|
let hasCollectStep = sdk.automations.utils.checkForCollectStep(target)
|
||||||
|
|
||||||
if (hasCollectStep && (await pro.features.isSyncWebhookEnabled())) {
|
if (hasCollectStep && (await pro.features.isSyncAutomationsEnabled())) {
|
||||||
const response = await triggers.externalTrigger(
|
const response = await triggers.externalTrigger(
|
||||||
target,
|
target,
|
||||||
{
|
{
|
||||||
|
|
|
@ -512,15 +512,11 @@ export function executeSynchronously(job: Job) {
|
||||||
// put into automation thread for whole context
|
// put into automation thread for whole context
|
||||||
return context.doInEnvironmentContext(envVars, async () => {
|
return context.doInEnvironmentContext(envVars, async () => {
|
||||||
const automationOrchestrator = new Orchestrator(job)
|
const automationOrchestrator = new Orchestrator(job)
|
||||||
try {
|
const response = await Promise.race([
|
||||||
const response = await Promise.race([
|
automationOrchestrator.execute(),
|
||||||
automationOrchestrator.execute(),
|
timeoutPromise,
|
||||||
timeoutPromise,
|
])
|
||||||
])
|
return response
|
||||||
return response
|
|
||||||
} catch (err) {
|
|
||||||
throw err
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ export enum Feature {
|
||||||
ENFORCEABLE_SSO = "enforceableSSO",
|
ENFORCEABLE_SSO = "enforceableSSO",
|
||||||
BRANDING = "branding",
|
BRANDING = "branding",
|
||||||
SCIM = "scim",
|
SCIM = "scim",
|
||||||
SYNC_WEBHOOKS = "syncWebhooks",
|
SYNC_AUTOMATIONS = "syncAutomations",
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PlanFeatures = { [key in PlanType]: Feature[] | undefined }
|
export type PlanFeatures = { [key in PlanType]: Feature[] | undefined }
|
||||||
|
|
Loading…
Reference in New Issue