@treeseed/sdk 0.13.0-rc.71 → 0.13.0-rc.73

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.
@@ -321,19 +321,122 @@ export declare const hostedResourceObservationSchema: z.ZodObject<{
321
321
  observedDigest: string | null;
322
322
  observedAt: string;
323
323
  }>;
324
- export declare const hostedTopologyPlanSchema: z.ZodObject<{
325
- schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-plan/v1">;
326
- planId: z.ZodString;
327
- planDigest: z.ZodString;
328
- declarationDigest: z.ZodString;
329
- topologyId: z.ZodString;
330
- environment: z.ZodEnum<["staging", "production"]>;
331
- platformCommit: z.ZodString;
332
- actions: z.ZodArray<z.ZodObject<{
324
+ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
325
+ readonly schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-plan/v1">;
326
+ readonly planId: z.ZodString;
327
+ readonly planDigest: z.ZodString;
328
+ readonly declarationDigest: z.ZodString;
329
+ readonly topologyId: z.ZodString;
330
+ readonly environment: z.ZodEnum<["staging", "production"]>;
331
+ readonly platformCommit: z.ZodString;
332
+ readonly actions: z.ZodArray<z.ZodObject<{
333
333
  resourceId: z.ZodString;
334
334
  provider: z.ZodEnum<["cloudflare", "railway"]>;
335
335
  kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
336
336
  action: z.ZodEnum<["create", "adopt", "update", "noop"]>;
337
+ desiredResource: z.ZodObject<{
338
+ id: z.ZodString;
339
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
340
+ kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
341
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
342
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
343
+ input: z.ZodString;
344
+ }, "strict", z.ZodTypeAny, {
345
+ input: string;
346
+ }, {
347
+ input: string;
348
+ }>, z.ZodObject<{
349
+ artifact: z.ZodString;
350
+ }, "strict", z.ZodTypeAny, {
351
+ artifact: string;
352
+ }, {
353
+ artifact: string;
354
+ }>, z.ZodObject<{
355
+ resourceOutput: z.ZodObject<{
356
+ resourceId: z.ZodString;
357
+ output: z.ZodString;
358
+ }, "strict", z.ZodTypeAny, {
359
+ resourceId: string;
360
+ output: string;
361
+ }, {
362
+ resourceId: string;
363
+ output: string;
364
+ }>;
365
+ }, "strict", z.ZodTypeAny, {
366
+ resourceOutput: {
367
+ resourceId: string;
368
+ output: string;
369
+ };
370
+ }, {
371
+ resourceOutput: {
372
+ resourceId: string;
373
+ output: string;
374
+ };
375
+ }>, z.ZodObject<{
376
+ literal: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
377
+ }, "strict", z.ZodTypeAny, {
378
+ literal: string | number | boolean;
379
+ }, {
380
+ literal: string | number | boolean;
381
+ }>]>>>;
382
+ adoption: z.ZodObject<{
383
+ mode: z.ZodLiteral<"adopt-or-create">;
384
+ externalIdInput: z.ZodOptional<z.ZodString>;
385
+ replacement: z.ZodLiteral<"forbidden">;
386
+ }, "strict", z.ZodTypeAny, {
387
+ mode: "adopt-or-create";
388
+ replacement: "forbidden";
389
+ externalIdInput?: string | undefined;
390
+ }, {
391
+ mode: "adopt-or-create";
392
+ replacement: "forbidden";
393
+ externalIdInput?: string | undefined;
394
+ }>;
395
+ }, "strict", z.ZodTypeAny, {
396
+ id: string;
397
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
398
+ provider: "cloudflare" | "railway";
399
+ dependsOn: string[];
400
+ parameters: Record<string, {
401
+ input: string;
402
+ } | {
403
+ artifact: string;
404
+ } | {
405
+ resourceOutput: {
406
+ resourceId: string;
407
+ output: string;
408
+ };
409
+ } | {
410
+ literal: string | number | boolean;
411
+ }>;
412
+ adoption: {
413
+ mode: "adopt-or-create";
414
+ replacement: "forbidden";
415
+ externalIdInput?: string | undefined;
416
+ };
417
+ }, {
418
+ id: string;
419
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
420
+ provider: "cloudflare" | "railway";
421
+ adoption: {
422
+ mode: "adopt-or-create";
423
+ replacement: "forbidden";
424
+ externalIdInput?: string | undefined;
425
+ };
426
+ dependsOn?: string[] | undefined;
427
+ parameters?: Record<string, {
428
+ input: string;
429
+ } | {
430
+ artifact: string;
431
+ } | {
432
+ resourceOutput: {
433
+ resourceId: string;
434
+ output: string;
435
+ };
436
+ } | {
437
+ literal: string | number | boolean;
438
+ }> | undefined;
439
+ }>;
337
440
  desiredDigest: z.ZodString;
338
441
  previousDigest: z.ZodNullable<z.ZodString>;
339
442
  providerResourceId: z.ZodNullable<z.ZodString>;
@@ -343,6 +446,29 @@ export declare const hostedTopologyPlanSchema: z.ZodObject<{
343
446
  kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
344
447
  provider: "cloudflare" | "railway";
345
448
  providerResourceId: string | null;
449
+ desiredResource: {
450
+ id: string;
451
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
452
+ provider: "cloudflare" | "railway";
453
+ dependsOn: string[];
454
+ parameters: Record<string, {
455
+ input: string;
456
+ } | {
457
+ artifact: string;
458
+ } | {
459
+ resourceOutput: {
460
+ resourceId: string;
461
+ output: string;
462
+ };
463
+ } | {
464
+ literal: string | number | boolean;
465
+ }>;
466
+ adoption: {
467
+ mode: "adopt-or-create";
468
+ replacement: "forbidden";
469
+ externalIdInput?: string | undefined;
470
+ };
471
+ };
346
472
  desiredDigest: string;
347
473
  previousDigest: string | null;
348
474
  }, {
@@ -351,10 +477,33 @@ export declare const hostedTopologyPlanSchema: z.ZodObject<{
351
477
  kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
352
478
  provider: "cloudflare" | "railway";
353
479
  providerResourceId: string | null;
480
+ desiredResource: {
481
+ id: string;
482
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
483
+ provider: "cloudflare" | "railway";
484
+ adoption: {
485
+ mode: "adopt-or-create";
486
+ replacement: "forbidden";
487
+ externalIdInput?: string | undefined;
488
+ };
489
+ dependsOn?: string[] | undefined;
490
+ parameters?: Record<string, {
491
+ input: string;
492
+ } | {
493
+ artifact: string;
494
+ } | {
495
+ resourceOutput: {
496
+ resourceId: string;
497
+ output: string;
498
+ };
499
+ } | {
500
+ literal: string | number | boolean;
501
+ }> | undefined;
502
+ };
354
503
  desiredDigest: string;
355
504
  previousDigest: string | null;
356
505
  }>, "many">;
357
- blockers: z.ZodArray<z.ZodObject<{
506
+ readonly blockers: z.ZodArray<z.ZodObject<{
358
507
  code: z.ZodEnum<["connection-unavailable", "dependency-cycle", "observation-unhealthy", "adoption-drift"]>;
359
508
  resourceId: z.ZodOptional<z.ZodString>;
360
509
  message: z.ZodString;
@@ -367,8 +516,8 @@ export declare const hostedTopologyPlanSchema: z.ZodObject<{
367
516
  message: string;
368
517
  resourceId?: string | undefined;
369
518
  }>, "many">;
370
- approvalRequired: z.ZodBoolean;
371
- executable: z.ZodLiteral<false>;
519
+ readonly approvalRequired: z.ZodBoolean;
520
+ readonly executable: z.ZodLiteral<false>;
372
521
  }, "strict", z.ZodTypeAny, {
373
522
  schemaVersion: "treeseed.hosted-topology-plan/v1";
374
523
  blockers: {
@@ -383,6 +532,123 @@ export declare const hostedTopologyPlanSchema: z.ZodObject<{
383
532
  kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
384
533
  provider: "cloudflare" | "railway";
385
534
  providerResourceId: string | null;
535
+ desiredResource: {
536
+ id: string;
537
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
538
+ provider: "cloudflare" | "railway";
539
+ dependsOn: string[];
540
+ parameters: Record<string, {
541
+ input: string;
542
+ } | {
543
+ artifact: string;
544
+ } | {
545
+ resourceOutput: {
546
+ resourceId: string;
547
+ output: string;
548
+ };
549
+ } | {
550
+ literal: string | number | boolean;
551
+ }>;
552
+ adoption: {
553
+ mode: "adopt-or-create";
554
+ replacement: "forbidden";
555
+ externalIdInput?: string | undefined;
556
+ };
557
+ };
558
+ desiredDigest: string;
559
+ previousDigest: string | null;
560
+ }[];
561
+ environment: "production" | "staging";
562
+ executable: false;
563
+ planId: string;
564
+ declarationDigest: string;
565
+ topologyId: string;
566
+ platformCommit: string;
567
+ approvalRequired: boolean;
568
+ }, {
569
+ schemaVersion: "treeseed.hosted-topology-plan/v1";
570
+ blockers: {
571
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
572
+ message: string;
573
+ resourceId?: string | undefined;
574
+ }[];
575
+ planDigest: string;
576
+ actions: {
577
+ action: "noop" | "create" | "adopt" | "update";
578
+ resourceId: string;
579
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
580
+ provider: "cloudflare" | "railway";
581
+ providerResourceId: string | null;
582
+ desiredResource: {
583
+ id: string;
584
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
585
+ provider: "cloudflare" | "railway";
586
+ adoption: {
587
+ mode: "adopt-or-create";
588
+ replacement: "forbidden";
589
+ externalIdInput?: string | undefined;
590
+ };
591
+ dependsOn?: string[] | undefined;
592
+ parameters?: Record<string, {
593
+ input: string;
594
+ } | {
595
+ artifact: string;
596
+ } | {
597
+ resourceOutput: {
598
+ resourceId: string;
599
+ output: string;
600
+ };
601
+ } | {
602
+ literal: string | number | boolean;
603
+ }> | undefined;
604
+ };
605
+ desiredDigest: string;
606
+ previousDigest: string | null;
607
+ }[];
608
+ environment: "production" | "staging";
609
+ executable: false;
610
+ planId: string;
611
+ declarationDigest: string;
612
+ topologyId: string;
613
+ platformCommit: string;
614
+ approvalRequired: boolean;
615
+ }>, {
616
+ schemaVersion: "treeseed.hosted-topology-plan/v1";
617
+ blockers: {
618
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
619
+ message: string;
620
+ resourceId?: string | undefined;
621
+ }[];
622
+ planDigest: string;
623
+ actions: {
624
+ action: "noop" | "create" | "adopt" | "update";
625
+ resourceId: string;
626
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
627
+ provider: "cloudflare" | "railway";
628
+ providerResourceId: string | null;
629
+ desiredResource: {
630
+ id: string;
631
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
632
+ provider: "cloudflare" | "railway";
633
+ dependsOn: string[];
634
+ parameters: Record<string, {
635
+ input: string;
636
+ } | {
637
+ artifact: string;
638
+ } | {
639
+ resourceOutput: {
640
+ resourceId: string;
641
+ output: string;
642
+ };
643
+ } | {
644
+ literal: string | number | boolean;
645
+ }>;
646
+ adoption: {
647
+ mode: "adopt-or-create";
648
+ replacement: "forbidden";
649
+ externalIdInput?: string | undefined;
650
+ };
651
+ };
386
652
  desiredDigest: string;
387
653
  previousDigest: string | null;
388
654
  }[];
@@ -407,6 +673,29 @@ export declare const hostedTopologyPlanSchema: z.ZodObject<{
407
673
  kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
408
674
  provider: "cloudflare" | "railway";
409
675
  providerResourceId: string | null;
676
+ desiredResource: {
677
+ id: string;
678
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
679
+ provider: "cloudflare" | "railway";
680
+ adoption: {
681
+ mode: "adopt-or-create";
682
+ replacement: "forbidden";
683
+ externalIdInput?: string | undefined;
684
+ };
685
+ dependsOn?: string[] | undefined;
686
+ parameters?: Record<string, {
687
+ input: string;
688
+ } | {
689
+ artifact: string;
690
+ } | {
691
+ resourceOutput: {
692
+ resourceId: string;
693
+ output: string;
694
+ };
695
+ } | {
696
+ literal: string | number | boolean;
697
+ }> | undefined;
698
+ };
410
699
  desiredDigest: string;
411
700
  previousDigest: string | null;
412
701
  }[];
@@ -440,7 +729,30 @@ export declare const hostedTopologyApprovalSchema: z.ZodObject<{
440
729
  approvedBy: string;
441
730
  approvedAt: string;
442
731
  }>;
443
- export declare const authorizedHostedTopologyPlanSchema: z.ZodObject<Omit<{
732
+ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<Omit<{
733
+ executable: z.ZodLiteral<true>;
734
+ approval: z.ZodNullable<z.ZodObject<{
735
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-approval/v1">;
736
+ planDigest: z.ZodString;
737
+ environment: z.ZodEnum<["staging", "production"]>;
738
+ decision: z.ZodLiteral<"approved">;
739
+ approvedBy: z.ZodString;
740
+ approvedAt: z.ZodString;
741
+ }, "strict", z.ZodTypeAny, {
742
+ schemaVersion: "treeseed.hosted-topology-approval/v1";
743
+ planDigest: string;
744
+ environment: "production" | "staging";
745
+ decision: "approved";
746
+ approvedBy: string;
747
+ approvedAt: string;
748
+ }, {
749
+ schemaVersion: "treeseed.hosted-topology-approval/v1";
750
+ planDigest: string;
751
+ environment: "production" | "staging";
752
+ decision: "approved";
753
+ approvedBy: string;
754
+ approvedAt: string;
755
+ }>>;
444
756
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-plan/v1">;
445
757
  planId: z.ZodString;
446
758
  planDigest: z.ZodString;
@@ -453,6 +765,109 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodObject<Omit<{
453
765
  provider: z.ZodEnum<["cloudflare", "railway"]>;
454
766
  kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
455
767
  action: z.ZodEnum<["create", "adopt", "update", "noop"]>;
768
+ desiredResource: z.ZodObject<{
769
+ id: z.ZodString;
770
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
771
+ kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
772
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
773
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
774
+ input: z.ZodString;
775
+ }, "strict", z.ZodTypeAny, {
776
+ input: string;
777
+ }, {
778
+ input: string;
779
+ }>, z.ZodObject<{
780
+ artifact: z.ZodString;
781
+ }, "strict", z.ZodTypeAny, {
782
+ artifact: string;
783
+ }, {
784
+ artifact: string;
785
+ }>, z.ZodObject<{
786
+ resourceOutput: z.ZodObject<{
787
+ resourceId: z.ZodString;
788
+ output: z.ZodString;
789
+ }, "strict", z.ZodTypeAny, {
790
+ resourceId: string;
791
+ output: string;
792
+ }, {
793
+ resourceId: string;
794
+ output: string;
795
+ }>;
796
+ }, "strict", z.ZodTypeAny, {
797
+ resourceOutput: {
798
+ resourceId: string;
799
+ output: string;
800
+ };
801
+ }, {
802
+ resourceOutput: {
803
+ resourceId: string;
804
+ output: string;
805
+ };
806
+ }>, z.ZodObject<{
807
+ literal: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
808
+ }, "strict", z.ZodTypeAny, {
809
+ literal: string | number | boolean;
810
+ }, {
811
+ literal: string | number | boolean;
812
+ }>]>>>;
813
+ adoption: z.ZodObject<{
814
+ mode: z.ZodLiteral<"adopt-or-create">;
815
+ externalIdInput: z.ZodOptional<z.ZodString>;
816
+ replacement: z.ZodLiteral<"forbidden">;
817
+ }, "strict", z.ZodTypeAny, {
818
+ mode: "adopt-or-create";
819
+ replacement: "forbidden";
820
+ externalIdInput?: string | undefined;
821
+ }, {
822
+ mode: "adopt-or-create";
823
+ replacement: "forbidden";
824
+ externalIdInput?: string | undefined;
825
+ }>;
826
+ }, "strict", z.ZodTypeAny, {
827
+ id: string;
828
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
829
+ provider: "cloudflare" | "railway";
830
+ dependsOn: string[];
831
+ parameters: Record<string, {
832
+ input: string;
833
+ } | {
834
+ artifact: string;
835
+ } | {
836
+ resourceOutput: {
837
+ resourceId: string;
838
+ output: string;
839
+ };
840
+ } | {
841
+ literal: string | number | boolean;
842
+ }>;
843
+ adoption: {
844
+ mode: "adopt-or-create";
845
+ replacement: "forbidden";
846
+ externalIdInput?: string | undefined;
847
+ };
848
+ }, {
849
+ id: string;
850
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
851
+ provider: "cloudflare" | "railway";
852
+ adoption: {
853
+ mode: "adopt-or-create";
854
+ replacement: "forbidden";
855
+ externalIdInput?: string | undefined;
856
+ };
857
+ dependsOn?: string[] | undefined;
858
+ parameters?: Record<string, {
859
+ input: string;
860
+ } | {
861
+ artifact: string;
862
+ } | {
863
+ resourceOutput: {
864
+ resourceId: string;
865
+ output: string;
866
+ };
867
+ } | {
868
+ literal: string | number | boolean;
869
+ }> | undefined;
870
+ }>;
456
871
  desiredDigest: z.ZodString;
457
872
  previousDigest: z.ZodNullable<z.ZodString>;
458
873
  providerResourceId: z.ZodNullable<z.ZodString>;
@@ -462,6 +877,29 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodObject<Omit<{
462
877
  kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
463
878
  provider: "cloudflare" | "railway";
464
879
  providerResourceId: string | null;
880
+ desiredResource: {
881
+ id: string;
882
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
883
+ provider: "cloudflare" | "railway";
884
+ dependsOn: string[];
885
+ parameters: Record<string, {
886
+ input: string;
887
+ } | {
888
+ artifact: string;
889
+ } | {
890
+ resourceOutput: {
891
+ resourceId: string;
892
+ output: string;
893
+ };
894
+ } | {
895
+ literal: string | number | boolean;
896
+ }>;
897
+ adoption: {
898
+ mode: "adopt-or-create";
899
+ replacement: "forbidden";
900
+ externalIdInput?: string | undefined;
901
+ };
902
+ };
465
903
  desiredDigest: string;
466
904
  previousDigest: string | null;
467
905
  }, {
@@ -470,6 +908,29 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodObject<Omit<{
470
908
  kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
471
909
  provider: "cloudflare" | "railway";
472
910
  providerResourceId: string | null;
911
+ desiredResource: {
912
+ id: string;
913
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
914
+ provider: "cloudflare" | "railway";
915
+ adoption: {
916
+ mode: "adopt-or-create";
917
+ replacement: "forbidden";
918
+ externalIdInput?: string | undefined;
919
+ };
920
+ dependsOn?: string[] | undefined;
921
+ parameters?: Record<string, {
922
+ input: string;
923
+ } | {
924
+ artifact: string;
925
+ } | {
926
+ resourceOutput: {
927
+ resourceId: string;
928
+ output: string;
929
+ };
930
+ } | {
931
+ literal: string | number | boolean;
932
+ }> | undefined;
933
+ };
473
934
  desiredDigest: string;
474
935
  previousDigest: string | null;
475
936
  }>, "many">;
@@ -487,31 +948,115 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodObject<Omit<{
487
948
  resourceId?: string | undefined;
488
949
  }>, "many">;
489
950
  approvalRequired: z.ZodBoolean;
490
- } & {
491
- executable: z.ZodLiteral<true>;
492
- approval: z.ZodNullable<z.ZodObject<{
493
- schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-approval/v1">;
494
- planDigest: z.ZodString;
495
- environment: z.ZodEnum<["staging", "production"]>;
496
- decision: z.ZodLiteral<"approved">;
497
- approvedBy: z.ZodString;
498
- approvedAt: z.ZodString;
499
- }, "strict", z.ZodTypeAny, {
951
+ }, "approvalRequired">, "strict", z.ZodTypeAny, {
952
+ schemaVersion: "treeseed.hosted-topology-plan/v1";
953
+ blockers: {
954
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
955
+ message: string;
956
+ resourceId?: string | undefined;
957
+ }[];
958
+ planDigest: string;
959
+ actions: {
960
+ action: "noop" | "create" | "adopt" | "update";
961
+ resourceId: string;
962
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
963
+ provider: "cloudflare" | "railway";
964
+ providerResourceId: string | null;
965
+ desiredResource: {
966
+ id: string;
967
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
968
+ provider: "cloudflare" | "railway";
969
+ dependsOn: string[];
970
+ parameters: Record<string, {
971
+ input: string;
972
+ } | {
973
+ artifact: string;
974
+ } | {
975
+ resourceOutput: {
976
+ resourceId: string;
977
+ output: string;
978
+ };
979
+ } | {
980
+ literal: string | number | boolean;
981
+ }>;
982
+ adoption: {
983
+ mode: "adopt-or-create";
984
+ replacement: "forbidden";
985
+ externalIdInput?: string | undefined;
986
+ };
987
+ };
988
+ desiredDigest: string;
989
+ previousDigest: string | null;
990
+ }[];
991
+ environment: "production" | "staging";
992
+ executable: true;
993
+ planId: string;
994
+ declarationDigest: string;
995
+ topologyId: string;
996
+ platformCommit: string;
997
+ approval: {
500
998
  schemaVersion: "treeseed.hosted-topology-approval/v1";
501
999
  planDigest: string;
502
1000
  environment: "production" | "staging";
503
1001
  decision: "approved";
504
1002
  approvedBy: string;
505
1003
  approvedAt: string;
506
- }, {
1004
+ } | null;
1005
+ }, {
1006
+ schemaVersion: "treeseed.hosted-topology-plan/v1";
1007
+ blockers: {
1008
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1009
+ message: string;
1010
+ resourceId?: string | undefined;
1011
+ }[];
1012
+ planDigest: string;
1013
+ actions: {
1014
+ action: "noop" | "create" | "adopt" | "update";
1015
+ resourceId: string;
1016
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1017
+ provider: "cloudflare" | "railway";
1018
+ providerResourceId: string | null;
1019
+ desiredResource: {
1020
+ id: string;
1021
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1022
+ provider: "cloudflare" | "railway";
1023
+ adoption: {
1024
+ mode: "adopt-or-create";
1025
+ replacement: "forbidden";
1026
+ externalIdInput?: string | undefined;
1027
+ };
1028
+ dependsOn?: string[] | undefined;
1029
+ parameters?: Record<string, {
1030
+ input: string;
1031
+ } | {
1032
+ artifact: string;
1033
+ } | {
1034
+ resourceOutput: {
1035
+ resourceId: string;
1036
+ output: string;
1037
+ };
1038
+ } | {
1039
+ literal: string | number | boolean;
1040
+ }> | undefined;
1041
+ };
1042
+ desiredDigest: string;
1043
+ previousDigest: string | null;
1044
+ }[];
1045
+ environment: "production" | "staging";
1046
+ executable: true;
1047
+ planId: string;
1048
+ declarationDigest: string;
1049
+ topologyId: string;
1050
+ platformCommit: string;
1051
+ approval: {
507
1052
  schemaVersion: "treeseed.hosted-topology-approval/v1";
508
1053
  planDigest: string;
509
1054
  environment: "production" | "staging";
510
1055
  decision: "approved";
511
1056
  approvedBy: string;
512
1057
  approvedAt: string;
513
- }>>;
514
- }, "approvalRequired">, "strict", z.ZodTypeAny, {
1058
+ } | null;
1059
+ }>, {
515
1060
  schemaVersion: "treeseed.hosted-topology-plan/v1";
516
1061
  blockers: {
517
1062
  code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
@@ -525,6 +1070,29 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodObject<Omit<{
525
1070
  kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
526
1071
  provider: "cloudflare" | "railway";
527
1072
  providerResourceId: string | null;
1073
+ desiredResource: {
1074
+ id: string;
1075
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1076
+ provider: "cloudflare" | "railway";
1077
+ dependsOn: string[];
1078
+ parameters: Record<string, {
1079
+ input: string;
1080
+ } | {
1081
+ artifact: string;
1082
+ } | {
1083
+ resourceOutput: {
1084
+ resourceId: string;
1085
+ output: string;
1086
+ };
1087
+ } | {
1088
+ literal: string | number | boolean;
1089
+ }>;
1090
+ adoption: {
1091
+ mode: "adopt-or-create";
1092
+ replacement: "forbidden";
1093
+ externalIdInput?: string | undefined;
1094
+ };
1095
+ };
528
1096
  desiredDigest: string;
529
1097
  previousDigest: string | null;
530
1098
  }[];
@@ -556,6 +1124,29 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodObject<Omit<{
556
1124
  kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
557
1125
  provider: "cloudflare" | "railway";
558
1126
  providerResourceId: string | null;
1127
+ desiredResource: {
1128
+ id: string;
1129
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1130
+ provider: "cloudflare" | "railway";
1131
+ adoption: {
1132
+ mode: "adopt-or-create";
1133
+ replacement: "forbidden";
1134
+ externalIdInput?: string | undefined;
1135
+ };
1136
+ dependsOn?: string[] | undefined;
1137
+ parameters?: Record<string, {
1138
+ input: string;
1139
+ } | {
1140
+ artifact: string;
1141
+ } | {
1142
+ resourceOutput: {
1143
+ resourceId: string;
1144
+ output: string;
1145
+ };
1146
+ } | {
1147
+ literal: string | number | boolean;
1148
+ }> | undefined;
1149
+ };
559
1150
  desiredDigest: string;
560
1151
  previousDigest: string | null;
561
1152
  }[];
@@ -705,6 +1296,7 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
705
1296
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback/v1">;
706
1297
  rollbackId: z.ZodString;
707
1298
  sourceReceiptId: z.ZodString;
1299
+ environment: z.ZodEnum<["staging", "production"]>;
708
1300
  operations: z.ZodArray<z.ZodObject<{
709
1301
  resourceId: z.ZodString;
710
1302
  action: z.ZodEnum<["restore", "delete-created", "noop"]>;
@@ -724,6 +1316,7 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
724
1316
  rollbackDigest: z.ZodString;
725
1317
  }, "strict", z.ZodTypeAny, {
726
1318
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
1319
+ environment: "production" | "staging";
727
1320
  operations: {
728
1321
  action: "noop" | "restore" | "delete-created";
729
1322
  resourceId: string;
@@ -735,6 +1328,7 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
735
1328
  rollbackDigest: string;
736
1329
  }, {
737
1330
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
1331
+ environment: "production" | "staging";
738
1332
  operations: {
739
1333
  action: "noop" | "restore" | "delete-created";
740
1334
  resourceId: string;
@@ -745,6 +1339,28 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
745
1339
  sourceReceiptId: string;
746
1340
  rollbackDigest: string;
747
1341
  }>;
1342
+ export declare const hostedTopologyRollbackApprovalSchema: z.ZodObject<{
1343
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback-approval/v1">;
1344
+ rollbackDigest: z.ZodString;
1345
+ environment: z.ZodEnum<["staging", "production"]>;
1346
+ decision: z.ZodLiteral<"approved">;
1347
+ approvedBy: z.ZodString;
1348
+ approvedAt: z.ZodString;
1349
+ }, "strict", z.ZodTypeAny, {
1350
+ schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
1351
+ environment: "production" | "staging";
1352
+ decision: "approved";
1353
+ approvedBy: string;
1354
+ approvedAt: string;
1355
+ rollbackDigest: string;
1356
+ }, {
1357
+ schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
1358
+ environment: "production" | "staging";
1359
+ decision: "approved";
1360
+ approvedBy: string;
1361
+ approvedAt: string;
1362
+ rollbackDigest: string;
1363
+ }>;
748
1364
  export type HostedTopologyDeclaration = z.infer<typeof hostedTopologyDeclarationSchema>;
749
1365
  export type HostedResourceObservation = z.infer<typeof hostedResourceObservationSchema>;
750
1366
  export type HostedTopologyPlan = z.infer<typeof hostedTopologyPlanSchema>;
@@ -765,6 +1381,7 @@ export declare function verifyHostedTopologyReadback(input: {
765
1381
  }): HostedTopologyReceipt;
766
1382
  export declare function planHostedTopologyRollback(receiptInput: HostedTopologyReceipt): {
767
1383
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
1384
+ environment: "production" | "staging";
768
1385
  operations: {
769
1386
  action: "noop" | "restore" | "delete-created";
770
1387
  resourceId: string;
@@ -775,3 +1392,26 @@ export declare function planHostedTopologyRollback(receiptInput: HostedTopologyR
775
1392
  sourceReceiptId: string;
776
1393
  rollbackDigest: string;
777
1394
  };
1395
+ export declare function authorizeHostedTopologyRollback(rollbackInput: z.input<typeof hostedTopologyRollbackSchema>, approvalInput: z.input<typeof hostedTopologyRollbackApprovalSchema>): {
1396
+ rollback: {
1397
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
1398
+ environment: "production" | "staging";
1399
+ operations: {
1400
+ action: "noop" | "restore" | "delete-created";
1401
+ resourceId: string;
1402
+ providerResourceId: string;
1403
+ targetDigest: string | null;
1404
+ }[];
1405
+ rollbackId: string;
1406
+ sourceReceiptId: string;
1407
+ rollbackDigest: string;
1408
+ };
1409
+ approval: {
1410
+ schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
1411
+ environment: "production" | "staging";
1412
+ decision: "approved";
1413
+ approvedBy: string;
1414
+ approvedAt: string;
1415
+ rollbackDigest: string;
1416
+ };
1417
+ };