@trigger.dev/sdk 0.0.0-prerelease-20241202154035 → 0.0.0-prerelease-20241203170318

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