terse-types 0.0.31 → 0.0.33
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 +5 -0
- package/dist/ApiRoutes.json +6 -1
- package/dist/Configs.d.ts +102 -1
- package/dist/Configs.js +63 -4
- package/dist/Integrations.d.ts +13 -0
- package/dist/Integrations.js +11 -1
- package/dist/Tools.d.ts +6 -3
- package/dist/Tools.js +16 -2
- package/dist/TriggerPresenters.js +62 -0
- package/dist/Triggers.d.ts +2201 -0
- package/dist/Triggers.js +111 -2
- package/dist/json-schema/terse-types.schema.json +15994 -0
- package/dist/types.d.ts +4612 -56
- package/package.json +1 -1
- package/dist/ACL.d.ts +0 -375
- package/dist/ACL.js +0 -105
- package/dist/ACLPolicy.d.ts +0 -17
- package/dist/ACLPolicy.js +0 -18
- package/dist/getConfigACLRules.d.ts +0 -10
- package/dist/getConfigACLRules.js +0 -313
|
@@ -89,6 +89,10 @@ export declare const ApiRoutes: {
|
|
|
89
89
|
OAUTH_CALLBACK: string;
|
|
90
90
|
OBJECTS: string;
|
|
91
91
|
};
|
|
92
|
+
HEY_REACH: {
|
|
93
|
+
INTEGRATIONS: string;
|
|
94
|
+
CAMPAIGNS: string;
|
|
95
|
+
};
|
|
92
96
|
AGENTS: {
|
|
93
97
|
LIST: string;
|
|
94
98
|
RECENT: string;
|
|
@@ -168,6 +172,7 @@ export declare const ApiRoutes: {
|
|
|
168
172
|
WEBMONITOR_BY_INPUT_ID: string;
|
|
169
173
|
WORKOS_TRIGGER_BY_INTEGRATION_ID: string;
|
|
170
174
|
WEBHOOK_TRIGGER_BY_TOKEN: string;
|
|
175
|
+
HEY_REACH_BY_INTEGRATION_ID: string;
|
|
171
176
|
};
|
|
172
177
|
SCHEDULE: {
|
|
173
178
|
TRIGGER_BY_INPUT_ID: string;
|
package/dist/ApiRoutes.json
CHANGED
|
@@ -89,6 +89,10 @@
|
|
|
89
89
|
"OAUTH_CALLBACK": "/attio/oauth/callback",
|
|
90
90
|
"OBJECTS": "/attio/integrations/:integrationId/objects"
|
|
91
91
|
},
|
|
92
|
+
"HEY_REACH": {
|
|
93
|
+
"INTEGRATIONS": "/heyreach/integrations",
|
|
94
|
+
"CAMPAIGNS": "/heyreach/campaigns"
|
|
95
|
+
},
|
|
92
96
|
"AGENTS": {
|
|
93
97
|
"LIST": "/agents",
|
|
94
98
|
"RECENT": "/agents/recent",
|
|
@@ -167,7 +171,8 @@
|
|
|
167
171
|
"SCHEDULE_BY_INPUT_ID": "/webhooks/schedule/:inputId",
|
|
168
172
|
"WEBMONITOR_BY_INPUT_ID": "/webhooks/webmonitor/:inputId",
|
|
169
173
|
"WORKOS_TRIGGER_BY_INTEGRATION_ID": "/webhooks/workos-trigger/:integrationId",
|
|
170
|
-
"WEBHOOK_TRIGGER_BY_TOKEN": "/webhooks/trigger/:webhookToken"
|
|
174
|
+
"WEBHOOK_TRIGGER_BY_TOKEN": "/webhooks/trigger/:webhookToken",
|
|
175
|
+
"HEY_REACH_BY_INTEGRATION_ID": "/webhooks/heyreach/:triggerId"
|
|
171
176
|
},
|
|
172
177
|
"SCHEDULE": {
|
|
173
178
|
"TRIGGER_BY_INPUT_ID": "/schedule/trigger/:inputId",
|
package/dist/Configs.d.ts
CHANGED
|
@@ -21,7 +21,8 @@ export declare enum ConfigType {
|
|
|
21
21
|
ATTIO_OUTPUT = "attio_output",
|
|
22
22
|
SNOWFLAKE_OUTPUT = "snowflake_output",
|
|
23
23
|
WEBHOOK_INPUT = "webhook_input",
|
|
24
|
-
WEBMONITOR = "webmonitor"
|
|
24
|
+
WEBMONITOR = "webmonitor",
|
|
25
|
+
HEY_REACH_INPUT = "hey_reach_input"
|
|
25
26
|
}
|
|
26
27
|
export declare const configTypeEnum: z.ZodEnum<typeof ConfigType>;
|
|
27
28
|
export declare const frequencyUnitSchema: z.ZodEnum<{
|
|
@@ -206,6 +207,14 @@ export declare const WebMonitorConfigMetadata: {
|
|
|
206
207
|
readonly isInput: true;
|
|
207
208
|
readonly isOutput: false;
|
|
208
209
|
};
|
|
210
|
+
export declare const HeyReachInputConfigMetadata: {
|
|
211
|
+
readonly configType: ConfigType.HEY_REACH_INPUT;
|
|
212
|
+
readonly name: "HeyReach";
|
|
213
|
+
readonly description: "Trigger on HeyReach LinkedIn outreach events";
|
|
214
|
+
readonly integrationType: IntegrationType.HEY_REACH;
|
|
215
|
+
readonly isInput: true;
|
|
216
|
+
readonly isOutput: false;
|
|
217
|
+
};
|
|
209
218
|
export type ConfigDetailsMap = Record<ConfigType, ConfigDetails>;
|
|
210
219
|
export declare const CONFIG_DETAILS: ConfigDetailsMap;
|
|
211
220
|
export declare const SlackEventType: {
|
|
@@ -252,6 +261,33 @@ export declare const gmailEventTypeSchema: z.ZodEnum<{
|
|
|
252
261
|
readonly EMAIL_RECEIVED: "email.received";
|
|
253
262
|
}>;
|
|
254
263
|
export type GmailEventType = z.infer<typeof gmailEventTypeSchema>;
|
|
264
|
+
export declare const HeyReachEventType: {
|
|
265
|
+
readonly CONNECTION_REQUEST_SENT: "CONNECTION_REQUEST_SENT";
|
|
266
|
+
readonly CONNECTION_REQUEST_ACCEPTED: "CONNECTION_REQUEST_ACCEPTED";
|
|
267
|
+
readonly MESSAGE_SENT: "MESSAGE_SENT";
|
|
268
|
+
readonly MESSAGE_REPLY_RECEIVED: "MESSAGE_REPLY_RECEIVED";
|
|
269
|
+
readonly INMAIL_SENT: "INMAIL_SENT";
|
|
270
|
+
readonly INMAIL_REPLY_RECEIVED: "INMAIL_REPLY_RECEIVED";
|
|
271
|
+
readonly FOLLOW_SENT: "FOLLOW_SENT";
|
|
272
|
+
readonly LIKED_POST: "LIKED_POST";
|
|
273
|
+
readonly VIEWED_PROFILE: "VIEWED_PROFILE";
|
|
274
|
+
readonly CAMPAIGN_COMPLETED: "CAMPAIGN_COMPLETED";
|
|
275
|
+
readonly LEAD_TAG_UPDATED: "LEAD_TAG_UPDATED";
|
|
276
|
+
};
|
|
277
|
+
export declare const heyReachEventTypeSchema: z.ZodEnum<{
|
|
278
|
+
readonly CONNECTION_REQUEST_SENT: "CONNECTION_REQUEST_SENT";
|
|
279
|
+
readonly CONNECTION_REQUEST_ACCEPTED: "CONNECTION_REQUEST_ACCEPTED";
|
|
280
|
+
readonly MESSAGE_SENT: "MESSAGE_SENT";
|
|
281
|
+
readonly MESSAGE_REPLY_RECEIVED: "MESSAGE_REPLY_RECEIVED";
|
|
282
|
+
readonly INMAIL_SENT: "INMAIL_SENT";
|
|
283
|
+
readonly INMAIL_REPLY_RECEIVED: "INMAIL_REPLY_RECEIVED";
|
|
284
|
+
readonly FOLLOW_SENT: "FOLLOW_SENT";
|
|
285
|
+
readonly LIKED_POST: "LIKED_POST";
|
|
286
|
+
readonly VIEWED_PROFILE: "VIEWED_PROFILE";
|
|
287
|
+
readonly CAMPAIGN_COMPLETED: "CAMPAIGN_COMPLETED";
|
|
288
|
+
readonly LEAD_TAG_UPDATED: "LEAD_TAG_UPDATED";
|
|
289
|
+
}>;
|
|
290
|
+
export type HeyReachEventType = z.infer<typeof heyReachEventTypeSchema>;
|
|
255
291
|
export declare const WorkOSEventType: {
|
|
256
292
|
readonly USER_CREATED: "user.created";
|
|
257
293
|
readonly USER_UPDATED: "user.updated";
|
|
@@ -479,6 +515,34 @@ export declare const GitHubSkillConfigSchema: z.ZodObject<{
|
|
|
479
515
|
repositoryIds: z.ZodArray<z.ZodNumber>;
|
|
480
516
|
}, z.core.$strip>;
|
|
481
517
|
export type GitHubSkillConfigData = z.infer<typeof GitHubSkillConfigSchema>;
|
|
518
|
+
export declare const HeyReachInputConfigSchema: z.ZodObject<{
|
|
519
|
+
integrationId: z.ZodString;
|
|
520
|
+
integrationType: z.ZodLiteral<IntegrationType.HEY_REACH>;
|
|
521
|
+
configType: z.ZodLiteral<ConfigType.HEY_REACH_INPUT>;
|
|
522
|
+
eventType: z.ZodEnum<{
|
|
523
|
+
readonly CONNECTION_REQUEST_SENT: "CONNECTION_REQUEST_SENT";
|
|
524
|
+
readonly CONNECTION_REQUEST_ACCEPTED: "CONNECTION_REQUEST_ACCEPTED";
|
|
525
|
+
readonly MESSAGE_SENT: "MESSAGE_SENT";
|
|
526
|
+
readonly MESSAGE_REPLY_RECEIVED: "MESSAGE_REPLY_RECEIVED";
|
|
527
|
+
readonly INMAIL_SENT: "INMAIL_SENT";
|
|
528
|
+
readonly INMAIL_REPLY_RECEIVED: "INMAIL_REPLY_RECEIVED";
|
|
529
|
+
readonly FOLLOW_SENT: "FOLLOW_SENT";
|
|
530
|
+
readonly LIKED_POST: "LIKED_POST";
|
|
531
|
+
readonly VIEWED_PROFILE: "VIEWED_PROFILE";
|
|
532
|
+
readonly CAMPAIGN_COMPLETED: "CAMPAIGN_COMPLETED";
|
|
533
|
+
readonly LEAD_TAG_UPDATED: "LEAD_TAG_UPDATED";
|
|
534
|
+
}>;
|
|
535
|
+
campaignIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
536
|
+
}, z.core.$strip>;
|
|
537
|
+
export type HeyReachInputConfigData = z.infer<typeof HeyReachInputConfigSchema>;
|
|
538
|
+
export type HeyReachInputConfigInstance = HeyReachInputConfigData & ConfigBehavior;
|
|
539
|
+
export declare class HeyReachInputConfig extends BaseConfigInstance<IntegrationType.HEY_REACH, ConfigType.HEY_REACH_INPUT> implements HeyReachInputConfigInstance {
|
|
540
|
+
eventType: HeyReachEventType;
|
|
541
|
+
campaignIds: string[];
|
|
542
|
+
constructor(integrationId: string, eventType: HeyReachEventType, campaignIds?: string[]);
|
|
543
|
+
isComplete(): boolean;
|
|
544
|
+
formatForAgent(): string;
|
|
545
|
+
}
|
|
482
546
|
export declare const PosthogConfigSchema: z.ZodObject<{
|
|
483
547
|
integrationId: z.ZodString;
|
|
484
548
|
integrationType: z.ZodLiteral<IntegrationType.POSTHOG>;
|
|
@@ -847,6 +911,24 @@ export declare const configDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
847
911
|
type: z.ZodLiteral<"json">;
|
|
848
912
|
jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
849
913
|
}, z.core.$strip>>>>;
|
|
914
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
915
|
+
integrationId: z.ZodString;
|
|
916
|
+
integrationType: z.ZodLiteral<IntegrationType.HEY_REACH>;
|
|
917
|
+
configType: z.ZodLiteral<ConfigType.HEY_REACH_INPUT>;
|
|
918
|
+
eventType: z.ZodEnum<{
|
|
919
|
+
readonly CONNECTION_REQUEST_SENT: "CONNECTION_REQUEST_SENT";
|
|
920
|
+
readonly CONNECTION_REQUEST_ACCEPTED: "CONNECTION_REQUEST_ACCEPTED";
|
|
921
|
+
readonly MESSAGE_SENT: "MESSAGE_SENT";
|
|
922
|
+
readonly MESSAGE_REPLY_RECEIVED: "MESSAGE_REPLY_RECEIVED";
|
|
923
|
+
readonly INMAIL_SENT: "INMAIL_SENT";
|
|
924
|
+
readonly INMAIL_REPLY_RECEIVED: "INMAIL_REPLY_RECEIVED";
|
|
925
|
+
readonly FOLLOW_SENT: "FOLLOW_SENT";
|
|
926
|
+
readonly LIKED_POST: "LIKED_POST";
|
|
927
|
+
readonly VIEWED_PROFILE: "VIEWED_PROFILE";
|
|
928
|
+
readonly CAMPAIGN_COMPLETED: "CAMPAIGN_COMPLETED";
|
|
929
|
+
readonly LEAD_TAG_UPDATED: "LEAD_TAG_UPDATED";
|
|
930
|
+
}>;
|
|
931
|
+
campaignIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
850
932
|
}, z.core.$strip>]>;
|
|
851
933
|
export type ConfigData = z.infer<typeof configDataSchema>;
|
|
852
934
|
/** Configs that can serve as triggers (event sources). */
|
|
@@ -939,6 +1021,24 @@ export declare const triggerConfigDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
939
1021
|
type: z.ZodLiteral<"json">;
|
|
940
1022
|
jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
941
1023
|
}, z.core.$strip>>>>;
|
|
1024
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1025
|
+
integrationId: z.ZodString;
|
|
1026
|
+
integrationType: z.ZodLiteral<IntegrationType.HEY_REACH>;
|
|
1027
|
+
configType: z.ZodLiteral<ConfigType.HEY_REACH_INPUT>;
|
|
1028
|
+
eventType: z.ZodEnum<{
|
|
1029
|
+
readonly CONNECTION_REQUEST_SENT: "CONNECTION_REQUEST_SENT";
|
|
1030
|
+
readonly CONNECTION_REQUEST_ACCEPTED: "CONNECTION_REQUEST_ACCEPTED";
|
|
1031
|
+
readonly MESSAGE_SENT: "MESSAGE_SENT";
|
|
1032
|
+
readonly MESSAGE_REPLY_RECEIVED: "MESSAGE_REPLY_RECEIVED";
|
|
1033
|
+
readonly INMAIL_SENT: "INMAIL_SENT";
|
|
1034
|
+
readonly INMAIL_REPLY_RECEIVED: "INMAIL_REPLY_RECEIVED";
|
|
1035
|
+
readonly FOLLOW_SENT: "FOLLOW_SENT";
|
|
1036
|
+
readonly LIKED_POST: "LIKED_POST";
|
|
1037
|
+
readonly VIEWED_PROFILE: "VIEWED_PROFILE";
|
|
1038
|
+
readonly CAMPAIGN_COMPLETED: "CAMPAIGN_COMPLETED";
|
|
1039
|
+
readonly LEAD_TAG_UPDATED: "LEAD_TAG_UPDATED";
|
|
1040
|
+
}>;
|
|
1041
|
+
campaignIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
942
1042
|
}, z.core.$strip>]>;
|
|
943
1043
|
export type TriggerConfigData = z.infer<typeof triggerConfigDataSchema>;
|
|
944
1044
|
/** Configs that can serve as skills (tools / outputs). */
|
|
@@ -1044,6 +1144,7 @@ export type ConfigMetadataMap = EnsureExhaustiveMetadata<{
|
|
|
1044
1144
|
[ConfigType.SNOWFLAKE_OUTPUT]: typeof SnowflakeOutputConfig;
|
|
1045
1145
|
[ConfigType.WEBHOOK_INPUT]: typeof WebhookInputConfig;
|
|
1046
1146
|
[ConfigType.WEBMONITOR]: typeof WebMonitorConfig;
|
|
1147
|
+
[ConfigType.HEY_REACH_INPUT]: typeof HeyReachInputConfig;
|
|
1047
1148
|
}>;
|
|
1048
1149
|
export declare const CONFIG_METADATA: ConfigMetadataMap;
|
|
1049
1150
|
export {};
|
package/dist/Configs.js
CHANGED
|
@@ -23,6 +23,7 @@ export var ConfigType;
|
|
|
23
23
|
ConfigType["SNOWFLAKE_OUTPUT"] = "snowflake_output";
|
|
24
24
|
ConfigType["WEBHOOK_INPUT"] = "webhook_input";
|
|
25
25
|
ConfigType["WEBMONITOR"] = "webmonitor";
|
|
26
|
+
ConfigType["HEY_REACH_INPUT"] = "hey_reach_input";
|
|
26
27
|
})(ConfigType || (ConfigType = {}));
|
|
27
28
|
export const configTypeEnum = z.enum(ConfigType);
|
|
28
29
|
export const frequencyUnitSchema = z.enum(["hour", "day", "week"]);
|
|
@@ -195,6 +196,14 @@ export const WebMonitorConfigMetadata = {
|
|
|
195
196
|
isInput: true,
|
|
196
197
|
isOutput: false
|
|
197
198
|
};
|
|
199
|
+
export const HeyReachInputConfigMetadata = {
|
|
200
|
+
configType: ConfigType.HEY_REACH_INPUT,
|
|
201
|
+
name: "HeyReach",
|
|
202
|
+
description: "Trigger on HeyReach LinkedIn outreach events",
|
|
203
|
+
integrationType: IntegrationType.HEY_REACH,
|
|
204
|
+
isInput: true,
|
|
205
|
+
isOutput: false
|
|
206
|
+
};
|
|
198
207
|
export const CONFIG_DETAILS = {
|
|
199
208
|
[ConfigType.GMAIL]: GmailConfigMetadata,
|
|
200
209
|
[ConfigType.GMAIL_OUTPUT]: GmailOutputConfigMetadata,
|
|
@@ -216,7 +225,8 @@ export const CONFIG_DETAILS = {
|
|
|
216
225
|
[ConfigType.ATTIO_OUTPUT]: AttioOutputConfigMetadata,
|
|
217
226
|
[ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfigMetadata,
|
|
218
227
|
[ConfigType.WEBHOOK_INPUT]: WebhookInputConfigMetadata,
|
|
219
|
-
[ConfigType.WEBMONITOR]: WebMonitorConfigMetadata
|
|
228
|
+
[ConfigType.WEBMONITOR]: WebMonitorConfigMetadata,
|
|
229
|
+
[ConfigType.HEY_REACH_INPUT]: HeyReachInputConfigMetadata
|
|
220
230
|
};
|
|
221
231
|
// MARK: Event Types — specific events within each integration trigger
|
|
222
232
|
export const SlackEventType = {
|
|
@@ -243,6 +253,20 @@ export const GmailEventType = {
|
|
|
243
253
|
EMAIL_RECEIVED: "email.received"
|
|
244
254
|
};
|
|
245
255
|
export const gmailEventTypeSchema = z.enum(GmailEventType);
|
|
256
|
+
export const HeyReachEventType = {
|
|
257
|
+
CONNECTION_REQUEST_SENT: "CONNECTION_REQUEST_SENT",
|
|
258
|
+
CONNECTION_REQUEST_ACCEPTED: "CONNECTION_REQUEST_ACCEPTED",
|
|
259
|
+
MESSAGE_SENT: "MESSAGE_SENT",
|
|
260
|
+
MESSAGE_REPLY_RECEIVED: "MESSAGE_REPLY_RECEIVED",
|
|
261
|
+
INMAIL_SENT: "INMAIL_SENT",
|
|
262
|
+
INMAIL_REPLY_RECEIVED: "INMAIL_REPLY_RECEIVED",
|
|
263
|
+
FOLLOW_SENT: "FOLLOW_SENT",
|
|
264
|
+
LIKED_POST: "LIKED_POST",
|
|
265
|
+
VIEWED_PROFILE: "VIEWED_PROFILE",
|
|
266
|
+
CAMPAIGN_COMPLETED: "CAMPAIGN_COMPLETED",
|
|
267
|
+
LEAD_TAG_UPDATED: "LEAD_TAG_UPDATED"
|
|
268
|
+
};
|
|
269
|
+
export const heyReachEventTypeSchema = z.enum(HeyReachEventType);
|
|
246
270
|
export const WorkOSEventType = {
|
|
247
271
|
USER_CREATED: "user.created",
|
|
248
272
|
USER_UPDATED: "user.updated",
|
|
@@ -554,6 +578,30 @@ export const GitHubSkillConfigSchema = ConfigInstanceSchema.extend({
|
|
|
554
578
|
configType: z.literal(ConfigType.GITHUB),
|
|
555
579
|
repositoryIds: z.array(z.number().int())
|
|
556
580
|
});
|
|
581
|
+
export const HeyReachInputConfigSchema = ConfigInstanceSchema.extend({
|
|
582
|
+
integrationType: z.literal(IntegrationType.HEY_REACH),
|
|
583
|
+
configType: z.literal(ConfigType.HEY_REACH_INPUT),
|
|
584
|
+
eventType: heyReachEventTypeSchema,
|
|
585
|
+
campaignIds: z.array(z.string()).default([])
|
|
586
|
+
});
|
|
587
|
+
export class HeyReachInputConfig extends BaseConfigInstance {
|
|
588
|
+
eventType;
|
|
589
|
+
campaignIds;
|
|
590
|
+
constructor(integrationId, eventType, campaignIds = []) {
|
|
591
|
+
super(integrationId, IntegrationType.HEY_REACH, ConfigType.HEY_REACH_INPUT);
|
|
592
|
+
this.eventType = eventType;
|
|
593
|
+
this.campaignIds = campaignIds;
|
|
594
|
+
}
|
|
595
|
+
isComplete() {
|
|
596
|
+
return !!this.eventType;
|
|
597
|
+
}
|
|
598
|
+
formatForAgent() {
|
|
599
|
+
const parts = [`Type: HeyReach Events`, `Integration ID: ${this.integrationId}`, `Listening for: ${this.eventType}`];
|
|
600
|
+
if (this.campaignIds.length > 0)
|
|
601
|
+
parts.push(`Campaigns: ${this.campaignIds.join(", ")}`);
|
|
602
|
+
return parts.join("\n");
|
|
603
|
+
}
|
|
604
|
+
}
|
|
557
605
|
export const PosthogConfigSchema = ConfigInstanceSchema.extend({
|
|
558
606
|
integrationType: z.literal(IntegrationType.POSTHOG),
|
|
559
607
|
configType: z.literal(ConfigType.POSTHOG),
|
|
@@ -871,7 +919,8 @@ export const configDataSchema = z.union([
|
|
|
871
919
|
AttioOutputConfigSchema,
|
|
872
920
|
SnowflakeOutputConfigSchema,
|
|
873
921
|
WebhookInputConfigSchema,
|
|
874
|
-
WebMonitorConfigSchema
|
|
922
|
+
WebMonitorConfigSchema,
|
|
923
|
+
HeyReachInputConfigSchema
|
|
875
924
|
]);
|
|
876
925
|
/** Configs that can serve as triggers (event sources). */
|
|
877
926
|
export const triggerConfigDataSchema = z.union([
|
|
@@ -882,7 +931,8 @@ export const triggerConfigDataSchema = z.union([
|
|
|
882
931
|
TimeTriggerConfigSchema,
|
|
883
932
|
WorkOSInputConfigSchema,
|
|
884
933
|
WebhookInputConfigSchema,
|
|
885
|
-
WebMonitorConfigSchema
|
|
934
|
+
WebMonitorConfigSchema,
|
|
935
|
+
HeyReachInputConfigSchema
|
|
886
936
|
]);
|
|
887
937
|
/** Configs that can serve as skills (tools / outputs). */
|
|
888
938
|
export const skillConfigDataSchema = z.union([
|
|
@@ -938,6 +988,8 @@ export function isConfigComplete(config) {
|
|
|
938
988
|
return !!(config.projectKey && config.environmentKeys.length > 0);
|
|
939
989
|
case ConfigType.WORKOS_INPUT:
|
|
940
990
|
return config.eventTypes.length > 0;
|
|
991
|
+
case ConfigType.HEY_REACH_INPUT:
|
|
992
|
+
return !!config.eventType;
|
|
941
993
|
case ConfigType.ATTIO_OUTPUT:
|
|
942
994
|
return !!config.objectSlug;
|
|
943
995
|
default:
|
|
@@ -1060,6 +1112,12 @@ export function formatConfigForAgent(config) {
|
|
|
1060
1112
|
return "Type: Image Edit";
|
|
1061
1113
|
case ConfigType.WORKOS_INPUT:
|
|
1062
1114
|
return `Type: WorkOS Events\nListening for: ${config.eventTypes.join(", ")}`;
|
|
1115
|
+
case ConfigType.HEY_REACH_INPUT: {
|
|
1116
|
+
const parts = [`Type: HeyReach Events`, `Integration ID: ${config.integrationId}`, `Listening for: ${config.eventType}`];
|
|
1117
|
+
if (config.campaignIds.length > 0)
|
|
1118
|
+
parts.push(`Campaigns: ${config.campaignIds.join(", ")}`);
|
|
1119
|
+
return parts.join("\n");
|
|
1120
|
+
}
|
|
1063
1121
|
case ConfigType.WORKOS_OUTPUT:
|
|
1064
1122
|
return `Type: WorkOS Skill\nIntegration ID: ${config.integrationId}`;
|
|
1065
1123
|
case ConfigType.ATTIO_OUTPUT: {
|
|
@@ -1107,5 +1165,6 @@ export const CONFIG_METADATA = {
|
|
|
1107
1165
|
[ConfigType.ATTIO_OUTPUT]: AttioOutputConfig,
|
|
1108
1166
|
[ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfig,
|
|
1109
1167
|
[ConfigType.WEBHOOK_INPUT]: WebhookInputConfig,
|
|
1110
|
-
[ConfigType.WEBMONITOR]: WebMonitorConfig
|
|
1168
|
+
[ConfigType.WEBMONITOR]: WebMonitorConfig,
|
|
1169
|
+
[ConfigType.HEY_REACH_INPUT]: HeyReachInputConfig
|
|
1111
1170
|
};
|
package/dist/Integrations.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
export declare enum IntegrationType {
|
|
3
3
|
GITHUB = "github",
|
|
4
|
+
HEY_REACH = "hey_reach",
|
|
4
5
|
GMAIL = "gmail",
|
|
5
6
|
LINEAR = "linear",
|
|
6
7
|
SLACK = "slack",
|
|
@@ -129,6 +130,13 @@ export declare const WebhookIntegrationMetadata: {
|
|
|
129
130
|
readonly isInput: true;
|
|
130
131
|
readonly isOutput: false;
|
|
131
132
|
};
|
|
133
|
+
export declare const HeyReachIntegrationMetadata: {
|
|
134
|
+
readonly type: IntegrationType.HEY_REACH;
|
|
135
|
+
readonly name: "HeyReach";
|
|
136
|
+
readonly description: "Trigger on HeyReach LinkedIn outreach events (replies, connections, campaign completions, etc.)";
|
|
137
|
+
readonly isInput: true;
|
|
138
|
+
readonly isOutput: false;
|
|
139
|
+
};
|
|
132
140
|
export type IntegrationMetadataMap = Record<IntegrationType, IntegrationDetails>;
|
|
133
141
|
export declare const INTEGRATION_METADATA: IntegrationMetadataMap;
|
|
134
142
|
export declare const IntegrationInstanceSchema: z.ZodObject<{
|
|
@@ -157,6 +165,7 @@ export type IntegrationInstallationOptions = EnsureExhaustiveInstallationOptions
|
|
|
157
165
|
[IntegrationType.SNOWFLAKE]: NoInstallationOptions;
|
|
158
166
|
[IntegrationType.WEBHOOK]: NoInstallationOptions;
|
|
159
167
|
[IntegrationType.WEBMONITOR]: NoInstallationOptions;
|
|
168
|
+
[IntegrationType.HEY_REACH]: NoInstallationOptions;
|
|
160
169
|
}>;
|
|
161
170
|
export type InstallationOptionsFor<T extends IntegrationType> = IntegrationInstallationOptions[T];
|
|
162
171
|
export declare const SlackIntegrationSchema: z.ZodObject<{
|
|
@@ -196,6 +205,10 @@ export declare const PosthogIntegrationSchema: z.ZodObject<{
|
|
|
196
205
|
orgName: z.ZodOptional<z.ZodString>;
|
|
197
206
|
}, z.core.$strip>;
|
|
198
207
|
export type PosthogIntegration = z.infer<typeof PosthogIntegrationSchema>;
|
|
208
|
+
export declare const HeyReachIntegrationSchema: z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
export type HeyReachIntegration = z.infer<typeof HeyReachIntegrationSchema>;
|
|
199
212
|
export declare const LaunchDarklyIntegrationSchema: z.ZodObject<{
|
|
200
213
|
id: z.ZodString;
|
|
201
214
|
email: z.ZodOptional<z.ZodEmail>;
|
package/dist/Integrations.js
CHANGED
|
@@ -3,6 +3,7 @@ import * as z from "zod";
|
|
|
3
3
|
export var IntegrationType;
|
|
4
4
|
(function (IntegrationType) {
|
|
5
5
|
IntegrationType["GITHUB"] = "github";
|
|
6
|
+
IntegrationType["HEY_REACH"] = "hey_reach";
|
|
6
7
|
IntegrationType["GMAIL"] = "gmail";
|
|
7
8
|
IntegrationType["LINEAR"] = "linear";
|
|
8
9
|
IntegrationType["SLACK"] = "slack";
|
|
@@ -125,6 +126,13 @@ export const WebhookIntegrationMetadata = {
|
|
|
125
126
|
isInput: true,
|
|
126
127
|
isOutput: false
|
|
127
128
|
};
|
|
129
|
+
export const HeyReachIntegrationMetadata = {
|
|
130
|
+
type: IntegrationType.HEY_REACH,
|
|
131
|
+
name: "HeyReach",
|
|
132
|
+
description: "Trigger on HeyReach LinkedIn outreach events (replies, connections, campaign completions, etc.)",
|
|
133
|
+
isInput: true,
|
|
134
|
+
isOutput: false
|
|
135
|
+
};
|
|
128
136
|
export const INTEGRATION_METADATA = {
|
|
129
137
|
[IntegrationType.GMAIL]: GmailIntegrationMetadata,
|
|
130
138
|
[IntegrationType.NOTION]: NotionIntegrationMetadata,
|
|
@@ -140,7 +148,8 @@ export const INTEGRATION_METADATA = {
|
|
|
140
148
|
[IntegrationType.ATTIO]: AttioIntegrationMetadata,
|
|
141
149
|
[IntegrationType.SNOWFLAKE]: SnowflakeIntegrationMetadata,
|
|
142
150
|
[IntegrationType.WEBHOOK]: WebhookIntegrationMetadata,
|
|
143
|
-
[IntegrationType.WEBMONITOR]: WebMonitorIntegrationMetadata
|
|
151
|
+
[IntegrationType.WEBMONITOR]: WebMonitorIntegrationMetadata,
|
|
152
|
+
[IntegrationType.HEY_REACH]: HeyReachIntegrationMetadata
|
|
144
153
|
};
|
|
145
154
|
// MARK: Integration Details
|
|
146
155
|
export const IntegrationInstanceSchema = z.object({
|
|
@@ -171,6 +180,7 @@ export const PosthogIntegrationSchema = IntegrationInstanceSchema.extend({
|
|
|
171
180
|
email: z.email().optional(),
|
|
172
181
|
orgName: z.string().optional()
|
|
173
182
|
});
|
|
183
|
+
export const HeyReachIntegrationSchema = IntegrationInstanceSchema;
|
|
174
184
|
export const LaunchDarklyIntegrationSchema = IntegrationInstanceSchema.extend({
|
|
175
185
|
email: z.email().optional(),
|
|
176
186
|
tokenName: z.string().optional()
|
package/dist/Tools.d.ts
CHANGED
|
@@ -1400,7 +1400,8 @@ export declare const linearGetUsersInputSchema: z.ZodObject<{
|
|
|
1400
1400
|
}, z.core.$strip>;
|
|
1401
1401
|
export declare const slackSendMessageInputSchema: z.ZodObject<{
|
|
1402
1402
|
integrationId: z.ZodString;
|
|
1403
|
-
channelId: z.ZodString
|
|
1403
|
+
channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1404
|
+
slackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1404
1405
|
message: z.ZodString;
|
|
1405
1406
|
thread_ts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1406
1407
|
blocks: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2097,7 +2098,8 @@ export declare const slackSendMessageTool: {
|
|
|
2097
2098
|
name: "slack_send_message";
|
|
2098
2099
|
inputSchema: z.ZodObject<{
|
|
2099
2100
|
integrationId: z.ZodString;
|
|
2100
|
-
channelId: z.ZodString
|
|
2101
|
+
channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2102
|
+
slackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2101
2103
|
message: z.ZodString;
|
|
2102
2104
|
thread_ts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2103
2105
|
blocks: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -5739,7 +5741,8 @@ export declare const ToolDefinitions: {
|
|
|
5739
5741
|
name: "slack_send_message";
|
|
5740
5742
|
inputSchema: z.ZodObject<{
|
|
5741
5743
|
integrationId: z.ZodString;
|
|
5742
|
-
channelId: z.ZodString
|
|
5744
|
+
channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5745
|
+
slackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5743
5746
|
message: z.ZodString;
|
|
5744
5747
|
thread_ts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5745
5748
|
blocks: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
package/dist/Tools.js
CHANGED
|
@@ -540,9 +540,15 @@ export const linearGetTeamsInputSchema = z.object({
|
|
|
540
540
|
export const linearGetUsersInputSchema = z.object({
|
|
541
541
|
integrationId: z.string().describe("The integration ID of the Linear integration to use.")
|
|
542
542
|
});
|
|
543
|
-
export const slackSendMessageInputSchema = z
|
|
543
|
+
export const slackSendMessageInputSchema = z
|
|
544
|
+
.object({
|
|
544
545
|
integrationId: z.string().describe("The integration ID of the Slack workspace to use."),
|
|
545
|
-
channelId: z.string().describe("Slack channel or DM channel ID
|
|
546
|
+
channelId: z.string().nullable().optional().describe("Slack channel ID (C…/G…) or existing DM channel ID (D…). Omit when sending via slackUserId (opens DM if needed)."),
|
|
547
|
+
slackUserId: z
|
|
548
|
+
.string()
|
|
549
|
+
.nullable()
|
|
550
|
+
.optional()
|
|
551
|
+
.describe("Slack member ID (U…) to send a direct message. The workspace opens the DM conversation if one does not exist yet. Omit when sending to channelId."),
|
|
546
552
|
message: z.string().describe("Message content (mrkdwn). Used as fallback for Block Kit or main message."),
|
|
547
553
|
thread_ts: z
|
|
548
554
|
.string()
|
|
@@ -550,6 +556,14 @@ export const slackSendMessageInputSchema = z.object({
|
|
|
550
556
|
.optional()
|
|
551
557
|
.describe("Thread timestamp to reply to existing thread. If sending a message to a thread, this should be the timestamp of the thread to reply to. If sending an unthreaded message, this should be set to null."),
|
|
552
558
|
blocks: z.string().nullable().optional().describe("Block Kit JSON array string for interactive messages with buttons, structured layouts")
|
|
559
|
+
})
|
|
560
|
+
.superRefine((data, ctx) => {
|
|
561
|
+
if (!data.channelId && !data.slackUserId) {
|
|
562
|
+
ctx.addIssue({
|
|
563
|
+
code: z.ZodIssueCode.custom,
|
|
564
|
+
message: "Provide channelId (channel or existing DM) or slackUserId (workspace member to DM)."
|
|
565
|
+
});
|
|
566
|
+
}
|
|
553
567
|
});
|
|
554
568
|
export const slackListChannelsTypesSchema = z.enum(["public", "private", "im", "mpim", "all"]);
|
|
555
569
|
export const slackListChannelsInputSchema = z.object({
|
|
@@ -55,6 +55,11 @@ const TriggerPresenters = {
|
|
|
55
55
|
debug: (event) => `WorkOS ${event.eventType}`,
|
|
56
56
|
display: formatWorkOSDisplay
|
|
57
57
|
},
|
|
58
|
+
[IntegrationType.HEY_REACH]: {
|
|
59
|
+
formatForAgent: formatHeyReachTrigger,
|
|
60
|
+
debug: (event) => `HeyReach ${event.eventType}${event.lead?.id != null ? ` lead=${event.lead.id}` : ""}`,
|
|
61
|
+
display: formatHeyReachDisplay
|
|
62
|
+
},
|
|
58
63
|
[IntegrationType.WEBHOOK]: {
|
|
59
64
|
formatForAgent: formatWebhookTrigger,
|
|
60
65
|
debug: (event) => `Webhook Trigger (${event.method})`,
|
|
@@ -83,6 +88,8 @@ function dispatchPresenter(event, method) {
|
|
|
83
88
|
return TriggerPresenters[IntegrationType.LINEAR][method](event);
|
|
84
89
|
case IntegrationType.WORKOS:
|
|
85
90
|
return TriggerPresenters[IntegrationType.WORKOS][method](event);
|
|
91
|
+
case IntegrationType.HEY_REACH:
|
|
92
|
+
return TriggerPresenters[IntegrationType.HEY_REACH][method](event);
|
|
86
93
|
case IntegrationType.WEBHOOK:
|
|
87
94
|
return TriggerPresenters[IntegrationType.WEBHOOK][method](event);
|
|
88
95
|
case IntegrationType.CRON_JOB:
|
|
@@ -413,6 +420,61 @@ function formatWebMonitorTrigger(event) {
|
|
|
413
420
|
}
|
|
414
421
|
return lines.join("\n\n");
|
|
415
422
|
}
|
|
423
|
+
function heyReachLeadFullName(event) {
|
|
424
|
+
const lead = event.lead;
|
|
425
|
+
if (!lead)
|
|
426
|
+
return null;
|
|
427
|
+
const composed = [lead.first_name, lead.last_name].filter(Boolean).join(" ").trim() || lead.full_name?.trim() || "";
|
|
428
|
+
const idStr = lead.id != null ? String(lead.id) : null;
|
|
429
|
+
return composed || idStr;
|
|
430
|
+
}
|
|
431
|
+
function formatHeyReachTrigger(event) {
|
|
432
|
+
const lines = [`HeyReach Event: ${event.eventType}`, `Event ID: ${event.eventId}`, `Created At: ${event.createdAt}`];
|
|
433
|
+
const leadName = heyReachLeadFullName(event);
|
|
434
|
+
if (leadName)
|
|
435
|
+
lines.push(`Lead: ${leadName}`);
|
|
436
|
+
if (event.lead?.profile_url)
|
|
437
|
+
lines.push(`LinkedIn URL: ${event.lead.profile_url}`);
|
|
438
|
+
const company = event.lead?.company_name;
|
|
439
|
+
if (company)
|
|
440
|
+
lines.push(`Company: ${company}`);
|
|
441
|
+
if (event.lead?.position)
|
|
442
|
+
lines.push(`Position: ${event.lead.position}`);
|
|
443
|
+
if (event.campaign)
|
|
444
|
+
lines.push(`Campaign: ${event.campaign.name || event.campaign.id || "unknown"}`);
|
|
445
|
+
if (event.linkedInAccount) {
|
|
446
|
+
const acc = event.linkedInAccount;
|
|
447
|
+
const accountName = [acc.first_name, acc.last_name].filter(Boolean).join(" ").trim() || acc.full_name?.trim();
|
|
448
|
+
if (accountName)
|
|
449
|
+
lines.push(`LinkedIn Account: ${accountName}`);
|
|
450
|
+
}
|
|
451
|
+
if ("messageBody" in event && event.messageBody)
|
|
452
|
+
lines.push(`Message:\n${event.messageBody}`);
|
|
453
|
+
if ("postUrl" in event && event.postUrl)
|
|
454
|
+
lines.push(`Post URL: ${event.postUrl}`);
|
|
455
|
+
if ("tags" in event && event.tags?.length)
|
|
456
|
+
lines.push(`Tags: ${event.tags.join(", ")}`);
|
|
457
|
+
lines.push(`\nFull Payload:\n${JSON.stringify(event.rawPayload, null, 2)}`);
|
|
458
|
+
return lines.join("\n");
|
|
459
|
+
}
|
|
460
|
+
function humanizeHeyReachEventType(eventType) {
|
|
461
|
+
return eventType
|
|
462
|
+
.split("_")
|
|
463
|
+
.filter(Boolean)
|
|
464
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
465
|
+
.join(" ");
|
|
466
|
+
}
|
|
467
|
+
function formatHeyReachDisplay(event) {
|
|
468
|
+
const subtitle = humanizeHeyReachEventType(event.eventType);
|
|
469
|
+
const leadName = heyReachLeadFullName(event);
|
|
470
|
+
if (leadName) {
|
|
471
|
+
return { title: leadName, subtitle };
|
|
472
|
+
}
|
|
473
|
+
if (event.campaign?.name) {
|
|
474
|
+
return { title: event.campaign.name, subtitle };
|
|
475
|
+
}
|
|
476
|
+
return { title: "HeyReach event", subtitle };
|
|
477
|
+
}
|
|
416
478
|
function formatCronTrigger(event) {
|
|
417
479
|
if (event.isManualTrigger) {
|
|
418
480
|
let message = `This is a manually triggered event for the channel input ${event.inputId}.`;
|