File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ import {
2323 SystemVariables ,
2424 Scope ,
2525 ActionScopes ,
26+ ConfigurableActionScopes ,
27+ parseConfigurableScope ,
2628 WorkqueueConfigWithoutQuery ,
2729 joinValues ,
2830 UUID ,
@@ -232,7 +234,14 @@ export enum CoreWorkqueues {
232234}
233235
234236export function hasOutboxWorkqueue ( scopes : Scope [ ] ) {
235- return scopes . some ( ( scope ) => ActionScopes . safeParse ( scope ) . success )
237+ const hasLiteralActionScopes = scopes . some (
238+ ( scope ) => ActionScopes . safeParse ( scope ) . success
239+ )
240+ const parsedScopes = scopes . map ( parseConfigurableScope )
241+ const hasConfigurableActionScopes = parsedScopes . some (
242+ ( scope ) => ConfigurableActionScopes . safeParse ( scope ) . success
243+ )
244+ return hasLiteralActionScopes || hasConfigurableActionScopes
236245}
237246
238247export function hasDraftWorkqueue ( scopes : Scope [ ] ) {
Original file line number Diff line number Diff line change @@ -327,6 +327,12 @@ const ConfigurableRawScopes = z.discriminatedUnion('type', [
327327 CustomActionScope
328328] )
329329
330+ export const ConfigurableActionScopes = z . discriminatedUnion ( 'type' , [
331+ // @TODO - Configure actual action scopes
332+ RecordScope ,
333+ CustomActionScope
334+ ] )
335+
330336type ConfigurableRawScopes = z . infer < typeof ConfigurableRawScopes >
331337export type ConfigurableScopeType = ConfigurableRawScopes [ 'type' ]
332338
You can’t perform that action at this time.
0 commit comments