@twentyhq/people-data-labs 1.0.7 → 1.0.8
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/manifest.json +13 -13
- package/package.json +4 -4
- package/src/front-components/enrich-companies-component-effect.mjs +10 -10
- package/src/front-components/enrich-companies-component-effect.mjs.map +4 -4
- package/src/front-components/enrich-people-component-effect.mjs +10 -10
- package/src/front-components/enrich-people-component-effect.mjs.map +4 -4
- package/src/logic-functions/enrich-companies.function.mjs.map +2 -2
- package/src/logic-functions/enrich-company.function.mjs.map +2 -2
- package/src/logic-functions/enrich-people.function.mjs.map +2 -2
- package/src/logic-functions/enrich-person.function.mjs.map +2 -2
- package/src/logic-functions/post-install.function.mjs.map +1 -1
- package/src/front-components/enrich-companies-component-effect.tsx +0 -21
- package/src/front-components/enrich-people-component-effect.tsx +0 -21
- package/src/logic-functions/enrich-companies.function.ts +0 -77
- package/src/logic-functions/enrich-company.function.ts +0 -75
- package/src/logic-functions/enrich-people.function.ts +0 -77
- package/src/logic-functions/enrich-person.function.ts +0 -75
- package/src/logic-functions/post-install.function.ts +0 -17
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { defineLogicFunction, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'twenty-sdk/define';
|
|
2
|
-
|
|
3
|
-
import { UPDATE_FIELDS_OPTION_VALUES } from 'src/constants/update-fields-option-values';
|
|
4
|
-
import { PDL_LOGIC_FUNCTION_CONSTANTS } from 'src/constants/universal-identifiers';
|
|
5
|
-
import { enrichCompaniesCore } from 'src/logic-functions/handlers/enrich-companies';
|
|
6
|
-
import { type EnrichInput, toBulkEnrichInput } from 'src/logic-functions/utils/to-bulk-enrich-input';
|
|
7
|
-
|
|
8
|
-
const handler = (input: EnrichInput) => {
|
|
9
|
-
return enrichCompaniesCore({ input: toBulkEnrichInput(input) });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default defineLogicFunction({
|
|
13
|
-
universalIdentifier: PDL_LOGIC_FUNCTION_CONSTANTS.enrichCompanies.universalIdentifier,
|
|
14
|
-
name: 'enrich-companies',
|
|
15
|
-
description: 'Enrich one or more Company records with People Data Labs data',
|
|
16
|
-
timeoutSeconds: 300,
|
|
17
|
-
handler,
|
|
18
|
-
httpRouteTriggerSettings: {
|
|
19
|
-
path: PDL_LOGIC_FUNCTION_CONSTANTS.enrichCompanies.path,
|
|
20
|
-
httpMethod: 'POST',
|
|
21
|
-
isAuthRequired: true
|
|
22
|
-
},
|
|
23
|
-
workflowActionTriggerSettings: {
|
|
24
|
-
label: 'Enrich Companies',
|
|
25
|
-
icon: 'IconSparkles',
|
|
26
|
-
inputSchema: [
|
|
27
|
-
{
|
|
28
|
-
type: 'object',
|
|
29
|
-
properties: {
|
|
30
|
-
records: {
|
|
31
|
-
type: 'records',
|
|
32
|
-
objectUniversalIdentifier:
|
|
33
|
-
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,
|
|
34
|
-
label: 'Records',
|
|
35
|
-
},
|
|
36
|
-
updateFields: {
|
|
37
|
-
type: 'string',
|
|
38
|
-
label: 'Update fields',
|
|
39
|
-
enum: [...UPDATE_FIELDS_OPTION_VALUES],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
outputSchema: [
|
|
45
|
-
{
|
|
46
|
-
type: 'object',
|
|
47
|
-
properties: {
|
|
48
|
-
success: { type: 'boolean', label: 'Success' },
|
|
49
|
-
total: { type: 'number', label: 'Total' },
|
|
50
|
-
matched: { type: 'number', label: 'Matched' },
|
|
51
|
-
notFound: { type: 'number', label: 'Not Found' },
|
|
52
|
-
skipped: { type: 'number', label: 'Skipped' },
|
|
53
|
-
errored: { type: 'number', label: 'Errored' },
|
|
54
|
-
results: {
|
|
55
|
-
type: 'array',
|
|
56
|
-
items: {
|
|
57
|
-
type: 'object',
|
|
58
|
-
properties: {
|
|
59
|
-
success: { type: 'boolean', label: 'Success' },
|
|
60
|
-
recordId: { type: 'string', label: 'Record Id' },
|
|
61
|
-
status: { type: 'string', label: 'Status' },
|
|
62
|
-
updatedFields: {
|
|
63
|
-
type: 'array',
|
|
64
|
-
items: { type: 'string' },
|
|
65
|
-
label: 'Updated Fields',
|
|
66
|
-
},
|
|
67
|
-
data: { type: 'object', label: 'Data' },
|
|
68
|
-
message: { type: 'string', label: 'Message' },
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
label: 'Results',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { defineLogicFunction, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'twenty-sdk/define';
|
|
2
|
-
|
|
3
|
-
import { UPDATE_FIELDS_OPTION_VALUES } from 'src/constants/update-fields-option-values';
|
|
4
|
-
import { PDL_LOGIC_FUNCTION_CONSTANTS } from 'src/constants/universal-identifiers';
|
|
5
|
-
import { enrichCompanyCore } from 'src/logic-functions/handlers/enrich-company';
|
|
6
|
-
import { type SingleEnrichInput } from 'src/types/single-enrich-input';
|
|
7
|
-
|
|
8
|
-
const handler = (input: SingleEnrichInput) => enrichCompanyCore({ input });
|
|
9
|
-
|
|
10
|
-
export default defineLogicFunction({
|
|
11
|
-
universalIdentifier: PDL_LOGIC_FUNCTION_CONSTANTS.enrichCompany.universalIdentifier,
|
|
12
|
-
name: 'enrich-company',
|
|
13
|
-
description:
|
|
14
|
-
'Enrich a single Company record with People Data Labs data (industry, size, funding, location, etc.) given its record id.',
|
|
15
|
-
timeoutSeconds: 60,
|
|
16
|
-
handler,
|
|
17
|
-
workflowActionTriggerSettings: {
|
|
18
|
-
label: 'Enrich Company',
|
|
19
|
-
icon: 'IconSparkles',
|
|
20
|
-
inputSchema: [
|
|
21
|
-
{
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: {
|
|
24
|
-
recordId: {
|
|
25
|
-
type: 'record',
|
|
26
|
-
objectUniversalIdentifier:
|
|
27
|
-
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,
|
|
28
|
-
label: 'Record',
|
|
29
|
-
},
|
|
30
|
-
updateFields: {
|
|
31
|
-
type: 'string',
|
|
32
|
-
label: 'Update fields',
|
|
33
|
-
enum: [...UPDATE_FIELDS_OPTION_VALUES],
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
outputSchema: [
|
|
39
|
-
{
|
|
40
|
-
type: 'object',
|
|
41
|
-
properties: {
|
|
42
|
-
success: { type: 'boolean', label: 'Success' },
|
|
43
|
-
recordId: { type: 'string', label: 'Record Id' },
|
|
44
|
-
status: { type: 'string', label: 'Status' },
|
|
45
|
-
updatedFields: {
|
|
46
|
-
type: 'array',
|
|
47
|
-
items: { type: 'string' },
|
|
48
|
-
label: 'Updated Fields',
|
|
49
|
-
},
|
|
50
|
-
data: { type: 'object', label: 'Data' },
|
|
51
|
-
message: { type: 'string', label: 'Message' },
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
toolTriggerSettings: {
|
|
57
|
-
inputSchema: {
|
|
58
|
-
type: 'object',
|
|
59
|
-
properties: {
|
|
60
|
-
recordId: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
description: 'The id of the Company record to enrich.',
|
|
63
|
-
},
|
|
64
|
-
updateFields: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
enum: [...UPDATE_FIELDS_OPTION_VALUES],
|
|
67
|
-
description:
|
|
68
|
-
'Whether to write the enriched data back to the record. "Yes and overwrite" replaces existing values; "Yes and don\'t overwrite" only fills empty fields; "No" returns the enriched data without modifying the record.',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
required: ['recordId'],
|
|
72
|
-
additionalProperties: false,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { defineLogicFunction, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'twenty-sdk/define';
|
|
2
|
-
|
|
3
|
-
import { UPDATE_FIELDS_OPTION_VALUES } from 'src/constants/update-fields-option-values';
|
|
4
|
-
import { PDL_LOGIC_FUNCTION_CONSTANTS } from 'src/constants/universal-identifiers';
|
|
5
|
-
import { enrichPeopleCore } from 'src/logic-functions/handlers/enrich-people';
|
|
6
|
-
import { type EnrichInput, toBulkEnrichInput } from 'src/logic-functions/utils/to-bulk-enrich-input';
|
|
7
|
-
|
|
8
|
-
const handler = (input: EnrichInput) => {
|
|
9
|
-
return enrichPeopleCore({ input: toBulkEnrichInput(input) });
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default defineLogicFunction({
|
|
13
|
-
universalIdentifier: PDL_LOGIC_FUNCTION_CONSTANTS.enrichPeople.universalIdentifier,
|
|
14
|
-
name: 'enrich-people',
|
|
15
|
-
description: 'Enrich one or more Person records with People Data Labs data',
|
|
16
|
-
timeoutSeconds: 300,
|
|
17
|
-
handler,
|
|
18
|
-
httpRouteTriggerSettings: {
|
|
19
|
-
path: PDL_LOGIC_FUNCTION_CONSTANTS.enrichPeople.path,
|
|
20
|
-
httpMethod: 'POST',
|
|
21
|
-
isAuthRequired: true
|
|
22
|
-
},
|
|
23
|
-
workflowActionTriggerSettings: {
|
|
24
|
-
label: 'Enrich People',
|
|
25
|
-
icon: 'IconSparkles',
|
|
26
|
-
inputSchema: [
|
|
27
|
-
{
|
|
28
|
-
type: 'object',
|
|
29
|
-
properties: {
|
|
30
|
-
records: {
|
|
31
|
-
type: 'records',
|
|
32
|
-
objectUniversalIdentifier:
|
|
33
|
-
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,
|
|
34
|
-
label: 'Records',
|
|
35
|
-
},
|
|
36
|
-
updateFields: {
|
|
37
|
-
type: 'string',
|
|
38
|
-
label: 'Update fields',
|
|
39
|
-
enum: [...UPDATE_FIELDS_OPTION_VALUES],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
outputSchema: [
|
|
45
|
-
{
|
|
46
|
-
type: 'object',
|
|
47
|
-
properties: {
|
|
48
|
-
success: { type: 'boolean', label: 'Success' },
|
|
49
|
-
total: { type: 'number', label: 'Total' },
|
|
50
|
-
matched: { type: 'number', label: 'Matched' },
|
|
51
|
-
notFound: { type: 'number', label: 'Not Found' },
|
|
52
|
-
skipped: { type: 'number', label: 'Skipped' },
|
|
53
|
-
errored: { type: 'number', label: 'Errored' },
|
|
54
|
-
results: {
|
|
55
|
-
type: 'array',
|
|
56
|
-
items: {
|
|
57
|
-
type: 'object',
|
|
58
|
-
properties: {
|
|
59
|
-
success: { type: 'boolean', label: 'Success' },
|
|
60
|
-
recordId: { type: 'string', label: 'Record Id' },
|
|
61
|
-
status: { type: 'string', label: 'Status' },
|
|
62
|
-
updatedFields: {
|
|
63
|
-
type: 'array',
|
|
64
|
-
items: { type: 'string' },
|
|
65
|
-
label: 'Updated Fields',
|
|
66
|
-
},
|
|
67
|
-
data: { type: 'object', label: 'Data' },
|
|
68
|
-
message: { type: 'string', label: 'Message' },
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
label: 'Results',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { defineLogicFunction, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'twenty-sdk/define';
|
|
2
|
-
|
|
3
|
-
import { UPDATE_FIELDS_OPTION_VALUES } from 'src/constants/update-fields-option-values';
|
|
4
|
-
import { PDL_LOGIC_FUNCTION_CONSTANTS } from 'src/constants/universal-identifiers';
|
|
5
|
-
import { enrichPersonCore } from 'src/logic-functions/handlers/enrich-person';
|
|
6
|
-
import { type SingleEnrichInput } from 'src/types/single-enrich-input';
|
|
7
|
-
|
|
8
|
-
const handler = (input: SingleEnrichInput) => enrichPersonCore({ input });
|
|
9
|
-
|
|
10
|
-
export default defineLogicFunction({
|
|
11
|
-
universalIdentifier: PDL_LOGIC_FUNCTION_CONSTANTS.enrichPerson.universalIdentifier,
|
|
12
|
-
name: 'enrich-person',
|
|
13
|
-
description:
|
|
14
|
-
'Enrich a single Person record with People Data Labs data (job, location, social profiles, etc.) given its record id.',
|
|
15
|
-
timeoutSeconds: 60,
|
|
16
|
-
handler,
|
|
17
|
-
workflowActionTriggerSettings: {
|
|
18
|
-
label: 'Enrich Person',
|
|
19
|
-
icon: 'IconSparkles',
|
|
20
|
-
inputSchema: [
|
|
21
|
-
{
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: {
|
|
24
|
-
recordId: {
|
|
25
|
-
type: 'record',
|
|
26
|
-
objectUniversalIdentifier:
|
|
27
|
-
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,
|
|
28
|
-
label: 'Record',
|
|
29
|
-
},
|
|
30
|
-
updateFields: {
|
|
31
|
-
type: 'string',
|
|
32
|
-
label: 'Update fields',
|
|
33
|
-
enum: [...UPDATE_FIELDS_OPTION_VALUES],
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
outputSchema: [
|
|
39
|
-
{
|
|
40
|
-
type: 'object',
|
|
41
|
-
properties: {
|
|
42
|
-
success: { type: 'boolean', label: 'Success' },
|
|
43
|
-
recordId: { type: 'string', label: 'Record Id' },
|
|
44
|
-
status: { type: 'string', label: 'Status' },
|
|
45
|
-
updatedFields: {
|
|
46
|
-
type: 'array',
|
|
47
|
-
items: { type: 'string' },
|
|
48
|
-
label: 'Updated Fields',
|
|
49
|
-
},
|
|
50
|
-
data: { type: 'object', label: 'Data' },
|
|
51
|
-
message: { type: 'string', label: 'Message' },
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
toolTriggerSettings: {
|
|
57
|
-
inputSchema: {
|
|
58
|
-
type: 'object',
|
|
59
|
-
properties: {
|
|
60
|
-
recordId: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
description: 'The id of the Person record to enrich.',
|
|
63
|
-
},
|
|
64
|
-
updateFields: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
enum: [...UPDATE_FIELDS_OPTION_VALUES],
|
|
67
|
-
description:
|
|
68
|
-
'Whether to write the enriched data back to the record. "Yes and overwrite" replaces existing values; "Yes and don\'t overwrite" only fills empty fields; "No" returns the enriched data without modifying the record.',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
required: ['recordId'],
|
|
72
|
-
additionalProperties: false,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { definePostInstallLogicFunction } from 'twenty-sdk/define';
|
|
2
|
-
|
|
3
|
-
import { PDL_LOGIC_FUNCTION_CONSTANTS } from 'src/constants/universal-identifiers';
|
|
4
|
-
|
|
5
|
-
const handler = async () => {
|
|
6
|
-
return { seededWorkflows: [] };
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default definePostInstallLogicFunction({
|
|
10
|
-
universalIdentifier: PDL_LOGIC_FUNCTION_CONSTANTS.postInstall.universalIdentifier,
|
|
11
|
-
name: 'post-install',
|
|
12
|
-
description:
|
|
13
|
-
'Post-install hook for the People Data Labs app (workflow seeding is not currently wired up).',
|
|
14
|
-
timeoutSeconds: 30,
|
|
15
|
-
handler,
|
|
16
|
-
shouldRunSynchronously: true,
|
|
17
|
-
});
|