terse-types 0.0.2 → 0.0.4

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;
@@ -111,6 +93,9 @@ export declare const ApiRoutes: {
111
93
  LIST: string;
112
94
  RECENT: string;
113
95
  BY_ID: string;
96
+ WEBHOOK_URL: string;
97
+ FILES: string;
98
+ FILE_CONTENT: string;
114
99
  };
115
100
  IMPROVEMENTS: {
116
101
  BY_AGENT_ID: string;
@@ -142,6 +127,7 @@ export declare const ApiRoutes: {
142
127
  SDK: {
143
128
  ME: string;
144
129
  SAMPLE_EVENTS: string;
130
+ VERIFY_JOB_SERVER: string;
145
131
  TOOL_EXECUTE: string;
146
132
  TOOL_DEFINITIONS: string;
147
133
  AGENT_RUN: string;
@@ -151,6 +137,7 @@ export declare const ApiRoutes: {
151
137
  DEVICE_TOKEN_EXCHANGE: string;
152
138
  INTEGRATION_FIELDS: string;
153
139
  INTEGRATION_FORM_SUBMIT: string;
140
+ JOB_WEBHOOK_TRIGGER: string;
154
141
  };
155
142
  NOTIFICATION_SETTINGS: string;
156
143
  SENT_NOTIFICATIONS: {
@@ -161,12 +148,11 @@ export declare const ApiRoutes: {
161
148
  };
162
149
  WEBHOOKS: {
163
150
  GMAIL: string;
164
- FIGMA: string;
165
151
  WORKOS: string;
166
- JIRA_BY_ACCOUNT_ID: string;
167
152
  LINEAR_BY_USER_ID: string;
168
153
  SCHEDULE_BY_INPUT_ID: string;
169
154
  WORKOS_TRIGGER_BY_INTEGRATION_ID: string;
155
+ WEBHOOK_TRIGGER_BY_TOKEN: string;
170
156
  };
171
157
  SCHEDULE: {
172
158
  TRIGGER_BY_INPUT_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",
@@ -110,7 +92,10 @@
110
92
  "AGENTS": {
111
93
  "LIST": "/agents",
112
94
  "RECENT": "/agents/recent",
113
- "BY_ID": "/agents/:id"
95
+ "BY_ID": "/agents/:id",
96
+ "WEBHOOK_URL": "/agents/:agentId/webhook-url",
97
+ "FILES": "/agents/:agentId/files",
98
+ "FILE_CONTENT": "/agents/:agentId/files/:fileId"
114
99
  },
115
100
  "IMPROVEMENTS": {
116
101
  "BY_AGENT_ID": "/agents/:agentId/improvements",
@@ -142,6 +127,7 @@
142
127
  "SDK": {
143
128
  "ME": "/sdk/me",
144
129
  "SAMPLE_EVENTS": "/sdk/sample-events",
130
+ "VERIFY_JOB_SERVER": "/sdk/agents/:agentId/verify-job-server",
145
131
  "TOOL_EXECUTE": "/sdk/tool-execute",
146
132
  "TOOL_DEFINITIONS": "/sdk/tool-definitions",
147
133
  "AGENT_RUN": "/sdk/agent-run",
@@ -150,7 +136,8 @@
150
136
  "DEPLOY": "/sdk/deploy",
151
137
  "DEVICE_TOKEN_EXCHANGE": "/sdk/auth/device-token-exchange",
152
138
  "INTEGRATION_FIELDS": "/sdk/integrations/:integrationType/fields",
153
- "INTEGRATION_FORM_SUBMIT": "/sdk/integrations/:integrationType/form-submit"
139
+ "INTEGRATION_FORM_SUBMIT": "/sdk/integrations/:integrationType/form-submit",
140
+ "JOB_WEBHOOK_TRIGGER": "/webhook/terse/trigger"
154
141
  },
155
142
  "NOTIFICATION_SETTINGS": "/notification-settings",
156
143
  "SENT_NOTIFICATIONS": {
@@ -161,12 +148,11 @@
161
148
  },
162
149
  "WEBHOOKS": {
163
150
  "GMAIL": "/webhooks/gmail",
164
- "FIGMA": "/webhooks/figma",
165
151
  "WORKOS": "/webhooks/workos",
166
- "JIRA_BY_ACCOUNT_ID": "/webhooks/jira/:accountId",
167
152
  "LINEAR_BY_USER_ID": "/webhooks/linear/:userId",
168
153
  "SCHEDULE_BY_INPUT_ID": "/webhooks/schedule/:inputId",
169
- "WORKOS_TRIGGER_BY_INTEGRATION_ID": "/webhooks/workos-trigger/:integrationId"
154
+ "WORKOS_TRIGGER_BY_INTEGRATION_ID": "/webhooks/workos-trigger/:integrationId",
155
+ "WEBHOOK_TRIGGER_BY_TOKEN": "/webhooks/trigger/:webhookToken"
170
156
  },
171
157
  "SCHEDULE": {
172
158
  "TRIGGER_BY_INPUT_ID": "/schedule/trigger/:inputId",
@@ -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) };