@greatwait/contracts 0.3.1 → 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/billing.d.ts +46 -0
- package/dist/billing.js +29 -0
- package/dist/callback-safety.js +5 -1
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +6 -3
- package/dist/delivery.d.ts +12 -1
- package/dist/delivery.js +1 -0
- package/dist/effective-limits.d.ts +4 -4
- package/dist/endpoints.d.ts +29 -0
- package/dist/endpoints.js +32 -1
- package/dist/forecast.d.ts +2 -2
- package/dist/http-request.d.ts +12 -2
- package/dist/http-request.js +31 -1
- 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 +207 -74
- 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 +23 -0
- package/dist/scheduling-records.d.ts +106 -16
- package/dist/scheduling-records.js +36 -12
- package/dist/scheduling.d.ts +155 -43
- package/dist/scheduling.js +188 -50
- package/dist/service-mode.d.ts +88 -0
- package/dist/service-mode.js +130 -0
- package/dist/tenancy.d.ts +54 -30
- package/dist/tenancy.js +35 -17
- 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<{
|
|
@@ -1173,6 +1253,12 @@ export declare const attemptSchema: import("zod").ZodObject<{
|
|
|
1173
1253
|
expired: "expired";
|
|
1174
1254
|
not_captured: "not_captured";
|
|
1175
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
|
+
}>>;
|
|
1176
1262
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1177
1263
|
name: import("zod").ZodString;
|
|
1178
1264
|
value: import("zod").ZodString;
|
|
@@ -1228,6 +1314,7 @@ export declare const occurrencePageSchema: import("zod").ZodObject<{
|
|
|
1228
1314
|
id: import("zod").ZodString;
|
|
1229
1315
|
plannedFor: import("zod").ZodString;
|
|
1230
1316
|
schedule: import("zod").ZodString;
|
|
1317
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1231
1318
|
sequence: import("zod").ZodNumber;
|
|
1232
1319
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1233
1320
|
state: import("zod").ZodEnum<{
|
|
@@ -1265,6 +1352,7 @@ export declare const projectOccurrencePageSchema: import("zod").ZodObject<{
|
|
|
1265
1352
|
id: import("zod").ZodString;
|
|
1266
1353
|
plannedFor: import("zod").ZodString;
|
|
1267
1354
|
schedule: import("zod").ZodString;
|
|
1355
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1268
1356
|
sequence: import("zod").ZodNumber;
|
|
1269
1357
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1270
1358
|
state: import("zod").ZodEnum<{
|
|
@@ -1308,6 +1396,7 @@ export declare const occurrenceViewSchema: import("zod").ZodObject<{
|
|
|
1308
1396
|
id: import("zod").ZodString;
|
|
1309
1397
|
plannedFor: import("zod").ZodString;
|
|
1310
1398
|
schedule: import("zod").ZodString;
|
|
1399
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1311
1400
|
sequence: import("zod").ZodNumber;
|
|
1312
1401
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1313
1402
|
state: import("zod").ZodEnum<{
|
|
@@ -1399,6 +1488,12 @@ export declare const attemptPageSchema: import("zod").ZodObject<{
|
|
|
1399
1488
|
expired: "expired";
|
|
1400
1489
|
not_captured: "not_captured";
|
|
1401
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
|
+
}>>;
|
|
1402
1497
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1403
1498
|
name: import("zod").ZodString;
|
|
1404
1499
|
value: import("zod").ZodString;
|
|
@@ -1517,6 +1612,12 @@ export declare const attemptViewSchema: import("zod").ZodObject<{
|
|
|
1517
1612
|
expired: "expired";
|
|
1518
1613
|
not_captured: "not_captured";
|
|
1519
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
|
+
}>>;
|
|
1520
1621
|
responseHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1521
1622
|
name: import("zod").ZodString;
|
|
1522
1623
|
value: import("zod").ZodString;
|
|
@@ -1583,6 +1684,7 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1583
1684
|
id: import("zod").ZodString;
|
|
1584
1685
|
plannedFor: import("zod").ZodString;
|
|
1585
1686
|
schedule: import("zod").ZodString;
|
|
1687
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1586
1688
|
sequence: import("zod").ZodNumber;
|
|
1587
1689
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1588
1690
|
state: import("zod").ZodEnum<{
|
|
@@ -1663,9 +1765,14 @@ export declare const scheduleViewSchema: import("zod").ZodObject<{
|
|
|
1663
1765
|
generation: import("zod").ZodNumber;
|
|
1664
1766
|
id: import("zod").ZodString;
|
|
1665
1767
|
latencyClass: import("zod").ZodEnum<{
|
|
1666
|
-
realtime: "realtime";
|
|
1667
1768
|
bulk: "bulk";
|
|
1769
|
+
realtime: "realtime";
|
|
1668
1770
|
}>;
|
|
1771
|
+
requestedLatencyClass: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1772
|
+
bulk: "bulk";
|
|
1773
|
+
realtime: "realtime";
|
|
1774
|
+
auto: "auto";
|
|
1775
|
+
}>>;
|
|
1669
1776
|
lateness: import("zod").ZodObject<{
|
|
1670
1777
|
maxStalenessSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1671
1778
|
policy: import("zod").ZodEnum<{
|
|
@@ -1711,6 +1818,7 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1711
1818
|
id: import("zod").ZodString;
|
|
1712
1819
|
plannedFor: import("zod").ZodString;
|
|
1713
1820
|
schedule: import("zod").ZodString;
|
|
1821
|
+
scheduleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1714
1822
|
sequence: import("zod").ZodNumber;
|
|
1715
1823
|
settledAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1716
1824
|
state: import("zod").ZodEnum<{
|
|
@@ -1791,9 +1899,14 @@ export declare const scheduleWrittenViewSchema: import("zod").ZodObject<{
|
|
|
1791
1899
|
generation: import("zod").ZodNumber;
|
|
1792
1900
|
id: import("zod").ZodString;
|
|
1793
1901
|
latencyClass: import("zod").ZodEnum<{
|
|
1794
|
-
realtime: "realtime";
|
|
1795
1902
|
bulk: "bulk";
|
|
1903
|
+
realtime: "realtime";
|
|
1796
1904
|
}>;
|
|
1905
|
+
requestedLatencyClass: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1906
|
+
bulk: "bulk";
|
|
1907
|
+
realtime: "realtime";
|
|
1908
|
+
auto: "auto";
|
|
1909
|
+
}>>;
|
|
1797
1910
|
lateness: import("zod").ZodObject<{
|
|
1798
1911
|
maxStalenessSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1799
1912
|
policy: import("zod").ZodEnum<{
|
|
@@ -1905,8 +2018,9 @@ export declare const scheduleRequestSchema: import("zod").ZodObject<{
|
|
|
1905
2018
|
endpoint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1906
2019
|
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1907
2020
|
latencyClass: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1908
|
-
realtime: "realtime";
|
|
1909
2021
|
bulk: "bulk";
|
|
2022
|
+
realtime: "realtime";
|
|
2023
|
+
auto: "auto";
|
|
1910
2024
|
}>>;
|
|
1911
2025
|
lateness: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1912
2026
|
maxStalenessSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -1924,27 +2038,6 @@ export declare const scheduleRequestSchema: import("zod").ZodObject<{
|
|
|
1924
2038
|
export type ScheduleRequest = z.infer<typeof scheduleRequestSchema>;
|
|
1925
2039
|
/** Resolve the lateness settings a create or replacement request runs under. */
|
|
1926
2040
|
export declare function deriveLatenessSettings(request: ScheduleRequest): LatenessSettings;
|
|
1927
|
-
/**
|
|
1928
|
-
* The class a request runs under: the caller's, or the one its recurrence
|
|
1929
|
-
* implies.
|
|
1930
|
-
*
|
|
1931
|
-
* **Retenanted from the copied `validate.ts` §9 defaulting**, which is the same
|
|
1932
|
-
* three rules in the same order — an explicit class wins; a `cron` or an
|
|
1933
|
-
* `every` is `bulk`; a one-shot is `realtime` when it is close and `bulk`
|
|
1934
|
-
* otherwise. What changes is only where the threshold is written down and that
|
|
1935
|
-
* a `delay` is measured against the clock the request arrived on rather than
|
|
1936
|
-
* read off a separate field, because this surface has already converted one
|
|
1937
|
-
* into the other by the time anything else looks at it.
|
|
1938
|
-
*
|
|
1939
|
-
* It lives here rather than in either adapter because REST and MCP must reach
|
|
1940
|
-
* the same class for the same body — the same reason `classifyIdempotency` is
|
|
1941
|
-
* here — and because a default that two surfaces derive separately is a default
|
|
1942
|
-
* they will eventually disagree about.
|
|
1943
|
-
*
|
|
1944
|
-
* `nowMs` is a parameter for the reason every clock in this package is: a rule
|
|
1945
|
-
* about "within two minutes" that reads its own clock cannot be asked what it
|
|
1946
|
-
* says one millisecond either side of the boundary.
|
|
1947
|
-
*/
|
|
1948
2041
|
/** Every delivery setting resolved, with nothing left optional. */
|
|
1949
2042
|
export interface DeliverySettings {
|
|
1950
2043
|
readonly completion: DeliveryCompletionMode;
|
|
@@ -1966,4 +2059,23 @@ export interface DeliverySettings {
|
|
|
1966
2059
|
* is never still going — rather than something wrong.
|
|
1967
2060
|
*/
|
|
1968
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
|
+
*/
|
|
1969
2081
|
export declare function deriveLatencyClass(request: ScheduleRequest, nowMs: number): LatencyClass;
|