domainkit 0.11.0 → 0.12.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.
@@ -66,9 +66,18 @@ export declare const MethodDescriptor: Schema.Struct<{
66
66
  }>;
67
67
  export type MethodDescriptor = typeof MethodDescriptor.Type;
68
68
  /** Everything the UI needs about a domain, flattened; provider context never crosses the wire. */
69
+ /** The attachment a domain holds, with the zone label the provider gave when it was created. */
70
+ export declare const Attachment: Schema.Struct<{
71
+ readonly id: Schema.String;
72
+ readonly label: Schema.String;
73
+ }>;
74
+ export type Attachment = typeof Attachment.Type;
69
75
  export declare const Snapshot: Schema.Struct<{
70
76
  readonly domain: Schema.String;
71
- readonly attachmentId: Schema.NullOr<Schema.String>;
77
+ readonly attachment: Schema.NullOr<Schema.Struct<{
78
+ readonly id: Schema.String;
79
+ readonly label: Schema.String;
80
+ }>>;
72
81
  readonly connectionId: Schema.NullOr<Schema.String>;
73
82
  readonly provider: Schema.NullOr<Schema.String>;
74
83
  readonly method: Schema.NullOr<Schema.Literals<readonly ["token", "oauth", "integration"]>>;
@@ -119,12 +128,18 @@ export declare class Integration extends Integration_base {
119
128
  }
120
129
  export declare const Method: Schema.Union<readonly [typeof Token, typeof OAuth, typeof Integration]>;
121
130
  export type Method = typeof Method.Type;
131
+ /** A start without a domain connects the account alone; the customer picks a zone afterwards. */
122
132
  export declare const StartPayload: Schema.Struct<{
123
- readonly domain: Schema.String;
133
+ readonly domain: Schema.optionalKey<Schema.String>;
124
134
  readonly provider: Schema.String;
125
135
  readonly method: Schema.Union<readonly [typeof Token, typeof OAuth, typeof Integration]>;
126
136
  }>;
127
137
  export type StartPayload = typeof StartPayload.Type;
138
+ /** How the customer proves the account again. The provider is the connection's own. */
139
+ export declare const ReconnectPayload: Schema.Struct<{
140
+ readonly method: Schema.Union<readonly [typeof Token, typeof OAuth, typeof Integration]>;
141
+ }>;
142
+ export type ReconnectPayload = typeof ReconnectPayload.Type;
128
143
  declare const Candidate_base: Schema.Class<Candidate, Schema.Struct<{
129
144
  readonly zone: Schema.String;
130
145
  readonly label: Schema.String;
@@ -133,9 +148,15 @@ declare const Candidate_base: Schema.Class<Candidate, Schema.Struct<{
133
148
  export declare class Candidate extends Candidate_base {
134
149
  }
135
150
  declare const Connected_base: Schema.Class<Connected, Schema.TaggedStruct<"Connected", {
136
- readonly snapshot: Schema.Struct<{
151
+ readonly connectionId: Schema.String;
152
+ readonly provider: Schema.String;
153
+ readonly label: Schema.String;
154
+ readonly snapshot: Schema.NullOr<Schema.Struct<{
137
155
  readonly domain: Schema.String;
138
- readonly attachmentId: Schema.NullOr<Schema.String>;
156
+ readonly attachment: Schema.NullOr<Schema.Struct<{
157
+ readonly id: Schema.String;
158
+ readonly label: Schema.String;
159
+ }>>;
139
160
  readonly connectionId: Schema.NullOr<Schema.String>;
140
161
  readonly provider: Schema.NullOr<Schema.String>;
141
162
  readonly method: Schema.NullOr<Schema.Literals<readonly ["token", "oauth", "integration"]>>;
@@ -162,8 +183,13 @@ declare const Connected_base: Schema.Class<Connected, Schema.TaggedStruct<"Conne
162
183
  }>>>;
163
184
  }>>;
164
185
  }>>;
165
- }>;
186
+ }>>;
166
187
  }>, {}>;
188
+ /**
189
+ * The connection the start produced. `label` names the account the way the customer will read it:
190
+ * the attached zone's label, or the provider's name when the start carried no domain. `snapshot`
191
+ * is the domain's state, and is null for a start that attached none.
192
+ */
167
193
  export declare class Connected extends Connected_base {
168
194
  }
169
195
  declare const Redirect_base: Schema.Class<Redirect, Schema.TaggedStruct<"Redirect", {
@@ -211,6 +237,49 @@ export declare class DiscoveryNotFound extends DiscoveryNotFound_base {
211
237
  }
212
238
  export declare const Discovery: Schema.Union<readonly [typeof DiscoveryResolved, typeof DiscoverySelectionRequired, typeof DiscoveryNotFound]>;
213
239
  export type Discovery = typeof Discovery.Type;
240
+ /** One zone a connection reaches, named for a customer to pick from. */
241
+ export declare const Zone: Schema.Struct<{
242
+ readonly connectionId: Schema.String;
243
+ readonly provider: Schema.String;
244
+ readonly zone: Schema.String;
245
+ readonly label: Schema.String;
246
+ readonly nameservers: Schema.optionalKey<Schema.$Array<Schema.String>>;
247
+ }>;
248
+ export type Zone = typeof Zone.Type;
249
+ /**
250
+ * Every zone the principal's connections reach, and where each connection stands. A connection
251
+ * marked `reconnect` contributes no zones and needs the customer to authorize it again.
252
+ */
253
+ export declare const Zones: Schema.Struct<{
254
+ readonly zones: Schema.$Array<Schema.Struct<{
255
+ readonly connectionId: Schema.String;
256
+ readonly provider: Schema.String;
257
+ readonly zone: Schema.String;
258
+ readonly label: Schema.String;
259
+ readonly nameservers: Schema.optionalKey<Schema.$Array<Schema.String>>;
260
+ }>>;
261
+ readonly connections: Schema.$Array<Schema.Struct<{
262
+ readonly connectionId: Schema.String;
263
+ readonly provider: Schema.String;
264
+ readonly status: Schema.Literals<readonly ["disconnected", "connected", "reconnect"]>;
265
+ }>>;
266
+ /** Every provider a customer could connect, so a picker offers one without a second call. */
267
+ readonly providers: Schema.$Array<Schema.Struct<{
268
+ readonly id: Schema.String;
269
+ readonly name: Schema.String;
270
+ readonly methods: Schema.$Array<Schema.Struct<{
271
+ readonly kind: Schema.Literals<readonly ["token", "oauth", "integration"]>;
272
+ readonly label: Schema.String;
273
+ readonly docsUrl: Schema.NullOr<Schema.String>;
274
+ readonly fields: Schema.NullOr<Schema.$Array<Schema.Struct<{
275
+ readonly name: Schema.String;
276
+ readonly required: Schema.Boolean;
277
+ readonly secret: Schema.Boolean;
278
+ }>>>;
279
+ }>>;
280
+ }>>;
281
+ }>;
282
+ export type Zones = typeof Zones.Type;
214
283
  export declare const AttachPayload: Schema.Struct<{
215
284
  readonly domain: Schema.String;
216
285
  /** Which candidate zone to attach when `SelectionRequired` came back. */
@@ -3973,7 +4042,10 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
3973
4042
  domain: Schema.String;
3974
4043
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
3975
4044
  readonly domain: Schema.String;
3976
- readonly attachmentId: Schema.NullOr<Schema.String>;
4045
+ readonly attachment: Schema.NullOr<Schema.Struct<{
4046
+ readonly id: Schema.String;
4047
+ readonly label: Schema.String;
4048
+ }>>;
3977
4049
  readonly connectionId: Schema.NullOr<Schema.String>;
3978
4050
  readonly provider: Schema.NullOr<Schema.String>;
3979
4051
  readonly method: Schema.NullOr<Schema.Literals<readonly ["token", "oauth", "integration"]>>;
@@ -5664,22 +5736,11 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
5664
5736
  };
5665
5737
  }>, Schema.TaggedStruct<"DomainKitError", {
5666
5738
  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]>>;
5667
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reject", "POST", "/plans/:planId/rejections", Schema.toCodecStringTree<Schema.Struct<{
5668
- planId: Schema.brand<Schema.String, "@domainkit/PlanId">;
5669
- }>>, never, Schema.toCodecJson<Schema.Struct<{
5670
- /** Why the customer declined, for the audit trail. */
5671
- readonly reason: Schema.optionalKey<Schema.String>;
5739
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reconnect", "POST", "/connections/:connectionId/reconnections", Schema.toCodecStringTree<Schema.Struct<{
5740
+ connectionId: Schema.String;
5672
5741
  }>>, never, Schema.toCodecJson<Schema.Struct<{
5673
- readonly plan: typeof Plan.Model;
5674
- readonly status: Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>;
5675
- readonly approval: Schema.NullOr<typeof Approval.Model>;
5676
- readonly receipt: Schema.NullOr<typeof Receipt.Model>;
5677
- readonly rejection: Schema.NullOr<Schema.Struct<{
5678
- readonly actorId: Schema.String;
5679
- readonly reason: Schema.NullOr<Schema.String>;
5680
- readonly at: Schema.DateTimeUtcFromString;
5681
- }>>;
5682
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
5742
+ readonly method: Schema.Union<readonly [typeof Token, typeof OAuth, typeof Integration]>;
5743
+ }>>, never, Schema.toCodecJson<Schema.Union<readonly [typeof Connected, typeof Redirect, typeof SelectionRequired]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
5683
5744
  readonly _tag: "DomainKitError";
5684
5745
  readonly reason: {
5685
5746
  readonly _tag: "InvalidInput";
@@ -6087,11 +6148,872 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
6087
6148
  };
6088
6149
  }>, Schema.TaggedStruct<"DomainKitError", {
6089
6150
  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]>>;
6090
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"start", "POST", "/connections", never, never, Schema.toCodecJson<Schema.Struct<{
6091
- readonly domain: Schema.String;
6092
- readonly provider: Schema.String;
6093
- readonly method: Schema.Union<readonly [typeof Token, typeof OAuth, typeof Integration]>;
6094
- }>>, never, Schema.toCodecJson<Schema.Union<readonly [typeof Connected, typeof Redirect, typeof SelectionRequired]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6151
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reject", "POST", "/plans/:planId/rejections", Schema.toCodecStringTree<Schema.Struct<{
6152
+ planId: Schema.brand<Schema.String, "@domainkit/PlanId">;
6153
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
6154
+ /** Why the customer declined, for the audit trail. */
6155
+ readonly reason: Schema.optionalKey<Schema.String>;
6156
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
6157
+ readonly plan: typeof Plan.Model;
6158
+ readonly status: Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>;
6159
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
6160
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
6161
+ readonly rejection: Schema.NullOr<Schema.Struct<{
6162
+ readonly actorId: Schema.String;
6163
+ readonly reason: Schema.NullOr<Schema.String>;
6164
+ readonly at: Schema.DateTimeUtcFromString;
6165
+ }>>;
6166
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6167
+ readonly _tag: "DomainKitError";
6168
+ readonly reason: {
6169
+ readonly _tag: "InvalidInput";
6170
+ readonly message: string;
6171
+ readonly field?: string;
6172
+ } | {
6173
+ readonly _tag: "Unauthenticated";
6174
+ readonly message: string;
6175
+ } | {
6176
+ readonly _tag: "Forbidden";
6177
+ readonly message: string;
6178
+ } | {
6179
+ readonly _tag: "NotFound";
6180
+ readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6181
+ readonly id: string;
6182
+ } | {
6183
+ readonly _tag: "Conflict";
6184
+ readonly planId: string;
6185
+ readonly operations: readonly {
6186
+ readonly _tag: "Conflict";
6187
+ readonly id: string;
6188
+ readonly record: {
6189
+ readonly _tag: "A";
6190
+ readonly name: string;
6191
+ readonly ttl: number | null;
6192
+ readonly policy: "append" | "exclusive";
6193
+ readonly purpose?: string;
6194
+ readonly address: string;
6195
+ } | {
6196
+ readonly _tag: "AAAA";
6197
+ readonly name: string;
6198
+ readonly ttl: number | null;
6199
+ readonly policy: "append" | "exclusive";
6200
+ readonly purpose?: string;
6201
+ readonly address: string;
6202
+ } | {
6203
+ readonly _tag: "CNAME";
6204
+ readonly name: string;
6205
+ readonly ttl: number | null;
6206
+ readonly policy: "append" | "exclusive";
6207
+ readonly purpose?: string;
6208
+ readonly target: string;
6209
+ } | {
6210
+ readonly _tag: "TXT";
6211
+ readonly name: string;
6212
+ readonly ttl: number | null;
6213
+ readonly policy: "append" | "exclusive";
6214
+ readonly purpose?: string;
6215
+ readonly value: string;
6216
+ } | {
6217
+ readonly _tag: "MX";
6218
+ readonly name: string;
6219
+ readonly ttl: number | null;
6220
+ readonly policy: "append" | "exclusive";
6221
+ readonly purpose?: string;
6222
+ readonly exchange: string;
6223
+ readonly priority: number;
6224
+ } | {
6225
+ readonly _tag: "CAA";
6226
+ readonly name: string;
6227
+ readonly ttl: number | null;
6228
+ readonly policy: "append" | "exclusive";
6229
+ readonly purpose?: string;
6230
+ readonly flags: number;
6231
+ readonly tag: string;
6232
+ readonly value: string;
6233
+ } | {
6234
+ readonly _tag: "NS";
6235
+ readonly name: string;
6236
+ readonly ttl: number | null;
6237
+ readonly policy: "append" | "exclusive";
6238
+ readonly purpose?: string;
6239
+ readonly nameserver: string;
6240
+ } | {
6241
+ readonly _tag: "SRV";
6242
+ readonly name: string;
6243
+ readonly ttl: number | null;
6244
+ readonly policy: "append" | "exclusive";
6245
+ readonly purpose?: string;
6246
+ readonly target: string;
6247
+ readonly port: number;
6248
+ readonly priority: number;
6249
+ readonly weight: number;
6250
+ };
6251
+ readonly existing: readonly ({
6252
+ readonly _tag: "A";
6253
+ readonly name: string;
6254
+ readonly ttl: number | null;
6255
+ readonly policy: "append" | "exclusive";
6256
+ readonly purpose?: string;
6257
+ readonly address: string;
6258
+ } | {
6259
+ readonly _tag: "AAAA";
6260
+ readonly name: string;
6261
+ readonly ttl: number | null;
6262
+ readonly policy: "append" | "exclusive";
6263
+ readonly purpose?: string;
6264
+ readonly address: string;
6265
+ } | {
6266
+ readonly _tag: "CNAME";
6267
+ readonly name: string;
6268
+ readonly ttl: number | null;
6269
+ readonly policy: "append" | "exclusive";
6270
+ readonly purpose?: string;
6271
+ readonly target: string;
6272
+ } | {
6273
+ readonly _tag: "TXT";
6274
+ readonly name: string;
6275
+ readonly ttl: number | null;
6276
+ readonly policy: "append" | "exclusive";
6277
+ readonly purpose?: string;
6278
+ readonly value: string;
6279
+ } | {
6280
+ readonly _tag: "MX";
6281
+ readonly name: string;
6282
+ readonly ttl: number | null;
6283
+ readonly policy: "append" | "exclusive";
6284
+ readonly purpose?: string;
6285
+ readonly exchange: string;
6286
+ readonly priority: number;
6287
+ } | {
6288
+ readonly _tag: "CAA";
6289
+ readonly name: string;
6290
+ readonly ttl: number | null;
6291
+ readonly policy: "append" | "exclusive";
6292
+ readonly purpose?: string;
6293
+ readonly flags: number;
6294
+ readonly tag: string;
6295
+ readonly value: string;
6296
+ } | {
6297
+ readonly _tag: "NS";
6298
+ readonly name: string;
6299
+ readonly ttl: number | null;
6300
+ readonly policy: "append" | "exclusive";
6301
+ readonly purpose?: string;
6302
+ readonly nameserver: string;
6303
+ } | {
6304
+ readonly _tag: "SRV";
6305
+ readonly name: string;
6306
+ readonly ttl: number | null;
6307
+ readonly policy: "append" | "exclusive";
6308
+ readonly purpose?: string;
6309
+ readonly target: string;
6310
+ readonly port: number;
6311
+ readonly priority: number;
6312
+ readonly weight: number;
6313
+ } | {
6314
+ readonly _tag: "Opaque";
6315
+ readonly name: string;
6316
+ readonly type: string;
6317
+ readonly raw: unknown;
6318
+ })[];
6319
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
6320
+ }[];
6321
+ } | {
6322
+ readonly _tag: "Stale";
6323
+ readonly planId: string;
6324
+ readonly digest: string;
6325
+ } | {
6326
+ readonly _tag: "Expired";
6327
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
6328
+ readonly id: string;
6329
+ } | {
6330
+ readonly _tag: "Busy";
6331
+ readonly key: string;
6332
+ } | {
6333
+ readonly _tag: "ProviderRejected";
6334
+ readonly provider: string;
6335
+ readonly code?: string;
6336
+ readonly message: string;
6337
+ } | {
6338
+ readonly _tag: "ProviderUnavailable";
6339
+ readonly provider: string;
6340
+ readonly retryAfterMs?: number;
6341
+ readonly message: string;
6342
+ } | {
6343
+ readonly _tag: "ProviderConflict";
6344
+ readonly provider: string;
6345
+ readonly code?: string;
6346
+ readonly message: string;
6347
+ } | {
6348
+ readonly _tag: "Unsupported";
6349
+ readonly provider: string;
6350
+ readonly operation: string;
6351
+ readonly message: string;
6352
+ } | {
6353
+ readonly _tag: "Reconnect";
6354
+ readonly provider: string;
6355
+ readonly connectionId: string;
6356
+ } | {
6357
+ readonly _tag: "StorageFailed";
6358
+ readonly operation: string;
6359
+ readonly message: string;
6360
+ } | {
6361
+ readonly _tag: "CryptoFailed";
6362
+ readonly operation: "digest" | "open" | "seal";
6363
+ } | {
6364
+ readonly _tag: "ResolverFailed";
6365
+ readonly resolver: string;
6366
+ readonly message: string;
6367
+ };
6368
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
6369
+ 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]>>;
6370
+ }>], {
6371
+ readonly _tag: "DomainKitError";
6372
+ readonly reason: {
6373
+ readonly _tag: "InvalidInput";
6374
+ readonly message: string;
6375
+ readonly field?: string;
6376
+ } | {
6377
+ readonly _tag: "Unauthenticated";
6378
+ readonly message: string;
6379
+ } | {
6380
+ readonly _tag: "Forbidden";
6381
+ readonly message: string;
6382
+ } | {
6383
+ readonly _tag: "NotFound";
6384
+ readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6385
+ readonly id: string;
6386
+ } | {
6387
+ readonly _tag: "Conflict";
6388
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6389
+ readonly operations: readonly {
6390
+ readonly _tag: "Conflict";
6391
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
6392
+ readonly record: {
6393
+ readonly _tag: "A";
6394
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6395
+ readonly ttl: number | null;
6396
+ readonly policy: "append" | "exclusive";
6397
+ readonly purpose?: string;
6398
+ readonly address: string;
6399
+ } | {
6400
+ readonly _tag: "AAAA";
6401
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6402
+ readonly ttl: number | null;
6403
+ readonly policy: "append" | "exclusive";
6404
+ readonly purpose?: string;
6405
+ readonly address: string;
6406
+ } | {
6407
+ readonly _tag: "CNAME";
6408
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6409
+ readonly ttl: number | null;
6410
+ readonly policy: "append" | "exclusive";
6411
+ readonly purpose?: string;
6412
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6413
+ } | {
6414
+ readonly _tag: "TXT";
6415
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6416
+ readonly ttl: number | null;
6417
+ readonly policy: "append" | "exclusive";
6418
+ readonly purpose?: string;
6419
+ readonly value: string;
6420
+ } | {
6421
+ readonly _tag: "MX";
6422
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6423
+ readonly ttl: number | null;
6424
+ readonly policy: "append" | "exclusive";
6425
+ readonly purpose?: string;
6426
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6427
+ readonly priority: number;
6428
+ } | {
6429
+ readonly _tag: "CAA";
6430
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6431
+ readonly ttl: number | null;
6432
+ readonly policy: "append" | "exclusive";
6433
+ readonly purpose?: string;
6434
+ readonly flags: number;
6435
+ readonly tag: string;
6436
+ readonly value: string;
6437
+ } | {
6438
+ readonly _tag: "NS";
6439
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6440
+ readonly ttl: number | null;
6441
+ readonly policy: "append" | "exclusive";
6442
+ readonly purpose?: string;
6443
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6444
+ } | {
6445
+ readonly _tag: "SRV";
6446
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6447
+ readonly ttl: number | null;
6448
+ readonly policy: "append" | "exclusive";
6449
+ readonly purpose?: string;
6450
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6451
+ readonly port: number;
6452
+ readonly priority: number;
6453
+ readonly weight: number;
6454
+ };
6455
+ readonly existing: readonly ({
6456
+ readonly _tag: "A";
6457
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6458
+ readonly ttl: number | null;
6459
+ readonly policy: "append" | "exclusive";
6460
+ readonly purpose?: string;
6461
+ readonly address: string;
6462
+ } | {
6463
+ readonly _tag: "AAAA";
6464
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6465
+ readonly ttl: number | null;
6466
+ readonly policy: "append" | "exclusive";
6467
+ readonly purpose?: string;
6468
+ readonly address: string;
6469
+ } | {
6470
+ readonly _tag: "CNAME";
6471
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6472
+ readonly ttl: number | null;
6473
+ readonly policy: "append" | "exclusive";
6474
+ readonly purpose?: string;
6475
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6476
+ } | {
6477
+ readonly _tag: "TXT";
6478
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6479
+ readonly ttl: number | null;
6480
+ readonly policy: "append" | "exclusive";
6481
+ readonly purpose?: string;
6482
+ readonly value: string;
6483
+ } | {
6484
+ readonly _tag: "MX";
6485
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6486
+ readonly ttl: number | null;
6487
+ readonly policy: "append" | "exclusive";
6488
+ readonly purpose?: string;
6489
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6490
+ readonly priority: number;
6491
+ } | {
6492
+ readonly _tag: "CAA";
6493
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6494
+ readonly ttl: number | null;
6495
+ readonly policy: "append" | "exclusive";
6496
+ readonly purpose?: string;
6497
+ readonly flags: number;
6498
+ readonly tag: string;
6499
+ readonly value: string;
6500
+ } | {
6501
+ readonly _tag: "NS";
6502
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6503
+ readonly ttl: number | null;
6504
+ readonly policy: "append" | "exclusive";
6505
+ readonly purpose?: string;
6506
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6507
+ } | {
6508
+ readonly _tag: "SRV";
6509
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6510
+ readonly ttl: number | null;
6511
+ readonly policy: "append" | "exclusive";
6512
+ readonly purpose?: string;
6513
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6514
+ readonly port: number;
6515
+ readonly priority: number;
6516
+ readonly weight: number;
6517
+ } | {
6518
+ readonly _tag: "Opaque";
6519
+ readonly name: string;
6520
+ readonly type: string;
6521
+ readonly raw: unknown;
6522
+ })[];
6523
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
6524
+ }[];
6525
+ } | {
6526
+ readonly _tag: "Stale";
6527
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6528
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
6529
+ } | {
6530
+ readonly _tag: "Expired";
6531
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
6532
+ readonly id: string;
6533
+ } | {
6534
+ readonly _tag: "Busy";
6535
+ readonly key: string;
6536
+ } | {
6537
+ readonly _tag: "ProviderRejected";
6538
+ readonly provider: string;
6539
+ readonly code?: string;
6540
+ readonly message: string;
6541
+ } | {
6542
+ readonly _tag: "ProviderUnavailable";
6543
+ readonly provider: string;
6544
+ readonly retryAfterMs?: number;
6545
+ readonly message: string;
6546
+ } | {
6547
+ readonly _tag: "ProviderConflict";
6548
+ readonly provider: string;
6549
+ readonly code?: string;
6550
+ readonly message: string;
6551
+ } | {
6552
+ readonly _tag: "Unsupported";
6553
+ readonly provider: string;
6554
+ readonly operation: string;
6555
+ readonly message: string;
6556
+ } | {
6557
+ readonly _tag: "Reconnect";
6558
+ readonly provider: string;
6559
+ readonly connectionId: string;
6560
+ } | {
6561
+ readonly _tag: "StorageFailed";
6562
+ readonly operation: string;
6563
+ readonly message: string;
6564
+ } | {
6565
+ readonly _tag: "CryptoFailed";
6566
+ readonly operation: "digest" | "open" | "seal";
6567
+ } | {
6568
+ readonly _tag: "ResolverFailed";
6569
+ readonly resolver: string;
6570
+ readonly message: string;
6571
+ };
6572
+ }>, Schema.TaggedStruct<"DomainKitError", {
6573
+ 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]>>;
6574
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"start", "POST", "/connections", never, never, Schema.toCodecJson<Schema.Struct<{
6575
+ readonly domain: Schema.optionalKey<Schema.String>;
6576
+ readonly provider: Schema.String;
6577
+ readonly method: Schema.Union<readonly [typeof Token, typeof OAuth, typeof Integration]>;
6578
+ }>>, never, Schema.toCodecJson<Schema.Union<readonly [typeof Connected, typeof Redirect, typeof SelectionRequired]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6579
+ readonly _tag: "DomainKitError";
6580
+ readonly reason: {
6581
+ readonly _tag: "InvalidInput";
6582
+ readonly message: string;
6583
+ readonly field?: string;
6584
+ } | {
6585
+ readonly _tag: "Unauthenticated";
6586
+ readonly message: string;
6587
+ } | {
6588
+ readonly _tag: "Forbidden";
6589
+ readonly message: string;
6590
+ } | {
6591
+ readonly _tag: "NotFound";
6592
+ readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6593
+ readonly id: string;
6594
+ } | {
6595
+ readonly _tag: "Conflict";
6596
+ readonly planId: string;
6597
+ readonly operations: readonly {
6598
+ readonly _tag: "Conflict";
6599
+ readonly id: string;
6600
+ readonly record: {
6601
+ readonly _tag: "A";
6602
+ readonly name: string;
6603
+ readonly ttl: number | null;
6604
+ readonly policy: "append" | "exclusive";
6605
+ readonly purpose?: string;
6606
+ readonly address: string;
6607
+ } | {
6608
+ readonly _tag: "AAAA";
6609
+ readonly name: string;
6610
+ readonly ttl: number | null;
6611
+ readonly policy: "append" | "exclusive";
6612
+ readonly purpose?: string;
6613
+ readonly address: string;
6614
+ } | {
6615
+ readonly _tag: "CNAME";
6616
+ readonly name: string;
6617
+ readonly ttl: number | null;
6618
+ readonly policy: "append" | "exclusive";
6619
+ readonly purpose?: string;
6620
+ readonly target: string;
6621
+ } | {
6622
+ readonly _tag: "TXT";
6623
+ readonly name: string;
6624
+ readonly ttl: number | null;
6625
+ readonly policy: "append" | "exclusive";
6626
+ readonly purpose?: string;
6627
+ readonly value: string;
6628
+ } | {
6629
+ readonly _tag: "MX";
6630
+ readonly name: string;
6631
+ readonly ttl: number | null;
6632
+ readonly policy: "append" | "exclusive";
6633
+ readonly purpose?: string;
6634
+ readonly exchange: string;
6635
+ readonly priority: number;
6636
+ } | {
6637
+ readonly _tag: "CAA";
6638
+ readonly name: string;
6639
+ readonly ttl: number | null;
6640
+ readonly policy: "append" | "exclusive";
6641
+ readonly purpose?: string;
6642
+ readonly flags: number;
6643
+ readonly tag: string;
6644
+ readonly value: string;
6645
+ } | {
6646
+ readonly _tag: "NS";
6647
+ readonly name: string;
6648
+ readonly ttl: number | null;
6649
+ readonly policy: "append" | "exclusive";
6650
+ readonly purpose?: string;
6651
+ readonly nameserver: string;
6652
+ } | {
6653
+ readonly _tag: "SRV";
6654
+ readonly name: string;
6655
+ readonly ttl: number | null;
6656
+ readonly policy: "append" | "exclusive";
6657
+ readonly purpose?: string;
6658
+ readonly target: string;
6659
+ readonly port: number;
6660
+ readonly priority: number;
6661
+ readonly weight: number;
6662
+ };
6663
+ readonly existing: readonly ({
6664
+ readonly _tag: "A";
6665
+ readonly name: string;
6666
+ readonly ttl: number | null;
6667
+ readonly policy: "append" | "exclusive";
6668
+ readonly purpose?: string;
6669
+ readonly address: string;
6670
+ } | {
6671
+ readonly _tag: "AAAA";
6672
+ readonly name: string;
6673
+ readonly ttl: number | null;
6674
+ readonly policy: "append" | "exclusive";
6675
+ readonly purpose?: string;
6676
+ readonly address: string;
6677
+ } | {
6678
+ readonly _tag: "CNAME";
6679
+ readonly name: string;
6680
+ readonly ttl: number | null;
6681
+ readonly policy: "append" | "exclusive";
6682
+ readonly purpose?: string;
6683
+ readonly target: string;
6684
+ } | {
6685
+ readonly _tag: "TXT";
6686
+ readonly name: string;
6687
+ readonly ttl: number | null;
6688
+ readonly policy: "append" | "exclusive";
6689
+ readonly purpose?: string;
6690
+ readonly value: string;
6691
+ } | {
6692
+ readonly _tag: "MX";
6693
+ readonly name: string;
6694
+ readonly ttl: number | null;
6695
+ readonly policy: "append" | "exclusive";
6696
+ readonly purpose?: string;
6697
+ readonly exchange: string;
6698
+ readonly priority: number;
6699
+ } | {
6700
+ readonly _tag: "CAA";
6701
+ readonly name: string;
6702
+ readonly ttl: number | null;
6703
+ readonly policy: "append" | "exclusive";
6704
+ readonly purpose?: string;
6705
+ readonly flags: number;
6706
+ readonly tag: string;
6707
+ readonly value: string;
6708
+ } | {
6709
+ readonly _tag: "NS";
6710
+ readonly name: string;
6711
+ readonly ttl: number | null;
6712
+ readonly policy: "append" | "exclusive";
6713
+ readonly purpose?: string;
6714
+ readonly nameserver: string;
6715
+ } | {
6716
+ readonly _tag: "SRV";
6717
+ readonly name: string;
6718
+ readonly ttl: number | null;
6719
+ readonly policy: "append" | "exclusive";
6720
+ readonly purpose?: string;
6721
+ readonly target: string;
6722
+ readonly port: number;
6723
+ readonly priority: number;
6724
+ readonly weight: number;
6725
+ } | {
6726
+ readonly _tag: "Opaque";
6727
+ readonly name: string;
6728
+ readonly type: string;
6729
+ readonly raw: unknown;
6730
+ })[];
6731
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
6732
+ }[];
6733
+ } | {
6734
+ readonly _tag: "Stale";
6735
+ readonly planId: string;
6736
+ readonly digest: string;
6737
+ } | {
6738
+ readonly _tag: "Expired";
6739
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
6740
+ readonly id: string;
6741
+ } | {
6742
+ readonly _tag: "Busy";
6743
+ readonly key: string;
6744
+ } | {
6745
+ readonly _tag: "ProviderRejected";
6746
+ readonly provider: string;
6747
+ readonly code?: string;
6748
+ readonly message: string;
6749
+ } | {
6750
+ readonly _tag: "ProviderUnavailable";
6751
+ readonly provider: string;
6752
+ readonly retryAfterMs?: number;
6753
+ readonly message: string;
6754
+ } | {
6755
+ readonly _tag: "ProviderConflict";
6756
+ readonly provider: string;
6757
+ readonly code?: string;
6758
+ readonly message: string;
6759
+ } | {
6760
+ readonly _tag: "Unsupported";
6761
+ readonly provider: string;
6762
+ readonly operation: string;
6763
+ readonly message: string;
6764
+ } | {
6765
+ readonly _tag: "Reconnect";
6766
+ readonly provider: string;
6767
+ readonly connectionId: string;
6768
+ } | {
6769
+ readonly _tag: "StorageFailed";
6770
+ readonly operation: string;
6771
+ readonly message: string;
6772
+ } | {
6773
+ readonly _tag: "CryptoFailed";
6774
+ readonly operation: "digest" | "open" | "seal";
6775
+ } | {
6776
+ readonly _tag: "ResolverFailed";
6777
+ readonly resolver: string;
6778
+ readonly message: string;
6779
+ };
6780
+ }, readonly [Schema.TaggedStruct<"DomainKitError", {
6781
+ 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]>>;
6782
+ }>], {
6783
+ readonly _tag: "DomainKitError";
6784
+ readonly reason: {
6785
+ readonly _tag: "InvalidInput";
6786
+ readonly message: string;
6787
+ readonly field?: string;
6788
+ } | {
6789
+ readonly _tag: "Unauthenticated";
6790
+ readonly message: string;
6791
+ } | {
6792
+ readonly _tag: "Forbidden";
6793
+ readonly message: string;
6794
+ } | {
6795
+ readonly _tag: "NotFound";
6796
+ readonly entity: "approval" | "attachment" | "authorization" | "connection" | "continuation" | "plan" | "provider" | "receipt" | "record" | "zone";
6797
+ readonly id: string;
6798
+ } | {
6799
+ readonly _tag: "Conflict";
6800
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6801
+ readonly operations: readonly {
6802
+ readonly _tag: "Conflict";
6803
+ readonly id: string & import("effect/Brand").Brand<"@domainkit/OperationId">;
6804
+ readonly record: {
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 existing: readonly ({
6868
+ readonly _tag: "A";
6869
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6870
+ readonly ttl: number | null;
6871
+ readonly policy: "append" | "exclusive";
6872
+ readonly purpose?: string;
6873
+ readonly address: string;
6874
+ } | {
6875
+ readonly _tag: "AAAA";
6876
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6877
+ readonly ttl: number | null;
6878
+ readonly policy: "append" | "exclusive";
6879
+ readonly purpose?: string;
6880
+ readonly address: string;
6881
+ } | {
6882
+ readonly _tag: "CNAME";
6883
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6884
+ readonly ttl: number | null;
6885
+ readonly policy: "append" | "exclusive";
6886
+ readonly purpose?: string;
6887
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6888
+ } | {
6889
+ readonly _tag: "TXT";
6890
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6891
+ readonly ttl: number | null;
6892
+ readonly policy: "append" | "exclusive";
6893
+ readonly purpose?: string;
6894
+ readonly value: string;
6895
+ } | {
6896
+ readonly _tag: "MX";
6897
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6898
+ readonly ttl: number | null;
6899
+ readonly policy: "append" | "exclusive";
6900
+ readonly purpose?: string;
6901
+ readonly exchange: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6902
+ readonly priority: number;
6903
+ } | {
6904
+ readonly _tag: "CAA";
6905
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6906
+ readonly ttl: number | null;
6907
+ readonly policy: "append" | "exclusive";
6908
+ readonly purpose?: string;
6909
+ readonly flags: number;
6910
+ readonly tag: string;
6911
+ readonly value: string;
6912
+ } | {
6913
+ readonly _tag: "NS";
6914
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6915
+ readonly ttl: number | null;
6916
+ readonly policy: "append" | "exclusive";
6917
+ readonly purpose?: string;
6918
+ readonly nameserver: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6919
+ } | {
6920
+ readonly _tag: "SRV";
6921
+ readonly name: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6922
+ readonly ttl: number | null;
6923
+ readonly policy: "append" | "exclusive";
6924
+ readonly purpose?: string;
6925
+ readonly target: string & import("effect/Brand").Brand<"@domainkit/DomainName">;
6926
+ readonly port: number;
6927
+ readonly priority: number;
6928
+ readonly weight: number;
6929
+ } | {
6930
+ readonly _tag: "Opaque";
6931
+ readonly name: string;
6932
+ readonly type: string;
6933
+ readonly raw: unknown;
6934
+ })[];
6935
+ readonly reason: "cname-collision" | "exclusive-name" | "missing" | "opaque" | "value-mismatch";
6936
+ }[];
6937
+ } | {
6938
+ readonly _tag: "Stale";
6939
+ readonly planId: string & import("effect/Brand").Brand<"@domainkit/PlanId">;
6940
+ readonly digest: string & import("effect/Brand").Brand<"@domainkit/Digest">;
6941
+ } | {
6942
+ readonly _tag: "Expired";
6943
+ readonly entity: "approval" | "continuation" | "credential" | "plan";
6944
+ readonly id: string;
6945
+ } | {
6946
+ readonly _tag: "Busy";
6947
+ readonly key: string;
6948
+ } | {
6949
+ readonly _tag: "ProviderRejected";
6950
+ readonly provider: string;
6951
+ readonly code?: string;
6952
+ readonly message: string;
6953
+ } | {
6954
+ readonly _tag: "ProviderUnavailable";
6955
+ readonly provider: string;
6956
+ readonly retryAfterMs?: number;
6957
+ readonly message: string;
6958
+ } | {
6959
+ readonly _tag: "ProviderConflict";
6960
+ readonly provider: string;
6961
+ readonly code?: string;
6962
+ readonly message: string;
6963
+ } | {
6964
+ readonly _tag: "Unsupported";
6965
+ readonly provider: string;
6966
+ readonly operation: string;
6967
+ readonly message: string;
6968
+ } | {
6969
+ readonly _tag: "Reconnect";
6970
+ readonly provider: string;
6971
+ readonly connectionId: string;
6972
+ } | {
6973
+ readonly _tag: "StorageFailed";
6974
+ readonly operation: string;
6975
+ readonly message: string;
6976
+ } | {
6977
+ readonly _tag: "CryptoFailed";
6978
+ readonly operation: "digest" | "open" | "seal";
6979
+ } | {
6980
+ readonly _tag: "ResolverFailed";
6981
+ readonly resolver: string;
6982
+ readonly message: string;
6983
+ };
6984
+ }>, Schema.TaggedStruct<"DomainKitError", {
6985
+ 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]>>;
6986
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"zones", "GET", "/zones", never, Schema.toCodecStringTree<Schema.Struct<{
6987
+ provider: Schema.optionalKey<Schema.String>;
6988
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
6989
+ readonly zones: Schema.$Array<Schema.Struct<{
6990
+ readonly connectionId: Schema.String;
6991
+ readonly provider: Schema.String;
6992
+ readonly zone: Schema.String;
6993
+ readonly label: Schema.String;
6994
+ readonly nameservers: Schema.optionalKey<Schema.$Array<Schema.String>>;
6995
+ }>>;
6996
+ readonly connections: Schema.$Array<Schema.Struct<{
6997
+ readonly connectionId: Schema.String;
6998
+ readonly provider: Schema.String;
6999
+ readonly status: Schema.Literals<readonly ["disconnected", "connected", "reconnect"]>;
7000
+ }>>;
7001
+ /** Every provider a customer could connect, so a picker offers one without a second call. */
7002
+ readonly providers: Schema.$Array<Schema.Struct<{
7003
+ readonly id: Schema.String;
7004
+ readonly name: Schema.String;
7005
+ readonly methods: Schema.$Array<Schema.Struct<{
7006
+ readonly kind: Schema.Literals<readonly ["token", "oauth", "integration"]>;
7007
+ readonly label: Schema.String;
7008
+ readonly docsUrl: Schema.NullOr<Schema.String>;
7009
+ readonly fields: Schema.NullOr<Schema.$Array<Schema.Struct<{
7010
+ readonly name: Schema.String;
7011
+ readonly required: Schema.Boolean;
7012
+ readonly secret: Schema.Boolean;
7013
+ }>>>;
7014
+ }>>;
7015
+ }>>;
7016
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<Errors.DomainKitError, {
6095
7017
  readonly _tag: "DomainKitError";
6096
7018
  readonly reason: {
6097
7019
  readonly _tag: "InvalidInput";