@greatwait/contracts 0.1.0-alpha.6 → 0.1.0-alpha.8
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/README.md +1 -1
- package/dist/attempt-diagnostics.d.ts +8 -0
- package/dist/attempt-diagnostics.js +68 -0
- package/dist/billing.d.ts +12 -10
- package/dist/billing.js +14 -4
- package/dist/delivery.d.ts +17 -40
- package/dist/delivery.js +12 -37
- package/dist/effective-limits.d.ts +4 -4
- package/dist/endpoints.d.ts +6 -6
- package/dist/first-value-journey.js +4 -4
- package/dist/identity.d.ts +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/members.d.ts +4 -4
- package/dist/operations.d.ts +338 -103
- package/dist/operations.js +3 -1
- package/dist/policy.d.ts +5 -4
- package/dist/policy.js +5 -4
- package/dist/project-notifications.d.ts +238 -0
- package/dist/project-notifications.js +236 -0
- package/dist/scheduling-records.d.ts +112 -8
- package/dist/scheduling.d.ts +253 -22
- package/dist/scheduling.js +51 -9
- package/dist/signatures.d.ts +1 -1
- package/dist/test-sink.d.ts +27 -41
- package/dist/test-sink.js +12 -31
- package/dist/workspace.d.ts +4 -4
- package/generated/v1/callback-receiver.json +4 -4
- package/generated/v1/examples/projectnotifications.read.response.json +12 -0
- package/generated/v1/examples/projectnotifications.rotateSigningKey.request.json +3 -0
- package/generated/v1/examples/projectnotifications.rotateSigningKey.response.json +25 -0
- package/generated/v1/examples/projectnotifications.update.request.json +10 -0
- package/generated/v1/examples/projectnotifications.update.response.json +12 -0
- package/generated/v1/examples/statusdeliveries.list.response.json +3 -0
- package/generated/v1/first-value-journey.json +4 -4
- package/generated/v1/manifest.json +110 -1
- package/generated/v1/openapi.json +3655 -333
- package/generated/v1/policy-matrix.json +28 -0
- package/generated/v1/schemas/attempts.list.response.json +105 -0
- package/generated/v1/schemas/attempts.read.response.json +105 -0
- package/generated/v1/schemas/billing.notices.response.json +17 -6
- package/generated/v1/schemas/billing.purchase.request.json +4 -0
- package/generated/v1/schemas/occurrences.redeliver.response.json +105 -0
- package/generated/v1/schemas/projectnotifications.read.response.json +101 -0
- package/generated/v1/schemas/projectnotifications.rotateSigningKey.request.json +13 -0
- package/generated/v1/schemas/projectnotifications.rotateSigningKey.response.json +119 -0
- package/generated/v1/schemas/projectnotifications.update.request-headers.json +13 -0
- package/generated/v1/schemas/projectnotifications.update.request.json +90 -0
- package/generated/v1/schemas/projectnotifications.update.response.json +101 -0
- package/generated/v1/schemas/schedules.archive.response.json +50 -0
- package/generated/v1/schemas/schedules.cancel.response.json +50 -0
- package/generated/v1/schemas/schedules.create.request.json +14 -0
- package/generated/v1/schemas/schedules.create.response.json +50 -0
- package/generated/v1/schemas/schedules.list.response.json +50 -0
- package/generated/v1/schemas/schedules.pause.response.json +50 -0
- package/generated/v1/schemas/schedules.read.response.json +50 -0
- package/generated/v1/schemas/schedules.replace.request.json +14 -0
- package/generated/v1/schemas/schedules.replace.response.json +50 -0
- package/generated/v1/schemas/schedules.resume.response.json +50 -0
- package/generated/v1/schemas/statusdeliveries.list.query.json +16 -0
- package/generated/v1/schemas/statusdeliveries.list.response.json +82 -0
- package/generated/v1/snippets/projectnotifications.read.json +6 -0
- package/generated/v1/snippets/projectnotifications.rotateSigningKey.json +6 -0
- package/generated/v1/snippets/projectnotifications.update.json +6 -0
- package/generated/v1/snippets/statusdeliveries.list.json +6 -0
- package/package.json +1 -1
package/dist/scheduling.d.ts
CHANGED
|
@@ -36,12 +36,23 @@ import { type CallbackTrigger, type ResponseClass } from "./signatures.js";
|
|
|
36
36
|
*/
|
|
37
37
|
export declare const SCHEDULE_STATUSES: readonly ["active", "paused", "cancelled", "completed"];
|
|
38
38
|
export declare const scheduleStatusSchema: import("zod").ZodEnum<{
|
|
39
|
-
active: "active";
|
|
40
|
-
completed: "completed";
|
|
41
39
|
paused: "paused";
|
|
40
|
+
active: "active";
|
|
42
41
|
cancelled: "cancelled";
|
|
42
|
+
completed: "completed";
|
|
43
43
|
}>;
|
|
44
44
|
export type ScheduleStatus = z.infer<typeof scheduleStatusSchema>;
|
|
45
|
+
/** A recurring schedule pauses after this many failed runs; "never" disables it. */
|
|
46
|
+
export declare const DEFAULT_AUTO_PAUSE_AFTER_FAILURES = 5;
|
|
47
|
+
export declare const autoPauseAfterFailuresSchema: import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<"never">]>;
|
|
48
|
+
export type AutoPauseAfterFailures = z.infer<typeof autoPauseAfterFailuresSchema>;
|
|
49
|
+
export declare const autoPauseReasonSchema: import("zod").ZodObject<{
|
|
50
|
+
failedRuns: import("zod").ZodNumber;
|
|
51
|
+
status: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
52
|
+
diagnostic: import("zod").ZodString;
|
|
53
|
+
pausedAt: import("zod").ZodString;
|
|
54
|
+
}, import("zod/v4/core").$strip>;
|
|
55
|
+
export type AutoPauseReason = z.infer<typeof autoPauseReasonSchema>;
|
|
45
56
|
/**
|
|
46
57
|
* The statuses a schedule never leaves, and from which it never fires again on
|
|
47
58
|
* its own.
|
|
@@ -337,9 +348,9 @@ export type PartitionKey = z.infer<typeof partitionKeySchema>;
|
|
|
337
348
|
*/
|
|
338
349
|
export declare const OCCURRENCE_STATES: readonly ["planned", "due", "dispatching", "retry_wait", "ambiguous", "succeeded", "terminal_failed", "cancelled", "skipped_stale"];
|
|
339
350
|
export declare const occurrenceStateSchema: import("zod").ZodEnum<{
|
|
340
|
-
due: "due";
|
|
341
351
|
succeeded: "succeeded";
|
|
342
352
|
ambiguous: "ambiguous";
|
|
353
|
+
due: "due";
|
|
343
354
|
cancelled: "cancelled";
|
|
344
355
|
planned: "planned";
|
|
345
356
|
dispatching: "dispatching";
|
|
@@ -362,9 +373,9 @@ export declare const projectOccurrenceListRequestSchema: import("zod").ZodObject
|
|
|
362
373
|
endpoint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
363
374
|
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
364
375
|
outcome: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
365
|
-
due: "due";
|
|
366
376
|
succeeded: "succeeded";
|
|
367
377
|
ambiguous: "ambiguous";
|
|
378
|
+
due: "due";
|
|
368
379
|
cancelled: "cancelled";
|
|
369
380
|
planned: "planned";
|
|
370
381
|
dispatching: "dispatching";
|
|
@@ -423,8 +434,8 @@ export type AttemptState = z.infer<typeof attemptStateSchema>;
|
|
|
423
434
|
/** Safe diagnostic codes produced by the W3-03 delivery classifier. */
|
|
424
435
|
export declare const attemptDiagnosticSchema: import("zod").ZodEnum<{
|
|
425
436
|
rate_limited: "rate_limited";
|
|
426
|
-
delivered: "delivered";
|
|
427
437
|
completion_timed_out: "completion_timed_out";
|
|
438
|
+
delivered: "delivered";
|
|
428
439
|
duplicate_inflight: "duplicate_inflight";
|
|
429
440
|
endpoint_unavailable: "endpoint_unavailable";
|
|
430
441
|
endpoint_unsafe: "endpoint_unsafe";
|
|
@@ -709,6 +720,14 @@ export declare function defaultLatenessPolicyForRecurrence(kind: Recurrence["kin
|
|
|
709
720
|
export declare const SCHEDULE_NAME_MAX_LENGTH = 120;
|
|
710
721
|
export declare const scheduleNameSchema: import("zod").ZodString;
|
|
711
722
|
export declare const scheduleSchema: import("zod").ZodObject<{
|
|
723
|
+
autoPauseAfterFailures: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<"never">]>>;
|
|
724
|
+
consecutiveFailedRuns: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
725
|
+
autoPauseReason: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
726
|
+
failedRuns: import("zod").ZodNumber;
|
|
727
|
+
status: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
728
|
+
diagnostic: import("zod").ZodString;
|
|
729
|
+
pausedAt: import("zod").ZodString;
|
|
730
|
+
}, import("zod/v4/core").$strip>>>;
|
|
712
731
|
http: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
713
732
|
method: import("zod").ZodEnum<{
|
|
714
733
|
POST: "POST";
|
|
@@ -780,10 +799,10 @@ export declare const scheduleSchema: import("zod").ZodObject<{
|
|
|
780
799
|
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
781
800
|
}, import("zod/v4/core").$strip>], "kind">;
|
|
782
801
|
status: import("zod").ZodEnum<{
|
|
783
|
-
active: "active";
|
|
784
|
-
completed: "completed";
|
|
785
802
|
paused: "paused";
|
|
803
|
+
active: "active";
|
|
786
804
|
cancelled: "cancelled";
|
|
805
|
+
completed: "completed";
|
|
787
806
|
}>;
|
|
788
807
|
updatedAt: import("zod").ZodString;
|
|
789
808
|
version: import("zod").ZodNumber;
|
|
@@ -801,6 +820,14 @@ export type Schedule = z.infer<typeof scheduleSchema>;
|
|
|
801
820
|
*/
|
|
802
821
|
export declare const schedulePageSchema: import("zod").ZodObject<{
|
|
803
822
|
data: import("zod").ZodArray<import("zod").ZodObject<{
|
|
823
|
+
autoPauseAfterFailures: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<"never">]>>;
|
|
824
|
+
consecutiveFailedRuns: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
825
|
+
autoPauseReason: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
826
|
+
failedRuns: import("zod").ZodNumber;
|
|
827
|
+
status: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
828
|
+
diagnostic: import("zod").ZodString;
|
|
829
|
+
pausedAt: import("zod").ZodString;
|
|
830
|
+
}, import("zod/v4/core").$strip>>>;
|
|
804
831
|
http: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
805
832
|
method: import("zod").ZodEnum<{
|
|
806
833
|
POST: "POST";
|
|
@@ -872,10 +899,10 @@ export declare const schedulePageSchema: import("zod").ZodObject<{
|
|
|
872
899
|
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
873
900
|
}, import("zod/v4/core").$strip>], "kind">;
|
|
874
901
|
status: import("zod").ZodEnum<{
|
|
875
|
-
active: "active";
|
|
876
|
-
completed: "completed";
|
|
877
902
|
paused: "paused";
|
|
903
|
+
active: "active";
|
|
878
904
|
cancelled: "cancelled";
|
|
905
|
+
completed: "completed";
|
|
879
906
|
}>;
|
|
880
907
|
updatedAt: import("zod").ZodString;
|
|
881
908
|
version: import("zod").ZodNumber;
|
|
@@ -906,9 +933,9 @@ export declare const occurrenceSchema: import("zod").ZodObject<{
|
|
|
906
933
|
sequence: import("zod").ZodNumber;
|
|
907
934
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
908
935
|
state: import("zod").ZodEnum<{
|
|
909
|
-
due: "due";
|
|
910
936
|
succeeded: "succeeded";
|
|
911
937
|
ambiguous: "ambiguous";
|
|
938
|
+
due: "due";
|
|
912
939
|
cancelled: "cancelled";
|
|
913
940
|
planned: "planned";
|
|
914
941
|
dispatching: "dispatching";
|
|
@@ -976,6 +1003,61 @@ export declare const attemptFailureSnippetSchema: import("zod").ZodObject<{
|
|
|
976
1003
|
truncated: import("zod").ZodBoolean;
|
|
977
1004
|
}, import("zod/v4/core").$strip>;
|
|
978
1005
|
export type AttemptFailureSnippet = z.infer<typeof attemptFailureSnippetSchema>;
|
|
1006
|
+
/** Stored diagnostic content, available only under the attempt's verified authority. */
|
|
1007
|
+
export declare const attemptCapturedBodySchema: import("zod").ZodObject<{
|
|
1008
|
+
contentType: import("zod").ZodString;
|
|
1009
|
+
encoding: import("zod").ZodEnum<{
|
|
1010
|
+
utf8: "utf8";
|
|
1011
|
+
base64: "base64";
|
|
1012
|
+
}>;
|
|
1013
|
+
content: import("zod").ZodString;
|
|
1014
|
+
capturedBytes: import("zod").ZodInt;
|
|
1015
|
+
originalBytes: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
1016
|
+
truncated: import("zod").ZodBoolean;
|
|
1017
|
+
redacted: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1018
|
+
incomplete: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1019
|
+
}, import("zod/v4/core").$strip>;
|
|
1020
|
+
export declare const attemptResponseSchema: import("zod").ZodObject<{
|
|
1021
|
+
statusText: import("zod").ZodString;
|
|
1022
|
+
headers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1023
|
+
name: import("zod").ZodString;
|
|
1024
|
+
value: import("zod").ZodString;
|
|
1025
|
+
}, import("zod/v4/core").$strip>>;
|
|
1026
|
+
bodyState: import("zod").ZodEnum<{
|
|
1027
|
+
captured: "captured";
|
|
1028
|
+
empty: "empty";
|
|
1029
|
+
expired: "expired";
|
|
1030
|
+
not_captured: "not_captured";
|
|
1031
|
+
}>;
|
|
1032
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1033
|
+
contentType: import("zod").ZodString;
|
|
1034
|
+
encoding: import("zod").ZodEnum<{
|
|
1035
|
+
utf8: "utf8";
|
|
1036
|
+
base64: "base64";
|
|
1037
|
+
}>;
|
|
1038
|
+
content: import("zod").ZodString;
|
|
1039
|
+
capturedBytes: import("zod").ZodInt;
|
|
1040
|
+
originalBytes: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
1041
|
+
truncated: import("zod").ZodBoolean;
|
|
1042
|
+
redacted: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1043
|
+
incomplete: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1044
|
+
}, import("zod/v4/core").$strip>>;
|
|
1045
|
+
}, import("zod/v4/core").$strip>;
|
|
1046
|
+
export type AttemptResponse = z.infer<typeof attemptResponseSchema>;
|
|
1047
|
+
export declare const attemptRequestSchema: import("zod").ZodObject<{
|
|
1048
|
+
method: import("zod").ZodEnum<{
|
|
1049
|
+
POST: "POST";
|
|
1050
|
+
PUT: "PUT";
|
|
1051
|
+
GET: "GET";
|
|
1052
|
+
}>;
|
|
1053
|
+
url: import("zod").ZodString;
|
|
1054
|
+
headers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1055
|
+
name: import("zod").ZodString;
|
|
1056
|
+
value: import("zod").ZodString;
|
|
1057
|
+
}, import("zod/v4/core").$strip>>;
|
|
1058
|
+
body: import("zod").ZodString;
|
|
1059
|
+
}, import("zod/v4/core").$strip>;
|
|
1060
|
+
export type AttemptRequest = z.infer<typeof attemptRequestSchema>;
|
|
979
1061
|
export declare const attemptSchema: import("zod").ZodObject<{
|
|
980
1062
|
id: import("zod").ZodString;
|
|
981
1063
|
localReceiptRecoveries: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
@@ -995,6 +1077,50 @@ export declare const attemptSchema: import("zod").ZodObject<{
|
|
|
995
1077
|
text: import("zod").ZodString;
|
|
996
1078
|
truncated: import("zod").ZodBoolean;
|
|
997
1079
|
}, import("zod/v4/core").$strip>>;
|
|
1080
|
+
response: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1081
|
+
statusText: import("zod").ZodString;
|
|
1082
|
+
headers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1083
|
+
name: import("zod").ZodString;
|
|
1084
|
+
value: import("zod").ZodString;
|
|
1085
|
+
}, import("zod/v4/core").$strip>>;
|
|
1086
|
+
bodyState: import("zod").ZodEnum<{
|
|
1087
|
+
captured: "captured";
|
|
1088
|
+
empty: "empty";
|
|
1089
|
+
expired: "expired";
|
|
1090
|
+
not_captured: "not_captured";
|
|
1091
|
+
}>;
|
|
1092
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1093
|
+
contentType: import("zod").ZodString;
|
|
1094
|
+
encoding: import("zod").ZodEnum<{
|
|
1095
|
+
utf8: "utf8";
|
|
1096
|
+
base64: "base64";
|
|
1097
|
+
}>;
|
|
1098
|
+
content: import("zod").ZodString;
|
|
1099
|
+
capturedBytes: import("zod").ZodInt;
|
|
1100
|
+
originalBytes: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
1101
|
+
truncated: import("zod").ZodBoolean;
|
|
1102
|
+
redacted: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1103
|
+
incomplete: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1104
|
+
}, import("zod/v4/core").$strip>>;
|
|
1105
|
+
}, import("zod/v4/core").$strip>>;
|
|
1106
|
+
request: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1107
|
+
method: import("zod").ZodEnum<{
|
|
1108
|
+
POST: "POST";
|
|
1109
|
+
PUT: "PUT";
|
|
1110
|
+
GET: "GET";
|
|
1111
|
+
}>;
|
|
1112
|
+
url: import("zod").ZodString;
|
|
1113
|
+
headers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1114
|
+
name: import("zod").ZodString;
|
|
1115
|
+
value: import("zod").ZodString;
|
|
1116
|
+
}, import("zod/v4/core").$strip>>;
|
|
1117
|
+
body: import("zod").ZodString;
|
|
1118
|
+
}, import("zod/v4/core").$strip>>;
|
|
1119
|
+
requestState: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1120
|
+
captured: "captured";
|
|
1121
|
+
expired: "expired";
|
|
1122
|
+
not_captured: "not_captured";
|
|
1123
|
+
}>>;
|
|
998
1124
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
999
1125
|
name: import("zod").ZodString;
|
|
1000
1126
|
value: import("zod").ZodString;
|
|
@@ -1027,8 +1153,8 @@ export declare const attemptSchema: import("zod").ZodObject<{
|
|
|
1027
1153
|
delivery: import("zod").ZodString;
|
|
1028
1154
|
diagnostic: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1029
1155
|
rate_limited: "rate_limited";
|
|
1030
|
-
delivered: "delivered";
|
|
1031
1156
|
completion_timed_out: "completion_timed_out";
|
|
1157
|
+
delivered: "delivered";
|
|
1032
1158
|
duplicate_inflight: "duplicate_inflight";
|
|
1033
1159
|
endpoint_unavailable: "endpoint_unavailable";
|
|
1034
1160
|
endpoint_unsafe: "endpoint_unsafe";
|
|
@@ -1053,9 +1179,9 @@ export declare const occurrencePageSchema: import("zod").ZodObject<{
|
|
|
1053
1179
|
sequence: import("zod").ZodNumber;
|
|
1054
1180
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1055
1181
|
state: import("zod").ZodEnum<{
|
|
1056
|
-
due: "due";
|
|
1057
1182
|
succeeded: "succeeded";
|
|
1058
1183
|
ambiguous: "ambiguous";
|
|
1184
|
+
due: "due";
|
|
1059
1185
|
cancelled: "cancelled";
|
|
1060
1186
|
planned: "planned";
|
|
1061
1187
|
dispatching: "dispatching";
|
|
@@ -1090,9 +1216,9 @@ export declare const projectOccurrencePageSchema: import("zod").ZodObject<{
|
|
|
1090
1216
|
sequence: import("zod").ZodNumber;
|
|
1091
1217
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1092
1218
|
state: import("zod").ZodEnum<{
|
|
1093
|
-
due: "due";
|
|
1094
1219
|
succeeded: "succeeded";
|
|
1095
1220
|
ambiguous: "ambiguous";
|
|
1221
|
+
due: "due";
|
|
1096
1222
|
cancelled: "cancelled";
|
|
1097
1223
|
planned: "planned";
|
|
1098
1224
|
dispatching: "dispatching";
|
|
@@ -1133,9 +1259,9 @@ export declare const occurrenceViewSchema: import("zod").ZodObject<{
|
|
|
1133
1259
|
sequence: import("zod").ZodNumber;
|
|
1134
1260
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1135
1261
|
state: import("zod").ZodEnum<{
|
|
1136
|
-
due: "due";
|
|
1137
1262
|
succeeded: "succeeded";
|
|
1138
1263
|
ambiguous: "ambiguous";
|
|
1264
|
+
due: "due";
|
|
1139
1265
|
cancelled: "cancelled";
|
|
1140
1266
|
planned: "planned";
|
|
1141
1267
|
dispatching: "dispatching";
|
|
@@ -1177,6 +1303,50 @@ export declare const attemptPageSchema: import("zod").ZodObject<{
|
|
|
1177
1303
|
text: import("zod").ZodString;
|
|
1178
1304
|
truncated: import("zod").ZodBoolean;
|
|
1179
1305
|
}, import("zod/v4/core").$strip>>;
|
|
1306
|
+
response: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1307
|
+
statusText: import("zod").ZodString;
|
|
1308
|
+
headers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1309
|
+
name: import("zod").ZodString;
|
|
1310
|
+
value: import("zod").ZodString;
|
|
1311
|
+
}, import("zod/v4/core").$strip>>;
|
|
1312
|
+
bodyState: import("zod").ZodEnum<{
|
|
1313
|
+
captured: "captured";
|
|
1314
|
+
empty: "empty";
|
|
1315
|
+
expired: "expired";
|
|
1316
|
+
not_captured: "not_captured";
|
|
1317
|
+
}>;
|
|
1318
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1319
|
+
contentType: import("zod").ZodString;
|
|
1320
|
+
encoding: import("zod").ZodEnum<{
|
|
1321
|
+
utf8: "utf8";
|
|
1322
|
+
base64: "base64";
|
|
1323
|
+
}>;
|
|
1324
|
+
content: import("zod").ZodString;
|
|
1325
|
+
capturedBytes: import("zod").ZodInt;
|
|
1326
|
+
originalBytes: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
1327
|
+
truncated: import("zod").ZodBoolean;
|
|
1328
|
+
redacted: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1329
|
+
incomplete: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1330
|
+
}, import("zod/v4/core").$strip>>;
|
|
1331
|
+
}, import("zod/v4/core").$strip>>;
|
|
1332
|
+
request: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1333
|
+
method: import("zod").ZodEnum<{
|
|
1334
|
+
POST: "POST";
|
|
1335
|
+
PUT: "PUT";
|
|
1336
|
+
GET: "GET";
|
|
1337
|
+
}>;
|
|
1338
|
+
url: import("zod").ZodString;
|
|
1339
|
+
headers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1340
|
+
name: import("zod").ZodString;
|
|
1341
|
+
value: import("zod").ZodString;
|
|
1342
|
+
}, import("zod/v4/core").$strip>>;
|
|
1343
|
+
body: import("zod").ZodString;
|
|
1344
|
+
}, import("zod/v4/core").$strip>>;
|
|
1345
|
+
requestState: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1346
|
+
captured: "captured";
|
|
1347
|
+
expired: "expired";
|
|
1348
|
+
not_captured: "not_captured";
|
|
1349
|
+
}>>;
|
|
1180
1350
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1181
1351
|
name: import("zod").ZodString;
|
|
1182
1352
|
value: import("zod").ZodString;
|
|
@@ -1209,8 +1379,8 @@ export declare const attemptPageSchema: import("zod").ZodObject<{
|
|
|
1209
1379
|
delivery: import("zod").ZodString;
|
|
1210
1380
|
diagnostic: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1211
1381
|
rate_limited: "rate_limited";
|
|
1212
|
-
delivered: "delivered";
|
|
1213
1382
|
completion_timed_out: "completion_timed_out";
|
|
1383
|
+
delivered: "delivered";
|
|
1214
1384
|
duplicate_inflight: "duplicate_inflight";
|
|
1215
1385
|
endpoint_unavailable: "endpoint_unavailable";
|
|
1216
1386
|
endpoint_unsafe: "endpoint_unsafe";
|
|
@@ -1251,6 +1421,50 @@ export declare const attemptViewSchema: import("zod").ZodObject<{
|
|
|
1251
1421
|
text: import("zod").ZodString;
|
|
1252
1422
|
truncated: import("zod").ZodBoolean;
|
|
1253
1423
|
}, import("zod/v4/core").$strip>>;
|
|
1424
|
+
response: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1425
|
+
statusText: import("zod").ZodString;
|
|
1426
|
+
headers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1427
|
+
name: import("zod").ZodString;
|
|
1428
|
+
value: import("zod").ZodString;
|
|
1429
|
+
}, import("zod/v4/core").$strip>>;
|
|
1430
|
+
bodyState: import("zod").ZodEnum<{
|
|
1431
|
+
captured: "captured";
|
|
1432
|
+
empty: "empty";
|
|
1433
|
+
expired: "expired";
|
|
1434
|
+
not_captured: "not_captured";
|
|
1435
|
+
}>;
|
|
1436
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1437
|
+
contentType: import("zod").ZodString;
|
|
1438
|
+
encoding: import("zod").ZodEnum<{
|
|
1439
|
+
utf8: "utf8";
|
|
1440
|
+
base64: "base64";
|
|
1441
|
+
}>;
|
|
1442
|
+
content: import("zod").ZodString;
|
|
1443
|
+
capturedBytes: import("zod").ZodInt;
|
|
1444
|
+
originalBytes: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
1445
|
+
truncated: import("zod").ZodBoolean;
|
|
1446
|
+
redacted: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1447
|
+
incomplete: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1448
|
+
}, import("zod/v4/core").$strip>>;
|
|
1449
|
+
}, import("zod/v4/core").$strip>>;
|
|
1450
|
+
request: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1451
|
+
method: import("zod").ZodEnum<{
|
|
1452
|
+
POST: "POST";
|
|
1453
|
+
PUT: "PUT";
|
|
1454
|
+
GET: "GET";
|
|
1455
|
+
}>;
|
|
1456
|
+
url: import("zod").ZodString;
|
|
1457
|
+
headers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1458
|
+
name: import("zod").ZodString;
|
|
1459
|
+
value: import("zod").ZodString;
|
|
1460
|
+
}, import("zod/v4/core").$strip>>;
|
|
1461
|
+
body: import("zod").ZodString;
|
|
1462
|
+
}, import("zod/v4/core").$strip>>;
|
|
1463
|
+
requestState: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1464
|
+
captured: "captured";
|
|
1465
|
+
expired: "expired";
|
|
1466
|
+
not_captured: "not_captured";
|
|
1467
|
+
}>>;
|
|
1254
1468
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1255
1469
|
name: import("zod").ZodString;
|
|
1256
1470
|
value: import("zod").ZodString;
|
|
@@ -1283,8 +1497,8 @@ export declare const attemptViewSchema: import("zod").ZodObject<{
|
|
|
1283
1497
|
delivery: import("zod").ZodString;
|
|
1284
1498
|
diagnostic: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1285
1499
|
rate_limited: "rate_limited";
|
|
1286
|
-
delivered: "delivered";
|
|
1287
1500
|
completion_timed_out: "completion_timed_out";
|
|
1501
|
+
delivered: "delivered";
|
|
1288
1502
|
duplicate_inflight: "duplicate_inflight";
|
|
1289
1503
|
endpoint_unavailable: "endpoint_unavailable";
|
|
1290
1504
|
endpoint_unsafe: "endpoint_unsafe";
|
|
@@ -1320,9 +1534,9 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1320
1534
|
sequence: import("zod").ZodNumber;
|
|
1321
1535
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1322
1536
|
state: import("zod").ZodEnum<{
|
|
1323
|
-
due: "due";
|
|
1324
1537
|
succeeded: "succeeded";
|
|
1325
1538
|
ambiguous: "ambiguous";
|
|
1539
|
+
due: "due";
|
|
1326
1540
|
cancelled: "cancelled";
|
|
1327
1541
|
planned: "planned";
|
|
1328
1542
|
dispatching: "dispatching";
|
|
@@ -1342,6 +1556,14 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1342
1556
|
attemptCount: import("zod").ZodNumber;
|
|
1343
1557
|
}, import("zod/v4/core").$strip>;
|
|
1344
1558
|
schedule: import("zod").ZodObject<{
|
|
1559
|
+
autoPauseAfterFailures: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<"never">]>>;
|
|
1560
|
+
consecutiveFailedRuns: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1561
|
+
autoPauseReason: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
1562
|
+
failedRuns: import("zod").ZodNumber;
|
|
1563
|
+
status: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1564
|
+
diagnostic: import("zod").ZodString;
|
|
1565
|
+
pausedAt: import("zod").ZodString;
|
|
1566
|
+
}, import("zod/v4/core").$strip>>>;
|
|
1345
1567
|
http: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1346
1568
|
method: import("zod").ZodEnum<{
|
|
1347
1569
|
POST: "POST";
|
|
@@ -1413,10 +1635,10 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1413
1635
|
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
1414
1636
|
}, import("zod/v4/core").$strip>], "kind">;
|
|
1415
1637
|
status: import("zod").ZodEnum<{
|
|
1416
|
-
active: "active";
|
|
1417
|
-
completed: "completed";
|
|
1418
1638
|
paused: "paused";
|
|
1639
|
+
active: "active";
|
|
1419
1640
|
cancelled: "cancelled";
|
|
1641
|
+
completed: "completed";
|
|
1420
1642
|
}>;
|
|
1421
1643
|
updatedAt: import("zod").ZodString;
|
|
1422
1644
|
version: import("zod").ZodNumber;
|
|
@@ -1438,9 +1660,9 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1438
1660
|
sequence: import("zod").ZodNumber;
|
|
1439
1661
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1440
1662
|
state: import("zod").ZodEnum<{
|
|
1441
|
-
due: "due";
|
|
1442
1663
|
succeeded: "succeeded";
|
|
1443
1664
|
ambiguous: "ambiguous";
|
|
1665
|
+
due: "due";
|
|
1444
1666
|
cancelled: "cancelled";
|
|
1445
1667
|
planned: "planned";
|
|
1446
1668
|
dispatching: "dispatching";
|
|
@@ -1460,6 +1682,14 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1460
1682
|
attemptCount: import("zod").ZodNumber;
|
|
1461
1683
|
}, import("zod/v4/core").$strip>;
|
|
1462
1684
|
schedule: import("zod").ZodObject<{
|
|
1685
|
+
autoPauseAfterFailures: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<"never">]>>;
|
|
1686
|
+
consecutiveFailedRuns: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1687
|
+
autoPauseReason: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
1688
|
+
failedRuns: import("zod").ZodNumber;
|
|
1689
|
+
status: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1690
|
+
diagnostic: import("zod").ZodString;
|
|
1691
|
+
pausedAt: import("zod").ZodString;
|
|
1692
|
+
}, import("zod/v4/core").$strip>>>;
|
|
1463
1693
|
http: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1464
1694
|
method: import("zod").ZodEnum<{
|
|
1465
1695
|
POST: "POST";
|
|
@@ -1531,10 +1761,10 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1531
1761
|
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
1532
1762
|
}, import("zod/v4/core").$strip>], "kind">;
|
|
1533
1763
|
status: import("zod").ZodEnum<{
|
|
1534
|
-
active: "active";
|
|
1535
|
-
completed: "completed";
|
|
1536
1764
|
paused: "paused";
|
|
1765
|
+
active: "active";
|
|
1537
1766
|
cancelled: "cancelled";
|
|
1767
|
+
completed: "completed";
|
|
1538
1768
|
}>;
|
|
1539
1769
|
updatedAt: import("zod").ZodString;
|
|
1540
1770
|
version: import("zod").ZodNumber;
|
|
@@ -1571,6 +1801,7 @@ export declare const RECURRENCE_REQUEST_FIELDS: readonly ["at", "cron", "delaySe
|
|
|
1571
1801
|
* a customer named is the worst kind of helpful.
|
|
1572
1802
|
*/
|
|
1573
1803
|
export declare const scheduleRequestSchema: import("zod").ZodObject<{
|
|
1804
|
+
autoPauseAfterFailures: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<"never">]>>;
|
|
1574
1805
|
http: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1575
1806
|
method: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1576
1807
|
POST: "POST";
|
package/dist/scheduling.js
CHANGED
|
@@ -49,6 +49,17 @@ export const SCHEDULE_STATUSES = [
|
|
|
49
49
|
"completed",
|
|
50
50
|
];
|
|
51
51
|
export const scheduleStatusSchema = z.enum(SCHEDULE_STATUSES);
|
|
52
|
+
/** A recurring schedule pauses after this many failed runs; "never" disables it. */
|
|
53
|
+
export const DEFAULT_AUTO_PAUSE_AFTER_FAILURES = 5;
|
|
54
|
+
export const autoPauseAfterFailuresSchema = z
|
|
55
|
+
.union([z.number().int().min(1).max(100), z.literal("never")])
|
|
56
|
+
.describe('Consecutive failed runs before automatic pause: 1–100 or "never". Defaults to 5 on create; omission on replace preserves the setting. One-shot schedules are unaffected.');
|
|
57
|
+
export const autoPauseReasonSchema = z.object({
|
|
58
|
+
failedRuns: z.number().int().positive(),
|
|
59
|
+
status: z.number().int().min(100).max(599).optional(),
|
|
60
|
+
diagnostic: z.string().max(500),
|
|
61
|
+
pausedAt: timestampSchema,
|
|
62
|
+
});
|
|
52
63
|
/**
|
|
53
64
|
* The statuses a schedule never leaves, and from which it never fires again on
|
|
54
65
|
* its own.
|
|
@@ -820,6 +831,9 @@ export const scheduleNameSchema = z
|
|
|
820
831
|
.min(1, "must not be blank")
|
|
821
832
|
.max(SCHEDULE_NAME_MAX_LENGTH, `must be at most ${String(SCHEDULE_NAME_MAX_LENGTH)} characters`);
|
|
822
833
|
export const scheduleSchema = z.object({
|
|
834
|
+
autoPauseAfterFailures: autoPauseAfterFailuresSchema.optional(),
|
|
835
|
+
consecutiveFailedRuns: z.number().int().nonnegative().optional(),
|
|
836
|
+
autoPauseReason: autoPauseReasonSchema.nullable().optional(),
|
|
823
837
|
http: publicHttpRequestSchema.optional(),
|
|
824
838
|
/**
|
|
825
839
|
* When the schedule was filed away, and absent until it is.
|
|
@@ -1065,6 +1079,30 @@ export const attemptFailureSnippetSchema = z.object({
|
|
|
1065
1079
|
text: z.string().max(ATTEMPT_FAILURE_SNIPPET_MAX_LENGTH),
|
|
1066
1080
|
truncated: z.boolean(),
|
|
1067
1081
|
});
|
|
1082
|
+
/** Stored diagnostic content, available only under the attempt's verified authority. */
|
|
1083
|
+
export const attemptCapturedBodySchema = z.object({
|
|
1084
|
+
contentType: z.string(),
|
|
1085
|
+
encoding: z.enum(["utf8", "base64"]),
|
|
1086
|
+
// Up to 10 KiB received bytes; credential masking can expand the representation.
|
|
1087
|
+
content: z.string().max(131_072),
|
|
1088
|
+
capturedBytes: z.int().min(1).max(10_240),
|
|
1089
|
+
originalBytes: z.int().nonnegative().optional(),
|
|
1090
|
+
truncated: z.boolean(),
|
|
1091
|
+
redacted: z.boolean().optional(),
|
|
1092
|
+
incomplete: z.boolean().optional(),
|
|
1093
|
+
});
|
|
1094
|
+
export const attemptResponseSchema = z.object({
|
|
1095
|
+
statusText: z.string(),
|
|
1096
|
+
headers: z.array(z.object({ name: z.string(), value: z.string() })),
|
|
1097
|
+
bodyState: z.enum(["captured", "empty", "expired", "not_captured"]),
|
|
1098
|
+
body: attemptCapturedBodySchema.optional(),
|
|
1099
|
+
});
|
|
1100
|
+
export const attemptRequestSchema = z.object({
|
|
1101
|
+
method: z.enum(["GET", "POST", "PUT"]),
|
|
1102
|
+
url: z.string(),
|
|
1103
|
+
headers: z.array(z.object({ name: z.string(), value: z.string() })),
|
|
1104
|
+
body: z.string(),
|
|
1105
|
+
});
|
|
1068
1106
|
export const attemptSchema = z
|
|
1069
1107
|
.object({
|
|
1070
1108
|
attemptNumber: z.number().int().positive(),
|
|
@@ -1109,13 +1147,15 @@ export const attemptSchema = z
|
|
|
1109
1147
|
/** Stable next-action code paired with a diagnostic when one is known. */
|
|
1110
1148
|
remediation: attemptRemediationSchema.optional(),
|
|
1111
1149
|
/**
|
|
1112
|
-
*
|
|
1113
|
-
*
|
|
1114
|
-
*
|
|
1115
|
-
*
|
|
1116
|
-
* one. Its absence is never evidence about the delivery.
|
|
1150
|
+
* Compatibility text prefix, up to 4 KiB, derived from the retained
|
|
1151
|
+
* response when its media type is supported by legacy clients. Use
|
|
1152
|
+
* response for all headers, media types and the full 10 KiB capture.
|
|
1153
|
+
* Absence is never evidence about the delivery outcome.
|
|
1117
1154
|
*/
|
|
1118
1155
|
failureSnippet: attemptFailureSnippetSchema.optional(),
|
|
1156
|
+
response: attemptResponseSchema.optional(),
|
|
1157
|
+
request: attemptRequestSchema.optional(),
|
|
1158
|
+
requestState: z.enum(["captured", "expired", "not_captured"]).optional(),
|
|
1119
1159
|
/** The fixed diagnostic-header allowlist, when a response carried any. */
|
|
1120
1160
|
responseHeaders: z.array(attemptResponseHeaderSchema).max(8).optional(),
|
|
1121
1161
|
/** Absent when no response was received at all. */
|
|
@@ -1237,6 +1277,7 @@ export const RECURRENCE_REQUEST_FIELDS = [
|
|
|
1237
1277
|
*/
|
|
1238
1278
|
export const scheduleRequestSchema = z
|
|
1239
1279
|
.object({
|
|
1280
|
+
autoPauseAfterFailures: autoPauseAfterFailuresSchema.optional(),
|
|
1240
1281
|
http: httpRequestSchema.optional(),
|
|
1241
1282
|
/** The instant the first occurrence is planned for. */
|
|
1242
1283
|
at: timestampSchema.optional(),
|
|
@@ -1366,10 +1407,11 @@ export const scheduleRequestSchema = z
|
|
|
1366
1407
|
*
|
|
1367
1408
|
* Two schedules with different keys are paced independently, so one key's
|
|
1368
1409
|
* herd does not delay another's work. It is a label and a lane and nothing
|
|
1369
|
-
* more: it cannot widen the authority tuple
|
|
1370
|
-
*
|
|
1371
|
-
*
|
|
1372
|
-
*
|
|
1410
|
+
* more: it cannot widen the authority tuple or select a different database
|
|
1411
|
+
* shard or timer actor. Each key is paced on its own, but every lane that
|
|
1412
|
+
* delivers to the same receiver host shares that host's pacing, so more keys
|
|
1413
|
+
* never raise the rate any one receiver sees; the plan's
|
|
1414
|
+
* `partitionKeyCeiling` bounds how many distinct keys an organization holds.
|
|
1373
1415
|
*
|
|
1374
1416
|
* **Fixed once the schedule exists.** A replace may carry the key it read
|
|
1375
1417
|
* back or omit it to preserve the stored value. Adding, changing, or
|
package/dist/signatures.d.ts
CHANGED
|
@@ -182,8 +182,8 @@ export type CallbackDeferredCompletion = z.infer<typeof callbackDeferredCompleti
|
|
|
182
182
|
*/
|
|
183
183
|
export declare const callbackCompletionReportSchema: import("zod").ZodObject<{
|
|
184
184
|
outcome: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
185
|
-
failed: "failed";
|
|
186
185
|
succeeded: "succeeded";
|
|
186
|
+
failed: "failed";
|
|
187
187
|
}>>;
|
|
188
188
|
}, import("zod/v4/core").$strip>;
|
|
189
189
|
export type CallbackCompletionReport = z.infer<typeof callbackCompletionReportSchema>;
|