domainkit 0.5.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/README.md +3 -1
- package/dist/canonical-json-9x7gHIoS.mjs +304 -0
- package/dist/canonical-json-9x7gHIoS.mjs.map +1 -0
- package/dist/connect-Db830jad.d.mts +1387 -0
- package/dist/connect-ks3cpqBD.mjs +185 -0
- package/dist/connect-ks3cpqBD.mjs.map +1 -0
- package/dist/connection-DuYDgWir.d.mts +186 -0
- package/dist/connection-api-B__0M3PA.d.mts +26 -0
- package/dist/index.d.mts +7 -26
- package/dist/index.mjs +11 -5
- package/dist/index.mjs.map +1 -1
- package/dist/managed-dns-connections-CaXts84E.mjs +99 -0
- package/dist/managed-dns-connections-CaXts84E.mjs.map +1 -0
- package/dist/promise.d.mts +39 -217
- package/dist/promise.mjs +39 -125
- package/dist/promise.mjs.map +1 -1
- package/dist/{resolver-BGBLnPjJ.d.mts → resolver-DUAIlm2I.d.mts} +24 -1127
- package/dist/{resolver-tZU6gEVq.mjs → resolver-DxJPsq6l.mjs} +11 -227
- package/dist/resolver-DxJPsq6l.mjs.map +1 -0
- package/dist/server.d.mts +128 -0
- package/dist/server.mjs +319 -0
- package/dist/server.mjs.map +1 -0
- package/dist/testing.d.mts +5 -4
- package/dist/testing.mjs +10 -13
- package/dist/testing.mjs.map +1 -1
- package/dist/{verify-B2fPyjde.mjs → verify-DAtUAEeg.mjs} +124 -309
- package/dist/verify-DAtUAEeg.mjs.map +1 -0
- package/dist/{verify-6xK05pwL.d.mts → verify-yAy-r9no.d.mts} +34 -19
- package/package.json +5 -1
- package/dist/resolver-tZU6gEVq.mjs.map +0 -1
- package/dist/verify-B2fPyjde.mjs.map +0 -1
|
@@ -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-Db830jad.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$
|
|
1121
|
-
readonly provider: Interface$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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 {}
|
|
@@ -2456,7 +1353,7 @@ declare const decode: (input: unknown) => Effect.Effect<{
|
|
|
2456
1353
|
readonly providerId: string;
|
|
2457
1354
|
readonly version: "domainkit.dns-plan.v1";
|
|
2458
1355
|
readonly zone: string & import("effect/Brand").Brand<"DomainName">;
|
|
2459
|
-
}, Error$
|
|
1356
|
+
}, Error$3, never>;
|
|
2460
1357
|
declare const encode: (input: {
|
|
2461
1358
|
readonly digest: string;
|
|
2462
1359
|
readonly operations: readonly ({
|
|
@@ -3273,7 +2170,7 @@ declare const decodeReceipt: (input: unknown) => Effect.Effect<{
|
|
|
3273
2170
|
readonly status: "complete" | "partial";
|
|
3274
2171
|
readonly version: "domainkit.apply-receipt.v1";
|
|
3275
2172
|
readonly zone: string & import("effect/Brand").Brand<"DomainName">;
|
|
3276
|
-
}, Error$
|
|
2173
|
+
}, Error$3, never>;
|
|
3277
2174
|
declare const encodeReceipt: (input: {
|
|
3278
2175
|
readonly appliedAt: Date;
|
|
3279
2176
|
readonly operations: readonly {
|
|
@@ -3505,11 +2402,11 @@ interface ApplyInput {
|
|
|
3505
2402
|
readonly authorization: PlanAuthorization;
|
|
3506
2403
|
readonly plan: DnsPlan;
|
|
3507
2404
|
}
|
|
3508
|
-
type CreateError$1 = Error$
|
|
2405
|
+
type CreateError$1 = Error$3 | Error$2 | CryptoError;
|
|
3509
2406
|
type AuthorizeError = AuthorizationError | CryptoError;
|
|
3510
|
-
type ApplyError$1 = Error$
|
|
2407
|
+
type ApplyError$1 = Error$3 | Error$2 | CryptoError | AuthorizationError | ConflictError | StaleError | PartialApplyError;
|
|
3511
2408
|
/** 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$
|
|
2409
|
+
declare function create$1(input: ExactCreateInput): Effect.Effect<ResolvedCreateResult, CreateError$1, Crypto.Crypto | Service$2>;
|
|
3513
2410
|
declare function create$1(input: DiscoverCreateInput): Effect.Effect<CreateResult, CreateError$1, Crypto.Crypto | Service$1>;
|
|
3514
2411
|
/** Authorizes all or a selected subset of create operations in a digest-bound plan. */
|
|
3515
2412
|
declare const authorize$1: (plan: DnsPlan, operationIds?: readonly string[] | undefined, options?: {
|
|
@@ -3521,7 +2418,7 @@ declare const authorize$1: (plan: DnsPlan, operationIds?: readonly string[] | un
|
|
|
3521
2418
|
version: "domainkit.plan-authorization.v1";
|
|
3522
2419
|
}, AuthorizeError, Crypto.Crypto>;
|
|
3523
2420
|
/** Applies approved creates sequentially after full and per-operation revalidation. */
|
|
3524
|
-
declare const apply$1: (input: ApplyInput) => Effect.Effect<ApplyReceipt, AuthorizationError | ConflictError | CryptoError | Error$
|
|
2421
|
+
declare const apply$1: (input: ApplyInput) => Effect.Effect<ApplyReceipt, AuthorizationError | ConflictError | CryptoError | Error$3 | Error$2 | PartialApplyError | StaleError, Crypto.Crypto | Service$2>;
|
|
3525
2422
|
declare function renderManualInstructions(plan: DnsPlan): ReadonlyArray<string>;
|
|
3526
2423
|
declare function validate$1(plan: DnsPlan): Effect.Effect<void, AuthorizeError, Crypto.Crypto>;
|
|
3527
2424
|
declare namespace deletion_d_exports {
|
|
@@ -3892,7 +2789,7 @@ declare const create: (input: CreateInput) => Effect.Effect<{
|
|
|
3892
2789
|
version: "domainkit.deletion-plan.v1";
|
|
3893
2790
|
zone: string & import("effect/Brand").Brand<"DomainName">;
|
|
3894
2791
|
digest: string;
|
|
3895
|
-
}, Error$
|
|
2792
|
+
}, Error$2 | Error$1 | AuthorizeError, Crypto.Crypto | Service$2>;
|
|
3896
2793
|
/** Produce a separate digest-bound consent artifact for destructive operations. */
|
|
3897
2794
|
declare const authorize: (plan: Plan, operationIds?: readonly string[] | undefined) => Effect.Effect<{
|
|
3898
2795
|
operationIds: string[];
|
|
@@ -3904,11 +2801,11 @@ declare const apply: (input: {
|
|
|
3904
2801
|
readonly authorization: Authorization;
|
|
3905
2802
|
readonly plan: Plan;
|
|
3906
2803
|
readonly priorReceipt?: Receipt;
|
|
3907
|
-
}) => Effect.Effect<Receipt, CryptoError | Error$
|
|
2804
|
+
}) => Effect.Effect<Receipt, CryptoError | Error$2 | Error$1 | PartialError, Crypto.Crypto | Service$2>;
|
|
3908
2805
|
declare function validate(plan: Plan): Effect.Effect<void, Error$1 | CryptoError, Crypto.Crypto>;
|
|
3909
|
-
type CreateError = Error$1 | Error$
|
|
3910
|
-
type ApplyError = Error$1 | PartialError | Error$
|
|
3911
|
-
type Requirements = Service$
|
|
2806
|
+
type CreateError = Error$1 | Error$3 | AuthorizationError | Error$2 | CryptoError;
|
|
2807
|
+
type ApplyError = Error$1 | PartialError | Error$2 | CryptoError;
|
|
2808
|
+
type Requirements = Service$2 | Crypto.Crypto;
|
|
3912
2809
|
declare namespace resolver_d_exports {
|
|
3913
2810
|
export { Answer, AsyncInterface, AsyncResolution, Error, Interface, Query, Resolution, Service, layerFromAsync, toAsync };
|
|
3914
2811
|
}
|
|
@@ -3959,5 +2856,5 @@ interface AsyncInterface {
|
|
|
3959
2856
|
declare const layerFromAsync: (resolver: AsyncInterface) => Layer.Layer<Service>;
|
|
3960
2857
|
declare const toAsync: (resolver: Interface) => AsyncInterface;
|
|
3961
2858
|
//#endregion
|
|
3962
|
-
export {
|
|
3963
|
-
//# sourceMappingURL=resolver-
|
|
2859
|
+
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 };
|
|
2860
|
+
//# sourceMappingURL=resolver-DUAIlm2I.d.mts.map
|