@trigger.dev/core 4.8.0-webhooks.20261015065339 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/logger.js +1 -1
- package/dist/commonjs/logger.js.map +1 -1
- package/dist/commonjs/utils.js.map +1 -1
- package/dist/commonjs/v3/apiClient/core.d.ts +2 -0
- package/dist/commonjs/v3/apiClient/core.js +2 -0
- package/dist/commonjs/v3/apiClient/core.js.map +1 -1
- package/dist/commonjs/v3/apiClient/getBranch.js +2 -2
- package/dist/commonjs/v3/apiClient/getBranch.js.map +1 -1
- package/dist/commonjs/v3/apiClient/index.d.ts +358 -2
- package/dist/commonjs/v3/apiClient/index.js +61 -2
- package/dist/commonjs/v3/apiClient/index.js.map +1 -1
- package/dist/commonjs/v3/apiClient/runStream.js +38 -19
- package/dist/commonjs/v3/apiClient/runStream.js.map +1 -1
- package/dist/commonjs/v3/apiClient/stream.js +7 -1
- package/dist/commonjs/v3/apiClient/stream.js.map +1 -1
- package/dist/commonjs/v3/config.d.ts +44 -1
- package/dist/commonjs/v3/otel/tracingSDK.d.ts +2 -0
- package/dist/commonjs/v3/otel/tracingSDK.js +2 -1
- package/dist/commonjs/v3/otel/tracingSDK.js.map +1 -1
- package/dist/commonjs/v3/otel/userSpanProcessor.d.ts +20 -0
- package/dist/commonjs/v3/otel/userSpanProcessor.js +94 -0
- package/dist/commonjs/v3/otel/userSpanProcessor.js.map +1 -0
- package/dist/commonjs/v3/runEngineWorker/supervisor/continueRetry.d.ts +28 -0
- package/dist/commonjs/v3/runEngineWorker/supervisor/continueRetry.js +54 -0
- package/dist/commonjs/v3/runEngineWorker/supervisor/continueRetry.js.map +1 -0
- package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +7 -16
- package/dist/commonjs/v3/runEngineWorker/supervisor/http.js +21 -16
- package/dist/commonjs/v3/runEngineWorker/supervisor/http.js.map +1 -1
- package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +1 -0
- package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.js +2 -0
- package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.js.map +1 -1
- package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +1 -0
- package/dist/commonjs/v3/schemas/api.d.ts +30 -0
- package/dist/commonjs/v3/schemas/api.js +4 -1
- package/dist/commonjs/v3/schemas/api.js.map +1 -1
- package/dist/commonjs/v3/schemas/build.d.ts +84 -24
- package/dist/commonjs/v3/schemas/index.d.ts +1 -0
- package/dist/commonjs/v3/schemas/messages.d.ts +50 -20
- package/dist/commonjs/v3/schemas/query.d.ts +854 -0
- package/dist/commonjs/v3/schemas/query.js +156 -1
- package/dist/commonjs/v3/schemas/query.js.map +1 -1
- package/dist/commonjs/v3/schemas/resources.d.ts +84 -24
- package/dist/commonjs/v3/schemas/schemas.d.ts +60 -0
- package/dist/commonjs/v3/schemas/webhookApi.d.ts +14 -0
- package/dist/commonjs/v3/schemas/webhookApi.js +20 -1
- package/dist/commonjs/v3/schemas/webhookApi.js.map +1 -1
- package/dist/commonjs/v3/schemas/webhookConfig.d.ts +68 -0
- package/dist/commonjs/v3/schemas/webhookConfig.js +46 -5
- package/dist/commonjs/v3/schemas/webhookConfig.js.map +1 -1
- package/dist/commonjs/v3/schemas/webhookFilter.d.ts +5 -4
- package/dist/commonjs/v3/streams/asyncIterableStream.d.ts +1 -1
- package/dist/commonjs/v3/streams/asyncIterableStream.js +46 -12
- package/dist/commonjs/v3/streams/asyncIterableStream.js.map +1 -1
- package/dist/commonjs/v3/utils/structuredLogger.d.ts +6 -6
- package/dist/commonjs/v3/utils/structuredLogger.js.map +1 -1
- package/dist/commonjs/v3/webhooks/index.d.ts +713 -5
- package/dist/commonjs/v3/webhooks/index.js +247 -14
- package/dist/commonjs/v3/webhooks/index.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/logger.js +1 -1
- package/dist/esm/logger.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/v3/apiClient/core.d.ts +2 -0
- package/dist/esm/v3/apiClient/core.js +2 -0
- package/dist/esm/v3/apiClient/core.js.map +1 -1
- package/dist/esm/v3/apiClient/getBranch.js +2 -2
- package/dist/esm/v3/apiClient/getBranch.js.map +1 -1
- package/dist/esm/v3/apiClient/index.d.ts +358 -2
- package/dist/esm/v3/apiClient/index.js +62 -3
- package/dist/esm/v3/apiClient/index.js.map +1 -1
- package/dist/esm/v3/apiClient/runStream.js +38 -19
- package/dist/esm/v3/apiClient/runStream.js.map +1 -1
- package/dist/esm/v3/apiClient/stream.js +7 -1
- package/dist/esm/v3/apiClient/stream.js.map +1 -1
- package/dist/esm/v3/config.d.ts +44 -1
- package/dist/esm/v3/otel/tracingSDK.d.ts +2 -0
- package/dist/esm/v3/otel/tracingSDK.js +2 -1
- package/dist/esm/v3/otel/tracingSDK.js.map +1 -1
- package/dist/esm/v3/otel/userSpanProcessor.d.ts +20 -0
- package/dist/esm/v3/otel/userSpanProcessor.js +90 -0
- package/dist/esm/v3/otel/userSpanProcessor.js.map +1 -0
- package/dist/esm/v3/runEngineWorker/supervisor/continueRetry.d.ts +28 -0
- package/dist/esm/v3/runEngineWorker/supervisor/continueRetry.js +51 -0
- package/dist/esm/v3/runEngineWorker/supervisor/continueRetry.js.map +1 -0
- package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +7 -16
- package/dist/esm/v3/runEngineWorker/supervisor/http.js +21 -16
- package/dist/esm/v3/runEngineWorker/supervisor/http.js.map +1 -1
- package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +1 -0
- package/dist/esm/v3/runEngineWorker/supervisor/schemas.js +2 -0
- package/dist/esm/v3/runEngineWorker/supervisor/schemas.js.map +1 -1
- package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +1 -0
- package/dist/esm/v3/schemas/api.d.ts +30 -0
- package/dist/esm/v3/schemas/api.js +4 -1
- package/dist/esm/v3/schemas/api.js.map +1 -1
- package/dist/esm/v3/schemas/build.d.ts +84 -24
- package/dist/esm/v3/schemas/index.d.ts +1 -0
- package/dist/esm/v3/schemas/messages.d.ts +50 -20
- package/dist/esm/v3/schemas/query.d.ts +854 -0
- package/dist/esm/v3/schemas/query.js +155 -0
- package/dist/esm/v3/schemas/query.js.map +1 -1
- package/dist/esm/v3/schemas/resources.d.ts +84 -24
- package/dist/esm/v3/schemas/schemas.d.ts +60 -0
- package/dist/esm/v3/schemas/webhookApi.d.ts +14 -0
- package/dist/esm/v3/schemas/webhookApi.js +19 -0
- package/dist/esm/v3/schemas/webhookApi.js.map +1 -1
- package/dist/esm/v3/schemas/webhookConfig.d.ts +68 -0
- package/dist/esm/v3/schemas/webhookConfig.js +46 -5
- package/dist/esm/v3/schemas/webhookConfig.js.map +1 -1
- package/dist/esm/v3/schemas/webhookFilter.d.ts +5 -4
- package/dist/esm/v3/streams/asyncIterableStream.d.ts +1 -1
- package/dist/esm/v3/streams/asyncIterableStream.js +46 -12
- package/dist/esm/v3/streams/asyncIterableStream.js.map +1 -1
- package/dist/esm/v3/utils/structuredLogger.d.ts +6 -6
- package/dist/esm/v3/utils/structuredLogger.js.map +1 -1
- package/dist/esm/v3/webhooks/index.d.ts +713 -5
- package/dist/esm/v3/webhooks/index.js +247 -14
- package/dist/esm/v3/webhooks/index.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
import type { ApiClientConfiguration } from "../apiClientManager-api.js";
|
|
3
|
-
import { type AddTagsRequestBody, type ApiDeploymentListOptions, type BatchItemNDJSON, type BatchTriggerTaskV3RequestBody, type CloseSessionRequestBody, type CompleteWaitpointTokenRequestBody, type CreateBatchRequestBody, type CreateEnvironmentVariableRequestBody, type CreateInputStreamWaitpointRequestBody, type CreatePromptOverrideRequestBody, type ListWebhookDeliveriesQuery, type CreateWebhookWaiterRequestBody, type SetWebhookEndpointSecretRequestBody, type CreateScheduleOptions, type CreateSessionRequestBody, type CreateSessionStreamWaitpointRequestBody, type CreateWaitpointTokenRequestBody, type EndAndContinueSessionRequestBody, type ListQueueOptions, type ListConcurrencyLimitOptions, type OverrideConcurrencyLimitBoundsBody, type OverrideConcurrencyLimitKeyBody, type ResetConcurrencyLimitRequestBody, type ListScheduleOptions, type ListSessionsOptions, type PromotePromptVersionRequestBody, type ReactivatePromptOverrideRequestBody, ReplayRunRequestBody, type RescheduleRunRequestBody, type ResolvePromptRequestBody, type RetrieveQueueParam, type TriggerTaskRequestBody, type UpdateEnvironmentVariableRequestBody, type UpdateMetadataRequestBody, type UpdatePromptOverrideRequestBody, type UpdateScheduleOptions, type UpdateSessionRequestBody, type WaitForDurationRequestBody, BulkActionObject, BatchTaskRunExecutionResult, CreateBatchResponse, CreateWaitpointTokenResponseBody, ListDashboardsResponseBody, ListRunResponseItem, ListedSessionItem, QueryExecuteResponseBody, QuerySchemaResponseBody, ReplayRunResponse, type ReportViewModel, StreamBatchItemsResponse, TaskRunExecutionResult, WaitpointTokenItem } from "../schemas/index.js";
|
|
3
|
+
import { type AddTagsRequestBody, type ApiDeploymentListOptions, type BatchItemNDJSON, type BatchTriggerTaskV3RequestBody, type CloseSessionRequestBody, type CompleteWaitpointTokenRequestBody, type CreateBatchRequestBody, type CreateEnvironmentVariableRequestBody, type CreateInputStreamWaitpointRequestBody, type CreatePromptOverrideRequestBody, type ListWebhookDeliveriesQuery, type CreateWebhookWaiterRequestBody, type RotateWebhookEndpointSecretRequestBody, type SetWebhookEndpointSecretRequestBody, type CreateScheduleOptions, type CreateSessionRequestBody, type CreateSessionStreamWaitpointRequestBody, type CreateWaitpointTokenRequestBody, type EndAndContinueSessionRequestBody, type ListQueueOptions, type ListConcurrencyLimitOptions, type OverrideConcurrencyLimitBoundsBody, type OverrideConcurrencyLimitKeyBody, type ResetConcurrencyLimitRequestBody, type ListScheduleOptions, type ListSessionsOptions, type PromotePromptVersionRequestBody, type ReactivatePromptOverrideRequestBody, ReplayRunRequestBody, type RescheduleRunRequestBody, type ResolvePromptRequestBody, type RetrieveQueueParam, type TriggerTaskRequestBody, type UpdateEnvironmentVariableRequestBody, type UpdateMetadataRequestBody, type UpdatePromptOverrideRequestBody, type UpdateScheduleOptions, type UpdateSessionRequestBody, type WaitForDurationRequestBody, BulkActionObject, BatchTaskRunExecutionResult, CreateBatchResponse, CreateWaitpointTokenResponseBody, ListDashboardsResponseBody, type AddDashboardWidgetRequestBody, type CreateDashboardRequestBody, type ReplaceDashboardRequestBody, type UpdateDashboardRequestBody, type UpdateDashboardWidgetRequestBody, ListRunResponseItem, ListedSessionItem, QueryExecuteResponseBody, QuerySchemaResponseBody, ReplayRunResponse, type ReportViewModel, StreamBatchItemsResponse, TaskRunExecutionResult, WaitpointTokenItem } from "../schemas/index.js";
|
|
4
4
|
import { type ControlEvent } from "../sessionStreams/wireProtocol.js";
|
|
5
5
|
import type { AsyncIterableStream } from "../streams/asyncIterableStream.js";
|
|
6
6
|
import type { AnyRunTypes, TriggerJwtOptions } from "../types/tasks.js";
|
|
@@ -1281,6 +1281,7 @@ export declare class ApiClient {
|
|
|
1281
1281
|
closeOnComplete?: boolean;
|
|
1282
1282
|
onFetchError?: (error: Error) => void;
|
|
1283
1283
|
skipColumns?: string[];
|
|
1284
|
+
fetchClient?: typeof fetch;
|
|
1284
1285
|
}): RunSubscription<TRunTypes>;
|
|
1285
1286
|
subscribeToRunsWithTag<TRunTypes extends AnyRunTypes>(tag: string | string[], filters?: {
|
|
1286
1287
|
createdAt?: string;
|
|
@@ -1288,11 +1289,13 @@ export declare class ApiClient {
|
|
|
1288
1289
|
}, options?: {
|
|
1289
1290
|
signal?: AbortSignal;
|
|
1290
1291
|
onFetchError?: (error: Error) => void;
|
|
1292
|
+
fetchClient?: typeof fetch;
|
|
1291
1293
|
}): RunSubscription<TRunTypes>;
|
|
1292
1294
|
subscribeToBatch<TRunTypes extends AnyRunTypes>(batchId: string, options?: {
|
|
1293
1295
|
signal?: AbortSignal;
|
|
1294
1296
|
onFetchError?: (error: Error) => void;
|
|
1295
1297
|
skipColumns?: string[];
|
|
1298
|
+
fetchClient?: typeof fetch;
|
|
1296
1299
|
}): RunSubscription<TRunTypes>;
|
|
1297
1300
|
listDeployments(options?: ApiDeploymentListOptions, requestOptions?: ZodFetchOptions): CursorPagePromise<z.ZodObject<{
|
|
1298
1301
|
id: z.ZodString;
|
|
@@ -1406,6 +1409,357 @@ export declare class ApiClient {
|
|
|
1406
1409
|
}, requestOptions?: ZodFetchOptions): Promise<QueryExecuteResponseBody>;
|
|
1407
1410
|
getQuerySchema(requestOptions?: ZodFetchOptions): Promise<QuerySchemaResponseBody>;
|
|
1408
1411
|
listDashboards(requestOptions?: ZodFetchOptions): Promise<ListDashboardsResponseBody>;
|
|
1412
|
+
retrieveDashboard(dashboardId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1413
|
+
id: string;
|
|
1414
|
+
title: string;
|
|
1415
|
+
description: string;
|
|
1416
|
+
revision: string;
|
|
1417
|
+
createdAt: Date;
|
|
1418
|
+
updatedAt: Date;
|
|
1419
|
+
widgets: {
|
|
1420
|
+
id: string;
|
|
1421
|
+
title: string;
|
|
1422
|
+
query: string;
|
|
1423
|
+
display: {
|
|
1424
|
+
type: "table";
|
|
1425
|
+
prettyFormatting: boolean;
|
|
1426
|
+
sorting: {
|
|
1427
|
+
desc: boolean;
|
|
1428
|
+
id: string;
|
|
1429
|
+
}[];
|
|
1430
|
+
} | {
|
|
1431
|
+
chartType: "bar" | "line";
|
|
1432
|
+
xAxisColumn: string | null;
|
|
1433
|
+
yAxisColumns: string[];
|
|
1434
|
+
groupByColumn: string | null;
|
|
1435
|
+
stacked: boolean;
|
|
1436
|
+
sortByColumn: string | null;
|
|
1437
|
+
sortDirection: "asc" | "desc";
|
|
1438
|
+
aggregation: "avg" | "count" | "max" | "min" | "sum";
|
|
1439
|
+
seriesColors?: Record<string, string> | undefined;
|
|
1440
|
+
type: "chart";
|
|
1441
|
+
} | {
|
|
1442
|
+
column: string;
|
|
1443
|
+
aggregation: "avg" | "count" | "first" | "last" | "max" | "min" | "sum";
|
|
1444
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1445
|
+
abbreviate: boolean;
|
|
1446
|
+
prefix?: string | undefined;
|
|
1447
|
+
suffix?: string | undefined;
|
|
1448
|
+
type: "bignumber";
|
|
1449
|
+
} | {
|
|
1450
|
+
type: "title";
|
|
1451
|
+
};
|
|
1452
|
+
fillGaps?: boolean | undefined;
|
|
1453
|
+
position: {
|
|
1454
|
+
x: number;
|
|
1455
|
+
y: number;
|
|
1456
|
+
w: number;
|
|
1457
|
+
h: number;
|
|
1458
|
+
};
|
|
1459
|
+
}[];
|
|
1460
|
+
}>;
|
|
1461
|
+
createDashboard(body: CreateDashboardRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1462
|
+
id: string;
|
|
1463
|
+
title: string;
|
|
1464
|
+
description: string;
|
|
1465
|
+
revision: string;
|
|
1466
|
+
createdAt: Date;
|
|
1467
|
+
updatedAt: Date;
|
|
1468
|
+
widgets: {
|
|
1469
|
+
id: string;
|
|
1470
|
+
title: string;
|
|
1471
|
+
query: string;
|
|
1472
|
+
display: {
|
|
1473
|
+
type: "table";
|
|
1474
|
+
prettyFormatting: boolean;
|
|
1475
|
+
sorting: {
|
|
1476
|
+
desc: boolean;
|
|
1477
|
+
id: string;
|
|
1478
|
+
}[];
|
|
1479
|
+
} | {
|
|
1480
|
+
chartType: "bar" | "line";
|
|
1481
|
+
xAxisColumn: string | null;
|
|
1482
|
+
yAxisColumns: string[];
|
|
1483
|
+
groupByColumn: string | null;
|
|
1484
|
+
stacked: boolean;
|
|
1485
|
+
sortByColumn: string | null;
|
|
1486
|
+
sortDirection: "asc" | "desc";
|
|
1487
|
+
aggregation: "avg" | "count" | "max" | "min" | "sum";
|
|
1488
|
+
seriesColors?: Record<string, string> | undefined;
|
|
1489
|
+
type: "chart";
|
|
1490
|
+
} | {
|
|
1491
|
+
column: string;
|
|
1492
|
+
aggregation: "avg" | "count" | "first" | "last" | "max" | "min" | "sum";
|
|
1493
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1494
|
+
abbreviate: boolean;
|
|
1495
|
+
prefix?: string | undefined;
|
|
1496
|
+
suffix?: string | undefined;
|
|
1497
|
+
type: "bignumber";
|
|
1498
|
+
} | {
|
|
1499
|
+
type: "title";
|
|
1500
|
+
};
|
|
1501
|
+
fillGaps?: boolean | undefined;
|
|
1502
|
+
position: {
|
|
1503
|
+
x: number;
|
|
1504
|
+
y: number;
|
|
1505
|
+
w: number;
|
|
1506
|
+
h: number;
|
|
1507
|
+
};
|
|
1508
|
+
}[];
|
|
1509
|
+
}>;
|
|
1510
|
+
updateDashboard(dashboardId: string, body: UpdateDashboardRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1511
|
+
id: string;
|
|
1512
|
+
title: string;
|
|
1513
|
+
description: string;
|
|
1514
|
+
revision: string;
|
|
1515
|
+
createdAt: Date;
|
|
1516
|
+
updatedAt: Date;
|
|
1517
|
+
widgets: {
|
|
1518
|
+
id: string;
|
|
1519
|
+
title: string;
|
|
1520
|
+
query: string;
|
|
1521
|
+
display: {
|
|
1522
|
+
type: "table";
|
|
1523
|
+
prettyFormatting: boolean;
|
|
1524
|
+
sorting: {
|
|
1525
|
+
desc: boolean;
|
|
1526
|
+
id: string;
|
|
1527
|
+
}[];
|
|
1528
|
+
} | {
|
|
1529
|
+
chartType: "bar" | "line";
|
|
1530
|
+
xAxisColumn: string | null;
|
|
1531
|
+
yAxisColumns: string[];
|
|
1532
|
+
groupByColumn: string | null;
|
|
1533
|
+
stacked: boolean;
|
|
1534
|
+
sortByColumn: string | null;
|
|
1535
|
+
sortDirection: "asc" | "desc";
|
|
1536
|
+
aggregation: "avg" | "count" | "max" | "min" | "sum";
|
|
1537
|
+
seriesColors?: Record<string, string> | undefined;
|
|
1538
|
+
type: "chart";
|
|
1539
|
+
} | {
|
|
1540
|
+
column: string;
|
|
1541
|
+
aggregation: "avg" | "count" | "first" | "last" | "max" | "min" | "sum";
|
|
1542
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1543
|
+
abbreviate: boolean;
|
|
1544
|
+
prefix?: string | undefined;
|
|
1545
|
+
suffix?: string | undefined;
|
|
1546
|
+
type: "bignumber";
|
|
1547
|
+
} | {
|
|
1548
|
+
type: "title";
|
|
1549
|
+
};
|
|
1550
|
+
fillGaps?: boolean | undefined;
|
|
1551
|
+
position: {
|
|
1552
|
+
x: number;
|
|
1553
|
+
y: number;
|
|
1554
|
+
w: number;
|
|
1555
|
+
h: number;
|
|
1556
|
+
};
|
|
1557
|
+
}[];
|
|
1558
|
+
}>;
|
|
1559
|
+
replaceDashboard(dashboardId: string, body: ReplaceDashboardRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1560
|
+
id: string;
|
|
1561
|
+
title: string;
|
|
1562
|
+
description: string;
|
|
1563
|
+
revision: string;
|
|
1564
|
+
createdAt: Date;
|
|
1565
|
+
updatedAt: Date;
|
|
1566
|
+
widgets: {
|
|
1567
|
+
id: string;
|
|
1568
|
+
title: string;
|
|
1569
|
+
query: string;
|
|
1570
|
+
display: {
|
|
1571
|
+
type: "table";
|
|
1572
|
+
prettyFormatting: boolean;
|
|
1573
|
+
sorting: {
|
|
1574
|
+
desc: boolean;
|
|
1575
|
+
id: string;
|
|
1576
|
+
}[];
|
|
1577
|
+
} | {
|
|
1578
|
+
chartType: "bar" | "line";
|
|
1579
|
+
xAxisColumn: string | null;
|
|
1580
|
+
yAxisColumns: string[];
|
|
1581
|
+
groupByColumn: string | null;
|
|
1582
|
+
stacked: boolean;
|
|
1583
|
+
sortByColumn: string | null;
|
|
1584
|
+
sortDirection: "asc" | "desc";
|
|
1585
|
+
aggregation: "avg" | "count" | "max" | "min" | "sum";
|
|
1586
|
+
seriesColors?: Record<string, string> | undefined;
|
|
1587
|
+
type: "chart";
|
|
1588
|
+
} | {
|
|
1589
|
+
column: string;
|
|
1590
|
+
aggregation: "avg" | "count" | "first" | "last" | "max" | "min" | "sum";
|
|
1591
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1592
|
+
abbreviate: boolean;
|
|
1593
|
+
prefix?: string | undefined;
|
|
1594
|
+
suffix?: string | undefined;
|
|
1595
|
+
type: "bignumber";
|
|
1596
|
+
} | {
|
|
1597
|
+
type: "title";
|
|
1598
|
+
};
|
|
1599
|
+
fillGaps?: boolean | undefined;
|
|
1600
|
+
position: {
|
|
1601
|
+
x: number;
|
|
1602
|
+
y: number;
|
|
1603
|
+
w: number;
|
|
1604
|
+
h: number;
|
|
1605
|
+
};
|
|
1606
|
+
}[];
|
|
1607
|
+
}>;
|
|
1608
|
+
deleteDashboard(dashboardId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1609
|
+
id: string;
|
|
1610
|
+
}>;
|
|
1611
|
+
addDashboardWidget(dashboardId: string, body: AddDashboardWidgetRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1612
|
+
widgetId: string;
|
|
1613
|
+
dashboard: {
|
|
1614
|
+
id: string;
|
|
1615
|
+
title: string;
|
|
1616
|
+
description: string;
|
|
1617
|
+
revision: string;
|
|
1618
|
+
createdAt: Date;
|
|
1619
|
+
updatedAt: Date;
|
|
1620
|
+
widgets: {
|
|
1621
|
+
id: string;
|
|
1622
|
+
title: string;
|
|
1623
|
+
query: string;
|
|
1624
|
+
display: {
|
|
1625
|
+
type: "table";
|
|
1626
|
+
prettyFormatting: boolean;
|
|
1627
|
+
sorting: {
|
|
1628
|
+
desc: boolean;
|
|
1629
|
+
id: string;
|
|
1630
|
+
}[];
|
|
1631
|
+
} | {
|
|
1632
|
+
chartType: "bar" | "line";
|
|
1633
|
+
xAxisColumn: string | null;
|
|
1634
|
+
yAxisColumns: string[];
|
|
1635
|
+
groupByColumn: string | null;
|
|
1636
|
+
stacked: boolean;
|
|
1637
|
+
sortByColumn: string | null;
|
|
1638
|
+
sortDirection: "asc" | "desc";
|
|
1639
|
+
aggregation: "avg" | "count" | "max" | "min" | "sum";
|
|
1640
|
+
seriesColors?: Record<string, string> | undefined;
|
|
1641
|
+
type: "chart";
|
|
1642
|
+
} | {
|
|
1643
|
+
column: string;
|
|
1644
|
+
aggregation: "avg" | "count" | "first" | "last" | "max" | "min" | "sum";
|
|
1645
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1646
|
+
abbreviate: boolean;
|
|
1647
|
+
prefix?: string | undefined;
|
|
1648
|
+
suffix?: string | undefined;
|
|
1649
|
+
type: "bignumber";
|
|
1650
|
+
} | {
|
|
1651
|
+
type: "title";
|
|
1652
|
+
};
|
|
1653
|
+
fillGaps?: boolean | undefined;
|
|
1654
|
+
position: {
|
|
1655
|
+
x: number;
|
|
1656
|
+
y: number;
|
|
1657
|
+
w: number;
|
|
1658
|
+
h: number;
|
|
1659
|
+
};
|
|
1660
|
+
}[];
|
|
1661
|
+
};
|
|
1662
|
+
}>;
|
|
1663
|
+
updateDashboardWidget(dashboardId: string, widgetId: string, body: UpdateDashboardWidgetRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1664
|
+
id: string;
|
|
1665
|
+
title: string;
|
|
1666
|
+
description: string;
|
|
1667
|
+
revision: string;
|
|
1668
|
+
createdAt: Date;
|
|
1669
|
+
updatedAt: Date;
|
|
1670
|
+
widgets: {
|
|
1671
|
+
id: string;
|
|
1672
|
+
title: string;
|
|
1673
|
+
query: string;
|
|
1674
|
+
display: {
|
|
1675
|
+
type: "table";
|
|
1676
|
+
prettyFormatting: boolean;
|
|
1677
|
+
sorting: {
|
|
1678
|
+
desc: boolean;
|
|
1679
|
+
id: string;
|
|
1680
|
+
}[];
|
|
1681
|
+
} | {
|
|
1682
|
+
chartType: "bar" | "line";
|
|
1683
|
+
xAxisColumn: string | null;
|
|
1684
|
+
yAxisColumns: string[];
|
|
1685
|
+
groupByColumn: string | null;
|
|
1686
|
+
stacked: boolean;
|
|
1687
|
+
sortByColumn: string | null;
|
|
1688
|
+
sortDirection: "asc" | "desc";
|
|
1689
|
+
aggregation: "avg" | "count" | "max" | "min" | "sum";
|
|
1690
|
+
seriesColors?: Record<string, string> | undefined;
|
|
1691
|
+
type: "chart";
|
|
1692
|
+
} | {
|
|
1693
|
+
column: string;
|
|
1694
|
+
aggregation: "avg" | "count" | "first" | "last" | "max" | "min" | "sum";
|
|
1695
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1696
|
+
abbreviate: boolean;
|
|
1697
|
+
prefix?: string | undefined;
|
|
1698
|
+
suffix?: string | undefined;
|
|
1699
|
+
type: "bignumber";
|
|
1700
|
+
} | {
|
|
1701
|
+
type: "title";
|
|
1702
|
+
};
|
|
1703
|
+
fillGaps?: boolean | undefined;
|
|
1704
|
+
position: {
|
|
1705
|
+
x: number;
|
|
1706
|
+
y: number;
|
|
1707
|
+
w: number;
|
|
1708
|
+
h: number;
|
|
1709
|
+
};
|
|
1710
|
+
}[];
|
|
1711
|
+
}>;
|
|
1712
|
+
deleteDashboardWidget(dashboardId: string, widgetId: string, options?: {
|
|
1713
|
+
revision?: string;
|
|
1714
|
+
}, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1715
|
+
id: string;
|
|
1716
|
+
title: string;
|
|
1717
|
+
description: string;
|
|
1718
|
+
revision: string;
|
|
1719
|
+
createdAt: Date;
|
|
1720
|
+
updatedAt: Date;
|
|
1721
|
+
widgets: {
|
|
1722
|
+
id: string;
|
|
1723
|
+
title: string;
|
|
1724
|
+
query: string;
|
|
1725
|
+
display: {
|
|
1726
|
+
type: "table";
|
|
1727
|
+
prettyFormatting: boolean;
|
|
1728
|
+
sorting: {
|
|
1729
|
+
desc: boolean;
|
|
1730
|
+
id: string;
|
|
1731
|
+
}[];
|
|
1732
|
+
} | {
|
|
1733
|
+
chartType: "bar" | "line";
|
|
1734
|
+
xAxisColumn: string | null;
|
|
1735
|
+
yAxisColumns: string[];
|
|
1736
|
+
groupByColumn: string | null;
|
|
1737
|
+
stacked: boolean;
|
|
1738
|
+
sortByColumn: string | null;
|
|
1739
|
+
sortDirection: "asc" | "desc";
|
|
1740
|
+
aggregation: "avg" | "count" | "max" | "min" | "sum";
|
|
1741
|
+
seriesColors?: Record<string, string> | undefined;
|
|
1742
|
+
type: "chart";
|
|
1743
|
+
} | {
|
|
1744
|
+
column: string;
|
|
1745
|
+
aggregation: "avg" | "count" | "first" | "last" | "max" | "min" | "sum";
|
|
1746
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1747
|
+
abbreviate: boolean;
|
|
1748
|
+
prefix?: string | undefined;
|
|
1749
|
+
suffix?: string | undefined;
|
|
1750
|
+
type: "bignumber";
|
|
1751
|
+
} | {
|
|
1752
|
+
type: "title";
|
|
1753
|
+
};
|
|
1754
|
+
fillGaps?: boolean | undefined;
|
|
1755
|
+
position: {
|
|
1756
|
+
x: number;
|
|
1757
|
+
y: number;
|
|
1758
|
+
w: number;
|
|
1759
|
+
h: number;
|
|
1760
|
+
};
|
|
1761
|
+
}[];
|
|
1762
|
+
}>;
|
|
1409
1763
|
/**
|
|
1410
1764
|
* `format: "json"` returns a `ReportViewModel`; "markdown" (default) and "ansi" return a rendered
|
|
1411
1765
|
* string. `period` is a shorthand like "1h" or "7d", capped at 90d. Seconds are not accepted.
|
|
@@ -1476,14 +1830,16 @@ export declare class ApiClient {
|
|
|
1476
1830
|
}[];
|
|
1477
1831
|
setupPrompt: string;
|
|
1478
1832
|
}>;
|
|
1479
|
-
generateWebhookEndpointSecret(endpointId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1833
|
+
generateWebhookEndpointSecret(endpointId: string, body?: RotateWebhookEndpointSecretRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1480
1834
|
id: string;
|
|
1481
1835
|
secretSet: true;
|
|
1482
1836
|
secret: string;
|
|
1837
|
+
previousSecretExpiresAt?: string | undefined;
|
|
1483
1838
|
}>;
|
|
1484
1839
|
setWebhookEndpointSecret(endpointId: string, body: SetWebhookEndpointSecretRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1485
1840
|
id: string;
|
|
1486
1841
|
secretSet: true;
|
|
1842
|
+
previousSecretExpiresAt?: string | undefined;
|
|
1487
1843
|
}>;
|
|
1488
1844
|
listWebhookDeliveries(query?: ListWebhookDeliveriesQuery, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
1489
1845
|
data: {
|
|
@@ -3,7 +3,7 @@ import { z } from "zod/v4";
|
|
|
3
3
|
import { VERSION } from "../../version.js";
|
|
4
4
|
import { isAdditionalApiKey } from "../apiKeys.js";
|
|
5
5
|
import { generateJWT } from "../jwt.js";
|
|
6
|
-
import { ListWebhookEndpointsResponse, ListWebhookDeliveriesResponse, ReplayWebhookDeliveryResponse, WebhookDeliveryObject, CancelWebhookWaiterResponseBody, CreateWebhookWaiterResponseBody, RotateWebhookEndpointSecretResponse, SetWebhookEndpointSecretResponse, WebhookEndpointDetailObject, ConcurrencyLimitItem, ConcurrencyLimitKeyItem, ReplayRunRequestBody, AbortBulkActionResponseBody, ApiDeploymentListResponseItem, BulkActionObject, CreateBulkActionResponseBody, AppendToStreamResponseBody, BatchTaskRunExecutionResult, BatchTriggerTaskV3Response, CanceledRunResponse, CompleteWaitpointTokenResponseBody, CreateBatchResponse, CreateInputStreamWaitpointResponseBody, CreateSessionStreamWaitpointResponseBody, CreateStreamResponseBody, CreateUploadPayloadUrlResponseBody, SessionTranscriptResponseBody, CreateWaitpointTokenResponseBody, CreatedSessionResponseBody, DeletedScheduleObject, EndAndContinueSessionResponseBody, EnvironmentVariableResponseBody, EnvironmentVariableWithSecret, ListDashboardsResponseBody, ListPromptVersionsResponseBody, ListPromptsResponseBody, ListRunResponseItem, ListedSessionItem, PromptOkResponseBody, PromptOverrideCreatedResponseBody, QueryExecuteResponseBody, QuerySchemaResponseBody, QueueItem, ReadSessionStreamRecordsResponseBody, ReplayRunResponse, ReportViewModelSchema, ResetIdempotencyKeyResponse, ResolvePromptResponseBody, RetrieveBatchV2Response, RetrieveCurrentDeploymentResponseBody, RetrieveRunResponse, RetrieveRunTraceResponseBody, RetrieveRunTracePageResponseBody, RetrieveSessionResponseBody, RetrieveSpanDetailResponseBody, ScheduleObject, SendInputStreamResponseBody, StreamBatchItemsResponse, TaskRunExecutionResult, TriggerTaskResponse, UpdateMetadataResponseBody, WaitForDurationResponseBody, WaitForWaitpointTokenResponseBody, WaitpointRetrieveTokenResponse, WaitpointTokenItem, } from "../schemas/index.js";
|
|
6
|
+
import { ListWebhookEndpointsResponse, ListWebhookDeliveriesResponse, ReplayWebhookDeliveryResponse, WebhookDeliveryObject, CancelWebhookWaiterResponseBody, CreateWebhookWaiterResponseBody, RotateWebhookEndpointSecretResponse, SetWebhookEndpointSecretResponse, WebhookEndpointDetailObject, ConcurrencyLimitItem, ConcurrencyLimitKeyItem, ReplayRunRequestBody, AbortBulkActionResponseBody, ApiDeploymentListResponseItem, BulkActionObject, CreateBulkActionResponseBody, AppendToStreamResponseBody, BatchTaskRunExecutionResult, BatchTriggerTaskV3Response, CanceledRunResponse, CompleteWaitpointTokenResponseBody, CreateBatchResponse, CreateInputStreamWaitpointResponseBody, CreateSessionStreamWaitpointResponseBody, CreateStreamResponseBody, CreateUploadPayloadUrlResponseBody, SessionTranscriptResponseBody, CreateWaitpointTokenResponseBody, CreatedSessionResponseBody, DeletedScheduleObject, EndAndContinueSessionResponseBody, EnvironmentVariableResponseBody, EnvironmentVariableWithSecret, ListDashboardsResponseBody, AddDashboardWidgetResponseBody, DashboardObject, DeleteDashboardResponseBody, ListPromptVersionsResponseBody, ListPromptsResponseBody, ListRunResponseItem, ListedSessionItem, PromptOkResponseBody, PromptOverrideCreatedResponseBody, QueryExecuteResponseBody, QuerySchemaResponseBody, QueueItem, ReadSessionStreamRecordsResponseBody, ReplayRunResponse, ReportViewModelSchema, ResetIdempotencyKeyResponse, ResolvePromptResponseBody, RetrieveBatchV2Response, RetrieveCurrentDeploymentResponseBody, RetrieveRunResponse, RetrieveRunTraceResponseBody, RetrieveRunTracePageResponseBody, RetrieveSessionResponseBody, RetrieveSpanDetailResponseBody, ScheduleObject, SendInputStreamResponseBody, StreamBatchItemsResponse, TaskRunExecutionResult, TriggerTaskResponse, UpdateMetadataResponseBody, WaitForDurationResponseBody, WaitForWaitpointTokenResponseBody, WaitpointRetrieveTokenResponse, WaitpointTokenItem, } from "../schemas/index.js";
|
|
7
7
|
import { controlSubtype } from "../sessionStreams/wireProtocol.js";
|
|
8
8
|
import { taskContext } from "../task-context-api.js";
|
|
9
9
|
import superjson from "../imports/superjson.js";
|
|
@@ -1039,6 +1039,7 @@ export class ApiClient {
|
|
|
1039
1039
|
client: this,
|
|
1040
1040
|
signal: options?.signal,
|
|
1041
1041
|
onFetchError: options?.onFetchError,
|
|
1042
|
+
fetchClient: options?.fetchClient,
|
|
1042
1043
|
});
|
|
1043
1044
|
}
|
|
1044
1045
|
subscribeToRunsWithTag(tag, filters, options) {
|
|
@@ -1054,6 +1055,7 @@ export class ApiClient {
|
|
|
1054
1055
|
client: this,
|
|
1055
1056
|
signal: options?.signal,
|
|
1056
1057
|
onFetchError: options?.onFetchError,
|
|
1058
|
+
fetchClient: options?.fetchClient,
|
|
1057
1059
|
});
|
|
1058
1060
|
}
|
|
1059
1061
|
subscribeToBatch(batchId, options) {
|
|
@@ -1068,6 +1070,7 @@ export class ApiClient {
|
|
|
1068
1070
|
client: this,
|
|
1069
1071
|
signal: options?.signal,
|
|
1070
1072
|
onFetchError: options?.onFetchError,
|
|
1073
|
+
fetchClient: options?.fetchClient,
|
|
1071
1074
|
});
|
|
1072
1075
|
}
|
|
1073
1076
|
listDeployments(options, requestOptions) {
|
|
@@ -1209,6 +1212,62 @@ export class ApiClient {
|
|
|
1209
1212
|
headers: this.#getHeaders(false),
|
|
1210
1213
|
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1211
1214
|
}
|
|
1215
|
+
retrieveDashboard(dashboardId, requestOptions) {
|
|
1216
|
+
return zodfetch(DashboardObject, `${this.baseUrl}/api/v1/query/dashboards/${encodeURIComponent(dashboardId)}`, {
|
|
1217
|
+
method: "GET",
|
|
1218
|
+
headers: this.#getHeaders(false),
|
|
1219
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1220
|
+
}
|
|
1221
|
+
createDashboard(body, requestOptions) {
|
|
1222
|
+
return zodfetch(DashboardObject, `${this.baseUrl}/api/v1/query/dashboards`, {
|
|
1223
|
+
method: "POST",
|
|
1224
|
+
headers: this.#getHeaders(false),
|
|
1225
|
+
body: JSON.stringify(body),
|
|
1226
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1227
|
+
}
|
|
1228
|
+
updateDashboard(dashboardId, body, requestOptions) {
|
|
1229
|
+
return zodfetch(DashboardObject, `${this.baseUrl}/api/v1/query/dashboards/${encodeURIComponent(dashboardId)}`, {
|
|
1230
|
+
method: "PATCH",
|
|
1231
|
+
headers: this.#getHeaders(false),
|
|
1232
|
+
body: JSON.stringify(body),
|
|
1233
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1234
|
+
}
|
|
1235
|
+
replaceDashboard(dashboardId, body, requestOptions) {
|
|
1236
|
+
return zodfetch(DashboardObject, `${this.baseUrl}/api/v1/query/dashboards/${encodeURIComponent(dashboardId)}`, {
|
|
1237
|
+
method: "PUT",
|
|
1238
|
+
headers: this.#getHeaders(false),
|
|
1239
|
+
body: JSON.stringify(body),
|
|
1240
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1241
|
+
}
|
|
1242
|
+
deleteDashboard(dashboardId, requestOptions) {
|
|
1243
|
+
return zodfetch(DeleteDashboardResponseBody, `${this.baseUrl}/api/v1/query/dashboards/${encodeURIComponent(dashboardId)}`, {
|
|
1244
|
+
method: "DELETE",
|
|
1245
|
+
headers: this.#getHeaders(false),
|
|
1246
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1247
|
+
}
|
|
1248
|
+
addDashboardWidget(dashboardId, body, requestOptions) {
|
|
1249
|
+
return zodfetch(AddDashboardWidgetResponseBody, `${this.baseUrl}/api/v1/query/dashboards/${encodeURIComponent(dashboardId)}/widgets`, {
|
|
1250
|
+
method: "POST",
|
|
1251
|
+
headers: this.#getHeaders(false),
|
|
1252
|
+
body: JSON.stringify(body),
|
|
1253
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1254
|
+
}
|
|
1255
|
+
updateDashboardWidget(dashboardId, widgetId, body, requestOptions) {
|
|
1256
|
+
return zodfetch(DashboardObject, `${this.baseUrl}/api/v1/query/dashboards/${encodeURIComponent(dashboardId)}/widgets/${encodeURIComponent(widgetId)}`, {
|
|
1257
|
+
method: "PATCH",
|
|
1258
|
+
headers: this.#getHeaders(false),
|
|
1259
|
+
body: JSON.stringify(body),
|
|
1260
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1261
|
+
}
|
|
1262
|
+
deleteDashboardWidget(dashboardId, widgetId, options, requestOptions) {
|
|
1263
|
+
const search = options?.revision
|
|
1264
|
+
? `?${new URLSearchParams({ revision: options.revision }).toString()}`
|
|
1265
|
+
: "";
|
|
1266
|
+
return zodfetch(DashboardObject, `${this.baseUrl}/api/v1/query/dashboards/${encodeURIComponent(dashboardId)}/widgets/${encodeURIComponent(widgetId)}${search}`, {
|
|
1267
|
+
method: "DELETE",
|
|
1268
|
+
headers: this.#getHeaders(false),
|
|
1269
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1270
|
+
}
|
|
1212
1271
|
async getReport(key, options) {
|
|
1213
1272
|
const searchParams = new URLSearchParams({ format: options?.format ?? "markdown" });
|
|
1214
1273
|
if (options?.period) {
|
|
@@ -1297,8 +1356,8 @@ export class ApiClient {
|
|
|
1297
1356
|
retrieveWebhookEndpoint(endpointId, requestOptions) {
|
|
1298
1357
|
return zodfetch(WebhookEndpointDetailObject, `${this.baseUrl}/api/v1/webhooks/endpoints/${encodeURIComponent(endpointId)}`, { method: "GET", headers: this.#getHeaders(false) }, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1299
1358
|
}
|
|
1300
|
-
generateWebhookEndpointSecret(endpointId, requestOptions) {
|
|
1301
|
-
return zodfetch(RotateWebhookEndpointSecretResponse, `${this.baseUrl}/api/v1/webhooks/endpoints/${encodeURIComponent(endpointId)}/rotate-secret`, { method: "POST", headers: this.#getHeaders(false) }, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1359
|
+
generateWebhookEndpointSecret(endpointId, body = {}, requestOptions) {
|
|
1360
|
+
return zodfetch(RotateWebhookEndpointSecretResponse, `${this.baseUrl}/api/v1/webhooks/endpoints/${encodeURIComponent(endpointId)}/rotate-secret`, { method: "POST", headers: this.#getHeaders(false), body: JSON.stringify(body) }, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
1302
1361
|
}
|
|
1303
1362
|
setWebhookEndpointSecret(endpointId, body, requestOptions) {
|
|
1304
1363
|
return zodfetch(SetWebhookEndpointSecretResponse, `${this.baseUrl}/api/v1/webhooks/endpoints/${encodeURIComponent(endpointId)}/secret`, { method: "PUT", headers: this.#getHeaders(false), body: JSON.stringify(body) }, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|