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
35
vendor/zapier-platform/example-apps/search-or-create/index.js
vendored
Normal file
35
vendor/zapier-platform/example-apps/search-or-create/index.js
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
const RecipeCreate = require('./creates/recipe');
|
||||
const RecipeSearch = require('./searches/recipe');
|
||||
|
||||
const addAuthHeader = (request, z, bundle) => {
|
||||
// Hard-coded auth header just for demo. DON'T do auth like this for your
|
||||
// production app!
|
||||
request.headers['X-Api-Key'] = 'secret';
|
||||
return request;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
version: require('./package.json').version,
|
||||
platformVersion: require('zapier-platform-core').version,
|
||||
|
||||
beforeRequest: [addAuthHeader],
|
||||
|
||||
searches: { [RecipeSearch.key]: RecipeSearch },
|
||||
|
||||
creates: { [RecipeCreate.key]: RecipeCreate },
|
||||
|
||||
searchOrCreates: {
|
||||
[RecipeSearch.key]: {
|
||||
// The key must match the search
|
||||
key: RecipeSearch.key, // same as above
|
||||
display: {
|
||||
// The label shows up when the search-or-create checkbox is checked.
|
||||
// See https://cdn.zappy.app/5fc31d104c6bd0050c44510557b3b98f.png
|
||||
label: 'Find or Create a Recipe',
|
||||
description: 'x', // this is ignored
|
||||
},
|
||||
search: RecipeSearch.key,
|
||||
create: RecipeCreate.key,
|
||||
},
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue