mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
✨ Add Orbit Node (#1123)
* ✨ Add Orbit node * 🔨 Refactor and add new functionality * ⚡ Improvements to Orbit-Node * ⚡ Improvements * ⚡ Minor improvements to Orbit-Node Co-authored-by: Tanay Pant <tanaypant@protonmail.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
parent
247fdec745
commit
638e688f25
18
packages/nodes-base/credentials/OrbitApi.credentials.ts
Normal file
18
packages/nodes-base/credentials/OrbitApi.credentials.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import {
|
||||
ICredentialType,
|
||||
NodePropertyTypes,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class OrbitApi implements ICredentialType {
|
||||
name = 'orbitApi';
|
||||
displayName = 'Orbit API';
|
||||
documentationUrl = 'orbit';
|
||||
properties = [
|
||||
{
|
||||
displayName: 'API Token',
|
||||
name: 'accessToken',
|
||||
type: 'string' as NodePropertyTypes,
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
}
|
248
packages/nodes-base/nodes/Orbit/ActivityDescription.ts
Normal file
248
packages/nodes-base/nodes/Orbit/ActivityDescription.ts
Normal file
|
@ -0,0 +1,248 @@
|
|||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const activityOperations = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create an activity for a member',
|
||||
},
|
||||
{
|
||||
name: 'Get All',
|
||||
value: 'getAll',
|
||||
description: 'Get all activities',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const activityFields = [
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* activity:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Title',
|
||||
name: 'title',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Activity Type',
|
||||
name: 'activityType',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getActivityTypes',
|
||||
},
|
||||
default: '',
|
||||
description: 'A user-defined way to group activities of the same nature',
|
||||
},
|
||||
{
|
||||
displayName: 'Description',
|
||||
name: 'description',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'A description of the activity; displayed in the timeline',
|
||||
},
|
||||
{
|
||||
displayName: 'Key',
|
||||
name: 'key',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Supply a key that must be unique or leave blank to have one generated',
|
||||
},
|
||||
{
|
||||
displayName: 'Link',
|
||||
name: 'link',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'A URL for the activity; displayed in the timeline',
|
||||
},
|
||||
{
|
||||
displayName: 'Link Text',
|
||||
name: 'linkText',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The text for the timeline link',
|
||||
},
|
||||
{
|
||||
displayName: 'Occurred At',
|
||||
name: 'occurredAt',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description: 'The date and time the activity occurred; defaults to now',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* activity:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'If all results should be returned or only up to a given limit.',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 100,
|
||||
description: 'How many results to return.',
|
||||
},
|
||||
{
|
||||
displayName: 'Filters',
|
||||
name: 'filters',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Filter',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'activity',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'When set the post will be filtered by the member id.',
|
||||
},
|
||||
],
|
||||
},
|
||||
] as INodeProperties[];
|
119
packages/nodes-base/nodes/Orbit/GenericFunctions.ts
Normal file
119
packages/nodes-base/nodes/Orbit/GenericFunctions.ts
Normal file
|
@ -0,0 +1,119 @@
|
|||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
IExecuteSingleFunctions,
|
||||
IHookFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
IRelation,
|
||||
} from './Interfaces';
|
||||
|
||||
export async function orbitApiRequest(this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
try {
|
||||
const credentials = this.getCredentials('orbitApi');
|
||||
if (credentials === undefined) {
|
||||
throw new Error('No credentials got returned!');
|
||||
}
|
||||
let options: OptionsWithUri = {
|
||||
headers: {
|
||||
Authorization: `Bearer ${credentials.accessToken}`,
|
||||
},
|
||||
method,
|
||||
qs,
|
||||
body,
|
||||
uri: uri || `https://app.orbit.love/api/v1${resource}`,
|
||||
json: true,
|
||||
};
|
||||
|
||||
options = Object.assign({}, options, option);
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
} catch (error) {
|
||||
|
||||
if (error.response && error.response.body && error.response.body.message) {
|
||||
// Try to return the error prettier
|
||||
const errorBody = error.response.body;
|
||||
throw new Error(`Orbit error response [${error.statusCode}]: ${errorBody.message}`);
|
||||
}
|
||||
|
||||
// Expected error data did not get returned so throw the actual error
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an API request to paginated flow endpoint
|
||||
* and return all results
|
||||
*/
|
||||
export async function orbitApiRequestAllItems(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: string, resource: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
let responseData;
|
||||
query.page = 1;
|
||||
|
||||
do {
|
||||
responseData = await orbitApiRequest.call(this, method, resource, body, query);
|
||||
returnData.push.apply(returnData, responseData[propertyName]);
|
||||
|
||||
if (query.resolveIdentities === true) {
|
||||
resolveIdentities(responseData);
|
||||
}
|
||||
|
||||
if (query.resolveMember === true) {
|
||||
resolveMember(responseData);
|
||||
}
|
||||
|
||||
query.page++;
|
||||
if (query.limit && (returnData.length >= query.limit)) {
|
||||
return returnData;
|
||||
}
|
||||
|
||||
} while (
|
||||
responseData.data.length !== 0
|
||||
);
|
||||
return returnData;
|
||||
}
|
||||
|
||||
export function resolveIdentities(responseData: IRelation) {
|
||||
const identities: IDataObject = {};
|
||||
for (const data of responseData.included) {
|
||||
identities[data.id as string] = data;
|
||||
}
|
||||
|
||||
if (!Array.isArray(responseData.data)) {
|
||||
responseData.data = [responseData.data];
|
||||
}
|
||||
|
||||
for (let i = 0; i < responseData.data.length; i++) {
|
||||
for (let y = 0; y < responseData.data[i].relationships.identities.data.length; y++) {
|
||||
//@ts-ignore
|
||||
responseData.data[i].relationships.identities.data[y] = identities[responseData.data[i].relationships.identities.data[y].id];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function resolveMember(responseData: IRelation) {
|
||||
const members: IDataObject = {};
|
||||
for (const data of responseData.included) {
|
||||
members[data.id as string] = data;
|
||||
}
|
||||
|
||||
if (!Array.isArray(responseData.data)) {
|
||||
responseData.data = [responseData.data];
|
||||
}
|
||||
|
||||
for (let i = 0; i < responseData.data.length; i++) {
|
||||
//@ts-ignore
|
||||
responseData.data[i].relationships.member.data = members[responseData.data[i].relationships.member.data.id];
|
||||
}
|
||||
}
|
23
packages/nodes-base/nodes/Orbit/Interfaces.ts
Normal file
23
packages/nodes-base/nodes/Orbit/Interfaces.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import {
|
||||
IDataObject,
|
||||
} from "n8n-workflow";
|
||||
|
||||
export interface IData {
|
||||
data: [
|
||||
{
|
||||
id: string,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
export interface IRelation {
|
||||
data: [
|
||||
{
|
||||
relationships: {
|
||||
identities: IData,
|
||||
member: IData,
|
||||
},
|
||||
},
|
||||
];
|
||||
included: IDataObject[];
|
||||
}
|
881
packages/nodes-base/nodes/Orbit/MemberDescription.ts
Normal file
881
packages/nodes-base/nodes/Orbit/MemberDescription.ts
Normal file
|
@ -0,0 +1,881 @@
|
|||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const memberOperations = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete a member',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a member',
|
||||
},
|
||||
{
|
||||
name: 'Get All',
|
||||
value: 'getAll',
|
||||
description: 'Get all members in a workspace',
|
||||
},
|
||||
{
|
||||
name: 'Lookup',
|
||||
value: 'lookup',
|
||||
description: 'Lookup a member by identity',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
description: 'Update a member',
|
||||
},
|
||||
{
|
||||
name: 'Upsert',
|
||||
value: 'upsert',
|
||||
description: 'Create/Update a member',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const memberFields = [
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* member:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'The workspace',
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'Member ID',
|
||||
},
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* member:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'The workspace',
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'Member ID',
|
||||
},
|
||||
{
|
||||
displayName: 'Resolve Identities',
|
||||
name: 'resolveIdentities',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'By default, the response just includes the reference of the identity. When set to true the identities will be resolved automatically.',
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* member:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'The workspace',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'If all results should be returned or only up to a given limit.',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 100,
|
||||
description: 'How many results to return.',
|
||||
},
|
||||
{
|
||||
displayName: 'Resolve Identities',
|
||||
name: 'resolveIdentities',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'By default, the response just includes the reference of the identity. When set to true the identities will be resolved automatically.',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Sort By',
|
||||
name: 'sort',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Name of the field the response will be sorted by.',
|
||||
},
|
||||
{
|
||||
displayName: 'Sort Direction',
|
||||
name: 'direction',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'ASC',
|
||||
value: 'ASC',
|
||||
},
|
||||
{
|
||||
name: 'DESC',
|
||||
value: 'DESC',
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* member:lookup */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'lookup',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'The workspace',
|
||||
},
|
||||
{
|
||||
displayName: 'Source',
|
||||
name: 'source',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Discourse',
|
||||
value: 'discourse',
|
||||
},
|
||||
{
|
||||
name: 'Email',
|
||||
value: 'email',
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
value: 'github',
|
||||
},
|
||||
{
|
||||
name: 'Twitter',
|
||||
value: 'twitter',
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'lookup',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `Set to github, twitter, email, discourse or the source of any identities you've manually created.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Search By',
|
||||
name: 'searchBy',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Username',
|
||||
value: 'username',
|
||||
},
|
||||
{
|
||||
name: 'ID',
|
||||
value: 'id',
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'lookup',
|
||||
],
|
||||
source: [
|
||||
'discourse',
|
||||
'github',
|
||||
'twitter',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'lookup',
|
||||
],
|
||||
searchBy: [
|
||||
'id',
|
||||
],
|
||||
source: [
|
||||
'discourse',
|
||||
'github',
|
||||
'twitter',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `The username at the source.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Username',
|
||||
name: 'username',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'lookup',
|
||||
],
|
||||
searchBy: [
|
||||
'username',
|
||||
],
|
||||
source: [
|
||||
'discourse',
|
||||
'github',
|
||||
'twitter',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `The username at the source.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'lookup',
|
||||
],
|
||||
source: [
|
||||
'email',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `The email address.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Host',
|
||||
name: 'host',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'lookup',
|
||||
],
|
||||
source: [
|
||||
'discourse',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* member:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Update Fields',
|
||||
name: 'updateFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Bio',
|
||||
name: 'bio',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Birthday',
|
||||
name: 'birthday',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Company',
|
||||
name: 'company',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Location',
|
||||
name: 'location',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Name',
|
||||
name: 'name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Pronouns',
|
||||
name: 'pronouns',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Shipping Address',
|
||||
name: 'shippingAddress',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Slug',
|
||||
name: 'slug',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Tags to Add',
|
||||
name: 'tagsToAdd',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Adds tags to member; comma-separated string or array',
|
||||
},
|
||||
{
|
||||
displayName: 'Tag List',
|
||||
name: 'tagList',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Replaces all tags for the member; comma-separated string or array',
|
||||
},
|
||||
{
|
||||
displayName: 'T-Shirt',
|
||||
name: 'tShirt',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Teammate',
|
||||
name: 'teammate',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
displayName: 'URL',
|
||||
name: 'url',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* member:upsert */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Identity',
|
||||
name: 'identityUi',
|
||||
type: 'fixedCollection',
|
||||
description: 'The identity is used to find the member. If no member exists, a new member will be created and linked to the provided identity.',
|
||||
typeOptions: {
|
||||
multipleValues: false,
|
||||
},
|
||||
placeholder: 'Add Identity',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Identity',
|
||||
name: 'identityValue',
|
||||
values: [
|
||||
{
|
||||
displayName: 'Source',
|
||||
name: 'source',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Discourse',
|
||||
value: 'discourse',
|
||||
},
|
||||
{
|
||||
name: 'Email',
|
||||
value: 'email',
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
value: 'github',
|
||||
},
|
||||
{
|
||||
name: 'Twitter',
|
||||
value: 'twitter',
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
description: `Set to github, twitter, email, discourse or the source of any identities you've manually created.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Search By',
|
||||
name: 'searchBy',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Username',
|
||||
value: 'username',
|
||||
},
|
||||
{
|
||||
name: 'ID',
|
||||
value: 'id',
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
source: [
|
||||
'discourse',
|
||||
'github',
|
||||
'twitter',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
searchBy: [
|
||||
'id',
|
||||
],
|
||||
source: [
|
||||
'discourse',
|
||||
'github',
|
||||
'twitter',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `The username at the source.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Username',
|
||||
name: 'username',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
searchBy: [
|
||||
'username',
|
||||
],
|
||||
source: [
|
||||
'discourse',
|
||||
'github',
|
||||
'twitter',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `The username at the source.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
source: [
|
||||
'email',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Host',
|
||||
name: 'host',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
source: [
|
||||
'discourse',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'member',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Bio',
|
||||
name: 'bio',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Birthday',
|
||||
name: 'birthday',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Company',
|
||||
name: 'company',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Location',
|
||||
name: 'location',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Name',
|
||||
name: 'name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Pronouns',
|
||||
name: 'pronouns',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Shipping Address',
|
||||
name: 'shippingAddress',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Slug',
|
||||
name: 'slug',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Tags to Add',
|
||||
name: 'tagsToAdd',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Adds tags to member; comma-separated string or array.',
|
||||
},
|
||||
{
|
||||
displayName: 'Tag List',
|
||||
name: 'tagList',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Replaces all tags for the member; comma-separated string or array.',
|
||||
},
|
||||
{
|
||||
displayName: 'T-Shirt',
|
||||
name: 'tShirt',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Teammate',
|
||||
name: 'teammate',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
displayName: 'URL',
|
||||
name: 'url',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
] as INodeProperties[];
|
272
packages/nodes-base/nodes/Orbit/NoteDescription.ts
Normal file
272
packages/nodes-base/nodes/Orbit/NoteDescription.ts
Normal file
|
@ -0,0 +1,272 @@
|
|||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const noteOperations = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a note',
|
||||
},
|
||||
{
|
||||
name: 'Get All',
|
||||
value: 'getAll',
|
||||
description: 'Get all notes for a member',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
description: 'Update a note',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const noteFields = [
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* note:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'The workspace',
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Note',
|
||||
name: 'note',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* note:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'If all results should be returned or only up to a given limit.',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 100,
|
||||
description: 'How many results to return.',
|
||||
},
|
||||
{
|
||||
displayName: 'Resolve Member',
|
||||
name: 'resolveMember',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* note:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Note ID',
|
||||
name: 'noteId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Note',
|
||||
name: 'note',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
] as INodeProperties[];
|
458
packages/nodes-base/nodes/Orbit/Orbit.node.ts
Normal file
458
packages/nodes-base/nodes/Orbit/Orbit.node.ts
Normal file
|
@ -0,0 +1,458 @@
|
|||
import {
|
||||
IExecuteFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
INodeExecutionData,
|
||||
INodePropertyOptions,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
orbitApiRequest,
|
||||
orbitApiRequestAllItems,
|
||||
resolveIdentities,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import {
|
||||
activityFields,
|
||||
activityOperations,
|
||||
} from './ActivityDescription';
|
||||
|
||||
import {
|
||||
memberFields,
|
||||
memberOperations,
|
||||
} from './MemberDescription';
|
||||
|
||||
import {
|
||||
noteFields,
|
||||
noteOperations,
|
||||
} from './NoteDescription';
|
||||
|
||||
import {
|
||||
postFields,
|
||||
postOperations,
|
||||
} from './PostDescription';
|
||||
|
||||
import * as moment from 'moment';
|
||||
|
||||
export class Orbit implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Orbit',
|
||||
name: 'orbit',
|
||||
icon: 'file:orbit.svg',
|
||||
group: ['output'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Consume Orbit API',
|
||||
defaults: {
|
||||
name: 'Orbit',
|
||||
color: '#00ade8',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
credentials: [
|
||||
{
|
||||
name: 'orbitApi',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Activity',
|
||||
value: 'activity',
|
||||
},
|
||||
{
|
||||
name: 'Member',
|
||||
value: 'member',
|
||||
},
|
||||
{
|
||||
name: 'Note',
|
||||
value: 'note',
|
||||
},
|
||||
{
|
||||
name: 'Post',
|
||||
value: 'post',
|
||||
},
|
||||
],
|
||||
default: 'member',
|
||||
description: 'Resource to consume.',
|
||||
},
|
||||
// ACTIVITY
|
||||
...activityOperations,
|
||||
...activityFields,
|
||||
// MEMBER
|
||||
...memberOperations,
|
||||
...memberFields,
|
||||
// NOTE
|
||||
...noteOperations,
|
||||
...noteFields,
|
||||
// POST
|
||||
...postOperations,
|
||||
...postFields,
|
||||
],
|
||||
};
|
||||
|
||||
methods = {
|
||||
loadOptions: {
|
||||
async getWorkspaces(
|
||||
this: ILoadOptionsFunctions,
|
||||
): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const workspaces = await orbitApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
'/workspaces',
|
||||
);
|
||||
for (const workspace of workspaces.data) {
|
||||
returnData.push({
|
||||
name: workspace.attributes.name,
|
||||
value: workspace.id,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
async getActivityTypes(
|
||||
this: ILoadOptionsFunctions,
|
||||
): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const { data } = await orbitApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
'/activity_types',
|
||||
);
|
||||
for (const activityType of data) {
|
||||
returnData.push({
|
||||
name: activityType.attributes.short_name,
|
||||
value: activityType.id,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
const returnData: IDataObject[] = [];
|
||||
const length = items.length as unknown as number;
|
||||
const qs: IDataObject = {};
|
||||
let responseData;
|
||||
const resource = this.getNodeParameter('resource', 0) as string;
|
||||
const operation = this.getNodeParameter('operation', 0) as string;
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (resource === 'activity') {
|
||||
if (operation === 'create') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const body: IDataObject = {
|
||||
title,
|
||||
};
|
||||
if (additionalFields.description) {
|
||||
body.description = additionalFields.description as string;
|
||||
}
|
||||
if (additionalFields.link) {
|
||||
body.link = additionalFields.link as string;
|
||||
}
|
||||
if (additionalFields.linkText) {
|
||||
body.link_text = additionalFields.linkText as string;
|
||||
}
|
||||
if (additionalFields.activityType) {
|
||||
body.activity_type = additionalFields.activityType as string;
|
||||
}
|
||||
if (additionalFields.key) {
|
||||
body.key = additionalFields.key as string;
|
||||
}
|
||||
if (additionalFields.occurredAt) {
|
||||
body.occurred_at = additionalFields.occurredAt as string;
|
||||
}
|
||||
|
||||
responseData = await orbitApiRequest.call(this, 'POST', `/${workspaceId}/members/${memberId}/activities`, body);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
let endpoint = `/${workspaceId}/activities`;
|
||||
if (filters.memberId) {
|
||||
endpoint = `/${workspaceId}/members/${filters.memberId}/activities`;
|
||||
}
|
||||
if (returnAll === true) {
|
||||
responseData = await orbitApiRequestAllItems.call(this, 'data', 'GET', endpoint, {}, qs);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as boolean;
|
||||
responseData = await orbitApiRequestAllItems.call(this, 'data', 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.splice(0, qs.limit);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (resource === 'member') {
|
||||
if (operation === 'upsert') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const member: IDataObject = {};
|
||||
const identity: IDataObject = {};
|
||||
if (additionalFields.bio) {
|
||||
member.bio = additionalFields.bio as string;
|
||||
}
|
||||
if (additionalFields.birthday) {
|
||||
member.birthday = moment(additionalFields.birthday as string).format('MM-DD-YYYY');
|
||||
}
|
||||
if (additionalFields.company) {
|
||||
member.company = additionalFields.company as string;
|
||||
}
|
||||
if (additionalFields.location) {
|
||||
member.location = additionalFields.location as string;
|
||||
}
|
||||
if (additionalFields.name) {
|
||||
member.name = additionalFields.name as string;
|
||||
}
|
||||
if (additionalFields.bio) {
|
||||
member.bio = additionalFields.bio as string;
|
||||
}
|
||||
if (additionalFields.pronouns) {
|
||||
member.pronouns = additionalFields.pronouns as string;
|
||||
}
|
||||
if (additionalFields.shippingAddress) {
|
||||
member.shipping_address = additionalFields.shippingAddress as string;
|
||||
}
|
||||
if (additionalFields.slug) {
|
||||
member.slug = additionalFields.slug as string;
|
||||
}
|
||||
if (additionalFields.tagsToAdd) {
|
||||
member.tags_to_add = additionalFields.tagsToAdd as string;
|
||||
}
|
||||
if (additionalFields.tagList) {
|
||||
member.tag_list = additionalFields.tagList as string;
|
||||
}
|
||||
if (additionalFields.tshirt) {
|
||||
member.tshirt = additionalFields.tshirt as string;
|
||||
}
|
||||
if (additionalFields.hasOwnProperty('teammate')) {
|
||||
member.teammate = additionalFields.teammate as boolean;
|
||||
}
|
||||
if (additionalFields.url) {
|
||||
member.url = additionalFields.url as string;
|
||||
}
|
||||
|
||||
const data = (this.getNodeParameter('identityUi', i) as IDataObject).identityValue as IDataObject;
|
||||
if (data) {
|
||||
if (['github', 'twitter', 'discourse'].includes(data.source as string)) {
|
||||
identity.source = data.source as string;
|
||||
const searchBy = data.searchBy as string;
|
||||
if (searchBy === 'id') {
|
||||
identity.uid = data.id as string;
|
||||
} else {
|
||||
identity.username = data.username as string;
|
||||
}
|
||||
if (data.source === 'discourse') {
|
||||
identity.source_host = data.host as string;
|
||||
}
|
||||
} else {
|
||||
//it's email
|
||||
identity.email = data.email as string;
|
||||
}
|
||||
}
|
||||
|
||||
responseData = await orbitApiRequest.call(this, 'POST', `/${workspaceId}/members`, { member, identity });
|
||||
responseData = responseData.data;
|
||||
}
|
||||
if (operation === 'delete') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
responseData = await orbitApiRequest.call(this, 'DELETE', `/${workspaceId}/members/${memberId}`);
|
||||
responseData = { success: true };
|
||||
}
|
||||
if (operation === 'get') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
const resolve = this.getNodeParameter('resolveIdentities', 0) as boolean;
|
||||
responseData = await orbitApiRequest.call(this, 'GET', `/${workspaceId}/members/${memberId}`);
|
||||
if (resolve === true) {
|
||||
resolveIdentities(responseData);
|
||||
}
|
||||
responseData = responseData.data;
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
Object.assign(qs, options);
|
||||
qs.resolveIdentities = this.getNodeParameter('resolveIdentities', 0) as boolean;
|
||||
if (returnAll === true) {
|
||||
responseData = await orbitApiRequestAllItems.call(this, 'data', 'GET', `/${workspaceId}/members`, {}, qs);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as boolean;
|
||||
responseData = await orbitApiRequestAllItems.call(this, 'data', 'GET', `/${workspaceId}/members`, {}, qs);
|
||||
responseData = responseData.splice(0, qs.limit);
|
||||
}
|
||||
}
|
||||
if (operation === 'lookup') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const source = this.getNodeParameter('source', i) as string;
|
||||
|
||||
if (['github', 'twitter', 'discourse'].includes(source)) {
|
||||
qs.source = this.getNodeParameter('source', i) as string;
|
||||
const searchBy = this.getNodeParameter('searchBy', i) as string;
|
||||
if (searchBy === 'id') {
|
||||
qs.uid = this.getNodeParameter('id', i) as string;
|
||||
} else {
|
||||
qs.username = this.getNodeParameter('username', i) as string;
|
||||
}
|
||||
if (source === 'discourse') {
|
||||
qs.source_host = this.getNodeParameter('host', i) as string;
|
||||
}
|
||||
} else {
|
||||
//it's email
|
||||
qs.email = this.getNodeParameter('email', i) as string;
|
||||
}
|
||||
|
||||
responseData = await orbitApiRequest.call(this, 'GET', `/${workspaceId}/members/find`, {}, qs);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
if (operation === 'update') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const body: IDataObject = {
|
||||
};
|
||||
if (updateFields.bio) {
|
||||
body.bio = updateFields.bio as string;
|
||||
}
|
||||
if (updateFields.birthday) {
|
||||
body.birthday = moment(updateFields.birthday as string).format('MM-DD-YYYY');
|
||||
}
|
||||
if (updateFields.company) {
|
||||
body.company = updateFields.company as string;
|
||||
}
|
||||
if (updateFields.location) {
|
||||
body.location = updateFields.location as string;
|
||||
}
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
}
|
||||
if (updateFields.bio) {
|
||||
body.bio = updateFields.bio as string;
|
||||
}
|
||||
if (updateFields.pronouns) {
|
||||
body.pronouns = updateFields.pronouns as string;
|
||||
}
|
||||
if (updateFields.shippingAddress) {
|
||||
body.shipping_address = updateFields.shippingAddress as string;
|
||||
}
|
||||
if (updateFields.slug) {
|
||||
body.slug = updateFields.slug as string;
|
||||
}
|
||||
if (updateFields.tagsToAdd) {
|
||||
body.tags_to_add = updateFields.tagsToAdd as string;
|
||||
}
|
||||
if (updateFields.tagList) {
|
||||
body.tag_list = updateFields.tagList as string;
|
||||
}
|
||||
if (updateFields.tshirt) {
|
||||
body.tshirt = updateFields.tshirt as string;
|
||||
}
|
||||
if (updateFields.hasOwnProperty('teammate')) {
|
||||
body.teammate = updateFields.teammate as boolean;
|
||||
}
|
||||
if (updateFields.url) {
|
||||
body.url = updateFields.url as string;
|
||||
}
|
||||
|
||||
responseData = await orbitApiRequest.call(this, 'PUT', `/${workspaceId}/members/${memberId}`, body);
|
||||
responseData = { success: true };
|
||||
}
|
||||
}
|
||||
if (resource === 'note') {
|
||||
if (operation === 'create') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
const note = this.getNodeParameter('note', i) as string;
|
||||
|
||||
responseData = await orbitApiRequest.call(this, 'POST', `/${workspaceId}/members/${memberId}/notes`, { body: note });
|
||||
responseData = responseData.data;
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
qs.resolveMember = this.getNodeParameter('resolveMember', 0) as boolean;
|
||||
if (returnAll === true) {
|
||||
responseData = await orbitApiRequestAllItems.call(this, 'data', 'GET', `/${workspaceId}/members/${memberId}/notes`, {}, qs);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as boolean;
|
||||
responseData = await orbitApiRequestAllItems.call(this, 'data', 'GET', `/${workspaceId}/members/${memberId}/notes`, {}, qs);
|
||||
responseData = responseData.splice(0, qs.limit);
|
||||
}
|
||||
}
|
||||
if (operation === 'update') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
const noteId = this.getNodeParameter('noteId', i) as string;
|
||||
const note = this.getNodeParameter('note', i) as string;
|
||||
|
||||
responseData = await orbitApiRequest.call(this, 'PUT', `/${workspaceId}/members/${memberId}/notes/${noteId}`, { body: note });
|
||||
responseData = { success: true };
|
||||
}
|
||||
}
|
||||
if (resource === 'post') {
|
||||
if (operation === 'create') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
const url = this.getNodeParameter('url', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const body: IDataObject = {
|
||||
url,
|
||||
};
|
||||
if (additionalFields.publishedAt) {
|
||||
body.published_at = additionalFields.publishedAt as string;
|
||||
}
|
||||
|
||||
responseData = await orbitApiRequest.call(this, 'POST', `/${workspaceId}/members/${memberId}/posts`, body);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
let endpoint = `/${workspaceId}/posts`;
|
||||
if (filters.memberId) {
|
||||
endpoint = `/${workspaceId}/members/${filters.memberId}/posts`;
|
||||
}
|
||||
if (returnAll === true) {
|
||||
responseData = await orbitApiRequestAllItems.call(this, 'data', 'GET', endpoint, {}, qs);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as boolean;
|
||||
responseData = await orbitApiRequestAllItems.call(this, 'data', 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.splice(0, qs.limit);
|
||||
}
|
||||
}
|
||||
if (operation === 'delete') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const memberId = this.getNodeParameter('memberId', i) as string;
|
||||
const postId = this.getNodeParameter('postId', i) as string;
|
||||
|
||||
responseData = await orbitApiRequest.call(this, 'DELETE', `/${workspaceId}/members/${memberId}/posts/${postId}`);
|
||||
responseData = { success: true };
|
||||
}
|
||||
}
|
||||
if (Array.isArray(responseData)) {
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
} else {
|
||||
returnData.push(responseData as IDataObject);
|
||||
}
|
||||
}
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
}
|
||||
}
|
273
packages/nodes-base/nodes/Orbit/PostDescription.ts
Normal file
273
packages/nodes-base/nodes/Orbit/PostDescription.ts
Normal file
|
@ -0,0 +1,273 @@
|
|||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const postOperations = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a post',
|
||||
},
|
||||
{
|
||||
name: 'Get All',
|
||||
value: 'getAll',
|
||||
description: 'Get all posts',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete a post',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const postFields = [
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* post:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'URL',
|
||||
name: 'url',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'Supply any URL and Orbit will do its best job to parse out a title, description, and image.',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Published At',
|
||||
name: 'publishedAt',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* post:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'If all results should be returned or only up to a given limit.',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 100,
|
||||
description: 'How many results to return.',
|
||||
},
|
||||
{
|
||||
displayName: 'Filters',
|
||||
name: 'filters',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Filter',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'When set the post will be filtered by the member ID.',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* post:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Workspace',
|
||||
name: 'workspaceId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getWorkspaces',
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Post ID',
|
||||
name: 'postId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
] as INodeProperties[];
|
9
packages/nodes-base/nodes/Orbit/orbit.svg
Normal file
9
packages/nodes-base/nodes/Orbit/orbit.svg
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="80px" height="80px" fill="none" viewBox="13.5 9.957 132 91.59" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M119.047 49.0982C118.081 41.7948 115.336 34.8402 111.054 28.8452C106.773 22.8503 101.085 17.9982 94.4895 14.7152C87.8945 11.4322 80.5943 9.81863 73.2299 10.0162C65.8655 10.2137 58.6623 12.2164 52.2527 15.8482C45.8432 19.4801 40.4233 24.6301 36.4692 30.846C32.515 37.0619 30.1474 44.1536 29.5744 51.4983C29.0013 58.843 30.2403 66.216 33.1825 72.97C36.1248 79.724 40.6802 85.6523 46.4489 90.2343C50.8655 88.2677 55.6945 85.9719 60.8235 83.397C55.6358 80.9116 51.2279 77.0528 48.0782 72.2395C44.9284 67.4262 43.157 61.8421 42.9562 56.0933C42.7554 50.3445 44.1328 44.6505 46.9391 39.6291C49.7454 34.6078 53.8733 30.4509 58.8749 27.6095C63.8764 24.7682 69.5607 23.3509 75.3108 23.5114C81.0608 23.6719 86.6571 25.4042 91.4924 28.5202C96.3276 31.6362 100.217 36.017 102.739 41.1871C105.261 46.3572 106.318 52.1192 105.797 57.8479C110.547 54.8355 114.988 51.9022 119.047 49.0982ZM119.426 54.198C114.88 57.5604 109.843 61.0436 104.426 64.556C102.007 72.1442 96.8025 78.534 89.861 82.4388C82.9194 86.3437 74.7562 87.4736 67.0149 85.6011C61.0776 88.4552 55.4445 90.9259 50.2863 92.9717C57.147 97.3349 65.0617 99.7578 73.1892 99.9828C81.3167 100.208 89.3533 98.2265 96.4448 94.2495C103.536 90.2725 109.418 84.4484 113.464 77.3962C117.511 70.3441 119.571 62.3273 119.426 54.198Z" fill="#1D2125"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M121.709 17.5992C122.318 17.5992 122.913 17.4186 123.42 17.0803C123.926 16.7419 124.321 16.2611 124.554 15.6984C124.787 15.1358 124.848 14.5167 124.729 13.9194C124.61 13.3222 124.317 12.7735 123.886 12.3429C123.456 11.9123 122.907 11.619 122.31 11.5002C121.712 11.3814 121.093 11.4424 120.531 11.6754C119.968 11.9085 119.487 12.3031 119.149 12.8095C118.81 13.3158 118.63 13.9112 118.63 14.5201C118.629 14.9246 118.709 15.3253 118.863 15.6991C119.018 16.0729 119.244 16.4126 119.531 16.6986C119.817 16.9846 120.156 17.2114 120.53 17.3659C120.904 17.5205 121.304 17.5997 121.709 17.5992Z" fill="#00ADE8"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.1041 69.9141C18.9163 69.9141 19.7102 69.6731 20.3854 69.2216C21.0606 68.7701 21.5866 68.1284 21.8969 67.3778C22.2071 66.6271 22.2877 65.8013 22.1283 65.0048C21.9689 64.2084 21.5768 63.4772 21.0016 62.9037C20.4264 62.3302 19.6939 61.9404 18.897 61.7834C18.1001 61.6265 17.2745 61.7095 16.5248 62.0221C15.7751 62.3346 15.135 62.8626 14.6856 63.5391C14.2361 64.2157 13.9975 65.0104 14 65.8226C14.0033 66.9089 14.4372 67.9496 15.2065 68.7165C15.9758 69.4835 17.0178 69.9141 18.1041 69.9141Z" fill="#00ADE8"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M87.4143 45.7399C91.8475 43.29 96.164 40.9651 100.33 38.8193C100.485 39.0693 100.651 39.3651 100.826 39.6985C96.6973 41.8567 92.3808 44.19 87.9476 46.6441L87.4143 45.7399ZM144.996 23.8782C143.017 20.4491 131.017 24.0906 114.034 32.0279C114.193 32.2904 114.351 32.5612 114.501 32.8362C130.771 25.0906 142.125 21.3616 143.567 24.3615C145.833 28.2863 119.817 47.544 85.4852 67.3726C51.153 87.2011 21.4623 100.092 19.1957 96.1674C17.9041 93.8342 24.2913 87.4761 30.0287 82.4179C21.7664 89.0843 17.4332 94.2217 18.8582 96.6883C22.0914 102.292 53.3862 91.2718 88.2226 71.1724C123.059 51.0731 148.246 29.4821 144.996 23.8782Z" fill="#00ADE8"/>
|
||||
<path d="M83.3353 48.9982C82.6012 47.7384 82.3267 46.263 82.5588 44.8236C82.7909 43.3842 83.5151 42.0698 84.6079 41.1046C85.7007 40.1394 87.0944 39.5831 88.5515 39.5306C90.0086 39.4781 91.4388 39.9327 92.5982 40.8168C93.7576 41.7008 94.5745 42.9597 94.9095 44.3787C95.2445 45.7978 95.077 47.2891 94.4354 48.5983C93.7939 49.9076 92.718 50.9539 91.3913 51.5586C90.0646 52.1634 88.5692 52.2892 87.1601 51.9147C86.3577 51.7143 85.6046 51.3523 84.947 50.8508C84.2893 50.3493 83.7409 49.7189 83.3353 48.9982Z" fill="#DD078C"/>
|
||||
<path style="fill: rgb(216, 216, 216); stroke: rgb(0, 0, 0);" d="M 136.262 12.714"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.9 KiB |
|
@ -136,6 +136,7 @@
|
|||
"dist/credentials/OAuth1Api.credentials.js",
|
||||
"dist/credentials/OAuth2Api.credentials.js",
|
||||
"dist/credentials/OpenWeatherMapApi.credentials.js",
|
||||
"dist/credentials/OrbitApi.credentials.js",
|
||||
"dist/credentials/PaddleApi.credentials.js",
|
||||
"dist/credentials/PagerDutyApi.credentials.js",
|
||||
"dist/credentials/PagerDutyOAuth2Api.credentials.js",
|
||||
|
@ -335,6 +336,7 @@
|
|||
"dist/nodes/NextCloud/NextCloud.node.js",
|
||||
"dist/nodes/NoOp.node.js",
|
||||
"dist/nodes/OpenWeatherMap.node.js",
|
||||
"dist/nodes/Orbit/Orbit.node.js",
|
||||
"dist/nodes/Paddle/Paddle.node.js",
|
||||
"dist/nodes/PagerDuty/PagerDuty.node.js",
|
||||
"dist/nodes/PayPal/PayPal.node.js",
|
||||
|
|
Loading…
Reference in a new issue