master-zapier-plan-draft/packages/verae-zapier/creates/verify_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

36 lines
958 B
JavaScript

const base = () => process.env.MIDDLEWARE_BASE_URL || 'http://127.0.0.1:3100';
const perform = async (z, bundle) => {
const response = await z.request({
method: 'POST',
url: `${base()}/zapier/v1/verify`,
body: { certificate: bundle.inputData.certificate },
});
return response.data;
};
module.exports = {
key: 'verify_timestamp',
noun: 'Verification',
display: {
label: 'Verify Timestamp',
description: 'Verify a timestamp certificate.',
},
operation: {
inputFields: [
{
key: 'certificate',
label: 'Certificate',
type: 'text',
required: true,
},
],
perform,
sample: { valid: true, timestamp: '2023-01-01T12:00:00Z', blockIndex: 42 },
outputFields: [
{ key: 'valid', label: 'Valid', type: 'boolean' },
{ key: 'timestamp', label: 'Timestamp', type: 'datetime' },
{ key: 'blockIndex', label: 'Block Index', type: 'integer' },
],
},
};