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.
54 lines
1.3 KiB
JavaScript
54 lines
1.3 KiB
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/timestamp/wait`,
|
|
body: {
|
|
data: bundle.inputData.data,
|
|
hashAlg: bundle.inputData.hashAlg || undefined,
|
|
},
|
|
});
|
|
return response.data;
|
|
};
|
|
|
|
module.exports = {
|
|
key: 'timestamp_and_wait',
|
|
noun: 'Timestamp',
|
|
display: {
|
|
label: 'Create Timestamp and Wait',
|
|
description:
|
|
'Submits data for blockchain timestamping and waits for the certificate.',
|
|
},
|
|
operation: {
|
|
inputFields: [
|
|
{
|
|
key: 'data',
|
|
label: 'Data',
|
|
type: 'string',
|
|
required: true,
|
|
helpText: 'Content to timestamp on the blockchain.',
|
|
},
|
|
{
|
|
key: 'hashAlg',
|
|
label: 'Hash Algorithm',
|
|
type: 'string',
|
|
required: false,
|
|
default: 'SHA256',
|
|
},
|
|
],
|
|
perform,
|
|
sample: {
|
|
id: '550e8400-e29b-41d4-a716-446655440000',
|
|
status: 'completed',
|
|
result: 'mock-cert-example',
|
|
completedAt: '2023-01-01T12:05:00Z',
|
|
},
|
|
outputFields: [
|
|
{ key: 'id', label: 'Job ID' },
|
|
{ key: 'status', label: 'Status' },
|
|
{ key: 'result', label: 'Certificate' },
|
|
{ key: 'completedAt', label: 'Completed At', type: 'datetime' },
|
|
],
|
|
},
|
|
};
|