domainkit 0.14.1 → 0.16.0

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.
@@ -279,6 +279,8 @@ export declare const Zones: Schema.Struct<{
279
279
  readonly connections: Schema.$Array<Schema.Struct<{
280
280
  readonly connectionId: Schema.String;
281
281
  readonly provider: Schema.String;
282
+ /** What the provider called the account at connect time; `null` when it named none. */
283
+ readonly label: Schema.NullOr<Schema.String>;
282
284
  readonly status: Schema.Literals<readonly ["disconnected", "connected", "reconnect"]>;
283
285
  }>>;
284
286
  /** Every provider a customer could connect, so a picker offers one without a second call. */
@@ -336,6 +338,83 @@ export declare const Attempt: Schema.Struct<{
336
338
  }>>;
337
339
  }>;
338
340
  export type Attempt = typeof Attempt.Type;
341
+ /** What a batch's create and resume routes take: one domain and its requirements per item. */
342
+ export declare const BatchPayload: Schema.Struct<{
343
+ readonly items: Schema.$Array<Schema.Struct<{
344
+ readonly domain: Schema.String;
345
+ readonly requirements: Schema.$Array<Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>>;
346
+ }>>;
347
+ }>;
348
+ export type BatchPayload = typeof BatchPayload.Type;
349
+ /** The digest the principal read, which the batch's current plans must still produce. */
350
+ export declare const BatchApprovePayload: Schema.Struct<{
351
+ readonly digest: Schema.brand<Schema.String, "@domainkit/Digest">;
352
+ }>;
353
+ export type BatchApprovePayload = typeof BatchApprovePayload.Type;
354
+ /** One domain's place in a batch, with whatever its attempt holds. */
355
+ export declare const BatchItem: Schema.Struct<{
356
+ readonly attachmentId: Schema.String;
357
+ readonly position: Schema.Number;
358
+ /** Null while the item has no plan; `planFailure` then says why. */
359
+ readonly plan: Schema.NullOr<typeof Plan.Model>;
360
+ readonly status: Schema.NullOr<Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>>;
361
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
362
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
363
+ readonly rejection: Schema.NullOr<Schema.Struct<{
364
+ readonly actorId: Schema.String;
365
+ readonly reason: Schema.NullOr<Schema.String>;
366
+ readonly at: Schema.DateTimeUtcFromString;
367
+ }>>;
368
+ readonly failure: Schema.NullOr<Schema.String>;
369
+ readonly planFailure: Schema.NullOr<Schema.String>;
370
+ }>;
371
+ export type BatchItem = typeof BatchItem.Type;
372
+ /** Many domains planned together, as every batch route returns them. */
373
+ export declare const Batch: Schema.Struct<{
374
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
375
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
376
+ /** What `POST /batches/:batchId/approvals` takes; null while any item is unplanned. */
377
+ readonly digest: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/Digest">>;
378
+ readonly approval: Schema.NullOr<Schema.Struct<{
379
+ readonly actorId: Schema.String;
380
+ readonly at: Schema.DateTimeUtcFromString;
381
+ }>>;
382
+ readonly rejection: Schema.NullOr<Schema.Struct<{
383
+ readonly actorId: Schema.String;
384
+ readonly reason: Schema.NullOr<Schema.String>;
385
+ readonly at: Schema.DateTimeUtcFromString;
386
+ }>>;
387
+ readonly createdAt: Schema.DateTimeUtcFromString;
388
+ readonly updatedAt: Schema.DateTimeUtcFromString;
389
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
390
+ readonly items: Schema.$Array<Schema.Struct<{
391
+ readonly attachmentId: Schema.String;
392
+ readonly position: Schema.Number;
393
+ /** Null while the item has no plan; `planFailure` then says why. */
394
+ readonly plan: Schema.NullOr<typeof Plan.Model>;
395
+ readonly status: Schema.NullOr<Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>>;
396
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
397
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
398
+ readonly rejection: Schema.NullOr<Schema.Struct<{
399
+ readonly actorId: Schema.String;
400
+ readonly reason: Schema.NullOr<Schema.String>;
401
+ readonly at: Schema.DateTimeUtcFromString;
402
+ }>>;
403
+ readonly failure: Schema.NullOr<Schema.String>;
404
+ readonly planFailure: Schema.NullOr<Schema.String>;
405
+ }>>;
406
+ }>;
407
+ export type Batch = typeof Batch.Type;
408
+ /** A batch without its plans, as the unfinished index returns them. */
409
+ export declare const BatchSummary: Schema.Struct<{
410
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
411
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
412
+ readonly itemCount: Schema.Number;
413
+ readonly createdAt: Schema.DateTimeUtcFromString;
414
+ readonly updatedAt: Schema.DateTimeUtcFromString;
415
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
416
+ }>;
417
+ export type BatchSummary = typeof BatchSummary.Type;
339
418
  /** `Verify.Readiness` on the wire; timestamps encode as ISO strings. */
340
419
  export declare const Readiness: Schema.Struct<{
341
420
  readonly domain: Schema.String;
@@ -370,7 +449,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
370
449
  readonly message: string;
371
450
  } | {
372
451
  readonly _tag: "NotFound";
373
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
452
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
374
453
  readonly id: string;
375
454
  } | {
376
455
  readonly _tag: "Conflict";
@@ -515,6 +594,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
515
594
  readonly _tag: "Stale";
516
595
  readonly planId: string;
517
596
  readonly digest: string;
597
+ } | {
598
+ readonly _tag: "BatchStale";
599
+ readonly batchId: string;
600
+ readonly status: string;
601
+ readonly digest: string | null;
518
602
  } | {
519
603
  readonly _tag: "Expired";
520
604
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -559,7 +643,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
559
643
  readonly message: string;
560
644
  };
561
645
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
562
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
646
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
563
647
  }>], {
564
648
  readonly _tag: "DomainKitError";
565
649
  readonly reason: {
@@ -574,7 +658,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
574
658
  readonly message: string;
575
659
  } | {
576
660
  readonly _tag: "NotFound";
577
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
661
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
578
662
  readonly id: string;
579
663
  } | {
580
664
  readonly _tag: "Conflict";
@@ -719,6 +803,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
719
803
  readonly _tag: "Stale";
720
804
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
721
805
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
806
+ } | {
807
+ readonly _tag: "BatchStale";
808
+ readonly batchId: string;
809
+ readonly status: string;
810
+ readonly digest: string | null;
722
811
  } | {
723
812
  readonly _tag: "Expired";
724
813
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -763,13 +852,43 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
763
852
  readonly message: string;
764
853
  };
765
854
  }>, Schema.TaggedStruct<"DomainKitError", {
766
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
767
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"approve", "POST", "/plans/:planId/approvals", Schema.toCodecStringTree<Schema.Struct<{
768
- planId: Schema.brand<Schema.String, "@domainkit/PlanId">;
769
- }>>, never, Schema.toCodecJson<Schema.Struct<{
770
- /** A subset of the plan's writes; omit to approve every write. */
771
- readonly operationIds: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "@domainkit/OperationId">>>;
772
- }>>, never, Schema.toCodecJson<typeof Approval.Model>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
855
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
856
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"applyBatch", "POST", "/batches/:batchId/apply", Schema.toCodecStringTree<Schema.Struct<{
857
+ batchId: Schema.brand<Schema.String, "@domainkit/BatchId">;
858
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
859
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
860
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
861
+ /** What `POST /batches/:batchId/approvals` takes; null while any item is unplanned. */
862
+ readonly digest: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/Digest">>;
863
+ readonly approval: Schema.NullOr<Schema.Struct<{
864
+ readonly actorId: Schema.String;
865
+ readonly at: Schema.DateTimeUtcFromString;
866
+ }>>;
867
+ readonly rejection: Schema.NullOr<Schema.Struct<{
868
+ readonly actorId: Schema.String;
869
+ readonly reason: Schema.NullOr<Schema.String>;
870
+ readonly at: Schema.DateTimeUtcFromString;
871
+ }>>;
872
+ readonly createdAt: Schema.DateTimeUtcFromString;
873
+ readonly updatedAt: Schema.DateTimeUtcFromString;
874
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
875
+ readonly items: Schema.$Array<Schema.Struct<{
876
+ readonly attachmentId: Schema.String;
877
+ readonly position: Schema.Number;
878
+ /** Null while the item has no plan; `planFailure` then says why. */
879
+ readonly plan: Schema.NullOr<typeof Plan.Model>;
880
+ readonly status: Schema.NullOr<Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>>;
881
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
882
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
883
+ readonly rejection: Schema.NullOr<Schema.Struct<{
884
+ readonly actorId: Schema.String;
885
+ readonly reason: Schema.NullOr<Schema.String>;
886
+ readonly at: Schema.DateTimeUtcFromString;
887
+ }>>;
888
+ readonly failure: Schema.NullOr<Schema.String>;
889
+ readonly planFailure: Schema.NullOr<Schema.String>;
890
+ }>>;
891
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
773
892
  readonly _tag: "DomainKitError";
774
893
  readonly reason: {
775
894
  readonly _tag: "InvalidInput";
@@ -783,7 +902,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
783
902
  readonly message: string;
784
903
  } | {
785
904
  readonly _tag: "NotFound";
786
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
905
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
787
906
  readonly id: string;
788
907
  } | {
789
908
  readonly _tag: "Conflict";
@@ -928,6 +1047,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
928
1047
  readonly _tag: "Stale";
929
1048
  readonly planId: string;
930
1049
  readonly digest: string;
1050
+ } | {
1051
+ readonly _tag: "BatchStale";
1052
+ readonly batchId: string;
1053
+ readonly status: string;
1054
+ readonly digest: string | null;
931
1055
  } | {
932
1056
  readonly _tag: "Expired";
933
1057
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -972,7 +1096,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
972
1096
  readonly message: string;
973
1097
  };
974
1098
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
975
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1099
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
976
1100
  }>], {
977
1101
  readonly _tag: "DomainKitError";
978
1102
  readonly reason: {
@@ -987,7 +1111,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
987
1111
  readonly message: string;
988
1112
  } | {
989
1113
  readonly _tag: "NotFound";
990
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1114
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
991
1115
  readonly id: string;
992
1116
  } | {
993
1117
  readonly _tag: "Conflict";
@@ -1132,6 +1256,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1132
1256
  readonly _tag: "Stale";
1133
1257
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
1134
1258
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
1259
+ } | {
1260
+ readonly _tag: "BatchStale";
1261
+ readonly batchId: string;
1262
+ readonly status: string;
1263
+ readonly digest: string | null;
1135
1264
  } | {
1136
1265
  readonly _tag: "Expired";
1137
1266
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -1176,14 +1305,13 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1176
1305
  readonly message: string;
1177
1306
  };
1178
1307
  }>, Schema.TaggedStruct<"DomainKitError", {
1179
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1180
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"attach", "POST", "/connections/:connectionId/attachments", Schema.toCodecStringTree<Schema.Struct<{
1181
- connectionId: Schema.String;
1308
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1309
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"approve", "POST", "/plans/:planId/approvals", Schema.toCodecStringTree<Schema.Struct<{
1310
+ planId: Schema.brand<Schema.String, "@domainkit/PlanId">;
1182
1311
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1183
- readonly domain: Schema.String;
1184
- /** Which candidate zone to attach when `SelectionRequired` came back. */
1185
- readonly zone: Schema.optionalKey<Schema.String>;
1186
- }>>, never, Schema.toCodecJson<Schema.Union<readonly [typeof Connected, typeof Redirect, typeof SelectionRequired]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
1312
+ /** A subset of the plan's writes; omit to approve every write. */
1313
+ readonly operationIds: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "@domainkit/OperationId">>>;
1314
+ }>>, never, Schema.toCodecJson<typeof Approval.Model>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
1187
1315
  readonly _tag: "DomainKitError";
1188
1316
  readonly reason: {
1189
1317
  readonly _tag: "InvalidInput";
@@ -1197,7 +1325,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1197
1325
  readonly message: string;
1198
1326
  } | {
1199
1327
  readonly _tag: "NotFound";
1200
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1328
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1201
1329
  readonly id: string;
1202
1330
  } | {
1203
1331
  readonly _tag: "Conflict";
@@ -1342,6 +1470,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1342
1470
  readonly _tag: "Stale";
1343
1471
  readonly planId: string;
1344
1472
  readonly digest: string;
1473
+ } | {
1474
+ readonly _tag: "BatchStale";
1475
+ readonly batchId: string;
1476
+ readonly status: string;
1477
+ readonly digest: string | null;
1345
1478
  } | {
1346
1479
  readonly _tag: "Expired";
1347
1480
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -1386,7 +1519,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1386
1519
  readonly message: string;
1387
1520
  };
1388
1521
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
1389
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1522
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1390
1523
  }>], {
1391
1524
  readonly _tag: "DomainKitError";
1392
1525
  readonly reason: {
@@ -1401,7 +1534,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1401
1534
  readonly message: string;
1402
1535
  } | {
1403
1536
  readonly _tag: "NotFound";
1404
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1537
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1405
1538
  readonly id: string;
1406
1539
  } | {
1407
1540
  readonly _tag: "Conflict";
@@ -1546,6 +1679,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1546
1679
  readonly _tag: "Stale";
1547
1680
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
1548
1681
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
1682
+ } | {
1683
+ readonly _tag: "BatchStale";
1684
+ readonly batchId: string;
1685
+ readonly status: string;
1686
+ readonly digest: string | null;
1549
1687
  } | {
1550
1688
  readonly _tag: "Expired";
1551
1689
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -1590,15 +1728,45 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1590
1728
  readonly message: string;
1591
1729
  };
1592
1730
  }>, Schema.TaggedStruct<"DomainKitError", {
1593
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1594
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"callback", "GET", "/callback/:provider", Schema.toCodecStringTree<Schema.Struct<{
1595
- provider: Schema.String;
1596
- }>>, Schema.toCodecStringTree<Schema.Struct<{
1597
- state: Schema.String;
1598
- code: Schema.optionalKey<Schema.String>;
1599
- }>>, never, never, HttpApiSchema.WithHeaders<Schema.toCodecJson<Schema.Void>, Schema.toCodecStringTree<Schema.Struct<{
1600
- location: Schema.String;
1601
- }>>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
1731
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1732
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"approveBatch", "POST", "/batches/:batchId/approvals", Schema.toCodecStringTree<Schema.Struct<{
1733
+ batchId: Schema.brand<Schema.String, "@domainkit/BatchId">;
1734
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1735
+ readonly digest: Schema.brand<Schema.String, "@domainkit/Digest">;
1736
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1737
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
1738
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
1739
+ /** What `POST /batches/:batchId/approvals` takes; null while any item is unplanned. */
1740
+ readonly digest: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/Digest">>;
1741
+ readonly approval: Schema.NullOr<Schema.Struct<{
1742
+ readonly actorId: Schema.String;
1743
+ readonly at: Schema.DateTimeUtcFromString;
1744
+ }>>;
1745
+ readonly rejection: Schema.NullOr<Schema.Struct<{
1746
+ readonly actorId: Schema.String;
1747
+ readonly reason: Schema.NullOr<Schema.String>;
1748
+ readonly at: Schema.DateTimeUtcFromString;
1749
+ }>>;
1750
+ readonly createdAt: Schema.DateTimeUtcFromString;
1751
+ readonly updatedAt: Schema.DateTimeUtcFromString;
1752
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1753
+ readonly items: Schema.$Array<Schema.Struct<{
1754
+ readonly attachmentId: Schema.String;
1755
+ readonly position: Schema.Number;
1756
+ /** Null while the item has no plan; `planFailure` then says why. */
1757
+ readonly plan: Schema.NullOr<typeof Plan.Model>;
1758
+ readonly status: Schema.NullOr<Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>>;
1759
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
1760
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
1761
+ readonly rejection: Schema.NullOr<Schema.Struct<{
1762
+ readonly actorId: Schema.String;
1763
+ readonly reason: Schema.NullOr<Schema.String>;
1764
+ readonly at: Schema.DateTimeUtcFromString;
1765
+ }>>;
1766
+ readonly failure: Schema.NullOr<Schema.String>;
1767
+ readonly planFailure: Schema.NullOr<Schema.String>;
1768
+ }>>;
1769
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
1602
1770
  readonly _tag: "DomainKitError";
1603
1771
  readonly reason: {
1604
1772
  readonly _tag: "InvalidInput";
@@ -1612,7 +1780,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1612
1780
  readonly message: string;
1613
1781
  } | {
1614
1782
  readonly _tag: "NotFound";
1615
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1783
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1616
1784
  readonly id: string;
1617
1785
  } | {
1618
1786
  readonly _tag: "Conflict";
@@ -1757,6 +1925,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1757
1925
  readonly _tag: "Stale";
1758
1926
  readonly planId: string;
1759
1927
  readonly digest: string;
1928
+ } | {
1929
+ readonly _tag: "BatchStale";
1930
+ readonly batchId: string;
1931
+ readonly status: string;
1932
+ readonly digest: string | null;
1760
1933
  } | {
1761
1934
  readonly _tag: "Expired";
1762
1935
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -1801,7 +1974,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1801
1974
  readonly message: string;
1802
1975
  };
1803
1976
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
1804
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1977
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
1805
1978
  }>], {
1806
1979
  readonly _tag: "DomainKitError";
1807
1980
  readonly reason: {
@@ -1816,7 +1989,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1816
1989
  readonly message: string;
1817
1990
  } | {
1818
1991
  readonly _tag: "NotFound";
1819
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1992
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
1820
1993
  readonly id: string;
1821
1994
  } | {
1822
1995
  readonly _tag: "Conflict";
@@ -1961,6 +2134,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
1961
2134
  readonly _tag: "Stale";
1962
2135
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
1963
2136
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
2137
+ } | {
2138
+ readonly _tag: "BatchStale";
2139
+ readonly batchId: string;
2140
+ readonly status: string;
2141
+ readonly digest: string | null;
1964
2142
  } | {
1965
2143
  readonly _tag: "Expired";
1966
2144
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -2005,10 +2183,14 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2005
2183
  readonly message: string;
2006
2184
  };
2007
2185
  }>, Schema.TaggedStruct<"DomainKitError", {
2008
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2009
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"cleanupPlan", "POST", "/receipts/:receiptId/cleanup-plans", Schema.toCodecStringTree<Schema.Struct<{
2010
- receiptId: Schema.brand<Schema.String, "@domainkit/ReceiptId">;
2011
- }>>, never, never, never, Schema.toCodecJson<typeof Plan.Model>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
2186
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2187
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"attach", "POST", "/connections/:connectionId/attachments", Schema.toCodecStringTree<Schema.Struct<{
2188
+ connectionId: Schema.String;
2189
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2190
+ readonly domain: Schema.String;
2191
+ /** Which candidate zone to attach when `SelectionRequired` came back. */
2192
+ readonly zone: Schema.optionalKey<Schema.String>;
2193
+ }>>, never, Schema.toCodecJson<Schema.Union<readonly [typeof Connected, typeof Redirect, typeof SelectionRequired]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
2012
2194
  readonly _tag: "DomainKitError";
2013
2195
  readonly reason: {
2014
2196
  readonly _tag: "InvalidInput";
@@ -2022,7 +2204,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2022
2204
  readonly message: string;
2023
2205
  } | {
2024
2206
  readonly _tag: "NotFound";
2025
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2207
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2026
2208
  readonly id: string;
2027
2209
  } | {
2028
2210
  readonly _tag: "Conflict";
@@ -2167,6 +2349,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2167
2349
  readonly _tag: "Stale";
2168
2350
  readonly planId: string;
2169
2351
  readonly digest: string;
2352
+ } | {
2353
+ readonly _tag: "BatchStale";
2354
+ readonly batchId: string;
2355
+ readonly status: string;
2356
+ readonly digest: string | null;
2170
2357
  } | {
2171
2358
  readonly _tag: "Expired";
2172
2359
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -2211,7 +2398,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2211
2398
  readonly message: string;
2212
2399
  };
2213
2400
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
2214
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2401
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2215
2402
  }>], {
2216
2403
  readonly _tag: "DomainKitError";
2217
2404
  readonly reason: {
@@ -2226,7 +2413,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2226
2413
  readonly message: string;
2227
2414
  } | {
2228
2415
  readonly _tag: "NotFound";
2229
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2416
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2230
2417
  readonly id: string;
2231
2418
  } | {
2232
2419
  readonly _tag: "Conflict";
@@ -2371,6 +2558,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2371
2558
  readonly _tag: "Stale";
2372
2559
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
2373
2560
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
2561
+ } | {
2562
+ readonly _tag: "BatchStale";
2563
+ readonly batchId: string;
2564
+ readonly status: string;
2565
+ readonly digest: string | null;
2374
2566
  } | {
2375
2567
  readonly _tag: "Expired";
2376
2568
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -2415,12 +2607,43 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2415
2607
  readonly message: string;
2416
2608
  };
2417
2609
  }>, Schema.TaggedStruct<"DomainKitError", {
2418
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2419
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createPlan", "POST", "/domains/:domain/plans", Schema.toCodecStringTree<Schema.Struct<{
2420
- domain: Schema.String;
2421
- }>>, never, Schema.toCodecJson<Schema.Struct<{
2422
- readonly requirements: Schema.$Array<Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>>;
2423
- }>>, never, Schema.toCodecJson<typeof Plan.Model>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
2610
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2611
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"batch", "GET", "/batches/:batchId", Schema.toCodecStringTree<Schema.Struct<{
2612
+ batchId: Schema.brand<Schema.String, "@domainkit/BatchId">;
2613
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
2614
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
2615
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
2616
+ /** What `POST /batches/:batchId/approvals` takes; null while any item is unplanned. */
2617
+ readonly digest: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/Digest">>;
2618
+ readonly approval: Schema.NullOr<Schema.Struct<{
2619
+ readonly actorId: Schema.String;
2620
+ readonly at: Schema.DateTimeUtcFromString;
2621
+ }>>;
2622
+ readonly rejection: Schema.NullOr<Schema.Struct<{
2623
+ readonly actorId: Schema.String;
2624
+ readonly reason: Schema.NullOr<Schema.String>;
2625
+ readonly at: Schema.DateTimeUtcFromString;
2626
+ }>>;
2627
+ readonly createdAt: Schema.DateTimeUtcFromString;
2628
+ readonly updatedAt: Schema.DateTimeUtcFromString;
2629
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
2630
+ readonly items: Schema.$Array<Schema.Struct<{
2631
+ readonly attachmentId: Schema.String;
2632
+ readonly position: Schema.Number;
2633
+ /** Null while the item has no plan; `planFailure` then says why. */
2634
+ readonly plan: Schema.NullOr<typeof Plan.Model>;
2635
+ readonly status: Schema.NullOr<Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>>;
2636
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
2637
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
2638
+ readonly rejection: Schema.NullOr<Schema.Struct<{
2639
+ readonly actorId: Schema.String;
2640
+ readonly reason: Schema.NullOr<Schema.String>;
2641
+ readonly at: Schema.DateTimeUtcFromString;
2642
+ }>>;
2643
+ readonly failure: Schema.NullOr<Schema.String>;
2644
+ readonly planFailure: Schema.NullOr<Schema.String>;
2645
+ }>>;
2646
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
2424
2647
  readonly _tag: "DomainKitError";
2425
2648
  readonly reason: {
2426
2649
  readonly _tag: "InvalidInput";
@@ -2434,7 +2657,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2434
2657
  readonly message: string;
2435
2658
  } | {
2436
2659
  readonly _tag: "NotFound";
2437
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2660
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2438
2661
  readonly id: string;
2439
2662
  } | {
2440
2663
  readonly _tag: "Conflict";
@@ -2579,6 +2802,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2579
2802
  readonly _tag: "Stale";
2580
2803
  readonly planId: string;
2581
2804
  readonly digest: string;
2805
+ } | {
2806
+ readonly _tag: "BatchStale";
2807
+ readonly batchId: string;
2808
+ readonly status: string;
2809
+ readonly digest: string | null;
2582
2810
  } | {
2583
2811
  readonly _tag: "Expired";
2584
2812
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -2623,7 +2851,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2623
2851
  readonly message: string;
2624
2852
  };
2625
2853
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
2626
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2854
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2627
2855
  }>], {
2628
2856
  readonly _tag: "DomainKitError";
2629
2857
  readonly reason: {
@@ -2638,7 +2866,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2638
2866
  readonly message: string;
2639
2867
  } | {
2640
2868
  readonly _tag: "NotFound";
2641
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2869
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2642
2870
  readonly id: string;
2643
2871
  } | {
2644
2872
  readonly _tag: "Conflict";
@@ -2783,6 +3011,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2783
3011
  readonly _tag: "Stale";
2784
3012
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
2785
3013
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
3014
+ } | {
3015
+ readonly _tag: "BatchStale";
3016
+ readonly batchId: string;
3017
+ readonly status: string;
3018
+ readonly digest: string | null;
2786
3019
  } | {
2787
3020
  readonly _tag: "Expired";
2788
3021
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -2827,10 +3060,17 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2827
3060
  readonly message: string;
2828
3061
  };
2829
3062
  }>, Schema.TaggedStruct<"DomainKitError", {
2830
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
2831
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"detach", "DELETE", "/attachments/:attachmentId", Schema.toCodecStringTree<Schema.Struct<{
2832
- attachmentId: Schema.String;
2833
- }>>, never, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
3063
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3064
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"batches", "GET", "/batches", never, Schema.toCodecStringTree<Schema.Struct<{
3065
+ unfinished: Schema.Literal<"true">;
3066
+ }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
3067
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
3068
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
3069
+ readonly itemCount: Schema.Number;
3070
+ readonly createdAt: Schema.DateTimeUtcFromString;
3071
+ readonly updatedAt: Schema.DateTimeUtcFromString;
3072
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
3073
+ }>>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
2834
3074
  readonly _tag: "DomainKitError";
2835
3075
  readonly reason: {
2836
3076
  readonly _tag: "InvalidInput";
@@ -2844,7 +3084,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2844
3084
  readonly message: string;
2845
3085
  } | {
2846
3086
  readonly _tag: "NotFound";
2847
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3087
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
2848
3088
  readonly id: string;
2849
3089
  } | {
2850
3090
  readonly _tag: "Conflict";
@@ -2989,6 +3229,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
2989
3229
  readonly _tag: "Stale";
2990
3230
  readonly planId: string;
2991
3231
  readonly digest: string;
3232
+ } | {
3233
+ readonly _tag: "BatchStale";
3234
+ readonly batchId: string;
3235
+ readonly status: string;
3236
+ readonly digest: string | null;
2992
3237
  } | {
2993
3238
  readonly _tag: "Expired";
2994
3239
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -3033,7 +3278,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3033
3278
  readonly message: string;
3034
3279
  };
3035
3280
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
3036
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3281
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3037
3282
  }>], {
3038
3283
  readonly _tag: "DomainKitError";
3039
3284
  readonly reason: {
@@ -3048,7 +3293,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3048
3293
  readonly message: string;
3049
3294
  } | {
3050
3295
  readonly _tag: "NotFound";
3051
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3296
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3052
3297
  readonly id: string;
3053
3298
  } | {
3054
3299
  readonly _tag: "Conflict";
@@ -3193,6 +3438,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3193
3438
  readonly _tag: "Stale";
3194
3439
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
3195
3440
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
3441
+ } | {
3442
+ readonly _tag: "BatchStale";
3443
+ readonly batchId: string;
3444
+ readonly status: string;
3445
+ readonly digest: string | null;
3196
3446
  } | {
3197
3447
  readonly _tag: "Expired";
3198
3448
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -3237,10 +3487,15 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3237
3487
  readonly message: string;
3238
3488
  };
3239
3489
  }>, Schema.TaggedStruct<"DomainKitError", {
3240
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3241
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"disconnect", "DELETE", "/connections/:connectionId", Schema.toCodecStringTree<Schema.Struct<{
3242
- connectionId: Schema.String;
3243
- }>>, never, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
3490
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3491
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"callback", "GET", "/callback/:provider", Schema.toCodecStringTree<Schema.Struct<{
3492
+ provider: Schema.String;
3493
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
3494
+ state: Schema.String;
3495
+ code: Schema.optionalKey<Schema.String>;
3496
+ }>>, never, never, HttpApiSchema.WithHeaders<Schema.toCodecJson<Schema.Void>, Schema.toCodecStringTree<Schema.Struct<{
3497
+ location: Schema.String;
3498
+ }>>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
3244
3499
  readonly _tag: "DomainKitError";
3245
3500
  readonly reason: {
3246
3501
  readonly _tag: "InvalidInput";
@@ -3254,7 +3509,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3254
3509
  readonly message: string;
3255
3510
  } | {
3256
3511
  readonly _tag: "NotFound";
3257
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3512
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3258
3513
  readonly id: string;
3259
3514
  } | {
3260
3515
  readonly _tag: "Conflict";
@@ -3399,6 +3654,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3399
3654
  readonly _tag: "Stale";
3400
3655
  readonly planId: string;
3401
3656
  readonly digest: string;
3657
+ } | {
3658
+ readonly _tag: "BatchStale";
3659
+ readonly batchId: string;
3660
+ readonly status: string;
3661
+ readonly digest: string | null;
3402
3662
  } | {
3403
3663
  readonly _tag: "Expired";
3404
3664
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -3443,7 +3703,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3443
3703
  readonly message: string;
3444
3704
  };
3445
3705
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
3446
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3706
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3447
3707
  }>], {
3448
3708
  readonly _tag: "DomainKitError";
3449
3709
  readonly reason: {
@@ -3458,7 +3718,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3458
3718
  readonly message: string;
3459
3719
  } | {
3460
3720
  readonly _tag: "NotFound";
3461
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3721
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3462
3722
  readonly id: string;
3463
3723
  } | {
3464
3724
  readonly _tag: "Conflict";
@@ -3603,6 +3863,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3603
3863
  readonly _tag: "Stale";
3604
3864
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
3605
3865
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
3866
+ } | {
3867
+ readonly _tag: "BatchStale";
3868
+ readonly batchId: string;
3869
+ readonly status: string;
3870
+ readonly digest: string | null;
3606
3871
  } | {
3607
3872
  readonly _tag: "Expired";
3608
3873
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -3647,10 +3912,10 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3647
3912
  readonly message: string;
3648
3913
  };
3649
3914
  }>, Schema.TaggedStruct<"DomainKitError", {
3650
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3651
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"discover", "GET", "/domains/:domain/discovery", Schema.toCodecStringTree<Schema.Struct<{
3652
- domain: Schema.String;
3653
- }>>, never, never, never, Schema.toCodecJson<Schema.Union<readonly [typeof DiscoveryResolved, typeof DiscoverySelectionRequired, typeof DiscoveryNotFound]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
3915
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3916
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"cleanupPlan", "POST", "/receipts/:receiptId/cleanup-plans", Schema.toCodecStringTree<Schema.Struct<{
3917
+ receiptId: Schema.brand<Schema.String, "@domainkit/ReceiptId">;
3918
+ }>>, never, never, never, Schema.toCodecJson<typeof Plan.Model>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
3654
3919
  readonly _tag: "DomainKitError";
3655
3920
  readonly reason: {
3656
3921
  readonly _tag: "InvalidInput";
@@ -3664,7 +3929,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3664
3929
  readonly message: string;
3665
3930
  } | {
3666
3931
  readonly _tag: "NotFound";
3667
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3932
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3668
3933
  readonly id: string;
3669
3934
  } | {
3670
3935
  readonly _tag: "Conflict";
@@ -3809,6 +4074,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3809
4074
  readonly _tag: "Stale";
3810
4075
  readonly planId: string;
3811
4076
  readonly digest: string;
4077
+ } | {
4078
+ readonly _tag: "BatchStale";
4079
+ readonly batchId: string;
4080
+ readonly status: string;
4081
+ readonly digest: string | null;
3812
4082
  } | {
3813
4083
  readonly _tag: "Expired";
3814
4084
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -3853,7 +4123,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3853
4123
  readonly message: string;
3854
4124
  };
3855
4125
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
3856
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4126
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
3857
4127
  }>], {
3858
4128
  readonly _tag: "DomainKitError";
3859
4129
  readonly reason: {
@@ -3868,7 +4138,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3868
4138
  readonly message: string;
3869
4139
  } | {
3870
4140
  readonly _tag: "NotFound";
3871
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4141
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
3872
4142
  readonly id: string;
3873
4143
  } | {
3874
4144
  readonly _tag: "Conflict";
@@ -4013,6 +4283,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4013
4283
  readonly _tag: "Stale";
4014
4284
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
4015
4285
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
4286
+ } | {
4287
+ readonly _tag: "BatchStale";
4288
+ readonly batchId: string;
4289
+ readonly status: string;
4290
+ readonly digest: string | null;
4016
4291
  } | {
4017
4292
  readonly _tag: "Expired";
4018
4293
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -4057,40 +4332,46 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4057
4332
  readonly message: string;
4058
4333
  };
4059
4334
  }>, Schema.TaggedStruct<"DomainKitError", {
4060
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4061
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"inspect", "GET", "/domains/:domain", Schema.toCodecStringTree<Schema.Struct<{
4062
- domain: Schema.String;
4063
- }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
4064
- readonly domain: Schema.String;
4065
- readonly attachment: Schema.NullOr<Schema.Struct<{
4066
- readonly id: Schema.String;
4067
- readonly label: Schema.String;
4335
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4336
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createBatch", "POST", "/batches", never, never, Schema.toCodecJson<Schema.Struct<{
4337
+ readonly items: Schema.$Array<Schema.Struct<{
4338
+ readonly domain: Schema.String;
4339
+ readonly requirements: Schema.$Array<Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>>;
4068
4340
  }>>;
4069
- readonly connectionId: Schema.NullOr<Schema.String>;
4070
- readonly provider: Schema.NullOr<Schema.String>;
4071
- readonly method: Schema.NullOr<Schema.Literals<readonly ["token", "oauth", "integration"]>>;
4072
- readonly status: Schema.Literals<readonly ["disconnected", "connected", "reconnect"]>;
4073
- readonly lastReceiptId: Schema.NullOr<Schema.String>;
4074
- /** How many domains the connection serves, including this one; `0` without a connection. */
4075
- readonly connectionDomains: Schema.Number;
4076
- readonly reusable: Schema.$Array<Schema.Struct<{
4077
- readonly connectionId: Schema.String;
4078
- readonly provider: Schema.String;
4079
- readonly method: Schema.Literals<readonly ["token", "oauth", "integration"]>;
4341
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
4342
+ "idempotency-key": Schema.String;
4343
+ }>>, Schema.toCodecJson<Schema.Struct<{
4344
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
4345
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
4346
+ /** What `POST /batches/:batchId/approvals` takes; null while any item is unplanned. */
4347
+ readonly digest: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/Digest">>;
4348
+ readonly approval: Schema.NullOr<Schema.Struct<{
4349
+ readonly actorId: Schema.String;
4350
+ readonly at: Schema.DateTimeUtcFromString;
4080
4351
  }>>;
4081
- readonly providers: Schema.$Array<Schema.Struct<{
4082
- readonly id: Schema.String;
4083
- readonly name: Schema.String;
4084
- readonly methods: Schema.$Array<Schema.Struct<{
4085
- readonly kind: Schema.Literals<readonly ["token", "oauth", "integration"]>;
4086
- readonly label: Schema.String;
4087
- readonly docsUrl: Schema.NullOr<Schema.String>;
4088
- readonly fields: Schema.NullOr<Schema.$Array<Schema.Struct<{
4089
- readonly name: Schema.String;
4090
- readonly required: Schema.Boolean;
4091
- readonly secret: Schema.Boolean;
4092
- }>>>;
4352
+ readonly rejection: Schema.NullOr<Schema.Struct<{
4353
+ readonly actorId: Schema.String;
4354
+ readonly reason: Schema.NullOr<Schema.String>;
4355
+ readonly at: Schema.DateTimeUtcFromString;
4356
+ }>>;
4357
+ readonly createdAt: Schema.DateTimeUtcFromString;
4358
+ readonly updatedAt: Schema.DateTimeUtcFromString;
4359
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
4360
+ readonly items: Schema.$Array<Schema.Struct<{
4361
+ readonly attachmentId: Schema.String;
4362
+ readonly position: Schema.Number;
4363
+ /** Null while the item has no plan; `planFailure` then says why. */
4364
+ readonly plan: Schema.NullOr<typeof Plan.Model>;
4365
+ readonly status: Schema.NullOr<Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>>;
4366
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
4367
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
4368
+ readonly rejection: Schema.NullOr<Schema.Struct<{
4369
+ readonly actorId: Schema.String;
4370
+ readonly reason: Schema.NullOr<Schema.String>;
4371
+ readonly at: Schema.DateTimeUtcFromString;
4093
4372
  }>>;
4373
+ readonly failure: Schema.NullOr<Schema.String>;
4374
+ readonly planFailure: Schema.NullOr<Schema.String>;
4094
4375
  }>>;
4095
4376
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
4096
4377
  readonly _tag: "DomainKitError";
@@ -4106,7 +4387,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4106
4387
  readonly message: string;
4107
4388
  } | {
4108
4389
  readonly _tag: "NotFound";
4109
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4390
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4110
4391
  readonly id: string;
4111
4392
  } | {
4112
4393
  readonly _tag: "Conflict";
@@ -4251,6 +4532,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4251
4532
  readonly _tag: "Stale";
4252
4533
  readonly planId: string;
4253
4534
  readonly digest: string;
4535
+ } | {
4536
+ readonly _tag: "BatchStale";
4537
+ readonly batchId: string;
4538
+ readonly status: string;
4539
+ readonly digest: string | null;
4254
4540
  } | {
4255
4541
  readonly _tag: "Expired";
4256
4542
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -4295,7 +4581,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4295
4581
  readonly message: string;
4296
4582
  };
4297
4583
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
4298
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4584
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4299
4585
  }>], {
4300
4586
  readonly _tag: "DomainKitError";
4301
4587
  readonly reason: {
@@ -4310,7 +4596,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4310
4596
  readonly message: string;
4311
4597
  } | {
4312
4598
  readonly _tag: "NotFound";
4313
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4599
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4314
4600
  readonly id: string;
4315
4601
  } | {
4316
4602
  readonly _tag: "Conflict";
@@ -4455,6 +4741,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4455
4741
  readonly _tag: "Stale";
4456
4742
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
4457
4743
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
4744
+ } | {
4745
+ readonly _tag: "BatchStale";
4746
+ readonly batchId: string;
4747
+ readonly status: string;
4748
+ readonly digest: string | null;
4458
4749
  } | {
4459
4750
  readonly _tag: "Expired";
4460
4751
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -4499,28 +4790,12 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4499
4790
  readonly message: string;
4500
4791
  };
4501
4792
  }>, Schema.TaggedStruct<"DomainKitError", {
4502
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4503
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"observe", "POST", "/domains/:domain/observations", Schema.toCodecStringTree<Schema.Struct<{
4793
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4794
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createPlan", "POST", "/domains/:domain/plans", Schema.toCodecStringTree<Schema.Struct<{
4504
4795
  domain: Schema.String;
4505
4796
  }>>, never, Schema.toCodecJson<Schema.Struct<{
4506
- /** Records to observe instead of the attachment's receipt; required for an unattached domain. */
4507
- readonly requirements: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>>>;
4508
- }>>, never, Schema.toCodecJson<Schema.Struct<{
4509
- readonly domain: Schema.String;
4510
- readonly attachmentId: Schema.NullOr<Schema.String>;
4511
- readonly overall: Schema.Literals<readonly ["ready", "pending", "failed"]>;
4512
- readonly requirements: Schema.$Array<Schema.Struct<{
4513
- /** `Verify.requirementKey(record)`, so a client pairs rows by content, not by position. */
4514
- readonly key: Schema.String;
4515
- readonly operationId: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/OperationId">>;
4516
- readonly record: Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>;
4517
- readonly status: Schema.Literals<readonly ["satisfied", "missing", "mismatch", "unknown"]>;
4518
- readonly evidence: Schema.$Array<Schema.Union<readonly [typeof Verify.ProviderEvidence, typeof Verify.PublicDnsEvidence, typeof Verify.HostEvidence]>>;
4519
- }>>;
4520
- readonly host: Schema.$Array<typeof Verify.HostEvidence>;
4521
- readonly checkedAt: Schema.DateTimeUtcFromString;
4522
- readonly nextCheckAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
4523
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
4797
+ readonly requirements: Schema.$Array<Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>>;
4798
+ }>>, never, Schema.toCodecJson<typeof Plan.Model>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
4524
4799
  readonly _tag: "DomainKitError";
4525
4800
  readonly reason: {
4526
4801
  readonly _tag: "InvalidInput";
@@ -4534,7 +4809,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4534
4809
  readonly message: string;
4535
4810
  } | {
4536
4811
  readonly _tag: "NotFound";
4537
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4812
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4538
4813
  readonly id: string;
4539
4814
  } | {
4540
4815
  readonly _tag: "Conflict";
@@ -4679,6 +4954,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4679
4954
  readonly _tag: "Stale";
4680
4955
  readonly planId: string;
4681
4956
  readonly digest: string;
4957
+ } | {
4958
+ readonly _tag: "BatchStale";
4959
+ readonly batchId: string;
4960
+ readonly status: string;
4961
+ readonly digest: string | null;
4682
4962
  } | {
4683
4963
  readonly _tag: "Expired";
4684
4964
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -4723,7 +5003,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4723
5003
  readonly message: string;
4724
5004
  };
4725
5005
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
4726
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5006
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4727
5007
  }>], {
4728
5008
  readonly _tag: "DomainKitError";
4729
5009
  readonly reason: {
@@ -4738,7 +5018,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4738
5018
  readonly message: string;
4739
5019
  } | {
4740
5020
  readonly _tag: "NotFound";
4741
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5021
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4742
5022
  readonly id: string;
4743
5023
  } | {
4744
5024
  readonly _tag: "Conflict";
@@ -4883,6 +5163,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4883
5163
  readonly _tag: "Stale";
4884
5164
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
4885
5165
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
5166
+ } | {
5167
+ readonly _tag: "BatchStale";
5168
+ readonly batchId: string;
5169
+ readonly status: string;
5170
+ readonly digest: string | null;
4886
5171
  } | {
4887
5172
  readonly _tag: "Expired";
4888
5173
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -4927,20 +5212,10 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4927
5212
  readonly message: string;
4928
5213
  };
4929
5214
  }>, Schema.TaggedStruct<"DomainKitError", {
4930
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
4931
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plan", "GET", "/plans/:planId", Schema.toCodecStringTree<Schema.Struct<{
4932
- planId: Schema.brand<Schema.String, "@domainkit/PlanId">;
4933
- }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
4934
- readonly plan: typeof Plan.Model;
4935
- readonly status: Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>;
4936
- readonly approval: Schema.NullOr<typeof Approval.Model>;
4937
- readonly receipt: Schema.NullOr<typeof Receipt.Model>;
4938
- readonly rejection: Schema.NullOr<Schema.Struct<{
4939
- readonly actorId: Schema.String;
4940
- readonly reason: Schema.NullOr<Schema.String>;
4941
- readonly at: Schema.DateTimeUtcFromString;
4942
- }>>;
4943
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
5215
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5216
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"detach", "DELETE", "/attachments/:attachmentId", Schema.toCodecStringTree<Schema.Struct<{
5217
+ attachmentId: Schema.String;
5218
+ }>>, never, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
4944
5219
  readonly _tag: "DomainKitError";
4945
5220
  readonly reason: {
4946
5221
  readonly _tag: "InvalidInput";
@@ -4954,7 +5229,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
4954
5229
  readonly message: string;
4955
5230
  } | {
4956
5231
  readonly _tag: "NotFound";
4957
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5232
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
4958
5233
  readonly id: string;
4959
5234
  } | {
4960
5235
  readonly _tag: "Conflict";
@@ -5099,6 +5374,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5099
5374
  readonly _tag: "Stale";
5100
5375
  readonly planId: string;
5101
5376
  readonly digest: string;
5377
+ } | {
5378
+ readonly _tag: "BatchStale";
5379
+ readonly batchId: string;
5380
+ readonly status: string;
5381
+ readonly digest: string | null;
5102
5382
  } | {
5103
5383
  readonly _tag: "Expired";
5104
5384
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -5143,7 +5423,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5143
5423
  readonly message: string;
5144
5424
  };
5145
5425
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
5146
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5426
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5147
5427
  }>], {
5148
5428
  readonly _tag: "DomainKitError";
5149
5429
  readonly reason: {
@@ -5158,7 +5438,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5158
5438
  readonly message: string;
5159
5439
  } | {
5160
5440
  readonly _tag: "NotFound";
5161
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5441
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5162
5442
  readonly id: string;
5163
5443
  } | {
5164
5444
  readonly _tag: "Conflict";
@@ -5303,6 +5583,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5303
5583
  readonly _tag: "Stale";
5304
5584
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
5305
5585
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
5586
+ } | {
5587
+ readonly _tag: "BatchStale";
5588
+ readonly batchId: string;
5589
+ readonly status: string;
5590
+ readonly digest: string | null;
5306
5591
  } | {
5307
5592
  readonly _tag: "Expired";
5308
5593
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -5347,25 +5632,10 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5347
5632
  readonly message: string;
5348
5633
  };
5349
5634
  }>, Schema.TaggedStruct<"DomainKitError", {
5350
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5351
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"readiness", "GET", "/domains/:domain/readiness", Schema.toCodecStringTree<Schema.Struct<{
5352
- domain: Schema.String;
5353
- }>>, never, never, never, Schema.toCodecJson<Schema.NullOr<Schema.Struct<{
5354
- readonly domain: Schema.String;
5355
- readonly attachmentId: Schema.NullOr<Schema.String>;
5356
- readonly overall: Schema.Literals<readonly ["ready", "pending", "failed"]>;
5357
- readonly requirements: Schema.$Array<Schema.Struct<{
5358
- /** `Verify.requirementKey(record)`, so a client pairs rows by content, not by position. */
5359
- readonly key: Schema.String;
5360
- readonly operationId: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/OperationId">>;
5361
- readonly record: Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>;
5362
- readonly status: Schema.Literals<readonly ["satisfied", "missing", "mismatch", "unknown"]>;
5363
- readonly evidence: Schema.$Array<Schema.Union<readonly [typeof Verify.ProviderEvidence, typeof Verify.PublicDnsEvidence, typeof Verify.HostEvidence]>>;
5364
- }>>;
5365
- readonly host: Schema.$Array<typeof Verify.HostEvidence>;
5366
- readonly checkedAt: Schema.DateTimeUtcFromString;
5367
- readonly nextCheckAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
5368
- }>>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
5635
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5636
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"disconnect", "DELETE", "/connections/:connectionId", Schema.toCodecStringTree<Schema.Struct<{
5637
+ connectionId: Schema.String;
5638
+ }>>, never, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
5369
5639
  readonly _tag: "DomainKitError";
5370
5640
  readonly reason: {
5371
5641
  readonly _tag: "InvalidInput";
@@ -5379,7 +5649,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5379
5649
  readonly message: string;
5380
5650
  } | {
5381
5651
  readonly _tag: "NotFound";
5382
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5652
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5383
5653
  readonly id: string;
5384
5654
  } | {
5385
5655
  readonly _tag: "Conflict";
@@ -5524,6 +5794,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5524
5794
  readonly _tag: "Stale";
5525
5795
  readonly planId: string;
5526
5796
  readonly digest: string;
5797
+ } | {
5798
+ readonly _tag: "BatchStale";
5799
+ readonly batchId: string;
5800
+ readonly status: string;
5801
+ readonly digest: string | null;
5527
5802
  } | {
5528
5803
  readonly _tag: "Expired";
5529
5804
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -5568,7 +5843,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5568
5843
  readonly message: string;
5569
5844
  };
5570
5845
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
5571
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5846
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5572
5847
  }>], {
5573
5848
  readonly _tag: "DomainKitError";
5574
5849
  readonly reason: {
@@ -5583,7 +5858,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5583
5858
  readonly message: string;
5584
5859
  } | {
5585
5860
  readonly _tag: "NotFound";
5586
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5861
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5587
5862
  readonly id: string;
5588
5863
  } | {
5589
5864
  readonly _tag: "Conflict";
@@ -5728,6 +6003,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5728
6003
  readonly _tag: "Stale";
5729
6004
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
5730
6005
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
6006
+ } | {
6007
+ readonly _tag: "BatchStale";
6008
+ readonly batchId: string;
6009
+ readonly status: string;
6010
+ readonly digest: string | null;
5731
6011
  } | {
5732
6012
  readonly _tag: "Expired";
5733
6013
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -5772,10 +6052,10 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5772
6052
  readonly message: string;
5773
6053
  };
5774
6054
  }>, Schema.TaggedStruct<"DomainKitError", {
5775
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5776
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"receipt", "GET", "/receipts/:receiptId", Schema.toCodecStringTree<Schema.Struct<{
5777
- receiptId: Schema.brand<Schema.String, "@domainkit/ReceiptId">;
5778
- }>>, never, never, never, Schema.toCodecJson<typeof Receipt.Model>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6055
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6056
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"discover", "GET", "/domains/:domain/discovery", Schema.toCodecStringTree<Schema.Struct<{
6057
+ domain: Schema.String;
6058
+ }>>, never, never, never, Schema.toCodecJson<Schema.Union<readonly [typeof DiscoveryResolved, typeof DiscoverySelectionRequired, typeof DiscoveryNotFound]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
5779
6059
  readonly _tag: "DomainKitError";
5780
6060
  readonly reason: {
5781
6061
  readonly _tag: "InvalidInput";
@@ -5789,7 +6069,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5789
6069
  readonly message: string;
5790
6070
  } | {
5791
6071
  readonly _tag: "NotFound";
5792
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6072
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5793
6073
  readonly id: string;
5794
6074
  } | {
5795
6075
  readonly _tag: "Conflict";
@@ -5934,6 +6214,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5934
6214
  readonly _tag: "Stale";
5935
6215
  readonly planId: string;
5936
6216
  readonly digest: string;
6217
+ } | {
6218
+ readonly _tag: "BatchStale";
6219
+ readonly batchId: string;
6220
+ readonly status: string;
6221
+ readonly digest: string | null;
5937
6222
  } | {
5938
6223
  readonly _tag: "Expired";
5939
6224
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -5978,7 +6263,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5978
6263
  readonly message: string;
5979
6264
  };
5980
6265
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
5981
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6266
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
5982
6267
  }>], {
5983
6268
  readonly _tag: "DomainKitError";
5984
6269
  readonly reason: {
@@ -5993,7 +6278,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5993
6278
  readonly message: string;
5994
6279
  } | {
5995
6280
  readonly _tag: "NotFound";
5996
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6281
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
5997
6282
  readonly id: string;
5998
6283
  } | {
5999
6284
  readonly _tag: "Conflict";
@@ -6138,6 +6423,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6138
6423
  readonly _tag: "Stale";
6139
6424
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6140
6425
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
6426
+ } | {
6427
+ readonly _tag: "BatchStale";
6428
+ readonly batchId: string;
6429
+ readonly status: string;
6430
+ readonly digest: string | null;
6141
6431
  } | {
6142
6432
  readonly _tag: "Expired";
6143
6433
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -6182,12 +6472,3078 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6182
6472
  readonly message: string;
6183
6473
  };
6184
6474
  }>, Schema.TaggedStruct<"DomainKitError", {
6185
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6186
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reconnect", "POST", "/connections/:connectionId/reconnections", Schema.toCodecStringTree<Schema.Struct<{
6187
- connectionId: Schema.String;
6475
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6476
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"inspect", "GET", "/domains/:domain", Schema.toCodecStringTree<Schema.Struct<{
6477
+ domain: Schema.String;
6478
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
6479
+ readonly domain: Schema.String;
6480
+ readonly attachment: Schema.NullOr<Schema.Struct<{
6481
+ readonly id: Schema.String;
6482
+ readonly label: Schema.String;
6483
+ }>>;
6484
+ readonly connectionId: Schema.NullOr<Schema.String>;
6485
+ readonly provider: Schema.NullOr<Schema.String>;
6486
+ readonly method: Schema.NullOr<Schema.Literals<readonly ["token", "oauth", "integration"]>>;
6487
+ readonly status: Schema.Literals<readonly ["disconnected", "connected", "reconnect"]>;
6488
+ readonly lastReceiptId: Schema.NullOr<Schema.String>;
6489
+ /** How many domains the connection serves, including this one; `0` without a connection. */
6490
+ readonly connectionDomains: Schema.Number;
6491
+ readonly reusable: Schema.$Array<Schema.Struct<{
6492
+ readonly connectionId: Schema.String;
6493
+ readonly provider: Schema.String;
6494
+ readonly method: Schema.Literals<readonly ["token", "oauth", "integration"]>;
6495
+ }>>;
6496
+ readonly providers: Schema.$Array<Schema.Struct<{
6497
+ readonly id: Schema.String;
6498
+ readonly name: Schema.String;
6499
+ readonly methods: Schema.$Array<Schema.Struct<{
6500
+ readonly kind: Schema.Literals<readonly ["token", "oauth", "integration"]>;
6501
+ readonly label: Schema.String;
6502
+ readonly docsUrl: Schema.NullOr<Schema.String>;
6503
+ readonly fields: Schema.NullOr<Schema.$Array<Schema.Struct<{
6504
+ readonly name: Schema.String;
6505
+ readonly required: Schema.Boolean;
6506
+ readonly secret: Schema.Boolean;
6507
+ }>>>;
6508
+ }>>;
6509
+ }>>;
6510
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6511
+ readonly _tag: "DomainKitError";
6512
+ readonly reason: {
6513
+ readonly _tag: "InvalidInput";
6514
+ readonly message: string;
6515
+ readonly field?: string;
6516
+ } | {
6517
+ readonly _tag: "Unauthenticated";
6518
+ readonly message: string;
6519
+ } | {
6520
+ readonly _tag: "Forbidden";
6521
+ readonly message: string;
6522
+ } | {
6523
+ readonly _tag: "NotFound";
6524
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6525
+ readonly id: string;
6526
+ } | {
6527
+ readonly _tag: "Conflict";
6528
+ readonly planId: string;
6529
+ readonly operations: readonly {
6530
+ readonly _tag: "Conflict";
6531
+ readonly id: string;
6532
+ readonly record: {
6533
+ readonly _tag: "A";
6534
+ readonly name: string;
6535
+ readonly ttl: number | null;
6536
+ readonly policy: "append" | "exclusive";
6537
+ readonly purpose?: string;
6538
+ readonly address: string;
6539
+ } | {
6540
+ readonly _tag: "AAAA";
6541
+ readonly name: string;
6542
+ readonly ttl: number | null;
6543
+ readonly policy: "append" | "exclusive";
6544
+ readonly purpose?: string;
6545
+ readonly address: string;
6546
+ } | {
6547
+ readonly _tag: "CNAME";
6548
+ readonly name: string;
6549
+ readonly ttl: number | null;
6550
+ readonly policy: "append" | "exclusive";
6551
+ readonly purpose?: string;
6552
+ readonly target: string;
6553
+ } | {
6554
+ readonly _tag: "TXT";
6555
+ readonly name: string;
6556
+ readonly ttl: number | null;
6557
+ readonly policy: "append" | "exclusive";
6558
+ readonly purpose?: string;
6559
+ readonly value: string;
6560
+ } | {
6561
+ readonly _tag: "MX";
6562
+ readonly name: string;
6563
+ readonly ttl: number | null;
6564
+ readonly policy: "append" | "exclusive";
6565
+ readonly purpose?: string;
6566
+ readonly exchange: string;
6567
+ readonly priority: number;
6568
+ } | {
6569
+ readonly _tag: "CAA";
6570
+ readonly name: string;
6571
+ readonly ttl: number | null;
6572
+ readonly policy: "append" | "exclusive";
6573
+ readonly purpose?: string;
6574
+ readonly flags: number;
6575
+ readonly tag: string;
6576
+ readonly value: string;
6577
+ } | {
6578
+ readonly _tag: "NS";
6579
+ readonly name: string;
6580
+ readonly ttl: number | null;
6581
+ readonly policy: "append" | "exclusive";
6582
+ readonly purpose?: string;
6583
+ readonly nameserver: string;
6584
+ } | {
6585
+ readonly _tag: "SRV";
6586
+ readonly name: string;
6587
+ readonly ttl: number | null;
6588
+ readonly policy: "append" | "exclusive";
6589
+ readonly purpose?: string;
6590
+ readonly target: string;
6591
+ readonly port: number;
6592
+ readonly priority: number;
6593
+ readonly weight: number;
6594
+ };
6595
+ readonly existing: readonly ({
6596
+ readonly _tag: "A";
6597
+ readonly name: string;
6598
+ readonly ttl: number | null;
6599
+ readonly policy: "append" | "exclusive";
6600
+ readonly purpose?: string;
6601
+ readonly address: string;
6602
+ } | {
6603
+ readonly _tag: "AAAA";
6604
+ readonly name: string;
6605
+ readonly ttl: number | null;
6606
+ readonly policy: "append" | "exclusive";
6607
+ readonly purpose?: string;
6608
+ readonly address: string;
6609
+ } | {
6610
+ readonly _tag: "CNAME";
6611
+ readonly name: string;
6612
+ readonly ttl: number | null;
6613
+ readonly policy: "append" | "exclusive";
6614
+ readonly purpose?: string;
6615
+ readonly target: string;
6616
+ } | {
6617
+ readonly _tag: "TXT";
6618
+ readonly name: string;
6619
+ readonly ttl: number | null;
6620
+ readonly policy: "append" | "exclusive";
6621
+ readonly purpose?: string;
6622
+ readonly value: string;
6623
+ } | {
6624
+ readonly _tag: "MX";
6625
+ readonly name: string;
6626
+ readonly ttl: number | null;
6627
+ readonly policy: "append" | "exclusive";
6628
+ readonly purpose?: string;
6629
+ readonly exchange: string;
6630
+ readonly priority: number;
6631
+ } | {
6632
+ readonly _tag: "CAA";
6633
+ readonly name: string;
6634
+ readonly ttl: number | null;
6635
+ readonly policy: "append" | "exclusive";
6636
+ readonly purpose?: string;
6637
+ readonly flags: number;
6638
+ readonly tag: string;
6639
+ readonly value: string;
6640
+ } | {
6641
+ readonly _tag: "NS";
6642
+ readonly name: string;
6643
+ readonly ttl: number | null;
6644
+ readonly policy: "append" | "exclusive";
6645
+ readonly purpose?: string;
6646
+ readonly nameserver: string;
6647
+ } | {
6648
+ readonly _tag: "SRV";
6649
+ readonly name: string;
6650
+ readonly ttl: number | null;
6651
+ readonly policy: "append" | "exclusive";
6652
+ readonly purpose?: string;
6653
+ readonly target: string;
6654
+ readonly port: number;
6655
+ readonly priority: number;
6656
+ readonly weight: number;
6657
+ } | {
6658
+ readonly _tag: "Opaque";
6659
+ readonly name: string;
6660
+ readonly type: string;
6661
+ readonly raw: unknown;
6662
+ })[];
6663
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
6664
+ }[];
6665
+ } | {
6666
+ readonly _tag: "Stale";
6667
+ readonly planId: string;
6668
+ readonly digest: string;
6669
+ } | {
6670
+ readonly _tag: "BatchStale";
6671
+ readonly batchId: string;
6672
+ readonly status: string;
6673
+ readonly digest: string | null;
6674
+ } | {
6675
+ readonly _tag: "Expired";
6676
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
6677
+ readonly id: string;
6678
+ } | {
6679
+ readonly _tag: "Busy";
6680
+ readonly key: string;
6681
+ } | {
6682
+ readonly _tag: "ProviderRejected";
6683
+ readonly provider: string;
6684
+ readonly code?: string;
6685
+ readonly message: string;
6686
+ } | {
6687
+ readonly _tag: "ProviderUnavailable";
6688
+ readonly provider: string;
6689
+ readonly retryAfterMs?: number;
6690
+ readonly message: string;
6691
+ } | {
6692
+ readonly _tag: "ProviderConflict";
6693
+ readonly provider: string;
6694
+ readonly code?: string;
6695
+ readonly message: string;
6696
+ } | {
6697
+ readonly _tag: "Unsupported";
6698
+ readonly provider: string;
6699
+ readonly operation: string;
6700
+ readonly message: string;
6701
+ } | {
6702
+ readonly _tag: "Reconnect";
6703
+ readonly provider: string;
6704
+ readonly connectionId: string;
6705
+ } | {
6706
+ readonly _tag: "StorageFailed";
6707
+ readonly operation: string;
6708
+ readonly message: string;
6709
+ } | {
6710
+ readonly _tag: "CryptoFailed";
6711
+ readonly operation: "digest" | "open" | "seal";
6712
+ } | {
6713
+ readonly _tag: "ResolverFailed";
6714
+ readonly resolver: string;
6715
+ readonly message: string;
6716
+ };
6717
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
6718
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6719
+ }>], {
6720
+ readonly _tag: "DomainKitError";
6721
+ readonly reason: {
6722
+ readonly _tag: "InvalidInput";
6723
+ readonly message: string;
6724
+ readonly field?: string;
6725
+ } | {
6726
+ readonly _tag: "Unauthenticated";
6727
+ readonly message: string;
6728
+ } | {
6729
+ readonly _tag: "Forbidden";
6730
+ readonly message: string;
6731
+ } | {
6732
+ readonly _tag: "NotFound";
6733
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6734
+ readonly id: string;
6735
+ } | {
6736
+ readonly _tag: "Conflict";
6737
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6738
+ readonly operations: readonly {
6739
+ readonly _tag: "Conflict";
6740
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
6741
+ readonly record: {
6742
+ readonly _tag: "A";
6743
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6744
+ readonly ttl: number | null;
6745
+ readonly policy: "append" | "exclusive";
6746
+ readonly purpose?: string;
6747
+ readonly address: string;
6748
+ } | {
6749
+ readonly _tag: "AAAA";
6750
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6751
+ readonly ttl: number | null;
6752
+ readonly policy: "append" | "exclusive";
6753
+ readonly purpose?: string;
6754
+ readonly address: string;
6755
+ } | {
6756
+ readonly _tag: "CNAME";
6757
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6758
+ readonly ttl: number | null;
6759
+ readonly policy: "append" | "exclusive";
6760
+ readonly purpose?: string;
6761
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6762
+ } | {
6763
+ readonly _tag: "TXT";
6764
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6765
+ readonly ttl: number | null;
6766
+ readonly policy: "append" | "exclusive";
6767
+ readonly purpose?: string;
6768
+ readonly value: string;
6769
+ } | {
6770
+ readonly _tag: "MX";
6771
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6772
+ readonly ttl: number | null;
6773
+ readonly policy: "append" | "exclusive";
6774
+ readonly purpose?: string;
6775
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6776
+ readonly priority: number;
6777
+ } | {
6778
+ readonly _tag: "CAA";
6779
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6780
+ readonly ttl: number | null;
6781
+ readonly policy: "append" | "exclusive";
6782
+ readonly purpose?: string;
6783
+ readonly flags: number;
6784
+ readonly tag: string;
6785
+ readonly value: string;
6786
+ } | {
6787
+ readonly _tag: "NS";
6788
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6789
+ readonly ttl: number | null;
6790
+ readonly policy: "append" | "exclusive";
6791
+ readonly purpose?: string;
6792
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6793
+ } | {
6794
+ readonly _tag: "SRV";
6795
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6796
+ readonly ttl: number | null;
6797
+ readonly policy: "append" | "exclusive";
6798
+ readonly purpose?: string;
6799
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6800
+ readonly port: number;
6801
+ readonly priority: number;
6802
+ readonly weight: number;
6803
+ };
6804
+ readonly existing: readonly ({
6805
+ readonly _tag: "A";
6806
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6807
+ readonly ttl: number | null;
6808
+ readonly policy: "append" | "exclusive";
6809
+ readonly purpose?: string;
6810
+ readonly address: string;
6811
+ } | {
6812
+ readonly _tag: "AAAA";
6813
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6814
+ readonly ttl: number | null;
6815
+ readonly policy: "append" | "exclusive";
6816
+ readonly purpose?: string;
6817
+ readonly address: string;
6818
+ } | {
6819
+ readonly _tag: "CNAME";
6820
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6821
+ readonly ttl: number | null;
6822
+ readonly policy: "append" | "exclusive";
6823
+ readonly purpose?: string;
6824
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6825
+ } | {
6826
+ readonly _tag: "TXT";
6827
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6828
+ readonly ttl: number | null;
6829
+ readonly policy: "append" | "exclusive";
6830
+ readonly purpose?: string;
6831
+ readonly value: string;
6832
+ } | {
6833
+ readonly _tag: "MX";
6834
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6835
+ readonly ttl: number | null;
6836
+ readonly policy: "append" | "exclusive";
6837
+ readonly purpose?: string;
6838
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6839
+ readonly priority: number;
6840
+ } | {
6841
+ readonly _tag: "CAA";
6842
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6843
+ readonly ttl: number | null;
6844
+ readonly policy: "append" | "exclusive";
6845
+ readonly purpose?: string;
6846
+ readonly flags: number;
6847
+ readonly tag: string;
6848
+ readonly value: string;
6849
+ } | {
6850
+ readonly _tag: "NS";
6851
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6852
+ readonly ttl: number | null;
6853
+ readonly policy: "append" | "exclusive";
6854
+ readonly purpose?: string;
6855
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6856
+ } | {
6857
+ readonly _tag: "SRV";
6858
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6859
+ readonly ttl: number | null;
6860
+ readonly policy: "append" | "exclusive";
6861
+ readonly purpose?: string;
6862
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6863
+ readonly port: number;
6864
+ readonly priority: number;
6865
+ readonly weight: number;
6866
+ } | {
6867
+ readonly _tag: "Opaque";
6868
+ readonly name: string;
6869
+ readonly type: string;
6870
+ readonly raw: unknown;
6871
+ })[];
6872
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
6873
+ }[];
6874
+ } | {
6875
+ readonly _tag: "Stale";
6876
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6877
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
6878
+ } | {
6879
+ readonly _tag: "BatchStale";
6880
+ readonly batchId: string;
6881
+ readonly status: string;
6882
+ readonly digest: string | null;
6883
+ } | {
6884
+ readonly _tag: "Expired";
6885
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
6886
+ readonly id: string;
6887
+ } | {
6888
+ readonly _tag: "Busy";
6889
+ readonly key: string;
6890
+ } | {
6891
+ readonly _tag: "ProviderRejected";
6892
+ readonly provider: string;
6893
+ readonly code?: string;
6894
+ readonly message: string;
6895
+ } | {
6896
+ readonly _tag: "ProviderUnavailable";
6897
+ readonly provider: string;
6898
+ readonly retryAfterMs?: number;
6899
+ readonly message: string;
6900
+ } | {
6901
+ readonly _tag: "ProviderConflict";
6902
+ readonly provider: string;
6903
+ readonly code?: string;
6904
+ readonly message: string;
6905
+ } | {
6906
+ readonly _tag: "Unsupported";
6907
+ readonly provider: string;
6908
+ readonly operation: string;
6909
+ readonly message: string;
6910
+ } | {
6911
+ readonly _tag: "Reconnect";
6912
+ readonly provider: string;
6913
+ readonly connectionId: string;
6914
+ } | {
6915
+ readonly _tag: "StorageFailed";
6916
+ readonly operation: string;
6917
+ readonly message: string;
6918
+ } | {
6919
+ readonly _tag: "CryptoFailed";
6920
+ readonly operation: "digest" | "open" | "seal";
6921
+ } | {
6922
+ readonly _tag: "ResolverFailed";
6923
+ readonly resolver: string;
6924
+ readonly message: string;
6925
+ };
6926
+ }>, Schema.TaggedStruct<"DomainKitError", {
6927
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6928
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"observe", "POST", "/domains/:domain/observations", Schema.toCodecStringTree<Schema.Struct<{
6929
+ domain: Schema.String;
6930
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
6931
+ /** Records to observe instead of the attachment's receipt; required for an unattached domain. */
6932
+ readonly requirements: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>>>;
6933
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
6934
+ readonly domain: Schema.String;
6935
+ readonly attachmentId: Schema.NullOr<Schema.String>;
6936
+ readonly overall: Schema.Literals<readonly ["ready", "pending", "failed"]>;
6937
+ readonly requirements: Schema.$Array<Schema.Struct<{
6938
+ /** `Verify.requirementKey(record)`, so a client pairs rows by content, not by position. */
6939
+ readonly key: Schema.String;
6940
+ readonly operationId: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/OperationId">>;
6941
+ readonly record: Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>;
6942
+ readonly status: Schema.Literals<readonly ["satisfied", "missing", "mismatch", "unknown"]>;
6943
+ readonly evidence: Schema.$Array<Schema.Union<readonly [typeof Verify.ProviderEvidence, typeof Verify.PublicDnsEvidence, typeof Verify.HostEvidence]>>;
6944
+ }>>;
6945
+ readonly host: Schema.$Array<typeof Verify.HostEvidence>;
6946
+ readonly checkedAt: Schema.DateTimeUtcFromString;
6947
+ readonly nextCheckAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
6948
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6949
+ readonly _tag: "DomainKitError";
6950
+ readonly reason: {
6951
+ readonly _tag: "InvalidInput";
6952
+ readonly message: string;
6953
+ readonly field?: string;
6954
+ } | {
6955
+ readonly _tag: "Unauthenticated";
6956
+ readonly message: string;
6957
+ } | {
6958
+ readonly _tag: "Forbidden";
6959
+ readonly message: string;
6960
+ } | {
6961
+ readonly _tag: "NotFound";
6962
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6963
+ readonly id: string;
6964
+ } | {
6965
+ readonly _tag: "Conflict";
6966
+ readonly planId: string;
6967
+ readonly operations: readonly {
6968
+ readonly _tag: "Conflict";
6969
+ readonly id: string;
6970
+ readonly record: {
6971
+ readonly _tag: "A";
6972
+ readonly name: string;
6973
+ readonly ttl: number | null;
6974
+ readonly policy: "append" | "exclusive";
6975
+ readonly purpose?: string;
6976
+ readonly address: string;
6977
+ } | {
6978
+ readonly _tag: "AAAA";
6979
+ readonly name: string;
6980
+ readonly ttl: number | null;
6981
+ readonly policy: "append" | "exclusive";
6982
+ readonly purpose?: string;
6983
+ readonly address: string;
6984
+ } | {
6985
+ readonly _tag: "CNAME";
6986
+ readonly name: string;
6987
+ readonly ttl: number | null;
6988
+ readonly policy: "append" | "exclusive";
6989
+ readonly purpose?: string;
6990
+ readonly target: string;
6991
+ } | {
6992
+ readonly _tag: "TXT";
6993
+ readonly name: string;
6994
+ readonly ttl: number | null;
6995
+ readonly policy: "append" | "exclusive";
6996
+ readonly purpose?: string;
6997
+ readonly value: string;
6998
+ } | {
6999
+ readonly _tag: "MX";
7000
+ readonly name: string;
7001
+ readonly ttl: number | null;
7002
+ readonly policy: "append" | "exclusive";
7003
+ readonly purpose?: string;
7004
+ readonly exchange: string;
7005
+ readonly priority: number;
7006
+ } | {
7007
+ readonly _tag: "CAA";
7008
+ readonly name: string;
7009
+ readonly ttl: number | null;
7010
+ readonly policy: "append" | "exclusive";
7011
+ readonly purpose?: string;
7012
+ readonly flags: number;
7013
+ readonly tag: string;
7014
+ readonly value: string;
7015
+ } | {
7016
+ readonly _tag: "NS";
7017
+ readonly name: string;
7018
+ readonly ttl: number | null;
7019
+ readonly policy: "append" | "exclusive";
7020
+ readonly purpose?: string;
7021
+ readonly nameserver: string;
7022
+ } | {
7023
+ readonly _tag: "SRV";
7024
+ readonly name: string;
7025
+ readonly ttl: number | null;
7026
+ readonly policy: "append" | "exclusive";
7027
+ readonly purpose?: string;
7028
+ readonly target: string;
7029
+ readonly port: number;
7030
+ readonly priority: number;
7031
+ readonly weight: number;
7032
+ };
7033
+ readonly existing: readonly ({
7034
+ readonly _tag: "A";
7035
+ readonly name: string;
7036
+ readonly ttl: number | null;
7037
+ readonly policy: "append" | "exclusive";
7038
+ readonly purpose?: string;
7039
+ readonly address: string;
7040
+ } | {
7041
+ readonly _tag: "AAAA";
7042
+ readonly name: string;
7043
+ readonly ttl: number | null;
7044
+ readonly policy: "append" | "exclusive";
7045
+ readonly purpose?: string;
7046
+ readonly address: string;
7047
+ } | {
7048
+ readonly _tag: "CNAME";
7049
+ readonly name: string;
7050
+ readonly ttl: number | null;
7051
+ readonly policy: "append" | "exclusive";
7052
+ readonly purpose?: string;
7053
+ readonly target: string;
7054
+ } | {
7055
+ readonly _tag: "TXT";
7056
+ readonly name: string;
7057
+ readonly ttl: number | null;
7058
+ readonly policy: "append" | "exclusive";
7059
+ readonly purpose?: string;
7060
+ readonly value: string;
7061
+ } | {
7062
+ readonly _tag: "MX";
7063
+ readonly name: string;
7064
+ readonly ttl: number | null;
7065
+ readonly policy: "append" | "exclusive";
7066
+ readonly purpose?: string;
7067
+ readonly exchange: string;
7068
+ readonly priority: number;
7069
+ } | {
7070
+ readonly _tag: "CAA";
7071
+ readonly name: string;
7072
+ readonly ttl: number | null;
7073
+ readonly policy: "append" | "exclusive";
7074
+ readonly purpose?: string;
7075
+ readonly flags: number;
7076
+ readonly tag: string;
7077
+ readonly value: string;
7078
+ } | {
7079
+ readonly _tag: "NS";
7080
+ readonly name: string;
7081
+ readonly ttl: number | null;
7082
+ readonly policy: "append" | "exclusive";
7083
+ readonly purpose?: string;
7084
+ readonly nameserver: string;
7085
+ } | {
7086
+ readonly _tag: "SRV";
7087
+ readonly name: string;
7088
+ readonly ttl: number | null;
7089
+ readonly policy: "append" | "exclusive";
7090
+ readonly purpose?: string;
7091
+ readonly target: string;
7092
+ readonly port: number;
7093
+ readonly priority: number;
7094
+ readonly weight: number;
7095
+ } | {
7096
+ readonly _tag: "Opaque";
7097
+ readonly name: string;
7098
+ readonly type: string;
7099
+ readonly raw: unknown;
7100
+ })[];
7101
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
7102
+ }[];
7103
+ } | {
7104
+ readonly _tag: "Stale";
7105
+ readonly planId: string;
7106
+ readonly digest: string;
7107
+ } | {
7108
+ readonly _tag: "BatchStale";
7109
+ readonly batchId: string;
7110
+ readonly status: string;
7111
+ readonly digest: string | null;
7112
+ } | {
7113
+ readonly _tag: "Expired";
7114
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
7115
+ readonly id: string;
7116
+ } | {
7117
+ readonly _tag: "Busy";
7118
+ readonly key: string;
7119
+ } | {
7120
+ readonly _tag: "ProviderRejected";
7121
+ readonly provider: string;
7122
+ readonly code?: string;
7123
+ readonly message: string;
7124
+ } | {
7125
+ readonly _tag: "ProviderUnavailable";
7126
+ readonly provider: string;
7127
+ readonly retryAfterMs?: number;
7128
+ readonly message: string;
7129
+ } | {
7130
+ readonly _tag: "ProviderConflict";
7131
+ readonly provider: string;
7132
+ readonly code?: string;
7133
+ readonly message: string;
7134
+ } | {
7135
+ readonly _tag: "Unsupported";
7136
+ readonly provider: string;
7137
+ readonly operation: string;
7138
+ readonly message: string;
7139
+ } | {
7140
+ readonly _tag: "Reconnect";
7141
+ readonly provider: string;
7142
+ readonly connectionId: string;
7143
+ } | {
7144
+ readonly _tag: "StorageFailed";
7145
+ readonly operation: string;
7146
+ readonly message: string;
7147
+ } | {
7148
+ readonly _tag: "CryptoFailed";
7149
+ readonly operation: "digest" | "open" | "seal";
7150
+ } | {
7151
+ readonly _tag: "ResolverFailed";
7152
+ readonly resolver: string;
7153
+ readonly message: string;
7154
+ };
7155
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
7156
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7157
+ }>], {
7158
+ readonly _tag: "DomainKitError";
7159
+ readonly reason: {
7160
+ readonly _tag: "InvalidInput";
7161
+ readonly message: string;
7162
+ readonly field?: string;
7163
+ } | {
7164
+ readonly _tag: "Unauthenticated";
7165
+ readonly message: string;
7166
+ } | {
7167
+ readonly _tag: "Forbidden";
7168
+ readonly message: string;
7169
+ } | {
7170
+ readonly _tag: "NotFound";
7171
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
7172
+ readonly id: string;
7173
+ } | {
7174
+ readonly _tag: "Conflict";
7175
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
7176
+ readonly operations: readonly {
7177
+ readonly _tag: "Conflict";
7178
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
7179
+ readonly record: {
7180
+ readonly _tag: "A";
7181
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7182
+ readonly ttl: number | null;
7183
+ readonly policy: "append" | "exclusive";
7184
+ readonly purpose?: string;
7185
+ readonly address: string;
7186
+ } | {
7187
+ readonly _tag: "AAAA";
7188
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7189
+ readonly ttl: number | null;
7190
+ readonly policy: "append" | "exclusive";
7191
+ readonly purpose?: string;
7192
+ readonly address: string;
7193
+ } | {
7194
+ readonly _tag: "CNAME";
7195
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7196
+ readonly ttl: number | null;
7197
+ readonly policy: "append" | "exclusive";
7198
+ readonly purpose?: string;
7199
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7200
+ } | {
7201
+ readonly _tag: "TXT";
7202
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7203
+ readonly ttl: number | null;
7204
+ readonly policy: "append" | "exclusive";
7205
+ readonly purpose?: string;
7206
+ readonly value: string;
7207
+ } | {
7208
+ readonly _tag: "MX";
7209
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7210
+ readonly ttl: number | null;
7211
+ readonly policy: "append" | "exclusive";
7212
+ readonly purpose?: string;
7213
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7214
+ readonly priority: number;
7215
+ } | {
7216
+ readonly _tag: "CAA";
7217
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7218
+ readonly ttl: number | null;
7219
+ readonly policy: "append" | "exclusive";
7220
+ readonly purpose?: string;
7221
+ readonly flags: number;
7222
+ readonly tag: string;
7223
+ readonly value: string;
7224
+ } | {
7225
+ readonly _tag: "NS";
7226
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7227
+ readonly ttl: number | null;
7228
+ readonly policy: "append" | "exclusive";
7229
+ readonly purpose?: string;
7230
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7231
+ } | {
7232
+ readonly _tag: "SRV";
7233
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7234
+ readonly ttl: number | null;
7235
+ readonly policy: "append" | "exclusive";
7236
+ readonly purpose?: string;
7237
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7238
+ readonly port: number;
7239
+ readonly priority: number;
7240
+ readonly weight: number;
7241
+ };
7242
+ readonly existing: readonly ({
7243
+ readonly _tag: "A";
7244
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7245
+ readonly ttl: number | null;
7246
+ readonly policy: "append" | "exclusive";
7247
+ readonly purpose?: string;
7248
+ readonly address: string;
7249
+ } | {
7250
+ readonly _tag: "AAAA";
7251
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7252
+ readonly ttl: number | null;
7253
+ readonly policy: "append" | "exclusive";
7254
+ readonly purpose?: string;
7255
+ readonly address: string;
7256
+ } | {
7257
+ readonly _tag: "CNAME";
7258
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7259
+ readonly ttl: number | null;
7260
+ readonly policy: "append" | "exclusive";
7261
+ readonly purpose?: string;
7262
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7263
+ } | {
7264
+ readonly _tag: "TXT";
7265
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7266
+ readonly ttl: number | null;
7267
+ readonly policy: "append" | "exclusive";
7268
+ readonly purpose?: string;
7269
+ readonly value: string;
7270
+ } | {
7271
+ readonly _tag: "MX";
7272
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7273
+ readonly ttl: number | null;
7274
+ readonly policy: "append" | "exclusive";
7275
+ readonly purpose?: string;
7276
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7277
+ readonly priority: number;
7278
+ } | {
7279
+ readonly _tag: "CAA";
7280
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7281
+ readonly ttl: number | null;
7282
+ readonly policy: "append" | "exclusive";
7283
+ readonly purpose?: string;
7284
+ readonly flags: number;
7285
+ readonly tag: string;
7286
+ readonly value: string;
7287
+ } | {
7288
+ readonly _tag: "NS";
7289
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7290
+ readonly ttl: number | null;
7291
+ readonly policy: "append" | "exclusive";
7292
+ readonly purpose?: string;
7293
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7294
+ } | {
7295
+ readonly _tag: "SRV";
7296
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7297
+ readonly ttl: number | null;
7298
+ readonly policy: "append" | "exclusive";
7299
+ readonly purpose?: string;
7300
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7301
+ readonly port: number;
7302
+ readonly priority: number;
7303
+ readonly weight: number;
7304
+ } | {
7305
+ readonly _tag: "Opaque";
7306
+ readonly name: string;
7307
+ readonly type: string;
7308
+ readonly raw: unknown;
7309
+ })[];
7310
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
7311
+ }[];
7312
+ } | {
7313
+ readonly _tag: "Stale";
7314
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
7315
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
7316
+ } | {
7317
+ readonly _tag: "BatchStale";
7318
+ readonly batchId: string;
7319
+ readonly status: string;
7320
+ readonly digest: string | null;
7321
+ } | {
7322
+ readonly _tag: "Expired";
7323
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
7324
+ readonly id: string;
7325
+ } | {
7326
+ readonly _tag: "Busy";
7327
+ readonly key: string;
7328
+ } | {
7329
+ readonly _tag: "ProviderRejected";
7330
+ readonly provider: string;
7331
+ readonly code?: string;
7332
+ readonly message: string;
7333
+ } | {
7334
+ readonly _tag: "ProviderUnavailable";
7335
+ readonly provider: string;
7336
+ readonly retryAfterMs?: number;
7337
+ readonly message: string;
7338
+ } | {
7339
+ readonly _tag: "ProviderConflict";
7340
+ readonly provider: string;
7341
+ readonly code?: string;
7342
+ readonly message: string;
7343
+ } | {
7344
+ readonly _tag: "Unsupported";
7345
+ readonly provider: string;
7346
+ readonly operation: string;
7347
+ readonly message: string;
7348
+ } | {
7349
+ readonly _tag: "Reconnect";
7350
+ readonly provider: string;
7351
+ readonly connectionId: string;
7352
+ } | {
7353
+ readonly _tag: "StorageFailed";
7354
+ readonly operation: string;
7355
+ readonly message: string;
7356
+ } | {
7357
+ readonly _tag: "CryptoFailed";
7358
+ readonly operation: "digest" | "open" | "seal";
7359
+ } | {
7360
+ readonly _tag: "ResolverFailed";
7361
+ readonly resolver: string;
7362
+ readonly message: string;
7363
+ };
7364
+ }>, Schema.TaggedStruct<"DomainKitError", {
7365
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7366
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plan", "GET", "/plans/:planId", Schema.toCodecStringTree<Schema.Struct<{
7367
+ planId: Schema.brand<Schema.String, "@domainkit/PlanId">;
7368
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
7369
+ readonly plan: typeof Plan.Model;
7370
+ readonly status: Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>;
7371
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
7372
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
7373
+ readonly rejection: Schema.NullOr<Schema.Struct<{
7374
+ readonly actorId: Schema.String;
7375
+ readonly reason: Schema.NullOr<Schema.String>;
7376
+ readonly at: Schema.DateTimeUtcFromString;
7377
+ }>>;
7378
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
7379
+ readonly _tag: "DomainKitError";
7380
+ readonly reason: {
7381
+ readonly _tag: "InvalidInput";
7382
+ readonly message: string;
7383
+ readonly field?: string;
7384
+ } | {
7385
+ readonly _tag: "Unauthenticated";
7386
+ readonly message: string;
7387
+ } | {
7388
+ readonly _tag: "Forbidden";
7389
+ readonly message: string;
7390
+ } | {
7391
+ readonly _tag: "NotFound";
7392
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
7393
+ readonly id: string;
7394
+ } | {
7395
+ readonly _tag: "Conflict";
7396
+ readonly planId: string;
7397
+ readonly operations: readonly {
7398
+ readonly _tag: "Conflict";
7399
+ readonly id: string;
7400
+ readonly record: {
7401
+ readonly _tag: "A";
7402
+ readonly name: string;
7403
+ readonly ttl: number | null;
7404
+ readonly policy: "append" | "exclusive";
7405
+ readonly purpose?: string;
7406
+ readonly address: string;
7407
+ } | {
7408
+ readonly _tag: "AAAA";
7409
+ readonly name: string;
7410
+ readonly ttl: number | null;
7411
+ readonly policy: "append" | "exclusive";
7412
+ readonly purpose?: string;
7413
+ readonly address: string;
7414
+ } | {
7415
+ readonly _tag: "CNAME";
7416
+ readonly name: string;
7417
+ readonly ttl: number | null;
7418
+ readonly policy: "append" | "exclusive";
7419
+ readonly purpose?: string;
7420
+ readonly target: string;
7421
+ } | {
7422
+ readonly _tag: "TXT";
7423
+ readonly name: string;
7424
+ readonly ttl: number | null;
7425
+ readonly policy: "append" | "exclusive";
7426
+ readonly purpose?: string;
7427
+ readonly value: string;
7428
+ } | {
7429
+ readonly _tag: "MX";
7430
+ readonly name: string;
7431
+ readonly ttl: number | null;
7432
+ readonly policy: "append" | "exclusive";
7433
+ readonly purpose?: string;
7434
+ readonly exchange: string;
7435
+ readonly priority: number;
7436
+ } | {
7437
+ readonly _tag: "CAA";
7438
+ readonly name: string;
7439
+ readonly ttl: number | null;
7440
+ readonly policy: "append" | "exclusive";
7441
+ readonly purpose?: string;
7442
+ readonly flags: number;
7443
+ readonly tag: string;
7444
+ readonly value: string;
7445
+ } | {
7446
+ readonly _tag: "NS";
7447
+ readonly name: string;
7448
+ readonly ttl: number | null;
7449
+ readonly policy: "append" | "exclusive";
7450
+ readonly purpose?: string;
7451
+ readonly nameserver: string;
7452
+ } | {
7453
+ readonly _tag: "SRV";
7454
+ readonly name: string;
7455
+ readonly ttl: number | null;
7456
+ readonly policy: "append" | "exclusive";
7457
+ readonly purpose?: string;
7458
+ readonly target: string;
7459
+ readonly port: number;
7460
+ readonly priority: number;
7461
+ readonly weight: number;
7462
+ };
7463
+ readonly existing: readonly ({
7464
+ readonly _tag: "A";
7465
+ readonly name: string;
7466
+ readonly ttl: number | null;
7467
+ readonly policy: "append" | "exclusive";
7468
+ readonly purpose?: string;
7469
+ readonly address: string;
7470
+ } | {
7471
+ readonly _tag: "AAAA";
7472
+ readonly name: string;
7473
+ readonly ttl: number | null;
7474
+ readonly policy: "append" | "exclusive";
7475
+ readonly purpose?: string;
7476
+ readonly address: string;
7477
+ } | {
7478
+ readonly _tag: "CNAME";
7479
+ readonly name: string;
7480
+ readonly ttl: number | null;
7481
+ readonly policy: "append" | "exclusive";
7482
+ readonly purpose?: string;
7483
+ readonly target: string;
7484
+ } | {
7485
+ readonly _tag: "TXT";
7486
+ readonly name: string;
7487
+ readonly ttl: number | null;
7488
+ readonly policy: "append" | "exclusive";
7489
+ readonly purpose?: string;
7490
+ readonly value: string;
7491
+ } | {
7492
+ readonly _tag: "MX";
7493
+ readonly name: string;
7494
+ readonly ttl: number | null;
7495
+ readonly policy: "append" | "exclusive";
7496
+ readonly purpose?: string;
7497
+ readonly exchange: string;
7498
+ readonly priority: number;
7499
+ } | {
7500
+ readonly _tag: "CAA";
7501
+ readonly name: string;
7502
+ readonly ttl: number | null;
7503
+ readonly policy: "append" | "exclusive";
7504
+ readonly purpose?: string;
7505
+ readonly flags: number;
7506
+ readonly tag: string;
7507
+ readonly value: string;
7508
+ } | {
7509
+ readonly _tag: "NS";
7510
+ readonly name: string;
7511
+ readonly ttl: number | null;
7512
+ readonly policy: "append" | "exclusive";
7513
+ readonly purpose?: string;
7514
+ readonly nameserver: string;
7515
+ } | {
7516
+ readonly _tag: "SRV";
7517
+ readonly name: string;
7518
+ readonly ttl: number | null;
7519
+ readonly policy: "append" | "exclusive";
7520
+ readonly purpose?: string;
7521
+ readonly target: string;
7522
+ readonly port: number;
7523
+ readonly priority: number;
7524
+ readonly weight: number;
7525
+ } | {
7526
+ readonly _tag: "Opaque";
7527
+ readonly name: string;
7528
+ readonly type: string;
7529
+ readonly raw: unknown;
7530
+ })[];
7531
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
7532
+ }[];
7533
+ } | {
7534
+ readonly _tag: "Stale";
7535
+ readonly planId: string;
7536
+ readonly digest: string;
7537
+ } | {
7538
+ readonly _tag: "BatchStale";
7539
+ readonly batchId: string;
7540
+ readonly status: string;
7541
+ readonly digest: string | null;
7542
+ } | {
7543
+ readonly _tag: "Expired";
7544
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
7545
+ readonly id: string;
7546
+ } | {
7547
+ readonly _tag: "Busy";
7548
+ readonly key: string;
7549
+ } | {
7550
+ readonly _tag: "ProviderRejected";
7551
+ readonly provider: string;
7552
+ readonly code?: string;
7553
+ readonly message: string;
7554
+ } | {
7555
+ readonly _tag: "ProviderUnavailable";
7556
+ readonly provider: string;
7557
+ readonly retryAfterMs?: number;
7558
+ readonly message: string;
7559
+ } | {
7560
+ readonly _tag: "ProviderConflict";
7561
+ readonly provider: string;
7562
+ readonly code?: string;
7563
+ readonly message: string;
7564
+ } | {
7565
+ readonly _tag: "Unsupported";
7566
+ readonly provider: string;
7567
+ readonly operation: string;
7568
+ readonly message: string;
7569
+ } | {
7570
+ readonly _tag: "Reconnect";
7571
+ readonly provider: string;
7572
+ readonly connectionId: string;
7573
+ } | {
7574
+ readonly _tag: "StorageFailed";
7575
+ readonly operation: string;
7576
+ readonly message: string;
7577
+ } | {
7578
+ readonly _tag: "CryptoFailed";
7579
+ readonly operation: "digest" | "open" | "seal";
7580
+ } | {
7581
+ readonly _tag: "ResolverFailed";
7582
+ readonly resolver: string;
7583
+ readonly message: string;
7584
+ };
7585
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
7586
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7587
+ }>], {
7588
+ readonly _tag: "DomainKitError";
7589
+ readonly reason: {
7590
+ readonly _tag: "InvalidInput";
7591
+ readonly message: string;
7592
+ readonly field?: string;
7593
+ } | {
7594
+ readonly _tag: "Unauthenticated";
7595
+ readonly message: string;
7596
+ } | {
7597
+ readonly _tag: "Forbidden";
7598
+ readonly message: string;
7599
+ } | {
7600
+ readonly _tag: "NotFound";
7601
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
7602
+ readonly id: string;
7603
+ } | {
7604
+ readonly _tag: "Conflict";
7605
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
7606
+ readonly operations: readonly {
7607
+ readonly _tag: "Conflict";
7608
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
7609
+ readonly record: {
7610
+ readonly _tag: "A";
7611
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7612
+ readonly ttl: number | null;
7613
+ readonly policy: "append" | "exclusive";
7614
+ readonly purpose?: string;
7615
+ readonly address: string;
7616
+ } | {
7617
+ readonly _tag: "AAAA";
7618
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7619
+ readonly ttl: number | null;
7620
+ readonly policy: "append" | "exclusive";
7621
+ readonly purpose?: string;
7622
+ readonly address: string;
7623
+ } | {
7624
+ readonly _tag: "CNAME";
7625
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7626
+ readonly ttl: number | null;
7627
+ readonly policy: "append" | "exclusive";
7628
+ readonly purpose?: string;
7629
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7630
+ } | {
7631
+ readonly _tag: "TXT";
7632
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7633
+ readonly ttl: number | null;
7634
+ readonly policy: "append" | "exclusive";
7635
+ readonly purpose?: string;
7636
+ readonly value: string;
7637
+ } | {
7638
+ readonly _tag: "MX";
7639
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7640
+ readonly ttl: number | null;
7641
+ readonly policy: "append" | "exclusive";
7642
+ readonly purpose?: string;
7643
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7644
+ readonly priority: number;
7645
+ } | {
7646
+ readonly _tag: "CAA";
7647
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7648
+ readonly ttl: number | null;
7649
+ readonly policy: "append" | "exclusive";
7650
+ readonly purpose?: string;
7651
+ readonly flags: number;
7652
+ readonly tag: string;
7653
+ readonly value: string;
7654
+ } | {
7655
+ readonly _tag: "NS";
7656
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7657
+ readonly ttl: number | null;
7658
+ readonly policy: "append" | "exclusive";
7659
+ readonly purpose?: string;
7660
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7661
+ } | {
7662
+ readonly _tag: "SRV";
7663
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7664
+ readonly ttl: number | null;
7665
+ readonly policy: "append" | "exclusive";
7666
+ readonly purpose?: string;
7667
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7668
+ readonly port: number;
7669
+ readonly priority: number;
7670
+ readonly weight: number;
7671
+ };
7672
+ readonly existing: readonly ({
7673
+ readonly _tag: "A";
7674
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7675
+ readonly ttl: number | null;
7676
+ readonly policy: "append" | "exclusive";
7677
+ readonly purpose?: string;
7678
+ readonly address: string;
7679
+ } | {
7680
+ readonly _tag: "AAAA";
7681
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7682
+ readonly ttl: number | null;
7683
+ readonly policy: "append" | "exclusive";
7684
+ readonly purpose?: string;
7685
+ readonly address: string;
7686
+ } | {
7687
+ readonly _tag: "CNAME";
7688
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7689
+ readonly ttl: number | null;
7690
+ readonly policy: "append" | "exclusive";
7691
+ readonly purpose?: string;
7692
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7693
+ } | {
7694
+ readonly _tag: "TXT";
7695
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7696
+ readonly ttl: number | null;
7697
+ readonly policy: "append" | "exclusive";
7698
+ readonly purpose?: string;
7699
+ readonly value: string;
7700
+ } | {
7701
+ readonly _tag: "MX";
7702
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7703
+ readonly ttl: number | null;
7704
+ readonly policy: "append" | "exclusive";
7705
+ readonly purpose?: string;
7706
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7707
+ readonly priority: number;
7708
+ } | {
7709
+ readonly _tag: "CAA";
7710
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7711
+ readonly ttl: number | null;
7712
+ readonly policy: "append" | "exclusive";
7713
+ readonly purpose?: string;
7714
+ readonly flags: number;
7715
+ readonly tag: string;
7716
+ readonly value: string;
7717
+ } | {
7718
+ readonly _tag: "NS";
7719
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7720
+ readonly ttl: number | null;
7721
+ readonly policy: "append" | "exclusive";
7722
+ readonly purpose?: string;
7723
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7724
+ } | {
7725
+ readonly _tag: "SRV";
7726
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7727
+ readonly ttl: number | null;
7728
+ readonly policy: "append" | "exclusive";
7729
+ readonly purpose?: string;
7730
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
7731
+ readonly port: number;
7732
+ readonly priority: number;
7733
+ readonly weight: number;
7734
+ } | {
7735
+ readonly _tag: "Opaque";
7736
+ readonly name: string;
7737
+ readonly type: string;
7738
+ readonly raw: unknown;
7739
+ })[];
7740
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
7741
+ }[];
7742
+ } | {
7743
+ readonly _tag: "Stale";
7744
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
7745
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
7746
+ } | {
7747
+ readonly _tag: "BatchStale";
7748
+ readonly batchId: string;
7749
+ readonly status: string;
7750
+ readonly digest: string | null;
7751
+ } | {
7752
+ readonly _tag: "Expired";
7753
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
7754
+ readonly id: string;
7755
+ } | {
7756
+ readonly _tag: "Busy";
7757
+ readonly key: string;
7758
+ } | {
7759
+ readonly _tag: "ProviderRejected";
7760
+ readonly provider: string;
7761
+ readonly code?: string;
7762
+ readonly message: string;
7763
+ } | {
7764
+ readonly _tag: "ProviderUnavailable";
7765
+ readonly provider: string;
7766
+ readonly retryAfterMs?: number;
7767
+ readonly message: string;
7768
+ } | {
7769
+ readonly _tag: "ProviderConflict";
7770
+ readonly provider: string;
7771
+ readonly code?: string;
7772
+ readonly message: string;
7773
+ } | {
7774
+ readonly _tag: "Unsupported";
7775
+ readonly provider: string;
7776
+ readonly operation: string;
7777
+ readonly message: string;
7778
+ } | {
7779
+ readonly _tag: "Reconnect";
7780
+ readonly provider: string;
7781
+ readonly connectionId: string;
7782
+ } | {
7783
+ readonly _tag: "StorageFailed";
7784
+ readonly operation: string;
7785
+ readonly message: string;
7786
+ } | {
7787
+ readonly _tag: "CryptoFailed";
7788
+ readonly operation: "digest" | "open" | "seal";
7789
+ } | {
7790
+ readonly _tag: "ResolverFailed";
7791
+ readonly resolver: string;
7792
+ readonly message: string;
7793
+ };
7794
+ }>, Schema.TaggedStruct<"DomainKitError", {
7795
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7796
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"planBatch", "POST", "/batches/:batchId/plans", Schema.toCodecStringTree<Schema.Struct<{
7797
+ batchId: Schema.brand<Schema.String, "@domainkit/BatchId">;
7798
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
7799
+ readonly items: Schema.$Array<Schema.Struct<{
7800
+ readonly domain: Schema.String;
7801
+ readonly requirements: Schema.$Array<Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>>;
7802
+ }>>;
7803
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
7804
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
7805
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
7806
+ /** What `POST /batches/:batchId/approvals` takes; null while any item is unplanned. */
7807
+ readonly digest: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/Digest">>;
7808
+ readonly approval: Schema.NullOr<Schema.Struct<{
7809
+ readonly actorId: Schema.String;
7810
+ readonly at: Schema.DateTimeUtcFromString;
7811
+ }>>;
7812
+ readonly rejection: Schema.NullOr<Schema.Struct<{
7813
+ readonly actorId: Schema.String;
7814
+ readonly reason: Schema.NullOr<Schema.String>;
7815
+ readonly at: Schema.DateTimeUtcFromString;
7816
+ }>>;
7817
+ readonly createdAt: Schema.DateTimeUtcFromString;
7818
+ readonly updatedAt: Schema.DateTimeUtcFromString;
7819
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
7820
+ readonly items: Schema.$Array<Schema.Struct<{
7821
+ readonly attachmentId: Schema.String;
7822
+ readonly position: Schema.Number;
7823
+ /** Null while the item has no plan; `planFailure` then says why. */
7824
+ readonly plan: Schema.NullOr<typeof Plan.Model>;
7825
+ readonly status: Schema.NullOr<Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>>;
7826
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
7827
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
7828
+ readonly rejection: Schema.NullOr<Schema.Struct<{
7829
+ readonly actorId: Schema.String;
7830
+ readonly reason: Schema.NullOr<Schema.String>;
7831
+ readonly at: Schema.DateTimeUtcFromString;
7832
+ }>>;
7833
+ readonly failure: Schema.NullOr<Schema.String>;
7834
+ readonly planFailure: Schema.NullOr<Schema.String>;
7835
+ }>>;
7836
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
7837
+ readonly _tag: "DomainKitError";
7838
+ readonly reason: {
7839
+ readonly _tag: "InvalidInput";
7840
+ readonly message: string;
7841
+ readonly field?: string;
7842
+ } | {
7843
+ readonly _tag: "Unauthenticated";
7844
+ readonly message: string;
7845
+ } | {
7846
+ readonly _tag: "Forbidden";
7847
+ readonly message: string;
7848
+ } | {
7849
+ readonly _tag: "NotFound";
7850
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
7851
+ readonly id: string;
7852
+ } | {
7853
+ readonly _tag: "Conflict";
7854
+ readonly planId: string;
7855
+ readonly operations: readonly {
7856
+ readonly _tag: "Conflict";
7857
+ readonly id: string;
7858
+ readonly record: {
7859
+ readonly _tag: "A";
7860
+ readonly name: string;
7861
+ readonly ttl: number | null;
7862
+ readonly policy: "append" | "exclusive";
7863
+ readonly purpose?: string;
7864
+ readonly address: string;
7865
+ } | {
7866
+ readonly _tag: "AAAA";
7867
+ readonly name: string;
7868
+ readonly ttl: number | null;
7869
+ readonly policy: "append" | "exclusive";
7870
+ readonly purpose?: string;
7871
+ readonly address: string;
7872
+ } | {
7873
+ readonly _tag: "CNAME";
7874
+ readonly name: string;
7875
+ readonly ttl: number | null;
7876
+ readonly policy: "append" | "exclusive";
7877
+ readonly purpose?: string;
7878
+ readonly target: string;
7879
+ } | {
7880
+ readonly _tag: "TXT";
7881
+ readonly name: string;
7882
+ readonly ttl: number | null;
7883
+ readonly policy: "append" | "exclusive";
7884
+ readonly purpose?: string;
7885
+ readonly value: string;
7886
+ } | {
7887
+ readonly _tag: "MX";
7888
+ readonly name: string;
7889
+ readonly ttl: number | null;
7890
+ readonly policy: "append" | "exclusive";
7891
+ readonly purpose?: string;
7892
+ readonly exchange: string;
7893
+ readonly priority: number;
7894
+ } | {
7895
+ readonly _tag: "CAA";
7896
+ readonly name: string;
7897
+ readonly ttl: number | null;
7898
+ readonly policy: "append" | "exclusive";
7899
+ readonly purpose?: string;
7900
+ readonly flags: number;
7901
+ readonly tag: string;
7902
+ readonly value: string;
7903
+ } | {
7904
+ readonly _tag: "NS";
7905
+ readonly name: string;
7906
+ readonly ttl: number | null;
7907
+ readonly policy: "append" | "exclusive";
7908
+ readonly purpose?: string;
7909
+ readonly nameserver: string;
7910
+ } | {
7911
+ readonly _tag: "SRV";
7912
+ readonly name: string;
7913
+ readonly ttl: number | null;
7914
+ readonly policy: "append" | "exclusive";
7915
+ readonly purpose?: string;
7916
+ readonly target: string;
7917
+ readonly port: number;
7918
+ readonly priority: number;
7919
+ readonly weight: number;
7920
+ };
7921
+ readonly existing: readonly ({
7922
+ readonly _tag: "A";
7923
+ readonly name: string;
7924
+ readonly ttl: number | null;
7925
+ readonly policy: "append" | "exclusive";
7926
+ readonly purpose?: string;
7927
+ readonly address: string;
7928
+ } | {
7929
+ readonly _tag: "AAAA";
7930
+ readonly name: string;
7931
+ readonly ttl: number | null;
7932
+ readonly policy: "append" | "exclusive";
7933
+ readonly purpose?: string;
7934
+ readonly address: string;
7935
+ } | {
7936
+ readonly _tag: "CNAME";
7937
+ readonly name: string;
7938
+ readonly ttl: number | null;
7939
+ readonly policy: "append" | "exclusive";
7940
+ readonly purpose?: string;
7941
+ readonly target: string;
7942
+ } | {
7943
+ readonly _tag: "TXT";
7944
+ readonly name: string;
7945
+ readonly ttl: number | null;
7946
+ readonly policy: "append" | "exclusive";
7947
+ readonly purpose?: string;
7948
+ readonly value: string;
7949
+ } | {
7950
+ readonly _tag: "MX";
7951
+ readonly name: string;
7952
+ readonly ttl: number | null;
7953
+ readonly policy: "append" | "exclusive";
7954
+ readonly purpose?: string;
7955
+ readonly exchange: string;
7956
+ readonly priority: number;
7957
+ } | {
7958
+ readonly _tag: "CAA";
7959
+ readonly name: string;
7960
+ readonly ttl: number | null;
7961
+ readonly policy: "append" | "exclusive";
7962
+ readonly purpose?: string;
7963
+ readonly flags: number;
7964
+ readonly tag: string;
7965
+ readonly value: string;
7966
+ } | {
7967
+ readonly _tag: "NS";
7968
+ readonly name: string;
7969
+ readonly ttl: number | null;
7970
+ readonly policy: "append" | "exclusive";
7971
+ readonly purpose?: string;
7972
+ readonly nameserver: string;
7973
+ } | {
7974
+ readonly _tag: "SRV";
7975
+ readonly name: string;
7976
+ readonly ttl: number | null;
7977
+ readonly policy: "append" | "exclusive";
7978
+ readonly purpose?: string;
7979
+ readonly target: string;
7980
+ readonly port: number;
7981
+ readonly priority: number;
7982
+ readonly weight: number;
7983
+ } | {
7984
+ readonly _tag: "Opaque";
7985
+ readonly name: string;
7986
+ readonly type: string;
7987
+ readonly raw: unknown;
7988
+ })[];
7989
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
7990
+ }[];
7991
+ } | {
7992
+ readonly _tag: "Stale";
7993
+ readonly planId: string;
7994
+ readonly digest: string;
7995
+ } | {
7996
+ readonly _tag: "BatchStale";
7997
+ readonly batchId: string;
7998
+ readonly status: string;
7999
+ readonly digest: string | null;
8000
+ } | {
8001
+ readonly _tag: "Expired";
8002
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
8003
+ readonly id: string;
8004
+ } | {
8005
+ readonly _tag: "Busy";
8006
+ readonly key: string;
8007
+ } | {
8008
+ readonly _tag: "ProviderRejected";
8009
+ readonly provider: string;
8010
+ readonly code?: string;
8011
+ readonly message: string;
8012
+ } | {
8013
+ readonly _tag: "ProviderUnavailable";
8014
+ readonly provider: string;
8015
+ readonly retryAfterMs?: number;
8016
+ readonly message: string;
8017
+ } | {
8018
+ readonly _tag: "ProviderConflict";
8019
+ readonly provider: string;
8020
+ readonly code?: string;
8021
+ readonly message: string;
8022
+ } | {
8023
+ readonly _tag: "Unsupported";
8024
+ readonly provider: string;
8025
+ readonly operation: string;
8026
+ readonly message: string;
8027
+ } | {
8028
+ readonly _tag: "Reconnect";
8029
+ readonly provider: string;
8030
+ readonly connectionId: string;
8031
+ } | {
8032
+ readonly _tag: "StorageFailed";
8033
+ readonly operation: string;
8034
+ readonly message: string;
8035
+ } | {
8036
+ readonly _tag: "CryptoFailed";
8037
+ readonly operation: "digest" | "open" | "seal";
8038
+ } | {
8039
+ readonly _tag: "ResolverFailed";
8040
+ readonly resolver: string;
8041
+ readonly message: string;
8042
+ };
8043
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
8044
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
8045
+ }>], {
8046
+ readonly _tag: "DomainKitError";
8047
+ readonly reason: {
8048
+ readonly _tag: "InvalidInput";
8049
+ readonly message: string;
8050
+ readonly field?: string;
8051
+ } | {
8052
+ readonly _tag: "Unauthenticated";
8053
+ readonly message: string;
8054
+ } | {
8055
+ readonly _tag: "Forbidden";
8056
+ readonly message: string;
8057
+ } | {
8058
+ readonly _tag: "NotFound";
8059
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
8060
+ readonly id: string;
8061
+ } | {
8062
+ readonly _tag: "Conflict";
8063
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
8064
+ readonly operations: readonly {
8065
+ readonly _tag: "Conflict";
8066
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
8067
+ readonly record: {
8068
+ readonly _tag: "A";
8069
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8070
+ readonly ttl: number | null;
8071
+ readonly policy: "append" | "exclusive";
8072
+ readonly purpose?: string;
8073
+ readonly address: string;
8074
+ } | {
8075
+ readonly _tag: "AAAA";
8076
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8077
+ readonly ttl: number | null;
8078
+ readonly policy: "append" | "exclusive";
8079
+ readonly purpose?: string;
8080
+ readonly address: string;
8081
+ } | {
8082
+ readonly _tag: "CNAME";
8083
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8084
+ readonly ttl: number | null;
8085
+ readonly policy: "append" | "exclusive";
8086
+ readonly purpose?: string;
8087
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8088
+ } | {
8089
+ readonly _tag: "TXT";
8090
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8091
+ readonly ttl: number | null;
8092
+ readonly policy: "append" | "exclusive";
8093
+ readonly purpose?: string;
8094
+ readonly value: string;
8095
+ } | {
8096
+ readonly _tag: "MX";
8097
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8098
+ readonly ttl: number | null;
8099
+ readonly policy: "append" | "exclusive";
8100
+ readonly purpose?: string;
8101
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8102
+ readonly priority: number;
8103
+ } | {
8104
+ readonly _tag: "CAA";
8105
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8106
+ readonly ttl: number | null;
8107
+ readonly policy: "append" | "exclusive";
8108
+ readonly purpose?: string;
8109
+ readonly flags: number;
8110
+ readonly tag: string;
8111
+ readonly value: string;
8112
+ } | {
8113
+ readonly _tag: "NS";
8114
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8115
+ readonly ttl: number | null;
8116
+ readonly policy: "append" | "exclusive";
8117
+ readonly purpose?: string;
8118
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8119
+ } | {
8120
+ readonly _tag: "SRV";
8121
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8122
+ readonly ttl: number | null;
8123
+ readonly policy: "append" | "exclusive";
8124
+ readonly purpose?: string;
8125
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8126
+ readonly port: number;
8127
+ readonly priority: number;
8128
+ readonly weight: number;
8129
+ };
8130
+ readonly existing: readonly ({
8131
+ readonly _tag: "A";
8132
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8133
+ readonly ttl: number | null;
8134
+ readonly policy: "append" | "exclusive";
8135
+ readonly purpose?: string;
8136
+ readonly address: string;
8137
+ } | {
8138
+ readonly _tag: "AAAA";
8139
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8140
+ readonly ttl: number | null;
8141
+ readonly policy: "append" | "exclusive";
8142
+ readonly purpose?: string;
8143
+ readonly address: string;
8144
+ } | {
8145
+ readonly _tag: "CNAME";
8146
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8147
+ readonly ttl: number | null;
8148
+ readonly policy: "append" | "exclusive";
8149
+ readonly purpose?: string;
8150
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8151
+ } | {
8152
+ readonly _tag: "TXT";
8153
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8154
+ readonly ttl: number | null;
8155
+ readonly policy: "append" | "exclusive";
8156
+ readonly purpose?: string;
8157
+ readonly value: string;
8158
+ } | {
8159
+ readonly _tag: "MX";
8160
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8161
+ readonly ttl: number | null;
8162
+ readonly policy: "append" | "exclusive";
8163
+ readonly purpose?: string;
8164
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8165
+ readonly priority: number;
8166
+ } | {
8167
+ readonly _tag: "CAA";
8168
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8169
+ readonly ttl: number | null;
8170
+ readonly policy: "append" | "exclusive";
8171
+ readonly purpose?: string;
8172
+ readonly flags: number;
8173
+ readonly tag: string;
8174
+ readonly value: string;
8175
+ } | {
8176
+ readonly _tag: "NS";
8177
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8178
+ readonly ttl: number | null;
8179
+ readonly policy: "append" | "exclusive";
8180
+ readonly purpose?: string;
8181
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8182
+ } | {
8183
+ readonly _tag: "SRV";
8184
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8185
+ readonly ttl: number | null;
8186
+ readonly policy: "append" | "exclusive";
8187
+ readonly purpose?: string;
8188
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8189
+ readonly port: number;
8190
+ readonly priority: number;
8191
+ readonly weight: number;
8192
+ } | {
8193
+ readonly _tag: "Opaque";
8194
+ readonly name: string;
8195
+ readonly type: string;
8196
+ readonly raw: unknown;
8197
+ })[];
8198
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
8199
+ }[];
8200
+ } | {
8201
+ readonly _tag: "Stale";
8202
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
8203
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
8204
+ } | {
8205
+ readonly _tag: "BatchStale";
8206
+ readonly batchId: string;
8207
+ readonly status: string;
8208
+ readonly digest: string | null;
8209
+ } | {
8210
+ readonly _tag: "Expired";
8211
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
8212
+ readonly id: string;
8213
+ } | {
8214
+ readonly _tag: "Busy";
8215
+ readonly key: string;
8216
+ } | {
8217
+ readonly _tag: "ProviderRejected";
8218
+ readonly provider: string;
8219
+ readonly code?: string;
8220
+ readonly message: string;
8221
+ } | {
8222
+ readonly _tag: "ProviderUnavailable";
8223
+ readonly provider: string;
8224
+ readonly retryAfterMs?: number;
8225
+ readonly message: string;
8226
+ } | {
8227
+ readonly _tag: "ProviderConflict";
8228
+ readonly provider: string;
8229
+ readonly code?: string;
8230
+ readonly message: string;
8231
+ } | {
8232
+ readonly _tag: "Unsupported";
8233
+ readonly provider: string;
8234
+ readonly operation: string;
8235
+ readonly message: string;
8236
+ } | {
8237
+ readonly _tag: "Reconnect";
8238
+ readonly provider: string;
8239
+ readonly connectionId: string;
8240
+ } | {
8241
+ readonly _tag: "StorageFailed";
8242
+ readonly operation: string;
8243
+ readonly message: string;
8244
+ } | {
8245
+ readonly _tag: "CryptoFailed";
8246
+ readonly operation: "digest" | "open" | "seal";
8247
+ } | {
8248
+ readonly _tag: "ResolverFailed";
8249
+ readonly resolver: string;
8250
+ readonly message: string;
8251
+ };
8252
+ }>, Schema.TaggedStruct<"DomainKitError", {
8253
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
8254
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"readiness", "GET", "/domains/:domain/readiness", Schema.toCodecStringTree<Schema.Struct<{
8255
+ domain: Schema.String;
8256
+ }>>, never, never, never, Schema.toCodecJson<Schema.NullOr<Schema.Struct<{
8257
+ readonly domain: Schema.String;
8258
+ readonly attachmentId: Schema.NullOr<Schema.String>;
8259
+ readonly overall: Schema.Literals<readonly ["ready", "pending", "failed"]>;
8260
+ readonly requirements: Schema.$Array<Schema.Struct<{
8261
+ /** `Verify.requirementKey(record)`, so a client pairs rows by content, not by position. */
8262
+ readonly key: Schema.String;
8263
+ readonly operationId: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/OperationId">>;
8264
+ readonly record: Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>;
8265
+ readonly status: Schema.Literals<readonly ["satisfied", "missing", "mismatch", "unknown"]>;
8266
+ readonly evidence: Schema.$Array<Schema.Union<readonly [typeof Verify.ProviderEvidence, typeof Verify.PublicDnsEvidence, typeof Verify.HostEvidence]>>;
8267
+ }>>;
8268
+ readonly host: Schema.$Array<typeof Verify.HostEvidence>;
8269
+ readonly checkedAt: Schema.DateTimeUtcFromString;
8270
+ readonly nextCheckAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
8271
+ }>>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
8272
+ readonly _tag: "DomainKitError";
8273
+ readonly reason: {
8274
+ readonly _tag: "InvalidInput";
8275
+ readonly message: string;
8276
+ readonly field?: string;
8277
+ } | {
8278
+ readonly _tag: "Unauthenticated";
8279
+ readonly message: string;
8280
+ } | {
8281
+ readonly _tag: "Forbidden";
8282
+ readonly message: string;
8283
+ } | {
8284
+ readonly _tag: "NotFound";
8285
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
8286
+ readonly id: string;
8287
+ } | {
8288
+ readonly _tag: "Conflict";
8289
+ readonly planId: string;
8290
+ readonly operations: readonly {
8291
+ readonly _tag: "Conflict";
8292
+ readonly id: string;
8293
+ readonly record: {
8294
+ readonly _tag: "A";
8295
+ readonly name: string;
8296
+ readonly ttl: number | null;
8297
+ readonly policy: "append" | "exclusive";
8298
+ readonly purpose?: string;
8299
+ readonly address: string;
8300
+ } | {
8301
+ readonly _tag: "AAAA";
8302
+ readonly name: string;
8303
+ readonly ttl: number | null;
8304
+ readonly policy: "append" | "exclusive";
8305
+ readonly purpose?: string;
8306
+ readonly address: string;
8307
+ } | {
8308
+ readonly _tag: "CNAME";
8309
+ readonly name: string;
8310
+ readonly ttl: number | null;
8311
+ readonly policy: "append" | "exclusive";
8312
+ readonly purpose?: string;
8313
+ readonly target: string;
8314
+ } | {
8315
+ readonly _tag: "TXT";
8316
+ readonly name: string;
8317
+ readonly ttl: number | null;
8318
+ readonly policy: "append" | "exclusive";
8319
+ readonly purpose?: string;
8320
+ readonly value: string;
8321
+ } | {
8322
+ readonly _tag: "MX";
8323
+ readonly name: string;
8324
+ readonly ttl: number | null;
8325
+ readonly policy: "append" | "exclusive";
8326
+ readonly purpose?: string;
8327
+ readonly exchange: string;
8328
+ readonly priority: number;
8329
+ } | {
8330
+ readonly _tag: "CAA";
8331
+ readonly name: string;
8332
+ readonly ttl: number | null;
8333
+ readonly policy: "append" | "exclusive";
8334
+ readonly purpose?: string;
8335
+ readonly flags: number;
8336
+ readonly tag: string;
8337
+ readonly value: string;
8338
+ } | {
8339
+ readonly _tag: "NS";
8340
+ readonly name: string;
8341
+ readonly ttl: number | null;
8342
+ readonly policy: "append" | "exclusive";
8343
+ readonly purpose?: string;
8344
+ readonly nameserver: string;
8345
+ } | {
8346
+ readonly _tag: "SRV";
8347
+ readonly name: string;
8348
+ readonly ttl: number | null;
8349
+ readonly policy: "append" | "exclusive";
8350
+ readonly purpose?: string;
8351
+ readonly target: string;
8352
+ readonly port: number;
8353
+ readonly priority: number;
8354
+ readonly weight: number;
8355
+ };
8356
+ readonly existing: readonly ({
8357
+ readonly _tag: "A";
8358
+ readonly name: string;
8359
+ readonly ttl: number | null;
8360
+ readonly policy: "append" | "exclusive";
8361
+ readonly purpose?: string;
8362
+ readonly address: string;
8363
+ } | {
8364
+ readonly _tag: "AAAA";
8365
+ readonly name: string;
8366
+ readonly ttl: number | null;
8367
+ readonly policy: "append" | "exclusive";
8368
+ readonly purpose?: string;
8369
+ readonly address: string;
8370
+ } | {
8371
+ readonly _tag: "CNAME";
8372
+ readonly name: string;
8373
+ readonly ttl: number | null;
8374
+ readonly policy: "append" | "exclusive";
8375
+ readonly purpose?: string;
8376
+ readonly target: string;
8377
+ } | {
8378
+ readonly _tag: "TXT";
8379
+ readonly name: string;
8380
+ readonly ttl: number | null;
8381
+ readonly policy: "append" | "exclusive";
8382
+ readonly purpose?: string;
8383
+ readonly value: string;
8384
+ } | {
8385
+ readonly _tag: "MX";
8386
+ readonly name: string;
8387
+ readonly ttl: number | null;
8388
+ readonly policy: "append" | "exclusive";
8389
+ readonly purpose?: string;
8390
+ readonly exchange: string;
8391
+ readonly priority: number;
8392
+ } | {
8393
+ readonly _tag: "CAA";
8394
+ readonly name: string;
8395
+ readonly ttl: number | null;
8396
+ readonly policy: "append" | "exclusive";
8397
+ readonly purpose?: string;
8398
+ readonly flags: number;
8399
+ readonly tag: string;
8400
+ readonly value: string;
8401
+ } | {
8402
+ readonly _tag: "NS";
8403
+ readonly name: string;
8404
+ readonly ttl: number | null;
8405
+ readonly policy: "append" | "exclusive";
8406
+ readonly purpose?: string;
8407
+ readonly nameserver: string;
8408
+ } | {
8409
+ readonly _tag: "SRV";
8410
+ readonly name: string;
8411
+ readonly ttl: number | null;
8412
+ readonly policy: "append" | "exclusive";
8413
+ readonly purpose?: string;
8414
+ readonly target: string;
8415
+ readonly port: number;
8416
+ readonly priority: number;
8417
+ readonly weight: number;
8418
+ } | {
8419
+ readonly _tag: "Opaque";
8420
+ readonly name: string;
8421
+ readonly type: string;
8422
+ readonly raw: unknown;
8423
+ })[];
8424
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
8425
+ }[];
8426
+ } | {
8427
+ readonly _tag: "Stale";
8428
+ readonly planId: string;
8429
+ readonly digest: string;
8430
+ } | {
8431
+ readonly _tag: "BatchStale";
8432
+ readonly batchId: string;
8433
+ readonly status: string;
8434
+ readonly digest: string | null;
8435
+ } | {
8436
+ readonly _tag: "Expired";
8437
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
8438
+ readonly id: string;
8439
+ } | {
8440
+ readonly _tag: "Busy";
8441
+ readonly key: string;
8442
+ } | {
8443
+ readonly _tag: "ProviderRejected";
8444
+ readonly provider: string;
8445
+ readonly code?: string;
8446
+ readonly message: string;
8447
+ } | {
8448
+ readonly _tag: "ProviderUnavailable";
8449
+ readonly provider: string;
8450
+ readonly retryAfterMs?: number;
8451
+ readonly message: string;
8452
+ } | {
8453
+ readonly _tag: "ProviderConflict";
8454
+ readonly provider: string;
8455
+ readonly code?: string;
8456
+ readonly message: string;
8457
+ } | {
8458
+ readonly _tag: "Unsupported";
8459
+ readonly provider: string;
8460
+ readonly operation: string;
8461
+ readonly message: string;
8462
+ } | {
8463
+ readonly _tag: "Reconnect";
8464
+ readonly provider: string;
8465
+ readonly connectionId: string;
8466
+ } | {
8467
+ readonly _tag: "StorageFailed";
8468
+ readonly operation: string;
8469
+ readonly message: string;
8470
+ } | {
8471
+ readonly _tag: "CryptoFailed";
8472
+ readonly operation: "digest" | "open" | "seal";
8473
+ } | {
8474
+ readonly _tag: "ResolverFailed";
8475
+ readonly resolver: string;
8476
+ readonly message: string;
8477
+ };
8478
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
8479
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
8480
+ }>], {
8481
+ readonly _tag: "DomainKitError";
8482
+ readonly reason: {
8483
+ readonly _tag: "InvalidInput";
8484
+ readonly message: string;
8485
+ readonly field?: string;
8486
+ } | {
8487
+ readonly _tag: "Unauthenticated";
8488
+ readonly message: string;
8489
+ } | {
8490
+ readonly _tag: "Forbidden";
8491
+ readonly message: string;
8492
+ } | {
8493
+ readonly _tag: "NotFound";
8494
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
8495
+ readonly id: string;
8496
+ } | {
8497
+ readonly _tag: "Conflict";
8498
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
8499
+ readonly operations: readonly {
8500
+ readonly _tag: "Conflict";
8501
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
8502
+ readonly record: {
8503
+ readonly _tag: "A";
8504
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8505
+ readonly ttl: number | null;
8506
+ readonly policy: "append" | "exclusive";
8507
+ readonly purpose?: string;
8508
+ readonly address: string;
8509
+ } | {
8510
+ readonly _tag: "AAAA";
8511
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8512
+ readonly ttl: number | null;
8513
+ readonly policy: "append" | "exclusive";
8514
+ readonly purpose?: string;
8515
+ readonly address: string;
8516
+ } | {
8517
+ readonly _tag: "CNAME";
8518
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8519
+ readonly ttl: number | null;
8520
+ readonly policy: "append" | "exclusive";
8521
+ readonly purpose?: string;
8522
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8523
+ } | {
8524
+ readonly _tag: "TXT";
8525
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8526
+ readonly ttl: number | null;
8527
+ readonly policy: "append" | "exclusive";
8528
+ readonly purpose?: string;
8529
+ readonly value: string;
8530
+ } | {
8531
+ readonly _tag: "MX";
8532
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8533
+ readonly ttl: number | null;
8534
+ readonly policy: "append" | "exclusive";
8535
+ readonly purpose?: string;
8536
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8537
+ readonly priority: number;
8538
+ } | {
8539
+ readonly _tag: "CAA";
8540
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8541
+ readonly ttl: number | null;
8542
+ readonly policy: "append" | "exclusive";
8543
+ readonly purpose?: string;
8544
+ readonly flags: number;
8545
+ readonly tag: string;
8546
+ readonly value: string;
8547
+ } | {
8548
+ readonly _tag: "NS";
8549
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8550
+ readonly ttl: number | null;
8551
+ readonly policy: "append" | "exclusive";
8552
+ readonly purpose?: string;
8553
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8554
+ } | {
8555
+ readonly _tag: "SRV";
8556
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8557
+ readonly ttl: number | null;
8558
+ readonly policy: "append" | "exclusive";
8559
+ readonly purpose?: string;
8560
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8561
+ readonly port: number;
8562
+ readonly priority: number;
8563
+ readonly weight: number;
8564
+ };
8565
+ readonly existing: readonly ({
8566
+ readonly _tag: "A";
8567
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8568
+ readonly ttl: number | null;
8569
+ readonly policy: "append" | "exclusive";
8570
+ readonly purpose?: string;
8571
+ readonly address: string;
8572
+ } | {
8573
+ readonly _tag: "AAAA";
8574
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8575
+ readonly ttl: number | null;
8576
+ readonly policy: "append" | "exclusive";
8577
+ readonly purpose?: string;
8578
+ readonly address: string;
8579
+ } | {
8580
+ readonly _tag: "CNAME";
8581
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8582
+ readonly ttl: number | null;
8583
+ readonly policy: "append" | "exclusive";
8584
+ readonly purpose?: string;
8585
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8586
+ } | {
8587
+ readonly _tag: "TXT";
8588
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8589
+ readonly ttl: number | null;
8590
+ readonly policy: "append" | "exclusive";
8591
+ readonly purpose?: string;
8592
+ readonly value: string;
8593
+ } | {
8594
+ readonly _tag: "MX";
8595
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8596
+ readonly ttl: number | null;
8597
+ readonly policy: "append" | "exclusive";
8598
+ readonly purpose?: string;
8599
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8600
+ readonly priority: number;
8601
+ } | {
8602
+ readonly _tag: "CAA";
8603
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8604
+ readonly ttl: number | null;
8605
+ readonly policy: "append" | "exclusive";
8606
+ readonly purpose?: string;
8607
+ readonly flags: number;
8608
+ readonly tag: string;
8609
+ readonly value: string;
8610
+ } | {
8611
+ readonly _tag: "NS";
8612
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8613
+ readonly ttl: number | null;
8614
+ readonly policy: "append" | "exclusive";
8615
+ readonly purpose?: string;
8616
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8617
+ } | {
8618
+ readonly _tag: "SRV";
8619
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8620
+ readonly ttl: number | null;
8621
+ readonly policy: "append" | "exclusive";
8622
+ readonly purpose?: string;
8623
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8624
+ readonly port: number;
8625
+ readonly priority: number;
8626
+ readonly weight: number;
8627
+ } | {
8628
+ readonly _tag: "Opaque";
8629
+ readonly name: string;
8630
+ readonly type: string;
8631
+ readonly raw: unknown;
8632
+ })[];
8633
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
8634
+ }[];
8635
+ } | {
8636
+ readonly _tag: "Stale";
8637
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
8638
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
8639
+ } | {
8640
+ readonly _tag: "BatchStale";
8641
+ readonly batchId: string;
8642
+ readonly status: string;
8643
+ readonly digest: string | null;
8644
+ } | {
8645
+ readonly _tag: "Expired";
8646
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
8647
+ readonly id: string;
8648
+ } | {
8649
+ readonly _tag: "Busy";
8650
+ readonly key: string;
8651
+ } | {
8652
+ readonly _tag: "ProviderRejected";
8653
+ readonly provider: string;
8654
+ readonly code?: string;
8655
+ readonly message: string;
8656
+ } | {
8657
+ readonly _tag: "ProviderUnavailable";
8658
+ readonly provider: string;
8659
+ readonly retryAfterMs?: number;
8660
+ readonly message: string;
8661
+ } | {
8662
+ readonly _tag: "ProviderConflict";
8663
+ readonly provider: string;
8664
+ readonly code?: string;
8665
+ readonly message: string;
8666
+ } | {
8667
+ readonly _tag: "Unsupported";
8668
+ readonly provider: string;
8669
+ readonly operation: string;
8670
+ readonly message: string;
8671
+ } | {
8672
+ readonly _tag: "Reconnect";
8673
+ readonly provider: string;
8674
+ readonly connectionId: string;
8675
+ } | {
8676
+ readonly _tag: "StorageFailed";
8677
+ readonly operation: string;
8678
+ readonly message: string;
8679
+ } | {
8680
+ readonly _tag: "CryptoFailed";
8681
+ readonly operation: "digest" | "open" | "seal";
8682
+ } | {
8683
+ readonly _tag: "ResolverFailed";
8684
+ readonly resolver: string;
8685
+ readonly message: string;
8686
+ };
8687
+ }>, Schema.TaggedStruct<"DomainKitError", {
8688
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
8689
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"receipt", "GET", "/receipts/:receiptId", Schema.toCodecStringTree<Schema.Struct<{
8690
+ receiptId: Schema.brand<Schema.String, "@domainkit/ReceiptId">;
8691
+ }>>, never, never, never, Schema.toCodecJson<typeof Receipt.Model>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
8692
+ readonly _tag: "DomainKitError";
8693
+ readonly reason: {
8694
+ readonly _tag: "InvalidInput";
8695
+ readonly message: string;
8696
+ readonly field?: string;
8697
+ } | {
8698
+ readonly _tag: "Unauthenticated";
8699
+ readonly message: string;
8700
+ } | {
8701
+ readonly _tag: "Forbidden";
8702
+ readonly message: string;
8703
+ } | {
8704
+ readonly _tag: "NotFound";
8705
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
8706
+ readonly id: string;
8707
+ } | {
8708
+ readonly _tag: "Conflict";
8709
+ readonly planId: string;
8710
+ readonly operations: readonly {
8711
+ readonly _tag: "Conflict";
8712
+ readonly id: string;
8713
+ readonly record: {
8714
+ readonly _tag: "A";
8715
+ readonly name: string;
8716
+ readonly ttl: number | null;
8717
+ readonly policy: "append" | "exclusive";
8718
+ readonly purpose?: string;
8719
+ readonly address: string;
8720
+ } | {
8721
+ readonly _tag: "AAAA";
8722
+ readonly name: string;
8723
+ readonly ttl: number | null;
8724
+ readonly policy: "append" | "exclusive";
8725
+ readonly purpose?: string;
8726
+ readonly address: string;
8727
+ } | {
8728
+ readonly _tag: "CNAME";
8729
+ readonly name: string;
8730
+ readonly ttl: number | null;
8731
+ readonly policy: "append" | "exclusive";
8732
+ readonly purpose?: string;
8733
+ readonly target: string;
8734
+ } | {
8735
+ readonly _tag: "TXT";
8736
+ readonly name: string;
8737
+ readonly ttl: number | null;
8738
+ readonly policy: "append" | "exclusive";
8739
+ readonly purpose?: string;
8740
+ readonly value: string;
8741
+ } | {
8742
+ readonly _tag: "MX";
8743
+ readonly name: string;
8744
+ readonly ttl: number | null;
8745
+ readonly policy: "append" | "exclusive";
8746
+ readonly purpose?: string;
8747
+ readonly exchange: string;
8748
+ readonly priority: number;
8749
+ } | {
8750
+ readonly _tag: "CAA";
8751
+ readonly name: string;
8752
+ readonly ttl: number | null;
8753
+ readonly policy: "append" | "exclusive";
8754
+ readonly purpose?: string;
8755
+ readonly flags: number;
8756
+ readonly tag: string;
8757
+ readonly value: string;
8758
+ } | {
8759
+ readonly _tag: "NS";
8760
+ readonly name: string;
8761
+ readonly ttl: number | null;
8762
+ readonly policy: "append" | "exclusive";
8763
+ readonly purpose?: string;
8764
+ readonly nameserver: string;
8765
+ } | {
8766
+ readonly _tag: "SRV";
8767
+ readonly name: string;
8768
+ readonly ttl: number | null;
8769
+ readonly policy: "append" | "exclusive";
8770
+ readonly purpose?: string;
8771
+ readonly target: string;
8772
+ readonly port: number;
8773
+ readonly priority: number;
8774
+ readonly weight: number;
8775
+ };
8776
+ readonly existing: readonly ({
8777
+ readonly _tag: "A";
8778
+ readonly name: string;
8779
+ readonly ttl: number | null;
8780
+ readonly policy: "append" | "exclusive";
8781
+ readonly purpose?: string;
8782
+ readonly address: string;
8783
+ } | {
8784
+ readonly _tag: "AAAA";
8785
+ readonly name: string;
8786
+ readonly ttl: number | null;
8787
+ readonly policy: "append" | "exclusive";
8788
+ readonly purpose?: string;
8789
+ readonly address: string;
8790
+ } | {
8791
+ readonly _tag: "CNAME";
8792
+ readonly name: string;
8793
+ readonly ttl: number | null;
8794
+ readonly policy: "append" | "exclusive";
8795
+ readonly purpose?: string;
8796
+ readonly target: string;
8797
+ } | {
8798
+ readonly _tag: "TXT";
8799
+ readonly name: string;
8800
+ readonly ttl: number | null;
8801
+ readonly policy: "append" | "exclusive";
8802
+ readonly purpose?: string;
8803
+ readonly value: string;
8804
+ } | {
8805
+ readonly _tag: "MX";
8806
+ readonly name: string;
8807
+ readonly ttl: number | null;
8808
+ readonly policy: "append" | "exclusive";
8809
+ readonly purpose?: string;
8810
+ readonly exchange: string;
8811
+ readonly priority: number;
8812
+ } | {
8813
+ readonly _tag: "CAA";
8814
+ readonly name: string;
8815
+ readonly ttl: number | null;
8816
+ readonly policy: "append" | "exclusive";
8817
+ readonly purpose?: string;
8818
+ readonly flags: number;
8819
+ readonly tag: string;
8820
+ readonly value: string;
8821
+ } | {
8822
+ readonly _tag: "NS";
8823
+ readonly name: string;
8824
+ readonly ttl: number | null;
8825
+ readonly policy: "append" | "exclusive";
8826
+ readonly purpose?: string;
8827
+ readonly nameserver: string;
8828
+ } | {
8829
+ readonly _tag: "SRV";
8830
+ readonly name: string;
8831
+ readonly ttl: number | null;
8832
+ readonly policy: "append" | "exclusive";
8833
+ readonly purpose?: string;
8834
+ readonly target: string;
8835
+ readonly port: number;
8836
+ readonly priority: number;
8837
+ readonly weight: number;
8838
+ } | {
8839
+ readonly _tag: "Opaque";
8840
+ readonly name: string;
8841
+ readonly type: string;
8842
+ readonly raw: unknown;
8843
+ })[];
8844
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
8845
+ }[];
8846
+ } | {
8847
+ readonly _tag: "Stale";
8848
+ readonly planId: string;
8849
+ readonly digest: string;
8850
+ } | {
8851
+ readonly _tag: "BatchStale";
8852
+ readonly batchId: string;
8853
+ readonly status: string;
8854
+ readonly digest: string | null;
8855
+ } | {
8856
+ readonly _tag: "Expired";
8857
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
8858
+ readonly id: string;
8859
+ } | {
8860
+ readonly _tag: "Busy";
8861
+ readonly key: string;
8862
+ } | {
8863
+ readonly _tag: "ProviderRejected";
8864
+ readonly provider: string;
8865
+ readonly code?: string;
8866
+ readonly message: string;
8867
+ } | {
8868
+ readonly _tag: "ProviderUnavailable";
8869
+ readonly provider: string;
8870
+ readonly retryAfterMs?: number;
8871
+ readonly message: string;
8872
+ } | {
8873
+ readonly _tag: "ProviderConflict";
8874
+ readonly provider: string;
8875
+ readonly code?: string;
8876
+ readonly message: string;
8877
+ } | {
8878
+ readonly _tag: "Unsupported";
8879
+ readonly provider: string;
8880
+ readonly operation: string;
8881
+ readonly message: string;
8882
+ } | {
8883
+ readonly _tag: "Reconnect";
8884
+ readonly provider: string;
8885
+ readonly connectionId: string;
8886
+ } | {
8887
+ readonly _tag: "StorageFailed";
8888
+ readonly operation: string;
8889
+ readonly message: string;
8890
+ } | {
8891
+ readonly _tag: "CryptoFailed";
8892
+ readonly operation: "digest" | "open" | "seal";
8893
+ } | {
8894
+ readonly _tag: "ResolverFailed";
8895
+ readonly resolver: string;
8896
+ readonly message: string;
8897
+ };
8898
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
8899
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
8900
+ }>], {
8901
+ readonly _tag: "DomainKitError";
8902
+ readonly reason: {
8903
+ readonly _tag: "InvalidInput";
8904
+ readonly message: string;
8905
+ readonly field?: string;
8906
+ } | {
8907
+ readonly _tag: "Unauthenticated";
8908
+ readonly message: string;
8909
+ } | {
8910
+ readonly _tag: "Forbidden";
8911
+ readonly message: string;
8912
+ } | {
8913
+ readonly _tag: "NotFound";
8914
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
8915
+ readonly id: string;
8916
+ } | {
8917
+ readonly _tag: "Conflict";
8918
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
8919
+ readonly operations: readonly {
8920
+ readonly _tag: "Conflict";
8921
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
8922
+ readonly record: {
8923
+ readonly _tag: "A";
8924
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8925
+ readonly ttl: number | null;
8926
+ readonly policy: "append" | "exclusive";
8927
+ readonly purpose?: string;
8928
+ readonly address: string;
8929
+ } | {
8930
+ readonly _tag: "AAAA";
8931
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8932
+ readonly ttl: number | null;
8933
+ readonly policy: "append" | "exclusive";
8934
+ readonly purpose?: string;
8935
+ readonly address: string;
8936
+ } | {
8937
+ readonly _tag: "CNAME";
8938
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8939
+ readonly ttl: number | null;
8940
+ readonly policy: "append" | "exclusive";
8941
+ readonly purpose?: string;
8942
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8943
+ } | {
8944
+ readonly _tag: "TXT";
8945
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8946
+ readonly ttl: number | null;
8947
+ readonly policy: "append" | "exclusive";
8948
+ readonly purpose?: string;
8949
+ readonly value: string;
8950
+ } | {
8951
+ readonly _tag: "MX";
8952
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8953
+ readonly ttl: number | null;
8954
+ readonly policy: "append" | "exclusive";
8955
+ readonly purpose?: string;
8956
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8957
+ readonly priority: number;
8958
+ } | {
8959
+ readonly _tag: "CAA";
8960
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8961
+ readonly ttl: number | null;
8962
+ readonly policy: "append" | "exclusive";
8963
+ readonly purpose?: string;
8964
+ readonly flags: number;
8965
+ readonly tag: string;
8966
+ readonly value: string;
8967
+ } | {
8968
+ readonly _tag: "NS";
8969
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8970
+ readonly ttl: number | null;
8971
+ readonly policy: "append" | "exclusive";
8972
+ readonly purpose?: string;
8973
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8974
+ } | {
8975
+ readonly _tag: "SRV";
8976
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8977
+ readonly ttl: number | null;
8978
+ readonly policy: "append" | "exclusive";
8979
+ readonly purpose?: string;
8980
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8981
+ readonly port: number;
8982
+ readonly priority: number;
8983
+ readonly weight: number;
8984
+ };
8985
+ readonly existing: readonly ({
8986
+ readonly _tag: "A";
8987
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8988
+ readonly ttl: number | null;
8989
+ readonly policy: "append" | "exclusive";
8990
+ readonly purpose?: string;
8991
+ readonly address: string;
8992
+ } | {
8993
+ readonly _tag: "AAAA";
8994
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
8995
+ readonly ttl: number | null;
8996
+ readonly policy: "append" | "exclusive";
8997
+ readonly purpose?: string;
8998
+ readonly address: string;
8999
+ } | {
9000
+ readonly _tag: "CNAME";
9001
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9002
+ readonly ttl: number | null;
9003
+ readonly policy: "append" | "exclusive";
9004
+ readonly purpose?: string;
9005
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9006
+ } | {
9007
+ readonly _tag: "TXT";
9008
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9009
+ readonly ttl: number | null;
9010
+ readonly policy: "append" | "exclusive";
9011
+ readonly purpose?: string;
9012
+ readonly value: string;
9013
+ } | {
9014
+ readonly _tag: "MX";
9015
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9016
+ readonly ttl: number | null;
9017
+ readonly policy: "append" | "exclusive";
9018
+ readonly purpose?: string;
9019
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9020
+ readonly priority: number;
9021
+ } | {
9022
+ readonly _tag: "CAA";
9023
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9024
+ readonly ttl: number | null;
9025
+ readonly policy: "append" | "exclusive";
9026
+ readonly purpose?: string;
9027
+ readonly flags: number;
9028
+ readonly tag: string;
9029
+ readonly value: string;
9030
+ } | {
9031
+ readonly _tag: "NS";
9032
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9033
+ readonly ttl: number | null;
9034
+ readonly policy: "append" | "exclusive";
9035
+ readonly purpose?: string;
9036
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9037
+ } | {
9038
+ readonly _tag: "SRV";
9039
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9040
+ readonly ttl: number | null;
9041
+ readonly policy: "append" | "exclusive";
9042
+ readonly purpose?: string;
9043
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9044
+ readonly port: number;
9045
+ readonly priority: number;
9046
+ readonly weight: number;
9047
+ } | {
9048
+ readonly _tag: "Opaque";
9049
+ readonly name: string;
9050
+ readonly type: string;
9051
+ readonly raw: unknown;
9052
+ })[];
9053
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
9054
+ }[];
9055
+ } | {
9056
+ readonly _tag: "Stale";
9057
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
9058
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
9059
+ } | {
9060
+ readonly _tag: "BatchStale";
9061
+ readonly batchId: string;
9062
+ readonly status: string;
9063
+ readonly digest: string | null;
9064
+ } | {
9065
+ readonly _tag: "Expired";
9066
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
9067
+ readonly id: string;
9068
+ } | {
9069
+ readonly _tag: "Busy";
9070
+ readonly key: string;
9071
+ } | {
9072
+ readonly _tag: "ProviderRejected";
9073
+ readonly provider: string;
9074
+ readonly code?: string;
9075
+ readonly message: string;
9076
+ } | {
9077
+ readonly _tag: "ProviderUnavailable";
9078
+ readonly provider: string;
9079
+ readonly retryAfterMs?: number;
9080
+ readonly message: string;
9081
+ } | {
9082
+ readonly _tag: "ProviderConflict";
9083
+ readonly provider: string;
9084
+ readonly code?: string;
9085
+ readonly message: string;
9086
+ } | {
9087
+ readonly _tag: "Unsupported";
9088
+ readonly provider: string;
9089
+ readonly operation: string;
9090
+ readonly message: string;
9091
+ } | {
9092
+ readonly _tag: "Reconnect";
9093
+ readonly provider: string;
9094
+ readonly connectionId: string;
9095
+ } | {
9096
+ readonly _tag: "StorageFailed";
9097
+ readonly operation: string;
9098
+ readonly message: string;
9099
+ } | {
9100
+ readonly _tag: "CryptoFailed";
9101
+ readonly operation: "digest" | "open" | "seal";
9102
+ } | {
9103
+ readonly _tag: "ResolverFailed";
9104
+ readonly resolver: string;
9105
+ readonly message: string;
9106
+ };
9107
+ }>, Schema.TaggedStruct<"DomainKitError", {
9108
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
9109
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reconnect", "POST", "/connections/:connectionId/reconnections", Schema.toCodecStringTree<Schema.Struct<{
9110
+ connectionId: Schema.String;
9111
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
9112
+ readonly method: Schema.Union<readonly [typeof Token, typeof OAuth, typeof Integration]>;
9113
+ }>>, never, Schema.toCodecJson<Schema.Union<readonly [typeof Connected, typeof Redirect, typeof SelectionRequired]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
9114
+ readonly _tag: "DomainKitError";
9115
+ readonly reason: {
9116
+ readonly _tag: "InvalidInput";
9117
+ readonly message: string;
9118
+ readonly field?: string;
9119
+ } | {
9120
+ readonly _tag: "Unauthenticated";
9121
+ readonly message: string;
9122
+ } | {
9123
+ readonly _tag: "Forbidden";
9124
+ readonly message: string;
9125
+ } | {
9126
+ readonly _tag: "NotFound";
9127
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
9128
+ readonly id: string;
9129
+ } | {
9130
+ readonly _tag: "Conflict";
9131
+ readonly planId: string;
9132
+ readonly operations: readonly {
9133
+ readonly _tag: "Conflict";
9134
+ readonly id: string;
9135
+ readonly record: {
9136
+ readonly _tag: "A";
9137
+ readonly name: string;
9138
+ readonly ttl: number | null;
9139
+ readonly policy: "append" | "exclusive";
9140
+ readonly purpose?: string;
9141
+ readonly address: string;
9142
+ } | {
9143
+ readonly _tag: "AAAA";
9144
+ readonly name: string;
9145
+ readonly ttl: number | null;
9146
+ readonly policy: "append" | "exclusive";
9147
+ readonly purpose?: string;
9148
+ readonly address: string;
9149
+ } | {
9150
+ readonly _tag: "CNAME";
9151
+ readonly name: string;
9152
+ readonly ttl: number | null;
9153
+ readonly policy: "append" | "exclusive";
9154
+ readonly purpose?: string;
9155
+ readonly target: string;
9156
+ } | {
9157
+ readonly _tag: "TXT";
9158
+ readonly name: string;
9159
+ readonly ttl: number | null;
9160
+ readonly policy: "append" | "exclusive";
9161
+ readonly purpose?: string;
9162
+ readonly value: string;
9163
+ } | {
9164
+ readonly _tag: "MX";
9165
+ readonly name: string;
9166
+ readonly ttl: number | null;
9167
+ readonly policy: "append" | "exclusive";
9168
+ readonly purpose?: string;
9169
+ readonly exchange: string;
9170
+ readonly priority: number;
9171
+ } | {
9172
+ readonly _tag: "CAA";
9173
+ readonly name: string;
9174
+ readonly ttl: number | null;
9175
+ readonly policy: "append" | "exclusive";
9176
+ readonly purpose?: string;
9177
+ readonly flags: number;
9178
+ readonly tag: string;
9179
+ readonly value: string;
9180
+ } | {
9181
+ readonly _tag: "NS";
9182
+ readonly name: string;
9183
+ readonly ttl: number | null;
9184
+ readonly policy: "append" | "exclusive";
9185
+ readonly purpose?: string;
9186
+ readonly nameserver: string;
9187
+ } | {
9188
+ readonly _tag: "SRV";
9189
+ readonly name: string;
9190
+ readonly ttl: number | null;
9191
+ readonly policy: "append" | "exclusive";
9192
+ readonly purpose?: string;
9193
+ readonly target: string;
9194
+ readonly port: number;
9195
+ readonly priority: number;
9196
+ readonly weight: number;
9197
+ };
9198
+ readonly existing: readonly ({
9199
+ readonly _tag: "A";
9200
+ readonly name: string;
9201
+ readonly ttl: number | null;
9202
+ readonly policy: "append" | "exclusive";
9203
+ readonly purpose?: string;
9204
+ readonly address: string;
9205
+ } | {
9206
+ readonly _tag: "AAAA";
9207
+ readonly name: string;
9208
+ readonly ttl: number | null;
9209
+ readonly policy: "append" | "exclusive";
9210
+ readonly purpose?: string;
9211
+ readonly address: string;
9212
+ } | {
9213
+ readonly _tag: "CNAME";
9214
+ readonly name: string;
9215
+ readonly ttl: number | null;
9216
+ readonly policy: "append" | "exclusive";
9217
+ readonly purpose?: string;
9218
+ readonly target: string;
9219
+ } | {
9220
+ readonly _tag: "TXT";
9221
+ readonly name: string;
9222
+ readonly ttl: number | null;
9223
+ readonly policy: "append" | "exclusive";
9224
+ readonly purpose?: string;
9225
+ readonly value: string;
9226
+ } | {
9227
+ readonly _tag: "MX";
9228
+ readonly name: string;
9229
+ readonly ttl: number | null;
9230
+ readonly policy: "append" | "exclusive";
9231
+ readonly purpose?: string;
9232
+ readonly exchange: string;
9233
+ readonly priority: number;
9234
+ } | {
9235
+ readonly _tag: "CAA";
9236
+ readonly name: string;
9237
+ readonly ttl: number | null;
9238
+ readonly policy: "append" | "exclusive";
9239
+ readonly purpose?: string;
9240
+ readonly flags: number;
9241
+ readonly tag: string;
9242
+ readonly value: string;
9243
+ } | {
9244
+ readonly _tag: "NS";
9245
+ readonly name: string;
9246
+ readonly ttl: number | null;
9247
+ readonly policy: "append" | "exclusive";
9248
+ readonly purpose?: string;
9249
+ readonly nameserver: string;
9250
+ } | {
9251
+ readonly _tag: "SRV";
9252
+ readonly name: string;
9253
+ readonly ttl: number | null;
9254
+ readonly policy: "append" | "exclusive";
9255
+ readonly purpose?: string;
9256
+ readonly target: string;
9257
+ readonly port: number;
9258
+ readonly priority: number;
9259
+ readonly weight: number;
9260
+ } | {
9261
+ readonly _tag: "Opaque";
9262
+ readonly name: string;
9263
+ readonly type: string;
9264
+ readonly raw: unknown;
9265
+ })[];
9266
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
9267
+ }[];
9268
+ } | {
9269
+ readonly _tag: "Stale";
9270
+ readonly planId: string;
9271
+ readonly digest: string;
9272
+ } | {
9273
+ readonly _tag: "BatchStale";
9274
+ readonly batchId: string;
9275
+ readonly status: string;
9276
+ readonly digest: string | null;
9277
+ } | {
9278
+ readonly _tag: "Expired";
9279
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
9280
+ readonly id: string;
9281
+ } | {
9282
+ readonly _tag: "Busy";
9283
+ readonly key: string;
9284
+ } | {
9285
+ readonly _tag: "ProviderRejected";
9286
+ readonly provider: string;
9287
+ readonly code?: string;
9288
+ readonly message: string;
9289
+ } | {
9290
+ readonly _tag: "ProviderUnavailable";
9291
+ readonly provider: string;
9292
+ readonly retryAfterMs?: number;
9293
+ readonly message: string;
9294
+ } | {
9295
+ readonly _tag: "ProviderConflict";
9296
+ readonly provider: string;
9297
+ readonly code?: string;
9298
+ readonly message: string;
9299
+ } | {
9300
+ readonly _tag: "Unsupported";
9301
+ readonly provider: string;
9302
+ readonly operation: string;
9303
+ readonly message: string;
9304
+ } | {
9305
+ readonly _tag: "Reconnect";
9306
+ readonly provider: string;
9307
+ readonly connectionId: string;
9308
+ } | {
9309
+ readonly _tag: "StorageFailed";
9310
+ readonly operation: string;
9311
+ readonly message: string;
9312
+ } | {
9313
+ readonly _tag: "CryptoFailed";
9314
+ readonly operation: "digest" | "open" | "seal";
9315
+ } | {
9316
+ readonly _tag: "ResolverFailed";
9317
+ readonly resolver: string;
9318
+ readonly message: string;
9319
+ };
9320
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
9321
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
9322
+ }>], {
9323
+ readonly _tag: "DomainKitError";
9324
+ readonly reason: {
9325
+ readonly _tag: "InvalidInput";
9326
+ readonly message: string;
9327
+ readonly field?: string;
9328
+ } | {
9329
+ readonly _tag: "Unauthenticated";
9330
+ readonly message: string;
9331
+ } | {
9332
+ readonly _tag: "Forbidden";
9333
+ readonly message: string;
9334
+ } | {
9335
+ readonly _tag: "NotFound";
9336
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
9337
+ readonly id: string;
9338
+ } | {
9339
+ readonly _tag: "Conflict";
9340
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
9341
+ readonly operations: readonly {
9342
+ readonly _tag: "Conflict";
9343
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
9344
+ readonly record: {
9345
+ readonly _tag: "A";
9346
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9347
+ readonly ttl: number | null;
9348
+ readonly policy: "append" | "exclusive";
9349
+ readonly purpose?: string;
9350
+ readonly address: string;
9351
+ } | {
9352
+ readonly _tag: "AAAA";
9353
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9354
+ readonly ttl: number | null;
9355
+ readonly policy: "append" | "exclusive";
9356
+ readonly purpose?: string;
9357
+ readonly address: string;
9358
+ } | {
9359
+ readonly _tag: "CNAME";
9360
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9361
+ readonly ttl: number | null;
9362
+ readonly policy: "append" | "exclusive";
9363
+ readonly purpose?: string;
9364
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9365
+ } | {
9366
+ readonly _tag: "TXT";
9367
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9368
+ readonly ttl: number | null;
9369
+ readonly policy: "append" | "exclusive";
9370
+ readonly purpose?: string;
9371
+ readonly value: string;
9372
+ } | {
9373
+ readonly _tag: "MX";
9374
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9375
+ readonly ttl: number | null;
9376
+ readonly policy: "append" | "exclusive";
9377
+ readonly purpose?: string;
9378
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9379
+ readonly priority: number;
9380
+ } | {
9381
+ readonly _tag: "CAA";
9382
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9383
+ readonly ttl: number | null;
9384
+ readonly policy: "append" | "exclusive";
9385
+ readonly purpose?: string;
9386
+ readonly flags: number;
9387
+ readonly tag: string;
9388
+ readonly value: string;
9389
+ } | {
9390
+ readonly _tag: "NS";
9391
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9392
+ readonly ttl: number | null;
9393
+ readonly policy: "append" | "exclusive";
9394
+ readonly purpose?: string;
9395
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9396
+ } | {
9397
+ readonly _tag: "SRV";
9398
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9399
+ readonly ttl: number | null;
9400
+ readonly policy: "append" | "exclusive";
9401
+ readonly purpose?: string;
9402
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9403
+ readonly port: number;
9404
+ readonly priority: number;
9405
+ readonly weight: number;
9406
+ };
9407
+ readonly existing: readonly ({
9408
+ readonly _tag: "A";
9409
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9410
+ readonly ttl: number | null;
9411
+ readonly policy: "append" | "exclusive";
9412
+ readonly purpose?: string;
9413
+ readonly address: string;
9414
+ } | {
9415
+ readonly _tag: "AAAA";
9416
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9417
+ readonly ttl: number | null;
9418
+ readonly policy: "append" | "exclusive";
9419
+ readonly purpose?: string;
9420
+ readonly address: string;
9421
+ } | {
9422
+ readonly _tag: "CNAME";
9423
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9424
+ readonly ttl: number | null;
9425
+ readonly policy: "append" | "exclusive";
9426
+ readonly purpose?: string;
9427
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9428
+ } | {
9429
+ readonly _tag: "TXT";
9430
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9431
+ readonly ttl: number | null;
9432
+ readonly policy: "append" | "exclusive";
9433
+ readonly purpose?: string;
9434
+ readonly value: string;
9435
+ } | {
9436
+ readonly _tag: "MX";
9437
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9438
+ readonly ttl: number | null;
9439
+ readonly policy: "append" | "exclusive";
9440
+ readonly purpose?: string;
9441
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9442
+ readonly priority: number;
9443
+ } | {
9444
+ readonly _tag: "CAA";
9445
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9446
+ readonly ttl: number | null;
9447
+ readonly policy: "append" | "exclusive";
9448
+ readonly purpose?: string;
9449
+ readonly flags: number;
9450
+ readonly tag: string;
9451
+ readonly value: string;
9452
+ } | {
9453
+ readonly _tag: "NS";
9454
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9455
+ readonly ttl: number | null;
9456
+ readonly policy: "append" | "exclusive";
9457
+ readonly purpose?: string;
9458
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9459
+ } | {
9460
+ readonly _tag: "SRV";
9461
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9462
+ readonly ttl: number | null;
9463
+ readonly policy: "append" | "exclusive";
9464
+ readonly purpose?: string;
9465
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
9466
+ readonly port: number;
9467
+ readonly priority: number;
9468
+ readonly weight: number;
9469
+ } | {
9470
+ readonly _tag: "Opaque";
9471
+ readonly name: string;
9472
+ readonly type: string;
9473
+ readonly raw: unknown;
9474
+ })[];
9475
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
9476
+ }[];
9477
+ } | {
9478
+ readonly _tag: "Stale";
9479
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
9480
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
9481
+ } | {
9482
+ readonly _tag: "BatchStale";
9483
+ readonly batchId: string;
9484
+ readonly status: string;
9485
+ readonly digest: string | null;
9486
+ } | {
9487
+ readonly _tag: "Expired";
9488
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
9489
+ readonly id: string;
9490
+ } | {
9491
+ readonly _tag: "Busy";
9492
+ readonly key: string;
9493
+ } | {
9494
+ readonly _tag: "ProviderRejected";
9495
+ readonly provider: string;
9496
+ readonly code?: string;
9497
+ readonly message: string;
9498
+ } | {
9499
+ readonly _tag: "ProviderUnavailable";
9500
+ readonly provider: string;
9501
+ readonly retryAfterMs?: number;
9502
+ readonly message: string;
9503
+ } | {
9504
+ readonly _tag: "ProviderConflict";
9505
+ readonly provider: string;
9506
+ readonly code?: string;
9507
+ readonly message: string;
9508
+ } | {
9509
+ readonly _tag: "Unsupported";
9510
+ readonly provider: string;
9511
+ readonly operation: string;
9512
+ readonly message: string;
9513
+ } | {
9514
+ readonly _tag: "Reconnect";
9515
+ readonly provider: string;
9516
+ readonly connectionId: string;
9517
+ } | {
9518
+ readonly _tag: "StorageFailed";
9519
+ readonly operation: string;
9520
+ readonly message: string;
9521
+ } | {
9522
+ readonly _tag: "CryptoFailed";
9523
+ readonly operation: "digest" | "open" | "seal";
9524
+ } | {
9525
+ readonly _tag: "ResolverFailed";
9526
+ readonly resolver: string;
9527
+ readonly message: string;
9528
+ };
9529
+ }>, Schema.TaggedStruct<"DomainKitError", {
9530
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
9531
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reject", "POST", "/plans/:planId/rejections", Schema.toCodecStringTree<Schema.Struct<{
9532
+ planId: Schema.brand<Schema.String, "@domainkit/PlanId">;
6188
9533
  }>>, never, Schema.toCodecJson<Schema.Struct<{
6189
- readonly method: Schema.Union<readonly [typeof Token, typeof OAuth, typeof Integration]>;
6190
- }>>, never, Schema.toCodecJson<Schema.Union<readonly [typeof Connected, typeof Redirect, typeof SelectionRequired]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
9534
+ /** Why the customer declined, for the audit trail. */
9535
+ readonly reason: Schema.optionalKey<Schema.String>;
9536
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
9537
+ readonly plan: typeof Plan.Model;
9538
+ readonly status: Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>;
9539
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
9540
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
9541
+ readonly rejection: Schema.NullOr<Schema.Struct<{
9542
+ readonly actorId: Schema.String;
9543
+ readonly reason: Schema.NullOr<Schema.String>;
9544
+ readonly at: Schema.DateTimeUtcFromString;
9545
+ }>>;
9546
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6191
9547
  readonly _tag: "DomainKitError";
6192
9548
  readonly reason: {
6193
9549
  readonly _tag: "InvalidInput";
@@ -6201,7 +9557,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6201
9557
  readonly message: string;
6202
9558
  } | {
6203
9559
  readonly _tag: "NotFound";
6204
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
9560
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6205
9561
  readonly id: string;
6206
9562
  } | {
6207
9563
  readonly _tag: "Conflict";
@@ -6346,6 +9702,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6346
9702
  readonly _tag: "Stale";
6347
9703
  readonly planId: string;
6348
9704
  readonly digest: string;
9705
+ } | {
9706
+ readonly _tag: "BatchStale";
9707
+ readonly batchId: string;
9708
+ readonly status: string;
9709
+ readonly digest: string | null;
6349
9710
  } | {
6350
9711
  readonly _tag: "Expired";
6351
9712
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -6390,7 +9751,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6390
9751
  readonly message: string;
6391
9752
  };
6392
9753
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
6393
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
9754
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6394
9755
  }>], {
6395
9756
  readonly _tag: "DomainKitError";
6396
9757
  readonly reason: {
@@ -6405,7 +9766,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6405
9766
  readonly message: string;
6406
9767
  } | {
6407
9768
  readonly _tag: "NotFound";
6408
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
9769
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6409
9770
  readonly id: string;
6410
9771
  } | {
6411
9772
  readonly _tag: "Conflict";
@@ -6550,6 +9911,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6550
9911
  readonly _tag: "Stale";
6551
9912
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6552
9913
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
9914
+ } | {
9915
+ readonly _tag: "BatchStale";
9916
+ readonly batchId: string;
9917
+ readonly status: string;
9918
+ readonly digest: string | null;
6553
9919
  } | {
6554
9920
  readonly _tag: "Expired";
6555
9921
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -6594,22 +9960,45 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6594
9960
  readonly message: string;
6595
9961
  };
6596
9962
  }>, Schema.TaggedStruct<"DomainKitError", {
6597
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6598
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reject", "POST", "/plans/:planId/rejections", Schema.toCodecStringTree<Schema.Struct<{
6599
- planId: Schema.brand<Schema.String, "@domainkit/PlanId">;
9963
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
9964
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"rejectBatch", "POST", "/batches/:batchId/rejections", Schema.toCodecStringTree<Schema.Struct<{
9965
+ batchId: Schema.brand<Schema.String, "@domainkit/BatchId">;
6600
9966
  }>>, never, Schema.toCodecJson<Schema.Struct<{
6601
9967
  /** Why the customer declined, for the audit trail. */
6602
9968
  readonly reason: Schema.optionalKey<Schema.String>;
6603
9969
  }>>, never, Schema.toCodecJson<Schema.Struct<{
6604
- readonly plan: typeof Plan.Model;
6605
- readonly status: Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>;
6606
- readonly approval: Schema.NullOr<typeof Approval.Model>;
6607
- readonly receipt: Schema.NullOr<typeof Receipt.Model>;
9970
+ readonly id: Schema.brand<Schema.String, "@domainkit/BatchId">;
9971
+ readonly status: Schema.Literals<readonly ["planning", "planned", "approved", "applying", "complete", "partial", "failed", "rejected"]>;
9972
+ /** What `POST /batches/:batchId/approvals` takes; null while any item is unplanned. */
9973
+ readonly digest: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/Digest">>;
9974
+ readonly approval: Schema.NullOr<Schema.Struct<{
9975
+ readonly actorId: Schema.String;
9976
+ readonly at: Schema.DateTimeUtcFromString;
9977
+ }>>;
6608
9978
  readonly rejection: Schema.NullOr<Schema.Struct<{
6609
9979
  readonly actorId: Schema.String;
6610
9980
  readonly reason: Schema.NullOr<Schema.String>;
6611
9981
  readonly at: Schema.DateTimeUtcFromString;
6612
9982
  }>>;
9983
+ readonly createdAt: Schema.DateTimeUtcFromString;
9984
+ readonly updatedAt: Schema.DateTimeUtcFromString;
9985
+ readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
9986
+ readonly items: Schema.$Array<Schema.Struct<{
9987
+ readonly attachmentId: Schema.String;
9988
+ readonly position: Schema.Number;
9989
+ /** Null while the item has no plan; `planFailure` then says why. */
9990
+ readonly plan: Schema.NullOr<typeof Plan.Model>;
9991
+ readonly status: Schema.NullOr<Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>>;
9992
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
9993
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
9994
+ readonly rejection: Schema.NullOr<Schema.Struct<{
9995
+ readonly actorId: Schema.String;
9996
+ readonly reason: Schema.NullOr<Schema.String>;
9997
+ readonly at: Schema.DateTimeUtcFromString;
9998
+ }>>;
9999
+ readonly failure: Schema.NullOr<Schema.String>;
10000
+ readonly planFailure: Schema.NullOr<Schema.String>;
10001
+ }>>;
6613
10002
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6614
10003
  readonly _tag: "DomainKitError";
6615
10004
  readonly reason: {
@@ -6624,7 +10013,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6624
10013
  readonly message: string;
6625
10014
  } | {
6626
10015
  readonly _tag: "NotFound";
6627
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
10016
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6628
10017
  readonly id: string;
6629
10018
  } | {
6630
10019
  readonly _tag: "Conflict";
@@ -6769,6 +10158,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6769
10158
  readonly _tag: "Stale";
6770
10159
  readonly planId: string;
6771
10160
  readonly digest: string;
10161
+ } | {
10162
+ readonly _tag: "BatchStale";
10163
+ readonly batchId: string;
10164
+ readonly status: string;
10165
+ readonly digest: string | null;
6772
10166
  } | {
6773
10167
  readonly _tag: "Expired";
6774
10168
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -6813,7 +10207,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6813
10207
  readonly message: string;
6814
10208
  };
6815
10209
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
6816
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
10210
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
6817
10211
  }>], {
6818
10212
  readonly _tag: "DomainKitError";
6819
10213
  readonly reason: {
@@ -6828,7 +10222,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6828
10222
  readonly message: string;
6829
10223
  } | {
6830
10224
  readonly _tag: "NotFound";
6831
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
10225
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6832
10226
  readonly id: string;
6833
10227
  } | {
6834
10228
  readonly _tag: "Conflict";
@@ -6973,6 +10367,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6973
10367
  readonly _tag: "Stale";
6974
10368
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6975
10369
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
10370
+ } | {
10371
+ readonly _tag: "BatchStale";
10372
+ readonly batchId: string;
10373
+ readonly status: string;
10374
+ readonly digest: string | null;
6976
10375
  } | {
6977
10376
  readonly _tag: "Expired";
6978
10377
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -7017,7 +10416,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7017
10416
  readonly message: string;
7018
10417
  };
7019
10418
  }>, Schema.TaggedStruct<"DomainKitError", {
7020
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
10419
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7021
10420
  }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"start", "POST", "/connections", never, never, Schema.toCodecJson<Schema.Struct<{
7022
10421
  readonly domain: Schema.optionalKey<Schema.String>;
7023
10422
  readonly provider: Schema.String;
@@ -7036,7 +10435,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7036
10435
  readonly message: string;
7037
10436
  } | {
7038
10437
  readonly _tag: "NotFound";
7039
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
10438
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
7040
10439
  readonly id: string;
7041
10440
  } | {
7042
10441
  readonly _tag: "Conflict";
@@ -7181,6 +10580,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7181
10580
  readonly _tag: "Stale";
7182
10581
  readonly planId: string;
7183
10582
  readonly digest: string;
10583
+ } | {
10584
+ readonly _tag: "BatchStale";
10585
+ readonly batchId: string;
10586
+ readonly status: string;
10587
+ readonly digest: string | null;
7184
10588
  } | {
7185
10589
  readonly _tag: "Expired";
7186
10590
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -7225,7 +10629,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7225
10629
  readonly message: string;
7226
10630
  };
7227
10631
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
7228
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
10632
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7229
10633
  }>], {
7230
10634
  readonly _tag: "DomainKitError";
7231
10635
  readonly reason: {
@@ -7240,7 +10644,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7240
10644
  readonly message: string;
7241
10645
  } | {
7242
10646
  readonly _tag: "NotFound";
7243
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
10647
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
7244
10648
  readonly id: string;
7245
10649
  } | {
7246
10650
  readonly _tag: "Conflict";
@@ -7385,6 +10789,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7385
10789
  readonly _tag: "Stale";
7386
10790
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
7387
10791
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
10792
+ } | {
10793
+ readonly _tag: "BatchStale";
10794
+ readonly batchId: string;
10795
+ readonly status: string;
10796
+ readonly digest: string | null;
7388
10797
  } | {
7389
10798
  readonly _tag: "Expired";
7390
10799
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -7429,7 +10838,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7429
10838
  readonly message: string;
7430
10839
  };
7431
10840
  }>, Schema.TaggedStruct<"DomainKitError", {
7432
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
10841
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7433
10842
  }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"zones", "GET", "/zones", never, Schema.toCodecStringTree<Schema.Struct<{
7434
10843
  provider: Schema.optionalKey<Schema.String>;
7435
10844
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
@@ -7443,6 +10852,8 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7443
10852
  readonly connections: Schema.$Array<Schema.Struct<{
7444
10853
  readonly connectionId: Schema.String;
7445
10854
  readonly provider: Schema.String;
10855
+ /** What the provider called the account at connect time; `null` when it named none. */
10856
+ readonly label: Schema.NullOr<Schema.String>;
7446
10857
  readonly status: Schema.Literals<readonly ["disconnected", "connected", "reconnect"]>;
7447
10858
  }>>;
7448
10859
  /** Every provider a customer could connect, so a picker offers one without a second call. */
@@ -7474,7 +10885,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7474
10885
  readonly message: string;
7475
10886
  } | {
7476
10887
  readonly _tag: "NotFound";
7477
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
10888
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
7478
10889
  readonly id: string;
7479
10890
  } | {
7480
10891
  readonly _tag: "Conflict";
@@ -7619,6 +11030,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7619
11030
  readonly _tag: "Stale";
7620
11031
  readonly planId: string;
7621
11032
  readonly digest: string;
11033
+ } | {
11034
+ readonly _tag: "BatchStale";
11035
+ readonly batchId: string;
11036
+ readonly status: string;
11037
+ readonly digest: string | null;
7622
11038
  } | {
7623
11039
  readonly _tag: "Expired";
7624
11040
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -7663,7 +11079,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7663
11079
  readonly message: string;
7664
11080
  };
7665
11081
  }, readonly [Schema.TaggedStruct<"DomainKitError", {
7666
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
11082
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7667
11083
  }>], {
7668
11084
  readonly _tag: "DomainKitError";
7669
11085
  readonly reason: {
@@ -7678,7 +11094,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7678
11094
  readonly message: string;
7679
11095
  } | {
7680
11096
  readonly _tag: "NotFound";
7681
- readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
11097
+ readonly entity: "approval" | "attachment" | "authorization" | "batch" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
7682
11098
  readonly id: string;
7683
11099
  } | {
7684
11100
  readonly _tag: "Conflict";
@@ -7823,6 +11239,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7823
11239
  readonly _tag: "Stale";
7824
11240
  readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
7825
11241
  readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
11242
+ } | {
11243
+ readonly _tag: "BatchStale";
11244
+ readonly batchId: string;
11245
+ readonly status: string;
11246
+ readonly digest: string | null;
7826
11247
  } | {
7827
11248
  readonly _tag: "Expired";
7828
11249
  readonly entity: "approval" | "continuation" | "credential" | "plan";
@@ -7867,7 +11288,7 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
7867
11288
  readonly message: string;
7868
11289
  };
7869
11290
  }>, Schema.TaggedStruct<"DomainKitError", {
7870
- readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
11291
+ readonly reason: Schema.suspend<Schema.Union<readonly [typeof Reason.InvalidInput, typeof Reason.Unauthenticated, typeof Reason.Forbidden, typeof Reason.NotFound, typeof Reason.Conflict, typeof Reason.Stale, typeof Reason.BatchStale, typeof Reason.Expired, typeof Reason.Busy, typeof Reason.ProviderRejected, typeof Reason.ProviderUnavailable, typeof Reason.ProviderConflict, typeof Reason.Unsupported, typeof Reason.Reconnect, typeof Reason.StorageFailed, typeof Reason.CryptoFailed, typeof Reason.ResolverFailed]>>;
7871
11292
  }>, never, never>>, never, never>, false>;
7872
11293
  export type Group = typeof group;
7873
11294
  /** Every route in the group, by name; what `Identity.authorize` is asked about. */