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

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