terse-types 0.0.2 → 0.0.3

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.
@@ -111,6 +111,7 @@ export declare const ApiRoutes: {
111
111
  LIST: string;
112
112
  RECENT: string;
113
113
  BY_ID: string;
114
+ WEBHOOK_URL: string;
114
115
  };
115
116
  IMPROVEMENTS: {
116
117
  BY_AGENT_ID: string;
@@ -167,6 +168,7 @@ export declare const ApiRoutes: {
167
168
  LINEAR_BY_USER_ID: string;
168
169
  SCHEDULE_BY_INPUT_ID: string;
169
170
  WORKOS_TRIGGER_BY_INTEGRATION_ID: string;
171
+ WEBHOOK_TRIGGER_BY_TOKEN: string;
170
172
  };
171
173
  SCHEDULE: {
172
174
  TRIGGER_BY_INPUT_ID: string;
@@ -110,7 +110,8 @@
110
110
  "AGENTS": {
111
111
  "LIST": "/agents",
112
112
  "RECENT": "/agents/recent",
113
- "BY_ID": "/agents/:id"
113
+ "BY_ID": "/agents/:id",
114
+ "WEBHOOK_URL": "/agents/:agentId/webhook-url"
114
115
  },
115
116
  "IMPROVEMENTS": {
116
117
  "BY_AGENT_ID": "/agents/:agentId/improvements",
@@ -166,7 +167,8 @@
166
167
  "JIRA_BY_ACCOUNT_ID": "/webhooks/jira/:accountId",
167
168
  "LINEAR_BY_USER_ID": "/webhooks/linear/:userId",
168
169
  "SCHEDULE_BY_INPUT_ID": "/webhooks/schedule/:inputId",
169
- "WORKOS_TRIGGER_BY_INTEGRATION_ID": "/webhooks/workos-trigger/:integrationId"
170
+ "WORKOS_TRIGGER_BY_INTEGRATION_ID": "/webhooks/workos-trigger/:integrationId",
171
+ "WEBHOOK_TRIGGER_BY_TOKEN": "/webhooks/trigger/:webhookToken"
170
172
  },
171
173
  "SCHEDULE": {
172
174
  "TRIGGER_BY_INPUT_ID": "/schedule/trigger/:inputId",
package/dist/Configs.d.ts CHANGED
@@ -21,7 +21,8 @@ export declare enum ConfigType {
21
21
  WORKOS_INPUT = "workos_input",
22
22
  WORKOS_OUTPUT = "workos_output",
23
23
  ATTIO_OUTPUT = "attio_output",
24
- SNOWFLAKE_OUTPUT = "snowflake_output"
24
+ SNOWFLAKE_OUTPUT = "snowflake_output",
25
+ WEBHOOK_INPUT = "webhook_input"
25
26
  }
26
27
  export declare const configTypeEnum: z.ZodEnum<typeof ConfigType>;
27
28
  export interface ConfigDetails {
@@ -200,6 +201,14 @@ export declare const SnowflakeOutputConfigMetadata: {
200
201
  readonly isInput: false;
201
202
  readonly isOutput: true;
202
203
  };
204
+ export declare const WebhookInputConfigMetadata: {
205
+ readonly configType: ConfigType.WEBHOOK_INPUT;
206
+ readonly name: "Webhook";
207
+ readonly description: "Trigger via an external HTTP request to a generated URL";
208
+ readonly integrationType: IntegrationType.WEBHOOK;
209
+ readonly isInput: true;
210
+ readonly isOutput: false;
211
+ };
203
212
  export type ConfigDetailsMap = Record<ConfigType, ConfigDetails>;
204
213
  export declare const CONFIG_DETAILS: ConfigDetailsMap;
205
214
  export declare enum SlackEventType {
@@ -600,6 +609,18 @@ export declare class SnowflakeOutputConfig extends BaseConfigInstance<Integratio
600
609
  isComplete(): boolean;
601
610
  formatForAgent(): string;
602
611
  }
612
+ export declare const WebhookInputConfigSchema: z.ZodObject<{
613
+ integrationId: z.ZodLiteral<"system">;
614
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
615
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
616
+ }, z.core.$strip>;
617
+ export type WebhookInputConfigData = z.infer<typeof WebhookInputConfigSchema>;
618
+ export type WebhookInputConfigInstance = WebhookInputConfigData & ConfigBehavior;
619
+ export declare class WebhookInputConfig extends BaseConfigInstance<IntegrationType.WEBHOOK, ConfigType.WEBHOOK_INPUT, "system"> implements WebhookInputConfigInstance {
620
+ constructor();
621
+ isComplete(): boolean;
622
+ formatForAgent(): string;
623
+ }
603
624
  export declare const configDataSchema: z.ZodUnion<readonly [z.ZodObject<{
604
625
  integrationId: z.ZodString;
605
626
  integrationType: z.ZodLiteral<IntegrationType.GMAIL>;
@@ -727,6 +748,10 @@ export declare const configDataSchema: z.ZodUnion<readonly [z.ZodObject<{
727
748
  integrationId: z.ZodString;
728
749
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
729
750
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
751
+ }, z.core.$strip>, z.ZodObject<{
752
+ integrationId: z.ZodLiteral<"system">;
753
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
754
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
730
755
  }, z.core.$strip>]>;
731
756
  export type ConfigData = z.infer<typeof configDataSchema>;
732
757
  export declare function isConfigComplete(config: ConfigData | undefined): boolean;
@@ -754,6 +779,7 @@ export type ConfigMetadataMap = EnsureExhaustiveMetadata<{
754
779
  [ConfigType.WORKOS_OUTPUT]: typeof WorkOSOutputConfig;
755
780
  [ConfigType.ATTIO_OUTPUT]: typeof AttioOutputConfig;
756
781
  [ConfigType.SNOWFLAKE_OUTPUT]: typeof SnowflakeOutputConfig;
782
+ [ConfigType.WEBHOOK_INPUT]: typeof WebhookInputConfig;
757
783
  }>;
758
784
  export declare const CONFIG_METADATA: ConfigMetadataMap;
759
785
  export {};
package/dist/Configs.js CHANGED
@@ -23,6 +23,7 @@ export var ConfigType;
23
23
  ConfigType["WORKOS_OUTPUT"] = "workos_output";
24
24
  ConfigType["ATTIO_OUTPUT"] = "attio_output";
25
25
  ConfigType["SNOWFLAKE_OUTPUT"] = "snowflake_output";
26
+ ConfigType["WEBHOOK_INPUT"] = "webhook_input";
26
27
  })(ConfigType || (ConfigType = {}));
27
28
  export const configTypeEnum = z.enum(ConfigType);
28
29
  // Metadata objects - using const objects instead of classes
@@ -194,6 +195,14 @@ export const SnowflakeOutputConfigMetadata = {
194
195
  isInput: false,
195
196
  isOutput: true
196
197
  };
198
+ export const WebhookInputConfigMetadata = {
199
+ configType: ConfigType.WEBHOOK_INPUT,
200
+ name: "Webhook",
201
+ description: "Trigger via an external HTTP request to a generated URL",
202
+ integrationType: IntegrationType.WEBHOOK,
203
+ isInput: true,
204
+ isOutput: false
205
+ };
197
206
  export const CONFIG_DETAILS = {
198
207
  [ConfigType.GMAIL]: GmailConfigMetadata,
199
208
  [ConfigType.GMAIL_OUTPUT]: GmailOutputConfigMetadata,
@@ -215,7 +224,8 @@ export const CONFIG_DETAILS = {
215
224
  [ConfigType.WORKOS_INPUT]: WorkOSInputConfigMetadata,
216
225
  [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfigMetadata,
217
226
  [ConfigType.ATTIO_OUTPUT]: AttioOutputConfigMetadata,
218
- [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfigMetadata
227
+ [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfigMetadata,
228
+ [ConfigType.WEBHOOK_INPUT]: WebhookInputConfigMetadata
219
229
  };
220
230
  // MARK: Event Types — specific events within each integration trigger
221
231
  export var SlackEventType;
@@ -843,6 +853,22 @@ export class SnowflakeOutputConfig extends BaseConfigInstance {
843
853
  return parts.join("\n");
844
854
  }
845
855
  }
856
+ export const WebhookInputConfigSchema = ConfigInstanceSchema.extend({
857
+ integrationId: z.literal("system"),
858
+ integrationType: z.literal(IntegrationType.WEBHOOK),
859
+ configType: z.literal(ConfigType.WEBHOOK_INPUT)
860
+ });
861
+ export class WebhookInputConfig extends BaseConfigInstance {
862
+ constructor() {
863
+ super("system", IntegrationType.WEBHOOK, ConfigType.WEBHOOK_INPUT);
864
+ }
865
+ isComplete() {
866
+ return true;
867
+ }
868
+ formatForAgent() {
869
+ return "Type: Webhook Trigger";
870
+ }
871
+ }
846
872
  export const configDataSchema = z.union([
847
873
  GmailConfigSchema,
848
874
  FigmaConfigSchema,
@@ -864,7 +890,8 @@ export const configDataSchema = z.union([
864
890
  WorkOSInputConfigSchema,
865
891
  WorkOSOutputConfigSchema,
866
892
  AttioOutputConfigSchema,
867
- SnowflakeOutputConfigSchema
893
+ SnowflakeOutputConfigSchema,
894
+ WebhookInputConfigSchema
868
895
  ]);
869
896
  export function isConfigComplete(config) {
870
897
  if (!config) {
@@ -878,6 +905,7 @@ export function isConfigComplete(config) {
878
905
  case ConfigType.JIRA:
879
906
  case ConfigType.CONFLUENCE:
880
907
  case ConfigType.TERSE:
908
+ case ConfigType.WEBHOOK_INPUT:
881
909
  return true;
882
910
  case ConfigType.FIGMA:
883
911
  return !!(config.fileKey && config.teamId);
@@ -1059,6 +1087,8 @@ export function formatConfigForAgent(config) {
1059
1087
  }
1060
1088
  case ConfigType.SNOWFLAKE_OUTPUT:
1061
1089
  return `Type: Snowflake Output\nIntegration ID: ${config.integrationId}`;
1090
+ case ConfigType.WEBHOOK_INPUT:
1091
+ return "Type: Webhook Trigger";
1062
1092
  default: {
1063
1093
  const _exhaustive = config;
1064
1094
  return _exhaustive;
@@ -1086,5 +1116,6 @@ export const CONFIG_METADATA = {
1086
1116
  [ConfigType.WORKOS_INPUT]: WorkOSInputConfig,
1087
1117
  [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfig,
1088
1118
  [ConfigType.ATTIO_OUTPUT]: AttioOutputConfig,
1089
- [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfig
1119
+ [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfig,
1120
+ [ConfigType.WEBHOOK_INPUT]: WebhookInputConfig
1090
1121
  };
@@ -14,7 +14,8 @@ export declare enum IntegrationType {
14
14
  LAUNCHDARKLY = "launchdarkly",
15
15
  WORKOS = "workos",
16
16
  ATTIO = "attio",
17
- SNOWFLAKE = "snowflake"
17
+ SNOWFLAKE = "snowflake",
18
+ WEBHOOK = "webhook"
18
19
  }
19
20
  export declare const integrationTypeEnum: z.ZodEnum<typeof IntegrationType>;
20
21
  export interface IntegrationDetails {
@@ -129,6 +130,13 @@ export declare const SnowflakeIntegrationMetadata: {
129
130
  readonly isInput: false;
130
131
  readonly isOutput: true;
131
132
  };
133
+ export declare const WebhookIntegrationMetadata: {
134
+ readonly type: IntegrationType.WEBHOOK;
135
+ readonly name: "Webhook";
136
+ readonly description: "Trigger via an external HTTP request to a generated URL";
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.WORKOS]: NoInstallationOptions;
158
166
  [IntegrationType.ATTIO]: NoInstallationOptions;
159
167
  [IntegrationType.SNOWFLAKE]: NoInstallationOptions;
168
+ [IntegrationType.WEBHOOK]: NoInstallationOptions;
160
169
  }>;
161
170
  export type InstallationOptionsFor<T extends IntegrationType> = IntegrationInstallationOptions[T];
162
171
  export declare const SlackIntegrationSchema: z.ZodObject<{
@@ -17,6 +17,7 @@ export var IntegrationType;
17
17
  IntegrationType["WORKOS"] = "workos";
18
18
  IntegrationType["ATTIO"] = "attio";
19
19
  IntegrationType["SNOWFLAKE"] = "snowflake";
20
+ IntegrationType["WEBHOOK"] = "webhook";
20
21
  })(IntegrationType || (IntegrationType = {}));
21
22
  export const integrationTypeEnum = z.enum(IntegrationType);
22
23
  // Metadata objects - using const objects instead of classes
@@ -125,6 +126,13 @@ export const SnowflakeIntegrationMetadata = {
125
126
  isInput: false,
126
127
  isOutput: true
127
128
  };
129
+ export const WebhookIntegrationMetadata = {
130
+ type: IntegrationType.WEBHOOK,
131
+ name: "Webhook",
132
+ description: "Trigger via an external HTTP request to a generated URL",
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.LAUNCHDARKLY]: LaunchDarklyIntegrationMetadata,
141
149
  [IntegrationType.WORKOS]: WorkOSIntegrationMetadata,
142
150
  [IntegrationType.ATTIO]: AttioIntegrationMetadata,
143
- [IntegrationType.SNOWFLAKE]: SnowflakeIntegrationMetadata
151
+ [IntegrationType.SNOWFLAKE]: SnowflakeIntegrationMetadata,
152
+ [IntegrationType.WEBHOOK]: WebhookIntegrationMetadata
144
153
  };
145
154
  // MARK: Integration Details
146
155
  export const IntegrationInstanceSchema = z.object({
package/dist/types.d.ts CHANGED
@@ -688,6 +688,10 @@ export declare const deviceTokenExchangeResponseSchema: z.ZodObject<{
688
688
  }, z.core.$strip>;
689
689
  }, z.core.$strip>;
690
690
  export type DeviceTokenExchangeResponse = z.infer<typeof deviceTokenExchangeResponseSchema>;
691
+ export declare const triggerMetadataSchema: z.ZodObject<{
692
+ webhookUrl: z.ZodOptional<z.ZodString>;
693
+ }, z.core.$strip>;
694
+ export type TriggerMetadata = z.infer<typeof triggerMetadataSchema>;
691
695
  export declare const agentTriggerSchema: z.ZodObject<{
692
696
  id: z.ZodString;
693
697
  config: z.ZodUnion<readonly [z.ZodObject<{
@@ -817,7 +821,14 @@ export declare const agentTriggerSchema: z.ZodObject<{
817
821
  integrationId: z.ZodString;
818
822
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
819
823
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
824
+ }, z.core.$strip>, z.ZodObject<{
825
+ integrationId: z.ZodLiteral<"system">;
826
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
827
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
820
828
  }, z.core.$strip>]>;
829
+ metadata: z.ZodOptional<z.ZodObject<{
830
+ webhookUrl: z.ZodOptional<z.ZodString>;
831
+ }, z.core.$strip>>;
821
832
  }, z.core.$strip>;
822
833
  export type AgentTrigger = z.infer<typeof agentTriggerSchema>;
823
834
  export declare const agentOutputSchema: z.ZodObject<{
@@ -949,6 +960,10 @@ export declare const agentOutputSchema: z.ZodObject<{
949
960
  integrationId: z.ZodString;
950
961
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
951
962
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
963
+ }, z.core.$strip>, z.ZodObject<{
964
+ integrationId: z.ZodLiteral<"system">;
965
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
966
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
952
967
  }, z.core.$strip>]>;
953
968
  }, z.core.$strip>;
954
969
  export type AgentOutput = z.infer<typeof agentOutputSchema>;
@@ -1085,6 +1100,10 @@ export declare const transientAgentTriggerSchema: z.ZodObject<{
1085
1100
  integrationId: z.ZodString;
1086
1101
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
1087
1102
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
1103
+ }, z.core.$strip>, z.ZodObject<{
1104
+ integrationId: z.ZodLiteral<"system">;
1105
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
1106
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
1088
1107
  }, z.core.$strip>]>>;
1089
1108
  configType: z.ZodEnum<typeof ConfigType>;
1090
1109
  }, z.core.$strip>;
@@ -1218,6 +1237,10 @@ export declare const transientAgentOutputSchema: z.ZodObject<{
1218
1237
  integrationId: z.ZodString;
1219
1238
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
1220
1239
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
1240
+ }, z.core.$strip>, z.ZodObject<{
1241
+ integrationId: z.ZodLiteral<"system">;
1242
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
1243
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
1221
1244
  }, z.core.$strip>]>>;
1222
1245
  configType: z.ZodEnum<typeof ConfigType>;
1223
1246
  }, z.core.$strip>;
@@ -1427,7 +1450,14 @@ export declare const agentSchema: z.ZodObject<{
1427
1450
  integrationId: z.ZodString;
1428
1451
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
1429
1452
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
1453
+ }, z.core.$strip>, z.ZodObject<{
1454
+ integrationId: z.ZodLiteral<"system">;
1455
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
1456
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
1430
1457
  }, z.core.$strip>]>;
1458
+ metadata: z.ZodOptional<z.ZodObject<{
1459
+ webhookUrl: z.ZodOptional<z.ZodString>;
1460
+ }, z.core.$strip>>;
1431
1461
  }, z.core.$strip>>;
1432
1462
  outputs: z.ZodArray<z.ZodObject<{
1433
1463
  id: z.ZodString;
@@ -1558,6 +1588,10 @@ export declare const agentSchema: z.ZodObject<{
1558
1588
  integrationId: z.ZodString;
1559
1589
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
1560
1590
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
1591
+ }, z.core.$strip>, z.ZodObject<{
1592
+ integrationId: z.ZodLiteral<"system">;
1593
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
1594
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
1561
1595
  }, z.core.$strip>]>;
1562
1596
  }, z.core.$strip>>;
1563
1597
  createdByUserId: z.ZodString;
@@ -1711,7 +1745,14 @@ export declare const agentUpdateSchema: z.ZodObject<{
1711
1745
  integrationId: z.ZodString;
1712
1746
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
1713
1747
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
1748
+ }, z.core.$strip>, z.ZodObject<{
1749
+ integrationId: z.ZodLiteral<"system">;
1750
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
1751
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
1714
1752
  }, z.core.$strip>]>;
1753
+ metadata: z.ZodOptional<z.ZodObject<{
1754
+ webhookUrl: z.ZodOptional<z.ZodString>;
1755
+ }, z.core.$strip>>;
1715
1756
  }, z.core.$strip>>>;
1716
1757
  outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1717
1758
  id: z.ZodString;
@@ -1842,6 +1883,10 @@ export declare const agentUpdateSchema: z.ZodObject<{
1842
1883
  integrationId: z.ZodString;
1843
1884
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
1844
1885
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
1886
+ }, z.core.$strip>, z.ZodObject<{
1887
+ integrationId: z.ZodLiteral<"system">;
1888
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
1889
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
1845
1890
  }, z.core.$strip>]>;
1846
1891
  }, z.core.$strip>>>;
1847
1892
  prompt: z.ZodOptional<z.ZodObject<{
@@ -1998,7 +2043,14 @@ export declare const agentCreateSchema: z.ZodObject<{
1998
2043
  integrationId: z.ZodString;
1999
2044
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
2000
2045
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
2046
+ }, z.core.$strip>, z.ZodObject<{
2047
+ integrationId: z.ZodLiteral<"system">;
2048
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2049
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
2001
2050
  }, z.core.$strip>]>;
2051
+ metadata: z.ZodOptional<z.ZodObject<{
2052
+ webhookUrl: z.ZodOptional<z.ZodString>;
2053
+ }, z.core.$strip>>;
2002
2054
  }, z.core.$strip>>;
2003
2055
  outputs: z.ZodArray<z.ZodObject<{
2004
2056
  id: z.ZodString;
@@ -2129,6 +2181,10 @@ export declare const agentCreateSchema: z.ZodObject<{
2129
2181
  integrationId: z.ZodString;
2130
2182
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
2131
2183
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
2184
+ }, z.core.$strip>, z.ZodObject<{
2185
+ integrationId: z.ZodLiteral<"system">;
2186
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2187
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
2132
2188
  }, z.core.$strip>]>;
2133
2189
  }, z.core.$strip>>;
2134
2190
  requireApproval: z.ZodBoolean;
@@ -2281,7 +2337,14 @@ export declare const agentDraftSchema: z.ZodObject<{
2281
2337
  integrationId: z.ZodString;
2282
2338
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
2283
2339
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
2340
+ }, z.core.$strip>, z.ZodObject<{
2341
+ integrationId: z.ZodLiteral<"system">;
2342
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2343
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
2284
2344
  }, z.core.$strip>]>;
2345
+ metadata: z.ZodOptional<z.ZodObject<{
2346
+ webhookUrl: z.ZodOptional<z.ZodString>;
2347
+ }, z.core.$strip>>;
2285
2348
  }, z.core.$strip>>;
2286
2349
  outputs: z.ZodArray<z.ZodObject<{
2287
2350
  id: z.ZodString;
@@ -2412,6 +2475,10 @@ export declare const agentDraftSchema: z.ZodObject<{
2412
2475
  integrationId: z.ZodString;
2413
2476
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
2414
2477
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
2478
+ }, z.core.$strip>, z.ZodObject<{
2479
+ integrationId: z.ZodLiteral<"system">;
2480
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2481
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
2415
2482
  }, z.core.$strip>]>;
2416
2483
  }, z.core.$strip>>;
2417
2484
  requireApproval: z.ZodBoolean;
@@ -2575,7 +2642,14 @@ export declare const agentsResponseSchema: z.ZodObject<{
2575
2642
  integrationId: z.ZodString;
2576
2643
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
2577
2644
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
2645
+ }, z.core.$strip>, z.ZodObject<{
2646
+ integrationId: z.ZodLiteral<"system">;
2647
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2648
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
2578
2649
  }, z.core.$strip>]>;
2650
+ metadata: z.ZodOptional<z.ZodObject<{
2651
+ webhookUrl: z.ZodOptional<z.ZodString>;
2652
+ }, z.core.$strip>>;
2579
2653
  }, z.core.$strip>>;
2580
2654
  outputs: z.ZodArray<z.ZodObject<{
2581
2655
  id: z.ZodString;
@@ -2706,6 +2780,10 @@ export declare const agentsResponseSchema: z.ZodObject<{
2706
2780
  integrationId: z.ZodString;
2707
2781
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
2708
2782
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
2783
+ }, z.core.$strip>, z.ZodObject<{
2784
+ integrationId: z.ZodLiteral<"system">;
2785
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2786
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
2709
2787
  }, z.core.$strip>]>;
2710
2788
  }, z.core.$strip>>;
2711
2789
  createdByUserId: z.ZodString;
@@ -2872,7 +2950,14 @@ export declare const recentAgentSchema: z.ZodObject<{
2872
2950
  integrationId: z.ZodString;
2873
2951
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
2874
2952
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
2953
+ }, z.core.$strip>, z.ZodObject<{
2954
+ integrationId: z.ZodLiteral<"system">;
2955
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2956
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
2875
2957
  }, z.core.$strip>]>;
2958
+ metadata: z.ZodOptional<z.ZodObject<{
2959
+ webhookUrl: z.ZodOptional<z.ZodString>;
2960
+ }, z.core.$strip>>;
2876
2961
  }, z.core.$strip>>;
2877
2962
  outputs: z.ZodArray<z.ZodObject<{
2878
2963
  id: z.ZodString;
@@ -3003,6 +3088,10 @@ export declare const recentAgentSchema: z.ZodObject<{
3003
3088
  integrationId: z.ZodString;
3004
3089
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
3005
3090
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
3091
+ }, z.core.$strip>, z.ZodObject<{
3092
+ integrationId: z.ZodLiteral<"system">;
3093
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
3094
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
3006
3095
  }, z.core.$strip>]>;
3007
3096
  }, z.core.$strip>>;
3008
3097
  createdByUserId: z.ZodString;
@@ -3513,6 +3602,10 @@ export declare const triggerPayloadSchema: z.ZodObject<{
3513
3602
  integrationId: z.ZodString;
3514
3603
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
3515
3604
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
3605
+ }, z.core.$strip>, z.ZodObject<{
3606
+ integrationId: z.ZodLiteral<"system">;
3607
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
3608
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
3516
3609
  }, z.core.$strip>]>;
3517
3610
  }, z.core.$strip>;
3518
3611
  export type TriggerPayload = z.infer<typeof triggerPayloadSchema>;
@@ -3675,6 +3768,10 @@ export declare const sdkAgentRunRequestBodySchema: z.ZodObject<{
3675
3768
  integrationId: z.ZodString;
3676
3769
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
3677
3770
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
3771
+ }, z.core.$strip>, z.ZodObject<{
3772
+ integrationId: z.ZodLiteral<"system">;
3773
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
3774
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
3678
3775
  }, z.core.$strip>]>>>;
3679
3776
  options: z.ZodOptional<z.ZodObject<{
3680
3777
  maxTurns: z.ZodOptional<z.ZodNumber>;
@@ -3825,6 +3922,10 @@ export declare const sdkAgentRunNormalizedRequestSchema: z.ZodObject<{
3825
3922
  integrationId: z.ZodString;
3826
3923
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
3827
3924
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
3925
+ }, z.core.$strip>, z.ZodObject<{
3926
+ integrationId: z.ZodLiteral<"system">;
3927
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
3928
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
3828
3929
  }, z.core.$strip>]>>;
3829
3930
  toolApprovals: z.ZodArray<z.ZodString>;
3830
3931
  options: z.ZodObject<{
@@ -3974,6 +4075,10 @@ export declare const sdkAgentRunResponseBodySchema: z.ZodObject<{
3974
4075
  integrationId: z.ZodString;
3975
4076
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
3976
4077
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
4078
+ }, z.core.$strip>, z.ZodObject<{
4079
+ integrationId: z.ZodLiteral<"system">;
4080
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
4081
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
3977
4082
  }, z.core.$strip>]>>;
3978
4083
  toolApprovals: z.ZodArray<z.ZodString>;
3979
4084
  options: z.ZodObject<{
@@ -4180,6 +4285,10 @@ export declare const sdkDeployJobSchema: z.ZodObject<{
4180
4285
  integrationId: z.ZodString;
4181
4286
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
4182
4287
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
4288
+ }, z.core.$strip>, z.ZodObject<{
4289
+ integrationId: z.ZodLiteral<"system">;
4290
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
4291
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
4183
4292
  }, z.core.$strip>]>>;
4184
4293
  outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
4185
4294
  integrationId: z.ZodString;
@@ -4308,6 +4417,10 @@ export declare const sdkDeployJobSchema: z.ZodObject<{
4308
4417
  integrationId: z.ZodString;
4309
4418
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
4310
4419
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
4420
+ }, z.core.$strip>, z.ZodObject<{
4421
+ integrationId: z.ZodLiteral<"system">;
4422
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
4423
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
4311
4424
  }, z.core.$strip>]>>;
4312
4425
  toolApprovals: z.ZodArray<z.ZodString>;
4313
4426
  webhookURL: z.ZodOptional<z.ZodString>;
@@ -4443,6 +4556,10 @@ export declare const sdkDeployRequestBodySchema: z.ZodObject<{
4443
4556
  integrationId: z.ZodString;
4444
4557
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
4445
4558
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
4559
+ }, z.core.$strip>, z.ZodObject<{
4560
+ integrationId: z.ZodLiteral<"system">;
4561
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
4562
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
4446
4563
  }, z.core.$strip>]>>;
4447
4564
  outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
4448
4565
  integrationId: z.ZodString;
@@ -4571,6 +4688,10 @@ export declare const sdkDeployRequestBodySchema: z.ZodObject<{
4571
4688
  integrationId: z.ZodString;
4572
4689
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
4573
4690
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
4691
+ }, z.core.$strip>, z.ZodObject<{
4692
+ integrationId: z.ZodLiteral<"system">;
4693
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
4694
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
4574
4695
  }, z.core.$strip>]>>;
4575
4696
  toolApprovals: z.ZodArray<z.ZodString>;
4576
4697
  webhookURL: z.ZodOptional<z.ZodString>;
@@ -4582,6 +4703,12 @@ export declare const sdkDeployResultSchema: z.ZodObject<{
4582
4703
  jobName: z.ZodString;
4583
4704
  automationId: z.ZodString;
4584
4705
  isUpdate: z.ZodBoolean;
4706
+ triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
4707
+ id: z.ZodString;
4708
+ metadata: z.ZodOptional<z.ZodObject<{
4709
+ webhookUrl: z.ZodOptional<z.ZodString>;
4710
+ }, z.core.$strip>>;
4711
+ }, z.core.$strip>>>;
4585
4712
  }, z.core.$strip>;
4586
4713
  export declare const sdkDeployRemovedSchema: z.ZodObject<{
4587
4714
  id: z.ZodString;
@@ -4593,6 +4720,12 @@ export declare const sdkDeployResponseBodySchema: z.ZodObject<{
4593
4720
  jobName: z.ZodString;
4594
4721
  automationId: z.ZodString;
4595
4722
  isUpdate: z.ZodBoolean;
4723
+ triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
4724
+ id: z.ZodString;
4725
+ metadata: z.ZodOptional<z.ZodObject<{
4726
+ webhookUrl: z.ZodOptional<z.ZodString>;
4727
+ }, z.core.$strip>>;
4728
+ }, z.core.$strip>>>;
4596
4729
  }, z.core.$strip>>;
4597
4730
  removed: z.ZodArray<z.ZodObject<{
4598
4731
  id: z.ZodString;
@@ -4800,6 +4933,10 @@ export declare const sdkSampleEventsRequestSchema: z.ZodObject<{
4800
4933
  integrationId: z.ZodString;
4801
4934
  integrationType: z.ZodLiteral<IntegrationType.SNOWFLAKE>;
4802
4935
  configType: z.ZodLiteral<ConfigType.SNOWFLAKE_OUTPUT>;
4936
+ }, z.core.$strip>, z.ZodObject<{
4937
+ integrationId: z.ZodLiteral<"system">;
4938
+ integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
4939
+ configType: z.ZodLiteral<ConfigType.WEBHOOK_INPUT>;
4803
4940
  }, z.core.$strip>]>;
4804
4941
  }, z.core.$strip>>;
4805
4942
  }, z.core.$strip>;
package/dist/types.js CHANGED
@@ -311,9 +311,13 @@ export const deviceTokenExchangeResponseSchema = z.object({
311
311
  user: deviceTokenExchangeUserSchema
312
312
  });
313
313
  const configInstanceDataSchema = configDataSchema;
314
+ export const triggerMetadataSchema = z.object({
315
+ webhookUrl: z.string().optional()
316
+ });
314
317
  export const agentTriggerSchema = z.object({
315
318
  id: z.string(),
316
- config: configInstanceDataSchema
319
+ config: configInstanceDataSchema,
320
+ metadata: triggerMetadataSchema.optional()
317
321
  });
318
322
  export const agentOutputSchema = z.object({
319
323
  id: z.string(),
@@ -656,7 +660,13 @@ export const sdkDeployRequestBodySchema = z.object({
656
660
  export const sdkDeployResultSchema = z.object({
657
661
  jobName: z.string(),
658
662
  automationId: z.string(),
659
- isUpdate: z.boolean()
663
+ isUpdate: z.boolean(),
664
+ triggers: z
665
+ .array(z.object({
666
+ id: z.string(),
667
+ metadata: triggerMetadataSchema.optional()
668
+ }))
669
+ .optional()
660
670
  });
661
671
  export const sdkDeployRemovedSchema = z.object({
662
672
  id: z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terse-types",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "description": "Shared Terse TypeScript types, enums, constants, and helpers.",
6
6
  "main": "./dist/index.js",