@trigger.dev/core 4.3.2 → 4.3.3

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.
Files changed (113) hide show
  1. package/dist/commonjs/v3/apiClient/index.js +32 -8
  2. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  3. package/dist/commonjs/v3/apiClient/streamBatchItems.test.js +39 -0
  4. package/dist/commonjs/v3/apiClient/streamBatchItems.test.js.map +1 -1
  5. package/dist/commonjs/v3/idempotency-key-catalog/catalog.d.ts +9 -0
  6. package/dist/commonjs/v3/idempotency-key-catalog/catalog.js +3 -0
  7. package/dist/commonjs/v3/idempotency-key-catalog/catalog.js.map +1 -0
  8. package/dist/commonjs/v3/idempotency-key-catalog/index.d.ts +9 -0
  9. package/dist/commonjs/v3/idempotency-key-catalog/index.js +33 -0
  10. package/dist/commonjs/v3/idempotency-key-catalog/index.js.map +1 -0
  11. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.d.ts +8 -0
  12. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.js +35 -0
  13. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.js.map +1 -0
  14. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.d.ts +1 -0
  15. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.js +161 -0
  16. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.js.map +1 -0
  17. package/dist/commonjs/v3/idempotency-key-catalog-api.d.ts +3 -0
  18. package/dist/commonjs/v3/idempotency-key-catalog-api.js +9 -0
  19. package/dist/commonjs/v3/idempotency-key-catalog-api.js.map +1 -0
  20. package/dist/commonjs/v3/idempotencyKeys.d.ts +51 -4
  21. package/dist/commonjs/v3/idempotencyKeys.js +97 -5
  22. package/dist/commonjs/v3/idempotencyKeys.js.map +1 -1
  23. package/dist/commonjs/v3/imports/superjson-cjs.cjs.map +1 -0
  24. package/dist/commonjs/v3/imports/superjson.d.ts +1 -0
  25. package/dist/commonjs/v3/imports/superjson.js +13 -0
  26. package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +61 -60
  27. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +191 -184
  28. package/dist/commonjs/v3/runEngineWorker/workload/http.d.ts +46 -45
  29. package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +163 -156
  30. package/dist/commonjs/v3/schemas/api.d.ts +246 -56
  31. package/dist/commonjs/v3/schemas/api.js +14 -3
  32. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  33. package/dist/commonjs/v3/schemas/checkpoints.d.ts +66 -66
  34. package/dist/commonjs/v3/schemas/common.d.ts +215 -177
  35. package/dist/commonjs/v3/schemas/common.js +6 -0
  36. package/dist/commonjs/v3/schemas/common.js.map +1 -1
  37. package/dist/commonjs/v3/schemas/messages.d.ts +2149 -2032
  38. package/dist/commonjs/v3/schemas/runEngine.d.ts +157 -150
  39. package/dist/commonjs/v3/schemas/schemas.d.ts +281 -262
  40. package/dist/commonjs/v3/schemas/webhooks.d.ts +68 -68
  41. package/dist/commonjs/v3/serverOnly/idempotencyKeys.d.ts +36 -0
  42. package/dist/commonjs/v3/serverOnly/idempotencyKeys.js +58 -0
  43. package/dist/commonjs/v3/serverOnly/idempotencyKeys.js.map +1 -0
  44. package/dist/commonjs/v3/serverOnly/index.d.ts +1 -0
  45. package/dist/commonjs/v3/serverOnly/index.js +1 -0
  46. package/dist/commonjs/v3/serverOnly/index.js.map +1 -1
  47. package/dist/commonjs/v3/types/tools.js +2 -2
  48. package/dist/commonjs/v3/types/tools.js.map +1 -1
  49. package/dist/commonjs/v3/utils/flattenAttributes.d.ts +2 -2
  50. package/dist/commonjs/v3/utils/flattenAttributes.js +24 -13
  51. package/dist/commonjs/v3/utils/flattenAttributes.js.map +1 -1
  52. package/dist/commonjs/v3/utils/globals.d.ts +2 -0
  53. package/dist/commonjs/v3/utils/globals.js.map +1 -1
  54. package/dist/commonjs/v3/utils/ioSerialization.js +15 -27
  55. package/dist/commonjs/v3/utils/ioSerialization.js.map +1 -1
  56. package/dist/commonjs/version.js +1 -1
  57. package/dist/esm/v3/apiClient/index.js +32 -8
  58. package/dist/esm/v3/apiClient/index.js.map +1 -1
  59. package/dist/esm/v3/apiClient/streamBatchItems.test.js +39 -0
  60. package/dist/esm/v3/apiClient/streamBatchItems.test.js.map +1 -1
  61. package/dist/esm/v3/idempotency-key-catalog/catalog.d.ts +9 -0
  62. package/dist/esm/v3/idempotency-key-catalog/catalog.js +2 -0
  63. package/dist/esm/v3/idempotency-key-catalog/catalog.js.map +1 -0
  64. package/dist/esm/v3/idempotency-key-catalog/index.d.ts +9 -0
  65. package/dist/esm/v3/idempotency-key-catalog/index.js +29 -0
  66. package/dist/esm/v3/idempotency-key-catalog/index.js.map +1 -0
  67. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.d.ts +8 -0
  68. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.js +31 -0
  69. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.js.map +1 -0
  70. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.d.ts +1 -0
  71. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.js +159 -0
  72. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.js.map +1 -0
  73. package/dist/esm/v3/idempotency-key-catalog-api.d.ts +3 -0
  74. package/dist/esm/v3/idempotency-key-catalog-api.js +6 -0
  75. package/dist/esm/v3/idempotency-key-catalog-api.js.map +1 -0
  76. package/dist/esm/v3/idempotencyKeys.d.ts +51 -4
  77. package/dist/esm/v3/idempotencyKeys.js +96 -5
  78. package/dist/esm/v3/idempotencyKeys.js.map +1 -1
  79. package/dist/esm/v3/imports/superjson.d.ts +2 -0
  80. package/dist/esm/v3/imports/superjson.js +10 -0
  81. package/dist/esm/v3/imports/superjson.js.map +1 -0
  82. package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +61 -60
  83. package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +191 -184
  84. package/dist/esm/v3/runEngineWorker/workload/http.d.ts +46 -45
  85. package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +163 -156
  86. package/dist/esm/v3/schemas/api.d.ts +246 -56
  87. package/dist/esm/v3/schemas/api.js +11 -0
  88. package/dist/esm/v3/schemas/api.js.map +1 -1
  89. package/dist/esm/v3/schemas/checkpoints.d.ts +66 -66
  90. package/dist/esm/v3/schemas/common.d.ts +215 -177
  91. package/dist/esm/v3/schemas/common.js +6 -0
  92. package/dist/esm/v3/schemas/common.js.map +1 -1
  93. package/dist/esm/v3/schemas/messages.d.ts +2149 -2032
  94. package/dist/esm/v3/schemas/runEngine.d.ts +157 -150
  95. package/dist/esm/v3/schemas/schemas.d.ts +281 -262
  96. package/dist/esm/v3/schemas/webhooks.d.ts +68 -68
  97. package/dist/esm/v3/serverOnly/idempotencyKeys.d.ts +36 -0
  98. package/dist/esm/v3/serverOnly/idempotencyKeys.js +51 -0
  99. package/dist/esm/v3/serverOnly/idempotencyKeys.js.map +1 -0
  100. package/dist/esm/v3/serverOnly/index.d.ts +1 -0
  101. package/dist/esm/v3/serverOnly/index.js +1 -0
  102. package/dist/esm/v3/serverOnly/index.js.map +1 -1
  103. package/dist/esm/v3/types/tools.js +2 -2
  104. package/dist/esm/v3/types/tools.js.map +1 -1
  105. package/dist/esm/v3/utils/flattenAttributes.d.ts +2 -2
  106. package/dist/esm/v3/utils/flattenAttributes.js +24 -13
  107. package/dist/esm/v3/utils/flattenAttributes.js.map +1 -1
  108. package/dist/esm/v3/utils/globals.d.ts +2 -0
  109. package/dist/esm/v3/utils/globals.js.map +1 -1
  110. package/dist/esm/v3/utils/ioSerialization.js +9 -24
  111. package/dist/esm/v3/utils/ioSerialization.js.map +1 -1
  112. package/dist/esm/version.js +1 -1
  113. package/package.json +2 -2
@@ -740,6 +740,18 @@ export declare const CreateBackgroundWorkerResponse: z.ZodObject<{
740
740
  export type CreateBackgroundWorkerResponse = z.infer<typeof CreateBackgroundWorkerResponse>;
741
741
  export declare const RunTags: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
742
742
  export type RunTags = z.infer<typeof RunTags>;
743
+ /** Stores the original user-provided idempotency key and scope */
744
+ export declare const IdempotencyKeyOptionsSchema: z.ZodObject<{
745
+ key: z.ZodString;
746
+ scope: z.ZodEnum<["run", "attempt", "global"]>;
747
+ }, "strip", z.ZodTypeAny, {
748
+ key: string;
749
+ scope: "run" | "attempt" | "global";
750
+ }, {
751
+ key: string;
752
+ scope: "run" | "attempt" | "global";
753
+ }>;
754
+ export type IdempotencyKeyOptionsSchema = z.infer<typeof IdempotencyKeyOptionsSchema>;
743
755
  export declare const TriggerTaskRequestBody: z.ZodObject<{
744
756
  payload: z.ZodAny;
745
757
  context: z.ZodAny;
@@ -783,6 +795,17 @@ export declare const TriggerTaskRequestBody: z.ZodObject<{
783
795
  delay: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
784
796
  idempotencyKey: z.ZodOptional<z.ZodString>;
785
797
  idempotencyKeyTTL: z.ZodOptional<z.ZodString>;
798
+ /** The original user-provided idempotency key and scope */
799
+ idempotencyKeyOptions: z.ZodOptional<z.ZodObject<{
800
+ key: z.ZodString;
801
+ scope: z.ZodEnum<["run", "attempt", "global"]>;
802
+ }, "strip", z.ZodTypeAny, {
803
+ key: string;
804
+ scope: "run" | "attempt" | "global";
805
+ }, {
806
+ key: string;
807
+ scope: "run" | "attempt" | "global";
808
+ }>>;
786
809
  machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
787
810
  maxAttempts: z.ZodOptional<z.ZodNumber>;
788
811
  maxDuration: z.ZodOptional<z.ZodNumber>;
@@ -838,6 +861,10 @@ export declare const TriggerTaskRequestBody: z.ZodObject<{
838
861
  parentRunId?: string | undefined;
839
862
  resumeParentOnCompletion?: boolean | undefined;
840
863
  lockToVersion?: string | undefined;
864
+ idempotencyKeyOptions?: {
865
+ key: string;
866
+ scope: "run" | "attempt" | "global";
867
+ } | undefined;
841
868
  metadataType?: string | undefined;
842
869
  test?: boolean | undefined;
843
870
  bulkActionId?: string | undefined;
@@ -871,6 +898,10 @@ export declare const TriggerTaskRequestBody: z.ZodObject<{
871
898
  parentRunId?: string | undefined;
872
899
  resumeParentOnCompletion?: boolean | undefined;
873
900
  lockToVersion?: string | undefined;
901
+ idempotencyKeyOptions?: {
902
+ key: string;
903
+ scope: "run" | "attempt" | "global";
904
+ } | undefined;
874
905
  metadataType?: string | undefined;
875
906
  test?: boolean | undefined;
876
907
  bulkActionId?: string | undefined;
@@ -906,6 +937,10 @@ export declare const TriggerTaskRequestBody: z.ZodObject<{
906
937
  parentRunId?: string | undefined;
907
938
  resumeParentOnCompletion?: boolean | undefined;
908
939
  lockToVersion?: string | undefined;
940
+ idempotencyKeyOptions?: {
941
+ key: string;
942
+ scope: "run" | "attempt" | "global";
943
+ } | undefined;
909
944
  metadataType?: string | undefined;
910
945
  test?: boolean | undefined;
911
946
  bulkActionId?: string | undefined;
@@ -943,6 +978,10 @@ export declare const TriggerTaskRequestBody: z.ZodObject<{
943
978
  parentRunId?: string | undefined;
944
979
  resumeParentOnCompletion?: boolean | undefined;
945
980
  lockToVersion?: string | undefined;
981
+ idempotencyKeyOptions?: {
982
+ key: string;
983
+ scope: "run" | "attempt" | "global";
984
+ } | undefined;
946
985
  metadataType?: string | undefined;
947
986
  test?: boolean | undefined;
948
987
  bulkActionId?: string | undefined;
@@ -1006,6 +1045,17 @@ export declare const BatchTriggerTaskRequestBody: z.ZodObject<{
1006
1045
  delay: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
1007
1046
  idempotencyKey: z.ZodOptional<z.ZodString>;
1008
1047
  idempotencyKeyTTL: z.ZodOptional<z.ZodString>;
1048
+ /** The original user-provided idempotency key and scope */
1049
+ idempotencyKeyOptions: z.ZodOptional<z.ZodObject<{
1050
+ key: z.ZodString;
1051
+ scope: z.ZodEnum<["run", "attempt", "global"]>;
1052
+ }, "strip", z.ZodTypeAny, {
1053
+ key: string;
1054
+ scope: "run" | "attempt" | "global";
1055
+ }, {
1056
+ key: string;
1057
+ scope: "run" | "attempt" | "global";
1058
+ }>>;
1009
1059
  machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1010
1060
  maxAttempts: z.ZodOptional<z.ZodNumber>;
1011
1061
  maxDuration: z.ZodOptional<z.ZodNumber>;
@@ -1061,6 +1111,10 @@ export declare const BatchTriggerTaskRequestBody: z.ZodObject<{
1061
1111
  parentRunId?: string | undefined;
1062
1112
  resumeParentOnCompletion?: boolean | undefined;
1063
1113
  lockToVersion?: string | undefined;
1114
+ idempotencyKeyOptions?: {
1115
+ key: string;
1116
+ scope: "run" | "attempt" | "global";
1117
+ } | undefined;
1064
1118
  metadataType?: string | undefined;
1065
1119
  test?: boolean | undefined;
1066
1120
  bulkActionId?: string | undefined;
@@ -1094,6 +1148,10 @@ export declare const BatchTriggerTaskRequestBody: z.ZodObject<{
1094
1148
  parentRunId?: string | undefined;
1095
1149
  resumeParentOnCompletion?: boolean | undefined;
1096
1150
  lockToVersion?: string | undefined;
1151
+ idempotencyKeyOptions?: {
1152
+ key: string;
1153
+ scope: "run" | "attempt" | "global";
1154
+ } | undefined;
1097
1155
  metadataType?: string | undefined;
1098
1156
  test?: boolean | undefined;
1099
1157
  bulkActionId?: string | undefined;
@@ -1129,6 +1187,10 @@ export declare const BatchTriggerTaskRequestBody: z.ZodObject<{
1129
1187
  parentRunId?: string | undefined;
1130
1188
  resumeParentOnCompletion?: boolean | undefined;
1131
1189
  lockToVersion?: string | undefined;
1190
+ idempotencyKeyOptions?: {
1191
+ key: string;
1192
+ scope: "run" | "attempt" | "global";
1193
+ } | undefined;
1132
1194
  metadataType?: string | undefined;
1133
1195
  test?: boolean | undefined;
1134
1196
  bulkActionId?: string | undefined;
@@ -1166,6 +1228,10 @@ export declare const BatchTriggerTaskRequestBody: z.ZodObject<{
1166
1228
  parentRunId?: string | undefined;
1167
1229
  resumeParentOnCompletion?: boolean | undefined;
1168
1230
  lockToVersion?: string | undefined;
1231
+ idempotencyKeyOptions?: {
1232
+ key: string;
1233
+ scope: "run" | "attempt" | "global";
1234
+ } | undefined;
1169
1235
  metadataType?: string | undefined;
1170
1236
  test?: boolean | undefined;
1171
1237
  bulkActionId?: string | undefined;
@@ -1206,6 +1272,10 @@ export declare const BatchTriggerTaskRequestBody: z.ZodObject<{
1206
1272
  parentRunId?: string | undefined;
1207
1273
  resumeParentOnCompletion?: boolean | undefined;
1208
1274
  lockToVersion?: string | undefined;
1275
+ idempotencyKeyOptions?: {
1276
+ key: string;
1277
+ scope: "run" | "attempt" | "global";
1278
+ } | undefined;
1209
1279
  metadataType?: string | undefined;
1210
1280
  test?: boolean | undefined;
1211
1281
  bulkActionId?: string | undefined;
@@ -1246,6 +1316,10 @@ export declare const BatchTriggerTaskRequestBody: z.ZodObject<{
1246
1316
  parentRunId?: string | undefined;
1247
1317
  resumeParentOnCompletion?: boolean | undefined;
1248
1318
  lockToVersion?: string | undefined;
1319
+ idempotencyKeyOptions?: {
1320
+ key: string;
1321
+ scope: "run" | "attempt" | "global";
1322
+ } | undefined;
1249
1323
  metadataType?: string | undefined;
1250
1324
  test?: boolean | undefined;
1251
1325
  bulkActionId?: string | undefined;
@@ -1265,6 +1339,17 @@ export declare const BatchTriggerTaskItem: z.ZodObject<{
1265
1339
  delay: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
1266
1340
  idempotencyKey: z.ZodOptional<z.ZodString>;
1267
1341
  idempotencyKeyTTL: z.ZodOptional<z.ZodString>;
1342
+ /** The original user-provided idempotency key and scope */
1343
+ idempotencyKeyOptions: z.ZodOptional<z.ZodObject<{
1344
+ key: z.ZodString;
1345
+ scope: z.ZodEnum<["run", "attempt", "global"]>;
1346
+ }, "strip", z.ZodTypeAny, {
1347
+ key: string;
1348
+ scope: "run" | "attempt" | "global";
1349
+ }, {
1350
+ key: string;
1351
+ scope: "run" | "attempt" | "global";
1352
+ }>>;
1268
1353
  lockToVersion: z.ZodOptional<z.ZodString>;
1269
1354
  machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1270
1355
  maxAttempts: z.ZodOptional<z.ZodNumber>;
@@ -1322,6 +1407,10 @@ export declare const BatchTriggerTaskItem: z.ZodObject<{
1322
1407
  } | undefined;
1323
1408
  parentAttempt?: string | undefined;
1324
1409
  lockToVersion?: string | undefined;
1410
+ idempotencyKeyOptions?: {
1411
+ key: string;
1412
+ scope: "run" | "attempt" | "global";
1413
+ } | undefined;
1325
1414
  metadataType?: string | undefined;
1326
1415
  test?: boolean | undefined;
1327
1416
  }, {
@@ -1348,6 +1437,10 @@ export declare const BatchTriggerTaskItem: z.ZodObject<{
1348
1437
  } | undefined;
1349
1438
  parentAttempt?: string | undefined;
1350
1439
  lockToVersion?: string | undefined;
1440
+ idempotencyKeyOptions?: {
1441
+ key: string;
1442
+ scope: "run" | "attempt" | "global";
1443
+ } | undefined;
1351
1444
  metadataType?: string | undefined;
1352
1445
  test?: boolean | undefined;
1353
1446
  }>>;
@@ -1377,6 +1470,10 @@ export declare const BatchTriggerTaskItem: z.ZodObject<{
1377
1470
  } | undefined;
1378
1471
  parentAttempt?: string | undefined;
1379
1472
  lockToVersion?: string | undefined;
1473
+ idempotencyKeyOptions?: {
1474
+ key: string;
1475
+ scope: "run" | "attempt" | "global";
1476
+ } | undefined;
1380
1477
  metadataType?: string | undefined;
1381
1478
  test?: boolean | undefined;
1382
1479
  } | undefined;
@@ -1408,6 +1505,10 @@ export declare const BatchTriggerTaskItem: z.ZodObject<{
1408
1505
  } | undefined;
1409
1506
  parentAttempt?: string | undefined;
1410
1507
  lockToVersion?: string | undefined;
1508
+ idempotencyKeyOptions?: {
1509
+ key: string;
1510
+ scope: "run" | "attempt" | "global";
1511
+ } | undefined;
1411
1512
  metadataType?: string | undefined;
1412
1513
  test?: boolean | undefined;
1413
1514
  } | undefined;
@@ -1425,6 +1526,17 @@ export declare const BatchTriggerTaskV2RequestBody: z.ZodObject<{
1425
1526
  delay: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
1426
1527
  idempotencyKey: z.ZodOptional<z.ZodString>;
1427
1528
  idempotencyKeyTTL: z.ZodOptional<z.ZodString>;
1529
+ /** The original user-provided idempotency key and scope */
1530
+ idempotencyKeyOptions: z.ZodOptional<z.ZodObject<{
1531
+ key: z.ZodString;
1532
+ scope: z.ZodEnum<["run", "attempt", "global"]>;
1533
+ }, "strip", z.ZodTypeAny, {
1534
+ key: string;
1535
+ scope: "run" | "attempt" | "global";
1536
+ }, {
1537
+ key: string;
1538
+ scope: "run" | "attempt" | "global";
1539
+ }>>;
1428
1540
  lockToVersion: z.ZodOptional<z.ZodString>;
1429
1541
  machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1430
1542
  maxAttempts: z.ZodOptional<z.ZodNumber>;
@@ -1482,6 +1594,10 @@ export declare const BatchTriggerTaskV2RequestBody: z.ZodObject<{
1482
1594
  } | undefined;
1483
1595
  parentAttempt?: string | undefined;
1484
1596
  lockToVersion?: string | undefined;
1597
+ idempotencyKeyOptions?: {
1598
+ key: string;
1599
+ scope: "run" | "attempt" | "global";
1600
+ } | undefined;
1485
1601
  metadataType?: string | undefined;
1486
1602
  test?: boolean | undefined;
1487
1603
  }, {
@@ -1508,6 +1624,10 @@ export declare const BatchTriggerTaskV2RequestBody: z.ZodObject<{
1508
1624
  } | undefined;
1509
1625
  parentAttempt?: string | undefined;
1510
1626
  lockToVersion?: string | undefined;
1627
+ idempotencyKeyOptions?: {
1628
+ key: string;
1629
+ scope: "run" | "attempt" | "global";
1630
+ } | undefined;
1511
1631
  metadataType?: string | undefined;
1512
1632
  test?: boolean | undefined;
1513
1633
  }>>;
@@ -1537,6 +1657,10 @@ export declare const BatchTriggerTaskV2RequestBody: z.ZodObject<{
1537
1657
  } | undefined;
1538
1658
  parentAttempt?: string | undefined;
1539
1659
  lockToVersion?: string | undefined;
1660
+ idempotencyKeyOptions?: {
1661
+ key: string;
1662
+ scope: "run" | "attempt" | "global";
1663
+ } | undefined;
1540
1664
  metadataType?: string | undefined;
1541
1665
  test?: boolean | undefined;
1542
1666
  } | undefined;
@@ -1568,6 +1692,10 @@ export declare const BatchTriggerTaskV2RequestBody: z.ZodObject<{
1568
1692
  } | undefined;
1569
1693
  parentAttempt?: string | undefined;
1570
1694
  lockToVersion?: string | undefined;
1695
+ idempotencyKeyOptions?: {
1696
+ key: string;
1697
+ scope: "run" | "attempt" | "global";
1698
+ } | undefined;
1571
1699
  metadataType?: string | undefined;
1572
1700
  test?: boolean | undefined;
1573
1701
  } | undefined;
@@ -1613,6 +1741,10 @@ export declare const BatchTriggerTaskV2RequestBody: z.ZodObject<{
1613
1741
  } | undefined;
1614
1742
  parentAttempt?: string | undefined;
1615
1743
  lockToVersion?: string | undefined;
1744
+ idempotencyKeyOptions?: {
1745
+ key: string;
1746
+ scope: "run" | "attempt" | "global";
1747
+ } | undefined;
1616
1748
  metadataType?: string | undefined;
1617
1749
  test?: boolean | undefined;
1618
1750
  } | undefined;
@@ -1649,6 +1781,10 @@ export declare const BatchTriggerTaskV2RequestBody: z.ZodObject<{
1649
1781
  } | undefined;
1650
1782
  parentAttempt?: string | undefined;
1651
1783
  lockToVersion?: string | undefined;
1784
+ idempotencyKeyOptions?: {
1785
+ key: string;
1786
+ scope: "run" | "attempt" | "global";
1787
+ } | undefined;
1652
1788
  metadataType?: string | undefined;
1653
1789
  test?: boolean | undefined;
1654
1790
  } | undefined;
@@ -1712,6 +1848,17 @@ export declare const BatchTriggerTaskV3RequestBody: z.ZodObject<{
1712
1848
  delay: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
1713
1849
  idempotencyKey: z.ZodOptional<z.ZodString>;
1714
1850
  idempotencyKeyTTL: z.ZodOptional<z.ZodString>;
1851
+ /** The original user-provided idempotency key and scope */
1852
+ idempotencyKeyOptions: z.ZodOptional<z.ZodObject<{
1853
+ key: z.ZodString;
1854
+ scope: z.ZodEnum<["run", "attempt", "global"]>;
1855
+ }, "strip", z.ZodTypeAny, {
1856
+ key: string;
1857
+ scope: "run" | "attempt" | "global";
1858
+ }, {
1859
+ key: string;
1860
+ scope: "run" | "attempt" | "global";
1861
+ }>>;
1715
1862
  lockToVersion: z.ZodOptional<z.ZodString>;
1716
1863
  machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1717
1864
  maxAttempts: z.ZodOptional<z.ZodNumber>;
@@ -1769,6 +1916,10 @@ export declare const BatchTriggerTaskV3RequestBody: z.ZodObject<{
1769
1916
  } | undefined;
1770
1917
  parentAttempt?: string | undefined;
1771
1918
  lockToVersion?: string | undefined;
1919
+ idempotencyKeyOptions?: {
1920
+ key: string;
1921
+ scope: "run" | "attempt" | "global";
1922
+ } | undefined;
1772
1923
  metadataType?: string | undefined;
1773
1924
  test?: boolean | undefined;
1774
1925
  }, {
@@ -1795,6 +1946,10 @@ export declare const BatchTriggerTaskV3RequestBody: z.ZodObject<{
1795
1946
  } | undefined;
1796
1947
  parentAttempt?: string | undefined;
1797
1948
  lockToVersion?: string | undefined;
1949
+ idempotencyKeyOptions?: {
1950
+ key: string;
1951
+ scope: "run" | "attempt" | "global";
1952
+ } | undefined;
1798
1953
  metadataType?: string | undefined;
1799
1954
  test?: boolean | undefined;
1800
1955
  }>>;
@@ -1824,6 +1979,10 @@ export declare const BatchTriggerTaskV3RequestBody: z.ZodObject<{
1824
1979
  } | undefined;
1825
1980
  parentAttempt?: string | undefined;
1826
1981
  lockToVersion?: string | undefined;
1982
+ idempotencyKeyOptions?: {
1983
+ key: string;
1984
+ scope: "run" | "attempt" | "global";
1985
+ } | undefined;
1827
1986
  metadataType?: string | undefined;
1828
1987
  test?: boolean | undefined;
1829
1988
  } | undefined;
@@ -1855,6 +2014,10 @@ export declare const BatchTriggerTaskV3RequestBody: z.ZodObject<{
1855
2014
  } | undefined;
1856
2015
  parentAttempt?: string | undefined;
1857
2016
  lockToVersion?: string | undefined;
2017
+ idempotencyKeyOptions?: {
2018
+ key: string;
2019
+ scope: "run" | "attempt" | "global";
2020
+ } | undefined;
1858
2021
  metadataType?: string | undefined;
1859
2022
  test?: boolean | undefined;
1860
2023
  } | undefined;
@@ -1898,6 +2061,10 @@ export declare const BatchTriggerTaskV3RequestBody: z.ZodObject<{
1898
2061
  } | undefined;
1899
2062
  parentAttempt?: string | undefined;
1900
2063
  lockToVersion?: string | undefined;
2064
+ idempotencyKeyOptions?: {
2065
+ key: string;
2066
+ scope: "run" | "attempt" | "global";
2067
+ } | undefined;
1901
2068
  metadataType?: string | undefined;
1902
2069
  test?: boolean | undefined;
1903
2070
  } | undefined;
@@ -1933,6 +2100,10 @@ export declare const BatchTriggerTaskV3RequestBody: z.ZodObject<{
1933
2100
  } | undefined;
1934
2101
  parentAttempt?: string | undefined;
1935
2102
  lockToVersion?: string | undefined;
2103
+ idempotencyKeyOptions?: {
2104
+ key: string;
2105
+ scope: "run" | "attempt" | "global";
2106
+ } | undefined;
1936
2107
  metadataType?: string | undefined;
1937
2108
  test?: boolean | undefined;
1938
2109
  } | undefined;
@@ -1967,16 +2138,35 @@ export declare const CreateBatchRequestBody: z.ZodObject<{
1967
2138
  resumeParentOnCompletion: z.ZodOptional<z.ZodBoolean>;
1968
2139
  /** Idempotency key for the batch */
1969
2140
  idempotencyKey: z.ZodOptional<z.ZodString>;
2141
+ /** The original user-provided idempotency key and scope */
2142
+ idempotencyKeyOptions: z.ZodOptional<z.ZodObject<{
2143
+ key: z.ZodString;
2144
+ scope: z.ZodEnum<["run", "attempt", "global"]>;
2145
+ }, "strip", z.ZodTypeAny, {
2146
+ key: string;
2147
+ scope: "run" | "attempt" | "global";
2148
+ }, {
2149
+ key: string;
2150
+ scope: "run" | "attempt" | "global";
2151
+ }>>;
1970
2152
  }, "strip", z.ZodTypeAny, {
1971
2153
  runCount: number;
1972
2154
  idempotencyKey?: string | undefined;
1973
2155
  parentRunId?: string | undefined;
1974
2156
  resumeParentOnCompletion?: boolean | undefined;
2157
+ idempotencyKeyOptions?: {
2158
+ key: string;
2159
+ scope: "run" | "attempt" | "global";
2160
+ } | undefined;
1975
2161
  }, {
1976
2162
  runCount: number;
1977
2163
  idempotencyKey?: string | undefined;
1978
2164
  parentRunId?: string | undefined;
1979
2165
  resumeParentOnCompletion?: boolean | undefined;
2166
+ idempotencyKeyOptions?: {
2167
+ key: string;
2168
+ scope: "run" | "attempt" | "global";
2169
+ } | undefined;
1980
2170
  }>;
1981
2171
  export type CreateBatchRequestBody = z.infer<typeof CreateBatchRequestBody>;
1982
2172
  /**
@@ -3515,6 +3705,20 @@ export declare const DevDequeueResponseBody: z.ZodObject<{
3515
3705
  values?: string[] | undefined;
3516
3706
  }>, "many">>;
3517
3707
  }, "strip", z.ZodTypeAny, {
3708
+ run: {
3709
+ id: string;
3710
+ isTest: boolean;
3711
+ machine: {
3712
+ cpu: number;
3713
+ memory: number;
3714
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3715
+ centsPerMs: number;
3716
+ };
3717
+ traceContext: Record<string, unknown>;
3718
+ friendlyId: string;
3719
+ attemptNumber: number;
3720
+ masterQueue: string;
3721
+ };
3518
3722
  version: "1";
3519
3723
  environment: {
3520
3724
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -3531,20 +3735,6 @@ export declare const DevDequeueResponseBody: z.ZodObject<{
3531
3735
  friendlyId?: string | undefined;
3532
3736
  imagePlatform?: string | undefined;
3533
3737
  };
3534
- run: {
3535
- id: string;
3536
- isTest: boolean;
3537
- machine: {
3538
- cpu: number;
3539
- memory: number;
3540
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3541
- centsPerMs: number;
3542
- };
3543
- traceContext: Record<string, unknown>;
3544
- friendlyId: string;
3545
- attemptNumber: number;
3546
- masterQueue: string;
3547
- };
3548
3738
  snapshot: {
3549
3739
  id: string;
3550
3740
  createdAt: Date;
@@ -3596,6 +3786,20 @@ export declare const DevDequeueResponseBody: z.ZodObject<{
3596
3786
  values?: string[] | undefined;
3597
3787
  }[] | undefined;
3598
3788
  }, {
3789
+ run: {
3790
+ id: string;
3791
+ isTest: boolean;
3792
+ machine: {
3793
+ cpu: number;
3794
+ memory: number;
3795
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3796
+ centsPerMs: number;
3797
+ };
3798
+ traceContext: Record<string, unknown>;
3799
+ friendlyId: string;
3800
+ attemptNumber: number;
3801
+ masterQueue: string;
3802
+ };
3599
3803
  version: "1";
3600
3804
  environment: {
3601
3805
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -3612,20 +3816,6 @@ export declare const DevDequeueResponseBody: z.ZodObject<{
3612
3816
  friendlyId?: string | undefined;
3613
3817
  imagePlatform?: string | undefined;
3614
3818
  };
3615
- run: {
3616
- id: string;
3617
- isTest: boolean;
3618
- machine: {
3619
- cpu: number;
3620
- memory: number;
3621
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3622
- centsPerMs: number;
3623
- };
3624
- traceContext: Record<string, unknown>;
3625
- friendlyId: string;
3626
- attemptNumber: number;
3627
- masterQueue: string;
3628
- };
3629
3819
  snapshot: {
3630
3820
  id: string;
3631
3821
  createdAt: Date;
@@ -3679,6 +3869,20 @@ export declare const DevDequeueResponseBody: z.ZodObject<{
3679
3869
  }>, "many">;
3680
3870
  }, "strip", z.ZodTypeAny, {
3681
3871
  dequeuedMessages: {
3872
+ run: {
3873
+ id: string;
3874
+ isTest: boolean;
3875
+ machine: {
3876
+ cpu: number;
3877
+ memory: number;
3878
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3879
+ centsPerMs: number;
3880
+ };
3881
+ traceContext: Record<string, unknown>;
3882
+ friendlyId: string;
3883
+ attemptNumber: number;
3884
+ masterQueue: string;
3885
+ };
3682
3886
  version: "1";
3683
3887
  environment: {
3684
3888
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -3695,20 +3899,6 @@ export declare const DevDequeueResponseBody: z.ZodObject<{
3695
3899
  friendlyId?: string | undefined;
3696
3900
  imagePlatform?: string | undefined;
3697
3901
  };
3698
- run: {
3699
- id: string;
3700
- isTest: boolean;
3701
- machine: {
3702
- cpu: number;
3703
- memory: number;
3704
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3705
- centsPerMs: number;
3706
- };
3707
- traceContext: Record<string, unknown>;
3708
- friendlyId: string;
3709
- attemptNumber: number;
3710
- masterQueue: string;
3711
- };
3712
3902
  snapshot: {
3713
3903
  id: string;
3714
3904
  createdAt: Date;
@@ -3762,6 +3952,20 @@ export declare const DevDequeueResponseBody: z.ZodObject<{
3762
3952
  }[];
3763
3953
  }, {
3764
3954
  dequeuedMessages: {
3955
+ run: {
3956
+ id: string;
3957
+ isTest: boolean;
3958
+ machine: {
3959
+ cpu: number;
3960
+ memory: number;
3961
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3962
+ centsPerMs: number;
3963
+ };
3964
+ traceContext: Record<string, unknown>;
3965
+ friendlyId: string;
3966
+ attemptNumber: number;
3967
+ masterQueue: string;
3968
+ };
3765
3969
  version: "1";
3766
3970
  environment: {
3767
3971
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -3778,20 +3982,6 @@ export declare const DevDequeueResponseBody: z.ZodObject<{
3778
3982
  friendlyId?: string | undefined;
3779
3983
  imagePlatform?: string | undefined;
3780
3984
  };
3781
- run: {
3782
- id: string;
3783
- isTest: boolean;
3784
- machine: {
3785
- cpu: number;
3786
- memory: number;
3787
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3788
- centsPerMs: number;
3789
- };
3790
- traceContext: Record<string, unknown>;
3791
- friendlyId: string;
3792
- attemptNumber: number;
3793
- masterQueue: string;
3794
- };
3795
3985
  snapshot: {
3796
3986
  id: string;
3797
3987
  createdAt: Date;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FailDeploymentResponseBody = exports.FailDeploymentRequestBody = exports.DeploymentErrorData = exports.GenerateRegistryCredentialsResponseBody = exports.RemoteBuildProviderStatusResponseBody = exports.InitializeDeploymentRequestBody = exports.InitializeDeploymentResponseBody = exports.CreateArtifactResponseBody = exports.CreateArtifactRequestBody = exports.UpsertBranchResponseBody = exports.UpsertBranchRequestBody = exports.BuildServerMetadata = exports.DeploymentTriggeredVia = exports.ExternalBuildData = exports.CancelDeploymentRequestBody = exports.ProgressDeploymentRequestBody = exports.FinalizeDeploymentRequestBody = exports.StartDeploymentIndexingResponseBody = exports.StartDeploymentIndexingRequestBody = exports.GetEnvironmentVariablesResponseBody = exports.RescheduleRunRequestBody = exports.AddTagsRequestBody = exports.GetBatchResponseBody = exports.BatchTriggerTaskResponse = exports.StreamBatchItemsResponse = exports.BatchItemNDJSON = exports.CreateBatchResponse = exports.CreateBatchRequestBody = exports.BatchTriggerTaskV3Response = exports.BatchTriggerTaskV3RequestBody = exports.BatchTriggerTaskV2Response = exports.BatchTriggerTaskV2RequestBody = exports.BatchTriggerTaskItem = exports.BatchTriggerTaskRequestBody = exports.TriggerTaskResponse = exports.TriggerTaskRequestBody = exports.RunTags = exports.CreateBackgroundWorkerResponse = exports.CreateBackgroundWorkerRequestBody = exports.GetJWTResponse = exports.GetJWTRequestBody = exports.GetWorkerByTagResponse = exports.GetWorkerTaskResponse = exports.GetProjectEnvResponse = exports.CreateProjectRequestBody = exports.GetOrgsResponseBody = exports.GetProjectsResponseBody = exports.GetProjectResponseBody = exports.WhoAmIResponseSchema = exports.RunEngineVersion = void 0;
4
- exports.RetrieveBatchV2Response = exports.RetrieveBatchResponse = exports.BatchStatus = exports.SubscribeRunRawShape = exports.UpdateMetadataResponseBody = exports.UpdateMetadataRequestBody = exports.EnvironmentVariableWithSecret = exports.EnvironmentVariables = exports.EnvironmentVariable = exports.EnvironmentVariableValue = exports.EnvironmentVariableResponseBody = exports.ImportEnvironmentVariablesRequestBody = exports.UpdateEnvironmentVariableRequestBody = exports.CreateEnvironmentVariableRequestBody = exports.ListRunResponse = exports.ListRunResponseItem = exports.RetrieveRunResponse = exports.RelatedRunDetails = exports.TriggerFunction = exports.RunScheduleDetails = exports.RunEnvironmentDetails = exports.AttemptStatus = exports.RunStatus = exports.TimezonesResult = exports.ListScheduleOptions = exports.ListSchedulesResult = exports.DeletedScheduleObject = exports.ScheduleObject = exports.ScheduleGenerator = exports.UpdateScheduleOptions = exports.CreateScheduleOptions = exports.ScheduledTaskPayload = exports.ScheduleType = exports.ResetIdempotencyKeyResponse = exports.CanceledRunResponse = exports.ReplayRunResponse = exports.DevDequeueResponseBody = exports.DevDequeueRequestBody = exports.DevConfigResponseBody = exports.WorkersCreateResponseBody = exports.WorkersCreateRequestBody = exports.WorkersListResponseBody = exports.CreateUploadPayloadUrlResponseBody = exports.DeploymentEventFromString = exports.DeploymentEvent = exports.DeploymentFinalizedEvent = exports.DeploymentLogEvent = exports.GetLatestDeploymentResponseBody = exports.GetDeploymentResponseBody = exports.PromoteDeploymentResponseBody = void 0;
5
- exports.AppendToStreamResponseBody = exports.CreateStreamResponseBody = exports.RetrieveRunTraceResponseBody = exports.RetrieveRunTraceSpan = exports.RetrieveRunTraceSpanSchema = exports.ApiBranchListResponseBody = exports.ApiDeploymentListResponseItem = exports.ApiDeploymentListSearchParams = exports.ApiDeploymentListOptions = exports.ApiDeploymentListParams = exports.WaitForDurationResponseBody = exports.WaitForDurationRequestBody = exports.WaitForWaitpointTokenResponseBody = exports.CompleteWaitpointTokenResponseBody = exports.CompleteWaitpointTokenRequestBody = exports.WaitpointRetrieveTokenResponse = exports.WaitpointListTokenItem = exports.WaitpointTokenItem = exports.WaitpointTokenStatus = exports.waitpointTokenStatuses = exports.CreateWaitpointTokenResponseBody = exports.CreateWaitpointTokenRequestBody = exports.TimePeriod = exports.SubscribeRealtimeStreamChunkRawShape = void 0;
3
+ exports.FailDeploymentRequestBody = exports.DeploymentErrorData = exports.GenerateRegistryCredentialsResponseBody = exports.RemoteBuildProviderStatusResponseBody = exports.InitializeDeploymentRequestBody = exports.InitializeDeploymentResponseBody = exports.CreateArtifactResponseBody = exports.CreateArtifactRequestBody = exports.UpsertBranchResponseBody = exports.UpsertBranchRequestBody = exports.BuildServerMetadata = exports.DeploymentTriggeredVia = exports.ExternalBuildData = exports.CancelDeploymentRequestBody = exports.ProgressDeploymentRequestBody = exports.FinalizeDeploymentRequestBody = exports.StartDeploymentIndexingResponseBody = exports.StartDeploymentIndexingRequestBody = exports.GetEnvironmentVariablesResponseBody = exports.RescheduleRunRequestBody = exports.AddTagsRequestBody = exports.GetBatchResponseBody = exports.BatchTriggerTaskResponse = exports.StreamBatchItemsResponse = exports.BatchItemNDJSON = exports.CreateBatchResponse = exports.CreateBatchRequestBody = exports.BatchTriggerTaskV3Response = exports.BatchTriggerTaskV3RequestBody = exports.BatchTriggerTaskV2Response = exports.BatchTriggerTaskV2RequestBody = exports.BatchTriggerTaskItem = exports.BatchTriggerTaskRequestBody = exports.TriggerTaskResponse = exports.TriggerTaskRequestBody = exports.IdempotencyKeyOptionsSchema = exports.RunTags = exports.CreateBackgroundWorkerResponse = exports.CreateBackgroundWorkerRequestBody = exports.GetJWTResponse = exports.GetJWTRequestBody = exports.GetWorkerByTagResponse = exports.GetWorkerTaskResponse = exports.GetProjectEnvResponse = exports.CreateProjectRequestBody = exports.GetOrgsResponseBody = exports.GetProjectsResponseBody = exports.GetProjectResponseBody = exports.WhoAmIResponseSchema = exports.RunEngineVersion = void 0;
4
+ exports.RetrieveBatchResponse = exports.BatchStatus = exports.SubscribeRunRawShape = exports.UpdateMetadataResponseBody = exports.UpdateMetadataRequestBody = exports.EnvironmentVariableWithSecret = exports.EnvironmentVariables = exports.EnvironmentVariable = exports.EnvironmentVariableValue = exports.EnvironmentVariableResponseBody = exports.ImportEnvironmentVariablesRequestBody = exports.UpdateEnvironmentVariableRequestBody = exports.CreateEnvironmentVariableRequestBody = exports.ListRunResponse = exports.ListRunResponseItem = exports.RetrieveRunResponse = exports.RelatedRunDetails = exports.TriggerFunction = exports.RunScheduleDetails = exports.RunEnvironmentDetails = exports.AttemptStatus = exports.RunStatus = exports.TimezonesResult = exports.ListScheduleOptions = exports.ListSchedulesResult = exports.DeletedScheduleObject = exports.ScheduleObject = exports.ScheduleGenerator = exports.UpdateScheduleOptions = exports.CreateScheduleOptions = exports.ScheduledTaskPayload = exports.ScheduleType = exports.ResetIdempotencyKeyResponse = exports.CanceledRunResponse = exports.ReplayRunResponse = exports.DevDequeueResponseBody = exports.DevDequeueRequestBody = exports.DevConfigResponseBody = exports.WorkersCreateResponseBody = exports.WorkersCreateRequestBody = exports.WorkersListResponseBody = exports.CreateUploadPayloadUrlResponseBody = exports.DeploymentEventFromString = exports.DeploymentEvent = exports.DeploymentFinalizedEvent = exports.DeploymentLogEvent = exports.GetLatestDeploymentResponseBody = exports.GetDeploymentResponseBody = exports.PromoteDeploymentResponseBody = exports.FailDeploymentResponseBody = void 0;
5
+ exports.AppendToStreamResponseBody = exports.CreateStreamResponseBody = exports.RetrieveRunTraceResponseBody = exports.RetrieveRunTraceSpan = exports.RetrieveRunTraceSpanSchema = exports.ApiBranchListResponseBody = exports.ApiDeploymentListResponseItem = exports.ApiDeploymentListSearchParams = exports.ApiDeploymentListOptions = exports.ApiDeploymentListParams = exports.WaitForDurationResponseBody = exports.WaitForDurationRequestBody = exports.WaitForWaitpointTokenResponseBody = exports.CompleteWaitpointTokenResponseBody = exports.CompleteWaitpointTokenRequestBody = exports.WaitpointRetrieveTokenResponse = exports.WaitpointListTokenItem = exports.WaitpointTokenItem = exports.WaitpointTokenStatus = exports.waitpointTokenStatuses = exports.CreateWaitpointTokenResponseBody = exports.CreateWaitpointTokenRequestBody = exports.TimePeriod = exports.SubscribeRealtimeStreamChunkRawShape = exports.RetrieveBatchV2Response = void 0;
6
6
  exports.isWaitpointOutputTimeout = isWaitpointOutputTimeout;
7
7
  exports.timeoutError = timeoutError;
8
8
  const zod_1 = require("zod");
@@ -107,6 +107,11 @@ exports.CreateBackgroundWorkerResponse = zod_1.z.object({
107
107
  //an array of 1, 2, or 3 strings
108
108
  const RunTag = zod_1.z.string().max(128, "Tags must be less than 128 characters");
109
109
  exports.RunTags = zod_1.z.union([RunTag, RunTag.array()]);
110
+ /** Stores the original user-provided idempotency key and scope */
111
+ exports.IdempotencyKeyOptionsSchema = zod_1.z.object({
112
+ key: zod_1.z.string(),
113
+ scope: zod_1.z.enum(["run", "attempt", "global"]),
114
+ });
110
115
  exports.TriggerTaskRequestBody = zod_1.z.object({
111
116
  payload: zod_1.z.any(),
112
117
  context: zod_1.z.any(),
@@ -148,6 +153,8 @@ exports.TriggerTaskRequestBody = zod_1.z.object({
148
153
  delay: zod_1.z.string().or(zod_1.z.coerce.date()).optional(),
149
154
  idempotencyKey: zod_1.z.string().optional(),
150
155
  idempotencyKeyTTL: zod_1.z.string().optional(),
156
+ /** The original user-provided idempotency key and scope */
157
+ idempotencyKeyOptions: exports.IdempotencyKeyOptionsSchema.optional(),
151
158
  machine: common_js_1.MachinePresetName.optional(),
152
159
  maxAttempts: zod_1.z.number().int().optional(),
153
160
  maxDuration: zod_1.z.number().optional(),
@@ -188,6 +195,8 @@ exports.BatchTriggerTaskItem = zod_1.z.object({
188
195
  delay: zod_1.z.string().or(zod_1.z.coerce.date()).optional(),
189
196
  idempotencyKey: zod_1.z.string().optional(),
190
197
  idempotencyKeyTTL: zod_1.z.string().optional(),
198
+ /** The original user-provided idempotency key and scope */
199
+ idempotencyKeyOptions: exports.IdempotencyKeyOptionsSchema.optional(),
191
200
  lockToVersion: zod_1.z.string().optional(),
192
201
  machine: common_js_1.MachinePresetName.optional(),
193
202
  maxAttempts: zod_1.z.number().int().optional(),
@@ -275,6 +284,8 @@ exports.CreateBatchRequestBody = zod_1.z.object({
275
284
  resumeParentOnCompletion: zod_1.z.boolean().optional(),
276
285
  /** Idempotency key for the batch */
277
286
  idempotencyKey: zod_1.z.string().optional(),
287
+ /** The original user-provided idempotency key and scope */
288
+ idempotencyKeyOptions: exports.IdempotencyKeyOptionsSchema.optional(),
278
289
  });
279
290
  /**
280
291
  * Phase 1: Create batch response