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
95
vendor/zapier-platform/packages/schema/lib/schemas/ResourcesSchema.js
vendored
Normal file
95
vendor/zapier-platform/packages/schema/lib/schemas/ResourcesSchema.js
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
'use strict';
|
||||
|
||||
const { SKIP_KEY } = require('../constants');
|
||||
const makeSchema = require('../utils/makeSchema');
|
||||
const ResourceSchema = require('./ResourceSchema');
|
||||
|
||||
module.exports = makeSchema(
|
||||
{
|
||||
id: '/ResourcesSchema',
|
||||
description:
|
||||
'All the resources that underlie common CRUD methods powering automatically handled triggers, creates, and searches for your app. Zapier will break these apart for you.',
|
||||
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 ResourceSchema.',
|
||||
$ref: ResourceSchema.id,
|
||||
},
|
||||
},
|
||||
additionalProperties: false,
|
||||
examples: [
|
||||
{
|
||||
tag: {
|
||||
key: 'tag',
|
||||
noun: 'Tag',
|
||||
get: {
|
||||
display: {
|
||||
label: 'Get Tag by ID',
|
||||
description: 'Grab a specific Tag by ID.',
|
||||
},
|
||||
operation: {
|
||||
perform: {
|
||||
url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}',
|
||||
},
|
||||
sample: {
|
||||
id: 385,
|
||||
name: 'proactive enable ROI',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
antiExamples: [
|
||||
{
|
||||
[SKIP_KEY]: true, // Cannot validate that keys don't match
|
||||
example: {
|
||||
getTag: {
|
||||
key: 'tag',
|
||||
noun: 'Tag',
|
||||
get: {
|
||||
display: {
|
||||
label: 'Get Tag by ID',
|
||||
description: 'Grab a specific Tag by ID.',
|
||||
},
|
||||
operation: {
|
||||
perform: {
|
||||
url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}',
|
||||
},
|
||||
sample: {
|
||||
id: 385,
|
||||
name: 'proactive enable ROI',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
reason: 'Key does not match key for associated /ResourceSchema',
|
||||
},
|
||||
{
|
||||
[SKIP_KEY]: true, // Cannot validate that sample is only required if display isn't true / top-level resource doesn't have sample
|
||||
example: {
|
||||
tag: {
|
||||
key: 'tag',
|
||||
noun: 'Tag',
|
||||
get: {
|
||||
display: {
|
||||
label: 'Get Tag by ID',
|
||||
description: 'Grab a specific Tag by ID.',
|
||||
},
|
||||
operation: {
|
||||
perform: {
|
||||
url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
reason:
|
||||
'Missing key from operation: sample. Note – this is valid if the resource has defined a sample.',
|
||||
},
|
||||
],
|
||||
},
|
||||
[ResourceSchema],
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue