@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,654 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.TWENTY_REST_MAX_PAGE_SIZE = void 0;
|
|
18
|
+
exports.twentyApiRequest = twentyApiRequest;
|
|
19
|
+
exports.twentyRestApiRequest = twentyRestApiRequest;
|
|
20
|
+
exports.getSchemaMetadata = getSchemaMetadata;
|
|
21
|
+
exports.getCachedSchema = getCachedSchema;
|
|
22
|
+
exports.getCleanFieldLabel = getCleanFieldLabel;
|
|
23
|
+
exports.getDataSchemaForObject = getDataSchemaForObject;
|
|
24
|
+
exports.queryGraphQLType = queryGraphQLType;
|
|
25
|
+
exports.queryEnumValues = queryEnumValues;
|
|
26
|
+
exports.buildComprehensiveFieldSelections = buildComprehensiveFieldSelections;
|
|
27
|
+
exports.buildCreateMutation = buildCreateMutation;
|
|
28
|
+
exports.buildGetQuery = buildGetQuery;
|
|
29
|
+
exports.buildUpdateMutation = buildUpdateMutation;
|
|
30
|
+
exports.buildDeleteMutation = buildDeleteMutation;
|
|
31
|
+
exports.buildListQuery = buildListQuery;
|
|
32
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
33
|
+
exports.TWENTY_REST_MAX_PAGE_SIZE = 60;
|
|
34
|
+
const DEPRECATED_OBJECTS = ['messageChannel', 'messageFolder', 'calendarChannel'];
|
|
35
|
+
async function twentyApiRequest(endpoint, query, variables) {
|
|
36
|
+
const credentials = await this.getCredentials('twentyApi');
|
|
37
|
+
const options = {
|
|
38
|
+
method: 'POST',
|
|
39
|
+
baseURL: credentials.domain,
|
|
40
|
+
url: `/${endpoint}`,
|
|
41
|
+
body: {
|
|
42
|
+
query,
|
|
43
|
+
...(variables && { variables }),
|
|
44
|
+
},
|
|
45
|
+
json: true,
|
|
46
|
+
};
|
|
47
|
+
try {
|
|
48
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'twentyApi', options);
|
|
49
|
+
if (response.errors) {
|
|
50
|
+
const errorMessages = response.errors.map((error) => {
|
|
51
|
+
var _a;
|
|
52
|
+
const code = (_a = error.extensions) === null || _a === void 0 ? void 0 : _a.code;
|
|
53
|
+
const message = error.message;
|
|
54
|
+
switch (code) {
|
|
55
|
+
case 'UNAUTHENTICATED':
|
|
56
|
+
return 'Authentication failed. Check your API key in Twenty CRM credentials.';
|
|
57
|
+
case 'NOT_FOUND':
|
|
58
|
+
return `Record not found. ${message}`;
|
|
59
|
+
case 'BAD_USER_INPUT':
|
|
60
|
+
return `Validation error: ${message}`;
|
|
61
|
+
case 'FORBIDDEN':
|
|
62
|
+
return 'Permission denied. Check your Twenty CRM user permissions.';
|
|
63
|
+
default:
|
|
64
|
+
return message;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
throw new Error(errorMessages.join('; '));
|
|
68
|
+
}
|
|
69
|
+
return response.data;
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
if (error.message) {
|
|
73
|
+
if (error.message.includes('Authentication failed') ||
|
|
74
|
+
error.message.includes('Record not found') ||
|
|
75
|
+
error.message.includes('Validation error') ||
|
|
76
|
+
error.message.includes('Permission denied')) {
|
|
77
|
+
throw error;
|
|
78
|
+
}
|
|
79
|
+
if (error.message.includes('ECONNREFUSED') || error.message.includes('ENOTFOUND')) {
|
|
80
|
+
throw new Error('Connection failed. Check your Twenty CRM domain.');
|
|
81
|
+
}
|
|
82
|
+
if (error.message.includes('ETIMEDOUT')) {
|
|
83
|
+
throw new Error('Request timed out. Check your network connection.');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async function twentyRestApiRequest(method, path, body) {
|
|
90
|
+
const credentials = await this.getCredentials('twentyApi');
|
|
91
|
+
let baseUrl = credentials.domain;
|
|
92
|
+
baseUrl = baseUrl.replace(/\/graphql\/?$/, '').replace(/\/metadata\/?$/, '').replace(/\/$/, '');
|
|
93
|
+
const options = {
|
|
94
|
+
method,
|
|
95
|
+
baseURL: baseUrl,
|
|
96
|
+
url: `/rest${path}`,
|
|
97
|
+
json: true,
|
|
98
|
+
...(body && { body }),
|
|
99
|
+
};
|
|
100
|
+
try {
|
|
101
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'twentyApi', options);
|
|
102
|
+
return response;
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
if (error.statusCode) {
|
|
106
|
+
switch (error.statusCode) {
|
|
107
|
+
case 400:
|
|
108
|
+
throw new Error(`Bad Request: ${error.message || 'Invalid request parameters'}`);
|
|
109
|
+
case 401:
|
|
110
|
+
throw new Error('Authentication failed. Check your API key in Twenty CRM credentials.');
|
|
111
|
+
case 403:
|
|
112
|
+
throw new Error('Permission denied. Check your Twenty CRM user permissions.');
|
|
113
|
+
case 404:
|
|
114
|
+
throw new Error(`Record not found. ${error.message || ''}`);
|
|
115
|
+
case 500:
|
|
116
|
+
throw new Error(`Server error: ${error.message || 'Internal server error'}`);
|
|
117
|
+
default:
|
|
118
|
+
throw new Error(`HTTP ${error.statusCode}: ${error.message}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (error.message) {
|
|
122
|
+
if (error.message.includes('ECONNREFUSED') || error.message.includes('ENOTFOUND')) {
|
|
123
|
+
throw new Error('Connection failed. Check your Twenty CRM domain.');
|
|
124
|
+
}
|
|
125
|
+
if (error.message.includes('ETIMEDOUT')) {
|
|
126
|
+
throw new Error('Request timed out. Check your network connection.');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async function getSchemaMetadata() {
|
|
133
|
+
const query = `
|
|
134
|
+
query GetObjects {
|
|
135
|
+
objects(paging: { first: 200 }) {
|
|
136
|
+
edges {
|
|
137
|
+
node {
|
|
138
|
+
id
|
|
139
|
+
nameSingular
|
|
140
|
+
namePlural
|
|
141
|
+
labelSingular
|
|
142
|
+
labelPlural
|
|
143
|
+
isSystem
|
|
144
|
+
isActive
|
|
145
|
+
isRemote
|
|
146
|
+
isUIReadOnly
|
|
147
|
+
isSearchable
|
|
148
|
+
fields(paging: { first: 200 }, filter: {}) {
|
|
149
|
+
edges {
|
|
150
|
+
node {
|
|
151
|
+
id
|
|
152
|
+
name
|
|
153
|
+
label
|
|
154
|
+
type
|
|
155
|
+
isNullable
|
|
156
|
+
isUIReadOnly
|
|
157
|
+
isActive
|
|
158
|
+
isSystem
|
|
159
|
+
options
|
|
160
|
+
settings
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
169
|
+
const response = await twentyApiRequest.call(this, 'metadata', query);
|
|
170
|
+
const objects = response.objects.edges.map((edge) => {
|
|
171
|
+
const node = edge.node;
|
|
172
|
+
return {
|
|
173
|
+
id: node.id,
|
|
174
|
+
nameSingular: node.nameSingular,
|
|
175
|
+
namePlural: node.namePlural,
|
|
176
|
+
labelSingular: node.labelSingular,
|
|
177
|
+
labelPlural: node.labelPlural,
|
|
178
|
+
isCustom: node.isSystem === false,
|
|
179
|
+
isSystem: node.isSystem,
|
|
180
|
+
isActive: node.isActive,
|
|
181
|
+
isRemote: node.isRemote,
|
|
182
|
+
isUIReadOnly: node.isUIReadOnly,
|
|
183
|
+
isSearchable: node.isSearchable,
|
|
184
|
+
fields: node.fields.edges.flatMap((fieldEdge) => {
|
|
185
|
+
var _a;
|
|
186
|
+
const f = fieldEdge.node;
|
|
187
|
+
const base = {
|
|
188
|
+
id: f.id,
|
|
189
|
+
name: f.name,
|
|
190
|
+
label: f.label,
|
|
191
|
+
type: f.type,
|
|
192
|
+
isNullable: f.isNullable,
|
|
193
|
+
isWritable: f.isUIReadOnly !== true,
|
|
194
|
+
isActive: f.isActive,
|
|
195
|
+
isSystem: f.isSystem,
|
|
196
|
+
options: f.options || undefined,
|
|
197
|
+
relationMetadata: null,
|
|
198
|
+
};
|
|
199
|
+
const joinColumnName = (_a = f.settings) === null || _a === void 0 ? void 0 : _a.joinColumnName;
|
|
200
|
+
if ((f.type === 'RELATION' || f.type === 'MORPH_RELATION') && joinColumnName) {
|
|
201
|
+
const fkLabel = joinColumnName
|
|
202
|
+
.replace(/([A-Z])/g, ' $1')
|
|
203
|
+
.replace(/^./, (s) => s.toUpperCase())
|
|
204
|
+
.trim();
|
|
205
|
+
return [{
|
|
206
|
+
id: `${f.id}_fk`,
|
|
207
|
+
name: joinColumnName,
|
|
208
|
+
label: fkLabel,
|
|
209
|
+
type: 'UUID',
|
|
210
|
+
isNullable: true,
|
|
211
|
+
isWritable: true,
|
|
212
|
+
isActive: true,
|
|
213
|
+
isSystem: false,
|
|
214
|
+
options: undefined,
|
|
215
|
+
relationMetadata: null,
|
|
216
|
+
}];
|
|
217
|
+
}
|
|
218
|
+
return [base];
|
|
219
|
+
}),
|
|
220
|
+
};
|
|
221
|
+
});
|
|
222
|
+
return objects.filter((obj) => !DEPRECATED_OBJECTS.includes(obj.nameSingular));
|
|
223
|
+
}
|
|
224
|
+
async function getCachedSchema(forceRefresh = false) {
|
|
225
|
+
const credentials = await this.getCredentials('twentyApi');
|
|
226
|
+
const domain = credentials.domain;
|
|
227
|
+
const cachedSchema = credentials.schemaCache;
|
|
228
|
+
const cacheTimestamp = credentials.cacheTimestamp;
|
|
229
|
+
const now = Date.now();
|
|
230
|
+
const cacheAge = cacheTimestamp ? now - cacheTimestamp : Infinity;
|
|
231
|
+
const cacheValid = cacheAge < 600000;
|
|
232
|
+
const domainChanged = cachedSchema && cachedSchema.domain !== domain;
|
|
233
|
+
if (!forceRefresh && cacheValid && cachedSchema && !domainChanged) {
|
|
234
|
+
return cachedSchema;
|
|
235
|
+
}
|
|
236
|
+
const objects = await getSchemaMetadata.call(this);
|
|
237
|
+
const freshSchema = {
|
|
238
|
+
objects,
|
|
239
|
+
cachedAt: now,
|
|
240
|
+
domain,
|
|
241
|
+
};
|
|
242
|
+
credentials.schemaCache = freshSchema;
|
|
243
|
+
credentials.cacheTimestamp = now;
|
|
244
|
+
return freshSchema;
|
|
245
|
+
}
|
|
246
|
+
function capitalize(str) {
|
|
247
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
248
|
+
}
|
|
249
|
+
function humanize(str) {
|
|
250
|
+
return str
|
|
251
|
+
.replace(/([A-Z])/g, ' $1')
|
|
252
|
+
.replace(/^./, (match) => match.toUpperCase())
|
|
253
|
+
.trim();
|
|
254
|
+
}
|
|
255
|
+
function getCleanFieldLabel(label, fieldName) {
|
|
256
|
+
const humanizedName = humanize(fieldName);
|
|
257
|
+
if (!label) {
|
|
258
|
+
return humanizedName;
|
|
259
|
+
}
|
|
260
|
+
if (label.toLowerCase() === fieldName.toLowerCase()) {
|
|
261
|
+
return humanizedName;
|
|
262
|
+
}
|
|
263
|
+
if (fieldName.endsWith('At') || fieldName.endsWith('Date') || fieldName.endsWith('Time')) {
|
|
264
|
+
return humanizedName;
|
|
265
|
+
}
|
|
266
|
+
if (label.includes(': ')) {
|
|
267
|
+
const titlePart = label.split(': ')[0].trim();
|
|
268
|
+
if (titlePart.length <= 50) {
|
|
269
|
+
return titlePart;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const verbosePatterns = [
|
|
273
|
+
' of the ',
|
|
274
|
+
' linked to ',
|
|
275
|
+
' for the ',
|
|
276
|
+
' from the ',
|
|
277
|
+
'The ',
|
|
278
|
+
' when ',
|
|
279
|
+
' that ',
|
|
280
|
+
];
|
|
281
|
+
const isVerbose = verbosePatterns.some(pattern => label.includes(pattern));
|
|
282
|
+
if (isVerbose) {
|
|
283
|
+
return humanizedName;
|
|
284
|
+
}
|
|
285
|
+
if (label.length <= 30) {
|
|
286
|
+
return label;
|
|
287
|
+
}
|
|
288
|
+
return humanizedName;
|
|
289
|
+
}
|
|
290
|
+
function mapGraphQLTypeToTwentyType(graphQLType) {
|
|
291
|
+
var _a;
|
|
292
|
+
let type = graphQLType;
|
|
293
|
+
if (type.kind === 'NON_NULL') {
|
|
294
|
+
type = type.ofType;
|
|
295
|
+
}
|
|
296
|
+
if (type.kind === 'LIST') {
|
|
297
|
+
const elementType = ((_a = type.ofType) === null || _a === void 0 ? void 0 : _a.name) || 'Unknown';
|
|
298
|
+
return `LIST<${elementType}>`;
|
|
299
|
+
}
|
|
300
|
+
const typeName = type.name;
|
|
301
|
+
const typeMap = {
|
|
302
|
+
'String': 'TEXT',
|
|
303
|
+
'Int': 'NUMBER',
|
|
304
|
+
'Float': 'NUMBER',
|
|
305
|
+
'Boolean': 'BOOLEAN',
|
|
306
|
+
'UUID': 'UUID',
|
|
307
|
+
'ID': 'UUID',
|
|
308
|
+
'DateTime': 'DATE_TIME',
|
|
309
|
+
'Date': 'DATE',
|
|
310
|
+
'Time': 'TIME',
|
|
311
|
+
'JSON': 'RAW_JSON',
|
|
312
|
+
};
|
|
313
|
+
return typeMap[typeName] || typeName;
|
|
314
|
+
}
|
|
315
|
+
function isReadOnlyField(fieldName) {
|
|
316
|
+
const readOnlyFields = [
|
|
317
|
+
'id',
|
|
318
|
+
'createdAt',
|
|
319
|
+
'updatedAt',
|
|
320
|
+
'deletedAt',
|
|
321
|
+
'position',
|
|
322
|
+
'searchVector',
|
|
323
|
+
];
|
|
324
|
+
return readOnlyFields.includes(fieldName);
|
|
325
|
+
}
|
|
326
|
+
async function getDataSchemaForObject(objectNameSingular) {
|
|
327
|
+
var _a;
|
|
328
|
+
const typeName = capitalize(objectNameSingular);
|
|
329
|
+
const query = `
|
|
330
|
+
query IntrospectObject {
|
|
331
|
+
__type(name: "${typeName}") {
|
|
332
|
+
name
|
|
333
|
+
fields {
|
|
334
|
+
name
|
|
335
|
+
description
|
|
336
|
+
type {
|
|
337
|
+
name
|
|
338
|
+
kind
|
|
339
|
+
ofType {
|
|
340
|
+
name
|
|
341
|
+
kind
|
|
342
|
+
ofType {
|
|
343
|
+
name
|
|
344
|
+
kind
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
isDeprecated
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
`;
|
|
353
|
+
const response = await twentyApiRequest.call(this, 'graphql', query);
|
|
354
|
+
if (!((_a = response.__type) === null || _a === void 0 ? void 0 : _a.fields)) {
|
|
355
|
+
return [];
|
|
356
|
+
}
|
|
357
|
+
const fields = response.__type.fields
|
|
358
|
+
.filter((field) => !field.isDeprecated)
|
|
359
|
+
.map((field) => {
|
|
360
|
+
const fieldType = mapGraphQLTypeToTwentyType(field.type);
|
|
361
|
+
const isNullable = field.type.kind !== 'NON_NULL';
|
|
362
|
+
const isWritable = !isReadOnlyField(field.name);
|
|
363
|
+
const KNOWN_COMPLEX_TYPES = new Set([
|
|
364
|
+
'FullName', 'Links', 'Currency', 'Address', 'Emails', 'Phones', 'RichText',
|
|
365
|
+
'Actor', 'WorkspaceMember',
|
|
366
|
+
]);
|
|
367
|
+
let unwrappedKind = field.type.kind;
|
|
368
|
+
let unwrappedType = field.type;
|
|
369
|
+
while (unwrappedKind === 'NON_NULL' || unwrappedKind === 'LIST') {
|
|
370
|
+
unwrappedType = unwrappedType.ofType;
|
|
371
|
+
unwrappedKind = unwrappedType === null || unwrappedType === void 0 ? void 0 : unwrappedType.kind;
|
|
372
|
+
}
|
|
373
|
+
const isGraphQLObject = unwrappedKind === 'OBJECT' || unwrappedKind === 'INTERFACE';
|
|
374
|
+
const isRelation = fieldType.includes('Connection') ||
|
|
375
|
+
(isGraphQLObject && !KNOWN_COMPLEX_TYPES.has(unwrappedType === null || unwrappedType === void 0 ? void 0 : unwrappedType.name));
|
|
376
|
+
return {
|
|
377
|
+
id: field.name,
|
|
378
|
+
name: field.name,
|
|
379
|
+
label: field.description || humanize(field.name),
|
|
380
|
+
type: fieldType,
|
|
381
|
+
isNullable,
|
|
382
|
+
isWritable,
|
|
383
|
+
isActive: true,
|
|
384
|
+
isSystem: isReadOnlyField(field.name),
|
|
385
|
+
relationMetadata: isRelation ? {
|
|
386
|
+
toObjectMetadata: {
|
|
387
|
+
nameSingular: fieldType.replace('Connection', '').toLowerCase(),
|
|
388
|
+
},
|
|
389
|
+
relationType: 'ONE_TO_MANY',
|
|
390
|
+
} : null,
|
|
391
|
+
};
|
|
392
|
+
});
|
|
393
|
+
return fields;
|
|
394
|
+
}
|
|
395
|
+
async function queryGraphQLType(typeName) {
|
|
396
|
+
const query = `
|
|
397
|
+
query GetTypeSchema {
|
|
398
|
+
__type(name: "${typeName}") {
|
|
399
|
+
name
|
|
400
|
+
fields {
|
|
401
|
+
name
|
|
402
|
+
type {
|
|
403
|
+
name
|
|
404
|
+
kind
|
|
405
|
+
ofType {
|
|
406
|
+
name
|
|
407
|
+
kind
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
`;
|
|
414
|
+
const response = await twentyApiRequest.call(this, 'graphql', query);
|
|
415
|
+
return response;
|
|
416
|
+
}
|
|
417
|
+
async function queryEnumValues(enumName) {
|
|
418
|
+
var _a;
|
|
419
|
+
const query = `
|
|
420
|
+
query GetEnumValues {
|
|
421
|
+
__type(name: "${enumName}") {
|
|
422
|
+
name
|
|
423
|
+
enumValues {
|
|
424
|
+
name
|
|
425
|
+
description
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
`;
|
|
430
|
+
const response = await twentyApiRequest.call(this, 'graphql', query);
|
|
431
|
+
if ((_a = response.__type) === null || _a === void 0 ? void 0 : _a.enumValues) {
|
|
432
|
+
return response.__type.enumValues.map((v) => ({
|
|
433
|
+
name: v.name,
|
|
434
|
+
label: v.name.replace(/_/g, ' ').toLowerCase().replace(/\b\w/g, (l) => l.toUpperCase()),
|
|
435
|
+
}));
|
|
436
|
+
}
|
|
437
|
+
return [];
|
|
438
|
+
}
|
|
439
|
+
async function buildComprehensiveFieldSelections(objectTypeName) {
|
|
440
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
441
|
+
const introspectionQuery = `
|
|
442
|
+
query IntrospectType {
|
|
443
|
+
__type(name: "${objectTypeName}") {
|
|
444
|
+
name
|
|
445
|
+
fields {
|
|
446
|
+
name
|
|
447
|
+
type {
|
|
448
|
+
name
|
|
449
|
+
kind
|
|
450
|
+
ofType {
|
|
451
|
+
name
|
|
452
|
+
kind
|
|
453
|
+
ofType {
|
|
454
|
+
name
|
|
455
|
+
kind
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
`;
|
|
463
|
+
const response = await twentyApiRequest.call(this, 'graphql', introspectionQuery);
|
|
464
|
+
if (!((_a = response.__type) === null || _a === void 0 ? void 0 : _a.fields)) {
|
|
465
|
+
return 'id\ncreatedAt\nupdatedAt\ndeletedAt\nname';
|
|
466
|
+
}
|
|
467
|
+
const fields = response.__type.fields;
|
|
468
|
+
const fieldSelections = [];
|
|
469
|
+
const complexTypeSubfields = {
|
|
470
|
+
'Links': `primaryLinkUrl
|
|
471
|
+
primaryLinkLabel
|
|
472
|
+
secondaryLinks`,
|
|
473
|
+
'Address': `addressStreet1
|
|
474
|
+
addressStreet2
|
|
475
|
+
addressCity
|
|
476
|
+
addressState
|
|
477
|
+
addressCountry
|
|
478
|
+
addressPostcode
|
|
479
|
+
addressLat
|
|
480
|
+
addressLng`,
|
|
481
|
+
'Currency': `amountMicros
|
|
482
|
+
currencyCode`,
|
|
483
|
+
'Actor': `source
|
|
484
|
+
workspaceMemberId
|
|
485
|
+
name`,
|
|
486
|
+
'WorkspaceMember': `id
|
|
487
|
+
name {
|
|
488
|
+
firstName
|
|
489
|
+
lastName
|
|
490
|
+
}
|
|
491
|
+
userEmail`,
|
|
492
|
+
};
|
|
493
|
+
for (const field of fields) {
|
|
494
|
+
if (field.name === '__typename')
|
|
495
|
+
continue;
|
|
496
|
+
const fieldType = field.type;
|
|
497
|
+
const typeName = fieldType.name || ((_b = fieldType.ofType) === null || _b === void 0 ? void 0 : _b.name) || ((_d = (_c = fieldType.ofType) === null || _c === void 0 ? void 0 : _c.ofType) === null || _d === void 0 ? void 0 : _d.name);
|
|
498
|
+
const typeKind = fieldType.kind || ((_e = fieldType.ofType) === null || _e === void 0 ? void 0 : _e.kind) || ((_g = (_f = fieldType.ofType) === null || _f === void 0 ? void 0 : _f.ofType) === null || _g === void 0 ? void 0 : _g.kind);
|
|
499
|
+
if (typeName === null || typeName === void 0 ? void 0 : typeName.endsWith('Connection'))
|
|
500
|
+
continue;
|
|
501
|
+
if (typeKind === 'SCALAR' || typeKind === 'ENUM' ||
|
|
502
|
+
['ID', 'String', 'Int', 'Float', 'Boolean', 'DateTime', 'Date', 'Time', 'UUID'].includes(typeName)) {
|
|
503
|
+
fieldSelections.push(field.name);
|
|
504
|
+
}
|
|
505
|
+
else if (typeKind === 'OBJECT' && complexTypeSubfields[typeName]) {
|
|
506
|
+
fieldSelections.push(`${field.name} {\n\t\t\t\t${complexTypeSubfields[typeName]}\n\t\t\t}`);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
return fieldSelections.join('\n\t\t\t\t');
|
|
510
|
+
}
|
|
511
|
+
function buildCreateMutation(objectNameSingular, fieldsData, objectMetadata) {
|
|
512
|
+
const scalarTypes = ['TEXT', 'NUMBER', 'BOOLEAN', 'UUID', 'DATE_TIME', 'DATE', 'TIME', 'PHONE', 'EMAIL', 'SELECT', 'RAW_JSON'];
|
|
513
|
+
const metadataFields = objectMetadata.fields
|
|
514
|
+
.filter((field) => {
|
|
515
|
+
if (scalarTypes.includes(field.type))
|
|
516
|
+
return true;
|
|
517
|
+
if (field.name === 'id' || field.name.endsWith('Id'))
|
|
518
|
+
return true;
|
|
519
|
+
return false;
|
|
520
|
+
})
|
|
521
|
+
.map((field) => field.name);
|
|
522
|
+
let nameField = 'name';
|
|
523
|
+
const complexNameObjects = ['person', 'workspaceMember', 'workspacemember'];
|
|
524
|
+
if (complexNameObjects.includes(objectNameSingular.toLowerCase())) {
|
|
525
|
+
nameField = 'name {\n\t\t\t\t firstName\n\t\t\t\t lastName\n\t\t\t\t}';
|
|
526
|
+
}
|
|
527
|
+
const essentialFields = ['id', 'createdAt', 'updatedAt', 'deletedAt', nameField];
|
|
528
|
+
const allFields = [...new Set([...essentialFields, ...metadataFields])];
|
|
529
|
+
const fieldSelections = allFields.join('\n\t\t\t');
|
|
530
|
+
const capitalizedObjectName = objectNameSingular.charAt(0).toUpperCase() + objectNameSingular.slice(1);
|
|
531
|
+
const query = `
|
|
532
|
+
mutation Create${objectMetadata.labelSingular.replace(/\s+/g, '')}($data: ${capitalizedObjectName}CreateInput!) {
|
|
533
|
+
create${capitalizedObjectName}(data: $data) {
|
|
534
|
+
${fieldSelections}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
`;
|
|
538
|
+
const variables = {
|
|
539
|
+
data: fieldsData,
|
|
540
|
+
};
|
|
541
|
+
return { query, variables };
|
|
542
|
+
}
|
|
543
|
+
function buildGetQuery(objectNameSingular, recordId, objectMetadata) {
|
|
544
|
+
const scalarTypes = ['TEXT', 'NUMBER', 'BOOLEAN', 'UUID', 'DATE_TIME', 'DATE', 'TIME', 'PHONE', 'EMAIL', 'SELECT', 'RAW_JSON'];
|
|
545
|
+
const metadataFields = objectMetadata.fields
|
|
546
|
+
.filter((field) => {
|
|
547
|
+
if (scalarTypes.includes(field.type))
|
|
548
|
+
return true;
|
|
549
|
+
if (field.name === 'id' || field.name.endsWith('Id'))
|
|
550
|
+
return true;
|
|
551
|
+
return false;
|
|
552
|
+
})
|
|
553
|
+
.map((field) => field.name);
|
|
554
|
+
const essentialFields = ['id', 'createdAt', 'updatedAt', 'deletedAt', 'name', 'position', 'searchVector'];
|
|
555
|
+
const allFields = [...new Set([...essentialFields, ...metadataFields])];
|
|
556
|
+
const fieldSelections = allFields.join('\n\t\t\t\t');
|
|
557
|
+
const pluralName = objectMetadata.namePlural;
|
|
558
|
+
const query = `
|
|
559
|
+
query Get${objectMetadata.labelSingular.replace(/\s+/g, '')}($id: UUID!) {
|
|
560
|
+
${pluralName}(filter: { id: { eq: $id } }) {
|
|
561
|
+
edges {
|
|
562
|
+
node {
|
|
563
|
+
${fieldSelections}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
`;
|
|
569
|
+
const variables = {
|
|
570
|
+
id: recordId,
|
|
571
|
+
};
|
|
572
|
+
return { query, variables };
|
|
573
|
+
}
|
|
574
|
+
function buildUpdateMutation(objectNameSingular, recordId, fieldsData, objectMetadata) {
|
|
575
|
+
const scalarTypes = ['TEXT', 'NUMBER', 'BOOLEAN', 'UUID', 'DATE_TIME', 'DATE', 'TIME', 'PHONE', 'EMAIL', 'SELECT', 'RAW_JSON'];
|
|
576
|
+
const metadataFields = objectMetadata.fields
|
|
577
|
+
.filter((field) => {
|
|
578
|
+
if (scalarTypes.includes(field.type))
|
|
579
|
+
return true;
|
|
580
|
+
if (field.name === 'id' || field.name.endsWith('Id'))
|
|
581
|
+
return true;
|
|
582
|
+
return false;
|
|
583
|
+
})
|
|
584
|
+
.map((field) => field.name);
|
|
585
|
+
let nameField = 'name';
|
|
586
|
+
const complexNameObjects = ['person', 'workspaceMember', 'workspacemember'];
|
|
587
|
+
if (complexNameObjects.includes(objectNameSingular.toLowerCase())) {
|
|
588
|
+
nameField = 'name {\n\t\t\t\t firstName\n\t\t\t\t lastName\n\t\t\t\t}';
|
|
589
|
+
}
|
|
590
|
+
const essentialFields = ['id', 'createdAt', 'updatedAt', 'deletedAt', nameField, 'position', 'searchVector'];
|
|
591
|
+
const allFields = [...new Set([...essentialFields, ...metadataFields])];
|
|
592
|
+
const fieldSelections = allFields.join('\n\t\t\t');
|
|
593
|
+
const capitalizedObjectName = objectNameSingular.charAt(0).toUpperCase() + objectNameSingular.slice(1);
|
|
594
|
+
const mutation = `
|
|
595
|
+
mutation Update${objectMetadata.labelSingular.replace(/\s+/g, '')}($id: UUID!, $data: ${capitalizedObjectName}UpdateInput!) {
|
|
596
|
+
update${capitalizedObjectName}(id: $id, data: $data) {
|
|
597
|
+
${fieldSelections}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
`;
|
|
601
|
+
const variables = {
|
|
602
|
+
id: recordId,
|
|
603
|
+
data: fieldsData,
|
|
604
|
+
};
|
|
605
|
+
return { query: mutation, variables };
|
|
606
|
+
}
|
|
607
|
+
function buildDeleteMutation(objectNameSingular, recordId, objectMetadata) {
|
|
608
|
+
const capitalizedObjectName = objectNameSingular.charAt(0).toUpperCase() + objectNameSingular.slice(1);
|
|
609
|
+
const mutation = `
|
|
610
|
+
mutation Delete${objectMetadata.labelSingular.replace(/\s+/g, '')}($id: UUID!) {
|
|
611
|
+
delete${capitalizedObjectName}(id: $id) {
|
|
612
|
+
id
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
`;
|
|
616
|
+
const variables = {
|
|
617
|
+
id: recordId,
|
|
618
|
+
};
|
|
619
|
+
return { query: mutation, variables };
|
|
620
|
+
}
|
|
621
|
+
function buildListQuery(objectNameSingular, limit, objectMetadata) {
|
|
622
|
+
const scalarTypes = ['TEXT', 'NUMBER', 'BOOLEAN', 'UUID', 'DATE_TIME', 'DATE', 'TIME', 'PHONE', 'EMAIL', 'SELECT', 'RAW_JSON'];
|
|
623
|
+
const metadataFields = objectMetadata.fields
|
|
624
|
+
.filter((field) => {
|
|
625
|
+
if (scalarTypes.includes(field.type))
|
|
626
|
+
return true;
|
|
627
|
+
if (field.name === 'id' || field.name.endsWith('Id'))
|
|
628
|
+
return true;
|
|
629
|
+
return false;
|
|
630
|
+
})
|
|
631
|
+
.map((field) => field.name);
|
|
632
|
+
const essentialFields = ['id', 'createdAt', 'updatedAt', 'deletedAt', 'name', 'position', 'searchVector'];
|
|
633
|
+
const allFields = [...new Set([...essentialFields, ...metadataFields])];
|
|
634
|
+
const fieldSelections = allFields.join('\n\t\t\t\t');
|
|
635
|
+
const pluralName = objectMetadata.namePlural;
|
|
636
|
+
const query = `
|
|
637
|
+
query List${objectMetadata.labelPlural.replace(/\s+/g, '')}($limit: Int!) {
|
|
638
|
+
${pluralName}(first: $limit) {
|
|
639
|
+
edges {
|
|
640
|
+
node {
|
|
641
|
+
${fieldSelections}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
`;
|
|
647
|
+
const variables = {
|
|
648
|
+
limit,
|
|
649
|
+
};
|
|
650
|
+
return { query, variables };
|
|
651
|
+
}
|
|
652
|
+
__exportStar(require("./operations"), exports);
|
|
653
|
+
__exportStar(require("./introspection/fieldIntrospection"), exports);
|
|
654
|
+
//# sourceMappingURL=TwentyApi.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwentyApi.client.js","sourceRoot":"","sources":["../../../nodes/Twenty/TwentyApi.client.ts"],"names":[],"mappings":";;;;;;;;;;;;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