@lilremark/n8n-nodes-twenty-dynamic 2.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -0
- package/README.md +290 -0
- package/dist/credentials/TwentyApi.credentials.d.ts +8 -0
- package/dist/credentials/TwentyApi.credentials.js +49 -0
- package/dist/credentials/TwentyApi.credentials.js.map +1 -0
- package/dist/nodes/Twenty/ComplexFieldDetection.d.ts +8 -0
- package/dist/nodes/Twenty/ComplexFieldDetection.js +27 -0
- package/dist/nodes/Twenty/ComplexFieldDetection.js.map +1 -0
- package/dist/nodes/Twenty/FieldParameters.d.ts +11 -0
- package/dist/nodes/Twenty/FieldParameters.js +211 -0
- package/dist/nodes/Twenty/FieldParameters.js.map +1 -0
- package/dist/nodes/Twenty/FieldTransformation.d.ts +30 -0
- package/dist/nodes/Twenty/FieldTransformation.js +168 -0
- package/dist/nodes/Twenty/FieldTransformation.js.map +1 -0
- package/dist/nodes/Twenty/Twenty.node.d.ts +22 -0
- package/dist/nodes/Twenty/Twenty.node.js +1629 -0
- package/dist/nodes/Twenty/Twenty.node.js.map +1 -0
- package/dist/nodes/Twenty/Twenty.node.json +30 -0
- package/dist/nodes/Twenty/TwentyApi.client.d.ts +82 -0
- package/dist/nodes/Twenty/TwentyApi.client.js +654 -0
- package/dist/nodes/Twenty/TwentyApi.client.js.map +1 -0
- package/dist/nodes/Twenty/introspection/fieldIntrospection.d.ts +15 -0
- package/dist/nodes/Twenty/introspection/fieldIntrospection.js +135 -0
- package/dist/nodes/Twenty/introspection/fieldIntrospection.js.map +1 -0
- package/dist/nodes/Twenty/operations/create.operation.d.ts +7 -0
- package/dist/nodes/Twenty/operations/create.operation.js +20 -0
- package/dist/nodes/Twenty/operations/create.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/createMany.operation.d.ts +11 -0
- package/dist/nodes/Twenty/operations/createMany.operation.js +72 -0
- package/dist/nodes/Twenty/operations/createMany.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/delete.operation.d.ts +7 -0
- package/dist/nodes/Twenty/operations/delete.operation.js +18 -0
- package/dist/nodes/Twenty/operations/delete.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/deleteMany.operation.d.ts +7 -0
- package/dist/nodes/Twenty/operations/deleteMany.operation.js +39 -0
- package/dist/nodes/Twenty/operations/deleteMany.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/get.operation.d.ts +7 -0
- package/dist/nodes/Twenty/operations/get.operation.js +25 -0
- package/dist/nodes/Twenty/operations/get.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/getMany.operation.d.ts +8 -0
- package/dist/nodes/Twenty/operations/getMany.operation.js +37 -0
- package/dist/nodes/Twenty/operations/getMany.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/index.d.ts +11 -0
- package/dist/nodes/Twenty/operations/index.js +26 -0
- package/dist/nodes/Twenty/operations/index.js.map +1 -0
- package/dist/nodes/Twenty/operations/list.operation.d.ts +7 -0
- package/dist/nodes/Twenty/operations/list.operation.js +25 -0
- package/dist/nodes/Twenty/operations/list.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/update.operation.d.ts +7 -0
- package/dist/nodes/Twenty/operations/update.operation.js +21 -0
- package/dist/nodes/Twenty/operations/update.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/updateMany.operation.d.ts +19 -0
- package/dist/nodes/Twenty/operations/updateMany.operation.js +75 -0
- package/dist/nodes/Twenty/operations/updateMany.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/upsert.operation.d.ts +12 -0
- package/dist/nodes/Twenty/operations/upsert.operation.js +122 -0
- package/dist/nodes/Twenty/operations/upsert.operation.js.map +1 -0
- package/dist/nodes/Twenty/operations/upsertMany.operation.d.ts +13 -0
- package/dist/nodes/Twenty/operations/upsertMany.operation.js +120 -0
- package/dist/nodes/Twenty/operations/upsertMany.operation.js.map +1 -0
- package/dist/nodes/Twenty/twenty.svg +12 -0
- package/dist/package.json +81 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface IFieldData {
|
|
2
|
+
fieldName: string;
|
|
3
|
+
fieldType?: string;
|
|
4
|
+
fieldValue?: any;
|
|
5
|
+
firstName?: string;
|
|
6
|
+
lastName?: string;
|
|
7
|
+
primaryLinkUrl?: string;
|
|
8
|
+
primaryLinkLabel?: string;
|
|
9
|
+
currencyAmount?: number;
|
|
10
|
+
currencyCode?: string;
|
|
11
|
+
addressStreet1?: string;
|
|
12
|
+
addressStreet2?: string;
|
|
13
|
+
addressCity?: string;
|
|
14
|
+
addressPostcode?: string;
|
|
15
|
+
addressState?: string;
|
|
16
|
+
addressCountry?: string;
|
|
17
|
+
addressLat?: number;
|
|
18
|
+
addressLng?: number;
|
|
19
|
+
primaryEmail?: string;
|
|
20
|
+
primaryPhoneNumber?: string;
|
|
21
|
+
primaryPhoneCountryCode?: string;
|
|
22
|
+
primaryPhoneCallingCode?: string;
|
|
23
|
+
fieldSelectValue?: string;
|
|
24
|
+
fieldMultiSelectValue?: string[];
|
|
25
|
+
fieldBooleanValue?: boolean;
|
|
26
|
+
markdown?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function transformFieldsData(fields: IFieldData[], resource?: string): Record<string, any>;
|
|
29
|
+
export declare function isComplexField(fieldName: string): boolean;
|
|
30
|
+
export declare function getComplexFieldType(fieldName: string): string | null;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformFieldsData = transformFieldsData;
|
|
4
|
+
exports.isComplexField = isComplexField;
|
|
5
|
+
exports.getComplexFieldType = getComplexFieldType;
|
|
6
|
+
function transformFieldsData(fields, resource) {
|
|
7
|
+
var _a;
|
|
8
|
+
const result = {};
|
|
9
|
+
for (const field of fields) {
|
|
10
|
+
const actualFieldName = field.fieldName.includes('|')
|
|
11
|
+
? field.fieldName.split('|')[0]
|
|
12
|
+
: field.fieldName;
|
|
13
|
+
const fieldType = field.fieldType || 'simple';
|
|
14
|
+
switch (fieldType) {
|
|
15
|
+
case 'fullName':
|
|
16
|
+
const fullName = {};
|
|
17
|
+
if (field.firstName)
|
|
18
|
+
fullName.firstName = field.firstName;
|
|
19
|
+
if (field.lastName)
|
|
20
|
+
fullName.lastName = field.lastName;
|
|
21
|
+
if (Object.keys(fullName).length > 0) {
|
|
22
|
+
result[actualFieldName] = fullName;
|
|
23
|
+
}
|
|
24
|
+
break;
|
|
25
|
+
case 'link':
|
|
26
|
+
const links = {};
|
|
27
|
+
if (field.primaryLinkUrl) {
|
|
28
|
+
const url = String(field.primaryLinkUrl);
|
|
29
|
+
if (url.includes('{{') && url.includes('}}')) {
|
|
30
|
+
throw new Error(`Link URL contains unevaluated expression: "${url}". ` +
|
|
31
|
+
`Make sure the expression can be resolved from the input data. ` +
|
|
32
|
+
`Field: ${actualFieldName}`);
|
|
33
|
+
}
|
|
34
|
+
links.primaryLinkUrl = field.primaryLinkUrl;
|
|
35
|
+
}
|
|
36
|
+
if (field.primaryLinkLabel)
|
|
37
|
+
links.primaryLinkLabel = field.primaryLinkLabel;
|
|
38
|
+
if (Object.keys(links).length > 0) {
|
|
39
|
+
result[actualFieldName] = links;
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
case 'currency':
|
|
43
|
+
const currency = {};
|
|
44
|
+
if (field.currencyAmount !== undefined && field.currencyAmount !== null) {
|
|
45
|
+
currency.amountMicros = field.currencyAmount * 1000000;
|
|
46
|
+
}
|
|
47
|
+
if (field.currencyCode)
|
|
48
|
+
currency.currencyCode = field.currencyCode;
|
|
49
|
+
if (Object.keys(currency).length > 0) {
|
|
50
|
+
result[actualFieldName] = currency;
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
case 'address':
|
|
54
|
+
const address = {};
|
|
55
|
+
if (field.addressStreet1)
|
|
56
|
+
address.addressStreet1 = field.addressStreet1;
|
|
57
|
+
if (field.addressStreet2)
|
|
58
|
+
address.addressStreet2 = field.addressStreet2;
|
|
59
|
+
if (field.addressCity)
|
|
60
|
+
address.addressCity = field.addressCity;
|
|
61
|
+
if (field.addressPostcode)
|
|
62
|
+
address.addressPostcode = field.addressPostcode;
|
|
63
|
+
if (field.addressState)
|
|
64
|
+
address.addressState = field.addressState;
|
|
65
|
+
if (field.addressCountry)
|
|
66
|
+
address.addressCountry = field.addressCountry;
|
|
67
|
+
if (field.addressLat !== undefined && field.addressLat !== null) {
|
|
68
|
+
address.addressLat = field.addressLat;
|
|
69
|
+
}
|
|
70
|
+
if (field.addressLng !== undefined && field.addressLng !== null) {
|
|
71
|
+
address.addressLng = field.addressLng;
|
|
72
|
+
}
|
|
73
|
+
if (Object.keys(address).length > 0) {
|
|
74
|
+
result[actualFieldName] = address;
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
case 'emails':
|
|
78
|
+
const emails = {};
|
|
79
|
+
if (field.primaryEmail)
|
|
80
|
+
emails.primaryEmail = field.primaryEmail;
|
|
81
|
+
if (Object.keys(emails).length > 0) {
|
|
82
|
+
result[actualFieldName] = emails;
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
case 'phones':
|
|
86
|
+
const phones = {};
|
|
87
|
+
if (field.primaryPhoneNumber)
|
|
88
|
+
phones.primaryPhoneNumber = field.primaryPhoneNumber;
|
|
89
|
+
if (field.primaryPhoneCountryCode)
|
|
90
|
+
phones.primaryPhoneCountryCode = field.primaryPhoneCountryCode;
|
|
91
|
+
if (field.primaryPhoneCallingCode)
|
|
92
|
+
phones.primaryPhoneCallingCode = field.primaryPhoneCallingCode;
|
|
93
|
+
if (Object.keys(phones).length > 0) {
|
|
94
|
+
result[actualFieldName] = phones;
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
case 'select':
|
|
98
|
+
if (field.fieldSelectValue !== undefined && field.fieldSelectValue !== '') {
|
|
99
|
+
result[actualFieldName] = field.fieldSelectValue;
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
case 'multiSelect':
|
|
103
|
+
if (field.fieldMultiSelectValue && Array.isArray(field.fieldMultiSelectValue) && field.fieldMultiSelectValue.length > 0) {
|
|
104
|
+
result[actualFieldName] = field.fieldMultiSelectValue;
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
case 'boolean':
|
|
108
|
+
if (field.fieldBooleanValue !== undefined) {
|
|
109
|
+
result[actualFieldName] = field.fieldBooleanValue;
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
case 'richText': {
|
|
113
|
+
const mdValue = (_a = field.markdown) !== null && _a !== void 0 ? _a : field.fieldValue;
|
|
114
|
+
if (mdValue !== undefined && mdValue !== '') {
|
|
115
|
+
if (typeof mdValue === 'object' && mdValue !== null) {
|
|
116
|
+
result[actualFieldName] = mdValue;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
result[actualFieldName] = { markdown: String(mdValue) };
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
case 'simple':
|
|
125
|
+
default:
|
|
126
|
+
if (field.fieldValue !== undefined && field.fieldValue !== '') {
|
|
127
|
+
if (actualFieldName === 'bodyV2' && typeof field.fieldValue === 'string') {
|
|
128
|
+
result[actualFieldName] = { markdown: field.fieldValue };
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
result[actualFieldName] = field.fieldValue;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
function isComplexField(fieldName) {
|
|
140
|
+
const complexFields = [
|
|
141
|
+
'name',
|
|
142
|
+
'pointOfContact',
|
|
143
|
+
'domainName',
|
|
144
|
+
'linkedinLink',
|
|
145
|
+
'xLink',
|
|
146
|
+
'website',
|
|
147
|
+
'cvcWebsite',
|
|
148
|
+
'annualRecurringRevenue',
|
|
149
|
+
'address',
|
|
150
|
+
];
|
|
151
|
+
return complexFields.includes(fieldName);
|
|
152
|
+
}
|
|
153
|
+
function getComplexFieldType(fieldName) {
|
|
154
|
+
if (fieldName === 'name' || fieldName === 'pointOfContact') {
|
|
155
|
+
return 'FullName';
|
|
156
|
+
}
|
|
157
|
+
if (['domainName', 'linkedinLink', 'xLink', 'website', 'cvcWebsite'].includes(fieldName)) {
|
|
158
|
+
return 'Links';
|
|
159
|
+
}
|
|
160
|
+
if (fieldName === 'annualRecurringRevenue') {
|
|
161
|
+
return 'Currency';
|
|
162
|
+
}
|
|
163
|
+
if (fieldName === 'address') {
|
|
164
|
+
return 'Address';
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=FieldTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldTransformation.js","sourceRoot":"","sources":["../../../nodes/Twenty/FieldTransformation.ts"],"names":[],"mappings":";;AAwDA,kDAsJC;AAOD,wCAaC;AAOD,kDAcC;AA/LD,SAAgB,mBAAmB,CAAC,MAAoB,EAAE,QAAiB;;IAC1E,MAAM,MAAM,GAAwB,EAAE,CAAC;IAEvC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAG5B,MAAM,eAAe,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;YACpD,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC/B,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;QAEnB,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,QAAQ,CAAC;QAG9C,QAAQ,SAAS,EAAE,CAAC;YACnB,KAAK,UAAU;gBAEd,MAAM,QAAQ,GAAQ,EAAE,CAAC;gBACzB,IAAI,KAAK,CAAC,SAAS;oBAAE,QAAQ,CAAC,SAAS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,CAAC;AAOD,SAAgB,cAAc,CAAC,SAAiB;IAC/C,MAAM,aAAa,GAAG;QACrB,MAAM;QACN,gBAAgB;QAChB,YAAY;QACZ,cAAc;QACd,OAAO;QACP,SAAS;QACT,YAAY;QACZ,wBAAwB;QACxB,SAAS;KACT,CAAC;IACF,OAAO,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC1C,CAAC;AAOD,SAAgB,mBAAmB,CAAC,SAAiB;IACpD,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;QAC5D,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,IAAI,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC1F,OAAO,OAAO,CAAC;IAChB,CAAC;IACD,IAAI,SAAS,KAAK,wBAAwB,EAAE,CAAC;QAC5C,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeType, INodeTypeDescription, INodePropertyOptions, ILoadOptionsFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
export declare class Twenty implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getResources(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
getFieldsForResource(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
8
|
+
getFieldsForOrderBy(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
9
|
+
getOptionsForSelectField(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
10
|
+
};
|
|
11
|
+
listSearch: {
|
|
12
|
+
getRecordsForDatabase(this: ILoadOptionsFunctions, filter?: string): Promise<{
|
|
13
|
+
results: Array<{
|
|
14
|
+
name: string;
|
|
15
|
+
value: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
}>;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
22
|
+
}
|