@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,336 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://friggframework.org/schemas/integration-definition/v0.1.json",
|
|
3
|
-
"schemaVersion": "0.1",
|
|
4
|
-
"id": "klaviyo-hubspot",
|
|
5
|
-
"version": "0.3.1",
|
|
6
|
-
"display": {
|
|
7
|
-
"label": "Klaviyo \u2194 HubSpot",
|
|
8
|
-
"description": "Keep Klaviyo profiles and HubSpot contacts in step, move contacts to a lifecycle stage when they join a Klaviyo list, and honour unsubscribes in both directions.",
|
|
9
|
-
"category": "Marketing",
|
|
10
|
-
"tags": [
|
|
11
|
-
"email",
|
|
12
|
-
"marketing",
|
|
13
|
-
"crm",
|
|
14
|
-
"consent"
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
|
-
"modules": {
|
|
18
|
-
"klaviyo": {
|
|
19
|
-
"module": "klaviyo",
|
|
20
|
-
"version": "^1.1"
|
|
21
|
-
},
|
|
22
|
-
"hubspot": {
|
|
23
|
-
"module": "hubspot",
|
|
24
|
-
"version": "^1.4"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"settings": {
|
|
28
|
-
"subscriptionType": {
|
|
29
|
-
"type": "option",
|
|
30
|
-
"options": "hubspot.subscriptionType",
|
|
31
|
-
"label": "HubSpot subscription type that mirrors Klaviyo email marketing",
|
|
32
|
-
"required": true
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"syncs": [
|
|
36
|
-
{
|
|
37
|
-
"id": "profiles",
|
|
38
|
-
"label": "Profiles and contacts",
|
|
39
|
-
"description": "One person on both sides, matched by email. HubSpot owns the lifecycle stage; names and phone follow whichever side changed last.",
|
|
40
|
-
"source": "klaviyo.profile",
|
|
41
|
-
"target": "hubspot.contact",
|
|
42
|
-
"direction": "two_way",
|
|
43
|
-
"identity": {
|
|
44
|
-
"match": [
|
|
45
|
-
{
|
|
46
|
-
"source": "attributes.email",
|
|
47
|
-
"target": "properties.email",
|
|
48
|
-
"transform": "lowercase",
|
|
49
|
-
"key": "email"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"onAmbiguous": "skip"
|
|
53
|
-
},
|
|
54
|
-
"mapping": [
|
|
55
|
-
{
|
|
56
|
-
"source": "attributes.email",
|
|
57
|
-
"target": "properties.email",
|
|
58
|
-
"transform": "lowercase"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"source": "attributes.first_name",
|
|
62
|
-
"target": "properties.firstname",
|
|
63
|
-
"master": "newest"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"source": "attributes.last_name",
|
|
67
|
-
"target": "properties.lastname",
|
|
68
|
-
"master": "newest"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"source": "attributes.phone_number",
|
|
72
|
-
"target": "properties.phone",
|
|
73
|
-
"transform": "to_e164_phone",
|
|
74
|
-
"master": "newest"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"source": "attributes.organization",
|
|
78
|
-
"target": "properties.company",
|
|
79
|
-
"master": "target"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"source": "attributes.title",
|
|
83
|
-
"target": "properties.jobtitle",
|
|
84
|
-
"master": "target"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"source": "attributes.location.city",
|
|
88
|
-
"target": "properties.city",
|
|
89
|
-
"direction": "to_target"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"source": "attributes.properties.hubspot_lifecycle_stage",
|
|
93
|
-
"target": "properties.lifecyclestage",
|
|
94
|
-
"direction": "to_source"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"source": "attributes.external_id",
|
|
98
|
-
"target": "id",
|
|
99
|
-
"direction": "to_source"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"backfill": {
|
|
103
|
-
"trigger": "onInstall",
|
|
104
|
-
"pageSize": 200
|
|
105
|
-
},
|
|
106
|
-
"ongoing": {
|
|
107
|
-
"mode": "webhook"
|
|
108
|
-
},
|
|
109
|
-
"default": "on"
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"workflows": [
|
|
113
|
-
{
|
|
114
|
-
"id": "list-lifecycle",
|
|
115
|
-
"label": "Set lifecycle stage when a profile joins a list",
|
|
116
|
-
"description": "HubSpot never moves a lifecycle stage backwards, so a customer who joins a newsletter list stays a customer.",
|
|
117
|
-
"purpose": "write",
|
|
118
|
-
"default": "off",
|
|
119
|
-
"settings": {
|
|
120
|
-
"list": {
|
|
121
|
-
"type": "option",
|
|
122
|
-
"options": "klaviyo.list",
|
|
123
|
-
"label": "Klaviyo list",
|
|
124
|
-
"required": true
|
|
125
|
-
},
|
|
126
|
-
"stage": {
|
|
127
|
-
"type": "enum",
|
|
128
|
-
"label": "Set lifecycle stage to",
|
|
129
|
-
"enum": [
|
|
130
|
-
"subscriber",
|
|
131
|
-
"lead",
|
|
132
|
-
"marketingqualifiedlead"
|
|
133
|
-
],
|
|
134
|
-
"default": "subscriber"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"trigger": {
|
|
138
|
-
"type": "webhook",
|
|
139
|
-
"module": "klaviyo",
|
|
140
|
-
"topic": "list.subscribed",
|
|
141
|
-
"filter": "$.event.data.attributes.event_properties.list_id == $.settings.list"
|
|
142
|
-
},
|
|
143
|
-
"steps": [
|
|
144
|
-
{
|
|
145
|
-
"id": "contact",
|
|
146
|
-
"use": "links.find",
|
|
147
|
-
"with": {
|
|
148
|
-
"sync": "profiles",
|
|
149
|
-
"key": {
|
|
150
|
-
"email": "$.record.email"
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"id": "write",
|
|
156
|
-
"use": "branch",
|
|
157
|
-
"cases": [
|
|
158
|
-
{
|
|
159
|
-
"when": "$.steps.contact == null",
|
|
160
|
-
"do": [
|
|
161
|
-
{
|
|
162
|
-
"id": "created",
|
|
163
|
-
"use": "hubspot.contact.upsertByEmail",
|
|
164
|
-
"with": {
|
|
165
|
-
"email": "$.record.email",
|
|
166
|
-
"properties": {
|
|
167
|
-
"email": "$.record.email",
|
|
168
|
-
"firstname": "$.record.first_name",
|
|
169
|
-
"lastname": "$.record.last_name",
|
|
170
|
-
"lifecyclestage": "$.settings.stage"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"use": "links.upsert",
|
|
176
|
-
"with": {
|
|
177
|
-
"sync": "profiles",
|
|
178
|
-
"ids": {
|
|
179
|
-
"klaviyo": "$.record.id",
|
|
180
|
-
"hubspot": "$.steps.created.id"
|
|
181
|
-
},
|
|
182
|
-
"keys": {
|
|
183
|
-
"email": "$.record.email"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
"else": [
|
|
191
|
-
{
|
|
192
|
-
"use": "hubspot.contact.update",
|
|
193
|
-
"with": {
|
|
194
|
-
"id": "$.steps.contact.hubspot",
|
|
195
|
-
"properties": {
|
|
196
|
-
"lifecyclestage": "$.settings.stage"
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
]
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"id": "unsubscribe-to-hubspot",
|
|
206
|
-
"label": "Klaviyo unsubscribes opt the contact out in HubSpot",
|
|
207
|
-
"purpose": "maintain",
|
|
208
|
-
"default": "on",
|
|
209
|
-
"trigger": {
|
|
210
|
-
"type": "webhook",
|
|
211
|
-
"module": "klaviyo",
|
|
212
|
-
"topic": "profile.unsubscribed"
|
|
213
|
-
},
|
|
214
|
-
"steps": [
|
|
215
|
-
{
|
|
216
|
-
"use": "hubspot.subscription.unsubscribe",
|
|
217
|
-
"with": {
|
|
218
|
-
"emailAddress": "$.record.email",
|
|
219
|
-
"subscriptionId": "$.install.subscriptionType",
|
|
220
|
-
"legalBasis": "CONSENT_WITH_NOTICE",
|
|
221
|
-
"legalBasisExplanation": "Unsubscribed in Klaviyo ({{event.data.attributes.event_properties.method}}) on {{event.data.attributes.datetime | date}}"
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"id": "unsubscribe-to-klaviyo",
|
|
228
|
-
"label": "HubSpot opt-outs unsubscribe the Klaviyo profile",
|
|
229
|
-
"purpose": "maintain",
|
|
230
|
-
"default": "on",
|
|
231
|
-
"trigger": {
|
|
232
|
-
"type": "webhook",
|
|
233
|
-
"module": "hubspot",
|
|
234
|
-
"topic": "contact.propertyChange",
|
|
235
|
-
"filter": "$.record.propertyName == 'hs_email_optout' && $.record.propertyValue == 'true'"
|
|
236
|
-
},
|
|
237
|
-
"steps": [
|
|
238
|
-
{
|
|
239
|
-
"id": "contact",
|
|
240
|
-
"use": "hubspot.contact.get",
|
|
241
|
-
"with": {
|
|
242
|
-
"id": "$.record.objectId"
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"use": "stop",
|
|
247
|
-
"when": "!($.steps.contact.properties.email exists)",
|
|
248
|
-
"with": {
|
|
249
|
-
"reason": "Contact has no email address"
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"use": "klaviyo.profile.unsubscribe",
|
|
254
|
-
"with": {
|
|
255
|
-
"email": "$.steps.contact.properties.email"
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
]
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
"id": "won-to-customers-list",
|
|
262
|
-
"label": "Add closed-won contacts to a Klaviyo list",
|
|
263
|
-
"purpose": "write",
|
|
264
|
-
"default": "off",
|
|
265
|
-
"settings": {
|
|
266
|
-
"list": {
|
|
267
|
-
"type": "option",
|
|
268
|
-
"options": "klaviyo.list",
|
|
269
|
-
"label": "Customers list",
|
|
270
|
-
"required": true
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
"trigger": {
|
|
274
|
-
"type": "webhook",
|
|
275
|
-
"module": "hubspot",
|
|
276
|
-
"topic": "deal.propertyChange",
|
|
277
|
-
"filter": "$.record.propertyName == 'dealstage' && $.record.propertyValue == 'closedwon'"
|
|
278
|
-
},
|
|
279
|
-
"steps": [
|
|
280
|
-
{
|
|
281
|
-
"id": "contacts",
|
|
282
|
-
"use": "hubspot.deal.contacts",
|
|
283
|
-
"with": {
|
|
284
|
-
"dealId": "$.record.objectId"
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"id": "subscribe",
|
|
289
|
-
"use": "foreach",
|
|
290
|
-
"with": {
|
|
291
|
-
"over": "$.steps.contacts",
|
|
292
|
-
"max": 25
|
|
293
|
-
},
|
|
294
|
-
"do": [
|
|
295
|
-
{
|
|
296
|
-
"use": "klaviyo.profile.subscribe",
|
|
297
|
-
"when": "$.item.properties.email exists",
|
|
298
|
-
"with": {
|
|
299
|
-
"listId": "$.settings.list",
|
|
300
|
-
"email": "$.item.properties.email",
|
|
301
|
-
"channels": [
|
|
302
|
-
"email"
|
|
303
|
-
]
|
|
304
|
-
},
|
|
305
|
-
"onError": "continue"
|
|
306
|
-
}
|
|
307
|
-
]
|
|
308
|
-
}
|
|
309
|
-
]
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
"lifecycle": {
|
|
313
|
-
"onInstall": [
|
|
314
|
-
{
|
|
315
|
-
"id": "hook",
|
|
316
|
-
"use": "klaviyo.webhook.create",
|
|
317
|
-
"with": {
|
|
318
|
-
"name": "Frigg: HubSpot sync",
|
|
319
|
-
"endpointUrl": "$.install.webhookUrls.klaviyo",
|
|
320
|
-
"topics": [
|
|
321
|
-
"event:klaviyo.subscribed_to_list",
|
|
322
|
-
"event:klaviyo.unsubscribed"
|
|
323
|
-
]
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
],
|
|
327
|
-
"onUninstall": [
|
|
328
|
-
{
|
|
329
|
-
"use": "klaviyo.webhook.delete",
|
|
330
|
-
"with": {
|
|
331
|
-
"id": "$.install.runtime.installed.hook.id"
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
]
|
|
335
|
-
}
|
|
336
|
-
}
|