@@ -359,6 +359,17 @@ func engineFromContext(
359359 return e
360360}
361361
362+ // ListExecutions lists the executions of a CHASM archetype given an initial query.
363+ // The query string can specify any combination of CHASM, custom, and predefined/system search attributes.
364+ // The generic parameter C is the CHASM component type used for executions and search attribute filtering.
365+ // The generic parameter M is the type of the memo payload to be unmarshaled from the execution.
366+ // PageSize is required, must be greater than 0.
367+ // NextPageToken is optional, set on subsequent requests to continue listing the next page of executions.
368+ // Note: For CHASM executions, TemporalNamespaceDivision is the predefined search attribute
369+ // that is used to identify the archetype of the execution.
370+ // If the query string does not specify TemporalNamespaceDivision, the archetype C of the request will be used to filter the executions.
371+ // If the initial query already specifies TemporalNamespaceDivision, the archetype C of the request will
372+ // only be used to get the registered SearchAttributes.
362373func ListExecutions [C Component , M proto.Message ](
363374 ctx context.Context ,
364375 request * ListExecutionsRequest ,
@@ -400,6 +411,14 @@ func ListExecutions[C Component, M proto.Message](
400411 }, nil
401412}
402413
414+ // CountExecutions counts the executions of a CHASM archetype given an initial query.
415+ // The generic parameter C is the CHASM component type used for executions and search attribute filtering.
416+ // The query string can specify any combination of CHASM, custom, and predefined/system search attributes.
417+ // Note: For CHASM executions, TemporalNamespaceDivision is the predefined search attribute
418+ // that is used to identify the archetype of the execution.
419+ // If the query string does not specify TemporalNamespaceDivision, the archetype C of the request will be used to count the executions.
420+ // If the initial query already specifies TemporalNamespaceDivision, the archetype C of the request will
421+ // only be used to get the registered SearchAttributes.
403422func CountExecutions [C Component ](
404423 ctx context.Context ,
405424 request * CountExecutionsRequest ,
0 commit comments