* Add folder for api settings * Init create api key page * Update create api key page * Implement api call to create apiKey * Add create api key mutation * Get id when creating apiKey * Display created Api Key * Add delete api key button * Remove button from InputText * Update stuff * Add test for ApiDetail * Fix type * Use recoil instead of router state * Remane route paths * Remove online return * Move and test date util * Remove useless Component * Rename ApiKeys paths * Rename ApiKeys files * Add input text info testing * Rename hooks to webhooks * Remove console error * Add tests to reach minimum coverage
29 lines
706 B
TypeScript
29 lines
706 B
TypeScript
import { Bundle, ZObject } from 'zapier-platform-core';
|
|
import requestDb from './utils/requestDb';
|
|
|
|
const testAuthentication = async (z: ZObject, bundle: Bundle) => {
|
|
return await requestDb(
|
|
z,
|
|
bundle,
|
|
'query currentWorkspace {currentWorkspace {id displayName}}',
|
|
);
|
|
};
|
|
|
|
export default {
|
|
type: 'custom',
|
|
test: testAuthentication,
|
|
fields: [
|
|
{
|
|
computed: false,
|
|
key: 'apiKey',
|
|
required: true,
|
|
label: 'Api Key',
|
|
type: 'string',
|
|
helpText:
|
|
'Create the api-keys key in [your twenty workspace](https://app.twenty.com/settings/developers/api-keys)',
|
|
},
|
|
],
|
|
connectionLabel: '{{data.currentWorkspace.displayName}}',
|
|
customConfig: {},
|
|
};
|