@fern-api/fdr-sdk 1.2.174-e2f8a24699 → 1.2.174-e7dedd2eea
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/js/client/FdrClient.js +45 -1
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +45 -1
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/docs-ledger/index.js +45 -1
- package/dist/js/docs-ledger/index.js.map +1 -1
- package/dist/js/docs-ledger/index.mjs +45 -1
- package/dist/js/docs-ledger/index.mjs.map +1 -1
- package/dist/js/index.js +45 -1
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +45 -1
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +47 -1
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +46 -1
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/orpc-client/docs-ledger/contract.d.ts +285 -0
- package/dist/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs-ledger/contract.js +67 -1
- package/dist/orpc-client/docs-ledger/contract.js.map +1 -1
- package/dist/orpc-client/docs-ledger/ledger-manifest.d.ts +30 -30
- package/dist/types/orpc-client/docs-ledger/contract.d.ts +285 -0
- package/dist/types/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/ledger-manifest.d.ts +30 -30
- package/package.json +1 -1
|
@@ -349,6 +349,96 @@ export declare const ReindexResponseSchema: z.ZodObject<{
|
|
|
349
349
|
jobName?: string | undefined;
|
|
350
350
|
outcome?: "succeeded" | "failed" | "timed-out" | "gone" | "unrouted" | "queued" | undefined;
|
|
351
351
|
}>;
|
|
352
|
+
/**
|
|
353
|
+
* A build's report of what it cost: how long it and each of its stages ran,
|
|
354
|
+
* plus the terms FDR needs to turn that into reserved-resource cost. A pod's
|
|
355
|
+
* requests are reserved for its whole lifetime whatever it actually uses, so
|
|
356
|
+
* the cost of a build is requests × duration, and both terms are here.
|
|
357
|
+
*
|
|
358
|
+
* The Job reduces its own stage marks to these seconds before sending them
|
|
359
|
+
* (`scripts/build-telemetry.ts` in the astro package, whose
|
|
360
|
+
* `build-telemetry.test.ts` asserts the parity against this schema); the full
|
|
361
|
+
* nested timing record stays where it has always been, in `build.json` in R2.
|
|
362
|
+
*/
|
|
363
|
+
export declare const StaticBuildTelemetrySchema: z.ZodObject<{
|
|
364
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
365
|
+
/**
|
|
366
|
+
* The Job's own view of which site and build this was. FDR logs the
|
|
367
|
+
* promotion token's claim instead, which it signed itself; these are kept
|
|
368
|
+
* only so a report can be matched back to the record in R2, and are absent
|
|
369
|
+
* when the Job's environment did not name them.
|
|
370
|
+
*/
|
|
371
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
372
|
+
buildId: z.ZodOptional<z.ZodString>;
|
|
373
|
+
/** Parallel `astro build` shards the render used; cores and memory scale from it. */
|
|
374
|
+
shards: z.ZodNumber;
|
|
375
|
+
/** vCPU one shard reserved, for the pod's whole lifetime. */
|
|
376
|
+
cpuPerShard: z.ZodNumber;
|
|
377
|
+
/** GiB one shard reserved, likewise. */
|
|
378
|
+
memoryGiPerShard: z.ZodNumber;
|
|
379
|
+
/**
|
|
380
|
+
* The pod's wall clock, first stage mark to last. Absent when the stages
|
|
381
|
+
* left too few marks to span, in which case there is no cost to derive
|
|
382
|
+
* either: a build that cannot be timed must not be logged as a free one.
|
|
383
|
+
*/
|
|
384
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
385
|
+
/**
|
|
386
|
+
* How long each stage of the Job ran, so a regression can be attributed to
|
|
387
|
+
* one. Named stages rather than a map, so a stray stage file cannot widen
|
|
388
|
+
* the log line FDR writes from this.
|
|
389
|
+
*/
|
|
390
|
+
stageSeconds: z.ZodDefault<z.ZodObject<{
|
|
391
|
+
hydrate: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
build: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
export: z.ZodOptional<z.ZodNumber>;
|
|
394
|
+
}, "strip", z.ZodTypeAny, {
|
|
395
|
+
hydrate?: number | undefined;
|
|
396
|
+
build?: number | undefined;
|
|
397
|
+
export?: number | undefined;
|
|
398
|
+
}, {
|
|
399
|
+
hydrate?: number | undefined;
|
|
400
|
+
build?: number | undefined;
|
|
401
|
+
export?: number | undefined;
|
|
402
|
+
}>>;
|
|
403
|
+
/**
|
|
404
|
+
* Which build this was of its deployment. A shadow build renders the same
|
|
405
|
+
* deployment without being served; its cost is the thing being judged, so
|
|
406
|
+
* it must be separable in a query rather than derivable from a name.
|
|
407
|
+
*/
|
|
408
|
+
variant: z.ZodOptional<z.ZodEnum<["normal", "shadow"]>>;
|
|
409
|
+
/** The original build's id when `variant` is `shadow`. */
|
|
410
|
+
shadowOf: z.ZodOptional<z.ZodString>;
|
|
411
|
+
}, "strip", z.ZodTypeAny, {
|
|
412
|
+
schemaVersion: 1;
|
|
413
|
+
shards: number;
|
|
414
|
+
cpuPerShard: number;
|
|
415
|
+
memoryGiPerShard: number;
|
|
416
|
+
stageSeconds: {
|
|
417
|
+
hydrate?: number | undefined;
|
|
418
|
+
build?: number | undefined;
|
|
419
|
+
export?: number | undefined;
|
|
420
|
+
};
|
|
421
|
+
variant?: "normal" | "shadow" | undefined;
|
|
422
|
+
domain?: string | undefined;
|
|
423
|
+
buildId?: string | undefined;
|
|
424
|
+
durationSeconds?: number | undefined;
|
|
425
|
+
shadowOf?: string | undefined;
|
|
426
|
+
}, {
|
|
427
|
+
schemaVersion: 1;
|
|
428
|
+
shards: number;
|
|
429
|
+
cpuPerShard: number;
|
|
430
|
+
memoryGiPerShard: number;
|
|
431
|
+
variant?: "normal" | "shadow" | undefined;
|
|
432
|
+
domain?: string | undefined;
|
|
433
|
+
buildId?: string | undefined;
|
|
434
|
+
durationSeconds?: number | undefined;
|
|
435
|
+
stageSeconds?: {
|
|
436
|
+
hydrate?: number | undefined;
|
|
437
|
+
build?: number | undefined;
|
|
438
|
+
export?: number | undefined;
|
|
439
|
+
} | undefined;
|
|
440
|
+
shadowOf?: string | undefined;
|
|
441
|
+
}>;
|
|
352
442
|
/**
|
|
353
443
|
* Input for `POST /static-build/promote`: sent by a static build Job once its
|
|
354
444
|
* upload has landed. The token, signed by FDR when it dispatched the Job, is
|
|
@@ -356,10 +446,107 @@ export declare const ReindexResponseSchema: z.ZodObject<{
|
|
|
356
446
|
*/
|
|
357
447
|
export declare const PromoteStaticBuildInputSchema: z.ZodObject<{
|
|
358
448
|
token: z.ZodString;
|
|
449
|
+
/** Best effort: `.catch(undefined)` so a publish cannot fail over a measurement. */
|
|
450
|
+
telemetry: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
451
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
452
|
+
/**
|
|
453
|
+
* The Job's own view of which site and build this was. FDR logs the
|
|
454
|
+
* promotion token's claim instead, which it signed itself; these are kept
|
|
455
|
+
* only so a report can be matched back to the record in R2, and are absent
|
|
456
|
+
* when the Job's environment did not name them.
|
|
457
|
+
*/
|
|
458
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
459
|
+
buildId: z.ZodOptional<z.ZodString>;
|
|
460
|
+
/** Parallel `astro build` shards the render used; cores and memory scale from it. */
|
|
461
|
+
shards: z.ZodNumber;
|
|
462
|
+
/** vCPU one shard reserved, for the pod's whole lifetime. */
|
|
463
|
+
cpuPerShard: z.ZodNumber;
|
|
464
|
+
/** GiB one shard reserved, likewise. */
|
|
465
|
+
memoryGiPerShard: z.ZodNumber;
|
|
466
|
+
/**
|
|
467
|
+
* The pod's wall clock, first stage mark to last. Absent when the stages
|
|
468
|
+
* left too few marks to span, in which case there is no cost to derive
|
|
469
|
+
* either: a build that cannot be timed must not be logged as a free one.
|
|
470
|
+
*/
|
|
471
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
/**
|
|
473
|
+
* How long each stage of the Job ran, so a regression can be attributed to
|
|
474
|
+
* one. Named stages rather than a map, so a stray stage file cannot widen
|
|
475
|
+
* the log line FDR writes from this.
|
|
476
|
+
*/
|
|
477
|
+
stageSeconds: z.ZodDefault<z.ZodObject<{
|
|
478
|
+
hydrate: z.ZodOptional<z.ZodNumber>;
|
|
479
|
+
build: z.ZodOptional<z.ZodNumber>;
|
|
480
|
+
export: z.ZodOptional<z.ZodNumber>;
|
|
481
|
+
}, "strip", z.ZodTypeAny, {
|
|
482
|
+
hydrate?: number | undefined;
|
|
483
|
+
build?: number | undefined;
|
|
484
|
+
export?: number | undefined;
|
|
485
|
+
}, {
|
|
486
|
+
hydrate?: number | undefined;
|
|
487
|
+
build?: number | undefined;
|
|
488
|
+
export?: number | undefined;
|
|
489
|
+
}>>;
|
|
490
|
+
/**
|
|
491
|
+
* Which build this was of its deployment. A shadow build renders the same
|
|
492
|
+
* deployment without being served; its cost is the thing being judged, so
|
|
493
|
+
* it must be separable in a query rather than derivable from a name.
|
|
494
|
+
*/
|
|
495
|
+
variant: z.ZodOptional<z.ZodEnum<["normal", "shadow"]>>;
|
|
496
|
+
/** The original build's id when `variant` is `shadow`. */
|
|
497
|
+
shadowOf: z.ZodOptional<z.ZodString>;
|
|
498
|
+
}, "strip", z.ZodTypeAny, {
|
|
499
|
+
schemaVersion: 1;
|
|
500
|
+
shards: number;
|
|
501
|
+
cpuPerShard: number;
|
|
502
|
+
memoryGiPerShard: number;
|
|
503
|
+
stageSeconds: {
|
|
504
|
+
hydrate?: number | undefined;
|
|
505
|
+
build?: number | undefined;
|
|
506
|
+
export?: number | undefined;
|
|
507
|
+
};
|
|
508
|
+
variant?: "normal" | "shadow" | undefined;
|
|
509
|
+
domain?: string | undefined;
|
|
510
|
+
buildId?: string | undefined;
|
|
511
|
+
durationSeconds?: number | undefined;
|
|
512
|
+
shadowOf?: string | undefined;
|
|
513
|
+
}, {
|
|
514
|
+
schemaVersion: 1;
|
|
515
|
+
shards: number;
|
|
516
|
+
cpuPerShard: number;
|
|
517
|
+
memoryGiPerShard: number;
|
|
518
|
+
variant?: "normal" | "shadow" | undefined;
|
|
519
|
+
domain?: string | undefined;
|
|
520
|
+
buildId?: string | undefined;
|
|
521
|
+
durationSeconds?: number | undefined;
|
|
522
|
+
stageSeconds?: {
|
|
523
|
+
hydrate?: number | undefined;
|
|
524
|
+
build?: number | undefined;
|
|
525
|
+
export?: number | undefined;
|
|
526
|
+
} | undefined;
|
|
527
|
+
shadowOf?: string | undefined;
|
|
528
|
+
}>>>;
|
|
359
529
|
}, "strip", z.ZodTypeAny, {
|
|
360
530
|
token: string;
|
|
531
|
+
telemetry?: {
|
|
532
|
+
schemaVersion: 1;
|
|
533
|
+
shards: number;
|
|
534
|
+
cpuPerShard: number;
|
|
535
|
+
memoryGiPerShard: number;
|
|
536
|
+
stageSeconds: {
|
|
537
|
+
hydrate?: number | undefined;
|
|
538
|
+
build?: number | undefined;
|
|
539
|
+
export?: number | undefined;
|
|
540
|
+
};
|
|
541
|
+
variant?: "normal" | "shadow" | undefined;
|
|
542
|
+
domain?: string | undefined;
|
|
543
|
+
buildId?: string | undefined;
|
|
544
|
+
durationSeconds?: number | undefined;
|
|
545
|
+
shadowOf?: string | undefined;
|
|
546
|
+
} | undefined;
|
|
361
547
|
}, {
|
|
362
548
|
token: string;
|
|
549
|
+
telemetry?: unknown;
|
|
363
550
|
}>;
|
|
364
551
|
export declare const PromoteStaticBuildResponseSchema: z.ZodObject<{
|
|
365
552
|
buildId: z.ZodString;
|
|
@@ -51736,6 +51923,7 @@ export type ReindexInput = z.output<typeof ReindexInputSchema>;
|
|
|
51736
51923
|
export type ReindexResponse = z.infer<typeof ReindexResponseSchema>;
|
|
51737
51924
|
export type PromoteStaticBuildInput = z.output<typeof PromoteStaticBuildInputSchema>;
|
|
51738
51925
|
export type PromoteStaticBuildResponse = z.infer<typeof PromoteStaticBuildResponseSchema>;
|
|
51926
|
+
export type StaticBuildTelemetry = z.infer<typeof StaticBuildTelemetrySchema>;
|
|
51739
51927
|
/**
|
|
51740
51928
|
* Input for `GET /static-build/files`: one page of the files a site's live
|
|
51741
51929
|
* static build serves, for downloading the site. The caller must belong to the
|
|
@@ -60266,10 +60454,107 @@ export declare const docsLedgerContract: {
|
|
|
60266
60454
|
}>, Record<never, never>, Record<never, never>>;
|
|
60267
60455
|
promoteStaticBuild: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
60268
60456
|
token: z.ZodString;
|
|
60457
|
+
/** Best effort: `.catch(undefined)` so a publish cannot fail over a measurement. */
|
|
60458
|
+
telemetry: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
60459
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
60460
|
+
/**
|
|
60461
|
+
* The Job's own view of which site and build this was. FDR logs the
|
|
60462
|
+
* promotion token's claim instead, which it signed itself; these are kept
|
|
60463
|
+
* only so a report can be matched back to the record in R2, and are absent
|
|
60464
|
+
* when the Job's environment did not name them.
|
|
60465
|
+
*/
|
|
60466
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
60467
|
+
buildId: z.ZodOptional<z.ZodString>;
|
|
60468
|
+
/** Parallel `astro build` shards the render used; cores and memory scale from it. */
|
|
60469
|
+
shards: z.ZodNumber;
|
|
60470
|
+
/** vCPU one shard reserved, for the pod's whole lifetime. */
|
|
60471
|
+
cpuPerShard: z.ZodNumber;
|
|
60472
|
+
/** GiB one shard reserved, likewise. */
|
|
60473
|
+
memoryGiPerShard: z.ZodNumber;
|
|
60474
|
+
/**
|
|
60475
|
+
* The pod's wall clock, first stage mark to last. Absent when the stages
|
|
60476
|
+
* left too few marks to span, in which case there is no cost to derive
|
|
60477
|
+
* either: a build that cannot be timed must not be logged as a free one.
|
|
60478
|
+
*/
|
|
60479
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
60480
|
+
/**
|
|
60481
|
+
* How long each stage of the Job ran, so a regression can be attributed to
|
|
60482
|
+
* one. Named stages rather than a map, so a stray stage file cannot widen
|
|
60483
|
+
* the log line FDR writes from this.
|
|
60484
|
+
*/
|
|
60485
|
+
stageSeconds: z.ZodDefault<z.ZodObject<{
|
|
60486
|
+
hydrate: z.ZodOptional<z.ZodNumber>;
|
|
60487
|
+
build: z.ZodOptional<z.ZodNumber>;
|
|
60488
|
+
export: z.ZodOptional<z.ZodNumber>;
|
|
60489
|
+
}, "strip", z.ZodTypeAny, {
|
|
60490
|
+
hydrate?: number | undefined;
|
|
60491
|
+
build?: number | undefined;
|
|
60492
|
+
export?: number | undefined;
|
|
60493
|
+
}, {
|
|
60494
|
+
hydrate?: number | undefined;
|
|
60495
|
+
build?: number | undefined;
|
|
60496
|
+
export?: number | undefined;
|
|
60497
|
+
}>>;
|
|
60498
|
+
/**
|
|
60499
|
+
* Which build this was of its deployment. A shadow build renders the same
|
|
60500
|
+
* deployment without being served; its cost is the thing being judged, so
|
|
60501
|
+
* it must be separable in a query rather than derivable from a name.
|
|
60502
|
+
*/
|
|
60503
|
+
variant: z.ZodOptional<z.ZodEnum<["normal", "shadow"]>>;
|
|
60504
|
+
/** The original build's id when `variant` is `shadow`. */
|
|
60505
|
+
shadowOf: z.ZodOptional<z.ZodString>;
|
|
60506
|
+
}, "strip", z.ZodTypeAny, {
|
|
60507
|
+
schemaVersion: 1;
|
|
60508
|
+
shards: number;
|
|
60509
|
+
cpuPerShard: number;
|
|
60510
|
+
memoryGiPerShard: number;
|
|
60511
|
+
stageSeconds: {
|
|
60512
|
+
hydrate?: number | undefined;
|
|
60513
|
+
build?: number | undefined;
|
|
60514
|
+
export?: number | undefined;
|
|
60515
|
+
};
|
|
60516
|
+
variant?: "normal" | "shadow" | undefined;
|
|
60517
|
+
domain?: string | undefined;
|
|
60518
|
+
buildId?: string | undefined;
|
|
60519
|
+
durationSeconds?: number | undefined;
|
|
60520
|
+
shadowOf?: string | undefined;
|
|
60521
|
+
}, {
|
|
60522
|
+
schemaVersion: 1;
|
|
60523
|
+
shards: number;
|
|
60524
|
+
cpuPerShard: number;
|
|
60525
|
+
memoryGiPerShard: number;
|
|
60526
|
+
variant?: "normal" | "shadow" | undefined;
|
|
60527
|
+
domain?: string | undefined;
|
|
60528
|
+
buildId?: string | undefined;
|
|
60529
|
+
durationSeconds?: number | undefined;
|
|
60530
|
+
stageSeconds?: {
|
|
60531
|
+
hydrate?: number | undefined;
|
|
60532
|
+
build?: number | undefined;
|
|
60533
|
+
export?: number | undefined;
|
|
60534
|
+
} | undefined;
|
|
60535
|
+
shadowOf?: string | undefined;
|
|
60536
|
+
}>>>;
|
|
60269
60537
|
}, "strip", z.ZodTypeAny, {
|
|
60270
60538
|
token: string;
|
|
60539
|
+
telemetry?: {
|
|
60540
|
+
schemaVersion: 1;
|
|
60541
|
+
shards: number;
|
|
60542
|
+
cpuPerShard: number;
|
|
60543
|
+
memoryGiPerShard: number;
|
|
60544
|
+
stageSeconds: {
|
|
60545
|
+
hydrate?: number | undefined;
|
|
60546
|
+
build?: number | undefined;
|
|
60547
|
+
export?: number | undefined;
|
|
60548
|
+
};
|
|
60549
|
+
variant?: "normal" | "shadow" | undefined;
|
|
60550
|
+
domain?: string | undefined;
|
|
60551
|
+
buildId?: string | undefined;
|
|
60552
|
+
durationSeconds?: number | undefined;
|
|
60553
|
+
shadowOf?: string | undefined;
|
|
60554
|
+
} | undefined;
|
|
60271
60555
|
}, {
|
|
60272
60556
|
token: string;
|
|
60557
|
+
telemetry?: unknown;
|
|
60273
60558
|
}>, z.ZodObject<{
|
|
60274
60559
|
buildId: z.ZodString;
|
|
60275
60560
|
/** Every host now pointed at the build, the serving host first. */
|