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
20
packages/zappier/zapier-app/index.js
Normal file
20
packages/zappier/zapier-app/index.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
const authentication = require('./authentication');
|
||||
const newItem = require('./triggers/new_item');
|
||||
const storeData = require('./creates/store_data');
|
||||
|
||||
const addApiKeyHeader = (request, z, bundle) => {
|
||||
request.headers = request.headers || {};
|
||||
if (request.url && request.url.startsWith(bundle.authData.baseUrl)) {
|
||||
request.headers['x-api-key'] = bundle.authData.apiKey;
|
||||
}
|
||||
return request;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
version: require('./package.json').version,
|
||||
platformVersion: require('zapier-platform-core').version,
|
||||
authentication,
|
||||
beforeRequest: [addApiKeyHeader],
|
||||
triggers: { [newItem.key]: newItem },
|
||||
creates: { [storeData.key]: storeData },
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue