@greatwait/contracts 0.2.2 → 0.3.0
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/attempt-search.d.ts +235 -0
- package/dist/attempt-search.js +98 -0
- package/dist/billing.d.ts +4 -4
- package/dist/bulk-operations.d.ts +1832 -0
- package/dist/bulk-operations.js +610 -0
- package/dist/configuration-bounds.d.ts +12 -0
- package/dist/configuration-bounds.js +12 -0
- package/dist/configuration.d.ts +71 -0
- package/dist/configuration.js +204 -0
- package/dist/data-export.d.ts +3 -3
- package/dist/effective-limits.d.ts +4 -4
- package/dist/execution-selection.d.ts +48 -0
- package/dist/execution-selection.js +21 -0
- package/dist/http-request.d.ts +1 -1
- package/dist/identifiers.d.ts +2 -0
- package/dist/identifiers.js +2 -0
- package/dist/identity.d.ts +3 -3
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/occurrence-states.d.ts +14 -0
- package/dist/occurrence-states.js +13 -0
- package/dist/operations.d.ts +573 -89
- package/dist/operations.js +67 -0
- package/dist/protocol.d.ts +19 -5
- package/dist/protocol.js +14 -7
- package/dist/schedule-selection.d.ts +28 -0
- package/dist/schedule-selection.js +48 -0
- package/dist/scheduling-records.d.ts +20 -20
- package/dist/scheduling.d.ts +64 -63
- package/dist/scheduling.js +10 -37
- package/dist/test-sink.d.ts +6 -6
- package/dist/usage.d.ts +3 -3
- package/generated/v1/examples/attempts.search.response.json +42 -0
- package/generated/v1/examples/bulk.cancel.request.json +3 -0
- package/generated/v1/examples/bulk.cancel.response.json +59 -0
- package/generated/v1/examples/bulk.confirm.request.json +5 -0
- package/generated/v1/examples/bulk.confirm.response.json +59 -0
- package/generated/v1/examples/bulk.items.response.json +3 -0
- package/generated/v1/examples/bulk.list.response.json +63 -0
- package/generated/v1/examples/bulk.pause.request.json +3 -0
- package/generated/v1/examples/bulk.pause.response.json +59 -0
- package/generated/v1/examples/bulk.preview.request.json +12 -0
- package/generated/v1/examples/bulk.preview.response.json +59 -0
- package/generated/v1/examples/bulk.read.response.json +59 -0
- package/generated/v1/examples/bulk.resume.request.json +3 -0
- package/generated/v1/examples/bulk.resume.response.json +59 -0
- package/generated/v1/manifest.json +243 -1
- package/generated/v1/openapi.json +21569 -2418
- package/generated/v1/policy-matrix.json +63 -0
- package/generated/v1/schemas/attempts.search.query.json +96 -0
- package/generated/v1/schemas/attempts.search.response.json +271 -0
- package/generated/v1/schemas/bulk.cancel.request.json +13 -0
- package/generated/v1/schemas/bulk.cancel.response.json +1717 -0
- package/generated/v1/schemas/bulk.confirm.request-headers.json +13 -0
- package/generated/v1/schemas/bulk.confirm.request.json +19 -0
- package/generated/v1/schemas/bulk.confirm.response.json +1717 -0
- package/generated/v1/schemas/bulk.items.query.json +29 -0
- package/generated/v1/schemas/bulk.items.response.json +194 -0
- package/generated/v1/schemas/bulk.list.query.json +32 -0
- package/generated/v1/schemas/bulk.list.response.json +1789 -0
- package/generated/v1/schemas/bulk.pause.request.json +13 -0
- package/generated/v1/schemas/bulk.pause.response.json +1717 -0
- package/generated/v1/schemas/bulk.preview.request.json +1218 -0
- package/generated/v1/schemas/bulk.preview.response.json +1717 -0
- package/generated/v1/schemas/bulk.read.response.json +1717 -0
- package/generated/v1/schemas/bulk.resume.request.json +13 -0
- package/generated/v1/schemas/bulk.resume.response.json +1717 -0
- package/generated/v1/schemas/executions.list.query.json +33 -12
- package/generated/v1/schemas/schedules.list.query.json +32 -3
- package/generated/v1/snippets/attempts.search.json +6 -0
- package/generated/v1/snippets/bulk.cancel.json +6 -0
- package/generated/v1/snippets/bulk.confirm.json +6 -0
- package/generated/v1/snippets/bulk.items.json +6 -0
- package/generated/v1/snippets/bulk.list.json +6 -0
- package/generated/v1/snippets/bulk.pause.json +6 -0
- package/generated/v1/snippets/bulk.preview.json +6 -0
- package/generated/v1/snippets/bulk.read.json +6 -0
- package/generated/v1/snippets/bulk.resume.json +6 -0
- package/package.json +1 -1
package/dist/scheduling.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type OccurrenceState } from "./occurrence-states.js";
|
|
1
2
|
import { z } from "./zod.js";
|
|
2
3
|
import { type CursorBinding } from "./protocol.js";
|
|
3
4
|
import type { FieldError } from "./problems.js";
|
|
@@ -36,9 +37,9 @@ import { type CallbackTrigger, type ResponseClass } from "./signatures.js";
|
|
|
36
37
|
*/
|
|
37
38
|
export declare const SCHEDULE_STATUSES: readonly ["active", "paused", "cancelled", "completed"];
|
|
38
39
|
export declare const scheduleStatusSchema: import("zod").ZodEnum<{
|
|
39
|
-
paused: "paused";
|
|
40
|
-
active: "active";
|
|
41
40
|
cancelled: "cancelled";
|
|
41
|
+
active: "active";
|
|
42
|
+
paused: "paused";
|
|
42
43
|
completed: "completed";
|
|
43
44
|
}>;
|
|
44
45
|
export type ScheduleStatus = z.infer<typeof scheduleStatusSchema>;
|
|
@@ -346,19 +347,7 @@ export type PartitionKey = z.infer<typeof partitionKeySchema>;
|
|
|
346
347
|
* not `cancelled`: a customer who cancelled something and a customer whose
|
|
347
348
|
* occurrence went stale need different explanations.
|
|
348
349
|
*/
|
|
349
|
-
export
|
|
350
|
-
export declare const occurrenceStateSchema: import("zod").ZodEnum<{
|
|
351
|
-
succeeded: "succeeded";
|
|
352
|
-
ambiguous: "ambiguous";
|
|
353
|
-
due: "due";
|
|
354
|
-
cancelled: "cancelled";
|
|
355
|
-
planned: "planned";
|
|
356
|
-
dispatching: "dispatching";
|
|
357
|
-
retry_wait: "retry_wait";
|
|
358
|
-
terminal_failed: "terminal_failed";
|
|
359
|
-
skipped_stale: "skipped_stale";
|
|
360
|
-
}>;
|
|
361
|
-
export type OccurrenceState = z.infer<typeof occurrenceStateSchema>;
|
|
350
|
+
export { OCCURRENCE_STATES, occurrenceStateSchema, type OccurrenceState, } from "./occurrence-states.js";
|
|
362
351
|
/**
|
|
363
352
|
* One project-wide walk over retained occurrences, newest first.
|
|
364
353
|
*
|
|
@@ -370,23 +359,35 @@ export type OccurrenceState = z.infer<typeof occurrenceStateSchema>;
|
|
|
370
359
|
export declare const projectOccurrenceListRequestSchema: import("zod").ZodObject<{
|
|
371
360
|
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
372
361
|
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
373
|
-
endpoint: import("zod").ZodOptional<import("zod").ZodString
|
|
362
|
+
endpoint: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodLiteral<"none">]>>;
|
|
363
|
+
schedule: import("zod").ZodOptional<import("zod").ZodString>;
|
|
374
364
|
external_identifier: import("zod").ZodOptional<import("zod").ZodString>;
|
|
375
365
|
tag: import("zod").ZodOptional<import("zod").ZodString>;
|
|
366
|
+
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
367
|
+
cancelled: "cancelled";
|
|
368
|
+
active: "active";
|
|
369
|
+
paused: "paused";
|
|
370
|
+
completed: "completed";
|
|
371
|
+
}>>;
|
|
372
|
+
recurrence: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
373
|
+
at: "at";
|
|
374
|
+
every: "every";
|
|
375
|
+
cron: "cron";
|
|
376
|
+
}>>;
|
|
377
|
+
text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
376
378
|
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
379
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
377
380
|
outcome: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
378
|
-
succeeded: "succeeded";
|
|
379
|
-
ambiguous: "ambiguous";
|
|
380
|
-
due: "due";
|
|
381
|
-
cancelled: "cancelled";
|
|
382
381
|
planned: "planned";
|
|
382
|
+
due: "due";
|
|
383
383
|
dispatching: "dispatching";
|
|
384
384
|
retry_wait: "retry_wait";
|
|
385
|
+
ambiguous: "ambiguous";
|
|
386
|
+
succeeded: "succeeded";
|
|
385
387
|
terminal_failed: "terminal_failed";
|
|
388
|
+
cancelled: "cancelled";
|
|
386
389
|
skipped_stale: "skipped_stale";
|
|
387
390
|
}>>;
|
|
388
|
-
schedule: import("zod").ZodOptional<import("zod").ZodString>;
|
|
389
|
-
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
390
391
|
}, import("zod/v4/core").$strip>;
|
|
391
392
|
export type ProjectOccurrenceListRequest = z.infer<typeof projectOccurrenceListRequestSchema>;
|
|
392
393
|
export type ProjectOccurrenceListRequestParse = {
|
|
@@ -427,8 +428,8 @@ export declare function isTerminalOccurrenceState(state: OccurrenceState): boole
|
|
|
427
428
|
*/
|
|
428
429
|
export declare const ATTEMPT_STATES: readonly ["succeeded", "retryable_failure", "terminal_failure", "ambiguous"];
|
|
429
430
|
export declare const attemptStateSchema: import("zod").ZodEnum<{
|
|
430
|
-
succeeded: "succeeded";
|
|
431
431
|
ambiguous: "ambiguous";
|
|
432
|
+
succeeded: "succeeded";
|
|
432
433
|
retryable_failure: "retryable_failure";
|
|
433
434
|
terminal_failure: "terminal_failure";
|
|
434
435
|
}>;
|
|
@@ -803,9 +804,9 @@ export declare const scheduleSchema: import("zod").ZodObject<{
|
|
|
803
804
|
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
804
805
|
}, import("zod/v4/core").$strip>], "kind">;
|
|
805
806
|
status: import("zod").ZodEnum<{
|
|
806
|
-
paused: "paused";
|
|
807
|
-
active: "active";
|
|
808
807
|
cancelled: "cancelled";
|
|
808
|
+
active: "active";
|
|
809
|
+
paused: "paused";
|
|
809
810
|
completed: "completed";
|
|
810
811
|
}>;
|
|
811
812
|
updatedAt: import("zod").ZodString;
|
|
@@ -905,9 +906,9 @@ export declare const schedulePageSchema: import("zod").ZodObject<{
|
|
|
905
906
|
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
906
907
|
}, import("zod/v4/core").$strip>], "kind">;
|
|
907
908
|
status: import("zod").ZodEnum<{
|
|
908
|
-
paused: "paused";
|
|
909
|
-
active: "active";
|
|
910
909
|
cancelled: "cancelled";
|
|
910
|
+
active: "active";
|
|
911
|
+
paused: "paused";
|
|
911
912
|
completed: "completed";
|
|
912
913
|
}>;
|
|
913
914
|
updatedAt: import("zod").ZodString;
|
|
@@ -939,14 +940,14 @@ export declare const occurrenceSchema: import("zod").ZodObject<{
|
|
|
939
940
|
sequence: import("zod").ZodNumber;
|
|
940
941
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
941
942
|
state: import("zod").ZodEnum<{
|
|
942
|
-
succeeded: "succeeded";
|
|
943
|
-
ambiguous: "ambiguous";
|
|
944
|
-
due: "due";
|
|
945
|
-
cancelled: "cancelled";
|
|
946
943
|
planned: "planned";
|
|
944
|
+
due: "due";
|
|
947
945
|
dispatching: "dispatching";
|
|
948
946
|
retry_wait: "retry_wait";
|
|
947
|
+
ambiguous: "ambiguous";
|
|
948
|
+
succeeded: "succeeded";
|
|
949
949
|
terminal_failed: "terminal_failed";
|
|
950
|
+
cancelled: "cancelled";
|
|
950
951
|
skipped_stale: "skipped_stale";
|
|
951
952
|
}>;
|
|
952
953
|
firstAttemptLatenessMs: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
@@ -1013,8 +1014,8 @@ export type AttemptFailureSnippet = z.infer<typeof attemptFailureSnippetSchema>;
|
|
|
1013
1014
|
export declare const attemptCapturedBodySchema: import("zod").ZodObject<{
|
|
1014
1015
|
contentType: import("zod").ZodString;
|
|
1015
1016
|
encoding: import("zod").ZodEnum<{
|
|
1016
|
-
utf8: "utf8";
|
|
1017
1017
|
base64: "base64";
|
|
1018
|
+
utf8: "utf8";
|
|
1018
1019
|
}>;
|
|
1019
1020
|
content: import("zod").ZodString;
|
|
1020
1021
|
capturedBytes: import("zod").ZodInt;
|
|
@@ -1038,8 +1039,8 @@ export declare const attemptResponseSchema: import("zod").ZodObject<{
|
|
|
1038
1039
|
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1039
1040
|
contentType: import("zod").ZodString;
|
|
1040
1041
|
encoding: import("zod").ZodEnum<{
|
|
1041
|
-
utf8: "utf8";
|
|
1042
1042
|
base64: "base64";
|
|
1043
|
+
utf8: "utf8";
|
|
1043
1044
|
}>;
|
|
1044
1045
|
content: import("zod").ZodString;
|
|
1045
1046
|
capturedBytes: import("zod").ZodInt;
|
|
@@ -1098,8 +1099,8 @@ export declare const attemptSchema: import("zod").ZodObject<{
|
|
|
1098
1099
|
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1099
1100
|
contentType: import("zod").ZodString;
|
|
1100
1101
|
encoding: import("zod").ZodEnum<{
|
|
1101
|
-
utf8: "utf8";
|
|
1102
1102
|
base64: "base64";
|
|
1103
|
+
utf8: "utf8";
|
|
1103
1104
|
}>;
|
|
1104
1105
|
content: import("zod").ZodString;
|
|
1105
1106
|
capturedBytes: import("zod").ZodInt;
|
|
@@ -1134,8 +1135,8 @@ export declare const attemptSchema: import("zod").ZodObject<{
|
|
|
1134
1135
|
responseStatus: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1135
1136
|
startedAt: import("zod").ZodString;
|
|
1136
1137
|
state: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1137
|
-
succeeded: "succeeded";
|
|
1138
1138
|
ambiguous: "ambiguous";
|
|
1139
|
+
succeeded: "succeeded";
|
|
1139
1140
|
retryable_failure: "retryable_failure";
|
|
1140
1141
|
terminal_failure: "terminal_failure";
|
|
1141
1142
|
}>>;
|
|
@@ -1185,14 +1186,14 @@ export declare const occurrencePageSchema: import("zod").ZodObject<{
|
|
|
1185
1186
|
sequence: import("zod").ZodNumber;
|
|
1186
1187
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1187
1188
|
state: import("zod").ZodEnum<{
|
|
1188
|
-
succeeded: "succeeded";
|
|
1189
|
-
ambiguous: "ambiguous";
|
|
1190
|
-
due: "due";
|
|
1191
|
-
cancelled: "cancelled";
|
|
1192
1189
|
planned: "planned";
|
|
1190
|
+
due: "due";
|
|
1193
1191
|
dispatching: "dispatching";
|
|
1194
1192
|
retry_wait: "retry_wait";
|
|
1193
|
+
ambiguous: "ambiguous";
|
|
1194
|
+
succeeded: "succeeded";
|
|
1195
1195
|
terminal_failed: "terminal_failed";
|
|
1196
|
+
cancelled: "cancelled";
|
|
1196
1197
|
skipped_stale: "skipped_stale";
|
|
1197
1198
|
}>;
|
|
1198
1199
|
firstAttemptLatenessMs: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
@@ -1222,14 +1223,14 @@ export declare const projectOccurrencePageSchema: import("zod").ZodObject<{
|
|
|
1222
1223
|
sequence: import("zod").ZodNumber;
|
|
1223
1224
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1224
1225
|
state: import("zod").ZodEnum<{
|
|
1225
|
-
succeeded: "succeeded";
|
|
1226
|
-
ambiguous: "ambiguous";
|
|
1227
|
-
due: "due";
|
|
1228
|
-
cancelled: "cancelled";
|
|
1229
1226
|
planned: "planned";
|
|
1227
|
+
due: "due";
|
|
1230
1228
|
dispatching: "dispatching";
|
|
1231
1229
|
retry_wait: "retry_wait";
|
|
1230
|
+
ambiguous: "ambiguous";
|
|
1231
|
+
succeeded: "succeeded";
|
|
1232
1232
|
terminal_failed: "terminal_failed";
|
|
1233
|
+
cancelled: "cancelled";
|
|
1233
1234
|
skipped_stale: "skipped_stale";
|
|
1234
1235
|
}>;
|
|
1235
1236
|
firstAttemptLatenessMs: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
@@ -1265,14 +1266,14 @@ export declare const occurrenceViewSchema: import("zod").ZodObject<{
|
|
|
1265
1266
|
sequence: import("zod").ZodNumber;
|
|
1266
1267
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1267
1268
|
state: import("zod").ZodEnum<{
|
|
1268
|
-
succeeded: "succeeded";
|
|
1269
|
-
ambiguous: "ambiguous";
|
|
1270
|
-
due: "due";
|
|
1271
|
-
cancelled: "cancelled";
|
|
1272
1269
|
planned: "planned";
|
|
1270
|
+
due: "due";
|
|
1273
1271
|
dispatching: "dispatching";
|
|
1274
1272
|
retry_wait: "retry_wait";
|
|
1273
|
+
ambiguous: "ambiguous";
|
|
1274
|
+
succeeded: "succeeded";
|
|
1275
1275
|
terminal_failed: "terminal_failed";
|
|
1276
|
+
cancelled: "cancelled";
|
|
1276
1277
|
skipped_stale: "skipped_stale";
|
|
1277
1278
|
}>;
|
|
1278
1279
|
firstAttemptLatenessMs: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
@@ -1324,8 +1325,8 @@ export declare const attemptPageSchema: import("zod").ZodObject<{
|
|
|
1324
1325
|
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1325
1326
|
contentType: import("zod").ZodString;
|
|
1326
1327
|
encoding: import("zod").ZodEnum<{
|
|
1327
|
-
utf8: "utf8";
|
|
1328
1328
|
base64: "base64";
|
|
1329
|
+
utf8: "utf8";
|
|
1329
1330
|
}>;
|
|
1330
1331
|
content: import("zod").ZodString;
|
|
1331
1332
|
capturedBytes: import("zod").ZodInt;
|
|
@@ -1360,8 +1361,8 @@ export declare const attemptPageSchema: import("zod").ZodObject<{
|
|
|
1360
1361
|
responseStatus: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1361
1362
|
startedAt: import("zod").ZodString;
|
|
1362
1363
|
state: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1363
|
-
succeeded: "succeeded";
|
|
1364
1364
|
ambiguous: "ambiguous";
|
|
1365
|
+
succeeded: "succeeded";
|
|
1365
1366
|
retryable_failure: "retryable_failure";
|
|
1366
1367
|
terminal_failure: "terminal_failure";
|
|
1367
1368
|
}>>;
|
|
@@ -1442,8 +1443,8 @@ export declare const attemptViewSchema: import("zod").ZodObject<{
|
|
|
1442
1443
|
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1443
1444
|
contentType: import("zod").ZodString;
|
|
1444
1445
|
encoding: import("zod").ZodEnum<{
|
|
1445
|
-
utf8: "utf8";
|
|
1446
1446
|
base64: "base64";
|
|
1447
|
+
utf8: "utf8";
|
|
1447
1448
|
}>;
|
|
1448
1449
|
content: import("zod").ZodString;
|
|
1449
1450
|
capturedBytes: import("zod").ZodInt;
|
|
@@ -1478,8 +1479,8 @@ export declare const attemptViewSchema: import("zod").ZodObject<{
|
|
|
1478
1479
|
responseStatus: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1479
1480
|
startedAt: import("zod").ZodString;
|
|
1480
1481
|
state: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1481
|
-
succeeded: "succeeded";
|
|
1482
1482
|
ambiguous: "ambiguous";
|
|
1483
|
+
succeeded: "succeeded";
|
|
1483
1484
|
retryable_failure: "retryable_failure";
|
|
1484
1485
|
terminal_failure: "terminal_failure";
|
|
1485
1486
|
}>>;
|
|
@@ -1540,14 +1541,14 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1540
1541
|
sequence: import("zod").ZodNumber;
|
|
1541
1542
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1542
1543
|
state: import("zod").ZodEnum<{
|
|
1543
|
-
succeeded: "succeeded";
|
|
1544
|
-
ambiguous: "ambiguous";
|
|
1545
|
-
due: "due";
|
|
1546
|
-
cancelled: "cancelled";
|
|
1547
1544
|
planned: "planned";
|
|
1545
|
+
due: "due";
|
|
1548
1546
|
dispatching: "dispatching";
|
|
1549
1547
|
retry_wait: "retry_wait";
|
|
1548
|
+
ambiguous: "ambiguous";
|
|
1549
|
+
succeeded: "succeeded";
|
|
1550
1550
|
terminal_failed: "terminal_failed";
|
|
1551
|
+
cancelled: "cancelled";
|
|
1551
1552
|
skipped_stale: "skipped_stale";
|
|
1552
1553
|
}>;
|
|
1553
1554
|
firstAttemptLatenessMs: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
@@ -1643,9 +1644,9 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1643
1644
|
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
1644
1645
|
}, import("zod/v4/core").$strip>], "kind">;
|
|
1645
1646
|
status: import("zod").ZodEnum<{
|
|
1646
|
-
paused: "paused";
|
|
1647
|
-
active: "active";
|
|
1648
1647
|
cancelled: "cancelled";
|
|
1648
|
+
active: "active";
|
|
1649
|
+
paused: "paused";
|
|
1649
1650
|
completed: "completed";
|
|
1650
1651
|
}>;
|
|
1651
1652
|
updatedAt: import("zod").ZodString;
|
|
@@ -1668,14 +1669,14 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1668
1669
|
sequence: import("zod").ZodNumber;
|
|
1669
1670
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1670
1671
|
state: import("zod").ZodEnum<{
|
|
1671
|
-
succeeded: "succeeded";
|
|
1672
|
-
ambiguous: "ambiguous";
|
|
1673
|
-
due: "due";
|
|
1674
|
-
cancelled: "cancelled";
|
|
1675
1672
|
planned: "planned";
|
|
1673
|
+
due: "due";
|
|
1676
1674
|
dispatching: "dispatching";
|
|
1677
1675
|
retry_wait: "retry_wait";
|
|
1676
|
+
ambiguous: "ambiguous";
|
|
1677
|
+
succeeded: "succeeded";
|
|
1678
1678
|
terminal_failed: "terminal_failed";
|
|
1679
|
+
cancelled: "cancelled";
|
|
1679
1680
|
skipped_stale: "skipped_stale";
|
|
1680
1681
|
}>;
|
|
1681
1682
|
firstAttemptLatenessMs: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
@@ -1771,9 +1772,9 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1771
1772
|
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
1772
1773
|
}, import("zod/v4/core").$strip>], "kind">;
|
|
1773
1774
|
status: import("zod").ZodEnum<{
|
|
1774
|
-
paused: "paused";
|
|
1775
|
-
active: "active";
|
|
1776
1775
|
cancelled: "cancelled";
|
|
1776
|
+
active: "active";
|
|
1777
|
+
paused: "paused";
|
|
1777
1778
|
completed: "completed";
|
|
1778
1779
|
}>;
|
|
1779
1780
|
updatedAt: import("zod").ZodString;
|
package/dist/scheduling.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { occurrenceStateSchema, } from "./occurrence-states.js";
|
|
2
|
+
import { executionSelectionSchema, normalizeExecutionSelection, } from "./execution-selection.js";
|
|
1
3
|
import { httpRequestSchema, publicHttpRequestSchema } from "./http-request.js";
|
|
2
4
|
import { FIXED_INTERVAL_MIN_SECONDS, FIXED_INTERVAL_MAX_SECONDS, MAX_INLINE_PAYLOAD_BYTES, } from "./configuration-bounds.js";
|
|
3
5
|
import { z } from "./zod.js";
|
|
4
|
-
import { externalIdentifierSchema,
|
|
6
|
+
import { externalIdentifierSchema, scheduleTagsSchema, } from "./host-correlation.js";
|
|
5
7
|
import { attemptIdSchema, deliveryIdSchema, endpointIdSchema, occurrenceIdSchema, scheduleIdSchema, } from "./identifiers.js";
|
|
6
8
|
import { CALLBACK_ATTEMPT_DIAGNOSTICS } from "./delivery.js";
|
|
7
9
|
import { callbackUrlSchema, signingSecretNoticeSchema } from "./endpoints.js";
|
|
@@ -358,18 +360,7 @@ export const partitionKeySchema = z
|
|
|
358
360
|
* not `cancelled`: a customer who cancelled something and a customer whose
|
|
359
361
|
* occurrence went stale need different explanations.
|
|
360
362
|
*/
|
|
361
|
-
export
|
|
362
|
-
"planned",
|
|
363
|
-
"due",
|
|
364
|
-
"dispatching",
|
|
365
|
-
"retry_wait",
|
|
366
|
-
"ambiguous",
|
|
367
|
-
"succeeded",
|
|
368
|
-
"terminal_failed",
|
|
369
|
-
"cancelled",
|
|
370
|
-
"skipped_stale",
|
|
371
|
-
];
|
|
372
|
-
export const occurrenceStateSchema = z.enum(OCCURRENCE_STATES);
|
|
363
|
+
export { OCCURRENCE_STATES, occurrenceStateSchema, } from "./occurrence-states.js";
|
|
373
364
|
/**
|
|
374
365
|
* One project-wide walk over retained occurrences, newest first.
|
|
375
366
|
*
|
|
@@ -379,25 +370,17 @@ export const occurrenceStateSchema = z.enum(OCCURRENCE_STATES);
|
|
|
379
370
|
* this contract, so adjacent requests neither overlap nor leave a gap.
|
|
380
371
|
*/
|
|
381
372
|
export const projectOccurrenceListRequestSchema = pageRequestSchema
|
|
382
|
-
.extend(
|
|
383
|
-
endpoint: endpointIdSchema.optional(),
|
|
384
|
-
external_identifier: externalIdentifierSchema.optional(),
|
|
385
|
-
tag: scheduleTagSchema.optional(),
|
|
386
|
-
from: timestampSchema.optional(),
|
|
387
|
-
outcome: occurrenceStateSchema.optional(),
|
|
388
|
-
schedule: scheduleIdSchema.optional(),
|
|
389
|
-
to: timestampSchema.optional(),
|
|
390
|
-
})
|
|
373
|
+
.extend(executionSelectionSchema.shape)
|
|
391
374
|
.refine((request) => request.from === undefined ||
|
|
392
375
|
request.to === undefined ||
|
|
393
|
-
Date.parse(request.from) < Date.parse(request.to), {
|
|
394
|
-
message: "must be later than from",
|
|
395
|
-
path: ["to"],
|
|
396
|
-
});
|
|
376
|
+
Date.parse(request.from) < Date.parse(request.to), { message: "must be later than from", path: ["to"] });
|
|
397
377
|
const PROJECT_OCCURRENCE_LIST_PARAMETERS = [
|
|
398
378
|
"cursor",
|
|
399
379
|
"limit",
|
|
400
380
|
"endpoint",
|
|
381
|
+
"status",
|
|
382
|
+
"recurrence",
|
|
383
|
+
"text",
|
|
401
384
|
"external_identifier",
|
|
402
385
|
"tag",
|
|
403
386
|
"from",
|
|
@@ -448,17 +431,7 @@ export function parseProjectOccurrenceListRequest(query) {
|
|
|
448
431
|
export function projectOccurrenceCursorBinding(request) {
|
|
449
432
|
return {
|
|
450
433
|
operation: "executions.list",
|
|
451
|
-
parameters: {
|
|
452
|
-
...(request.endpoint === undefined ? {} : { endpoint: request.endpoint }),
|
|
453
|
-
...(request.external_identifier === undefined
|
|
454
|
-
? {}
|
|
455
|
-
: { external_identifier: request.external_identifier }),
|
|
456
|
-
...(request.tag === undefined ? {} : { tag: request.tag }),
|
|
457
|
-
...(request.from === undefined ? {} : { from: request.from }),
|
|
458
|
-
...(request.outcome === undefined ? {} : { outcome: request.outcome }),
|
|
459
|
-
...(request.schedule === undefined ? {} : { schedule: request.schedule }),
|
|
460
|
-
...(request.to === undefined ? {} : { to: request.to }),
|
|
461
|
-
},
|
|
434
|
+
parameters: { ...normalizeExecutionSelection(request) },
|
|
462
435
|
};
|
|
463
436
|
}
|
|
464
437
|
/**
|
package/dist/test-sink.d.ts
CHANGED
|
@@ -376,11 +376,11 @@ export declare function resolveTestSinkAction(program: TestSinkProgram, delivery
|
|
|
376
376
|
*/
|
|
377
377
|
export declare const CALLBACK_RECEIVER_DISPOSITIONS: readonly ["body_too_large", "duplicate", "handler_failed", "in_flight", "invalid_envelope", "invalid_headers", "invalid_signature", "processed", "replay", "stale_timestamp"];
|
|
378
378
|
export declare const callbackReceiverDispositionSchema: import("zod").ZodEnum<{
|
|
379
|
+
in_flight: "in_flight";
|
|
379
380
|
duplicate: "duplicate";
|
|
380
381
|
invalid_signature: "invalid_signature";
|
|
381
382
|
body_too_large: "body_too_large";
|
|
382
383
|
handler_failed: "handler_failed";
|
|
383
|
-
in_flight: "in_flight";
|
|
384
384
|
invalid_envelope: "invalid_envelope";
|
|
385
385
|
invalid_headers: "invalid_headers";
|
|
386
386
|
processed: "processed";
|
|
@@ -400,11 +400,11 @@ export type CallbackReceiverDisposition = z.infer<typeof callbackReceiverDisposi
|
|
|
400
400
|
*/
|
|
401
401
|
export declare const TEST_SINK_DISPOSITIONS: readonly ["body_too_large", "duplicate", "handler_failed", "in_flight", "invalid_envelope", "invalid_headers", "invalid_signature", "processed", "replay", "stale_timestamp", "connection_dropped"];
|
|
402
402
|
export declare const testSinkDispositionSchema: import("zod").ZodEnum<{
|
|
403
|
+
in_flight: "in_flight";
|
|
403
404
|
duplicate: "duplicate";
|
|
404
405
|
invalid_signature: "invalid_signature";
|
|
405
406
|
body_too_large: "body_too_large";
|
|
406
407
|
handler_failed: "handler_failed";
|
|
407
|
-
in_flight: "in_flight";
|
|
408
408
|
invalid_envelope: "invalid_envelope";
|
|
409
409
|
invalid_headers: "invalid_headers";
|
|
410
410
|
processed: "processed";
|
|
@@ -464,11 +464,11 @@ export declare const CALLBACK_RECEIVER_STATUS: {
|
|
|
464
464
|
*/
|
|
465
465
|
export declare const callbackReceiverAcknowledgementSchema: import("zod").ZodObject<{
|
|
466
466
|
disposition: import("zod").ZodEnum<{
|
|
467
|
+
in_flight: "in_flight";
|
|
467
468
|
duplicate: "duplicate";
|
|
468
469
|
invalid_signature: "invalid_signature";
|
|
469
470
|
body_too_large: "body_too_large";
|
|
470
471
|
handler_failed: "handler_failed";
|
|
471
|
-
in_flight: "in_flight";
|
|
472
472
|
invalid_envelope: "invalid_envelope";
|
|
473
473
|
invalid_headers: "invalid_headers";
|
|
474
474
|
processed: "processed";
|
|
@@ -642,11 +642,11 @@ export declare const testSinkDeliverySchema: import("zod").ZodObject<{
|
|
|
642
642
|
timeout: "timeout";
|
|
643
643
|
}>;
|
|
644
644
|
disposition: import("zod").ZodEnum<{
|
|
645
|
+
in_flight: "in_flight";
|
|
645
646
|
duplicate: "duplicate";
|
|
646
647
|
invalid_signature: "invalid_signature";
|
|
647
648
|
body_too_large: "body_too_large";
|
|
648
649
|
handler_failed: "handler_failed";
|
|
649
|
-
in_flight: "in_flight";
|
|
650
650
|
invalid_envelope: "invalid_envelope";
|
|
651
651
|
invalid_headers: "invalid_headers";
|
|
652
652
|
processed: "processed";
|
|
@@ -681,11 +681,11 @@ export declare const testSinkDeliveryPageSchema: import("zod").ZodObject<{
|
|
|
681
681
|
timeout: "timeout";
|
|
682
682
|
}>;
|
|
683
683
|
disposition: import("zod").ZodEnum<{
|
|
684
|
+
in_flight: "in_flight";
|
|
684
685
|
duplicate: "duplicate";
|
|
685
686
|
invalid_signature: "invalid_signature";
|
|
686
687
|
body_too_large: "body_too_large";
|
|
687
688
|
handler_failed: "handler_failed";
|
|
688
|
-
in_flight: "in_flight";
|
|
689
689
|
invalid_envelope: "invalid_envelope";
|
|
690
690
|
invalid_headers: "invalid_headers";
|
|
691
691
|
processed: "processed";
|
|
@@ -747,11 +747,11 @@ export declare const testSinkDeliveryBodySchema: import("zod").ZodObject<{
|
|
|
747
747
|
timeout: "timeout";
|
|
748
748
|
}>;
|
|
749
749
|
disposition: import("zod").ZodEnum<{
|
|
750
|
+
in_flight: "in_flight";
|
|
750
751
|
duplicate: "duplicate";
|
|
751
752
|
invalid_signature: "invalid_signature";
|
|
752
753
|
body_too_large: "body_too_large";
|
|
753
754
|
handler_failed: "handler_failed";
|
|
754
|
-
in_flight: "in_flight";
|
|
755
755
|
invalid_envelope: "invalid_envelope";
|
|
756
756
|
invalid_headers: "invalid_headers";
|
|
757
757
|
processed: "processed";
|
package/dist/usage.d.ts
CHANGED
|
@@ -73,8 +73,8 @@ export declare const USAGE_BOUNDS: {
|
|
|
73
73
|
export declare const BILLABLE_TERMINAL_STATES: readonly ["cancelled", "skipped_stale", "succeeded", "terminal_failed"];
|
|
74
74
|
export declare const billableTerminalStateSchema: import("zod").ZodEnum<{
|
|
75
75
|
succeeded: "succeeded";
|
|
76
|
-
cancelled: "cancelled";
|
|
77
76
|
terminal_failed: "terminal_failed";
|
|
77
|
+
cancelled: "cancelled";
|
|
78
78
|
skipped_stale: "skipped_stale";
|
|
79
79
|
}>;
|
|
80
80
|
export type BillableTerminalStateName = z.infer<typeof billableTerminalStateSchema>;
|
|
@@ -107,8 +107,8 @@ export declare const usageDaySchema: import("zod").ZodObject<{
|
|
|
107
107
|
billableOccurrences: import("zod").ZodNumber;
|
|
108
108
|
byTerminalState: import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
109
109
|
succeeded: "succeeded";
|
|
110
|
-
cancelled: "cancelled";
|
|
111
110
|
terminal_failed: "terminal_failed";
|
|
111
|
+
cancelled: "cancelled";
|
|
112
112
|
skipped_stale: "skipped_stale";
|
|
113
113
|
}> & import("zod/v4/core").$partial, import("zod").ZodNumber>;
|
|
114
114
|
start: import("zod").ZodString;
|
|
@@ -120,8 +120,8 @@ export declare const usageSchema: import("zod").ZodObject<{
|
|
|
120
120
|
billableOccurrences: import("zod").ZodNumber;
|
|
121
121
|
byTerminalState: import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
122
122
|
succeeded: "succeeded";
|
|
123
|
-
cancelled: "cancelled";
|
|
124
123
|
terminal_failed: "terminal_failed";
|
|
124
|
+
cancelled: "cancelled";
|
|
125
125
|
skipped_stale: "skipped_stale";
|
|
126
126
|
}> & import("zod/v4/core").$partial, import("zod").ZodNumber>;
|
|
127
127
|
start: import("zod").ZodString;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"attempt": {
|
|
5
|
+
"id": "att_01h8xyz9k2m4n6p8r0t2v4w6y8",
|
|
6
|
+
"attemptNumber": 1,
|
|
7
|
+
"occurrence": "occ_01h8xyz9k2m4n6p8r0t2v4w6y8",
|
|
8
|
+
"startedAt": "2026-07-28T15:00:00.000Z",
|
|
9
|
+
"state": "retryable_failure",
|
|
10
|
+
"classifiedAt": "2026-07-28T15:00:00.071Z",
|
|
11
|
+
"durationMs": 71,
|
|
12
|
+
"responseStatus": 503,
|
|
13
|
+
"diagnostic": "http_retryable",
|
|
14
|
+
"remediation": "review_retry_policy",
|
|
15
|
+
"trigger": {
|
|
16
|
+
"kind": "automatic"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"occurrence": {
|
|
20
|
+
"attemptCount": 2,
|
|
21
|
+
"generation": 1,
|
|
22
|
+
"id": "occ_01h8xyz9k2m4n6p8r0t2v4w6y8",
|
|
23
|
+
"plannedFor": "2026-07-28T14:50:00.000Z",
|
|
24
|
+
"schedule": "sch_01h8xyz9k2m4n6p8r0t2v4w6y8",
|
|
25
|
+
"sequence": 1,
|
|
26
|
+
"settledAt": "2026-07-28T15:00:04.000Z",
|
|
27
|
+
"state": "succeeded"
|
|
28
|
+
},
|
|
29
|
+
"schedule": {
|
|
30
|
+
"id": "sch_01h8xyz9k2m4n6p8r0t2v4w6y8",
|
|
31
|
+
"name": "Recovered delivery"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"freshness": {
|
|
36
|
+
"kind": "authoritative"
|
|
37
|
+
},
|
|
38
|
+
"retention": {
|
|
39
|
+
"from": "2026-07-21T15:00:00.000Z",
|
|
40
|
+
"detailsFrom": "2026-07-21T15:00:00.000Z"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "bjo_01h8xyz9k2m4n6p8r0t2v4w6y8",
|
|
3
|
+
"authority": {
|
|
4
|
+
"environment": "env_01h8xyz9k2m4n6p8r0t2v4w6y8",
|
|
5
|
+
"environmentKind": "test",
|
|
6
|
+
"organization": "org_01h8xyz9k2m4n6p8r0t2v4w6y8",
|
|
7
|
+
"project": "proj_01h8xyz9k2m4n6p8r0t2v4w6y8"
|
|
8
|
+
},
|
|
9
|
+
"intent": {
|
|
10
|
+
"target": "schedules",
|
|
11
|
+
"selection": {
|
|
12
|
+
"kind": "all_matching",
|
|
13
|
+
"resource": "schedules",
|
|
14
|
+
"filter": {
|
|
15
|
+
"tag": "reminders"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"operation": "pause",
|
|
19
|
+
"parameters": {}
|
|
20
|
+
},
|
|
21
|
+
"state": "cancelled",
|
|
22
|
+
"version": 1,
|
|
23
|
+
"createdAt": "2035-06-01T00:00:00.000Z",
|
|
24
|
+
"updatedAt": "2035-06-01T00:00:00.000Z",
|
|
25
|
+
"referenceAt": "2035-06-01T00:00:00.000Z",
|
|
26
|
+
"preparationExpiresAt": "2035-06-08T00:00:00.000Z",
|
|
27
|
+
"previewExpiresAt": "2035-06-01T00:05:00.000Z",
|
|
28
|
+
"intentDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
29
|
+
"complete": true,
|
|
30
|
+
"counts": {
|
|
31
|
+
"matched": 0,
|
|
32
|
+
"eligible": 0,
|
|
33
|
+
"ineligible": 0,
|
|
34
|
+
"pending": 0,
|
|
35
|
+
"running": 0,
|
|
36
|
+
"succeeded": 0,
|
|
37
|
+
"noOp": 0,
|
|
38
|
+
"skipped": 0,
|
|
39
|
+
"conflicted": 0,
|
|
40
|
+
"failed": 0,
|
|
41
|
+
"cancelled": 0
|
|
42
|
+
},
|
|
43
|
+
"reasons": [],
|
|
44
|
+
"warnings": [],
|
|
45
|
+
"samples": [],
|
|
46
|
+
"limits": {
|
|
47
|
+
"maxTargets": 100000,
|
|
48
|
+
"executionLifetimeSeconds": 604800,
|
|
49
|
+
"previewLifetimeSeconds": 300,
|
|
50
|
+
"resultRetentionSeconds": 1209600,
|
|
51
|
+
"batchSize": 25,
|
|
52
|
+
"workerConcurrency": 1
|
|
53
|
+
},
|
|
54
|
+
"billing": {
|
|
55
|
+
"additionalAttemptsMinimum": 0,
|
|
56
|
+
"exactChargeKnown": false,
|
|
57
|
+
"note": "Ordinary per-attempt billing and quota admission apply; preview creates no delivery or charge."
|
|
58
|
+
}
|
|
59
|
+
}
|