Skip to content

Commit 1f76d99

Browse files
committed
refactor(trigger-sdk): remove unused exports
1 parent cb9d560 commit 1f76d99

7 files changed

Lines changed: 12 additions & 27 deletions

File tree

packages/trigger-sdk/src/v3/auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type PublicTokenPermissionProperties = {
8383
sessions?: string | string[];
8484
};
8585

86-
export type PublicTokenPermissions = {
86+
type PublicTokenPermissions = {
8787
read?: PublicTokenPermissionProperties;
8888

8989
write?: PublicTokenPermissionProperties;
@@ -103,7 +103,7 @@ export type PublicTokenPermissions = {
103103
};
104104
};
105105

106-
export type CreatePublicTokenOptions = {
106+
type CreatePublicTokenOptions = {
107107
/**
108108
* A collection of permission scopes to be granted to the token. This remains
109109
* optional for root API key compatibility; additional API keys require at
@@ -251,7 +251,7 @@ async function withPublicToken(options: CreatePublicTokenOptions, fn: () => Prom
251251
await withAuth({ accessToken: token }, fn);
252252
}
253253

254-
export type CreateTriggerTokenOptions = {
254+
type CreateTriggerTokenOptions = {
255255
/**
256256
* The expiration time for the token: a duration string, a `Date`, or a Unix
257257
* timestamp in **seconds**.

packages/trigger-sdk/src/v3/chat-client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ export type ChatSession = {
5858
* `AgentChat`. Same shape as the type on `TriggerChatTransport` — these
5959
* mirror so customers can share a single resolver between the two clients.
6060
*/
61-
export type AgentChatEndpoint = "in" | "out";
61+
type AgentChatEndpoint = "in" | "out";
6262

63-
export type AgentChatEndpointContext = {
63+
type AgentChatEndpointContext = {
6464
endpoint: AgentChatEndpoint;
6565
chatId: string;
6666
};
6767

68-
export type AgentChatBaseURLResolver = (ctx: AgentChatEndpointContext) => string;
68+
type AgentChatBaseURLResolver = (ctx: AgentChatEndpointContext) => string;
6969

70-
export type AgentChatFetchOverride = (
70+
type AgentChatFetchOverride = (
7171
url: string,
7272
init: RequestInit,
7373
ctx: AgentChatEndpointContext

packages/trigger-sdk/src/v3/retry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function onThrow<T>(
116116
);
117117
}
118118

119-
export interface RetryFetchRequestInit extends RequestInit {
119+
interface RetryFetchRequestInit extends RequestInit {
120120
retry?: FetchRetryOptions;
121121
timeoutInMs?: number;
122122
}

packages/trigger-sdk/src/v3/runs.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export const runs = {
7070
fetchStream,
7171
};
7272

73-
export type ListRunsItem = ListRunResponseItem;
7473
export type BulkAction = BulkActionObject;
7574

7675
function listRuns(
@@ -457,8 +456,6 @@ function rescheduleRun(
457456
return apiClient.rescheduleRun(runId, body, $requestOptions);
458457
}
459458

460-
export type PollOptions = { pollIntervalMs?: number };
461-
462459
const MAX_POLL_ATTEMPTS = 500;
463460

464461
async function poll<TRunId extends AnyRunHandle | AnyTask | string>(
@@ -485,7 +482,7 @@ async function poll<TRunId extends AnyRunHandle | AnyTask | string>(
485482
);
486483
}
487484

488-
export type SubscribeToRunOptions = {
485+
type SubscribeToRunOptions = {
489486
/**
490487
* Whether to close the subscription when the run completes
491488
*
@@ -563,7 +560,7 @@ function subscribeToRun<TRunId extends AnyRunHandle | AnyTask | string>(
563560
});
564561
}
565562

566-
export type SubscribeToRunsFilterOptions = {
563+
type SubscribeToRunsFilterOptions = {
567564
/**
568565
* Filter runs by the time they were created. You must specify the duration string like "1h", "10s", "30m", etc.
569566
*

packages/trigger-sdk/src/v3/shared.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { SpanKind } from "@opentelemetry/api";
2-
import type { SerializableJson } from "@trigger.dev/core";
32
import {
43
type ApiClient,
54
type ApiRequestOptions,
@@ -71,17 +70,13 @@ import {
7170
type inferToolParameters,
7271
type RunHandle,
7372
type RunHandleFromTypes,
74-
type RunHandleOutput,
75-
type RunHandlePayload,
7673
type RunTypes,
7774
type SchemaParseFn,
7875
type Task,
79-
type TaskBatchOutputHandle,
8076
type TaskIdentifier,
8177
type TaskOptions,
8278
type TaskOptionsWithSchema,
8379
type TaskOutput,
84-
type TaskOutputHandle,
8580
type TaskPayload,
8681
type TaskRunResult,
8782
type TaskSchema,
@@ -106,17 +101,12 @@ export type {
106101
BatchTriggerOptions,
107102
Queue,
108103
RunHandle,
109-
RunHandleOutput,
110-
RunHandlePayload,
111-
SerializableJson,
112104
Task,
113-
TaskBatchOutputHandle,
114105
TaskFromIdentifier,
115106
TaskIdentifier,
116107
TaskOptions,
117108
TaskOptionsWithSchema,
118109
TaskOutput,
119-
TaskOutputHandle,
120110
TaskPayload,
121111
TaskRunResult,
122112
TaskSchema,

packages/trigger-sdk/src/v3/test/mock-chat-agent.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ import {
1313
import { createTestSessionHandle, type TestSessionOutState } from "./test-session-handle.js";
1414

1515
/** Pre-seed locals before the agent's `run()` starts. */
16-
export type SetupLocals = (locals: {
17-
set<T>(key: LocalsKey<T>, value: T): void;
18-
}) => void | Promise<void>;
16+
type SetupLocals = (locals: { set<T>(key: LocalsKey<T>, value: T): void }) => void | Promise<void>;
1917

2018
// The slim wire payload shape used by chat.agent tasks. Kept loose here so we
2119
// don't import from the backend-only ai.ts module. At most ONE message per

packages/trigger-sdk/src/v3/test/test-session-handle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async function drainInto<T>(
106106
* Mirrors {@link SessionOutputChannel}'s public shape — `pipe` / `writer`
107107
* / `append` / `read` — so the agent's existing code paths work unchanged.
108108
*/
109-
export class TestSessionOutputChannel extends SessionOutputChannel {
109+
class TestSessionOutputChannel extends SessionOutputChannel {
110110
constructor(
111111
sessionId: string,
112112
private readonly state: TestSessionOutState

0 commit comments

Comments
 (0)