Initial import of verae-zapier-app from zapier monorepo
This commit is contained in:
commit
4a4d64e7cb
16 changed files with 618 additions and 0 deletions
36
creates/verify_timestamp.js
Normal file
36
creates/verify_timestamp.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
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' },
|
||||
],
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue