diff --git a/packages/account-portal b/packages/account-portal index 7899d07904..905773d708 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 7899d07904d89d48954dd500da7b5dec32b781dd +Subproject commit 905773d70854a43c6ef2461c7a49671bff56fedc diff --git a/packages/builder/src/components/common/RoleSelect.svelte b/packages/builder/src/components/common/RoleSelect.svelte index 4605b0c182..6006b8ab8d 100644 --- a/packages/builder/src/components/common/RoleSelect.svelte +++ b/packages/builder/src/components/common/RoleSelect.svelte @@ -24,6 +24,7 @@ const dispatch = createEventDispatcher() const RemoveID = "remove" + const subType = $licensing.license.plan.type ?? null $: enrichLabel = label => (labelPrefix ? `${labelPrefix} ${label}` : label) $: options = getOptions( @@ -68,13 +69,13 @@ })) // Add creator if required - if (allowCreator) { + if (allowCreator || isEnterprisePlan(subType)) { options.unshift({ _id: Constants.Roles.CREATOR, name: "Can edit", - tag: - !$licensing.perAppBuildersEnabled && - capitalise(Constants.PlanType.BUSINESS), + tag: isEnterprisePlan(subType) + ? null + : capitalise(Constants.PlanType.ENTERPRISE), }) } @@ -117,6 +118,14 @@ dispatch("change", e.detail) } } + + function isEnterprisePlan(subType) { + return ( + subType === Constants.PlanType.ENTERPRISE || + subType === Constants.PlanType.ENTERPRISE_BASIC || + subType === Constants.PlanType.ENTERPRISE_BASIC_TRIAL + ) + } {#if fancySelect} @@ -134,9 +143,12 @@ getOptionValue={role => role._id} getOptionColour={getColor} getOptionIcon={getIcon} - isOptionEnabled={option => - option._id !== Constants.Roles.CREATOR || - $licensing.perAppBuildersEnabled} + isOptionEnabled={option => { + if (option._id === Constants.Roles.CREATOR) { + return isEnterprisePlan(subType) + } + return true + }} {placeholder} {error} /> @@ -154,10 +166,12 @@ getOptionValue={role => role._id} getOptionColour={getColor} getOptionIcon={getIcon} - isOptionEnabled={option => - (option._id !== Constants.Roles.CREATOR || - $licensing.perAppBuildersEnabled) && - option.enabled !== false} + isOptionEnabled={option => { + if (option._id === Constants.Roles.CREATOR) { + return isEnterprisePlan(subType) + } + return option.enabled !== false + }} {placeholder} {error} /> diff --git a/packages/frontend-core/src/constants.js b/packages/frontend-core/src/constants.js index d2f25b351a..105928c66b 100644 --- a/packages/frontend-core/src/constants.js +++ b/packages/frontend-core/src/constants.js @@ -85,6 +85,7 @@ export const PlanType = { TEAM: "team", PRO: "pro", BUSINESS: "business", + PREMIUM: "premium", ENTERPRISE: "enterprise", ENTERPRISE_BASIC_TRIAL: "enterprise_basic_trial", } diff --git a/packages/server/src/automations/steps/openai.ts b/packages/server/src/automations/steps/openai.ts index 1c148b2e73..d02ba56b70 100644 --- a/packages/server/src/automations/steps/openai.ts +++ b/packages/server/src/automations/steps/openai.ts @@ -15,6 +15,8 @@ enum Model { GPT_35_TURBO = "gpt-3.5-turbo", // will only work with api keys that have access to the GPT4 API GPT_4 = "gpt-4", + GPT_4O = "gpt-4o", + GPT_4O_MINI = "gpt-4o-mini", } export const definition: AutomationStepDefinition = { diff --git a/packages/types/src/documents/app/automation/StepInputsOutputs.ts b/packages/types/src/documents/app/automation/StepInputsOutputs.ts index 983a67daf5..9ba7b6cc1d 100644 --- a/packages/types/src/documents/app/automation/StepInputsOutputs.ts +++ b/packages/types/src/documents/app/automation/StepInputsOutputs.ts @@ -140,6 +140,8 @@ enum Model { GPT_35_TURBO = "gpt-3.5-turbo", // will only work with api keys that have access to the GPT4 API GPT_4 = "gpt-4", + GPT_4O = "gpt-4o", + GPT_4O_MINI = "gpt-4o-mini", } export type OpenAIStepOutputs = Omit & {