@powerhousedao/pieces-framework 6.2.3-dev.100
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/LICENSE +59 -0
- package/README.md +372 -0
- package/UPSTREAM.md +223 -0
- package/dist/action-C-O5Jgbl.d.ts +12883 -0
- package/dist/action-C-O5Jgbl.d.ts.map +1 -0
- package/dist/authentication-f4cep7Po.js +249 -0
- package/dist/authentication-f4cep7Po.js.map +1 -0
- package/dist/block-type.d.ts +25 -0
- package/dist/block-type.d.ts.map +1 -0
- package/dist/block-type.js +71 -0
- package/dist/block-type.js.map +1 -0
- package/dist/common.d.ts +289 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +852 -0
- package/dist/common.js.map +1 -0
- package/dist/host.d.ts +99 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +731 -0
- package/dist/host.js.map +1 -0
- package/dist/index-DZ0aWCvr.d.ts +5588 -0
- package/dist/index-DZ0aWCvr.d.ts.map +1 -0
- package/dist/index.d.ts +1438 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1896 -0
- package/dist/index.js.map +1 -0
- package/dist/input-BHkj_oP5.js +321 -0
- package/dist/input-BHkj_oP5.js.map +1 -0
- package/dist/markdown-property-DMfHjEiL.js +288 -0
- package/dist/markdown-property-DMfHjEiL.js.map +1 -0
- package/dist/workflow.d.ts +156 -0
- package/dist/workflow.d.ts.map +1 -0
- package/dist/workflow.js +451 -0
- package/dist/workflow.js.map +1 -0
- package/package.json +98 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1438 @@
|
|
|
1
|
+
import { A as WebhookRenewStrategy, C as LATEST_CONTEXT_VERSION, D as ITrigger, E as DEDUPE_KEY_PROPERTY, F as OutputSchemaField, I as LocalesEnum, L as PieceCategory, M as createTrigger$1, N as FieldFormat, O as Trigger, P as OutputSchema, S as ContextVersion, T as backwardCompatabilityContextUtils, _ as PropertyGroup, a as createAction$1, b as TriggerBase, c as AiMetadata, d as PieceBase, f as PieceMetadata, g as PiecePackageInformation, h as PieceMetadataSummary, i as IAction, j as WebhookResponse, k as WebhookRenewConfiguration, l as Audience, m as PieceMetadataModelSummary, n as ActionRunner, o as ActionBase, p as PieceMetadataModel, r as ErrorHandlingOptionsParam, s as ActionClassification, t as Action, u as I18nForPiece, v as PropertyGroupDisplay, w as MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION, x as isReadOnlyClassification, y as READ_ONLY_CLASSIFICATIONS } from "./action-C-O5Jgbl.js";
|
|
2
|
+
import { $ as ArrayProperty, $t as AppConnectionValue, A as TriggerHookContext, At as DropdownState, B as InputProperty, Bt as Cursor, C as StepContext, Ct as OAuth2Property, D as StoreScope, Dt as StaticDropdownProperty, E as Store, Et as StaticDropdownDisplay, F as InputPropertyMap, Ft as ApFile, G as ObjectProperty, Gt as ResumePayload, H as CustomProperty, Ht as apId, I as PiecePropValueSchema, It as ApStreamingFile, J as DynamicPropsValue, Jt as TriggerStrategy, K as DynamicProp, Kt as MarkdownVariant, L as PieceProperty, Lt as FileProperty, M as WaitForWaitpointHook, Mt as LongTextProperty, N as isPieceServerContextError, Nt as ShortTextProperty, O as TagsManager, Ot as StaticMultiSelectDropdownProperty, P as ExecutePropsResult, Pt as BasePropertySchema, Q as dateRangeUtils, Qt as AppConnectionType, R as PiecePropertyMap, Rt as PropertyType, S as SetScheduleRequest, St as OAuth2Discovery, T as StopHookParams, Tt as OAuth2Props, U as CustomPropertyCodeFunctionParams, Ut as EventPayload, V as Property$1, Vt as SeekPage, W as RichTextProperty, Wt as ParseEventResponse, X as DateRangeProperty, Xt as WebhookHandshakeConfiguration, Y as DateRangePreset, Z as DateRangeValue, Zt as WebhookHandshakeStrategy, _ as PropertyContext$1, _t as CheckboxProperty, a as ConnectionsManager, an as SecretTextConnectionValue, at as MultiSelectDropdownProperty, b as RunContext, bt as BasicAuthPropertyValue, c as CreateWaitpointResult, ct as PieceAuth, d as ListFlowsContextParams, dt as OIDCAuthProps, en as BasicAuthConnectionValue, et as ArraySubProps, f as OnStartContext, ft as OIDCProperty, g as PieceServerContextError, gt as MarkDownProperty, h as PauseHookParams, ht as CustomAuthRefresh, i as BaseContext, in as OAuth2GrantType, it as DropdownProperty, j as UploadedFile, jt as SecretTextProperty, k as TestOrRunHookContext, kt as DropdownOption, l as FilesService, lt as PieceAuthProperty, m as PauseHook, mt as CustomAuthProps, n as AppConnectionValueForAuthProperty, nn as NoAuthConnectionValue, nt as ColorProperty, o as CreateWaitpointHook, ot as DEFAULT_CONNECTION_DISPLAY_NAME, p as OutputContext, pt as CustomAuthProperty, q as DynamicProperties, qt as ExecutionType, r as AuthValidationServerContext, rn as OAuth2ConnectionValueWithApp, rt as JsonProperty, s as CreateWaitpointParams, st as ExtractPieceAuthPropertyTypeForMethods, t as ActionContext, tn as CustomAuthConnectionValue, tt as DateTimeProperty, u as FlowsContext, ut as getAuthPropertyForValue, v as RespondHook, vt as NumberProperty, w as StopHook, wt as OAuth2PropertyValue, x as ServerContext, xt as OAuth2AuthorizationMethod, y as RespondHookParams, yt as BasicAuthProperty, z as StaticPropsValue, zt as PopulatedFlowSummary } from "./index-DZ0aWCvr.js";
|
|
3
|
+
import * as z from "zod/mini";
|
|
4
|
+
import { IDriveClient, IDriveWriteClient, IReactorClient, IReactorWriteClient, JobInfo } from "@powerhousedao/reactor";
|
|
5
|
+
import { Action as Action$1 } from "@powerhousedao/shared/document-model";
|
|
6
|
+
//#region upstream/core-utils/lib/utils.d.ts
|
|
7
|
+
export declare function isString(str: unknown): str is string;
|
|
8
|
+
export declare function isNil<T>(value: T | null | undefined): value is null | undefined;
|
|
9
|
+
export declare function kebabCase(str: string): string;
|
|
10
|
+
export declare function isEmpty<T>(value: T | null | undefined): boolean;
|
|
11
|
+
export declare function startCase(str: string): string;
|
|
12
|
+
export declare function camelCase(str: string): string;
|
|
13
|
+
export declare function pickBy<T extends Record<string, unknown>>(object: T, predicate: (value: T[keyof T], key: keyof T) => boolean): Partial<T>;
|
|
14
|
+
export declare function chunk<T>(records: T[], size: number): T[][];
|
|
15
|
+
export declare function unique<T>(array: T[]): T[];
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region upstream/core-utils/lib/object-utils.d.ts
|
|
18
|
+
export declare const spreadIfDefined: <T>(key: string, value: T | undefined | null) => Record<string, T>;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region upstream/core-utils/lib/assertions.d.ts
|
|
21
|
+
export declare function assertNotNullOrUndefined<T>(value: T | null | undefined, fieldName: string): asserts value is T;
|
|
22
|
+
export declare const isNotUndefined: <T>(value: T | undefined) => value is T;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region upstream/core-utils/lib/try-catch.d.ts
|
|
25
|
+
type Success<T> = {
|
|
26
|
+
data: T;
|
|
27
|
+
error: null;
|
|
28
|
+
};
|
|
29
|
+
type Failure<E> = {
|
|
30
|
+
data: null;
|
|
31
|
+
error: E;
|
|
32
|
+
};
|
|
33
|
+
type Result<T, E = Error> = Success<T> | Failure<E>;
|
|
34
|
+
export declare function tryCatch<T, E = Error>(fn: () => Promise<T>): Promise<Result<T, E>>;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region upstream/core-utils/lib/permission.d.ts
|
|
37
|
+
export declare enum AIProviderName {
|
|
38
|
+
OPENAI = "openai",
|
|
39
|
+
OPENROUTER = "openrouter",
|
|
40
|
+
ANTHROPIC = "anthropic",
|
|
41
|
+
AZURE = "azure",
|
|
42
|
+
GOOGLE = "google",
|
|
43
|
+
ACTIVEPIECES = "activepieces",
|
|
44
|
+
CLOUDFLARE_GATEWAY = "cloudflare-gateway",
|
|
45
|
+
CUSTOM = "custom",
|
|
46
|
+
BEDROCK = "bedrock",
|
|
47
|
+
VERTEX = "vertex",
|
|
48
|
+
MISTRAL = "mistral",
|
|
49
|
+
XAI = "xai",
|
|
50
|
+
DEEPSEEK = "deepseek",
|
|
51
|
+
ZAI = "zai",
|
|
52
|
+
QWEN = "qwen",
|
|
53
|
+
MINIMAX = "minimax",
|
|
54
|
+
MOONSHOT = "moonshot"
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region upstream/core-utils/lib/ai-step.d.ts
|
|
58
|
+
export declare enum AiStepAction {
|
|
59
|
+
ASK_AI = "ASK_AI",
|
|
60
|
+
SUMMARIZE_TEXT = "SUMMARIZE_TEXT",
|
|
61
|
+
CLASSIFY_TEXT = "CLASSIFY_TEXT",
|
|
62
|
+
EXTRACT_STRUCTURED_DATA = "EXTRACT_STRUCTURED_DATA",
|
|
63
|
+
GENERATE_IMAGE = "GENERATE_IMAGE",
|
|
64
|
+
ROUTE = "ROUTE"
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region upstream/core-utils/lib/http-header-utils.d.ts
|
|
68
|
+
export declare function sanitizeHttpHeaders(headers: Record<string, string> | undefined): Record<string, string>;
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region upstream/core-piece-types/lib/agents.d.ts
|
|
71
|
+
export declare const TASK_COMPLETION_TOOL_NAME = "updateTaskStatus";
|
|
72
|
+
export declare enum AgentToolType {
|
|
73
|
+
PIECE = "PIECE",
|
|
74
|
+
FLOW = "FLOW",
|
|
75
|
+
MCP = "MCP",
|
|
76
|
+
KNOWLEDGE_BASE = "KNOWLEDGE_BASE"
|
|
77
|
+
}
|
|
78
|
+
declare enum FieldControlMode {
|
|
79
|
+
AGENT_DECIDE = "agent-decide",
|
|
80
|
+
CHOOSE_YOURSELF = "choose-yourself",
|
|
81
|
+
LEAVE_EMPTY = "leave-empty"
|
|
82
|
+
}
|
|
83
|
+
export declare enum KnowledgeBaseSourceType {
|
|
84
|
+
FILE = "FILE",
|
|
85
|
+
TABLE = "TABLE"
|
|
86
|
+
}
|
|
87
|
+
export declare enum McpProtocol {
|
|
88
|
+
SSE = "sse",
|
|
89
|
+
STREAMABLE_HTTP = "streamable-http",
|
|
90
|
+
SIMPLE_HTTP = "http"
|
|
91
|
+
}
|
|
92
|
+
export declare enum McpAuthType {
|
|
93
|
+
NONE = "none",
|
|
94
|
+
ACCESS_TOKEN = "access_token",
|
|
95
|
+
API_KEY = "api_key",
|
|
96
|
+
HEADERS = "headers"
|
|
97
|
+
}
|
|
98
|
+
export declare enum AgentOutputFieldType {
|
|
99
|
+
TEXT = "text",
|
|
100
|
+
NUMBER = "number",
|
|
101
|
+
BOOLEAN = "boolean"
|
|
102
|
+
}
|
|
103
|
+
export declare enum AgentTaskStatus {
|
|
104
|
+
COMPLETED = "COMPLETED",
|
|
105
|
+
FAILED = "FAILED",
|
|
106
|
+
IN_PROGRESS = "IN_PROGRESS"
|
|
107
|
+
}
|
|
108
|
+
export declare enum ContentBlockType {
|
|
109
|
+
MARKDOWN = "MARKDOWN",
|
|
110
|
+
TOOL_CALL = "TOOL_CALL"
|
|
111
|
+
}
|
|
112
|
+
export declare enum ToolCallStatus {
|
|
113
|
+
IN_PROGRESS = "in-progress",
|
|
114
|
+
COMPLETED = "completed"
|
|
115
|
+
}
|
|
116
|
+
export declare enum ExecutionToolStatus {
|
|
117
|
+
SUCCESS = "SUCCESS",
|
|
118
|
+
FAILED = "FAILED"
|
|
119
|
+
}
|
|
120
|
+
export declare enum ToolCallType {
|
|
121
|
+
PIECE = "PIECE",
|
|
122
|
+
FLOW = "FLOW",
|
|
123
|
+
MCP = "MCP",
|
|
124
|
+
KNOWLEDGE_BASE = "KNOWLEDGE_BASE",
|
|
125
|
+
UNKNOWN = "UNKNOWN"
|
|
126
|
+
}
|
|
127
|
+
export declare enum AgentPieceProps {
|
|
128
|
+
AGENT_ID = "agentId",
|
|
129
|
+
AGENT_TOOLS = "agentTools",
|
|
130
|
+
STRUCTURED_OUTPUT = "structuredOutput",
|
|
131
|
+
PROMPT = "prompt",
|
|
132
|
+
MAX_STEPS = "maxSteps",
|
|
133
|
+
AI_PROVIDER_MODEL = "aiProviderModel",
|
|
134
|
+
WEB_SEARCH = "webSearch",
|
|
135
|
+
WEB_SEARCH_OPTIONS = "webSearchOptions"
|
|
136
|
+
}
|
|
137
|
+
export declare const McpAuthConfig: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
138
|
+
type: z.ZodMiniLiteral<McpAuthType.NONE>;
|
|
139
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
140
|
+
type: z.ZodMiniLiteral<McpAuthType.ACCESS_TOKEN>;
|
|
141
|
+
accessToken: z.ZodMiniString<string>;
|
|
142
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
143
|
+
type: z.ZodMiniLiteral<McpAuthType.API_KEY>;
|
|
144
|
+
apiKey: z.ZodMiniString<string>;
|
|
145
|
+
apiKeyHeader: z.ZodMiniString<string>;
|
|
146
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
147
|
+
type: z.ZodMiniLiteral<McpAuthType.HEADERS>;
|
|
148
|
+
headers: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
149
|
+
}, z.core.$strip>], "type">;
|
|
150
|
+
export type McpAuthConfig = z.infer<typeof McpAuthConfig>;
|
|
151
|
+
export declare const AgentFlowTool: z.ZodMiniObject<{
|
|
152
|
+
type: z.ZodMiniLiteral<AgentToolType.FLOW>;
|
|
153
|
+
toolName: z.ZodMiniString<string>;
|
|
154
|
+
externalFlowId: z.ZodMiniString<string>;
|
|
155
|
+
flowDisplayName: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type AgentFlowTool = z.infer<typeof AgentFlowTool>;
|
|
158
|
+
export declare const AgentMcpTool: z.ZodMiniObject<{
|
|
159
|
+
type: z.ZodMiniLiteral<AgentToolType.MCP>;
|
|
160
|
+
toolName: z.ZodMiniString<string>;
|
|
161
|
+
serverUrl: z.ZodMiniURL;
|
|
162
|
+
protocol: z.ZodMiniEnum<typeof McpProtocol>;
|
|
163
|
+
auth: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
164
|
+
type: z.ZodMiniLiteral<McpAuthType.NONE>;
|
|
165
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
166
|
+
type: z.ZodMiniLiteral<McpAuthType.ACCESS_TOKEN>;
|
|
167
|
+
accessToken: z.ZodMiniString<string>;
|
|
168
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
169
|
+
type: z.ZodMiniLiteral<McpAuthType.API_KEY>;
|
|
170
|
+
apiKey: z.ZodMiniString<string>;
|
|
171
|
+
apiKeyHeader: z.ZodMiniString<string>;
|
|
172
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
173
|
+
type: z.ZodMiniLiteral<McpAuthType.HEADERS>;
|
|
174
|
+
headers: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
175
|
+
}, z.core.$strip>], "type">;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
export type AgentMcpTool = z.infer<typeof AgentMcpTool>;
|
|
178
|
+
export declare const AgentKnowledgeBaseTool: z.ZodMiniObject<{
|
|
179
|
+
type: z.ZodMiniLiteral<AgentToolType.KNOWLEDGE_BASE>;
|
|
180
|
+
toolName: z.ZodMiniString<string>;
|
|
181
|
+
sourceType: z.ZodMiniEnum<typeof KnowledgeBaseSourceType>;
|
|
182
|
+
sourceId: z.ZodMiniString<string>;
|
|
183
|
+
sourceName: z.ZodMiniString<string>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
export type AgentKnowledgeBaseTool = z.infer<typeof AgentKnowledgeBaseTool>;
|
|
186
|
+
export declare const AgentTool: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
187
|
+
type: z.ZodMiniLiteral<AgentToolType.PIECE>;
|
|
188
|
+
toolName: z.ZodMiniString<string>;
|
|
189
|
+
pieceMetadata: z.ZodMiniObject<{
|
|
190
|
+
pieceName: z.ZodMiniString<string>;
|
|
191
|
+
pieceVersion: z.ZodMiniString<string>;
|
|
192
|
+
actionName: z.ZodMiniString<string>;
|
|
193
|
+
predefinedInput: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
194
|
+
auth: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
195
|
+
fields: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
196
|
+
mode: z.ZodMiniEnum<typeof FieldControlMode>;
|
|
197
|
+
value: z.ZodMiniUnknown;
|
|
198
|
+
}, z.core.$strip>>;
|
|
199
|
+
}, z.core.$strip>>;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
202
|
+
type: z.ZodMiniLiteral<AgentToolType.FLOW>;
|
|
203
|
+
toolName: z.ZodMiniString<string>;
|
|
204
|
+
externalFlowId: z.ZodMiniString<string>;
|
|
205
|
+
flowDisplayName: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
206
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
207
|
+
type: z.ZodMiniLiteral<AgentToolType.MCP>;
|
|
208
|
+
toolName: z.ZodMiniString<string>;
|
|
209
|
+
serverUrl: z.ZodMiniURL;
|
|
210
|
+
protocol: z.ZodMiniEnum<typeof McpProtocol>;
|
|
211
|
+
auth: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
212
|
+
type: z.ZodMiniLiteral<McpAuthType.NONE>;
|
|
213
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
214
|
+
type: z.ZodMiniLiteral<McpAuthType.ACCESS_TOKEN>;
|
|
215
|
+
accessToken: z.ZodMiniString<string>;
|
|
216
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
217
|
+
type: z.ZodMiniLiteral<McpAuthType.API_KEY>;
|
|
218
|
+
apiKey: z.ZodMiniString<string>;
|
|
219
|
+
apiKeyHeader: z.ZodMiniString<string>;
|
|
220
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
221
|
+
type: z.ZodMiniLiteral<McpAuthType.HEADERS>;
|
|
222
|
+
headers: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
223
|
+
}, z.core.$strip>], "type">;
|
|
224
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
225
|
+
type: z.ZodMiniLiteral<AgentToolType.KNOWLEDGE_BASE>;
|
|
226
|
+
toolName: z.ZodMiniString<string>;
|
|
227
|
+
sourceType: z.ZodMiniEnum<typeof KnowledgeBaseSourceType>;
|
|
228
|
+
sourceId: z.ZodMiniString<string>;
|
|
229
|
+
sourceName: z.ZodMiniString<string>;
|
|
230
|
+
}, z.core.$strip>], "type">;
|
|
231
|
+
export type AgentTool = z.infer<typeof AgentTool>;
|
|
232
|
+
export declare const AgentOutputField: z.ZodMiniObject<{
|
|
233
|
+
displayName: z.ZodMiniString<string>;
|
|
234
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
235
|
+
type: z.ZodMiniEnum<typeof AgentOutputFieldType>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
export type AgentOutputField = z.infer<typeof AgentOutputField>;
|
|
238
|
+
export declare const MarkdownContentBlock: z.ZodMiniObject<{
|
|
239
|
+
type: z.ZodMiniLiteral<ContentBlockType.MARKDOWN>;
|
|
240
|
+
markdown: z.ZodMiniString<string>;
|
|
241
|
+
}, z.core.$strip>;
|
|
242
|
+
export type MarkdownContentBlock = z.infer<typeof MarkdownContentBlock>;
|
|
243
|
+
declare const toolCallBaseSchema: z.ZodMiniObject<{
|
|
244
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
245
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
246
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
247
|
+
toolName: z.ZodMiniString<string>;
|
|
248
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
249
|
+
toolCallId: z.ZodMiniString<string>;
|
|
250
|
+
startTime: z.ZodMiniString<string>;
|
|
251
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
export declare const ToolCallContentBlock: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
254
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
255
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
256
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
257
|
+
toolName: z.ZodMiniString<string>;
|
|
258
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
259
|
+
toolCallId: z.ZodMiniString<string>;
|
|
260
|
+
startTime: z.ZodMiniString<string>;
|
|
261
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
262
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.PIECE>;
|
|
263
|
+
pieceName: z.ZodMiniString<string>;
|
|
264
|
+
pieceVersion: z.ZodMiniString<string>;
|
|
265
|
+
actionName: z.ZodMiniString<string>;
|
|
266
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
267
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
268
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
269
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
270
|
+
toolName: z.ZodMiniString<string>;
|
|
271
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
272
|
+
toolCallId: z.ZodMiniString<string>;
|
|
273
|
+
startTime: z.ZodMiniString<string>;
|
|
274
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
275
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.FLOW>;
|
|
276
|
+
displayName: z.ZodMiniString<string>;
|
|
277
|
+
externalFlowId: z.ZodMiniString<string>;
|
|
278
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
279
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
280
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
281
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
282
|
+
toolName: z.ZodMiniString<string>;
|
|
283
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
284
|
+
toolCallId: z.ZodMiniString<string>;
|
|
285
|
+
startTime: z.ZodMiniString<string>;
|
|
286
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
287
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.MCP>;
|
|
288
|
+
displayName: z.ZodMiniString<string>;
|
|
289
|
+
serverUrl: z.ZodMiniString<string>;
|
|
290
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
291
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
292
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
293
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
294
|
+
toolName: z.ZodMiniString<string>;
|
|
295
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
296
|
+
toolCallId: z.ZodMiniString<string>;
|
|
297
|
+
startTime: z.ZodMiniString<string>;
|
|
298
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
299
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.KNOWLEDGE_BASE>;
|
|
300
|
+
displayName: z.ZodMiniString<string>;
|
|
301
|
+
sourceType: z.ZodMiniString<string>;
|
|
302
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
303
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
304
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
305
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
306
|
+
toolName: z.ZodMiniString<string>;
|
|
307
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
308
|
+
toolCallId: z.ZodMiniString<string>;
|
|
309
|
+
startTime: z.ZodMiniString<string>;
|
|
310
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
311
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.UNKNOWN>;
|
|
312
|
+
displayName: z.ZodMiniString<string>;
|
|
313
|
+
}, z.core.$strip>], "toolCallType">;
|
|
314
|
+
export type ToolCallContentBlock = z.infer<typeof ToolCallContentBlock>;
|
|
315
|
+
export declare const AgentStepBlock: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
316
|
+
type: z.ZodMiniLiteral<ContentBlockType.MARKDOWN>;
|
|
317
|
+
markdown: z.ZodMiniString<string>;
|
|
318
|
+
}, z.core.$strip>, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
319
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
320
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
321
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
322
|
+
toolName: z.ZodMiniString<string>;
|
|
323
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
324
|
+
toolCallId: z.ZodMiniString<string>;
|
|
325
|
+
startTime: z.ZodMiniString<string>;
|
|
326
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
327
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.PIECE>;
|
|
328
|
+
pieceName: z.ZodMiniString<string>;
|
|
329
|
+
pieceVersion: z.ZodMiniString<string>;
|
|
330
|
+
actionName: z.ZodMiniString<string>;
|
|
331
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
332
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
333
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
334
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
335
|
+
toolName: z.ZodMiniString<string>;
|
|
336
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
337
|
+
toolCallId: z.ZodMiniString<string>;
|
|
338
|
+
startTime: z.ZodMiniString<string>;
|
|
339
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
340
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.FLOW>;
|
|
341
|
+
displayName: z.ZodMiniString<string>;
|
|
342
|
+
externalFlowId: z.ZodMiniString<string>;
|
|
343
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
344
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
345
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
346
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
347
|
+
toolName: z.ZodMiniString<string>;
|
|
348
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
349
|
+
toolCallId: z.ZodMiniString<string>;
|
|
350
|
+
startTime: z.ZodMiniString<string>;
|
|
351
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
352
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.MCP>;
|
|
353
|
+
displayName: z.ZodMiniString<string>;
|
|
354
|
+
serverUrl: z.ZodMiniString<string>;
|
|
355
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
356
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
357
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
358
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
359
|
+
toolName: z.ZodMiniString<string>;
|
|
360
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
361
|
+
toolCallId: z.ZodMiniString<string>;
|
|
362
|
+
startTime: z.ZodMiniString<string>;
|
|
363
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
364
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.KNOWLEDGE_BASE>;
|
|
365
|
+
displayName: z.ZodMiniString<string>;
|
|
366
|
+
sourceType: z.ZodMiniString<string>;
|
|
367
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
368
|
+
type: z.ZodMiniLiteral<ContentBlockType.TOOL_CALL>;
|
|
369
|
+
input: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>>;
|
|
370
|
+
output: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
371
|
+
toolName: z.ZodMiniString<string>;
|
|
372
|
+
status: z.ZodMiniEnum<typeof ToolCallStatus>;
|
|
373
|
+
toolCallId: z.ZodMiniString<string>;
|
|
374
|
+
startTime: z.ZodMiniString<string>;
|
|
375
|
+
endTime: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
376
|
+
toolCallType: z.ZodMiniLiteral<ToolCallType.UNKNOWN>;
|
|
377
|
+
displayName: z.ZodMiniString<string>;
|
|
378
|
+
}, z.core.$strip>], "toolCallType">]>;
|
|
379
|
+
export type AgentStepBlock = z.infer<typeof AgentStepBlock>;
|
|
380
|
+
export declare function buildAuthHeaders(authConfig: McpAuthConfig): Record<string, string>;
|
|
381
|
+
declare function createToolName(name: string): string;
|
|
382
|
+
declare function toValidToolName(name: string): string;
|
|
383
|
+
declare function suggestToolName(sourceName: string): string;
|
|
384
|
+
declare function isProviderSafeIdentifier(name: string): boolean;
|
|
385
|
+
declare function toProviderSafeIdentifier({ name, fallback }: {
|
|
386
|
+
name: string;
|
|
387
|
+
fallback: string;
|
|
388
|
+
}): string;
|
|
389
|
+
declare function createPieceToolName(pieceName: string, actionName: string): string;
|
|
390
|
+
export declare const mcpToolNameUtils: {
|
|
391
|
+
createToolName: typeof createToolName;
|
|
392
|
+
createPieceToolName: typeof createPieceToolName;
|
|
393
|
+
toValidToolName: typeof toValidToolName;
|
|
394
|
+
suggestToolName: typeof suggestToolName;
|
|
395
|
+
isProviderSafeIdentifier: typeof isProviderSafeIdentifier;
|
|
396
|
+
toProviderSafeIdentifier: typeof toProviderSafeIdentifier;
|
|
397
|
+
};
|
|
398
|
+
type ToolCallBase = z.infer<typeof toolCallBaseSchema>;
|
|
399
|
+
type AgentProviderModel = {
|
|
400
|
+
provider: AIProviderName;
|
|
401
|
+
model: string;
|
|
402
|
+
configId?: string;
|
|
403
|
+
} | {
|
|
404
|
+
modelTierId: string;
|
|
405
|
+
};
|
|
406
|
+
type AgentResult = {
|
|
407
|
+
prompt: string;
|
|
408
|
+
steps: AgentStepBlock[];
|
|
409
|
+
status: AgentTaskStatus;
|
|
410
|
+
structuredOutput?: unknown;
|
|
411
|
+
failure?: string;
|
|
412
|
+
};
|
|
413
|
+
export declare const AGENT_STEP_TIMEOUT_MS: number;
|
|
414
|
+
export declare const AGENT_STEP_TEST_TIMEOUT_MS: number;
|
|
415
|
+
//#endregion
|
|
416
|
+
//#region upstream/core-piece-types/lib/ai-providers.d.ts
|
|
417
|
+
declare enum AIProviderModelType {
|
|
418
|
+
IMAGE = "image",
|
|
419
|
+
TEXT = "text"
|
|
420
|
+
}
|
|
421
|
+
export declare const BaseAIProviderAuthConfig: z.ZodMiniObject<{
|
|
422
|
+
apiKey: z.ZodMiniString<string>;
|
|
423
|
+
}, z.core.$strip>;
|
|
424
|
+
export type BaseAIProviderAuthConfig = z.infer<typeof BaseAIProviderAuthConfig>;
|
|
425
|
+
export declare const VertexProviderAuthConfig: z.ZodMiniObject<{
|
|
426
|
+
serviceAccountJson: z.ZodMiniString<string>;
|
|
427
|
+
}, z.core.$strip>;
|
|
428
|
+
export type VertexProviderAuthConfig = z.infer<typeof VertexProviderAuthConfig>;
|
|
429
|
+
export declare const BedrockProviderAuthConfig: z.ZodMiniObject<{
|
|
430
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
431
|
+
secretAccessKey: z.ZodMiniString<string>;
|
|
432
|
+
sessionToken: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
export type BedrockProviderAuthConfig = z.infer<typeof BedrockProviderAuthConfig>;
|
|
435
|
+
export declare const OpenAICompatibleProviderConfig: z.ZodMiniObject<{
|
|
436
|
+
apiKeyHeader: z.ZodMiniString<string>;
|
|
437
|
+
baseUrl: z.ZodMiniString<string>;
|
|
438
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
439
|
+
modelId: z.ZodMiniString<string>;
|
|
440
|
+
modelName: z.ZodMiniString<string>;
|
|
441
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
442
|
+
}, z.core.$strip>>;
|
|
443
|
+
defaultHeaders: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
444
|
+
apiStyle: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
445
|
+
chat: "chat";
|
|
446
|
+
responses: "responses";
|
|
447
|
+
}>>;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
export type OpenAICompatibleProviderConfig = z.infer<typeof OpenAICompatibleProviderConfig>;
|
|
450
|
+
export declare const CloudflareGatewayProviderConfig: z.ZodMiniObject<{
|
|
451
|
+
accountId: z.ZodMiniString<string>;
|
|
452
|
+
gatewayId: z.ZodMiniString<string>;
|
|
453
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
454
|
+
modelId: z.ZodMiniString<string>;
|
|
455
|
+
modelName: z.ZodMiniString<string>;
|
|
456
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
457
|
+
}, z.core.$strip>>;
|
|
458
|
+
vertexProject: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
459
|
+
vertexRegion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
export type CloudflareGatewayProviderConfig = z.infer<typeof CloudflareGatewayProviderConfig>;
|
|
462
|
+
export declare const AzureProviderConfig: z.ZodMiniObject<{
|
|
463
|
+
resourceName: z.ZodMiniString<string>;
|
|
464
|
+
apiVersion: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniOptional<z.ZodMiniString<string>>>;
|
|
465
|
+
}, z.core.$strip>;
|
|
466
|
+
export type AzureProviderConfig = z.infer<typeof AzureProviderConfig>;
|
|
467
|
+
export declare const BedrockProviderConfig: z.ZodMiniObject<{
|
|
468
|
+
region: z.ZodMiniString<string>;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
export type BedrockProviderConfig = z.infer<typeof BedrockProviderConfig>;
|
|
471
|
+
export declare const VertexProviderConfig: z.ZodMiniObject<{
|
|
472
|
+
project: z.ZodMiniString<string>;
|
|
473
|
+
region: z.ZodMiniString<string>;
|
|
474
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
475
|
+
modelId: z.ZodMiniString<string>;
|
|
476
|
+
modelName: z.ZodMiniString<string>;
|
|
477
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
478
|
+
}, z.core.$strip>>;
|
|
479
|
+
}, z.core.$strip>;
|
|
480
|
+
export type VertexProviderConfig = z.infer<typeof VertexProviderConfig>;
|
|
481
|
+
export declare const OpenAiCompatibleVendorConfig: z.ZodMiniObject<{}, z.core.$strip>;
|
|
482
|
+
export type OpenAiCompatibleVendorConfig = z.infer<typeof OpenAiCompatibleVendorConfig>;
|
|
483
|
+
export declare const AIProviderModel: z.ZodMiniObject<{
|
|
484
|
+
id: z.ZodMiniString<string>;
|
|
485
|
+
name: z.ZodMiniString<string>;
|
|
486
|
+
type: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
487
|
+
}, z.core.$strip>;
|
|
488
|
+
export type AIProviderModel = z.infer<typeof AIProviderModel>;
|
|
489
|
+
export declare const AIProviderWithoutSensitiveData: z.ZodMiniObject<{
|
|
490
|
+
id: z.ZodMiniString<string>;
|
|
491
|
+
name: z.ZodMiniString<string>;
|
|
492
|
+
provider: z.ZodMiniEnum<typeof AIProviderName>;
|
|
493
|
+
config: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
494
|
+
apiKeyHeader: z.ZodMiniString<string>;
|
|
495
|
+
baseUrl: z.ZodMiniString<string>;
|
|
496
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
497
|
+
modelId: z.ZodMiniString<string>;
|
|
498
|
+
modelName: z.ZodMiniString<string>;
|
|
499
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
500
|
+
}, z.core.$strip>>;
|
|
501
|
+
defaultHeaders: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
502
|
+
apiStyle: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
503
|
+
chat: "chat";
|
|
504
|
+
responses: "responses";
|
|
505
|
+
}>>;
|
|
506
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
507
|
+
accountId: z.ZodMiniString<string>;
|
|
508
|
+
gatewayId: z.ZodMiniString<string>;
|
|
509
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
510
|
+
modelId: z.ZodMiniString<string>;
|
|
511
|
+
modelName: z.ZodMiniString<string>;
|
|
512
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
513
|
+
}, z.core.$strip>>;
|
|
514
|
+
vertexProject: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
515
|
+
vertexRegion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
516
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
517
|
+
resourceName: z.ZodMiniString<string>;
|
|
518
|
+
apiVersion: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniOptional<z.ZodMiniString<string>>>;
|
|
519
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
520
|
+
project: z.ZodMiniString<string>;
|
|
521
|
+
region: z.ZodMiniString<string>;
|
|
522
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
523
|
+
modelId: z.ZodMiniString<string>;
|
|
524
|
+
modelName: z.ZodMiniString<string>;
|
|
525
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
526
|
+
}, z.core.$strip>>;
|
|
527
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
528
|
+
region: z.ZodMiniString<string>;
|
|
529
|
+
}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>]>;
|
|
530
|
+
enabledForChat: z.ZodMiniBoolean<boolean>;
|
|
531
|
+
}, z.core.$strip>;
|
|
532
|
+
export type AIProviderWithoutSensitiveData = z.infer<typeof AIProviderWithoutSensitiveData>;
|
|
533
|
+
export declare const ProjectAIProvider: z.ZodMiniObject<{
|
|
534
|
+
provider: z.ZodMiniEnum<typeof AIProviderName>;
|
|
535
|
+
name: z.ZodMiniString<string>;
|
|
536
|
+
enabledForChat: z.ZodMiniBoolean<boolean>;
|
|
537
|
+
keys: z.ZodMiniArray<z.ZodMiniObject<{
|
|
538
|
+
id: z.ZodMiniString<string>;
|
|
539
|
+
name: z.ZodMiniString<string>;
|
|
540
|
+
}, z.core.$strip>>;
|
|
541
|
+
}, z.core.$strip>;
|
|
542
|
+
export type ProjectAIProvider = z.infer<typeof ProjectAIProvider>;
|
|
543
|
+
export declare const GetProviderConfigResponse: z.ZodMiniObject<{
|
|
544
|
+
provider: z.ZodMiniEnum<typeof AIProviderName>;
|
|
545
|
+
configId: z.ZodMiniString<string>;
|
|
546
|
+
config: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
547
|
+
apiKeyHeader: z.ZodMiniString<string>;
|
|
548
|
+
baseUrl: z.ZodMiniString<string>;
|
|
549
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
550
|
+
modelId: z.ZodMiniString<string>;
|
|
551
|
+
modelName: z.ZodMiniString<string>;
|
|
552
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
553
|
+
}, z.core.$strip>>;
|
|
554
|
+
defaultHeaders: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
555
|
+
apiStyle: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
556
|
+
chat: "chat";
|
|
557
|
+
responses: "responses";
|
|
558
|
+
}>>;
|
|
559
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
560
|
+
accountId: z.ZodMiniString<string>;
|
|
561
|
+
gatewayId: z.ZodMiniString<string>;
|
|
562
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
563
|
+
modelId: z.ZodMiniString<string>;
|
|
564
|
+
modelName: z.ZodMiniString<string>;
|
|
565
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
566
|
+
}, z.core.$strip>>;
|
|
567
|
+
vertexProject: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
568
|
+
vertexRegion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
569
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
570
|
+
resourceName: z.ZodMiniString<string>;
|
|
571
|
+
apiVersion: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniOptional<z.ZodMiniString<string>>>;
|
|
572
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
573
|
+
project: z.ZodMiniString<string>;
|
|
574
|
+
region: z.ZodMiniString<string>;
|
|
575
|
+
models: z.ZodMiniArray<z.ZodMiniObject<{
|
|
576
|
+
modelId: z.ZodMiniString<string>;
|
|
577
|
+
modelName: z.ZodMiniString<string>;
|
|
578
|
+
modelType: z.ZodMiniEnum<typeof AIProviderModelType>;
|
|
579
|
+
}, z.core.$strip>>;
|
|
580
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
581
|
+
region: z.ZodMiniString<string>;
|
|
582
|
+
}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>, z.ZodMiniObject<{}, z.core.$strip>]>;
|
|
583
|
+
auth: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
584
|
+
apiKey: z.ZodMiniString<string>;
|
|
585
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
586
|
+
apiKey: z.ZodMiniString<string>;
|
|
587
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
588
|
+
apiKey: z.ZodMiniString<string>;
|
|
589
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
590
|
+
apiKey: z.ZodMiniString<string>;
|
|
591
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
592
|
+
apiKey: z.ZodMiniString<string>;
|
|
593
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
594
|
+
apiKey: z.ZodMiniString<string>;
|
|
595
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
596
|
+
apiKey: z.ZodMiniString<string>;
|
|
597
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
598
|
+
apiKey: z.ZodMiniString<string>;
|
|
599
|
+
apiKeyHash: z.ZodMiniString<string>;
|
|
600
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
601
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
602
|
+
secretAccessKey: z.ZodMiniString<string>;
|
|
603
|
+
sessionToken: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
604
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
605
|
+
serviceAccountJson: z.ZodMiniString<string>;
|
|
606
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
607
|
+
apiKey: z.ZodMiniString<string>;
|
|
608
|
+
}, z.core.$strip>]>;
|
|
609
|
+
platformId: z.ZodMiniString<string>;
|
|
610
|
+
}, z.core.$strip>;
|
|
611
|
+
export type GetProviderConfigResponse = z.infer<typeof GetProviderConfigResponse>;
|
|
612
|
+
export declare function splitCloudflareGatewayModelId(modelId: string): {
|
|
613
|
+
provider: "google-vertex-ai";
|
|
614
|
+
publisher: string;
|
|
615
|
+
model: string;
|
|
616
|
+
} | {
|
|
617
|
+
provider: string;
|
|
618
|
+
model: string;
|
|
619
|
+
publisher: undefined;
|
|
620
|
+
} | {
|
|
621
|
+
provider: undefined;
|
|
622
|
+
model: string;
|
|
623
|
+
publisher: undefined;
|
|
624
|
+
};
|
|
625
|
+
export declare function getEffectiveProviderAndModel({ provider, model }: {
|
|
626
|
+
provider: string | undefined;
|
|
627
|
+
model: string | undefined;
|
|
628
|
+
}): {
|
|
629
|
+
provider: string | undefined;
|
|
630
|
+
model: string | undefined;
|
|
631
|
+
};
|
|
632
|
+
declare function getCuratedChatModels({ provider }: {
|
|
633
|
+
provider: AIProviderName;
|
|
634
|
+
}): {
|
|
635
|
+
id: string;
|
|
636
|
+
label: string;
|
|
637
|
+
}[] | undefined;
|
|
638
|
+
declare function runnableChatModelIds({ provider }: {
|
|
639
|
+
provider: AIProviderName;
|
|
640
|
+
}): string[];
|
|
641
|
+
declare function canDisableReasoning({ modelId }: {
|
|
642
|
+
modelId: string;
|
|
643
|
+
}): boolean;
|
|
644
|
+
declare function managedChatModelIds(): string[];
|
|
645
|
+
declare function isManagedChatModelId({ modelId }: {
|
|
646
|
+
modelId: string;
|
|
647
|
+
}): boolean;
|
|
648
|
+
declare function isCuratedChatModelId({ modelId }: {
|
|
649
|
+
modelId: string;
|
|
650
|
+
}): boolean;
|
|
651
|
+
declare function isChatModelId({ modelId }: {
|
|
652
|
+
modelId: string;
|
|
653
|
+
}): boolean;
|
|
654
|
+
declare function getMaxContextTokens({ provider }: {
|
|
655
|
+
provider: AIProviderName | undefined;
|
|
656
|
+
}): number;
|
|
657
|
+
export declare const OPENAI_COMPATIBLE_VENDOR_BASE_URLS: Record<OpenAiCompatibleVendor, string>;
|
|
658
|
+
export declare const ACTIVEPIECES_CHAT_TIERS: readonly [{
|
|
659
|
+
readonly id: "fast";
|
|
660
|
+
readonly label: "Fast";
|
|
661
|
+
readonly modelId: "anthropic/claude-haiku-4.5";
|
|
662
|
+
readonly nativeModelId: "claude-haiku-4-5";
|
|
663
|
+
readonly thinkingBudget: 5000;
|
|
664
|
+
}, {
|
|
665
|
+
readonly id: "smart";
|
|
666
|
+
readonly label: "Expert";
|
|
667
|
+
readonly modelId: "anthropic/claude-sonnet-4.6";
|
|
668
|
+
readonly nativeModelId: "claude-sonnet-4-6";
|
|
669
|
+
readonly thinkingBudget: 10000;
|
|
670
|
+
}, {
|
|
671
|
+
readonly id: "premium";
|
|
672
|
+
readonly label: "Heavy";
|
|
673
|
+
readonly modelId: "anthropic/claude-opus-4.8";
|
|
674
|
+
readonly nativeModelId: "claude-opus-4-7";
|
|
675
|
+
readonly thinkingBudget: 20000;
|
|
676
|
+
}];
|
|
677
|
+
export declare const DEFAULT_CHAT_TIER_ID: "smart";
|
|
678
|
+
export declare const ACTIVEPIECES_IMAGE_TIERS: readonly [{
|
|
679
|
+
readonly id: "fast";
|
|
680
|
+
readonly label: "Fast";
|
|
681
|
+
readonly modelId: "google/gemini-3.1-flash-lite-image";
|
|
682
|
+
}, {
|
|
683
|
+
readonly id: "smart";
|
|
684
|
+
readonly label: "Expert";
|
|
685
|
+
readonly modelId: "google/gemini-3.1-flash-image";
|
|
686
|
+
}, {
|
|
687
|
+
readonly id: "premium";
|
|
688
|
+
readonly label: "Heavy";
|
|
689
|
+
readonly modelId: "google/gemini-3-pro-image";
|
|
690
|
+
}];
|
|
691
|
+
export declare const AI_PROVIDER_CAPABILITIES: Record<AIProviderName, AIProviderCapabilities>;
|
|
692
|
+
export declare const aiProviderUtils: {
|
|
693
|
+
getMaxContextTokens: typeof getMaxContextTokens;
|
|
694
|
+
getCuratedChatModels: typeof getCuratedChatModels;
|
|
695
|
+
runnableChatModelIds: typeof runnableChatModelIds;
|
|
696
|
+
isCuratedChatModelId: typeof isCuratedChatModelId;
|
|
697
|
+
managedChatModelIds: typeof managedChatModelIds;
|
|
698
|
+
isManagedChatModelId: typeof isManagedChatModelId;
|
|
699
|
+
canDisableReasoning: typeof canDisableReasoning;
|
|
700
|
+
isChatModelId: typeof isChatModelId;
|
|
701
|
+
};
|
|
702
|
+
type AIWebSearchMode = "native" | "plugin";
|
|
703
|
+
type OpenAiCompatibleVendor = AIProviderName.XAI | AIProviderName.DEEPSEEK | AIProviderName.ZAI | AIProviderName.QWEN | AIProviderName.MINIMAX | AIProviderName.MOONSHOT;
|
|
704
|
+
type AIProviderCapabilities = {
|
|
705
|
+
chatModels?: readonly string[] | undefined;
|
|
706
|
+
maxContextTokens: number;
|
|
707
|
+
embeddingModels: readonly string[];
|
|
708
|
+
defaultEmbeddingModel: string | undefined;
|
|
709
|
+
supportsEmbedding: boolean;
|
|
710
|
+
supportsImageGeneration: boolean;
|
|
711
|
+
defaultImageModel: string | undefined;
|
|
712
|
+
webSearch: AIWebSearchMode | undefined;
|
|
713
|
+
};
|
|
714
|
+
//#endregion
|
|
715
|
+
//#region upstream/core-piece-types/lib/forms.d.ts
|
|
716
|
+
export declare const FileResponseInterface: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
717
|
+
base64Url: z.ZodMiniString<string>;
|
|
718
|
+
fileName: z.ZodMiniString<string>;
|
|
719
|
+
extension: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
720
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
721
|
+
mimeType: z.ZodMiniString<string>;
|
|
722
|
+
url: z.ZodMiniString<string>;
|
|
723
|
+
fileName: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
724
|
+
}, z.core.$strip>]>;
|
|
725
|
+
export type FileResponseInterface = z.infer<typeof FileResponseInterface>;
|
|
726
|
+
export declare enum HumanInputFormResultTypes {
|
|
727
|
+
FILE = "file",
|
|
728
|
+
MARKDOWN = "markdown"
|
|
729
|
+
}
|
|
730
|
+
export declare function createKeyForFormInput(displayName: string): string;
|
|
731
|
+
export declare const HumanInputFormResult: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
732
|
+
type: z.ZodMiniLiteral<HumanInputFormResultTypes.FILE>;
|
|
733
|
+
value: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
734
|
+
base64Url: z.ZodMiniString<string>;
|
|
735
|
+
fileName: z.ZodMiniString<string>;
|
|
736
|
+
extension: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
737
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
738
|
+
mimeType: z.ZodMiniString<string>;
|
|
739
|
+
url: z.ZodMiniString<string>;
|
|
740
|
+
fileName: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
741
|
+
}, z.core.$strip>]>;
|
|
742
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
743
|
+
type: z.ZodMiniLiteral<HumanInputFormResultTypes.MARKDOWN>;
|
|
744
|
+
value: z.ZodMiniString<string>;
|
|
745
|
+
files: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
746
|
+
base64Url: z.ZodMiniString<string>;
|
|
747
|
+
fileName: z.ZodMiniString<string>;
|
|
748
|
+
extension: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
749
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
750
|
+
mimeType: z.ZodMiniString<string>;
|
|
751
|
+
url: z.ZodMiniString<string>;
|
|
752
|
+
fileName: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
753
|
+
}, z.core.$strip>]>>>;
|
|
754
|
+
}, z.core.$strip>]>;
|
|
755
|
+
export type HumanInputFormResult = z.infer<typeof HumanInputFormResult>;
|
|
756
|
+
export declare const ChatFormResponse: z.ZodMiniObject<{
|
|
757
|
+
sessionId: z.ZodMiniString<string>;
|
|
758
|
+
message: z.ZodMiniString<string>;
|
|
759
|
+
files: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
760
|
+
}, z.core.$strip>;
|
|
761
|
+
export type ChatFormResponse = z.infer<typeof ChatFormResponse>;
|
|
762
|
+
//#endregion
|
|
763
|
+
//#region upstream/core-piece-types/lib/tables.d.ts
|
|
764
|
+
export declare enum FieldType {
|
|
765
|
+
TEXT = "TEXT",
|
|
766
|
+
NUMBER = "NUMBER",
|
|
767
|
+
DATE = "DATE",
|
|
768
|
+
DATETIME = "DATETIME",
|
|
769
|
+
STATIC_DROPDOWN = "STATIC_DROPDOWN"
|
|
770
|
+
}
|
|
771
|
+
declare enum TableAutomationTrigger {
|
|
772
|
+
ON_NEW_RECORD = "ON_NEW_RECORD",
|
|
773
|
+
ON_UPDATE_RECORD = "ON_UPDATE_RECORD"
|
|
774
|
+
}
|
|
775
|
+
declare enum TableAutomationStatus {
|
|
776
|
+
ENABLED = "ENABLED",
|
|
777
|
+
DISABLED = "DISABLED"
|
|
778
|
+
}
|
|
779
|
+
export declare enum TableWebhookEventType {
|
|
780
|
+
RECORD_CREATED = "RECORD_CREATED",
|
|
781
|
+
RECORD_UPDATED = "RECORD_UPDATED",
|
|
782
|
+
RECORD_DELETED = "RECORD_DELETED"
|
|
783
|
+
}
|
|
784
|
+
export declare enum FilterOperator {
|
|
785
|
+
EQ = "eq",
|
|
786
|
+
NEQ = "neq",
|
|
787
|
+
GT = "gt",
|
|
788
|
+
GTE = "gte",
|
|
789
|
+
LT = "lt",
|
|
790
|
+
LTE = "lte",
|
|
791
|
+
CO = "co",
|
|
792
|
+
EXISTS = "exists",
|
|
793
|
+
NOT_EXISTS = "not_exists"
|
|
794
|
+
}
|
|
795
|
+
export declare const Field: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
796
|
+
id: z.ZodMiniString<string>;
|
|
797
|
+
created: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
798
|
+
updated: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
799
|
+
name: z.ZodMiniString<string>;
|
|
800
|
+
externalId: z.ZodMiniString<string>;
|
|
801
|
+
type: z.ZodMiniLiteral<FieldType.STATIC_DROPDOWN>;
|
|
802
|
+
tableId: z.ZodMiniString<string>;
|
|
803
|
+
projectId: z.ZodMiniString<string>;
|
|
804
|
+
data: z.ZodMiniObject<{
|
|
805
|
+
options: z.ZodMiniArray<z.ZodMiniObject<{
|
|
806
|
+
value: z.ZodMiniString<string>;
|
|
807
|
+
}, z.core.$strip>>;
|
|
808
|
+
}, z.core.$strip>;
|
|
809
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
810
|
+
id: z.ZodMiniString<string>;
|
|
811
|
+
created: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
812
|
+
updated: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
813
|
+
name: z.ZodMiniString<string>;
|
|
814
|
+
externalId: z.ZodMiniString<string>;
|
|
815
|
+
type: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<FieldType.TEXT>, z.ZodMiniLiteral<FieldType.NUMBER>, z.ZodMiniLiteral<FieldType.DATE>, z.ZodMiniLiteral<FieldType.DATETIME>]>;
|
|
816
|
+
tableId: z.ZodMiniString<string>;
|
|
817
|
+
projectId: z.ZodMiniString<string>;
|
|
818
|
+
}, z.core.$strip>]>;
|
|
819
|
+
export type Field = z.infer<typeof Field>;
|
|
820
|
+
export declare const Table: z.ZodMiniObject<{
|
|
821
|
+
id: z.ZodMiniString<string>;
|
|
822
|
+
created: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
823
|
+
updated: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
824
|
+
name: z.ZodMiniString<string>;
|
|
825
|
+
folderId: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
826
|
+
projectId: z.ZodMiniString<string>;
|
|
827
|
+
externalId: z.ZodMiniString<string>;
|
|
828
|
+
status: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniEnum<typeof TableAutomationStatus>>>;
|
|
829
|
+
trigger: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniEnum<typeof TableAutomationTrigger>>>;
|
|
830
|
+
}, z.core.$strip>;
|
|
831
|
+
export type Table = z.infer<typeof Table>;
|
|
832
|
+
export declare const PopulatedRecord: z.ZodMiniObject<{
|
|
833
|
+
id: z.ZodMiniString<string>;
|
|
834
|
+
created: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
835
|
+
updated: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
836
|
+
tableId: z.ZodMiniString<string>;
|
|
837
|
+
projectId: z.ZodMiniString<string>;
|
|
838
|
+
cells: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
839
|
+
updated: z.ZodMiniString<string>;
|
|
840
|
+
created: z.ZodMiniString<string>;
|
|
841
|
+
value: z.ZodMiniUnknown;
|
|
842
|
+
fieldName: z.ZodMiniString<string>;
|
|
843
|
+
}, z.core.$strip>>;
|
|
844
|
+
}, z.core.$strip>;
|
|
845
|
+
export type PopulatedRecord = z.infer<typeof PopulatedRecord>;
|
|
846
|
+
export declare const CreateTableWebhookRequest: z.ZodMiniObject<{
|
|
847
|
+
events: z.ZodMiniArray<z.ZodMiniEnum<typeof TableWebhookEventType>>;
|
|
848
|
+
webhookUrl: z.ZodMiniString<string>;
|
|
849
|
+
flowId: z.ZodMiniString<string>;
|
|
850
|
+
}, z.core.$strip>;
|
|
851
|
+
export type CreateTableWebhookRequest = z.infer<typeof CreateTableWebhookRequest>;
|
|
852
|
+
export declare const ExportTableResponse: z.ZodMiniObject<{
|
|
853
|
+
fields: z.ZodMiniArray<z.ZodMiniObject<{
|
|
854
|
+
id: z.ZodMiniString<string>;
|
|
855
|
+
name: z.ZodMiniString<string>;
|
|
856
|
+
}, z.core.$strip>>;
|
|
857
|
+
rows: z.ZodMiniArray<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
858
|
+
name: z.ZodMiniString<string>;
|
|
859
|
+
}, z.core.$strip>;
|
|
860
|
+
export type ExportTableResponse = z.infer<typeof ExportTableResponse>;
|
|
861
|
+
export declare const ListTablesRequest: z.ZodMiniObject<{
|
|
862
|
+
projectId: z.ZodMiniString<string>;
|
|
863
|
+
limit: z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
|
|
864
|
+
cursor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
865
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
866
|
+
externalIds: z.ZodMiniPipe<z.ZodMiniTransform<any[] | undefined, unknown>, z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>>;
|
|
867
|
+
folderId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
868
|
+
folderIds: z.ZodMiniPipe<z.ZodMiniTransform<any[] | undefined, unknown>, z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>>;
|
|
869
|
+
}, z.core.$strip>;
|
|
870
|
+
export type ListTablesRequest = z.infer<typeof ListTablesRequest>;
|
|
871
|
+
export declare const CreateRecordsRequest: z.ZodMiniObject<{
|
|
872
|
+
records: z.ZodMiniArray<z.ZodMiniArray<z.ZodMiniObject<{
|
|
873
|
+
fieldId: z.ZodMiniString<string>;
|
|
874
|
+
value: z.ZodMiniPipe<z.ZodMiniTransform<string | null | undefined, unknown>, z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
875
|
+
}, z.core.$strip>>>;
|
|
876
|
+
tableId: z.ZodMiniString<string>;
|
|
877
|
+
}, z.core.$strip>;
|
|
878
|
+
export type CreateRecordsRequest = z.infer<typeof CreateRecordsRequest>;
|
|
879
|
+
export declare const UpdateRecordRequest: z.ZodMiniObject<{
|
|
880
|
+
cells: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
881
|
+
fieldId: z.ZodMiniString<string>;
|
|
882
|
+
value: z.ZodMiniPipe<z.ZodMiniTransform<string | null | undefined, unknown>, z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
883
|
+
}, z.core.$strip>>>;
|
|
884
|
+
tableId: z.ZodMiniString<string>;
|
|
885
|
+
agentUpdate: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
886
|
+
}, z.core.$strip>;
|
|
887
|
+
export type UpdateRecordRequest = z.infer<typeof UpdateRecordRequest>;
|
|
888
|
+
export declare const Filter: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
889
|
+
fieldId: z.ZodMiniString<string>;
|
|
890
|
+
operator: z.ZodMiniLiteral<FilterOperator.EQ>;
|
|
891
|
+
value: z.ZodMiniString<string>;
|
|
892
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
893
|
+
fieldId: z.ZodMiniString<string>;
|
|
894
|
+
operator: z.ZodMiniLiteral<FilterOperator.NEQ>;
|
|
895
|
+
value: z.ZodMiniString<string>;
|
|
896
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
897
|
+
fieldId: z.ZodMiniString<string>;
|
|
898
|
+
operator: z.ZodMiniLiteral<FilterOperator.GT>;
|
|
899
|
+
value: z.ZodMiniString<string>;
|
|
900
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
901
|
+
fieldId: z.ZodMiniString<string>;
|
|
902
|
+
operator: z.ZodMiniLiteral<FilterOperator.GTE>;
|
|
903
|
+
value: z.ZodMiniString<string>;
|
|
904
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
905
|
+
fieldId: z.ZodMiniString<string>;
|
|
906
|
+
operator: z.ZodMiniLiteral<FilterOperator.LT>;
|
|
907
|
+
value: z.ZodMiniString<string>;
|
|
908
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
909
|
+
fieldId: z.ZodMiniString<string>;
|
|
910
|
+
operator: z.ZodMiniLiteral<FilterOperator.LTE>;
|
|
911
|
+
value: z.ZodMiniString<string>;
|
|
912
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
913
|
+
fieldId: z.ZodMiniString<string>;
|
|
914
|
+
operator: z.ZodMiniLiteral<FilterOperator.CO>;
|
|
915
|
+
value: z.ZodMiniString<string>;
|
|
916
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
917
|
+
fieldId: z.ZodMiniString<string>;
|
|
918
|
+
operator: z.ZodMiniLiteral<FilterOperator.EXISTS>;
|
|
919
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
920
|
+
fieldId: z.ZodMiniString<string>;
|
|
921
|
+
operator: z.ZodMiniLiteral<FilterOperator.NOT_EXISTS>;
|
|
922
|
+
}, z.core.$strip>], "operator">;
|
|
923
|
+
export type Filter = z.infer<typeof Filter>;
|
|
924
|
+
export declare const ListRecordsRequest: z.ZodMiniObject<{
|
|
925
|
+
tableId: z.ZodMiniString<string>;
|
|
926
|
+
limit: z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
|
|
927
|
+
cursor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
928
|
+
filters: z.ZodMiniPipe<z.ZodMiniTransform<any[] | undefined, unknown>, z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
929
|
+
fieldId: z.ZodMiniString<string>;
|
|
930
|
+
operator: z.ZodMiniLiteral<FilterOperator.EQ>;
|
|
931
|
+
value: z.ZodMiniString<string>;
|
|
932
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
933
|
+
fieldId: z.ZodMiniString<string>;
|
|
934
|
+
operator: z.ZodMiniLiteral<FilterOperator.NEQ>;
|
|
935
|
+
value: z.ZodMiniString<string>;
|
|
936
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
937
|
+
fieldId: z.ZodMiniString<string>;
|
|
938
|
+
operator: z.ZodMiniLiteral<FilterOperator.GT>;
|
|
939
|
+
value: z.ZodMiniString<string>;
|
|
940
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
941
|
+
fieldId: z.ZodMiniString<string>;
|
|
942
|
+
operator: z.ZodMiniLiteral<FilterOperator.GTE>;
|
|
943
|
+
value: z.ZodMiniString<string>;
|
|
944
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
945
|
+
fieldId: z.ZodMiniString<string>;
|
|
946
|
+
operator: z.ZodMiniLiteral<FilterOperator.LT>;
|
|
947
|
+
value: z.ZodMiniString<string>;
|
|
948
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
949
|
+
fieldId: z.ZodMiniString<string>;
|
|
950
|
+
operator: z.ZodMiniLiteral<FilterOperator.LTE>;
|
|
951
|
+
value: z.ZodMiniString<string>;
|
|
952
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
953
|
+
fieldId: z.ZodMiniString<string>;
|
|
954
|
+
operator: z.ZodMiniLiteral<FilterOperator.CO>;
|
|
955
|
+
value: z.ZodMiniString<string>;
|
|
956
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
957
|
+
fieldId: z.ZodMiniString<string>;
|
|
958
|
+
operator: z.ZodMiniLiteral<FilterOperator.EXISTS>;
|
|
959
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
960
|
+
fieldId: z.ZodMiniString<string>;
|
|
961
|
+
operator: z.ZodMiniLiteral<FilterOperator.NOT_EXISTS>;
|
|
962
|
+
}, z.core.$strip>], "operator">>>>;
|
|
963
|
+
}, z.core.$strip>;
|
|
964
|
+
export declare const StaticDropdownEmptyOption: {
|
|
965
|
+
label: string;
|
|
966
|
+
value: string;
|
|
967
|
+
};
|
|
968
|
+
export type ListRecordsRequest = Omit<z.infer<typeof ListRecordsRequest>, "cursor"> & {
|
|
969
|
+
cursor: Cursor | undefined;
|
|
970
|
+
};
|
|
971
|
+
//#endregion
|
|
972
|
+
//#region upstream/core-piece-types/lib/flow-contracts.d.ts
|
|
973
|
+
export declare enum FlowStatus {
|
|
974
|
+
ENABLED = "ENABLED",
|
|
975
|
+
DISABLED = "DISABLED"
|
|
976
|
+
}
|
|
977
|
+
export declare enum FlowTriggerType {
|
|
978
|
+
EMPTY = "EMPTY",
|
|
979
|
+
PIECE = "PIECE_TRIGGER"
|
|
980
|
+
}
|
|
981
|
+
export declare const StopResponse: z.ZodMiniObject<{
|
|
982
|
+
status: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
983
|
+
body: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
984
|
+
headers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
985
|
+
}, z.core.$strip>;
|
|
986
|
+
export type StopResponse = z.infer<typeof StopResponse>;
|
|
987
|
+
export declare const Project: z.ZodMiniObject<{
|
|
988
|
+
id: z.ZodMiniString<string>;
|
|
989
|
+
created: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
990
|
+
updated: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>;
|
|
991
|
+
deleted: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniString<string>>>>;
|
|
992
|
+
ownerId: z.ZodMiniString<string>;
|
|
993
|
+
displayName: z.ZodMiniString<string>;
|
|
994
|
+
platformId: z.ZodMiniString<string>;
|
|
995
|
+
externalId: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
996
|
+
}, z.core.$strip>;
|
|
997
|
+
export type Project = z.infer<typeof Project>;
|
|
998
|
+
export declare const USE_DRAFT_QUERY_PARAM_NAME = "useDraft";
|
|
999
|
+
export declare const PARENT_RUN_ID_HEADER = "ap-parent-run-id";
|
|
1000
|
+
export declare const FAIL_PARENT_ON_FAILURE_HEADER = "ap-fail-parent-on-failure";
|
|
1001
|
+
export declare const RAW_PAYLOAD_HEADER = "ap-raw-payload";
|
|
1002
|
+
type PopulatedFlow = {
|
|
1003
|
+
id: string;
|
|
1004
|
+
externalId?: string;
|
|
1005
|
+
status: FlowStatus;
|
|
1006
|
+
version: {
|
|
1007
|
+
displayName: string;
|
|
1008
|
+
trigger: {
|
|
1009
|
+
type: FlowTriggerType;
|
|
1010
|
+
settings: {
|
|
1011
|
+
pieceName?: string;
|
|
1012
|
+
input: {
|
|
1013
|
+
exampleData?: unknown;
|
|
1014
|
+
} & Record<string, unknown>;
|
|
1015
|
+
} & Record<string, unknown>;
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1019
|
+
//#endregion
|
|
1020
|
+
//#region upstream/core-piece-types/lib/mcp-piece.d.ts
|
|
1021
|
+
export declare enum McpPropertyType {
|
|
1022
|
+
TEXT = "Text",
|
|
1023
|
+
BOOLEAN = "Boolean",
|
|
1024
|
+
DATE = "Date",
|
|
1025
|
+
NUMBER = "Number",
|
|
1026
|
+
ARRAY = "Array",
|
|
1027
|
+
OBJECT = "Object"
|
|
1028
|
+
}
|
|
1029
|
+
export declare const McpProperty: z.ZodMiniObject<{
|
|
1030
|
+
name: z.ZodMiniString<string>;
|
|
1031
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1032
|
+
type: z.ZodMiniString<string>;
|
|
1033
|
+
required: z.ZodMiniBoolean<boolean>;
|
|
1034
|
+
}, z.core.$strip>;
|
|
1035
|
+
export type McpProperty = z.infer<typeof McpProperty>;
|
|
1036
|
+
export declare const McpTrigger: z.ZodMiniObject<{
|
|
1037
|
+
pieceName: z.ZodMiniString<string>;
|
|
1038
|
+
triggerName: z.ZodMiniString<string>;
|
|
1039
|
+
input: z.ZodMiniObject<{
|
|
1040
|
+
toolName: z.ZodMiniString<string>;
|
|
1041
|
+
toolDescription: z.ZodMiniString<string>;
|
|
1042
|
+
inputSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
1043
|
+
name: z.ZodMiniString<string>;
|
|
1044
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1045
|
+
type: z.ZodMiniString<string>;
|
|
1046
|
+
required: z.ZodMiniBoolean<boolean>;
|
|
1047
|
+
}, z.core.$strip>>;
|
|
1048
|
+
returnsResponse: z.ZodMiniBoolean<boolean>;
|
|
1049
|
+
}, z.core.$strip>;
|
|
1050
|
+
}, z.core.$strip>;
|
|
1051
|
+
export type McpTrigger = z.infer<typeof McpTrigger>;
|
|
1052
|
+
//#endregion
|
|
1053
|
+
//#region upstream/core-piece-types/lib/engine-tools.d.ts
|
|
1054
|
+
type ExecuteToolResponse = {
|
|
1055
|
+
status: ExecutionToolStatus;
|
|
1056
|
+
output?: unknown;
|
|
1057
|
+
resolvedInput: Record<string, unknown>;
|
|
1058
|
+
errorMessage?: unknown;
|
|
1059
|
+
};
|
|
1060
|
+
export declare function normalizeToolOutputToExecuteResponse(raw: unknown): ExecuteToolResponse;
|
|
1061
|
+
//#endregion
|
|
1062
|
+
//#region upstream/framework/lib/property/util.d.ts
|
|
1063
|
+
declare function buildSchema(props: PiecePropertyMap, auth: PieceAuthProperty | PieceAuthProperty[] | undefined, requireAuth?: boolean | undefined): z.ZodMiniObject<{
|
|
1064
|
+
[x: string]: z.ZodMiniType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
1065
|
+
}, z.core.$strip>;
|
|
1066
|
+
export declare const piecePropertiesUtils: {
|
|
1067
|
+
buildSchema: typeof buildSchema;
|
|
1068
|
+
};
|
|
1069
|
+
//#endregion
|
|
1070
|
+
//#region upstream/framework/lib/piece.d.ts
|
|
1071
|
+
export declare class Piece<PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined = PieceAuthProperty> implements Omit<PieceBase, "version" | "name"> {
|
|
1072
|
+
readonly displayName: string;
|
|
1073
|
+
readonly logoUrl: string;
|
|
1074
|
+
readonly authors: string[];
|
|
1075
|
+
readonly events: PieceEventProcessors | undefined;
|
|
1076
|
+
readonly categories: PieceCategory[];
|
|
1077
|
+
readonly auth?: PieceAuth | undefined;
|
|
1078
|
+
readonly minimumSupportedRelease: string;
|
|
1079
|
+
readonly maximumSupportedRelease?: string | undefined;
|
|
1080
|
+
readonly description: string;
|
|
1081
|
+
readonly deprecated?: boolean | undefined;
|
|
1082
|
+
private readonly _actions;
|
|
1083
|
+
private readonly _triggers;
|
|
1084
|
+
getContextInfo: (() => {
|
|
1085
|
+
version: ContextVersion;
|
|
1086
|
+
}) | undefined;
|
|
1087
|
+
constructor(displayName: string, logoUrl: string, authors: string[], events: PieceEventProcessors | undefined, actions: Action[], triggers: Trigger[], categories: PieceCategory[], auth?: PieceAuth | undefined, minimumSupportedRelease?: string, maximumSupportedRelease?: string | undefined, description?: string, deprecated?: boolean | undefined);
|
|
1088
|
+
metadata(): BackwardCompatiblePieceMetadata;
|
|
1089
|
+
getAction(actionName: string): Action | undefined;
|
|
1090
|
+
getTrigger(triggerName: string): Trigger | undefined;
|
|
1091
|
+
actions(): Record<string, Action>;
|
|
1092
|
+
triggers(): Record<string, Trigger>;
|
|
1093
|
+
}
|
|
1094
|
+
export declare const createPiece: <PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined>(params: CreatePieceParams<PieceAuth>) => Piece<PieceAuth>;
|
|
1095
|
+
type CreatePieceParams<PieceAuth extends PieceAuthProperty | PieceAuthProperty[] | undefined = undefined> = {
|
|
1096
|
+
displayName: string;
|
|
1097
|
+
logoUrl: string;
|
|
1098
|
+
authors: string[];
|
|
1099
|
+
description?: string;
|
|
1100
|
+
auth: PieceAuth | undefined;
|
|
1101
|
+
events?: PieceEventProcessors;
|
|
1102
|
+
minimumSupportedRelease?: string;
|
|
1103
|
+
maximumSupportedRelease?: string;
|
|
1104
|
+
actions: Action[];
|
|
1105
|
+
triggers: Trigger[];
|
|
1106
|
+
categories?: PieceCategory[];
|
|
1107
|
+
deprecated?: boolean;
|
|
1108
|
+
};
|
|
1109
|
+
type PieceEventProcessors = {
|
|
1110
|
+
parseAndReply: (ctx: {
|
|
1111
|
+
payload: EventPayload;
|
|
1112
|
+
server: Omit<ServerContext, "token" | "apiUrl">;
|
|
1113
|
+
}) => ParseEventResponse;
|
|
1114
|
+
verify: (ctx: {
|
|
1115
|
+
webhookSecret: string | Record<string, string>;
|
|
1116
|
+
payload: EventPayload;
|
|
1117
|
+
appWebhookUrl: string;
|
|
1118
|
+
}) => boolean;
|
|
1119
|
+
};
|
|
1120
|
+
type BackwardCompatiblePieceMetadata = Omit<PieceMetadata, "name" | "version" | "authors" | "i18n" | "getContextInfo"> & {
|
|
1121
|
+
authors?: PieceMetadata["authors"];
|
|
1122
|
+
i18n?: PieceMetadata["i18n"];
|
|
1123
|
+
};
|
|
1124
|
+
//#endregion
|
|
1125
|
+
//#region upstream/framework/lib/i18n.d.ts
|
|
1126
|
+
export declare const pieceTranslation: {
|
|
1127
|
+
translatePiece: <T extends PieceMetadataModelSummary | PieceMetadataModel>({ piece, locale }: TranslatePieceParams<T>) => T;
|
|
1128
|
+
pathsToTranslate: (categories?: PieceCategory[]) => string[];
|
|
1129
|
+
/**Gets the piece metadata regardles of piece location (node_modules or dist), wasn't included inside piece.metadata() for backwards compatibility issues (if an old ap version installs a new piece it would fail)*/
|
|
1130
|
+
initializeI18n: (pieceOutputPath: string) => Promise<I18nForPiece | undefined>;
|
|
1131
|
+
pathsToValuesToTranslate: string[];
|
|
1132
|
+
};
|
|
1133
|
+
type TranslatePieceParams<T extends PieceMetadataModelSummary | PieceMetadataModel> = {
|
|
1134
|
+
piece: T;
|
|
1135
|
+
locale?: LocalesEnum;
|
|
1136
|
+
};
|
|
1137
|
+
//#endregion
|
|
1138
|
+
//#region upstream/framework/lib/test/index.d.ts
|
|
1139
|
+
export declare function createMockActionContext<Props extends InputPropertyMap>(params: {
|
|
1140
|
+
propsValue: StaticPropsValue<Props>;
|
|
1141
|
+
resumePayload?: ResumePayload;
|
|
1142
|
+
canPause?: boolean;
|
|
1143
|
+
onCreateWaitpoint?: (waitpoint: CreateWaitpointParams) => void;
|
|
1144
|
+
onWaitForWaitpoint?: (waitpointId: string) => void;
|
|
1145
|
+
}): ActionContext<undefined, Props>;
|
|
1146
|
+
export declare function createMockPollingTriggerContext<Props extends InputPropertyMap>(params: {
|
|
1147
|
+
propsValue: StaticPropsValue<Props>;
|
|
1148
|
+
onSetSchedule?: (schedule: SetScheduleRequest) => void;
|
|
1149
|
+
}): TriggerHookContext<undefined, Props, TriggerStrategy.POLLING>;
|
|
1150
|
+
//#endregion
|
|
1151
|
+
//#region src/powerhouse/reactor-client.d.ts
|
|
1152
|
+
type RequireReactor = "read" | "write";
|
|
1153
|
+
type ReactorDeclaration = RequireReactor | false;
|
|
1154
|
+
type ReadMethods = "get" | "resolveIdOrSlug" | "find" | "getOperations" | "getOutgoingRelationships" | "getIncomingRelationships" | "getOutgoingRelationshipEdges" | "getIncomingRelationshipEdges" | "getDocumentModelModules" | "getDocumentModelModule" | "getDocumentModelModuleForDocument";
|
|
1155
|
+
type WriteMethods = "newDocument" | "create" | "createEmpty" | "execute" | "executeAsync" | "deleteDocument";
|
|
1156
|
+
type RefusedMethods = "createDocumentInDrive" | "executeBatch" | "rename" | "setPreferredEditor" | "addRelationship" | "updateRelationship" | "removeRelationship" | "moveRelationship" | "upgradeDocument" | "deleteDocuments" | "createAsync" | "createEmptyAsync" | "getJobStatus" | "waitForJob" | "subscribe" | "loadBatch" | "evaluateActions" | "isDocumentIdTaken" | "isServed" | "getCreateSignaturePolicy" | "getCreateProtocolVersions" | "undo" | "redo" | "undoRedoTargets" | "undoRedoAvailability" | "read" | "getMany";
|
|
1157
|
+
type WriteHalfMethods = "create" | "createEmpty" | "execute" | "deleteDocument";
|
|
1158
|
+
type DriveWriteHalfMethods = "addFile" | "addFolder";
|
|
1159
|
+
type RefusedWriteHalfMethods = "isDocumentIdTaken" | "describe" | "evaluateActions" | "upgradeDocument" | "executeBatch" | "rename" | "setPreferredEditor" | "addRelationship" | "updateRelationship" | "removeRelationship" | "moveRelationship" | "deleteDocuments" | "loadBatch" | "undo" | "redo" | "undoRedoTargets" | "undoRedoAvailability";
|
|
1160
|
+
type DriveReadMethods = "getNode" | "listNodes";
|
|
1161
|
+
type DriveWriteMethods = "addFile" | "addFolder";
|
|
1162
|
+
type RefusedDriveMethods = "create" | "removeNode" | "renameNode" | "moveNode" | "copyNode" | "setPreferredEditorOnNode";
|
|
1163
|
+
/**
|
|
1164
|
+
* A read of a read-model index (a custom subgraph such as a key index),
|
|
1165
|
+
* answered in the host process as the run's user: the index's own access
|
|
1166
|
+
* declarations decide what the user sees, exactly as over HTTP, and no
|
|
1167
|
+
* credential or URL reaches the piece.
|
|
1168
|
+
*/
|
|
1169
|
+
interface IndexQueryRequest {
|
|
1170
|
+
/** The subgraph's name, as registered on the host (`key-index`). */
|
|
1171
|
+
subgraph: string;
|
|
1172
|
+
/** A GraphQL query document; mutations are refused. */
|
|
1173
|
+
query: string;
|
|
1174
|
+
variables?: Record<string, unknown>;
|
|
1175
|
+
}
|
|
1176
|
+
interface IndexQueryResult {
|
|
1177
|
+
data?: Record<string, unknown> | null;
|
|
1178
|
+
errors?: {
|
|
1179
|
+
message: string;
|
|
1180
|
+
}[];
|
|
1181
|
+
}
|
|
1182
|
+
/** The read-model query a piece with reactor access may run. */
|
|
1183
|
+
interface IndexQueryMethods {
|
|
1184
|
+
query(request: IndexQueryRequest, signal?: AbortSignal): Promise<IndexQueryResult>;
|
|
1185
|
+
}
|
|
1186
|
+
type ReactorReadClient = Pick<IReactorClient, ReadMethods> & IndexQueryMethods & {
|
|
1187
|
+
readonly drives: Pick<IDriveClient, DriveReadMethods>;
|
|
1188
|
+
};
|
|
1189
|
+
type ReactorWriteClient = Pick<IReactorWriteClient, WriteHalfMethods> & {
|
|
1190
|
+
readonly drives: Pick<IDriveWriteClient, DriveWriteHalfMethods>;
|
|
1191
|
+
};
|
|
1192
|
+
type ReactorClient = Pick<IReactorClient, ReadMethods | WriteMethods> & IndexQueryMethods & {
|
|
1193
|
+
readonly drives: Pick<IDriveClient, DriveReadMethods | DriveWriteMethods>;
|
|
1194
|
+
readonly write: ReactorWriteClient;
|
|
1195
|
+
};
|
|
1196
|
+
type ReactorClientFor<R extends RequireReactor> = R extends "write" ? ReactorClient : ReactorReadClient;
|
|
1197
|
+
type ReactorContext<R extends ReactorDeclaration | undefined> = [R] extends [RequireReactor] ? {
|
|
1198
|
+
reactor: ReactorClientFor<R>;
|
|
1199
|
+
} : unknown;
|
|
1200
|
+
//#endregion
|
|
1201
|
+
//#region src/powerhouse/create.d.ts
|
|
1202
|
+
type AnyPieceAuth$1 = PieceAuthProperty | PieceAuthProperty[] | undefined;
|
|
1203
|
+
type WithReactorHook<F, R extends ReactorDeclaration | undefined> = F extends ((ctx: infer C) => infer Out) ? (ctx: C & ReactorContext<R>) => Out : F;
|
|
1204
|
+
type WithReactorHooks<Params, Hooks extends PropertyKey, R extends ReactorDeclaration | undefined> = { [K in keyof Params]: K extends Hooks ? WithReactorHook<Params[K], R> : Params[K]; } & {
|
|
1205
|
+
requireReactor?: R;
|
|
1206
|
+
};
|
|
1207
|
+
type UpstreamActionParams<PieceAuth extends AnyPieceAuth$1, ActionProps extends InputPropertyMap> = Parameters<typeof createAction$1<PieceAuth, ActionProps>>[0];
|
|
1208
|
+
interface ActionRetryDefault {
|
|
1209
|
+
maxAttempts: number;
|
|
1210
|
+
backoff?: "FIXED" | "EXPONENTIAL";
|
|
1211
|
+
initialDelaySeconds?: number;
|
|
1212
|
+
maxDelaySeconds?: number;
|
|
1213
|
+
retryOn?: string[];
|
|
1214
|
+
}
|
|
1215
|
+
interface ActionDefaults {
|
|
1216
|
+
defaultTimeoutSeconds?: number;
|
|
1217
|
+
defaultRetry?: ActionRetryDefault;
|
|
1218
|
+
}
|
|
1219
|
+
type CreateActionParams<PieceAuth extends AnyPieceAuth$1, ActionProps extends InputPropertyMap, R extends ReactorDeclaration | undefined> = WithReactorHooks<UpstreamActionParams<PieceAuth, ActionProps>, "run" | "test", R> & ActionDefaults;
|
|
1220
|
+
type Declared<T, R extends ReactorDeclaration | undefined> = T & {
|
|
1221
|
+
readonly requireReactor?: Exclude<R, false>;
|
|
1222
|
+
};
|
|
1223
|
+
export declare function createAction<PieceAuth extends AnyPieceAuth$1 = PieceAuthProperty, ActionProps extends InputPropertyMap = any, R extends ReactorDeclaration | undefined = undefined>(params: CreateActionParams<PieceAuth, ActionProps, R>): Declared<ReturnType<typeof createAction$1<PieceAuth, ActionProps>>, R> & Readonly<ActionDefaults>;
|
|
1224
|
+
type UpstreamTriggerParams<TS extends TriggerStrategy, PieceAuth extends AnyPieceAuth$1, TriggerProps extends InputPropertyMap> = Parameters<typeof createTrigger$1<TS, PieceAuth, TriggerProps>>[0];
|
|
1225
|
+
type TriggerHooks = "onEnable" | "onDisable" | "run" | "test" | "onStart" | "onHandshake" | "onRenew";
|
|
1226
|
+
type StrategyParams<S extends TriggerStrategy, TS extends TriggerStrategy, PieceAuth extends AnyPieceAuth$1, TriggerProps extends InputPropertyMap, R extends ReactorDeclaration | undefined> = Omit<WithReactorHooks<UpstreamTriggerParams<S, PieceAuth, TriggerProps>, TriggerHooks, R>, "type"> & {
|
|
1227
|
+
type: TS;
|
|
1228
|
+
};
|
|
1229
|
+
type CreateTriggerParams<TS extends TriggerStrategy, PieceAuth extends AnyPieceAuth$1, TriggerProps extends InputPropertyMap, R extends ReactorDeclaration | undefined> = TS extends TriggerStrategy.WEBHOOK ? StrategyParams<TriggerStrategy.WEBHOOK, TS, PieceAuth, TriggerProps, R> : TS extends TriggerStrategy.POLLING ? StrategyParams<TriggerStrategy.POLLING, TS, PieceAuth, TriggerProps, R> : TS extends TriggerStrategy.APP_WEBHOOK ? StrategyParams<TriggerStrategy.APP_WEBHOOK, TS, PieceAuth, TriggerProps, R> : StrategyParams<TriggerStrategy.MANUAL, TS, PieceAuth, TriggerProps, R>;
|
|
1230
|
+
export declare function createTrigger<TS extends TriggerStrategy, PieceAuth extends AnyPieceAuth$1, TriggerProps extends InputPropertyMap, R extends ReactorDeclaration | undefined = undefined>(params: CreateTriggerParams<TS, PieceAuth, TriggerProps, R>): Declared<ReturnType<typeof createTrigger$1<TS, PieceAuth, TriggerProps>>, R>;
|
|
1231
|
+
//#endregion
|
|
1232
|
+
//#region src/powerhouse/property.d.ts
|
|
1233
|
+
type AnyPieceAuth = PieceAuthProperty | PieceAuthProperty[] | undefined;
|
|
1234
|
+
export type PropertyContext = PropertyContext$1 & {
|
|
1235
|
+
reactor?: ReactorReadClient;
|
|
1236
|
+
};
|
|
1237
|
+
type WithReactorResolver<F> = F extends ((values: infer V, ctx: PropertyContext$1) => infer Out) ? (values: V, ctx: PropertyContext) => Out : F;
|
|
1238
|
+
type WithReactorResolvers<Params, Key extends PropertyKey> = { [K in keyof Params]: K extends Key ? WithReactorResolver<Params[K]> : Params[K]; };
|
|
1239
|
+
type DropdownParams<T, R extends boolean, A extends AnyPieceAuth> = Parameters<typeof Property$1.Dropdown<T, R, A>>[0];
|
|
1240
|
+
type MultiSelectDropdownParams<T, R extends boolean, A extends AnyPieceAuth> = Parameters<typeof Property$1.MultiSelectDropdown<T, R, A>>[0];
|
|
1241
|
+
type DynamicPropertiesParams<R extends boolean, A extends AnyPieceAuth> = Parameters<typeof Property$1.DynamicProperties<R, A>>[0];
|
|
1242
|
+
export declare const Property: {
|
|
1243
|
+
ShortText<R extends boolean>(request: {
|
|
1244
|
+
displayName: string;
|
|
1245
|
+
description?: string | undefined;
|
|
1246
|
+
advanced?: boolean | undefined;
|
|
1247
|
+
width?: "full" | "half" | undefined;
|
|
1248
|
+
icon?: string | undefined;
|
|
1249
|
+
placeholder?: string | undefined;
|
|
1250
|
+
required: R;
|
|
1251
|
+
defaultValue?: string | undefined;
|
|
1252
|
+
}): R extends true ? ShortTextProperty<true> : ShortTextProperty<false>;
|
|
1253
|
+
Checkbox<R extends boolean>(request: {
|
|
1254
|
+
displayName: string;
|
|
1255
|
+
description?: string | undefined;
|
|
1256
|
+
advanced?: boolean | undefined;
|
|
1257
|
+
width?: "full" | "half" | undefined;
|
|
1258
|
+
icon?: string | undefined;
|
|
1259
|
+
placeholder?: string | undefined;
|
|
1260
|
+
required: R;
|
|
1261
|
+
defaultValue?: boolean | undefined;
|
|
1262
|
+
reveals?: string[];
|
|
1263
|
+
}): R extends true ? CheckboxProperty<true> : CheckboxProperty<false>;
|
|
1264
|
+
LongText<R extends boolean>(request: {
|
|
1265
|
+
displayName: string;
|
|
1266
|
+
description?: string | undefined;
|
|
1267
|
+
advanced?: boolean | undefined;
|
|
1268
|
+
width?: "full" | "half" | undefined;
|
|
1269
|
+
icon?: string | undefined;
|
|
1270
|
+
placeholder?: string | undefined;
|
|
1271
|
+
required: R;
|
|
1272
|
+
defaultValue?: string | undefined;
|
|
1273
|
+
}): R extends true ? LongTextProperty<true> : LongTextProperty<false>;
|
|
1274
|
+
RichText<R extends boolean>(request: {
|
|
1275
|
+
displayName: string;
|
|
1276
|
+
description?: string | undefined;
|
|
1277
|
+
advanced?: boolean | undefined;
|
|
1278
|
+
width?: "full" | "half" | undefined;
|
|
1279
|
+
icon?: string | undefined;
|
|
1280
|
+
placeholder?: string | undefined;
|
|
1281
|
+
required: R;
|
|
1282
|
+
defaultValue?: string | undefined;
|
|
1283
|
+
formatProperty?: string;
|
|
1284
|
+
}): R extends true ? RichTextProperty<true> : RichTextProperty<false>;
|
|
1285
|
+
MarkDown(request: {
|
|
1286
|
+
value: string;
|
|
1287
|
+
variant?: MarkdownVariant;
|
|
1288
|
+
}): MarkDownProperty;
|
|
1289
|
+
Number<R extends boolean>(request: {
|
|
1290
|
+
displayName: string;
|
|
1291
|
+
description?: string | undefined;
|
|
1292
|
+
advanced?: boolean | undefined;
|
|
1293
|
+
width?: "full" | "half" | undefined;
|
|
1294
|
+
icon?: string | undefined;
|
|
1295
|
+
placeholder?: string | undefined;
|
|
1296
|
+
required: R;
|
|
1297
|
+
defaultValue?: number | undefined;
|
|
1298
|
+
display?: "stepper";
|
|
1299
|
+
min?: number;
|
|
1300
|
+
max?: number;
|
|
1301
|
+
step?: number;
|
|
1302
|
+
}): R extends true ? NumberProperty<true> : NumberProperty<false>;
|
|
1303
|
+
Json<R extends boolean>(request: {
|
|
1304
|
+
displayName: string;
|
|
1305
|
+
description?: string | undefined;
|
|
1306
|
+
advanced?: boolean | undefined;
|
|
1307
|
+
width?: "full" | "half" | undefined;
|
|
1308
|
+
icon?: string | undefined;
|
|
1309
|
+
placeholder?: string | undefined;
|
|
1310
|
+
required: R;
|
|
1311
|
+
defaultValue?: object | undefined;
|
|
1312
|
+
}): R extends true ? JsonProperty<true> : JsonProperty<false>;
|
|
1313
|
+
Array<R extends boolean>(request: {
|
|
1314
|
+
displayName: string;
|
|
1315
|
+
description?: string | undefined;
|
|
1316
|
+
advanced?: boolean | undefined;
|
|
1317
|
+
width?: "full" | "half" | undefined;
|
|
1318
|
+
icon?: string | undefined;
|
|
1319
|
+
placeholder?: string | undefined;
|
|
1320
|
+
required: R;
|
|
1321
|
+
defaultValue?: unknown[] | undefined;
|
|
1322
|
+
properties?: ArraySubProps<R> | undefined;
|
|
1323
|
+
}): R extends true ? ArrayProperty<true> : ArrayProperty<false>;
|
|
1324
|
+
Object<R extends boolean>(request: {
|
|
1325
|
+
displayName: string;
|
|
1326
|
+
description?: string | undefined;
|
|
1327
|
+
advanced?: boolean | undefined;
|
|
1328
|
+
width?: "full" | "half" | undefined;
|
|
1329
|
+
icon?: string | undefined;
|
|
1330
|
+
placeholder?: string | undefined;
|
|
1331
|
+
required: R;
|
|
1332
|
+
defaultValue?: unknown;
|
|
1333
|
+
}): R extends true ? ObjectProperty<true> : ObjectProperty<false>;
|
|
1334
|
+
StaticDropdown<T, R extends boolean = boolean>(request: {
|
|
1335
|
+
displayName: string;
|
|
1336
|
+
description?: string | undefined;
|
|
1337
|
+
advanced?: boolean | undefined;
|
|
1338
|
+
width?: "full" | "half" | undefined;
|
|
1339
|
+
icon?: string | undefined;
|
|
1340
|
+
placeholder?: string | undefined;
|
|
1341
|
+
required: R;
|
|
1342
|
+
defaultValue?: unknown;
|
|
1343
|
+
options: DropdownState<T>;
|
|
1344
|
+
display?: StaticDropdownDisplay;
|
|
1345
|
+
}): R extends true ? StaticDropdownProperty<T, true> : StaticDropdownProperty<T, false>;
|
|
1346
|
+
StaticMultiSelectDropdown<T, R extends boolean = boolean>(request: {
|
|
1347
|
+
displayName: string;
|
|
1348
|
+
description?: string | undefined;
|
|
1349
|
+
advanced?: boolean | undefined;
|
|
1350
|
+
width?: "full" | "half" | undefined;
|
|
1351
|
+
icon?: string | undefined;
|
|
1352
|
+
placeholder?: string | undefined;
|
|
1353
|
+
required: R;
|
|
1354
|
+
defaultValue?: unknown[] | undefined;
|
|
1355
|
+
options: DropdownState<T>;
|
|
1356
|
+
}): R extends true ? StaticMultiSelectDropdownProperty<T, true> : StaticMultiSelectDropdownProperty<T, false>;
|
|
1357
|
+
DateTime<R extends boolean>(request: {
|
|
1358
|
+
displayName: string;
|
|
1359
|
+
description?: string | undefined;
|
|
1360
|
+
advanced?: boolean | undefined;
|
|
1361
|
+
width?: "full" | "half" | undefined;
|
|
1362
|
+
icon?: string | undefined;
|
|
1363
|
+
placeholder?: string | undefined;
|
|
1364
|
+
required: R;
|
|
1365
|
+
defaultValue?: string | undefined;
|
|
1366
|
+
}): R extends true ? DateTimeProperty<true> : DateTimeProperty<false>;
|
|
1367
|
+
DateRange<R extends boolean>(request: {
|
|
1368
|
+
displayName: string;
|
|
1369
|
+
description?: string | undefined;
|
|
1370
|
+
advanced?: boolean | undefined;
|
|
1371
|
+
width?: "full" | "half" | undefined;
|
|
1372
|
+
icon?: string | undefined;
|
|
1373
|
+
placeholder?: string | undefined;
|
|
1374
|
+
required: R;
|
|
1375
|
+
defaultValue?: object | undefined;
|
|
1376
|
+
display?: "dropdown";
|
|
1377
|
+
}): R extends true ? DateRangeProperty<true> : DateRangeProperty<false>;
|
|
1378
|
+
File<R extends boolean, S extends boolean = false>(request: {
|
|
1379
|
+
streaming?: S | undefined;
|
|
1380
|
+
displayName: string;
|
|
1381
|
+
description?: string | undefined;
|
|
1382
|
+
advanced?: boolean | undefined;
|
|
1383
|
+
width?: "full" | "half" | undefined;
|
|
1384
|
+
icon?: string | undefined;
|
|
1385
|
+
placeholder?: string | undefined;
|
|
1386
|
+
required: R;
|
|
1387
|
+
defaultValue?: ApFile | undefined;
|
|
1388
|
+
}): FileProperty<R extends true ? true : false, S extends true ? true : false>;
|
|
1389
|
+
Custom<R extends boolean>(request: Omit<{
|
|
1390
|
+
displayName: string;
|
|
1391
|
+
description?: string | undefined;
|
|
1392
|
+
advanced?: boolean | undefined;
|
|
1393
|
+
width?: "full" | "half" | undefined;
|
|
1394
|
+
icon?: string | undefined;
|
|
1395
|
+
placeholder?: string | undefined;
|
|
1396
|
+
required: R;
|
|
1397
|
+
defaultValue?: unknown;
|
|
1398
|
+
code: string;
|
|
1399
|
+
}, "code"> & {
|
|
1400
|
+
code: (ctx: CustomPropertyCodeFunctionParams) => (() => void) | void;
|
|
1401
|
+
}): R extends true ? CustomProperty<true> : CustomProperty<false>;
|
|
1402
|
+
Color<R extends boolean>(request: {
|
|
1403
|
+
displayName: string;
|
|
1404
|
+
description?: string | undefined;
|
|
1405
|
+
advanced?: boolean | undefined;
|
|
1406
|
+
width?: "full" | "half" | undefined;
|
|
1407
|
+
icon?: string | undefined;
|
|
1408
|
+
placeholder?: string | undefined;
|
|
1409
|
+
required: R;
|
|
1410
|
+
defaultValue?: string | undefined;
|
|
1411
|
+
}): R extends true ? ColorProperty<true> : ColorProperty<false>;
|
|
1412
|
+
Dropdown<T, R extends boolean = boolean, A extends AnyPieceAuth = undefined>(request: WithReactorResolvers<DropdownParams<T, R, A>, "options">): ReturnType<typeof Property$1.Dropdown<T, R, A>>;
|
|
1413
|
+
MultiSelectDropdown<T, R extends boolean = boolean, A extends AnyPieceAuth = undefined>(request: WithReactorResolvers<MultiSelectDropdownParams<T, R, A>, "options">): ReturnType<typeof Property$1.MultiSelectDropdown<T, R, A>>;
|
|
1414
|
+
DynamicProperties<R extends boolean = boolean, A extends AnyPieceAuth = undefined>(request: WithReactorResolvers<DynamicPropertiesParams<R, A>, "props">): ReturnType<typeof Property$1.DynamicProperties<R, A>>;
|
|
1415
|
+
};
|
|
1416
|
+
//#endregion
|
|
1417
|
+
//#region src/powerhouse/errors.d.ts
|
|
1418
|
+
export declare const ReactorJobPendingError = "ReactorJobPendingError";
|
|
1419
|
+
export declare const ReactorJobFailedError = "ReactorJobFailedError";
|
|
1420
|
+
export declare const ReactorActionsFailedError = "ReactorActionsFailedError";
|
|
1421
|
+
export declare const ReactorAccessDeniedError = "ReactorAccessDeniedError";
|
|
1422
|
+
export declare const ReactorRequestClosedError = "ReactorRequestClosedError";
|
|
1423
|
+
export declare const DocumentModelUnavailableError = "DocumentModelUnavailableError";
|
|
1424
|
+
type ReactorErrorName = typeof ReactorJobPendingError | typeof ReactorJobFailedError | typeof ReactorActionsFailedError | typeof ReactorAccessDeniedError | typeof ReactorRequestClosedError | typeof DocumentModelUnavailableError;
|
|
1425
|
+
export declare const DENIED_ACTION_INDEXES = "denied action indexes: ";
|
|
1426
|
+
export declare function deniedActionIndexes(error: unknown): number[] | undefined;
|
|
1427
|
+
export declare function assertActionsApplied(job: Pick<JobInfo, "result">, actions?: readonly Pick<Action$1, "id" | "type">[]): void;
|
|
1428
|
+
//#endregion
|
|
1429
|
+
//#region src/powerhouse/package-piece.d.ts
|
|
1430
|
+
interface PackagePiece {
|
|
1431
|
+
name: string;
|
|
1432
|
+
bundle?: string;
|
|
1433
|
+
entry?: string;
|
|
1434
|
+
}
|
|
1435
|
+
//#endregion
|
|
1436
|
+
export { Action, ActionBase, ActionClassification, ActionContext, type ActionDefaults, type ActionRetryDefault, ActionRunner, type AgentProviderModel, type AgentResult, AiMetadata, ApFile, type ApStreamingFile, AppConnectionType, type AppConnectionValue, AppConnectionValueForAuthProperty, ArrayProperty, ArraySubProps, Audience, AuthValidationServerContext, BaseContext, BasePropertySchema, type BasicAuthConnectionValue, BasicAuthProperty, BasicAuthPropertyValue, CheckboxProperty, ConnectionsManager, ContextVersion, type CreateActionParams, type CreateTriggerParams, CreateWaitpointHook, CreateWaitpointParams, CreateWaitpointResult, type CustomAuthConnectionValue, CustomAuthProperty, CustomAuthProps, CustomAuthRefresh, CustomProperty, type CustomPropertyCodeFunctionParams, DEDUPE_KEY_PROPERTY, DEFAULT_CONNECTION_DISPLAY_NAME, DateRangePreset, DateRangeProperty, DateRangeValue, DateTimeProperty, type Declared, type DriveReadMethods, type DriveWriteHalfMethods, type DriveWriteMethods, DropdownOption, DropdownProperty, DropdownState, DynamicProp, DynamicProperties, DynamicPropsValue, ErrorHandlingOptionsParam, ExecutePropsResult, type ExecuteToolResponse, ExecutionType, type ExtractPieceAuthPropertyTypeForMethods, type FieldFormat, FileProperty, FilesService, FlowsContext, I18nForPiece, IAction, ITrigger, type IndexQueryMethods, type IndexQueryRequest, type IndexQueryResult, InputProperty, InputPropertyMap, JsonProperty, LATEST_CONTEXT_VERSION, ListFlowsContextParams, LongTextProperty, MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION, MarkdownVariant, MultiSelectDropdownProperty, type NoAuthConnectionValue, NumberProperty, OAuth2AuthorizationMethod, type OAuth2ConnectionValueWithApp, OAuth2Discovery, OAuth2GrantType, OAuth2Property, OAuth2PropertyValue, OAuth2Props, OIDCAuthProps, OIDCProperty, ObjectProperty, OnStartContext, OutputContext, type OutputSchema, type OutputSchemaField, type PackagePiece, PauseHook, PauseHookParams, PieceAuth, PieceAuthProperty, PieceBase, PieceCategory, PieceMetadata, PieceMetadataModel, PieceMetadataModelSummary, PieceMetadataSummary, PiecePackageInformation, PiecePropValueSchema, PieceProperty, PiecePropertyMap, PieceServerContextError, type PopulatedFlow, type PopulatedFlowSummary, PropertyGroup, PropertyGroupDisplay, PropertyType, READ_ONLY_CLASSIFICATIONS, type ReactorClient, type ReactorClientFor, type ReactorContext, type ReactorDeclaration, type ReactorErrorName, type ReactorReadClient, type ReactorWriteClient, type ReadMethods, type RefusedDriveMethods, type RefusedMethods, type RefusedWriteHalfMethods, type RequireReactor, RespondHook, RespondHookParams, RichTextProperty, RunContext, type SecretTextConnectionValue, SecretTextProperty, SeekPage, ServerContext, SetScheduleRequest, ShortTextProperty, StaticDropdownProperty, StaticMultiSelectDropdownProperty, StaticPropsValue, StepContext, StopHook, StopHookParams, Store, StoreScope, TagsManager, TestOrRunHookContext, type ToolCallBase, Trigger, TriggerBase, TriggerHookContext, TriggerStrategy, UploadedFile, WaitForWaitpointHook, type WebhookHandshakeConfiguration, WebhookHandshakeStrategy, WebhookRenewConfiguration, WebhookRenewStrategy, WebhookResponse, type WriteHalfMethods, type WriteMethods, apId, backwardCompatabilityContextUtils, dateRangeUtils, getAuthPropertyForValue, isPieceServerContextError, isReadOnlyClassification };
|
|
1437
|
+
export {};
|
|
1438
|
+
//# sourceMappingURL=index.d.ts.map
|