const base = () => process.env.MIDDLEWARE_BASE_URL || 'http://127.0.0.1:3100'; const perform = async (z, bundle) => { const items = (bundle.inputData.items || '') .split('\n') .map((s) => s.trim()) .filter(Boolean) .map((data) => ({ data })); const response = await z.request({ method: 'POST', url: `${base()}/zapier/v1/timestamp/batch`, body: { items }, }); return response.data; }; module.exports = { key: 'batch_timestamp', noun: 'Timestamp', display: { label: 'Create Batch Timestamps', description: 'Submit multiple data lines for timestamping (paid plans).', }, operation: { inputFields: [ { key: 'items', label: 'Data Lines', type: 'text', required: true, helpText: 'One payload per line.', }, ], perform, sample: { jobIds: ['id-1', 'id-2'] }, outputFields: [{ key: 'jobIds', label: 'Job IDs' }], }, };