domainkit 0.7.0 → 0.9.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.
Files changed (165) hide show
  1. package/README.md +214 -39
  2. package/dist/Approval.mjs +34 -0
  3. package/dist/Approval.mjs.map +1 -0
  4. package/dist/Cleanup.mjs +97 -0
  5. package/dist/Cleanup.mjs.map +1 -0
  6. package/dist/Cloudflare.mjs +225 -0
  7. package/dist/Cloudflare.mjs.map +1 -0
  8. package/dist/Connect.mjs +463 -0
  9. package/dist/Connect.mjs.map +1 -0
  10. package/dist/Custody.mjs +64 -0
  11. package/dist/Custody.mjs.map +1 -0
  12. package/dist/DnsRecord.mjs +213 -0
  13. package/dist/DnsRecord.mjs.map +1 -0
  14. package/dist/DomainKit.mjs +34 -0
  15. package/dist/DomainKit.mjs.map +1 -0
  16. package/dist/DomainName.mjs +100 -0
  17. package/dist/DomainName.mjs.map +1 -0
  18. package/dist/Plan.mjs +102 -0
  19. package/dist/Plan.mjs.map +1 -0
  20. package/dist/Principal.mjs +23 -0
  21. package/dist/Principal.mjs.map +1 -0
  22. package/dist/Provider.mjs +130 -0
  23. package/dist/Provider.mjs.map +1 -0
  24. package/dist/Providers.mjs +40 -0
  25. package/dist/Providers.mjs.map +1 -0
  26. package/dist/Provision.mjs +93 -0
  27. package/dist/Provision.mjs.map +1 -0
  28. package/dist/Reason.mjs +162 -0
  29. package/dist/Reason.mjs.map +1 -0
  30. package/dist/Receipt.mjs +71 -0
  31. package/dist/Receipt.mjs.map +1 -0
  32. package/dist/Resolver.mjs +75 -0
  33. package/dist/Resolver.mjs.map +1 -0
  34. package/dist/Server.mjs +516 -0
  35. package/dist/Server.mjs.map +1 -0
  36. package/dist/Storage.mjs +236 -0
  37. package/dist/Storage.mjs.map +1 -0
  38. package/dist/Testing.mjs +226 -0
  39. package/dist/Testing.mjs.map +1 -0
  40. package/dist/Transport.mjs +187 -0
  41. package/dist/Transport.mjs.map +1 -0
  42. package/dist/Vercel.mjs +116 -0
  43. package/dist/Vercel.mjs.map +1 -0
  44. package/dist/Verify.mjs +292 -0
  45. package/dist/Verify.mjs.map +1 -0
  46. package/dist/{rolldown-runtime-D7D4PA-g.mjs → _virtual/_rolldown/runtime.mjs} +1 -1
  47. package/dist/entry/client.mjs +2 -0
  48. package/dist/entry/server.mjs +2 -0
  49. package/dist/entry/testing.mjs +3 -0
  50. package/dist/index.mjs +33 -356
  51. package/dist/index.mjs.map +1 -1
  52. package/dist/internal/aes.mjs +61 -0
  53. package/dist/internal/aes.mjs.map +1 -0
  54. package/dist/internal/attempts.mjs +284 -0
  55. package/dist/internal/attempts.mjs.map +1 -0
  56. package/dist/internal/cloudflare/client.mjs +100 -0
  57. package/dist/internal/cloudflare/client.mjs.map +1 -0
  58. package/dist/internal/cloudflare/protocol.mjs +59 -0
  59. package/dist/internal/cloudflare/protocol.mjs.map +1 -0
  60. package/dist/internal/cloudflare/records.mjs +156 -0
  61. package/dist/internal/cloudflare/records.mjs.map +1 -0
  62. package/dist/internal/config.mjs +13 -0
  63. package/dist/internal/config.mjs.map +1 -0
  64. package/dist/internal/conformance/provider.mjs +207 -0
  65. package/dist/internal/conformance/provider.mjs.map +1 -0
  66. package/dist/internal/conformance/storage.mjs +428 -0
  67. package/dist/internal/conformance/storage.mjs.map +1 -0
  68. package/dist/internal/digest.mjs +25 -0
  69. package/dist/internal/digest.mjs.map +1 -0
  70. package/dist/internal/doh.mjs +152 -0
  71. package/dist/internal/doh.mjs.map +1 -0
  72. package/dist/internal/error.mjs +69 -0
  73. package/dist/internal/error.mjs.map +1 -0
  74. package/dist/internal/http.mjs +89 -0
  75. package/dist/internal/http.mjs.map +1 -0
  76. package/dist/internal/ids.mjs +8 -0
  77. package/dist/internal/ids.mjs.map +1 -0
  78. package/dist/internal/oauth.mjs +113 -0
  79. package/dist/internal/oauth.mjs.map +1 -0
  80. package/dist/internal/planner.mjs +88 -0
  81. package/dist/internal/planner.mjs.map +1 -0
  82. package/dist/internal/provider-async.mjs +83 -0
  83. package/dist/internal/provider-async.mjs.map +1 -0
  84. package/dist/internal/storage-memory.mjs +302 -0
  85. package/dist/internal/storage-memory.mjs.map +1 -0
  86. package/dist/internal/vercel/client.mjs +122 -0
  87. package/dist/internal/vercel/client.mjs.map +1 -0
  88. package/dist/internal/vercel/protocol.mjs +80 -0
  89. package/dist/internal/vercel/protocol.mjs.map +1 -0
  90. package/dist/internal/vercel/records.mjs +151 -0
  91. package/dist/internal/vercel/records.mjs.map +1 -0
  92. package/dist/package.mjs +6 -0
  93. package/dist/package.mjs.map +1 -0
  94. package/dist/types/Approval.d.ts +26 -0
  95. package/dist/types/Cleanup.d.ts +41 -0
  96. package/dist/types/Cloudflare.d.ts +36 -0
  97. package/dist/types/Connect.d.ts +506 -0
  98. package/dist/types/Custody.d.ts +38 -0
  99. package/dist/types/DnsRecord.d.ts +158 -0
  100. package/dist/types/DomainKit.d.ts +31 -0
  101. package/dist/types/DomainName.d.ts +27 -0
  102. package/dist/types/Plan.d.ts +76 -0
  103. package/dist/types/Principal.d.ts +18 -0
  104. package/dist/types/Provider.d.ts +248 -0
  105. package/dist/types/Providers.d.ts +16 -0
  106. package/dist/types/Provision.d.ts +75 -0
  107. package/dist/types/Reason.d.ts +118 -0
  108. package/dist/types/Receipt.d.ts +55 -0
  109. package/dist/types/Resolver.d.ts +135 -0
  110. package/dist/types/Server.d.ts +6523 -0
  111. package/dist/types/Storage.d.ts +314 -0
  112. package/dist/types/Testing.d.ts +84 -0
  113. package/dist/types/Transport.d.ts +124 -0
  114. package/dist/types/Vercel.d.ts +25 -0
  115. package/dist/types/Verify.d.ts +109 -0
  116. package/dist/types/entry/client.d.ts +2 -0
  117. package/dist/types/entry/server.d.ts +2 -0
  118. package/dist/types/entry/testing.d.ts +3 -0
  119. package/dist/types/index.d.ts +21 -0
  120. package/dist/types/internal/aes.d.ts +8 -0
  121. package/dist/types/internal/attempts.d.ts +40 -0
  122. package/dist/types/internal/cloudflare/client.d.ts +23 -0
  123. package/dist/types/internal/cloudflare/protocol.d.ts +71 -0
  124. package/dist/types/internal/cloudflare/records.d.ts +8 -0
  125. package/dist/types/internal/config.d.ts +4 -0
  126. package/dist/types/internal/conformance/provider.d.ts +12 -0
  127. package/dist/types/internal/conformance/storage.d.ts +14 -0
  128. package/dist/types/internal/digest.d.ts +10 -0
  129. package/dist/types/internal/doh.d.ts +19 -0
  130. package/dist/types/internal/error.d.ts +24 -0
  131. package/dist/types/internal/http.d.ts +27 -0
  132. package/dist/types/internal/ids.d.ts +3 -0
  133. package/dist/types/internal/oauth.d.ts +58 -0
  134. package/dist/types/internal/planner.d.ts +22 -0
  135. package/dist/types/internal/provider-async.d.ts +78 -0
  136. package/dist/types/internal/storage-memory.d.ts +2 -0
  137. package/dist/types/internal/vercel/client.d.ts +29 -0
  138. package/dist/types/internal/vercel/protocol.d.ts +124 -0
  139. package/dist/types/internal/vercel/records.d.ts +7 -0
  140. package/package.json +88 -12
  141. package/dist/canonical-json-CQYKsZw7.mjs +0 -310
  142. package/dist/canonical-json-CQYKsZw7.mjs.map +0 -1
  143. package/dist/connect-10vHuShV.d.mts +0 -1401
  144. package/dist/connect-oI8hcMxc.mjs +0 -185
  145. package/dist/connect-oI8hcMxc.mjs.map +0 -1
  146. package/dist/connection-C0xsU41C.d.mts +0 -186
  147. package/dist/connection-api-DW7xUJdj.d.mts +0 -26
  148. package/dist/index.d.mts +0 -882
  149. package/dist/managed-dns-connections-C3A_GBaz.mjs +0 -99
  150. package/dist/managed-dns-connections-C3A_GBaz.mjs.map +0 -1
  151. package/dist/promise.d.mts +0 -378
  152. package/dist/promise.mjs +0 -598
  153. package/dist/promise.mjs.map +0 -1
  154. package/dist/resolver-DPJs8h0a.mjs +0 -859
  155. package/dist/resolver-DPJs8h0a.mjs.map +0 -1
  156. package/dist/resolver-DRrLm_hB.d.mts +0 -3734
  157. package/dist/server.d.mts +0 -128
  158. package/dist/server.mjs +0 -319
  159. package/dist/server.mjs.map +0 -1
  160. package/dist/testing.d.mts +0 -62
  161. package/dist/testing.mjs +0 -507
  162. package/dist/testing.mjs.map +0 -1
  163. package/dist/verify-C3V_GtzL.d.mts +0 -1268
  164. package/dist/verify-DDnK8U7C.mjs +0 -2396
  165. package/dist/verify-DDnK8U7C.mjs.map +0 -1
@@ -1,1268 +0,0 @@
1
- import { H as Capability, J as Manifest, M as ProviderConnection, N as ProviderTarget, Nt as Error$1, Q as OAuthSubjectResolver, W as ProviderAuthorization, X as OAuthClientConfiguration, Z as OAuthMethod, ct as Service$1, d as Method, et as TokenValidation, g as Envelope, h as Codec, it as AsyncInterface$1, j as DomainAttachment, kt as DomainName, l as InteractiveFlow, mt as DnsRecord, nt as Value, ot as Error, q as IntegrationMethod, s as Error$2, st as Interface$4 } from "./connect-10vHuShV.mjs";
2
- import { H as Source, a as Interface$5, c as Service$2, i as Error$3, n as AsyncInterface$2, o as Query, t as Answer } from "./resolver-DRrLm_hB.mjs";
3
- import { Context, Data, Effect, Layer, Schema } from "effect";
4
- import * as oauth from "oauth4webapi";
5
- declare namespace diagnostic_d_exports {
6
- export { Category, Diagnostic, Fields, RetryAdvice, from };
7
- }
8
- declare const Category: Schema.Literals<readonly ["authorization", "configuration", "provider", "storage", "validation"]>;
9
- type Category = typeof Category.Type;
10
- declare const RetryAdvice: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
11
- type RetryAdvice = typeof RetryAdvice.Type;
12
- declare const Fields: {
13
- readonly category: Schema.Literals<readonly ["authorization", "configuration", "provider", "storage", "validation"]>;
14
- readonly message: Schema.String;
15
- readonly operation: Schema.String;
16
- readonly retry: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
17
- };
18
- interface Diagnostic {
19
- readonly category: Category;
20
- readonly message: string;
21
- readonly operation: string;
22
- readonly retry: RetryAdvice;
23
- readonly tag: string;
24
- }
25
- declare function from(error: {
26
- readonly _tag: string;
27
- readonly category: Category;
28
- readonly message: string;
29
- readonly operation: string;
30
- readonly retry: RetryAdvice;
31
- }): Diagnostic;
32
- declare namespace selection_d_exports {
33
- export { ConnectedZone, Evidence$1 as Evidence, Selection, select };
34
- }
35
- interface ConnectedZone {
36
- readonly authorization: ProviderAuthorization;
37
- readonly attachment: DomainAttachment;
38
- readonly connection: ProviderConnection;
39
- readonly nameservers: ReadonlyArray<string>;
40
- }
41
- declare const Evidence$1: Schema.Struct<{
42
- readonly accountId: Schema.String;
43
- readonly connectionId: Schema.String;
44
- readonly decisiveNameserverMatch: Schema.Boolean;
45
- readonly matchedNameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
46
- readonly providerId: Schema.String;
47
- readonly zone: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
48
- }>;
49
- interface Evidence$1 extends Schema.Schema.Type<typeof Evidence$1> {}
50
- declare const Selection: Schema.TaggedUnion<{
51
- readonly manual: Schema.TaggedStruct<"manual", {
52
- readonly evidence: Schema.$Array<Schema.Struct<{
53
- readonly accountId: Schema.String;
54
- readonly connectionId: Schema.String;
55
- readonly decisiveNameserverMatch: Schema.Boolean;
56
- readonly matchedNameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
57
- readonly providerId: Schema.String;
58
- readonly zone: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
59
- }>>;
60
- readonly reason: Schema.Literals<readonly ["ambiguous", "unsupported"]>;
61
- }>;
62
- readonly selected: Schema.TaggedStruct<"selected", {
63
- readonly candidate: Schema.Struct<{
64
- readonly accountId: Schema.String;
65
- readonly connectionId: Schema.String;
66
- readonly decisiveNameserverMatch: Schema.Boolean;
67
- readonly matchedNameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
68
- readonly providerId: Schema.String;
69
- readonly zone: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
70
- }>;
71
- readonly evidence: Schema.$Array<Schema.Struct<{
72
- readonly accountId: Schema.String;
73
- readonly connectionId: Schema.String;
74
- readonly decisiveNameserverMatch: Schema.Boolean;
75
- readonly matchedNameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
76
- readonly providerId: Schema.String;
77
- readonly zone: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
78
- }>>;
79
- readonly reason: Schema.Literals<readonly ["explicit", "unique-nameserver-match"]>;
80
- }>;
81
- }>;
82
- type Selection = typeof Selection.Type;
83
- declare function select(input: {
84
- readonly authoritativeNameservers: ReadonlyArray<string>;
85
- readonly connectedZones: ReadonlyArray<ConnectedZone>;
86
- readonly domain: string;
87
- readonly explicit?: {
88
- readonly accountId: string;
89
- readonly providerId: string;
90
- readonly zone: string;
91
- };
92
- readonly now?: Date;
93
- }): Selection;
94
- declare namespace zones_d_exports {
95
- export { candidates };
96
- }
97
- declare function candidates(input: string): ReadonlyArray<DomainName>;
98
- declare namespace session_d_exports {
99
- export { AsyncInterface, Authorization, Credential, Interface$3 as Interface, ListTargetsInput, Resolution, RestoreInput, fromAsync, toAsync$3 as toAsync };
100
- }
101
- /** A credential-scoped provider session that discovers safe targets before DNS access. */
102
- interface Interface$3 {
103
- /** The provider represented by this credential. */
104
- readonly providerId: string;
105
- /** Lists provider account and authoritative-zone targets visible to this credential. */
106
- readonly listTargets: (input?: ListTargetsInput) => Effect.Effect<ReadonlyArray<ProviderTarget>, Error>;
107
- /** Resolves a domain without guessing when more than one account owns a matching zone. */
108
- readonly resolveTarget: (domain: DomainName) => Effect.Effect<Resolution, Error>;
109
- /** Creates the focused DNS-record capability bound to one exact discovered target. */
110
- readonly forTarget: (target: ProviderTarget) => Effect.Effect<Interface$4, Error>;
111
- }
112
- interface ListTargetsInput {
113
- /** Restrict results to the authoritative zone candidates for this domain. */
114
- readonly domain?: DomainName;
115
- /** Provider-specific account filter, when supported by the adapter. */
116
- readonly accountId?: string;
117
- }
118
- type Resolution = Data.TaggedEnum<{
119
- NotFound: {
120
- readonly domain: DomainName;
121
- };
122
- Resolved: {
123
- readonly target: ProviderTarget;
124
- };
125
- SelectionRequired: {
126
- readonly candidates: ReadonlyArray<ProviderTarget>;
127
- };
128
- }>;
129
- declare const Resolution: {
130
- readonly $is: <Tag extends "NotFound" | "Resolved" | "SelectionRequired">(tag: Tag) => (u: unknown) => u is Extract<{
131
- readonly _tag: "NotFound";
132
- readonly domain: DomainName;
133
- }, {
134
- readonly _tag: Tag;
135
- }> | Extract<{
136
- readonly _tag: "Resolved";
137
- readonly target: ProviderTarget;
138
- }, {
139
- readonly _tag: Tag;
140
- }> | Extract<{
141
- readonly _tag: "SelectionRequired";
142
- readonly candidates: ReadonlyArray<ProviderTarget>;
143
- }, {
144
- readonly _tag: Tag;
145
- }>;
146
- readonly $match: {
147
- <Cases extends { readonly [Tag in "NotFound" | "Resolved" | "SelectionRequired"]: (args: Extract<{
148
- readonly _tag: "NotFound";
149
- readonly domain: DomainName;
150
- } | {
151
- readonly _tag: "Resolved";
152
- readonly target: ProviderTarget;
153
- } | {
154
- readonly _tag: "SelectionRequired";
155
- readonly candidates: ReadonlyArray<ProviderTarget>;
156
- }, {
157
- readonly _tag: Tag;
158
- }>) => any; }>(cases: Cases): (value: {
159
- readonly _tag: "NotFound";
160
- readonly domain: DomainName;
161
- } | {
162
- readonly _tag: "Resolved";
163
- readonly target: ProviderTarget;
164
- } | {
165
- readonly _tag: "SelectionRequired";
166
- readonly candidates: ReadonlyArray<ProviderTarget>;
167
- }) => import("effect/Unify").Unify<ReturnType<Cases["NotFound" | "Resolved" | "SelectionRequired"]>>;
168
- <Cases extends { readonly [Tag in "NotFound" | "Resolved" | "SelectionRequired"]: (args: Extract<{
169
- readonly _tag: "NotFound";
170
- readonly domain: DomainName;
171
- } | {
172
- readonly _tag: "Resolved";
173
- readonly target: ProviderTarget;
174
- } | {
175
- readonly _tag: "SelectionRequired";
176
- readonly candidates: ReadonlyArray<ProviderTarget>;
177
- }, {
178
- readonly _tag: Tag;
179
- }>) => any; }>(value: {
180
- readonly _tag: "NotFound";
181
- readonly domain: DomainName;
182
- } | {
183
- readonly _tag: "Resolved";
184
- readonly target: ProviderTarget;
185
- } | {
186
- readonly _tag: "SelectionRequired";
187
- readonly candidates: ReadonlyArray<ProviderTarget>;
188
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["NotFound" | "Resolved" | "SelectionRequired"]>>;
189
- };
190
- readonly NotFound: Data.TaggedEnum.ConstructorFrom<{
191
- readonly _tag: "NotFound";
192
- readonly domain: DomainName;
193
- }, "_tag">;
194
- readonly Resolved: Data.TaggedEnum.ConstructorFrom<{
195
- readonly _tag: "Resolved";
196
- readonly target: ProviderTarget;
197
- }, "_tag">;
198
- readonly SelectionRequired: Data.TaggedEnum.ConstructorFrom<{
199
- readonly _tag: "SelectionRequired";
200
- readonly candidates: ReadonlyArray<ProviderTarget>;
201
- }, "_tag">;
202
- };
203
- /** The credential material a provider adapter needs to restore a session. */
204
- interface Credential {
205
- readonly accessToken: Value;
206
- readonly expiresAt: Date | null;
207
- readonly refreshToken: Value | null;
208
- readonly tokenType: string;
209
- }
210
- /** The non-secret authorization projection required when restoring a provider session. */
211
- type Authorization = Pick<ProviderAuthorization, "capabilityEvidence" | "method" | "providerContext" | "providerId" | "requiredCapabilities" | "revocation">;
212
- interface RestoreInput {
213
- readonly authorization: Authorization;
214
- readonly credential: Credential;
215
- }
216
- /** Minimal Promise-shaped provider-session contract for hosts that do not use Effect directly. */
217
- interface AsyncInterface {
218
- readonly providerId: string;
219
- readonly listTargets: (input?: ListTargetsInput) => Promise<ReadonlyArray<ProviderTarget>>;
220
- readonly resolveTarget: (domain: DomainName) => Promise<Resolution>;
221
- readonly forTarget: (target: ProviderTarget) => Promise<AsyncInterface$1>;
222
- }
223
- /** Adapts a Promise-shaped session to the Effect-native session boundary. */
224
- declare const fromAsync: (session: AsyncInterface) => Interface$3;
225
- /** Adapts an Effect-native session to the Promise facade. */
226
- declare const toAsync$3: (session: Interface$3) => AsyncInterface;
227
- //#endregion
228
- //#region src/providers/cloudflare/protocol.d.ts
229
- declare const Account$2: Schema.Struct<{
230
- readonly id: Schema.String;
231
- readonly name: Schema.String;
232
- }>;
233
- interface Account$2 extends Schema.Schema.Type<typeof Account$2> {}
234
- declare namespace client_d_exports$1 {
235
- export { Account$1 as Account, Fetch$2 as Fetch, Interface$2 as Interface, ListZonesInput$1 as ListZonesInput, Options$4 as Options, Zone$1 as Zone, discoverAuthorizationAccount, discovery$1 as discovery, make$5 as make, validateDomainToken };
236
- }
237
- type Fetch$2 = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
238
- /** Configuration for an Effect-native Cloudflare authoritative-DNS client. */
239
- interface Options$4 {
240
- /** Account scope for account tokens; omit for user or OAuth credentials. */
241
- readonly accountId?: string;
242
- readonly baseUrl?: string;
243
- /** Capabilities the host required when issuing or authorizing this credential. */
244
- readonly capabilities: TokenValidation["capabilities"];
245
- readonly fetch?: Fetch$2;
246
- readonly token: Value;
247
- readonly tokenKind?: "account" | "user";
248
- }
249
- interface ListZonesInput$1 {
250
- readonly accountId?: string;
251
- readonly name?: DomainName;
252
- }
253
- type Account$1 = Account$2;
254
- /** A portable Cloudflare authoritative zone with normalized nameserver evidence. */
255
- interface Zone$1 {
256
- readonly accountId: string;
257
- readonly id: string;
258
- readonly name: DomainName;
259
- readonly nameservers: ReadonlyArray<DomainName>;
260
- readonly status: string | null;
261
- }
262
- interface Interface$2 extends Interface$4 {
263
- readonly providerId: "cloudflare";
264
- readonly forTarget: (target: ProviderTarget) => Effect.Effect<Interface$4, Error>;
265
- readonly listAccounts: () => Effect.Effect<ReadonlyArray<Account$1>, Error>;
266
- readonly listZones: (input?: ListZonesInput$1) => Effect.Effect<ReadonlyArray<Zone$1>, Error>;
267
- readonly listTargets: (input?: ListTargetsInput) => Effect.Effect<ReadonlyArray<ProviderTarget>, Error>;
268
- readonly resolveTarget: (domain: DomainName) => Effect.Effect<Resolution, Error>;
269
- readonly validateToken: () => Effect.Effect<TokenValidation, Error>;
270
- }
271
- /** Exposes Cloudflare zone lookup as the optional provider discovery capability. */
272
- declare function discovery$1(client: Interface$2): Source;
273
- interface CredentialOptions$1 {
274
- readonly baseUrl?: string;
275
- readonly fetch?: Fetch$2;
276
- readonly token: Value;
277
- }
278
- interface DomainCredentialOptions extends CredentialOptions$1 {
279
- readonly capabilities: TokenValidation["capabilities"];
280
- readonly domain: DomainName;
281
- readonly tokenKind?: "account" | "user";
282
- }
283
- declare const discoverAuthorizationAccount: (options: CredentialOptions$1 & {
284
- readonly domain: DomainName;
285
- }) => Effect.Effect<{
286
- readonly id: string;
287
- readonly name: string;
288
- }, Error, never>;
289
- declare const validateDomainToken: (options: DomainCredentialOptions) => Effect.Effect<{
290
- accountId: string;
291
- capabilities: readonly ("dns:read" | "dns:write")[];
292
- expiresAt: Date | null;
293
- scopes: never[];
294
- }, Error, never>;
295
- /** Creates an Effect-native Cloudflare client without owning the credential lifecycle. */
296
- declare function make$5(options: Options$4): Interface$2;
297
- declare namespace auth_d_exports$1 {
298
- export { Context$2 as Context, CredentialTarget, OAuthFlowOptions, OAuthMethodOptions, RefreshCredentialOptions, SubjectResolverOptions, TokenConnectionOptions$1 as TokenConnectionOptions, TokenValidatorOptions, contextCodec$1 as contextCodec, manifest$1 as manifest, oauthAuthentication, oauthFlow, oauthMethod, refreshCredential, restore$1 as restore, subjectResolver, tokenConnectionMethod$1 as tokenConnectionMethod, tokenMethod$1 as tokenMethod, tokenValidator };
299
- }
300
- declare const Context$2: Schema.Struct<{
301
- readonly accountId: Schema.optionalKey<Schema.String>;
302
- readonly tokenKind: Schema.Literals<readonly ["account", "user"]>;
303
- }>;
304
- type Context$2 = typeof Context$2.Type;
305
- declare const contextCodec$1: Codec<{
306
- readonly accountId?: string;
307
- readonly tokenKind: "account" | "user";
308
- }>;
309
- /** Describes Cloudflare's caller-created API-token authorization method. */
310
- declare function tokenMethod$1(capabilities: TokenValidation["capabilities"]): Extract<Manifest["methods"][number], {
311
- readonly _tag: "token";
312
- }>;
313
- interface OAuthMethodOptions {
314
- /** Scope IDs assigned to the OAuth client by Cloudflare. */
315
- readonly scopes: ReadonlyArray<string>;
316
- /** Capabilities represented by those assigned scope IDs. */
317
- readonly capabilities: TokenValidation["capabilities"];
318
- readonly clientAuth: OAuthMethod["clientAuth"];
319
- }
320
- /** Describes a registered Cloudflare OAuth client and its assigned scope IDs. */
321
- declare function oauthMethod(options: OAuthMethodOptions): OAuthMethod;
322
- /** Creates the Cloudflare token and OAuth authorization manifest. */
323
- declare function manifest$1(options: OAuthMethodOptions): Manifest;
324
- type CredentialOptions = Omit<Options$4, "accountId" | "token" | "tokenKind">;
325
- /** Selects an explicit Cloudflare account or discovers it from an authorized domain. */
326
- type CredentialTarget = {
327
- readonly accountId: string;
328
- readonly domain?: never;
329
- } | {
330
- readonly accountId?: never;
331
- readonly domain: DomainName;
332
- };
333
- type SubjectResolverOptions = CredentialOptions & CredentialTarget;
334
- /** Configuration for validating a Cloudflare token against an account or authorized domain. */
335
- type TokenValidatorOptions = CredentialOptions & ({
336
- readonly accountId: string;
337
- readonly domain?: never;
338
- readonly tokenKind?: "account" | "user";
339
- } | {
340
- readonly accountId?: never;
341
- readonly domain: DomainName;
342
- readonly tokenKind?: "account" | "user";
343
- });
344
- /** Resolves the Cloudflare account selected by a completed OAuth authorization. */
345
- declare function subjectResolver(options: SubjectResolverOptions): OAuthSubjectResolver;
346
- /** Creates a host callback that validates a Cloudflare API token. */
347
- declare function tokenValidator(options: TokenValidatorOptions): (token: Value) => ReturnType<Interface$2["validateToken"]>;
348
- type TokenConnectionOptions$1 = TokenValidatorOptions & {
349
- readonly token: Value;
350
- };
351
- /** Creates a provider-independent token connection method backed by Cloudflare validation. */
352
- declare function tokenConnectionMethod$1(options: TokenConnectionOptions$1): Extract<Method, {
353
- readonly _tag: "Token";
354
- }>;
355
- /** Converts a completed Cloudflare OAuth authorization into canonical connection authentication. */
356
- declare const oauthAuthentication: (options: SubjectResolverOptions & {
357
- readonly accessToken: Value;
358
- readonly tokens: oauth.TokenEndpointResponse;
359
- }) => Effect.Effect<{
360
- capabilityEvidence: {
361
- capability: "dns:read" | "dns:write";
362
- evidence: {
363
- readonly _tag: "Introspected";
364
- readonly observedAt: Date;
365
- };
366
- }[];
367
- credential: {
368
- accessToken: Value;
369
- expiresAt: Date | null;
370
- refreshToken: Value | null;
371
- tokenType: Lowercase<string>;
372
- };
373
- providerAccountId: string;
374
- providerContext: Envelope;
375
- scopes: string[];
376
- }, Error$1 | Error, never>;
377
- /** Restore a credential-scoped Cloudflare session from persisted authorization state. */
378
- declare function restore$1(options: RestoreInput & Pick<Options$4, "baseUrl" | "fetch">): Effect.Effect<Interface$2, Error>;
379
- interface RefreshCredentialOptions {
380
- readonly client: OAuthClientConfiguration;
381
- readonly clientAuth: OAuthMethod["clientAuth"];
382
- readonly credential: Credential;
383
- readonly fetch?: Fetch$2;
384
- }
385
- /** Exchanges a Cloudflare refresh token for a fresh provider credential. */
386
- declare const refreshCredential: (options: RefreshCredentialOptions) => Effect.Effect<{
387
- accessToken: Value;
388
- expiresAt: Date | null;
389
- refreshToken: Value;
390
- tokenType: Lowercase<string>;
391
- }, Error | Error$2, never>;
392
- type OAuthFlowOptions = SubjectResolverOptions & {
393
- readonly client: OAuthClientConfiguration;
394
- readonly clientAuth: OAuthMethod["clientAuth"];
395
- readonly redirectUri: string;
396
- readonly scopes: ReadonlyArray<string>;
397
- };
398
- /** Creates Cloudflare's OAuth implementation of the common interactive connection capability. */
399
- declare function oauthFlow(options: OAuthFlowOptions): InteractiveFlow;
400
- declare namespace index_d_exports$1 {
401
- export { Account$1 as Account, auth_d_exports$1 as Auth, client_d_exports$1 as Client, Fetch$2 as Fetch, Interface$2 as Interface, ListZonesInput$1 as ListZonesInput, Options$4 as Options, Zone$1 as Zone, discovery$1 as discovery, make$5 as make };
402
- }
403
- declare namespace client_d_exports {
404
- export { Account, AccountContext, Fetch$1 as Fetch, Interface$1 as Interface, ListZonesInput, Options$3 as Options, Zone, discovery, make$4 as make };
405
- }
406
- type Fetch$1 = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
407
- /** Selects whether Vercel requests operate on a personal account or a team. */
408
- type AccountContext = {
409
- readonly _tag: "personal";
410
- } | {
411
- readonly _tag: "team";
412
- readonly teamId: string;
413
- };
414
- /** Constructs the account scope used by Vercel API requests. */
415
- declare const AccountContext: {
416
- personal: () => Extract<AccountContext, {
417
- readonly _tag: "personal";
418
- }>;
419
- team: ({ teamId }: {
420
- readonly teamId: string;
421
- }) => Extract<AccountContext, {
422
- readonly _tag: "team";
423
- }>;
424
- };
425
- /** Configuration for an Effect-native Vercel authoritative-DNS client. */
426
- interface Options$3 {
427
- readonly baseUrl?: string;
428
- /** Capabilities the host required when issuing or authorizing this credential. */
429
- readonly capabilities: TokenValidation["capabilities"];
430
- readonly context: AccountContext;
431
- readonly fetch?: Fetch$1;
432
- readonly token: Value;
433
- }
434
- interface ListZonesInput {
435
- readonly name?: DomainName;
436
- }
437
- /** A Vercel account visible to the supplied credential. */
438
- interface Account {
439
- readonly id: string;
440
- readonly name: string;
441
- readonly type: "personal" | "team";
442
- }
443
- /** A Vercel-managed authoritative zone with normalized nameserver evidence. */
444
- interface Zone {
445
- readonly accountId: string;
446
- readonly id: string;
447
- readonly name: DomainName;
448
- readonly nameservers: ReadonlyArray<DomainName>;
449
- readonly status: "active" | "pending";
450
- }
451
- interface Interface$1 extends Interface$4 {
452
- readonly providerId: "vercel";
453
- readonly forTarget: (target: ProviderTarget) => Effect.Effect<Interface$4, Error>;
454
- readonly listAccounts: () => Effect.Effect<ReadonlyArray<Account>, Error>;
455
- readonly listZones: (input?: ListZonesInput) => Effect.Effect<ReadonlyArray<Zone>, Error>;
456
- readonly listTargets: (input?: ListTargetsInput) => Effect.Effect<ReadonlyArray<ProviderTarget>, Error>;
457
- readonly resolveTarget: (domain: DomainName) => Effect.Effect<Resolution, Error>;
458
- readonly validateToken: () => Effect.Effect<TokenValidation, Error>;
459
- }
460
- /** Exposes Vercel zone lookup as the optional provider discovery capability. */
461
- declare function discovery(client: Interface$1): Source;
462
- /** Creates an Effect-native Vercel client without owning the credential lifecycle. */
463
- declare function make$4(options: Options$3): Interface$1;
464
- declare namespace auth_d_exports {
465
- export { Context$1 as Context, ExchangeCodeOptions, IntegrationCredential, IntegrationFlowOptions, IntegrationMethodOptions, TokenConnectionOptions, contextCodec, exchangeCode, integrationAuthentication, integrationFlow, integrationMethod, manifest, restore, tokenConnectionMethod, tokenMethod };
466
- }
467
- declare const Context$1: Schema.TaggedUnion<{
468
- readonly personal: Schema.TaggedStruct<"personal", {
469
- readonly installationId: Schema.NullOr<Schema.String>;
470
- }>;
471
- readonly team: Schema.TaggedStruct<"team", {
472
- readonly installationId: Schema.NullOr<Schema.String>;
473
- readonly teamId: Schema.String;
474
- }>;
475
- }>;
476
- type Context$1 = typeof Context$1.Type;
477
- declare const contextCodec: Codec<{
478
- readonly _tag: "personal";
479
- readonly installationId: string | null;
480
- } | {
481
- readonly _tag: "team";
482
- readonly installationId: string | null;
483
- readonly teamId: string;
484
- }>;
485
- /** Describes Vercel's caller-created personal access-token method. */
486
- declare function tokenMethod(capabilities: TokenValidation["capabilities"]): Extract<Manifest["methods"][number], {
487
- readonly _tag: "token";
488
- }>;
489
- interface IntegrationMethodOptions {
490
- readonly capabilities: TokenValidation["capabilities"];
491
- readonly slug: string;
492
- }
493
- /** Describes Vercel's provider-specific integration installation flow. */
494
- declare function integrationMethod(options: IntegrationMethodOptions): IntegrationMethod;
495
- /** Creates the Vercel token and integration authorization manifest. */
496
- declare function manifest(options: IntegrationMethodOptions): Manifest;
497
- interface ExchangeCodeOptions {
498
- readonly baseUrl?: string;
499
- readonly clientId: string;
500
- readonly clientSecret: Value;
501
- readonly code: Value;
502
- /** Configuration ID returned by Vercel's integration callback, when available. */
503
- readonly configurationId?: string;
504
- readonly fetch?: Fetch$1;
505
- readonly redirectUri: string;
506
- }
507
- interface IntegrationCredential {
508
- readonly accessToken: Value;
509
- readonly context: AccountContext;
510
- readonly installationId: string | null;
511
- readonly userId: string;
512
- }
513
- /** Exchanges Vercel's one-time integration code and preserves its account context. */
514
- declare const exchangeCode: (options: ExchangeCodeOptions) => Effect.Effect<{
515
- accessToken: Value;
516
- context: {
517
- readonly _tag: "personal";
518
- } | {
519
- readonly _tag: "team";
520
- readonly teamId: string;
521
- };
522
- installationId: string | null;
523
- userId: string;
524
- }, Error, never>;
525
- interface TokenConnectionOptions extends Omit<Options$3, "token"> {
526
- readonly token: Value;
527
- }
528
- /** Creates a provider-independent token connection method backed by Vercel validation. */
529
- declare function tokenConnectionMethod(options: TokenConnectionOptions): Extract<Method, {
530
- readonly _tag: "Token";
531
- }>;
532
- /** Converts a completed Vercel Integration exchange into canonical connection authentication. */
533
- declare const integrationAuthentication: (options: ExchangeCodeOptions & {
534
- readonly capabilities: ReadonlyArray<Capability>;
535
- }) => Effect.Effect<{
536
- capabilityEvidence: {
537
- capability: "dns:read" | "dns:write";
538
- evidence: {
539
- readonly _tag: "Introspected";
540
- readonly observedAt: Date;
541
- };
542
- }[];
543
- credential: {
544
- accessToken: Value;
545
- expiresAt: null;
546
- refreshToken: null;
547
- tokenType: string;
548
- };
549
- providerAccountId: string;
550
- providerContext: Envelope;
551
- scopes: never[];
552
- }, Error$1 | Error, never>;
553
- /** Restore a credential-scoped Vercel session from persisted authorization state. */
554
- declare function restore(options: RestoreInput & Pick<Options$3, "baseUrl" | "fetch">): Effect.Effect<Interface$1, Error>;
555
- interface IntegrationFlowOptions extends Omit<ExchangeCodeOptions, "code">, IntegrationMethodOptions {}
556
- /** Creates Vercel Integration's implementation of the common interactive connection capability. */
557
- declare function integrationFlow(options: IntegrationFlowOptions): InteractiveFlow;
558
- declare namespace index_d_exports {
559
- export { Account, AccountContext, auth_d_exports as Auth, client_d_exports as Client, Fetch$1 as Fetch, Interface$1 as Interface, ListZonesInput, Options$3 as Options, Zone, discovery, make$4 as make };
560
- }
561
- declare namespace doh_d_exports {
562
- export { Fetch, Options$2 as Options, layer$2 as layer, make$3 as make, toAsync$2 as toAsync };
563
- }
564
- type Fetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
565
- interface Options$2 {
566
- readonly endpoint: string;
567
- readonly fetch?: Fetch;
568
- readonly timeoutMs?: number;
569
- }
570
- declare function make$3(options: Options$2): Interface$5;
571
- declare const layer$2: (options: Options$2) => Layer.Layer<Service$2>;
572
- declare const toAsync$2: (options: Options$2) => AsyncInterface$2;
573
- declare namespace cloudflare_doh_d_exports {
574
- export { Options$1 as Options, layer$1 as layer, make$2 as make, toAsync$1 as toAsync };
575
- }
576
- interface Options$1 extends Omit<Options$2, "endpoint"> {
577
- readonly endpoint?: string;
578
- }
579
- declare function make$2(options?: Options$1): Interface$5;
580
- declare const layer$1: (options?: Options$1) => Layer.Layer<Service$2>;
581
- declare const toAsync$1: (options?: Options$1) => AsyncInterface$2;
582
- declare namespace google_doh_d_exports {
583
- export { Options, layer, make$1 as make, toAsync };
584
- }
585
- interface Options extends Omit<Options$2, "endpoint"> {
586
- readonly endpoint?: string;
587
- }
588
- declare function make$1(options?: Options): Interface$5;
589
- declare const layer: (options?: Options) => Layer.Layer<Service$2>;
590
- declare const toAsync: (options?: Options) => AsyncInterface$2;
591
- declare namespace resolver_pool_d_exports {
592
- export { DefaultOptions, Entry, Interface, Observation, Policy, Service, defaultLayer, defaultMake, make };
593
- }
594
- interface Entry {
595
- readonly id: string;
596
- readonly resolver: Interface$5;
597
- readonly timeoutMs?: number;
598
- }
599
- type Observation = Data.TaggedEnum<{
600
- Answer: {
601
- readonly answers: ReadonlyArray<Answer>;
602
- readonly resolverId: string;
603
- };
604
- Failed: {
605
- readonly message: string;
606
- readonly reason: Exclude<Error$3["reason"], "timeout">;
607
- readonly resolverId: string;
608
- };
609
- NoData: {
610
- readonly resolverId: string;
611
- };
612
- TimedOut: {
613
- readonly resolverId: string;
614
- readonly timeoutMs: number;
615
- };
616
- }>;
617
- declare const Observation: {
618
- readonly $is: <Tag extends "Answer" | "Failed" | "NoData" | "TimedOut">(tag: Tag) => (u: unknown) => u is Extract<{
619
- readonly _tag: "Answer";
620
- readonly answers: ReadonlyArray<Answer>;
621
- readonly resolverId: string;
622
- }, {
623
- readonly _tag: Tag;
624
- }> | Extract<{
625
- readonly _tag: "Failed";
626
- readonly message: string;
627
- readonly reason: Exclude<Error$3["reason"], "timeout">;
628
- readonly resolverId: string;
629
- }, {
630
- readonly _tag: Tag;
631
- }> | Extract<{
632
- readonly _tag: "NoData";
633
- readonly resolverId: string;
634
- }, {
635
- readonly _tag: Tag;
636
- }> | Extract<{
637
- readonly _tag: "TimedOut";
638
- readonly resolverId: string;
639
- readonly timeoutMs: number;
640
- }, {
641
- readonly _tag: Tag;
642
- }>;
643
- readonly $match: {
644
- <Cases extends { readonly [Tag in "Answer" | "Failed" | "NoData" | "TimedOut"]: (args: Extract<{
645
- readonly _tag: "Answer";
646
- readonly answers: ReadonlyArray<Answer>;
647
- readonly resolverId: string;
648
- } | {
649
- readonly _tag: "Failed";
650
- readonly message: string;
651
- readonly reason: Exclude<Error$3["reason"], "timeout">;
652
- readonly resolverId: string;
653
- } | {
654
- readonly _tag: "NoData";
655
- readonly resolverId: string;
656
- } | {
657
- readonly _tag: "TimedOut";
658
- readonly resolverId: string;
659
- readonly timeoutMs: number;
660
- }, {
661
- readonly _tag: Tag;
662
- }>) => any; }>(cases: Cases): (value: {
663
- readonly _tag: "Answer";
664
- readonly answers: ReadonlyArray<Answer>;
665
- readonly resolverId: string;
666
- } | {
667
- readonly _tag: "Failed";
668
- readonly message: string;
669
- readonly reason: Exclude<Error$3["reason"], "timeout">;
670
- readonly resolverId: string;
671
- } | {
672
- readonly _tag: "NoData";
673
- readonly resolverId: string;
674
- } | {
675
- readonly _tag: "TimedOut";
676
- readonly resolverId: string;
677
- readonly timeoutMs: number;
678
- }) => import("effect/Unify").Unify<ReturnType<Cases["Answer" | "Failed" | "NoData" | "TimedOut"]>>;
679
- <Cases extends { readonly [Tag in "Answer" | "Failed" | "NoData" | "TimedOut"]: (args: Extract<{
680
- readonly _tag: "Answer";
681
- readonly answers: ReadonlyArray<Answer>;
682
- readonly resolverId: string;
683
- } | {
684
- readonly _tag: "Failed";
685
- readonly message: string;
686
- readonly reason: Exclude<Error$3["reason"], "timeout">;
687
- readonly resolverId: string;
688
- } | {
689
- readonly _tag: "NoData";
690
- readonly resolverId: string;
691
- } | {
692
- readonly _tag: "TimedOut";
693
- readonly resolverId: string;
694
- readonly timeoutMs: number;
695
- }, {
696
- readonly _tag: Tag;
697
- }>) => any; }>(value: {
698
- readonly _tag: "Answer";
699
- readonly answers: ReadonlyArray<Answer>;
700
- readonly resolverId: string;
701
- } | {
702
- readonly _tag: "Failed";
703
- readonly message: string;
704
- readonly reason: Exclude<Error$3["reason"], "timeout">;
705
- readonly resolverId: string;
706
- } | {
707
- readonly _tag: "NoData";
708
- readonly resolverId: string;
709
- } | {
710
- readonly _tag: "TimedOut";
711
- readonly resolverId: string;
712
- readonly timeoutMs: number;
713
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Answer" | "Failed" | "NoData" | "TimedOut"]>>;
714
- };
715
- readonly Answer: Data.TaggedEnum.ConstructorFrom<{
716
- readonly _tag: "Answer";
717
- readonly answers: ReadonlyArray<Answer>;
718
- readonly resolverId: string;
719
- }, "_tag">;
720
- readonly Failed: Data.TaggedEnum.ConstructorFrom<{
721
- readonly _tag: "Failed";
722
- readonly message: string;
723
- readonly reason: Exclude<Error$3["reason"], "timeout">;
724
- readonly resolverId: string;
725
- }, "_tag">;
726
- readonly NoData: Data.TaggedEnum.ConstructorFrom<{
727
- readonly _tag: "NoData";
728
- readonly resolverId: string;
729
- }, "_tag">;
730
- readonly TimedOut: Data.TaggedEnum.ConstructorFrom<{
731
- readonly _tag: "TimedOut";
732
- readonly resolverId: string;
733
- readonly timeoutMs: number;
734
- }, "_tag">;
735
- };
736
- type Policy = Data.TaggedEnum<{
737
- AllMatch: {};
738
- AnyMatch: {};
739
- Quorum: {
740
- readonly minimum: number;
741
- };
742
- }>;
743
- declare const Policy: {
744
- AllMatch: Data.TaggedEnum.ConstructorFrom<{
745
- readonly _tag: "AllMatch";
746
- }, "_tag">;
747
- AnyMatch: Data.TaggedEnum.ConstructorFrom<{
748
- readonly _tag: "AnyMatch";
749
- }, "_tag">;
750
- Quorum: ({ minimum }: {
751
- readonly minimum: number;
752
- }) => Policy;
753
- Schema: Schema.TaggedUnion<{
754
- readonly AllMatch: Schema.TaggedStruct<"AllMatch", {}>;
755
- readonly AnyMatch: Schema.TaggedStruct<"AnyMatch", {}>;
756
- readonly Quorum: Schema.TaggedStruct<"Quorum", {
757
- readonly minimum: Schema.Int;
758
- }>;
759
- }>;
760
- };
761
- interface Interface {
762
- readonly observe: (query: Query) => Effect.Effect<ReadonlyArray<Observation>>;
763
- }
764
- declare const Service_base: Context.ServiceClass<Service, "@domainkit/DnsResolverPool", Interface>;
765
- declare class Service extends Service_base {}
766
- declare function make(entries: ReadonlyArray<Entry>): Interface;
767
- interface DefaultOptions extends Omit<Options$2, "endpoint"> {}
768
- /** Cloudflare and Google RFC wire-format DoH resolvers. */
769
- declare function defaultMake(options?: DefaultOptions): Interface;
770
- declare const defaultLayer: (options?: DefaultOptions) => Layer.Layer<Service>;
771
- declare namespace verify_d_exports {
772
- export { Config, Provider, ProviderConfig, ProviderObservation, PublicDns, PublicDnsObservation, PublicOnlyConfig, Result, observe };
773
- }
774
- type PublicDns = Data.TaggedEnum<{
775
- Disabled: {};
776
- Enabled: {
777
- readonly policy?: Policy;
778
- };
779
- }>;
780
- declare const PublicDns: {
781
- readonly $is: <Tag extends "Disabled" | "Enabled">(tag: Tag) => (u: unknown) => u is Extract<{
782
- readonly _tag: "Disabled";
783
- }, {
784
- readonly _tag: Tag;
785
- }> | Extract<{
786
- readonly _tag: "Enabled";
787
- readonly policy?: Policy;
788
- }, {
789
- readonly _tag: Tag;
790
- }>;
791
- readonly $match: {
792
- <Cases extends { readonly [Tag in "Disabled" | "Enabled"]: (args: Extract<{
793
- readonly _tag: "Disabled";
794
- } | {
795
- readonly _tag: "Enabled";
796
- readonly policy?: Policy;
797
- }, {
798
- readonly _tag: Tag;
799
- }>) => any; }>(cases: Cases): (value: {
800
- readonly _tag: "Disabled";
801
- } | {
802
- readonly _tag: "Enabled";
803
- readonly policy?: Policy;
804
- }) => import("effect/Unify").Unify<ReturnType<Cases["Disabled" | "Enabled"]>>;
805
- <Cases extends { readonly [Tag in "Disabled" | "Enabled"]: (args: Extract<{
806
- readonly _tag: "Disabled";
807
- } | {
808
- readonly _tag: "Enabled";
809
- readonly policy?: Policy;
810
- }, {
811
- readonly _tag: Tag;
812
- }>) => any; }>(value: {
813
- readonly _tag: "Disabled";
814
- } | {
815
- readonly _tag: "Enabled";
816
- readonly policy?: Policy;
817
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Disabled" | "Enabled"]>>;
818
- };
819
- readonly Disabled: Data.TaggedEnum.ConstructorFrom<{
820
- readonly _tag: "Disabled";
821
- }, "_tag">;
822
- readonly Enabled: Data.TaggedEnum.ConstructorFrom<{
823
- readonly _tag: "Enabled";
824
- readonly policy?: Policy;
825
- }, "_tag">;
826
- };
827
- type Provider = Data.TaggedEnum<{
828
- Disabled: {};
829
- Enabled: {
830
- readonly zone: DomainName;
831
- };
832
- }>;
833
- declare const Provider: {
834
- readonly $is: <Tag extends "Disabled" | "Enabled">(tag: Tag) => (u: unknown) => u is Extract<{
835
- readonly _tag: "Disabled";
836
- }, {
837
- readonly _tag: Tag;
838
- }> | Extract<{
839
- readonly _tag: "Enabled";
840
- readonly zone: DomainName;
841
- }, {
842
- readonly _tag: Tag;
843
- }>;
844
- readonly $match: {
845
- <Cases extends { readonly [Tag in "Disabled" | "Enabled"]: (args: Extract<{
846
- readonly _tag: "Disabled";
847
- } | {
848
- readonly _tag: "Enabled";
849
- readonly zone: DomainName;
850
- }, {
851
- readonly _tag: Tag;
852
- }>) => any; }>(cases: Cases): (value: {
853
- readonly _tag: "Disabled";
854
- } | {
855
- readonly _tag: "Enabled";
856
- readonly zone: DomainName;
857
- }) => import("effect/Unify").Unify<ReturnType<Cases["Disabled" | "Enabled"]>>;
858
- <Cases extends { readonly [Tag in "Disabled" | "Enabled"]: (args: Extract<{
859
- readonly _tag: "Disabled";
860
- } | {
861
- readonly _tag: "Enabled";
862
- readonly zone: DomainName;
863
- }, {
864
- readonly _tag: Tag;
865
- }>) => any; }>(value: {
866
- readonly _tag: "Disabled";
867
- } | {
868
- readonly _tag: "Enabled";
869
- readonly zone: DomainName;
870
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Disabled" | "Enabled"]>>;
871
- };
872
- readonly Disabled: Data.TaggedEnum.ConstructorFrom<{
873
- readonly _tag: "Disabled";
874
- }, "_tag">;
875
- readonly Enabled: Data.TaggedEnum.ConstructorFrom<{
876
- readonly _tag: "Enabled";
877
- readonly zone: DomainName;
878
- }, "_tag">;
879
- };
880
- type ProviderEnabled = Extract<Provider, {
881
- readonly _tag: "Enabled";
882
- }>;
883
- type ProviderDisabled = Extract<Provider, {
884
- readonly _tag: "Disabled";
885
- }>;
886
- interface PublicOnlyConfig {
887
- readonly provider?: ProviderDisabled;
888
- readonly publicDns?: PublicDns;
889
- readonly record: DnsRecord;
890
- }
891
- interface ProviderConfig {
892
- readonly provider: ProviderEnabled;
893
- readonly publicDns?: PublicDns;
894
- readonly record: DnsRecord;
895
- }
896
- type Config = ProviderConfig | PublicOnlyConfig;
897
- type ProviderObservation = Data.TaggedEnum<{
898
- Matched: {};
899
- Mismatch: {
900
- readonly records: ReadonlyArray<DnsRecord>;
901
- };
902
- Pending: {};
903
- Unavailable: {
904
- readonly message: string;
905
- };
906
- }>;
907
- declare const ProviderObservation: {
908
- readonly $is: <Tag extends "Matched" | "Mismatch" | "Pending" | "Unavailable">(tag: Tag) => (u: unknown) => u is Extract<{
909
- readonly _tag: "Matched";
910
- }, {
911
- readonly _tag: Tag;
912
- }> | Extract<{
913
- readonly _tag: "Mismatch";
914
- readonly records: ReadonlyArray<DnsRecord>;
915
- }, {
916
- readonly _tag: Tag;
917
- }> | Extract<{
918
- readonly _tag: "Pending";
919
- }, {
920
- readonly _tag: Tag;
921
- }> | Extract<{
922
- readonly _tag: "Unavailable";
923
- readonly message: string;
924
- }, {
925
- readonly _tag: Tag;
926
- }>;
927
- readonly $match: {
928
- <Cases extends { readonly [Tag in "Matched" | "Mismatch" | "Pending" | "Unavailable"]: (args: Extract<{
929
- readonly _tag: "Matched";
930
- } | {
931
- readonly _tag: "Mismatch";
932
- readonly records: ReadonlyArray<DnsRecord>;
933
- } | {
934
- readonly _tag: "Pending";
935
- } | {
936
- readonly _tag: "Unavailable";
937
- readonly message: string;
938
- }, {
939
- readonly _tag: Tag;
940
- }>) => any; }>(cases: Cases): (value: {
941
- readonly _tag: "Matched";
942
- } | {
943
- readonly _tag: "Mismatch";
944
- readonly records: ReadonlyArray<DnsRecord>;
945
- } | {
946
- readonly _tag: "Pending";
947
- } | {
948
- readonly _tag: "Unavailable";
949
- readonly message: string;
950
- }) => import("effect/Unify").Unify<ReturnType<Cases["Matched" | "Mismatch" | "Pending" | "Unavailable"]>>;
951
- <Cases extends { readonly [Tag in "Matched" | "Mismatch" | "Pending" | "Unavailable"]: (args: Extract<{
952
- readonly _tag: "Matched";
953
- } | {
954
- readonly _tag: "Mismatch";
955
- readonly records: ReadonlyArray<DnsRecord>;
956
- } | {
957
- readonly _tag: "Pending";
958
- } | {
959
- readonly _tag: "Unavailable";
960
- readonly message: string;
961
- }, {
962
- readonly _tag: Tag;
963
- }>) => any; }>(value: {
964
- readonly _tag: "Matched";
965
- } | {
966
- readonly _tag: "Mismatch";
967
- readonly records: ReadonlyArray<DnsRecord>;
968
- } | {
969
- readonly _tag: "Pending";
970
- } | {
971
- readonly _tag: "Unavailable";
972
- readonly message: string;
973
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Matched" | "Mismatch" | "Pending" | "Unavailable"]>>;
974
- };
975
- readonly Matched: Data.TaggedEnum.ConstructorFrom<{
976
- readonly _tag: "Matched";
977
- }, "_tag">;
978
- readonly Mismatch: Data.TaggedEnum.ConstructorFrom<{
979
- readonly _tag: "Mismatch";
980
- readonly records: ReadonlyArray<DnsRecord>;
981
- }, "_tag">;
982
- readonly Pending: Data.TaggedEnum.ConstructorFrom<{
983
- readonly _tag: "Pending";
984
- }, "_tag">;
985
- readonly Unavailable: Data.TaggedEnum.ConstructorFrom<{
986
- readonly _tag: "Unavailable";
987
- readonly message: string;
988
- }, "_tag">;
989
- };
990
- type PublicDnsObservation = Data.TaggedEnum<{
991
- Verified: {
992
- readonly evidence: ReadonlyArray<Observation>;
993
- readonly matchedResolverIds: ReadonlyArray<string>;
994
- };
995
- Mismatch: {
996
- readonly evidence: ReadonlyArray<Observation>;
997
- };
998
- Pending: {
999
- readonly evidence: ReadonlyArray<Observation>;
1000
- };
1001
- Unavailable: {
1002
- readonly evidence: ReadonlyArray<Observation>;
1003
- };
1004
- }>;
1005
- declare const PublicDnsObservation: {
1006
- readonly $is: <Tag extends "Mismatch" | "Pending" | "Unavailable" | "Verified">(tag: Tag) => (u: unknown) => u is Extract<{
1007
- readonly _tag: "Mismatch";
1008
- readonly evidence: ReadonlyArray<Observation>;
1009
- }, {
1010
- readonly _tag: Tag;
1011
- }> | Extract<{
1012
- readonly _tag: "Pending";
1013
- readonly evidence: ReadonlyArray<Observation>;
1014
- }, {
1015
- readonly _tag: Tag;
1016
- }> | Extract<{
1017
- readonly _tag: "Unavailable";
1018
- readonly evidence: ReadonlyArray<Observation>;
1019
- }, {
1020
- readonly _tag: Tag;
1021
- }> | Extract<{
1022
- readonly _tag: "Verified";
1023
- readonly evidence: ReadonlyArray<Observation>;
1024
- readonly matchedResolverIds: ReadonlyArray<string>;
1025
- }, {
1026
- readonly _tag: Tag;
1027
- }>;
1028
- readonly $match: {
1029
- <Cases extends { readonly [Tag in "Mismatch" | "Pending" | "Unavailable" | "Verified"]: (args: Extract<{
1030
- readonly _tag: "Mismatch";
1031
- readonly evidence: ReadonlyArray<Observation>;
1032
- } | {
1033
- readonly _tag: "Pending";
1034
- readonly evidence: ReadonlyArray<Observation>;
1035
- } | {
1036
- readonly _tag: "Unavailable";
1037
- readonly evidence: ReadonlyArray<Observation>;
1038
- } | {
1039
- readonly _tag: "Verified";
1040
- readonly evidence: ReadonlyArray<Observation>;
1041
- readonly matchedResolverIds: ReadonlyArray<string>;
1042
- }, {
1043
- readonly _tag: Tag;
1044
- }>) => any; }>(cases: Cases): (value: {
1045
- readonly _tag: "Mismatch";
1046
- readonly evidence: ReadonlyArray<Observation>;
1047
- } | {
1048
- readonly _tag: "Pending";
1049
- readonly evidence: ReadonlyArray<Observation>;
1050
- } | {
1051
- readonly _tag: "Unavailable";
1052
- readonly evidence: ReadonlyArray<Observation>;
1053
- } | {
1054
- readonly _tag: "Verified";
1055
- readonly evidence: ReadonlyArray<Observation>;
1056
- readonly matchedResolverIds: ReadonlyArray<string>;
1057
- }) => import("effect/Unify").Unify<ReturnType<Cases["Mismatch" | "Pending" | "Unavailable" | "Verified"]>>;
1058
- <Cases extends { readonly [Tag in "Mismatch" | "Pending" | "Unavailable" | "Verified"]: (args: Extract<{
1059
- readonly _tag: "Mismatch";
1060
- readonly evidence: ReadonlyArray<Observation>;
1061
- } | {
1062
- readonly _tag: "Pending";
1063
- readonly evidence: ReadonlyArray<Observation>;
1064
- } | {
1065
- readonly _tag: "Unavailable";
1066
- readonly evidence: ReadonlyArray<Observation>;
1067
- } | {
1068
- readonly _tag: "Verified";
1069
- readonly evidence: ReadonlyArray<Observation>;
1070
- readonly matchedResolverIds: ReadonlyArray<string>;
1071
- }, {
1072
- readonly _tag: Tag;
1073
- }>) => any; }>(value: {
1074
- readonly _tag: "Mismatch";
1075
- readonly evidence: ReadonlyArray<Observation>;
1076
- } | {
1077
- readonly _tag: "Pending";
1078
- readonly evidence: ReadonlyArray<Observation>;
1079
- } | {
1080
- readonly _tag: "Unavailable";
1081
- readonly evidence: ReadonlyArray<Observation>;
1082
- } | {
1083
- readonly _tag: "Verified";
1084
- readonly evidence: ReadonlyArray<Observation>;
1085
- readonly matchedResolverIds: ReadonlyArray<string>;
1086
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Mismatch" | "Pending" | "Unavailable" | "Verified"]>>;
1087
- };
1088
- readonly Mismatch: Data.TaggedEnum.ConstructorFrom<{
1089
- readonly _tag: "Mismatch";
1090
- readonly evidence: ReadonlyArray<Observation>;
1091
- }, "_tag">;
1092
- readonly Pending: Data.TaggedEnum.ConstructorFrom<{
1093
- readonly _tag: "Pending";
1094
- readonly evidence: ReadonlyArray<Observation>;
1095
- }, "_tag">;
1096
- readonly Unavailable: Data.TaggedEnum.ConstructorFrom<{
1097
- readonly _tag: "Unavailable";
1098
- readonly evidence: ReadonlyArray<Observation>;
1099
- }, "_tag">;
1100
- readonly Verified: Data.TaggedEnum.ConstructorFrom<{
1101
- readonly _tag: "Verified";
1102
- readonly evidence: ReadonlyArray<Observation>;
1103
- readonly matchedResolverIds: ReadonlyArray<string>;
1104
- }, "_tag">;
1105
- };
1106
- interface Evidence {
1107
- readonly provider: ProviderObservation | null;
1108
- readonly publicDns: PublicDnsObservation | null;
1109
- }
1110
- type Result = Data.TaggedEnum<{
1111
- Mismatch: Evidence;
1112
- NotObserved: Evidence;
1113
- Pending: Evidence;
1114
- Unavailable: Evidence;
1115
- Verified: Evidence;
1116
- }>;
1117
- declare const Result: {
1118
- readonly $is: <Tag extends "Mismatch" | "NotObserved" | "Pending" | "Unavailable" | "Verified">(tag: Tag) => (u: unknown) => u is Extract<{
1119
- readonly _tag: "Mismatch";
1120
- readonly provider: ProviderObservation | null;
1121
- readonly publicDns: PublicDnsObservation | null;
1122
- }, {
1123
- readonly _tag: Tag;
1124
- }> | Extract<{
1125
- readonly _tag: "NotObserved";
1126
- readonly provider: ProviderObservation | null;
1127
- readonly publicDns: PublicDnsObservation | null;
1128
- }, {
1129
- readonly _tag: Tag;
1130
- }> | Extract<{
1131
- readonly _tag: "Pending";
1132
- readonly provider: ProviderObservation | null;
1133
- readonly publicDns: PublicDnsObservation | null;
1134
- }, {
1135
- readonly _tag: Tag;
1136
- }> | Extract<{
1137
- readonly _tag: "Unavailable";
1138
- readonly provider: ProviderObservation | null;
1139
- readonly publicDns: PublicDnsObservation | null;
1140
- }, {
1141
- readonly _tag: Tag;
1142
- }> | Extract<{
1143
- readonly _tag: "Verified";
1144
- readonly provider: ProviderObservation | null;
1145
- readonly publicDns: PublicDnsObservation | null;
1146
- }, {
1147
- readonly _tag: Tag;
1148
- }>;
1149
- readonly $match: {
1150
- <Cases extends { readonly [Tag in "Mismatch" | "NotObserved" | "Pending" | "Unavailable" | "Verified"]: (args: Extract<{
1151
- readonly _tag: "Mismatch";
1152
- readonly provider: ProviderObservation | null;
1153
- readonly publicDns: PublicDnsObservation | null;
1154
- } | {
1155
- readonly _tag: "NotObserved";
1156
- readonly provider: ProviderObservation | null;
1157
- readonly publicDns: PublicDnsObservation | null;
1158
- } | {
1159
- readonly _tag: "Pending";
1160
- readonly provider: ProviderObservation | null;
1161
- readonly publicDns: PublicDnsObservation | null;
1162
- } | {
1163
- readonly _tag: "Unavailable";
1164
- readonly provider: ProviderObservation | null;
1165
- readonly publicDns: PublicDnsObservation | null;
1166
- } | {
1167
- readonly _tag: "Verified";
1168
- readonly provider: ProviderObservation | null;
1169
- readonly publicDns: PublicDnsObservation | null;
1170
- }, {
1171
- readonly _tag: Tag;
1172
- }>) => any; }>(cases: Cases): (value: {
1173
- readonly _tag: "Mismatch";
1174
- readonly provider: ProviderObservation | null;
1175
- readonly publicDns: PublicDnsObservation | null;
1176
- } | {
1177
- readonly _tag: "NotObserved";
1178
- readonly provider: ProviderObservation | null;
1179
- readonly publicDns: PublicDnsObservation | null;
1180
- } | {
1181
- readonly _tag: "Pending";
1182
- readonly provider: ProviderObservation | null;
1183
- readonly publicDns: PublicDnsObservation | null;
1184
- } | {
1185
- readonly _tag: "Unavailable";
1186
- readonly provider: ProviderObservation | null;
1187
- readonly publicDns: PublicDnsObservation | null;
1188
- } | {
1189
- readonly _tag: "Verified";
1190
- readonly provider: ProviderObservation | null;
1191
- readonly publicDns: PublicDnsObservation | null;
1192
- }) => import("effect/Unify").Unify<ReturnType<Cases["Mismatch" | "NotObserved" | "Pending" | "Unavailable" | "Verified"]>>;
1193
- <Cases extends { readonly [Tag in "Mismatch" | "NotObserved" | "Pending" | "Unavailable" | "Verified"]: (args: Extract<{
1194
- readonly _tag: "Mismatch";
1195
- readonly provider: ProviderObservation | null;
1196
- readonly publicDns: PublicDnsObservation | null;
1197
- } | {
1198
- readonly _tag: "NotObserved";
1199
- readonly provider: ProviderObservation | null;
1200
- readonly publicDns: PublicDnsObservation | null;
1201
- } | {
1202
- readonly _tag: "Pending";
1203
- readonly provider: ProviderObservation | null;
1204
- readonly publicDns: PublicDnsObservation | null;
1205
- } | {
1206
- readonly _tag: "Unavailable";
1207
- readonly provider: ProviderObservation | null;
1208
- readonly publicDns: PublicDnsObservation | null;
1209
- } | {
1210
- readonly _tag: "Verified";
1211
- readonly provider: ProviderObservation | null;
1212
- readonly publicDns: PublicDnsObservation | null;
1213
- }, {
1214
- readonly _tag: Tag;
1215
- }>) => any; }>(value: {
1216
- readonly _tag: "Mismatch";
1217
- readonly provider: ProviderObservation | null;
1218
- readonly publicDns: PublicDnsObservation | null;
1219
- } | {
1220
- readonly _tag: "NotObserved";
1221
- readonly provider: ProviderObservation | null;
1222
- readonly publicDns: PublicDnsObservation | null;
1223
- } | {
1224
- readonly _tag: "Pending";
1225
- readonly provider: ProviderObservation | null;
1226
- readonly publicDns: PublicDnsObservation | null;
1227
- } | {
1228
- readonly _tag: "Unavailable";
1229
- readonly provider: ProviderObservation | null;
1230
- readonly publicDns: PublicDnsObservation | null;
1231
- } | {
1232
- readonly _tag: "Verified";
1233
- readonly provider: ProviderObservation | null;
1234
- readonly publicDns: PublicDnsObservation | null;
1235
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Mismatch" | "NotObserved" | "Pending" | "Unavailable" | "Verified"]>>;
1236
- };
1237
- readonly Mismatch: Data.TaggedEnum.ConstructorFrom<{
1238
- readonly _tag: "Mismatch";
1239
- readonly provider: ProviderObservation | null;
1240
- readonly publicDns: PublicDnsObservation | null;
1241
- }, "_tag">;
1242
- readonly NotObserved: Data.TaggedEnum.ConstructorFrom<{
1243
- readonly _tag: "NotObserved";
1244
- readonly provider: ProviderObservation | null;
1245
- readonly publicDns: PublicDnsObservation | null;
1246
- }, "_tag">;
1247
- readonly Pending: Data.TaggedEnum.ConstructorFrom<{
1248
- readonly _tag: "Pending";
1249
- readonly provider: ProviderObservation | null;
1250
- readonly publicDns: PublicDnsObservation | null;
1251
- }, "_tag">;
1252
- readonly Unavailable: Data.TaggedEnum.ConstructorFrom<{
1253
- readonly _tag: "Unavailable";
1254
- readonly provider: ProviderObservation | null;
1255
- readonly publicDns: PublicDnsObservation | null;
1256
- }, "_tag">;
1257
- readonly Verified: Data.TaggedEnum.ConstructorFrom<{
1258
- readonly _tag: "Verified";
1259
- readonly provider: ProviderObservation | null;
1260
- readonly publicDns: PublicDnsObservation | null;
1261
- }, "_tag">;
1262
- };
1263
- declare function observe(input: PublicOnlyConfig): Effect.Effect<Result, Error$1>;
1264
- declare function observe(input: ProviderConfig): Effect.Effect<Result, Error$1, Service$1>;
1265
- declare function observe(input: Config): Effect.Effect<Result, Error$1, Service$1>;
1266
- //#endregion
1267
- export { RestoreInput as $, Options$3 as A, manifest$1 as B, manifest as C, Fetch$1 as D, AccountContext as E, OAuthMethodOptions as F, Interface$2 as G, tokenMethod$1 as H, RefreshCredentialOptions as I, Zone$1 as J, ListZonesInput$1 as K, SubjectResolverOptions as L, index_d_exports$1 as M, CredentialTarget as N, Interface$1 as O, OAuthFlowOptions as P, Resolution as Q, TokenConnectionOptions$1 as R, integrationMethod as S, Account as T, Account$1 as U, oauthMethod as V, Fetch$2 as W, Interface$3 as X, Credential as Y, ListTargetsInput as Z, ExchangeCodeOptions as _, verify_d_exports as a, IntegrationMethodOptions as b, Policy as c, google_doh_d_exports as d, session_d_exports as et, Options$1 as f, index_d_exports as g, doh_d_exports as h, Result as i, Zone as j, ListZonesInput as k, resolver_pool_d_exports as l, Options$2 as m, PublicDns as n, selection_d_exports as nt, DefaultOptions as o, cloudflare_doh_d_exports as p, Options$4 as q, PublicDnsObservation as r, diagnostic_d_exports as rt, Observation as s, ProviderObservation as t, zones_d_exports as tt, Options as u, IntegrationCredential as v, tokenMethod as w, TokenConnectionOptions as x, IntegrationFlowOptions as y, TokenValidatorOptions as z };
1268
- //# sourceMappingURL=verify-C3V_GtzL.d.mts.map