terse-types 0.0.3 → 0.0.5

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.
@@ -38,21 +38,6 @@ export declare const ApiRoutes: {
38
38
  INSTALLATION_DELETED: string;
39
39
  UNIFIED_EVENT: string;
40
40
  };
41
- ATLASSIAN: {
42
- INTEGRATIONS: string;
43
- OAUTH_CALLBACK: string;
44
- };
45
- JIRA: {
46
- RESOURCES: string;
47
- GET_API_KEY: string;
48
- SET_API_KEY: string;
49
- VALIDATE_AND_FETCH_PROJECTS: string;
50
- DELETE_CREDENTIALS: string;
51
- };
52
- CONFLUENCE: {
53
- INTEGRATIONS: string;
54
- RESOURCES: string;
55
- };
56
41
  GMAIL: {
57
42
  INTEGRATIONS: string;
58
43
  CALLBACK: string;
@@ -64,15 +49,12 @@ export declare const ApiRoutes: {
64
49
  RESOURCES: string;
65
50
  DELETE_INTEGRATION: string;
66
51
  };
67
- FIGMA: {
68
- INTEGRATIONS: string;
69
- OAUTH_CALLBACK: string;
70
- };
71
52
  LINEAR: {
72
53
  OAUTH_CALLBACK: string;
73
54
  WEBHOOK: string;
74
55
  INTEGRATIONS: string;
75
56
  TEAMS: string;
57
+ PROJECTS: string;
76
58
  };
77
59
  SLACK: {
78
60
  INTEGRATIONS: string;
@@ -112,6 +94,8 @@ export declare const ApiRoutes: {
112
94
  RECENT: string;
113
95
  BY_ID: string;
114
96
  WEBHOOK_URL: string;
97
+ FILES: string;
98
+ FILE_CONTENT: string;
115
99
  };
116
100
  IMPROVEMENTS: {
117
101
  BY_AGENT_ID: string;
@@ -143,6 +127,7 @@ export declare const ApiRoutes: {
143
127
  SDK: {
144
128
  ME: string;
145
129
  SAMPLE_EVENTS: string;
130
+ VERIFY_JOB_SERVER: string;
146
131
  TOOL_EXECUTE: string;
147
132
  TOOL_DEFINITIONS: string;
148
133
  AGENT_RUN: string;
@@ -152,6 +137,7 @@ export declare const ApiRoutes: {
152
137
  DEVICE_TOKEN_EXCHANGE: string;
153
138
  INTEGRATION_FIELDS: string;
154
139
  INTEGRATION_FORM_SUBMIT: string;
140
+ JOB_WEBHOOK_TRIGGER: string;
155
141
  };
156
142
  NOTIFICATION_SETTINGS: string;
157
143
  SENT_NOTIFICATIONS: {
@@ -162,9 +148,7 @@ export declare const ApiRoutes: {
162
148
  };
163
149
  WEBHOOKS: {
164
150
  GMAIL: string;
165
- FIGMA: string;
166
151
  WORKOS: string;
167
- JIRA_BY_ACCOUNT_ID: string;
168
152
  LINEAR_BY_USER_ID: string;
169
153
  SCHEDULE_BY_INPUT_ID: string;
170
154
  WORKOS_TRIGGER_BY_INTEGRATION_ID: string;
@@ -38,21 +38,6 @@
38
38
  "INSTALLATION_DELETED": "/github/installation-deleted",
39
39
  "UNIFIED_EVENT": "/github/unified-event"
40
40
  },
41
- "ATLASSIAN": {
42
- "INTEGRATIONS": "/atlassian/integrations",
43
- "OAUTH_CALLBACK": "/atlassian/oauth/callback"
44
- },
45
- "JIRA": {
46
- "RESOURCES": "/jira/resources",
47
- "GET_API_KEY": "/jira/get-api-key",
48
- "SET_API_KEY": "/jira/set-api-key",
49
- "VALIDATE_AND_FETCH_PROJECTS": "/jira/validate-and-fetch-projects",
50
- "DELETE_CREDENTIALS": "/jira/delete-credentials"
51
- },
52
- "CONFLUENCE": {
53
- "INTEGRATIONS": "/confluence/integrations",
54
- "RESOURCES": "/confluence/resources"
55
- },
56
41
  "GMAIL": {
57
42
  "INTEGRATIONS": "/gmail/integrations",
58
43
  "CALLBACK": "/gmail/callback",
@@ -64,15 +49,12 @@
64
49
  "RESOURCES": "/notion/resources",
65
50
  "DELETE_INTEGRATION": "/notion/delete-integration"
66
51
  },
67
- "FIGMA": {
68
- "INTEGRATIONS": "/figma/integrations",
69
- "OAUTH_CALLBACK": "/figma/oauth/callback"
70
- },
71
52
  "LINEAR": {
72
53
  "OAUTH_CALLBACK": "/linear/oauth/callback",
73
54
  "WEBHOOK": "/linear/webhook",
74
55
  "INTEGRATIONS": "/linear/integrations",
75
- "TEAMS": "/linear/teams"
56
+ "TEAMS": "/linear/teams",
57
+ "PROJECTS": "/linear/projects"
76
58
  },
77
59
  "SLACK": {
78
60
  "INTEGRATIONS": "/slack/integrations",
@@ -111,7 +93,9 @@
111
93
  "LIST": "/agents",
112
94
  "RECENT": "/agents/recent",
113
95
  "BY_ID": "/agents/:id",
114
- "WEBHOOK_URL": "/agents/:agentId/webhook-url"
96
+ "WEBHOOK_URL": "/agents/:agentId/webhook-url",
97
+ "FILES": "/agents/:agentId/files",
98
+ "FILE_CONTENT": "/agents/:agentId/files/:fileId"
115
99
  },
116
100
  "IMPROVEMENTS": {
117
101
  "BY_AGENT_ID": "/agents/:agentId/improvements",
@@ -143,6 +127,7 @@
143
127
  "SDK": {
144
128
  "ME": "/sdk/me",
145
129
  "SAMPLE_EVENTS": "/sdk/sample-events",
130
+ "VERIFY_JOB_SERVER": "/sdk/agents/:agentId/verify-job-server",
146
131
  "TOOL_EXECUTE": "/sdk/tool-execute",
147
132
  "TOOL_DEFINITIONS": "/sdk/tool-definitions",
148
133
  "AGENT_RUN": "/sdk/agent-run",
@@ -151,7 +136,8 @@
151
136
  "DEPLOY": "/sdk/deploy",
152
137
  "DEVICE_TOKEN_EXCHANGE": "/sdk/auth/device-token-exchange",
153
138
  "INTEGRATION_FIELDS": "/sdk/integrations/:integrationType/fields",
154
- "INTEGRATION_FORM_SUBMIT": "/sdk/integrations/:integrationType/form-submit"
139
+ "INTEGRATION_FORM_SUBMIT": "/sdk/integrations/:integrationType/form-submit",
140
+ "JOB_WEBHOOK_TRIGGER": "/webhook/terse/trigger"
155
141
  },
156
142
  "NOTIFICATION_SETTINGS": "/notification-settings",
157
143
  "SENT_NOTIFICATIONS": {
@@ -162,9 +148,7 @@
162
148
  },
163
149
  "WEBHOOKS": {
164
150
  "GMAIL": "/webhooks/gmail",
165
- "FIGMA": "/webhooks/figma",
166
151
  "WORKOS": "/webhooks/workos",
167
- "JIRA_BY_ACCOUNT_ID": "/webhooks/jira/:accountId",
168
152
  "LINEAR_BY_USER_ID": "/webhooks/linear/:userId",
169
153
  "SCHEDULE_BY_INPUT_ID": "/webhooks/schedule/:inputId",
170
154
  "WORKOS_TRIGGER_BY_INTEGRATION_ID": "/webhooks/workos-trigger/:integrationId",
@@ -1,23 +1,51 @@
1
- import { IntegrationType } from "./Integrations.js";
2
- export type ApprovalActionType = "open_run_history" | "approve_action" | "reject_action";
3
- export type ApprovalRequestStatus = "pending" | "in_progress" | "completed";
1
+ import * as z from "zod";
2
+ export declare const approvalActionTypeSchema: z.ZodEnum<{
3
+ open_run_history: "open_run_history";
4
+ approve_action: "approve_action";
5
+ reject_action: "reject_action";
6
+ }>;
7
+ export type ApprovalActionType = z.infer<typeof approvalActionTypeSchema>;
8
+ export declare const approvalRequestStatusSchema: z.ZodEnum<{
9
+ pending: "pending";
10
+ in_progress: "in_progress";
11
+ completed: "completed";
12
+ }>;
13
+ export type ApprovalRequestStatus = z.infer<typeof approvalRequestStatusSchema>;
4
14
  export type ApprovalRequestFilter = ApprovalRequestStatus | "all";
5
- export type ApprovalAction = {
6
- type: ApprovalActionType;
7
- label: string;
8
- deepLink: string;
9
- };
10
- export type ApprovalRequest = {
11
- id: string;
12
- icon: IntegrationType;
13
- title: string;
14
- subheader: string;
15
- timestamp: string;
16
- status: ApprovalRequestStatus;
17
- actions: ApprovalAction[];
18
- runId: string;
19
- agentId: string;
20
- };
15
+ export declare const approvalActionSchema: z.ZodObject<{
16
+ type: z.ZodEnum<{
17
+ open_run_history: "open_run_history";
18
+ approve_action: "approve_action";
19
+ reject_action: "reject_action";
20
+ }>;
21
+ label: z.ZodString;
22
+ deepLink: z.ZodString;
23
+ }, z.core.$strip>;
24
+ export type ApprovalAction = z.infer<typeof approvalActionSchema>;
25
+ export declare const approvalRequestSchema: z.ZodObject<{
26
+ id: z.ZodString;
27
+ icon: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
28
+ title: z.ZodString;
29
+ subheader: z.ZodString;
30
+ timestamp: z.ZodString;
31
+ status: z.ZodEnum<{
32
+ pending: "pending";
33
+ in_progress: "in_progress";
34
+ completed: "completed";
35
+ }>;
36
+ actions: z.ZodArray<z.ZodObject<{
37
+ type: z.ZodEnum<{
38
+ open_run_history: "open_run_history";
39
+ approve_action: "approve_action";
40
+ reject_action: "reject_action";
41
+ }>;
42
+ label: z.ZodString;
43
+ deepLink: z.ZodString;
44
+ }, z.core.$strip>>;
45
+ runId: z.ZodString;
46
+ agentId: z.ZodString;
47
+ }, z.core.$strip>;
48
+ export type ApprovalRequest = z.infer<typeof approvalRequestSchema>;
21
49
  export type GetPendingApprovalsResponse = {
22
50
  items: ApprovalRequest[];
23
51
  };
@@ -1,3 +1,23 @@
1
+ import * as z from "zod";
2
+ import { integrationTypeEnum } from "./Integrations.js";
3
+ export const approvalActionTypeSchema = z.enum(["open_run_history", "approve_action", "reject_action"]);
4
+ export const approvalRequestStatusSchema = z.enum(["pending", "in_progress", "completed"]);
5
+ export const approvalActionSchema = z.object({
6
+ type: approvalActionTypeSchema,
7
+ label: z.string(),
8
+ deepLink: z.string()
9
+ });
10
+ export const approvalRequestSchema = z.object({
11
+ id: z.string(),
12
+ icon: integrationTypeEnum,
13
+ title: z.string(),
14
+ subheader: z.string(),
15
+ timestamp: z.string(),
16
+ status: approvalRequestStatusSchema,
17
+ actions: z.array(approvalActionSchema),
18
+ runId: z.string(),
19
+ agentId: z.string()
20
+ });
1
21
  export function parseDeepLink(deepLink) {
2
22
  const parts = deepLink.split("|");
3
23
  return { type: parts[0], params: parts.slice(1) };