terse-types 0.0.76 → 0.1.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/ApiRouteBuilder.d.ts +4 -0
- package/dist/ApiRoutes.json +4 -0
- package/dist/Configs.d.ts +31 -1
- package/dist/Configs.js +35 -4
- package/dist/Integrations.d.ts +43 -0
- package/dist/Integrations.js +34 -2
- package/dist/InvalidationKeys.d.ts +1 -0
- package/dist/InvalidationKeys.js +1 -0
- package/dist/Tools.d.ts +128 -0
- package/dist/Tools.js +30 -3
- package/dist/TriggerDefinition.d.ts +34 -0
- package/dist/TriggerDefinition.js +6 -0
- package/dist/TriggerPresenters.d.ts +38 -8
- package/dist/TriggerPresenters.js +233 -294
- package/dist/Triggers.d.ts +2111 -30
- package/dist/Triggers.js +633 -25
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types.d.ts +130 -66
- package/package.json +1 -1
package/dist/ApiRoutes.json
CHANGED
|
@@ -94,6 +94,10 @@
|
|
|
94
94
|
"INTEGRATIONS": "/heyreach/integrations",
|
|
95
95
|
"CAMPAIGNS": "/heyreach/campaigns"
|
|
96
96
|
},
|
|
97
|
+
"RESEND": {
|
|
98
|
+
"INTEGRATIONS": "/resend/integrations",
|
|
99
|
+
"TEMPLATES": "/resend/templates"
|
|
100
|
+
},
|
|
97
101
|
"AGENTS": {
|
|
98
102
|
"LIST": "/agents",
|
|
99
103
|
"RECENT": "/agents/recent",
|
package/dist/Configs.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ export declare enum ConfigType {
|
|
|
24
24
|
SNOWFLAKE_OUTPUT = "snowflake_output",
|
|
25
25
|
WEBHOOK_INPUT = "webhook_input",
|
|
26
26
|
WEBMONITOR = "webmonitor",
|
|
27
|
-
HEY_REACH_INPUT = "hey_reach_input"
|
|
27
|
+
HEY_REACH_INPUT = "hey_reach_input",
|
|
28
|
+
RESEND_OUTPUT = "resend_output"
|
|
28
29
|
}
|
|
29
30
|
export declare const configTypeEnum: z.ZodEnum<typeof ConfigType>;
|
|
30
31
|
export declare const frequencyUnitSchema: z.ZodEnum<{
|
|
@@ -233,6 +234,14 @@ export declare const HeyReachInputConfigMetadata: {
|
|
|
233
234
|
readonly isInput: true;
|
|
234
235
|
readonly isOutput: false;
|
|
235
236
|
};
|
|
237
|
+
export declare const ResendOutputConfigMetadata: {
|
|
238
|
+
readonly configType: ConfigType.RESEND_OUTPUT;
|
|
239
|
+
readonly name: "Resend";
|
|
240
|
+
readonly description: "Send transactional email using published Resend templates";
|
|
241
|
+
readonly integrationType: IntegrationType.RESEND;
|
|
242
|
+
readonly isInput: false;
|
|
243
|
+
readonly isOutput: true;
|
|
244
|
+
};
|
|
236
245
|
export type ConfigDetailsMap = Record<ConfigType, ConfigDetails>;
|
|
237
246
|
export declare const CONFIG_DETAILS: ConfigDetailsMap;
|
|
238
247
|
export declare const SlackEventType: {
|
|
@@ -939,6 +948,18 @@ export declare class SnowflakeOutputConfig extends BaseConfigInstance<Integratio
|
|
|
939
948
|
isComplete(): boolean;
|
|
940
949
|
formatForAgent(): string;
|
|
941
950
|
}
|
|
951
|
+
export declare const ResendOutputConfigSchema: z.ZodObject<{
|
|
952
|
+
integrationId: z.ZodString;
|
|
953
|
+
integrationType: z.ZodLiteral<IntegrationType.RESEND>;
|
|
954
|
+
configType: z.ZodLiteral<ConfigType.RESEND_OUTPUT>;
|
|
955
|
+
}, z.core.$strip>;
|
|
956
|
+
export type ResendOutputConfigData = z.infer<typeof ResendOutputConfigSchema>;
|
|
957
|
+
export type ResendOutputConfigInstance = ResendOutputConfigData & ConfigBehavior;
|
|
958
|
+
export declare class ResendOutputConfig extends BaseConfigInstance<IntegrationType.RESEND, ConfigType.RESEND_OUTPUT> implements ResendOutputConfigInstance {
|
|
959
|
+
constructor(integrationId: string);
|
|
960
|
+
isComplete(): boolean;
|
|
961
|
+
formatForAgent(): string;
|
|
962
|
+
}
|
|
942
963
|
export declare const WebhookInputConfigSchema: z.ZodObject<{
|
|
943
964
|
integrationId: z.ZodLiteral<"system">;
|
|
944
965
|
integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
|
|
@@ -1237,6 +1258,10 @@ export declare const configDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1237
1258
|
readonly LEAD_TAG_UPDATED: "LEAD_TAG_UPDATED";
|
|
1238
1259
|
}>;
|
|
1239
1260
|
campaignIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1261
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1262
|
+
integrationId: z.ZodString;
|
|
1263
|
+
integrationType: z.ZodLiteral<IntegrationType.RESEND>;
|
|
1264
|
+
configType: z.ZodLiteral<ConfigType.RESEND_OUTPUT>;
|
|
1240
1265
|
}, z.core.$strip>]>;
|
|
1241
1266
|
export type ConfigData = z.infer<typeof configDataSchema>;
|
|
1242
1267
|
/** Configs that can serve as triggers (event sources). */
|
|
@@ -1485,6 +1510,10 @@ export declare const skillConfigDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1485
1510
|
integrationId: z.ZodString;
|
|
1486
1511
|
integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
|
|
1487
1512
|
configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
|
|
1513
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1514
|
+
integrationId: z.ZodString;
|
|
1515
|
+
integrationType: z.ZodLiteral<IntegrationType.RESEND>;
|
|
1516
|
+
configType: z.ZodLiteral<ConfigType.RESEND_OUTPUT>;
|
|
1488
1517
|
}, z.core.$strip>]>;
|
|
1489
1518
|
export type SkillConfigData = z.infer<typeof skillConfigDataSchema>;
|
|
1490
1519
|
export declare function isConfigComplete(config: ConfigData | undefined): boolean;
|
|
@@ -1515,6 +1544,7 @@ export type ConfigMetadataMap = EnsureExhaustiveMetadata<{
|
|
|
1515
1544
|
[ConfigType.WEBHOOK_INPUT]: typeof WebhookInputConfig;
|
|
1516
1545
|
[ConfigType.WEBMONITOR]: typeof WebMonitorConfig;
|
|
1517
1546
|
[ConfigType.HEY_REACH_INPUT]: typeof HeyReachInputConfig;
|
|
1547
|
+
[ConfigType.RESEND_OUTPUT]: typeof ResendOutputConfig;
|
|
1518
1548
|
}>;
|
|
1519
1549
|
export declare const CONFIG_METADATA: ConfigMetadataMap;
|
|
1520
1550
|
export {};
|
package/dist/Configs.js
CHANGED
|
@@ -26,6 +26,7 @@ export var ConfigType;
|
|
|
26
26
|
ConfigType["WEBHOOK_INPUT"] = "webhook_input";
|
|
27
27
|
ConfigType["WEBMONITOR"] = "webmonitor";
|
|
28
28
|
ConfigType["HEY_REACH_INPUT"] = "hey_reach_input";
|
|
29
|
+
ConfigType["RESEND_OUTPUT"] = "resend_output";
|
|
29
30
|
})(ConfigType || (ConfigType = {}));
|
|
30
31
|
export const configTypeEnum = z.enum(ConfigType);
|
|
31
32
|
export const frequencyUnitSchema = z.enum(["hour", "day", "week"]);
|
|
@@ -222,6 +223,14 @@ export const HeyReachInputConfigMetadata = {
|
|
|
222
223
|
isInput: true,
|
|
223
224
|
isOutput: false
|
|
224
225
|
};
|
|
226
|
+
export const ResendOutputConfigMetadata = {
|
|
227
|
+
configType: ConfigType.RESEND_OUTPUT,
|
|
228
|
+
name: "Resend",
|
|
229
|
+
description: "Send transactional email using published Resend templates",
|
|
230
|
+
integrationType: IntegrationType.RESEND,
|
|
231
|
+
isInput: false,
|
|
232
|
+
isOutput: true
|
|
233
|
+
};
|
|
225
234
|
export const CONFIG_DETAILS = {
|
|
226
235
|
[ConfigType.GMAIL]: GmailConfigMetadata,
|
|
227
236
|
[ConfigType.GMAIL_OUTPUT]: GmailOutputConfigMetadata,
|
|
@@ -246,7 +255,8 @@ export const CONFIG_DETAILS = {
|
|
|
246
255
|
[ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfigMetadata,
|
|
247
256
|
[ConfigType.WEBHOOK_INPUT]: WebhookInputConfigMetadata,
|
|
248
257
|
[ConfigType.WEBMONITOR]: WebMonitorConfigMetadata,
|
|
249
|
-
[ConfigType.HEY_REACH_INPUT]: HeyReachInputConfigMetadata
|
|
258
|
+
[ConfigType.HEY_REACH_INPUT]: HeyReachInputConfigMetadata,
|
|
259
|
+
[ConfigType.RESEND_OUTPUT]: ResendOutputConfigMetadata
|
|
250
260
|
};
|
|
251
261
|
// MARK: Event Types — specific events within each integration trigger
|
|
252
262
|
export const SlackEventType = {
|
|
@@ -917,6 +927,21 @@ export class SnowflakeOutputConfig extends BaseConfigInstance {
|
|
|
917
927
|
return parts.join("\n");
|
|
918
928
|
}
|
|
919
929
|
}
|
|
930
|
+
export const ResendOutputConfigSchema = ConfigInstanceSchema.extend({
|
|
931
|
+
integrationType: z.literal(IntegrationType.RESEND),
|
|
932
|
+
configType: z.literal(ConfigType.RESEND_OUTPUT)
|
|
933
|
+
});
|
|
934
|
+
export class ResendOutputConfig extends BaseConfigInstance {
|
|
935
|
+
constructor(integrationId) {
|
|
936
|
+
super(integrationId, IntegrationType.RESEND, ConfigType.RESEND_OUTPUT);
|
|
937
|
+
}
|
|
938
|
+
isComplete() {
|
|
939
|
+
return !!this.integrationId;
|
|
940
|
+
}
|
|
941
|
+
formatForAgent() {
|
|
942
|
+
return `Type: Resend Output\nIntegration ID: ${this.integrationId}`;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
920
945
|
export const WebhookInputConfigSchema = ConfigInstanceSchema.extend({
|
|
921
946
|
integrationId: z.literal("system"),
|
|
922
947
|
integrationType: z.literal(IntegrationType.WEBHOOK),
|
|
@@ -1032,7 +1057,8 @@ export const configDataSchema = z.union([
|
|
|
1032
1057
|
SnowflakeOutputConfigSchema,
|
|
1033
1058
|
WebhookInputConfigSchema,
|
|
1034
1059
|
WebMonitorConfigSchema,
|
|
1035
|
-
HeyReachInputConfigSchema
|
|
1060
|
+
HeyReachInputConfigSchema,
|
|
1061
|
+
ResendOutputConfigSchema
|
|
1036
1062
|
]);
|
|
1037
1063
|
/** Configs that can serve as triggers (event sources). */
|
|
1038
1064
|
export const triggerConfigDataSchema = z.union([
|
|
@@ -1063,7 +1089,8 @@ export const skillConfigDataSchema = z.union([
|
|
|
1063
1089
|
MemoryConfigSchema,
|
|
1064
1090
|
WorkOSOutputConfigSchema,
|
|
1065
1091
|
AttioOutputConfigSchema,
|
|
1066
|
-
SnowflakeOutputConfigSchema
|
|
1092
|
+
SnowflakeOutputConfigSchema,
|
|
1093
|
+
ResendOutputConfigSchema
|
|
1067
1094
|
]);
|
|
1068
1095
|
export function isConfigComplete(config) {
|
|
1069
1096
|
if (!config) {
|
|
@@ -1090,6 +1117,7 @@ export function isConfigComplete(config) {
|
|
|
1090
1117
|
case ConfigType.DATADOG:
|
|
1091
1118
|
case ConfigType.WORKOS_OUTPUT:
|
|
1092
1119
|
case ConfigType.SNOWFLAKE_OUTPUT:
|
|
1120
|
+
case ConfigType.RESEND_OUTPUT:
|
|
1093
1121
|
return !!config.integrationId;
|
|
1094
1122
|
case ConfigType.GITHUB:
|
|
1095
1123
|
return (config.repositoryIds?.length ?? 0) > 0;
|
|
@@ -1253,6 +1281,8 @@ export function formatConfigForAgent(config) {
|
|
|
1253
1281
|
}
|
|
1254
1282
|
case ConfigType.SNOWFLAKE_OUTPUT:
|
|
1255
1283
|
return `Type: Snowflake Output\nIntegration ID: ${config.integrationId}`;
|
|
1284
|
+
case ConfigType.RESEND_OUTPUT:
|
|
1285
|
+
return `Type: Resend Output\nIntegration ID: ${config.integrationId}`;
|
|
1256
1286
|
case ConfigType.WEBHOOK_INPUT:
|
|
1257
1287
|
return "Type: Webhook Trigger";
|
|
1258
1288
|
case ConfigType.WEBMONITOR: {
|
|
@@ -1293,5 +1323,6 @@ export const CONFIG_METADATA = {
|
|
|
1293
1323
|
[ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfig,
|
|
1294
1324
|
[ConfigType.WEBHOOK_INPUT]: WebhookInputConfig,
|
|
1295
1325
|
[ConfigType.WEBMONITOR]: WebMonitorConfig,
|
|
1296
|
-
[ConfigType.HEY_REACH_INPUT]: HeyReachInputConfig
|
|
1326
|
+
[ConfigType.HEY_REACH_INPUT]: HeyReachInputConfig,
|
|
1327
|
+
[ConfigType.RESEND_OUTPUT]: ResendOutputConfig
|
|
1297
1328
|
};
|
package/dist/Integrations.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as z from "zod";
|
|
|
2
2
|
export declare enum IntegrationType {
|
|
3
3
|
GITHUB = "github",
|
|
4
4
|
HEY_REACH = "hey_reach",
|
|
5
|
+
RESEND = "resend",
|
|
5
6
|
GMAIL = "gmail",
|
|
6
7
|
LINEAR = "linear",
|
|
7
8
|
SLACK = "slack",
|
|
@@ -18,6 +19,12 @@ export declare enum IntegrationType {
|
|
|
18
19
|
WEBMONITOR = "webmonitor"
|
|
19
20
|
}
|
|
20
21
|
export declare const integrationTypeEnum: z.ZodEnum<typeof IntegrationType>;
|
|
22
|
+
export declare const BUILT_IN_INTEGRATION_TYPES: readonly [IntegrationType.TERSE, IntegrationType.CRON_JOB, IntegrationType.WEBHOOK, IntegrationType.WEBMONITOR];
|
|
23
|
+
export type BuiltInIntegrationType = (typeof BUILT_IN_INTEGRATION_TYPES)[number];
|
|
24
|
+
export type ExternalIntegrationType = Exclude<IntegrationType, BuiltInIntegrationType>;
|
|
25
|
+
export declare function isBuiltInIntegrationType(type: IntegrationType): type is BuiltInIntegrationType;
|
|
26
|
+
export declare function isExternalIntegrationType(type: IntegrationType): type is ExternalIntegrationType;
|
|
27
|
+
export declare const EXTERNAL_INTEGRATION_TYPES: readonly ExternalIntegrationType[];
|
|
21
28
|
export interface IntegrationDetails {
|
|
22
29
|
type: IntegrationType;
|
|
23
30
|
name: string;
|
|
@@ -137,6 +144,13 @@ export declare const HeyReachIntegrationMetadata: {
|
|
|
137
144
|
readonly isInput: true;
|
|
138
145
|
readonly isOutput: false;
|
|
139
146
|
};
|
|
147
|
+
export declare const ResendIntegrationMetadata: {
|
|
148
|
+
readonly type: IntegrationType.RESEND;
|
|
149
|
+
readonly name: "Resend";
|
|
150
|
+
readonly description: "Send transactional email using published Resend templates";
|
|
151
|
+
readonly isInput: false;
|
|
152
|
+
readonly isOutput: true;
|
|
153
|
+
};
|
|
140
154
|
export type IntegrationMetadataMap = Record<IntegrationType, IntegrationDetails>;
|
|
141
155
|
export declare const INTEGRATION_METADATA: IntegrationMetadataMap;
|
|
142
156
|
export declare const IntegrationInstanceSchema: z.ZodObject<{
|
|
@@ -169,6 +183,7 @@ export declare const InstallationOptionsSchemas: {
|
|
|
169
183
|
readonly webhook: z.ZodObject<{}, z.core.$strict>;
|
|
170
184
|
readonly webmonitor: z.ZodObject<{}, z.core.$strict>;
|
|
171
185
|
readonly hey_reach: z.ZodObject<{}, z.core.$strict>;
|
|
186
|
+
readonly resend: z.ZodObject<{}, z.core.$strict>;
|
|
172
187
|
};
|
|
173
188
|
export type InstallationOptionsFor<T extends IntegrationType> = z.infer<(typeof InstallationOptionsSchemas)[T]>;
|
|
174
189
|
export declare const SlackIntegrationSchema: z.ZodObject<{
|
|
@@ -212,6 +227,34 @@ export declare const HeyReachIntegrationSchema: z.ZodObject<{
|
|
|
212
227
|
id: z.ZodString;
|
|
213
228
|
}, z.core.$strip>;
|
|
214
229
|
export type HeyReachIntegration = z.infer<typeof HeyReachIntegrationSchema>;
|
|
230
|
+
export declare const ResendIntegrationSchema: z.ZodObject<{
|
|
231
|
+
id: z.ZodString;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
export type ResendIntegration = z.infer<typeof ResendIntegrationSchema>;
|
|
234
|
+
export declare const ResendTemplateVariableSchema: z.ZodObject<{
|
|
235
|
+
key: z.ZodString;
|
|
236
|
+
type: z.ZodEnum<{
|
|
237
|
+
string: "string";
|
|
238
|
+
number: "number";
|
|
239
|
+
}>;
|
|
240
|
+
fallbackValue: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
241
|
+
}, z.core.$strip>;
|
|
242
|
+
export type ResendTemplateVariable = z.infer<typeof ResendTemplateVariableSchema>;
|
|
243
|
+
export declare const ResendTemplateSchema: z.ZodObject<{
|
|
244
|
+
id: z.ZodString;
|
|
245
|
+
alias: z.ZodNullable<z.ZodString>;
|
|
246
|
+
name: z.ZodString;
|
|
247
|
+
status: z.ZodString;
|
|
248
|
+
variables: z.ZodArray<z.ZodObject<{
|
|
249
|
+
key: z.ZodString;
|
|
250
|
+
type: z.ZodEnum<{
|
|
251
|
+
string: "string";
|
|
252
|
+
number: "number";
|
|
253
|
+
}>;
|
|
254
|
+
fallbackValue: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
}, z.core.$strip>;
|
|
257
|
+
export type ResendTemplate = z.infer<typeof ResendTemplateSchema>;
|
|
215
258
|
export declare const LaunchDarklyIntegrationSchema: z.ZodObject<{
|
|
216
259
|
id: z.ZodString;
|
|
217
260
|
email: z.ZodOptional<z.ZodEmail>;
|
package/dist/Integrations.js
CHANGED
|
@@ -4,6 +4,7 @@ export var IntegrationType;
|
|
|
4
4
|
(function (IntegrationType) {
|
|
5
5
|
IntegrationType["GITHUB"] = "github";
|
|
6
6
|
IntegrationType["HEY_REACH"] = "hey_reach";
|
|
7
|
+
IntegrationType["RESEND"] = "resend";
|
|
7
8
|
IntegrationType["GMAIL"] = "gmail";
|
|
8
9
|
IntegrationType["LINEAR"] = "linear";
|
|
9
10
|
IntegrationType["SLACK"] = "slack";
|
|
@@ -20,6 +21,15 @@ export var IntegrationType;
|
|
|
20
21
|
IntegrationType["WEBMONITOR"] = "webmonitor";
|
|
21
22
|
})(IntegrationType || (IntegrationType = {}));
|
|
22
23
|
export const integrationTypeEnum = z.enum(IntegrationType);
|
|
24
|
+
export const BUILT_IN_INTEGRATION_TYPES = [IntegrationType.TERSE, IntegrationType.CRON_JOB, IntegrationType.WEBHOOK, IntegrationType.WEBMONITOR];
|
|
25
|
+
const builtInIntegrationTypes = new Set(BUILT_IN_INTEGRATION_TYPES);
|
|
26
|
+
export function isBuiltInIntegrationType(type) {
|
|
27
|
+
return builtInIntegrationTypes.has(type);
|
|
28
|
+
}
|
|
29
|
+
export function isExternalIntegrationType(type) {
|
|
30
|
+
return !isBuiltInIntegrationType(type);
|
|
31
|
+
}
|
|
32
|
+
export const EXTERNAL_INTEGRATION_TYPES = Object.values(IntegrationType).filter(isExternalIntegrationType);
|
|
23
33
|
// Metadata objects - using const objects instead of classes
|
|
24
34
|
export const GmailIntegrationMetadata = {
|
|
25
35
|
type: IntegrationType.GMAIL,
|
|
@@ -133,6 +143,13 @@ export const HeyReachIntegrationMetadata = {
|
|
|
133
143
|
isInput: true,
|
|
134
144
|
isOutput: false
|
|
135
145
|
};
|
|
146
|
+
export const ResendIntegrationMetadata = {
|
|
147
|
+
type: IntegrationType.RESEND,
|
|
148
|
+
name: "Resend",
|
|
149
|
+
description: "Send transactional email using published Resend templates",
|
|
150
|
+
isInput: false,
|
|
151
|
+
isOutput: true
|
|
152
|
+
};
|
|
136
153
|
export const INTEGRATION_METADATA = {
|
|
137
154
|
[IntegrationType.GMAIL]: GmailIntegrationMetadata,
|
|
138
155
|
[IntegrationType.NOTION]: NotionIntegrationMetadata,
|
|
@@ -149,7 +166,8 @@ export const INTEGRATION_METADATA = {
|
|
|
149
166
|
[IntegrationType.SNOWFLAKE]: SnowflakeIntegrationMetadata,
|
|
150
167
|
[IntegrationType.WEBHOOK]: WebhookIntegrationMetadata,
|
|
151
168
|
[IntegrationType.WEBMONITOR]: WebMonitorIntegrationMetadata,
|
|
152
|
-
[IntegrationType.HEY_REACH]: HeyReachIntegrationMetadata
|
|
169
|
+
[IntegrationType.HEY_REACH]: HeyReachIntegrationMetadata,
|
|
170
|
+
[IntegrationType.RESEND]: ResendIntegrationMetadata
|
|
153
171
|
};
|
|
154
172
|
// MARK: Integration Details
|
|
155
173
|
export const IntegrationInstanceSchema = z.object({
|
|
@@ -179,7 +197,8 @@ export const InstallationOptionsSchemas = {
|
|
|
179
197
|
[IntegrationType.SNOWFLAKE]: NoInstallationOptionsSchema,
|
|
180
198
|
[IntegrationType.WEBHOOK]: NoInstallationOptionsSchema,
|
|
181
199
|
[IntegrationType.WEBMONITOR]: NoInstallationOptionsSchema,
|
|
182
|
-
[IntegrationType.HEY_REACH]: NoInstallationOptionsSchema
|
|
200
|
+
[IntegrationType.HEY_REACH]: NoInstallationOptionsSchema,
|
|
201
|
+
[IntegrationType.RESEND]: NoInstallationOptionsSchema
|
|
183
202
|
};
|
|
184
203
|
export const SlackIntegrationSchema = IntegrationInstanceSchema.extend({
|
|
185
204
|
teamId: z.string().optional(),
|
|
@@ -207,6 +226,19 @@ export const PosthogIntegrationSchema = IntegrationInstanceSchema.extend({
|
|
|
207
226
|
orgName: z.string().optional()
|
|
208
227
|
});
|
|
209
228
|
export const HeyReachIntegrationSchema = IntegrationInstanceSchema;
|
|
229
|
+
export const ResendIntegrationSchema = IntegrationInstanceSchema;
|
|
230
|
+
export const ResendTemplateVariableSchema = z.object({
|
|
231
|
+
key: z.string(),
|
|
232
|
+
type: z.enum(["string", "number"]),
|
|
233
|
+
fallbackValue: z.union([z.string(), z.number()]).nullable()
|
|
234
|
+
});
|
|
235
|
+
export const ResendTemplateSchema = z.object({
|
|
236
|
+
id: z.string(),
|
|
237
|
+
alias: z.string().nullable(),
|
|
238
|
+
name: z.string(),
|
|
239
|
+
status: z.string(),
|
|
240
|
+
variables: z.array(ResendTemplateVariableSchema)
|
|
241
|
+
});
|
|
210
242
|
export const LaunchDarklyIntegrationSchema = IntegrationInstanceSchema.extend({
|
|
211
243
|
email: z.email().optional(),
|
|
212
244
|
tokenName: z.string().optional()
|
|
@@ -27,6 +27,7 @@ export declare const workosIntegrationsKey: () => readonly [string];
|
|
|
27
27
|
export declare const attioIntegrationsKey: () => readonly [string];
|
|
28
28
|
export declare const snowflakeIntegrationsKey: () => readonly [string];
|
|
29
29
|
export declare const heyReachIntegrationsKey: () => readonly [string];
|
|
30
|
+
export declare const resendIntegrationsKey: () => readonly [string];
|
|
30
31
|
export declare const attioObjectsKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
|
|
31
32
|
export declare const allRunHistoryKey: (params?: GetRunHistoryParams) => readonly [string, string] | readonly [string];
|
|
32
33
|
export declare const runHistoryKey: (agentId: string, params?: GetRunHistoryParams) => readonly [string, string, string] | readonly [string, string];
|
package/dist/InvalidationKeys.js
CHANGED
|
@@ -73,6 +73,7 @@ export const snowflakeIntegrationsKey = () => {
|
|
|
73
73
|
export const heyReachIntegrationsKey = () => {
|
|
74
74
|
return ["heyReachIntegrations"];
|
|
75
75
|
};
|
|
76
|
+
export const resendIntegrationsKey = () => ["resendIntegrations"];
|
|
76
77
|
export const attioObjectsKey = (integrationId) => {
|
|
77
78
|
if (!integrationId) {
|
|
78
79
|
return null;
|
package/dist/Tools.d.ts
CHANGED
|
@@ -8863,6 +8863,90 @@ export declare const memoryTool: {
|
|
|
8863
8863
|
result: z.ZodString;
|
|
8864
8864
|
}, z.core.$strip>;
|
|
8865
8865
|
};
|
|
8866
|
+
export declare const resendSendTemplateInputSchema: z.ZodObject<{
|
|
8867
|
+
integrationId: z.ZodString;
|
|
8868
|
+
templateId: z.ZodString;
|
|
8869
|
+
to: z.ZodArray<z.ZodEmail>;
|
|
8870
|
+
variables: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
8871
|
+
from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8872
|
+
subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8873
|
+
replyTo: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
8874
|
+
cc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEmail>>>;
|
|
8875
|
+
bcc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEmail>>>;
|
|
8876
|
+
idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8877
|
+
}, z.core.$strip>;
|
|
8878
|
+
export declare const resendSendTemplateOutputSchema: z.ZodObject<{
|
|
8879
|
+
success: z.ZodBoolean;
|
|
8880
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8881
|
+
action: z.ZodString;
|
|
8882
|
+
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
8883
|
+
target: z.ZodString;
|
|
8884
|
+
details: z.ZodString;
|
|
8885
|
+
url: z.ZodOptional<z.ZodString>;
|
|
8886
|
+
step_id: z.ZodOptional<z.ZodString>;
|
|
8887
|
+
type: z.ZodEnum<{
|
|
8888
|
+
error: "error";
|
|
8889
|
+
approve: "approve";
|
|
8890
|
+
create: "create";
|
|
8891
|
+
update: "update";
|
|
8892
|
+
delete: "delete";
|
|
8893
|
+
read: "read";
|
|
8894
|
+
}>;
|
|
8895
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
8896
|
+
output_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8897
|
+
output_item_id: z.ZodString;
|
|
8898
|
+
output_item_type: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
|
|
8899
|
+
}, z.core.$strip>>>;
|
|
8900
|
+
}, z.core.$strip>>>;
|
|
8901
|
+
emailId: z.ZodString;
|
|
8902
|
+
templateId: z.ZodString;
|
|
8903
|
+
to: z.ZodArray<z.ZodString>;
|
|
8904
|
+
summary: z.ZodString;
|
|
8905
|
+
}, z.core.$strip>;
|
|
8906
|
+
export declare const resendSendTemplateTool: {
|
|
8907
|
+
name: "resend_send_template";
|
|
8908
|
+
description: string;
|
|
8909
|
+
inputSchema: z.ZodObject<{
|
|
8910
|
+
integrationId: z.ZodString;
|
|
8911
|
+
templateId: z.ZodString;
|
|
8912
|
+
to: z.ZodArray<z.ZodEmail>;
|
|
8913
|
+
variables: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
8914
|
+
from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8915
|
+
subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8916
|
+
replyTo: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
8917
|
+
cc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEmail>>>;
|
|
8918
|
+
bcc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEmail>>>;
|
|
8919
|
+
idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8920
|
+
}, z.core.$strip>;
|
|
8921
|
+
outputSchema: z.ZodObject<{
|
|
8922
|
+
success: z.ZodBoolean;
|
|
8923
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8924
|
+
action: z.ZodString;
|
|
8925
|
+
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
8926
|
+
target: z.ZodString;
|
|
8927
|
+
details: z.ZodString;
|
|
8928
|
+
url: z.ZodOptional<z.ZodString>;
|
|
8929
|
+
step_id: z.ZodOptional<z.ZodString>;
|
|
8930
|
+
type: z.ZodEnum<{
|
|
8931
|
+
error: "error";
|
|
8932
|
+
approve: "approve";
|
|
8933
|
+
create: "create";
|
|
8934
|
+
update: "update";
|
|
8935
|
+
delete: "delete";
|
|
8936
|
+
read: "read";
|
|
8937
|
+
}>;
|
|
8938
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
8939
|
+
output_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8940
|
+
output_item_id: z.ZodString;
|
|
8941
|
+
output_item_type: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
|
|
8942
|
+
}, z.core.$strip>>>;
|
|
8943
|
+
}, z.core.$strip>>>;
|
|
8944
|
+
emailId: z.ZodString;
|
|
8945
|
+
templateId: z.ZodString;
|
|
8946
|
+
to: z.ZodArray<z.ZodString>;
|
|
8947
|
+
summary: z.ZodString;
|
|
8948
|
+
}, z.core.$strip>;
|
|
8949
|
+
};
|
|
8866
8950
|
export declare const ToolDefinitions: {
|
|
8867
8951
|
readonly linear_create_ticket: {
|
|
8868
8952
|
name: "linear_create_ticket";
|
|
@@ -14387,6 +14471,50 @@ export declare const ToolDefinitions: {
|
|
|
14387
14471
|
result: z.ZodString;
|
|
14388
14472
|
}, z.core.$strip>;
|
|
14389
14473
|
};
|
|
14474
|
+
readonly resend_send_template: {
|
|
14475
|
+
name: "resend_send_template";
|
|
14476
|
+
description: string;
|
|
14477
|
+
inputSchema: z.ZodObject<{
|
|
14478
|
+
integrationId: z.ZodString;
|
|
14479
|
+
templateId: z.ZodString;
|
|
14480
|
+
to: z.ZodArray<z.ZodEmail>;
|
|
14481
|
+
variables: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
14482
|
+
from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14483
|
+
subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14484
|
+
replyTo: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
14485
|
+
cc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEmail>>>;
|
|
14486
|
+
bcc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEmail>>>;
|
|
14487
|
+
idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14488
|
+
}, z.core.$strip>;
|
|
14489
|
+
outputSchema: z.ZodObject<{
|
|
14490
|
+
success: z.ZodBoolean;
|
|
14491
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14492
|
+
action: z.ZodString;
|
|
14493
|
+
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
14494
|
+
target: z.ZodString;
|
|
14495
|
+
details: z.ZodString;
|
|
14496
|
+
url: z.ZodOptional<z.ZodString>;
|
|
14497
|
+
step_id: z.ZodOptional<z.ZodString>;
|
|
14498
|
+
type: z.ZodEnum<{
|
|
14499
|
+
error: "error";
|
|
14500
|
+
approve: "approve";
|
|
14501
|
+
create: "create";
|
|
14502
|
+
update: "update";
|
|
14503
|
+
delete: "delete";
|
|
14504
|
+
read: "read";
|
|
14505
|
+
}>;
|
|
14506
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
14507
|
+
output_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14508
|
+
output_item_id: z.ZodString;
|
|
14509
|
+
output_item_type: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
|
|
14510
|
+
}, z.core.$strip>>>;
|
|
14511
|
+
}, z.core.$strip>>>;
|
|
14512
|
+
emailId: z.ZodString;
|
|
14513
|
+
templateId: z.ZodString;
|
|
14514
|
+
to: z.ZodArray<z.ZodString>;
|
|
14515
|
+
summary: z.ZodString;
|
|
14516
|
+
}, z.core.$strip>;
|
|
14517
|
+
};
|
|
14390
14518
|
};
|
|
14391
14519
|
export type ToolName = keyof typeof ToolDefinitions;
|
|
14392
14520
|
export type ToolDefinitionByName<TName extends ToolName> = (typeof ToolDefinitions)[TName];
|
package/dist/Tools.js
CHANGED
|
@@ -225,7 +225,8 @@ export const notionReadablePropertyValueSchema = z.union([
|
|
|
225
225
|
z.array(notionFileReferenceSchema),
|
|
226
226
|
notionLooseObjectSchema
|
|
227
227
|
]);
|
|
228
|
-
export const notionPageBlockSchema = z
|
|
228
|
+
export const notionPageBlockSchema = z
|
|
229
|
+
.lazy(() => z.object({
|
|
229
230
|
id: z.string(),
|
|
230
231
|
type: z.string(),
|
|
231
232
|
object: z.string(),
|
|
@@ -250,7 +251,8 @@ export const notionPageBlockSchema = z.lazy(() => z.object({
|
|
|
250
251
|
page_id: z.string().optional(),
|
|
251
252
|
database_id: z.string().optional(),
|
|
252
253
|
children: z.array(notionPageBlockSchema).optional()
|
|
253
|
-
}))
|
|
254
|
+
}))
|
|
255
|
+
.meta({ id: "NotionBlock" });
|
|
254
256
|
export const notionPageQueryMetadataSchema = z.object({
|
|
255
257
|
page_id: z.string(),
|
|
256
258
|
object: z.string(),
|
|
@@ -2792,6 +2794,30 @@ export const memoryTool = defineTool({
|
|
|
2792
2794
|
inputSchema: memoryInputSchema,
|
|
2793
2795
|
outputSchema: memoryOutputSchema
|
|
2794
2796
|
});
|
|
2797
|
+
export const resendSendTemplateInputSchema = z.object({
|
|
2798
|
+
integrationId: z.string().describe("Connected Resend integration ID"),
|
|
2799
|
+
templateId: z.string().describe("Published template ID or alias"),
|
|
2800
|
+
to: z.array(z.email()).min(1).max(50).describe("Recipient email addresses"),
|
|
2801
|
+
variables: z.record(z.string(), z.union([z.string(), z.number()])).describe("Template variables keyed exactly as defined by the template"),
|
|
2802
|
+
from: z.string().nullable().optional().describe("Optional sender override; omit when the template defines one"),
|
|
2803
|
+
subject: z.string().nullable().optional().describe("Optional subject override; omit when the template defines one"),
|
|
2804
|
+
replyTo: z.email().nullable().optional().describe("Optional reply-to override"),
|
|
2805
|
+
cc: z.array(z.email()).nullable().optional().describe("Optional CC recipients"),
|
|
2806
|
+
bcc: z.array(z.email()).nullable().optional().describe("Optional BCC recipients"),
|
|
2807
|
+
idempotencyKey: z.string().max(256).nullable().optional().describe("Optional idempotency key, retained by Resend for 24 hours")
|
|
2808
|
+
});
|
|
2809
|
+
export const resendSendTemplateOutputSchema = toolOutputBaseSchema.extend({
|
|
2810
|
+
emailId: z.string(),
|
|
2811
|
+
templateId: z.string(),
|
|
2812
|
+
to: z.array(z.string()),
|
|
2813
|
+
summary: z.string()
|
|
2814
|
+
});
|
|
2815
|
+
export const resendSendTemplateTool = defineTool({
|
|
2816
|
+
name: "resend_send_template",
|
|
2817
|
+
description: "Send a published Resend email template. Supply every required template variable without a fallback value.",
|
|
2818
|
+
inputSchema: resendSendTemplateInputSchema,
|
|
2819
|
+
outputSchema: resendSendTemplateOutputSchema
|
|
2820
|
+
});
|
|
2795
2821
|
export const ToolDefinitions = {
|
|
2796
2822
|
[linearCreateTicketTool.name]: linearCreateTicketTool,
|
|
2797
2823
|
[linearUpdateTicketTool.name]: linearUpdateTicketTool,
|
|
@@ -2873,7 +2899,8 @@ export const ToolDefinitions = {
|
|
|
2873
2899
|
[webExtractTool.name]: webExtractTool,
|
|
2874
2900
|
[webResearchTool.name]: webResearchTool,
|
|
2875
2901
|
[imageEditTool.name]: imageEditTool,
|
|
2876
|
-
[memoryTool.name]: memoryTool
|
|
2902
|
+
[memoryTool.name]: memoryTool,
|
|
2903
|
+
[resendSendTemplateTool.name]: resendSendTemplateTool
|
|
2877
2904
|
};
|
|
2878
2905
|
export const toolsWithIntegrationId = new Set(Object.entries(ToolDefinitions)
|
|
2879
2906
|
.filter(([, def]) => {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { IntegrationType } from "./Integrations.js";
|
|
3
|
+
export declare function defineTrigger<S extends z.ZodType>(definition: Omit<ConcreteTriggerDefinition<S>, "kind">): ConcreteTriggerDefinition<S>;
|
|
4
|
+
export declare function defineTriggerUnion(definition: Omit<UnionTriggerDefinition, "kind">): UnionTriggerDefinition;
|
|
5
|
+
export interface TriggerDisplay {
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle: string;
|
|
8
|
+
}
|
|
9
|
+
export type TriggerPrintHints = {
|
|
10
|
+
readonly typeParams?: string;
|
|
11
|
+
readonly aliasArgs?: string;
|
|
12
|
+
readonly fieldOverrides?: Readonly<Record<string, string>>;
|
|
13
|
+
readonly imports?: readonly string[];
|
|
14
|
+
};
|
|
15
|
+
export type TriggerPresenter<T> = {
|
|
16
|
+
formatForAgent(trigger: T): string;
|
|
17
|
+
debug(trigger: T): string;
|
|
18
|
+
display(trigger: T): TriggerDisplay;
|
|
19
|
+
};
|
|
20
|
+
export type ConcreteTriggerDefinition<S extends z.ZodType = z.ZodType> = {
|
|
21
|
+
readonly kind: "concrete";
|
|
22
|
+
readonly integration: IntegrationType;
|
|
23
|
+
readonly schema: S;
|
|
24
|
+
readonly eventTypes: readonly string[];
|
|
25
|
+
readonly printHints?: TriggerPrintHints;
|
|
26
|
+
readonly presenter?: TriggerPresenter<z.infer<S>>;
|
|
27
|
+
};
|
|
28
|
+
export type UnionTriggerDefinition = {
|
|
29
|
+
readonly kind: "union";
|
|
30
|
+
readonly integration: IntegrationType;
|
|
31
|
+
readonly members: readonly string[];
|
|
32
|
+
readonly presenter?: TriggerPresenter<unknown>;
|
|
33
|
+
};
|
|
34
|
+
export type TriggerDefinition = ConcreteTriggerDefinition | UnionTriggerDefinition;
|
|
@@ -1,9 +1,39 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { TriggerDisplay } from "./TriggerDefinition.js";
|
|
3
|
+
import type { AttioTrigger, CronTrigger, GithubTrigger, GmailTrigger, HeyReachTrigger, LinearTrigger, ManualSampleTrigger, WebMonitorTrigger, WebhookTrigger, WorkOSTrigger, slackTriggerSchema } from "./Triggers.js";
|
|
4
|
+
export type { TriggerDisplay } from "./TriggerDefinition.js";
|
|
5
|
+
export declare function formatManualSampleTrigger(event: ManualSampleTrigger): string;
|
|
6
|
+
export declare function debugManualSampleTrigger(event: ManualSampleTrigger): string;
|
|
7
|
+
export declare function displayManualSampleTrigger(event: ManualSampleTrigger): TriggerDisplay;
|
|
8
|
+
export declare function formatGithubTrigger(event: GithubTrigger): string;
|
|
9
|
+
export declare function debugGithubTrigger(event: GithubTrigger): string;
|
|
10
|
+
export declare function formatGithubDisplay(event: GithubTrigger): TriggerDisplay;
|
|
11
|
+
export declare function formatSlackTrigger(event: SlackTriggerEvent): string;
|
|
12
|
+
export declare function debugSlackTrigger(event: SlackTriggerEvent): string;
|
|
13
|
+
export declare function formatSlackDisplay(event: SlackTriggerEvent): TriggerDisplay;
|
|
14
|
+
export declare function formatGmailTrigger(event: GmailTrigger): string;
|
|
15
|
+
export declare function debugGmailTrigger(event: GmailTrigger): string;
|
|
16
|
+
export declare function formatGmailDisplay(event: GmailTrigger): TriggerDisplay;
|
|
17
|
+
export declare function formatLinearTrigger(event: LinearTrigger): string;
|
|
18
|
+
export declare function debugLinearTrigger(event: LinearTrigger): string;
|
|
19
|
+
export declare function formatLinearDisplay(event: LinearTrigger): TriggerDisplay;
|
|
20
|
+
export declare function formatWorkOSTrigger(event: WorkOSTrigger): string;
|
|
21
|
+
export declare function debugWorkOSTrigger(event: WorkOSTrigger): string;
|
|
22
|
+
export declare function formatWorkOSDisplay(event: WorkOSTrigger): TriggerDisplay;
|
|
23
|
+
export declare function formatHeyReachTrigger(event: HeyReachTrigger): string;
|
|
24
|
+
export declare function debugHeyReachTrigger(event: HeyReachTrigger): string;
|
|
25
|
+
export declare function formatHeyReachDisplay(event: HeyReachTrigger): TriggerDisplay;
|
|
26
|
+
export declare function formatAttioTrigger(event: AttioTrigger): string;
|
|
27
|
+
export declare function debugAttioTrigger(event: AttioTrigger): string;
|
|
28
|
+
export declare function formatAttioDisplay(event: AttioTrigger): TriggerDisplay;
|
|
9
29
|
export declare function humanizeAttioEventType(eventType: string): string;
|
|
30
|
+
export declare function formatWebhookTrigger(event: WebhookTrigger): string;
|
|
31
|
+
export declare function debugWebhookTrigger(event: WebhookTrigger): string;
|
|
32
|
+
export declare function formatWebhookDisplay(event: WebhookTrigger): TriggerDisplay;
|
|
33
|
+
export declare function formatCronTrigger(event: CronTrigger): string;
|
|
34
|
+
export declare function debugCronTrigger(event: CronTrigger): string;
|
|
35
|
+
export declare function formatCronDisplay(event: CronTrigger): TriggerDisplay;
|
|
36
|
+
export declare function formatWebMonitorTrigger(event: WebMonitorTrigger): string;
|
|
37
|
+
export declare function debugWebMonitorTrigger(event: WebMonitorTrigger): string;
|
|
38
|
+
export declare function formatWebMonitorDisplay(event: WebMonitorTrigger): TriggerDisplay;
|
|
39
|
+
type SlackTriggerEvent = z.infer<typeof slackTriggerSchema>;
|