domainkit 0.4.0 → 0.6.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.
package/dist/index.d.mts CHANGED
@@ -1,14 +1,20 @@
1
- import { $t as manifest_d_exports, B as types_d_exports, Bt as ProviderAuthorization, Ct as Connection, En as secret_d_exports, Ht as authorization_d_exports, Mn as invalid_input_d_exports, N as DnsPlan, Sn as dns_record_d_exports, St as AuthorizationError, U as zone_discovery_d_exports, an as provider_d_exports, b as AuthorizeError, bn as Type, bt as CryptoError, ft as provider_context_d_exports, jn as Error$1, k as plan_d_exports, kn as domain_name_d_exports, l as resolver_d_exports, un as DnsRecord$1, v as deletion_d_exports, xt as canonical_json_d_exports, yt as lifecycle_repository_d_exports } from "./resolver-uqe1h5Vz.mjs";
2
- import { J as diagnostic_d_exports, K as zones_d_exports, Y as connection_api_d_exports, a as verify_d_exports, d as google_doh_d_exports, g as index_d_exports$1, h as doh_d_exports, j as index_d_exports, l as resolver_pool_d_exports, p as cloudflare_doh_d_exports, q as selection_d_exports } from "./verify-CkgVrwyl.mjs";
1
+ import { C as ConnectInput$1, D as Interface$1, E as Error$1, Et as dns_record_d_exports, F as StoredConnection, G as authorization_d_exports, I as StoredCredential, M as ProviderConnection, N as ProviderTarget, Nt as Error$2, O as Service$1, P as ProviderTargetEvidence, Pt as invalid_input_d_exports, S as AttachmentResult, T as DisconnectResult, W as ProviderAuthorization, _ as provider_context_d_exports, b as Aggregate, j as DomainAttachment, jt as domain_name_d_exports, k as AuthorizationError, lt as provider_d_exports, mt as DnsRecord$1, rt as secret_d_exports, tt as manifest_d_exports, v as CryptoError, w as DetachResult$1, wt as Type, x as AggregateSchema, y as canonical_json_d_exports } from "./connect-Db830jad.mjs";
2
+ import { t as connection_api_d_exports } from "./connection-api-B__0M3PA.mjs";
3
+ import { M as index_d_exports, a as verify_d_exports, d as google_doh_d_exports, et as session_d_exports, g as index_d_exports$1, h as doh_d_exports, l as resolver_pool_d_exports, nt as selection_d_exports, p as cloudflare_doh_d_exports, rt as diagnostic_d_exports, tt as zones_d_exports } from "./verify-yAy-r9no.mjs";
4
+ import { B as types_d_exports, N as DnsPlan, U as zone_discovery_d_exports, b as AuthorizeError, k as plan_d_exports, l as resolver_d_exports, v as deletion_d_exports } from "./resolver-DUAIlm2I.mjs";
3
5
  import { Context, Crypto, Data, Effect, Layer, Schema } from "effect";
6
+ declare namespace lifecycle_api_d_exports {
7
+ export { Aggregate, AggregateSchema, AttachmentResult, authorization_d_exports as Authorization, ConnectInput$1 as ConnectInput, DetachResult$1 as DetachResult, DisconnectResult, Error$1 as Error, Interface$1 as Interface, Service$1 as Service, StoredConnection, StoredCredential };
8
+ }
4
9
  declare namespace connection_authorization_d_exports {
5
10
  export { Error, Requirements, authorize };
6
11
  }
7
12
  declare const authorize: (input: {
8
13
  readonly allowPartial?: boolean;
9
14
  readonly authorization: ProviderAuthorization;
10
- readonly connection: Connection;
15
+ readonly connection: ProviderConnection | StoredConnection;
11
16
  readonly domain: string;
17
+ readonly attachment: DomainAttachment;
12
18
  readonly operationIds?: ReadonlyArray<string>;
13
19
  readonly plan: DnsPlan;
14
20
  }) => Effect.Effect<{
@@ -16,11 +22,11 @@ declare const authorize: (input: {
16
22
  operationIds: string[];
17
23
  planDigest: string;
18
24
  version: "domainkit.plan-authorization.v1";
19
- }, AuthorizationError | Error$1 | AuthorizeError, Crypto.Crypto>;
20
- type Error = AuthorizationError | Error$1 | CryptoError;
21
- type Requirements = Crypto.Crypto;
25
+ }, AuthorizationError | Error$2 | Error$1 | AuthorizeError, Crypto.Crypto | Service$1>;
26
+ type Error = AuthorizationError | Error$2 | CryptoError | Error$1;
27
+ type Requirements = Crypto.Crypto | Service$1;
22
28
  declare namespace transport_d_exports {
23
- export { ApplyResult, AsyncInterface, AsyncOptions, AuthenticationMethod, AuthenticationParameter, CleanupApplyInput, CleanupOperation, CleanupPlan, CleanupPlanInput, CleanupResult, ConnectInput, Connected, ConnectionResult, ConnectionSnapshot, Disconnected, DnsRecord, Failure, InspectInput, Interface, Method, Observation, ObservationEvidence, ObserveInput, OperationResult, PlanOperation, Provider, ProvisioningApplyInput, ProvisioningPlan, ProvisioningPlanInput, Redirect, RemoveDomainInput, RemoveDomainResult, ReusableConnection, ReuseInput, Service, Unsupported, fromAsync, fromDnsRecord, layerFromAsync, toAsync };
29
+ export { ApplyResult, AsyncInterface, AsyncOptions, AttachInput, AuthenticationMethod, AuthenticationParameter, CleanupApplyInput, CleanupOperation, CleanupPlan, CleanupPlanInput, CleanupResult, ConnectInput, Connected, ConnectionResult, ConnectionSnapshot, DetachInput, DetachResult, Disconnected, DnsRecord, DomainAttachment, Failure, InspectInput, Interface, Method, Observation, ObservationEvidence, ObserveInput, OperationResult, PlanOperation, Provider, ProviderConnection, ProviderTarget, ProviderTargetEvidence, ProvisioningApplyInput, ProvisioningPlan, ProvisioningPlanInput, Redirect, ReusableConnection, Service, Unsupported, fromAsync, fromDnsRecord, layerFromAsync, toAsync };
24
30
  }
25
31
  declare const Failure_base: Schema.Class<Failure, Schema.TaggedStruct<"Failure", {
26
32
  readonly message: Schema.String;
@@ -38,6 +44,9 @@ declare const AuthenticationParameter: Schema.Struct<{
38
44
  }>;
39
45
  type AuthenticationParameter = typeof AuthenticationParameter.Type;
40
46
  declare const AuthenticationMethod: Schema.TaggedUnion<{
47
+ readonly Integration: Schema.TaggedStruct<"Integration", {
48
+ readonly label: Schema.String;
49
+ }>;
41
50
  readonly OAuth: Schema.TaggedStruct<"OAuth", {
42
51
  readonly label: Schema.String;
43
52
  }>;
@@ -56,6 +65,7 @@ declare const AuthenticationMethod: Schema.TaggedUnion<{
56
65
  type AuthenticationMethod = typeof AuthenticationMethod.Type;
57
66
  /** The authentication choice supplied to a connection request. */
58
67
  type Method = Data.TaggedEnum<{
68
+ Integration: {};
59
69
  OAuth: {};
60
70
  Token: {
61
71
  readonly parameters?: Readonly<Record<string, string>>;
@@ -63,7 +73,11 @@ type Method = Data.TaggedEnum<{
63
73
  };
64
74
  }>;
65
75
  declare const Method: {
66
- readonly $is: <Tag extends "OAuth" | "Token">(tag: Tag) => (u: unknown) => u is Extract<{
76
+ readonly $is: <Tag extends "Integration" | "OAuth" | "Token">(tag: Tag) => (u: unknown) => u is Extract<{
77
+ readonly _tag: "Integration";
78
+ }, {
79
+ readonly _tag: Tag;
80
+ }> | Extract<{
67
81
  readonly _tag: "OAuth";
68
82
  }, {
69
83
  readonly _tag: Tag;
@@ -75,7 +89,9 @@ declare const Method: {
75
89
  readonly _tag: Tag;
76
90
  }>;
77
91
  readonly $match: {
78
- <Cases extends { readonly [Tag in "OAuth" | "Token"]: (args: Extract<{
92
+ <Cases extends { readonly [Tag in "Integration" | "OAuth" | "Token"]: (args: Extract<{
93
+ readonly _tag: "Integration";
94
+ } | {
79
95
  readonly _tag: "OAuth";
80
96
  } | {
81
97
  readonly _tag: "Token";
@@ -84,13 +100,17 @@ declare const Method: {
84
100
  }, {
85
101
  readonly _tag: Tag;
86
102
  }>) => any; }>(cases: Cases): (value: {
103
+ readonly _tag: "Integration";
104
+ } | {
87
105
  readonly _tag: "OAuth";
88
106
  } | {
89
107
  readonly _tag: "Token";
90
108
  readonly parameters?: Readonly<Record<string, string>>;
91
109
  readonly token: string;
92
- }) => import("effect/Unify").Unify<ReturnType<Cases["OAuth" | "Token"]>>;
93
- <Cases extends { readonly [Tag in "OAuth" | "Token"]: (args: Extract<{
110
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Integration" | "OAuth" | "Token"]>>;
111
+ <Cases extends { readonly [Tag in "Integration" | "OAuth" | "Token"]: (args: Extract<{
112
+ readonly _tag: "Integration";
113
+ } | {
94
114
  readonly _tag: "OAuth";
95
115
  } | {
96
116
  readonly _tag: "Token";
@@ -99,13 +119,18 @@ declare const Method: {
99
119
  }, {
100
120
  readonly _tag: Tag;
101
121
  }>) => any; }>(value: {
122
+ readonly _tag: "Integration";
123
+ } | {
102
124
  readonly _tag: "OAuth";
103
125
  } | {
104
126
  readonly _tag: "Token";
105
127
  readonly parameters?: Readonly<Record<string, string>>;
106
128
  readonly token: string;
107
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["OAuth" | "Token"]>>;
129
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Integration" | "OAuth" | "Token"]>>;
108
130
  };
131
+ readonly Integration: Data.TaggedEnum.ConstructorFrom<{
132
+ readonly _tag: "Integration";
133
+ }, "_tag">;
109
134
  readonly OAuth: Data.TaggedEnum.ConstructorFrom<{
110
135
  readonly _tag: "OAuth";
111
136
  }, "_tag">;
@@ -117,6 +142,9 @@ declare const Method: {
117
142
  };
118
143
  declare const Provider: Schema.Struct<{
119
144
  readonly authentication: Schema.$Array<Schema.TaggedUnion<{
145
+ readonly Integration: Schema.TaggedStruct<"Integration", {
146
+ readonly label: Schema.String;
147
+ }>;
120
148
  readonly OAuth: Schema.TaggedStruct<"OAuth", {
121
149
  readonly label: Schema.String;
122
150
  }>;
@@ -137,10 +165,37 @@ declare const Provider: Schema.Struct<{
137
165
  }>;
138
166
  type Provider = typeof Provider.Type;
139
167
  declare const Connected: Schema.TaggedStruct<"Connected", {
140
- readonly connectionId: Schema.String;
141
- readonly domain: Schema.String;
168
+ readonly attachment: Schema.Struct<{
169
+ readonly connectionId: Schema.String;
170
+ readonly createdAt: Schema.DateFromString;
171
+ readonly domain: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
172
+ readonly id: Schema.String;
173
+ readonly target: Schema.Struct<{
174
+ readonly accountId: Schema.String;
175
+ readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
176
+ readonly evidence: Schema.optionalKey<Schema.Struct<{
177
+ readonly accountName: Schema.optionalKey<Schema.String>;
178
+ readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
179
+ readonly status: Schema.String;
180
+ readonly zoneType: Schema.String;
181
+ }>>;
182
+ readonly zoneId: Schema.String;
183
+ readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
184
+ }>;
185
+ }>;
186
+ readonly connection: Schema.Struct<{
187
+ readonly createdAt: Schema.DateFromString;
188
+ readonly id: Schema.String;
189
+ readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
190
+ readonly ownerId: Schema.String;
191
+ readonly providerId: Schema.String;
192
+ readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
193
+ }>;
142
194
  readonly provider: Schema.Struct<{
143
195
  readonly authentication: Schema.$Array<Schema.TaggedUnion<{
196
+ readonly Integration: Schema.TaggedStruct<"Integration", {
197
+ readonly label: Schema.String;
198
+ }>;
144
199
  readonly OAuth: Schema.TaggedStruct<"OAuth", {
145
200
  readonly label: Schema.String;
146
201
  }>;
@@ -162,14 +217,35 @@ declare const Connected: Schema.TaggedStruct<"Connected", {
162
217
  }>;
163
218
  type Connected = typeof Connected.Type;
164
219
  declare const ReusableConnection: Schema.Struct<{
165
- readonly connectionId: Schema.String;
166
- readonly label: Schema.String;
220
+ readonly connection: Schema.Struct<{
221
+ readonly createdAt: Schema.DateFromString;
222
+ readonly id: Schema.String;
223
+ readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
224
+ readonly ownerId: Schema.String;
225
+ readonly providerId: Schema.String;
226
+ readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
227
+ }>;
228
+ readonly targets: Schema.$Array<Schema.Struct<{
229
+ readonly accountId: Schema.String;
230
+ readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
231
+ readonly evidence: Schema.optionalKey<Schema.Struct<{
232
+ readonly accountName: Schema.optionalKey<Schema.String>;
233
+ readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
234
+ readonly status: Schema.String;
235
+ readonly zoneType: Schema.String;
236
+ }>>;
237
+ readonly zoneId: Schema.String;
238
+ readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
239
+ }>>;
167
240
  }>;
168
241
  type ReusableConnection = typeof ReusableConnection.Type;
169
242
  declare const Disconnected: Schema.TaggedStruct<"Disconnected", {
170
243
  readonly domain: Schema.String;
171
244
  readonly provider: Schema.Struct<{
172
245
  readonly authentication: Schema.$Array<Schema.TaggedUnion<{
246
+ readonly Integration: Schema.TaggedStruct<"Integration", {
247
+ readonly label: Schema.String;
248
+ }>;
173
249
  readonly OAuth: Schema.TaggedStruct<"OAuth", {
174
250
  readonly label: Schema.String;
175
251
  }>;
@@ -188,9 +264,27 @@ declare const Disconnected: Schema.TaggedStruct<"Disconnected", {
188
264
  readonly id: Schema.String;
189
265
  readonly name: Schema.String;
190
266
  }>;
191
- readonly reusableConnection: Schema.optionalKey<Schema.Struct<{
192
- readonly connectionId: Schema.String;
193
- readonly label: Schema.String;
267
+ readonly reusableConnections: Schema.$Array<Schema.Struct<{
268
+ readonly connection: Schema.Struct<{
269
+ readonly createdAt: Schema.DateFromString;
270
+ readonly id: Schema.String;
271
+ readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
272
+ readonly ownerId: Schema.String;
273
+ readonly providerId: Schema.String;
274
+ readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
275
+ }>;
276
+ readonly targets: Schema.$Array<Schema.Struct<{
277
+ readonly accountId: Schema.String;
278
+ readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
279
+ readonly evidence: Schema.optionalKey<Schema.Struct<{
280
+ readonly accountName: Schema.optionalKey<Schema.String>;
281
+ readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
282
+ readonly status: Schema.String;
283
+ readonly zoneType: Schema.String;
284
+ }>>;
285
+ readonly zoneId: Schema.String;
286
+ readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
287
+ }>>;
194
288
  }>>;
195
289
  }>;
196
290
  type Disconnected = typeof Disconnected.Type;
@@ -199,10 +293,37 @@ declare const Unsupported: Schema.TaggedStruct<"Unsupported", {
199
293
  }>;
200
294
  type Unsupported = typeof Unsupported.Type;
201
295
  declare const ConnectionSnapshot: Schema.toTaggedUnion<"_tag", readonly [Schema.TaggedStruct<"Connected", {
202
- readonly connectionId: Schema.String;
203
- readonly domain: Schema.String;
296
+ readonly attachment: Schema.Struct<{
297
+ readonly connectionId: Schema.String;
298
+ readonly createdAt: Schema.DateFromString;
299
+ readonly domain: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
300
+ readonly id: Schema.String;
301
+ readonly target: Schema.Struct<{
302
+ readonly accountId: Schema.String;
303
+ readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
304
+ readonly evidence: Schema.optionalKey<Schema.Struct<{
305
+ readonly accountName: Schema.optionalKey<Schema.String>;
306
+ readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
307
+ readonly status: Schema.String;
308
+ readonly zoneType: Schema.String;
309
+ }>>;
310
+ readonly zoneId: Schema.String;
311
+ readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
312
+ }>;
313
+ }>;
314
+ readonly connection: Schema.Struct<{
315
+ readonly createdAt: Schema.DateFromString;
316
+ readonly id: Schema.String;
317
+ readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
318
+ readonly ownerId: Schema.String;
319
+ readonly providerId: Schema.String;
320
+ readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
321
+ }>;
204
322
  readonly provider: Schema.Struct<{
205
323
  readonly authentication: Schema.$Array<Schema.TaggedUnion<{
324
+ readonly Integration: Schema.TaggedStruct<"Integration", {
325
+ readonly label: Schema.String;
326
+ }>;
206
327
  readonly OAuth: Schema.TaggedStruct<"OAuth", {
207
328
  readonly label: Schema.String;
208
329
  }>;
@@ -225,6 +346,9 @@ declare const ConnectionSnapshot: Schema.toTaggedUnion<"_tag", readonly [Schema.
225
346
  readonly domain: Schema.String;
226
347
  readonly provider: Schema.Struct<{
227
348
  readonly authentication: Schema.$Array<Schema.TaggedUnion<{
349
+ readonly Integration: Schema.TaggedStruct<"Integration", {
350
+ readonly label: Schema.String;
351
+ }>;
228
352
  readonly OAuth: Schema.TaggedStruct<"OAuth", {
229
353
  readonly label: Schema.String;
230
354
  }>;
@@ -243,9 +367,27 @@ declare const ConnectionSnapshot: Schema.toTaggedUnion<"_tag", readonly [Schema.
243
367
  readonly id: Schema.String;
244
368
  readonly name: Schema.String;
245
369
  }>;
246
- readonly reusableConnection: Schema.optionalKey<Schema.Struct<{
247
- readonly connectionId: Schema.String;
248
- readonly label: Schema.String;
370
+ readonly reusableConnections: Schema.$Array<Schema.Struct<{
371
+ readonly connection: Schema.Struct<{
372
+ readonly createdAt: Schema.DateFromString;
373
+ readonly id: Schema.String;
374
+ readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
375
+ readonly ownerId: Schema.String;
376
+ readonly providerId: Schema.String;
377
+ readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
378
+ }>;
379
+ readonly targets: Schema.$Array<Schema.Struct<{
380
+ readonly accountId: Schema.String;
381
+ readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
382
+ readonly evidence: Schema.optionalKey<Schema.Struct<{
383
+ readonly accountName: Schema.optionalKey<Schema.String>;
384
+ readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
385
+ readonly status: Schema.String;
386
+ readonly zoneType: Schema.String;
387
+ }>>;
388
+ readonly zoneId: Schema.String;
389
+ readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
390
+ }>>;
249
391
  }>>;
250
392
  }>, Schema.TaggedStruct<"Unsupported", {
251
393
  readonly domain: Schema.String;
@@ -256,10 +398,37 @@ declare const Redirect: Schema.TaggedStruct<"Redirect", {
256
398
  }>;
257
399
  type Redirect = typeof Redirect.Type;
258
400
  declare const ConnectionResult: Schema.toTaggedUnion<"_tag", readonly [Schema.TaggedStruct<"Connected", {
259
- readonly connectionId: Schema.String;
260
- readonly domain: Schema.String;
401
+ readonly attachment: Schema.Struct<{
402
+ readonly connectionId: Schema.String;
403
+ readonly createdAt: Schema.DateFromString;
404
+ readonly domain: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
405
+ readonly id: Schema.String;
406
+ readonly target: Schema.Struct<{
407
+ readonly accountId: Schema.String;
408
+ readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
409
+ readonly evidence: Schema.optionalKey<Schema.Struct<{
410
+ readonly accountName: Schema.optionalKey<Schema.String>;
411
+ readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
412
+ readonly status: Schema.String;
413
+ readonly zoneType: Schema.String;
414
+ }>>;
415
+ readonly zoneId: Schema.String;
416
+ readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
417
+ }>;
418
+ }>;
419
+ readonly connection: Schema.Struct<{
420
+ readonly createdAt: Schema.DateFromString;
421
+ readonly id: Schema.String;
422
+ readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
423
+ readonly ownerId: Schema.String;
424
+ readonly providerId: Schema.String;
425
+ readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
426
+ }>;
261
427
  readonly provider: Schema.Struct<{
262
428
  readonly authentication: Schema.$Array<Schema.TaggedUnion<{
429
+ readonly Integration: Schema.TaggedStruct<"Integration", {
430
+ readonly label: Schema.String;
431
+ }>;
263
432
  readonly OAuth: Schema.TaggedStruct<"OAuth", {
264
433
  readonly label: Schema.String;
265
434
  }>;
@@ -282,12 +451,36 @@ declare const ConnectionResult: Schema.toTaggedUnion<"_tag", readonly [Schema.Ta
282
451
  readonly authorizationUrl: Schema.String;
283
452
  }>]>;
284
453
  type ConnectionResult = typeof ConnectionResult.Type;
285
- declare const RemoveDomainResult: Schema.TaggedStruct<"Removed", {
286
- readonly connectionId: Schema.String;
287
- readonly domain: Schema.String;
288
- readonly remainingDomainCount: Schema.Int;
454
+ declare const DetachResult: Schema.TaggedStruct<"Detached", {
455
+ readonly attachment: Schema.Struct<{
456
+ readonly connectionId: Schema.String;
457
+ readonly createdAt: Schema.DateFromString;
458
+ readonly domain: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
459
+ readonly id: Schema.String;
460
+ readonly target: Schema.Struct<{
461
+ readonly accountId: Schema.String;
462
+ readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
463
+ readonly evidence: Schema.optionalKey<Schema.Struct<{
464
+ readonly accountName: Schema.optionalKey<Schema.String>;
465
+ readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
466
+ readonly status: Schema.String;
467
+ readonly zoneType: Schema.String;
468
+ }>>;
469
+ readonly zoneId: Schema.String;
470
+ readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
471
+ }>;
472
+ }>;
473
+ readonly connection: Schema.Struct<{
474
+ readonly createdAt: Schema.DateFromString;
475
+ readonly id: Schema.String;
476
+ readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
477
+ readonly ownerId: Schema.String;
478
+ readonly providerId: Schema.String;
479
+ readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
480
+ }>;
481
+ readonly remainingAttachments: Schema.Int;
289
482
  }>;
290
- type RemoveDomainResult = typeof RemoveDomainResult.Type;
483
+ type DetachResult = typeof DetachResult.Type;
291
484
  /** A presentation projection of a DNS requirement. */
292
485
  declare const DnsRecord: Schema.Struct<{
293
486
  readonly id: Schema.String;
@@ -590,21 +783,27 @@ interface ConnectInput {
590
783
  interface InspectInput {
591
784
  readonly domain: string;
592
785
  }
593
- interface ReuseInput {
786
+ interface AttachInput {
594
787
  readonly connectionId: string;
595
788
  readonly domain: string;
789
+ readonly target: ProviderTarget;
596
790
  }
597
- interface RemoveDomainInput extends ReuseInput {
791
+ interface DetachInput {
792
+ readonly attachmentId: string;
598
793
  readonly preserveDns: true;
599
794
  }
600
- interface ProvisioningPlanInput extends ReuseInput {
795
+ interface ProvisioningPlanInput {
796
+ readonly attachmentId: string;
797
+ readonly domain: string;
601
798
  readonly records: ReadonlyArray<DnsRecord>;
602
799
  }
603
- interface ProvisioningApplyInput extends ReuseInput {
800
+ interface ProvisioningApplyInput {
801
+ readonly attachmentId: string;
802
+ readonly domain: string;
604
803
  readonly planDigest: string;
605
804
  }
606
805
  interface ObserveInput {
607
- readonly connectionId?: string;
806
+ readonly attachmentId?: string;
608
807
  readonly domain: string;
609
808
  readonly records: ReadonlyArray<DnsRecord>;
610
809
  readonly sources: {
@@ -612,7 +811,9 @@ interface ObserveInput {
612
811
  readonly publicDns: boolean;
613
812
  };
614
813
  }
615
- interface CleanupPlanInput extends ReuseInput {
814
+ interface CleanupPlanInput {
815
+ readonly attachmentId: string;
816
+ readonly domain: string;
616
817
  readonly receiptId: string;
617
818
  }
618
819
  interface CleanupApplyInput extends CleanupPlanInput {
@@ -625,10 +826,10 @@ interface Interface {
625
826
  readonly plan: (input: CleanupPlanInput) => Effect.Effect<CleanupPlan, Failure>;
626
827
  };
627
828
  readonly connection: {
829
+ readonly attach: (input: AttachInput) => Effect.Effect<Connected, Failure>;
628
830
  readonly connect: (input: ConnectInput) => Effect.Effect<ConnectionResult, Failure>;
629
831
  readonly inspect: (input: InspectInput) => Effect.Effect<ConnectionSnapshot, Failure>;
630
- readonly removeDomain: (input: RemoveDomainInput) => Effect.Effect<RemoveDomainResult, Failure>;
631
- readonly reuse: (input: ReuseInput) => Effect.Effect<Connected, Failure>;
832
+ readonly detach: (input: DetachInput) => Effect.Effect<DetachResult, Failure>;
632
833
  };
633
834
  readonly provisioning: {
634
835
  readonly apply: (input: ProvisioningApplyInput) => Effect.Effect<ApplyResult, Failure>;
@@ -647,10 +848,10 @@ interface AsyncInterface {
647
848
  readonly plan: (input: CleanupPlanInput) => Promise<CleanupPlan>;
648
849
  };
649
850
  readonly connection: {
851
+ readonly attach: (input: AttachInput) => Promise<Connected>;
650
852
  readonly connect: (input: ConnectInput) => Promise<ConnectionResult>;
651
853
  readonly inspect: (input: InspectInput) => Promise<ConnectionSnapshot>;
652
- readonly removeDomain: (input: RemoveDomainInput) => Promise<RemoveDomainResult>;
653
- readonly reuse: (input: ReuseInput) => Promise<Connected>;
854
+ readonly detach: (input: DetachInput) => Promise<DetachResult>;
654
855
  };
655
856
  readonly provisioning: {
656
857
  readonly apply: (input: ProvisioningApplyInput) => Promise<ApplyResult>;
@@ -677,5 +878,5 @@ declare function parse(type: Type, input: unknown): string;
677
878
  /** The current package version from the package manifest. */
678
879
  declare const VERSION: string;
679
880
  //#endregion
680
- export { lifecycle_repository_d_exports as AuthorizationLifecycle, index_d_exports as Cloudflare, cloudflare_doh_d_exports as CloudflareDnsOverHttps, connection_api_d_exports as Connection, connection_authorization_d_exports as ConnectionAuthorization, deletion_d_exports as Deletion, diagnostic_d_exports as Diagnostic, canonical_json_d_exports as Digest, dns_data_d_exports as DnsData, doh_d_exports as DnsOverHttps, types_d_exports as DnsPlan, provider_d_exports as DnsProvider, dns_record_d_exports as DnsRecord, resolver_d_exports as DnsResolver, resolver_pool_d_exports as DnsResolverPool, domain_name_d_exports as DomainName, google_doh_d_exports as GoogleDnsOverHttps, invalid_input_d_exports as InvalidInput, manifest_d_exports as ProviderAuth, authorization_d_exports as ProviderAuthorization, provider_context_d_exports as ProviderContext, selection_d_exports as ProviderDiscovery, plan_d_exports as Provisioning, secret_d_exports as Secret, transport_d_exports as Transport, VERSION, index_d_exports$1 as Vercel, verify_d_exports as Verification, zone_discovery_d_exports as ZoneDiscovery, zones_d_exports as Zones };
881
+ export { index_d_exports as Cloudflare, cloudflare_doh_d_exports as CloudflareDnsOverHttps, connection_api_d_exports as Connection, connection_authorization_d_exports as ConnectionAuthorization, deletion_d_exports as Deletion, diagnostic_d_exports as Diagnostic, canonical_json_d_exports as Digest, dns_data_d_exports as DnsData, doh_d_exports as DnsOverHttps, types_d_exports as DnsPlan, provider_d_exports as DnsProvider, dns_record_d_exports as DnsRecord, resolver_d_exports as DnsResolver, resolver_pool_d_exports as DnsResolverPool, domain_name_d_exports as DomainName, google_doh_d_exports as GoogleDnsOverHttps, invalid_input_d_exports as InvalidInput, lifecycle_api_d_exports as ManagedDnsConnections, manifest_d_exports as ProviderAuth, provider_context_d_exports as ProviderContext, selection_d_exports as ProviderDiscovery, session_d_exports as ProviderSession, plan_d_exports as Provisioning, secret_d_exports as Secret, transport_d_exports as Transport, VERSION, index_d_exports$1 as Vercel, verify_d_exports as Verification, zone_discovery_d_exports as ZoneDiscovery, zones_d_exports as Zones };
681
882
  //# sourceMappingURL=index.d.mts.map