domainkit 0.5.0 → 0.7.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.
@@ -1,1108 +1,5 @@
1
+ import { Nt as Error$3, ct as Service$2, ht as Encoded, kt as DomainName, mt as DnsRecord, ot as Error$2, st as Interface$2, v as CryptoError, wt as Type } from "./connect-10vHuShV.mjs";
1
2
  import { Cause, Context, Crypto, Data, Effect, Layer, Schema } from "effect";
2
- import * as oauth from "oauth4webapi";
3
- declare namespace invalid_input_d_exports {
4
- export { Error$5 as Error };
5
- }
6
- declare const Error_base$5: Schema.Class<Error$5, Schema.TaggedStruct<"InvalidInputError", {
7
- readonly message: Schema.String;
8
- }>, import("effect/Cause").YieldableError>;
9
- declare class Error$5 extends Error_base$5 {}
10
- declare namespace domain_name_d_exports {
11
- export { DomainName, Schema$5 as Schema, decode$5 as decode, parse$1 as parse };
12
- }
13
- declare const Type$1: Schema.brand<Schema.String, "DomainName">;
14
- /** A lower-case, fully qualified DNS name without a trailing dot. */
15
- type DomainName = typeof Type$1.Type;
16
- /** Decodes user and wire strings into canonical domain names. */
17
- declare const Schema$5: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
18
- declare const decode$5: (input: unknown) => Effect.Effect<string & import("effect/Brand").Brand<"DomainName">, Error$5, never>;
19
- declare function parse$1(input: unknown): DomainName;
20
- declare namespace dns_record_d_exports {
21
- export { A, Aaaa, Caa, Cname, DnsRecord, Encoded, Mx, Ns, Observed, Opaque, RequirementMetadata, Schema$4 as Schema, Srv, Txt, Type, data, decode$4 as decode, equals, parse };
22
- }
23
- declare const Type: Schema.Literals<readonly ["A", "AAAA", "CNAME", "TXT", "MX", "CAA", "NS", "SRV"]>;
24
- type Type = typeof Type.Type;
25
- declare const RequirementMetadata: Schema.Struct<{
26
- readonly ownership: Schema.String;
27
- readonly provenance: Schema.String;
28
- readonly purpose: Schema.String;
29
- }>;
30
- interface RequirementMetadata extends Schema.Schema.Type<typeof RequirementMetadata> {}
31
- declare const Schema$4: Schema.TaggedUnion<{
32
- readonly A: Schema.TaggedStruct<"A", {
33
- readonly metadata: Schema.Struct<{
34
- readonly ownership: Schema.String;
35
- readonly provenance: Schema.String;
36
- readonly purpose: Schema.String;
37
- }>;
38
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
39
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
40
- readonly ttl: Schema.NullOr<Schema.Int>;
41
- readonly address: Schema.String;
42
- }>;
43
- readonly AAAA: Schema.TaggedStruct<"AAAA", {
44
- readonly metadata: Schema.Struct<{
45
- readonly ownership: Schema.String;
46
- readonly provenance: Schema.String;
47
- readonly purpose: Schema.String;
48
- }>;
49
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
50
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
51
- readonly ttl: Schema.NullOr<Schema.Int>;
52
- readonly address: Schema.String;
53
- }>;
54
- readonly CAA: Schema.TaggedStruct<"CAA", {
55
- readonly metadata: Schema.Struct<{
56
- readonly ownership: Schema.String;
57
- readonly provenance: Schema.String;
58
- readonly purpose: Schema.String;
59
- }>;
60
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
61
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
62
- readonly ttl: Schema.NullOr<Schema.Int>;
63
- readonly flags: Schema.Int;
64
- readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
65
- readonly value: Schema.String;
66
- }>;
67
- readonly CNAME: Schema.TaggedStruct<"CNAME", {
68
- readonly metadata: Schema.Struct<{
69
- readonly ownership: Schema.String;
70
- readonly provenance: Schema.String;
71
- readonly purpose: Schema.String;
72
- }>;
73
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
74
- readonly ttl: Schema.NullOr<Schema.Int>;
75
- readonly policy: Schema.Literal<"exclusive">;
76
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
77
- }>;
78
- readonly MX: Schema.TaggedStruct<"MX", {
79
- readonly metadata: Schema.Struct<{
80
- readonly ownership: Schema.String;
81
- readonly provenance: Schema.String;
82
- readonly purpose: Schema.String;
83
- }>;
84
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
85
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
86
- readonly ttl: Schema.NullOr<Schema.Int>;
87
- readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
88
- readonly priority: Schema.Int;
89
- }>;
90
- readonly NS: Schema.TaggedStruct<"NS", {
91
- readonly metadata: Schema.Struct<{
92
- readonly ownership: Schema.String;
93
- readonly provenance: Schema.String;
94
- readonly purpose: Schema.String;
95
- }>;
96
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
97
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
98
- readonly ttl: Schema.NullOr<Schema.Int>;
99
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
100
- }>;
101
- readonly SRV: Schema.TaggedStruct<"SRV", {
102
- readonly metadata: Schema.Struct<{
103
- readonly ownership: Schema.String;
104
- readonly provenance: Schema.String;
105
- readonly purpose: Schema.String;
106
- }>;
107
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
108
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
109
- readonly ttl: Schema.NullOr<Schema.Int>;
110
- readonly port: Schema.Int;
111
- readonly priority: Schema.Int;
112
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
113
- readonly weight: Schema.Int;
114
- }>;
115
- readonly TXT: Schema.TaggedStruct<"TXT", {
116
- readonly metadata: Schema.Struct<{
117
- readonly ownership: Schema.String;
118
- readonly provenance: Schema.String;
119
- readonly purpose: Schema.String;
120
- }>;
121
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
122
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
123
- readonly ttl: Schema.NullOr<Schema.Int>;
124
- readonly value: Schema.String;
125
- }>;
126
- }>;
127
- declare const A: Schema.TaggedStruct<"A", {
128
- readonly metadata: Schema.Struct<{
129
- readonly ownership: Schema.String;
130
- readonly provenance: Schema.String;
131
- readonly purpose: Schema.String;
132
- }>;
133
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
134
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
135
- readonly ttl: Schema.NullOr<Schema.Int>;
136
- readonly address: Schema.String;
137
- }>, Aaaa: Schema.TaggedStruct<"AAAA", {
138
- readonly metadata: Schema.Struct<{
139
- readonly ownership: Schema.String;
140
- readonly provenance: Schema.String;
141
- readonly purpose: Schema.String;
142
- }>;
143
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
144
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
145
- readonly ttl: Schema.NullOr<Schema.Int>;
146
- readonly address: Schema.String;
147
- }>, Caa: Schema.TaggedStruct<"CAA", {
148
- readonly metadata: Schema.Struct<{
149
- readonly ownership: Schema.String;
150
- readonly provenance: Schema.String;
151
- readonly purpose: Schema.String;
152
- }>;
153
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
154
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
155
- readonly ttl: Schema.NullOr<Schema.Int>;
156
- readonly flags: Schema.Int;
157
- readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
158
- readonly value: Schema.String;
159
- }>, Cname: Schema.TaggedStruct<"CNAME", {
160
- readonly metadata: Schema.Struct<{
161
- readonly ownership: Schema.String;
162
- readonly provenance: Schema.String;
163
- readonly purpose: Schema.String;
164
- }>;
165
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
166
- readonly ttl: Schema.NullOr<Schema.Int>;
167
- readonly policy: Schema.Literal<"exclusive">;
168
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
169
- }>, Mx: Schema.TaggedStruct<"MX", {
170
- readonly metadata: Schema.Struct<{
171
- readonly ownership: Schema.String;
172
- readonly provenance: Schema.String;
173
- readonly purpose: Schema.String;
174
- }>;
175
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
176
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
177
- readonly ttl: Schema.NullOr<Schema.Int>;
178
- readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
179
- readonly priority: Schema.Int;
180
- }>, Ns: Schema.TaggedStruct<"NS", {
181
- readonly metadata: Schema.Struct<{
182
- readonly ownership: Schema.String;
183
- readonly provenance: Schema.String;
184
- readonly purpose: Schema.String;
185
- }>;
186
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
187
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
188
- readonly ttl: Schema.NullOr<Schema.Int>;
189
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
190
- }>, Srv: Schema.TaggedStruct<"SRV", {
191
- readonly metadata: Schema.Struct<{
192
- readonly ownership: Schema.String;
193
- readonly provenance: Schema.String;
194
- readonly purpose: Schema.String;
195
- }>;
196
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
197
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
198
- readonly ttl: Schema.NullOr<Schema.Int>;
199
- readonly port: Schema.Int;
200
- readonly priority: Schema.Int;
201
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
202
- readonly weight: Schema.Int;
203
- }>, Txt: Schema.TaggedStruct<"TXT", {
204
- readonly metadata: Schema.Struct<{
205
- readonly ownership: Schema.String;
206
- readonly provenance: Schema.String;
207
- readonly purpose: Schema.String;
208
- }>;
209
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
210
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
211
- readonly ttl: Schema.NullOr<Schema.Int>;
212
- readonly value: Schema.String;
213
- }>;
214
- type DnsRecord = typeof Schema$4.Type;
215
- type Encoded = typeof Schema$4.Encoded;
216
- /** Provider state that DomainKit cannot create but must retain for safe reconciliation. */
217
- declare const Opaque: Schema.Struct<{
218
- readonly _tag: Schema.Literal<"Opaque">;
219
- readonly name: Schema.String;
220
- readonly providerRecordId: Schema.NullOr<Schema.String>;
221
- readonly providerType: Schema.String;
222
- }>;
223
- interface Opaque extends Schema.Schema.Type<typeof Opaque> {}
224
- /** Any DNS record observed through a provider, including non-portable record types. */
225
- declare const Observed: Schema.Union<readonly [Schema.TaggedUnion<{
226
- readonly A: Schema.TaggedStruct<"A", {
227
- readonly metadata: Schema.Struct<{
228
- readonly ownership: Schema.String;
229
- readonly provenance: Schema.String;
230
- readonly purpose: Schema.String;
231
- }>;
232
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
233
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
234
- readonly ttl: Schema.NullOr<Schema.Int>;
235
- readonly address: Schema.String;
236
- }>;
237
- readonly AAAA: Schema.TaggedStruct<"AAAA", {
238
- readonly metadata: Schema.Struct<{
239
- readonly ownership: Schema.String;
240
- readonly provenance: Schema.String;
241
- readonly purpose: Schema.String;
242
- }>;
243
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
244
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
245
- readonly ttl: Schema.NullOr<Schema.Int>;
246
- readonly address: Schema.String;
247
- }>;
248
- readonly CAA: Schema.TaggedStruct<"CAA", {
249
- readonly metadata: Schema.Struct<{
250
- readonly ownership: Schema.String;
251
- readonly provenance: Schema.String;
252
- readonly purpose: Schema.String;
253
- }>;
254
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
255
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
256
- readonly ttl: Schema.NullOr<Schema.Int>;
257
- readonly flags: Schema.Int;
258
- readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
259
- readonly value: Schema.String;
260
- }>;
261
- readonly CNAME: Schema.TaggedStruct<"CNAME", {
262
- readonly metadata: Schema.Struct<{
263
- readonly ownership: Schema.String;
264
- readonly provenance: Schema.String;
265
- readonly purpose: Schema.String;
266
- }>;
267
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
268
- readonly ttl: Schema.NullOr<Schema.Int>;
269
- readonly policy: Schema.Literal<"exclusive">;
270
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
271
- }>;
272
- readonly MX: Schema.TaggedStruct<"MX", {
273
- readonly metadata: Schema.Struct<{
274
- readonly ownership: Schema.String;
275
- readonly provenance: Schema.String;
276
- readonly purpose: Schema.String;
277
- }>;
278
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
279
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
280
- readonly ttl: Schema.NullOr<Schema.Int>;
281
- readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
282
- readonly priority: Schema.Int;
283
- }>;
284
- readonly NS: Schema.TaggedStruct<"NS", {
285
- readonly metadata: Schema.Struct<{
286
- readonly ownership: Schema.String;
287
- readonly provenance: Schema.String;
288
- readonly purpose: Schema.String;
289
- }>;
290
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
291
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
292
- readonly ttl: Schema.NullOr<Schema.Int>;
293
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
294
- }>;
295
- readonly SRV: Schema.TaggedStruct<"SRV", {
296
- readonly metadata: Schema.Struct<{
297
- readonly ownership: Schema.String;
298
- readonly provenance: Schema.String;
299
- readonly purpose: Schema.String;
300
- }>;
301
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
302
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
303
- readonly ttl: Schema.NullOr<Schema.Int>;
304
- readonly port: Schema.Int;
305
- readonly priority: Schema.Int;
306
- readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
307
- readonly weight: Schema.Int;
308
- }>;
309
- readonly TXT: Schema.TaggedStruct<"TXT", {
310
- readonly metadata: Schema.Struct<{
311
- readonly ownership: Schema.String;
312
- readonly provenance: Schema.String;
313
- readonly purpose: Schema.String;
314
- }>;
315
- readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
316
- readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
317
- readonly ttl: Schema.NullOr<Schema.Int>;
318
- readonly value: Schema.String;
319
- }>;
320
- }>, Schema.Struct<{
321
- readonly _tag: Schema.Literal<"Opaque">;
322
- readonly name: Schema.String;
323
- readonly providerRecordId: Schema.NullOr<Schema.String>;
324
- readonly providerType: Schema.String;
325
- }>]>;
326
- type Observed = typeof Observed.Type;
327
- declare const decode$4: (input: unknown) => Effect.Effect<{
328
- readonly _tag: "A";
329
- readonly metadata: {
330
- readonly ownership: string;
331
- readonly provenance: string;
332
- readonly purpose: string;
333
- };
334
- readonly name: string & import("effect/Brand").Brand<"DomainName">;
335
- readonly policy: "append" | "exclusive";
336
- readonly ttl: number | null;
337
- readonly address: string;
338
- } | {
339
- readonly _tag: "AAAA";
340
- readonly metadata: {
341
- readonly ownership: string;
342
- readonly provenance: string;
343
- readonly purpose: string;
344
- };
345
- readonly name: string & import("effect/Brand").Brand<"DomainName">;
346
- readonly policy: "append" | "exclusive";
347
- readonly ttl: number | null;
348
- readonly address: string;
349
- } | {
350
- readonly _tag: "CAA";
351
- readonly metadata: {
352
- readonly ownership: string;
353
- readonly provenance: string;
354
- readonly purpose: string;
355
- };
356
- readonly name: string & import("effect/Brand").Brand<"DomainName">;
357
- readonly policy: "append" | "exclusive";
358
- readonly ttl: number | null;
359
- readonly flags: number;
360
- readonly tag: "iodef" | "issue" | "issuewild";
361
- readonly value: string;
362
- } | {
363
- readonly _tag: "CNAME";
364
- readonly metadata: {
365
- readonly ownership: string;
366
- readonly provenance: string;
367
- readonly purpose: string;
368
- };
369
- readonly name: string & import("effect/Brand").Brand<"DomainName">;
370
- readonly ttl: number | null;
371
- readonly policy: "exclusive";
372
- readonly target: string & import("effect/Brand").Brand<"DomainName">;
373
- } | {
374
- readonly _tag: "MX";
375
- readonly metadata: {
376
- readonly ownership: string;
377
- readonly provenance: string;
378
- readonly purpose: string;
379
- };
380
- readonly name: string & import("effect/Brand").Brand<"DomainName">;
381
- readonly policy: "append" | "exclusive";
382
- readonly ttl: number | null;
383
- readonly exchange: string & import("effect/Brand").Brand<"DomainName">;
384
- readonly priority: number;
385
- } | {
386
- readonly _tag: "NS";
387
- readonly metadata: {
388
- readonly ownership: string;
389
- readonly provenance: string;
390
- readonly purpose: string;
391
- };
392
- readonly name: string & import("effect/Brand").Brand<"DomainName">;
393
- readonly policy: "append" | "exclusive";
394
- readonly ttl: number | null;
395
- readonly target: string & import("effect/Brand").Brand<"DomainName">;
396
- } | {
397
- readonly _tag: "SRV";
398
- readonly metadata: {
399
- readonly ownership: string;
400
- readonly provenance: string;
401
- readonly purpose: string;
402
- };
403
- readonly name: string & import("effect/Brand").Brand<"DomainName">;
404
- readonly policy: "append" | "exclusive";
405
- readonly ttl: number | null;
406
- readonly port: number;
407
- readonly priority: number;
408
- readonly target: string & import("effect/Brand").Brand<"DomainName">;
409
- readonly weight: number;
410
- } | {
411
- readonly _tag: "TXT";
412
- readonly metadata: {
413
- readonly ownership: string;
414
- readonly provenance: string;
415
- readonly purpose: string;
416
- };
417
- readonly name: string & import("effect/Brand").Brand<"DomainName">;
418
- readonly policy: "append" | "exclusive";
419
- readonly ttl: number | null;
420
- readonly value: string;
421
- }, Error$5, never>;
422
- declare function parse(input: unknown): DnsRecord;
423
- declare function data(record: DnsRecord): Readonly<Record<string, number | string>>;
424
- declare function equals(left: DnsRecord, right: DnsRecord): boolean;
425
- declare namespace provider_d_exports {
426
- export { AsyncInterface$1 as AsyncInterface, CreateResult$1 as CreateResult, Error$4 as Error, ErrorReason, Interface$3 as Interface, Service$3 as Service, fromAsync, layerFromAsync$1 as layerFromAsync, toAsync$1 as toAsync };
427
- }
428
- interface CreateResult$1 {
429
- readonly providerRecordId: string | null;
430
- }
431
- declare const ErrorReason: Schema.Literals<readonly ["authentication", "authorization", "conflict", "not_found", "rate_limit", "request", "response", "transport", "unsupported"]>;
432
- type ErrorReason = typeof ErrorReason.Type;
433
- declare const Error_base$4: Schema.Class<Error$4, Schema.TaggedStruct<"ProviderError", {
434
- readonly cause: Schema.optionalKey<Schema.Unknown>;
435
- readonly code: Schema.optionalKey<Schema.Union<readonly [Schema.Number, Schema.String]>>;
436
- readonly message: Schema.String;
437
- readonly operation: Schema.String;
438
- readonly providerId: Schema.String;
439
- readonly reason: Schema.optionalKey<Schema.Literals<readonly ["authentication", "authorization", "conflict", "not_found", "rate_limit", "request", "response", "transport", "unsupported"]>>;
440
- readonly retryAfterMs: Schema.optionalKey<Schema.Number>;
441
- readonly status: Schema.optionalKey<Schema.Number>;
442
- }>, import("effect/Cause").YieldableError>;
443
- declare class Error$4 extends Error_base$4 {}
444
- /** The provider capability used by DNS planning, application, and verification. */
445
- interface Interface$3 {
446
- readonly id: string;
447
- readonly createRecord: (zone: DomainName, record: DnsRecord) => Effect.Effect<CreateResult$1, Error$4>;
448
- readonly deleteRecord: (zone: DomainName, providerRecordId: string) => Effect.Effect<void, Error$4>;
449
- readonly getRecord: (zone: DomainName, providerRecordId: string) => Effect.Effect<Observed | null, Error$4>;
450
- readonly listRecords: (zone: DomainName) => Effect.Effect<ReadonlyArray<Observed>, Error$4>;
451
- }
452
- declare const Service_base$3: Context.ServiceClass<Service$3, "@domainkit/DnsProvider", Interface$3>;
453
- declare class Service$3 extends Service_base$3 {}
454
- /** Minimal Promise-shaped provider contract for hosts that do not use Effect directly. */
455
- interface AsyncInterface$1 {
456
- readonly id: string;
457
- readonly createRecord: (zone: DomainName, record: DnsRecord) => Promise<CreateResult$1>;
458
- readonly deleteRecord: (zone: DomainName, providerRecordId: string) => Promise<void>;
459
- readonly getRecord: (zone: DomainName, providerRecordId: string) => Promise<Observed | null>;
460
- readonly listRecords: (zone: DomainName) => Promise<ReadonlyArray<Observed>>;
461
- }
462
- declare const fromAsync: (provider: AsyncInterface$1) => Interface$3;
463
- declare const layerFromAsync$1: (provider: AsyncInterface$1) => Layer.Layer<Service$3>;
464
- declare const toAsync$1: (provider: Interface$3) => AsyncInterface$1;
465
- declare namespace secret_d_exports {
466
- export { Value, make$1 as make };
467
- }
468
- /** A deliberately non-serializable credential value. */
469
- declare class Value {
470
- #private;
471
- private constructor();
472
- static from(value: string): Value;
473
- expose(): string;
474
- toJSON(): string;
475
- toString(): string;
476
- }
477
- declare const make$1: typeof Value.from;
478
- declare namespace manifest_d_exports {
479
- export { AsyncOAuthSubjectResolver, IntegrationMethod, Manifest, Method$1 as Method, OAuthClientConfiguration, OAuthMethod, OAuthSubjectResolver, Schema$3 as Schema, TokenValidation, decode$3 as decode };
480
- }
481
- declare const Method$1: Schema.TaggedUnion<{
482
- readonly integration: Schema.TaggedStruct<"integration", {
483
- readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
484
- readonly installUrl: Schema.String;
485
- readonly tokenEndpoint: Schema.String;
486
- }>;
487
- readonly oauth2: Schema.TaggedStruct<"oauth2", {
488
- readonly authorizationServer: Schema.Struct<{
489
- readonly authorization_endpoint: Schema.String;
490
- readonly issuer: Schema.String;
491
- readonly revocation_endpoint: Schema.optionalKey<Schema.String>;
492
- readonly token_endpoint: Schema.String;
493
- }>;
494
- readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
495
- readonly clientAuth: Schema.Literals<readonly ["none", "client_secret_basic", "client_secret_post"]>;
496
- readonly scopes: Schema.$Array<Schema.String>;
497
- }>;
498
- readonly token: Schema.TaggedStruct<"token", {
499
- readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
500
- readonly instructionsUrl: Schema.String;
501
- }>;
502
- }>;
503
- declare const Schema$3: Schema.Struct<{
504
- readonly methods: Schema.$Array<Schema.TaggedUnion<{
505
- readonly integration: Schema.TaggedStruct<"integration", {
506
- readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
507
- readonly installUrl: Schema.String;
508
- readonly tokenEndpoint: Schema.String;
509
- }>;
510
- readonly oauth2: Schema.TaggedStruct<"oauth2", {
511
- readonly authorizationServer: Schema.Struct<{
512
- readonly authorization_endpoint: Schema.String;
513
- readonly issuer: Schema.String;
514
- readonly revocation_endpoint: Schema.optionalKey<Schema.String>;
515
- readonly token_endpoint: Schema.String;
516
- }>;
517
- readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
518
- readonly clientAuth: Schema.Literals<readonly ["none", "client_secret_basic", "client_secret_post"]>;
519
- readonly scopes: Schema.$Array<Schema.String>;
520
- }>;
521
- readonly token: Schema.TaggedStruct<"token", {
522
- readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
523
- readonly instructionsUrl: Schema.String;
524
- }>;
525
- }>>;
526
- readonly providerId: Schema.String;
527
- }>;
528
- interface Manifest extends Schema.Schema.Type<typeof Schema$3> {}
529
- type OAuthMethod = Extract<Manifest["methods"][number], {
530
- readonly _tag: "oauth2";
531
- }>;
532
- /** A provider-owned installation flow that returns a credential from a one-time code. */
533
- type IntegrationMethod = Extract<Manifest["methods"][number], {
534
- readonly _tag: "integration";
535
- }>;
536
- declare const decode$3: (input: unknown) => Effect.Effect<{
537
- readonly methods: readonly ({
538
- readonly _tag: "integration";
539
- readonly capabilities: readonly ("dns:read" | "dns:write")[];
540
- readonly installUrl: string;
541
- readonly tokenEndpoint: string;
542
- } | {
543
- readonly _tag: "oauth2";
544
- readonly authorizationServer: {
545
- readonly authorization_endpoint: string;
546
- readonly issuer: string;
547
- readonly revocation_endpoint?: string;
548
- readonly token_endpoint: string;
549
- };
550
- readonly capabilities: readonly ("dns:read" | "dns:write")[];
551
- readonly clientAuth: "client_secret_basic" | "client_secret_post" | "none";
552
- readonly scopes: readonly string[];
553
- } | {
554
- readonly _tag: "token";
555
- readonly capabilities: readonly ("dns:read" | "dns:write")[];
556
- readonly instructionsUrl: string;
557
- })[];
558
- readonly providerId: string;
559
- }, Error$5, never>;
560
- interface OAuthClientConfiguration {
561
- readonly clientId: string;
562
- readonly clientSecret?: Value;
563
- }
564
- interface TokenValidation {
565
- readonly accountId: string;
566
- readonly capabilities: ReadonlyArray<"dns:read" | "dns:write">;
567
- readonly expiresAt: Date | null;
568
- readonly scopes: ReadonlyArray<string>;
569
- }
570
- interface OAuthSubjectResolver {
571
- (tokens: oauth.TokenEndpointResponse, accessToken: Value): Effect.Effect<{
572
- readonly accountId: string;
573
- readonly expiresAt: Date | null;
574
- }, Error$4>;
575
- }
576
- interface AsyncOAuthSubjectResolver {
577
- (tokens: oauth.TokenEndpointResponse, accessToken: Value): Promise<{
578
- readonly accountId: string;
579
- readonly expiresAt: Date | null;
580
- }>;
581
- }
582
- //#endregion
583
- //#region src/auth/authorization.d.ts
584
- declare const Capability: Schema.Literals<readonly ["dns:read", "dns:write"]>;
585
- type Capability = typeof Capability.Type;
586
- declare const CapabilityEvidence: Schema.Struct<{
587
- readonly capability: Schema.Literals<readonly ["dns:read", "dns:write"]>;
588
- readonly evidence: Schema.TaggedUnion<{
589
- readonly Declared: Schema.TaggedStruct<"Declared", {}>;
590
- readonly Exercised: Schema.TaggedStruct<"Exercised", {
591
- readonly observedAt: Schema.DateFromString;
592
- }>;
593
- readonly Introspected: Schema.TaggedStruct<"Introspected", {
594
- readonly observedAt: Schema.DateFromString;
595
- }>;
596
- }>;
597
- }>;
598
- interface CapabilityEvidence extends Schema.Schema.Type<typeof CapabilityEvidence> {}
599
- /** A provider credential authorization shared by one or more organization connections. */
600
- declare const Schema$2: Schema.Struct<{
601
- readonly authorizedById: Schema.String;
602
- readonly capabilityEvidence: Schema.$Array<Schema.Struct<{
603
- readonly capability: Schema.Literals<readonly ["dns:read", "dns:write"]>;
604
- readonly evidence: Schema.TaggedUnion<{
605
- readonly Declared: Schema.TaggedStruct<"Declared", {}>;
606
- readonly Exercised: Schema.TaggedStruct<"Exercised", {
607
- readonly observedAt: Schema.DateFromString;
608
- }>;
609
- readonly Introspected: Schema.TaggedStruct<"Introspected", {
610
- readonly observedAt: Schema.DateFromString;
611
- }>;
612
- }>;
613
- }>>;
614
- readonly createdAt: Schema.DateFromString;
615
- readonly expiresAt: Schema.NullOr<Schema.DateFromString>;
616
- readonly id: Schema.String;
617
- readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
618
- readonly providerContext: Schema.Struct<{
619
- readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
620
- readonly version: Schema.String;
621
- }>;
622
- readonly providerId: Schema.String;
623
- readonly requiredCapabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
624
- readonly revocation: Schema.TaggedUnion<{
625
- readonly Active: Schema.TaggedStruct<"Active", {}>;
626
- readonly Pending: Schema.TaggedStruct<"Pending", {
627
- readonly requestedAt: Schema.DateFromString;
628
- }>;
629
- }>;
630
- readonly scopes: Schema.$Array<Schema.String>;
631
- }>;
632
- interface ProviderAuthorization extends Schema.Schema.Type<typeof Schema$2> {}
633
- //#endregion
634
- //#region src/auth/connection.d.ts
635
- /** A provider account and authoritative zone selected for one domain attachment. */
636
- declare const ProviderTargetEvidence: Schema.Struct<{
637
- /** The account display name observed during discovery, when the provider exposes one. */
638
- readonly accountName: Schema.optionalKey<Schema.String>;
639
- /** Nameserver and provider-state evidence observed during discovery. */
640
- readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
641
- readonly status: Schema.String;
642
- /** Provider-specific authoritative-zone type, such as Cloudflare's `full` or Vercel's `external`. */
643
- readonly zoneType: Schema.String;
644
- }>;
645
- interface ProviderTargetEvidence extends Schema.Schema.Type<typeof ProviderTargetEvidence> {}
646
- declare const ProviderTarget: Schema.Struct<{
647
- readonly accountId: Schema.String;
648
- readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
649
- readonly evidence: Schema.optionalKey<Schema.Struct<{
650
- /** The account display name observed during discovery, when the provider exposes one. */
651
- readonly accountName: Schema.optionalKey<Schema.String>;
652
- /** Nameserver and provider-state evidence observed during discovery. */
653
- readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
654
- readonly status: Schema.String;
655
- /** Provider-specific authoritative-zone type, such as Cloudflare's `full` or Vercel's `external`. */
656
- readonly zoneType: Schema.String;
657
- }>>;
658
- readonly zoneId: Schema.String;
659
- readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
660
- }>;
661
- interface ProviderTarget extends Schema.Schema.Type<typeof ProviderTarget> {}
662
- /** The lifecycle state visible to a host for an organization connection. */
663
- declare const ConnectionStatus: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
664
- type ConnectionStatus = typeof ConnectionStatus.Type;
665
- /** An organization-scoped provider connection. */
666
- declare const ProviderConnection: Schema.Struct<{
667
- readonly createdAt: Schema.DateFromString;
668
- readonly id: Schema.String;
669
- readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
670
- readonly ownerId: Schema.String;
671
- readonly providerId: Schema.String;
672
- readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
673
- }>;
674
- interface ProviderConnection extends Schema.Schema.Type<typeof ProviderConnection> {}
675
- /** An exact provider target attached to one organization domain. */
676
- declare const DomainAttachment: Schema.Struct<{
677
- readonly connectionId: Schema.String;
678
- readonly createdAt: Schema.DateFromString;
679
- readonly domain: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
680
- readonly id: Schema.String;
681
- readonly target: Schema.Struct<{
682
- readonly accountId: Schema.String;
683
- readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
684
- readonly evidence: Schema.optionalKey<Schema.Struct<{
685
- /** The account display name observed during discovery, when the provider exposes one. */
686
- readonly accountName: Schema.optionalKey<Schema.String>;
687
- /** Nameserver and provider-state evidence observed during discovery. */
688
- readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
689
- readonly status: Schema.String;
690
- /** Provider-specific authoritative-zone type, such as Cloudflare's `full` or Vercel's `external`. */
691
- readonly zoneType: Schema.String;
692
- }>>;
693
- readonly zoneId: Schema.String;
694
- readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
695
- }>;
696
- }>;
697
- interface DomainAttachment extends Schema.Schema.Type<typeof DomainAttachment> {}
698
- /** Internal connection row; the authorization id is intentionally not part of the public shape. */
699
- declare const StoredConnection: Schema.Struct<{
700
- readonly authorizationId: Schema.String;
701
- readonly createdAt: Schema.DateFromString;
702
- readonly id: Schema.String;
703
- readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
704
- readonly ownerId: Schema.String;
705
- readonly providerId: Schema.String;
706
- }>;
707
- interface StoredConnection extends Schema.Schema.Type<typeof StoredConnection> {}
708
- /** Internal credential material retained by the host's persistence implementation. */
709
- interface StoredCredential {
710
- readonly accessToken: Value;
711
- readonly refreshToken: Value | null;
712
- readonly tokenType: string;
713
- }
714
- declare const AuthorizationError_base$1: Schema.Class<AuthorizationError$1, Schema.TaggedStruct<"AuthorizationError", {
715
- readonly category: Schema.Literal<"authorization">;
716
- readonly message: Schema.String;
717
- readonly operation: Schema.String;
718
- readonly retry: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
719
- }>, import("effect/Cause").YieldableError>;
720
- declare class AuthorizationError$1 extends AuthorizationError_base$1 {}
721
- declare const authorizationError: (message: string, operation: string) => AuthorizationError$1;
722
- /** Decode a public connection snapshot returned by a host. */
723
- declare const decode$2: (input: unknown) => Effect.Effect<{
724
- readonly createdAt: Date;
725
- readonly id: string;
726
- readonly method: "integration" | "oauth2" | "token";
727
- readonly ownerId: string;
728
- readonly providerId: string;
729
- readonly status: "active" | "expired" | "revocation-pending";
730
- }, Error$5, never>;
731
- declare const validate$2: (input: unknown) => Effect.Effect<{
732
- readonly createdAt: Date;
733
- readonly id: string;
734
- readonly method: "integration" | "oauth2" | "token";
735
- readonly ownerId: string;
736
- readonly providerId: string;
737
- readonly status: "active" | "expired" | "revocation-pending";
738
- }, Error$5, never>;
739
- declare const encode$2: (input: {
740
- readonly createdAt: Date;
741
- readonly id: string;
742
- readonly method: "integration" | "oauth2" | "token";
743
- readonly ownerId: string;
744
- readonly providerId: string;
745
- readonly status: "active" | "expired" | "revocation-pending";
746
- }, options?: import("effect/SchemaAST").ParseOptions) => {
747
- readonly createdAt: string;
748
- readonly id: string;
749
- readonly method: "integration" | "oauth2" | "token";
750
- readonly ownerId: string;
751
- readonly providerId: string;
752
- readonly status: "active" | "expired" | "revocation-pending";
753
- };
754
- //#endregion
755
- //#region src/auth/lifecycle-repository.d.ts
756
- /** Private aggregate owned by the managed-DNS persistence capability. */
757
- interface Aggregate {
758
- readonly authorization: ProviderAuthorization;
759
- readonly connections: ReadonlyArray<StoredConnection>;
760
- readonly attachments: ReadonlyArray<DomainAttachment>;
761
- readonly credential: StoredCredential;
762
- }
763
- interface ConnectInput {
764
- readonly authorization: ProviderAuthorization;
765
- readonly connection: StoredConnection;
766
- readonly credential: StoredCredential;
767
- /** The authorization id observed before building a reuse update, if any. */
768
- readonly expectedAuthorizationId?: string;
769
- /** The owner connection id observed before building a reuse update, if any. */
770
- readonly expectedConnectionId?: string;
771
- }
772
- interface AttachmentResult {
773
- readonly attachment: DomainAttachment;
774
- readonly connection: ProviderConnection;
775
- }
776
- interface DetachResult {
777
- readonly attachment: DomainAttachment;
778
- readonly connection: ProviderConnection;
779
- readonly remainingAttachments: number;
780
- }
781
- interface DisconnectResult {
782
- readonly connection: ProviderConnection;
783
- readonly remainingConnections: number;
784
- readonly revokedAuthorization: boolean;
785
- }
786
- declare const Error_base$3: Schema.Class<Error$3, Schema.TaggedStruct<"ManagedDnsLifecycleError", {
787
- readonly category: Schema.Literal<"storage">;
788
- readonly message: Schema.String;
789
- readonly operation: Schema.String;
790
- readonly retry: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
791
- }>, import("effect/Cause").YieldableError>;
792
- declare class Error$3 extends Error_base$3 {}
793
- /**
794
- * Persistence capability for the managed-DNS model.
795
- *
796
- * Implementations own the atomic aggregate containing one provider credential authorization,
797
- * organization connections, and exact domain attachments. Provider authorization is deliberately
798
- * an implementation detail of the capability; public callers operate on the projections returned
799
- * by the connection and attachment methods.
800
- */
801
- interface Interface$2 {
802
- readonly attach: (input: {
803
- readonly attachment: DomainAttachment;
804
- readonly connectionId: string;
805
- readonly ownerId: string;
806
- }) => Effect.Effect<AttachmentResult, Error$3>;
807
- readonly connect: (input: ConnectInput) => Effect.Effect<Aggregate, Error$3>;
808
- readonly detach: (input: {
809
- readonly attachmentId: string;
810
- readonly ownerId: string;
811
- }) => Effect.Effect<DetachResult, Error$3>;
812
- readonly disconnect: <E>(input: {
813
- readonly connectionId: string;
814
- readonly ownerId: string;
815
- readonly revoke: (authorization: ProviderAuthorization) => Effect.Effect<void, E>;
816
- }) => Effect.Effect<DisconnectResult, Error$3 | E>;
817
- readonly findConnection: (ownerId: string, authorizationId: string) => Effect.Effect<StoredConnection | null, Error$3>;
818
- readonly get: (authorizationId: string) => Effect.Effect<Aggregate | null, Error$3>;
819
- readonly getAttachment: (attachmentId: string) => Effect.Effect<DomainAttachment | null, Error$3>;
820
- readonly getByConnectionId: (connectionId: string) => Effect.Effect<Aggregate | null, Error$3>;
821
- readonly listAttachments: (connectionId: string, ownerId: string) => Effect.Effect<ReadonlyArray<DomainAttachment>, Error$3>;
822
- readonly promoteEvidence: (authorizationId: string, evidence: ReadonlyArray<CapabilityEvidence>) => Effect.Effect<Aggregate, Error$3>;
823
- readonly recover: <E>(input: {
824
- readonly authorizationId: string;
825
- readonly revoke: (authorization: ProviderAuthorization) => Effect.Effect<void, E>;
826
- }) => Effect.Effect<DisconnectResult, Error$3 | E>;
827
- readonly rotate: (authorizationId: string, credential: StoredCredential, expiresAt: Date | null) => Effect.Effect<Aggregate, Error$3>;
828
- }
829
- declare const Service_base$2: Context.ServiceClass<Service$2, "@domainkit/ManagedDnsConnections", Interface$2>;
830
- declare class Service$2 extends Service_base$2 {}
831
- declare namespace canonical_json_d_exports {
832
- export { CryptoError, Json, sha256Encoded, sha256Json, sha256Text, stringify, webCryptoLayer };
833
- }
834
- declare const CryptoError_base: Schema.Class<CryptoError, Schema.TaggedStruct<"CryptoError", {
835
- readonly message: Schema.String;
836
- }>, import("effect/Cause").YieldableError>;
837
- declare class CryptoError extends CryptoError_base {}
838
- type Json = null | boolean | number | string | ReadonlyArray<Json> | {
839
- readonly [key: string]: Json;
840
- };
841
- /** Deterministic JSON serialization for already schema-encoded protocol values. */
842
- declare function stringify(value: Json): string;
843
- declare const sha256Text: (value: string) => Effect.Effect<string, CryptoError, Crypto.Crypto>;
844
- declare const sha256Json: (value: Json) => Effect.Effect<string, CryptoError, Crypto.Crypto>;
845
- declare const sha256Encoded: <S extends Schema.Constraint>(schema: S, value: S["Type"]) => Effect.Effect<string, CryptoError, Crypto.Crypto | S["EncodingServices"]>;
846
- /** Portable Web Crypto implementation for hosts that want a ready-made Layer. */
847
- declare const webCryptoLayer: Layer.Layer<Crypto.Crypto>;
848
- declare namespace provider_context_d_exports {
849
- export { Codec, Envelope, codec, decode$1 as decode, encode$1 as encode };
850
- }
851
- /** A provider-owned, versioned, non-secret context value persisted by the host. */
852
- declare const Envelope: Schema.Struct<{
853
- readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
854
- readonly version: Schema.String;
855
- }>;
856
- interface Envelope extends Schema.Schema.Type<typeof Envelope> {}
857
- interface Codec<A> {
858
- readonly decode: (envelope: Envelope) => Effect.Effect<A, Error$5>;
859
- readonly encode: (value: A) => Effect.Effect<Envelope, Error$5>;
860
- readonly version: string;
861
- }
862
- /** Build an adapter-owned context codec from a schema and stable version identifier. */
863
- declare function codec<A, I>(version: string, schema: Schema.Codec<A, I>): Codec<A>;
864
- declare const decode$1: (input: unknown) => Effect.Effect<{
865
- readonly value: Schema.Json;
866
- readonly version: string;
867
- }, Error$5, never>;
868
- declare const encode$1: (input: {
869
- readonly value: Schema.Json;
870
- readonly version: string;
871
- }, options?: import("effect/SchemaAST").ParseOptions) => {
872
- readonly value: Schema.Json;
873
- readonly version: string;
874
- };
875
- //#endregion
876
- //#region src/auth/connect.d.ts
877
- interface Authentication {
878
- readonly capabilityEvidence: ReadonlyArray<CapabilityEvidence>;
879
- readonly credential: StoredCredential;
880
- readonly expiresAt: Date | null;
881
- /** Provider-specific subject identity used only during authentication; targets are selected later. */
882
- readonly providerAccountId: string;
883
- readonly providerContext: Envelope;
884
- readonly scopes: ReadonlyArray<string>;
885
- }
886
- type AuthenticationFailure = Error$2 | Error$5 | Error$4;
887
- interface InteractiveStart {
888
- readonly authorizationUrl: URL;
889
- readonly payload: Value;
890
- }
891
- interface Continuation extends BaseInput {
892
- readonly expiresAt: Date;
893
- readonly id: string;
894
- readonly method: "integration" | "oauth2";
895
- readonly payload: Value;
896
- readonly providerId: string;
897
- readonly requiredCapabilities: ReadonlyArray<Capability>;
898
- }
899
- interface ContinuationStore {
900
- readonly consume: (id: string, now: Date) => Effect.Effect<Continuation | null, Error$2>;
901
- readonly put: (continuation: Continuation) => Effect.Effect<void, Error$2>;
902
- }
903
- interface InteractiveFlow {
904
- readonly complete: (payload: Value, callbackUrl: URL) => Effect.Effect<Authentication, AuthenticationFailure>;
905
- readonly method: "integration" | "oauth2";
906
- readonly providerId: string;
907
- readonly requiredCapabilities: ReadonlyArray<Capability>;
908
- readonly start: (continuationId: string) => Effect.Effect<InteractiveStart, AuthenticationFailure, Crypto.Crypto>;
909
- }
910
- type Method = Data.TaggedEnum<{
911
- Interactive: {
912
- readonly continuations: ContinuationStore;
913
- readonly flow: InteractiveFlow;
914
- readonly ttlMs?: number;
915
- };
916
- Token: {
917
- readonly authenticate: (token: Value) => Effect.Effect<Authentication, AuthenticationFailure>;
918
- readonly providerId: string;
919
- readonly requiredCapabilities: ReadonlyArray<Capability>;
920
- readonly token: Value;
921
- };
922
- }>;
923
- declare const Method: {
924
- readonly $is: <Tag extends "Interactive" | "Token">(tag: Tag) => (u: unknown) => u is Extract<{
925
- readonly _tag: "Interactive";
926
- readonly continuations: ContinuationStore;
927
- readonly flow: InteractiveFlow;
928
- readonly ttlMs?: number;
929
- }, {
930
- readonly _tag: Tag;
931
- }> | Extract<{
932
- readonly _tag: "Token";
933
- readonly authenticate: (token: Value) => Effect.Effect<Authentication, AuthenticationFailure>;
934
- readonly providerId: string;
935
- readonly requiredCapabilities: ReadonlyArray<Capability>;
936
- readonly token: Value;
937
- }, {
938
- readonly _tag: Tag;
939
- }>;
940
- readonly $match: {
941
- <Cases extends { readonly [Tag in "Interactive" | "Token"]: (args: Extract<{
942
- readonly _tag: "Interactive";
943
- readonly continuations: ContinuationStore;
944
- readonly flow: InteractiveFlow;
945
- readonly ttlMs?: number;
946
- } | {
947
- readonly _tag: "Token";
948
- readonly authenticate: (token: Value) => Effect.Effect<Authentication, AuthenticationFailure>;
949
- readonly providerId: string;
950
- readonly requiredCapabilities: ReadonlyArray<Capability>;
951
- readonly token: Value;
952
- }, {
953
- readonly _tag: Tag;
954
- }>) => any; }>(cases: Cases): (value: {
955
- readonly _tag: "Interactive";
956
- readonly continuations: ContinuationStore;
957
- readonly flow: InteractiveFlow;
958
- readonly ttlMs?: number;
959
- } | {
960
- readonly _tag: "Token";
961
- readonly authenticate: (token: Value) => Effect.Effect<Authentication, AuthenticationFailure>;
962
- readonly providerId: string;
963
- readonly requiredCapabilities: ReadonlyArray<Capability>;
964
- readonly token: Value;
965
- }) => import("effect/Unify").Unify<ReturnType<Cases["Interactive" | "Token"]>>;
966
- <Cases extends { readonly [Tag in "Interactive" | "Token"]: (args: Extract<{
967
- readonly _tag: "Interactive";
968
- readonly continuations: ContinuationStore;
969
- readonly flow: InteractiveFlow;
970
- readonly ttlMs?: number;
971
- } | {
972
- readonly _tag: "Token";
973
- readonly authenticate: (token: Value) => Effect.Effect<Authentication, AuthenticationFailure>;
974
- readonly providerId: string;
975
- readonly requiredCapabilities: ReadonlyArray<Capability>;
976
- readonly token: Value;
977
- }, {
978
- readonly _tag: Tag;
979
- }>) => any; }>(value: {
980
- readonly _tag: "Interactive";
981
- readonly continuations: ContinuationStore;
982
- readonly flow: InteractiveFlow;
983
- readonly ttlMs?: number;
984
- } | {
985
- readonly _tag: "Token";
986
- readonly authenticate: (token: Value) => Effect.Effect<Authentication, AuthenticationFailure>;
987
- readonly providerId: string;
988
- readonly requiredCapabilities: ReadonlyArray<Capability>;
989
- readonly token: Value;
990
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Interactive" | "Token"]>>;
991
- };
992
- readonly Interactive: Data.TaggedEnum.ConstructorFrom<{
993
- readonly _tag: "Interactive";
994
- readonly continuations: ContinuationStore;
995
- readonly flow: InteractiveFlow;
996
- readonly ttlMs?: number;
997
- }, "_tag">;
998
- readonly Token: Data.TaggedEnum.ConstructorFrom<{
999
- readonly _tag: "Token";
1000
- readonly authenticate: (token: Value) => Effect.Effect<Authentication, AuthenticationFailure>;
1001
- readonly providerId: string;
1002
- readonly requiredCapabilities: ReadonlyArray<Capability>;
1003
- readonly token: Value;
1004
- }, "_tag">;
1005
- };
1006
- type StartResult = Data.TaggedEnum<{
1007
- Connected: {
1008
- readonly connection: ProviderConnection;
1009
- };
1010
- Redirect: {
1011
- readonly authorizationUrl: URL;
1012
- readonly continuationId: string;
1013
- };
1014
- }>;
1015
- declare const StartResult: {
1016
- readonly $is: <Tag extends "Connected" | "Redirect">(tag: Tag) => (u: unknown) => u is Extract<{
1017
- readonly _tag: "Connected";
1018
- readonly connection: ProviderConnection;
1019
- }, {
1020
- readonly _tag: Tag;
1021
- }> | Extract<{
1022
- readonly _tag: "Redirect";
1023
- readonly authorizationUrl: URL;
1024
- readonly continuationId: string;
1025
- }, {
1026
- readonly _tag: Tag;
1027
- }>;
1028
- readonly $match: {
1029
- <Cases extends { readonly [Tag in "Connected" | "Redirect"]: (args: Extract<{
1030
- readonly _tag: "Connected";
1031
- readonly connection: ProviderConnection;
1032
- } | {
1033
- readonly _tag: "Redirect";
1034
- readonly authorizationUrl: URL;
1035
- readonly continuationId: string;
1036
- }, {
1037
- readonly _tag: Tag;
1038
- }>) => any; }>(cases: Cases): (value: {
1039
- readonly _tag: "Connected";
1040
- readonly connection: ProviderConnection;
1041
- } | {
1042
- readonly _tag: "Redirect";
1043
- readonly authorizationUrl: URL;
1044
- readonly continuationId: string;
1045
- }) => import("effect/Unify").Unify<ReturnType<Cases["Connected" | "Redirect"]>>;
1046
- <Cases extends { readonly [Tag in "Connected" | "Redirect"]: (args: Extract<{
1047
- readonly _tag: "Connected";
1048
- readonly connection: ProviderConnection;
1049
- } | {
1050
- readonly _tag: "Redirect";
1051
- readonly authorizationUrl: URL;
1052
- readonly continuationId: string;
1053
- }, {
1054
- readonly _tag: Tag;
1055
- }>) => any; }>(value: {
1056
- readonly _tag: "Connected";
1057
- readonly connection: ProviderConnection;
1058
- } | {
1059
- readonly _tag: "Redirect";
1060
- readonly authorizationUrl: URL;
1061
- readonly continuationId: string;
1062
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Connected" | "Redirect"]>>;
1063
- };
1064
- readonly Connected: Data.TaggedEnum.ConstructorFrom<{
1065
- readonly _tag: "Connected";
1066
- readonly connection: ProviderConnection;
1067
- }, "_tag">;
1068
- readonly Redirect: Data.TaggedEnum.ConstructorFrom<{
1069
- readonly _tag: "Redirect";
1070
- readonly authorizationUrl: URL;
1071
- readonly continuationId: string;
1072
- }, "_tag">;
1073
- };
1074
- declare const Error_base$2: Schema.Class<Error$2, Schema.TaggedStruct<"ConnectionError", {
1075
- readonly category: Schema.Literals<readonly ["authorization", "provider", "validation"]>;
1076
- readonly message: Schema.String;
1077
- readonly operation: Schema.String;
1078
- readonly retry: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
1079
- }>, import("effect/Cause").YieldableError>;
1080
- declare class Error$2 extends Error_base$2 {}
1081
- /** Inputs shared by token and interactive connection flows. */
1082
- interface BaseInput {
1083
- readonly authorizedById: string;
1084
- /** Existing authorization may be supplied only after the host completed fresh provider proof. */
1085
- readonly authorizationId?: string;
1086
- readonly ownerId: string;
1087
- }
1088
- interface CompleteInput {
1089
- readonly callbackUrl: URL;
1090
- readonly continuationId: string;
1091
- readonly continuations: ContinuationStore;
1092
- readonly flow: InteractiveFlow;
1093
- }
1094
- declare const start: (input: BaseInput & {
1095
- readonly method: Method;
1096
- }) => Effect.Effect<{
1097
- readonly _tag: "Connected";
1098
- readonly connection: ProviderConnection;
1099
- } | {
1100
- readonly _tag: "Redirect";
1101
- readonly authorizationUrl: URL;
1102
- readonly continuationId: string;
1103
- }, Error$3 | AuthenticationFailure, Crypto.Crypto | Service$2>;
1104
- declare const complete: (input: CompleteInput) => Effect.Effect<ProviderConnection, Error$3 | AuthenticationFailure, Crypto.Crypto | Service$2>;
1105
- type Failure = AuthenticationFailure | Error$3 | CryptoError;
1106
3
  declare namespace zone_discovery_d_exports {
1107
4
  export { Candidate, Interface$1 as Interface, Outcome, Service$1 as Service, Source, make };
1108
5
  }
@@ -1117,8 +14,8 @@ declare const Candidate: Schema.Struct<{
1117
14
  }>;
1118
15
  interface Candidate extends Schema.Schema.Type<typeof Candidate> {}
1119
16
  interface Source {
1120
- readonly listZones: (name: DomainName) => Effect.Effect<ReadonlyArray<Omit<Candidate, "providerId">>, Error$4>;
1121
- readonly provider: Interface$3;
17
+ readonly listZones: (name: DomainName) => Effect.Effect<ReadonlyArray<Omit<Candidate, "providerId">>, Error$2>;
18
+ readonly provider: Interface$2;
1122
19
  }
1123
20
  type Outcome = Data.TaggedEnum<{
1124
21
  NotFound: {
@@ -1126,7 +23,7 @@ type Outcome = Data.TaggedEnum<{
1126
23
  };
1127
24
  Resolved: {
1128
25
  readonly candidate: Candidate;
1129
- readonly provider: Interface$3;
26
+ readonly provider: Interface$2;
1130
27
  };
1131
28
  SelectionRequired: {
1132
29
  readonly candidates: ReadonlyArray<Candidate>;
@@ -1141,7 +38,7 @@ declare const Outcome: {
1141
38
  }> | Extract<{
1142
39
  readonly _tag: "Resolved";
1143
40
  readonly candidate: Candidate;
1144
- readonly provider: Interface$3;
41
+ readonly provider: Interface$2;
1145
42
  }, {
1146
43
  readonly _tag: Tag;
1147
44
  }> | Extract<{
@@ -1157,7 +54,7 @@ declare const Outcome: {
1157
54
  } | {
1158
55
  readonly _tag: "Resolved";
1159
56
  readonly candidate: Candidate;
1160
- readonly provider: Interface$3;
57
+ readonly provider: Interface$2;
1161
58
  } | {
1162
59
  readonly _tag: "SelectionRequired";
1163
60
  readonly candidates: ReadonlyArray<Candidate>;
@@ -1169,7 +66,7 @@ declare const Outcome: {
1169
66
  } | {
1170
67
  readonly _tag: "Resolved";
1171
68
  readonly candidate: Candidate;
1172
- readonly provider: Interface$3;
69
+ readonly provider: Interface$2;
1173
70
  } | {
1174
71
  readonly _tag: "SelectionRequired";
1175
72
  readonly candidates: ReadonlyArray<Candidate>;
@@ -1180,7 +77,7 @@ declare const Outcome: {
1180
77
  } | {
1181
78
  readonly _tag: "Resolved";
1182
79
  readonly candidate: Candidate;
1183
- readonly provider: Interface$3;
80
+ readonly provider: Interface$2;
1184
81
  } | {
1185
82
  readonly _tag: "SelectionRequired";
1186
83
  readonly candidates: ReadonlyArray<Candidate>;
@@ -1192,7 +89,7 @@ declare const Outcome: {
1192
89
  } | {
1193
90
  readonly _tag: "Resolved";
1194
91
  readonly candidate: Candidate;
1195
- readonly provider: Interface$3;
92
+ readonly provider: Interface$2;
1196
93
  } | {
1197
94
  readonly _tag: "SelectionRequired";
1198
95
  readonly candidates: ReadonlyArray<Candidate>;
@@ -1205,7 +102,7 @@ declare const Outcome: {
1205
102
  readonly Resolved: Data.TaggedEnum.ConstructorFrom<{
1206
103
  readonly _tag: "Resolved";
1207
104
  readonly candidate: Candidate;
1208
- readonly provider: Interface$3;
105
+ readonly provider: Interface$2;
1209
106
  }, "_tag">;
1210
107
  readonly SelectionRequired: Data.TaggedEnum.ConstructorFrom<{
1211
108
  readonly _tag: "SelectionRequired";
@@ -1213,7 +110,7 @@ declare const Outcome: {
1213
110
  }, "_tag">;
1214
111
  };
1215
112
  interface Interface$1 {
1216
- readonly discover: (domain: DomainName) => Effect.Effect<Outcome, Error$4>;
113
+ readonly discover: (domain: DomainName) => Effect.Effect<Outcome, Error$2>;
1217
114
  }
1218
115
  declare const Service_base$1: Context.ServiceClass<Service$1, "@domainkit/ZoneDiscovery", Interface$1>;
1219
116
  declare class Service$1 extends Service_base$1 {}
@@ -1222,7 +119,7 @@ declare function make(sources: ReadonlyArray<Source>): Interface$1;
1222
119
  declare namespace types_d_exports {
1223
120
  export { ApplyReceipt, Authorization$1 as Authorization, DnsPlan, Operation$1 as Operation, PlanAuthorization, Receipt$1 as Receipt, Schema$1 as Schema, decode, decodeReceipt, encode, encodeReceipt };
1224
121
  }
1225
- declare const Operation$1: Schema.TaggedUnion<{
122
+ declare const OperationSchema: Schema.TaggedUnion<{
1226
123
  readonly conflict: Schema.TaggedStruct<"conflict", {
1227
124
  readonly existing: Schema.$Array<Schema.Union<readonly [Schema.TaggedUnion<{
1228
125
  readonly A: Schema.TaggedStruct<"A", {
@@ -1319,8 +216,7 @@ declare const Operation$1: Schema.TaggedUnion<{
1319
216
  readonly ttl: Schema.NullOr<Schema.Int>;
1320
217
  readonly value: Schema.String;
1321
218
  }>;
1322
- }>, Schema.Struct<{
1323
- readonly _tag: Schema.Literal<"Opaque">;
219
+ }>, Schema.TaggedStruct<"Opaque", {
1324
220
  readonly name: Schema.String;
1325
221
  readonly providerRecordId: Schema.NullOr<Schema.String>;
1326
222
  readonly providerType: Schema.String;
@@ -1624,7 +520,810 @@ declare const Operation$1: Schema.TaggedUnion<{
1624
520
  readonly ttlDrift: Schema.Boolean;
1625
521
  }>;
1626
522
  }>;
1627
- type Operation$1 = typeof Operation$1.Type;
523
+ /** DNS plan operation schema and callable constructors for trusted plan values. */
524
+ declare const Operation$1: {
525
+ Schema: Schema.TaggedUnion<{
526
+ readonly conflict: Schema.TaggedStruct<"conflict", {
527
+ readonly existing: Schema.$Array<Schema.Union<readonly [Schema.TaggedUnion<{
528
+ readonly A: Schema.TaggedStruct<"A", {
529
+ readonly metadata: Schema.Struct<{
530
+ readonly ownership: Schema.String;
531
+ readonly provenance: Schema.String;
532
+ readonly purpose: Schema.String;
533
+ }>;
534
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
535
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
536
+ readonly ttl: Schema.NullOr<Schema.Int>;
537
+ readonly address: Schema.String;
538
+ }>;
539
+ readonly AAAA: Schema.TaggedStruct<"AAAA", {
540
+ readonly metadata: Schema.Struct<{
541
+ readonly ownership: Schema.String;
542
+ readonly provenance: Schema.String;
543
+ readonly purpose: Schema.String;
544
+ }>;
545
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
546
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
547
+ readonly ttl: Schema.NullOr<Schema.Int>;
548
+ readonly address: Schema.String;
549
+ }>;
550
+ readonly CAA: Schema.TaggedStruct<"CAA", {
551
+ readonly metadata: Schema.Struct<{
552
+ readonly ownership: Schema.String;
553
+ readonly provenance: Schema.String;
554
+ readonly purpose: Schema.String;
555
+ }>;
556
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
557
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
558
+ readonly ttl: Schema.NullOr<Schema.Int>;
559
+ readonly flags: Schema.Int;
560
+ readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
561
+ readonly value: Schema.String;
562
+ }>;
563
+ readonly CNAME: Schema.TaggedStruct<"CNAME", {
564
+ readonly metadata: Schema.Struct<{
565
+ readonly ownership: Schema.String;
566
+ readonly provenance: Schema.String;
567
+ readonly purpose: Schema.String;
568
+ }>;
569
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
570
+ readonly ttl: Schema.NullOr<Schema.Int>;
571
+ readonly policy: Schema.Literal<"exclusive">;
572
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
573
+ }>;
574
+ readonly MX: Schema.TaggedStruct<"MX", {
575
+ readonly metadata: Schema.Struct<{
576
+ readonly ownership: Schema.String;
577
+ readonly provenance: Schema.String;
578
+ readonly purpose: Schema.String;
579
+ }>;
580
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
581
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
582
+ readonly ttl: Schema.NullOr<Schema.Int>;
583
+ readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
584
+ readonly priority: Schema.Int;
585
+ }>;
586
+ readonly NS: Schema.TaggedStruct<"NS", {
587
+ readonly metadata: Schema.Struct<{
588
+ readonly ownership: Schema.String;
589
+ readonly provenance: Schema.String;
590
+ readonly purpose: Schema.String;
591
+ }>;
592
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
593
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
594
+ readonly ttl: Schema.NullOr<Schema.Int>;
595
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
596
+ }>;
597
+ readonly SRV: Schema.TaggedStruct<"SRV", {
598
+ readonly metadata: Schema.Struct<{
599
+ readonly ownership: Schema.String;
600
+ readonly provenance: Schema.String;
601
+ readonly purpose: Schema.String;
602
+ }>;
603
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
604
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
605
+ readonly ttl: Schema.NullOr<Schema.Int>;
606
+ readonly port: Schema.Int;
607
+ readonly priority: Schema.Int;
608
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
609
+ readonly weight: Schema.Int;
610
+ }>;
611
+ readonly TXT: Schema.TaggedStruct<"TXT", {
612
+ readonly metadata: Schema.Struct<{
613
+ readonly ownership: Schema.String;
614
+ readonly provenance: Schema.String;
615
+ readonly purpose: Schema.String;
616
+ }>;
617
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
618
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
619
+ readonly ttl: Schema.NullOr<Schema.Int>;
620
+ readonly value: Schema.String;
621
+ }>;
622
+ }>, Schema.TaggedStruct<"Opaque", {
623
+ readonly name: Schema.String;
624
+ readonly providerRecordId: Schema.NullOr<Schema.String>;
625
+ readonly providerType: Schema.String;
626
+ }>]>>;
627
+ readonly id: Schema.String;
628
+ readonly reason: Schema.String;
629
+ readonly requirement: Schema.TaggedUnion<{
630
+ readonly A: Schema.TaggedStruct<"A", {
631
+ readonly metadata: Schema.Struct<{
632
+ readonly ownership: Schema.String;
633
+ readonly provenance: Schema.String;
634
+ readonly purpose: Schema.String;
635
+ }>;
636
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
637
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
638
+ readonly ttl: Schema.NullOr<Schema.Int>;
639
+ readonly address: Schema.String;
640
+ }>;
641
+ readonly AAAA: Schema.TaggedStruct<"AAAA", {
642
+ readonly metadata: Schema.Struct<{
643
+ readonly ownership: Schema.String;
644
+ readonly provenance: Schema.String;
645
+ readonly purpose: Schema.String;
646
+ }>;
647
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
648
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
649
+ readonly ttl: Schema.NullOr<Schema.Int>;
650
+ readonly address: Schema.String;
651
+ }>;
652
+ readonly CAA: Schema.TaggedStruct<"CAA", {
653
+ readonly metadata: Schema.Struct<{
654
+ readonly ownership: Schema.String;
655
+ readonly provenance: Schema.String;
656
+ readonly purpose: Schema.String;
657
+ }>;
658
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
659
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
660
+ readonly ttl: Schema.NullOr<Schema.Int>;
661
+ readonly flags: Schema.Int;
662
+ readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
663
+ readonly value: Schema.String;
664
+ }>;
665
+ readonly CNAME: Schema.TaggedStruct<"CNAME", {
666
+ readonly metadata: Schema.Struct<{
667
+ readonly ownership: Schema.String;
668
+ readonly provenance: Schema.String;
669
+ readonly purpose: Schema.String;
670
+ }>;
671
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
672
+ readonly ttl: Schema.NullOr<Schema.Int>;
673
+ readonly policy: Schema.Literal<"exclusive">;
674
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
675
+ }>;
676
+ readonly MX: Schema.TaggedStruct<"MX", {
677
+ readonly metadata: Schema.Struct<{
678
+ readonly ownership: Schema.String;
679
+ readonly provenance: Schema.String;
680
+ readonly purpose: Schema.String;
681
+ }>;
682
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
683
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
684
+ readonly ttl: Schema.NullOr<Schema.Int>;
685
+ readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
686
+ readonly priority: Schema.Int;
687
+ }>;
688
+ readonly NS: Schema.TaggedStruct<"NS", {
689
+ readonly metadata: Schema.Struct<{
690
+ readonly ownership: Schema.String;
691
+ readonly provenance: Schema.String;
692
+ readonly purpose: Schema.String;
693
+ }>;
694
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
695
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
696
+ readonly ttl: Schema.NullOr<Schema.Int>;
697
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
698
+ }>;
699
+ readonly SRV: Schema.TaggedStruct<"SRV", {
700
+ readonly metadata: Schema.Struct<{
701
+ readonly ownership: Schema.String;
702
+ readonly provenance: Schema.String;
703
+ readonly purpose: Schema.String;
704
+ }>;
705
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
706
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
707
+ readonly ttl: Schema.NullOr<Schema.Int>;
708
+ readonly port: Schema.Int;
709
+ readonly priority: Schema.Int;
710
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
711
+ readonly weight: Schema.Int;
712
+ }>;
713
+ readonly TXT: Schema.TaggedStruct<"TXT", {
714
+ readonly metadata: Schema.Struct<{
715
+ readonly ownership: Schema.String;
716
+ readonly provenance: Schema.String;
717
+ readonly purpose: Schema.String;
718
+ }>;
719
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
720
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
721
+ readonly ttl: Schema.NullOr<Schema.Int>;
722
+ readonly value: Schema.String;
723
+ }>;
724
+ }>;
725
+ }>;
726
+ readonly create: Schema.TaggedStruct<"create", {
727
+ readonly id: Schema.String;
728
+ readonly requirement: Schema.TaggedUnion<{
729
+ readonly A: Schema.TaggedStruct<"A", {
730
+ readonly metadata: Schema.Struct<{
731
+ readonly ownership: Schema.String;
732
+ readonly provenance: Schema.String;
733
+ readonly purpose: Schema.String;
734
+ }>;
735
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
736
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
737
+ readonly ttl: Schema.NullOr<Schema.Int>;
738
+ readonly address: Schema.String;
739
+ }>;
740
+ readonly AAAA: Schema.TaggedStruct<"AAAA", {
741
+ readonly metadata: Schema.Struct<{
742
+ readonly ownership: Schema.String;
743
+ readonly provenance: Schema.String;
744
+ readonly purpose: Schema.String;
745
+ }>;
746
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
747
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
748
+ readonly ttl: Schema.NullOr<Schema.Int>;
749
+ readonly address: Schema.String;
750
+ }>;
751
+ readonly CAA: Schema.TaggedStruct<"CAA", {
752
+ readonly metadata: Schema.Struct<{
753
+ readonly ownership: Schema.String;
754
+ readonly provenance: Schema.String;
755
+ readonly purpose: Schema.String;
756
+ }>;
757
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
758
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
759
+ readonly ttl: Schema.NullOr<Schema.Int>;
760
+ readonly flags: Schema.Int;
761
+ readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
762
+ readonly value: Schema.String;
763
+ }>;
764
+ readonly CNAME: Schema.TaggedStruct<"CNAME", {
765
+ readonly metadata: Schema.Struct<{
766
+ readonly ownership: Schema.String;
767
+ readonly provenance: Schema.String;
768
+ readonly purpose: Schema.String;
769
+ }>;
770
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
771
+ readonly ttl: Schema.NullOr<Schema.Int>;
772
+ readonly policy: Schema.Literal<"exclusive">;
773
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
774
+ }>;
775
+ readonly MX: Schema.TaggedStruct<"MX", {
776
+ readonly metadata: Schema.Struct<{
777
+ readonly ownership: Schema.String;
778
+ readonly provenance: Schema.String;
779
+ readonly purpose: Schema.String;
780
+ }>;
781
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
782
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
783
+ readonly ttl: Schema.NullOr<Schema.Int>;
784
+ readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
785
+ readonly priority: Schema.Int;
786
+ }>;
787
+ readonly NS: Schema.TaggedStruct<"NS", {
788
+ readonly metadata: Schema.Struct<{
789
+ readonly ownership: Schema.String;
790
+ readonly provenance: Schema.String;
791
+ readonly purpose: Schema.String;
792
+ }>;
793
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
794
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
795
+ readonly ttl: Schema.NullOr<Schema.Int>;
796
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
797
+ }>;
798
+ readonly SRV: Schema.TaggedStruct<"SRV", {
799
+ readonly metadata: Schema.Struct<{
800
+ readonly ownership: Schema.String;
801
+ readonly provenance: Schema.String;
802
+ readonly purpose: Schema.String;
803
+ }>;
804
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
805
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
806
+ readonly ttl: Schema.NullOr<Schema.Int>;
807
+ readonly port: Schema.Int;
808
+ readonly priority: Schema.Int;
809
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
810
+ readonly weight: Schema.Int;
811
+ }>;
812
+ readonly TXT: Schema.TaggedStruct<"TXT", {
813
+ readonly metadata: Schema.Struct<{
814
+ readonly ownership: Schema.String;
815
+ readonly provenance: Schema.String;
816
+ readonly purpose: Schema.String;
817
+ }>;
818
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
819
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
820
+ readonly ttl: Schema.NullOr<Schema.Int>;
821
+ readonly value: Schema.String;
822
+ }>;
823
+ }>;
824
+ }>;
825
+ readonly noop: Schema.TaggedStruct<"noop", {
826
+ readonly id: Schema.String;
827
+ readonly requirement: Schema.TaggedUnion<{
828
+ readonly A: Schema.TaggedStruct<"A", {
829
+ readonly metadata: Schema.Struct<{
830
+ readonly ownership: Schema.String;
831
+ readonly provenance: Schema.String;
832
+ readonly purpose: Schema.String;
833
+ }>;
834
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
835
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
836
+ readonly ttl: Schema.NullOr<Schema.Int>;
837
+ readonly address: Schema.String;
838
+ }>;
839
+ readonly AAAA: Schema.TaggedStruct<"AAAA", {
840
+ readonly metadata: Schema.Struct<{
841
+ readonly ownership: Schema.String;
842
+ readonly provenance: Schema.String;
843
+ readonly purpose: Schema.String;
844
+ }>;
845
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
846
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
847
+ readonly ttl: Schema.NullOr<Schema.Int>;
848
+ readonly address: Schema.String;
849
+ }>;
850
+ readonly CAA: Schema.TaggedStruct<"CAA", {
851
+ readonly metadata: Schema.Struct<{
852
+ readonly ownership: Schema.String;
853
+ readonly provenance: Schema.String;
854
+ readonly purpose: Schema.String;
855
+ }>;
856
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
857
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
858
+ readonly ttl: Schema.NullOr<Schema.Int>;
859
+ readonly flags: Schema.Int;
860
+ readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
861
+ readonly value: Schema.String;
862
+ }>;
863
+ readonly CNAME: Schema.TaggedStruct<"CNAME", {
864
+ readonly metadata: Schema.Struct<{
865
+ readonly ownership: Schema.String;
866
+ readonly provenance: Schema.String;
867
+ readonly purpose: Schema.String;
868
+ }>;
869
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
870
+ readonly ttl: Schema.NullOr<Schema.Int>;
871
+ readonly policy: Schema.Literal<"exclusive">;
872
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
873
+ }>;
874
+ readonly MX: Schema.TaggedStruct<"MX", {
875
+ readonly metadata: Schema.Struct<{
876
+ readonly ownership: Schema.String;
877
+ readonly provenance: Schema.String;
878
+ readonly purpose: Schema.String;
879
+ }>;
880
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
881
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
882
+ readonly ttl: Schema.NullOr<Schema.Int>;
883
+ readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
884
+ readonly priority: Schema.Int;
885
+ }>;
886
+ readonly NS: Schema.TaggedStruct<"NS", {
887
+ readonly metadata: Schema.Struct<{
888
+ readonly ownership: Schema.String;
889
+ readonly provenance: Schema.String;
890
+ readonly purpose: Schema.String;
891
+ }>;
892
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
893
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
894
+ readonly ttl: Schema.NullOr<Schema.Int>;
895
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
896
+ }>;
897
+ readonly SRV: Schema.TaggedStruct<"SRV", {
898
+ readonly metadata: Schema.Struct<{
899
+ readonly ownership: Schema.String;
900
+ readonly provenance: Schema.String;
901
+ readonly purpose: Schema.String;
902
+ }>;
903
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
904
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
905
+ readonly ttl: Schema.NullOr<Schema.Int>;
906
+ readonly port: Schema.Int;
907
+ readonly priority: Schema.Int;
908
+ readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
909
+ readonly weight: Schema.Int;
910
+ }>;
911
+ readonly TXT: Schema.TaggedStruct<"TXT", {
912
+ readonly metadata: Schema.Struct<{
913
+ readonly ownership: Schema.String;
914
+ readonly provenance: Schema.String;
915
+ readonly purpose: Schema.String;
916
+ }>;
917
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
918
+ readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
919
+ readonly ttl: Schema.NullOr<Schema.Int>;
920
+ readonly value: Schema.String;
921
+ }>;
922
+ }>;
923
+ readonly ttlDrift: Schema.Boolean;
924
+ }>;
925
+ }>;
926
+ conflict: (input: Parameters<typeof OperationSchema.cases.conflict.make>[0]) => {
927
+ readonly _tag: "conflict";
928
+ readonly existing: readonly ({
929
+ readonly _tag: "A";
930
+ readonly metadata: {
931
+ readonly ownership: string;
932
+ readonly provenance: string;
933
+ readonly purpose: string;
934
+ };
935
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
936
+ readonly policy: "append" | "exclusive";
937
+ readonly ttl: number | null;
938
+ readonly address: string;
939
+ } | {
940
+ readonly _tag: "AAAA";
941
+ readonly metadata: {
942
+ readonly ownership: string;
943
+ readonly provenance: string;
944
+ readonly purpose: string;
945
+ };
946
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
947
+ readonly policy: "append" | "exclusive";
948
+ readonly ttl: number | null;
949
+ readonly address: string;
950
+ } | {
951
+ readonly _tag: "CAA";
952
+ readonly metadata: {
953
+ readonly ownership: string;
954
+ readonly provenance: string;
955
+ readonly purpose: string;
956
+ };
957
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
958
+ readonly policy: "append" | "exclusive";
959
+ readonly ttl: number | null;
960
+ readonly flags: number;
961
+ readonly tag: "iodef" | "issue" | "issuewild";
962
+ readonly value: string;
963
+ } | {
964
+ readonly _tag: "CNAME";
965
+ readonly metadata: {
966
+ readonly ownership: string;
967
+ readonly provenance: string;
968
+ readonly purpose: string;
969
+ };
970
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
971
+ readonly ttl: number | null;
972
+ readonly policy: "exclusive";
973
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
974
+ } | {
975
+ readonly _tag: "MX";
976
+ readonly metadata: {
977
+ readonly ownership: string;
978
+ readonly provenance: string;
979
+ readonly purpose: string;
980
+ };
981
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
982
+ readonly policy: "append" | "exclusive";
983
+ readonly ttl: number | null;
984
+ readonly exchange: string & import("effect/Brand").Brand<"DomainName">;
985
+ readonly priority: number;
986
+ } | {
987
+ readonly _tag: "NS";
988
+ readonly metadata: {
989
+ readonly ownership: string;
990
+ readonly provenance: string;
991
+ readonly purpose: string;
992
+ };
993
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
994
+ readonly policy: "append" | "exclusive";
995
+ readonly ttl: number | null;
996
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
997
+ } | {
998
+ readonly _tag: "SRV";
999
+ readonly metadata: {
1000
+ readonly ownership: string;
1001
+ readonly provenance: string;
1002
+ readonly purpose: string;
1003
+ };
1004
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1005
+ readonly policy: "append" | "exclusive";
1006
+ readonly ttl: number | null;
1007
+ readonly port: number;
1008
+ readonly priority: number;
1009
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1010
+ readonly weight: number;
1011
+ } | {
1012
+ readonly _tag: "TXT";
1013
+ readonly metadata: {
1014
+ readonly ownership: string;
1015
+ readonly provenance: string;
1016
+ readonly purpose: string;
1017
+ };
1018
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1019
+ readonly policy: "append" | "exclusive";
1020
+ readonly ttl: number | null;
1021
+ readonly value: string;
1022
+ } | {
1023
+ readonly _tag: "Opaque";
1024
+ readonly name: string;
1025
+ readonly providerRecordId: string | null;
1026
+ readonly providerType: string;
1027
+ })[];
1028
+ readonly id: string;
1029
+ readonly reason: string;
1030
+ readonly requirement: {
1031
+ readonly _tag: "A";
1032
+ readonly metadata: {
1033
+ readonly ownership: string;
1034
+ readonly provenance: string;
1035
+ readonly purpose: string;
1036
+ };
1037
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1038
+ readonly policy: "append" | "exclusive";
1039
+ readonly ttl: number | null;
1040
+ readonly address: string;
1041
+ } | {
1042
+ readonly _tag: "AAAA";
1043
+ readonly metadata: {
1044
+ readonly ownership: string;
1045
+ readonly provenance: string;
1046
+ readonly purpose: string;
1047
+ };
1048
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1049
+ readonly policy: "append" | "exclusive";
1050
+ readonly ttl: number | null;
1051
+ readonly address: string;
1052
+ } | {
1053
+ readonly _tag: "CAA";
1054
+ readonly metadata: {
1055
+ readonly ownership: string;
1056
+ readonly provenance: string;
1057
+ readonly purpose: string;
1058
+ };
1059
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1060
+ readonly policy: "append" | "exclusive";
1061
+ readonly ttl: number | null;
1062
+ readonly flags: number;
1063
+ readonly tag: "iodef" | "issue" | "issuewild";
1064
+ readonly value: string;
1065
+ } | {
1066
+ readonly _tag: "CNAME";
1067
+ readonly metadata: {
1068
+ readonly ownership: string;
1069
+ readonly provenance: string;
1070
+ readonly purpose: string;
1071
+ };
1072
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1073
+ readonly ttl: number | null;
1074
+ readonly policy: "exclusive";
1075
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1076
+ } | {
1077
+ readonly _tag: "MX";
1078
+ readonly metadata: {
1079
+ readonly ownership: string;
1080
+ readonly provenance: string;
1081
+ readonly purpose: string;
1082
+ };
1083
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1084
+ readonly policy: "append" | "exclusive";
1085
+ readonly ttl: number | null;
1086
+ readonly exchange: string & import("effect/Brand").Brand<"DomainName">;
1087
+ readonly priority: number;
1088
+ } | {
1089
+ readonly _tag: "NS";
1090
+ readonly metadata: {
1091
+ readonly ownership: string;
1092
+ readonly provenance: string;
1093
+ readonly purpose: string;
1094
+ };
1095
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1096
+ readonly policy: "append" | "exclusive";
1097
+ readonly ttl: number | null;
1098
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1099
+ } | {
1100
+ readonly _tag: "SRV";
1101
+ readonly metadata: {
1102
+ readonly ownership: string;
1103
+ readonly provenance: string;
1104
+ readonly purpose: string;
1105
+ };
1106
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1107
+ readonly policy: "append" | "exclusive";
1108
+ readonly ttl: number | null;
1109
+ readonly port: number;
1110
+ readonly priority: number;
1111
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1112
+ readonly weight: number;
1113
+ } | {
1114
+ readonly _tag: "TXT";
1115
+ readonly metadata: {
1116
+ readonly ownership: string;
1117
+ readonly provenance: string;
1118
+ readonly purpose: string;
1119
+ };
1120
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1121
+ readonly policy: "append" | "exclusive";
1122
+ readonly ttl: number | null;
1123
+ readonly value: string;
1124
+ };
1125
+ };
1126
+ create: (input: Parameters<typeof OperationSchema.cases.create.make>[0]) => {
1127
+ readonly _tag: "create";
1128
+ readonly id: string;
1129
+ readonly requirement: {
1130
+ readonly _tag: "A";
1131
+ readonly metadata: {
1132
+ readonly ownership: string;
1133
+ readonly provenance: string;
1134
+ readonly purpose: string;
1135
+ };
1136
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1137
+ readonly policy: "append" | "exclusive";
1138
+ readonly ttl: number | null;
1139
+ readonly address: string;
1140
+ } | {
1141
+ readonly _tag: "AAAA";
1142
+ readonly metadata: {
1143
+ readonly ownership: string;
1144
+ readonly provenance: string;
1145
+ readonly purpose: string;
1146
+ };
1147
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1148
+ readonly policy: "append" | "exclusive";
1149
+ readonly ttl: number | null;
1150
+ readonly address: string;
1151
+ } | {
1152
+ readonly _tag: "CAA";
1153
+ readonly metadata: {
1154
+ readonly ownership: string;
1155
+ readonly provenance: string;
1156
+ readonly purpose: string;
1157
+ };
1158
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1159
+ readonly policy: "append" | "exclusive";
1160
+ readonly ttl: number | null;
1161
+ readonly flags: number;
1162
+ readonly tag: "iodef" | "issue" | "issuewild";
1163
+ readonly value: string;
1164
+ } | {
1165
+ readonly _tag: "CNAME";
1166
+ readonly metadata: {
1167
+ readonly ownership: string;
1168
+ readonly provenance: string;
1169
+ readonly purpose: string;
1170
+ };
1171
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1172
+ readonly ttl: number | null;
1173
+ readonly policy: "exclusive";
1174
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1175
+ } | {
1176
+ readonly _tag: "MX";
1177
+ readonly metadata: {
1178
+ readonly ownership: string;
1179
+ readonly provenance: string;
1180
+ readonly purpose: string;
1181
+ };
1182
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1183
+ readonly policy: "append" | "exclusive";
1184
+ readonly ttl: number | null;
1185
+ readonly exchange: string & import("effect/Brand").Brand<"DomainName">;
1186
+ readonly priority: number;
1187
+ } | {
1188
+ readonly _tag: "NS";
1189
+ readonly metadata: {
1190
+ readonly ownership: string;
1191
+ readonly provenance: string;
1192
+ readonly purpose: string;
1193
+ };
1194
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1195
+ readonly policy: "append" | "exclusive";
1196
+ readonly ttl: number | null;
1197
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1198
+ } | {
1199
+ readonly _tag: "SRV";
1200
+ readonly metadata: {
1201
+ readonly ownership: string;
1202
+ readonly provenance: string;
1203
+ readonly purpose: string;
1204
+ };
1205
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1206
+ readonly policy: "append" | "exclusive";
1207
+ readonly ttl: number | null;
1208
+ readonly port: number;
1209
+ readonly priority: number;
1210
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1211
+ readonly weight: number;
1212
+ } | {
1213
+ readonly _tag: "TXT";
1214
+ readonly metadata: {
1215
+ readonly ownership: string;
1216
+ readonly provenance: string;
1217
+ readonly purpose: string;
1218
+ };
1219
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1220
+ readonly policy: "append" | "exclusive";
1221
+ readonly ttl: number | null;
1222
+ readonly value: string;
1223
+ };
1224
+ };
1225
+ noop: (input: Parameters<typeof OperationSchema.cases.noop.make>[0]) => {
1226
+ readonly _tag: "noop";
1227
+ readonly id: string;
1228
+ readonly requirement: {
1229
+ readonly _tag: "A";
1230
+ readonly metadata: {
1231
+ readonly ownership: string;
1232
+ readonly provenance: string;
1233
+ readonly purpose: string;
1234
+ };
1235
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1236
+ readonly policy: "append" | "exclusive";
1237
+ readonly ttl: number | null;
1238
+ readonly address: string;
1239
+ } | {
1240
+ readonly _tag: "AAAA";
1241
+ readonly metadata: {
1242
+ readonly ownership: string;
1243
+ readonly provenance: string;
1244
+ readonly purpose: string;
1245
+ };
1246
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1247
+ readonly policy: "append" | "exclusive";
1248
+ readonly ttl: number | null;
1249
+ readonly address: string;
1250
+ } | {
1251
+ readonly _tag: "CAA";
1252
+ readonly metadata: {
1253
+ readonly ownership: string;
1254
+ readonly provenance: string;
1255
+ readonly purpose: string;
1256
+ };
1257
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1258
+ readonly policy: "append" | "exclusive";
1259
+ readonly ttl: number | null;
1260
+ readonly flags: number;
1261
+ readonly tag: "iodef" | "issue" | "issuewild";
1262
+ readonly value: string;
1263
+ } | {
1264
+ readonly _tag: "CNAME";
1265
+ readonly metadata: {
1266
+ readonly ownership: string;
1267
+ readonly provenance: string;
1268
+ readonly purpose: string;
1269
+ };
1270
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1271
+ readonly ttl: number | null;
1272
+ readonly policy: "exclusive";
1273
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1274
+ } | {
1275
+ readonly _tag: "MX";
1276
+ readonly metadata: {
1277
+ readonly ownership: string;
1278
+ readonly provenance: string;
1279
+ readonly purpose: string;
1280
+ };
1281
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1282
+ readonly policy: "append" | "exclusive";
1283
+ readonly ttl: number | null;
1284
+ readonly exchange: string & import("effect/Brand").Brand<"DomainName">;
1285
+ readonly priority: number;
1286
+ } | {
1287
+ readonly _tag: "NS";
1288
+ readonly metadata: {
1289
+ readonly ownership: string;
1290
+ readonly provenance: string;
1291
+ readonly purpose: string;
1292
+ };
1293
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1294
+ readonly policy: "append" | "exclusive";
1295
+ readonly ttl: number | null;
1296
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1297
+ } | {
1298
+ readonly _tag: "SRV";
1299
+ readonly metadata: {
1300
+ readonly ownership: string;
1301
+ readonly provenance: string;
1302
+ readonly purpose: string;
1303
+ };
1304
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1305
+ readonly policy: "append" | "exclusive";
1306
+ readonly ttl: number | null;
1307
+ readonly port: number;
1308
+ readonly priority: number;
1309
+ readonly target: string & import("effect/Brand").Brand<"DomainName">;
1310
+ readonly weight: number;
1311
+ } | {
1312
+ readonly _tag: "TXT";
1313
+ readonly metadata: {
1314
+ readonly ownership: string;
1315
+ readonly provenance: string;
1316
+ readonly purpose: string;
1317
+ };
1318
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
1319
+ readonly policy: "append" | "exclusive";
1320
+ readonly ttl: number | null;
1321
+ readonly value: string;
1322
+ };
1323
+ readonly ttlDrift: boolean;
1324
+ };
1325
+ };
1326
+ type Operation$1 = typeof OperationSchema.Type;
1628
1327
  declare const Schema$1: Schema.Struct<{
1629
1328
  readonly digest: Schema.String;
1630
1329
  readonly operations: Schema.$Array<Schema.TaggedUnion<{
@@ -1724,8 +1423,7 @@ declare const Schema$1: Schema.Struct<{
1724
1423
  readonly ttl: Schema.NullOr<Schema.Int>;
1725
1424
  readonly value: Schema.String;
1726
1425
  }>;
1727
- }>, Schema.Struct<{
1728
- readonly _tag: Schema.Literal<"Opaque">;
1426
+ }>, Schema.TaggedStruct<"Opaque", {
1729
1427
  readonly name: Schema.String;
1730
1428
  readonly providerRecordId: Schema.NullOr<Schema.String>;
1731
1429
  readonly providerType: Schema.String;
@@ -2456,7 +2154,7 @@ declare const decode: (input: unknown) => Effect.Effect<{
2456
2154
  readonly providerId: string;
2457
2155
  readonly version: "domainkit.dns-plan.v1";
2458
2156
  readonly zone: string & import("effect/Brand").Brand<"DomainName">;
2459
- }, Error$5, never>;
2157
+ }, Error$3, never>;
2460
2158
  declare const encode: (input: {
2461
2159
  readonly digest: string;
2462
2160
  readonly operations: readonly ({
@@ -3273,7 +2971,7 @@ declare const decodeReceipt: (input: unknown) => Effect.Effect<{
3273
2971
  readonly status: "complete" | "partial";
3274
2972
  readonly version: "domainkit.apply-receipt.v1";
3275
2973
  readonly zone: string & import("effect/Brand").Brand<"DomainName">;
3276
- }, Error$5, never>;
2974
+ }, Error$3, never>;
3277
2975
  declare const encodeReceipt: (input: {
3278
2976
  readonly appliedAt: Date;
3279
2977
  readonly operations: readonly {
@@ -3505,11 +3203,11 @@ interface ApplyInput {
3505
3203
  readonly authorization: PlanAuthorization;
3506
3204
  readonly plan: DnsPlan;
3507
3205
  }
3508
- type CreateError$1 = Error$5 | Error$4 | CryptoError;
3206
+ type CreateError$1 = Error$3 | Error$2 | CryptoError;
3509
3207
  type AuthorizeError = AuthorizationError | CryptoError;
3510
- type ApplyError$1 = Error$5 | Error$4 | CryptoError | AuthorizationError | ConflictError | StaleError | PartialApplyError;
3208
+ type ApplyError$1 = Error$3 | Error$2 | CryptoError | AuthorizationError | ConflictError | StaleError | PartialApplyError;
3511
3209
  /** Builds a deterministic DNS plan through an exact or discoverable authoritative-zone target. */
3512
- declare function create$1(input: ExactCreateInput): Effect.Effect<ResolvedCreateResult, CreateError$1, Crypto.Crypto | Service$3>;
3210
+ declare function create$1(input: ExactCreateInput): Effect.Effect<ResolvedCreateResult, CreateError$1, Crypto.Crypto | Service$2>;
3513
3211
  declare function create$1(input: DiscoverCreateInput): Effect.Effect<CreateResult, CreateError$1, Crypto.Crypto | Service$1>;
3514
3212
  /** Authorizes all or a selected subset of create operations in a digest-bound plan. */
3515
3213
  declare const authorize$1: (plan: DnsPlan, operationIds?: readonly string[] | undefined, options?: {
@@ -3521,7 +3219,7 @@ declare const authorize$1: (plan: DnsPlan, operationIds?: readonly string[] | un
3521
3219
  version: "domainkit.plan-authorization.v1";
3522
3220
  }, AuthorizeError, Crypto.Crypto>;
3523
3221
  /** Applies approved creates sequentially after full and per-operation revalidation. */
3524
- declare const apply$1: (input: ApplyInput) => Effect.Effect<ApplyReceipt, AuthorizationError | ConflictError | CryptoError | Error$5 | Error$4 | PartialApplyError | StaleError, Crypto.Crypto | Service$3>;
3222
+ declare const apply$1: (input: ApplyInput) => Effect.Effect<ApplyReceipt, AuthorizationError | ConflictError | CryptoError | Error$3 | Error$2 | PartialApplyError | StaleError, Crypto.Crypto | Service$2>;
3525
3223
  declare function renderManualInstructions(plan: DnsPlan): ReadonlyArray<string>;
3526
3224
  declare function validate$1(plan: DnsPlan): Effect.Effect<void, AuthorizeError, Crypto.Crypto>;
3527
3225
  declare namespace deletion_d_exports {
@@ -3892,7 +3590,7 @@ declare const create: (input: CreateInput) => Effect.Effect<{
3892
3590
  version: "domainkit.deletion-plan.v1";
3893
3591
  zone: string & import("effect/Brand").Brand<"DomainName">;
3894
3592
  digest: string;
3895
- }, Error$4 | Error$1 | AuthorizeError, Crypto.Crypto | Service$3>;
3593
+ }, Error$2 | Error$1 | AuthorizeError, Crypto.Crypto | Service$2>;
3896
3594
  /** Produce a separate digest-bound consent artifact for destructive operations. */
3897
3595
  declare const authorize: (plan: Plan, operationIds?: readonly string[] | undefined) => Effect.Effect<{
3898
3596
  operationIds: string[];
@@ -3904,11 +3602,11 @@ declare const apply: (input: {
3904
3602
  readonly authorization: Authorization;
3905
3603
  readonly plan: Plan;
3906
3604
  readonly priorReceipt?: Receipt;
3907
- }) => Effect.Effect<Receipt, CryptoError | Error$4 | Error$1 | PartialError, Crypto.Crypto | Service$3>;
3605
+ }) => Effect.Effect<Receipt, CryptoError | Error$2 | Error$1 | PartialError, Crypto.Crypto | Service$2>;
3908
3606
  declare function validate(plan: Plan): Effect.Effect<void, Error$1 | CryptoError, Crypto.Crypto>;
3909
- type CreateError = Error$1 | Error$5 | AuthorizationError | Error$4 | CryptoError;
3910
- type ApplyError = Error$1 | PartialError | Error$4 | CryptoError;
3911
- type Requirements = Service$3 | Crypto.Crypto;
3607
+ type CreateError = Error$1 | Error$3 | AuthorizationError | Error$2 | CryptoError;
3608
+ type ApplyError = Error$1 | PartialError | Error$2 | CryptoError;
3609
+ type Requirements = Service$2 | Crypto.Crypto;
3912
3610
  declare namespace resolver_d_exports {
3913
3611
  export { Answer, AsyncInterface, AsyncResolution, Error, Interface, Query, Resolution, Service, layerFromAsync, toAsync };
3914
3612
  }
@@ -3924,7 +3622,7 @@ declare const Answer: Schema.Struct<{
3924
3622
  readonly type: Schema.Literals<readonly ["A", "AAAA", "CNAME", "TXT", "MX", "CAA", "NS", "SRV"]>;
3925
3623
  }>;
3926
3624
  interface Answer extends Schema.Schema.Type<typeof Answer> {}
3927
- declare const Resolution: Schema.TaggedUnion<{
3625
+ declare const ResolutionSchema: Schema.TaggedUnion<{
3928
3626
  readonly answer: Schema.TaggedStruct<"answer", {
3929
3627
  readonly answers: Schema.$Array<Schema.Struct<{
3930
3628
  readonly data: Schema.String;
@@ -3935,7 +3633,33 @@ declare const Resolution: Schema.TaggedUnion<{
3935
3633
  }>;
3936
3634
  readonly nodata: Schema.TaggedStruct<"nodata", {}>;
3937
3635
  }>;
3938
- type Resolution = typeof Resolution.Type;
3636
+ /** DNS answer schema and callable constructors for trusted resolver values. */
3637
+ declare const Resolution: {
3638
+ Schema: Schema.TaggedUnion<{
3639
+ readonly answer: Schema.TaggedStruct<"answer", {
3640
+ readonly answers: Schema.$Array<Schema.Struct<{
3641
+ readonly data: Schema.String;
3642
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
3643
+ readonly ttl: Schema.Int;
3644
+ readonly type: Schema.Literals<readonly ["A", "AAAA", "CNAME", "TXT", "MX", "CAA", "NS", "SRV"]>;
3645
+ }>>;
3646
+ }>;
3647
+ readonly nodata: Schema.TaggedStruct<"nodata", {}>;
3648
+ }>;
3649
+ answer: (input: Parameters<typeof ResolutionSchema.cases.answer.make>[0]) => {
3650
+ readonly _tag: "answer";
3651
+ readonly answers: readonly {
3652
+ readonly data: string;
3653
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
3654
+ readonly ttl: number;
3655
+ readonly type: "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "NS" | "SRV" | "TXT";
3656
+ }[];
3657
+ };
3658
+ nodata: () => {
3659
+ readonly _tag: "nodata";
3660
+ };
3661
+ };
3662
+ type Resolution = typeof ResolutionSchema.Type;
3939
3663
  declare const Error_base: Schema.Class<Error, Schema.TaggedStruct<"ResolverError", {
3940
3664
  readonly cause: Schema.optionalKey<Schema.Unknown>;
3941
3665
  readonly message: Schema.String;
@@ -3947,17 +3671,64 @@ interface Interface {
3947
3671
  }
3948
3672
  declare const Service_base: Context.ServiceClass<Service, "@domainkit/DnsResolver", Interface>;
3949
3673
  declare class Service extends Service_base {}
3950
- type AsyncResolution = Resolution | {
3951
- readonly _tag: "timeout";
3952
- } | {
3953
- readonly _tag: "failure";
3954
- readonly message: string;
3674
+ declare const AsyncResolutionSchema: Schema.TaggedUnion<{
3675
+ readonly answer: Schema.TaggedStruct<"answer", {
3676
+ readonly answers: Schema.$Array<Schema.Struct<{
3677
+ readonly data: Schema.String;
3678
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
3679
+ readonly ttl: Schema.Int;
3680
+ readonly type: Schema.Literals<readonly ["A", "AAAA", "CNAME", "TXT", "MX", "CAA", "NS", "SRV"]>;
3681
+ }>>;
3682
+ }>;
3683
+ readonly failure: Schema.TaggedStruct<"failure", {
3684
+ readonly message: Schema.String;
3685
+ }>;
3686
+ readonly nodata: Schema.TaggedStruct<"nodata", {}>;
3687
+ readonly timeout: Schema.TaggedStruct<"timeout", {}>;
3688
+ }>;
3689
+ /** Promise bridge result schema and callable constructors, including typed failures. */
3690
+ declare const AsyncResolution: {
3691
+ Schema: Schema.TaggedUnion<{
3692
+ readonly answer: Schema.TaggedStruct<"answer", {
3693
+ readonly answers: Schema.$Array<Schema.Struct<{
3694
+ readonly data: Schema.String;
3695
+ readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
3696
+ readonly ttl: Schema.Int;
3697
+ readonly type: Schema.Literals<readonly ["A", "AAAA", "CNAME", "TXT", "MX", "CAA", "NS", "SRV"]>;
3698
+ }>>;
3699
+ }>;
3700
+ readonly failure: Schema.TaggedStruct<"failure", {
3701
+ readonly message: Schema.String;
3702
+ }>;
3703
+ readonly nodata: Schema.TaggedStruct<"nodata", {}>;
3704
+ readonly timeout: Schema.TaggedStruct<"timeout", {}>;
3705
+ }>;
3706
+ answer: (input: Parameters<typeof AsyncResolutionSchema.cases.answer.make>[0]) => {
3707
+ readonly _tag: "answer";
3708
+ readonly answers: readonly {
3709
+ readonly data: string;
3710
+ readonly name: string & import("effect/Brand").Brand<"DomainName">;
3711
+ readonly ttl: number;
3712
+ readonly type: "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "NS" | "SRV" | "TXT";
3713
+ }[];
3714
+ };
3715
+ failure: (input: Parameters<typeof AsyncResolutionSchema.cases.failure.make>[0]) => {
3716
+ readonly _tag: "failure";
3717
+ readonly message: string;
3718
+ };
3719
+ nodata: () => {
3720
+ readonly _tag: "nodata";
3721
+ };
3722
+ timeout: () => {
3723
+ readonly _tag: "timeout";
3724
+ };
3955
3725
  };
3726
+ type AsyncResolution = typeof AsyncResolutionSchema.Type;
3956
3727
  interface AsyncInterface {
3957
3728
  readonly resolve: (query: Query) => Promise<AsyncResolution>;
3958
3729
  }
3959
3730
  declare const layerFromAsync: (resolver: AsyncInterface) => Layer.Layer<Service>;
3960
3731
  declare const toAsync: (resolver: Interface) => AsyncInterface;
3961
3732
  //#endregion
3962
- export { InteractiveStart as $, Cname as $t, renderManualInstructions as A, CapabilityEvidence as At, types_d_exports as B, TokenValidation as Bt, DiscoverCreateInput as C, StoredConnection as Ct, StaleError as D, encode$2 as Dt, ResolvedCreateResult as E, decode$2 as Et, PlanAuthorization as F, Method$1 as Ft, AuthenticationFailure as G, CreateResult$1 as Gt, Source as H, Value as Ht, Receipt$1 as I, OAuthClientConfiguration as It, Continuation as J, Service$3 as Jt, BaseInput as K, Error$4 as Kt, Schema$1 as L, OAuthMethod as Lt, Authorization$1 as M, AsyncOAuthSubjectResolver as Mt, DnsPlan as N, IntegrationMethod as Nt, Target as O, validate$2 as Ot, Operation$1 as P, Manifest as Pt, InteractiveFlow as Q, Caa as Qt, encode as R, OAuthSubjectResolver as Rt, CreateResult as S, ProviderTargetEvidence as St, PartialApplyError as T, authorizationError as Tt, zone_discovery_d_exports as U, secret_d_exports as Ut, Candidate as V, manifest_d_exports as Vt, Authentication as W, AsyncInterface$1 as Wt, Error$2 as X, A as Xt, ContinuationStore as Y, provider_d_exports as Yt, Failure as Z, Aaaa as Zt, Receipt as _, domain_name_d_exports as _n, AuthorizationError$1 as _t, Interface as a, Opaque as an, Envelope as at, AuthorizeError as b, invalid_input_d_exports as bn, ProviderConnection as bt, Service as c, Srv as cn, canonical_json_d_exports as ct, Authorization as d, data as dn, ConnectInput as dt, DnsRecord as en, Method as et, CreateError as f, dns_record_d_exports as fn, DetachResult as ft, Plan as g, Schema$5 as gn, Service$2 as gt, PartialError as h, DomainName as hn, Interface$2 as ht, Error as i, Observed as in, Codec as it, ApplyReceipt as j, ProviderAuthorization as jt, plan_d_exports as k, Capability as kt, resolver_d_exports as l, Txt as ln, Aggregate as lt, Operation as m, parse as mn, Error$3 as mt, AsyncInterface as n, Mx as nn, complete as nt, Query as o, RequirementMetadata as on, provider_context_d_exports as ot, Error$1 as p, equals as pn, DisconnectResult as pt, CompleteInput as q, Interface$3 as qt, AsyncResolution as r, Ns as rn, start as rt, Resolution as s, Schema$4 as sn, CryptoError as st, Answer as t, Encoded as tn, StartResult as tt, ApplyError as u, Type as un, AttachmentResult as ut, deletion_d_exports as v, parse$1 as vn, ConnectionStatus as vt, ExactCreateInput as w, StoredCredential as wt, ConflictError as x, ProviderTarget as xt, AuthorizationError as y, Error$5 as yn, DomainAttachment as yt, encodeReceipt as z, Schema$3 as zt };
3963
- //# sourceMappingURL=resolver-BGBLnPjJ.d.mts.map
3733
+ export { renderManualInstructions as A, types_d_exports as B, DiscoverCreateInput as C, StaleError as D, ResolvedCreateResult as E, PlanAuthorization as F, Source as H, Receipt$1 as I, Schema$1 as L, Authorization$1 as M, DnsPlan as N, Target as O, Operation$1 as P, encode as R, CreateResult as S, PartialApplyError as T, zone_discovery_d_exports as U, Candidate as V, Receipt as _, Interface as a, AuthorizeError as b, Service as c, Authorization as d, CreateError as f, Plan as g, PartialError as h, Error as i, ApplyReceipt as j, plan_d_exports as k, resolver_d_exports as l, Operation as m, AsyncInterface as n, Query as o, Error$1 as p, AsyncResolution as r, Resolution as s, Answer as t, ApplyError as u, deletion_d_exports as v, ExactCreateInput as w, ConflictError as x, AuthorizationError as y, encodeReceipt as z };
3734
+ //# sourceMappingURL=resolver-DRrLm_hB.d.mts.map