@friggframework/core 2.0.0--canary.700.80ec1cc.0 → 2.0.0--canary.702.047d3c4.0
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/database/documentdb-utils.js +1 -6
- package/errors/index.js +0 -4
- package/generated/prisma-mongodb/edge.js +4 -52
- package/generated/prisma-mongodb/index-browser.js +1 -49
- package/generated/prisma-mongodb/index.d.ts +60 -3506
- package/generated/prisma-mongodb/index.js +4 -52
- package/generated/prisma-mongodb/package.json +1 -1
- package/generated/prisma-mongodb/schema.prisma +0 -65
- package/generated/prisma-mongodb/wasm.js +4 -52
- package/generated/prisma-postgresql/edge.js +4 -52
- package/generated/prisma-postgresql/index-browser.js +1 -49
- package/generated/prisma-postgresql/index.d.ts +94 -3824
- package/generated/prisma-postgresql/index.js +4 -52
- package/generated/prisma-postgresql/package.json +1 -1
- package/generated/prisma-postgresql/schema.prisma +0 -63
- package/generated/prisma-postgresql/wasm.js +4 -52
- package/handlers/WEBHOOKS.md +0 -29
- package/handlers/app-definition-loader.js +9 -2
- package/handlers/app-handler-helpers.js +2 -5
- package/handlers/integration-event-dispatcher.js +3 -7
- package/handlers/routers/integration-webhook-routers.js +38 -26
- package/index.js +0 -2
- package/integrations/integration-base.js +1 -162
- package/integrations/integration-router.js +1 -6
- package/integrations/repositories/integration-mapping-repository-documentdb.js +0 -50
- package/integrations/repositories/integration-mapping-repository-interface.js +0 -15
- package/integrations/repositories/integration-mapping-repository-mongo.js +0 -29
- package/integrations/repositories/integration-mapping-repository-postgres.js +0 -30
- package/integrations/repositories/integration-mapping-repository.js +0 -29
- package/integrations/repositories/integration-repository-documentdb.js +2 -6
- package/integrations/repositories/integration-repository-interface.js +0 -3
- package/integrations/repositories/integration-repository-mongo.js +5 -20
- package/integrations/repositories/integration-repository-postgres.js +1 -5
- package/integrations/repositories/process-repository-mongo.js +1 -1
- package/integrations/use-cases/create-integration.js +4 -14
- package/integrations/use-cases/delete-integration-for-user.js +4 -4
- package/integrations/use-cases/get-integration-for-user.js +2 -4
- package/integrations/use-cases/get-integration-instance.js +4 -4
- package/integrations/use-cases/get-integrations-for-user.js +4 -4
- package/integrations/use-cases/get-possible-integrations.js +2 -7
- package/integrations/use-cases/update-integration.js +4 -4
- package/package.json +6 -6
- package/prisma-mongodb/schema.prisma +0 -65
- package/prisma-postgresql/schema.prisma +0 -63
- package/queues/queuer-util.js +2 -9
- package/errors/mapping-already-exists-error.js +0 -14
- package/handlers/workers/integration-triggers.js +0 -25
- package/infrastructure/scheduler/recurrence.js +0 -204
- package/integrations/definitions/README.md +0 -278
- package/integrations/definitions/canonical.js +0 -11
- package/integrations/definitions/capabilities/AUDIT.md +0 -480
- package/integrations/definitions/capabilities/acmeerp.capabilities.json +0 -633
- package/integrations/definitions/capabilities/asana.capabilities.json +0 -279
- package/integrations/definitions/capabilities/calendly.capabilities.json +0 -385
- package/integrations/definitions/capabilities/docusign.capabilities.json +0 -314
- package/integrations/definitions/capabilities/fathom.capabilities.json +0 -238
- package/integrations/definitions/capabilities/github.capabilities.json +0 -585
- package/integrations/definitions/capabilities/hubspot.capabilities.json +0 -822
- package/integrations/definitions/capabilities/jira.capabilities.json +0 -391
- package/integrations/definitions/capabilities/klaviyo.capabilities.json +0 -503
- package/integrations/definitions/capabilities/linear.capabilities.json +0 -378
- package/integrations/definitions/capabilities/netsuite.capabilities.json +0 -535
- package/integrations/definitions/capabilities/notion.capabilities.json +0 -208
- package/integrations/definitions/capabilities/phone.capabilities.json +0 -511
- package/integrations/definitions/capabilities/pipedrive.capabilities.json +0 -430
- package/integrations/definitions/capabilities/quickbooks.capabilities.json +0 -635
- package/integrations/definitions/capabilities/salesforce.capabilities.json +0 -568
- package/integrations/definitions/capabilities/shopify.capabilities.json +0 -1128
- package/integrations/definitions/capabilities/slack.capabilities.json +0 -373
- package/integrations/definitions/capabilities/stripe.capabilities.json +0 -630
- package/integrations/definitions/capabilities/webflow.capabilities.json +0 -196
- package/integrations/definitions/capabilities/zendesk.capabilities.json +0 -422
- package/integrations/definitions/compile.js +0 -80
- package/integrations/definitions/config-form.js +0 -137
- package/integrations/definitions/examples/acme-erp-quickbooks.definition.json +0 -467
- package/integrations/definitions/examples/asana-slack.definition.json +0 -219
- package/integrations/definitions/examples/calendly-salesforce.definition.json +0 -459
- package/integrations/definitions/examples/docusign-salesforce.definition.json +0 -305
- package/integrations/definitions/examples/fathom-hubspot-notion.definition.json +0 -575
- package/integrations/definitions/examples/github-linear.definition.json +0 -322
- package/integrations/definitions/examples/hubspot-slack.definition.json +0 -427
- package/integrations/definitions/examples/klaviyo-hubspot.definition.json +0 -336
- package/integrations/definitions/examples/phone-hubspot.definition.json +0 -633
- package/integrations/definitions/examples/pipedrive-hubspot.definition.json +0 -136
- package/integrations/definitions/examples/pipedrive-phone.definition.json +0 -340
- package/integrations/definitions/examples/records/phone-hubspot.definition-version.json +0 -652
- package/integrations/definitions/examples/records/phone-hubspot.integration.json +0 -86
- package/integrations/definitions/examples/records/phone-hubspot.mappings.json +0 -39
- package/integrations/definitions/examples/records/phone-hubspot.workflow-run.json +0 -62
- package/integrations/definitions/examples/shopify-klaviyo.definition.json +0 -488
- package/integrations/definitions/examples/shopify-netsuite.definition.json +0 -622
- package/integrations/definitions/examples/stripe-quickbooks.definition.json +0 -476
- package/integrations/definitions/examples/webflow-hubspot-slack.definition.json +0 -262
- package/integrations/definitions/examples/zendesk-jira.definition.json +0 -604
- package/integrations/definitions/expressions.js +0 -229
- package/integrations/definitions/index.js +0 -45
- package/integrations/definitions/integration-runtime.js +0 -763
- package/integrations/definitions/interpreter.js +0 -104
- package/integrations/definitions/manifests.js +0 -177
- package/integrations/definitions/renderers/common.js +0 -67
- package/integrations/definitions/renderers/html.js +0 -129
- package/integrations/definitions/renderers/hubspot.js +0 -59
- package/integrations/definitions/renderers/preview.js +0 -154
- package/integrations/definitions/renderers/slack.js +0 -146
- package/integrations/definitions/repositories/definition-version-repository.js +0 -67
- package/integrations/definitions/repositories/workflow-run-repository.js +0 -80
- package/integrations/definitions/router.js +0 -170
- package/integrations/definitions/runtime.js +0 -268
- package/integrations/definitions/schema/capability-manifest.v0.1.schema.json +0 -549
- package/integrations/definitions/schema/installation.v0.1.schema.json +0 -130
- package/integrations/definitions/schema/integration-definition.v0.1.schema.json +0 -909
- package/integrations/definitions/schema/records.md +0 -105
- package/integrations/definitions/schema-check.js +0 -58
- package/integrations/definitions/scripts/check-manifests.js +0 -220
- package/integrations/definitions/scripts/validate.js +0 -66
- package/integrations/definitions/steps.js +0 -123
- package/integrations/definitions/sync-engine.js +0 -297
- package/integrations/definitions/tests/helpers-fake-crm.js +0 -49
- package/integrations/definitions/transforms.js +0 -91
- package/integrations/definitions/use-cases/definition-use-cases.js +0 -245
- package/integrations/definitions/validate.js +0 -436
- package/integrations/definitions/versioning.js +0 -176
- package/integrations/definitions/webhooks.js +0 -119
- package/integrations/integration-types.js +0 -64
- package/integrations/triggers.js +0 -244
- package/integrations/use-cases/run-trigger-tick.js +0 -155
- package/integrations/use-cases/run-trigger.js +0 -77
- package/prisma-postgresql/migrations/20261018000000_add_data_defined_integrations/migration.sql +0 -66
- package/prisma-postgresql/migrations/20261019000000_workflow_run_waits/migration.sql +0 -7
- package/prisma-postgresql/migrations/20261019120000_definition_workspace/migration.sql +0 -5
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://friggframework.org/schemas/integration-definition/v0.1.json",
|
|
3
|
-
"schemaVersion": "0.1",
|
|
4
|
-
"id": "pipedrive-hubspot",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"display": {
|
|
7
|
-
"label": "Pipedrive \u21c4 HubSpot people",
|
|
8
|
-
"description": "Keeps Pipedrive people and HubSpot contacts the same person on both sides, matched by email, then by phone.",
|
|
9
|
-
"category": "CRM",
|
|
10
|
-
"tags": [
|
|
11
|
-
"crm",
|
|
12
|
-
"contacts",
|
|
13
|
-
"sync"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"modules": {
|
|
17
|
-
"pipedrive": {
|
|
18
|
-
"module": "pipedrive",
|
|
19
|
-
"version": "^2.1"
|
|
20
|
-
},
|
|
21
|
-
"hubspot": {
|
|
22
|
-
"module": "hubspot",
|
|
23
|
-
"version": "^3"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"settings": {},
|
|
27
|
-
"syncs": [
|
|
28
|
-
{
|
|
29
|
-
"id": "people",
|
|
30
|
-
"label": "People and contacts",
|
|
31
|
-
"description": "A new or changed person on either side is created or updated on the other. A blank value never overwrites a filled one.",
|
|
32
|
-
"source": "pipedrive.person",
|
|
33
|
-
"target": "hubspot.contact",
|
|
34
|
-
"direction": "two_way",
|
|
35
|
-
"identity": {
|
|
36
|
-
"match": [
|
|
37
|
-
{
|
|
38
|
-
"source": "emails[0].value",
|
|
39
|
-
"target": "properties.email",
|
|
40
|
-
"transform": "lowercase",
|
|
41
|
-
"key": "email"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"source": "phones[0].value",
|
|
45
|
-
"target": "properties.phone",
|
|
46
|
-
"transform": "to_e164_phone",
|
|
47
|
-
"key": "phone"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"onAmbiguous": "skip"
|
|
51
|
-
},
|
|
52
|
-
"mapping": [
|
|
53
|
-
{
|
|
54
|
-
"source": "first_name",
|
|
55
|
-
"target": "properties.firstname",
|
|
56
|
-
"transform": "trim"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"source": "last_name",
|
|
60
|
-
"target": "properties.lastname",
|
|
61
|
-
"transform": "trim"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"source": "emails[0].value",
|
|
65
|
-
"target": "properties.email",
|
|
66
|
-
"transform": "lowercase"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"source": "phones[0].value",
|
|
70
|
-
"target": "properties.phone",
|
|
71
|
-
"transform": "to_e164_phone"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"target": "properties.hs_lead_status",
|
|
75
|
-
"value": "NEW",
|
|
76
|
-
"direction": "to_target"
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
"backfill": {
|
|
80
|
-
"trigger": "userAction",
|
|
81
|
-
"pageSize": 100
|
|
82
|
-
},
|
|
83
|
-
"ongoing": {
|
|
84
|
-
"mode": "webhook"
|
|
85
|
-
},
|
|
86
|
-
"default": "on"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"workflows": [],
|
|
90
|
-
"lifecycle": {
|
|
91
|
-
"onInstall": [
|
|
92
|
-
{
|
|
93
|
-
"id": "personCreated",
|
|
94
|
-
"use": "pipedrive.webhook.create",
|
|
95
|
-
"with": {
|
|
96
|
-
"subscription_url": "$.install.webhookUrls.pipedrive",
|
|
97
|
-
"event_action": "create",
|
|
98
|
-
"event_object": "person",
|
|
99
|
-
"version": "2.0"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"id": "personChanged",
|
|
104
|
-
"use": "pipedrive.webhook.create",
|
|
105
|
-
"with": {
|
|
106
|
-
"subscription_url": "$.install.webhookUrls.pipedrive",
|
|
107
|
-
"event_action": "change",
|
|
108
|
-
"event_object": "person",
|
|
109
|
-
"version": "2.0"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"onUninstall": [
|
|
114
|
-
{
|
|
115
|
-
"use": "foreach",
|
|
116
|
-
"with": {
|
|
117
|
-
"over": [
|
|
118
|
-
"$.install.runtime.installed.personCreated.id",
|
|
119
|
-
"$.install.runtime.installed.personChanged.id"
|
|
120
|
-
],
|
|
121
|
-
"max": 2,
|
|
122
|
-
"where": "$.item exists"
|
|
123
|
-
},
|
|
124
|
-
"do": [
|
|
125
|
-
{
|
|
126
|
-
"use": "pipedrive.webhook.delete",
|
|
127
|
-
"with": {
|
|
128
|
-
"id": "$.item"
|
|
129
|
-
},
|
|
130
|
-
"onError": "continue"
|
|
131
|
-
}
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
}
|
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://friggframework.org/schemas/integration-definition/v0.1.json",
|
|
3
|
-
"schemaVersion": "0.1",
|
|
4
|
-
"id": "pipedrive-phone",
|
|
5
|
-
"version": "0.3.1",
|
|
6
|
-
"display": {
|
|
7
|
-
"label": "Phone \u2194 Pipedrive",
|
|
8
|
-
"description": "Two-way person sync, Phone calls logged as Pipedrive call activities, missed calls as call-back activities, and recent Phone activity on the person panel.",
|
|
9
|
-
"category": "CRM",
|
|
10
|
-
"tags": [
|
|
11
|
-
"calls",
|
|
12
|
-
"sms",
|
|
13
|
-
"crm"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"modules": {
|
|
17
|
-
"phone": {
|
|
18
|
-
"module": "phone",
|
|
19
|
-
"version": "^2.1"
|
|
20
|
-
},
|
|
21
|
-
"pipedrive": {
|
|
22
|
-
"module": "pipedrive",
|
|
23
|
-
"version": "^2.1"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"syncs": [
|
|
27
|
-
{
|
|
28
|
-
"id": "people",
|
|
29
|
-
"label": "People and contacts",
|
|
30
|
-
"source": "pipedrive.person",
|
|
31
|
-
"target": "phone.contact",
|
|
32
|
-
"direction": "two_way",
|
|
33
|
-
"identity": {
|
|
34
|
-
"match": [
|
|
35
|
-
{
|
|
36
|
-
"source": "phones[0].value",
|
|
37
|
-
"target": "defaultFields.phoneNumbers[0].value",
|
|
38
|
-
"transform": "to_e164_phone",
|
|
39
|
-
"key": "phone"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"source": "emails[0].value",
|
|
43
|
-
"target": "defaultFields.emails[0].value",
|
|
44
|
-
"transform": "lowercase",
|
|
45
|
-
"key": "email"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"onAmbiguous": "skip"
|
|
49
|
-
},
|
|
50
|
-
"mapping": [
|
|
51
|
-
{
|
|
52
|
-
"source": "first_name",
|
|
53
|
-
"target": "defaultFields.firstName"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"source": "last_name",
|
|
57
|
-
"target": "defaultFields.lastName"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"source": "emails[0].value",
|
|
61
|
-
"target": "defaultFields.emails[0].value",
|
|
62
|
-
"transform": "lowercase"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"source": "phones[0].value",
|
|
66
|
-
"target": "defaultFields.phoneNumbers[0].value",
|
|
67
|
-
"transform": "to_e164_phone"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"source": "id",
|
|
71
|
-
"target": "externalId",
|
|
72
|
-
"direction": "to_target"
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"backfill": {
|
|
76
|
-
"trigger": "userAction",
|
|
77
|
-
"pageSize": 100
|
|
78
|
-
},
|
|
79
|
-
"ongoing": {
|
|
80
|
-
"mode": "webhook"
|
|
81
|
-
},
|
|
82
|
-
"default": "on"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
"workflows": [
|
|
86
|
-
{
|
|
87
|
-
"id": "log-call",
|
|
88
|
-
"label": "Log Phone calls as call activities",
|
|
89
|
-
"purpose": "write",
|
|
90
|
-
"default": "on",
|
|
91
|
-
"trigger": {
|
|
92
|
-
"type": "webhook",
|
|
93
|
-
"module": "phone",
|
|
94
|
-
"topic": "call.completed"
|
|
95
|
-
},
|
|
96
|
-
"steps": [
|
|
97
|
-
{
|
|
98
|
-
"id": "person",
|
|
99
|
-
"use": "links.find",
|
|
100
|
-
"with": {
|
|
101
|
-
"sync": "people",
|
|
102
|
-
"key": {
|
|
103
|
-
"phone": "$.record.participants[0]"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"use": "stop",
|
|
109
|
-
"when": "$.steps.person == null",
|
|
110
|
-
"with": {
|
|
111
|
-
"reason": "Caller is not a linked Pipedrive person"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"use": "pipedrive.activity.create",
|
|
116
|
-
"with": {
|
|
117
|
-
"activity": {
|
|
118
|
-
"subject": "Phone call ({{record.direction}})",
|
|
119
|
-
"type": "call",
|
|
120
|
-
"done": true,
|
|
121
|
-
"due_date": "{{record.completedAt | date}}",
|
|
122
|
-
"person_id": "$.steps.person.pipedrive",
|
|
123
|
-
"note": "{{record.direction | upper}} call with {{record.participants[0]}}, {{record.duration}}s ({{record.status}})."
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"id": "missed-call-activity",
|
|
131
|
-
"label": "Call-back activity for missed calls",
|
|
132
|
-
"purpose": "write",
|
|
133
|
-
"default": "off",
|
|
134
|
-
"settings": {
|
|
135
|
-
"owner": {
|
|
136
|
-
"type": "option",
|
|
137
|
-
"options": "pipedrive.user",
|
|
138
|
-
"label": "Assign to",
|
|
139
|
-
"help": "Leave empty to use the person's owner."
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
"trigger": {
|
|
143
|
-
"type": "webhook",
|
|
144
|
-
"module": "phone",
|
|
145
|
-
"topic": "call.missed",
|
|
146
|
-
"filter": "$.record.direction == 'incoming'"
|
|
147
|
-
},
|
|
148
|
-
"steps": [
|
|
149
|
-
{
|
|
150
|
-
"id": "person",
|
|
151
|
-
"use": "links.find",
|
|
152
|
-
"with": {
|
|
153
|
-
"sync": "people",
|
|
154
|
-
"key": {
|
|
155
|
-
"phone": "$.record.from"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"use": "stop",
|
|
161
|
-
"when": "$.steps.person == null",
|
|
162
|
-
"with": {
|
|
163
|
-
"reason": "Caller is not a known person"
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"id": "full",
|
|
168
|
-
"use": "pipedrive.person.get",
|
|
169
|
-
"with": {
|
|
170
|
-
"id": "$.steps.person.pipedrive"
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"use": "pipedrive.activity.create",
|
|
175
|
-
"with": {
|
|
176
|
-
"activity": {
|
|
177
|
-
"subject": "Call back {{steps.full.first_name | default: 'caller'}} (missed Phone call)",
|
|
178
|
-
"type": "call",
|
|
179
|
-
"done": false,
|
|
180
|
-
"due_date": "{{record.createdAt | date}}",
|
|
181
|
-
"person_id": "$.steps.person.pipedrive",
|
|
182
|
-
"owner_id": "{{settings.owner | default: steps.full.owner_id}}",
|
|
183
|
-
"note": "Missed call from {{record.from}} at {{record.createdAt}}."
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
"queries": [
|
|
191
|
-
{
|
|
192
|
-
"id": "phone-activity",
|
|
193
|
-
"description": "Last five Phone calls and texts with this person's phone number.",
|
|
194
|
-
"steps": [
|
|
195
|
-
{
|
|
196
|
-
"use": "stop",
|
|
197
|
-
"when": "!($.record.phones[0].value exists)",
|
|
198
|
-
"with": {
|
|
199
|
-
"reason": "Person has no phone number"
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"id": "calls",
|
|
204
|
-
"use": "phone.call.list",
|
|
205
|
-
"with": {
|
|
206
|
-
"participant": "$.record.phones[0].value",
|
|
207
|
-
"maxResults": 5
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
"id": "texts",
|
|
212
|
-
"use": "phone.message.list",
|
|
213
|
-
"with": {
|
|
214
|
-
"participants": [
|
|
215
|
-
"$.record.phones[0].value"
|
|
216
|
-
],
|
|
217
|
-
"maxResults": 5
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
"returns": {
|
|
222
|
-
"calls": "$.steps.calls",
|
|
223
|
-
"texts": "$.steps.texts"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
"ui": [
|
|
228
|
-
{
|
|
229
|
-
"id": "phone-panel",
|
|
230
|
-
"label": "Phone",
|
|
231
|
-
"host": "pipedrive",
|
|
232
|
-
"placement": "person.details.panel",
|
|
233
|
-
"objects": [
|
|
234
|
-
"person"
|
|
235
|
-
],
|
|
236
|
-
"data": {
|
|
237
|
-
"query": "phone-activity"
|
|
238
|
-
},
|
|
239
|
-
"view": {
|
|
240
|
-
"component": "Stack",
|
|
241
|
-
"children": [
|
|
242
|
-
{
|
|
243
|
-
"component": "Heading",
|
|
244
|
-
"props": {
|
|
245
|
-
"text": "Phone activity"
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
"component": "List",
|
|
250
|
-
"props": {
|
|
251
|
-
"items": "$.data.calls",
|
|
252
|
-
"title": "{{item.direction}} call \u00b7 {{item.duration | default: 0}}s",
|
|
253
|
-
"meta": "{{item.createdAt | date}}"
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"component": "List",
|
|
258
|
-
"props": {
|
|
259
|
-
"items": "$.data.texts",
|
|
260
|
-
"title": "{{item.text | truncate: 60}}",
|
|
261
|
-
"meta": "{{item.createdAt | date}}"
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
"component": "Empty",
|
|
266
|
-
"when": "$.data.calls[0] == null && $.data.texts[0] == null",
|
|
267
|
-
"props": {
|
|
268
|
-
"text": "No Phone calls or texts with this person yet."
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
]
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
],
|
|
275
|
-
"lifecycle": {
|
|
276
|
-
"onInstall": [
|
|
277
|
-
{
|
|
278
|
-
"id": "phoneHook",
|
|
279
|
-
"use": "phone.webhook.create",
|
|
280
|
-
"with": {
|
|
281
|
-
"url": "$.install.webhookUrls.phone",
|
|
282
|
-
"events": [
|
|
283
|
-
"call.completed",
|
|
284
|
-
"call.ringing",
|
|
285
|
-
"contact.updated"
|
|
286
|
-
]
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"id": "personCreated",
|
|
291
|
-
"use": "pipedrive.webhook.create",
|
|
292
|
-
"with": {
|
|
293
|
-
"subscription_url": "$.install.webhookUrls.pipedrive",
|
|
294
|
-
"event_action": "create",
|
|
295
|
-
"event_object": "person",
|
|
296
|
-
"version": "2.0"
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"id": "personChanged",
|
|
301
|
-
"use": "pipedrive.webhook.create",
|
|
302
|
-
"with": {
|
|
303
|
-
"subscription_url": "$.install.webhookUrls.pipedrive",
|
|
304
|
-
"event_action": "change",
|
|
305
|
-
"event_object": "person",
|
|
306
|
-
"version": "2.0"
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
],
|
|
310
|
-
"onUninstall": [
|
|
311
|
-
{
|
|
312
|
-
"use": "phone.webhook.delete",
|
|
313
|
-
"with": {
|
|
314
|
-
"id": "$.install.runtime.installed.phoneHook.id"
|
|
315
|
-
},
|
|
316
|
-
"onError": "continue"
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"id": "unhook",
|
|
320
|
-
"use": "foreach",
|
|
321
|
-
"with": {
|
|
322
|
-
"over": [
|
|
323
|
-
"$.install.runtime.installed.personCreated.id",
|
|
324
|
-
"$.install.runtime.installed.personChanged.id"
|
|
325
|
-
],
|
|
326
|
-
"max": 5
|
|
327
|
-
},
|
|
328
|
-
"do": [
|
|
329
|
-
{
|
|
330
|
-
"use": "pipedrive.webhook.delete",
|
|
331
|
-
"with": {
|
|
332
|
-
"id": "$.item"
|
|
333
|
-
},
|
|
334
|
-
"onError": "continue"
|
|
335
|
-
}
|
|
336
|
-
]
|
|
337
|
-
}
|
|
338
|
-
]
|
|
339
|
-
}
|
|
340
|
-
}
|