terse-types 0.0.1

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.
Files changed (46) hide show
  1. package/README.md +44 -0
  2. package/dist/ApiRouteBuilder.d.ts +185 -0
  3. package/dist/ApiRouteBuilder.js +11 -0
  4. package/dist/ApiRoutes.json +184 -0
  5. package/dist/ApprovalTypes.d.ts +28 -0
  6. package/dist/ApprovalTypes.js +7 -0
  7. package/dist/ClientBoundTools.d.ts +36 -0
  8. package/dist/ClientBoundTools.js +36 -0
  9. package/dist/Configs.d.ts +628 -0
  10. package/dist/Configs.js +868 -0
  11. package/dist/DonatedState.d.ts +4 -0
  12. package/dist/DonatedState.js +12 -0
  13. package/dist/Entities.d.ts +7 -0
  14. package/dist/Entities.js +8 -0
  15. package/dist/FrontendRoutes.json +28 -0
  16. package/dist/FrontendRoutesBuilder.d.ts +30 -0
  17. package/dist/FrontendRoutesBuilder.js +13 -0
  18. package/dist/Integrations.d.ts +254 -0
  19. package/dist/Integrations.js +210 -0
  20. package/dist/InvalidationKeys.d.ts +52 -0
  21. package/dist/InvalidationKeys.js +165 -0
  22. package/dist/ModelEvents.d.ts +175 -0
  23. package/dist/ModelEvents.js +28 -0
  24. package/dist/Notifications.d.ts +42 -0
  25. package/dist/Notifications.js +5 -0
  26. package/dist/RunHistoryTypes.d.ts +103 -0
  27. package/dist/RunHistoryTypes.js +29 -0
  28. package/dist/SentNotifications.d.ts +29 -0
  29. package/dist/SentNotifications.js +12 -0
  30. package/dist/SocketEvents.d.ts +48 -0
  31. package/dist/SocketEvents.js +52 -0
  32. package/dist/Survey.d.ts +9 -0
  33. package/dist/Survey.js +1 -0
  34. package/dist/TicketSystem.d.ts +153 -0
  35. package/dist/TicketSystem.js +20 -0
  36. package/dist/ToolDisplayUtils.d.ts +29 -0
  37. package/dist/ToolDisplayUtils.js +1162 -0
  38. package/dist/Tools.d.ts +9202 -0
  39. package/dist/Tools.js +2099 -0
  40. package/dist/ToolsTypes.d.ts +17 -0
  41. package/dist/ToolsTypes.js +1 -0
  42. package/dist/index.d.ts +20 -0
  43. package/dist/index.js +20 -0
  44. package/dist/types.d.ts +704 -0
  45. package/dist/types.js +115 -0
  46. package/package.json +45 -0
@@ -0,0 +1,4 @@
1
+ export declare abstract class DonatedState {
2
+ abstract readonly stateType: string;
3
+ toJSON(): Record<string, unknown>;
4
+ }
@@ -0,0 +1,12 @@
1
+ export class DonatedState {
2
+ toJSON() {
3
+ const result = { stateType: this.stateType };
4
+ for (const key of Object.keys(this)) {
5
+ const value = this[key];
6
+ if (typeof value !== "function") {
7
+ result[key] = value;
8
+ }
9
+ }
10
+ return result;
11
+ }
12
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum EntityType {
2
+ TICKET = "ticket",
3
+ COMMENT = "comment",
4
+ USER = "user",
5
+ ACTION_EVENT = "action_event",
6
+ RUN_HISTORY_ACTION = "run_history_action"
7
+ }
@@ -0,0 +1,8 @@
1
+ export var EntityType;
2
+ (function (EntityType) {
3
+ EntityType["TICKET"] = "ticket";
4
+ EntityType["COMMENT"] = "comment";
5
+ EntityType["USER"] = "user";
6
+ EntityType["ACTION_EVENT"] = "action_event";
7
+ EntityType["RUN_HISTORY_ACTION"] = "run_history_action";
8
+ })(EntityType || (EntityType = {}));
@@ -0,0 +1,28 @@
1
+ {
2
+ "APP": "/app",
3
+ "OAUTH": {
4
+ "SUCCESS": "/oauth/success",
5
+ "ERROR": "/oauth/error"
6
+ },
7
+ "ONBOARD": "/onboard",
8
+ "AGENTS": {
9
+ "LIST": "/app/agents",
10
+ "SETUP": "/app/agents/setup",
11
+ "NEW": "/app/agents/new",
12
+ "NEW_WITH_TEMPLATE": "/app/agents/new/template/:templateId",
13
+ "BY_ID": "/app/agents/:id",
14
+ "HISTORY": "/app/agents/:id?tab=history",
15
+ "IMPROVEMENTS": "/app/agents/:id?tab=improvements",
16
+ "ALERTS": "/app/agents/:id?tab=setup&section=alerts",
17
+ "RUN_HISTORY": "/app/agents/:id?tab=history&runId=:runId"
18
+ },
19
+ "INTEGRATIONS": "/app/integrations",
20
+ "ACTIVITY": "/app/activity",
21
+ "STATS": "/app/stats",
22
+ "NOTIFICATIONS": "/app/notifications",
23
+ "PROFILE": "/app/profile",
24
+ "USER_MANAGEMENT": "/app/profile?tab=users",
25
+ "ORGANIZATIONS": {
26
+ "CREATE": "/app/organizations/create"
27
+ }
28
+ }
@@ -0,0 +1,30 @@
1
+ /** Query param added when redirecting from Home/AgentBuilderLayout chat to agent page; AgentSetupTab clears session when present */
2
+ export declare const FROM_SETUP_CHAT_PARAM = "fromSetupChat";
3
+ export declare const FrontendRoutes: {
4
+ APP: string;
5
+ OAUTH: {
6
+ SUCCESS: string;
7
+ ERROR: string;
8
+ };
9
+ ONBOARD: string;
10
+ AGENTS: {
11
+ LIST: string;
12
+ SETUP: string;
13
+ NEW: string;
14
+ NEW_WITH_TEMPLATE: string;
15
+ BY_ID: string;
16
+ HISTORY: string;
17
+ IMPROVEMENTS: string;
18
+ ALERTS: string;
19
+ RUN_HISTORY: string;
20
+ };
21
+ INTEGRATIONS: string;
22
+ ACTIVITY: string;
23
+ STATS: string;
24
+ NOTIFICATIONS: string;
25
+ PROFILE: string;
26
+ USER_MANAGEMENT: string;
27
+ ORGANIZATIONS: {
28
+ CREATE: string;
29
+ };
30
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Frontend route path constants
3
+ *
4
+ * These constants standardize frontend route paths across the application,
5
+ * preventing magic strings and making refactoring easier.
6
+ *
7
+ * Dynamic routes use route objects with both React Router patterns and URL builders
8
+ * to ensure consistency across navigation calls and route definitions.
9
+ */
10
+ import frontendRoutes from "./FrontendRoutes.json" with { type: "json" };
11
+ /** Query param added when redirecting from Home/AgentBuilderLayout chat to agent page; AgentSetupTab clears session when present */
12
+ export const FROM_SETUP_CHAT_PARAM = "fromSetupChat";
13
+ export const FrontendRoutes = frontendRoutes;
@@ -0,0 +1,254 @@
1
+ import * as z from "zod";
2
+ export declare enum IntegrationType {
3
+ GITHUB = "github",
4
+ GMAIL = "gmail",
5
+ LINEAR = "linear",
6
+ ATLASSIAN = "atlassian",
7
+ SLACK = "slack",
8
+ NOTION = "notion",
9
+ FIGMA = "figma",
10
+ TERSE = "terse",
11
+ POSTHOG = "posthog",
12
+ DATADOG = "datadog",
13
+ CRON_JOB = "cron_job",
14
+ LAUNCHDARKLY = "launchdarkly",
15
+ WORKOS = "workos",
16
+ ATTIO = "attio",
17
+ SNOWFLAKE = "snowflake"
18
+ }
19
+ export declare const integrationTypeEnum: z.ZodEnum<typeof IntegrationType>;
20
+ export interface IntegrationDetails {
21
+ type: IntegrationType;
22
+ name: string;
23
+ description: string;
24
+ isInput?: boolean;
25
+ isOutput?: boolean;
26
+ }
27
+ export declare const GmailIntegrationMetadata: {
28
+ readonly type: IntegrationType.GMAIL;
29
+ readonly name: "Gmail";
30
+ readonly description: "Monitor incoming emails";
31
+ readonly isInput: true;
32
+ readonly isOutput: false;
33
+ };
34
+ export declare const NotionIntegrationMetadata: {
35
+ readonly type: IntegrationType.NOTION;
36
+ readonly name: "Notion";
37
+ readonly description: "Update living documents";
38
+ readonly isInput: false;
39
+ readonly isOutput: true;
40
+ };
41
+ export declare const LinearIntegrationMetadata: {
42
+ readonly type: IntegrationType.LINEAR;
43
+ readonly name: "Linear";
44
+ readonly description: "Update tasks in Linear";
45
+ readonly isInput: false;
46
+ readonly isOutput: true;
47
+ };
48
+ export declare const SlackIntegrationMetadata: {
49
+ readonly type: IntegrationType.SLACK;
50
+ readonly name: "Slack";
51
+ readonly description: "Send and receive messages in Slack (channels, group DMs, and DMs). Triggers can use user token to read your DMs; skills can send to channels or users with either token.";
52
+ readonly isInput: true;
53
+ readonly isOutput: true;
54
+ };
55
+ export declare const FigmaIntegrationMetadata: {
56
+ readonly type: IntegrationType.FIGMA;
57
+ readonly name: "Figma";
58
+ readonly description: "Trigger on Figma file comments (does not support file edits or design changes)";
59
+ readonly isInput: true;
60
+ readonly isOutput: false;
61
+ };
62
+ export declare const AtlassianIntegrationMetadata: {
63
+ readonly type: IntegrationType.ATLASSIAN;
64
+ readonly name: "Atlassian";
65
+ readonly description: "Update documents in Atlassian";
66
+ readonly isInput: true;
67
+ readonly isOutput: false;
68
+ };
69
+ export declare const GithubIntegrationMetadata: {
70
+ readonly type: IntegrationType.GITHUB;
71
+ readonly name: "Github";
72
+ readonly description: "Update repositories in Github";
73
+ readonly isInput: true;
74
+ readonly isOutput: true;
75
+ };
76
+ export declare const TerseIntegrationMetadata: {
77
+ readonly type: IntegrationType.TERSE;
78
+ readonly name: "Terse";
79
+ readonly description: "Platform tools";
80
+ readonly isInput: false;
81
+ readonly isOutput: false;
82
+ };
83
+ export declare const PosthogIntegrationMetadata: {
84
+ readonly type: IntegrationType.POSTHOG;
85
+ readonly name: "Posthog";
86
+ readonly description: "Update events in Posthog";
87
+ readonly isInput: false;
88
+ readonly isOutput: true;
89
+ };
90
+ export declare const DatadogIntegrationMetadata: {
91
+ readonly type: IntegrationType.DATADOG;
92
+ readonly name: "Datadog";
93
+ readonly description: "Search logs in Datadog";
94
+ readonly isInput: false;
95
+ readonly isOutput: true;
96
+ };
97
+ export declare const CronJobIntegrationMetadata: {
98
+ readonly type: IntegrationType.CRON_JOB;
99
+ readonly name: "Scheduled Jobs";
100
+ readonly description: "System integration for time-based triggers";
101
+ readonly isInput: true;
102
+ readonly isOutput: false;
103
+ };
104
+ export declare const LaunchDarklyIntegrationMetadata: {
105
+ readonly type: IntegrationType.LAUNCHDARKLY;
106
+ readonly name: "LaunchDarkly";
107
+ readonly description: "Track feature flags";
108
+ readonly isInput: false;
109
+ readonly isOutput: true;
110
+ };
111
+ export declare const WorkOSIntegrationMetadata: {
112
+ readonly type: IntegrationType.WORKOS;
113
+ readonly name: "WorkOS";
114
+ readonly description: "Trigger on user lifecycle events and fetch/search users from your WorkOS account";
115
+ readonly isInput: true;
116
+ readonly isOutput: true;
117
+ };
118
+ export declare const AttioIntegrationMetadata: {
119
+ readonly type: IntegrationType.ATTIO;
120
+ readonly name: "Attio";
121
+ readonly description: "Add and update contacts in Attio";
122
+ readonly isInput: false;
123
+ readonly isOutput: true;
124
+ };
125
+ export declare const SnowflakeIntegrationMetadata: {
126
+ readonly type: IntegrationType.SNOWFLAKE;
127
+ readonly name: "Snowflake";
128
+ readonly description: "Run read-only queries against Snowflake data warehouses";
129
+ readonly isInput: false;
130
+ readonly isOutput: true;
131
+ };
132
+ export type IntegrationMetadataMap = Record<IntegrationType, IntegrationDetails>;
133
+ export declare const INTEGRATION_METADATA: IntegrationMetadataMap;
134
+ export declare const IntegrationInstanceSchema: z.ZodObject<{
135
+ id: z.ZodString;
136
+ }, z.core.$strip>;
137
+ export type IntegrationInstance = z.infer<typeof IntegrationInstanceSchema>;
138
+ export interface SlackInstallationOptions {
139
+ isBotUser: boolean;
140
+ }
141
+ export type NoInstallationOptions = Record<string, never>;
142
+ export type AdditionalStateParams = Record<string, string>;
143
+ type EnsureExhaustiveInstallationOptions<T extends Record<IntegrationType, NoInstallationOptions | SlackInstallationOptions>> = T;
144
+ export type IntegrationInstallationOptions = EnsureExhaustiveInstallationOptions<{
145
+ [IntegrationType.SLACK]: SlackInstallationOptions;
146
+ [IntegrationType.GMAIL]: NoInstallationOptions;
147
+ [IntegrationType.NOTION]: NoInstallationOptions;
148
+ [IntegrationType.LINEAR]: NoInstallationOptions;
149
+ [IntegrationType.ATLASSIAN]: NoInstallationOptions;
150
+ [IntegrationType.GITHUB]: NoInstallationOptions;
151
+ [IntegrationType.FIGMA]: NoInstallationOptions;
152
+ [IntegrationType.TERSE]: NoInstallationOptions;
153
+ [IntegrationType.POSTHOG]: NoInstallationOptions;
154
+ [IntegrationType.DATADOG]: NoInstallationOptions;
155
+ [IntegrationType.CRON_JOB]: NoInstallationOptions;
156
+ [IntegrationType.LAUNCHDARKLY]: NoInstallationOptions;
157
+ [IntegrationType.WORKOS]: NoInstallationOptions;
158
+ [IntegrationType.ATTIO]: NoInstallationOptions;
159
+ [IntegrationType.SNOWFLAKE]: NoInstallationOptions;
160
+ }>;
161
+ export type InstallationOptionsFor<T extends IntegrationType> = IntegrationInstallationOptions[T];
162
+ export declare const SlackIntegrationSchema: z.ZodObject<{
163
+ id: z.ZodString;
164
+ teamId: z.ZodOptional<z.ZodString>;
165
+ teamName: z.ZodOptional<z.ZodString>;
166
+ isBotUser: z.ZodOptional<z.ZodBoolean>;
167
+ }, z.core.$strip>;
168
+ export type SlackIntegration = z.infer<typeof SlackIntegrationSchema>;
169
+ export declare const GmailIntegrationSchema: z.ZodObject<{
170
+ id: z.ZodString;
171
+ email: z.ZodEmail;
172
+ historyId: z.ZodOptional<z.ZodString>;
173
+ watchExpiration: z.ZodOptional<z.ZodDate>;
174
+ }, z.core.$strip>;
175
+ export type GmailIntegration = z.infer<typeof GmailIntegrationSchema>;
176
+ export declare const FigmaIntegrationSchema: z.ZodObject<{
177
+ id: z.ZodString;
178
+ handle: z.ZodString;
179
+ figma_user_id: z.ZodString;
180
+ token_expiry: z.ZodDate;
181
+ }, z.core.$strip>;
182
+ export type FigmaIntegration = z.infer<typeof FigmaIntegrationSchema>;
183
+ export declare const NotionIntegrationSchema: z.ZodObject<{
184
+ id: z.ZodString;
185
+ workspaceId: z.ZodOptional<z.ZodString>;
186
+ workspaceName: z.ZodOptional<z.ZodString>;
187
+ }, z.core.$strip>;
188
+ export type NotionIntegration = z.infer<typeof NotionIntegrationSchema>;
189
+ export declare const AtlassianIntegrationSchema: z.ZodObject<{
190
+ id: z.ZodString;
191
+ baseUrl: z.ZodURL;
192
+ email: z.ZodEmail;
193
+ siteName: z.ZodOptional<z.ZodString>;
194
+ projectKey: z.ZodOptional<z.ZodString>;
195
+ projectName: z.ZodOptional<z.ZodString>;
196
+ }, z.core.$strip>;
197
+ export type AtlassianIntegration = z.infer<typeof AtlassianIntegrationSchema>;
198
+ export declare const GithubIntegrationSchema: z.ZodObject<{
199
+ id: z.ZodString;
200
+ installation_id: z.ZodNumber;
201
+ account_name: z.ZodOptional<z.ZodString>;
202
+ }, z.core.$strip>;
203
+ export type GithubIntegration = z.infer<typeof GithubIntegrationSchema>;
204
+ export declare const LinearIntegrationSchema: z.ZodObject<{
205
+ id: z.ZodString;
206
+ workspaceName: z.ZodString;
207
+ }, z.core.$strip>;
208
+ export type LinearIntegration = z.infer<typeof LinearIntegrationSchema>;
209
+ export declare const PosthogIntegrationSchema: z.ZodObject<{
210
+ id: z.ZodString;
211
+ email: z.ZodOptional<z.ZodEmail>;
212
+ orgName: z.ZodOptional<z.ZodString>;
213
+ }, z.core.$strip>;
214
+ export type PosthogIntegration = z.infer<typeof PosthogIntegrationSchema>;
215
+ export declare const LaunchDarklyIntegrationSchema: z.ZodObject<{
216
+ id: z.ZodString;
217
+ email: z.ZodOptional<z.ZodEmail>;
218
+ tokenName: z.ZodOptional<z.ZodString>;
219
+ }, z.core.$strip>;
220
+ export type LaunchDarklyIntegration = z.infer<typeof LaunchDarklyIntegrationSchema>;
221
+ export declare const DatadogIntegrationSchema: z.ZodObject<{
222
+ id: z.ZodString;
223
+ region: z.ZodString;
224
+ }, z.core.$strip>;
225
+ export type DatadogIntegration = z.infer<typeof DatadogIntegrationSchema>;
226
+ export declare const WorkOSIntegrationSchema: z.ZodObject<{
227
+ id: z.ZodString;
228
+ webhookUrl: z.ZodString;
229
+ environment: z.ZodEnum<{
230
+ live: "live";
231
+ test: "test";
232
+ }>;
233
+ }, z.core.$strip>;
234
+ export type WorkOSIntegration = z.infer<typeof WorkOSIntegrationSchema>;
235
+ export declare const AttioIntegrationSchema: z.ZodObject<{
236
+ id: z.ZodString;
237
+ workspaceName: z.ZodOptional<z.ZodString>;
238
+ }, z.core.$strip>;
239
+ export type AttioIntegration = z.infer<typeof AttioIntegrationSchema>;
240
+ export declare const SnowflakeIntegrationSchema: z.ZodObject<{
241
+ id: z.ZodString;
242
+ accountIdentifier: z.ZodString;
243
+ username: z.ZodString;
244
+ warehouse: z.ZodString;
245
+ databaseName: z.ZodOptional<z.ZodString>;
246
+ schemaName: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strip>;
248
+ export type SnowflakeIntegration = z.infer<typeof SnowflakeIntegrationSchema>;
249
+ export declare const IntegrationWithStatusSchema: z.ZodObject<{
250
+ integrationType: z.ZodEnum<typeof IntegrationType>;
251
+ isActive: z.ZodBoolean;
252
+ }, z.core.$strip>;
253
+ export type IntegrationWithStatus = z.infer<typeof IntegrationWithStatusSchema>;
254
+ export {};
@@ -0,0 +1,210 @@
1
+ import * as z from "zod";
2
+ // IMPORTANT: CHANGE THIS FOR NEW INTEGRATIONS. SHOULD MATCH PRISMA ENUM
3
+ export var IntegrationType;
4
+ (function (IntegrationType) {
5
+ IntegrationType["GITHUB"] = "github";
6
+ IntegrationType["GMAIL"] = "gmail";
7
+ IntegrationType["LINEAR"] = "linear";
8
+ IntegrationType["ATLASSIAN"] = "atlassian";
9
+ IntegrationType["SLACK"] = "slack";
10
+ IntegrationType["NOTION"] = "notion";
11
+ IntegrationType["FIGMA"] = "figma";
12
+ IntegrationType["TERSE"] = "terse";
13
+ IntegrationType["POSTHOG"] = "posthog";
14
+ IntegrationType["DATADOG"] = "datadog";
15
+ IntegrationType["CRON_JOB"] = "cron_job";
16
+ IntegrationType["LAUNCHDARKLY"] = "launchdarkly";
17
+ IntegrationType["WORKOS"] = "workos";
18
+ IntegrationType["ATTIO"] = "attio";
19
+ IntegrationType["SNOWFLAKE"] = "snowflake";
20
+ })(IntegrationType || (IntegrationType = {}));
21
+ export const integrationTypeEnum = z.enum(IntegrationType);
22
+ // Metadata objects - using const objects instead of classes
23
+ export const GmailIntegrationMetadata = {
24
+ type: IntegrationType.GMAIL,
25
+ name: "Gmail",
26
+ description: "Monitor incoming emails",
27
+ isInput: true,
28
+ isOutput: false
29
+ };
30
+ export const NotionIntegrationMetadata = {
31
+ type: IntegrationType.NOTION,
32
+ name: "Notion",
33
+ description: "Update living documents",
34
+ isInput: false,
35
+ isOutput: true
36
+ };
37
+ export const LinearIntegrationMetadata = {
38
+ type: IntegrationType.LINEAR,
39
+ name: "Linear",
40
+ description: "Update tasks in Linear",
41
+ isInput: false,
42
+ isOutput: true
43
+ };
44
+ export const SlackIntegrationMetadata = {
45
+ type: IntegrationType.SLACK,
46
+ name: "Slack",
47
+ description: "Send and receive messages in Slack (channels, group DMs, and DMs). Triggers can use user token to read your DMs; skills can send to channels or users with either token.",
48
+ isInput: true,
49
+ isOutput: true
50
+ };
51
+ export const FigmaIntegrationMetadata = {
52
+ type: IntegrationType.FIGMA,
53
+ name: "Figma",
54
+ description: "Trigger on Figma file comments (does not support file edits or design changes)",
55
+ isInput: true,
56
+ isOutput: false
57
+ };
58
+ export const AtlassianIntegrationMetadata = {
59
+ type: IntegrationType.ATLASSIAN,
60
+ name: "Atlassian",
61
+ description: "Update documents in Atlassian",
62
+ isInput: true,
63
+ isOutput: false
64
+ };
65
+ export const GithubIntegrationMetadata = {
66
+ type: IntegrationType.GITHUB,
67
+ name: "Github",
68
+ description: "Update repositories in Github",
69
+ isInput: true,
70
+ isOutput: true
71
+ };
72
+ export const TerseIntegrationMetadata = {
73
+ type: IntegrationType.TERSE,
74
+ name: "Terse",
75
+ description: "Platform tools",
76
+ isInput: false,
77
+ isOutput: false
78
+ };
79
+ export const PosthogIntegrationMetadata = {
80
+ type: IntegrationType.POSTHOG,
81
+ name: "Posthog",
82
+ description: "Update events in Posthog",
83
+ isInput: false,
84
+ isOutput: true
85
+ };
86
+ export const DatadogIntegrationMetadata = {
87
+ type: IntegrationType.DATADOG,
88
+ name: "Datadog",
89
+ description: "Search logs in Datadog",
90
+ isInput: false,
91
+ isOutput: true
92
+ };
93
+ export const CronJobIntegrationMetadata = {
94
+ type: IntegrationType.CRON_JOB,
95
+ name: "Scheduled Jobs",
96
+ description: "System integration for time-based triggers",
97
+ isInput: true,
98
+ isOutput: false
99
+ };
100
+ export const LaunchDarklyIntegrationMetadata = {
101
+ type: IntegrationType.LAUNCHDARKLY,
102
+ name: "LaunchDarkly",
103
+ description: "Track feature flags",
104
+ isInput: false,
105
+ isOutput: true
106
+ };
107
+ export const WorkOSIntegrationMetadata = {
108
+ type: IntegrationType.WORKOS,
109
+ name: "WorkOS",
110
+ description: "Trigger on user lifecycle events and fetch/search users from your WorkOS account",
111
+ isInput: true,
112
+ isOutput: true
113
+ };
114
+ export const AttioIntegrationMetadata = {
115
+ type: IntegrationType.ATTIO,
116
+ name: "Attio",
117
+ description: "Add and update contacts in Attio",
118
+ isInput: false,
119
+ isOutput: true
120
+ };
121
+ export const SnowflakeIntegrationMetadata = {
122
+ type: IntegrationType.SNOWFLAKE,
123
+ name: "Snowflake",
124
+ description: "Run read-only queries against Snowflake data warehouses",
125
+ isInput: false,
126
+ isOutput: true
127
+ };
128
+ export const INTEGRATION_METADATA = {
129
+ [IntegrationType.GMAIL]: GmailIntegrationMetadata,
130
+ [IntegrationType.NOTION]: NotionIntegrationMetadata,
131
+ [IntegrationType.LINEAR]: LinearIntegrationMetadata,
132
+ [IntegrationType.ATLASSIAN]: AtlassianIntegrationMetadata,
133
+ [IntegrationType.SLACK]: SlackIntegrationMetadata,
134
+ [IntegrationType.GITHUB]: GithubIntegrationMetadata,
135
+ [IntegrationType.FIGMA]: FigmaIntegrationMetadata,
136
+ [IntegrationType.TERSE]: TerseIntegrationMetadata,
137
+ [IntegrationType.POSTHOG]: PosthogIntegrationMetadata,
138
+ [IntegrationType.DATADOG]: DatadogIntegrationMetadata,
139
+ [IntegrationType.CRON_JOB]: CronJobIntegrationMetadata,
140
+ [IntegrationType.LAUNCHDARKLY]: LaunchDarklyIntegrationMetadata,
141
+ [IntegrationType.WORKOS]: WorkOSIntegrationMetadata,
142
+ [IntegrationType.ATTIO]: AttioIntegrationMetadata,
143
+ [IntegrationType.SNOWFLAKE]: SnowflakeIntegrationMetadata
144
+ };
145
+ // MARK: Integration Details
146
+ export const IntegrationInstanceSchema = z.object({
147
+ id: z.string()
148
+ });
149
+ export const SlackIntegrationSchema = IntegrationInstanceSchema.extend({
150
+ teamId: z.string().optional(),
151
+ teamName: z.string().optional(),
152
+ isBotUser: z.boolean().optional()
153
+ });
154
+ export const GmailIntegrationSchema = IntegrationInstanceSchema.extend({
155
+ email: z.email(),
156
+ historyId: z.string().optional(),
157
+ watchExpiration: z.date().optional()
158
+ });
159
+ export const FigmaIntegrationSchema = IntegrationInstanceSchema.extend({
160
+ handle: z.string(),
161
+ figma_user_id: z.string(),
162
+ token_expiry: z.date()
163
+ });
164
+ export const NotionIntegrationSchema = IntegrationInstanceSchema.extend({
165
+ workspaceId: z.string().optional(),
166
+ workspaceName: z.string().optional()
167
+ });
168
+ export const AtlassianIntegrationSchema = IntegrationInstanceSchema.extend({
169
+ baseUrl: z.url(),
170
+ email: z.email(),
171
+ siteName: z.string().optional(),
172
+ projectKey: z.string().optional(),
173
+ projectName: z.string().optional()
174
+ });
175
+ export const GithubIntegrationSchema = IntegrationInstanceSchema.extend({
176
+ installation_id: z.number(),
177
+ account_name: z.string().optional()
178
+ });
179
+ export const LinearIntegrationSchema = IntegrationInstanceSchema.extend({
180
+ workspaceName: z.string()
181
+ });
182
+ export const PosthogIntegrationSchema = IntegrationInstanceSchema.extend({
183
+ email: z.email().optional(),
184
+ orgName: z.string().optional()
185
+ });
186
+ export const LaunchDarklyIntegrationSchema = IntegrationInstanceSchema.extend({
187
+ email: z.email().optional(),
188
+ tokenName: z.string().optional()
189
+ });
190
+ export const DatadogIntegrationSchema = IntegrationInstanceSchema.extend({
191
+ region: z.string()
192
+ });
193
+ export const WorkOSIntegrationSchema = IntegrationInstanceSchema.extend({
194
+ webhookUrl: z.string(),
195
+ environment: z.enum(["live", "test"])
196
+ });
197
+ export const AttioIntegrationSchema = IntegrationInstanceSchema.extend({
198
+ workspaceName: z.string().optional()
199
+ });
200
+ export const SnowflakeIntegrationSchema = IntegrationInstanceSchema.extend({
201
+ accountIdentifier: z.string(),
202
+ username: z.string(),
203
+ warehouse: z.string(),
204
+ databaseName: z.string().optional(),
205
+ schemaName: z.string().optional()
206
+ });
207
+ export const IntegrationWithStatusSchema = z.object({
208
+ integrationType: integrationTypeEnum,
209
+ isActive: z.boolean()
210
+ });
@@ -0,0 +1,52 @@
1
+ import { GetRunHistoryParams } from "./RunHistoryTypes.js";
2
+ import type { StatsInterval } from "./types.js";
3
+ export declare const currentUserKey: () => readonly [string];
4
+ export declare const userOrganizationsKey: () => readonly [string];
5
+ export declare const widgetTokenKey: () => readonly [string];
6
+ export declare const integrationsKey: () => readonly [string];
7
+ export declare const notificationDestinationsKey: () => readonly [string];
8
+ export declare const apiTokensKey: () => readonly [string];
9
+ export declare const notificationSettingsKey: () => readonly [string];
10
+ export declare const sentNotificationsKey: () => readonly [string];
11
+ export declare const pendingApprovalsKey: () => readonly [string];
12
+ export declare const slackChannelsKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
13
+ export declare const slackUsersKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
14
+ export declare const notionResourcesKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
15
+ export declare const posthogIntegrationsKey: () => readonly [string];
16
+ export declare const launchdarklyIntegrationsKey: () => readonly [string];
17
+ export declare const datadogIntegrationsKey: () => readonly [string];
18
+ export declare const githubRepositoriesKey: (installationId: number | null | undefined) => readonly [string, number] | null;
19
+ export declare const confluenceResourcesKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
20
+ export declare const jiraResourcesKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
21
+ export declare const linearTeamsKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
22
+ export declare const gmailIntegrationsKey: () => readonly [string];
23
+ export declare const atlassianIntegrationsKey: () => readonly [string];
24
+ export declare const figmaIntegrationsKey: () => readonly [string];
25
+ export declare const githubIntegrationsKey: () => readonly [string];
26
+ export declare const linearIntegrationsKey: () => readonly [string];
27
+ export declare const notionIntegrationsKey: () => readonly [string];
28
+ export declare const slackIntegrationsKey: () => readonly [string];
29
+ export declare const workosIntegrationsKey: () => readonly [string];
30
+ export declare const attioIntegrationsKey: () => readonly [string];
31
+ export declare const snowflakeIntegrationsKey: () => readonly [string];
32
+ export declare const attioObjectsKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
33
+ export declare const allRunHistoryKey: (params?: GetRunHistoryParams) => readonly [string, string] | readonly [string];
34
+ export declare const runHistoryKey: (agentId: string, params?: GetRunHistoryParams) => readonly [string, string, string] | readonly [string, string];
35
+ export declare const recentAgentsKey: (limit?: number) => readonly [string, number] | readonly [string];
36
+ export declare const statsKey: (timezone: string, interval?: StatsInterval) => readonly [string, string] | readonly [string, string, StatsInterval];
37
+ export type AgentListArgs = {
38
+ page?: number;
39
+ limit?: number;
40
+ isActive?: boolean;
41
+ search?: string;
42
+ };
43
+ export declare const agentListKey: ({ page, limit, isActive, search }?: AgentListArgs) => readonly [string, AgentListArgs];
44
+ export declare const agentDetailKey: (id: string | null) => readonly [string, {
45
+ id: string;
46
+ }] | null;
47
+ export declare const agentImprovementsKey: (agentId: string | null) => readonly [string, {
48
+ agentId: string;
49
+ }] | null;
50
+ export declare const builderChatHistoryKey: (sessionId: string | null | undefined) => readonly [string, string] | null;
51
+ export declare const orgLogoKey: (organizationId: string | null | undefined) => readonly [string, string] | null;
52
+ export declare const userByIdKey: (userId: string | null | undefined) => readonly [string, string] | null;