@trigger.dev/sdk 0.0.0-prerelease-20241209215453 → 0.0.0-prerelease-20241212160659

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.
@@ -27,27 +27,30 @@ export type PollOptions = {
27
27
  declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>, options?: {
28
28
  pollIntervalMs?: number;
29
29
  }, requestOptions?: ApiRequestOptions): Promise<{
30
- taskIdentifier: string;
31
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
32
- idempotencyKey?: string | undefined;
33
- ttl?: string | undefined;
34
- tags: string[];
30
+ version?: string | undefined;
31
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
32
+ id: string;
35
33
  metadata?: Record<string, any> | undefined;
34
+ startedAt?: Date | undefined;
36
35
  error?: {
37
36
  message: string;
38
37
  name?: string | undefined;
39
38
  stackTrace?: string | undefined;
40
39
  } | undefined;
41
- id: string;
42
- createdAt: Date;
43
- updatedAt: Date;
44
- startedAt?: Date | undefined;
45
- expiredAt?: Date | undefined;
46
- isTest: boolean;
47
- costInCents: number;
48
- baseCostInCents: number;
49
- durationMs: number;
50
- version?: string | undefined;
40
+ idempotencyKey?: string | undefined;
41
+ attempts: ({
42
+ status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
43
+ id: string;
44
+ updatedAt: Date;
45
+ createdAt: Date;
46
+ startedAt?: Date | undefined;
47
+ completedAt?: Date | undefined;
48
+ error?: {
49
+ message: string;
50
+ name?: string | undefined;
51
+ stackTrace?: string | undefined;
52
+ } | undefined;
53
+ } | undefined)[];
51
54
  schedule?: {
52
55
  id: string;
53
56
  generator: {
@@ -58,20 +61,29 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
58
61
  externalId?: string | undefined;
59
62
  deduplicationKey?: string | undefined;
60
63
  } | undefined;
64
+ updatedAt: Date;
65
+ isTest: boolean;
66
+ createdAt: Date;
67
+ tags: string[];
68
+ durationMs: number;
69
+ costInCents: number;
70
+ baseCostInCents: number;
71
+ taskIdentifier: string;
72
+ ttl?: string | undefined;
61
73
  payloadPresignedUrl?: string | undefined;
62
74
  outputPresignedUrl?: string | undefined;
63
75
  relatedRuns: {
64
76
  root?: {
65
- taskIdentifier: string;
66
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
67
- tags: string[];
77
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
68
78
  id: string;
69
- createdAt: Date;
70
79
  updatedAt: Date;
71
80
  isTest: boolean;
81
+ createdAt: Date;
82
+ tags: string[];
83
+ durationMs: number;
72
84
  costInCents: number;
73
85
  baseCostInCents: number;
74
- durationMs: number;
86
+ taskIdentifier: string;
75
87
  depth: number;
76
88
  triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
77
89
  isQueued: boolean;
@@ -80,27 +92,27 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
80
92
  isSuccess: boolean;
81
93
  isFailed: boolean;
82
94
  isCancelled: boolean;
83
- idempotencyKey?: string | undefined;
84
- ttl?: string | undefined;
95
+ version?: string | undefined;
85
96
  metadata?: Record<string, any> | undefined;
86
97
  startedAt?: Date | undefined;
87
- expiredAt?: Date | undefined;
88
- version?: string | undefined;
98
+ idempotencyKey?: string | undefined;
99
+ ttl?: string | undefined;
89
100
  batchId?: string | undefined;
90
101
  finishedAt?: Date | undefined;
91
102
  delayedUntil?: Date | undefined;
103
+ expiredAt?: Date | undefined;
92
104
  } | undefined;
93
105
  parent?: {
94
- taskIdentifier: string;
95
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
96
- tags: string[];
106
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
97
107
  id: string;
98
- createdAt: Date;
99
108
  updatedAt: Date;
100
109
  isTest: boolean;
110
+ createdAt: Date;
111
+ tags: string[];
112
+ durationMs: number;
101
113
  costInCents: number;
102
114
  baseCostInCents: number;
103
- durationMs: number;
115
+ taskIdentifier: string;
104
116
  depth: number;
105
117
  triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
106
118
  isQueued: boolean;
@@ -109,27 +121,27 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
109
121
  isSuccess: boolean;
110
122
  isFailed: boolean;
111
123
  isCancelled: boolean;
112
- idempotencyKey?: string | undefined;
113
- ttl?: string | undefined;
124
+ version?: string | undefined;
114
125
  metadata?: Record<string, any> | undefined;
115
126
  startedAt?: Date | undefined;
116
- expiredAt?: Date | undefined;
117
- version?: string | undefined;
127
+ idempotencyKey?: string | undefined;
128
+ ttl?: string | undefined;
118
129
  batchId?: string | undefined;
119
130
  finishedAt?: Date | undefined;
120
131
  delayedUntil?: Date | undefined;
132
+ expiredAt?: Date | undefined;
121
133
  } | undefined;
122
134
  children?: {
123
- taskIdentifier: string;
124
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
125
- tags: string[];
135
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
126
136
  id: string;
127
- createdAt: Date;
128
137
  updatedAt: Date;
129
138
  isTest: boolean;
139
+ createdAt: Date;
140
+ tags: string[];
141
+ durationMs: number;
130
142
  costInCents: number;
131
143
  baseCostInCents: number;
132
- durationMs: number;
144
+ taskIdentifier: string;
133
145
  depth: number;
134
146
  triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
135
147
  isQueued: boolean;
@@ -138,15 +150,15 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
138
150
  isSuccess: boolean;
139
151
  isFailed: boolean;
140
152
  isCancelled: boolean;
141
- idempotencyKey?: string | undefined;
142
- ttl?: string | undefined;
153
+ version?: string | undefined;
143
154
  metadata?: Record<string, any> | undefined;
144
155
  startedAt?: Date | undefined;
145
- expiredAt?: Date | undefined;
146
- version?: string | undefined;
156
+ idempotencyKey?: string | undefined;
157
+ ttl?: string | undefined;
147
158
  batchId?: string | undefined;
148
159
  finishedAt?: Date | undefined;
149
160
  delayedUntil?: Date | undefined;
161
+ expiredAt?: Date | undefined;
150
162
  }[] | undefined;
151
163
  };
152
164
  depth: number;
@@ -160,19 +172,7 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
160
172
  isCancelled: boolean;
161
173
  finishedAt?: Date | undefined;
162
174
  delayedUntil?: Date | undefined;
163
- attempts: ({
164
- status: "EXECUTING" | "COMPLETED" | "CANCELED" | "FAILED" | "PENDING" | "PAUSED";
165
- id: string;
166
- createdAt: Date;
167
- updatedAt: Date;
168
- error?: {
169
- message: string;
170
- name?: string | undefined;
171
- stackTrace?: string | undefined;
172
- } | undefined;
173
- startedAt?: Date | undefined;
174
- completedAt?: Date | undefined;
175
- } | undefined)[];
175
+ expiredAt?: Date | undefined;
176
176
  attemptCount: number;
177
177
  output?: InferRunTypes<TRunId>["output"] | undefined;
178
178
  payload?: InferRunTypes<TRunId>["payload"] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trigger.dev/sdk",
3
- "version": "0.0.0-prerelease-20241209215453",
3
+ "version": "0.0.0-prerelease-20241212160659",
4
4
  "description": "trigger.dev Node.JS SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -40,7 +40,7 @@
40
40
  "@opentelemetry/api": "1.9.0",
41
41
  "@opentelemetry/api-logs": "0.52.1",
42
42
  "@opentelemetry/semantic-conventions": "1.25.1",
43
- "@trigger.dev/core": "0.0.0-prerelease-20241209215453",
43
+ "@trigger.dev/core": "0.0.0-prerelease-20241212160659",
44
44
  "chalk": "^5.2.0",
45
45
  "cronstrue": "^2.21.0",
46
46
  "debug": "^4.3.4",