terse-types 0.1.5 → 0.1.6
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/ApiRouteBuilder.d.ts +14 -0
- package/dist/ApiRoutes.json +14 -0
- package/dist/Configs.d.ts +99 -1
- package/dist/Configs.js +119 -4
- package/dist/Events.d.ts +112 -0
- package/dist/Events.js +32 -0
- package/dist/Integrations.d.ts +79 -1
- package/dist/Integrations.js +55 -2
- package/dist/InvalidationKeys.d.ts +3 -0
- package/dist/InvalidationKeys.js +5 -0
- package/dist/ToolDisplayUtils.js +169 -0
- package/dist/Tools.d.ts +7719 -3440
- package/dist/Tools.js +822 -1
- package/dist/TriggerProjections.d.ts +18 -0
- package/dist/TriggerProjections.js +167 -0
- package/dist/Triggers.d.ts +3 -0
- package/dist/Triggers.js +6 -2
- package/dist/types.d.ts +255 -0
- package/dist/types.js +9 -0
- package/package.json +1 -1
- package/dist/AttioRecordFlatten.d.ts +0 -19
- package/dist/AttioRecordFlatten.js +0 -71
- package/dist/OrganizationMetadata.d.ts +0 -0
- package/dist/OrganizationMetadata.js +0 -10
- package/dist/json-schema/terse-types.schema.json +0 -15994
|
@@ -42,6 +42,11 @@ export declare const ApiRoutes: {
|
|
|
42
42
|
CALLBACK: string;
|
|
43
43
|
DELETE_INTEGRATION: string;
|
|
44
44
|
};
|
|
45
|
+
GOOGLE_SEARCH_CONSOLE: {
|
|
46
|
+
INTEGRATIONS: string;
|
|
47
|
+
CALLBACK: string;
|
|
48
|
+
SITES: string;
|
|
49
|
+
};
|
|
45
50
|
NOTION: {
|
|
46
51
|
INTEGRATIONS: string;
|
|
47
52
|
OAUTH_CALLBACK: string;
|
|
@@ -98,6 +103,15 @@ export declare const ApiRoutes: {
|
|
|
98
103
|
INTEGRATIONS: string;
|
|
99
104
|
TEMPLATES: string;
|
|
100
105
|
};
|
|
106
|
+
HIGGSFIELD: {
|
|
107
|
+
INTEGRATIONS: string;
|
|
108
|
+
};
|
|
109
|
+
META_ADS: {
|
|
110
|
+
INTEGRATIONS: string;
|
|
111
|
+
OAUTH_CALLBACK: string;
|
|
112
|
+
AD_ACCOUNTS: string;
|
|
113
|
+
PAGES: string;
|
|
114
|
+
};
|
|
101
115
|
APOLLO: {
|
|
102
116
|
INTEGRATIONS: string;
|
|
103
117
|
};
|
package/dist/ApiRoutes.json
CHANGED
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
"CALLBACK": "/gmail/callback",
|
|
43
43
|
"DELETE_INTEGRATION": "/gmail/delete-integration"
|
|
44
44
|
},
|
|
45
|
+
"GOOGLE_SEARCH_CONSOLE": {
|
|
46
|
+
"INTEGRATIONS": "/google-search-console/integrations",
|
|
47
|
+
"CALLBACK": "/google-search-console/callback",
|
|
48
|
+
"SITES": "/google-search-console/sites"
|
|
49
|
+
},
|
|
45
50
|
"NOTION": {
|
|
46
51
|
"INTEGRATIONS": "/notion/integrations",
|
|
47
52
|
"OAUTH_CALLBACK": "/notion/oauth/callback",
|
|
@@ -98,6 +103,15 @@
|
|
|
98
103
|
"INTEGRATIONS": "/resend/integrations",
|
|
99
104
|
"TEMPLATES": "/resend/templates"
|
|
100
105
|
},
|
|
106
|
+
"HIGGSFIELD": {
|
|
107
|
+
"INTEGRATIONS": "/higgsfield/integrations"
|
|
108
|
+
},
|
|
109
|
+
"META_ADS": {
|
|
110
|
+
"INTEGRATIONS": "/meta-ads/integrations",
|
|
111
|
+
"OAUTH_CALLBACK": "/meta-ads/oauth/callback",
|
|
112
|
+
"AD_ACCOUNTS": "/meta-ads/integrations/:integrationId/adaccounts",
|
|
113
|
+
"PAGES": "/meta-ads/integrations/:integrationId/pages"
|
|
114
|
+
},
|
|
101
115
|
"APOLLO": {
|
|
102
116
|
"INTEGRATIONS": "/apollo/integrations"
|
|
103
117
|
},
|
package/dist/Configs.d.ts
CHANGED
|
@@ -27,7 +27,10 @@ export declare enum ConfigType {
|
|
|
27
27
|
WEBMONITOR = "webmonitor",
|
|
28
28
|
HEY_REACH_INPUT = "hey_reach_input",
|
|
29
29
|
RESEND_OUTPUT = "resend_output",
|
|
30
|
-
APOLLO_OUTPUT = "apollo_output"
|
|
30
|
+
APOLLO_OUTPUT = "apollo_output",
|
|
31
|
+
GOOGLE_SEARCH_CONSOLE_OUTPUT = "google_search_console_output",
|
|
32
|
+
META_ADS_OUTPUT = "meta_ads_output",
|
|
33
|
+
HIGGSFIELD_OUTPUT = "higgsfield_output"
|
|
31
34
|
}
|
|
32
35
|
export declare const configTypeEnum: z.ZodEnum<typeof ConfigType>;
|
|
33
36
|
export declare const frequencyUnitSchema: z.ZodEnum<{
|
|
@@ -244,6 +247,22 @@ export declare const ResendOutputConfigMetadata: {
|
|
|
244
247
|
readonly isInput: false;
|
|
245
248
|
readonly isOutput: true;
|
|
246
249
|
};
|
|
250
|
+
export declare const HiggsfieldOutputConfigMetadata: {
|
|
251
|
+
readonly configType: ConfigType.HIGGSFIELD_OUTPUT;
|
|
252
|
+
readonly name: "Higgsfield";
|
|
253
|
+
readonly description: "Generate ad creative images and animate them into video with Higgsfield";
|
|
254
|
+
readonly integrationType: IntegrationType.HIGGSFIELD;
|
|
255
|
+
readonly isInput: false;
|
|
256
|
+
readonly isOutput: true;
|
|
257
|
+
};
|
|
258
|
+
export declare const MetaAdsOutputConfigMetadata: {
|
|
259
|
+
readonly configType: ConfigType.META_ADS_OUTPUT;
|
|
260
|
+
readonly name: "Meta Ads";
|
|
261
|
+
readonly description: "Read ad performance, sync custom audiences, and send offline conversions to Meta Ads";
|
|
262
|
+
readonly integrationType: IntegrationType.META_ADS;
|
|
263
|
+
readonly isInput: false;
|
|
264
|
+
readonly isOutput: true;
|
|
265
|
+
};
|
|
247
266
|
export declare const ApolloOutputConfigMetadata: {
|
|
248
267
|
readonly configType: ConfigType.APOLLO_OUTPUT;
|
|
249
268
|
readonly name: "Apollo";
|
|
@@ -252,6 +271,14 @@ export declare const ApolloOutputConfigMetadata: {
|
|
|
252
271
|
readonly isInput: false;
|
|
253
272
|
readonly isOutput: true;
|
|
254
273
|
};
|
|
274
|
+
export declare const GoogleSearchConsoleOutputConfigMetadata: {
|
|
275
|
+
readonly configType: ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT;
|
|
276
|
+
readonly name: "Google Search Console";
|
|
277
|
+
readonly description: "Read Search Analytics and manage sites and sitemaps";
|
|
278
|
+
readonly integrationType: IntegrationType.GOOGLE_SEARCH_CONSOLE;
|
|
279
|
+
readonly isInput: false;
|
|
280
|
+
readonly isOutput: true;
|
|
281
|
+
};
|
|
255
282
|
export type ConfigDetailsMap = Record<ConfigType, ConfigDetails>;
|
|
256
283
|
export declare const CONFIG_DETAILS: ConfigDetailsMap;
|
|
257
284
|
export declare const SlackEventType: {
|
|
@@ -542,6 +569,20 @@ export declare class NotionConfig extends BaseConfigInstance<IntegrationType.NOT
|
|
|
542
569
|
isComplete(): boolean;
|
|
543
570
|
formatForAgent(): string;
|
|
544
571
|
}
|
|
572
|
+
export declare const GoogleSearchConsoleConfigSchema: z.ZodObject<{
|
|
573
|
+
integrationId: z.ZodString;
|
|
574
|
+
integrationType: z.ZodLiteral<IntegrationType.GOOGLE_SEARCH_CONSOLE>;
|
|
575
|
+
configType: z.ZodLiteral<ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT>;
|
|
576
|
+
siteUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
577
|
+
}, z.core.$strip>;
|
|
578
|
+
export type GoogleSearchConsoleConfigData = z.infer<typeof GoogleSearchConsoleConfigSchema>;
|
|
579
|
+
export type GoogleSearchConsoleConfigInstance = GoogleSearchConsoleConfigData & ConfigBehavior;
|
|
580
|
+
export declare class GoogleSearchConsoleOutputConfig extends BaseConfigInstance<IntegrationType.GOOGLE_SEARCH_CONSOLE, ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT> implements GoogleSearchConsoleConfigInstance {
|
|
581
|
+
siteUrls: string[];
|
|
582
|
+
constructor(integrationId: string, siteUrls?: string[]);
|
|
583
|
+
isComplete(): boolean;
|
|
584
|
+
formatForAgent(): string;
|
|
585
|
+
}
|
|
545
586
|
export declare const LinearInputConfigSchema: z.ZodObject<{
|
|
546
587
|
integrationId: z.ZodString;
|
|
547
588
|
integrationType: z.ZodLiteral<IntegrationType.LINEAR>;
|
|
@@ -1395,6 +1436,34 @@ export declare class ResendOutputConfig extends BaseConfigInstance<IntegrationTy
|
|
|
1395
1436
|
isComplete(): boolean;
|
|
1396
1437
|
formatForAgent(): string;
|
|
1397
1438
|
}
|
|
1439
|
+
export declare const HiggsfieldOutputConfigSchema: z.ZodObject<{
|
|
1440
|
+
integrationId: z.ZodString;
|
|
1441
|
+
integrationType: z.ZodLiteral<IntegrationType.HIGGSFIELD>;
|
|
1442
|
+
configType: z.ZodLiteral<ConfigType.HIGGSFIELD_OUTPUT>;
|
|
1443
|
+
}, z.core.$strip>;
|
|
1444
|
+
export type HiggsfieldOutputConfigData = z.infer<typeof HiggsfieldOutputConfigSchema>;
|
|
1445
|
+
export type HiggsfieldOutputConfigInstance = HiggsfieldOutputConfigData & ConfigBehavior;
|
|
1446
|
+
export declare class HiggsfieldOutputConfig extends BaseConfigInstance<IntegrationType.HIGGSFIELD, ConfigType.HIGGSFIELD_OUTPUT> implements HiggsfieldOutputConfigInstance {
|
|
1447
|
+
constructor(integrationId: string);
|
|
1448
|
+
isComplete(): boolean;
|
|
1449
|
+
formatForAgent(): string;
|
|
1450
|
+
}
|
|
1451
|
+
export declare const MetaAdsOutputConfigSchema: z.ZodObject<{
|
|
1452
|
+
integrationId: z.ZodString;
|
|
1453
|
+
integrationType: z.ZodLiteral<IntegrationType.META_ADS>;
|
|
1454
|
+
configType: z.ZodLiteral<ConfigType.META_ADS_OUTPUT>;
|
|
1455
|
+
adAccountId: z.ZodNullable<z.ZodString>;
|
|
1456
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
1457
|
+
}, z.core.$strip>;
|
|
1458
|
+
export type MetaAdsOutputConfigData = z.infer<typeof MetaAdsOutputConfigSchema>;
|
|
1459
|
+
export type MetaAdsOutputConfigInstance = MetaAdsOutputConfigData & ConfigBehavior;
|
|
1460
|
+
export declare class MetaAdsOutputConfig extends BaseConfigInstance<IntegrationType.META_ADS, ConfigType.META_ADS_OUTPUT> implements MetaAdsOutputConfigInstance {
|
|
1461
|
+
adAccountId: string | null;
|
|
1462
|
+
pageId: string | null;
|
|
1463
|
+
constructor(integrationId: string, adAccountId?: string | null, pageId?: string | null);
|
|
1464
|
+
isComplete(): boolean;
|
|
1465
|
+
formatForAgent(): string;
|
|
1466
|
+
}
|
|
1398
1467
|
export declare const ApolloOutputConfigSchema: z.ZodObject<{
|
|
1399
1468
|
integrationId: z.ZodString;
|
|
1400
1469
|
integrationType: z.ZodLiteral<IntegrationType.APOLLO>;
|
|
@@ -2135,6 +2204,21 @@ export declare const configDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2135
2204
|
integrationId: z.ZodString;
|
|
2136
2205
|
integrationType: z.ZodLiteral<IntegrationType.APOLLO>;
|
|
2137
2206
|
configType: z.ZodLiteral<ConfigType.APOLLO_OUTPUT>;
|
|
2207
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2208
|
+
integrationId: z.ZodString;
|
|
2209
|
+
integrationType: z.ZodLiteral<IntegrationType.GOOGLE_SEARCH_CONSOLE>;
|
|
2210
|
+
configType: z.ZodLiteral<ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT>;
|
|
2211
|
+
siteUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2213
|
+
integrationId: z.ZodString;
|
|
2214
|
+
integrationType: z.ZodLiteral<IntegrationType.META_ADS>;
|
|
2215
|
+
configType: z.ZodLiteral<ConfigType.META_ADS_OUTPUT>;
|
|
2216
|
+
adAccountId: z.ZodNullable<z.ZodString>;
|
|
2217
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
2218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2219
|
+
integrationId: z.ZodString;
|
|
2220
|
+
integrationType: z.ZodLiteral<IntegrationType.HIGGSFIELD>;
|
|
2221
|
+
configType: z.ZodLiteral<ConfigType.HIGGSFIELD_OUTPUT>;
|
|
2138
2222
|
}, z.core.$strip>]>;
|
|
2139
2223
|
export type ConfigData = z.infer<typeof configDataSchema>;
|
|
2140
2224
|
/** Configs that can serve as triggers (event sources). */
|
|
@@ -2813,6 +2897,17 @@ export declare const skillConfigDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2813
2897
|
integrationId: z.ZodString;
|
|
2814
2898
|
integrationType: z.ZodLiteral<IntegrationType.APOLLO>;
|
|
2815
2899
|
configType: z.ZodLiteral<ConfigType.APOLLO_OUTPUT>;
|
|
2900
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2901
|
+
integrationId: z.ZodString;
|
|
2902
|
+
integrationType: z.ZodLiteral<IntegrationType.GOOGLE_SEARCH_CONSOLE>;
|
|
2903
|
+
configType: z.ZodLiteral<ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT>;
|
|
2904
|
+
siteUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2905
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2906
|
+
integrationId: z.ZodString;
|
|
2907
|
+
integrationType: z.ZodLiteral<IntegrationType.META_ADS>;
|
|
2908
|
+
configType: z.ZodLiteral<ConfigType.META_ADS_OUTPUT>;
|
|
2909
|
+
adAccountId: z.ZodNullable<z.ZodString>;
|
|
2910
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
2816
2911
|
}, z.core.$strip>]>;
|
|
2817
2912
|
export type SkillConfigData = z.infer<typeof skillConfigDataSchema>;
|
|
2818
2913
|
export declare function isConfigComplete(config: ConfigData | undefined): boolean;
|
|
@@ -2845,6 +2940,9 @@ export type ConfigMetadataMap = EnsureExhaustiveMetadata<{
|
|
|
2845
2940
|
[ConfigType.HEY_REACH_INPUT]: typeof HeyReachInputConfig;
|
|
2846
2941
|
[ConfigType.RESEND_OUTPUT]: typeof ResendOutputConfig;
|
|
2847
2942
|
[ConfigType.APOLLO_OUTPUT]: typeof ApolloOutputConfig;
|
|
2943
|
+
[ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT]: typeof GoogleSearchConsoleOutputConfig;
|
|
2944
|
+
[ConfigType.META_ADS_OUTPUT]: typeof MetaAdsOutputConfig;
|
|
2945
|
+
[ConfigType.HIGGSFIELD_OUTPUT]: typeof HiggsfieldOutputConfig;
|
|
2848
2946
|
}>;
|
|
2849
2947
|
export declare const CONFIG_METADATA: ConfigMetadataMap;
|
|
2850
2948
|
export {};
|
package/dist/Configs.js
CHANGED
|
@@ -29,6 +29,9 @@ export var ConfigType;
|
|
|
29
29
|
ConfigType["HEY_REACH_INPUT"] = "hey_reach_input";
|
|
30
30
|
ConfigType["RESEND_OUTPUT"] = "resend_output";
|
|
31
31
|
ConfigType["APOLLO_OUTPUT"] = "apollo_output";
|
|
32
|
+
ConfigType["GOOGLE_SEARCH_CONSOLE_OUTPUT"] = "google_search_console_output";
|
|
33
|
+
ConfigType["META_ADS_OUTPUT"] = "meta_ads_output";
|
|
34
|
+
ConfigType["HIGGSFIELD_OUTPUT"] = "higgsfield_output";
|
|
32
35
|
})(ConfigType || (ConfigType = {}));
|
|
33
36
|
export const configTypeEnum = z.enum(ConfigType);
|
|
34
37
|
export const frequencyUnitSchema = z.enum(["hour", "day", "week"]);
|
|
@@ -233,6 +236,22 @@ export const ResendOutputConfigMetadata = {
|
|
|
233
236
|
isInput: false,
|
|
234
237
|
isOutput: true
|
|
235
238
|
};
|
|
239
|
+
export const HiggsfieldOutputConfigMetadata = {
|
|
240
|
+
configType: ConfigType.HIGGSFIELD_OUTPUT,
|
|
241
|
+
name: "Higgsfield",
|
|
242
|
+
description: "Generate ad creative images and animate them into video with Higgsfield",
|
|
243
|
+
integrationType: IntegrationType.HIGGSFIELD,
|
|
244
|
+
isInput: false,
|
|
245
|
+
isOutput: true
|
|
246
|
+
};
|
|
247
|
+
export const MetaAdsOutputConfigMetadata = {
|
|
248
|
+
configType: ConfigType.META_ADS_OUTPUT,
|
|
249
|
+
name: "Meta Ads",
|
|
250
|
+
description: "Read ad performance, sync custom audiences, and send offline conversions to Meta Ads",
|
|
251
|
+
integrationType: IntegrationType.META_ADS,
|
|
252
|
+
isInput: false,
|
|
253
|
+
isOutput: true
|
|
254
|
+
};
|
|
236
255
|
export const ApolloOutputConfigMetadata = {
|
|
237
256
|
configType: ConfigType.APOLLO_OUTPUT,
|
|
238
257
|
name: "Apollo",
|
|
@@ -241,6 +260,14 @@ export const ApolloOutputConfigMetadata = {
|
|
|
241
260
|
isInput: false,
|
|
242
261
|
isOutput: true
|
|
243
262
|
};
|
|
263
|
+
export const GoogleSearchConsoleOutputConfigMetadata = {
|
|
264
|
+
configType: ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT,
|
|
265
|
+
name: "Google Search Console",
|
|
266
|
+
description: "Read Search Analytics and manage sites and sitemaps",
|
|
267
|
+
integrationType: IntegrationType.GOOGLE_SEARCH_CONSOLE,
|
|
268
|
+
isInput: false,
|
|
269
|
+
isOutput: true
|
|
270
|
+
};
|
|
244
271
|
export const CONFIG_DETAILS = {
|
|
245
272
|
[ConfigType.GMAIL]: GmailConfigMetadata,
|
|
246
273
|
[ConfigType.GMAIL_OUTPUT]: GmailOutputConfigMetadata,
|
|
@@ -267,7 +294,10 @@ export const CONFIG_DETAILS = {
|
|
|
267
294
|
[ConfigType.WEBMONITOR]: WebMonitorConfigMetadata,
|
|
268
295
|
[ConfigType.HEY_REACH_INPUT]: HeyReachInputConfigMetadata,
|
|
269
296
|
[ConfigType.RESEND_OUTPUT]: ResendOutputConfigMetadata,
|
|
270
|
-
[ConfigType.APOLLO_OUTPUT]: ApolloOutputConfigMetadata
|
|
297
|
+
[ConfigType.APOLLO_OUTPUT]: ApolloOutputConfigMetadata,
|
|
298
|
+
[ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT]: GoogleSearchConsoleOutputConfigMetadata,
|
|
299
|
+
[ConfigType.META_ADS_OUTPUT]: MetaAdsOutputConfigMetadata,
|
|
300
|
+
[ConfigType.HIGGSFIELD_OUTPUT]: HiggsfieldOutputConfigMetadata
|
|
271
301
|
};
|
|
272
302
|
// MARK: Event Types — specific events within each integration trigger
|
|
273
303
|
export const SlackEventType = {
|
|
@@ -546,6 +576,24 @@ export class NotionConfig extends BaseConfigInstance {
|
|
|
546
576
|
return parts.join("\n");
|
|
547
577
|
}
|
|
548
578
|
}
|
|
579
|
+
export const GoogleSearchConsoleConfigSchema = ConfigInstanceSchema.extend({
|
|
580
|
+
integrationType: z.literal(IntegrationType.GOOGLE_SEARCH_CONSOLE),
|
|
581
|
+
configType: z.literal(ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT),
|
|
582
|
+
siteUrls: z.array(z.string()).default([])
|
|
583
|
+
});
|
|
584
|
+
export class GoogleSearchConsoleOutputConfig extends BaseConfigInstance {
|
|
585
|
+
siteUrls;
|
|
586
|
+
constructor(integrationId, siteUrls = []) {
|
|
587
|
+
super(integrationId, IntegrationType.GOOGLE_SEARCH_CONSOLE, ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT);
|
|
588
|
+
this.siteUrls = siteUrls;
|
|
589
|
+
}
|
|
590
|
+
isComplete() {
|
|
591
|
+
return (this.siteUrls?.length ?? 0) > 0;
|
|
592
|
+
}
|
|
593
|
+
formatForAgent() {
|
|
594
|
+
return `Type: Google Search Console\nIntegration ID: ${this.integrationId}\nAllowed properties: ${this.siteUrls.join(", ")}`;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
549
597
|
export const LinearInputConfigSchema = ConfigInstanceSchema.extend({
|
|
550
598
|
integrationType: z.literal(IntegrationType.LINEAR),
|
|
551
599
|
configType: z.literal(ConfigType.LINEAR_INPUT),
|
|
@@ -957,6 +1005,49 @@ export class ResendOutputConfig extends BaseConfigInstance {
|
|
|
957
1005
|
return `Type: Resend Output\nIntegration ID: ${this.integrationId}`;
|
|
958
1006
|
}
|
|
959
1007
|
}
|
|
1008
|
+
export const HiggsfieldOutputConfigSchema = ConfigInstanceSchema.extend({
|
|
1009
|
+
integrationType: z.literal(IntegrationType.HIGGSFIELD),
|
|
1010
|
+
configType: z.literal(ConfigType.HIGGSFIELD_OUTPUT)
|
|
1011
|
+
});
|
|
1012
|
+
export class HiggsfieldOutputConfig extends BaseConfigInstance {
|
|
1013
|
+
constructor(integrationId) {
|
|
1014
|
+
super(integrationId, IntegrationType.HIGGSFIELD, ConfigType.HIGGSFIELD_OUTPUT);
|
|
1015
|
+
}
|
|
1016
|
+
isComplete() {
|
|
1017
|
+
return !!this.integrationId;
|
|
1018
|
+
}
|
|
1019
|
+
formatForAgent() {
|
|
1020
|
+
return `Type: Higgsfield Output\nIntegration ID: ${this.integrationId}`;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
export const MetaAdsOutputConfigSchema = ConfigInstanceSchema.extend({
|
|
1024
|
+
integrationType: z.literal(IntegrationType.META_ADS),
|
|
1025
|
+
configType: z.literal(ConfigType.META_ADS_OUTPUT),
|
|
1026
|
+
adAccountId: z.string().nullable(),
|
|
1027
|
+
pageId: z.string().nullable()
|
|
1028
|
+
});
|
|
1029
|
+
export class MetaAdsOutputConfig extends BaseConfigInstance {
|
|
1030
|
+
adAccountId;
|
|
1031
|
+
pageId;
|
|
1032
|
+
constructor(integrationId, adAccountId = null, pageId = null) {
|
|
1033
|
+
super(integrationId, IntegrationType.META_ADS, ConfigType.META_ADS_OUTPUT);
|
|
1034
|
+
this.adAccountId = adAccountId;
|
|
1035
|
+
this.pageId = pageId;
|
|
1036
|
+
}
|
|
1037
|
+
isComplete() {
|
|
1038
|
+
return !!this.integrationId;
|
|
1039
|
+
}
|
|
1040
|
+
formatForAgent() {
|
|
1041
|
+
const parts = [`Type: Meta Ads Output`, `Integration ID: ${this.integrationId}`];
|
|
1042
|
+
if (this.adAccountId) {
|
|
1043
|
+
parts.push(`Ad Account: ${this.adAccountId}`);
|
|
1044
|
+
}
|
|
1045
|
+
if (this.pageId) {
|
|
1046
|
+
parts.push(`Page: ${this.pageId}`);
|
|
1047
|
+
}
|
|
1048
|
+
return parts.join("\n");
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
960
1051
|
export const ApolloOutputConfigSchema = ConfigInstanceSchema.extend({
|
|
961
1052
|
integrationType: z.literal(IntegrationType.APOLLO),
|
|
962
1053
|
configType: z.literal(ConfigType.APOLLO_OUTPUT)
|
|
@@ -1089,7 +1180,10 @@ export const configDataSchema = z.union([
|
|
|
1089
1180
|
WebMonitorConfigSchema,
|
|
1090
1181
|
HeyReachInputConfigSchema,
|
|
1091
1182
|
ResendOutputConfigSchema,
|
|
1092
|
-
ApolloOutputConfigSchema
|
|
1183
|
+
ApolloOutputConfigSchema,
|
|
1184
|
+
GoogleSearchConsoleConfigSchema,
|
|
1185
|
+
MetaAdsOutputConfigSchema,
|
|
1186
|
+
HiggsfieldOutputConfigSchema
|
|
1093
1187
|
]);
|
|
1094
1188
|
/** Configs that can serve as triggers (event sources). */
|
|
1095
1189
|
export const triggerConfigDataSchema = z.union([
|
|
@@ -1122,7 +1216,9 @@ export const skillConfigDataSchema = z.union([
|
|
|
1122
1216
|
AttioOutputConfigSchema,
|
|
1123
1217
|
SnowflakeOutputConfigSchema,
|
|
1124
1218
|
ResendOutputConfigSchema,
|
|
1125
|
-
ApolloOutputConfigSchema
|
|
1219
|
+
ApolloOutputConfigSchema,
|
|
1220
|
+
GoogleSearchConsoleConfigSchema,
|
|
1221
|
+
MetaAdsOutputConfigSchema
|
|
1126
1222
|
]);
|
|
1127
1223
|
export function isConfigComplete(config) {
|
|
1128
1224
|
if (!config) {
|
|
@@ -1145,12 +1241,16 @@ export function isConfigComplete(config) {
|
|
|
1145
1241
|
return !!(config.channelId || (config.userIds?.length ?? 0) > 0 || config.listenToUserDms);
|
|
1146
1242
|
case ConfigType.NOTION:
|
|
1147
1243
|
return (config.databaseIds?.length ?? 0) > 0 || (config.pageIds?.length ?? 0) > 0;
|
|
1244
|
+
case ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT:
|
|
1245
|
+
return (config.siteUrls?.length ?? 0) > 0;
|
|
1148
1246
|
case ConfigType.LINEAR_OUTPUT:
|
|
1149
1247
|
case ConfigType.DATADOG:
|
|
1150
1248
|
case ConfigType.WORKOS_OUTPUT:
|
|
1151
1249
|
case ConfigType.SNOWFLAKE_OUTPUT:
|
|
1152
1250
|
case ConfigType.RESEND_OUTPUT:
|
|
1153
1251
|
case ConfigType.APOLLO_OUTPUT:
|
|
1252
|
+
case ConfigType.META_ADS_OUTPUT:
|
|
1253
|
+
case ConfigType.HIGGSFIELD_OUTPUT:
|
|
1154
1254
|
return !!config.integrationId;
|
|
1155
1255
|
case ConfigType.GITHUB:
|
|
1156
1256
|
return (config.repositoryIds?.length ?? 0) > 0;
|
|
@@ -1209,6 +1309,8 @@ export function formatConfigForAgent(config) {
|
|
|
1209
1309
|
return `Type: Gmail Output\nIntegration ID: ${config.integrationId}`;
|
|
1210
1310
|
case ConfigType.GMAIL_DRAFT_OUTPUT:
|
|
1211
1311
|
return `Type: Gmail Draft Output\nIntegration ID: ${config.integrationId}`;
|
|
1312
|
+
case ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT:
|
|
1313
|
+
return `Type: Google Search Console\nIntegration ID: ${config.integrationId}\nAllowed properties: ${config.siteUrls.join(", ")}`;
|
|
1212
1314
|
case ConfigType.NOTION: {
|
|
1213
1315
|
const parts = [`Type: Notion`, `Integration ID: ${config.integrationId}`];
|
|
1214
1316
|
const dbIds = config.databaseIds ?? [];
|
|
@@ -1318,6 +1420,16 @@ export function formatConfigForAgent(config) {
|
|
|
1318
1420
|
return `Type: Resend Output\nIntegration ID: ${config.integrationId}`;
|
|
1319
1421
|
case ConfigType.APOLLO_OUTPUT:
|
|
1320
1422
|
return `Type: Apollo Output\nIntegration ID: ${config.integrationId}`;
|
|
1423
|
+
case ConfigType.HIGGSFIELD_OUTPUT:
|
|
1424
|
+
return `Type: Higgsfield Output\nIntegration ID: ${config.integrationId}`;
|
|
1425
|
+
case ConfigType.META_ADS_OUTPUT: {
|
|
1426
|
+
const parts = [`Type: Meta Ads Output`, `Integration ID: ${config.integrationId}`];
|
|
1427
|
+
if (config.adAccountId)
|
|
1428
|
+
parts.push(`Ad Account: ${config.adAccountId}`);
|
|
1429
|
+
if (config.pageId)
|
|
1430
|
+
parts.push(`Page: ${config.pageId}`);
|
|
1431
|
+
return parts.join("\n");
|
|
1432
|
+
}
|
|
1321
1433
|
case ConfigType.WEBHOOK_INPUT:
|
|
1322
1434
|
return "Type: Webhook Trigger";
|
|
1323
1435
|
case ConfigType.WEBMONITOR: {
|
|
@@ -1360,5 +1472,8 @@ export const CONFIG_METADATA = {
|
|
|
1360
1472
|
[ConfigType.WEBMONITOR]: WebMonitorConfig,
|
|
1361
1473
|
[ConfigType.HEY_REACH_INPUT]: HeyReachInputConfig,
|
|
1362
1474
|
[ConfigType.RESEND_OUTPUT]: ResendOutputConfig,
|
|
1363
|
-
[ConfigType.APOLLO_OUTPUT]: ApolloOutputConfig
|
|
1475
|
+
[ConfigType.APOLLO_OUTPUT]: ApolloOutputConfig,
|
|
1476
|
+
[ConfigType.GOOGLE_SEARCH_CONSOLE_OUTPUT]: GoogleSearchConsoleOutputConfig,
|
|
1477
|
+
[ConfigType.META_ADS_OUTPUT]: MetaAdsOutputConfig,
|
|
1478
|
+
[ConfigType.HIGGSFIELD_OUTPUT]: HiggsfieldOutputConfig
|
|
1364
1479
|
};
|
package/dist/Events.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const eventTypeSchema: z.ZodEnum<{
|
|
3
|
+
JOB_CREATED: "JOB_CREATED";
|
|
4
|
+
AUTOMATION_RAN: "AUTOMATION_RAN";
|
|
5
|
+
}>;
|
|
6
|
+
export type EventType = z.infer<typeof eventTypeSchema>;
|
|
7
|
+
declare const jobCreatedEventSchema: z.ZodObject<{
|
|
8
|
+
eventType: z.ZodLiteral<"JOB_CREATED">;
|
|
9
|
+
jobId: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type JobCreatedEvent = z.infer<typeof jobCreatedEventSchema>;
|
|
12
|
+
declare const automationSnapshotSchema: z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
organizationId: z.ZodString;
|
|
16
|
+
projectId: z.ZodString;
|
|
17
|
+
userId: z.ZodString;
|
|
18
|
+
requireApproval: z.ZodBoolean;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type AutomationSnapshot = z.infer<typeof automationSnapshotSchema>;
|
|
21
|
+
declare const runSnapshotSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
status: z.ZodEnum<{
|
|
24
|
+
readonly SUCCESS: "success";
|
|
25
|
+
readonly FAILED: "failed";
|
|
26
|
+
readonly CANCELLED: "cancelled";
|
|
27
|
+
readonly SKIPPED: "skipped";
|
|
28
|
+
readonly IN_PROGRESS: "in_progress";
|
|
29
|
+
readonly AWAITING_APPROVAL: "awaiting_approval";
|
|
30
|
+
}>;
|
|
31
|
+
isManuallyTriggered: z.ZodBoolean;
|
|
32
|
+
startedAt: z.ZodString;
|
|
33
|
+
trigger: z.ZodObject<{
|
|
34
|
+
event: z.ZodString;
|
|
35
|
+
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
36
|
+
source: z.ZodString;
|
|
37
|
+
title: z.ZodOptional<z.ZodString>;
|
|
38
|
+
subheader: z.ZodOptional<z.ZodString>;
|
|
39
|
+
url: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type RunSnapshot = z.infer<typeof runSnapshotSchema>;
|
|
43
|
+
declare const automationRanEventSchema: z.ZodObject<{
|
|
44
|
+
eventType: z.ZodLiteral<"AUTOMATION_RAN">;
|
|
45
|
+
automation: z.ZodObject<{
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
organizationId: z.ZodString;
|
|
49
|
+
projectId: z.ZodString;
|
|
50
|
+
userId: z.ZodString;
|
|
51
|
+
requireApproval: z.ZodBoolean;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
run: z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
status: z.ZodEnum<{
|
|
56
|
+
readonly SUCCESS: "success";
|
|
57
|
+
readonly FAILED: "failed";
|
|
58
|
+
readonly CANCELLED: "cancelled";
|
|
59
|
+
readonly SKIPPED: "skipped";
|
|
60
|
+
readonly IN_PROGRESS: "in_progress";
|
|
61
|
+
readonly AWAITING_APPROVAL: "awaiting_approval";
|
|
62
|
+
}>;
|
|
63
|
+
isManuallyTriggered: z.ZodBoolean;
|
|
64
|
+
startedAt: z.ZodString;
|
|
65
|
+
trigger: z.ZodObject<{
|
|
66
|
+
event: z.ZodString;
|
|
67
|
+
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
68
|
+
source: z.ZodString;
|
|
69
|
+
title: z.ZodOptional<z.ZodString>;
|
|
70
|
+
subheader: z.ZodOptional<z.ZodString>;
|
|
71
|
+
url: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type AutomationRanEvent = z.infer<typeof automationRanEventSchema>;
|
|
76
|
+
export declare const domainEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
+
eventType: z.ZodLiteral<"JOB_CREATED">;
|
|
78
|
+
jobId: z.ZodString;
|
|
79
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
+
eventType: z.ZodLiteral<"AUTOMATION_RAN">;
|
|
81
|
+
automation: z.ZodObject<{
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
name: z.ZodString;
|
|
84
|
+
organizationId: z.ZodString;
|
|
85
|
+
projectId: z.ZodString;
|
|
86
|
+
userId: z.ZodString;
|
|
87
|
+
requireApproval: z.ZodBoolean;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
run: z.ZodObject<{
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
status: z.ZodEnum<{
|
|
92
|
+
readonly SUCCESS: "success";
|
|
93
|
+
readonly FAILED: "failed";
|
|
94
|
+
readonly CANCELLED: "cancelled";
|
|
95
|
+
readonly SKIPPED: "skipped";
|
|
96
|
+
readonly IN_PROGRESS: "in_progress";
|
|
97
|
+
readonly AWAITING_APPROVAL: "awaiting_approval";
|
|
98
|
+
}>;
|
|
99
|
+
isManuallyTriggered: z.ZodBoolean;
|
|
100
|
+
startedAt: z.ZodString;
|
|
101
|
+
trigger: z.ZodObject<{
|
|
102
|
+
event: z.ZodString;
|
|
103
|
+
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
104
|
+
source: z.ZodString;
|
|
105
|
+
title: z.ZodOptional<z.ZodString>;
|
|
106
|
+
subheader: z.ZodOptional<z.ZodString>;
|
|
107
|
+
url: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
}, z.core.$strip>], "eventType">;
|
|
111
|
+
export type DomainEvent = z.infer<typeof domainEventSchema>;
|
|
112
|
+
export {};
|
package/dist/Events.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { runHistoryStatusSchema } from "./RunHistoryTypes.js";
|
|
3
|
+
import { runHistoryTriggerSchema } from "./types.js";
|
|
4
|
+
export const eventTypeSchema = z.enum(["JOB_CREATED", "AUTOMATION_RAN"]);
|
|
5
|
+
const baseEventSchema = z.object({
|
|
6
|
+
eventType: eventTypeSchema
|
|
7
|
+
});
|
|
8
|
+
const jobCreatedEventSchema = baseEventSchema.extend({
|
|
9
|
+
eventType: z.literal("JOB_CREATED"),
|
|
10
|
+
jobId: z.string()
|
|
11
|
+
});
|
|
12
|
+
const automationSnapshotSchema = z.object({
|
|
13
|
+
id: z.string(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
organizationId: z.string(),
|
|
16
|
+
projectId: z.string(),
|
|
17
|
+
userId: z.string(),
|
|
18
|
+
requireApproval: z.boolean()
|
|
19
|
+
});
|
|
20
|
+
const runSnapshotSchema = z.object({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
status: runHistoryStatusSchema,
|
|
23
|
+
isManuallyTriggered: z.boolean(),
|
|
24
|
+
startedAt: z.string().datetime(),
|
|
25
|
+
trigger: runHistoryTriggerSchema
|
|
26
|
+
});
|
|
27
|
+
const automationRanEventSchema = baseEventSchema.extend({
|
|
28
|
+
eventType: z.literal("AUTOMATION_RAN"),
|
|
29
|
+
automation: automationSnapshotSchema,
|
|
30
|
+
run: runSnapshotSchema
|
|
31
|
+
});
|
|
32
|
+
export const domainEventSchema = z.discriminatedUnion("eventType", [jobCreatedEventSchema, automationRanEventSchema]);
|