Zapier integration (#491)
* create zapier app * install sanctum * move OAuthProviderController * make `api-external` middleware * add zapier endpoints * add tests * token management * zapier event handler * add policy * use `slug` instead of `id` * wip * check policies * change api prefix to `external` * ui tweaks * validate token abilities * open zapier URL * zapier ui tweaks * update zap * Fix linting * Added sample endpoints + minor UI changes * Run PHP code linter --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
20
integrations/zapier/test/triggers/list_forms.test.js
vendored
Normal file
20
integrations/zapier/test/triggers/list_forms.test.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
const zapier = require('zapier-platform-core');
|
||||
|
||||
// Use this to make test calls into your app:
|
||||
const App = require('../../index');
|
||||
const appTester = zapier.createAppTester(App);
|
||||
// read the `.env` file into the environment, if available
|
||||
zapier.tools.env.inject();
|
||||
|
||||
describe('triggers.list_forms', () => {
|
||||
it('should run', async () => {
|
||||
const bundle = { inputData: {} };
|
||||
|
||||
const results = await appTester(
|
||||
App.triggers['list_forms'].operation.perform,
|
||||
bundle
|
||||
);
|
||||
expect(results).toBeDefined();
|
||||
// TODO: add more assertions
|
||||
});
|
||||
});
|
||||
20
integrations/zapier/test/triggers/list_workspaces.test.js
vendored
Normal file
20
integrations/zapier/test/triggers/list_workspaces.test.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
const zapier = require('zapier-platform-core');
|
||||
|
||||
// Use this to make test calls into your app:
|
||||
const App = require('../../index');
|
||||
const appTester = zapier.createAppTester(App);
|
||||
// read the `.env` file into the environment, if available
|
||||
zapier.tools.env.inject();
|
||||
|
||||
describe('triggers.list_workspaces', () => {
|
||||
it('should run', async () => {
|
||||
const bundle = { inputData: {} };
|
||||
|
||||
const results = await appTester(
|
||||
App.triggers['list_workspaces'].operation.perform,
|
||||
bundle
|
||||
);
|
||||
expect(results).toBeDefined();
|
||||
// TODO: add more assertions
|
||||
});
|
||||
});
|
||||
20
integrations/zapier/test/triggers/new_submission.test.js
vendored
Normal file
20
integrations/zapier/test/triggers/new_submission.test.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
const zapier = require('zapier-platform-core');
|
||||
|
||||
// Use this to make test calls into your app:
|
||||
const App = require('../../index');
|
||||
const appTester = zapier.createAppTester(App);
|
||||
// read the `.env` file into the environment, if available
|
||||
zapier.tools.env.inject();
|
||||
|
||||
describe('triggers.new_submission', () => {
|
||||
it('should run', async () => {
|
||||
const bundle = { inputData: {} };
|
||||
|
||||
const results = await appTester(
|
||||
App.triggers['new_submission'].operation.perform,
|
||||
bundle
|
||||
);
|
||||
expect(results).toBeDefined();
|
||||
// TODO: add more assertions
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user