1
0
Fork 0
mirror of synced 2024-07-03 21:40:55 +12:00

rename syncWebHooks to syncAutomations

This commit is contained in:
Peter Clement 2023-05-19 10:07:02 +01:00
parent e1eda14204
commit d271bbdadb
7 changed files with 16 additions and 20 deletions

View file

@ -90,8 +90,8 @@ export const useScimIntegration = () => {
return useFeature(Feature.SCIM)
}
export const useSyncWebhook = () => {
return useFeature(Feature.SYNC_WEBHOOKS)
export const useSyncAutomations = () => {
return useFeature(Feature.SYNC_AUTOMATIONS)
}
// QUOTAS

View file

@ -18,7 +18,7 @@
export let blockIdx
export let lastStep
let syncWebhooksEnabled = $licensing.syncWebhooksEnabled
let syncAutomationsEnabled = $licensing.syncAutomationsEnabled
let collectBlockAllowedSteps = [TriggerStepID.APP, TriggerStepID.WEBHOOK]
let selectedAction
let actionVal
@ -33,7 +33,7 @@
message: "Please configure SMTP",
},
COLLECT: {
disabled: !lastStep || !syncWebhooksEnabled || collectBlockExists,
disabled: !lastStep || !syncAutomationsEnabled || collectBlockExists,
message: collectDisabledMessage(),
},
}
@ -149,7 +149,7 @@
<div class="item-body">
<Icon name={action.icon} />
<Body size="XS">{action.name}</Body>
{#if isDisabled && !syncWebhooksEnabled}
{#if isDisabled && !syncAutomationsEnabled}
<div class="tag-color">
<Tags>
<Tag icon="LockClosed">Business</Tag>

View file

@ -116,8 +116,8 @@ export const createLicensingStore = () => {
const auditLogsEnabled = license.features.includes(
Constants.Features.AUDIT_LOGS
)
const syncWebhooksEnabled = license.features.includes(
Constants.Features.SYNC_WEBHOOKS
const syncAutomationsEnabled = license.features.includes(
Constants.Features.SYNC_AUTOMATIONS
)
store.update(state => {
return {
@ -133,7 +133,7 @@ export const createLicensingStore = () => {
environmentVariablesEnabled,
auditLogsEnabled,
enforceableSSO,
syncWebhooksEnabled,
syncAutomationsEnabled,
}
})
},

View file

@ -70,7 +70,7 @@ export const Features = {
ENFORCEABLE_SSO: "enforceableSSO",
BRANDING: "branding",
SCIM: "scim",
SYNC_WEBHOOKS: "syncWebhooks",
SYNC_AUTOMATIONS: "syncAutoamtions",
}
// Role IDs

View file

@ -83,7 +83,7 @@ export async function trigger(ctx: BBContext) {
// incase the user has produced a schema to bind to
let hasCollectStep = sdk.automations.utils.checkForCollectStep(target)
if (hasCollectStep && (await pro.features.isSyncWebhookEnabled())) {
if (hasCollectStep && (await pro.features.isSyncAutomationsEnabled())) {
const response = await triggers.externalTrigger(
target,
{

View file

@ -512,15 +512,11 @@ export function executeSynchronously(job: Job) {
// put into automation thread for whole context
return context.doInEnvironmentContext(envVars, async () => {
const automationOrchestrator = new Orchestrator(job)
try {
const response = await Promise.race([
automationOrchestrator.execute(),
timeoutPromise,
])
return response
} catch (err) {
throw err
}
const response = await Promise.race([
automationOrchestrator.execute(),
timeoutPromise,
])
return response
})
})
}

View file

@ -8,7 +8,7 @@ export enum Feature {
ENFORCEABLE_SSO = "enforceableSSO",
BRANDING = "branding",
SCIM = "scim",
SYNC_WEBHOOKS = "syncWebhooks",
SYNC_AUTOMATIONS = "syncAutomations",
}
export type PlanFeatures = { [key in PlanType]: Feature[] | undefined }