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
84
vendor/zapier-platform/packages/schema/lib/schemas/SearchSchema.js
vendored
Normal file
84
vendor/zapier-platform/packages/schema/lib/schemas/SearchSchema.js
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
'use strict';
|
||||
|
||||
const makeSchema = require('../utils/makeSchema');
|
||||
|
||||
const BasicDisplaySchema = require('./BasicDisplaySchema');
|
||||
const BasicSearchOperationSchema = require('./BasicSearchOperationSchema');
|
||||
const KeySchema = require('./KeySchema');
|
||||
|
||||
module.exports = makeSchema(
|
||||
{
|
||||
id: '/SearchSchema',
|
||||
description: 'How will Zapier search for existing objects?',
|
||||
type: 'object',
|
||||
required: ['key', 'noun', 'display', 'operation'],
|
||||
properties: {
|
||||
key: {
|
||||
description: 'A key to uniquely identify this search.',
|
||||
$ref: KeySchema.id,
|
||||
},
|
||||
noun: {
|
||||
description:
|
||||
'A noun for this search that completes the sentence "finds a specific XXX".',
|
||||
type: 'string',
|
||||
minLength: 2,
|
||||
maxLength: 255,
|
||||
},
|
||||
display: {
|
||||
description: 'Configures the UI for this search.',
|
||||
$ref: BasicDisplaySchema.id,
|
||||
},
|
||||
operation: {
|
||||
description: 'Powers the functionality for this search.',
|
||||
$ref: BasicSearchOperationSchema.id,
|
||||
},
|
||||
},
|
||||
additionalProperties: false,
|
||||
examples: [
|
||||
{
|
||||
key: 'recipe',
|
||||
noun: 'Recipe',
|
||||
display: {
|
||||
label: 'Find a Recipe',
|
||||
description: 'Search for recipe by cuisine style.',
|
||||
},
|
||||
operation: {
|
||||
perform: '$func$2$f$',
|
||||
sample: { id: 1 },
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'recipe',
|
||||
noun: 'Recipe',
|
||||
display: {
|
||||
label: 'Find a Recipe',
|
||||
description: 'Search for recipe by cuisine style.',
|
||||
hidden: true,
|
||||
},
|
||||
operation: { perform: '$func$2$f$' },
|
||||
},
|
||||
],
|
||||
antiExamples: [
|
||||
{
|
||||
example: 'abc',
|
||||
reason: 'Must be an object',
|
||||
},
|
||||
{
|
||||
example: {
|
||||
key: 'recipe',
|
||||
noun: 'Recipe',
|
||||
display: {
|
||||
label: 'Find a Recipe',
|
||||
description: 'Search for recipe by cuisine style.',
|
||||
},
|
||||
operation: {
|
||||
perform: '$func$2$f$',
|
||||
},
|
||||
},
|
||||
reason:
|
||||
'Missing required key in operation: sample. Note - this is valid if the associated resource has defined a sample.',
|
||||
},
|
||||
],
|
||||
},
|
||||
[BasicDisplaySchema, BasicSearchOperationSchema, KeySchema],
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue