Merge branch 'master' into feature/role-metadata-and-view-control
This commit is contained in:
commit
fed2870a86
|
@ -1 +1 @@
|
||||||
Subproject commit 7899d07904d89d48954dd500da7b5dec32b781dd
|
Subproject commit 905773d70854a43c6ef2461c7a49671bff56fedc
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
const RemoveID = "remove"
|
const RemoveID = "remove"
|
||||||
|
const subType = $licensing.license.plan.type ?? null
|
||||||
|
|
||||||
$: enrichLabel = label => (labelPrefix ? `${labelPrefix} ${label}` : label)
|
$: enrichLabel = label => (labelPrefix ? `${labelPrefix} ${label}` : label)
|
||||||
$: options = getOptions(
|
$: options = getOptions(
|
||||||
|
@ -68,13 +69,13 @@
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// Add creator if required
|
// Add creator if required
|
||||||
if (allowCreator) {
|
if (allowCreator || isEnterprisePlan(subType)) {
|
||||||
options.unshift({
|
options.unshift({
|
||||||
_id: Constants.Roles.CREATOR,
|
_id: Constants.Roles.CREATOR,
|
||||||
name: "Can edit",
|
name: "Can edit",
|
||||||
tag:
|
tag: isEnterprisePlan(subType)
|
||||||
!$licensing.perAppBuildersEnabled &&
|
? null
|
||||||
capitalise(Constants.PlanType.BUSINESS),
|
: capitalise(Constants.PlanType.ENTERPRISE),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,6 +118,14 @@
|
||||||
dispatch("change", e.detail)
|
dispatch("change", e.detail)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isEnterprisePlan(subType) {
|
||||||
|
return (
|
||||||
|
subType === Constants.PlanType.ENTERPRISE ||
|
||||||
|
subType === Constants.PlanType.ENTERPRISE_BASIC ||
|
||||||
|
subType === Constants.PlanType.ENTERPRISE_BASIC_TRIAL
|
||||||
|
)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if fancySelect}
|
{#if fancySelect}
|
||||||
|
@ -134,9 +143,12 @@
|
||||||
getOptionValue={role => role._id}
|
getOptionValue={role => role._id}
|
||||||
getOptionColour={getColor}
|
getOptionColour={getColor}
|
||||||
getOptionIcon={getIcon}
|
getOptionIcon={getIcon}
|
||||||
isOptionEnabled={option =>
|
isOptionEnabled={option => {
|
||||||
option._id !== Constants.Roles.CREATOR ||
|
if (option._id === Constants.Roles.CREATOR) {
|
||||||
$licensing.perAppBuildersEnabled}
|
return isEnterprisePlan(subType)
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}}
|
||||||
{placeholder}
|
{placeholder}
|
||||||
{error}
|
{error}
|
||||||
/>
|
/>
|
||||||
|
@ -154,10 +166,12 @@
|
||||||
getOptionValue={role => role._id}
|
getOptionValue={role => role._id}
|
||||||
getOptionColour={getColor}
|
getOptionColour={getColor}
|
||||||
getOptionIcon={getIcon}
|
getOptionIcon={getIcon}
|
||||||
isOptionEnabled={option =>
|
isOptionEnabled={option => {
|
||||||
(option._id !== Constants.Roles.CREATOR ||
|
if (option._id === Constants.Roles.CREATOR) {
|
||||||
$licensing.perAppBuildersEnabled) &&
|
return isEnterprisePlan(subType)
|
||||||
option.enabled !== false}
|
}
|
||||||
|
return option.enabled !== false
|
||||||
|
}}
|
||||||
{placeholder}
|
{placeholder}
|
||||||
{error}
|
{error}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -85,6 +85,7 @@ export const PlanType = {
|
||||||
TEAM: "team",
|
TEAM: "team",
|
||||||
PRO: "pro",
|
PRO: "pro",
|
||||||
BUSINESS: "business",
|
BUSINESS: "business",
|
||||||
|
PREMIUM: "premium",
|
||||||
ENTERPRISE: "enterprise",
|
ENTERPRISE: "enterprise",
|
||||||
ENTERPRISE_BASIC_TRIAL: "enterprise_basic_trial",
|
ENTERPRISE_BASIC_TRIAL: "enterprise_basic_trial",
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@ enum Model {
|
||||||
GPT_35_TURBO = "gpt-3.5-turbo",
|
GPT_35_TURBO = "gpt-3.5-turbo",
|
||||||
// will only work with api keys that have access to the GPT4 API
|
// will only work with api keys that have access to the GPT4 API
|
||||||
GPT_4 = "gpt-4",
|
GPT_4 = "gpt-4",
|
||||||
|
GPT_4O = "gpt-4o",
|
||||||
|
GPT_4O_MINI = "gpt-4o-mini",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const definition: AutomationStepDefinition = {
|
export const definition: AutomationStepDefinition = {
|
||||||
|
|
|
@ -140,6 +140,8 @@ enum Model {
|
||||||
GPT_35_TURBO = "gpt-3.5-turbo",
|
GPT_35_TURBO = "gpt-3.5-turbo",
|
||||||
// will only work with api keys that have access to the GPT4 API
|
// will only work with api keys that have access to the GPT4 API
|
||||||
GPT_4 = "gpt-4",
|
GPT_4 = "gpt-4",
|
||||||
|
GPT_4O = "gpt-4o",
|
||||||
|
GPT_4O_MINI = "gpt-4o-mini",
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OpenAIStepOutputs = Omit<BaseAutomationOutputs, "response"> & {
|
export type OpenAIStepOutputs = Omit<BaseAutomationOutputs, "response"> & {
|
||||||
|
|
Loading…
Reference in New Issue