@automate.ax/catalog 0.139.2 → 0.142.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/dist/catalog.d.ts +103 -0
- package/dist/catalog.js +40 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/triggers/clickup.d.ts +420 -0
- package/dist/triggers/clickup.js +65 -0
- package/dist/triggers/google-ads.d.ts +277 -0
- package/dist/triggers/google-ads.js +54 -0
- package/dist/triggers/index.d.ts +2424 -584
- package/dist/triggers/index.js +6 -0
- package/dist/triggers/meta-ads.d.ts +132 -0
- package/dist/triggers/meta-ads.js +72 -0
- package/package.json +20 -2
- package/src/catalog.ts +44 -0
- package/src/index.ts +3 -0
- package/src/triggers/clickup.ts +82 -0
- package/src/triggers/google-ads.ts +131 -0
- package/src/triggers/index.ts +6 -0
- package/src/triggers/meta-ads.ts +81 -0
package/dist/triggers/index.js
CHANGED
|
@@ -9,13 +9,16 @@ import { convexTriggerDefinitions } from "./convex.js";
|
|
|
9
9
|
import { discordTriggerDefinitions } from "./discord.js";
|
|
10
10
|
import { closeTriggerDefinitions } from "./close.js";
|
|
11
11
|
import { cloudflareTriggerDefinitions } from "./cloudflare.js";
|
|
12
|
+
import { clickUpTriggerDefinitions } from "./clickup.js";
|
|
12
13
|
import { coreTriggerDefinitions } from "./core.js";
|
|
13
14
|
import { githubTriggerDefinitions } from "./github.js";
|
|
14
15
|
import { googleTriggerDefinitions } from "./google.js";
|
|
16
|
+
import { googleAdsTriggerDefinitions } from "./google-ads.js";
|
|
15
17
|
import { hubspotTriggerDefinitions } from "./hubspot.js";
|
|
16
18
|
import { linearTriggerDefinitions } from "./linear.js";
|
|
17
19
|
import { millionVerifierTriggerDefinitions } from "./millionverifier.js";
|
|
18
20
|
import { microsoftTriggerDefinitions } from "./microsoft.js";
|
|
21
|
+
import { metaAdsTriggerDefinitions } from "./meta-ads.js";
|
|
19
22
|
import { notionTriggerDefinitions } from "./notion.js";
|
|
20
23
|
import { redditTriggerDefinitions } from "./reddit.js";
|
|
21
24
|
import { resendTriggerDefinitions } from "./resend.js";
|
|
@@ -41,13 +44,16 @@ export const triggerDefinitions = {
|
|
|
41
44
|
...discordTriggerDefinitions,
|
|
42
45
|
...closeTriggerDefinitions,
|
|
43
46
|
...cloudflareTriggerDefinitions,
|
|
47
|
+
...clickUpTriggerDefinitions,
|
|
44
48
|
...coreTriggerDefinitions,
|
|
45
49
|
...githubTriggerDefinitions,
|
|
46
50
|
...googleTriggerDefinitions,
|
|
51
|
+
...googleAdsTriggerDefinitions,
|
|
47
52
|
...hubspotTriggerDefinitions,
|
|
48
53
|
...linearTriggerDefinitions,
|
|
49
54
|
...millionVerifierTriggerDefinitions,
|
|
50
55
|
...microsoftTriggerDefinitions,
|
|
56
|
+
...metaAdsTriggerDefinitions,
|
|
51
57
|
...notionTriggerDefinitions,
|
|
52
58
|
...redditTriggerDefinitions,
|
|
53
59
|
...resendTriggerDefinitions,
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export declare const metaAdsTriggerDefinitions: {
|
|
2
|
+
readonly metaAdsAdEffectiveStatusChanged: {
|
|
3
|
+
readonly account: {
|
|
4
|
+
readonly connectionOptions: readonly [{
|
|
5
|
+
readonly connectionMethodId: "oauth";
|
|
6
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
7
|
+
}];
|
|
8
|
+
readonly serviceId: "meta-ads";
|
|
9
|
+
};
|
|
10
|
+
readonly type: "meta-ads.ad.effectiveStatusChanged";
|
|
11
|
+
};
|
|
12
|
+
readonly metaAdsAdObjectIssuesChanged: {
|
|
13
|
+
readonly account: {
|
|
14
|
+
readonly connectionOptions: readonly [{
|
|
15
|
+
readonly connectionMethodId: "oauth";
|
|
16
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
17
|
+
}];
|
|
18
|
+
readonly serviceId: "meta-ads";
|
|
19
|
+
};
|
|
20
|
+
readonly type: "meta-ads.adObject.issuesChanged";
|
|
21
|
+
};
|
|
22
|
+
readonly metaAdsAdObjectProcessingCompleted: {
|
|
23
|
+
readonly account: {
|
|
24
|
+
readonly connectionOptions: readonly [{
|
|
25
|
+
readonly connectionMethodId: "oauth";
|
|
26
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
27
|
+
}];
|
|
28
|
+
readonly serviceId: "meta-ads";
|
|
29
|
+
};
|
|
30
|
+
readonly type: "meta-ads.adObject.processingCompleted";
|
|
31
|
+
};
|
|
32
|
+
readonly metaAdsAdRecommendation: {
|
|
33
|
+
readonly account: {
|
|
34
|
+
readonly connectionOptions: readonly [{
|
|
35
|
+
readonly connectionMethodId: "oauth";
|
|
36
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
37
|
+
}];
|
|
38
|
+
readonly serviceId: "meta-ads";
|
|
39
|
+
};
|
|
40
|
+
readonly type: "meta-ads.ad.recommendation";
|
|
41
|
+
};
|
|
42
|
+
readonly metaAdsAdSetEffectiveStatusChanged: {
|
|
43
|
+
readonly account: {
|
|
44
|
+
readonly connectionOptions: readonly [{
|
|
45
|
+
readonly connectionMethodId: "oauth";
|
|
46
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
47
|
+
}];
|
|
48
|
+
readonly serviceId: "meta-ads";
|
|
49
|
+
};
|
|
50
|
+
readonly type: "meta-ads.adSet.effectiveStatusChanged";
|
|
51
|
+
};
|
|
52
|
+
readonly metaAdsCampaignEffectiveStatusChanged: {
|
|
53
|
+
readonly account: {
|
|
54
|
+
readonly connectionOptions: readonly [{
|
|
55
|
+
readonly connectionMethodId: "oauth";
|
|
56
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
57
|
+
}];
|
|
58
|
+
readonly serviceId: "meta-ads";
|
|
59
|
+
};
|
|
60
|
+
readonly type: "meta-ads.campaign.effectiveStatusChanged";
|
|
61
|
+
};
|
|
62
|
+
readonly metaAdsCreativeFatigueChanged: {
|
|
63
|
+
readonly account: {
|
|
64
|
+
readonly connectionOptions: readonly [{
|
|
65
|
+
readonly connectionMethodId: "oauth";
|
|
66
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
67
|
+
}];
|
|
68
|
+
readonly serviceId: "meta-ads";
|
|
69
|
+
};
|
|
70
|
+
readonly type: "meta-ads.creativeFatigue.changed";
|
|
71
|
+
};
|
|
72
|
+
readonly metaAdsEvent: {
|
|
73
|
+
readonly account: {
|
|
74
|
+
readonly connectionOptions: readonly [{
|
|
75
|
+
readonly connectionMethodId: "oauth";
|
|
76
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
77
|
+
}];
|
|
78
|
+
readonly serviceId: "meta-ads";
|
|
79
|
+
};
|
|
80
|
+
readonly type: "meta-ads.event";
|
|
81
|
+
};
|
|
82
|
+
readonly metaAdsLeadCreated: {
|
|
83
|
+
readonly account: {
|
|
84
|
+
readonly connectionOptions: readonly [{
|
|
85
|
+
readonly connectionMethodId: "oauth";
|
|
86
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
87
|
+
}];
|
|
88
|
+
readonly serviceId: "meta-ads";
|
|
89
|
+
};
|
|
90
|
+
readonly type: "meta-ads.lead.created";
|
|
91
|
+
};
|
|
92
|
+
readonly metaAdsObjectCreated: {
|
|
93
|
+
readonly account: {
|
|
94
|
+
readonly connectionOptions: readonly [{
|
|
95
|
+
readonly connectionMethodId: "oauth";
|
|
96
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
97
|
+
}];
|
|
98
|
+
readonly serviceId: "meta-ads";
|
|
99
|
+
};
|
|
100
|
+
readonly type: "meta-ads.object.created";
|
|
101
|
+
};
|
|
102
|
+
readonly metaAdsObjectUpdated: {
|
|
103
|
+
readonly account: {
|
|
104
|
+
readonly connectionOptions: readonly [{
|
|
105
|
+
readonly connectionMethodId: "oauth";
|
|
106
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
107
|
+
}];
|
|
108
|
+
readonly serviceId: "meta-ads";
|
|
109
|
+
};
|
|
110
|
+
readonly type: "meta-ads.object.updated";
|
|
111
|
+
};
|
|
112
|
+
readonly metaAdsInsightsUpdated: {
|
|
113
|
+
readonly account: {
|
|
114
|
+
readonly connectionOptions: readonly [{
|
|
115
|
+
readonly connectionMethodId: "oauth";
|
|
116
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
117
|
+
}];
|
|
118
|
+
readonly serviceId: "meta-ads";
|
|
119
|
+
};
|
|
120
|
+
readonly type: "meta-ads.insights.updated";
|
|
121
|
+
};
|
|
122
|
+
readonly metaAdsInsightsMilestoneReached: {
|
|
123
|
+
readonly account: {
|
|
124
|
+
readonly connectionOptions: readonly [{
|
|
125
|
+
readonly connectionMethodId: "oauth";
|
|
126
|
+
readonly requiredScopes: readonly [import("..").ScopeRequirementGroup];
|
|
127
|
+
}];
|
|
128
|
+
readonly serviceId: "meta-ads";
|
|
129
|
+
};
|
|
130
|
+
readonly type: "meta-ads.insights.milestoneReached";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { integrationScope } from "../types.js";
|
|
2
|
+
const WEBHOOK_ACCOUNT = {
|
|
3
|
+
connectionOptions: [
|
|
4
|
+
{
|
|
5
|
+
connectionMethodId: "oauth",
|
|
6
|
+
requiredScopes: [integrationScope.and("ads_management")],
|
|
7
|
+
},
|
|
8
|
+
],
|
|
9
|
+
serviceId: "meta-ads",
|
|
10
|
+
};
|
|
11
|
+
const LEAD_ACCOUNT = {
|
|
12
|
+
connectionOptions: [
|
|
13
|
+
{
|
|
14
|
+
connectionMethodId: "oauth",
|
|
15
|
+
requiredScopes: [
|
|
16
|
+
integrationScope.and("ads_management", "pages_manage_metadata", "pages_read_engagement", "pages_show_list"),
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
serviceId: "meta-ads",
|
|
21
|
+
};
|
|
22
|
+
export const metaAdsTriggerDefinitions = {
|
|
23
|
+
metaAdsAdEffectiveStatusChanged: {
|
|
24
|
+
account: WEBHOOK_ACCOUNT,
|
|
25
|
+
type: "meta-ads.ad.effectiveStatusChanged",
|
|
26
|
+
},
|
|
27
|
+
metaAdsAdObjectIssuesChanged: {
|
|
28
|
+
account: WEBHOOK_ACCOUNT,
|
|
29
|
+
type: "meta-ads.adObject.issuesChanged",
|
|
30
|
+
},
|
|
31
|
+
metaAdsAdObjectProcessingCompleted: {
|
|
32
|
+
account: WEBHOOK_ACCOUNT,
|
|
33
|
+
type: "meta-ads.adObject.processingCompleted",
|
|
34
|
+
},
|
|
35
|
+
metaAdsAdRecommendation: {
|
|
36
|
+
account: WEBHOOK_ACCOUNT,
|
|
37
|
+
type: "meta-ads.ad.recommendation",
|
|
38
|
+
},
|
|
39
|
+
metaAdsAdSetEffectiveStatusChanged: {
|
|
40
|
+
account: WEBHOOK_ACCOUNT,
|
|
41
|
+
type: "meta-ads.adSet.effectiveStatusChanged",
|
|
42
|
+
},
|
|
43
|
+
metaAdsCampaignEffectiveStatusChanged: {
|
|
44
|
+
account: WEBHOOK_ACCOUNT,
|
|
45
|
+
type: "meta-ads.campaign.effectiveStatusChanged",
|
|
46
|
+
},
|
|
47
|
+
metaAdsCreativeFatigueChanged: {
|
|
48
|
+
account: WEBHOOK_ACCOUNT,
|
|
49
|
+
type: "meta-ads.creativeFatigue.changed",
|
|
50
|
+
},
|
|
51
|
+
metaAdsEvent: { account: WEBHOOK_ACCOUNT, type: "meta-ads.event" },
|
|
52
|
+
metaAdsLeadCreated: {
|
|
53
|
+
account: LEAD_ACCOUNT,
|
|
54
|
+
type: "meta-ads.lead.created",
|
|
55
|
+
},
|
|
56
|
+
metaAdsObjectCreated: {
|
|
57
|
+
account: WEBHOOK_ACCOUNT,
|
|
58
|
+
type: "meta-ads.object.created",
|
|
59
|
+
},
|
|
60
|
+
metaAdsObjectUpdated: {
|
|
61
|
+
account: WEBHOOK_ACCOUNT,
|
|
62
|
+
type: "meta-ads.object.updated",
|
|
63
|
+
},
|
|
64
|
+
metaAdsInsightsUpdated: {
|
|
65
|
+
account: WEBHOOK_ACCOUNT,
|
|
66
|
+
type: "meta-ads.insights.updated",
|
|
67
|
+
},
|
|
68
|
+
metaAdsInsightsMilestoneReached: {
|
|
69
|
+
account: WEBHOOK_ACCOUNT,
|
|
70
|
+
type: "meta-ads.insights.milestoneReached",
|
|
71
|
+
},
|
|
72
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.142.0",
|
|
4
4
|
"description": "Shared integration service and trigger definitions for Automate.ax.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"./triggers/axiom": "./src/triggers/axiom.ts",
|
|
27
27
|
"./triggers/automate": "./src/triggers/automate.ts",
|
|
28
28
|
"./triggers/asana": "./src/triggers/asana.ts",
|
|
29
|
+
"./triggers/clickup": "./src/triggers/clickup.ts",
|
|
29
30
|
"./triggers/brevo": "./src/triggers/brevo.ts",
|
|
30
31
|
"./triggers/cloudflare": "./src/triggers/cloudflare.ts",
|
|
31
32
|
"./triggers/convex": "./src/triggers/convex.ts",
|
|
@@ -38,10 +39,12 @@
|
|
|
38
39
|
"./triggers/core-schedule": "./src/triggers/core-schedule.ts",
|
|
39
40
|
"./triggers/github": "./src/triggers/github.ts",
|
|
40
41
|
"./triggers/google": "./src/triggers/google.ts",
|
|
42
|
+
"./triggers/google-ads": "./src/triggers/google-ads.ts",
|
|
41
43
|
"./triggers/hubspot": "./src/triggers/hubspot.ts",
|
|
42
44
|
"./triggers/linear": "./src/triggers/linear.ts",
|
|
43
45
|
"./triggers/millionverifier": "./src/triggers/millionverifier.ts",
|
|
44
46
|
"./triggers/microsoft": "./src/triggers/microsoft.ts",
|
|
47
|
+
"./triggers/meta-ads": "./src/triggers/meta-ads.ts",
|
|
45
48
|
"./triggers/notion": "./src/triggers/notion.ts",
|
|
46
49
|
"./triggers/reddit": "./src/triggers/reddit.ts",
|
|
47
50
|
"./triggers/name": "./src/triggers/name.ts",
|
|
@@ -59,7 +62,7 @@
|
|
|
59
62
|
}
|
|
60
63
|
},
|
|
61
64
|
"devDependencies": {
|
|
62
|
-
"@internal/config": "0.
|
|
65
|
+
"@internal/config": "0.3.0",
|
|
63
66
|
"@types/bun": "latest",
|
|
64
67
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
65
68
|
"@zachsents/oxlint-config": "^0.4.1",
|
|
@@ -130,6 +133,11 @@
|
|
|
130
133
|
"types": "./dist/triggers/asana.d.ts",
|
|
131
134
|
"default": "./dist/triggers/asana.js"
|
|
132
135
|
},
|
|
136
|
+
"./triggers/clickup": {
|
|
137
|
+
"bun": "./src/triggers/clickup.ts",
|
|
138
|
+
"types": "./dist/triggers/clickup.d.ts",
|
|
139
|
+
"default": "./dist/triggers/clickup.js"
|
|
140
|
+
},
|
|
133
141
|
"./triggers/brevo": {
|
|
134
142
|
"bun": "./src/triggers/brevo.ts",
|
|
135
143
|
"types": "./dist/triggers/brevo.d.ts",
|
|
@@ -190,6 +198,11 @@
|
|
|
190
198
|
"types": "./dist/triggers/google.d.ts",
|
|
191
199
|
"default": "./dist/triggers/google.js"
|
|
192
200
|
},
|
|
201
|
+
"./triggers/google-ads": {
|
|
202
|
+
"bun": "./src/triggers/google-ads.ts",
|
|
203
|
+
"types": "./dist/triggers/google-ads.d.ts",
|
|
204
|
+
"default": "./dist/triggers/google-ads.js"
|
|
205
|
+
},
|
|
193
206
|
"./triggers/hubspot": {
|
|
194
207
|
"bun": "./src/triggers/hubspot.ts",
|
|
195
208
|
"types": "./dist/triggers/hubspot.d.ts",
|
|
@@ -210,6 +223,11 @@
|
|
|
210
223
|
"types": "./dist/triggers/microsoft.d.ts",
|
|
211
224
|
"default": "./dist/triggers/microsoft.js"
|
|
212
225
|
},
|
|
226
|
+
"./triggers/meta-ads": {
|
|
227
|
+
"bun": "./src/triggers/meta-ads.ts",
|
|
228
|
+
"types": "./dist/triggers/meta-ads.d.ts",
|
|
229
|
+
"default": "./dist/triggers/meta-ads.js"
|
|
230
|
+
},
|
|
213
231
|
"./triggers/notion": {
|
|
214
232
|
"bun": "./src/triggers/notion.ts",
|
|
215
233
|
"types": "./dist/triggers/notion.d.ts",
|
package/src/catalog.ts
CHANGED
|
@@ -214,6 +214,14 @@ export const cloudflareService = defineIntegrationService({
|
|
|
214
214
|
preferredConnectionMethodId: "oauth",
|
|
215
215
|
})
|
|
216
216
|
|
|
217
|
+
export const metaAdsService = defineIntegrationService({
|
|
218
|
+
connectionMethods: [{ id: "oauth", name: "OAuth", type: "redirect" }],
|
|
219
|
+
description:
|
|
220
|
+
"Connect Meta Ads for campaign management, reporting, audiences, leads, conversions, and events.",
|
|
221
|
+
id: "meta-ads",
|
|
222
|
+
name: "Meta Ads",
|
|
223
|
+
})
|
|
224
|
+
|
|
217
225
|
export const closeService = defineIntegrationService({
|
|
218
226
|
connectionMethods: [
|
|
219
227
|
{ id: "oauth", name: "OAuth", type: "redirect" },
|
|
@@ -231,6 +239,39 @@ export const closeService = defineIntegrationService({
|
|
|
231
239
|
preferredConnectionMethodId: "oauth",
|
|
232
240
|
})
|
|
233
241
|
|
|
242
|
+
export const closeBotService = defineApiKeyService({
|
|
243
|
+
credentialUrl: "https://app.closebot.com/settings?tab=keys",
|
|
244
|
+
description: "Connect a CloseBot account with an API key.",
|
|
245
|
+
id: "closebot",
|
|
246
|
+
name: "CloseBot",
|
|
247
|
+
placeholder: "CloseBot API key",
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
export const clickUpService = defineIntegrationService({
|
|
251
|
+
connectionMethods: [
|
|
252
|
+
{ id: "oauth", name: "OAuth", type: "redirect" },
|
|
253
|
+
{
|
|
254
|
+
credentialUrl: "https://app.clickup.com/settings/apps",
|
|
255
|
+
fields: [
|
|
256
|
+
{
|
|
257
|
+
input: "password",
|
|
258
|
+
label: "Personal API token",
|
|
259
|
+
name: "apiKey",
|
|
260
|
+
placeholder: "pk_...",
|
|
261
|
+
required: true,
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
id: "personal-token",
|
|
265
|
+
name: "Personal API token",
|
|
266
|
+
type: "form",
|
|
267
|
+
},
|
|
268
|
+
],
|
|
269
|
+
description: "Connect a ClickUp account with OAuth or a personal API token.",
|
|
270
|
+
id: "clickup",
|
|
271
|
+
name: "ClickUp",
|
|
272
|
+
preferredConnectionMethodId: "oauth",
|
|
273
|
+
})
|
|
274
|
+
|
|
234
275
|
export const chatgptService = defineIntegrationService({
|
|
235
276
|
connectionMethods: [
|
|
236
277
|
{
|
|
@@ -834,7 +875,10 @@ export const integrationCatalog = defineIntegrationCatalog([
|
|
|
834
875
|
cerebrasService,
|
|
835
876
|
chatgptService,
|
|
836
877
|
cloudflareService,
|
|
878
|
+
metaAdsService,
|
|
837
879
|
closeService,
|
|
880
|
+
closeBotService,
|
|
881
|
+
clickUpService,
|
|
838
882
|
codexService,
|
|
839
883
|
cohereService,
|
|
840
884
|
convexService,
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IntegrationAccountRequirement,
|
|
3
|
+
TriggerDefinition,
|
|
4
|
+
TriggerPresentationContext,
|
|
5
|
+
} from "../types"
|
|
6
|
+
|
|
7
|
+
const CLICKUP_ACCOUNT = {
|
|
8
|
+
connectionOptions: [
|
|
9
|
+
{ connectionMethodId: "oauth", requiredScopes: [] },
|
|
10
|
+
{ connectionMethodId: "personal-token", requiredScopes: [] },
|
|
11
|
+
],
|
|
12
|
+
serviceId: "clickup",
|
|
13
|
+
} as const satisfies IntegrationAccountRequirement
|
|
14
|
+
|
|
15
|
+
export const clickUpTriggerDefinitions = {
|
|
16
|
+
clickUpFolderCreated: definition("clickup.folder.created"),
|
|
17
|
+
clickUpFolderDeleted: definition("clickup.folder.deleted"),
|
|
18
|
+
clickUpFolderUpdated: definition("clickup.folder.updated"),
|
|
19
|
+
clickUpGoalCreated: definition("clickup.goal.created"),
|
|
20
|
+
clickUpGoalDeleted: definition("clickup.goal.deleted"),
|
|
21
|
+
clickUpGoalUpdated: definition("clickup.goal.updated"),
|
|
22
|
+
clickUpListCreated: definition("clickup.list.created"),
|
|
23
|
+
clickUpListDeleted: definition("clickup.list.deleted"),
|
|
24
|
+
clickUpListUpdated: definition("clickup.list.updated"),
|
|
25
|
+
clickUpSpaceCreated: definition("clickup.space.created"),
|
|
26
|
+
clickUpSpaceDeleted: definition("clickup.space.deleted"),
|
|
27
|
+
clickUpSpaceUpdated: definition("clickup.space.updated"),
|
|
28
|
+
clickUpTargetCreated: definition("clickup.target.created"),
|
|
29
|
+
clickUpTargetDeleted: definition("clickup.target.deleted"),
|
|
30
|
+
clickUpTargetUpdated: definition("clickup.target.updated"),
|
|
31
|
+
clickUpTaskAssigneeUpdated: definition("clickup.task.assignee.updated"),
|
|
32
|
+
clickUpTaskCommentPosted: definition("clickup.task.comment.posted"),
|
|
33
|
+
clickUpTaskCommentUpdated: definition("clickup.task.comment.updated"),
|
|
34
|
+
clickUpTaskCreated: definition("clickup.task.created"),
|
|
35
|
+
clickUpTaskDeleted: definition("clickup.task.deleted"),
|
|
36
|
+
clickUpTaskDueDateUpdated: definition("clickup.task.due-date.updated"),
|
|
37
|
+
clickUpTaskMoved: definition("clickup.task.moved"),
|
|
38
|
+
clickUpTaskPriorityUpdated: definition("clickup.task.priority.updated"),
|
|
39
|
+
clickUpTaskStatusUpdated: definition("clickup.task.status.updated"),
|
|
40
|
+
clickUpTaskTagUpdated: definition("clickup.task.tag.updated"),
|
|
41
|
+
clickUpTaskTimeEstimateUpdated: definition(
|
|
42
|
+
"clickup.task.time-estimate.updated",
|
|
43
|
+
),
|
|
44
|
+
clickUpTaskTimeTrackedUpdated: definition(
|
|
45
|
+
"clickup.task.time-tracked.updated",
|
|
46
|
+
),
|
|
47
|
+
clickUpTaskUpdated: definition("clickup.task.updated"),
|
|
48
|
+
clickUpWorkspaceEvent: definition("clickup.workspace.event"),
|
|
49
|
+
} as const satisfies Record<string, TriggerDefinition>
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Builds one full-permission ClickUp trigger definition.
|
|
53
|
+
*
|
|
54
|
+
* @param type - Internal event type.
|
|
55
|
+
*/
|
|
56
|
+
function definition<TType extends string>(type: TType) {
|
|
57
|
+
return {
|
|
58
|
+
account: CLICKUP_ACCOUNT,
|
|
59
|
+
getPrimary: clickUpWorkspacePrimary,
|
|
60
|
+
type,
|
|
61
|
+
} as const
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Reads a trigger's configured ClickUp Workspace for presentation.
|
|
66
|
+
*
|
|
67
|
+
* @param context - Resolved trigger presentation context.
|
|
68
|
+
* @throws When canonical trigger configuration is missing its Workspace ID.
|
|
69
|
+
*/
|
|
70
|
+
function clickUpWorkspacePrimary(context: TriggerPresentationContext) {
|
|
71
|
+
if (
|
|
72
|
+
typeof context.config !== "object" ||
|
|
73
|
+
context.config === null ||
|
|
74
|
+
!("workspaceId" in context.config) ||
|
|
75
|
+
typeof context.config.workspaceId !== "string"
|
|
76
|
+
) {
|
|
77
|
+
throw new TypeError(
|
|
78
|
+
"ClickUp trigger configuration requires a Workspace ID.",
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
return { copyable: true, value: context.config.workspaceId }
|
|
82
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IntegrationAccountRequirement,
|
|
3
|
+
TriggerDefinition,
|
|
4
|
+
TriggerPresentationContext,
|
|
5
|
+
} from "../types"
|
|
6
|
+
|
|
7
|
+
const GOOGLE_ADS_ACCOUNT = {
|
|
8
|
+
connectionOptions: [
|
|
9
|
+
{
|
|
10
|
+
connectionMethodId: "oauth",
|
|
11
|
+
requiredScopes: ["https://www.googleapis.com/auth/adwords"],
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
serviceId: "google",
|
|
15
|
+
} as const satisfies IntegrationAccountRequirement<"google">
|
|
16
|
+
|
|
17
|
+
const changeTrigger = <const TType extends string>(type: TType, name: string) =>
|
|
18
|
+
({
|
|
19
|
+
account: GOOGLE_ADS_ACCOUNT,
|
|
20
|
+
getPrimary: customerPrimary,
|
|
21
|
+
name,
|
|
22
|
+
type,
|
|
23
|
+
}) as const satisfies TriggerDefinition
|
|
24
|
+
|
|
25
|
+
export const googleAdsTriggerDefinitions = {
|
|
26
|
+
googleAdsAdGroupCreated: changeTrigger(
|
|
27
|
+
"googleAds.adGroup.created",
|
|
28
|
+
"Google Ads ad group created",
|
|
29
|
+
),
|
|
30
|
+
googleAdsAdGroupRemoved: changeTrigger(
|
|
31
|
+
"googleAds.adGroup.removed",
|
|
32
|
+
"Google Ads ad group removed",
|
|
33
|
+
),
|
|
34
|
+
googleAdsAdGroupUpdated: changeTrigger(
|
|
35
|
+
"googleAds.adGroup.updated",
|
|
36
|
+
"Google Ads ad group updated",
|
|
37
|
+
),
|
|
38
|
+
googleAdsAdGroupAdCreated: changeTrigger(
|
|
39
|
+
"googleAds.adGroupAd.created",
|
|
40
|
+
"Google Ads ad created",
|
|
41
|
+
),
|
|
42
|
+
googleAdsAdGroupAdRemoved: changeTrigger(
|
|
43
|
+
"googleAds.adGroupAd.removed",
|
|
44
|
+
"Google Ads ad removed",
|
|
45
|
+
),
|
|
46
|
+
googleAdsAdGroupAdUpdated: changeTrigger(
|
|
47
|
+
"googleAds.adGroupAd.updated",
|
|
48
|
+
"Google Ads ad updated",
|
|
49
|
+
),
|
|
50
|
+
googleAdsAdGroupAssetCreated: changeTrigger(
|
|
51
|
+
"googleAds.adGroupAsset.created",
|
|
52
|
+
"Google Ads ad-group asset linked",
|
|
53
|
+
),
|
|
54
|
+
googleAdsAdGroupAssetRemoved: changeTrigger(
|
|
55
|
+
"googleAds.adGroupAsset.removed",
|
|
56
|
+
"Google Ads ad-group asset unlinked",
|
|
57
|
+
),
|
|
58
|
+
googleAdsAdGroupAssetUpdated: changeTrigger(
|
|
59
|
+
"googleAds.adGroupAsset.updated",
|
|
60
|
+
"Google Ads ad-group asset updated",
|
|
61
|
+
),
|
|
62
|
+
googleAdsAssetCreated: changeTrigger(
|
|
63
|
+
"googleAds.asset.created",
|
|
64
|
+
"Google Ads asset created",
|
|
65
|
+
),
|
|
66
|
+
googleAdsAssetRemoved: changeTrigger(
|
|
67
|
+
"googleAds.asset.removed",
|
|
68
|
+
"Google Ads asset removed",
|
|
69
|
+
),
|
|
70
|
+
googleAdsAssetUpdated: changeTrigger(
|
|
71
|
+
"googleAds.asset.updated",
|
|
72
|
+
"Google Ads asset updated",
|
|
73
|
+
),
|
|
74
|
+
googleAdsCampaignCreated: changeTrigger(
|
|
75
|
+
"googleAds.campaign.created",
|
|
76
|
+
"Google Ads campaign created",
|
|
77
|
+
),
|
|
78
|
+
googleAdsCampaignRemoved: changeTrigger(
|
|
79
|
+
"googleAds.campaign.removed",
|
|
80
|
+
"Google Ads campaign removed",
|
|
81
|
+
),
|
|
82
|
+
googleAdsCampaignUpdated: changeTrigger(
|
|
83
|
+
"googleAds.campaign.updated",
|
|
84
|
+
"Google Ads campaign updated",
|
|
85
|
+
),
|
|
86
|
+
googleAdsCampaignAssetCreated: changeTrigger(
|
|
87
|
+
"googleAds.campaignAsset.created",
|
|
88
|
+
"Google Ads campaign asset linked",
|
|
89
|
+
),
|
|
90
|
+
googleAdsCampaignAssetRemoved: changeTrigger(
|
|
91
|
+
"googleAds.campaignAsset.removed",
|
|
92
|
+
"Google Ads campaign asset unlinked",
|
|
93
|
+
),
|
|
94
|
+
googleAdsCampaignAssetUpdated: changeTrigger(
|
|
95
|
+
"googleAds.campaignAsset.updated",
|
|
96
|
+
"Google Ads campaign asset updated",
|
|
97
|
+
),
|
|
98
|
+
googleAdsCampaignBudgetCreated: changeTrigger(
|
|
99
|
+
"googleAds.campaignBudget.created",
|
|
100
|
+
"Google Ads campaign budget created",
|
|
101
|
+
),
|
|
102
|
+
googleAdsCampaignBudgetRemoved: changeTrigger(
|
|
103
|
+
"googleAds.campaignBudget.removed",
|
|
104
|
+
"Google Ads campaign budget removed",
|
|
105
|
+
),
|
|
106
|
+
googleAdsCampaignBudgetUpdated: changeTrigger(
|
|
107
|
+
"googleAds.campaignBudget.updated",
|
|
108
|
+
"Google Ads campaign budget updated",
|
|
109
|
+
),
|
|
110
|
+
googleAdsChange: changeTrigger("googleAds.change", "Google Ads change"),
|
|
111
|
+
} as const satisfies Record<string, TriggerDefinition>
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Presents the configured customer ID for one Google Ads trigger.
|
|
115
|
+
*
|
|
116
|
+
* @param context - Resolved trigger presentation context.
|
|
117
|
+
* @throws {TypeError} When the trigger configuration has no customer ID.
|
|
118
|
+
*/
|
|
119
|
+
function customerPrimary(context: TriggerPresentationContext) {
|
|
120
|
+
if (
|
|
121
|
+
typeof context.config !== "object" ||
|
|
122
|
+
context.config === null ||
|
|
123
|
+
!("customerId" in context.config) ||
|
|
124
|
+
typeof context.config.customerId !== "string"
|
|
125
|
+
) {
|
|
126
|
+
throw new TypeError(
|
|
127
|
+
"Google Ads trigger configuration requires a customer ID.",
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
return { value: context.config.customerId }
|
|
131
|
+
}
|
package/src/triggers/index.ts
CHANGED
|
@@ -9,13 +9,16 @@ import { convexTriggerDefinitions } from "./convex"
|
|
|
9
9
|
import { discordTriggerDefinitions } from "./discord"
|
|
10
10
|
import { closeTriggerDefinitions } from "./close"
|
|
11
11
|
import { cloudflareTriggerDefinitions } from "./cloudflare"
|
|
12
|
+
import { clickUpTriggerDefinitions } from "./clickup"
|
|
12
13
|
import { coreTriggerDefinitions } from "./core"
|
|
13
14
|
import { githubTriggerDefinitions } from "./github"
|
|
14
15
|
import { googleTriggerDefinitions } from "./google"
|
|
16
|
+
import { googleAdsTriggerDefinitions } from "./google-ads"
|
|
15
17
|
import { hubspotTriggerDefinitions } from "./hubspot"
|
|
16
18
|
import { linearTriggerDefinitions } from "./linear"
|
|
17
19
|
import { millionVerifierTriggerDefinitions } from "./millionverifier"
|
|
18
20
|
import { microsoftTriggerDefinitions } from "./microsoft"
|
|
21
|
+
import { metaAdsTriggerDefinitions } from "./meta-ads"
|
|
19
22
|
import { notionTriggerDefinitions } from "./notion"
|
|
20
23
|
import { redditTriggerDefinitions } from "./reddit"
|
|
21
24
|
import { resendTriggerDefinitions } from "./resend"
|
|
@@ -65,13 +68,16 @@ export const triggerDefinitions = {
|
|
|
65
68
|
...discordTriggerDefinitions,
|
|
66
69
|
...closeTriggerDefinitions,
|
|
67
70
|
...cloudflareTriggerDefinitions,
|
|
71
|
+
...clickUpTriggerDefinitions,
|
|
68
72
|
...coreTriggerDefinitions,
|
|
69
73
|
...githubTriggerDefinitions,
|
|
70
74
|
...googleTriggerDefinitions,
|
|
75
|
+
...googleAdsTriggerDefinitions,
|
|
71
76
|
...hubspotTriggerDefinitions,
|
|
72
77
|
...linearTriggerDefinitions,
|
|
73
78
|
...millionVerifierTriggerDefinitions,
|
|
74
79
|
...microsoftTriggerDefinitions,
|
|
80
|
+
...metaAdsTriggerDefinitions,
|
|
75
81
|
...notionTriggerDefinitions,
|
|
76
82
|
...redditTriggerDefinitions,
|
|
77
83
|
...resendTriggerDefinitions,
|