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
61
vendor/zapier-platform/packages/schema/lib/schemas/TriggersSchema.js
vendored
Normal file
61
vendor/zapier-platform/packages/schema/lib/schemas/TriggersSchema.js
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
'use strict';
|
||||
|
||||
const makeSchema = require('../utils/makeSchema');
|
||||
const { SKIP_KEY } = require('../constants');
|
||||
|
||||
const TriggerSchema = require('./TriggerSchema');
|
||||
|
||||
module.exports = makeSchema(
|
||||
{
|
||||
id: '/TriggersSchema',
|
||||
description: 'Enumerates the triggers your app has available for users.',
|
||||
type: 'object',
|
||||
patternProperties: {
|
||||
'^[a-zA-Z]+[a-zA-Z0-9_]*$': {
|
||||
description:
|
||||
'Any unique key can be used and its values will be validated against the TriggerSchema.',
|
||||
$ref: TriggerSchema.id,
|
||||
},
|
||||
},
|
||||
additionalProperties: false,
|
||||
examples: [
|
||||
{
|
||||
newRecipe: {
|
||||
key: 'newRecipe',
|
||||
noun: 'Recipe',
|
||||
display: {
|
||||
label: 'New Recipe',
|
||||
description: 'Triggers when a new recipe is added.',
|
||||
},
|
||||
operation: {
|
||||
type: 'polling',
|
||||
perform: '$func$0$f$',
|
||||
sample: { id: 1 },
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
antiExamples: [
|
||||
{
|
||||
example: {
|
||||
[SKIP_KEY]: true, // Cannot validate that keys don't match
|
||||
newRecipe: {
|
||||
key: 'new_recipe',
|
||||
noun: 'Recipe',
|
||||
display: {
|
||||
label: 'New Recipe',
|
||||
description: 'Triggers when a new recipe is added.',
|
||||
},
|
||||
operation: {
|
||||
type: 'polling',
|
||||
perform: '$func$0$f$',
|
||||
sample: { id: 1 },
|
||||
},
|
||||
},
|
||||
},
|
||||
reason: 'Key must match the key on the associated /TriggerSchema',
|
||||
},
|
||||
],
|
||||
},
|
||||
[TriggerSchema],
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue