@mastra/client-js 1.16.1-alpha.0 → 1.17.0-alpha.2
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/CHANGELOG.md +60 -0
- package/dist/client.d.ts +25 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-server-auth-workos.md +52 -9
- package/dist/docs/references/reference-client-js-workflows.md +50 -1
- package/dist/index.cjs +47 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -4
- package/dist/index.js.map +1 -1
- package/dist/resources/vector.d.ts +5 -5
- package/dist/resources/vector.d.ts.map +1 -1
- package/dist/route-types.generated.d.ts +42286 -0
- package/dist/route-types.generated.d.ts.map +1 -0
- package/dist/types.d.ts +113 -285
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -6
package/dist/types.d.ts
CHANGED
|
@@ -2,19 +2,33 @@ import type { AgentExecutionOptions, MultiPrimitiveExecutionOptions, AgentGenera
|
|
|
2
2
|
import type { MessageListInput } from '@mastra/core/agent/message-list';
|
|
3
3
|
import type { MastraScorerEntry, ScoreRowData } from '@mastra/core/evals';
|
|
4
4
|
import type { CoreMessage } from '@mastra/core/llm';
|
|
5
|
-
import type {
|
|
5
|
+
import type { LogLevel } from '@mastra/core/logger';
|
|
6
6
|
import type { MCPToolType, ServerInfo } from '@mastra/core/mcp';
|
|
7
7
|
import type { AiMessageType, MastraMessageV1, MastraDBMessage, MemoryConfig, StorageThreadType } from '@mastra/core/memory';
|
|
8
8
|
import type { TracingOptions } from '@mastra/core/observability';
|
|
9
9
|
import type { RequestContext } from '@mastra/core/request-context';
|
|
10
|
-
import type { AgentInstructionBlock, PaginationInfo, WorkflowRuns, StorageListMessagesInput,
|
|
10
|
+
import type { AgentInstructionBlock, PaginationInfo, WorkflowRuns, StorageListMessagesInput, Rule, RuleGroup, StorageConditionalVariant, StorageConditionalField, StoredProcessorGraph } from '@mastra/core/storage';
|
|
11
11
|
import type { QueryResult } from '@mastra/core/vector';
|
|
12
12
|
import type { TimeTravelContext, Workflow, WorkflowResult, WorkflowRunStatus, WorkflowState } from '@mastra/core/workflows';
|
|
13
13
|
import type { PublicSchema } from '@mastra/schema-compat/schema';
|
|
14
14
|
import type { JSONSchema7 } from 'json-schema';
|
|
15
15
|
import type { ZodSchema as ZodSchemaV3 } from 'zod/v3';
|
|
16
16
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
17
|
+
import type { Body, QueryParams, RouteKey, RouteResponse, Simplify } from './route-types.generated.js';
|
|
17
18
|
export type ZodSchema = ZodSchemaV3 | ZodTypeV4;
|
|
19
|
+
type OptionalizeUndefined<T> = T extends Date ? Date : T extends (...args: any[]) => any ? T : T extends readonly (infer U)[] ? OptionalizeUndefined<U>[] : T extends object ? Simplify<{
|
|
20
|
+
[K in keyof T as undefined extends T[K] ? never : K]: OptionalizeUndefined<T[K]>;
|
|
21
|
+
} & {
|
|
22
|
+
[K in keyof T as undefined extends T[K] ? K : never]?: OptionalizeUndefined<Exclude<T[K], undefined>>;
|
|
23
|
+
}> : T;
|
|
24
|
+
type Serialized<T> = T extends Date ? string : T extends readonly (infer U)[] ? Serialized<U>[] : T extends object ? {
|
|
25
|
+
[K in keyof T]: Serialized<T[K]>;
|
|
26
|
+
} : T;
|
|
27
|
+
type RequestContextOptions = {
|
|
28
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
29
|
+
};
|
|
30
|
+
type GeneratedRequest<T> = OptionalizeUndefined<T>;
|
|
31
|
+
type GeneratedResponse<T extends RouteKey> = Serialized<RouteResponse<T>>;
|
|
18
32
|
export interface ClientOptions {
|
|
19
33
|
/** Base URL for API requests */
|
|
20
34
|
baseUrl: string;
|
|
@@ -426,17 +440,8 @@ export interface GetWorkflowResponse {
|
|
|
426
440
|
isProcessorWorkflow?: boolean;
|
|
427
441
|
}
|
|
428
442
|
export type WorkflowRunResult = WorkflowResult<any, any, any, any>;
|
|
429
|
-
export
|
|
430
|
-
|
|
431
|
-
vectors: number[][];
|
|
432
|
-
metadata?: Record<string, any>[];
|
|
433
|
-
ids?: string[];
|
|
434
|
-
}
|
|
435
|
-
export interface CreateIndexParams {
|
|
436
|
-
indexName: string;
|
|
437
|
-
dimension: number;
|
|
438
|
-
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
439
|
-
}
|
|
443
|
+
export type UpsertVectorParams = GeneratedRequest<Body<'POST /vector/:vectorName/upsert'>>;
|
|
444
|
+
export type CreateIndexParams = GeneratedRequest<Body<'POST /vector/:vectorName/create-index'>>;
|
|
440
445
|
export interface QueryVectorParams {
|
|
441
446
|
indexName: string;
|
|
442
447
|
queryVector: number[];
|
|
@@ -444,14 +449,8 @@ export interface QueryVectorParams {
|
|
|
444
449
|
filter?: Record<string, any>;
|
|
445
450
|
includeVector?: boolean;
|
|
446
451
|
}
|
|
447
|
-
export
|
|
448
|
-
|
|
449
|
-
}
|
|
450
|
-
export interface GetVectorIndexResponse {
|
|
451
|
-
dimension: number;
|
|
452
|
-
metric: 'cosine' | 'euclidean' | 'dotproduct';
|
|
453
|
-
count: number;
|
|
454
|
-
}
|
|
452
|
+
export type QueryVectorResponse = QueryResult[];
|
|
453
|
+
export type GetVectorIndexResponse = GeneratedResponse<'GET /vector/:vectorName/indexes/:indexName'>;
|
|
455
454
|
export interface SaveMessageToMemoryParams {
|
|
456
455
|
messages: (MastraMessageV1 | MastraDBMessage)[];
|
|
457
456
|
agentId: string;
|
|
@@ -464,15 +463,8 @@ export interface SaveNetworkMessageToMemoryParams {
|
|
|
464
463
|
export type SaveMessageToMemoryResponse = {
|
|
465
464
|
messages: (MastraMessageV1 | MastraDBMessage)[];
|
|
466
465
|
};
|
|
467
|
-
export
|
|
468
|
-
|
|
469
|
-
metadata?: Record<string, any>;
|
|
470
|
-
resourceId: string;
|
|
471
|
-
threadId?: string;
|
|
472
|
-
agentId: string;
|
|
473
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
474
|
-
}
|
|
475
|
-
export type CreateMemoryThreadResponse = StorageThreadType;
|
|
466
|
+
export type CreateMemoryThreadParams = GeneratedRequest<Body<'POST /memory/threads'> & QueryParams<'POST /memory/threads'>> & RequestContextOptions;
|
|
467
|
+
export type CreateMemoryThreadResponse = GeneratedResponse<'POST /memory/threads'>;
|
|
476
468
|
export interface ListMemoryThreadsParams {
|
|
477
469
|
/**
|
|
478
470
|
* Optional resourceId to filter threads. When not provided, returns all threads.
|
|
@@ -493,16 +485,9 @@ export interface ListMemoryThreadsParams {
|
|
|
493
485
|
sortDirection?: 'ASC' | 'DESC';
|
|
494
486
|
requestContext?: RequestContext | Record<string, any>;
|
|
495
487
|
}
|
|
496
|
-
export type ListMemoryThreadsResponse =
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
export interface GetMemoryConfigParams {
|
|
500
|
-
agentId: string;
|
|
501
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
502
|
-
}
|
|
503
|
-
export type GetMemoryConfigResponse = {
|
|
504
|
-
config: MemoryConfig;
|
|
505
|
-
};
|
|
488
|
+
export type ListMemoryThreadsResponse = GeneratedResponse<'GET /memory/threads'>;
|
|
489
|
+
export type GetMemoryConfigParams = GeneratedRequest<QueryParams<'GET /memory/config'>> & RequestContextOptions;
|
|
490
|
+
export type GetMemoryConfigResponse = GeneratedResponse<'GET /memory/config'>;
|
|
506
491
|
export interface UpdateMemoryThreadParams {
|
|
507
492
|
title: string;
|
|
508
493
|
metadata: Record<string, any>;
|
|
@@ -534,15 +519,7 @@ export type CloneMemoryThreadResponse = {
|
|
|
534
519
|
thread: StorageThreadType;
|
|
535
520
|
clonedMessages: MastraDBMessage[];
|
|
536
521
|
};
|
|
537
|
-
export
|
|
538
|
-
transportId: string;
|
|
539
|
-
fromDate?: Date;
|
|
540
|
-
toDate?: Date;
|
|
541
|
-
logLevel?: LogLevel;
|
|
542
|
-
filters?: Record<string, string>;
|
|
543
|
-
page?: number;
|
|
544
|
-
perPage?: number;
|
|
545
|
-
}
|
|
522
|
+
export type GetLogsParams = GeneratedRequest<QueryParams<'GET /logs'>>;
|
|
546
523
|
export interface GetLogParams {
|
|
547
524
|
runId: string;
|
|
548
525
|
transportId: string;
|
|
@@ -553,13 +530,7 @@ export interface GetLogParams {
|
|
|
553
530
|
page?: number;
|
|
554
531
|
perPage?: number;
|
|
555
532
|
}
|
|
556
|
-
export type GetLogsResponse =
|
|
557
|
-
logs: BaseLogMessage[];
|
|
558
|
-
total: number;
|
|
559
|
-
page: number;
|
|
560
|
-
perPage: number;
|
|
561
|
-
hasMore: boolean;
|
|
562
|
-
};
|
|
533
|
+
export type GetLogsResponse = GeneratedResponse<'GET /logs'>;
|
|
563
534
|
export type RequestFunction = (path: string, options?: RequestOptions) => Promise<any>;
|
|
564
535
|
export interface GetVNextNetworkResponse {
|
|
565
536
|
id: string;
|
|
@@ -1381,9 +1352,7 @@ export interface CompareScorerVersionsResponse {
|
|
|
1381
1352
|
toVersion: ScorerVersionResponse;
|
|
1382
1353
|
diffs: VersionDiff[];
|
|
1383
1354
|
}
|
|
1384
|
-
export
|
|
1385
|
-
providers: Provider[];
|
|
1386
|
-
}
|
|
1355
|
+
export type ListAgentsModelProvidersResponse = GeneratedResponse<'GET /agents/providers'>;
|
|
1387
1356
|
export interface Provider {
|
|
1388
1357
|
id: string;
|
|
1389
1358
|
name: string;
|
|
@@ -1396,62 +1365,27 @@ export interface MastraPackage {
|
|
|
1396
1365
|
name: string;
|
|
1397
1366
|
version: string;
|
|
1398
1367
|
}
|
|
1399
|
-
export
|
|
1400
|
-
packages: MastraPackage[];
|
|
1401
|
-
isDev: boolean;
|
|
1402
|
-
cmsEnabled: boolean;
|
|
1403
|
-
observabilityEnabled: boolean;
|
|
1404
|
-
storageType?: string;
|
|
1405
|
-
observabilityStorageType?: string;
|
|
1406
|
-
observabilityRuntimeStrategy?: 'realtime' | 'batch-with-updates' | 'insert-only' | 'event-sourced';
|
|
1407
|
-
}
|
|
1368
|
+
export type GetSystemPackagesResponse = GeneratedResponse<'GET /system/packages'>;
|
|
1408
1369
|
/**
|
|
1409
1370
|
* Workspace capabilities
|
|
1410
1371
|
*/
|
|
1411
|
-
export
|
|
1412
|
-
hasFilesystem: boolean;
|
|
1413
|
-
hasSandbox: boolean;
|
|
1414
|
-
canBM25: boolean;
|
|
1415
|
-
canVector: boolean;
|
|
1416
|
-
canHybrid: boolean;
|
|
1417
|
-
hasSkills: boolean;
|
|
1418
|
-
}
|
|
1372
|
+
export type WorkspaceCapabilities = ListWorkspacesResponse['workspaces'][number]['capabilities'];
|
|
1419
1373
|
/**
|
|
1420
1374
|
* Workspace safety configuration
|
|
1421
1375
|
*/
|
|
1422
|
-
export
|
|
1423
|
-
readOnly: boolean;
|
|
1424
|
-
}
|
|
1376
|
+
export type WorkspaceSafety = ListWorkspacesResponse['workspaces'][number]['safety'];
|
|
1425
1377
|
/**
|
|
1426
1378
|
* Response for getting workspace info
|
|
1427
1379
|
*/
|
|
1428
|
-
export
|
|
1429
|
-
isWorkspaceConfigured: boolean;
|
|
1430
|
-
id?: string;
|
|
1431
|
-
name?: string;
|
|
1432
|
-
status?: string;
|
|
1433
|
-
capabilities?: WorkspaceCapabilities;
|
|
1434
|
-
safety?: WorkspaceSafety;
|
|
1435
|
-
}
|
|
1380
|
+
export type WorkspaceInfoResponse = GeneratedResponse<'GET /workspaces/:workspaceId'>;
|
|
1436
1381
|
/**
|
|
1437
1382
|
* Workspace item in list response
|
|
1438
1383
|
*/
|
|
1439
|
-
export
|
|
1440
|
-
id: string;
|
|
1441
|
-
name: string;
|
|
1442
|
-
status: string;
|
|
1443
|
-
source: 'mastra' | 'agent';
|
|
1444
|
-
agentId?: string;
|
|
1445
|
-
agentName?: string;
|
|
1446
|
-
capabilities: WorkspaceCapabilities;
|
|
1447
|
-
safety: WorkspaceSafety;
|
|
1448
|
-
}
|
|
1384
|
+
export type WorkspaceItem = ListWorkspacesResponse['workspaces'][number];
|
|
1449
1385
|
/**
|
|
1450
1386
|
* Response for listing all workspaces
|
|
1451
1387
|
*/
|
|
1452
|
-
export
|
|
1453
|
-
workspaces: WorkspaceItem[];
|
|
1454
|
-
}
|
|
1388
|
+
export type ListWorkspacesResponse = GeneratedResponse<'GET /workspaces'>;
|
|
1455
1389
|
/**
|
|
1456
1390
|
* File entry in directory listing
|
|
1457
1391
|
*/
|
|
@@ -1463,52 +1397,27 @@ export interface WorkspaceFileEntry {
|
|
|
1463
1397
|
/**
|
|
1464
1398
|
* Response for reading a file
|
|
1465
1399
|
*/
|
|
1466
|
-
export
|
|
1467
|
-
path: string;
|
|
1468
|
-
content: string;
|
|
1469
|
-
type: 'file' | 'directory';
|
|
1470
|
-
size?: number;
|
|
1471
|
-
mimeType?: string;
|
|
1472
|
-
}
|
|
1400
|
+
export type WorkspaceFsReadResponse = GeneratedResponse<'GET /workspaces/:workspaceId/fs/read'>;
|
|
1473
1401
|
/**
|
|
1474
1402
|
* Response for writing a file
|
|
1475
1403
|
*/
|
|
1476
|
-
export
|
|
1477
|
-
success: boolean;
|
|
1478
|
-
path: string;
|
|
1479
|
-
}
|
|
1404
|
+
export type WorkspaceFsWriteResponse = GeneratedResponse<'POST /workspaces/:workspaceId/fs/write'>;
|
|
1480
1405
|
/**
|
|
1481
1406
|
* Response for listing files
|
|
1482
1407
|
*/
|
|
1483
|
-
export
|
|
1484
|
-
path: string;
|
|
1485
|
-
entries: WorkspaceFileEntry[];
|
|
1486
|
-
}
|
|
1408
|
+
export type WorkspaceFsListResponse = GeneratedResponse<'GET /workspaces/:workspaceId/fs/list'>;
|
|
1487
1409
|
/**
|
|
1488
1410
|
* Response for deleting a file
|
|
1489
1411
|
*/
|
|
1490
|
-
export
|
|
1491
|
-
success: boolean;
|
|
1492
|
-
path: string;
|
|
1493
|
-
}
|
|
1412
|
+
export type WorkspaceFsDeleteResponse = GeneratedResponse<'DELETE /workspaces/:workspaceId/fs/delete'>;
|
|
1494
1413
|
/**
|
|
1495
1414
|
* Response for creating a directory
|
|
1496
1415
|
*/
|
|
1497
|
-
export
|
|
1498
|
-
success: boolean;
|
|
1499
|
-
path: string;
|
|
1500
|
-
}
|
|
1416
|
+
export type WorkspaceFsMkdirResponse = GeneratedResponse<'POST /workspaces/:workspaceId/fs/mkdir'>;
|
|
1501
1417
|
/**
|
|
1502
1418
|
* Response for getting file stats
|
|
1503
1419
|
*/
|
|
1504
|
-
export
|
|
1505
|
-
path: string;
|
|
1506
|
-
type: 'file' | 'directory';
|
|
1507
|
-
size?: number;
|
|
1508
|
-
createdAt?: string;
|
|
1509
|
-
modifiedAt?: string;
|
|
1510
|
-
mimeType?: string;
|
|
1511
|
-
}
|
|
1420
|
+
export type WorkspaceFsStatResponse = GeneratedResponse<'GET /workspaces/:workspaceId/fs/stat'>;
|
|
1512
1421
|
/**
|
|
1513
1422
|
* Workspace search result
|
|
1514
1423
|
*/
|
|
@@ -1529,35 +1438,19 @@ export interface WorkspaceSearchResult {
|
|
|
1529
1438
|
/**
|
|
1530
1439
|
* Parameters for searching workspace content
|
|
1531
1440
|
*/
|
|
1532
|
-
export
|
|
1533
|
-
query: string;
|
|
1534
|
-
topK?: number;
|
|
1535
|
-
mode?: 'bm25' | 'vector' | 'hybrid';
|
|
1536
|
-
minScore?: number;
|
|
1537
|
-
}
|
|
1441
|
+
export type WorkspaceSearchParams = GeneratedRequest<QueryParams<'GET /workspaces/:workspaceId/search'>>;
|
|
1538
1442
|
/**
|
|
1539
1443
|
* Response for searching workspace
|
|
1540
1444
|
*/
|
|
1541
|
-
export
|
|
1542
|
-
results: WorkspaceSearchResult[];
|
|
1543
|
-
query: string;
|
|
1544
|
-
mode: 'bm25' | 'vector' | 'hybrid';
|
|
1545
|
-
}
|
|
1445
|
+
export type WorkspaceSearchResponse = GeneratedResponse<'GET /workspaces/:workspaceId/search'>;
|
|
1546
1446
|
/**
|
|
1547
1447
|
* Parameters for indexing content
|
|
1548
1448
|
*/
|
|
1549
|
-
export
|
|
1550
|
-
path: string;
|
|
1551
|
-
content: string;
|
|
1552
|
-
metadata?: Record<string, unknown>;
|
|
1553
|
-
}
|
|
1449
|
+
export type WorkspaceIndexParams = GeneratedRequest<Body<'POST /workspaces/:workspaceId/index'>>;
|
|
1554
1450
|
/**
|
|
1555
1451
|
* Response for indexing content
|
|
1556
1452
|
*/
|
|
1557
|
-
export
|
|
1558
|
-
success: boolean;
|
|
1559
|
-
path: string;
|
|
1560
|
-
}
|
|
1453
|
+
export type WorkspaceIndexResponse = GeneratedResponse<'POST /workspaces/:workspaceId/index'>;
|
|
1561
1454
|
/**
|
|
1562
1455
|
* Skill source type indicating where the skill comes from
|
|
1563
1456
|
*/
|
|
@@ -1796,55 +1689,26 @@ export interface ExecuteProcessorResponse {
|
|
|
1796
1689
|
/**
|
|
1797
1690
|
* Parameters for getting observational memory
|
|
1798
1691
|
*/
|
|
1799
|
-
export
|
|
1800
|
-
agentId: string;
|
|
1801
|
-
resourceId?: string;
|
|
1802
|
-
threadId?: string;
|
|
1692
|
+
export type GetObservationalMemoryParams = Omit<GeneratedRequest<QueryParams<'GET /memory/observational-memory'>>, 'from' | 'to'> & {
|
|
1803
1693
|
from?: Date | string;
|
|
1804
1694
|
to?: Date | string;
|
|
1805
|
-
|
|
1806
|
-
limit?: number;
|
|
1807
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
1808
|
-
}
|
|
1695
|
+
} & RequestContextOptions;
|
|
1809
1696
|
/**
|
|
1810
1697
|
* Response for observational memory endpoint
|
|
1811
1698
|
*/
|
|
1812
|
-
export
|
|
1813
|
-
record: ObservationalMemoryRecord | null;
|
|
1814
|
-
history?: ObservationalMemoryRecord[];
|
|
1815
|
-
}
|
|
1699
|
+
export type GetObservationalMemoryResponse = GeneratedResponse<'GET /memory/observational-memory'>;
|
|
1816
1700
|
/**
|
|
1817
1701
|
* Parameters for awaiting buffer status
|
|
1818
1702
|
*/
|
|
1819
|
-
export
|
|
1820
|
-
agentId: string;
|
|
1821
|
-
resourceId?: string;
|
|
1822
|
-
threadId?: string;
|
|
1823
|
-
requestContext?: RequestContext;
|
|
1824
|
-
}
|
|
1703
|
+
export type AwaitBufferStatusParams = GeneratedRequest<Body<'POST /memory/observational-memory/buffer-status'>> & RequestContextOptions;
|
|
1825
1704
|
/**
|
|
1826
1705
|
* Response for buffer status endpoint
|
|
1827
1706
|
*/
|
|
1828
|
-
export
|
|
1829
|
-
record: ObservationalMemoryRecord | null;
|
|
1830
|
-
}
|
|
1707
|
+
export type AwaitBufferStatusResponse = GeneratedResponse<'POST /memory/observational-memory/buffer-status'>;
|
|
1831
1708
|
/**
|
|
1832
1709
|
* Extended memory status response with OM info
|
|
1833
1710
|
*/
|
|
1834
|
-
export
|
|
1835
|
-
result: boolean;
|
|
1836
|
-
memoryType?: 'local' | 'gateway';
|
|
1837
|
-
observationalMemory?: {
|
|
1838
|
-
enabled: boolean;
|
|
1839
|
-
hasRecord?: boolean;
|
|
1840
|
-
originType?: string;
|
|
1841
|
-
lastObservedAt?: Date | null;
|
|
1842
|
-
tokenCount?: number;
|
|
1843
|
-
observationTokenCount?: number;
|
|
1844
|
-
isObserving?: boolean;
|
|
1845
|
-
isReflecting?: boolean;
|
|
1846
|
-
};
|
|
1847
|
-
}
|
|
1711
|
+
export type GetMemoryStatusResponse = GeneratedResponse<'GET /memory/status'>;
|
|
1848
1712
|
/**
|
|
1849
1713
|
* Extended memory config response with OM config
|
|
1850
1714
|
*/
|
|
@@ -1870,67 +1734,20 @@ export interface GetMemoryConfigResponseExtended {
|
|
|
1870
1734
|
/**
|
|
1871
1735
|
* Response for listing available vector stores
|
|
1872
1736
|
*/
|
|
1873
|
-
export
|
|
1874
|
-
vectors: Array<{
|
|
1875
|
-
name: string;
|
|
1876
|
-
id: string;
|
|
1877
|
-
type: string;
|
|
1878
|
-
}>;
|
|
1879
|
-
}
|
|
1737
|
+
export type ListVectorsResponse = GeneratedResponse<'GET /vectors'>;
|
|
1880
1738
|
/**
|
|
1881
1739
|
* Response for listing available embedding models
|
|
1882
1740
|
*/
|
|
1883
|
-
export
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
export interface ToolProviderInfo {
|
|
1894
|
-
id: string;
|
|
1895
|
-
name: string;
|
|
1896
|
-
description?: string;
|
|
1897
|
-
}
|
|
1898
|
-
export interface ToolProviderToolkit {
|
|
1899
|
-
slug: string;
|
|
1900
|
-
name: string;
|
|
1901
|
-
description?: string;
|
|
1902
|
-
icon?: string;
|
|
1903
|
-
}
|
|
1904
|
-
export interface ToolProviderToolInfo {
|
|
1905
|
-
slug: string;
|
|
1906
|
-
name: string;
|
|
1907
|
-
description?: string;
|
|
1908
|
-
toolkit?: string;
|
|
1909
|
-
}
|
|
1910
|
-
export interface ToolProviderPagination {
|
|
1911
|
-
total?: number;
|
|
1912
|
-
page?: number;
|
|
1913
|
-
perPage?: number;
|
|
1914
|
-
hasMore: boolean;
|
|
1915
|
-
}
|
|
1916
|
-
export interface ListToolProvidersResponse {
|
|
1917
|
-
providers: ToolProviderInfo[];
|
|
1918
|
-
}
|
|
1919
|
-
export interface ListToolProviderToolkitsResponse {
|
|
1920
|
-
data: ToolProviderToolkit[];
|
|
1921
|
-
pagination?: ToolProviderPagination;
|
|
1922
|
-
}
|
|
1923
|
-
export interface ListToolProviderToolsParams {
|
|
1924
|
-
toolkit?: string;
|
|
1925
|
-
search?: string;
|
|
1926
|
-
page?: number;
|
|
1927
|
-
perPage?: number;
|
|
1928
|
-
}
|
|
1929
|
-
export interface ListToolProviderToolsResponse {
|
|
1930
|
-
data: ToolProviderToolInfo[];
|
|
1931
|
-
pagination?: ToolProviderPagination;
|
|
1932
|
-
}
|
|
1933
|
-
export type GetToolProviderToolSchemaResponse = Record<string, unknown>;
|
|
1741
|
+
export type ListEmbeddersResponse = GeneratedResponse<'GET /embedders'>;
|
|
1742
|
+
export type ToolProviderInfo = GeneratedResponse<'GET /tool-providers'>['providers'][number];
|
|
1743
|
+
export type ToolProviderToolkit = GeneratedResponse<'GET /tool-providers/:providerId/toolkits'>['data'][number];
|
|
1744
|
+
export type ToolProviderToolInfo = GeneratedResponse<'GET /tool-providers/:providerId/tools'>['data'][number];
|
|
1745
|
+
export type ToolProviderPagination = NonNullable<GeneratedResponse<'GET /tool-providers/:providerId/toolkits'>['pagination']>;
|
|
1746
|
+
export type ListToolProvidersResponse = GeneratedResponse<'GET /tool-providers'>;
|
|
1747
|
+
export type ListToolProviderToolkitsResponse = GeneratedResponse<'GET /tool-providers/:providerId/toolkits'>;
|
|
1748
|
+
export type ListToolProviderToolsParams = GeneratedRequest<QueryParams<'GET /tool-providers/:providerId/tools'>>;
|
|
1749
|
+
export type ListToolProviderToolsResponse = GeneratedResponse<'GET /tool-providers/:providerId/tools'>;
|
|
1750
|
+
export type GetToolProviderToolSchemaResponse = GeneratedResponse<'GET /tool-providers/:providerId/tools/:toolSlug/schema'>;
|
|
1934
1751
|
/**
|
|
1935
1752
|
* Provider phase names as returned by the server (prefixed form).
|
|
1936
1753
|
* Distinct from ProcessorPhase which uses the short/unprefixed form for processor endpoints.
|
|
@@ -2294,52 +2111,63 @@ export interface DeletePromptBlockVersionResponse {
|
|
|
2294
2111
|
}
|
|
2295
2112
|
export type BackgroundTaskStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed_out';
|
|
2296
2113
|
export type BackgroundTaskDateColumn = 'createdAt' | 'startedAt' | 'completedAt';
|
|
2297
|
-
export
|
|
2114
|
+
export type BackgroundTaskResponse = GeneratedResponse<'GET /background-tasks'>['tasks'][number];
|
|
2115
|
+
export type ListBackgroundTasksParams = GeneratedRequest<QueryParams<'GET /background-tasks'>>;
|
|
2116
|
+
export type ListBackgroundTasksResponse = GeneratedResponse<'GET /background-tasks'>;
|
|
2117
|
+
export type StreamBackgroundTasksParams = GeneratedRequest<QueryParams<'GET /background-tasks/stream'>>;
|
|
2118
|
+
export type ScheduleStatus = 'active' | 'paused';
|
|
2119
|
+
export interface ScheduleTarget {
|
|
2120
|
+
type: 'workflow';
|
|
2121
|
+
workflowId: string;
|
|
2122
|
+
inputData?: unknown;
|
|
2123
|
+
initialState?: unknown;
|
|
2124
|
+
requestContext?: Record<string, unknown>;
|
|
2125
|
+
}
|
|
2126
|
+
export interface ScheduleRunSummary {
|
|
2127
|
+
status: WorkflowRunStatus;
|
|
2128
|
+
startedAt?: number;
|
|
2129
|
+
completedAt?: number;
|
|
2130
|
+
durationMs?: number;
|
|
2131
|
+
error?: string;
|
|
2132
|
+
}
|
|
2133
|
+
export interface ScheduleResponse {
|
|
2298
2134
|
id: string;
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2135
|
+
target: ScheduleTarget;
|
|
2136
|
+
cron: string;
|
|
2137
|
+
timezone?: string;
|
|
2138
|
+
status: ScheduleStatus;
|
|
2139
|
+
nextFireAt: number;
|
|
2140
|
+
lastFireAt?: number;
|
|
2141
|
+
lastRunId?: string;
|
|
2142
|
+
lastRun?: ScheduleRunSummary;
|
|
2143
|
+
metadata?: Record<string, unknown>;
|
|
2144
|
+
createdAt: number;
|
|
2145
|
+
updatedAt: number;
|
|
2146
|
+
}
|
|
2147
|
+
export type ScheduleTriggerStatus = 'published' | 'failed';
|
|
2148
|
+
export interface ScheduleTriggerResponse {
|
|
2149
|
+
scheduleId: string;
|
|
2306
2150
|
runId: string;
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
createdAt: string;
|
|
2313
|
-
startedAt?: string;
|
|
2314
|
-
completedAt?: string;
|
|
2315
|
-
retryCount: number;
|
|
2316
|
-
maxRetries: number;
|
|
2317
|
-
timeoutMs: number;
|
|
2151
|
+
scheduledFireAt: number;
|
|
2152
|
+
actualFireAt: number;
|
|
2153
|
+
status: ScheduleTriggerStatus;
|
|
2154
|
+
error?: string;
|
|
2155
|
+
run?: ScheduleRunSummary;
|
|
2318
2156
|
}
|
|
2319
|
-
export interface
|
|
2320
|
-
|
|
2321
|
-
status?:
|
|
2322
|
-
runId?: string;
|
|
2323
|
-
threadId?: string;
|
|
2324
|
-
resourceId?: string;
|
|
2325
|
-
fromDate?: Date;
|
|
2326
|
-
toDate?: Date;
|
|
2327
|
-
dateFilterBy?: BackgroundTaskDateColumn;
|
|
2328
|
-
orderBy?: BackgroundTaskDateColumn;
|
|
2329
|
-
orderDirection?: 'asc' | 'desc';
|
|
2330
|
-
page?: number;
|
|
2331
|
-
perPage?: number;
|
|
2157
|
+
export interface ListSchedulesParams {
|
|
2158
|
+
workflowId?: string;
|
|
2159
|
+
status?: ScheduleStatus;
|
|
2332
2160
|
}
|
|
2333
|
-
export interface
|
|
2334
|
-
|
|
2335
|
-
total: number;
|
|
2161
|
+
export interface ListSchedulesResponse {
|
|
2162
|
+
schedules: ScheduleResponse[];
|
|
2336
2163
|
}
|
|
2337
|
-
export interface
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2164
|
+
export interface ListScheduleTriggersParams {
|
|
2165
|
+
limit?: number;
|
|
2166
|
+
fromActualFireAt?: number;
|
|
2167
|
+
toActualFireAt?: number;
|
|
2168
|
+
}
|
|
2169
|
+
export interface ListScheduleTriggersResponse {
|
|
2170
|
+
triggers: ScheduleTriggerResponse[];
|
|
2343
2171
|
}
|
|
2344
2172
|
export interface ExperimentReviewCounts {
|
|
2345
2173
|
experimentId: string;
|