@greatwait/contracts 0.3.0 → 0.3.1

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.
@@ -31,7 +31,7 @@ export function reservedHttpHeaderReason(name) {
31
31
  return "reserved for transport";
32
32
  return undefined;
33
33
  }
34
- export const httpHeaderNameSchema = z
34
+ export const httpHeaderNameSchema = /* @__PURE__ */ (() => z
35
35
  .string()
36
36
  .min(1)
37
37
  .superRefine((name, ctx) => {
@@ -48,8 +48,8 @@ export const httpHeaderNameSchema = z
48
48
  const reason = reservedHttpHeaderReason(name);
49
49
  if (reason !== undefined)
50
50
  ctx.addIssue({ code: "custom", message: `${name}: ${reason}` });
51
- });
52
- export const httpHeaderValueSchema = z.string().superRefine((value, ctx) => {
51
+ }))();
52
+ export const httpHeaderValueSchema = /* @__PURE__ */ (() => z.string().superRefine((value, ctx) => {
53
53
  if (Array.from(value).some((character) => {
54
54
  const point = character.codePointAt(0);
55
55
  return point < 32 || (point >= 127 && point <= 159) || point > 255;
@@ -64,8 +64,8 @@ export const httpHeaderValueSchema = z.string().superRefine((value, ctx) => {
64
64
  code: "custom",
65
65
  message: "header value exceeds 8192 bytes",
66
66
  });
67
- });
68
- export const headerChangeSchema = z.discriminatedUnion("action", [
67
+ }))();
68
+ export const headerChangeSchema = /* @__PURE__ */ (() => z.discriminatedUnion("action", [
69
69
  z
70
70
  .object({
71
71
  action: z.literal("set"),
@@ -74,15 +74,17 @@ export const headerChangeSchema = z.discriminatedUnion("action", [
74
74
  secret: z.boolean().optional(),
75
75
  })
76
76
  .strict(),
77
- z.object({ action: z.literal("keep"), name: httpHeaderNameSchema }).strict(),
77
+ z
78
+ .object({ action: z.literal("keep"), name: httpHeaderNameSchema })
79
+ .strict(),
78
80
  z
79
81
  .object({ action: z.literal("remove"), name: httpHeaderNameSchema })
80
82
  .strict(),
81
83
  z
82
84
  .object({ action: z.literal("suppress"), name: httpHeaderNameSchema })
83
85
  .strict(),
84
- ]);
85
- export const headerChangesSchema = z
86
+ ]))();
87
+ export const headerChangesSchema = /* @__PURE__ */ (() => z
86
88
  .array(headerChangeSchema)
87
89
  .max(HTTP_HEADER_BOUNDS.count * 2)
88
90
  .superRefine((rows, ctx) => {
@@ -113,8 +115,8 @@ export const headerChangesSchema = z
113
115
  code: "custom",
114
116
  message: "headers exceed 16384 total bytes",
115
117
  });
116
- });
117
- export const endpointHeaderChangesSchema = headerChangesSchema.superRefine((rows, ctx) => {
118
+ }))();
119
+ export const endpointHeaderChangesSchema = /* @__PURE__ */ (() => headerChangesSchema.superRefine((rows, ctx) => {
118
120
  rows.forEach((row, index) => {
119
121
  if (row.action === "suppress")
120
122
  ctx.addIssue({
@@ -123,8 +125,8 @@ export const endpointHeaderChangesSchema = headerChangesSchema.superRefine((rows
123
125
  message: "only a schedule can suppress an inherited header",
124
126
  });
125
127
  });
126
- });
127
- export const publicHttpHeaderSchema = z.union([
128
+ }))();
129
+ export const publicHttpHeaderSchema = /* @__PURE__ */ (() => z.union([
128
130
  z
129
131
  .object({
130
132
  name: httpHeaderNameSchema,
@@ -144,8 +146,8 @@ export const publicHttpHeaderSchema = z.union([
144
146
  z
145
147
  .object({ name: httpHeaderNameSchema, suppressed: z.literal(true) })
146
148
  .strict(),
147
- ]);
148
- export const httpRequestSchema = z
149
+ ]))();
150
+ export const httpRequestSchema = /* @__PURE__ */ (() => z
149
151
  .object({
150
152
  method: z.enum(HTTP_METHODS).optional(),
151
153
  body: z
@@ -164,8 +166,8 @@ export const httpRequestSchema = z
164
166
  path: ["body"],
165
167
  message: "GET must be bodyless; omit body",
166
168
  });
167
- });
168
- export const publicHttpRequestSchema = z
169
+ }))();
170
+ export const publicHttpRequestSchema = /* @__PURE__ */ (() => z
169
171
  .object({
170
172
  method: z.enum(HTTP_METHODS),
171
173
  body: z.discriminatedUnion("mode", [
@@ -177,9 +179,9 @@ export const publicHttpRequestSchema = z
177
179
  ]),
178
180
  headers: z.array(publicHttpHeaderSchema),
179
181
  })
180
- .strict();
182
+ .strict())();
181
183
  /** Internal portability schema: ciphertext remains sealed across backend exports. */
182
- const sealedHttpValueSchema = z
184
+ const sealedHttpValueSchema = /* @__PURE__ */ (() => z
183
185
  .object({
184
186
  keyId: z.literal("v1"),
185
187
  nonce: z.string().regex(/^[A-Za-z0-9_-]{16}$/u),
@@ -189,7 +191,7 @@ const sealedHttpValueSchema = z
189
191
  .max(100000)
190
192
  .regex(/^[A-Za-z0-9_-]+$/u),
191
193
  })
192
- .strict();
194
+ .strict())();
193
195
  function decodedCipherBytes(value) {
194
196
  try {
195
197
  const padding = "=".repeat((4 - (value.length % 4)) % 4);
@@ -204,7 +206,7 @@ function decodedCipherBytes(value) {
204
206
  return undefined;
205
207
  }
206
208
  }
207
- export const storedHttpHeaderSchema = z
209
+ export const storedHttpHeaderSchema = /* @__PURE__ */ (() => z
208
210
  .union([
209
211
  z
210
212
  .object({
@@ -253,8 +255,8 @@ export const storedHttpHeaderSchema = z
253
255
  path: ["valueBytes"],
254
256
  message: "header byte count must match value",
255
257
  });
256
- });
257
- export const storedHttpRequestSchema = z
258
+ }))();
259
+ export const storedHttpRequestSchema = /* @__PURE__ */ (() => z
258
260
  .object({
259
261
  method: z.enum(HTTP_METHODS),
260
262
  bodyMode: z.enum(["envelope", "json", "none"]),
@@ -302,4 +304,4 @@ export const storedHttpRequestSchema = z
302
304
  path: ["headers"],
303
305
  message: "stored headers exceed 16384 total bytes",
304
306
  });
305
- });
307
+ }))();
@@ -65,31 +65,31 @@ export function idPattern(resource) {
65
65
  return new RegExp(`^${ID_PREFIXES[resource]}_${SUFFIX}$`, "u");
66
66
  }
67
67
  /** Any well-formed public identifier, whatever it names. */
68
- export const ANY_ID_PATTERN = new RegExp(`^(?:${Object.values(ID_PREFIXES).join("|")})_${SUFFIX}$`, "u");
68
+ export const ANY_ID_PATTERN = /* @__PURE__ */ (() => new RegExp(`^(?:${Object.values(ID_PREFIXES).join("|")})_${SUFFIX}$`, "u"))();
69
69
  export function idSchema(resource) {
70
70
  return z
71
71
  .string()
72
72
  .regex(idPattern(resource), `must be a ${resource} identifier: "${ID_PREFIXES[resource]}_" followed by 26 Crockford base32 characters`);
73
73
  }
74
- export const apiCredentialIdSchema = idSchema("apiCredential");
75
- export const apiCredentialEventIdSchema = idSchema("apiCredentialEvent");
76
- export const authorizationRequestIdSchema = idSchema("authorizationRequest");
77
- export const callbackSigningKeyIdSchema = idSchema("callbackSigningKey");
78
- export const oauthClientIdSchema = idSchema("oauthClient");
79
- export const oauthGrantIdSchema = idSchema("oauthGrant");
80
- export const oauthGrantEventIdSchema = idSchema("oauthGrantEvent");
81
- export const scheduleIdSchema = idSchema("schedule");
82
- export const occurrenceIdSchema = idSchema("occurrence");
83
- export const bulkJobIdSchema = idSchema("bulkJob");
84
- export const attemptIdSchema = idSchema("attempt");
85
- export const deliveryIdSchema = idSchema("delivery");
86
- export const endpointIdSchema = idSchema("endpoint");
87
- export const organizationIdSchema = idSchema("organization");
88
- export const projectIdSchema = idSchema("project");
89
- export const environmentIdSchema = idSchema("environment");
90
- export const eventIdSchema = idSchema("event");
91
- export const testSinkIdSchema = idSchema("testSink");
92
- export const testSinkDeliveryIdSchema = idSchema("testSinkDelivery");
74
+ export const apiCredentialIdSchema = /* @__PURE__ */ (() => idSchema("apiCredential"))();
75
+ export const apiCredentialEventIdSchema = /* @__PURE__ */ (() => idSchema("apiCredentialEvent"))();
76
+ export const authorizationRequestIdSchema = /* @__PURE__ */ (() => idSchema("authorizationRequest"))();
77
+ export const callbackSigningKeyIdSchema = /* @__PURE__ */ (() => idSchema("callbackSigningKey"))();
78
+ export const oauthClientIdSchema = /* @__PURE__ */ (() => idSchema("oauthClient"))();
79
+ export const oauthGrantIdSchema = /* @__PURE__ */ (() => idSchema("oauthGrant"))();
80
+ export const oauthGrantEventIdSchema = /* @__PURE__ */ (() => idSchema("oauthGrantEvent"))();
81
+ export const scheduleIdSchema = /* @__PURE__ */ (() => idSchema("schedule"))();
82
+ export const occurrenceIdSchema = /* @__PURE__ */ (() => idSchema("occurrence"))();
83
+ export const bulkJobIdSchema = /* @__PURE__ */ (() => idSchema("bulkJob"))();
84
+ export const attemptIdSchema = /* @__PURE__ */ (() => idSchema("attempt"))();
85
+ export const deliveryIdSchema = /* @__PURE__ */ (() => idSchema("delivery"))();
86
+ export const endpointIdSchema = /* @__PURE__ */ (() => idSchema("endpoint"))();
87
+ export const organizationIdSchema = /* @__PURE__ */ (() => idSchema("organization"))();
88
+ export const projectIdSchema = /* @__PURE__ */ (() => idSchema("project"))();
89
+ export const environmentIdSchema = /* @__PURE__ */ (() => idSchema("environment"))();
90
+ export const eventIdSchema = /* @__PURE__ */ (() => idSchema("event"))();
91
+ export const testSinkIdSchema = /* @__PURE__ */ (() => idSchema("testSink"))();
92
+ export const testSinkDeliveryIdSchema = /* @__PURE__ */ (() => idSchema("testSinkDelivery"))();
93
93
  /**
94
94
  * The alphabet the pattern above accepts, in order.
95
95
  *
@@ -85,7 +85,7 @@ export const OPERATIONAL_TIMING = Object.freeze({
85
85
  forecastRefreshMaximumMs: 300_000,
86
86
  forecastCoverageSlackMs: 120_000,
87
87
  });
88
- export const OPERATIONAL_TIMING_ENFORCEMENT = Object.freeze({
88
+ export const OPERATIONAL_TIMING_ENFORCEMENT = /* @__PURE__ */ (() => Object.freeze({
89
89
  forecastRefreshFloorMs: [
90
90
  "packages/contracts/src/forecast.ts#OPERATIONAL_TIMING.forecastRefreshFloorMs",
91
91
  "packages/scheduling/src/partition-forecast.ts#OPERATIONAL_TIMING.forecastRefreshFloorMs",
@@ -160,7 +160,6 @@ export const OPERATIONAL_TIMING_ENFORCEMENT = Object.freeze({
160
160
  ],
161
161
  hostFullRetryMs: [
162
162
  "packages/application/src/dialer.ts#DEFAULT_HOST_FULL_RETRY_MS",
163
- "packages/postgres-scheduling/src/postgres-repository.ts#CLAIM_SEND_HOST_FULL_RETRY_MS",
164
163
  ],
165
164
  deliveryRetryBaseMs: [
166
165
  "packages/application/src/schedule-series.ts#RETRY_BASE_MS",
@@ -217,7 +216,9 @@ export const OPERATIONAL_TIMING_ENFORCEMENT = Object.freeze({
217
216
  "apps/api/src/detached-signal.ts#TIMER_SIGNAL_RETRY_DELAYS_MS",
218
217
  ],
219
218
  dispatchWarmHorizonMs: ["apps/api/src/worker.ts#DISPATCH_WARM_HORIZON_MS"],
220
- sdkAutoRetryCount: ["packages/api-client/src/client.ts#SDK_AUTO_RETRY_LIMIT"],
219
+ sdkAutoRetryCount: [
220
+ "packages/api-client/src/client.ts#SDK_AUTO_RETRY_LIMIT",
221
+ ],
221
222
  sdkAutoRetryBaseMs: [
222
223
  "packages/api-client/src/client.ts#SDK_AUTO_RETRY_BASE_DELAY_MS",
223
224
  ],
@@ -322,9 +323,9 @@ export const OPERATIONAL_TIMING_ENFORCEMENT = Object.freeze({
322
323
  projectBillingConflictRetryCount: [
323
324
  "packages/application/src/project-billing.ts#OPERATIONAL_TIMING.projectBillingConflictRetryCount",
324
325
  ],
325
- });
326
+ }))();
326
327
  /** Catalog metadata derives its defaults from the numeric owner above. */
327
- export const OPERATIONAL_TIMING_CATALOG = Object.freeze(Object.keys(OPERATIONAL_TIMING).map((key) => Object.freeze({
328
+ export const OPERATIONAL_TIMING_CATALOG = /* @__PURE__ */ (() => Object.freeze(Object.keys(OPERATIONAL_TIMING).map((key) => Object.freeze({
328
329
  key: `operational.${key}`,
329
330
  default: OPERATIONAL_TIMING[key],
330
331
  unit: key.endsWith("Seconds")
@@ -338,4 +339,4 @@ export const OPERATIONAL_TIMING_CATALOG = Object.freeze(Object.keys(OPERATIONAL_
338
339
  changeProcedure: "Reviewed deployment; preserve callback, retry, funding and receipt compatibility",
339
340
  rationale: "Retain the existing measured or copied operating policy; the enforcement owner documents its evidence",
340
341
  enforcement: OPERATIONAL_TIMING_ENFORCEMENT[key],
341
- })));
342
+ }))))();
package/dist/protocol.js CHANGED
@@ -16,7 +16,7 @@ import { timestampSchema } from "./time.js";
16
16
  * exactly what they were given.
17
17
  */
18
18
  export const PAGE_SIZE = PUBLIC_PAGE_SIZE;
19
- export const pageRequestSchema = z.object({
19
+ export const pageRequestSchema = /* @__PURE__ */ (() => z.object({
20
20
  cursor: z.string().min(1).optional(),
21
21
  limit: z
22
22
  .number()
@@ -24,7 +24,7 @@ export const pageRequestSchema = z.object({
24
24
  .min(PAGE_SIZE.min)
25
25
  .max(PAGE_SIZE.max)
26
26
  .default(PAGE_SIZE.default),
27
- });
27
+ }))();
28
28
  /**
29
29
  * A schedules listing: the page, and optionally one endpoint to keep to.
30
30
  *
@@ -55,10 +55,10 @@ export const SCHEDULE_ORDERS = ["created", "due"];
55
55
  * a schedule with nothing on the books matches no `dueBefore`, because it has
56
56
  * no instant to compare and inventing one either way would be a guess.
57
57
  */
58
- export const scheduleListRequestSchema = pageRequestSchema.extend({
58
+ export const scheduleListRequestSchema = /* @__PURE__ */ (() => pageRequestSchema.extend({
59
59
  ...scheduleSelectionSchema.shape,
60
60
  order: z.enum(SCHEDULE_ORDERS).default("created"),
61
- });
61
+ }))();
62
62
  /**
63
63
  * Which end of a history a page walks from.
64
64
  *
@@ -70,9 +70,9 @@ export const scheduleListRequestSchema = pageRequestSchema.extend({
70
70
  */
71
71
  export const HISTORY_ORDERS = ["oldest", "newest"];
72
72
  /** A page request over a history, which may be walked from either end. */
73
- export const historyPageRequestSchema = pageRequestSchema.extend({
73
+ export const historyPageRequestSchema = /* @__PURE__ */ (() => pageRequestSchema.extend({
74
74
  order: z.enum(HISTORY_ORDERS).default("oldest"),
75
- });
75
+ }))();
76
76
  /**
77
77
  * A page of results.
78
78
  *
@@ -82,14 +82,14 @@ export const historyPageRequestSchema = pageRequestSchema.extend({
82
82
  * stale data as fact. `authoritative` means the answer came from the owning
83
83
  * partition; `projected` means it may lag and carries the age.
84
84
  */
85
- export const freshnessSchema = z.discriminatedUnion("kind", [
85
+ export const freshnessSchema = /* @__PURE__ */ (() => z.discriminatedUnion("kind", [
86
86
  z.object({ kind: z.literal("authoritative") }),
87
87
  z.object({
88
88
  asOf: timestampSchema,
89
89
  kind: z.literal("projected"),
90
90
  lagSeconds: z.number().int().nonnegative(),
91
91
  }),
92
- ]);
92
+ ]))();
93
93
  /**
94
94
  * The `projected` arm alone, for a response that is never authoritative.
95
95
  *
@@ -100,11 +100,11 @@ export const freshnessSchema = z.discriminatedUnion("kind", [
100
100
  * taken, were unreachable without narrowing that no consumer could justify.
101
101
  * Naming the narrower shape moves the claim into the type.
102
102
  */
103
- export const projectedFreshnessSchema = z.object({
103
+ export const projectedFreshnessSchema = /* @__PURE__ */ (() => z.object({
104
104
  asOf: timestampSchema,
105
105
  kind: z.literal("projected"),
106
106
  lagSeconds: z.number().int().nonnegative(),
107
- });
107
+ }))();
108
108
  export function pageSchema(item) {
109
109
  return z.object({
110
110
  data: z.array(item),
@@ -337,7 +337,7 @@ function parseListing(query, schema) {
337
337
  * `version_conflict` rather than silently overwriting — a cancel racing a
338
338
  * replace must not resolve by luck.
339
339
  */
340
- export const versionSchema = z.number().int().positive();
340
+ export const versionSchema = /* @__PURE__ */ (() => z.number().int().positive())();
341
341
  /**
342
342
  * A strong entity tag over a version: a quoted decimal, and nothing else.
343
343
  *
@@ -383,10 +383,10 @@ export function fromETag(etag) {
383
383
  * refinement is the extra strictness the OpenAPI preamble already discloses
384
384
  * that a described schema does not capture.
385
385
  */
386
- export const etagSchema = z
386
+ export const etagSchema = /* @__PURE__ */ (() => z
387
387
  .string()
388
388
  .regex(ETAG_PATTERN, ETAG_MESSAGE)
389
- .refine((value) => fromETag(value) !== undefined, ETAG_MESSAGE);
389
+ .refine((value) => fromETag(value) !== undefined, ETAG_MESSAGE))();
390
390
  /* -------------------------------------------------------------------------- */
391
391
  /* Idempotency */
392
392
  /* -------------------------------------------------------------------------- */
@@ -400,11 +400,11 @@ export const etagSchema = z
400
400
  * silent second write — that distinction is the whole point, and the legacy
401
401
  * scheduler had no equivalent.
402
402
  */
403
- export const idempotencyKeySchema = z
403
+ export const idempotencyKeySchema = /* @__PURE__ */ (() => z
404
404
  .string()
405
405
  .min(16, "must be at least 16 characters so keys do not collide by accident")
406
406
  .max(255)
407
- .regex(/^[\x20-\x7e]+$/u, "must be printable ASCII");
407
+ .regex(/^[\x20-\x7e]+$/u, "must be printable ASCII"))();
408
408
  /**
409
409
  * The scope a key was used in. Carried on the receipt rather than assumed,
410
410
  * because an implementation that keys its receipt store on the idempotency key
@@ -412,13 +412,13 @@ export const idempotencyKeySchema = z
412
412
  * send the same key. The scope is part of the record so that mistake cannot be
413
413
  * made silently.
414
414
  */
415
- export const idempotencyScopeSchema = z.object({
415
+ export const idempotencyScopeSchema = /* @__PURE__ */ (() => z.object({
416
416
  environment: environmentIdSchema,
417
417
  operation: z.string().min(1),
418
418
  organization: organizationIdSchema,
419
419
  project: projectIdSchema,
420
- });
421
- export const idempotencyReceiptSchema = z.object({
420
+ }))();
421
+ export const idempotencyReceiptSchema = /* @__PURE__ */ (() => z.object({
422
422
  /**
423
423
  * Hash of the canonical request the key was first used with. Canonical
424
424
  * means: the operation name, then the request body serialized with object
@@ -431,7 +431,7 @@ export const idempotencyReceiptSchema = z.object({
431
431
  replayed: z.boolean(),
432
432
  scope: idempotencyScopeSchema,
433
433
  storedAt: timestampSchema,
434
- });
434
+ }))();
435
435
  /**
436
436
  * The canonical form of a request, as the receipt's `requestFingerprint`
437
437
  * describes it: the operation name, then the body with object keys sorted and
@@ -535,9 +535,9 @@ export const CONCURRENCY_HEADERS = {
535
535
  ifMatch: "If-Match",
536
536
  replayed: "Idempotency-Replayed",
537
537
  };
538
- export const idempotencyRequestHeaderSchema = z.object({
538
+ export const idempotencyRequestHeaderSchema = /* @__PURE__ */ (() => z.object({
539
539
  [CONCURRENCY_HEADERS.idempotencyKey]: idempotencyKeySchema.optional(),
540
- });
540
+ }))();
541
541
  /**
542
542
  * A write for which idempotency is mandatory, rather than an optional
543
543
  * protection a caller may opt into.
@@ -547,12 +547,12 @@ export const idempotencyRequestHeaderSchema = z.object({
547
547
  * `idempotencyRequestHeaderSchema` lets schedule creation retain its published
548
548
  * optional behavior without weakening the redelivery promise.
549
549
  */
550
- export const requiredIdempotencyRequestHeaderSchema = z.object({
550
+ export const requiredIdempotencyRequestHeaderSchema = /* @__PURE__ */ (() => z.object({
551
551
  [CONCURRENCY_HEADERS.idempotencyKey]: idempotencyKeySchema,
552
- });
553
- export const conditionalRequestHeaderSchema = z.object({
552
+ }))();
553
+ export const conditionalRequestHeaderSchema = /* @__PURE__ */ (() => z.object({
554
554
  [CONCURRENCY_HEADERS.ifMatch]: etagSchema.optional(),
555
- });
555
+ }))();
556
556
  /**
557
557
  * A conditional write that refuses an unversioned request.
558
558
  *
@@ -561,18 +561,18 @@ export const conditionalRequestHeaderSchema = z.object({
561
561
  * silently accepting a missing precondition would let a stale General page
562
562
  * overwrite a newer decision.
563
563
  */
564
- export const requiredConditionalRequestHeaderSchema = z.object({
564
+ export const requiredConditionalRequestHeaderSchema = /* @__PURE__ */ (() => z.object({
565
565
  [CONCURRENCY_HEADERS.ifMatch]: etagSchema,
566
- });
566
+ }))();
567
567
  /**
568
568
  * Required rather than optional, deliberately: an operation that declares this
569
569
  * promises the header on every success, and a client that has to test for its
570
570
  * presence before making a conditional write will write the untested branch
571
571
  * wrong.
572
572
  */
573
- export const versionResponseHeaderSchema = z.object({
573
+ export const versionResponseHeaderSchema = /* @__PURE__ */ (() => z.object({
574
574
  [CONCURRENCY_HEADERS.etag]: etagSchema,
575
- });
575
+ }))();
576
576
  /**
577
577
  * What a replayed write answers with, on top of the version.
578
578
  *
@@ -588,11 +588,11 @@ export const versionResponseHeaderSchema = z.object({
588
588
  * header is the ordinary case, and a client that has to read a header to learn
589
589
  * nothing happened is a client that will not read it.
590
590
  */
591
- export const replayedResponseHeaderSchema = z.object({
591
+ export const replayedResponseHeaderSchema = /* @__PURE__ */ (() => z.object({
592
592
  [CONCURRENCY_HEADERS.etag]: etagSchema,
593
593
  [CONCURRENCY_HEADERS.replayed]: z.literal("true").optional(),
594
- });
594
+ }))();
595
595
  /** Replay marker for an idempotent create whose result has no ETag. */
596
- export const idempotencyReplayResponseHeaderSchema = z.object({
596
+ export const idempotencyReplayResponseHeaderSchema = /* @__PURE__ */ (() => z.object({
597
597
  [CONCURRENCY_HEADERS.replayed]: z.literal("true").optional(),
598
- });
598
+ }))();
@@ -3,7 +3,7 @@ import { endpointIdSchema, scheduleIdSchema } from "./identifiers.js";
3
3
  import { externalIdentifierSchema, scheduleTagSchema, } from "./host-correlation.js";
4
4
  import { timestampSchema } from "./time.js";
5
5
  /** Shared schedule predicates. Every populated field intersects before paging. */
6
- export const scheduleSelectionSchema = z.object({
6
+ export const scheduleSelectionSchema = /* @__PURE__ */ (() => z.object({
7
7
  external_identifier: externalIdentifierSchema.optional(),
8
8
  tag: scheduleTagSchema.optional(),
9
9
  status: z.enum(["active", "paused", "cancelled", "completed"]).optional(),
@@ -18,7 +18,7 @@ export const scheduleSelectionSchema = z.object({
18
18
  schedule: scheduleIdSchema.optional(),
19
19
  dueAfter: timestampSchema.optional(),
20
20
  dueBefore: timestampSchema.optional(),
21
- });
21
+ }))();
22
22
  /** Canonical predicate shape for lists, cursor bindings and bulk selections. */
23
23
  export function normalizeScheduleSelection(selection) {
24
24
  const text = selection.text?.trim();
@@ -1065,6 +1065,51 @@ export declare const attemptRequestSchema: import("zod").ZodObject<{
1065
1065
  body: import("zod").ZodString;
1066
1066
  }, import("zod/v4/core").$strip>;
1067
1067
  export type AttemptRequest = z.infer<typeof attemptRequestSchema>;
1068
+ /** Shared validators for attempt search summaries and full attempt details. */
1069
+ export declare const attemptSearchSummaryShape: {
1070
+ attemptNumber: import("zod").ZodNumber;
1071
+ classifiedAt: import("zod").ZodOptional<import("zod").ZodString>;
1072
+ diagnostic: import("zod").ZodOptional<import("zod").ZodEnum<{
1073
+ rate_limited: "rate_limited";
1074
+ completion_timed_out: "completion_timed_out";
1075
+ delivered: "delivered";
1076
+ duplicate_inflight: "duplicate_inflight";
1077
+ endpoint_unavailable: "endpoint_unavailable";
1078
+ endpoint_unsafe: "endpoint_unsafe";
1079
+ http_refused: "http_refused";
1080
+ http_retryable: "http_retryable";
1081
+ http_terminal: "http_terminal";
1082
+ identity_conflict: "identity_conflict";
1083
+ network_ambiguous: "network_ambiguous";
1084
+ payload_unavailable: "payload_unavailable";
1085
+ }>>;
1086
+ durationMs: import("zod").ZodOptional<import("zod").ZodNumber>;
1087
+ id: import("zod").ZodString;
1088
+ occurrence: import("zod").ZodString;
1089
+ remediation: import("zod").ZodOptional<import("zod").ZodEnum<{
1090
+ none: "none";
1091
+ review_retry_policy: "review_retry_policy";
1092
+ inspect_receiver: "inspect_receiver";
1093
+ review_endpoint: "review_endpoint";
1094
+ replace_payload: "replace_payload";
1095
+ contact_support: "contact_support";
1096
+ review_before_redelivery: "review_before_redelivery";
1097
+ }>>;
1098
+ responseStatus: import("zod").ZodOptional<import("zod").ZodNumber>;
1099
+ startedAt: import("zod").ZodString;
1100
+ state: import("zod").ZodOptional<import("zod").ZodEnum<{
1101
+ ambiguous: "ambiguous";
1102
+ succeeded: "succeeded";
1103
+ retryable_failure: "retryable_failure";
1104
+ terminal_failure: "terminal_failure";
1105
+ }>>;
1106
+ trigger: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1107
+ kind: import("zod").ZodLiteral<"automatic">;
1108
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1109
+ kind: import("zod").ZodLiteral<"redelivery">;
1110
+ sourceAttemptId: import("zod").ZodString;
1111
+ }, import("zod/v4/core").$strip>], "kind">;
1112
+ };
1068
1113
  export declare const attemptSchema: import("zod").ZodObject<{
1069
1114
  id: import("zod").ZodString;
1070
1115
  localReceiptRecoveries: import("zod").ZodOptional<import("zod").ZodInt>;