domainkit 0.8.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 +213 -41
  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 -462
  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-D-X8T9W8.d.mts +0 -1597
  144. package/dist/connect-oI8hcMxc.mjs +0 -185
  145. package/dist/connect-oI8hcMxc.mjs.map +0 -1
  146. package/dist/connection-Dp6ZdSo8.d.mts +0 -186
  147. package/dist/connection-api-lqG1nBtD.d.mts +0 -26
  148. package/dist/index.d.mts +0 -1551
  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-BeGz1ukw.mjs +0 -921
  155. package/dist/resolver-BeGz1ukw.mjs.map +0 -1
  156. package/dist/resolver-xoSwyXDJ.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-DvGPb5C9.mjs +0 -2402
  164. package/dist/verify-DvGPb5C9.mjs.map +0 -1
  165. package/dist/verify-FpunAcM7.d.mts +0 -1335
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Everything DomainKit persists, behind one service the host installs once. Every method requires
3
+ * `Principal` and is scoped by it. `@domainkit/capsuledb` ships the Postgres implementation;
4
+ * `domainkit/testing` ships the memory one; both pass `Testing.conformance.storage`.
5
+ *
6
+ * Storage never sees plaintext credentials: `Connect` seals secrets through `Custody` before
7
+ * writing a `Credential` row and opens them after reading one.
8
+ *
9
+ * Grouped by noun so the 25-odd methods stay navigable. Implementations must satisfy the
10
+ * invariants documented per group; the conformance suite checks them.
11
+ */
12
+ import { Context, DateTime, Effect, Layer, Option, Schema } from "effect";
13
+ import * as Approval from "./Approval.ts";
14
+ import * as DnsRecord from "./DnsRecord.ts";
15
+ import * as Errors from "./internal/error.ts";
16
+ import { makeMemory } from "./internal/storage-memory.ts";
17
+ import * as Plan from "./Plan.ts";
18
+ import * as Principal from "./Principal.ts";
19
+ import * as Receipt from "./Receipt.ts";
20
+ export type Fx<A> = Effect.Effect<A, Errors.DomainKitError, Principal.Service>;
21
+ export declare const Capability: Schema.Literals<readonly ["dns:read", "dns:write"]>;
22
+ export type Capability = typeof Capability.Type;
23
+ export declare const AuthMethod: Schema.Literals<readonly ["token", "oauth", "integration"]>;
24
+ export type AuthMethod = typeof AuthMethod.Type;
25
+ declare const Credential_base: Schema.Class<Credential, Schema.Struct<{
26
+ readonly ciphertext: Schema.String;
27
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
28
+ readonly rotatedAt: Schema.DateTimeUtcFromString;
29
+ }>, {}>;
30
+ /** Sealed provider credential plus the metadata needed without unsealing it. */
31
+ export declare class Credential extends Credential_base {
32
+ }
33
+ declare const Authorization_base: Schema.Class<Authorization, Schema.Struct<{
34
+ readonly id: Schema.String;
35
+ readonly ownerId: Schema.String;
36
+ readonly provider: Schema.String;
37
+ readonly method: Schema.Literals<readonly ["token", "oauth", "integration"]>;
38
+ readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
39
+ /** Provider-specific account context (account id, team id, ...) decoded by the provider's `context` schema. */
40
+ readonly context: Schema.Unknown;
41
+ readonly revocation: Schema.Literals<readonly ["active", "pending", "revoked"]>;
42
+ readonly createdBy: Schema.String;
43
+ readonly createdAt: Schema.DateTimeUtcFromString;
44
+ }>, {}>;
45
+ /** One provider authorization (an OAuth grant or a token) owned by a principal. */
46
+ export declare class Authorization extends Authorization_base {
47
+ }
48
+ declare const Connection_base: Schema.Class<Connection, Schema.Struct<{
49
+ readonly id: Schema.String;
50
+ readonly ownerId: Schema.String;
51
+ readonly authorizationId: Schema.String;
52
+ readonly createdAt: Schema.DateTimeUtcFromString;
53
+ }>, {}>;
54
+ /** A connection is the principal-facing handle over an authorization; one authorization, many domains. */
55
+ export declare class Connection extends Connection_base {
56
+ }
57
+ declare const Attachment_base: Schema.Class<Attachment, Schema.Struct<{
58
+ readonly id: Schema.String;
59
+ readonly ownerId: Schema.String;
60
+ readonly connectionId: Schema.String;
61
+ readonly domain: Schema.String;
62
+ readonly zone: Schema.String;
63
+ /** Provider zone identity (zone id, account id) decoded by the provider's `context` schema. */
64
+ readonly target: Schema.Unknown;
65
+ readonly createdAt: Schema.DateTimeUtcFromString;
66
+ }>, {}>;
67
+ export declare class Attachment extends Attachment_base {
68
+ }
69
+ declare const Continuation_base: Schema.Class<Continuation, Schema.Struct<{
70
+ readonly id: Schema.String;
71
+ readonly ownerId: Schema.String;
72
+ readonly actorId: Schema.String;
73
+ readonly provider: Schema.String;
74
+ readonly payload: Schema.Unknown;
75
+ readonly returnTo: Schema.NullOr<Schema.String>;
76
+ readonly expiresAt: Schema.DateTimeUtcFromString;
77
+ }>, {}>;
78
+ /** Interactive-flow state between `Connect.start` and `Connect.complete`. */
79
+ export declare class Continuation extends Continuation_base {
80
+ }
81
+ export declare const AttemptStatus: Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>;
82
+ export type AttemptStatus = typeof AttemptStatus.Type;
83
+ /** Who declined the plan, why, and when. Terminal: the domain needs a new plan. */
84
+ export declare const Rejection: Schema.Struct<{
85
+ readonly actorId: Schema.String;
86
+ readonly reason: Schema.NullOr<Schema.String>;
87
+ readonly at: Schema.DateTimeUtcFromString;
88
+ }>;
89
+ export type Rejection = typeof Rejection.Type;
90
+ declare const Attempt_base: Schema.Class<Attempt, Schema.Struct<{
91
+ readonly id: Schema.brand<Schema.String, "@domainkit/PlanId">;
92
+ readonly ownerId: Schema.String;
93
+ readonly attachmentId: Schema.String;
94
+ readonly kind: Schema.Literals<readonly ["provisioning", "cleanup"]>;
95
+ readonly status: Schema.Literals<readonly ["planned", "approved", "applying", "complete", "partial", "failed", "expired", "rejected"]>;
96
+ readonly plan: typeof Plan.Model;
97
+ readonly approval: Schema.NullOr<typeof Approval.Model>;
98
+ readonly receipt: Schema.NullOr<typeof Receipt.Model>;
99
+ readonly rejection: Schema.NullOr<Schema.Struct<{
100
+ readonly actorId: Schema.String;
101
+ readonly reason: Schema.NullOr<Schema.String>;
102
+ readonly at: Schema.DateTimeUtcFromString;
103
+ }>>;
104
+ /** Cleanup attempts point at the provisioning receipt they undo. */
105
+ readonly sourceReceiptId: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/ReceiptId">>;
106
+ readonly leaseExpiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
107
+ /** Why the last apply stopped before any write; cleared on the next claim. */
108
+ readonly failure: Schema.NullOr<Schema.String>;
109
+ readonly updatedAt: Schema.DateTimeUtcFromString;
110
+ }>, {}>;
111
+ /** One durable plan -> approval -> receipt lifecycle. */
112
+ export declare class Attempt extends Attempt_base {
113
+ }
114
+ export declare const RequirementStatus: Schema.Literals<readonly ["satisfied", "missing", "mismatch", "unknown"]>;
115
+ export type RequirementStatus = typeof RequirementStatus.Type;
116
+ export declare const Overall: Schema.Literals<readonly ["ready", "pending", "failed"]>;
117
+ export type Overall = typeof Overall.Type;
118
+ declare const Readiness_base: Schema.Class<Readiness, Schema.Struct<{
119
+ readonly domain: Schema.String;
120
+ readonly attachmentId: Schema.NullOr<Schema.String>;
121
+ readonly ownerId: Schema.String;
122
+ readonly overall: Schema.Literals<readonly ["ready", "pending", "failed"]>;
123
+ readonly requirements: Schema.$Array<Schema.Struct<{
124
+ readonly operationId: Schema.NullOr<Schema.brand<Schema.String, "@domainkit/OperationId">>;
125
+ readonly record: Schema.Union<readonly [typeof DnsRecord.A, typeof DnsRecord.AAAA, typeof DnsRecord.CNAME, typeof DnsRecord.TXT, typeof DnsRecord.MX, typeof DnsRecord.CAA, typeof DnsRecord.NS, typeof DnsRecord.SRV]>;
126
+ readonly status: Schema.Literals<readonly ["satisfied", "missing", "mismatch", "unknown"]>;
127
+ /** Encoded `Verify.Evidence` values. */
128
+ readonly evidence: Schema.$Array<Schema.Unknown>;
129
+ }>>;
130
+ /** Encoded `Verify.HostEvidence` values, keyed by `source` on merge. */
131
+ readonly host: Schema.$Array<Schema.Unknown>;
132
+ /** When the current pending streak began; drives the backoff ladder. */
133
+ readonly pendingSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
134
+ readonly checkedAt: Schema.DateTimeUtcFromString;
135
+ readonly nextCheckAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
136
+ }>, {}>;
137
+ /**
138
+ * Latest observed readiness for one domain, written by `Verify.observe`. Keyed by domain so
139
+ * observe-only hosts (no attachment, public DNS alone) get the same row; `attachmentId` links the
140
+ * attachment when one exists.
141
+ */
142
+ export declare class Readiness extends Readiness_base {
143
+ }
144
+ export interface Interface {
145
+ readonly authorizations: {
146
+ /**
147
+ * Insert, or CAS-replace when `expectedId` is set: the row must exist under this owner with an
148
+ * active revocation state, else `NotFound` / `Busy`.
149
+ */
150
+ readonly upsert: (input: {
151
+ readonly authorization: Authorization;
152
+ readonly credential: Credential;
153
+ readonly expectedId?: string;
154
+ }) => Fx<Authorization>;
155
+ readonly get: (id: string) => Fx<Authorization>;
156
+ readonly credential: (id: string) => Fx<Credential>;
157
+ readonly rotate: (id: string, credential: Credential) => Fx<void>;
158
+ readonly promoteCapabilities: (id: string, capabilities: ReadonlyArray<Capability>) => Fx<void>;
159
+ /**
160
+ * Two-phase: mark `pending`, run `revoke` outside any transaction, then delete. A failed
161
+ * `revoke` leaves the row pending; `recoverRevocations` finishes it later.
162
+ */
163
+ readonly revoke: <E, R>(id: string, revoke: Effect.Effect<void, E, R>) => Effect.Effect<void, Errors.DomainKitError | E, Principal.Service | R>;
164
+ readonly recoverRevocations: <E, R>(revoke: (authorization: Authorization) => Effect.Effect<void, E, R>) => Effect.Effect<number, Errors.DomainKitError | E, Principal.Service | R>;
165
+ };
166
+ readonly connections: {
167
+ readonly create: (authorizationId: string) => Fx<Connection>;
168
+ readonly get: (id: string) => Fx<Connection>;
169
+ readonly list: (filter?: {
170
+ readonly provider?: string;
171
+ }) => Fx<ReadonlyArray<Connection>>;
172
+ /** Fails `InvalidInput` while attachments still reference the connection. */
173
+ readonly remove: (id: string) => Fx<void>;
174
+ };
175
+ readonly attachments: {
176
+ /** One attachment per (owner, domain); a duplicate fails `InvalidInput`. */
177
+ readonly create: (input: {
178
+ readonly connectionId: string;
179
+ readonly domain: string;
180
+ readonly zone: string;
181
+ readonly target: unknown;
182
+ }) => Fx<Attachment>;
183
+ readonly get: (id: string) => Fx<Attachment>;
184
+ readonly byDomain: (domain: string) => Fx<Option.Option<Attachment>>;
185
+ readonly list: (connectionId: string) => Fx<ReadonlyArray<Attachment>>;
186
+ readonly remove: (id: string) => Fx<void>;
187
+ };
188
+ readonly continuations: {
189
+ readonly put: (continuation: Continuation) => Fx<void>;
190
+ /** Read without spending; a late read fails `Expired`. */
191
+ readonly get: (id: string) => Fx<Continuation>;
192
+ /** Exactly-once: the second consume of the same id fails `NotFound`; a late one fails `Expired`. */
193
+ readonly consume: (id: string) => Fx<Continuation>;
194
+ };
195
+ readonly attempts: {
196
+ readonly create: (attempt: Attempt) => Fx<Attempt>;
197
+ readonly get: (id: Plan.PlanId) => Fx<Attempt>;
198
+ readonly byApproval: (id: Approval.ApprovalId) => Fx<Attempt>;
199
+ readonly byReceipt: (id: Receipt.ReceiptId) => Fx<Attempt>;
200
+ readonly latest: (attachmentId: string, kind: Plan.Kind) => Fx<Option.Option<Attempt>>;
201
+ /** `planned` -> `approved`; approving again with the same approval id is a no-op, anything else fails `Stale`. */
202
+ readonly approve: (id: Plan.PlanId, approval: Approval.Model) => Fx<Attempt>;
203
+ /**
204
+ * `planned` -> `rejected` (terminal). Rejecting again returns the row unchanged; any other
205
+ * status fails `Stale`, `expired` fails `Expired`, and a digest mismatch fails `Stale`.
206
+ */
207
+ readonly reject: (id: Plan.PlanId, input: {
208
+ readonly digest: Plan.Digest;
209
+ readonly actorId: string;
210
+ readonly reason: string | null;
211
+ }) => Fx<Attempt>;
212
+ /**
213
+ * Atomic transition to `applying` with a lease from `approved`, `failed`, or an expired
214
+ * `applying`; fails `Busy` while a lease is live and `Stale` from any other status.
215
+ */
216
+ readonly claim: (id: Plan.PlanId, lease: DateTime.Utc) => Fx<Attempt>;
217
+ readonly complete: (id: Plan.PlanId, receipt: Receipt.Model) => Fx<Attempt>;
218
+ readonly fail: (id: Plan.PlanId, message: string) => Fx<Attempt>;
219
+ };
220
+ readonly readiness: {
221
+ /** One row per (owner, domain); `attachmentId`, when set, must exist for the owner. */
222
+ readonly put: (readiness: Readiness) => Fx<void>;
223
+ readonly get: (domain: string) => Fx<Option.Option<Readiness>>;
224
+ };
225
+ /** Single-flight guard keyed by string (credential refresh, apply). Fails `Busy` rather than waiting. */
226
+ readonly withLock: <A, E, R>(key: string, effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | Errors.DomainKitError, R | Principal.Service>;
227
+ }
228
+ declare const Service_base: Context.ServiceClass<Service, "@domainkit/Storage", Interface>;
229
+ export declare class Service extends Service_base {
230
+ }
231
+ export interface MemoryOptions {
232
+ /** Fault injection: runs before every mutation commits; failing here leaves state untouched. */
233
+ readonly beforeCommit?: (operation: string) => Effect.Effect<void, Errors.DomainKitError>;
234
+ }
235
+ /** In-memory implementation for tests and local development. Not for production. */
236
+ export declare const layerMemory: Layer.Layer<Service>;
237
+ /** `layerMemory` with fault injection for storage-failure tests. */
238
+ export declare const layerMemoryWith: (options: MemoryOptions) => Layer.Layer<Service>;
239
+ export { makeMemory };
240
+ /**
241
+ * A Promise-shaped implementation for hosts that persist without Effect. Every method takes the
242
+ * principal explicitly. Rejections become `StorageFailed`; reject with a `DomainKit.Error` to keep
243
+ * a typed reason. Two-phase revocation and locking are split into plain steps so no callback has
244
+ * to run an Effect.
245
+ */
246
+ export interface AsyncInterface {
247
+ readonly authorizations: {
248
+ readonly upsert: (principal: Principal.Interface, input: {
249
+ readonly authorization: Authorization;
250
+ readonly credential: Credential;
251
+ readonly expectedId?: string;
252
+ }) => Promise<Authorization>;
253
+ readonly get: (principal: Principal.Interface, id: string) => Promise<Authorization>;
254
+ readonly credential: (principal: Principal.Interface, id: string) => Promise<Credential>;
255
+ readonly rotate: (principal: Principal.Interface, id: string, credential: Credential) => Promise<void>;
256
+ readonly promoteCapabilities: (principal: Principal.Interface, id: string, capabilities: ReadonlyArray<Capability>) => Promise<void>;
257
+ /** Mark `pending` durably; must be idempotent. */
258
+ readonly prepareRevocation: (principal: Principal.Interface, id: string) => Promise<Authorization>;
259
+ /** Delete the authorization after the provider confirmed revocation. */
260
+ readonly completeRevocation: (principal: Principal.Interface, id: string) => Promise<void>;
261
+ readonly pendingRevocations: (principal: Principal.Interface) => Promise<ReadonlyArray<Authorization>>;
262
+ };
263
+ readonly connections: {
264
+ readonly create: (principal: Principal.Interface, authorizationId: string) => Promise<Connection>;
265
+ readonly get: (principal: Principal.Interface, id: string) => Promise<Connection>;
266
+ readonly list: (principal: Principal.Interface, filter?: {
267
+ readonly provider?: string;
268
+ }) => Promise<ReadonlyArray<Connection>>;
269
+ readonly remove: (principal: Principal.Interface, id: string) => Promise<void>;
270
+ };
271
+ readonly attachments: {
272
+ readonly create: (principal: Principal.Interface, input: {
273
+ readonly connectionId: string;
274
+ readonly domain: string;
275
+ readonly zone: string;
276
+ readonly target: unknown;
277
+ }) => Promise<Attachment>;
278
+ readonly get: (principal: Principal.Interface, id: string) => Promise<Attachment>;
279
+ readonly byDomain: (principal: Principal.Interface, domain: string) => Promise<Attachment | null>;
280
+ readonly list: (principal: Principal.Interface, connectionId: string) => Promise<ReadonlyArray<Attachment>>;
281
+ readonly remove: (principal: Principal.Interface, id: string) => Promise<void>;
282
+ };
283
+ readonly continuations: {
284
+ readonly put: (principal: Principal.Interface, continuation: Continuation) => Promise<void>;
285
+ readonly get: (principal: Principal.Interface, id: string) => Promise<Continuation>;
286
+ readonly consume: (principal: Principal.Interface, id: string) => Promise<Continuation>;
287
+ };
288
+ readonly attempts: {
289
+ readonly create: (principal: Principal.Interface, attempt: Attempt) => Promise<Attempt>;
290
+ readonly get: (principal: Principal.Interface, id: Plan.PlanId) => Promise<Attempt>;
291
+ readonly byApproval: (principal: Principal.Interface, id: Approval.ApprovalId) => Promise<Attempt>;
292
+ readonly byReceipt: (principal: Principal.Interface, id: Receipt.ReceiptId) => Promise<Attempt>;
293
+ readonly latest: (principal: Principal.Interface, attachmentId: string, kind: Plan.Kind) => Promise<Attempt | null>;
294
+ readonly approve: (principal: Principal.Interface, id: Plan.PlanId, approval: Approval.Model) => Promise<Attempt>;
295
+ readonly reject: (principal: Principal.Interface, id: Plan.PlanId, input: {
296
+ readonly digest: Plan.Digest;
297
+ readonly actorId: string;
298
+ readonly reason: string | null;
299
+ }) => Promise<Attempt>;
300
+ readonly claim: (principal: Principal.Interface, id: Plan.PlanId, lease: DateTime.Utc) => Promise<Attempt>;
301
+ readonly complete: (principal: Principal.Interface, id: Plan.PlanId, receipt: Receipt.Model) => Promise<Attempt>;
302
+ readonly fail: (principal: Principal.Interface, id: Plan.PlanId, message: string) => Promise<Attempt>;
303
+ };
304
+ readonly readiness: {
305
+ readonly put: (principal: Principal.Interface, readiness: Readiness) => Promise<void>;
306
+ readonly get: (principal: Principal.Interface, domain: string) => Promise<Readiness | null>;
307
+ };
308
+ /** Return `false` when another holder has the key. */
309
+ readonly acquireLock: (principal: Principal.Interface, key: string) => Promise<boolean>;
310
+ readonly releaseLock: (principal: Principal.Interface, key: string) => Promise<void>;
311
+ }
312
+ /** Wraps a Promise-shaped implementation. Rejections become `StorageFailed`. */
313
+ export declare const fromAsync: (service: AsyncInterface) => Interface;
314
+ export declare const layerFromAsync: (service: AsyncInterface) => Layer.Layer<Service>;
@@ -0,0 +1,84 @@
1
+ /**
2
+ * domainkit/testing — fakes and conformance runners so hosts test against the seam instead of
3
+ * stubbing global fetch.
4
+ */
5
+ import { Layer, Schema } from "effect";
6
+ import * as DnsRecord from "./DnsRecord.ts";
7
+ import { provider as providerCases } from "./internal/conformance/provider.ts";
8
+ import { storage as storageCases } from "./internal/conformance/storage.ts";
9
+ import * as Principal from "./Principal.ts";
10
+ import * as Provider from "./Provider.ts";
11
+ import * as Resolver from "./Resolver.ts";
12
+ import * as Storage from "./Storage.ts";
13
+ import * as Transport from "./Transport.ts";
14
+ /** In-memory Storage. Same as `Storage.layerMemory`; re-exported for discoverability. */
15
+ export declare const storage: Layer.Layer<Storage.Service>;
16
+ export declare const principal: Principal.Interface;
17
+ export interface FakeProviderOptions {
18
+ readonly id?: string;
19
+ /** Zones the fake credential can reach. Default: `example.com`. */
20
+ readonly zones?: ReadonlyArray<string>;
21
+ /** Pre-existing records, to produce `Noop` and `Conflict` operations. */
22
+ readonly records?: ReadonlyArray<{
23
+ readonly zone: string;
24
+ readonly record: DnsRecord.Observed;
25
+ }>;
26
+ /** Offer OAuth in addition to tokens; the fake redirects to `callbackUrl` immediately. */
27
+ readonly oauth?: boolean;
28
+ /** Fail the write at this zero-based index, to exercise partial receipts. */
29
+ readonly failWrite?: (index: number) => boolean;
30
+ /** Nameservers per zone; default `ns1.<zone>`, `ns2.<zone>`. `resolver()` answers NS queries from them. */
31
+ readonly nameservers?: Readonly<Record<string, ReadonlyArray<string>>>;
32
+ }
33
+ export interface FakeProvider extends Provider.Definition<FakeContext> {
34
+ readonly records: (zone: string) => ReadonlyArray<DnsRecord.Observed>;
35
+ /** Every credential the fake issued, oldest first. */
36
+ readonly issued: () => ReadonlyArray<string>;
37
+ /** How many credentials were revoked at the fake. */
38
+ readonly revoked: () => number;
39
+ }
40
+ /** Account context carries `account`; target context carries `zone`. One schema covers both. */
41
+ declare const Context: Schema.Struct<{
42
+ readonly account: Schema.optionalKey<Schema.String>;
43
+ readonly zone: Schema.optionalKey<Schema.String>;
44
+ }>;
45
+ type FakeContext = typeof Context.Type;
46
+ /** A provider definition with a token method (and optional OAuth) over in-memory zones. */
47
+ export declare const provider: (options?: FakeProviderOptions) => FakeProvider;
48
+ /** Records every fake provider currently holds for `name`, across all fake zones. */
49
+ export declare const fakeRecords: (name: string) => ReadonlyArray<DnsRecord.Observed>;
50
+ /**
51
+ * A resolver answering from the fake providers' zones, or from an explicit table. Every answer
52
+ * is attributed to the resolver named `fake`.
53
+ */
54
+ export declare const resolver: (answers?: ReadonlyArray<{
55
+ readonly name: string;
56
+ readonly records: ReadonlyArray<DnsRecord.Observed>;
57
+ }>) => Layer.Layer<Resolver.Service>;
58
+ export interface TransportOptions {
59
+ /** Which groups the fake server exposes, so a UI can be tested against a partial host. */
60
+ readonly capabilities?: ReadonlyArray<Transport.Capability>;
61
+ readonly provider?: FakeProviderOptions;
62
+ }
63
+ export interface RecordedCall {
64
+ /** `connection.inspect`, `provisioning.approve`, ... */
65
+ readonly method: string;
66
+ /** The call's only argument, or the argument list when the method takes more than one. */
67
+ readonly input: unknown;
68
+ }
69
+ export interface RecordingTransport extends Transport.Interface {
70
+ readonly calls: ReadonlyArray<RecordedCall>;
71
+ }
72
+ /**
73
+ * A transport over an in-memory `domainkit/server` and memory Storage, recording every call. What
74
+ * `@domainkit/react` tests render against, instead of stubbing global `fetch`.
75
+ */
76
+ export declare const transport: (options?: TransportOptions) => RecordingTransport;
77
+ export type { Case as ProviderCase } from "./internal/conformance/provider.ts";
78
+ export type { Case as StorageCase } from "./internal/conformance/storage.ts";
79
+ export declare const conformance: {
80
+ /** Runs every Storage invariant (tenant isolation, leases, exactly-once continuations, revocation recovery). */
81
+ storage: typeof storageCases;
82
+ /** Runs create/readback/cleanup, exact-noop, conflict, stale-plan, partial-apply against a real provider definition. */
83
+ provider: typeof providerCases;
84
+ };
@@ -0,0 +1,124 @@
1
+ /**
2
+ * domainkit/client — the browser-side transport `@domainkit/react` consumes. Capability groups are
3
+ * optional: a host that only exposes connection routes declares just `connection`, and the parts
4
+ * of the UI that plan or clean up do not render.
5
+ *
6
+ * const transport = Transport.fromFetch("/api/domainkit")
7
+ *
8
+ * Every method decodes the same wire schemas `domainkit/server` encodes, so a failure arrives as
9
+ * the `DomainKit.Error` the lifecycle raised, reason intact.
10
+ */
11
+ import { Effect } from "effect";
12
+ import * as Approval from "./Approval.ts";
13
+ import type * as DnsRecord from "./DnsRecord.ts";
14
+ import * as Errors from "./internal/error.ts";
15
+ import * as Http from "./internal/http.ts";
16
+ import * as Plan from "./Plan.ts";
17
+ import * as Receipt from "./Receipt.ts";
18
+ import * as Server from "./Server.ts";
19
+ type Fx<A> = Effect.Effect<A, Errors.DomainKitError>;
20
+ export type Snapshot = Server.Snapshot;
21
+ export type Started = Server.Started;
22
+ export type Readiness = Server.Readiness;
23
+ export type Attempt = Server.Attempt;
24
+ export type Candidate = Server.Candidate;
25
+ export type Discovery = Server.Discovery;
26
+ export type Field = Server.Field;
27
+ export type MethodDescriptor = Server.MethodDescriptor;
28
+ export type Method = Server.Method;
29
+ /** How a client asks to connect. Mirrors `Connect.Method`, over the wire. */
30
+ export declare const Method: {
31
+ /** A lone string for the common one-field provider, or the values its descriptor names. */
32
+ readonly token: (values: string | Readonly<Record<string, string>>) => Method;
33
+ readonly oauth: (options?: {
34
+ readonly returnTo?: string;
35
+ }) => Method;
36
+ readonly integration: (options?: {
37
+ readonly returnTo?: string;
38
+ }) => Method;
39
+ };
40
+ export interface ConnectionGroup {
41
+ readonly inspect: (domain: string) => Fx<Snapshot>;
42
+ /** Which of this owner's existing connections already reaches the domain. */
43
+ readonly discover: (domain: string) => Fx<Discovery>;
44
+ readonly start: (input: {
45
+ readonly domain: string;
46
+ readonly provider: string;
47
+ readonly method: Method;
48
+ }) => Fx<Started>;
49
+ readonly attach: (input: {
50
+ readonly connectionId: string;
51
+ readonly domain: string;
52
+ readonly zone?: string;
53
+ }) => Fx<Started>;
54
+ readonly detach: (attachmentId: string) => Fx<void>;
55
+ readonly disconnect: (connectionId: string) => Fx<void>;
56
+ }
57
+ export interface ProvisioningGroup {
58
+ readonly plan: (input: {
59
+ readonly domain: string;
60
+ readonly requirements: ReadonlyArray<DnsRecord.Model>;
61
+ }) => Fx<Plan.Model>;
62
+ readonly approve: (input: {
63
+ readonly planId: Plan.PlanId;
64
+ readonly operationIds?: ReadonlyArray<Plan.OperationId>;
65
+ }) => Fx<Approval.Model>;
66
+ /** Decline the plan; terminal, and approving it afterwards fails `Stale`. */
67
+ readonly reject: (input: {
68
+ readonly planId: Plan.PlanId;
69
+ readonly reason?: string;
70
+ }) => Fx<Attempt>;
71
+ readonly apply: (approvalId: Approval.ApprovalId) => Fx<Receipt.Model>;
72
+ /** The stored plan with its status, approval, receipt, and rejection. */
73
+ readonly attempt: (planId: Plan.PlanId) => Fx<Attempt>;
74
+ }
75
+ export interface VerificationGroup {
76
+ /**
77
+ * Observe the domain's provisioning receipt, or `options.requirements` when supplied (required
78
+ * for a domain with no attachment).
79
+ */
80
+ readonly observe: (domain: string, options?: {
81
+ readonly requirements?: ReadonlyArray<DnsRecord.Model>;
82
+ }) => Fx<Readiness>;
83
+ }
84
+ export interface CleanupGroup {
85
+ readonly plan: (receiptId: Receipt.ReceiptId) => Fx<Plan.Model>;
86
+ readonly approve: (input: {
87
+ readonly planId: Plan.PlanId;
88
+ readonly operationIds?: ReadonlyArray<Plan.OperationId>;
89
+ }) => Fx<Approval.Model>;
90
+ readonly reject: (input: {
91
+ readonly planId: Plan.PlanId;
92
+ readonly reason?: string;
93
+ }) => Fx<Attempt>;
94
+ readonly apply: (approvalId: Approval.ApprovalId) => Fx<Receipt.Model>;
95
+ }
96
+ export interface Interface {
97
+ readonly connection?: ConnectionGroup;
98
+ readonly provisioning?: ProvisioningGroup;
99
+ readonly verification?: VerificationGroup;
100
+ readonly cleanup?: CleanupGroup;
101
+ }
102
+ export type Capability = keyof Interface;
103
+ export declare const allCapabilities: ReadonlyArray<Capability>;
104
+ /** Which groups this transport actually carries, in declaration order. */
105
+ export declare const capabilities: (transport: Interface) => ReadonlyArray<Capability>;
106
+ export interface FetchOptions {
107
+ readonly fetch?: Http.Fetch;
108
+ readonly headers?: HeadersInit | (() => HeadersInit | Promise<HeadersInit>);
109
+ /** Which groups the server exposes. Default: all. */
110
+ readonly capabilities?: ReadonlyArray<Capability>;
111
+ }
112
+ /** A transport over `domainkit/server` routes mounted at `baseUrl`. */
113
+ export declare const fromFetch: (baseUrl: string, options?: FetchOptions) => Interface;
114
+ /** The same transport in Promises, for hosts and tests that do not run Effect. */
115
+ export type AsyncTransport = {
116
+ readonly [K in keyof Interface]?: {
117
+ readonly [M in keyof NonNullable<Interface[K]>]: NonNullable<Interface[K]>[M] extends (...args: infer A) => Effect.Effect<infer R, Errors.DomainKitError> ? (...args: A) => Promise<R> : never;
118
+ };
119
+ };
120
+ /** Adapt a Promise-shaped transport; a rejection that is not a `DomainKit.Error` becomes one. */
121
+ export declare const fromAsync: (transport: AsyncTransport) => Interface;
122
+ /** Adapt to Promises; every rejection is the `DomainKit.Error` the lifecycle raised. */
123
+ export declare const toAsync: (transport: Interface) => AsyncTransport;
124
+ export {};
@@ -0,0 +1,25 @@
1
+ /** Vercel: personal tokens and marketplace integrations. */
2
+ import { type Config, Redacted, Schema } from "effect";
3
+ import type { Fetch } from "./internal/http.ts";
4
+ import * as Provider from "./Provider.ts";
5
+ /** `teamId` is `null` for a personal account; targets carry the team that owns the zone. */
6
+ export declare const TeamContext: Schema.Struct<{
7
+ readonly teamId: Schema.NullOr<Schema.String>;
8
+ }>;
9
+ export type TeamContext = typeof TeamContext.Type;
10
+ /** Token-method input: the access token, and a team id to scope the connection to one team. */
11
+ export declare const TokenFields: Schema.Struct<{
12
+ readonly token: Schema.RedactedFromValue<Schema.String>;
13
+ readonly teamId: Schema.optionalKey<Schema.String>;
14
+ }>;
15
+ export interface Options {
16
+ /** Omit to offer tokens only. */
17
+ readonly integration?: {
18
+ readonly clientId: string | Config.Config<string>;
19
+ readonly clientSecret: Redacted.Redacted<string> | Config.Config<Redacted.Redacted<string>>;
20
+ readonly slug: string;
21
+ };
22
+ readonly fetch?: Fetch;
23
+ readonly baseUrl?: string;
24
+ }
25
+ export declare const provider: (options?: Options) => Provider.Definition<TeamContext>;
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Observe provider and public DNS for an attachment, persist per-requirement readiness, and say
3
+ * when to look again. The host keeps its own state machine (and any provider-side verification
4
+ * such as SES) and feeds that in as `HostEvidence`.
5
+ */
6
+ import { Context, DateTime, Effect, Layer, Schema } from "effect";
7
+ import * as Connect from "./Connect.ts";
8
+ import * as DnsRecord from "./DnsRecord.ts";
9
+ import * as Errors from "./internal/error.ts";
10
+ import type * as Plan from "./Plan.ts";
11
+ import * as Principal from "./Principal.ts";
12
+ import * as Resolver from "./Resolver.ts";
13
+ import * as Storage from "./Storage.ts";
14
+ declare const ProviderEvidence_base: Schema.Class<ProviderEvidence, Schema.TaggedStruct<"Provider", {
15
+ readonly provider: Schema.String;
16
+ readonly status: Schema.Literals<readonly ["satisfied", "missing", "mismatch", "unknown"]>;
17
+ readonly values: Schema.withDecodingDefaultKey<Schema.$Array<Schema.String>, never>;
18
+ readonly detail: Schema.withDecodingDefaultKey<Schema.NullOr<Schema.String>, never>;
19
+ readonly observedAt: Schema.DateTimeUtcFromString;
20
+ }>, {}>;
21
+ export declare class ProviderEvidence extends ProviderEvidence_base {
22
+ }
23
+ declare const PublicDnsEvidence_base: Schema.Class<PublicDnsEvidence, Schema.TaggedStruct<"PublicDns", {
24
+ readonly resolver: Schema.String;
25
+ readonly status: Schema.Literals<readonly ["satisfied", "missing", "mismatch", "unknown"]>;
26
+ readonly values: Schema.withDecodingDefaultKey<Schema.$Array<Schema.String>, never>;
27
+ readonly detail: Schema.withDecodingDefaultKey<Schema.NullOr<Schema.String>, never>;
28
+ readonly observedAt: Schema.DateTimeUtcFromString;
29
+ }>, {}>;
30
+ export declare class PublicDnsEvidence extends PublicDnsEvidence_base {
31
+ }
32
+ declare const HostEvidence_base: Schema.Class<HostEvidence, Schema.TaggedStruct<"Host", {
33
+ readonly source: Schema.String;
34
+ readonly status: Schema.Literals<readonly ["ok", "pending", "failed"]>;
35
+ readonly label: Schema.String;
36
+ readonly detail: Schema.withDecodingDefaultKey<Schema.NullOr<Schema.String>, never>;
37
+ readonly observedAt: Schema.DateTimeUtcFromString;
38
+ }>, {}>;
39
+ /** Anything the host knows that DomainKit cannot observe: SES identity status, a CDN cert, ... */
40
+ export declare class HostEvidence extends HostEvidence_base {
41
+ }
42
+ export declare const Evidence: Schema.Union<readonly [typeof ProviderEvidence, typeof PublicDnsEvidence, typeof HostEvidence]>;
43
+ export type Evidence = typeof Evidence.Type;
44
+ export interface Requirement {
45
+ readonly operationId: Plan.OperationId | null;
46
+ readonly record: DnsRecord.Model;
47
+ readonly status: Storage.RequirementStatus;
48
+ readonly evidence: ReadonlyArray<Evidence>;
49
+ }
50
+ export interface Readiness {
51
+ readonly domain: string;
52
+ /** `null` for observe-only domains that have no attachment. */
53
+ readonly attachmentId: string | null;
54
+ readonly overall: Storage.Overall;
55
+ readonly requirements: ReadonlyArray<Requirement>;
56
+ readonly host: ReadonlyArray<HostEvidence>;
57
+ readonly checkedAt: DateTime.Utc;
58
+ readonly nextCheckAt: DateTime.Utc | null;
59
+ }
60
+ type Fx<A> = Effect.Effect<A, Errors.DomainKitError, Principal.Service>;
61
+ export interface Interface {
62
+ /**
63
+ * What to observe, in order of precedence: `requirements` when supplied (an attached domain
64
+ * without a provisioning receipt, or a domain with no attachment whose records the customer
65
+ * applies by hand), else the latest provisioning receipt of the domain's attachment (records it
66
+ * applied or found in place). Neither is `InvalidInput`. Provider evidence is added when the
67
+ * attachment's session can be built; public DNS is always observed, and readiness is stored
68
+ * per domain either way.
69
+ */
70
+ readonly observe: (input: {
71
+ readonly domain: string;
72
+ readonly requirements?: ReadonlyArray<DnsRecord.Model>;
73
+ }) => Fx<Readiness>;
74
+ /** Merge host evidence into stored readiness without re-observing DNS. */
75
+ readonly attachEvidence: (input: {
76
+ readonly domain: string;
77
+ readonly evidence: ReadonlyArray<HostEvidence>;
78
+ }) => Fx<Readiness>;
79
+ readonly latest: (domain: string) => Fx<Readiness | null>;
80
+ }
81
+ declare const Service_base: Context.ServiceClass<Service, "@domainkit/Verify", Interface>;
82
+ export declare class Service extends Service_base {
83
+ }
84
+ export interface PolicyShape {
85
+ /** Delay before the next check, given time since the first pending observation. Default ladder: 15s, 1m, 5m, 30m. */
86
+ readonly backoff: (pendingForMs: number) => number;
87
+ /** Which resolvers must agree for `satisfied`: default `any`. */
88
+ readonly quorum: "any" | "all" | {
89
+ readonly minimum: number;
90
+ };
91
+ }
92
+ export declare const defaults: PolicyShape;
93
+ declare const Policy_base: Context.Reference<PolicyShape>;
94
+ export declare class Policy extends Policy_base {
95
+ }
96
+ /** A requirement is satisfied by an exact match; an exclusive one is contradicted by any same-set record. */
97
+ export declare const statusAgainst: (record: DnsRecord.Model, observed: ReadonlyArray<DnsRecord.Observed>) => Storage.RequirementStatus;
98
+ export declare const make: Effect.Effect<Interface, never, Storage.Service | Connect.Service | Resolver.Service>;
99
+ export declare const layer: Layer.Layer<Service, never, Storage.Service | Connect.Service | Resolver.Service>;
100
+ export declare const observe: (input: {
101
+ readonly domain: string;
102
+ readonly requirements?: ReadonlyArray<DnsRecord.Model>;
103
+ }) => Effect.Effect<Readiness, Errors.DomainKitError, Principal.Service | Service>;
104
+ export declare const attachEvidence: (input: {
105
+ readonly domain: string;
106
+ readonly evidence: ReadonlyArray<HostEvidence>;
107
+ }) => Effect.Effect<Readiness, Errors.DomainKitError, Principal.Service | Service>;
108
+ export declare const latest: (domain: string) => Effect.Effect<Readiness | null, Errors.DomainKitError, Principal.Service | Service>;
109
+ export {};
@@ -0,0 +1,2 @@
1
+ /** domainkit/client */
2
+ export * as Transport from "../Transport.ts";