### What problem does this PR solve? Feat: Enables the message operator form to reference the data defined by the begin operator #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
14 lines
322 B
TypeScript
14 lines
322 B
TypeScript
import { BeginQuery } from '../../interface';
|
|
|
|
export function buildBeginInputListFromObject(
|
|
inputs: Record<string, Omit<BeginQuery, 'key'>>,
|
|
) {
|
|
return Object.entries(inputs || {}).reduce<BeginQuery[]>(
|
|
(pre, [key, value]) => {
|
|
pre.push({ ...(value || {}), key });
|
|
|
|
return pre;
|
|
},
|
|
[],
|
|
);
|
|
}
|