@trigger.dev/sdk 0.0.0-prerelease-20241213110408 → 0.0.0-prerelease-20241213125952

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,30 +27,27 @@ 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
- 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;
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[];
33
35
  metadata?: Record<string, any> | undefined;
34
- startedAt?: Date | undefined;
35
36
  error?: {
36
37
  message: string;
37
38
  name?: string | undefined;
38
39
  stackTrace?: string | undefined;
39
40
  } | 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)[];
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;
54
51
  schedule?: {
55
52
  id: string;
56
53
  generator: {
@@ -61,29 +58,20 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
61
58
  externalId?: string | undefined;
62
59
  deduplicationKey?: string | undefined;
63
60
  } | 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;
73
61
  payloadPresignedUrl?: string | undefined;
74
62
  outputPresignedUrl?: string | undefined;
75
63
  relatedRuns: {
76
64
  root?: {
77
- status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
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[];
78
68
  id: string;
69
+ createdAt: Date;
79
70
  updatedAt: Date;
80
71
  isTest: boolean;
81
- createdAt: Date;
82
- tags: string[];
83
- durationMs: number;
84
72
  costInCents: number;
85
73
  baseCostInCents: number;
86
- taskIdentifier: string;
74
+ durationMs: number;
87
75
  depth: number;
88
76
  triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
89
77
  isQueued: boolean;
@@ -92,27 +80,27 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
92
80
  isSuccess: boolean;
93
81
  isFailed: boolean;
94
82
  isCancelled: boolean;
95
- version?: string | undefined;
96
- metadata?: Record<string, any> | undefined;
97
- startedAt?: Date | undefined;
98
83
  idempotencyKey?: string | undefined;
99
84
  ttl?: string | undefined;
85
+ metadata?: Record<string, any> | undefined;
86
+ startedAt?: Date | undefined;
87
+ expiredAt?: Date | undefined;
88
+ version?: string | undefined;
100
89
  batchId?: string | undefined;
101
90
  finishedAt?: Date | undefined;
102
91
  delayedUntil?: Date | undefined;
103
- expiredAt?: Date | undefined;
104
92
  } | undefined;
105
93
  parent?: {
106
- status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
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[];
107
97
  id: string;
98
+ createdAt: Date;
108
99
  updatedAt: Date;
109
100
  isTest: boolean;
110
- createdAt: Date;
111
- tags: string[];
112
- durationMs: number;
113
101
  costInCents: number;
114
102
  baseCostInCents: number;
115
- taskIdentifier: string;
103
+ durationMs: number;
116
104
  depth: number;
117
105
  triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
118
106
  isQueued: boolean;
@@ -121,27 +109,27 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
121
109
  isSuccess: boolean;
122
110
  isFailed: boolean;
123
111
  isCancelled: boolean;
124
- version?: string | undefined;
125
- metadata?: Record<string, any> | undefined;
126
- startedAt?: Date | undefined;
127
112
  idempotencyKey?: string | undefined;
128
113
  ttl?: string | undefined;
114
+ metadata?: Record<string, any> | undefined;
115
+ startedAt?: Date | undefined;
116
+ expiredAt?: Date | undefined;
117
+ version?: string | undefined;
129
118
  batchId?: string | undefined;
130
119
  finishedAt?: Date | undefined;
131
120
  delayedUntil?: Date | undefined;
132
- expiredAt?: Date | undefined;
133
121
  } | undefined;
134
122
  children?: {
135
- status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
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[];
136
126
  id: string;
127
+ createdAt: Date;
137
128
  updatedAt: Date;
138
129
  isTest: boolean;
139
- createdAt: Date;
140
- tags: string[];
141
- durationMs: number;
142
130
  costInCents: number;
143
131
  baseCostInCents: number;
144
- taskIdentifier: string;
132
+ durationMs: number;
145
133
  depth: number;
146
134
  triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
147
135
  isQueued: boolean;
@@ -150,15 +138,15 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
150
138
  isSuccess: boolean;
151
139
  isFailed: boolean;
152
140
  isCancelled: boolean;
153
- version?: string | undefined;
154
- metadata?: Record<string, any> | undefined;
155
- startedAt?: Date | undefined;
156
141
  idempotencyKey?: string | undefined;
157
142
  ttl?: string | undefined;
143
+ metadata?: Record<string, any> | undefined;
144
+ startedAt?: Date | undefined;
145
+ expiredAt?: Date | undefined;
146
+ version?: string | undefined;
158
147
  batchId?: string | undefined;
159
148
  finishedAt?: Date | undefined;
160
149
  delayedUntil?: Date | undefined;
161
- expiredAt?: Date | undefined;
162
150
  }[] | undefined;
163
151
  };
164
152
  depth: number;
@@ -172,7 +160,19 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
172
160
  isCancelled: boolean;
173
161
  finishedAt?: Date | undefined;
174
162
  delayedUntil?: Date | undefined;
175
- expiredAt?: 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)[];
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-20241213110408",
3
+ "version": "0.0.0-prerelease-20241213125952",
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-20241213110408",
43
+ "@trigger.dev/core": "0.0.0-prerelease-20241213125952",
44
44
  "chalk": "^5.2.0",
45
45
  "cronstrue": "^2.21.0",
46
46
  "debug": "^4.3.4",