Files
twenty/packages/twenty-zapier/src/authentication.ts
martmull d61511262e 2060 create a new api key (#2206)
* 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
2023-10-24 16:14:54 +02:00

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: {},
};