feat: Add support for batch method for products and product variants (#7038)

* feat(products): Add batch methods for product and variants

* chore: Rename batch validator and minor changes based on PR review
This commit is contained in:
Stevche Radevski
2024-04-15 16:48:29 +02:00
committed by GitHub
parent c3efac5a0d
commit fd83e75e4b
25 changed files with 793 additions and 56 deletions

View File

@@ -19,6 +19,8 @@ type StepFunctionReturnConfig<TOutput> = {
): WorkflowData<TOutput>
}
type KeysOfUnion<T> = T extends T ? keyof T : never
/**
* A step function to be used in a workflow.
*
@@ -28,7 +30,7 @@ type StepFunctionReturnConfig<TOutput> = {
export type StepFunction<
TInput,
TOutput = unknown
> = (keyof TInput extends never
> = (KeysOfUnion<TInput> extends []
? // Function that doesn't expect any input
{
(): WorkflowData<TOutput> & StepFunctionReturnConfig<TOutput>