mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 16:44:07 -08:00
58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
import { NodeConnectionType } 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: [NodeConnectionType.Main],
|
|
outputs: [NodeConnectionType.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,
|
|
},
|
|
};
|
|
}
|