mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
⚡ Fix name of BambooHR node
This commit is contained in:
parent
88809936ee
commit
bbf3c4c004
|
@ -3,10 +3,10 @@ import {
|
|||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class BambooHRApi implements ICredentialType {
|
||||
name = 'bambooHRApi';
|
||||
export class BambooHrApi implements ICredentialType {
|
||||
name = 'bambooHrApi';
|
||||
displayName = 'BambooHR API';
|
||||
documentationUrl = 'bambooHR';
|
||||
documentationUrl = 'bambooHr';
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Subdomain',
|
|
@ -1,33 +0,0 @@
|
|||
import {
|
||||
AllEntities,
|
||||
Entity,
|
||||
PropertiesOf,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
type BambooHRMap = {
|
||||
employee: 'create' | 'get' | 'getAll' | 'update';
|
||||
employeeDocument: 'delete' | 'download' | 'get' | 'getAll' | 'update' | 'upload';
|
||||
file: 'delete' | 'download' | 'getAll' | 'update';
|
||||
companyReport: 'get';
|
||||
};
|
||||
|
||||
export type BambooHR = AllEntities<BambooHRMap>;
|
||||
|
||||
export type BambooHRFile = Entity<BambooHRMap, 'file'>;
|
||||
export type BambooHREmployee = Entity<BambooHRMap, 'employee'>;
|
||||
export type BambooHREmployeeDocument = Entity<BambooHRMap, 'employeeDocument'>;
|
||||
export type BambooHRCompanyReport = Entity<BambooHRMap, 'companyReport'>;
|
||||
|
||||
export type FileProperties = PropertiesOf<BambooHRFile>;
|
||||
export type EmployeeProperties = PropertiesOf<BambooHREmployee>;
|
||||
export type EmployeeDocumentProperties = PropertiesOf<BambooHREmployeeDocument>;
|
||||
export type CompanyReportProperties = PropertiesOf<BambooHRCompanyReport>;
|
||||
|
||||
export interface IAttachment {
|
||||
fields: {
|
||||
item?: object[];
|
||||
};
|
||||
actions: {
|
||||
item?: object[];
|
||||
};
|
||||
}
|
|
@ -13,7 +13,7 @@ import { versionDescription } from './v1/actions/versionDescription';
|
|||
import { loadOptions } from './v1/methods';
|
||||
import { credentialTest } from './v1/methods';
|
||||
|
||||
export class BambooHR implements INodeType {
|
||||
export class BambooHr implements INodeType {
|
||||
description: INodeTypeDescription;
|
||||
|
||||
constructor(baseDescription: INodeTypeBaseDescription) {
|
||||
|
@ -23,7 +23,7 @@ export class BambooHR implements INodeType {
|
|||
};
|
||||
}
|
||||
|
||||
methods = {
|
||||
methods = {
|
||||
loadOptions,
|
||||
credentialTest,
|
||||
};
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
33
packages/nodes-base/nodes/BambooHr/v1/actions/Interfaces.ts
Normal file
33
packages/nodes-base/nodes/BambooHr/v1/actions/Interfaces.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import {
|
||||
AllEntities,
|
||||
Entity,
|
||||
PropertiesOf,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
type BambooHrMap = {
|
||||
employee: 'create' | 'get' | 'getAll' | 'update';
|
||||
employeeDocument: 'delete' | 'download' | 'get' | 'getAll' | 'update' | 'upload';
|
||||
file: 'delete' | 'download' | 'getAll' | 'update';
|
||||
companyReport: 'get';
|
||||
};
|
||||
|
||||
export type BambooHr = AllEntities<BambooHrMap>;
|
||||
|
||||
export type BambooHrFile = Entity<BambooHrMap, 'file'>;
|
||||
export type BambooHrEmployee = Entity<BambooHrMap, 'employee'>;
|
||||
export type BambooHrEmployeeDocument = Entity<BambooHrMap, 'employeeDocument'>;
|
||||
export type BambooHrCompanyReport = Entity<BambooHrMap, 'companyReport'>;
|
||||
|
||||
export type FileProperties = PropertiesOf<BambooHrFile>;
|
||||
export type EmployeeProperties = PropertiesOf<BambooHrEmployee>;
|
||||
export type EmployeeDocumentProperties = PropertiesOf<BambooHrEmployeeDocument>;
|
||||
export type CompanyReportProperties = PropertiesOf<BambooHrCompanyReport>;
|
||||
|
||||
export interface IAttachment {
|
||||
fields: {
|
||||
item?: object[];
|
||||
};
|
||||
actions: {
|
||||
item?: object[];
|
||||
};
|
||||
}
|
|
@ -50,7 +50,7 @@ export const createEmployeeSharedDescription = (sync = false): INodeProperties[]
|
|||
type: 'string',
|
||||
default: '',
|
||||
placeholder: 'United States',
|
||||
description: 'The name of the country. Must exist in the BambooHR country list',
|
||||
description: 'The name of the country. Must exist in the BambooHr country list',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -321,4 +321,4 @@ export const createEmployeeSharedDescription = (sync = false): INodeProperties[]
|
|||
});
|
||||
}
|
||||
return elements;
|
||||
};
|
||||
};
|
|
@ -50,7 +50,7 @@ export const updateEmployeeSharedDescription = (sync = false): INodeProperties[]
|
|||
type: 'string',
|
||||
default: '',
|
||||
placeholder: 'United States',
|
||||
description: 'The name of the country. Must exist in the BambooHR country list',
|
||||
description: 'The name of the country. Must exist in the BambooHr country list',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -347,4 +347,4 @@ export const updateEmployeeSharedDescription = (sync = false): INodeProperties[]
|
|||
});
|
||||
}
|
||||
return elements;
|
||||
};
|
||||
};
|
|
@ -11,20 +11,20 @@ import * as employeeDocument from './employeeDocument';
|
|||
import * as file from './file';
|
||||
import * as companyReport from './companyReport';
|
||||
|
||||
import { BambooHR } from './Interfaces';
|
||||
import { BambooHr } from './Interfaces';
|
||||
|
||||
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[]> {
|
||||
const items = this.getInputData();
|
||||
const operationResult: INodeExecutionData[] = [];
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const resource = this.getNodeParameter<BambooHR>('resource', i);
|
||||
const resource = this.getNodeParameter<BambooHr>('resource', i);
|
||||
const operation = this.getNodeParameter('operation', i);
|
||||
|
||||
const bamboohr = {
|
||||
resource,
|
||||
operation,
|
||||
} as BambooHR;
|
||||
} as BambooHr;
|
||||
|
||||
if (bamboohr.operation === 'delete') {
|
||||
//@ts-ignore
|
|
@ -10,7 +10,7 @@ import * as companyReport from './companyReport';
|
|||
export const versionDescription: INodeTypeDescription = {
|
||||
credentials: [
|
||||
{
|
||||
name: 'bambooHRApi',
|
||||
name: 'bambooHrApi',
|
||||
required: true,
|
||||
testedBy: 'bambooHrApiCredentialTest',
|
||||
},
|
||||
|
@ -21,9 +21,9 @@ export const versionDescription: INodeTypeDescription = {
|
|||
description: 'Consume BambooHR API',
|
||||
displayName: 'BambooHR',
|
||||
group: ['transform'],
|
||||
icon: 'file:bambooHR.png',
|
||||
icon: 'file:bambooHr.png',
|
||||
inputs: ['main'],
|
||||
name: 'bambooHR',
|
||||
name: 'bambooHr',
|
||||
outputs: ['main'],
|
||||
properties: [
|
||||
{
|
||||
|
@ -57,4 +57,4 @@ export const versionDescription: INodeTypeDescription = {
|
|||
],
|
||||
subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
|
||||
version: 1,
|
||||
};
|
||||
};
|
|
@ -25,7 +25,7 @@ export async function apiRequest(
|
|||
query: IDataObject = {},
|
||||
option: IDataObject = {},
|
||||
) {
|
||||
const credentials = await this.getCredentials('bambooHRApi');
|
||||
const credentials = await this.getCredentials('bambooHrApi');
|
||||
|
||||
if (!credentials) {
|
||||
throw new NodeOperationError(this.getNode(), 'No credentials returned!');
|
|
@ -44,7 +44,7 @@
|
|||
"dist/credentials/AutomizyApi.credentials.js",
|
||||
"dist/credentials/AutopilotApi.credentials.js",
|
||||
"dist/credentials/Aws.credentials.js",
|
||||
"dist/credentials/BambooHRApi.credentials.js",
|
||||
"dist/credentials/BambooHrApi.credentials.js",
|
||||
"dist/credentials/BannerbearApi.credentials.js",
|
||||
"dist/credentials/BaserowApi.credentials.js",
|
||||
"dist/credentials/BeeminderApi.credentials.js",
|
||||
|
@ -348,7 +348,7 @@
|
|||
"dist/nodes/Aws/SQS/AwsSqs.node.js",
|
||||
"dist/nodes/Aws/Textract/AwsTextract.node.js",
|
||||
"dist/nodes/Aws/Transcribe/AwsTranscribe.node.js",
|
||||
"dist/nodes/BambooHR/BambooHR.node.js",
|
||||
"dist/nodes/BambooHr/BambooHr.node.js",
|
||||
"dist/nodes/Bannerbear/Bannerbear.node.js",
|
||||
"dist/nodes/Baserow/Baserow.node.js",
|
||||
"dist/nodes/Beeminder/Beeminder.node.js",
|
||||
|
|
Loading…
Reference in a new issue