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.
- package/README.md +44 -0
- package/dist/ApiRouteBuilder.d.ts +185 -0
- package/dist/ApiRouteBuilder.js +11 -0
- package/dist/ApiRoutes.json +184 -0
- package/dist/ApprovalTypes.d.ts +28 -0
- package/dist/ApprovalTypes.js +7 -0
- package/dist/ClientBoundTools.d.ts +36 -0
- package/dist/ClientBoundTools.js +36 -0
- package/dist/Configs.d.ts +628 -0
- package/dist/Configs.js +868 -0
- package/dist/DonatedState.d.ts +4 -0
- package/dist/DonatedState.js +12 -0
- package/dist/Entities.d.ts +7 -0
- package/dist/Entities.js +8 -0
- package/dist/FrontendRoutes.json +28 -0
- package/dist/FrontendRoutesBuilder.d.ts +30 -0
- package/dist/FrontendRoutesBuilder.js +13 -0
- package/dist/Integrations.d.ts +254 -0
- package/dist/Integrations.js +210 -0
- package/dist/InvalidationKeys.d.ts +52 -0
- package/dist/InvalidationKeys.js +165 -0
- package/dist/ModelEvents.d.ts +175 -0
- package/dist/ModelEvents.js +28 -0
- package/dist/Notifications.d.ts +42 -0
- package/dist/Notifications.js +5 -0
- package/dist/RunHistoryTypes.d.ts +103 -0
- package/dist/RunHistoryTypes.js +29 -0
- package/dist/SentNotifications.d.ts +29 -0
- package/dist/SentNotifications.js +12 -0
- package/dist/SocketEvents.d.ts +48 -0
- package/dist/SocketEvents.js +52 -0
- package/dist/Survey.d.ts +9 -0
- package/dist/Survey.js +1 -0
- package/dist/TicketSystem.d.ts +153 -0
- package/dist/TicketSystem.js +20 -0
- package/dist/ToolDisplayUtils.d.ts +29 -0
- package/dist/ToolDisplayUtils.js +1162 -0
- package/dist/Tools.d.ts +9202 -0
- package/dist/Tools.js +2099 -0
- package/dist/ToolsTypes.d.ts +17 -0
- package/dist/ToolsTypes.js +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +20 -0
- package/dist/types.d.ts +704 -0
- package/dist/types.js +115 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# terse-types
|
|
2
|
+
|
|
3
|
+
Shared Terse TypeScript types, enums, constants, and helpers packaged for reuse across repositories.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install terse-types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add terse-types
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Import from the root barrel when you want the common API surface:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { IntegrationType, type User } from "terse-types"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Import by subpath when you want a specific module:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { ApiRoutes } from "terse-types"
|
|
27
|
+
import type { RunHistoryStatus } from "terse-types/RunHistoryTypes"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Local Development
|
|
31
|
+
|
|
32
|
+
The `terse-types` workspace package lives in the repo's `terse-types/` directory.
|
|
33
|
+
|
|
34
|
+
Build it from the repo root with:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pnpm --filter terse-types run build
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If you are working on the local CLI and SDK at the same time, relink them from the repo root with:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pnpm run install-global
|
|
44
|
+
```
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
export declare const ApiRoutes: {
|
|
2
|
+
AUTH: {
|
|
3
|
+
ME: string;
|
|
4
|
+
LOGIN: string;
|
|
5
|
+
LOGIN_URL: string;
|
|
6
|
+
LOGOUT: string;
|
|
7
|
+
LOGOUT_URL: string;
|
|
8
|
+
GITHUB_APP_CALLBACK: string;
|
|
9
|
+
WORKOS_CALLBACK: string;
|
|
10
|
+
};
|
|
11
|
+
WORKOS: {
|
|
12
|
+
WIDGET_TOKEN: string;
|
|
13
|
+
};
|
|
14
|
+
ORGANIZATIONS: {
|
|
15
|
+
CREATE: string;
|
|
16
|
+
GET_CURRENT: string;
|
|
17
|
+
LIST: string;
|
|
18
|
+
SWITCH: string;
|
|
19
|
+
UPDATE: string;
|
|
20
|
+
LOGO_UPLOAD_URL: string;
|
|
21
|
+
LOGO: string;
|
|
22
|
+
};
|
|
23
|
+
STATS: string;
|
|
24
|
+
RUN_HISTORY: {
|
|
25
|
+
ALL: string;
|
|
26
|
+
ACTIONS: string;
|
|
27
|
+
BY_AGENT_ID: string;
|
|
28
|
+
CHAT_BY_RUN_ID: string;
|
|
29
|
+
};
|
|
30
|
+
SESSION: {
|
|
31
|
+
TOKEN: string;
|
|
32
|
+
};
|
|
33
|
+
GITHUB: {
|
|
34
|
+
INTEGRATIONS: string;
|
|
35
|
+
INSTALLATION_URL: string;
|
|
36
|
+
GET_REPOSITORIES_FOR_INTEGRATION: string;
|
|
37
|
+
INSTALLATION_CALLBACK: string;
|
|
38
|
+
INSTALLATION_DELETED: string;
|
|
39
|
+
UNIFIED_EVENT: string;
|
|
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
|
+
GMAIL: {
|
|
57
|
+
INTEGRATIONS: string;
|
|
58
|
+
CALLBACK: string;
|
|
59
|
+
DELETE_INTEGRATION: string;
|
|
60
|
+
};
|
|
61
|
+
NOTION: {
|
|
62
|
+
INTEGRATIONS: string;
|
|
63
|
+
OAUTH_CALLBACK: string;
|
|
64
|
+
RESOURCES: string;
|
|
65
|
+
DELETE_INTEGRATION: string;
|
|
66
|
+
};
|
|
67
|
+
FIGMA: {
|
|
68
|
+
INTEGRATIONS: string;
|
|
69
|
+
OAUTH_CALLBACK: string;
|
|
70
|
+
};
|
|
71
|
+
LINEAR: {
|
|
72
|
+
OAUTH_CALLBACK: string;
|
|
73
|
+
WEBHOOK: string;
|
|
74
|
+
INTEGRATIONS: string;
|
|
75
|
+
TEAMS: string;
|
|
76
|
+
};
|
|
77
|
+
SLACK: {
|
|
78
|
+
INTEGRATIONS: string;
|
|
79
|
+
GET_CURRENT_INTEGRATION: string;
|
|
80
|
+
OAUTH_CALLBACK: string;
|
|
81
|
+
CHANNELS: string;
|
|
82
|
+
USERS: string;
|
|
83
|
+
EVENTS: string;
|
|
84
|
+
};
|
|
85
|
+
POSTHOG: {
|
|
86
|
+
INTEGRATIONS: string;
|
|
87
|
+
PROJECTS: string;
|
|
88
|
+
};
|
|
89
|
+
LAUNCHDARKLY: {
|
|
90
|
+
INTEGRATIONS: string;
|
|
91
|
+
PROJECTS_BY_INTEGRATION_ID: string;
|
|
92
|
+
ENVIRONMENTS_BY_INTEGRATION_AND_PROJECT: string;
|
|
93
|
+
};
|
|
94
|
+
DATADOG: {
|
|
95
|
+
INTEGRATIONS: string;
|
|
96
|
+
INDEXES: string;
|
|
97
|
+
};
|
|
98
|
+
WORKOS_INTEGRATION: {
|
|
99
|
+
INTEGRATIONS: string;
|
|
100
|
+
WEBHOOK_SECRET: string;
|
|
101
|
+
};
|
|
102
|
+
SNOWFLAKE: {
|
|
103
|
+
INTEGRATIONS: string;
|
|
104
|
+
};
|
|
105
|
+
ATTIO: {
|
|
106
|
+
INTEGRATIONS: string;
|
|
107
|
+
OAUTH_CALLBACK: string;
|
|
108
|
+
OBJECTS: string;
|
|
109
|
+
};
|
|
110
|
+
AGENTS: {
|
|
111
|
+
LIST: string;
|
|
112
|
+
RECENT: string;
|
|
113
|
+
BY_ID: string;
|
|
114
|
+
};
|
|
115
|
+
IMPROVEMENTS: {
|
|
116
|
+
BY_AGENT_ID: string;
|
|
117
|
+
APPLY: string;
|
|
118
|
+
DISMISS: string;
|
|
119
|
+
UNDO_DISMISS: string;
|
|
120
|
+
TOGGLE_ENABLED: string;
|
|
121
|
+
};
|
|
122
|
+
TEMPLATES: string;
|
|
123
|
+
PUBLIC: {
|
|
124
|
+
TEMPLATES: string;
|
|
125
|
+
};
|
|
126
|
+
TOOLS: {
|
|
127
|
+
THAT_REQUIRE_APPROVALS: string;
|
|
128
|
+
};
|
|
129
|
+
INTEGRATIONS: {
|
|
130
|
+
INSTALLATION_DETAILS_BY_TYPE: string;
|
|
131
|
+
LIST: string;
|
|
132
|
+
ACTIVE: string;
|
|
133
|
+
};
|
|
134
|
+
NOTIFICATION_DESTINATIONS: {
|
|
135
|
+
LIST: string;
|
|
136
|
+
BY_ID: string;
|
|
137
|
+
};
|
|
138
|
+
API_TOKENS: {
|
|
139
|
+
LIST: string;
|
|
140
|
+
BY_ID: string;
|
|
141
|
+
};
|
|
142
|
+
SDK: {
|
|
143
|
+
ME: string;
|
|
144
|
+
SAMPLE_EVENTS: string;
|
|
145
|
+
TOOL_EXECUTE: string;
|
|
146
|
+
TOOL_DEFINITIONS: string;
|
|
147
|
+
AGENT_RUN: string;
|
|
148
|
+
APPROVAL_DECISION: string;
|
|
149
|
+
SESSION_EVENTS: string;
|
|
150
|
+
DEPLOY: string;
|
|
151
|
+
DEVICE_TOKEN_EXCHANGE: string;
|
|
152
|
+
INTEGRATION_FIELDS: string;
|
|
153
|
+
INTEGRATION_FORM_SUBMIT: string;
|
|
154
|
+
};
|
|
155
|
+
NOTIFICATION_SETTINGS: string;
|
|
156
|
+
SENT_NOTIFICATIONS: {
|
|
157
|
+
LIST: string;
|
|
158
|
+
};
|
|
159
|
+
PENDING_APPROVALS: {
|
|
160
|
+
LIST: string;
|
|
161
|
+
};
|
|
162
|
+
WEBHOOKS: {
|
|
163
|
+
GMAIL: string;
|
|
164
|
+
FIGMA: string;
|
|
165
|
+
WORKOS: string;
|
|
166
|
+
JIRA_BY_ACCOUNT_ID: string;
|
|
167
|
+
LINEAR_BY_USER_ID: string;
|
|
168
|
+
SCHEDULE_BY_INPUT_ID: string;
|
|
169
|
+
WORKOS_TRIGGER_BY_INTEGRATION_ID: string;
|
|
170
|
+
};
|
|
171
|
+
SCHEDULE: {
|
|
172
|
+
TRIGGER_BY_INPUT_ID: string;
|
|
173
|
+
TRIGGER_WITH_EVENT: string;
|
|
174
|
+
};
|
|
175
|
+
REFRESH_TOKENS: string;
|
|
176
|
+
REVIEW_AGENTS: string;
|
|
177
|
+
USERS: {
|
|
178
|
+
CREATE: string;
|
|
179
|
+
BY_ID: string;
|
|
180
|
+
};
|
|
181
|
+
BUILDER_CHAT: {
|
|
182
|
+
HISTORY_BY_SESSION_ID: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
export declare function buildRoute(pattern: string, params: Record<string, string | number>): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import apiRoutes from "./ApiRoutes.json" with { type: "json" };
|
|
2
|
+
export const ApiRoutes = apiRoutes;
|
|
3
|
+
export function buildRoute(pattern, params) {
|
|
4
|
+
return pattern.replace(/:([A-Za-z0-9_]+)/g, (_, paramName) => {
|
|
5
|
+
const value = params[paramName];
|
|
6
|
+
if (value == null) {
|
|
7
|
+
throw new Error(`Missing route param: ${paramName}`);
|
|
8
|
+
}
|
|
9
|
+
return encodeURIComponent(String(value));
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AUTH": {
|
|
3
|
+
"ME": "/me",
|
|
4
|
+
"LOGIN": "/login",
|
|
5
|
+
"LOGIN_URL": "/login/url",
|
|
6
|
+
"LOGOUT": "/logout",
|
|
7
|
+
"LOGOUT_URL": "/logout/url",
|
|
8
|
+
"GITHUB_APP_CALLBACK": "/auth/github-app/callback",
|
|
9
|
+
"WORKOS_CALLBACK": "/auth/workos/callback"
|
|
10
|
+
},
|
|
11
|
+
"WORKOS": {
|
|
12
|
+
"WIDGET_TOKEN": "/auth/workos/widget-token"
|
|
13
|
+
},
|
|
14
|
+
"ORGANIZATIONS": {
|
|
15
|
+
"CREATE": "/organizations",
|
|
16
|
+
"GET_CURRENT": "/organizations/current",
|
|
17
|
+
"LIST": "/organizations",
|
|
18
|
+
"SWITCH": "/organizations/switch",
|
|
19
|
+
"UPDATE": "/organizations",
|
|
20
|
+
"LOGO_UPLOAD_URL": "/organizations/logo/upload-url",
|
|
21
|
+
"LOGO": "/organizations/:organizationId/logo"
|
|
22
|
+
},
|
|
23
|
+
"STATS": "/stats",
|
|
24
|
+
"RUN_HISTORY": {
|
|
25
|
+
"ALL": "/run-history",
|
|
26
|
+
"ACTIONS": "/run-history/actions",
|
|
27
|
+
"BY_AGENT_ID": "/run-history/:agentId",
|
|
28
|
+
"CHAT_BY_RUN_ID": "/run-history/:runId/chat"
|
|
29
|
+
},
|
|
30
|
+
"SESSION": {
|
|
31
|
+
"TOKEN": "/session/token"
|
|
32
|
+
},
|
|
33
|
+
"GITHUB": {
|
|
34
|
+
"INTEGRATIONS": "/github/integrations",
|
|
35
|
+
"INSTALLATION_URL": "/github/installation-url",
|
|
36
|
+
"GET_REPOSITORIES_FOR_INTEGRATION": "/github/get-repositories-for-integration",
|
|
37
|
+
"INSTALLATION_CALLBACK": "/github/installation-callback",
|
|
38
|
+
"INSTALLATION_DELETED": "/github/installation-deleted",
|
|
39
|
+
"UNIFIED_EVENT": "/github/unified-event"
|
|
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
|
+
"GMAIL": {
|
|
57
|
+
"INTEGRATIONS": "/gmail/integrations",
|
|
58
|
+
"CALLBACK": "/gmail/callback",
|
|
59
|
+
"DELETE_INTEGRATION": "/gmail/delete-integration"
|
|
60
|
+
},
|
|
61
|
+
"NOTION": {
|
|
62
|
+
"INTEGRATIONS": "/notion/integrations",
|
|
63
|
+
"OAUTH_CALLBACK": "/notion/oauth/callback",
|
|
64
|
+
"RESOURCES": "/notion/resources",
|
|
65
|
+
"DELETE_INTEGRATION": "/notion/delete-integration"
|
|
66
|
+
},
|
|
67
|
+
"FIGMA": {
|
|
68
|
+
"INTEGRATIONS": "/figma/integrations",
|
|
69
|
+
"OAUTH_CALLBACK": "/figma/oauth/callback"
|
|
70
|
+
},
|
|
71
|
+
"LINEAR": {
|
|
72
|
+
"OAUTH_CALLBACK": "/linear/oauth/callback",
|
|
73
|
+
"WEBHOOK": "/linear/webhook",
|
|
74
|
+
"INTEGRATIONS": "/linear/integrations",
|
|
75
|
+
"TEAMS": "/linear/teams"
|
|
76
|
+
},
|
|
77
|
+
"SLACK": {
|
|
78
|
+
"INTEGRATIONS": "/slack/integrations",
|
|
79
|
+
"GET_CURRENT_INTEGRATION": "/slack/get-current-integration",
|
|
80
|
+
"OAUTH_CALLBACK": "/slack/oauth-callback",
|
|
81
|
+
"CHANNELS": "/slack/channels",
|
|
82
|
+
"USERS": "/slack/users",
|
|
83
|
+
"EVENTS": "/slack/events"
|
|
84
|
+
},
|
|
85
|
+
"POSTHOG": {
|
|
86
|
+
"INTEGRATIONS": "/posthog/integrations",
|
|
87
|
+
"PROJECTS": "/posthog/projects"
|
|
88
|
+
},
|
|
89
|
+
"LAUNCHDARKLY": {
|
|
90
|
+
"INTEGRATIONS": "/launchdarkly/integrations",
|
|
91
|
+
"PROJECTS_BY_INTEGRATION_ID": "/launchdarkly/integrations/:integrationId/projects",
|
|
92
|
+
"ENVIRONMENTS_BY_INTEGRATION_AND_PROJECT": "/launchdarkly/integrations/:integrationId/projects/:projectKey/environments"
|
|
93
|
+
},
|
|
94
|
+
"DATADOG": {
|
|
95
|
+
"INTEGRATIONS": "/datadog/integrations",
|
|
96
|
+
"INDEXES": "/datadog/indexes"
|
|
97
|
+
},
|
|
98
|
+
"WORKOS_INTEGRATION": {
|
|
99
|
+
"INTEGRATIONS": "/workos-integration/integrations",
|
|
100
|
+
"WEBHOOK_SECRET": "/workos-integration/webhook-secret"
|
|
101
|
+
},
|
|
102
|
+
"SNOWFLAKE": {
|
|
103
|
+
"INTEGRATIONS": "/snowflake/integrations"
|
|
104
|
+
},
|
|
105
|
+
"ATTIO": {
|
|
106
|
+
"INTEGRATIONS": "/attio/integrations",
|
|
107
|
+
"OAUTH_CALLBACK": "/attio/oauth/callback",
|
|
108
|
+
"OBJECTS": "/attio/integrations/:integrationId/objects"
|
|
109
|
+
},
|
|
110
|
+
"AGENTS": {
|
|
111
|
+
"LIST": "/agents",
|
|
112
|
+
"RECENT": "/agents/recent",
|
|
113
|
+
"BY_ID": "/agents/:id"
|
|
114
|
+
},
|
|
115
|
+
"IMPROVEMENTS": {
|
|
116
|
+
"BY_AGENT_ID": "/agents/:agentId/improvements",
|
|
117
|
+
"APPLY": "/agents/:agentId/improvements/:id/apply",
|
|
118
|
+
"DISMISS": "/agents/:agentId/improvements/:id/dismiss",
|
|
119
|
+
"UNDO_DISMISS": "/agents/:agentId/improvements/:id/undo-dismiss",
|
|
120
|
+
"TOGGLE_ENABLED": "/agents/:agentId/improvements-enabled"
|
|
121
|
+
},
|
|
122
|
+
"TEMPLATES": "/templates",
|
|
123
|
+
"PUBLIC": {
|
|
124
|
+
"TEMPLATES": "/public/templates"
|
|
125
|
+
},
|
|
126
|
+
"TOOLS": {
|
|
127
|
+
"THAT_REQUIRE_APPROVALS": "/tools/that-require-approvals"
|
|
128
|
+
},
|
|
129
|
+
"INTEGRATIONS": {
|
|
130
|
+
"INSTALLATION_DETAILS_BY_TYPE": "/integrations/:integrationType/installation-details",
|
|
131
|
+
"LIST": "/integrations",
|
|
132
|
+
"ACTIVE": "/integrations/active"
|
|
133
|
+
},
|
|
134
|
+
"NOTIFICATION_DESTINATIONS": {
|
|
135
|
+
"LIST": "/notification-destinations",
|
|
136
|
+
"BY_ID": "/notification-destinations/:id"
|
|
137
|
+
},
|
|
138
|
+
"API_TOKENS": {
|
|
139
|
+
"LIST": "/api-tokens",
|
|
140
|
+
"BY_ID": "/api-tokens/:id"
|
|
141
|
+
},
|
|
142
|
+
"SDK": {
|
|
143
|
+
"ME": "/sdk/me",
|
|
144
|
+
"SAMPLE_EVENTS": "/sdk/sample-events",
|
|
145
|
+
"TOOL_EXECUTE": "/sdk/tool-execute",
|
|
146
|
+
"TOOL_DEFINITIONS": "/sdk/tool-definitions",
|
|
147
|
+
"AGENT_RUN": "/sdk/agent-run",
|
|
148
|
+
"APPROVAL_DECISION": "/sdk/approval-decision",
|
|
149
|
+
"SESSION_EVENTS": "/sdk/session-events",
|
|
150
|
+
"DEPLOY": "/sdk/deploy",
|
|
151
|
+
"DEVICE_TOKEN_EXCHANGE": "/sdk/auth/device-token-exchange",
|
|
152
|
+
"INTEGRATION_FIELDS": "/sdk/integrations/:integrationType/fields",
|
|
153
|
+
"INTEGRATION_FORM_SUBMIT": "/sdk/integrations/:integrationType/form-submit"
|
|
154
|
+
},
|
|
155
|
+
"NOTIFICATION_SETTINGS": "/notification-settings",
|
|
156
|
+
"SENT_NOTIFICATIONS": {
|
|
157
|
+
"LIST": "/sent-notifications"
|
|
158
|
+
},
|
|
159
|
+
"PENDING_APPROVALS": {
|
|
160
|
+
"LIST": "/pending-approvals"
|
|
161
|
+
},
|
|
162
|
+
"WEBHOOKS": {
|
|
163
|
+
"GMAIL": "/webhooks/gmail",
|
|
164
|
+
"FIGMA": "/webhooks/figma",
|
|
165
|
+
"WORKOS": "/webhooks/workos",
|
|
166
|
+
"JIRA_BY_ACCOUNT_ID": "/webhooks/jira/:accountId",
|
|
167
|
+
"LINEAR_BY_USER_ID": "/webhooks/linear/:userId",
|
|
168
|
+
"SCHEDULE_BY_INPUT_ID": "/webhooks/schedule/:inputId",
|
|
169
|
+
"WORKOS_TRIGGER_BY_INTEGRATION_ID": "/webhooks/workos-trigger/:integrationId"
|
|
170
|
+
},
|
|
171
|
+
"SCHEDULE": {
|
|
172
|
+
"TRIGGER_BY_INPUT_ID": "/schedule/trigger/:inputId",
|
|
173
|
+
"TRIGGER_WITH_EVENT": "/schedule/trigger-with-event/:automationId"
|
|
174
|
+
},
|
|
175
|
+
"REFRESH_TOKENS": "/refresh-tokens",
|
|
176
|
+
"REVIEW_AGENTS": "/review-agents",
|
|
177
|
+
"USERS": {
|
|
178
|
+
"CREATE": "/users",
|
|
179
|
+
"BY_ID": "/users/:id"
|
|
180
|
+
},
|
|
181
|
+
"BUILDER_CHAT": {
|
|
182
|
+
"HISTORY_BY_SESSION_ID": "/builder-chat/:sessionId/history"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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";
|
|
4
|
+
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
|
+
};
|
|
21
|
+
export type GetPendingApprovalsResponse = {
|
|
22
|
+
items: ApprovalRequest[];
|
|
23
|
+
};
|
|
24
|
+
export declare function parseDeepLink(deepLink: string): {
|
|
25
|
+
type: string;
|
|
26
|
+
params: string[];
|
|
27
|
+
};
|
|
28
|
+
export declare function encodeDeepLink(type: ApprovalActionType, ...params: string[]): string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface ClientBoundTool<T = any> {
|
|
2
|
+
id: string;
|
|
3
|
+
parseParameters(parameters: string): T;
|
|
4
|
+
}
|
|
5
|
+
export declare function createClientBoundTool<T>(tool: Omit<ClientBoundTool<T>, "parseParameters">): ClientBoundTool<T>;
|
|
6
|
+
export interface ShowTypeToUserParameters {
|
|
7
|
+
items: {
|
|
8
|
+
type: string;
|
|
9
|
+
id: string;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export interface ShowOrganizationSummaryParameters {
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ShowOrganizationNameParameters {
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateOrganizationParameters {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SetComponentsForOrganizationParameters {
|
|
23
|
+
components: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface RequestConfirmationParameters {
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
export interface InviteUsersParameters {
|
|
29
|
+
inOrg: string[];
|
|
30
|
+
notInOrg: string[];
|
|
31
|
+
currentUser: string;
|
|
32
|
+
currentUserInList: boolean;
|
|
33
|
+
inInvitations: string[];
|
|
34
|
+
}
|
|
35
|
+
export declare const clientBoundTools: readonly [ClientBoundTool<ShowTypeToUserParameters>, ClientBoundTool<ShowOrganizationSummaryParameters>, ClientBoundTool<ShowOrganizationNameParameters>, ClientBoundTool<CreateOrganizationParameters>, ClientBoundTool<SetComponentsForOrganizationParameters>, ClientBoundTool<RequestConfirmationParameters>, ClientBoundTool<InviteUsersParameters>];
|
|
36
|
+
export declare const clientBoundToolIds: string[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Helper function to create a client-bound tool with type safety
|
|
2
|
+
export function createClientBoundTool(tool) {
|
|
3
|
+
return {
|
|
4
|
+
...tool,
|
|
5
|
+
parseParameters(parameters) {
|
|
6
|
+
console.log("Parsing parameters", parameters);
|
|
7
|
+
return JSON.parse(parameters);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
// Create the tools with type safety
|
|
12
|
+
export const clientBoundTools = [
|
|
13
|
+
createClientBoundTool({
|
|
14
|
+
id: "Show_Type_To_User"
|
|
15
|
+
}),
|
|
16
|
+
createClientBoundTool({
|
|
17
|
+
id: "Show_User_Provided_Organization_Summary"
|
|
18
|
+
}),
|
|
19
|
+
createClientBoundTool({
|
|
20
|
+
id: "Show_Organization_Name"
|
|
21
|
+
}),
|
|
22
|
+
createClientBoundTool({
|
|
23
|
+
id: "Create_Organization"
|
|
24
|
+
}),
|
|
25
|
+
createClientBoundTool({
|
|
26
|
+
id: "Set_Components_For_Organization"
|
|
27
|
+
}),
|
|
28
|
+
createClientBoundTool({
|
|
29
|
+
id: "Request_Confirmation"
|
|
30
|
+
}),
|
|
31
|
+
createClientBoundTool({
|
|
32
|
+
id: "Set_Users_For_Organization"
|
|
33
|
+
})
|
|
34
|
+
];
|
|
35
|
+
// Extract the tool IDs for runtime checking
|
|
36
|
+
export const clientBoundToolIds = clientBoundTools.map(tool => tool.id);
|