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