mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 00:54:06 -08:00
5cac0f339d
Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: Elias Meire <elias@meire.dev>
57 lines
1.1 KiB
TypeScript
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,
|
|
},
|
|
};
|
|
}
|