@trigger.dev/sdk 0.0.0-prerelease-20241212160659 → 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.
@@ -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,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-20241212160659",
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-20241212160659",
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",