@trigger.dev/sdk 3.0.0-beta.44 → 3.0.0-beta.46
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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/v3/index.d.mts +46 -7
- package/dist/v3/index.d.ts +46 -7
- package/dist/v3/index.js +28 -7
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +28 -7
- package/dist/v3/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/v3/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
// package.json
|
|
21
|
-
var version = "3.0.0-beta.
|
|
21
|
+
var version = "3.0.0-beta.46";
|
|
22
22
|
|
|
23
23
|
// src/v3/tracer.ts
|
|
24
24
|
var tracer = new TriggerTracer({
|
|
@@ -506,6 +506,7 @@ var runs = {
|
|
|
506
506
|
cancel: cancelRun,
|
|
507
507
|
retrieve: retrieveRun,
|
|
508
508
|
list: listRuns,
|
|
509
|
+
reschedule: rescheduleRun,
|
|
509
510
|
poll
|
|
510
511
|
};
|
|
511
512
|
function listRuns(paramsOrProjectRef, params) {
|
|
@@ -547,6 +548,14 @@ function cancelRun(runId) {
|
|
|
547
548
|
return apiClient.cancelRun(runId);
|
|
548
549
|
}
|
|
549
550
|
__name(cancelRun, "cancelRun");
|
|
551
|
+
function rescheduleRun(runId, body) {
|
|
552
|
+
const apiClient = apiClientManager.client;
|
|
553
|
+
if (!apiClient) {
|
|
554
|
+
throw apiClientMissingError();
|
|
555
|
+
}
|
|
556
|
+
return apiClient.rescheduleRun(runId, body);
|
|
557
|
+
}
|
|
558
|
+
__name(rescheduleRun, "rescheduleRun");
|
|
550
559
|
async function poll(handle, options) {
|
|
551
560
|
while (true) {
|
|
552
561
|
const run = await runs.retrieve(handle);
|
|
@@ -581,7 +590,9 @@ function createTask(params) {
|
|
|
581
590
|
concurrencyKey: options?.concurrencyKey,
|
|
582
591
|
test: taskContext.ctx?.run.isTest,
|
|
583
592
|
payloadType: payloadPacket.dataType,
|
|
584
|
-
idempotencyKey: options?.idempotencyKey
|
|
593
|
+
idempotencyKey: options?.idempotencyKey,
|
|
594
|
+
delay: options?.delay,
|
|
595
|
+
ttl: options?.ttl
|
|
585
596
|
}
|
|
586
597
|
}, {
|
|
587
598
|
spanParentAsLink: true
|
|
@@ -626,7 +637,9 @@ function createTask(params) {
|
|
|
626
637
|
concurrencyKey: item.options?.concurrencyKey,
|
|
627
638
|
test: taskContext.ctx?.run.isTest,
|
|
628
639
|
payloadType: payloadPacket.dataType,
|
|
629
|
-
idempotencyKey: item.options?.idempotencyKey
|
|
640
|
+
idempotencyKey: item.options?.idempotencyKey,
|
|
641
|
+
delay: item.options?.delay,
|
|
642
|
+
ttl: item.options?.ttl
|
|
630
643
|
}
|
|
631
644
|
};
|
|
632
645
|
}))
|
|
@@ -684,7 +697,9 @@ function createTask(params) {
|
|
|
684
697
|
concurrencyKey: options?.concurrencyKey,
|
|
685
698
|
test: taskContext.ctx?.run.isTest,
|
|
686
699
|
payloadType: payloadPacket.dataType,
|
|
687
|
-
idempotencyKey: options?.idempotencyKey
|
|
700
|
+
idempotencyKey: options?.idempotencyKey,
|
|
701
|
+
delay: options?.delay,
|
|
702
|
+
ttl: options?.ttl
|
|
688
703
|
}
|
|
689
704
|
});
|
|
690
705
|
span.setAttribute("messaging.message.id", response.id);
|
|
@@ -745,7 +760,9 @@ function createTask(params) {
|
|
|
745
760
|
concurrencyKey: item.options?.concurrencyKey,
|
|
746
761
|
test: taskContext.ctx?.run.isTest,
|
|
747
762
|
payloadType: payloadPacket.dataType,
|
|
748
|
-
idempotencyKey: item.options?.idempotencyKey
|
|
763
|
+
idempotencyKey: item.options?.idempotencyKey,
|
|
764
|
+
delay: item.options?.delay,
|
|
765
|
+
ttl: item.options?.ttl
|
|
749
766
|
}
|
|
750
767
|
};
|
|
751
768
|
})),
|
|
@@ -855,7 +872,9 @@ async function trigger(id, payload, options) {
|
|
|
855
872
|
concurrencyKey: options?.concurrencyKey,
|
|
856
873
|
test: taskContext.ctx?.run.isTest,
|
|
857
874
|
payloadType: payloadPacket.dataType,
|
|
858
|
-
idempotencyKey: options?.idempotencyKey
|
|
875
|
+
idempotencyKey: options?.idempotencyKey,
|
|
876
|
+
delay: options?.delay,
|
|
877
|
+
ttl: options?.ttl
|
|
859
878
|
}
|
|
860
879
|
});
|
|
861
880
|
return handle;
|
|
@@ -881,7 +900,9 @@ async function batchTrigger(id, items) {
|
|
|
881
900
|
concurrencyKey: item.options?.concurrencyKey,
|
|
882
901
|
test: taskContext.ctx?.run.isTest,
|
|
883
902
|
payloadType: payloadPacket.dataType,
|
|
884
|
-
idempotencyKey: item.options?.idempotencyKey
|
|
903
|
+
idempotencyKey: item.options?.idempotencyKey,
|
|
904
|
+
delay: item.options?.delay,
|
|
905
|
+
ttl: item.options?.ttl
|
|
885
906
|
}
|
|
886
907
|
};
|
|
887
908
|
}))
|