2248 zapier integration implement typeorm eventsubscribers (#3122)
* Add new queue to twenty-server * Add triggers to zapier * Rename webhook operation * Use find one or fail * Use logger * Fix typescript templating * Add dedicated call webhook job * Update logging * Fix error handling
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
import { Bundle, ZObject } from 'zapier-platform-core';
|
||||
import { requestSchema } from '../utils/requestDb';
|
||||
|
||||
const objectListRequest = async (z: ZObject, bundle: Bundle) => {
|
||||
const schema = await requestSchema(z, bundle);
|
||||
return Object.keys(schema.components.schemas).map((schema) => {
|
||||
return { id: schema, nameSingular: schema };
|
||||
});
|
||||
};
|
||||
|
||||
export const findObjectNamesSingularKey = 'find_object_names_singular';
|
||||
|
||||
export default {
|
||||
display: {
|
||||
description: 'Find objects',
|
||||
label: 'Find objects',
|
||||
hidden: true,
|
||||
},
|
||||
key: findObjectNamesSingularKey,
|
||||
noun: 'Object',
|
||||
operation: {
|
||||
perform: objectListRequest,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user