@greatwait/contracts 0.3.0 → 0.3.2
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-diagnostics.d.ts +1 -1
- package/dist/attempt-diagnostics.js +13 -1
- package/dist/attempt-search.d.ts +2 -0
- package/dist/attempt-search.js +22 -19
- package/dist/authority.js +9 -9
- package/dist/billing.d.ts +46 -0
- package/dist/billing.js +29 -0
- package/dist/callback-safety.js +5 -1
- package/dist/configuration.d.ts +6 -2
- package/dist/configuration.js +93 -52
- package/dist/delivery.d.ts +13 -1
- package/dist/delivery.js +2 -0
- package/dist/effective-limits.d.ts +4 -4
- package/dist/endpoints.d.ts +29 -0
- package/dist/endpoints.js +57 -26
- package/dist/forecast.d.ts +2 -2
- package/dist/http-request.d.ts +12 -2
- package/dist/http-request.js +56 -24
- package/dist/identifiers.js +20 -20
- package/dist/index.d.ts +8 -7
- package/dist/index.js +8 -7
- package/dist/mcp.js +1 -0
- package/dist/operational-config.d.ts +174 -22
- package/dist/operational-config.js +213 -79
- package/dist/operations.d.ts +334 -52
- package/dist/operations.js +195 -34
- package/dist/project-notifications.d.ts +35 -9
- package/dist/project-notifications.js +43 -12
- package/dist/protocol.d.ts +28 -0
- package/dist/protocol.js +56 -33
- package/dist/schedule-selection.js +2 -2
- package/dist/scheduling-records.d.ts +106 -16
- package/dist/scheduling-records.js +36 -12
- package/dist/scheduling.d.ts +200 -43
- package/dist/scheduling.js +280 -131
- package/dist/service-mode.d.ts +88 -0
- package/dist/service-mode.js +130 -0
- package/dist/signatures.d.ts +6 -6
- package/dist/signatures.js +24 -24
- package/dist/stored-http.d.ts +18 -0
- package/dist/stored-http.js +106 -0
- package/dist/tenancy.d.ts +54 -30
- package/dist/tenancy.js +35 -17
- package/dist/time.js +7 -7
- package/dist/timing.d.ts +39 -0
- package/dist/timing.js +51 -0
- package/dist/zod-values.d.ts +1 -1
- package/dist/zod-values.js +1 -1
- package/dist/zod.d.ts +1 -1
- package/dist/zod.js +1 -1
- package/generated/v1/examples/billing.noticesdismiss.request.json +3 -0
- package/generated/v1/examples/billing.noticesdismiss.response.json +6 -0
- package/generated/v1/examples/billing.reconcile.response.json +12 -0
- package/generated/v1/examples/billing.summary.response.json +12 -0
- package/generated/v1/examples/executions.list.response.json +1 -0
- package/generated/v1/examples/limits.read.response.json +1 -1
- package/generated/v1/examples/projectnotifications.rotateSigningKey.response.json +1 -0
- package/generated/v1/examples/projects.list.response.json +0 -6
- package/generated/v1/examples/projects.read.response.json +14 -0
- package/generated/v1/examples/schedules.list.response.json +1 -3
- package/generated/v1/examples/schedules.summary.response.json +174 -0
- package/generated/v1/examples/timing.summary.response.json +33 -1
- package/generated/v1/manifest.json +79 -2
- package/generated/v1/openapi.json +4084 -2023
- package/generated/v1/policy-matrix.json +22 -1
- package/generated/v1/schemas/attempts.list.response.json +10 -0
- package/generated/v1/schemas/attempts.read.response.json +10 -0
- package/generated/v1/schemas/attempts.search.response.json +4 -0
- package/generated/v1/schemas/billing.notices.query.json +4 -0
- package/generated/v1/schemas/billing.noticesdismiss.request.json +12 -0
- package/generated/v1/schemas/billing.noticesdismiss.response.json +22 -0
- package/generated/v1/schemas/billing.reconcile.response.json +43 -0
- package/generated/v1/schemas/billing.summary.response.json +43 -0
- package/generated/v1/schemas/endpoints.list.query.json +15 -0
- package/generated/v1/schemas/executions.list.response.json +4 -0
- package/generated/v1/schemas/occurrences.list.response.json +4 -0
- package/generated/v1/schemas/occurrences.read.response.json +4 -0
- package/generated/v1/schemas/occurrences.redeliver.response.json +10 -0
- package/generated/v1/schemas/projectnotifications.read.response.json +4 -0
- package/generated/v1/schemas/projectnotifications.rotateSigningKey.response.json +4 -0
- package/generated/v1/schemas/projectnotifications.update.request.json +41 -17
- package/generated/v1/schemas/projectnotifications.update.response.json +4 -0
- package/generated/v1/schemas/projects.list.response.json +0 -27
- package/generated/v1/schemas/projects.read.response-headers.json +11 -0
- package/generated/v1/schemas/projects.read.response.json +79 -0
- package/generated/v1/schemas/schedules.archive.response.json +8 -0
- package/generated/v1/schemas/schedules.cancel.response.json +8 -0
- package/generated/v1/schemas/schedules.create.request.json +1 -1
- package/generated/v1/schemas/schedules.create.response.json +8 -0
- package/generated/v1/schemas/schedules.list.query.json +6 -0
- package/generated/v1/schemas/schedules.list.response.json +4 -0
- package/generated/v1/schemas/schedules.pause.response.json +8 -0
- package/generated/v1/schemas/schedules.read.response.json +8 -0
- package/generated/v1/schemas/schedules.replace.request.json +1 -1
- package/generated/v1/schemas/schedules.replace.response.json +8 -0
- package/generated/v1/schemas/schedules.resume.response.json +8 -0
- package/generated/v1/schemas/schedules.summary.query.json +11 -0
- package/generated/v1/schemas/schedules.summary.response.json +144 -0
- package/generated/v1/schemas/timing.summary.response.json +69 -0
- package/generated/v1/snippets/billing.noticesdismiss.json +6 -0
- package/generated/v1/snippets/projectnotifications.rotateSigningKey.json +1 -1
- package/generated/v1/snippets/projects.read.json +6 -0
- package/generated/v1/snippets/schedules.summary.json +6 -0
- package/package.json +1 -1
package/dist/scheduling.d.ts
CHANGED
|
@@ -90,10 +90,21 @@ export declare function isTerminalScheduleStatus(status: ScheduleStatus): boolea
|
|
|
90
90
|
*/
|
|
91
91
|
export declare const LATENCY_CLASSES: readonly ["realtime", "bulk"];
|
|
92
92
|
export declare const latencyClassSchema: import("zod").ZodEnum<{
|
|
93
|
-
realtime: "realtime";
|
|
94
93
|
bulk: "bulk";
|
|
94
|
+
realtime: "realtime";
|
|
95
95
|
}>;
|
|
96
96
|
export type LatencyClass = z.infer<typeof latencyClassSchema>;
|
|
97
|
+
/**
|
|
98
|
+
* The service mode a request asks for (W12-02, FXO-3171): `auto`, or one of
|
|
99
|
+
* the concrete classes. Omission means `auto`. A read reports the concrete
|
|
100
|
+
* class an occurrence resolved to as `latencyClass`, and what was asked for as
|
|
101
|
+
* `requestedLatencyClass`; see `service-mode.ts` for the resolution.
|
|
102
|
+
*/
|
|
103
|
+
export declare const requestedLatencyClassSchema: import("zod").ZodEnum<{
|
|
104
|
+
bulk: "bulk";
|
|
105
|
+
realtime: "realtime";
|
|
106
|
+
auto: "auto";
|
|
107
|
+
}>;
|
|
97
108
|
/**
|
|
98
109
|
* What happens when an occurrence reaches its first attempt after its planned
|
|
99
110
|
* instant.
|
|
@@ -553,13 +564,11 @@ export declare const SCHEDULING_BOUNDS: {
|
|
|
553
564
|
* was the copied scheduler's `MAX_INTERVAL_SECONDS`, carried over on the
|
|
554
565
|
* belief that "a Durable Object alarm is not arbitrarily far in the future".
|
|
555
566
|
* Cloudflare documents no maximum distance for `setAlarm()`, and the belief
|
|
556
|
-
* predates the PostgreSQL authority besides: the durable fact is a row
|
|
557
|
-
* the alarm is only what wakes a bucket to read it.
|
|
567
|
+
* predates the PostgreSQL authority besides: the durable fact is a row.
|
|
558
568
|
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
* — so an alarm that is somehow lost costs lateness rather than the run.
|
|
569
|
+
* Since W13-03 there is no alarm at all. The Node runtime polls
|
|
570
|
+
* `core.occurrence` for rows whose `due_at` has passed, so a year-distant
|
|
571
|
+
* occurrence is the same row read on the same poll as a minute-distant one.
|
|
563
572
|
*
|
|
564
573
|
* Widening a bound is additive by `classifyChange` and narrowing it is
|
|
565
574
|
* breaking, so this direction is the safe one to move in.
|
|
@@ -630,17 +639,15 @@ export declare const SCHEDULING_BOUNDS: {
|
|
|
630
639
|
*/
|
|
631
640
|
readonly payloadBytes: 65536;
|
|
632
641
|
/**
|
|
633
|
-
* How soon a one-shot has to be for `
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
* who disagrees says so — `latencyClass` on the request is what makes this a
|
|
641
|
-
* default rather than a rule.
|
|
642
|
+
* How soon a one-shot has to be for `auto` to resolve it to `realtime`, in
|
|
643
|
+
* seconds, exclusive: a one-shot planned less than a minute after it was
|
|
644
|
+
* accepted is realtime, and one planned exactly a minute out is bulk
|
|
645
|
+
* (W12-02, FXO-3171; owner decision 2026-10-14). The single owner is
|
|
646
|
+
* `SERVICE_MODE_POLICY.autoRealtimeBelowMs`. A caller who disagrees says so
|
|
647
|
+
* — `latencyClass` on the request is what makes this a default rather than a
|
|
648
|
+
* rule.
|
|
642
649
|
*/
|
|
643
|
-
readonly realtimeOneShotSeconds:
|
|
650
|
+
readonly realtimeOneShotSeconds: number;
|
|
644
651
|
};
|
|
645
652
|
/**
|
|
646
653
|
* The longest cron expression this surface accepts, in characters.
|
|
@@ -778,9 +785,14 @@ export declare const scheduleSchema: import("zod").ZodObject<{
|
|
|
778
785
|
generation: import("zod").ZodNumber;
|
|
779
786
|
id: import("zod").ZodString;
|
|
780
787
|
latencyClass: import("zod").ZodEnum<{
|
|
781
|
-
realtime: "realtime";
|
|
782
788
|
bulk: "bulk";
|
|
789
|
+
realtime: "realtime";
|
|
783
790
|
}>;
|
|
791
|
+
requestedLatencyClass: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
792
|
+
bulk: "bulk";
|
|
793
|
+
realtime: "realtime";
|
|
794
|
+
auto: "auto";
|
|
795
|
+
}>>;
|
|
784
796
|
lateness: import("zod").ZodObject<{
|
|
785
797
|
maxStalenessSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
786
798
|
policy: import("zod").ZodEnum<{
|
|
@@ -880,9 +892,14 @@ export declare const schedulePageSchema: import("zod").ZodObject<{
|
|
|
880
892
|
generation: import("zod").ZodNumber;
|
|
881
893
|
id: import("zod").ZodString;
|
|
882
894
|
latencyClass: import("zod").ZodEnum<{
|
|
883
|
-
realtime: "realtime";
|
|
884
895
|
bulk: "bulk";
|
|
896
|
+
realtime: "realtime";
|
|
885
897
|
}>;
|
|
898
|
+
requestedLatencyClass: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
899
|
+
bulk: "bulk";
|
|
900
|
+
realtime: "realtime";
|
|
901
|
+
auto: "auto";
|
|
902
|
+
}>>;
|
|
886
903
|
lateness: import("zod").ZodObject<{
|
|
887
904
|
maxStalenessSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
888
905
|
policy: import("zod").ZodEnum<{
|
|
@@ -924,6 +941,68 @@ export declare const schedulePageSchema: import("zod").ZodObject<{
|
|
|
924
941
|
nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
925
942
|
}, import("zod/v4/core").$strip>;
|
|
926
943
|
export type SchedulePage = z.infer<typeof schedulePageSchema>;
|
|
944
|
+
/** Local days a schedule summary covers, today included (W9-80, FXO-3446). */
|
|
945
|
+
export declare const SCHEDULE_SUMMARY_DAYS = 30;
|
|
946
|
+
/** Auto-paused schedules a summary names beside their count. */
|
|
947
|
+
export declare const SCHEDULE_SUMMARY_PAUSED_SAMPLE = 5;
|
|
948
|
+
/** The oldest a served schedule summary may be, in seconds. */
|
|
949
|
+
export declare const SCHEDULE_SUMMARY_MAX_AGE_SECONDS = 300;
|
|
950
|
+
/** A schedule summary request: the reader's time zone for the day buckets. */
|
|
951
|
+
export declare const scheduleSummaryRequestSchema: import("zod").ZodObject<{
|
|
952
|
+
timeZone: import("zod").ZodDefault<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>>;
|
|
953
|
+
}, import("zod/v4/core").$strip>;
|
|
954
|
+
export type ScheduleSummaryRequest = z.infer<typeof scheduleSummaryRequestSchema>;
|
|
955
|
+
/**
|
|
956
|
+
* Whole-project schedule counts for the caller's project and environment
|
|
957
|
+
* (W9-80, FXO-3446).
|
|
958
|
+
*
|
|
959
|
+
* **Exact as of `freshness.asOf`, and at most five minutes old.** The counts
|
|
960
|
+
* read every retained, unarchived schedule in one statement, which is too
|
|
961
|
+
* costly to repeat on every view of a large project, so an answer is computed
|
|
962
|
+
* on read and reused for up to {@link SCHEDULE_SUMMARY_MAX_AGE_SECONDS}
|
|
963
|
+
* seconds per project, environment and time zone. `freshness` is always
|
|
964
|
+
* `projected`: `asOf` is when the counts were taken and `lagSeconds` how long
|
|
965
|
+
* ago that was, so a client can say "as of 2 minutes ago" rather than present
|
|
966
|
+
* the numbers as live. Counts cover retained schedules only: retention removes
|
|
967
|
+
* cancelled schedules and one-offs that ran once their history horizon passes.
|
|
968
|
+
*/
|
|
969
|
+
export declare const scheduleSummarySchema: import("zod").ZodObject<{
|
|
970
|
+
counts: import("zod").ZodObject<{
|
|
971
|
+
active: import("zod").ZodNumber;
|
|
972
|
+
paused: import("zod").ZodNumber;
|
|
973
|
+
completed: import("zod").ZodNumber;
|
|
974
|
+
cancelled: import("zod").ZodNumber;
|
|
975
|
+
}, import("zod/v4/core").$strip>;
|
|
976
|
+
pausedAfterFailures: import("zod").ZodObject<{
|
|
977
|
+
count: import("zod").ZodNumber;
|
|
978
|
+
schedules: import("zod").ZodArray<import("zod").ZodObject<{
|
|
979
|
+
id: import("zod").ZodString;
|
|
980
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
981
|
+
autoPauseReason: import("zod").ZodObject<{
|
|
982
|
+
failedRuns: import("zod").ZodNumber;
|
|
983
|
+
status: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
984
|
+
diagnostic: import("zod").ZodString;
|
|
985
|
+
pausedAt: import("zod").ZodString;
|
|
986
|
+
}, import("zod/v4/core").$strip>;
|
|
987
|
+
}, import("zod/v4/core").$strip>>;
|
|
988
|
+
}, import("zod/v4/core").$strip>;
|
|
989
|
+
days: import("zod").ZodArray<import("zod").ZodObject<{
|
|
990
|
+
date: import("zod").ZodString;
|
|
991
|
+
created: import("zod").ZodNumber;
|
|
992
|
+
finished: import("zod").ZodNumber;
|
|
993
|
+
}, import("zod/v4/core").$strip>>;
|
|
994
|
+
window: import("zod").ZodObject<{
|
|
995
|
+
from: import("zod").ZodString;
|
|
996
|
+
to: import("zod").ZodString;
|
|
997
|
+
timeZone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
|
|
998
|
+
}, import("zod/v4/core").$strip>;
|
|
999
|
+
freshness: import("zod").ZodObject<{
|
|
1000
|
+
asOf: import("zod").ZodString;
|
|
1001
|
+
kind: import("zod").ZodLiteral<"projected">;
|
|
1002
|
+
lagSeconds: import("zod").ZodNumber;
|
|
1003
|
+
}, import("zod/v4/core").$strip>;
|
|
1004
|
+
}, import("zod/v4/core").$strip>;
|
|
1005
|
+
export type ScheduleSummary = z.infer<typeof scheduleSummarySchema>;
|
|
927
1006
|
/**
|
|
928
1007
|
* One concrete occurrence of a schedule.
|
|
929
1008
|
*
|
|
@@ -937,6 +1016,7 @@ export declare const occurrenceSchema: import("zod").ZodObject<{
|
|
|
937
1016
|
id: import("zod").ZodString;
|
|
938
1017
|
plannedFor: import("zod").ZodString;
|
|
939
1018
|
schedule: import("zod").ZodString;
|
|
1019
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
940
1020
|
sequence: import("zod").ZodNumber;
|
|
941
1021
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
942
1022
|
state: import("zod").ZodEnum<{
|
|
@@ -1065,6 +1145,51 @@ export declare const attemptRequestSchema: import("zod").ZodObject<{
|
|
|
1065
1145
|
body: import("zod").ZodString;
|
|
1066
1146
|
}, import("zod/v4/core").$strip>;
|
|
1067
1147
|
export type AttemptRequest = z.infer<typeof attemptRequestSchema>;
|
|
1148
|
+
/** Shared validators for attempt search summaries and full attempt details. */
|
|
1149
|
+
export declare const attemptSearchSummaryShape: {
|
|
1150
|
+
attemptNumber: import("zod").ZodNumber;
|
|
1151
|
+
classifiedAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1152
|
+
diagnostic: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1153
|
+
rate_limited: "rate_limited";
|
|
1154
|
+
completion_timed_out: "completion_timed_out";
|
|
1155
|
+
delivered: "delivered";
|
|
1156
|
+
duplicate_inflight: "duplicate_inflight";
|
|
1157
|
+
endpoint_unavailable: "endpoint_unavailable";
|
|
1158
|
+
endpoint_unsafe: "endpoint_unsafe";
|
|
1159
|
+
http_refused: "http_refused";
|
|
1160
|
+
http_retryable: "http_retryable";
|
|
1161
|
+
http_terminal: "http_terminal";
|
|
1162
|
+
identity_conflict: "identity_conflict";
|
|
1163
|
+
network_ambiguous: "network_ambiguous";
|
|
1164
|
+
payload_unavailable: "payload_unavailable";
|
|
1165
|
+
}>>;
|
|
1166
|
+
durationMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1167
|
+
id: import("zod").ZodString;
|
|
1168
|
+
occurrence: import("zod").ZodString;
|
|
1169
|
+
remediation: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1170
|
+
none: "none";
|
|
1171
|
+
review_retry_policy: "review_retry_policy";
|
|
1172
|
+
inspect_receiver: "inspect_receiver";
|
|
1173
|
+
review_endpoint: "review_endpoint";
|
|
1174
|
+
replace_payload: "replace_payload";
|
|
1175
|
+
contact_support: "contact_support";
|
|
1176
|
+
review_before_redelivery: "review_before_redelivery";
|
|
1177
|
+
}>>;
|
|
1178
|
+
responseStatus: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1179
|
+
startedAt: import("zod").ZodString;
|
|
1180
|
+
state: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1181
|
+
ambiguous: "ambiguous";
|
|
1182
|
+
succeeded: "succeeded";
|
|
1183
|
+
retryable_failure: "retryable_failure";
|
|
1184
|
+
terminal_failure: "terminal_failure";
|
|
1185
|
+
}>>;
|
|
1186
|
+
trigger: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
1187
|
+
kind: import("zod").ZodLiteral<"automatic">;
|
|
1188
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1189
|
+
kind: import("zod").ZodLiteral<"redelivery">;
|
|
1190
|
+
sourceAttemptId: import("zod").ZodString;
|
|
1191
|
+
}, import("zod/v4/core").$strip>], "kind">;
|
|
1192
|
+
};
|
|
1068
1193
|
export declare const attemptSchema: import("zod").ZodObject<{
|
|
1069
1194
|
id: import("zod").ZodString;
|
|
1070
1195
|
localReceiptRecoveries: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
@@ -1128,6 +1253,12 @@ export declare const attemptSchema: import("zod").ZodObject<{
|
|
|
1128
1253
|
expired: "expired";
|
|
1129
1254
|
not_captured: "not_captured";
|
|
1130
1255
|
}>>;
|
|
1256
|
+
requestUnavailable: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1257
|
+
schedule_changed: "schedule_changed";
|
|
1258
|
+
endpoint_changed: "endpoint_changed";
|
|
1259
|
+
endpoint_deleted: "endpoint_deleted";
|
|
1260
|
+
payload_deleted: "payload_deleted";
|
|
1261
|
+
}>>;
|
|
1131
1262
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1132
1263
|
name: import("zod").ZodString;
|
|
1133
1264
|
value: import("zod").ZodString;
|
|
@@ -1183,6 +1314,7 @@ export declare const occurrencePageSchema: import("zod").ZodObject<{
|
|
|
1183
1314
|
id: import("zod").ZodString;
|
|
1184
1315
|
plannedFor: import("zod").ZodString;
|
|
1185
1316
|
schedule: import("zod").ZodString;
|
|
1317
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1186
1318
|
sequence: import("zod").ZodNumber;
|
|
1187
1319
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1188
1320
|
state: import("zod").ZodEnum<{
|
|
@@ -1220,6 +1352,7 @@ export declare const projectOccurrencePageSchema: import("zod").ZodObject<{
|
|
|
1220
1352
|
id: import("zod").ZodString;
|
|
1221
1353
|
plannedFor: import("zod").ZodString;
|
|
1222
1354
|
schedule: import("zod").ZodString;
|
|
1355
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1223
1356
|
sequence: import("zod").ZodNumber;
|
|
1224
1357
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1225
1358
|
state: import("zod").ZodEnum<{
|
|
@@ -1263,6 +1396,7 @@ export declare const occurrenceViewSchema: import("zod").ZodObject<{
|
|
|
1263
1396
|
id: import("zod").ZodString;
|
|
1264
1397
|
plannedFor: import("zod").ZodString;
|
|
1265
1398
|
schedule: import("zod").ZodString;
|
|
1399
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1266
1400
|
sequence: import("zod").ZodNumber;
|
|
1267
1401
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1268
1402
|
state: import("zod").ZodEnum<{
|
|
@@ -1354,6 +1488,12 @@ export declare const attemptPageSchema: import("zod").ZodObject<{
|
|
|
1354
1488
|
expired: "expired";
|
|
1355
1489
|
not_captured: "not_captured";
|
|
1356
1490
|
}>>;
|
|
1491
|
+
requestUnavailable: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1492
|
+
schedule_changed: "schedule_changed";
|
|
1493
|
+
endpoint_changed: "endpoint_changed";
|
|
1494
|
+
endpoint_deleted: "endpoint_deleted";
|
|
1495
|
+
payload_deleted: "payload_deleted";
|
|
1496
|
+
}>>;
|
|
1357
1497
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1358
1498
|
name: import("zod").ZodString;
|
|
1359
1499
|
value: import("zod").ZodString;
|
|
@@ -1472,6 +1612,12 @@ export declare const attemptViewSchema: import("zod").ZodObject<{
|
|
|
1472
1612
|
expired: "expired";
|
|
1473
1613
|
not_captured: "not_captured";
|
|
1474
1614
|
}>>;
|
|
1615
|
+
requestUnavailable: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1616
|
+
schedule_changed: "schedule_changed";
|
|
1617
|
+
endpoint_changed: "endpoint_changed";
|
|
1618
|
+
endpoint_deleted: "endpoint_deleted";
|
|
1619
|
+
payload_deleted: "payload_deleted";
|
|
1620
|
+
}>>;
|
|
1475
1621
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1476
1622
|
name: import("zod").ZodString;
|
|
1477
1623
|
value: import("zod").ZodString;
|
|
@@ -1538,6 +1684,7 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1538
1684
|
id: import("zod").ZodString;
|
|
1539
1685
|
plannedFor: import("zod").ZodString;
|
|
1540
1686
|
schedule: import("zod").ZodString;
|
|
1687
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1541
1688
|
sequence: import("zod").ZodNumber;
|
|
1542
1689
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1543
1690
|
state: import("zod").ZodEnum<{
|
|
@@ -1618,9 +1765,14 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1618
1765
|
generation: import("zod").ZodNumber;
|
|
1619
1766
|
id: import("zod").ZodString;
|
|
1620
1767
|
latencyClass: import("zod").ZodEnum<{
|
|
1621
|
-
realtime: "realtime";
|
|
1622
1768
|
bulk: "bulk";
|
|
1769
|
+
realtime: "realtime";
|
|
1623
1770
|
}>;
|
|
1771
|
+
requestedLatencyClass: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1772
|
+
bulk: "bulk";
|
|
1773
|
+
realtime: "realtime";
|
|
1774
|
+
auto: "auto";
|
|
1775
|
+
}>>;
|
|
1624
1776
|
lateness: import("zod").ZodObject<{
|
|
1625
1777
|
maxStalenessSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1626
1778
|
policy: import("zod").ZodEnum<{
|
|
@@ -1666,6 +1818,7 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1666
1818
|
id: import("zod").ZodString;
|
|
1667
1819
|
plannedFor: import("zod").ZodString;
|
|
1668
1820
|
schedule: import("zod").ZodString;
|
|
1821
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1669
1822
|
sequence: import("zod").ZodNumber;
|
|
1670
1823
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1671
1824
|
state: import("zod").ZodEnum<{
|
|
@@ -1746,9 +1899,14 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1746
1899
|
generation: import("zod").ZodNumber;
|
|
1747
1900
|
id: import("zod").ZodString;
|
|
1748
1901
|
latencyClass: import("zod").ZodEnum<{
|
|
1749
|
-
realtime: "realtime";
|
|
1750
1902
|
bulk: "bulk";
|
|
1903
|
+
realtime: "realtime";
|
|
1751
1904
|
}>;
|
|
1905
|
+
requestedLatencyClass: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1906
|
+
bulk: "bulk";
|
|
1907
|
+
realtime: "realtime";
|
|
1908
|
+
auto: "auto";
|
|
1909
|
+
}>>;
|
|
1752
1910
|
lateness: import("zod").ZodObject<{
|
|
1753
1911
|
maxStalenessSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1754
1912
|
policy: import("zod").ZodEnum<{
|
|
@@ -1860,8 +2018,9 @@ export declare const scheduleRequestSchema: import("zod").ZodObject<{
|
|
|
1860
2018
|
endpoint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1861
2019
|
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1862
2020
|
latencyClass: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1863
|
-
realtime: "realtime";
|
|
1864
2021
|
bulk: "bulk";
|
|
2022
|
+
realtime: "realtime";
|
|
2023
|
+
auto: "auto";
|
|
1865
2024
|
}>>;
|
|
1866
2025
|
lateness: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1867
2026
|
maxStalenessSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -1879,27 +2038,6 @@ export declare const scheduleRequestSchema: import("zod").ZodObject<{
|
|
|
1879
2038
|
export type ScheduleRequest = z.infer<typeof scheduleRequestSchema>;
|
|
1880
2039
|
/** Resolve the lateness settings a create or replacement request runs under. */
|
|
1881
2040
|
export declare function deriveLatenessSettings(request: ScheduleRequest): LatenessSettings;
|
|
1882
|
-
/**
|
|
1883
|
-
* The class a request runs under: the caller's, or the one its recurrence
|
|
1884
|
-
* implies.
|
|
1885
|
-
*
|
|
1886
|
-
* **Retenanted from the copied `validate.ts` §9 defaulting**, which is the same
|
|
1887
|
-
* three rules in the same order — an explicit class wins; a `cron` or an
|
|
1888
|
-
* `every` is `bulk`; a one-shot is `realtime` when it is close and `bulk`
|
|
1889
|
-
* otherwise. What changes is only where the threshold is written down and that
|
|
1890
|
-
* a `delay` is measured against the clock the request arrived on rather than
|
|
1891
|
-
* read off a separate field, because this surface has already converted one
|
|
1892
|
-
* into the other by the time anything else looks at it.
|
|
1893
|
-
*
|
|
1894
|
-
* It lives here rather than in either adapter because REST and MCP must reach
|
|
1895
|
-
* the same class for the same body — the same reason `classifyIdempotency` is
|
|
1896
|
-
* here — and because a default that two surfaces derive separately is a default
|
|
1897
|
-
* they will eventually disagree about.
|
|
1898
|
-
*
|
|
1899
|
-
* `nowMs` is a parameter for the reason every clock in this package is: a rule
|
|
1900
|
-
* about "within two minutes" that reads its own clock cannot be asked what it
|
|
1901
|
-
* says one millisecond either side of the boundary.
|
|
1902
|
-
*/
|
|
1903
2041
|
/** Every delivery setting resolved, with nothing left optional. */
|
|
1904
2042
|
export interface DeliverySettings {
|
|
1905
2043
|
readonly completion: DeliveryCompletionMode;
|
|
@@ -1921,4 +2059,23 @@ export interface DeliverySettings {
|
|
|
1921
2059
|
* is never still going — rather than something wrong.
|
|
1922
2060
|
*/
|
|
1923
2061
|
export declare function deriveDeliverySettings(request: ScheduleRequest): DeliverySettings;
|
|
2062
|
+
/**
|
|
2063
|
+
* The create request as its idempotency fingerprint reads it (W12-02).
|
|
2064
|
+
*
|
|
2065
|
+
* An omitted `latencyClass` means `auto`, so the two spellings are one request
|
|
2066
|
+
* and must fingerprint alike. They are made alike by writing the default the
|
|
2067
|
+
* way the request has always been able to write it — by omission — so a
|
|
2068
|
+
* receipt issued before `auto` existed still recognizes its own retry.
|
|
2069
|
+
*/
|
|
2070
|
+
export declare function fingerprintedScheduleRequest(request: ScheduleRequest): ScheduleRequest;
|
|
2071
|
+
/**
|
|
2072
|
+
* The concrete class a create request resolves to at `nowMs`, its acceptance
|
|
2073
|
+
* time. Here so REST, MCP and the dashboard's preview reach the same answer
|
|
2074
|
+
* for the same body; `service-mode.ts` owns the rule.
|
|
2075
|
+
*
|
|
2076
|
+
* A recurrence is classified by the gap between runs, at least a minute for
|
|
2077
|
+
* anything this surface accepts, so `auto` makes it `bulk` without evaluating
|
|
2078
|
+
* a cron expression here. `nowMs` is a parameter so the boundary can be asked
|
|
2079
|
+
* about one millisecond either side of it.
|
|
2080
|
+
*/
|
|
1924
2081
|
export declare function deriveLatencyClass(request: ScheduleRequest, nowMs: number): LatencyClass;
|