@ablehi/server-contract 0.1.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.
- package/dist/edge.d.ts +931 -0
- package/dist/edge.js +1 -0
- package/dist/index.d.ts +908 -0
- package/dist/index.js +1 -0
- package/package.json +40 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,908 @@
|
|
|
1
|
+
import { FlowNode, FlowCompositionSpec, JsonObject, Mapping, TriggerBinding } from './edge.js';
|
|
2
|
+
export { AblehiEnvelope, AblehiFailure, AblehiSuccess, ActionNode, BooleanExpression, Collection, CompleteFlowRunWaitBody, CompleteFlowRunWaitData, ContractParseResult, CreateHumanInputRequestBody, DEPLOYMENT_HANDSHAKE_DISPATCHER_CAPABILITIES, DEPLOYMENT_HANDSHAKE_REQUIRED_CAPABILITIES, DEPLOYMENT_HANDSHAKE_ROUTE, DeploymentHandshakeData, DeploymentHandshakeRequestBody, DeploymentHandshakeResponse, EGRESS_GRANT_AUDIT_ROUTE_SUBPATH, EGRESS_GRANT_CONSUME_ROUTE_SUBPATH, EGRESS_GRANT_SCOPE_KINDS, EVENT_WAIT_ROUTE_SUBPATH, EXECUTION_CONTEXT_ROUTE_SUBPATH, EgressGrant, EgressGrantAuditBody, EgressGrantBodyParseResult, EgressGrantConsumeBody, EgressGrantFileRuntime, EgressGrantScopeKind, ExecutionBinding, ExecutionBindingConnection, ExecutionContextCompiled, ExecutionContextData, FILE_CONTENT_ROUTE_SUBPATH, FILE_STAT_ROUTE_SUBPATH, FLOW_INTERPRETER_CONTRACT_VERSION, FLOW_IR_SCHEMA_VERSION, FLOW_RUN_EGRESS_GRANT_ROUTE_SUBPATH, FLOW_RUN_RESULT_ROUTE_SUBPATH, FLOW_RUN_RUNTIME_CREDENTIAL_ROUTE_SUBPATH, FileRefData, FileRuntimeLimits, FileRuntimeScope, FileRuntimeScopeKind, FlowActionGrantBody, FlowDefinition, FlowExecutionContextFileRuntime, FlowInterpreterContractVersion, FlowIrValidationCode, FlowIrValidationIssue, FlowIrValidationResult, FlowRunResultData, FlowRunResultRequestBody, FlowRuntimeCredentialBody, HANDLER_BUNDLES_ROUTE_SUBPATH, HANDSHAKE_CAPABILITY_MISSING, HANDSHAKE_CONTRACT_VERSION_MISMATCH, HANDSHAKE_DISPATCH_NAMESPACE_MISMATCH, HANDSHAKE_REQUEST_INVALID, HANDSHAKE_SECRET_MISMATCH, HANDSHAKE_SECRET_UNCONFIGURED, HUMAN_INPUTS_ROUTE_SUBPATH, HUMAN_INPUT_ACKNOWLEDGE_ROUTE_SUBPATH, HUMAN_INPUT_EXPIRE_ROUTE_SUBPATH, HUMAN_INPUT_REQUEST_ROUTE_SUBPATH, HUMAN_INPUT_RESOLVED_EVENT_PREFIX, HandlerBundle, HandlerBundleModule, HandlerBundlesData, HandlerBundlesParseResult, HumanChoiceInput, HumanFormField, HumanFormInput, HumanInputActor, HumanInputChoice, HumanInputDelivery, HumanInputDeliveryAction, HumanInputNode, HumanInputOutput, HumanInputPrompt, HumanInputRequestView, HumanInputResolvedEvent, HumanInputResponse, HumanInputSpec, HumanTextInput, INTERNAL_EGRESS_GRANTS_ROUTE_PREFIX, INTERNAL_FILES_ROUTE_PREFIX, INTERNAL_FLOW_RUNS_ROUTE_PREFIX, INTERNAL_FLOW_VERSIONS_ROUTE_PREFIX, INTERNAL_INSTALLATIONS_ROUTE_PREFIX, INTERNAL_POLLING_TRIGGER_INSTANCES_ROUTE_PREFIX, INTERNAL_TOOL_INVOCATIONS_ROUTE_PREFIX, INTERNAL_WEBHOOK_TRIGGER_INSTANCES_ROUTE_PREFIX, IntegrationTriggerBinding, JsonArray, JsonValue, ManualTriggerBinding, NodeCommon, Operand, POLLING_TRIGGER_CONTEXT_ROUTE_SUBPATH, POLLING_TRIGGER_EGRESS_GRANT_ROUTE_SUBPATH, POLLING_TRIGGER_HANDLER_BUNDLES_ROUTE_SUBPATH, POLLING_TRIGGER_RUNTIME_CREDENTIAL_ROUTE_SUBPATH, POLLING_TRIGGER_STORE_ROUTE_SUBPATH, POLLING_TRIGGER_TICK_EVENTS_ROUTE_SUBPATH, PackagePollingTriggerRuntimeDescriptor, PackageWebhookTriggerRuntimeDescriptor, ParsedFlowRunResultBody, PartiallyRenderedHumanInputDelivery, PartiallyRenderedMapping, PartiallyRenderedTemplatePart, PartiallyRenderedValue, PollingPublishBody, PollingPublishEvent, PollingRuntimeCredentialBody, PollingStoreGetData, PollingStorePutBody, PollingTriggerContext, PollingTriggerGrantBody, PublishPollingTickEventResult, PublishPollingTickEventsData, RUNTIME_CREDENTIAL_SESSION_SCOPE_KINDS, RegisterFlowRunWaitBody, RegisterFlowRunWaitData, RenderedFlowComposition, RenderedHumanInputPrompt, RuntimeCredentialSession, RuntimeCredentialSessionNetwork, RuntimeCredentialSessionScopeKind, RuntimeNetwork, RuntimeNetworkModel, SERVER_CONTRACT_VERSION, STEP_RESULT_ROUTE_SUBPATH, ScheduleTriggerBinding, ServerContractVersion, SingleToolGrantBody, SleepNode, StepRecordBody, StepRecordBodyParseResult, StepRecordData, StepRecordResult, TOOL_HANDLER_BUNDLES_ROUTE_SUBPATH, TOOL_INVOCATION_EGRESS_GRANT_ROUTE_SUBPATH, TOOL_INVOCATION_RUNTIME_CREDENTIAL_ROUTE_SUBPATH, TextExpression, ToolHandlerBundlesData, TriggerConnectionInfo, TriggerHandlerBundlesData, TriggerHandlerModule, ValueExpression, WEBHOOK_PROTOCOL_ADAPTER_BUNDLE_ROUTE_SUBPATH, WEBHOOK_PROTOCOL_ADAPTER_MODULE, WEBHOOK_TRIGGER_CONTEXT_ROUTE_SUBPATH, WEBHOOK_TRIGGER_DELIVERY_ROUTE_SUBPATH, WEBHOOK_TRIGGER_EGRESS_GRANT_ROUTE_SUBPATH, WEBHOOK_TRIGGER_EVENTS_ROUTE_SUBPATH, WEBHOOK_TRIGGER_HANDLER_BUNDLES_ROUTE_SUBPATH, WEBHOOK_TRIGGER_REARM_ROUTE_SUBPATH, WEBHOOK_TRIGGER_RUNTIME_CREDENTIAL_ROUTE_SUBPATH, WEBHOOK_TRIGGER_STORE_ROUTE_SUBPATH, WFP_USER_RUNTIME_MANIFEST_FORMAT_VERSION, WFP_USER_RUNTIME_UNKNOWN_SOURCE_REVISION, WaitEventNode, WebhookDelivery, WebhookProtocolAdapterBundleData, WebhookProtocolAdapterModule, WebhookPublishEvent, WebhookPublishEventsBody, WebhookPublishEventsData, WebhookRearmBody, WebhookRearmData, WebhookRuntimeCredentialBody, PollingStoreGetData as WebhookStoreGetData, PollingStorePutBody as WebhookStorePutBody, WebhookTriggerGrantBody, WebhookTriggerVerificationMethod, WebhookWatcherContext, WfpUserRuntimeManifest, contractParseFail, contractParseOk, deploymentHandshakeProbePayload, deploymentHandshakeResponseProofPayload, egressGrantAuditPath, egressGrantConsumePath, eventWaitPath, executionContextPath, flowRunEgressGrantPath, flowRunResultPath, flowRunRuntimeCredentialPath, flowScriptProtocolAdapterModuleName, handlerBundlesPath, humanInputAcknowledgePath, humanInputExpirePath, humanInputRequestPath, humanInputResolvedEventType, humanInputsPath, internalFileContentPath, internalFileStatPath, internalFilesPath, isJsonRecord, isValidRequestDigest, parseCompleteFlowRunWaitBody, parseCreateHumanInputBody, parseEgressGrantAuditBody, parseEgressGrantConsumeBody, parseEgressGrantConsumeData, parseEgressGrantData, parseExecutionContextData, parseFileRefData, parseFileRuntimeLimits, parseFlowActionGrantBody, parseFlowRunResultBody, parseFlowRunResultData, parseFlowRuntimeCredentialBody, parseHandlerBundle, parseHandlerBundlesData, parseHumanInputAcknowledgeData, parseHumanInputCreateData, parseHumanInputRequestViewData, parsePollingPublishBody, parsePollingRuntimeCredentialBody, parsePollingStorePutBody, parsePollingStoreValue, parsePollingTriggerContext, parsePollingTriggerGrantBody, parsePublishPollingTickEventsData, parseRegisterFlowRunWaitBody, parseRegisterFlowRunWaitData, parseRuntimeCredentialSessionCredential, parseRuntimeNetwork, parseSingleToolGrantBody, parseSingleToolRuntimeCredentialBody, parseStepRecordBody, parseStepRecordData, parseToolHandlerBundlesData, parseTriggerHandlerBundlesData, parseWebhookDelivery, parseWebhookPublishEventsBody, parseWebhookRearmBody, parseWebhookRuntimeCredentialBody, parsePollingStorePutBody as parseWebhookStorePutBody, parsePollingStoreValue as parseWebhookStoreValue, parseWebhookTriggerGrantBody, parseWebhookWatcherContext, pollingTriggerContextPath, pollingTriggerEgressGrantPath, pollingTriggerHandlerBundlesPath, pollingTriggerRuntimeCredentialPath, pollingTriggerStorePath, pollingTriggerTickEventsPath, requestHasMultipartFileParts, stepResultPath, toolHandlerBundlesPath, toolInvocationEgressGrantPath, toolInvocationRuntimeCredentialPath, webhookProtocolAdapterBundlePath, webhookTriggerContextPath, webhookTriggerDeliveryPath, webhookTriggerEgressGrantPath, webhookTriggerEventsPath, webhookTriggerHandlerBundlesPath, webhookTriggerRearmPath, webhookTriggerRuntimeCredentialPath, webhookTriggerStorePath, wfpUserRuntimeManifestPath } from './edge.js';
|
|
3
|
+
|
|
4
|
+
declare const CURRENT_USER_ROUTE_PATH = "/me";
|
|
5
|
+
declare const currentUserPath: () => string;
|
|
6
|
+
type CurrentUserData = {
|
|
7
|
+
user: {
|
|
8
|
+
id: string;
|
|
9
|
+
email: string;
|
|
10
|
+
name: string;
|
|
11
|
+
avatarUrl: string | null;
|
|
12
|
+
};
|
|
13
|
+
defaultWorkspaceId: string;
|
|
14
|
+
platformPermissions: string[];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
declare const WORKSPACES_ROUTE_PREFIX = "/workspaces";
|
|
18
|
+
declare const WORKSPACE_ACCESS_ROUTE_SUBPATH = "/:workspaceId";
|
|
19
|
+
declare const workspacePath: (workspaceId: string) => string;
|
|
20
|
+
type WorkspaceData = {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
createdByUserId: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
};
|
|
27
|
+
type WorkspaceMembershipRole = "owner" | "member";
|
|
28
|
+
type WorkspaceMembershipData = {
|
|
29
|
+
userId: string;
|
|
30
|
+
workspaceId: string;
|
|
31
|
+
role: WorkspaceMembershipRole;
|
|
32
|
+
status: "active";
|
|
33
|
+
createdAt: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
};
|
|
36
|
+
type WorkspaceAccessData = {
|
|
37
|
+
workspace: WorkspaceData;
|
|
38
|
+
membership: WorkspaceMembershipData;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
declare const WORKSPACE_API_KEYS_ROUTE_SUBPATH = "/:workspaceId/api-keys";
|
|
42
|
+
declare const WORKSPACE_API_KEY_ITEM_ROUTE_SUBPATH = "/:workspaceId/api-keys/:apiKeyId";
|
|
43
|
+
declare const workspaceApiKeysPath: (workspaceId: string) => string;
|
|
44
|
+
declare const workspaceApiKeyPath: (workspaceId: string, apiKeyId: string) => string;
|
|
45
|
+
declare const WORKSPACE_API_KEY_FULL_ACCESS_SCOPE = "workspace.full_access";
|
|
46
|
+
type WorkspaceApiKeyScope = typeof WORKSPACE_API_KEY_FULL_ACCESS_SCOPE;
|
|
47
|
+
declare const WORKSPACE_API_KEY_CANONICAL_SCOPES: readonly [WorkspaceApiKeyScope];
|
|
48
|
+
type WorkspaceApiKeyStatus = "active" | "revoked";
|
|
49
|
+
type WorkspaceApiKeyData = {
|
|
50
|
+
id: string;
|
|
51
|
+
workspaceId: string;
|
|
52
|
+
name: string;
|
|
53
|
+
keyHint: string;
|
|
54
|
+
scopes: [WorkspaceApiKeyScope];
|
|
55
|
+
status: WorkspaceApiKeyStatus;
|
|
56
|
+
createdByUserId: string;
|
|
57
|
+
revokedByUserId: string | null;
|
|
58
|
+
expiresAt: string | null;
|
|
59
|
+
revokedAt: string | null;
|
|
60
|
+
createdAt: string;
|
|
61
|
+
updatedAt: string;
|
|
62
|
+
};
|
|
63
|
+
type WorkspaceApiKeyCreateBody = {
|
|
64
|
+
name: string;
|
|
65
|
+
expiresAt?: string | null;
|
|
66
|
+
};
|
|
67
|
+
type WorkspaceApiKeyCreateData = {
|
|
68
|
+
apiKey: WorkspaceApiKeyData;
|
|
69
|
+
token: string;
|
|
70
|
+
};
|
|
71
|
+
type WorkspaceApiKeyListData = {
|
|
72
|
+
apiKeys: WorkspaceApiKeyData[];
|
|
73
|
+
};
|
|
74
|
+
type WorkspaceApiKeyRevokeData = {
|
|
75
|
+
apiKey: WorkspaceApiKeyData & {
|
|
76
|
+
status: "revoked";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare const CATALOG_ROUTE_PREFIX = "/catalog";
|
|
81
|
+
declare const CATALOG_INTEGRATIONS_ROUTE_SUBPATH = "/integrations";
|
|
82
|
+
declare const CATALOG_INTEGRATION_DETAIL_ROUTE_SUBPATH = "/integrations/:slug";
|
|
83
|
+
declare const CATALOG_VERSIONS_ROUTE_SUBPATH = "/versions";
|
|
84
|
+
declare const CATALOG_DEFAULT_PROVIDER_APP_CONFIG_ROUTE_SUBPATH = "/integrations/:slug/default-provider-app-config";
|
|
85
|
+
declare const catalogIntegrationsPath: (input?: {
|
|
86
|
+
category?: string;
|
|
87
|
+
}) => string;
|
|
88
|
+
declare const catalogIntegrationPath: (slug: string) => string;
|
|
89
|
+
declare const catalogVersionsPath: () => string;
|
|
90
|
+
declare const catalogDefaultProviderAppConfigPath: (slug: string) => string;
|
|
91
|
+
type CatalogIntegrationSummaryData = {
|
|
92
|
+
slug: string;
|
|
93
|
+
displayName: string;
|
|
94
|
+
summary: string;
|
|
95
|
+
categories: string[];
|
|
96
|
+
latestVersion: string | null;
|
|
97
|
+
versionCount: number;
|
|
98
|
+
updatedAt: string;
|
|
99
|
+
};
|
|
100
|
+
type CatalogListData = {
|
|
101
|
+
integrations: CatalogIntegrationSummaryData[];
|
|
102
|
+
};
|
|
103
|
+
type CatalogToolFunctionData = {
|
|
104
|
+
toolRef: string;
|
|
105
|
+
toolName: string;
|
|
106
|
+
description: string;
|
|
107
|
+
categories?: string[];
|
|
108
|
+
};
|
|
109
|
+
type CatalogTriggerFunctionData = {
|
|
110
|
+
triggerRef: string;
|
|
111
|
+
triggerName: string;
|
|
112
|
+
type: "polling" | "webhook";
|
|
113
|
+
inputSchema: Record<string, unknown>;
|
|
114
|
+
requiredInputs: string[];
|
|
115
|
+
outputSchema: Record<string, unknown>;
|
|
116
|
+
};
|
|
117
|
+
type CatalogVersionSummaryData = {
|
|
118
|
+
version: string;
|
|
119
|
+
sizeBytes: number;
|
|
120
|
+
sha256: string;
|
|
121
|
+
publishedAt: string;
|
|
122
|
+
status: "active" | "yanked";
|
|
123
|
+
};
|
|
124
|
+
type CatalogDetailLatestData = {
|
|
125
|
+
version: string;
|
|
126
|
+
protocolVersion: string;
|
|
127
|
+
auth: unknown;
|
|
128
|
+
tools: CatalogToolFunctionData[];
|
|
129
|
+
triggers: CatalogTriggerFunctionData[];
|
|
130
|
+
sizeBytes: number;
|
|
131
|
+
sha256: string;
|
|
132
|
+
publishedAt: string;
|
|
133
|
+
};
|
|
134
|
+
type CatalogDetailData = {
|
|
135
|
+
slug: string;
|
|
136
|
+
displayName: string;
|
|
137
|
+
summary: string;
|
|
138
|
+
categories: string[];
|
|
139
|
+
aliases: string[];
|
|
140
|
+
listed: boolean;
|
|
141
|
+
latest: CatalogDetailLatestData | null;
|
|
142
|
+
versions: CatalogVersionSummaryData[];
|
|
143
|
+
};
|
|
144
|
+
type CatalogPublishData = {
|
|
145
|
+
slug: string;
|
|
146
|
+
version: string;
|
|
147
|
+
packageRef: string;
|
|
148
|
+
sha256: string;
|
|
149
|
+
sizeBytes: number;
|
|
150
|
+
publicUrl: string;
|
|
151
|
+
isLatest: boolean;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
declare const WORKSPACE_INTEGRATIONS_ROUTE_PREFIX = "/workspaces/:workspaceId/integrations";
|
|
155
|
+
declare const INTEGRATION_ITEM_ROUTE_SUBPATH = "/:installationId";
|
|
156
|
+
declare const INTEGRATION_TOOLS_ROUTE_SUBPATH = "/:installationId/tools";
|
|
157
|
+
declare const workspaceIntegrationsPath: (workspaceId: string) => string;
|
|
158
|
+
declare const workspaceIntegrationPath: (workspaceId: string, installationId: string) => string;
|
|
159
|
+
declare const installationToolsPath: (workspaceId: string, installationId: string) => string;
|
|
160
|
+
type InstallationSource = "catalog" | "url";
|
|
161
|
+
type InstallationCatalogInfoData = {
|
|
162
|
+
slug: string;
|
|
163
|
+
installedVersion: string;
|
|
164
|
+
latestVersion: string | null;
|
|
165
|
+
updateAvailable: boolean;
|
|
166
|
+
};
|
|
167
|
+
type RegistrationSummaryData = {
|
|
168
|
+
registeredCount: number;
|
|
169
|
+
skippedCount: number;
|
|
170
|
+
registered: unknown[];
|
|
171
|
+
skipped: unknown[];
|
|
172
|
+
reportPath: string;
|
|
173
|
+
};
|
|
174
|
+
type InstallationData = {
|
|
175
|
+
installationId: string;
|
|
176
|
+
workspaceId: string;
|
|
177
|
+
packageName: string;
|
|
178
|
+
packageVersion: string;
|
|
179
|
+
packageRef: string;
|
|
180
|
+
integrationRef: string;
|
|
181
|
+
enabled: boolean;
|
|
182
|
+
reportPath: string;
|
|
183
|
+
registrationSummary: RegistrationSummaryData;
|
|
184
|
+
network?: unknown;
|
|
185
|
+
source: InstallationSource;
|
|
186
|
+
catalog?: InstallationCatalogInfoData;
|
|
187
|
+
createdAt: string;
|
|
188
|
+
updatedAt: string;
|
|
189
|
+
};
|
|
190
|
+
type IntegrationListData = {
|
|
191
|
+
integrations: InstallationData[];
|
|
192
|
+
};
|
|
193
|
+
type IntegrationGetData = {
|
|
194
|
+
integration: InstallationData;
|
|
195
|
+
};
|
|
196
|
+
type IntegrationInstallBody = {
|
|
197
|
+
source?: "url";
|
|
198
|
+
packageUrl: string;
|
|
199
|
+
replace?: boolean;
|
|
200
|
+
} | {
|
|
201
|
+
source: "catalog";
|
|
202
|
+
slug: string;
|
|
203
|
+
replace?: boolean;
|
|
204
|
+
};
|
|
205
|
+
type IntegrationInstallData = {
|
|
206
|
+
integration: InstallationData;
|
|
207
|
+
registrationSummary: RegistrationSummaryData;
|
|
208
|
+
catalog?: {
|
|
209
|
+
slug: string;
|
|
210
|
+
version: string;
|
|
211
|
+
catalogVersionId: string;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
type IntegrationUninstallData = {
|
|
215
|
+
installationId: string;
|
|
216
|
+
packageName: string;
|
|
217
|
+
packageRemoved: boolean;
|
|
218
|
+
};
|
|
219
|
+
type ControlPlaneToolDeliveryData = {
|
|
220
|
+
human_input?: {
|
|
221
|
+
placement: "delivery_only" | "also_top_level";
|
|
222
|
+
presentation: "native_feedback" | "message_link";
|
|
223
|
+
supported_inputs: Array<Record<string, unknown>>;
|
|
224
|
+
default_input_bindings: Record<string, unknown>;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
type ControlPlaneToolData = {
|
|
228
|
+
toolRef: string;
|
|
229
|
+
toolName: string;
|
|
230
|
+
description: string;
|
|
231
|
+
whenToUse?: string;
|
|
232
|
+
whenNotToUse?: string;
|
|
233
|
+
semanticEffects?: string[];
|
|
234
|
+
inputSchema: Record<string, unknown>;
|
|
235
|
+
outputSchema: Record<string, unknown>;
|
|
236
|
+
requiredInputs: string[];
|
|
237
|
+
authRequired: boolean;
|
|
238
|
+
requiredScopes?: string[];
|
|
239
|
+
categories?: string[];
|
|
240
|
+
version: string;
|
|
241
|
+
integrationSlug: string;
|
|
242
|
+
delivery?: ControlPlaneToolDeliveryData;
|
|
243
|
+
};
|
|
244
|
+
type ControlPlaneTriggerData = {
|
|
245
|
+
triggerRef: string;
|
|
246
|
+
triggerName: string;
|
|
247
|
+
type: "polling" | "webhook";
|
|
248
|
+
inputSchema: Record<string, unknown>;
|
|
249
|
+
requiredInputs: string[];
|
|
250
|
+
outputSchema: Record<string, unknown>;
|
|
251
|
+
authRequired: boolean;
|
|
252
|
+
version: string;
|
|
253
|
+
integrationSlug: string;
|
|
254
|
+
};
|
|
255
|
+
type InstallationToolsData = {
|
|
256
|
+
installationId: string;
|
|
257
|
+
packageName: string;
|
|
258
|
+
tools: ControlPlaneToolData[];
|
|
259
|
+
triggers: ControlPlaneTriggerData[];
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
declare const WORKSPACE_CONNECTION_MOUNT_PREFIX = "/workspaces/:workspaceId";
|
|
263
|
+
declare const CONNECTIONS_ROUTE_SUBPATH = "/connections";
|
|
264
|
+
declare const CONNECT_START_ROUTE_SUBPATH = "/integrations/:installationId/connect/start";
|
|
265
|
+
declare const CONNECT_OPTIONS_ROUTE_SUBPATH = "/integrations/:installationId/connect/options";
|
|
266
|
+
declare const CONNECT_SUBMIT_ROUTE_SUBPATH = "/connect-sessions/:sessionId/submit";
|
|
267
|
+
declare const CONNECT_COMPLETE_ROUTE_SUBPATH = "/connect-sessions/:sessionId/complete";
|
|
268
|
+
declare const CONNECTION_DISCONNECT_ROUTE_SUBPATH = "/integrations/:installationId/connections/:connectionRef";
|
|
269
|
+
declare const PROVIDER_CALLBACK_REDIRECT_ROUTE_PATH = "/callbacks/redirect";
|
|
270
|
+
declare const workspaceConnectionsPath: (workspaceId: string) => string;
|
|
271
|
+
declare const connectStartPath: (workspaceId: string, installationId: string) => string;
|
|
272
|
+
declare const connectOptionsPath: (workspaceId: string, installationId: string) => string;
|
|
273
|
+
declare const connectSubmitPath: (workspaceId: string, sessionId: string) => string;
|
|
274
|
+
declare const connectCompletePath: (workspaceId: string, sessionId: string) => string;
|
|
275
|
+
declare const connectionDisconnectPath: (workspaceId: string, installationId: string, connectionRef: string) => string;
|
|
276
|
+
type ConnectionAuthType = "oauth2" | "oauth1" | "api_key" | "basic_auth" | "bearer" | "jwt" | "custom" | "two_step";
|
|
277
|
+
type ConnectionSummaryData = {
|
|
278
|
+
connectionId: string;
|
|
279
|
+
installationId: string;
|
|
280
|
+
integrationRef: string;
|
|
281
|
+
connectionRef: string;
|
|
282
|
+
connectionName: string;
|
|
283
|
+
authType: ConnectionAuthType;
|
|
284
|
+
status: "active";
|
|
285
|
+
createdAt: string;
|
|
286
|
+
updatedAt: string;
|
|
287
|
+
};
|
|
288
|
+
type ConnectionListData = {
|
|
289
|
+
connections: ConnectionSummaryData[];
|
|
290
|
+
};
|
|
291
|
+
type ConnectFieldDefData = {
|
|
292
|
+
type: "string" | "number" | "boolean";
|
|
293
|
+
title?: string;
|
|
294
|
+
description?: string;
|
|
295
|
+
secret: boolean;
|
|
296
|
+
pattern?: string;
|
|
297
|
+
enum?: string[];
|
|
298
|
+
example?: string | number | boolean;
|
|
299
|
+
};
|
|
300
|
+
type ConnectInputTarget = "provider_app_config" | "connection_config" | "credential";
|
|
301
|
+
type ConnectInputNextActionData = {
|
|
302
|
+
type: "input";
|
|
303
|
+
target: ConnectInputTarget;
|
|
304
|
+
fields: Record<string, ConnectFieldDefData>;
|
|
305
|
+
};
|
|
306
|
+
type ConnectRedirectNextActionData = {
|
|
307
|
+
type: "redirect";
|
|
308
|
+
authorizationUrl: string;
|
|
309
|
+
callbackUrl: string;
|
|
310
|
+
relaySessionId: string;
|
|
311
|
+
expiresAt: string;
|
|
312
|
+
};
|
|
313
|
+
type ProviderSetupData = {
|
|
314
|
+
callbackUrl: string;
|
|
315
|
+
instructions: {
|
|
316
|
+
title: string;
|
|
317
|
+
description: string;
|
|
318
|
+
}[];
|
|
319
|
+
};
|
|
320
|
+
type ProviderAppConfigSource = "custom" | "platform_default";
|
|
321
|
+
type ConnectStartBody = {
|
|
322
|
+
connectionRef?: string;
|
|
323
|
+
connectionName?: string;
|
|
324
|
+
providerAppConfigSource?: ProviderAppConfigSource;
|
|
325
|
+
};
|
|
326
|
+
type ConnectSubmitBody = {
|
|
327
|
+
inputs: Record<string, unknown>;
|
|
328
|
+
};
|
|
329
|
+
type ConnectStartResultData = {
|
|
330
|
+
sessionId: string;
|
|
331
|
+
installationId: string;
|
|
332
|
+
integrationRef: string;
|
|
333
|
+
status: "awaiting_input";
|
|
334
|
+
expiresAt: string;
|
|
335
|
+
nextAction: ConnectInputNextActionData;
|
|
336
|
+
providerSetup?: ProviderSetupData;
|
|
337
|
+
} | {
|
|
338
|
+
sessionId: string;
|
|
339
|
+
installationId: string;
|
|
340
|
+
integrationRef: string;
|
|
341
|
+
status: "awaiting_callback";
|
|
342
|
+
expiresAt: string;
|
|
343
|
+
nextAction: ConnectRedirectNextActionData;
|
|
344
|
+
};
|
|
345
|
+
type ConnectCompletedResultData = {
|
|
346
|
+
sessionId: string;
|
|
347
|
+
status: "completed";
|
|
348
|
+
connection: ConnectionSummaryData;
|
|
349
|
+
};
|
|
350
|
+
type ConnectSubmitResultData = ConnectCompletedResultData | {
|
|
351
|
+
sessionId: string;
|
|
352
|
+
installationId: string;
|
|
353
|
+
integrationRef: string;
|
|
354
|
+
status: "awaiting_input";
|
|
355
|
+
expiresAt: string;
|
|
356
|
+
nextAction: ConnectInputNextActionData;
|
|
357
|
+
} | {
|
|
358
|
+
sessionId: string;
|
|
359
|
+
installationId: string;
|
|
360
|
+
integrationRef: string;
|
|
361
|
+
status: "awaiting_callback";
|
|
362
|
+
expiresAt: string;
|
|
363
|
+
nextAction: ConnectRedirectNextActionData;
|
|
364
|
+
};
|
|
365
|
+
type ConnectCompleteResultData = ConnectCompletedResultData | {
|
|
366
|
+
sessionId: string;
|
|
367
|
+
installationId: string;
|
|
368
|
+
integrationRef: string;
|
|
369
|
+
status: "awaiting_callback";
|
|
370
|
+
relaySessionId: string;
|
|
371
|
+
expiresAt: string;
|
|
372
|
+
retryAfterMs: number;
|
|
373
|
+
};
|
|
374
|
+
type DisconnectResultData = {
|
|
375
|
+
connection: ConnectionSummaryData;
|
|
376
|
+
credentialRevoked: boolean;
|
|
377
|
+
};
|
|
378
|
+
type ConnectDefaultUnavailableReason = "NOT_CATALOG_INSTALLATION" | "NO_PROVIDER_APP_CONFIG_STEP" | "NO_ACTIVE_DEFAULT" | "SCHEMA_FINGERPRINT_MISMATCH" | "UNSUPPORTED_PROVIDER_APP_CONFIG";
|
|
379
|
+
type ConnectOptionsData = {
|
|
380
|
+
installationId: string;
|
|
381
|
+
source: "catalog" | "url";
|
|
382
|
+
providerAppConfig: {
|
|
383
|
+
required: boolean;
|
|
384
|
+
customAvailable: boolean;
|
|
385
|
+
platformDefaultAvailable: boolean;
|
|
386
|
+
unavailableReason: ConnectDefaultUnavailableReason | null;
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
type DefaultProviderAppConfigAdminData = {
|
|
390
|
+
slug: string;
|
|
391
|
+
catalogIntegrationId: string;
|
|
392
|
+
latestVersion: string;
|
|
393
|
+
providerSetup: {
|
|
394
|
+
callbackUrl: string;
|
|
395
|
+
};
|
|
396
|
+
providerAppConfig: {
|
|
397
|
+
supported: boolean;
|
|
398
|
+
unsupportedReason: null | "NO_PROVIDER_APP_CONFIG_STEP" | "NON_STRING_FIELD";
|
|
399
|
+
fields: Record<string, ConnectFieldDefData>;
|
|
400
|
+
schemaFingerprint: string | null;
|
|
401
|
+
configured: boolean;
|
|
402
|
+
status: "active" | "disabled" | null;
|
|
403
|
+
updatedAt: string | null;
|
|
404
|
+
updatedByUserId: string | null;
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
type DefaultProviderAppConfigUpsertBody = {
|
|
408
|
+
providerAppConfig: Record<string, string>;
|
|
409
|
+
};
|
|
410
|
+
type DefaultProviderAppConfigWriteData = {
|
|
411
|
+
slug: string;
|
|
412
|
+
catalogIntegrationId: string;
|
|
413
|
+
status: "active";
|
|
414
|
+
schemaFingerprint: string;
|
|
415
|
+
updatedAt: string;
|
|
416
|
+
};
|
|
417
|
+
type DefaultProviderAppConfigDisableData = {
|
|
418
|
+
slug: string;
|
|
419
|
+
catalogIntegrationId: string;
|
|
420
|
+
status: "disabled";
|
|
421
|
+
updatedAt: string;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
declare const WORKSPACE_FLOWS_ROUTE_PREFIX = "/workspaces/:workspaceId/flows";
|
|
425
|
+
declare const FLOW_VALIDATE_ROUTE_SUBPATH = "/validate";
|
|
426
|
+
declare const FLOW_ITEM_ROUTE_SUBPATH = "/:flowId";
|
|
427
|
+
declare const FLOW_ENABLE_ROUTE_SUBPATH = "/:flowId/enable";
|
|
428
|
+
declare const FLOW_DISABLE_ROUTE_SUBPATH = "/:flowId/disable";
|
|
429
|
+
declare const FLOW_DRAFT_ROUTE_SUBPATH = "/:flowId/draft";
|
|
430
|
+
declare const FLOW_VERSIONS_ROUTE_SUBPATH = "/:flowId/versions";
|
|
431
|
+
declare const FLOW_VERSION_ITEM_ROUTE_SUBPATH = "/:flowId/versions/:version";
|
|
432
|
+
declare const workspaceFlowsPath: (workspaceId: string) => string;
|
|
433
|
+
declare const flowValidatePath: (workspaceId: string) => string;
|
|
434
|
+
declare const flowPath: (workspaceId: string, flowId: string) => string;
|
|
435
|
+
declare const flowEnablePath: (workspaceId: string, flowId: string) => string;
|
|
436
|
+
declare const flowDisablePath: (workspaceId: string, flowId: string) => string;
|
|
437
|
+
declare const flowDraftPath: (workspaceId: string, flowId: string) => string;
|
|
438
|
+
declare const flowVersionsPath: (workspaceId: string, flowId: string) => string;
|
|
439
|
+
declare const flowVersionPath: (workspaceId: string, flowId: string, version: number) => string;
|
|
440
|
+
type FlowStatus = "draft" | "active" | "disabled";
|
|
441
|
+
type FlowRecordData = {
|
|
442
|
+
id: string;
|
|
443
|
+
workspaceId: string;
|
|
444
|
+
name: string;
|
|
445
|
+
status: FlowStatus;
|
|
446
|
+
description: string | null;
|
|
447
|
+
tags: string[];
|
|
448
|
+
createdAt: string;
|
|
449
|
+
updatedAt: string;
|
|
450
|
+
};
|
|
451
|
+
type FlowListItemData = FlowRecordData & {
|
|
452
|
+
latestVersion: number | null;
|
|
453
|
+
versionCount: number;
|
|
454
|
+
lastPublishedAt: string | null;
|
|
455
|
+
hasUnpublishedChanges: boolean;
|
|
456
|
+
};
|
|
457
|
+
type FlowListData = {
|
|
458
|
+
flows: FlowListItemData[];
|
|
459
|
+
};
|
|
460
|
+
type FlowBadgeData = {
|
|
461
|
+
flow: FlowRecordData;
|
|
462
|
+
};
|
|
463
|
+
type FlowMetaUpdate = {
|
|
464
|
+
name?: string;
|
|
465
|
+
description?: string | null;
|
|
466
|
+
tags?: string[];
|
|
467
|
+
};
|
|
468
|
+
type FlowDraftRecordData<TIr = unknown> = {
|
|
469
|
+
flowId: string;
|
|
470
|
+
workspaceId: string;
|
|
471
|
+
irSchemaVersion: string;
|
|
472
|
+
ir: TIr;
|
|
473
|
+
createdAt: string;
|
|
474
|
+
updatedAt: string;
|
|
475
|
+
};
|
|
476
|
+
type FlowWithDraftData<TIr = unknown> = {
|
|
477
|
+
flow: FlowRecordData;
|
|
478
|
+
draft: FlowDraftRecordData<TIr>;
|
|
479
|
+
};
|
|
480
|
+
type FlowValidationIssueData = {
|
|
481
|
+
code: string;
|
|
482
|
+
message: string;
|
|
483
|
+
path: string;
|
|
484
|
+
};
|
|
485
|
+
type FlowValidateData = {
|
|
486
|
+
valid: boolean;
|
|
487
|
+
issues: FlowValidationIssueData[];
|
|
488
|
+
};
|
|
489
|
+
type DeletedFlowSummaryData = {
|
|
490
|
+
id: string;
|
|
491
|
+
workspaceId: string;
|
|
492
|
+
name: string;
|
|
493
|
+
status: FlowStatus;
|
|
494
|
+
deletedAt: string;
|
|
495
|
+
};
|
|
496
|
+
type FlowDeleteData = {
|
|
497
|
+
flow: DeletedFlowSummaryData;
|
|
498
|
+
};
|
|
499
|
+
type PublicResolvedToolBindingData = {
|
|
500
|
+
ref: string;
|
|
501
|
+
kind: "tool";
|
|
502
|
+
installationId: string;
|
|
503
|
+
packageName: string;
|
|
504
|
+
packageVersion: string;
|
|
505
|
+
sourceToolId: string;
|
|
506
|
+
descriptorHash: string;
|
|
507
|
+
};
|
|
508
|
+
type PublicResolvedTriggerBindingData = {
|
|
509
|
+
ref: string;
|
|
510
|
+
kind: "trigger";
|
|
511
|
+
installationId: string;
|
|
512
|
+
packageName: string;
|
|
513
|
+
packageVersion: string;
|
|
514
|
+
sourceTriggerId: string;
|
|
515
|
+
descriptorHash: string;
|
|
516
|
+
};
|
|
517
|
+
type PublicResolvedBindingData = PublicResolvedToolBindingData | PublicResolvedTriggerBindingData;
|
|
518
|
+
type CompiledFlowVersionSummaryData = {
|
|
519
|
+
id: string;
|
|
520
|
+
flowId: string;
|
|
521
|
+
workspaceId: string;
|
|
522
|
+
version: number;
|
|
523
|
+
irSchemaVersion: string;
|
|
524
|
+
interpreterContractVersion: string;
|
|
525
|
+
compiledArtifactId: string;
|
|
526
|
+
createdAt: string;
|
|
527
|
+
};
|
|
528
|
+
type PublicCompiledFlowVersionData<TIr = unknown> = CompiledFlowVersionSummaryData & {
|
|
529
|
+
ir: TIr;
|
|
530
|
+
resolvedBindings: PublicResolvedBindingData[];
|
|
531
|
+
};
|
|
532
|
+
type FlowPublishData = {
|
|
533
|
+
flowVersion: CompiledFlowVersionSummaryData;
|
|
534
|
+
resolvedBindings: PublicResolvedBindingData[];
|
|
535
|
+
};
|
|
536
|
+
type FlowVersionListData = {
|
|
537
|
+
versions: CompiledFlowVersionSummaryData[];
|
|
538
|
+
};
|
|
539
|
+
type FlowVersionGetData<TIr = unknown> = {
|
|
540
|
+
flowVersion: PublicCompiledFlowVersionData<TIr>;
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
declare const AGENT_ROUTE_PREFIX = "/workspaces/:workspaceId/agent";
|
|
544
|
+
declare const AGENT_CHAT_ROUTE_SUBPATH = "/chat";
|
|
545
|
+
declare const AGENT_FLOW_CONTEXT_ROUTE_SUBPATH = "/flow-context";
|
|
546
|
+
declare const agentChatPath: (workspaceId: string) => string;
|
|
547
|
+
type AgentCapabilityKind = "flow_authoring";
|
|
548
|
+
declare const AGENT_CAPABILITY_FLOW_AUTHORING: AgentCapabilityKind;
|
|
549
|
+
type FlowAuthoringWorkingDraftCandidate = {
|
|
550
|
+
flowId?: string | null;
|
|
551
|
+
ir: unknown;
|
|
552
|
+
};
|
|
553
|
+
type AgentTaskSurface = {
|
|
554
|
+
kind: "flow_authoring";
|
|
555
|
+
workingDraft: FlowAuthoringWorkingDraftCandidate;
|
|
556
|
+
};
|
|
557
|
+
type AgentChatRequestBody = {
|
|
558
|
+
messages: unknown[];
|
|
559
|
+
surface: AgentTaskSurface;
|
|
560
|
+
};
|
|
561
|
+
declare const FLOW_AUTHORING_TOOL_NAMES: readonly ["getFlowContext", "getWorkingFlowIr", "setFlowMeta", "addNode", "updateNode", "removeNode", "setTrigger", "removeTrigger", "setOutputs", "setComposition", "validateFlow", "saveFlowDraft", "requestConnect"];
|
|
562
|
+
type FlowAuthoringToolName = (typeof FLOW_AUTHORING_TOOL_NAMES)[number];
|
|
563
|
+
declare const FLOW_AUTHORING_EDIT_TOOL_NAMES: readonly ["setFlowMeta", "addNode", "updateNode", "removeNode", "setTrigger", "removeTrigger", "setOutputs", "setComposition"];
|
|
564
|
+
type FlowAuthoringEditToolName = (typeof FLOW_AUTHORING_EDIT_TOOL_NAMES)[number];
|
|
565
|
+
type FlowAuthoringToolExecution = "server" | "client";
|
|
566
|
+
type FlowAuthoringToolInputSchema = {
|
|
567
|
+
readonly type: "object";
|
|
568
|
+
readonly properties?: Readonly<Record<string, unknown>>;
|
|
569
|
+
readonly required?: readonly string[];
|
|
570
|
+
readonly additionalProperties?: boolean;
|
|
571
|
+
};
|
|
572
|
+
type FlowAuthoringToolDescriptor = {
|
|
573
|
+
readonly name: FlowAuthoringToolName;
|
|
574
|
+
readonly description: string;
|
|
575
|
+
readonly inputSchema: FlowAuthoringToolInputSchema;
|
|
576
|
+
readonly execution: FlowAuthoringToolExecution;
|
|
577
|
+
readonly needsApproval?: boolean;
|
|
578
|
+
};
|
|
579
|
+
type GetFlowContextInput = Record<string, never>;
|
|
580
|
+
type GetWorkingFlowIrInput = Record<string, never>;
|
|
581
|
+
type SetFlowMetaInput = {
|
|
582
|
+
flow?: string;
|
|
583
|
+
inputSchema?: JsonObject;
|
|
584
|
+
};
|
|
585
|
+
type AddNodeInput = {
|
|
586
|
+
node: FlowNode;
|
|
587
|
+
};
|
|
588
|
+
type UpdateNodeInput = {
|
|
589
|
+
id: string;
|
|
590
|
+
patch: Partial<FlowNode>;
|
|
591
|
+
};
|
|
592
|
+
type RemoveNodeInput = {
|
|
593
|
+
id: string;
|
|
594
|
+
};
|
|
595
|
+
type SetTriggerInput = {
|
|
596
|
+
trigger: TriggerBinding;
|
|
597
|
+
};
|
|
598
|
+
type RemoveTriggerInput = {
|
|
599
|
+
id: string;
|
|
600
|
+
};
|
|
601
|
+
type SetOutputsInput = {
|
|
602
|
+
outputs: Mapping;
|
|
603
|
+
};
|
|
604
|
+
type SetCompositionInput = {
|
|
605
|
+
composition: FlowCompositionSpec;
|
|
606
|
+
};
|
|
607
|
+
type ValidateFlowToolInput = Record<string, never>;
|
|
608
|
+
type SaveFlowDraftInput = {
|
|
609
|
+
flow?: string;
|
|
610
|
+
};
|
|
611
|
+
type RequestConnectInput = {
|
|
612
|
+
installationId: string;
|
|
613
|
+
connectionName?: string;
|
|
614
|
+
};
|
|
615
|
+
type WorkingIrSummary = {
|
|
616
|
+
flow: string;
|
|
617
|
+
triggers: string[];
|
|
618
|
+
nodes: string[];
|
|
619
|
+
};
|
|
620
|
+
type ValidateToolOutput = {
|
|
621
|
+
valid: boolean;
|
|
622
|
+
issues: FlowValidationIssueData[];
|
|
623
|
+
};
|
|
624
|
+
type SaveToolOutput = {
|
|
625
|
+
flowId: string;
|
|
626
|
+
};
|
|
627
|
+
type RequestConnectOutput = {
|
|
628
|
+
status: "connected";
|
|
629
|
+
connectionRef: string;
|
|
630
|
+
} | {
|
|
631
|
+
status: "cancelled";
|
|
632
|
+
} | {
|
|
633
|
+
status: "failed";
|
|
634
|
+
};
|
|
635
|
+
type GetWorkingFlowIrOutput = {
|
|
636
|
+
ir: unknown;
|
|
637
|
+
};
|
|
638
|
+
type FlowToolError = {
|
|
639
|
+
errorKind: string;
|
|
640
|
+
issues?: FlowValidationIssueData[];
|
|
641
|
+
};
|
|
642
|
+
declare function formatFlowToolError(error: FlowToolError): string;
|
|
643
|
+
declare const FLOW_AUTHORING_TOOL_DESCRIPTORS: readonly FlowAuthoringToolDescriptor[];
|
|
644
|
+
declare function findFlowAuthoringToolDescriptor(name: string): FlowAuthoringToolDescriptor | undefined;
|
|
645
|
+
declare const FLOW_DRAFT_APPROVAL_DATA_PART_TYPE = "data-flowDraftApproval";
|
|
646
|
+
declare const FLOW_DRAFT_APPROVAL_KIND = "save_flow_draft";
|
|
647
|
+
type FlowDraftSaveSummary = {
|
|
648
|
+
isPlaceholder: boolean;
|
|
649
|
+
titlePreview: string | null;
|
|
650
|
+
hasDynamicTitle: boolean;
|
|
651
|
+
hasReport: boolean;
|
|
652
|
+
};
|
|
653
|
+
type FlowDraftApprovalProjection = {
|
|
654
|
+
approvalId: string;
|
|
655
|
+
kind: typeof FLOW_DRAFT_APPROVAL_KIND;
|
|
656
|
+
candidateDigest: string;
|
|
657
|
+
summary: FlowDraftSaveSummary;
|
|
658
|
+
};
|
|
659
|
+
declare const AGENT_RUNTIME_UNCONFIGURED_ERROR_CODE = "AGENT_RUNTIME_UNCONFIGURED";
|
|
660
|
+
declare const AGENT_RUNTIME_FAILED_ERROR_CODE = "AGENT_RUNTIME_FAILED";
|
|
661
|
+
declare const AGENT_APPROVAL_NOT_FOUND_ERROR_CODE = "AGENT_APPROVAL_NOT_FOUND";
|
|
662
|
+
declare const AGENT_APPROVAL_EXPIRED_ERROR_CODE = "AGENT_APPROVAL_EXPIRED";
|
|
663
|
+
|
|
664
|
+
declare const WORKSPACE_RUNS_ROUTE_PREFIX = "/workspaces/:workspaceId/runs";
|
|
665
|
+
declare const WORKSPACE_FLOW_RUNS_ROUTE_PREFIX = "/workspaces/:workspaceId/flows/:flowId/runs";
|
|
666
|
+
declare const RUN_ITEM_ROUTE_SUBPATH = "/:runId";
|
|
667
|
+
declare const RUN_CANCEL_ROUTE_SUBPATH = "/:runId/cancel";
|
|
668
|
+
declare const RUN_EVENTS_ROUTE_SUBPATH = "/:runId/events";
|
|
669
|
+
declare const workspaceRunsPath: (workspaceId: string) => string;
|
|
670
|
+
declare const runPath: (workspaceId: string, runId: string) => string;
|
|
671
|
+
declare const runCancelPath: (workspaceId: string, runId: string) => string;
|
|
672
|
+
declare const runEventsPath: (workspaceId: string, runId: string) => string;
|
|
673
|
+
declare const flowRunsPath: (workspaceId: string, flowId: string) => string;
|
|
674
|
+
declare const FLOW_RUN_STATUSES: readonly ["queued", "running", "succeeded", "failed", "interrupted", "cancelled"];
|
|
675
|
+
type FlowRunStatus = (typeof FLOW_RUN_STATUSES)[number];
|
|
676
|
+
declare const STEP_RUN_STATUSES: readonly ["succeeded", "skipped", "timed_out", "failed"];
|
|
677
|
+
type StepRunStatus = (typeof STEP_RUN_STATUSES)[number];
|
|
678
|
+
type TruncatedPlaceholder = {
|
|
679
|
+
__truncated: true;
|
|
680
|
+
byteSize: number;
|
|
681
|
+
};
|
|
682
|
+
type Bounded<T> = T | TruncatedPlaceholder;
|
|
683
|
+
type FlowRunSummaryData = {
|
|
684
|
+
id: string;
|
|
685
|
+
workspaceId: string;
|
|
686
|
+
flowId: string;
|
|
687
|
+
flowVersionId: string;
|
|
688
|
+
version: number;
|
|
689
|
+
status: FlowRunStatus;
|
|
690
|
+
createdAt: string;
|
|
691
|
+
updatedAt: string;
|
|
692
|
+
startedAt: string | null;
|
|
693
|
+
finishedAt: string | null;
|
|
694
|
+
};
|
|
695
|
+
type StepRunSummaryData = {
|
|
696
|
+
id: string;
|
|
697
|
+
flowRunId: string;
|
|
698
|
+
nodeId: string;
|
|
699
|
+
status: StepRunStatus;
|
|
700
|
+
attempt: number;
|
|
701
|
+
durationMs: number | null;
|
|
702
|
+
errorCode: string | null;
|
|
703
|
+
createdAt: string;
|
|
704
|
+
};
|
|
705
|
+
type FlowRunTerminalErrorData = {
|
|
706
|
+
code: string;
|
|
707
|
+
message: string;
|
|
708
|
+
};
|
|
709
|
+
type FlowRunListData = {
|
|
710
|
+
runs: FlowRunSummaryData[];
|
|
711
|
+
nextCursor: string | null;
|
|
712
|
+
};
|
|
713
|
+
type FlowRunDetailData = {
|
|
714
|
+
run: FlowRunSummaryData & {
|
|
715
|
+
output: Bounded<unknown> | null;
|
|
716
|
+
error: FlowRunTerminalErrorData | null;
|
|
717
|
+
};
|
|
718
|
+
steps: Array<StepRunSummaryData & {
|
|
719
|
+
outputSummary: Bounded<unknown> | null;
|
|
720
|
+
}>;
|
|
721
|
+
};
|
|
722
|
+
type FlowRunTriggerData = {
|
|
723
|
+
run: FlowRunSummaryData;
|
|
724
|
+
};
|
|
725
|
+
type FlowRunCancelData = {
|
|
726
|
+
run: FlowRunSummaryData;
|
|
727
|
+
};
|
|
728
|
+
type DeliverFlowRunEventData = {
|
|
729
|
+
accepted: true;
|
|
730
|
+
duplicate: boolean;
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
declare const WORKSPACE_INBOX_ITEMS_ROUTE_PREFIX = "/workspaces/:workspaceId/inbox/items";
|
|
734
|
+
declare const WORKSPACE_INBOX_ENTRIES_ROUTE_PREFIX = "/workspaces/:workspaceId/inbox/entries";
|
|
735
|
+
declare const INBOX_ITEM_ROUTE_SUBPATH = "/:itemId";
|
|
736
|
+
declare const INBOX_ENTRY_ROUTE_SUBPATH = "/:entryId";
|
|
737
|
+
declare const INBOX_ENTRY_HUMAN_INPUT_SUBMIT_ROUTE_SUBPATH = "/:entryId/human-input/submit";
|
|
738
|
+
declare const workspaceInboxItemsPath: (workspaceId: string) => string;
|
|
739
|
+
declare const inboxItemPath: (workspaceId: string, itemId: string) => string;
|
|
740
|
+
declare const workspaceInboxEntriesPath: (workspaceId: string) => string;
|
|
741
|
+
declare const inboxEntryPath: (workspaceId: string, entryId: string) => string;
|
|
742
|
+
declare const inboxEntryHumanInputSubmitPath: (workspaceId: string, entryId: string) => string;
|
|
743
|
+
type InboxEntryType = "result" | "human_input";
|
|
744
|
+
type InboxEntryStatus = "pending" | "submitted" | "expired" | "cancelled" | "succeeded" | "failed";
|
|
745
|
+
type InboxLinksData = {
|
|
746
|
+
flow: string;
|
|
747
|
+
run: string;
|
|
748
|
+
};
|
|
749
|
+
type InboxItemListEntryData = {
|
|
750
|
+
id: string;
|
|
751
|
+
workspaceId: string;
|
|
752
|
+
flowId: string;
|
|
753
|
+
flowVersionId: string;
|
|
754
|
+
runId: string;
|
|
755
|
+
title: string;
|
|
756
|
+
detailPreview: string;
|
|
757
|
+
hasReport: boolean;
|
|
758
|
+
createdAt: string;
|
|
759
|
+
links: InboxLinksData;
|
|
760
|
+
};
|
|
761
|
+
type InboxItemListData = {
|
|
762
|
+
items: InboxItemListEntryData[];
|
|
763
|
+
nextCursor: string | null;
|
|
764
|
+
};
|
|
765
|
+
type InboxItemDetailEntryData = {
|
|
766
|
+
id: string;
|
|
767
|
+
workspaceId: string;
|
|
768
|
+
flowId: string;
|
|
769
|
+
flowVersionId: string;
|
|
770
|
+
runId: string;
|
|
771
|
+
title: string;
|
|
772
|
+
detail: {
|
|
773
|
+
format: "markdown";
|
|
774
|
+
body: string;
|
|
775
|
+
data?: unknown;
|
|
776
|
+
};
|
|
777
|
+
createdAt: string;
|
|
778
|
+
links: InboxLinksData;
|
|
779
|
+
};
|
|
780
|
+
type InboxReportData = {
|
|
781
|
+
id: string;
|
|
782
|
+
origin: "flow_node";
|
|
783
|
+
title: string | null;
|
|
784
|
+
format: "markdown";
|
|
785
|
+
body: string;
|
|
786
|
+
data?: unknown;
|
|
787
|
+
createdAt: string;
|
|
788
|
+
};
|
|
789
|
+
type InboxItemDetailData = {
|
|
790
|
+
item: InboxItemDetailEntryData;
|
|
791
|
+
report: InboxReportData | null;
|
|
792
|
+
};
|
|
793
|
+
type InboxEntryListEntryData = {
|
|
794
|
+
id: string;
|
|
795
|
+
entryType: InboxEntryType;
|
|
796
|
+
status: InboxEntryStatus;
|
|
797
|
+
title: string;
|
|
798
|
+
summary: string | null;
|
|
799
|
+
flowId: string;
|
|
800
|
+
flowVersionId: string;
|
|
801
|
+
runId: string;
|
|
802
|
+
nodeId: string | null;
|
|
803
|
+
activityAt: string;
|
|
804
|
+
createdAt: string;
|
|
805
|
+
links: InboxLinksData;
|
|
806
|
+
};
|
|
807
|
+
type InboxEntryListData = {
|
|
808
|
+
entries: InboxEntryListEntryData[];
|
|
809
|
+
nextCursor: string | null;
|
|
810
|
+
};
|
|
811
|
+
type InboxHumanInputEntryData = {
|
|
812
|
+
requestId: string;
|
|
813
|
+
nodeId: string;
|
|
814
|
+
inputKind: "choice" | "text" | "form";
|
|
815
|
+
prompt: unknown;
|
|
816
|
+
input: unknown;
|
|
817
|
+
};
|
|
818
|
+
type InboxEntryDetailData = {
|
|
819
|
+
entry: InboxEntryListEntryData;
|
|
820
|
+
result: InboxItemDetailData | null;
|
|
821
|
+
humanInput: InboxHumanInputEntryData | null;
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
declare const HUMAN_INPUT_TOKENS_ROUTE_PREFIX = "/human-input/tokens";
|
|
825
|
+
declare const HUMAN_INPUT_TOKEN_ROUTE_SUBPATH = "/:token";
|
|
826
|
+
declare const HUMAN_INPUT_TOKEN_SUBMIT_ROUTE_SUBPATH = "/:token/submit";
|
|
827
|
+
declare const humanInputTokenPath: (token: string) => string;
|
|
828
|
+
declare const humanInputTokenSubmitPath: (token: string) => string;
|
|
829
|
+
type HumanInputSubmitPayload = {
|
|
830
|
+
choiceId: string;
|
|
831
|
+
comment?: string;
|
|
832
|
+
} | {
|
|
833
|
+
text: string;
|
|
834
|
+
} | {
|
|
835
|
+
values: Record<string, unknown>;
|
|
836
|
+
};
|
|
837
|
+
type HumanInputPublicOutputData = {
|
|
838
|
+
status: "submitted";
|
|
839
|
+
response: unknown;
|
|
840
|
+
submissionSource: string;
|
|
841
|
+
submittedAt: string;
|
|
842
|
+
} | {
|
|
843
|
+
status: "expired";
|
|
844
|
+
expiredAt: string;
|
|
845
|
+
};
|
|
846
|
+
type HumanInputTokenViewData = {
|
|
847
|
+
requestStatus: string;
|
|
848
|
+
tokenStatus: string;
|
|
849
|
+
prompt: unknown;
|
|
850
|
+
input: unknown;
|
|
851
|
+
boundChoiceId: string | null;
|
|
852
|
+
expiresAt: string;
|
|
853
|
+
output: HumanInputPublicOutputData | null;
|
|
854
|
+
};
|
|
855
|
+
type HumanInputTokenSubmitData = {
|
|
856
|
+
requestStatus: string;
|
|
857
|
+
output: HumanInputPublicOutputData | null;
|
|
858
|
+
};
|
|
859
|
+
type HumanInputRequestViewData = {
|
|
860
|
+
id: string;
|
|
861
|
+
workspaceId: string;
|
|
862
|
+
flowRunId: string;
|
|
863
|
+
nodeId: string;
|
|
864
|
+
status: string;
|
|
865
|
+
inputKind: string;
|
|
866
|
+
timeout: string;
|
|
867
|
+
expiresAt: string;
|
|
868
|
+
createdAt: string;
|
|
869
|
+
updatedAt: string;
|
|
870
|
+
output: unknown;
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
declare const TRIGGER_INSTANCES_ROUTE_SUBPATH = "/:flowId/trigger-instances";
|
|
874
|
+
declare const TRIGGER_SIMULATE_ROUTE_SUBPATH = "/:flowId/triggers/:triggerBindingId/simulate";
|
|
875
|
+
declare const triggerInstancesPath: (workspaceId: string, flowId: string) => string;
|
|
876
|
+
declare const triggerSimulatePath: (workspaceId: string, flowId: string, triggerBindingId: string) => string;
|
|
877
|
+
type TriggerInstanceStatus = "provisioning" | "active" | "disabling" | "error" | "disabled";
|
|
878
|
+
type TriggerInstanceLastErrorData = {
|
|
879
|
+
code: string;
|
|
880
|
+
message: string;
|
|
881
|
+
retryable: boolean;
|
|
882
|
+
};
|
|
883
|
+
type TriggerInstanceDiagnosticData = {
|
|
884
|
+
triggerBindingId: string;
|
|
885
|
+
triggerRef: string;
|
|
886
|
+
kind: "webhook" | "polling";
|
|
887
|
+
status: TriggerInstanceStatus;
|
|
888
|
+
lastError?: TriggerInstanceLastErrorData;
|
|
889
|
+
updatedAt: string;
|
|
890
|
+
};
|
|
891
|
+
type TriggerInstancesData = {
|
|
892
|
+
instances: TriggerInstanceDiagnosticData[];
|
|
893
|
+
};
|
|
894
|
+
type SimulateTriggerEventBody = {
|
|
895
|
+
eventId: string;
|
|
896
|
+
occurredAt?: string;
|
|
897
|
+
payload: Record<string, unknown>;
|
|
898
|
+
};
|
|
899
|
+
type SimulateTriggerBody = {
|
|
900
|
+
event: SimulateTriggerEventBody;
|
|
901
|
+
};
|
|
902
|
+
type SimulateTriggerData = {
|
|
903
|
+
source: "simulation";
|
|
904
|
+
flowRunId: string;
|
|
905
|
+
duplicate: boolean;
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
export { AGENT_APPROVAL_EXPIRED_ERROR_CODE, AGENT_APPROVAL_NOT_FOUND_ERROR_CODE, AGENT_CAPABILITY_FLOW_AUTHORING, AGENT_CHAT_ROUTE_SUBPATH, AGENT_FLOW_CONTEXT_ROUTE_SUBPATH, AGENT_ROUTE_PREFIX, AGENT_RUNTIME_FAILED_ERROR_CODE, AGENT_RUNTIME_UNCONFIGURED_ERROR_CODE, type AddNodeInput, type AgentCapabilityKind, type AgentChatRequestBody, type AgentTaskSurface, type Bounded, CATALOG_DEFAULT_PROVIDER_APP_CONFIG_ROUTE_SUBPATH, CATALOG_INTEGRATIONS_ROUTE_SUBPATH, CATALOG_INTEGRATION_DETAIL_ROUTE_SUBPATH, CATALOG_ROUTE_PREFIX, CATALOG_VERSIONS_ROUTE_SUBPATH, CONNECTIONS_ROUTE_SUBPATH, CONNECTION_DISCONNECT_ROUTE_SUBPATH, CONNECT_COMPLETE_ROUTE_SUBPATH, CONNECT_OPTIONS_ROUTE_SUBPATH, CONNECT_START_ROUTE_SUBPATH, CONNECT_SUBMIT_ROUTE_SUBPATH, CURRENT_USER_ROUTE_PATH, type CatalogDetailData, type CatalogDetailLatestData, type CatalogIntegrationSummaryData, type CatalogListData, type CatalogPublishData, type CatalogToolFunctionData, type CatalogTriggerFunctionData, type CatalogVersionSummaryData, type CompiledFlowVersionSummaryData, type ConnectCompleteResultData, type ConnectCompletedResultData, type ConnectDefaultUnavailableReason, type ConnectFieldDefData, type ConnectInputNextActionData, type ConnectInputTarget, type ConnectOptionsData, type ConnectRedirectNextActionData, type ConnectStartBody, type ConnectStartResultData, type ConnectSubmitBody, type ConnectSubmitResultData, type ConnectionAuthType, type ConnectionListData, type ConnectionSummaryData, type ControlPlaneToolData, type ControlPlaneToolDeliveryData, type ControlPlaneTriggerData, type CurrentUserData, type DefaultProviderAppConfigAdminData, type DefaultProviderAppConfigDisableData, type DefaultProviderAppConfigUpsertBody, type DefaultProviderAppConfigWriteData, type DeletedFlowSummaryData, type DeliverFlowRunEventData, type DisconnectResultData, FLOW_AUTHORING_EDIT_TOOL_NAMES, FLOW_AUTHORING_TOOL_DESCRIPTORS, FLOW_AUTHORING_TOOL_NAMES, FLOW_DISABLE_ROUTE_SUBPATH, FLOW_DRAFT_APPROVAL_DATA_PART_TYPE, FLOW_DRAFT_APPROVAL_KIND, FLOW_DRAFT_ROUTE_SUBPATH, FLOW_ENABLE_ROUTE_SUBPATH, FLOW_ITEM_ROUTE_SUBPATH, FLOW_RUN_STATUSES, FLOW_VALIDATE_ROUTE_SUBPATH, FLOW_VERSIONS_ROUTE_SUBPATH, FLOW_VERSION_ITEM_ROUTE_SUBPATH, type FlowAuthoringEditToolName, type FlowAuthoringToolDescriptor, type FlowAuthoringToolExecution, type FlowAuthoringToolInputSchema, type FlowAuthoringToolName, type FlowAuthoringWorkingDraftCandidate, type FlowBadgeData, FlowCompositionSpec, type FlowDeleteData, type FlowDraftApprovalProjection, type FlowDraftRecordData, type FlowDraftSaveSummary, type FlowListData, type FlowListItemData, type FlowMetaUpdate, FlowNode, type FlowPublishData, type FlowRecordData, type FlowRunCancelData, type FlowRunDetailData, type FlowRunListData, type FlowRunStatus, type FlowRunSummaryData, type FlowRunTerminalErrorData, type FlowRunTriggerData, type FlowStatus, type FlowToolError, type FlowValidateData, type FlowValidationIssueData, type FlowVersionGetData, type FlowVersionListData, type FlowWithDraftData, type GetFlowContextInput, type GetWorkingFlowIrInput, type GetWorkingFlowIrOutput, HUMAN_INPUT_TOKENS_ROUTE_PREFIX, HUMAN_INPUT_TOKEN_ROUTE_SUBPATH, HUMAN_INPUT_TOKEN_SUBMIT_ROUTE_SUBPATH, type HumanInputPublicOutputData, type HumanInputRequestViewData, type HumanInputSubmitPayload, type HumanInputTokenSubmitData, type HumanInputTokenViewData, INBOX_ENTRY_HUMAN_INPUT_SUBMIT_ROUTE_SUBPATH, INBOX_ENTRY_ROUTE_SUBPATH, INBOX_ITEM_ROUTE_SUBPATH, INTEGRATION_ITEM_ROUTE_SUBPATH, INTEGRATION_TOOLS_ROUTE_SUBPATH, type InboxEntryDetailData, type InboxEntryListData, type InboxEntryListEntryData, type InboxEntryStatus, type InboxEntryType, type InboxHumanInputEntryData, type InboxItemDetailData, type InboxItemDetailEntryData, type InboxItemListData, type InboxItemListEntryData, type InboxLinksData, type InboxReportData, type InstallationCatalogInfoData, type InstallationData, type InstallationSource, type InstallationToolsData, type IntegrationGetData, type IntegrationInstallBody, type IntegrationInstallData, type IntegrationListData, type IntegrationUninstallData, JsonObject, Mapping, PROVIDER_CALLBACK_REDIRECT_ROUTE_PATH, type ProviderAppConfigSource, type ProviderSetupData, type PublicCompiledFlowVersionData, type PublicResolvedBindingData, type PublicResolvedToolBindingData, type PublicResolvedTriggerBindingData, RUN_CANCEL_ROUTE_SUBPATH, RUN_EVENTS_ROUTE_SUBPATH, RUN_ITEM_ROUTE_SUBPATH, type RegistrationSummaryData, type RemoveNodeInput, type RemoveTriggerInput, type RequestConnectInput, type RequestConnectOutput, STEP_RUN_STATUSES, type SaveFlowDraftInput, type SaveToolOutput, type SetCompositionInput, type SetFlowMetaInput, type SetOutputsInput, type SetTriggerInput, type SimulateTriggerBody, type SimulateTriggerData, type SimulateTriggerEventBody, type StepRunStatus, type StepRunSummaryData, TRIGGER_INSTANCES_ROUTE_SUBPATH, TRIGGER_SIMULATE_ROUTE_SUBPATH, TriggerBinding, type TriggerInstanceDiagnosticData, type TriggerInstanceLastErrorData, type TriggerInstanceStatus, type TriggerInstancesData, type TruncatedPlaceholder, type UpdateNodeInput, type ValidateFlowToolInput, type ValidateToolOutput, WORKSPACES_ROUTE_PREFIX, WORKSPACE_ACCESS_ROUTE_SUBPATH, WORKSPACE_API_KEYS_ROUTE_SUBPATH, WORKSPACE_API_KEY_CANONICAL_SCOPES, WORKSPACE_API_KEY_FULL_ACCESS_SCOPE, WORKSPACE_API_KEY_ITEM_ROUTE_SUBPATH, WORKSPACE_CONNECTION_MOUNT_PREFIX, WORKSPACE_FLOWS_ROUTE_PREFIX, WORKSPACE_FLOW_RUNS_ROUTE_PREFIX, WORKSPACE_INBOX_ENTRIES_ROUTE_PREFIX, WORKSPACE_INBOX_ITEMS_ROUTE_PREFIX, WORKSPACE_INTEGRATIONS_ROUTE_PREFIX, WORKSPACE_RUNS_ROUTE_PREFIX, type WorkingIrSummary, type WorkspaceAccessData, type WorkspaceApiKeyCreateBody, type WorkspaceApiKeyCreateData, type WorkspaceApiKeyData, type WorkspaceApiKeyListData, type WorkspaceApiKeyRevokeData, type WorkspaceApiKeyScope, type WorkspaceApiKeyStatus, type WorkspaceData, type WorkspaceMembershipData, type WorkspaceMembershipRole, agentChatPath, catalogDefaultProviderAppConfigPath, catalogIntegrationPath, catalogIntegrationsPath, catalogVersionsPath, connectCompletePath, connectOptionsPath, connectStartPath, connectSubmitPath, connectionDisconnectPath, currentUserPath, findFlowAuthoringToolDescriptor, flowDisablePath, flowDraftPath, flowEnablePath, flowPath, flowRunsPath, flowValidatePath, flowVersionPath, flowVersionsPath, formatFlowToolError, humanInputTokenPath, humanInputTokenSubmitPath, inboxEntryHumanInputSubmitPath, inboxEntryPath, inboxItemPath, installationToolsPath, runCancelPath, runEventsPath, runPath, triggerInstancesPath, triggerSimulatePath, workspaceApiKeyPath, workspaceApiKeysPath, workspaceConnectionsPath, workspaceFlowsPath, workspaceInboxEntriesPath, workspaceInboxItemsPath, workspaceIntegrationPath, workspaceIntegrationsPath, workspacePath, workspaceRunsPath };
|