@automate.ax/catalog 0.141.0 → 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.
@@ -0,0 +1,277 @@
1
+ import type { TriggerPresentationContext } from "../types.js";
2
+ export declare const googleAdsTriggerDefinitions: {
3
+ readonly googleAdsAdGroupCreated: {
4
+ readonly account: {
5
+ readonly connectionOptions: readonly [{
6
+ readonly connectionMethodId: "oauth";
7
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
8
+ }];
9
+ readonly serviceId: "google";
10
+ };
11
+ readonly getPrimary: typeof customerPrimary;
12
+ readonly name: string;
13
+ readonly type: "googleAds.adGroup.created";
14
+ };
15
+ readonly googleAdsAdGroupRemoved: {
16
+ readonly account: {
17
+ readonly connectionOptions: readonly [{
18
+ readonly connectionMethodId: "oauth";
19
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
20
+ }];
21
+ readonly serviceId: "google";
22
+ };
23
+ readonly getPrimary: typeof customerPrimary;
24
+ readonly name: string;
25
+ readonly type: "googleAds.adGroup.removed";
26
+ };
27
+ readonly googleAdsAdGroupUpdated: {
28
+ readonly account: {
29
+ readonly connectionOptions: readonly [{
30
+ readonly connectionMethodId: "oauth";
31
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
32
+ }];
33
+ readonly serviceId: "google";
34
+ };
35
+ readonly getPrimary: typeof customerPrimary;
36
+ readonly name: string;
37
+ readonly type: "googleAds.adGroup.updated";
38
+ };
39
+ readonly googleAdsAdGroupAdCreated: {
40
+ readonly account: {
41
+ readonly connectionOptions: readonly [{
42
+ readonly connectionMethodId: "oauth";
43
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
44
+ }];
45
+ readonly serviceId: "google";
46
+ };
47
+ readonly getPrimary: typeof customerPrimary;
48
+ readonly name: string;
49
+ readonly type: "googleAds.adGroupAd.created";
50
+ };
51
+ readonly googleAdsAdGroupAdRemoved: {
52
+ readonly account: {
53
+ readonly connectionOptions: readonly [{
54
+ readonly connectionMethodId: "oauth";
55
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
56
+ }];
57
+ readonly serviceId: "google";
58
+ };
59
+ readonly getPrimary: typeof customerPrimary;
60
+ readonly name: string;
61
+ readonly type: "googleAds.adGroupAd.removed";
62
+ };
63
+ readonly googleAdsAdGroupAdUpdated: {
64
+ readonly account: {
65
+ readonly connectionOptions: readonly [{
66
+ readonly connectionMethodId: "oauth";
67
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
68
+ }];
69
+ readonly serviceId: "google";
70
+ };
71
+ readonly getPrimary: typeof customerPrimary;
72
+ readonly name: string;
73
+ readonly type: "googleAds.adGroupAd.updated";
74
+ };
75
+ readonly googleAdsAdGroupAssetCreated: {
76
+ readonly account: {
77
+ readonly connectionOptions: readonly [{
78
+ readonly connectionMethodId: "oauth";
79
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
80
+ }];
81
+ readonly serviceId: "google";
82
+ };
83
+ readonly getPrimary: typeof customerPrimary;
84
+ readonly name: string;
85
+ readonly type: "googleAds.adGroupAsset.created";
86
+ };
87
+ readonly googleAdsAdGroupAssetRemoved: {
88
+ readonly account: {
89
+ readonly connectionOptions: readonly [{
90
+ readonly connectionMethodId: "oauth";
91
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
92
+ }];
93
+ readonly serviceId: "google";
94
+ };
95
+ readonly getPrimary: typeof customerPrimary;
96
+ readonly name: string;
97
+ readonly type: "googleAds.adGroupAsset.removed";
98
+ };
99
+ readonly googleAdsAdGroupAssetUpdated: {
100
+ readonly account: {
101
+ readonly connectionOptions: readonly [{
102
+ readonly connectionMethodId: "oauth";
103
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
104
+ }];
105
+ readonly serviceId: "google";
106
+ };
107
+ readonly getPrimary: typeof customerPrimary;
108
+ readonly name: string;
109
+ readonly type: "googleAds.adGroupAsset.updated";
110
+ };
111
+ readonly googleAdsAssetCreated: {
112
+ readonly account: {
113
+ readonly connectionOptions: readonly [{
114
+ readonly connectionMethodId: "oauth";
115
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
116
+ }];
117
+ readonly serviceId: "google";
118
+ };
119
+ readonly getPrimary: typeof customerPrimary;
120
+ readonly name: string;
121
+ readonly type: "googleAds.asset.created";
122
+ };
123
+ readonly googleAdsAssetRemoved: {
124
+ readonly account: {
125
+ readonly connectionOptions: readonly [{
126
+ readonly connectionMethodId: "oauth";
127
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
128
+ }];
129
+ readonly serviceId: "google";
130
+ };
131
+ readonly getPrimary: typeof customerPrimary;
132
+ readonly name: string;
133
+ readonly type: "googleAds.asset.removed";
134
+ };
135
+ readonly googleAdsAssetUpdated: {
136
+ readonly account: {
137
+ readonly connectionOptions: readonly [{
138
+ readonly connectionMethodId: "oauth";
139
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
140
+ }];
141
+ readonly serviceId: "google";
142
+ };
143
+ readonly getPrimary: typeof customerPrimary;
144
+ readonly name: string;
145
+ readonly type: "googleAds.asset.updated";
146
+ };
147
+ readonly googleAdsCampaignCreated: {
148
+ readonly account: {
149
+ readonly connectionOptions: readonly [{
150
+ readonly connectionMethodId: "oauth";
151
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
152
+ }];
153
+ readonly serviceId: "google";
154
+ };
155
+ readonly getPrimary: typeof customerPrimary;
156
+ readonly name: string;
157
+ readonly type: "googleAds.campaign.created";
158
+ };
159
+ readonly googleAdsCampaignRemoved: {
160
+ readonly account: {
161
+ readonly connectionOptions: readonly [{
162
+ readonly connectionMethodId: "oauth";
163
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
164
+ }];
165
+ readonly serviceId: "google";
166
+ };
167
+ readonly getPrimary: typeof customerPrimary;
168
+ readonly name: string;
169
+ readonly type: "googleAds.campaign.removed";
170
+ };
171
+ readonly googleAdsCampaignUpdated: {
172
+ readonly account: {
173
+ readonly connectionOptions: readonly [{
174
+ readonly connectionMethodId: "oauth";
175
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
176
+ }];
177
+ readonly serviceId: "google";
178
+ };
179
+ readonly getPrimary: typeof customerPrimary;
180
+ readonly name: string;
181
+ readonly type: "googleAds.campaign.updated";
182
+ };
183
+ readonly googleAdsCampaignAssetCreated: {
184
+ readonly account: {
185
+ readonly connectionOptions: readonly [{
186
+ readonly connectionMethodId: "oauth";
187
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
188
+ }];
189
+ readonly serviceId: "google";
190
+ };
191
+ readonly getPrimary: typeof customerPrimary;
192
+ readonly name: string;
193
+ readonly type: "googleAds.campaignAsset.created";
194
+ };
195
+ readonly googleAdsCampaignAssetRemoved: {
196
+ readonly account: {
197
+ readonly connectionOptions: readonly [{
198
+ readonly connectionMethodId: "oauth";
199
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
200
+ }];
201
+ readonly serviceId: "google";
202
+ };
203
+ readonly getPrimary: typeof customerPrimary;
204
+ readonly name: string;
205
+ readonly type: "googleAds.campaignAsset.removed";
206
+ };
207
+ readonly googleAdsCampaignAssetUpdated: {
208
+ readonly account: {
209
+ readonly connectionOptions: readonly [{
210
+ readonly connectionMethodId: "oauth";
211
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
212
+ }];
213
+ readonly serviceId: "google";
214
+ };
215
+ readonly getPrimary: typeof customerPrimary;
216
+ readonly name: string;
217
+ readonly type: "googleAds.campaignAsset.updated";
218
+ };
219
+ readonly googleAdsCampaignBudgetCreated: {
220
+ readonly account: {
221
+ readonly connectionOptions: readonly [{
222
+ readonly connectionMethodId: "oauth";
223
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
224
+ }];
225
+ readonly serviceId: "google";
226
+ };
227
+ readonly getPrimary: typeof customerPrimary;
228
+ readonly name: string;
229
+ readonly type: "googleAds.campaignBudget.created";
230
+ };
231
+ readonly googleAdsCampaignBudgetRemoved: {
232
+ readonly account: {
233
+ readonly connectionOptions: readonly [{
234
+ readonly connectionMethodId: "oauth";
235
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
236
+ }];
237
+ readonly serviceId: "google";
238
+ };
239
+ readonly getPrimary: typeof customerPrimary;
240
+ readonly name: string;
241
+ readonly type: "googleAds.campaignBudget.removed";
242
+ };
243
+ readonly googleAdsCampaignBudgetUpdated: {
244
+ readonly account: {
245
+ readonly connectionOptions: readonly [{
246
+ readonly connectionMethodId: "oauth";
247
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
248
+ }];
249
+ readonly serviceId: "google";
250
+ };
251
+ readonly getPrimary: typeof customerPrimary;
252
+ readonly name: string;
253
+ readonly type: "googleAds.campaignBudget.updated";
254
+ };
255
+ readonly googleAdsChange: {
256
+ readonly account: {
257
+ readonly connectionOptions: readonly [{
258
+ readonly connectionMethodId: "oauth";
259
+ readonly requiredScopes: readonly ["https://www.googleapis.com/auth/adwords"];
260
+ }];
261
+ readonly serviceId: "google";
262
+ };
263
+ readonly getPrimary: typeof customerPrimary;
264
+ readonly name: string;
265
+ readonly type: "googleAds.change";
266
+ };
267
+ };
268
+ /**
269
+ * Presents the configured customer ID for one Google Ads trigger.
270
+ *
271
+ * @param context - Resolved trigger presentation context.
272
+ * @throws {TypeError} When the trigger configuration has no customer ID.
273
+ */
274
+ declare function customerPrimary(context: TriggerPresentationContext): {
275
+ value: string;
276
+ };
277
+ export {};
@@ -0,0 +1,54 @@
1
+ const GOOGLE_ADS_ACCOUNT = {
2
+ connectionOptions: [
3
+ {
4
+ connectionMethodId: "oauth",
5
+ requiredScopes: ["https://www.googleapis.com/auth/adwords"],
6
+ },
7
+ ],
8
+ serviceId: "google",
9
+ };
10
+ const changeTrigger = (type, name) => ({
11
+ account: GOOGLE_ADS_ACCOUNT,
12
+ getPrimary: customerPrimary,
13
+ name,
14
+ type,
15
+ });
16
+ export const googleAdsTriggerDefinitions = {
17
+ googleAdsAdGroupCreated: changeTrigger("googleAds.adGroup.created", "Google Ads ad group created"),
18
+ googleAdsAdGroupRemoved: changeTrigger("googleAds.adGroup.removed", "Google Ads ad group removed"),
19
+ googleAdsAdGroupUpdated: changeTrigger("googleAds.adGroup.updated", "Google Ads ad group updated"),
20
+ googleAdsAdGroupAdCreated: changeTrigger("googleAds.adGroupAd.created", "Google Ads ad created"),
21
+ googleAdsAdGroupAdRemoved: changeTrigger("googleAds.adGroupAd.removed", "Google Ads ad removed"),
22
+ googleAdsAdGroupAdUpdated: changeTrigger("googleAds.adGroupAd.updated", "Google Ads ad updated"),
23
+ googleAdsAdGroupAssetCreated: changeTrigger("googleAds.adGroupAsset.created", "Google Ads ad-group asset linked"),
24
+ googleAdsAdGroupAssetRemoved: changeTrigger("googleAds.adGroupAsset.removed", "Google Ads ad-group asset unlinked"),
25
+ googleAdsAdGroupAssetUpdated: changeTrigger("googleAds.adGroupAsset.updated", "Google Ads ad-group asset updated"),
26
+ googleAdsAssetCreated: changeTrigger("googleAds.asset.created", "Google Ads asset created"),
27
+ googleAdsAssetRemoved: changeTrigger("googleAds.asset.removed", "Google Ads asset removed"),
28
+ googleAdsAssetUpdated: changeTrigger("googleAds.asset.updated", "Google Ads asset updated"),
29
+ googleAdsCampaignCreated: changeTrigger("googleAds.campaign.created", "Google Ads campaign created"),
30
+ googleAdsCampaignRemoved: changeTrigger("googleAds.campaign.removed", "Google Ads campaign removed"),
31
+ googleAdsCampaignUpdated: changeTrigger("googleAds.campaign.updated", "Google Ads campaign updated"),
32
+ googleAdsCampaignAssetCreated: changeTrigger("googleAds.campaignAsset.created", "Google Ads campaign asset linked"),
33
+ googleAdsCampaignAssetRemoved: changeTrigger("googleAds.campaignAsset.removed", "Google Ads campaign asset unlinked"),
34
+ googleAdsCampaignAssetUpdated: changeTrigger("googleAds.campaignAsset.updated", "Google Ads campaign asset updated"),
35
+ googleAdsCampaignBudgetCreated: changeTrigger("googleAds.campaignBudget.created", "Google Ads campaign budget created"),
36
+ googleAdsCampaignBudgetRemoved: changeTrigger("googleAds.campaignBudget.removed", "Google Ads campaign budget removed"),
37
+ googleAdsCampaignBudgetUpdated: changeTrigger("googleAds.campaignBudget.updated", "Google Ads campaign budget updated"),
38
+ googleAdsChange: changeTrigger("googleAds.change", "Google Ads change"),
39
+ };
40
+ /**
41
+ * Presents the configured customer ID for one Google Ads trigger.
42
+ *
43
+ * @param context - Resolved trigger presentation context.
44
+ * @throws {TypeError} When the trigger configuration has no customer ID.
45
+ */
46
+ function customerPrimary(context) {
47
+ if (typeof context.config !== "object" ||
48
+ context.config === null ||
49
+ !("customerId" in context.config) ||
50
+ typeof context.config.customerId !== "string") {
51
+ throw new TypeError("Google Ads trigger configuration requires a customer ID.");
52
+ }
53
+ return { value: context.config.customerId };
54
+ }