n8n/packages/nodes-base/nodes/Okta/Okta.node.ts
Shireen Missi 5cac0f339d
feat(Okta Node): Add Okta Node (#10278)
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
Co-authored-by: Elias Meire <elias@meire.dev>
2024-08-12 16:49:06 +01:00

57 lines
1.1 KiB
TypeScript

import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
import { userFields, userOperations } from './UserDescription';
import { getUsers } from './UserFunctions';
export class Okta implements INodeType {
description: INodeTypeDescription = {
displayName: 'Okta',
name: 'okta',
icon: { light: 'file:Okta.svg', dark: 'file:Okta.dark.svg' },
group: ['transform'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Use the Okta API',
defaults: {
name: 'Okta',
},
inputs: ['main'],
outputs: ['main'],
credentials: [
{
name: 'oktaApi',
required: true,
},
],
requestDefaults: {
returnFullResponse: true,
baseURL: '={{$credentials.url.replace(new RegExp("/$"), "")}}',
headers: {},
},
properties: [
{
displayName: 'Resource',
name: 'resource',
type: 'options',
noDataExpression: true,
options: [
{
name: 'User',
value: 'user',
},
],
default: 'user',
},
// USER
...userOperations,
...userFields,
],
};
methods = {
listSearch: {
getUsers,
},
};
}