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.
This commit is contained in:
commit
b4150c8250
1364 changed files with 6814366 additions and 0 deletions
43
research/zapier/scratch/veraetime/src/searches/job_status.ts
Normal file
43
research/zapier/scratch/veraetime/src/searches/job_status.ts
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import type { Bundle, ZObject } from 'zapier-platform-core';
|
||||
|
||||
import { zapierV1 } from '../lib/base.js';
|
||||
|
||||
const perform = async (z: ZObject, bundle: Bundle) => {
|
||||
const response = await z.request({
|
||||
skipThrowForStatus: true,
|
||||
url: zapierV1(bundle, `/status/${encodeURIComponent(String(bundle.inputData.jobId))}`),
|
||||
headers: { accept: 'application/json' },
|
||||
});
|
||||
if (response.status === 404) {
|
||||
return [];
|
||||
}
|
||||
if (response.status >= 400) {
|
||||
throw new z.errors.Error(
|
||||
response.data?.error || `Status lookup failed (${response.status})`,
|
||||
'JobStatusError',
|
||||
response.status,
|
||||
);
|
||||
}
|
||||
return [response.data];
|
||||
};
|
||||
|
||||
export default {
|
||||
key: 'job_status',
|
||||
noun: 'Job',
|
||||
display: {
|
||||
label: 'Find Job Status',
|
||||
description: 'Look up a timestamp job by ID (pending, completed, or failed).',
|
||||
},
|
||||
operation: {
|
||||
perform,
|
||||
inputFields: [
|
||||
{ key: 'jobId', label: 'Job ID', type: 'string' as const, required: true },
|
||||
],
|
||||
sample: {
|
||||
id: '550e8400-e29b-41d4-a716-446655440000',
|
||||
status: 'completed',
|
||||
result: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
|
||||
completedAt: '2023-01-01T12:05:00Z',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
import type { Bundle, ZObject } from 'zapier-platform-core';
|
||||
|
||||
import { zapierV1 } from '../lib/base.js';
|
||||
|
||||
const perform = async (z: ZObject, bundle: Bundle) => {
|
||||
const response = await z.request({
|
||||
skipThrowForStatus: true,
|
||||
url: zapierV1(
|
||||
bundle,
|
||||
`/status/${encodeURIComponent(String(bundle.inputData.jobId))}/verification`,
|
||||
),
|
||||
headers: { accept: 'application/json' },
|
||||
});
|
||||
if (response.status === 404) {
|
||||
return [];
|
||||
}
|
||||
if (response.status >= 400) {
|
||||
throw new z.errors.Error(
|
||||
response.data?.error || `Verification lookup failed (${response.status})`,
|
||||
'JobVerifyError',
|
||||
response.status,
|
||||
);
|
||||
}
|
||||
return [response.data];
|
||||
};
|
||||
|
||||
export default {
|
||||
key: 'job_verification',
|
||||
noun: 'Job Verification',
|
||||
display: {
|
||||
label: 'Find Job Verification',
|
||||
description: 'Get block and verification details for a completed timestamp job.',
|
||||
},
|
||||
operation: {
|
||||
perform,
|
||||
inputFields: [
|
||||
{ key: 'jobId', label: 'Job ID', type: 'string' as const, required: true },
|
||||
],
|
||||
sample: {
|
||||
id: '550e8400-e29b-41d4-a716-446655440000',
|
||||
status: 'completed',
|
||||
metadata: { blockIndex: 42, timestamp: '2023-01-01T12:00:00Z' },
|
||||
},
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue