master-zapier-plan-draft/packages/verae-zapier/creates/batch_timestamp.js
George Lambert b4150c8250 Milestone 0: import zappier billing, Verae middleware, and Zapier research
Compose-ready workspace: packages/zappier (rate card, portal, Stripe),
packages/verae-zapier-middleware (timestamp + NATS), packages/verae-zapier
(CLI app), vendor/zapier-platform, and research/zapier vendor corpus.

Gate 0 structure checks pass. Product code and research are not yet wired.
2026-09-09 02:37:36 -04:00

39 lines
941 B
JavaScript

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' }],
},
};