Unified · Split
| @@ -8,95 +8,8 @@ · 7 unmodified lines | |||
| 8 | * @module | 8 | * @module |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | import type * as accounts from "../accounts.js"; | 11 | import type { FunctionReference } from "convex/server"; |
| 12 | import type * as app from "../app.js"; | 12 | import type { GenericId as Id } from "convex/values"; |
| 13 | import type * as auth from "../auth.js"; | ||
| 14 | import type * as billing from "../billing.js"; | ||
| 15 | import type * as billingInternal from "../billingInternal.js"; | ||
| 16 | import type * as billingSync from "../billingSync.js"; | ||
| 17 | import type * as credentialsNode from "../credentialsNode.js"; | ||
| 18 | import type * as database from "../database.js"; | ||
| 19 | import type * as database_anonymous_session from "../database/anonymous_session.js"; | ||
| 20 | import type * as database_approvals from "../database/approvals.js"; | ||
| 21 | import type * as database_credentials from "../database/credentials.js"; | ||
| 22 | import type * as database_policies from "../database/policies.js"; | ||
| 23 | import type * as database_storage_instances from "../database/storage_instances.js"; | ||
| 24 | import type * as database_task_events from "../database/task_events.js"; | ||
| 25 | import type * as database_tasks from "../database/tasks.js"; | ||
| 26 | import type * as database_tool_calls from "../database/tool_calls.js"; | ||
| 27 | import type * as database_tool_sources from "../database/tool_sources.js"; | ||
| 28 | import type * as executor from "../executor.js"; | ||
| 29 | import type * as executorNode from "../executorNode.js"; | ||
| 30 | import type * as executorRuntimeNode from "../executorRuntimeNode.js"; | ||
| 31 | import type * as http from "../http.js"; | ||
| 32 | import type * as http_anonymous_auth from "../http/anonymous_auth.js"; | ||
| 33 | import type * as http_mcp_auth from "../http/mcp_auth.js"; | ||
| 34 | import type * as http_mcp_handler from "../http/mcp_handler.js"; | ||
| 35 | import type * as http_mcp_service from "../http/mcp_service.js"; | ||
| 36 | import type * as http_oauth_handlers from "../http/oauth_handlers.js"; | ||
| 37 | import type * as http_openapi_handler from "../http/openapi_handler.js"; | ||
| 38 | import type * as http_openapi_spec from "../http/openapi_spec.js"; | ||
| 39 | import type * as http_openapi_spec_registry from "../http/openapi_spec_registry.js"; | ||
| 40 | import type * as invites from "../invites.js"; | ||
| 41 | import type * as migrations from "../migrations.js"; | ||
| 42 | import type * as openApiSpecCache from "../openApiSpecCache.js"; | ||
| 43 | import type * as organizationMembers from "../organizationMembers.js"; | ||
| 44 | import type * as organizations from "../organizations.js"; | ||
| 45 | import type * as runtimeCallbacks from "../runtimeCallbacks.js"; | ||
| 46 | import type * as runtimeNode from "../runtimeNode.js"; | ||
| 47 | import type * as toolRegistry from "../toolRegistry.js"; | ||
| 48 | import type * as workspace from "../workspace.js"; | ||
| 49 | import type * as workspaceAuthInternal from "../workspaceAuthInternal.js"; | ||
| 50 | import type * as workspaces from "../workspaces.js"; | ||
| 51 | |||
| 52 | import type { | ||
| 53 | ApiFromModules, | ||
| 54 | FilterApi, | ||
| 55 | FunctionReference, | ||
| 56 | } from "convex/server"; | ||
| 57 | |||
| 58 | declare const fullApi: ApiFromModules<{ | ||
| 59 | accounts: typeof accounts; | ||
| 60 | app: typeof app; | ||
| 61 | auth: typeof auth; | ||
| 62 | billing: typeof billing; | ||
| 63 | billingInternal: typeof billingInternal; | ||
| 64 | billingSync: typeof billingSync; | ||
| 65 | credentialsNode: typeof credentialsNode; | ||
| 66 | database: typeof database; | ||
| 67 | "database/anonymous_session": typeof database_anonymous_session; | ||
| 68 | "database/approvals": typeof database_approvals; | ||
| 69 | "database/credentials": typeof database_credentials; | ||
| 70 | "database/policies": typeof database_policies; | ||
| 71 | "database/storage_instances": typeof database_storage_instances; | ||
| 72 | "database/task_events": typeof database_task_events; | ||
| 73 | "database/tasks": typeof database_tasks; | ||
| 74 | "database/tool_calls": typeof database_tool_calls; | ||
| 75 | "database/tool_sources": typeof database_tool_sources; | ||
| 76 | executor: typeof executor; | ||
| 77 | executorNode: typeof executorNode; | ||
| 78 | executorRuntimeNode: typeof executorRuntimeNode; | ||
| 79 | http: typeof http; | ||
| 80 | "http/anonymous_auth": typeof http_anonymous_auth; | ||
| 81 | "http/mcp_auth": typeof http_mcp_auth; | ||
| 82 | "http/mcp_handler": typeof http_mcp_handler; | ||
| 83 | "http/mcp_service": typeof http_mcp_service; | ||
| 84 | "http/oauth_handlers": typeof http_oauth_handlers; | ||
| 85 | "http/openapi_handler": typeof http_openapi_handler; | ||
| 86 | "http/openapi_spec": typeof http_openapi_spec; | ||
| 87 | "http/openapi_spec_registry": typeof http_openapi_spec_registry; | ||
| 88 | invites: typeof invites; | ||
| 89 | migrations: typeof migrations; | ||
| 90 | openApiSpecCache: typeof openApiSpecCache; | ||
| 91 | organizationMembers: typeof organizationMembers; | ||
| 92 | organizations: typeof organizations; | ||
| 93 | runtimeCallbacks: typeof runtimeCallbacks; | ||
| 94 | runtimeNode: typeof runtimeNode; | ||
| 95 | toolRegistry: typeof toolRegistry; | ||
| 96 | workspace: typeof workspace; | ||
| 97 | workspaceAuthInternal: typeof workspaceAuthInternal; | ||
| 98 | workspaces: typeof workspaces; | ||
| 99 | }>; | ||
| 100 | 13 | ||
| 101 | /** | 14 | /** |
| 102 | * A utility for referencing Convex functions in your app's public API. | 15 | * A utility for referencing Convex functions in your app's public API. |
| @@ -106,10 +19,608 @@ declare const fullApi: ApiFromModules<{ · 3 unmodified lines | |||
| 106 | * const myFunctionReference = api.myModule.myFunction; | 19 | * const myFunctionReference = api.myModule.myFunction; |
| 107 | * ``` | 20 | * ``` |
| 108 | */ | 21 | */ |
| 109 | export declare const api: FilterApi< | 22 | export declare const api: { |
| 110 | typeof fullApi, | 23 | accounts: { |
| 111 | FunctionReference<any, "public"> | 24 | deleteCurrentAccount: FunctionReference< |
| 112 | >; | 25 | "mutation", |
| 26 | "public", | ||
| 27 | { sessionId?: string }, | ||
| 28 | any | ||
| 29 | >; | ||
| 30 | }; | ||
| 31 | app: { | ||
| 32 | getClientConfig: FunctionReference<"query", "public", {}, any>; | ||
| 33 | getCurrentAccount: FunctionReference< | ||
| 34 | "query", | ||
| 35 | "public", | ||
| 36 | { sessionId?: string }, | ||
| 37 | any | ||
| 38 | >; | ||
| 39 | }; | ||
| 40 | auth: { | ||
| 41 | bootstrapCurrentWorkosAccount: FunctionReference< | ||
| 42 | "mutation", | ||
| 43 | "public", | ||
| 44 | { sessionId?: string }, | ||
| 45 | any | ||
| 46 | >; | ||
| 47 | }; | ||
| 48 | billing: { | ||
| 49 | createCustomerPortal: FunctionReference< | ||
| 50 | "action", | ||
| 51 | "public", | ||
| 52 | { | ||
| 53 | organizationId: Id<"organizations">; | ||
| 54 | returnUrl?: string; | ||
| 55 | sessionId?: string; | ||
| 56 | }, | ||
| 57 | { url: string } | ||
| 58 | >; | ||
| 59 | createSubscriptionCheckout: FunctionReference< | ||
| 60 | "action", | ||
| 61 | "public", | ||
| 62 | { | ||
| 63 | cancelUrl?: string; | ||
| 64 | organizationId: Id<"organizations">; | ||
| 65 | priceId: string; | ||
| 66 | sessionId?: string; | ||
| 67 | successUrl?: string; | ||
| 68 | }, | ||
| 69 | any | ||
| 70 | >; | ||
| 71 | getSummary: FunctionReference< | ||
| 72 | "query", | ||
| 73 | "public", | ||
| 74 | { organizationId: Id<"organizations">; sessionId?: string }, | ||
| 75 | any | ||
| 76 | >; | ||
| 77 | retrySeatSync: FunctionReference< | ||
| 78 | "mutation", | ||
| 79 | "public", | ||
| 80 | { organizationId: Id<"organizations">; sessionId?: string }, | ||
| 81 | any | ||
| 82 | >; | ||
| 83 | }; | ||
| 84 | credentialsNode: { | ||
| 85 | upsertCredential: FunctionReference< | ||
| 86 | "action", | ||
| 87 | "public", | ||
| 88 | { | ||
| 89 | accountId?: Id<"accounts">; | ||
| 90 | id?: string; | ||
| 91 | provider?: "local-convex" | "workos-vault"; | ||
| 92 | scopeType?: "account" | "organization" | "workspace"; | ||
| 93 | secretJson: Record<string, any>; | ||
| 94 | sessionId?: string; | ||
| 95 | sourceKey: string; | ||
| 96 | workspaceId: Id<"workspaces">; | ||
| 97 | }, | ||
| 98 | any | ||
| 99 | >; | ||
| 100 | }; | ||
| 101 | executor: { | ||
| 102 | createTask: FunctionReference< | ||
| 103 | "action", | ||
| 104 | "public", | ||
| 105 | { | ||
| 106 | accountId?: Id<"accounts">; | ||
| 107 | code: string; | ||
| 108 | metadata?: Record<string, any>; | ||
| 109 | runtimeId?: string; | ||
| 110 | sessionId?: string; | ||
| 111 | timeoutMs?: number; | ||
| 112 | waitForResult?: boolean; | ||
| 113 | workspaceId: Id<"workspaces">; | ||
| 114 | }, | ||
| 115 | any | ||
| 116 | >; | ||
| 117 | resolveApproval: FunctionReference< | ||
| 118 | "mutation", | ||
| 119 | "public", | ||
| 120 | { | ||
| 121 | approvalId: string; | ||
| 122 | decision: "approved" | "denied"; | ||
| 123 | reason?: string; | ||
| 124 | reviewerId?: string; | ||
| 125 | sessionId?: string; | ||
| 126 | workspaceId: Id<"workspaces">; | ||
| 127 | }, | ||
| 128 | any | ||
| 129 | >; | ||
| 130 | }; | ||
| 131 | executorNode: { | ||
| 132 | listToolsWithWarnings: FunctionReference< | ||
| 133 | "action", | ||
| 134 | "public", | ||
| 135 | { | ||
| 136 | accountId?: Id<"accounts">; | ||
| 137 | buildId?: string; | ||
| 138 | cursor?: string; | ||
| 139 | fetchAll?: boolean; | ||
| 140 | includeDetails?: boolean; | ||
| 141 | includeSourceMeta?: boolean; | ||
| 142 | limit?: number; | ||
| 143 | rebuildInventory?: boolean; | ||
| 144 | sessionId?: string; | ||
| 145 | source?: string; | ||
| 146 | sourceName?: string; | ||
| 147 | toolPaths?: Array<string>; | ||
| 148 | workspaceId: Id<"workspaces">; | ||
| 149 | }, | ||
| 150 | any | ||
| 151 | >; | ||
| 152 | previewOpenApiSourceUpgrade: FunctionReference< | ||
| 153 | "action", | ||
| 154 | "public", | ||
| 155 | { | ||
| 156 | accountId?: Id<"accounts">; | ||
| 157 | config: Record<string, any>; | ||
| 158 | name: string; | ||
| 159 | sessionId?: string; | ||
| 160 | sourceId: string; | ||
| 161 | workspaceId: Id<"workspaces">; | ||
| 162 | }, | ||
| 163 | any | ||
| 164 | >; | ||
| 165 | storageListDirectory: FunctionReference< | ||
| 166 | "action", | ||
| 167 | "public", | ||
| 168 | { | ||
| 169 | accountId?: Id<"accounts">; | ||
| 170 | instanceId: string; | ||
| 171 | path?: string; | ||
| 172 | sessionId?: string; | ||
| 173 | workspaceId: Id<"workspaces">; | ||
| 174 | }, | ||
| 175 | any | ||
| 176 | >; | ||
| 177 | storageListKv: FunctionReference< | ||
| 178 | "action", | ||
| 179 | "public", | ||
| 180 | { | ||
| 181 | accountId?: Id<"accounts">; | ||
| 182 | instanceId: string; | ||
| 183 | limit?: number; | ||
| 184 | prefix?: string; | ||
| 185 | sessionId?: string; | ||
| 186 | workspaceId: Id<"workspaces">; | ||
| 187 | }, | ||
| 188 | any | ||
| 189 | >; | ||
| 190 | storageQuerySql: FunctionReference< | ||
| 191 | "action", | ||
| 192 | "public", | ||
| 193 | { | ||
| 194 | accountId?: Id<"accounts">; | ||
| 195 | instanceId: string; | ||
| 196 | maxRows?: number; | ||
| 197 | params?: Array<string | number | boolean | null>; | ||
| 198 | sessionId?: string; | ||
| 199 | sql: string; | ||
| 200 | workspaceId: Id<"workspaces">; | ||
| 201 | }, | ||
| 202 | any | ||
| 203 | >; | ||
| 204 | storageReadFile: FunctionReference< | ||
| 205 | "action", | ||
| 206 | "public", | ||
| 207 | { | ||
| 208 | accountId?: Id<"accounts">; | ||
| 209 | encoding?: "utf8" | "base64"; | ||
| 210 | instanceId: string; | ||
| 211 | path: string; | ||
| 212 | sessionId?: string; | ||
| 213 | workspaceId: Id<"workspaces">; | ||
| 214 | }, | ||
| 215 | any | ||
| 216 | >; | ||
| 217 | }; | ||
| 218 | invites: { | ||
| 219 | create: FunctionReference< | ||
| 220 | "mutation", | ||
| 221 | "public", | ||
| 222 | { | ||
| 223 | email: string; | ||
| 224 | expiresInDays?: number; | ||
| 225 | organizationId: Id<"organizations">; | ||
| 226 | role: "owner" | "admin" | "member" | "billing_admin"; | ||
| 227 | sessionId?: string; | ||
| 228 | }, | ||
| 229 | any | ||
| 230 | >; | ||
| 231 | list: FunctionReference< | ||
| 232 | "query", | ||
| 233 | "public", | ||
| 234 | { organizationId: Id<"organizations">; sessionId?: string }, | ||
| 235 | any | ||
| 236 | >; | ||
| 237 | revoke: FunctionReference< | ||
| 238 | "mutation", | ||
| 239 | "public", | ||
| 240 | { | ||
| 241 | inviteId: Id<"invites">; | ||
| 242 | organizationId: Id<"organizations">; | ||
| 243 | sessionId?: string; | ||
| 244 | }, | ||
| 245 | any | ||
| 246 | >; | ||
| 247 | }; | ||
| 248 | organizationMembers: { | ||
| 249 | list: FunctionReference< | ||
| 250 | "query", | ||
| 251 | "public", | ||
| 252 | { organizationId: Id<"organizations">; sessionId?: string }, | ||
| 253 | any | ||
| 254 | >; | ||
| 255 | remove: FunctionReference< | ||
| 256 | "mutation", | ||
| 257 | "public", | ||
| 258 | { | ||
| 259 | accountId: Id<"accounts">; | ||
| 260 | organizationId: Id<"organizations">; | ||
| 261 | sessionId?: string; | ||
| 262 | }, | ||
| 263 | any | ||
| 264 | >; | ||
| 265 | updateBillable: FunctionReference< | ||
| 266 | "mutation", | ||
| 267 | "public", | ||
| 268 | { | ||
| 269 | accountId: Id<"accounts">; | ||
| 270 | billable: boolean; | ||
| 271 | organizationId: Id<"organizations">; | ||
| 272 | sessionId?: string; | ||
| 273 | }, | ||
| 274 | any | ||
| 275 | >; | ||
| 276 | updateRole: FunctionReference< | ||
| 277 | "mutation", | ||
| 278 | "public", | ||
| 279 | { | ||
| 280 | accountId: Id<"accounts">; | ||
| 281 | organizationId: Id<"organizations">; | ||
| 282 | role: "owner" | "admin" | "member" | "billing_admin"; | ||
| 283 | sessionId?: string; | ||
| 284 | }, | ||
| 285 | any | ||
| 286 | >; | ||
| 287 | }; | ||
| 288 | organizations: { | ||
| 289 | create: FunctionReference< | ||
| 290 | "mutation", | ||
| 291 | "public", | ||
| 292 | { name: string; sessionId?: string }, | ||
| 293 | any | ||
| 294 | >; | ||
| 295 | getNavigationState: FunctionReference< | ||
| 296 | "query", | ||
| 297 | "public", | ||
| 298 | { sessionId?: string }, | ||
| 299 | any | ||
| 300 | >; | ||
| 301 | getOrganizationAccess: FunctionReference< | ||
| 302 | "query", | ||
| 303 | "public", | ||
| 304 | { organizationId: Id<"organizations">; sessionId?: string }, | ||
| 305 | any | ||
| 306 | >; | ||
| 307 | listMine: FunctionReference<"query", "public", { sessionId?: string }, any>; | ||
| 308 | resolveWorkosOrganizationId: FunctionReference< | ||
| 309 | "query", | ||
| 310 | "public", | ||
| 311 | { organizationId: Id<"organizations">; sessionId?: string }, | ||
| 312 | any | ||
| 313 | >; | ||
| 314 | }; | ||
| 315 | runtimeCallbacks: { | ||
| 316 | completeRun: FunctionReference< | ||
| 317 | "mutation", | ||
| 318 | "public", | ||
| 319 | { | ||
| 320 | durationMs?: number; | ||
| 321 | error?: string; | ||
| 322 | exitCode?: number; | ||
| 323 | internalSecret: string; | ||
| 324 | runId: string; | ||
| 325 | status: "completed" | "failed" | "timed_out" | "denied"; | ||
| 326 | }, | ||
| 327 | any | ||
| 328 | >; | ||
| 329 | getApprovalStatus: FunctionReference< | ||
| 330 | "query", | ||
| 331 | "public", | ||
| 332 | { approvalId: string; internalSecret: string; runId: string }, | ||
| 333 | any | ||
| 334 | >; | ||
| 335 | getTaskWatchStatus: FunctionReference< | ||
| 336 | "query", | ||
| 337 | "public", | ||
| 338 | { internalSecret: string; runId: string; workspaceId: Id<"workspaces"> }, | ||
| 339 | any | ||
| 340 | >; | ||
| 341 | handleToolCall: FunctionReference< | ||
| 342 | "action", | ||
| 343 | "public", | ||
| 344 | { | ||
| 345 | callId: string; | ||
| 346 | input?: Record<string, any>; | ||
| 347 | internalSecret: string; | ||
| 348 | runId: string; | ||
| 349 | toolPath: string; | ||
| 350 | }, | ||
| 351 | any | ||
| 352 | >; | ||
| 353 | }; | ||
| 354 | workspace: { | ||
| 355 | bootstrapAnonymousSession: FunctionReference< | ||
| 356 | "mutation", | ||
| 357 | "public", | ||
| 358 | { accountId?: string; sessionId?: string }, | ||
| 359 | any | ||
| 360 | >; | ||
| 361 | closeStorageInstance: FunctionReference< | ||
| 362 | "mutation", | ||
| 363 | "public", | ||
| 364 | { instanceId: string; sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 365 | any | ||
| 366 | >; | ||
| 367 | deleteStorageInstance: FunctionReference< | ||
| 368 | "mutation", | ||
| 369 | "public", | ||
| 370 | { instanceId: string; sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 371 | any | ||
| 372 | >; | ||
| 373 | deleteToolPolicyAssignment: FunctionReference< | ||
| 374 | "mutation", | ||
| 375 | "public", | ||
| 376 | { bindingId: string; sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 377 | any | ||
| 378 | >; | ||
| 379 | deleteToolPolicyRule: FunctionReference< | ||
| 380 | "mutation", | ||
| 381 | "public", | ||
| 382 | { | ||
| 383 | roleId: string; | ||
| 384 | ruleId: string; | ||
| 385 | sessionId?: string; | ||
| 386 | workspaceId: Id<"workspaces">; | ||
| 387 | }, | ||
| 388 | any | ||
| 389 | >; | ||
| 390 | deleteToolPolicySet: FunctionReference< | ||
| 391 | "mutation", | ||
| 392 | "public", | ||
| 393 | { roleId: string; sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 394 | any | ||
| 395 | >; | ||
| 396 | deleteToolSource: FunctionReference< | ||
| 397 | "mutation", | ||
| 398 | "public", | ||
| 399 | { sessionId?: string; sourceId: string; workspaceId: Id<"workspaces"> }, | ||
| 400 | any | ||
| 401 | >; | ||
| 402 | getMcpApiKey: FunctionReference< | ||
| 403 | "query", | ||
| 404 | "public", | ||
| 405 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 406 | any | ||
| 407 | >; | ||
| 408 | getToolDetails: FunctionReference< | ||
| 409 | "mutation", | ||
| 410 | "public", | ||
| 411 | { | ||
| 412 | sessionId?: string; | ||
| 413 | toolPaths: Array<string>; | ||
| 414 | workspaceId: Id<"workspaces">; | ||
| 415 | }, | ||
| 416 | any | ||
| 417 | >; | ||
| 418 | getToolInventoryProgress: FunctionReference< | ||
| 419 | "query", | ||
| 420 | "public", | ||
| 421 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 422 | any | ||
| 423 | >; | ||
| 424 | listCredentials: FunctionReference< | ||
| 425 | "query", | ||
| 426 | "public", | ||
| 427 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 428 | any | ||
| 429 | >; | ||
| 430 | listPendingApprovals: FunctionReference< | ||
| 431 | "query", | ||
| 432 | "public", | ||
| 433 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 434 | any | ||
| 435 | >; | ||
| 436 | listStorageInstances: FunctionReference< | ||
| 437 | "query", | ||
| 438 | "public", | ||
| 439 | { | ||
| 440 | includeDeleted?: boolean; | ||
| 441 | scopeType?: "scratch" | "account" | "workspace" | "organization"; | ||
| 442 | sessionId?: string; | ||
| 443 | workspaceId: Id<"workspaces">; | ||
| 444 | }, | ||
| 445 | any | ||
| 446 | >; | ||
| 447 | listTasks: FunctionReference< | ||
| 448 | "query", | ||
| 449 | "public", | ||
| 450 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 451 | any | ||
| 452 | >; | ||
| 453 | listToolPolicies: FunctionReference< | ||
| 454 | "query", | ||
| 455 | "public", | ||
| 456 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 457 | any | ||
| 458 | >; | ||
| 459 | listToolPolicyAssignments: FunctionReference< | ||
| 460 | "query", | ||
| 461 | "public", | ||
| 462 | { roleId?: string; sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 463 | any | ||
| 464 | >; | ||
| 465 | listToolPolicyRules: FunctionReference< | ||
| 466 | "query", | ||
| 467 | "public", | ||
| 468 | { roleId: string; sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 469 | any | ||
| 470 | >; | ||
| 471 | listToolPolicySets: FunctionReference< | ||
| 472 | "query", | ||
| 473 | "public", | ||
| 474 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 475 | any | ||
| 476 | >; | ||
| 477 | listToolSources: FunctionReference< | ||
| 478 | "query", | ||
| 479 | "public", | ||
| 480 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 481 | any | ||
| 482 | >; | ||
| 483 | openStorageInstance: FunctionReference< | ||
| 484 | "mutation", | ||
| 485 | "public", | ||
| 486 | { | ||
| 487 | durability?: "ephemeral" | "durable"; | ||
| 488 | instanceId?: string; | ||
| 489 | purpose?: string; | ||
| 490 | scopeType?: "scratch" | "account" | "workspace" | "organization"; | ||
| 491 | sessionId?: string; | ||
| 492 | ttlHours?: number; | ||
| 493 | workspaceId: Id<"workspaces">; | ||
| 494 | }, | ||
| 495 | any | ||
| 496 | >; | ||
| 497 | regenerateToolInventory: FunctionReference< | ||
| 498 | "mutation", | ||
| 499 | "public", | ||
| 500 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 501 | any | ||
| 502 | >; | ||
| 503 | resolveCredential: FunctionReference< | ||
| 504 | "query", | ||
| 505 | "public", | ||
| 506 | { | ||
| 507 | accountId?: Id<"accounts">; | ||
| 508 | scopeType: "account" | "organization" | "workspace"; | ||
| 509 | sessionId?: string; | ||
| 510 | sourceKey: string; | ||
| 511 | workspaceId: Id<"workspaces">; | ||
| 512 | }, | ||
| 513 | any | ||
| 514 | >; | ||
| 515 | upsertCredential: FunctionReference< | ||
| 516 | "mutation", | ||
| 517 | "public", | ||
| 518 | { | ||
| 519 | accountId?: Id<"accounts">; | ||
| 520 | id?: string; | ||
| 521 | overridesJson?: Record<string, any>; | ||
| 522 | provider?: "local-convex" | "workos-vault"; | ||
| 523 | scopeType?: "account" | "organization" | "workspace"; | ||
| 524 | secretJson: Record<string, any>; | ||
| 525 | sessionId?: string; | ||
| 526 | sourceKey: string; | ||
| 527 | workspaceId: Id<"workspaces">; | ||
| 528 | }, | ||
| 529 | any | ||
| 530 | >; | ||
| 531 | upsertToolPolicyAssignment: FunctionReference< | ||
| 532 | "mutation", | ||
| 533 | "public", | ||
| 534 | { | ||
| 535 | clientId?: string; | ||
| 536 | expiresAt?: number; | ||
| 537 | id?: string; | ||
| 538 | roleId: string; | ||
| 539 | scopeType?: "account" | "organization" | "workspace"; | ||
| 540 | sessionId?: string; | ||
| 541 | status?: "active" | "disabled"; | ||
| 542 | targetAccountId?: Id<"accounts">; | ||
| 543 | workspaceId: Id<"workspaces">; | ||
| 544 | }, | ||
| 545 | any | ||
| 546 | >; | ||
| 547 | upsertToolPolicyRule: FunctionReference< | ||
| 548 | "mutation", | ||
| 549 | "public", | ||
| 550 | { | ||
| 551 | approvalMode?: "inherit" | "auto" | "required"; | ||
| 552 | argumentConditions?: Array<{ | ||
| 553 | key: string; | ||
| 554 | operator: "equals" | "contains" | "starts_with" | "not_equals"; | ||
| 555 | value: string; | ||
| 556 | }>; | ||
| 557 | effect?: "allow" | "deny"; | ||
| 558 | id?: string; | ||
| 559 | matchType?: "glob" | "exact"; | ||
| 560 | priority?: number; | ||
| 561 | resourcePattern?: string; | ||
| 562 | roleId: string; | ||
| 563 | selectorType: "all" | "source" | "namespace" | "tool_path"; | ||
| 564 | sessionId?: string; | ||
| 565 | sourceKey?: string; | ||
| 566 | workspaceId: Id<"workspaces">; | ||
| 567 | }, | ||
| 568 | any | ||
| 569 | >; | ||
| 570 | upsertToolPolicySet: FunctionReference< | ||
| 571 | "mutation", | ||
| 572 | "public", | ||
| 573 | { | ||
| 574 | description?: string; | ||
| 575 | id?: string; | ||
| 576 | name: string; | ||
| 577 | sessionId?: string; | ||
| 578 | workspaceId: Id<"workspaces">; | ||
| 579 | }, | ||
| 580 | any | ||
| 581 | >; | ||
| 582 | upsertToolSource: FunctionReference< | ||
| 583 | "mutation", | ||
| 584 | "public", | ||
| 585 | { | ||
| 586 | config: Record<string, any>; | ||
| 587 | enabled?: boolean; | ||
| 588 | id?: string; | ||
| 589 | name: string; | ||
| 590 | scopeType?: "organization" | "workspace"; | ||
| 591 | sessionId?: string; | ||
| 592 | type: "mcp" | "openapi" | "graphql"; | ||
| 593 | workspaceId: Id<"workspaces">; | ||
| 594 | }, | ||
| 595 | any | ||
| 596 | >; | ||
| 597 | }; | ||
| 598 | workspaces: { | ||
| 599 | create: FunctionReference< | ||
| 600 | "mutation", | ||
| 601 | "public", | ||
| 602 | { | ||
| 603 | iconStorageId?: Id<"_storage">; | ||
| 604 | name: string; | ||
| 605 | organizationId?: Id<"organizations">; | ||
| 606 | sessionId?: string; | ||
| 607 | }, | ||
| 608 | any | ||
| 609 | >; | ||
| 610 | generateWorkspaceIconUploadUrl: FunctionReference< | ||
| 611 | "mutation", | ||
| 612 | "public", | ||
| 613 | { sessionId?: string }, | ||
| 614 | any | ||
| 615 | >; | ||
| 616 | list: FunctionReference< | ||
| 617 | "query", | ||
| 618 | "public", | ||
| 619 | { organizationId?: Id<"organizations">; sessionId?: string }, | ||
| 620 | any | ||
| 621 | >; | ||
| 622 | }; | ||
| 623 | }; | ||
| 113 | 624 | ||
| 114 | /** | 625 | /** |
| 115 | * A utility for referencing Convex functions in your app's internal API. | 626 | * A utility for referencing Convex functions in your app's internal API. |
| @@ -119,10 +630,1349 @@ export declare const api: FilterApi< · 3 unmodified lines | |||
| 119 | * const myFunctionReference = internal.myModule.myFunction; | 630 | * const myFunctionReference = internal.myModule.myFunction; |
| 120 | * ``` | 631 | * ``` |
| 121 | */ | 632 | */ |
| 122 | export declare const internal: FilterApi< | 633 | export declare const internal: { |
| 123 | typeof fullApi, | 634 | accountsInternal: { |
| 124 | FunctionReference<any, "internal"> | 635 | processDeleteCurrentAccountBatch: FunctionReference< |
| 125 | >; | 636 | "mutation", |
| 637 | "internal", | ||
| 638 | { accountId: Id<"accounts">; batchSize?: number }, | ||
| 639 | any | ||
| 640 | >; | ||
| 641 | runDeleteCurrentAccount: FunctionReference< | ||
| 642 | "action", | ||
| 643 | "internal", | ||
| 644 | { accountId: Id<"accounts">; batchSize?: number }, | ||
| 645 | any | ||
| 646 | >; | ||
| 647 | }; | ||
| 648 | auth: { | ||
| 649 | authKitEvent: FunctionReference< | ||
| 650 | "mutation", | ||
| 651 | "internal", | ||
| 652 | { data: Record<string, any>; event: string }, | ||
| 653 | null | ||
| 654 | >; | ||
| 655 | }; | ||
| 656 | billingInternal: { | ||
| 657 | bumpSeatSyncVersion: FunctionReference< | ||
| 658 | "mutation", | ||
| 659 | "internal", | ||
| 660 | { organizationId: Id<"organizations"> }, | ||
| 661 | any | ||
| 662 | >; | ||
| 663 | getBillingAccessForRequest: FunctionReference< | ||
| 664 | "query", | ||
| 665 | "internal", | ||
| 666 | { organizationId: Id<"organizations">; sessionId?: string }, | ||
| 667 | any | ||
| 668 | >; | ||
| 669 | getSeatSyncSnapshot: FunctionReference< | ||
| 670 | "query", | ||
| 671 | "internal", | ||
| 672 | { organizationId: Id<"organizations"> }, | ||
| 673 | any | ||
| 674 | >; | ||
| 675 | upsertCustomerLink: FunctionReference< | ||
| 676 | "mutation", | ||
| 677 | "internal", | ||
| 678 | { organizationId: Id<"organizations">; stripeCustomerId: string }, | ||
| 679 | any | ||
| 680 | >; | ||
| 681 | upsertSeatState: FunctionReference< | ||
| 682 | "mutation", | ||
| 683 | "internal", | ||
| 684 | { | ||
| 685 | bumpVersion: boolean; | ||
| 686 | desiredSeats: number; | ||
| 687 | lastAppliedSeats: number | null; | ||
| 688 | organizationId: Id<"organizations">; | ||
| 689 | syncError: string | null; | ||
| 690 | }, | ||
| 691 | any | ||
| 692 | >; | ||
| 693 | }; | ||
| 694 | billingSync: { | ||
| 695 | syncSeatQuantity: FunctionReference< | ||
| 696 | "action", | ||
| 697 | "internal", | ||
| 698 | { expectedVersion: number; organizationId: Id<"organizations"> }, | ||
| 699 | any | ||
| 700 | >; | ||
| 701 | }; | ||
| 702 | credentialsNode: { | ||
| 703 | readVaultObject: FunctionReference< | ||
| 704 | "action", | ||
| 705 | "internal", | ||
| 706 | { apiKey?: string; objectId: string }, | ||
| 707 | any | ||
| 708 | >; | ||
| 709 | }; | ||
| 710 | database: { | ||
| 711 | anonymous_session: { | ||
| 712 | bootstrapAnonymousSession: FunctionReference< | ||
| 713 | "mutation", | ||
| 714 | "internal", | ||
| 715 | { accountId?: string; clientId?: string; sessionId?: string }, | ||
| 716 | any | ||
| 717 | >; | ||
| 718 | }; | ||
| 719 | approvals: { | ||
| 720 | createApproval: FunctionReference< | ||
| 721 | "mutation", | ||
| 722 | "internal", | ||
| 723 | { | ||
| 724 | id: string; | ||
| 725 | input?: Record<string, any>; | ||
| 726 | taskId: string; | ||
| 727 | toolPath: string; | ||
| 728 | }, | ||
| 729 | any | ||
| 730 | >; | ||
| 731 | getApproval: FunctionReference< | ||
| 732 | "query", | ||
| 733 | "internal", | ||
| 734 | { approvalId: string }, | ||
| 735 | any | ||
| 736 | >; | ||
| 737 | getApprovalInWorkspace: FunctionReference< | ||
| 738 | "query", | ||
| 739 | "internal", | ||
| 740 | { approvalId: string; workspaceId: Id<"workspaces"> }, | ||
| 741 | any | ||
| 742 | >; | ||
| 743 | listApprovals: FunctionReference< | ||
| 744 | "query", | ||
| 745 | "internal", | ||
| 746 | { | ||
| 747 | status?: "pending" | "approved" | "denied"; | ||
| 748 | workspaceId: Id<"workspaces">; | ||
| 749 | }, | ||
| 750 | any | ||
| 751 | >; | ||
| 752 | listPendingApprovals: FunctionReference< | ||
| 753 | "query", | ||
| 754 | "internal", | ||
| 755 | { workspaceId: Id<"workspaces"> }, | ||
| 756 | any | ||
| 757 | >; | ||
| 758 | resolveApproval: FunctionReference< | ||
| 759 | "mutation", | ||
| 760 | "internal", | ||
| 761 | { | ||
| 762 | approvalId: string; | ||
| 763 | decision: "approved" | "denied"; | ||
| 764 | reason?: string; | ||
| 765 | reviewerId?: string; | ||
| 766 | }, | ||
| 767 | any | ||
| 768 | >; | ||
| 769 | }; | ||
| 770 | bootstrapAnonymousSession: FunctionReference< | ||
| 771 | "mutation", | ||
| 772 | "internal", | ||
| 773 | { accountId?: string; clientId?: string; sessionId?: string }, | ||
| 774 | any | ||
| 775 | >; | ||
| 776 | closeStorageInstance: FunctionReference< | ||
| 777 | "mutation", | ||
| 778 | "internal", | ||
| 779 | { | ||
| 780 | accountId?: Id<"accounts">; | ||
| 781 | instanceId: string; | ||
| 782 | workspaceId: Id<"workspaces">; | ||
| 783 | }, | ||
| 784 | any | ||
| 785 | >; | ||
| 786 | createApproval: FunctionReference< | ||
| 787 | "mutation", | ||
| 788 | "internal", | ||
| 789 | { | ||
| 790 | id: string; | ||
| 791 | input?: Record<string, any>; | ||
| 792 | taskId: string; | ||
| 793 | toolPath: string; | ||
| 794 | }, | ||
| 795 | any | ||
| 796 | >; | ||
| 797 | createTask: FunctionReference< | ||
| 798 | "mutation", | ||
| 799 | "internal", | ||
| 800 | { | ||
| 801 | accountId?: Id<"accounts">; | ||
| 802 | clientId?: string; | ||
| 803 | code: string; | ||
| 804 | id: string; | ||
| 805 | metadata?: Record<string, any>; | ||
| 806 | runtimeId: string; | ||
| 807 | timeoutMs?: number; | ||
| 808 | workspaceId: Id<"workspaces">; | ||
| 809 | }, | ||
| 810 | any | ||
| 811 | >; | ||
| 812 | createTaskEvent: FunctionReference< | ||
| 813 | "mutation", | ||
| 814 | "internal", | ||
| 815 | { | ||
| 816 | eventName: string; | ||
| 817 | payload: Record<string, any>; | ||
| 818 | taskId: string; | ||
| 819 | type: string; | ||
| 820 | }, | ||
| 821 | any | ||
| 822 | >; | ||
| 823 | credentials: { | ||
| 824 | listCredentialProviders: FunctionReference<"query", "internal", {}, any>; | ||
| 825 | listCredentials: FunctionReference< | ||
| 826 | "query", | ||
| 827 | "internal", | ||
| 828 | { accountId?: Id<"accounts">; workspaceId: Id<"workspaces"> }, | ||
| 829 | any | ||
| 830 | >; | ||
| 831 | resolveCredential: FunctionReference< | ||
| 832 | "query", | ||
| 833 | "internal", | ||
| 834 | { | ||
| 835 | accountId?: Id<"accounts">; | ||
| 836 | scopeType: "account" | "organization" | "workspace"; | ||
| 837 | sourceKey: string; | ||
| 838 | workspaceId: Id<"workspaces">; | ||
| 839 | }, | ||
| 840 | any | ||
| 841 | >; | ||
| 842 | upsertCredential: FunctionReference< | ||
| 843 | "mutation", | ||
| 844 | "internal", | ||
| 845 | { | ||
| 846 | accountId?: Id<"accounts">; | ||
| 847 | id?: string; | ||
| 848 | overridesJson?: Record<string, any>; | ||
| 849 | provider?: "local-convex" | "workos-vault"; | ||
| 850 | scopeType?: "account" | "organization" | "workspace"; | ||
| 851 | secretJson: Record<string, any>; | ||
| 852 | sourceKey: string; | ||
| 853 | workspaceId: Id<"workspaces">; | ||
| 854 | }, | ||
| 855 | any | ||
| 856 | >; | ||
| 857 | }; | ||
| 858 | deleteStorageInstance: FunctionReference< | ||
| 859 | "mutation", | ||
| 860 | "internal", | ||
| 861 | { | ||
| 862 | accountId?: Id<"accounts">; | ||
| 863 | instanceId: string; | ||
| 864 | workspaceId: Id<"workspaces">; | ||
| 865 | }, | ||
| 866 | any | ||
| 867 | >; | ||
| 868 | deleteToolPolicyAssignment: FunctionReference< | ||
| 869 | "mutation", | ||
| 870 | "internal", | ||
| 871 | { bindingId: string; workspaceId: Id<"workspaces"> }, | ||
| 872 | any | ||
| 873 | >; | ||
| 874 | deleteToolPolicyRule: FunctionReference< | ||
| 875 | "mutation", | ||
| 876 | "internal", | ||
| 877 | { roleId: string; ruleId: string; workspaceId: Id<"workspaces"> }, | ||
| 878 | any | ||
| 879 | >; | ||
| 880 | deleteToolPolicySet: FunctionReference< | ||
| 881 | "mutation", | ||
| 882 | "internal", | ||
| 883 | { roleId: string; workspaceId: Id<"workspaces"> }, | ||
| 884 | any | ||
| 885 | >; | ||
| 886 | deleteToolSource: FunctionReference< | ||
| 887 | "mutation", | ||
| 888 | "internal", | ||
| 889 | { sourceId: string; workspaceId: Id<"workspaces"> }, | ||
| 890 | any | ||
| 891 | >; | ||
| 892 | finishToolCall: FunctionReference< | ||
| 893 | "mutation", | ||
| 894 | "internal", | ||
| 895 | { | ||
| 896 | callId: string; | ||
| 897 | error?: string; | ||
| 898 | status: "completed" | "failed" | "denied"; | ||
| 899 | taskId: string; | ||
| 900 | }, | ||
| 901 | any | ||
| 902 | >; | ||
| 903 | getApproval: FunctionReference< | ||
| 904 | "query", | ||
| 905 | "internal", | ||
| 906 | { approvalId: string }, | ||
| 907 | any | ||
| 908 | >; | ||
| 909 | getApprovalInWorkspace: FunctionReference< | ||
| 910 | "query", | ||
| 911 | "internal", | ||
| 912 | { approvalId: string; workspaceId: Id<"workspaces"> }, | ||
| 913 | any | ||
| 914 | >; | ||
| 915 | getStorageInstance: FunctionReference< | ||
| 916 | "query", | ||
| 917 | "internal", | ||
| 918 | { | ||
| 919 | accountId?: Id<"accounts">; | ||
| 920 | instanceId: string; | ||
| 921 | workspaceId: Id<"workspaces">; | ||
| 922 | }, | ||
| 923 | any | ||
| 924 | >; | ||
| 925 | getTask: FunctionReference<"query", "internal", { taskId: string }, any>; | ||
| 926 | getTaskInWorkspace: FunctionReference< | ||
| 927 | "query", | ||
| 928 | "internal", | ||
| 929 | { taskId: string; workspaceId: Id<"workspaces"> }, | ||
| 930 | any | ||
| 931 | >; | ||
| 932 | getToolCall: FunctionReference< | ||
| 933 | "query", | ||
| 934 | "internal", | ||
| 935 | { callId: string; taskId: string }, | ||
| 936 | any | ||
| 937 | >; | ||
| 938 | listApprovals: FunctionReference< | ||
| 939 | "query", | ||
| 940 | "internal", | ||
| 941 | { | ||
| 942 | status?: "pending" | "approved" | "denied"; | ||
| 943 | workspaceId: Id<"workspaces">; | ||
| 944 | }, | ||
| 945 | any | ||
| 946 | >; | ||
| 947 | listCredentialProviders: FunctionReference<"query", "internal", {}, any>; | ||
| 948 | listCredentials: FunctionReference< | ||
| 949 | "query", | ||
| 950 | "internal", | ||
| 951 | { accountId?: Id<"accounts">; workspaceId: Id<"workspaces"> }, | ||
| 952 | any | ||
| 953 | >; | ||
| 954 | listPendingApprovals: FunctionReference< | ||
| 955 | "query", | ||
| 956 | "internal", | ||
| 957 | { workspaceId: Id<"workspaces"> }, | ||
| 958 | any | ||
| 959 | >; | ||
| 960 | listQueuedTaskIds: FunctionReference< | ||
| 961 | "query", | ||
| 962 | "internal", | ||
| 963 | { limit?: number }, | ||
| 964 | any | ||
| 965 | >; | ||
| 966 | listRuntimeTargets: FunctionReference<"query", "internal", {}, any>; | ||
| 967 | listStorageInstances: FunctionReference< | ||
| 968 | "query", | ||
| 969 | "internal", | ||
| 970 | { | ||
| 971 | accountId?: Id<"accounts">; | ||
| 972 | includeDeleted?: boolean; | ||
| 973 | scopeType?: "scratch" | "account" | "workspace" | "organization"; | ||
| 974 | workspaceId: Id<"workspaces">; | ||
| 975 | }, | ||
| 976 | any | ||
| 977 | >; | ||
| 978 | listTaskEvents: FunctionReference< | ||
| 979 | "query", | ||
| 980 | "internal", | ||
| 981 | { limit?: number; taskId: string }, | ||
| 982 | any | ||
| 983 | >; | ||
| 984 | listTasks: FunctionReference< | ||
| 985 | "query", | ||
| 986 | "internal", | ||
| 987 | { workspaceId: Id<"workspaces"> }, | ||
| 988 | any | ||
| 989 | >; | ||
| 990 | listToolCalls: FunctionReference< | ||
| 991 | "query", | ||
| 992 | "internal", | ||
| 993 | { taskId: string }, | ||
| 994 | any | ||
| 995 | >; | ||
| 996 | listToolPolicies: FunctionReference< | ||
| 997 | "query", | ||
| 998 | "internal", | ||
| 999 | { accountId?: Id<"accounts">; workspaceId: Id<"workspaces"> }, | ||
| 1000 | any | ||
| 1001 | >; | ||
| 1002 | listToolPolicyAssignments: FunctionReference< | ||
| 1003 | "query", | ||
| 1004 | "internal", | ||
| 1005 | { roleId?: string; workspaceId: Id<"workspaces"> }, | ||
| 1006 | any | ||
| 1007 | >; | ||
| 1008 | listToolPolicyRules: FunctionReference< | ||
| 1009 | "query", | ||
| 1010 | "internal", | ||
| 1011 | { roleId: string; workspaceId: Id<"workspaces"> }, | ||
| 1012 | any | ||
| 1013 | >; | ||
| 1014 | listToolPolicySets: FunctionReference< | ||
| 1015 | "query", | ||
| 1016 | "internal", | ||
| 1017 | { workspaceId: Id<"workspaces"> }, | ||
| 1018 | any | ||
| 1019 | >; | ||
| 1020 | listToolSources: FunctionReference< | ||
| 1021 | "query", | ||
| 1022 | "internal", | ||
| 1023 | { workspaceId: Id<"workspaces"> }, | ||
| 1024 | any | ||
| 1025 | >; | ||
| 1026 | markTaskFinished: FunctionReference< | ||
| 1027 | "mutation", | ||
| 1028 | "internal", | ||
| 1029 | { | ||
| 1030 | error?: string; | ||
| 1031 | exitCode?: number; | ||
| 1032 | status: "completed" | "failed" | "timed_out" | "denied"; | ||
| 1033 | taskId: string; | ||
| 1034 | }, | ||
| 1035 | any | ||
| 1036 | >; | ||
| 1037 | markTaskRunning: FunctionReference< | ||
| 1038 | "mutation", | ||
| 1039 | "internal", | ||
| 1040 | { taskId: string }, | ||
| 1041 | any | ||
| 1042 | >; | ||
| 1043 | openStorageInstance: FunctionReference< | ||
| 1044 | "mutation", | ||
| 1045 | "internal", | ||
| 1046 | { | ||
| 1047 | accountId?: Id<"accounts">; | ||
| 1048 | durability?: "ephemeral" | "durable"; | ||
| 1049 | instanceId?: string; | ||
| 1050 | purpose?: string; | ||
| 1051 | scopeType?: "scratch" | "account" | "workspace" | "organization"; | ||
| 1052 | ttlHours?: number; | ||
| 1053 | workspaceId: Id<"workspaces">; | ||
| 1054 | }, | ||
| 1055 | any | ||
| 1056 | >; | ||
| 1057 | policies: { | ||
| 1058 | deleteToolPolicyAssignment: FunctionReference< | ||
| 1059 | "mutation", | ||
| 1060 | "internal", | ||
| 1061 | { bindingId: string; workspaceId: Id<"workspaces"> }, | ||
| 1062 | any | ||
| 1063 | >; | ||
| 1064 | deleteToolPolicyRule: FunctionReference< | ||
| 1065 | "mutation", | ||
| 1066 | "internal", | ||
| 1067 | { roleId: string; ruleId: string; workspaceId: Id<"workspaces"> }, | ||
| 1068 | any | ||
| 1069 | >; | ||
| 1070 | deleteToolPolicySet: FunctionReference< | ||
| 1071 | "mutation", | ||
| 1072 | "internal", | ||
| 1073 | { roleId: string; workspaceId: Id<"workspaces"> }, | ||
| 1074 | any | ||
| 1075 | >; | ||
| 1076 | listRuntimeTargets: FunctionReference<"query", "internal", {}, any>; | ||
| 1077 | listToolPolicies: FunctionReference< | ||
| 1078 | "query", | ||
| 1079 | "internal", | ||
| 1080 | { accountId?: Id<"accounts">; workspaceId: Id<"workspaces"> }, | ||
| 1081 | any | ||
| 1082 | >; | ||
| 1083 | listToolPolicyAssignments: FunctionReference< | ||
| 1084 | "query", | ||
| 1085 | "internal", | ||
| 1086 | { roleId?: string; workspaceId: Id<"workspaces"> }, | ||
| 1087 | any | ||
| 1088 | >; | ||
| 1089 | listToolPolicyRules: FunctionReference< | ||
| 1090 | "query", | ||
| 1091 | "internal", | ||
| 1092 | { roleId: string; workspaceId: Id<"workspaces"> }, | ||
| 1093 | any | ||
| 1094 | >; | ||
| 1095 | listToolPolicySets: FunctionReference< | ||
| 1096 | "query", | ||
| 1097 | "internal", | ||
| 1098 | { workspaceId: Id<"workspaces"> }, | ||
| 1099 | any | ||
| 1100 | >; | ||
| 1101 | upsertToolPolicyAssignment: FunctionReference< | ||
| 1102 | "mutation", | ||
| 1103 | "internal", | ||
| 1104 | { | ||
| 1105 | clientId?: string; | ||
| 1106 | expiresAt?: number; | ||
| 1107 | id?: string; | ||
| 1108 | roleId: string; | ||
| 1109 | scopeType?: "account" | "organization" | "workspace"; | ||
| 1110 | status?: "active" | "disabled"; | ||
| 1111 | targetAccountId?: Id<"accounts">; | ||
| 1112 | workspaceId: Id<"workspaces">; | ||
| 1113 | }, | ||
| 1114 | any | ||
| 1115 | >; | ||
| 1116 | upsertToolPolicyRule: FunctionReference< | ||
| 1117 | "mutation", | ||
| 1118 | "internal", | ||
| 1119 | { | ||
| 1120 | approvalMode?: "inherit" | "auto" | "required"; | ||
| 1121 | argumentConditions?: Array<{ | ||
| 1122 | key: string; | ||
| 1123 | operator: "equals" | "contains" | "starts_with" | "not_equals"; | ||
| 1124 | value: string; | ||
| 1125 | }>; | ||
| 1126 | effect?: "allow" | "deny"; | ||
| 1127 | id?: string; | ||
| 1128 | matchType?: "glob" | "exact"; | ||
| 1129 | priority?: number; | ||
| 1130 | resourcePattern?: string; | ||
| 1131 | roleId: string; | ||
| 1132 | selectorType: "all" | "source" | "namespace" | "tool_path"; | ||
| 1133 | sourceKey?: string; | ||
| 1134 | workspaceId: Id<"workspaces">; | ||
| 1135 | }, | ||
| 1136 | any | ||
| 1137 | >; | ||
| 1138 | upsertToolPolicySet: FunctionReference< | ||
| 1139 | "mutation", | ||
| 1140 | "internal", | ||
| 1141 | { | ||
| 1142 | createdByAccountId?: Id<"accounts">; | ||
| 1143 | description?: string; | ||
| 1144 | id?: string; | ||
| 1145 | name: string; | ||
| 1146 | workspaceId: Id<"workspaces">; | ||
| 1147 | }, | ||
| 1148 | any | ||
| 1149 | >; | ||
| 1150 | }; | ||
| 1151 | resolveApproval: FunctionReference< | ||
| 1152 | "mutation", | ||
| 1153 | "internal", | ||
| 1154 | { | ||
| 1155 | approvalId: string; | ||
| 1156 | decision: "approved" | "denied"; | ||
| 1157 | reason?: string; | ||
| 1158 | reviewerId?: string; | ||
| 1159 | }, | ||
| 1160 | any | ||
| 1161 | >; | ||
| 1162 | resolveCredential: FunctionReference< | ||
| 1163 | "query", | ||
| 1164 | "internal", | ||
| 1165 | { | ||
| 1166 | accountId?: Id<"accounts">; | ||
| 1167 | scopeType: "account" | "organization" | "workspace"; | ||
| 1168 | sourceKey: string; | ||
| 1169 | workspaceId: Id<"workspaces">; | ||
| 1170 | }, | ||
| 1171 | any | ||
| 1172 | >; | ||
| 1173 | setTaskStorageDefaultInstance: FunctionReference< | ||
| 1174 | "mutation", | ||
| 1175 | "internal", | ||
| 1176 | { | ||
| 1177 | instanceId: string; | ||
| 1178 | scopeType: "scratch" | "account" | "workspace" | "organization"; | ||
| 1179 | setCurrent?: boolean; | ||
| 1180 | taskId: string; | ||
| 1181 | }, | ||
| 1182 | any | ||
| 1183 | >; | ||
| 1184 | setToolCallPendingApproval: FunctionReference< | ||
| 1185 | "mutation", | ||
| 1186 | "internal", | ||
| 1187 | { approvalId: string; callId: string; taskId: string }, | ||
| 1188 | any | ||
| 1189 | >; | ||
| 1190 | storage_instances: { | ||
| 1191 | closeStorageInstance: FunctionReference< | ||
| 1192 | "mutation", | ||
| 1193 | "internal", | ||
| 1194 | { | ||
| 1195 | accountId?: Id<"accounts">; | ||
| 1196 | instanceId: string; | ||
| 1197 | workspaceId: Id<"workspaces">; | ||
| 1198 | }, | ||
| 1199 | any | ||
| 1200 | >; | ||
| 1201 | deleteStorageInstance: FunctionReference< | ||
| 1202 | "mutation", | ||
| 1203 | "internal", | ||
| 1204 | { | ||
| 1205 | accountId?: Id<"accounts">; | ||
| 1206 | instanceId: string; | ||
| 1207 | workspaceId: Id<"workspaces">; | ||
| 1208 | }, | ||
| 1209 | any | ||
| 1210 | >; | ||
| 1211 | getStorageInstance: FunctionReference< | ||
| 1212 | "query", | ||
| 1213 | "internal", | ||
| 1214 | { | ||
| 1215 | accountId?: Id<"accounts">; | ||
| 1216 | instanceId: string; | ||
| 1217 | workspaceId: Id<"workspaces">; | ||
| 1218 | }, | ||
| 1219 | any | ||
| 1220 | >; | ||
| 1221 | listStorageInstances: FunctionReference< | ||
| 1222 | "query", | ||
| 1223 | "internal", | ||
| 1224 | { | ||
| 1225 | accountId?: Id<"accounts">; | ||
| 1226 | includeDeleted?: boolean; | ||
| 1227 | scopeType?: "scratch" | "account" | "workspace" | "organization"; | ||
| 1228 | workspaceId: Id<"workspaces">; | ||
| 1229 | }, | ||
| 1230 | any | ||
| 1231 | >; | ||
| 1232 | openStorageInstance: FunctionReference< | ||
| 1233 | "mutation", | ||
| 1234 | "internal", | ||
| 1235 | { | ||
| 1236 | accountId?: Id<"accounts">; | ||
| 1237 | durability?: "ephemeral" | "durable"; | ||
| 1238 | instanceId?: string; | ||
| 1239 | purpose?: string; | ||
| 1240 | scopeType?: "scratch" | "account" | "workspace" | "organization"; | ||
| 1241 | ttlHours?: number; | ||
| 1242 | workspaceId: Id<"workspaces">; | ||
| 1243 | }, | ||
| 1244 | any | ||
| 1245 | >; | ||
| 1246 | touchStorageInstance: FunctionReference< | ||
| 1247 | "mutation", | ||
| 1248 | "internal", | ||
| 1249 | { | ||
| 1250 | accountId?: Id<"accounts">; | ||
| 1251 | fileCount?: number; | ||
| 1252 | instanceId: string; | ||
| 1253 | provider?: "agentfs-local" | "agentfs-cloudflare"; | ||
| 1254 | sizeBytes?: number; | ||
| 1255 | status?: "active" | "closed" | "deleted"; | ||
| 1256 | workspaceId: Id<"workspaces">; | ||
| 1257 | }, | ||
| 1258 | any | ||
| 1259 | >; | ||
| 1260 | }; | ||
| 1261 | task_events: { | ||
| 1262 | createTaskEvent: FunctionReference< | ||
| 1263 | "mutation", | ||
| 1264 | "internal", | ||
| 1265 | { | ||
| 1266 | eventName: string; | ||
| 1267 | payload: Record<string, any>; | ||
| 1268 | taskId: string; | ||
| 1269 | type: string; | ||
| 1270 | }, | ||
| 1271 | any | ||
| 1272 | >; | ||
| 1273 | listTaskEvents: FunctionReference< | ||
| 1274 | "query", | ||
| 1275 | "internal", | ||
| 1276 | { limit?: number; taskId: string }, | ||
| 1277 | any | ||
| 1278 | >; | ||
| 1279 | }; | ||
| 1280 | tasks: { | ||
| 1281 | createTask: FunctionReference< | ||
| 1282 | "mutation", | ||
| 1283 | "internal", | ||
| 1284 | { | ||
| 1285 | accountId?: Id<"accounts">; | ||
| 1286 | clientId?: string; | ||
| 1287 | code: string; | ||
| 1288 | id: string; | ||
| 1289 | metadata?: Record<string, any>; | ||
| 1290 | runtimeId: string; | ||
| 1291 | timeoutMs?: number; | ||
| 1292 | workspaceId: Id<"workspaces">; | ||
| 1293 | }, | ||
| 1294 | any | ||
| 1295 | >; | ||
| 1296 | getTask: FunctionReference<"query", "internal", { taskId: string }, any>; | ||
| 1297 | getTaskInWorkspace: FunctionReference< | ||
| 1298 | "query", | ||
| 1299 | "internal", | ||
| 1300 | { taskId: string; workspaceId: Id<"workspaces"> }, | ||
| 1301 | any | ||
| 1302 | >; | ||
| 1303 | listQueuedTaskIds: FunctionReference< | ||
| 1304 | "query", | ||
| 1305 | "internal", | ||
| 1306 | { limit?: number }, | ||
| 1307 | any | ||
| 1308 | >; | ||
| 1309 | listTasks: FunctionReference< | ||
| 1310 | "query", | ||
| 1311 | "internal", | ||
| 1312 | { workspaceId: Id<"workspaces"> }, | ||
| 1313 | any | ||
| 1314 | >; | ||
| 1315 | markTaskFinished: FunctionReference< | ||
| 1316 | "mutation", | ||
| 1317 | "internal", | ||
| 1318 | { | ||
| 1319 | error?: string; | ||
| 1320 | exitCode?: number; | ||
| 1321 | status: "completed" | "failed" | "timed_out" | "denied"; | ||
| 1322 | taskId: string; | ||
| 1323 | }, | ||
| 1324 | any | ||
| 1325 | >; | ||
| 1326 | markTaskRunning: FunctionReference< | ||
| 1327 | "mutation", | ||
| 1328 | "internal", | ||
| 1329 | { taskId: string }, | ||
| 1330 | any | ||
| 1331 | >; | ||
| 1332 | setTaskStorageDefaultInstance: FunctionReference< | ||
| 1333 | "mutation", | ||
| 1334 | "internal", | ||
| 1335 | { | ||
| 1336 | instanceId: string; | ||
| 1337 | scopeType: "scratch" | "account" | "workspace" | "organization"; | ||
| 1338 | setCurrent?: boolean; | ||
| 1339 | taskId: string; | ||
| 1340 | }, | ||
| 1341 | any | ||
| 1342 | >; | ||
| 1343 | trackTaskStorageAccess: FunctionReference< | ||
| 1344 | "mutation", | ||
| 1345 | "internal", | ||
| 1346 | { | ||
| 1347 | accessType: "opened" | "provided" | "accessed"; | ||
| 1348 | instanceId: string; | ||
| 1349 | scopeType?: "scratch" | "account" | "workspace" | "organization"; | ||
| 1350 | taskId: string; | ||
| 1351 | }, | ||
| 1352 | any | ||
| 1353 | >; | ||
| 1354 | }; | ||
| 1355 | tool_calls: { | ||
| 1356 | finishToolCall: FunctionReference< | ||
| 1357 | "mutation", | ||
| 1358 | "internal", | ||
| 1359 | { | ||
| 1360 | callId: string; | ||
| 1361 | error?: string; | ||
| 1362 | status: "completed" | "failed" | "denied"; | ||
| 1363 | taskId: string; | ||
| 1364 | }, | ||
| 1365 | any | ||
| 1366 | >; | ||
| 1367 | getToolCall: FunctionReference< | ||
| 1368 | "query", | ||
| 1369 | "internal", | ||
| 1370 | { callId: string; taskId: string }, | ||
| 1371 | any | ||
| 1372 | >; | ||
| 1373 | listToolCalls: FunctionReference< | ||
| 1374 | "query", | ||
| 1375 | "internal", | ||
| 1376 | { taskId: string }, | ||
| 1377 | any | ||
| 1378 | >; | ||
| 1379 | setToolCallPendingApproval: FunctionReference< | ||
| 1380 | "mutation", | ||
| 1381 | "internal", | ||
| 1382 | { approvalId: string; callId: string; taskId: string }, | ||
| 1383 | any | ||
| 1384 | >; | ||
| 1385 | upsertToolCallRequested: FunctionReference< | ||
| 1386 | "mutation", | ||
| 1387 | "internal", | ||
| 1388 | { | ||
| 1389 | callId: string; | ||
| 1390 | taskId: string; | ||
| 1391 | toolPath: string; | ||
| 1392 | workspaceId: Id<"workspaces">; | ||
| 1393 | }, | ||
| 1394 | any | ||
| 1395 | >; | ||
| 1396 | }; | ||
| 1397 | tool_sources: { | ||
| 1398 | deleteToolSource: FunctionReference< | ||
| 1399 | "mutation", | ||
| 1400 | "internal", | ||
| 1401 | { sourceId: string; workspaceId: Id<"workspaces"> }, | ||
| 1402 | any | ||
| 1403 | >; | ||
| 1404 | listToolSources: FunctionReference< | ||
| 1405 | "query", | ||
| 1406 | "internal", | ||
| 1407 | { workspaceId: Id<"workspaces"> }, | ||
| 1408 | any | ||
| 1409 | >; | ||
| 1410 | upsertToolSource: FunctionReference< | ||
| 1411 | "mutation", | ||
| 1412 | "internal", | ||
| 1413 | { | ||
| 1414 | config: Record<string, any>; | ||
| 1415 | enabled?: boolean; | ||
| 1416 | id?: string; | ||
| 1417 | name: string; | ||
| 1418 | scopeType?: "organization" | "workspace"; | ||
| 1419 | type: "mcp" | "openapi" | "graphql"; | ||
| 1420 | workspaceId: Id<"workspaces">; | ||
| 1421 | }, | ||
| 1422 | any | ||
| 1423 | >; | ||
| 1424 | }; | ||
| 1425 | touchStorageInstance: FunctionReference< | ||
| 1426 | "mutation", | ||
| 1427 | "internal", | ||
| 1428 | { | ||
| 1429 | accountId?: Id<"accounts">; | ||
| 1430 | fileCount?: number; | ||
| 1431 | instanceId: string; | ||
| 1432 | provider?: "agentfs-local" | "agentfs-cloudflare"; | ||
| 1433 | sizeBytes?: number; | ||
| 1434 | status?: "active" | "closed" | "deleted"; | ||
| 1435 | workspaceId: Id<"workspaces">; | ||
| 1436 | }, | ||
| 1437 | any | ||
| 1438 | >; | ||
| 1439 | trackTaskStorageAccess: FunctionReference< | ||
| 1440 | "mutation", | ||
| 1441 | "internal", | ||
| 1442 | { | ||
| 1443 | accessType: "opened" | "provided" | "accessed"; | ||
| 1444 | instanceId: string; | ||
| 1445 | scopeType?: "scratch" | "account" | "workspace" | "organization"; | ||
| 1446 | taskId: string; | ||
| 1447 | }, | ||
| 1448 | any | ||
| 1449 | >; | ||
| 1450 | upsertCredential: FunctionReference< | ||
| 1451 | "mutation", | ||
| 1452 | "internal", | ||
| 1453 | { | ||
| 1454 | accountId?: Id<"accounts">; | ||
| 1455 | id?: string; | ||
| 1456 | overridesJson?: Record<string, any>; | ||
| 1457 | provider?: "local-convex" | "workos-vault"; | ||
| 1458 | scopeType?: "account" | "organization" | "workspace"; | ||
| 1459 | secretJson: Record<string, any>; | ||
| 1460 | sourceKey: string; | ||
| 1461 | workspaceId: Id<"workspaces">; | ||
| 1462 | }, | ||
| 1463 | any | ||
| 1464 | >; | ||
| 1465 | upsertToolCallRequested: FunctionReference< | ||
| 1466 | "mutation", | ||
| 1467 | "internal", | ||
| 1468 | { | ||
| 1469 | callId: string; | ||
| 1470 | taskId: string; | ||
| 1471 | toolPath: string; | ||
| 1472 | workspaceId: Id<"workspaces">; | ||
| 1473 | }, | ||
| 1474 | any | ||
| 1475 | >; | ||
| 1476 | upsertToolPolicyAssignment: FunctionReference< | ||
| 1477 | "mutation", | ||
| 1478 | "internal", | ||
| 1479 | { | ||
| 1480 | clientId?: string; | ||
| 1481 | expiresAt?: number; | ||
| 1482 | id?: string; | ||
| 1483 | roleId: string; | ||
| 1484 | scopeType?: "account" | "organization" | "workspace"; | ||
| 1485 | status?: "active" | "disabled"; | ||
| 1486 | targetAccountId?: Id<"accounts">; | ||
| 1487 | workspaceId: Id<"workspaces">; | ||
| 1488 | }, | ||
| 1489 | any | ||
| 1490 | >; | ||
| 1491 | upsertToolPolicyRule: FunctionReference< | ||
| 1492 | "mutation", | ||
| 1493 | "internal", | ||
| 1494 | { | ||
| 1495 | approvalMode?: "inherit" | "auto" | "required"; | ||
| 1496 | argumentConditions?: Array<{ | ||
| 1497 | key: string; | ||
| 1498 | operator: "equals" | "contains" | "starts_with" | "not_equals"; | ||
| 1499 | value: string; | ||
| 1500 | }>; | ||
| 1501 | effect?: "allow" | "deny"; | ||
| 1502 | id?: string; | ||
| 1503 | matchType?: "glob" | "exact"; | ||
| 1504 | priority?: number; | ||
| 1505 | resourcePattern?: string; | ||
| 1506 | roleId: string; | ||
| 1507 | selectorType: "all" | "source" | "namespace" | "tool_path"; | ||
| 1508 | sourceKey?: string; | ||
| 1509 | workspaceId: Id<"workspaces">; | ||
| 1510 | }, | ||
| 1511 | any | ||
| 1512 | >; | ||
| 1513 | upsertToolPolicySet: FunctionReference< | ||
| 1514 | "mutation", | ||
| 1515 | "internal", | ||
| 1516 | { | ||
| 1517 | createdByAccountId?: Id<"accounts">; | ||
| 1518 | description?: string; | ||
| 1519 | id?: string; | ||
| 1520 | name: string; | ||
| 1521 | workspaceId: Id<"workspaces">; | ||
| 1522 | }, | ||
| 1523 | any | ||
| 1524 | >; | ||
| 1525 | upsertToolSource: FunctionReference< | ||
| 1526 | "mutation", | ||
| 1527 | "internal", | ||
| 1528 | { | ||
| 1529 | config: Record<string, any>; | ||
| 1530 | enabled?: boolean; | ||
| 1531 | id?: string; | ||
| 1532 | name: string; | ||
| 1533 | scopeType?: "organization" | "workspace"; | ||
| 1534 | type: "mcp" | "openapi" | "graphql"; | ||
| 1535 | workspaceId: Id<"workspaces">; | ||
| 1536 | }, | ||
| 1537 | any | ||
| 1538 | >; | ||
| 1539 | }; | ||
| 1540 | executor: { | ||
| 1541 | completeRuntimeRun: FunctionReference< | ||
| 1542 | "mutation", | ||
| 1543 | "internal", | ||
| 1544 | { | ||
| 1545 | durationMs?: number; | ||
| 1546 | error?: string; | ||
| 1547 | exitCode?: number; | ||
| 1548 | runId: string; | ||
| 1549 | status: "completed" | "failed" | "timed_out" | "denied"; | ||
| 1550 | }, | ||
| 1551 | any | ||
| 1552 | >; | ||
| 1553 | createTaskInternal: FunctionReference< | ||
| 1554 | "mutation", | ||
| 1555 | "internal", | ||
| 1556 | { | ||
| 1557 | accountId: Id<"accounts">; | ||
| 1558 | clientId?: string; | ||
| 1559 | code: string; | ||
| 1560 | metadata?: Record<string, any>; | ||
| 1561 | runtimeId?: string; | ||
| 1562 | scheduleAfterCreate?: boolean; | ||
| 1563 | timeoutMs?: number; | ||
| 1564 | workspaceId: Id<"workspaces">; | ||
| 1565 | }, | ||
| 1566 | any | ||
| 1567 | >; | ||
| 1568 | resolveApprovalInternal: FunctionReference< | ||
| 1569 | "mutation", | ||
| 1570 | "internal", | ||
| 1571 | { | ||
| 1572 | approvalId: string; | ||
| 1573 | decision: "approved" | "denied"; | ||
| 1574 | reason?: string; | ||
| 1575 | reviewerId?: string; | ||
| 1576 | workspaceId: Id<"workspaces">; | ||
| 1577 | }, | ||
| 1578 | any | ||
| 1579 | >; | ||
| 1580 | }; | ||
| 1581 | executorNode: { | ||
| 1582 | handleExternalToolCall: FunctionReference< | ||
| 1583 | "action", | ||
| 1584 | "internal", | ||
| 1585 | { | ||
| 1586 | callId: string; | ||
| 1587 | input?: Record<string, any>; | ||
| 1588 | runId: string; | ||
| 1589 | toolPath: string; | ||
| 1590 | }, | ||
| 1591 | any | ||
| 1592 | >; | ||
| 1593 | listToolsInternal: FunctionReference< | ||
| 1594 | "action", | ||
| 1595 | "internal", | ||
| 1596 | { | ||
| 1597 | accountId?: Id<"accounts">; | ||
| 1598 | clientId?: string; | ||
| 1599 | workspaceId: Id<"workspaces">; | ||
| 1600 | }, | ||
| 1601 | any | ||
| 1602 | >; | ||
| 1603 | listToolsWithWarningsInternal: FunctionReference< | ||
| 1604 | "action", | ||
| 1605 | "internal", | ||
| 1606 | { | ||
| 1607 | accountId?: Id<"accounts">; | ||
| 1608 | clientId?: string; | ||
| 1609 | workspaceId: Id<"workspaces">; | ||
| 1610 | }, | ||
| 1611 | any | ||
| 1612 | >; | ||
| 1613 | rebuildToolInventoryInternal: FunctionReference< | ||
| 1614 | "action", | ||
| 1615 | "internal", | ||
| 1616 | { | ||
| 1617 | accountId?: Id<"accounts">; | ||
| 1618 | clientId?: string; | ||
| 1619 | workspaceId: Id<"workspaces">; | ||
| 1620 | }, | ||
| 1621 | any | ||
| 1622 | >; | ||
| 1623 | runTask: FunctionReference<"action", "internal", { taskId: string }, any>; | ||
| 1624 | }; | ||
| 1625 | executorRuntimeNode: { | ||
| 1626 | dispatchCloudflareWorker: FunctionReference< | ||
| 1627 | "action", | ||
| 1628 | "internal", | ||
| 1629 | { code: string; taskId: string; timeoutMs: number }, | ||
| 1630 | any | ||
| 1631 | >; | ||
| 1632 | }; | ||
| 1633 | invites: { | ||
| 1634 | deliverWorkosInvite: FunctionReference< | ||
| 1635 | "action", | ||
| 1636 | "internal", | ||
| 1637 | { | ||
| 1638 | expiresInDays?: number; | ||
| 1639 | inviteId: Id<"invites">; | ||
| 1640 | inviterWorkosUserId: string; | ||
| 1641 | roleSlug?: string; | ||
| 1642 | }, | ||
| 1643 | any | ||
| 1644 | >; | ||
| 1645 | getInviteById: FunctionReference< | ||
| 1646 | "query", | ||
| 1647 | "internal", | ||
| 1648 | { inviteId: Id<"invites"> }, | ||
| 1649 | any | ||
| 1650 | >; | ||
| 1651 | getInviteDeliveryContext: FunctionReference< | ||
| 1652 | "query", | ||
| 1653 | "internal", | ||
| 1654 | { inviteId: Id<"invites"> }, | ||
| 1655 | any | ||
| 1656 | >; | ||
| 1657 | linkOrganizationToWorkos: FunctionReference< | ||
| 1658 | "mutation", | ||
| 1659 | "internal", | ||
| 1660 | { organizationId: Id<"organizations">; workosOrgId: string }, | ||
| 1661 | any | ||
| 1662 | >; | ||
| 1663 | markInviteDelivered: FunctionReference< | ||
| 1664 | "mutation", | ||
| 1665 | "internal", | ||
| 1666 | { inviteId: Id<"invites">; providerInviteId: string }, | ||
| 1667 | any | ||
| 1668 | >; | ||
| 1669 | markInviteDeliveryFailed: FunctionReference< | ||
| 1670 | "mutation", | ||
| 1671 | "internal", | ||
| 1672 | { errorMessage: string; inviteId: Id<"invites"> }, | ||
| 1673 | any | ||
| 1674 | >; | ||
| 1675 | revokeWorkosInvite: FunctionReference< | ||
| 1676 | "action", | ||
| 1677 | "internal", | ||
| 1678 | { inviteId: Id<"invites">; providerInviteId: string }, | ||
| 1679 | any | ||
| 1680 | >; | ||
| 1681 | }; | ||
| 1682 | migrations: { | ||
| 1683 | run: FunctionReference< | ||
| 1684 | "mutation", | ||
| 1685 | "internal", | ||
| 1686 | { | ||
| 1687 | batchSize?: number; | ||
| 1688 | cursor?: string | null; | ||
| 1689 | dryRun?: boolean; | ||
| 1690 | fn?: string; | ||
| 1691 | next?: Array<string>; | ||
| 1692 | }, | ||
| 1693 | any | ||
| 1694 | >; | ||
| 1695 | }; | ||
| 1696 | openApiSpecCache: { | ||
| 1697 | getEntry: FunctionReference< | ||
| 1698 | "query", | ||
| 1699 | "internal", | ||
| 1700 | { maxAgeMs: number; specUrl: string; version: string }, | ||
| 1701 | any | ||
| 1702 | >; | ||
| 1703 | putEntry: FunctionReference< | ||
| 1704 | "mutation", | ||
| 1705 | "internal", | ||
| 1706 | { | ||
| 1707 | sizeBytes: number; | ||
| 1708 | specUrl: string; | ||
| 1709 | storageId: Id<"_storage">; | ||
| 1710 | version: string; | ||
| 1711 | }, | ||
| 1712 | any | ||
| 1713 | >; | ||
| 1714 | }; | ||
| 1715 | runtimeNode: { | ||
| 1716 | compileExternalToolSource: FunctionReference< | ||
| 1717 | "action", | ||
| 1718 | "internal", | ||
| 1719 | { source: Record<string, any> }, | ||
| 1720 | any | ||
| 1721 | >; | ||
| 1722 | executeLocalVm: FunctionReference< | ||
| 1723 | "action", | ||
| 1724 | "internal", | ||
| 1725 | { code: string; taskId: string; timeoutMs: number }, | ||
| 1726 | any | ||
| 1727 | >; | ||
| 1728 | prepareOpenApiSpec: FunctionReference< | ||
| 1729 | "action", | ||
| 1730 | "internal", | ||
| 1731 | { includeDts?: boolean; sourceName: string; specUrl: string }, | ||
| 1732 | any | ||
| 1733 | >; | ||
| 1734 | }; | ||
| 1735 | toolRegistry: { | ||
| 1736 | beginBuild: FunctionReference< | ||
| 1737 | "mutation", | ||
| 1738 | "internal", | ||
| 1739 | { buildId: string; signature: string; workspaceId: Id<"workspaces"> }, | ||
| 1740 | any | ||
| 1741 | >; | ||
| 1742 | deleteToolRegistryNamespacesPage: FunctionReference< | ||
| 1743 | "mutation", | ||
| 1744 | "internal", | ||
| 1745 | { buildId: string; cursor?: string; workspaceId: Id<"workspaces"> }, | ||
| 1746 | any | ||
| 1747 | >; | ||
| 1748 | deleteToolRegistryPayloadsPage: FunctionReference< | ||
| 1749 | "mutation", | ||
| 1750 | "internal", | ||
| 1751 | { buildId: string; cursor?: string; workspaceId: Id<"workspaces"> }, | ||
| 1752 | any | ||
| 1753 | >; | ||
| 1754 | deleteToolRegistryToolsPage: FunctionReference< | ||
| 1755 | "mutation", | ||
| 1756 | "internal", | ||
| 1757 | { buildId: string; cursor?: string; workspaceId: Id<"workspaces"> }, | ||
| 1758 | any | ||
| 1759 | >; | ||
| 1760 | failBuild: FunctionReference< | ||
| 1761 | "mutation", | ||
| 1762 | "internal", | ||
| 1763 | { buildId: string; error?: string; workspaceId: Id<"workspaces"> }, | ||
| 1764 | any | ||
| 1765 | >; | ||
| 1766 | finishBuild: FunctionReference< | ||
| 1767 | "mutation", | ||
| 1768 | "internal", | ||
| 1769 | { buildId: string; signature: string; workspaceId: Id<"workspaces"> }, | ||
| 1770 | any | ||
| 1771 | >; | ||
| 1772 | getSerializedToolsByPaths: FunctionReference< | ||
| 1773 | "query", | ||
| 1774 | "internal", | ||
| 1775 | { buildId: string; paths: Array<string>; workspaceId: Id<"workspaces"> }, | ||
| 1776 | any | ||
| 1777 | >; | ||
| 1778 | getState: FunctionReference< | ||
| 1779 | "query", | ||
| 1780 | "internal", | ||
| 1781 | { workspaceId: Id<"workspaces"> }, | ||
| 1782 | any | ||
| 1783 | >; | ||
| 1784 | getToolByPath: FunctionReference< | ||
| 1785 | "query", | ||
| 1786 | "internal", | ||
| 1787 | { buildId: string; path: string; workspaceId: Id<"workspaces"> }, | ||
| 1788 | any | ||
| 1789 | >; | ||
| 1790 | getToolsByNormalizedPath: FunctionReference< | ||
| 1791 | "query", | ||
| 1792 | "internal", | ||
| 1793 | { | ||
| 1794 | buildId: string; | ||
| 1795 | limit: number; | ||
| 1796 | normalizedPath: string; | ||
| 1797 | workspaceId: Id<"workspaces">; | ||
| 1798 | }, | ||
| 1799 | any | ||
| 1800 | >; | ||
| 1801 | listNamespaces: FunctionReference< | ||
| 1802 | "query", | ||
| 1803 | "internal", | ||
| 1804 | { buildId: string; limit: number; workspaceId: Id<"workspaces"> }, | ||
| 1805 | any | ||
| 1806 | >; | ||
| 1807 | listToolsByNamespace: FunctionReference< | ||
| 1808 | "query", | ||
| 1809 | "internal", | ||
| 1810 | { | ||
| 1811 | buildId: string; | ||
| 1812 | limit: number; | ||
| 1813 | namespace: string; | ||
| 1814 | workspaceId: Id<"workspaces">; | ||
| 1815 | }, | ||
| 1816 | any | ||
| 1817 | >; | ||
| 1818 | listToolsBySourcePage: FunctionReference< | ||
| 1819 | "query", | ||
| 1820 | "internal", | ||
| 1821 | { | ||
| 1822 | buildId: string; | ||
| 1823 | cursor?: string; | ||
| 1824 | limit: number; | ||
| 1825 | source: string; | ||
| 1826 | workspaceId: Id<"workspaces">; | ||
| 1827 | }, | ||
| 1828 | any | ||
| 1829 | >; | ||
| 1830 | listToolsPage: FunctionReference< | ||
| 1831 | "query", | ||
| 1832 | "internal", | ||
| 1833 | { | ||
| 1834 | buildId: string; | ||
| 1835 | cursor?: string; | ||
| 1836 | limit: number; | ||
| 1837 | workspaceId: Id<"workspaces">; | ||
| 1838 | }, | ||
| 1839 | any | ||
| 1840 | >; | ||
| 1841 | pruneBuilds: FunctionReference< | ||
| 1842 | "action", | ||
| 1843 | "internal", | ||
| 1844 | { maxRetainedBuilds?: number; workspaceId: Id<"workspaces"> }, | ||
| 1845 | any | ||
| 1846 | >; | ||
| 1847 | putNamespacesBatch: FunctionReference< | ||
| 1848 | "mutation", | ||
| 1849 | "internal", | ||
| 1850 | { | ||
| 1851 | buildId: string; | ||
| 1852 | namespaces: Array<{ | ||
| 1853 | namespace: string; | ||
| 1854 | samplePaths: Array<string>; | ||
| 1855 | toolCount: number; | ||
| 1856 | }>; | ||
| 1857 | workspaceId: Id<"workspaces">; | ||
| 1858 | }, | ||
| 1859 | any | ||
| 1860 | >; | ||
| 1861 | putToolsBatch: FunctionReference< | ||
| 1862 | "mutation", | ||
| 1863 | "internal", | ||
| 1864 | { | ||
| 1865 | buildId: string; | ||
| 1866 | tools: Array<{ | ||
| 1867 | aliases: Array<string>; | ||
| 1868 | approval: "auto" | "required"; | ||
| 1869 | description: string; | ||
| 1870 | displayInput?: string; | ||
| 1871 | displayOutput?: string; | ||
| 1872 | namespace: string; | ||
| 1873 | normalizedPath: string; | ||
| 1874 | path: string; | ||
| 1875 | preferredPath: string; | ||
| 1876 | previewInputKeys?: Array<string>; | ||
| 1877 | requiredInputKeys?: Array<string>; | ||
| 1878 | searchText: string; | ||
| 1879 | serializedToolJson: string; | ||
| 1880 | source?: string; | ||
| 1881 | typedRef?: { | ||
| 1882 | kind: "openapi_operation"; | ||
| 1883 | operationId: string; | ||
| 1884 | sourceKey: string; | ||
| 1885 | }; | ||
| 1886 | }>; | ||
| 1887 | workspaceId: Id<"workspaces">; | ||
| 1888 | }, | ||
| 1889 | any | ||
| 1890 | >; | ||
| 1891 | scanNamespaceBuildsForPrune: FunctionReference< | ||
| 1892 | "query", | ||
| 1893 | "internal", | ||
| 1894 | { cursor?: string; workspaceId: Id<"workspaces"> }, | ||
| 1895 | any | ||
| 1896 | >; | ||
| 1897 | searchTools: FunctionReference< | ||
| 1898 | "query", | ||
| 1899 | "internal", | ||
| 1900 | { | ||
| 1901 | buildId: string; | ||
| 1902 | limit: number; | ||
| 1903 | query: string; | ||
| 1904 | workspaceId: Id<"workspaces">; | ||
| 1905 | }, | ||
| 1906 | any | ||
| 1907 | >; | ||
| 1908 | updateBuildMetadata: FunctionReference< | ||
| 1909 | "mutation", | ||
| 1910 | "internal", | ||
| 1911 | { | ||
| 1912 | buildId: string; | ||
| 1913 | openApiRefHintTables?: Array<{ | ||
| 1914 | refs: Array<{ hint: string; key: string }>; | ||
| 1915 | sourceKey: string; | ||
| 1916 | }>; | ||
| 1917 | sourceAuthProfiles: Array<{ | ||
| 1918 | header?: string; | ||
| 1919 | inferred: boolean; | ||
| 1920 | mode?: "account" | "organization" | "workspace"; | ||
| 1921 | sourceKey: string; | ||
| 1922 | type: "none" | "bearer" | "apiKey" | "basic" | "mixed"; | ||
| 1923 | }>; | ||
| 1924 | sourceQuality: Array<{ | ||
| 1925 | argsQuality: number; | ||
| 1926 | overallQuality: number; | ||
| 1927 | partialUnknownArgsCount: number; | ||
| 1928 | partialUnknownReturnsCount: number; | ||
| 1929 | returnsQuality: number; | ||
| 1930 | sourceKey: string; | ||
| 1931 | toolCount: number; | ||
| 1932 | unknownArgsCount: number; | ||
| 1933 | unknownReturnsCount: number; | ||
| 1934 | }>; | ||
| 1935 | sourceToolCounts: Array<{ sourceName: string; toolCount: number }>; | ||
| 1936 | sourceVersions: Array<{ | ||
| 1937 | sourceId: string; | ||
| 1938 | sourceName: string; | ||
| 1939 | updatedAt: number; | ||
| 1940 | }>; | ||
| 1941 | toolCount: number; | ||
| 1942 | typesStorageId?: Id<"_storage">; | ||
| 1943 | warnings: Array<string>; | ||
| 1944 | workspaceId: Id<"workspaces">; | ||
| 1945 | }, | ||
| 1946 | any | ||
| 1947 | >; | ||
| 1948 | }; | ||
| 1949 | workspaceAuthInternal: { | ||
| 1950 | getWorkspaceAccessForAccount: FunctionReference< | ||
| 1951 | "query", | ||
| 1952 | "internal", | ||
| 1953 | { accountId: Id<"accounts">; workspaceId: Id<"workspaces"> }, | ||
| 1954 | any | ||
| 1955 | >; | ||
| 1956 | getWorkspaceAccessForAnonymousSubject: FunctionReference< | ||
| 1957 | "query", | ||
| 1958 | "internal", | ||
| 1959 | { accountId: string; workspaceId: Id<"workspaces"> }, | ||
| 1960 | any | ||
| 1961 | >; | ||
| 1962 | getWorkspaceAccessForRequest: FunctionReference< | ||
| 1963 | "query", | ||
| 1964 | "internal", | ||
| 1965 | { sessionId?: string; workspaceId: Id<"workspaces"> }, | ||
| 1966 | any | ||
| 1967 | >; | ||
| 1968 | getWorkspaceAccessForWorkosSubject: FunctionReference< | ||
| 1969 | "query", | ||
| 1970 | "internal", | ||
| 1971 | { subject: string; workspaceId: Id<"workspaces"> }, | ||
| 1972 | any | ||
| 1973 | >; | ||
| 1974 | }; | ||
| 1975 | }; | ||
| 126 | 1976 | ||
| 127 | export declare const components: { | 1977 | export declare const components: { |
| 128 | workOSAuthKit: { | 1978 | workOSAuthKit: { |
| @@ -599,4 +2449,138 @@ export declare const components: { · 470 unmodified lines | |||
| 599 | >; | 2449 | >; |
| 600 | }; | 2450 | }; |
| 601 | }; | 2451 | }; |
| 2452 | rateLimiter: { | ||
| 2453 | lib: { | ||
| 2454 | checkRateLimit: FunctionReference< | ||
| 2455 | "query", | ||
| 2456 | "internal", | ||
| 2457 | { | ||
| 2458 | config: | ||
| 2459 | | { | ||
| 2460 | capacity?: number; | ||
| 2461 | kind: "token bucket"; | ||
| 2462 | maxReserved?: number; | ||
| 2463 | period: number; | ||
| 2464 | rate: number; | ||
| 2465 | shards?: number; | ||
| 2466 | start?: null; | ||
| 2467 | } | ||
| 2468 | | { | ||
| 2469 | capacity?: number; | ||
| 2470 | kind: "fixed window"; | ||
| 2471 | maxReserved?: number; | ||
| 2472 | period: number; | ||
| 2473 | rate: number; | ||
| 2474 | shards?: number; | ||
| 2475 | start?: number; | ||
| 2476 | }; | ||
| 2477 | count?: number; | ||
| 2478 | key?: string; | ||
| 2479 | name: string; | ||
| 2480 | reserve?: boolean; | ||
| 2481 | throws?: boolean; | ||
| 2482 | }, | ||
| 2483 | { ok: true; retryAfter?: number } | { ok: false; retryAfter: number } | ||
| 2484 | >; | ||
| 2485 | clearAll: FunctionReference< | ||
| 2486 | "mutation", | ||
| 2487 | "internal", | ||
| 2488 | { before?: number }, | ||
| 2489 | null | ||
| 2490 | >; | ||
| 2491 | getServerTime: FunctionReference<"mutation", "internal", {}, number>; | ||
| 2492 | getValue: FunctionReference< | ||
| 2493 | "query", | ||
| 2494 | "internal", | ||
| 2495 | { | ||
| 2496 | config: | ||
| 2497 | | { | ||
| 2498 | capacity?: number; | ||
| 2499 | kind: "token bucket"; | ||
| 2500 | maxReserved?: number; | ||
| 2501 | period: number; | ||
| 2502 | rate: number; | ||
| 2503 | shards?: number; | ||
| 2504 | start?: null; | ||
| 2505 | } | ||
| 2506 | | { | ||
| 2507 | capacity?: number; | ||
| 2508 | kind: "fixed window"; | ||
| 2509 | maxReserved?: number; | ||
| 2510 | period: number; | ||
| 2511 | rate: number; | ||
| 2512 | shards?: number; | ||
| 2513 | start?: number; | ||
| 2514 | }; | ||
| 2515 | key?: string; | ||
| 2516 | name: string; | ||
| 2517 | sampleShards?: number; | ||
| 2518 | }, | ||
| 2519 | { | ||
| 2520 | config: | ||
| 2521 | | { | ||
| 2522 | capacity?: number; | ||
| 2523 | kind: "token bucket"; | ||
| 2524 | maxReserved?: number; | ||
| 2525 | period: number; | ||
| 2526 | rate: number; | ||
| 2527 | shards?: number; | ||
| 2528 | start?: null; | ||
| 2529 | } | ||
| 2530 | | { | ||
| 2531 | capacity?: number; | ||
| 2532 | kind: "fixed window"; | ||
| 2533 | maxReserved?: number; | ||
| 2534 | period: number; | ||
| 2535 | rate: number; | ||
| 2536 | shards?: number; | ||
| 2537 | start?: number; | ||
| 2538 | }; | ||
| 2539 | shard: number; | ||
| 2540 | ts: number; | ||
| 2541 | value: number; | ||
| 2542 | } | ||
| 2543 | >; | ||
| 2544 | rateLimit: FunctionReference< | ||
| 2545 | "mutation", | ||
| 2546 | "internal", | ||
| 2547 | { | ||
| 2548 | config: | ||
| 2549 | | { | ||
| 2550 | capacity?: number; | ||
| 2551 | kind: "token bucket"; | ||
| 2552 | maxReserved?: number; | ||
| 2553 | period: number; | ||
| 2554 | rate: number; | ||
| 2555 | shards?: number; | ||
| 2556 | start?: null; | ||
| 2557 | } | ||
| 2558 | | { | ||
| 2559 | capacity?: number; | ||
| 2560 | kind: "fixed window"; | ||
| 2561 | maxReserved?: number; | ||
| 2562 | period: number; | ||
| 2563 | rate: number; | ||
| 2564 | shards?: number; | ||
| 2565 | start?: number; | ||
| 2566 | }; | ||
| 2567 | count?: number; | ||
| 2568 | key?: string; | ||
| 2569 | name: string; | ||
| 2570 | reserve?: boolean; | ||
| 2571 | throws?: boolean; | ||
| 2572 | }, | ||
| 2573 | { ok: true; retryAfter?: number } | { ok: false; retryAfter: number } | ||
| 2574 | >; | ||
| 2575 | resetRateLimit: FunctionReference< | ||
| 2576 | "mutation", | ||
| 2577 | "internal", | ||
| 2578 | { key?: string; name: string }, | ||
| 2579 | null | ||
| 2580 | >; | ||
| 2581 | }; | ||
| 2582 | time: { | ||
| 2583 | getServerTime: FunctionReference<"mutation", "internal", {}, number>; | ||
| 2584 | }; | ||
| 2585 | }; | ||
| 602 | }; | 2586 | }; |