domainkit 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/{connect-10vHuShV.d.mts → connect-D-X8T9W8.d.mts} +286 -90
- package/dist/{connection-C0xsU41C.d.mts → connection-Dp6ZdSo8.d.mts} +2 -2
- package/dist/{connection-api-DW7xUJdj.d.mts → connection-api-lqG1nBtD.d.mts} +2 -2
- package/dist/index.d.mts +703 -34
- package/dist/index.mjs +134 -28
- package/dist/index.mjs.map +1 -1
- package/dist/promise.d.mts +7 -7
- package/dist/promise.mjs +4 -4
- package/dist/{resolver-DPJs8h0a.mjs → resolver-BeGz1ukw.mjs} +90 -28
- package/dist/resolver-BeGz1ukw.mjs.map +1 -0
- package/dist/{resolver-DRrLm_hB.d.mts → resolver-xoSwyXDJ.d.mts} +2 -2
- package/dist/server.d.mts +3 -3
- package/dist/testing.d.mts +2 -2
- package/dist/testing.mjs +1 -1
- package/dist/{verify-DDnK8U7C.mjs → verify-DvGPb5C9.mjs} +34 -28
- package/dist/verify-DvGPb5C9.mjs.map +1 -0
- package/dist/{verify-C3V_GtzL.d.mts → verify-FpunAcM7.d.mts} +72 -5
- package/package.json +1 -1
- package/dist/resolver-DPJs8h0a.mjs.map +0 -1
- package/dist/verify-DDnK8U7C.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { A as client_exports$1, G as make, J as session_exports, M as make$1, N as auth_exports, U as client_exports, W as discovery, X as secret_exports, Y as selection_exports, b as dns_data_exports, et as manifest_exports, g as cloudflare_doh_exports, j as discovery$1, k as AccountContext, m as google_doh_exports, nt as version, p as resolver_pool_exports, q as connection_authorization_exports, s as verify_exports, tt as diagnostic_exports, v as doh_exports, x as auth_exports$1 } from "./verify-
|
|
2
|
+
import { A as client_exports$1, G as make, J as session_exports, M as make$1, N as auth_exports, U as client_exports, W as discovery, X as secret_exports, Y as selection_exports, b as dns_data_exports, et as manifest_exports, g as cloudflare_doh_exports, j as discovery$1, k as AccountContext, m as google_doh_exports, nt as version, p as resolver_pool_exports, q as connection_authorization_exports, s as verify_exports, tt as diagnostic_exports, v as doh_exports, x as auth_exports$1 } from "./verify-DvGPb5C9.mjs";
|
|
3
3
|
import { C as encode, O as domain_name_exports, S as decode, T as validate, _ as ProviderTarget, a as AggregateSchema, f as provider_context_exports, g as ProviderConnection, h as DomainAttachment, j as invalid_input_exports, m as ConnectionStatus, o as Error, p as AuthorizationError, s as Service$1, t as canonical_json_exports, u as authorization_exports, v as ProviderTargetEvidence, w as project, x as authorizationError, y as StoredConnection } from "./canonical-json-CQYKsZw7.mjs";
|
|
4
4
|
import { a as start, i as complete, n as Method$1, r as StartResult, t as Error$1 } from "./connect-oI8hcMxc.mjs";
|
|
5
|
-
import { B as provider_exports, F as types_exports, T as plan_exports, a as resolver_exports, dt as zones_exports, g as deletion_exports, lt as zone_discovery_exports, rt as dns_record_exports } from "./resolver-
|
|
5
|
+
import { B as provider_exports, F as types_exports, T as plan_exports, a as resolver_exports, dt as zones_exports, g as deletion_exports, lt as zone_discovery_exports, rt as dns_record_exports } from "./resolver-BeGz1ukw.mjs";
|
|
6
6
|
import { Context, Data, Effect, Layer, Schema } from "effect";
|
|
7
7
|
//#region src/auth/connection-lifecycle.ts
|
|
8
8
|
/** Attach one exact provider target to one organization domain. */
|
|
@@ -126,7 +126,7 @@ const AuthenticationParameter = Schema.Struct({
|
|
|
126
126
|
placeholder: Schema.optionalKey(Schema.String),
|
|
127
127
|
required: Schema.optionalKey(Schema.Boolean)
|
|
128
128
|
});
|
|
129
|
-
const
|
|
129
|
+
const AuthenticationMethodSchema = Schema.TaggedUnion({
|
|
130
130
|
Integration: { label: Schema.String },
|
|
131
131
|
OAuth: { label: Schema.String },
|
|
132
132
|
Token: {
|
|
@@ -135,39 +135,81 @@ const AuthenticationMethod = Schema.TaggedUnion({
|
|
|
135
135
|
placeholder: Schema.optionalKey(Schema.String)
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
|
+
/** Authentication method schema and constructors for trusted host transport responses. */
|
|
139
|
+
const AuthenticationMethod = {
|
|
140
|
+
Schema: AuthenticationMethodSchema,
|
|
141
|
+
Integration: (input) => AuthenticationMethodSchema.cases.Integration.make(input),
|
|
142
|
+
OAuth: (input) => AuthenticationMethodSchema.cases.OAuth.make(input),
|
|
143
|
+
Token: (input) => AuthenticationMethodSchema.cases.Token.make(input)
|
|
144
|
+
};
|
|
138
145
|
const Method = Data.taggedEnum();
|
|
139
146
|
const Provider = Schema.Struct({
|
|
140
|
-
authentication: Schema.Array(AuthenticationMethod),
|
|
147
|
+
authentication: Schema.Array(AuthenticationMethod.Schema),
|
|
141
148
|
id: Schema.String,
|
|
142
149
|
name: Schema.String
|
|
143
150
|
});
|
|
144
|
-
const
|
|
151
|
+
const ConnectedSchema = Schema.TaggedStruct("Connected", {
|
|
145
152
|
attachment: DomainAttachment,
|
|
146
153
|
connection: ProviderConnection,
|
|
147
154
|
provider: Provider
|
|
148
155
|
});
|
|
156
|
+
/** Constructs a connected transport snapshot from trusted host data. */
|
|
157
|
+
function Connected(input) {
|
|
158
|
+
return ConnectedSchema.make(input);
|
|
159
|
+
}
|
|
160
|
+
(function(_Connected) {
|
|
161
|
+
_Connected.Schema = ConnectedSchema;
|
|
162
|
+
})(Connected || (Connected = {}));
|
|
149
163
|
const ReusableConnection = Schema.Struct({
|
|
150
164
|
connection: ProviderConnection,
|
|
151
165
|
targets: Schema.Array(ProviderTarget)
|
|
152
166
|
});
|
|
153
|
-
const
|
|
167
|
+
const DisconnectedSchema = Schema.TaggedStruct("Disconnected", {
|
|
154
168
|
domain: Schema.String,
|
|
155
169
|
provider: Provider,
|
|
156
170
|
reusableConnections: Schema.Array(ReusableConnection)
|
|
157
171
|
});
|
|
158
|
-
|
|
172
|
+
/** Constructs a disconnected transport snapshot from trusted host data. */
|
|
173
|
+
function Disconnected(input) {
|
|
174
|
+
return DisconnectedSchema.make(input);
|
|
175
|
+
}
|
|
176
|
+
(function(_Disconnected) {
|
|
177
|
+
_Disconnected.Schema = DisconnectedSchema;
|
|
178
|
+
})(Disconnected || (Disconnected = {}));
|
|
179
|
+
const UnsupportedSchema = Schema.TaggedStruct("Unsupported", { domain: Schema.String });
|
|
180
|
+
/** Constructs an unsupported transport snapshot from trusted host data. */
|
|
181
|
+
function Unsupported(input) {
|
|
182
|
+
return UnsupportedSchema.make(input);
|
|
183
|
+
}
|
|
184
|
+
(function(_Unsupported) {
|
|
185
|
+
_Unsupported.Schema = UnsupportedSchema;
|
|
186
|
+
})(Unsupported || (Unsupported = {}));
|
|
159
187
|
const ConnectionSnapshot = Schema.Union([
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
188
|
+
ConnectedSchema,
|
|
189
|
+
DisconnectedSchema,
|
|
190
|
+
UnsupportedSchema
|
|
163
191
|
]).pipe(Schema.toTaggedUnion("_tag"));
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
192
|
+
const RedirectSchema = Schema.TaggedStruct("Redirect", { authorizationUrl: Schema.String });
|
|
193
|
+
/** Constructs an OAuth redirect response from trusted host data. */
|
|
194
|
+
function Redirect(input) {
|
|
195
|
+
return RedirectSchema.make(input);
|
|
196
|
+
}
|
|
197
|
+
(function(_Redirect) {
|
|
198
|
+
_Redirect.Schema = RedirectSchema;
|
|
199
|
+
})(Redirect || (Redirect = {}));
|
|
200
|
+
const ConnectionResult = Schema.Union([ConnectedSchema, RedirectSchema]).pipe(Schema.toTaggedUnion("_tag"));
|
|
201
|
+
const DetachResultSchema = Schema.TaggedStruct("Detached", {
|
|
167
202
|
attachment: DomainAttachment,
|
|
168
203
|
connection: ProviderConnection,
|
|
169
204
|
remainingAttachments: Schema.Int
|
|
170
205
|
});
|
|
206
|
+
/** Constructs a detach response from trusted host data. */
|
|
207
|
+
function DetachResult(input) {
|
|
208
|
+
return DetachResultSchema.make(input);
|
|
209
|
+
}
|
|
210
|
+
(function(_DetachResult) {
|
|
211
|
+
_DetachResult.Schema = DetachResultSchema;
|
|
212
|
+
})(DetachResult || (DetachResult = {}));
|
|
171
213
|
/** A presentation projection of a DNS requirement. */
|
|
172
214
|
const DnsRecord = Schema.Struct({
|
|
173
215
|
id: Schema.String,
|
|
@@ -221,7 +263,7 @@ const fromDnsRecord = (id, record) => {
|
|
|
221
263
|
};
|
|
222
264
|
}
|
|
223
265
|
};
|
|
224
|
-
const
|
|
266
|
+
const PlanOperationSchema = Schema.TaggedUnion({
|
|
225
267
|
Conflict: {
|
|
226
268
|
id: Schema.String,
|
|
227
269
|
reason: Schema.String,
|
|
@@ -236,12 +278,26 @@ const PlanOperation = Schema.TaggedUnion({
|
|
|
236
278
|
record: DnsRecord
|
|
237
279
|
}
|
|
238
280
|
});
|
|
239
|
-
|
|
281
|
+
/** Provisioning operation schema and constructors for trusted host responses. */
|
|
282
|
+
const PlanOperation = {
|
|
283
|
+
Schema: PlanOperationSchema,
|
|
284
|
+
Conflict: (input) => PlanOperationSchema.cases.Conflict.make(input),
|
|
285
|
+
Create: (input) => PlanOperationSchema.cases.Create.make(input),
|
|
286
|
+
Noop: (input) => PlanOperationSchema.cases.Noop.make(input)
|
|
287
|
+
};
|
|
288
|
+
const ProvisioningPlanSchema = Schema.TaggedStruct("Plan", {
|
|
240
289
|
digest: Schema.String,
|
|
241
290
|
expiresAt: Schema.String,
|
|
242
|
-
operations: Schema.Array(PlanOperation)
|
|
291
|
+
operations: Schema.Array(PlanOperation.Schema)
|
|
243
292
|
});
|
|
244
|
-
|
|
293
|
+
/** Constructs a provisioning plan response from trusted host data. */
|
|
294
|
+
function ProvisioningPlan(input) {
|
|
295
|
+
return ProvisioningPlanSchema.make(input);
|
|
296
|
+
}
|
|
297
|
+
(function(_ProvisioningPlan) {
|
|
298
|
+
_ProvisioningPlan.Schema = ProvisioningPlanSchema;
|
|
299
|
+
})(ProvisioningPlan || (ProvisioningPlan = {}));
|
|
300
|
+
const OperationResultSchema = Schema.TaggedUnion({
|
|
245
301
|
Applied: { operationId: Schema.String },
|
|
246
302
|
Failed: {
|
|
247
303
|
message: Schema.String,
|
|
@@ -249,17 +305,31 @@ const OperationResult = Schema.TaggedUnion({
|
|
|
249
305
|
},
|
|
250
306
|
Unchanged: { operationId: Schema.String }
|
|
251
307
|
});
|
|
308
|
+
/** Per-operation result schema and constructors for trusted host responses. */
|
|
309
|
+
const OperationResult = {
|
|
310
|
+
Schema: OperationResultSchema,
|
|
311
|
+
Applied: (input) => OperationResultSchema.cases.Applied.make(input),
|
|
312
|
+
Failed: (input) => OperationResultSchema.cases.Failed.make(input),
|
|
313
|
+
Unchanged: (input) => OperationResultSchema.cases.Unchanged.make(input)
|
|
314
|
+
};
|
|
252
315
|
const ApplyOutcomeFields = {
|
|
253
316
|
operationId: Schema.String,
|
|
254
317
|
receiptId: Schema.String,
|
|
255
|
-
results: Schema.Array(OperationResult)
|
|
318
|
+
results: Schema.Array(OperationResult.Schema)
|
|
256
319
|
};
|
|
257
|
-
const
|
|
320
|
+
const ApplyResultSchema = Schema.TaggedUnion({
|
|
258
321
|
Applied: ApplyOutcomeFields,
|
|
259
322
|
Partial: ApplyOutcomeFields,
|
|
260
323
|
Stale: { message: Schema.String }
|
|
261
324
|
});
|
|
262
|
-
|
|
325
|
+
/** Apply result schema and constructors for trusted host responses. */
|
|
326
|
+
const ApplyResult = {
|
|
327
|
+
Schema: ApplyResultSchema,
|
|
328
|
+
Applied: (input) => ApplyResultSchema.cases.Applied.make(input),
|
|
329
|
+
Partial: (input) => ApplyResultSchema.cases.Partial.make(input),
|
|
330
|
+
Stale: (input) => ApplyResultSchema.cases.Stale.make(input)
|
|
331
|
+
};
|
|
332
|
+
const ObservationEvidenceSchema = Schema.TaggedUnion({
|
|
263
333
|
Found: { recordId: Schema.String },
|
|
264
334
|
Mismatch: {
|
|
265
335
|
message: Schema.String,
|
|
@@ -271,11 +341,26 @@ const ObservationEvidence = Schema.TaggedUnion({
|
|
|
271
341
|
recordId: Schema.String
|
|
272
342
|
}
|
|
273
343
|
});
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
344
|
+
/** DNS observation evidence schema and constructors for trusted host responses. */
|
|
345
|
+
const ObservationEvidence = {
|
|
346
|
+
Schema: ObservationEvidenceSchema,
|
|
347
|
+
Found: (input) => ObservationEvidenceSchema.cases.Found.make(input),
|
|
348
|
+
Mismatch: (input) => ObservationEvidenceSchema.cases.Mismatch.make(input),
|
|
349
|
+
Missing: (input) => ObservationEvidenceSchema.cases.Missing.make(input),
|
|
350
|
+
Unavailable: (input) => ObservationEvidenceSchema.cases.Unavailable.make(input)
|
|
351
|
+
};
|
|
352
|
+
const ObservationSchema = Schema.TaggedStruct("Observation", {
|
|
353
|
+
provider: Schema.Array(ObservationEvidence.Schema),
|
|
354
|
+
publicDns: Schema.Array(ObservationEvidence.Schema)
|
|
277
355
|
});
|
|
278
|
-
|
|
356
|
+
/** Constructs a DNS observation response from trusted host data. */
|
|
357
|
+
function Observation(input) {
|
|
358
|
+
return ObservationSchema.make(input);
|
|
359
|
+
}
|
|
360
|
+
(function(_Observation) {
|
|
361
|
+
_Observation.Schema = ObservationSchema;
|
|
362
|
+
})(Observation || (Observation = {}));
|
|
363
|
+
const CleanupOperationSchema = Schema.TaggedUnion({
|
|
279
364
|
AlreadyAbsent: {
|
|
280
365
|
id: Schema.String,
|
|
281
366
|
record: DnsRecord
|
|
@@ -290,20 +375,41 @@ const CleanupOperation = Schema.TaggedUnion({
|
|
|
290
375
|
record: DnsRecord
|
|
291
376
|
}
|
|
292
377
|
});
|
|
293
|
-
|
|
378
|
+
/** Cleanup operation schema and constructors for trusted host responses. */
|
|
379
|
+
const CleanupOperation = {
|
|
380
|
+
Schema: CleanupOperationSchema,
|
|
381
|
+
AlreadyAbsent: (input) => CleanupOperationSchema.cases.AlreadyAbsent.make(input),
|
|
382
|
+
Blocked: (input) => CleanupOperationSchema.cases.Blocked.make(input),
|
|
383
|
+
Delete: (input) => CleanupOperationSchema.cases.Delete.make(input)
|
|
384
|
+
};
|
|
385
|
+
const CleanupPlanSchema = Schema.TaggedStruct("CleanupPlan", {
|
|
294
386
|
digest: Schema.String,
|
|
295
387
|
expiresAt: Schema.String,
|
|
296
|
-
operations: Schema.Array(CleanupOperation)
|
|
388
|
+
operations: Schema.Array(CleanupOperation.Schema)
|
|
297
389
|
});
|
|
390
|
+
/** Constructs a cleanup plan response from trusted host data. */
|
|
391
|
+
function CleanupPlan(input) {
|
|
392
|
+
return CleanupPlanSchema.make(input);
|
|
393
|
+
}
|
|
394
|
+
(function(_CleanupPlan) {
|
|
395
|
+
_CleanupPlan.Schema = CleanupPlanSchema;
|
|
396
|
+
})(CleanupPlan || (CleanupPlan = {}));
|
|
298
397
|
const CleanupOutcomeFields = {
|
|
299
398
|
operationId: Schema.String,
|
|
300
|
-
results: Schema.Array(OperationResult)
|
|
399
|
+
results: Schema.Array(OperationResult.Schema)
|
|
301
400
|
};
|
|
302
|
-
const
|
|
401
|
+
const CleanupResultSchema = Schema.TaggedUnion({
|
|
303
402
|
Cleaned: CleanupOutcomeFields,
|
|
304
403
|
Partial: CleanupOutcomeFields,
|
|
305
404
|
Stale: { message: Schema.String }
|
|
306
405
|
});
|
|
406
|
+
/** Cleanup result schema and constructors for trusted host responses. */
|
|
407
|
+
const CleanupResult = {
|
|
408
|
+
Schema: CleanupResultSchema,
|
|
409
|
+
Cleaned: (input) => CleanupResultSchema.cases.Cleaned.make(input),
|
|
410
|
+
Partial: (input) => CleanupResultSchema.cases.Partial.make(input),
|
|
411
|
+
Stale: (input) => CleanupResultSchema.cases.Stale.make(input)
|
|
412
|
+
};
|
|
307
413
|
var Service = class extends Context.Service()("@domainkit/Transport") {};
|
|
308
414
|
/** Converts a Promise-shaped host implementation into the canonical Effect service. */
|
|
309
415
|
const fromAsync = (transport, options = {}) => {
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Lifecycle.Service","Connection.DomainAttachment","Connection.ProviderConnection","Connection.ProviderTarget","packageJson.version"],"sources":["../src/auth/connection-lifecycle.ts","../src/auth/connection-api.ts","../src/auth/lifecycle-api.ts","../src/providers/cloudflare/index.ts","../src/providers/vercel/index.ts","../src/transport.ts","../src/index.ts"],"sourcesContent":["import { Effect } from \"effect\";\n\nimport * as Connection from \"./connection.ts\";\nimport * as Lifecycle from \"./lifecycle-repository.ts\";\nimport * as ProviderAuthorization from \"./authorization.ts\";\n\n/** Attach one exact provider target to one organization domain. */\nexport const attach = Effect.fn(\"ManagedDnsConnections.attach\")(function* (input: {\n readonly attachment: Connection.DomainAttachment;\n readonly connectionId: string;\n readonly ownerId: string;\n}) {\n const service = yield* Lifecycle.Service;\n return yield* service.attach(input);\n});\n\n/** Remove one domain attachment while retaining the organization connection. */\nexport const detach = Effect.fn(\"ManagedDnsConnections.detach\")(function* (input: {\n readonly attachmentId: string;\n readonly ownerId: string;\n}) {\n const service = yield* Lifecycle.Service;\n return yield* service.detach(input);\n});\n\n/** Disconnect one organization connection, revoking the shared authorization only when final. */\nexport function disconnect<E>(input: {\n readonly connectionId: string;\n readonly ownerId: string;\n readonly revokeAuthorization: (\n authorization: ProviderAuthorization.ProviderAuthorization,\n ) => Effect.Effect<void, E>;\n}): Effect.Effect<Lifecycle.DisconnectResult, Lifecycle.Error | E, Lifecycle.Service> {\n return Effect.gen(function* () {\n const service = yield* Lifecycle.Service;\n return yield* service.disconnect({\n connectionId: input.connectionId,\n ownerId: input.ownerId,\n revoke: input.revokeAuthorization,\n });\n });\n}\n","export {\n AuthorizationError,\n authorizationError,\n ConnectionStatus,\n decode,\n DomainAttachment,\n encode,\n ProviderConnection,\n ProviderTarget,\n ProviderTargetEvidence,\n project,\n validate,\n} from \"./connection.ts\";\nexport { attach, detach, disconnect } from \"./connection-lifecycle.ts\";\nexport type { AttachmentResult, DetachResult, DisconnectResult } from \"./lifecycle-repository.ts\";\nexport { complete, Error, Method, start, StartResult } from \"./connect.ts\";\nexport type {\n Authentication,\n AuthenticationFailure,\n BaseInput,\n CompleteInput,\n Continuation,\n ContinuationStore,\n Failure,\n InteractiveFlow,\n InteractiveStart,\n Method as ConnectionMethod,\n StartResult as ConnectionStartResult,\n} from \"./connect.ts\";\n","/** Public surface for the cohesive managed-DNS persistence capability. */\nexport { AggregateSchema, Error, Service } from \"./lifecycle-repository.ts\";\nexport * as Authorization from \"./authorization.ts\";\nexport { StoredConnection } from \"./connection.ts\";\nexport type { StoredCredential } from \"./connection.ts\";\nexport type {\n Aggregate,\n AttachmentResult,\n ConnectInput,\n DetachResult,\n DisconnectResult,\n Interface,\n} from \"./lifecycle-repository.ts\";\n","export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { discovery, make } from \"./client.ts\";\nexport type { Account, Fetch, Interface, ListZonesInput, Options, Zone } from \"./client.ts\";\n","export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { AccountContext, discovery, make } from \"./client.ts\";\nexport type { Account, Fetch, Interface, ListZonesInput, Options, Zone } from \"./client.ts\";\n","import { Context, Data, Effect, Layer, Schema } from \"effect\";\n\nimport * as Connection from \"./auth/connection.ts\";\nimport type * as DomainDnsRecord from \"./domain/dns-record.ts\";\n\nexport {\n DomainAttachment,\n ProviderConnection,\n ProviderTarget,\n ProviderTargetEvidence,\n} from \"./auth/connection.ts\";\n\n/** A user-presentable failure at the application transport boundary. */\nexport class Failure extends Schema.TaggedError<Failure>()(\"Failure\", {\n message: Schema.String,\n operation: Schema.String,\n retry: Schema.Literals([\"never\", \"after-user-action\", \"safe\", \"unknown\"]),\n}) {}\n\nexport const AuthenticationParameter = Schema.Struct({\n description: Schema.optionalKey(Schema.String),\n key: Schema.String,\n label: Schema.String,\n placeholder: Schema.optionalKey(Schema.String),\n required: Schema.optionalKey(Schema.Boolean),\n});\nexport type AuthenticationParameter = typeof AuthenticationParameter.Type;\n\nexport const AuthenticationMethod = Schema.TaggedUnion({\n Integration: { label: Schema.String },\n OAuth: { label: Schema.String },\n Token: {\n label: Schema.String,\n parameters: Schema.optionalKey(Schema.Array(AuthenticationParameter)),\n placeholder: Schema.optionalKey(Schema.String),\n },\n});\nexport type AuthenticationMethod = typeof AuthenticationMethod.Type;\n\n/** The authentication choice supplied to a connection request. */\nexport type Method = Data.TaggedEnum<{\n Integration: {};\n OAuth: {};\n Token: {\n readonly parameters?: Readonly<Record<string, string>>;\n readonly token: string;\n };\n}>;\nexport const Method = Data.taggedEnum<Method>();\n\nexport const Provider = Schema.Struct({\n authentication: Schema.Array(AuthenticationMethod),\n id: Schema.String,\n name: Schema.String,\n});\nexport type Provider = typeof Provider.Type;\n\nexport const Connected = Schema.TaggedStruct(\"Connected\", {\n attachment: Connection.DomainAttachment,\n connection: Connection.ProviderConnection,\n provider: Provider,\n});\nexport type Connected = typeof Connected.Type;\n\nexport const ReusableConnection = Schema.Struct({\n connection: Connection.ProviderConnection,\n targets: Schema.Array(Connection.ProviderTarget),\n});\nexport type ReusableConnection = typeof ReusableConnection.Type;\n\nexport const Disconnected = Schema.TaggedStruct(\"Disconnected\", {\n domain: Schema.String,\n provider: Provider,\n reusableConnections: Schema.Array(ReusableConnection),\n});\nexport type Disconnected = typeof Disconnected.Type;\n\nexport const Unsupported = Schema.TaggedStruct(\"Unsupported\", { domain: Schema.String });\nexport type Unsupported = typeof Unsupported.Type;\n\nexport const ConnectionSnapshot = Schema.Union([Connected, Disconnected, Unsupported]).pipe(\n Schema.toTaggedUnion(\"_tag\"),\n);\nexport type ConnectionSnapshot = typeof ConnectionSnapshot.Type;\n\nexport const Redirect = Schema.TaggedStruct(\"Redirect\", { authorizationUrl: Schema.String });\nexport type Redirect = typeof Redirect.Type;\n\nexport const ConnectionResult = Schema.Union([Connected, Redirect]).pipe(\n Schema.toTaggedUnion(\"_tag\"),\n);\nexport type ConnectionResult = typeof ConnectionResult.Type;\n\nexport const DetachResult = Schema.TaggedStruct(\"Detached\", {\n attachment: Connection.DomainAttachment,\n connection: Connection.ProviderConnection,\n remainingAttachments: Schema.Int,\n});\nexport type DetachResult = typeof DetachResult.Type;\n\n/** A presentation projection of a DNS requirement. */\nexport const DnsRecord = Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n priority: Schema.optionalKey(Schema.Int),\n type: Schema.String,\n value: Schema.String,\n});\nexport type DnsRecord = typeof DnsRecord.Type;\n\n/** Projects DomainKit's operational record into its application transport representation. */\nexport const fromDnsRecord = (id: string, record: DomainDnsRecord.DnsRecord): DnsRecord => {\n switch (record._tag) {\n case \"A\":\n case \"AAAA\":\n return { id, name: record.name, type: record._tag, value: record.address };\n case \"CNAME\":\n case \"NS\":\n return { id, name: record.name, type: record._tag, value: record.target };\n case \"TXT\":\n return { id, name: record.name, type: record._tag, value: record.value };\n case \"MX\":\n return {\n id,\n name: record.name,\n priority: record.priority,\n type: record._tag,\n value: record.exchange,\n };\n case \"CAA\":\n return {\n id,\n name: record.name,\n type: record._tag,\n value: `${record.flags} ${record.tag} ${record.value}`,\n };\n case \"SRV\":\n return {\n id,\n name: record.name,\n priority: record.priority,\n type: record._tag,\n value: `${record.weight} ${record.port} ${record.target}`,\n };\n }\n};\n\nexport const PlanOperation = Schema.TaggedUnion({\n Conflict: { id: Schema.String, reason: Schema.String, record: DnsRecord },\n Create: { id: Schema.String, record: DnsRecord },\n Noop: { id: Schema.String, record: DnsRecord },\n});\nexport type PlanOperation = typeof PlanOperation.Type;\n\nexport const ProvisioningPlan = Schema.TaggedStruct(\"Plan\", {\n digest: Schema.String,\n expiresAt: Schema.String,\n operations: Schema.Array(PlanOperation),\n});\nexport type ProvisioningPlan = typeof ProvisioningPlan.Type;\n\nexport const OperationResult = Schema.TaggedUnion({\n Applied: { operationId: Schema.String },\n Failed: { message: Schema.String, operationId: Schema.String },\n Unchanged: { operationId: Schema.String },\n});\nexport type OperationResult = typeof OperationResult.Type;\n\nconst ApplyOutcomeFields = {\n operationId: Schema.String,\n receiptId: Schema.String,\n results: Schema.Array(OperationResult),\n};\nexport const ApplyResult = Schema.TaggedUnion({\n Applied: ApplyOutcomeFields,\n Partial: ApplyOutcomeFields,\n Stale: { message: Schema.String },\n});\nexport type ApplyResult = typeof ApplyResult.Type;\n\nexport const ObservationEvidence = Schema.TaggedUnion({\n Found: { recordId: Schema.String },\n Mismatch: { message: Schema.String, recordId: Schema.String },\n Missing: { recordId: Schema.String },\n Unavailable: { message: Schema.String, recordId: Schema.String },\n});\nexport type ObservationEvidence = typeof ObservationEvidence.Type;\n\nexport const Observation = Schema.TaggedStruct(\"Observation\", {\n provider: Schema.Array(ObservationEvidence),\n publicDns: Schema.Array(ObservationEvidence),\n});\nexport type Observation = typeof Observation.Type;\n\nexport const CleanupOperation = Schema.TaggedUnion({\n AlreadyAbsent: { id: Schema.String, record: DnsRecord },\n Blocked: { id: Schema.String, reason: Schema.String, record: DnsRecord },\n Delete: { id: Schema.String, record: DnsRecord },\n});\nexport type CleanupOperation = typeof CleanupOperation.Type;\n\nexport const CleanupPlan = Schema.TaggedStruct(\"CleanupPlan\", {\n digest: Schema.String,\n expiresAt: Schema.String,\n operations: Schema.Array(CleanupOperation),\n});\nexport type CleanupPlan = typeof CleanupPlan.Type;\n\nconst CleanupOutcomeFields = {\n operationId: Schema.String,\n results: Schema.Array(OperationResult),\n};\nexport const CleanupResult = Schema.TaggedUnion({\n Cleaned: CleanupOutcomeFields,\n Partial: CleanupOutcomeFields,\n Stale: { message: Schema.String },\n});\nexport type CleanupResult = typeof CleanupResult.Type;\n\nexport interface ConnectInput {\n readonly domain: string;\n readonly method: Method;\n readonly providerId: string;\n}\n\nexport interface InspectInput {\n readonly domain: string;\n}\n\nexport interface AttachInput {\n readonly connectionId: string;\n readonly domain: string;\n readonly target: Connection.ProviderTarget;\n}\n\nexport interface DetachInput {\n readonly attachmentId: string;\n readonly preserveDns: true;\n}\n\nexport interface ProvisioningPlanInput {\n readonly attachmentId: string;\n readonly domain: string;\n readonly records: ReadonlyArray<DnsRecord>;\n}\n\nexport interface ProvisioningApplyInput {\n readonly attachmentId: string;\n readonly domain: string;\n readonly planDigest: string;\n}\n\nexport interface ObserveInput {\n readonly attachmentId?: string;\n readonly domain: string;\n readonly records: ReadonlyArray<DnsRecord>;\n readonly sources: {\n readonly provider: boolean;\n readonly publicDns: boolean;\n };\n}\n\nexport interface CleanupPlanInput {\n readonly attachmentId: string;\n readonly domain: string;\n readonly receiptId: string;\n}\n\nexport interface CleanupApplyInput extends CleanupPlanInput {\n readonly planDigest: string;\n}\n\n/** Application-facing DNS connection and provisioning capability. */\nexport interface Interface {\n readonly cleanup: {\n readonly apply: (input: CleanupApplyInput) => Effect.Effect<CleanupResult, Failure>;\n readonly plan: (input: CleanupPlanInput) => Effect.Effect<CleanupPlan, Failure>;\n };\n readonly connection: {\n readonly attach: (input: AttachInput) => Effect.Effect<Connected, Failure>;\n readonly connect: (input: ConnectInput) => Effect.Effect<ConnectionResult, Failure>;\n readonly inspect: (input: InspectInput) => Effect.Effect<ConnectionSnapshot, Failure>;\n readonly detach: (input: DetachInput) => Effect.Effect<DetachResult, Failure>;\n };\n readonly provisioning: {\n readonly apply: (input: ProvisioningApplyInput) => Effect.Effect<ApplyResult, Failure>;\n readonly plan: (input: ProvisioningPlanInput) => Effect.Effect<ProvisioningPlan, Failure>;\n };\n readonly verification: {\n readonly observe: (input: ObserveInput) => Effect.Effect<Observation, Failure>;\n };\n}\n\nexport class Service extends Context.Service<Service, Interface>()(\"@domainkit/Transport\") {}\n\n/** Promise-shaped host seam for foreign runtimes and framework actions. */\nexport interface AsyncInterface {\n readonly cleanup: {\n readonly apply: (input: CleanupApplyInput) => Promise<CleanupResult>;\n readonly plan: (input: CleanupPlanInput) => Promise<CleanupPlan>;\n };\n readonly connection: {\n readonly attach: (input: AttachInput) => Promise<Connected>;\n readonly connect: (input: ConnectInput) => Promise<ConnectionResult>;\n readonly inspect: (input: InspectInput) => Promise<ConnectionSnapshot>;\n readonly detach: (input: DetachInput) => Promise<DetachResult>;\n };\n readonly provisioning: {\n readonly apply: (input: ProvisioningApplyInput) => Promise<ApplyResult>;\n readonly plan: (input: ProvisioningPlanInput) => Promise<ProvisioningPlan>;\n };\n readonly verification: {\n readonly observe: (input: ObserveInput) => Promise<Observation>;\n };\n}\n\nexport interface AsyncOptions {\n readonly onError?: (operation: string, cause: unknown) => Failure;\n}\n\n/** Converts a Promise-shaped host implementation into the canonical Effect service. */\nexport const fromAsync = (transport: AsyncInterface, options: AsyncOptions = {}): Interface => {\n const attempt = <A>(operation: string, evaluate: () => Promise<A>) =>\n Effect.tryPromise({\n try: evaluate,\n catch: (cause) =>\n options.onError?.(operation, cause) ??\n (cause instanceof Failure\n ? cause\n : new Failure({\n message: cause instanceof globalThis.Error ? cause.message : String(cause),\n operation,\n retry: \"unknown\",\n })),\n });\n return Service.of({\n cleanup: {\n apply: (input) => attempt(\"cleanup.apply\", () => transport.cleanup.apply(input)),\n plan: (input) => attempt(\"cleanup.plan\", () => transport.cleanup.plan(input)),\n },\n connection: {\n attach: (input) => attempt(\"connection.attach\", () => transport.connection.attach(input)),\n connect: (input) => attempt(\"connection.connect\", () => transport.connection.connect(input)),\n inspect: (input) => attempt(\"connection.inspect\", () => transport.connection.inspect(input)),\n detach: (input) => attempt(\"connection.detach\", () => transport.connection.detach(input)),\n },\n provisioning: {\n apply: (input) => attempt(\"provisioning.apply\", () => transport.provisioning.apply(input)),\n plan: (input) => attempt(\"provisioning.plan\", () => transport.provisioning.plan(input)),\n },\n verification: {\n observe: (input) =>\n attempt(\"verification.observe\", () => transport.verification.observe(input)),\n },\n });\n};\n\nexport const layerFromAsync = (\n transport: AsyncInterface,\n options?: AsyncOptions,\n): Layer.Layer<Service> => Layer.succeed(Service, fromAsync(transport, options));\n\n/** Converts an environment-free Effect service into its Promise-shaped host seam. */\nexport const toAsync = (transport: Interface): AsyncInterface => ({\n cleanup: {\n apply: (input) => Effect.runPromise(transport.cleanup.apply(input)),\n plan: (input) => Effect.runPromise(transport.cleanup.plan(input)),\n },\n connection: {\n attach: (input) => Effect.runPromise(transport.connection.attach(input)),\n connect: (input) => Effect.runPromise(transport.connection.connect(input)),\n inspect: (input) => Effect.runPromise(transport.connection.inspect(input)),\n detach: (input) => Effect.runPromise(transport.connection.detach(input)),\n },\n provisioning: {\n apply: (input) => Effect.runPromise(transport.provisioning.apply(input)),\n plan: (input) => Effect.runPromise(transport.provisioning.plan(input)),\n },\n verification: {\n observe: (input) => Effect.runPromise(transport.verification.observe(input)),\n },\n});\n","import packageJson from \"../package.json\" with { type: \"json\" };\n\n/** The current package version from the package manifest. */\nexport const VERSION = packageJson.version;\n\nexport * as Connection from \"./auth/connection-api.ts\";\nexport * as ManagedDnsConnections from \"./auth/lifecycle-api.ts\";\nexport * as Diagnostic from \"./auth/diagnostic.ts\";\nexport * as ProviderAuth from \"./auth/manifest.ts\";\nexport * as ProviderContext from \"./auth/provider-context.ts\";\nexport * as Secret from \"./auth/secret.ts\";\nexport * as ProviderDiscovery from \"./discovery/selection.ts\";\nexport * as ZoneDiscovery from \"./discovery/zone-discovery.ts\";\nexport * as Zones from \"./discovery/zones.ts\";\nexport * as DnsRecord from \"./domain/dns-record.ts\";\nexport * as DomainName from \"./domain/domain-name.ts\";\nexport * as InvalidInput from \"./invalid-input.ts\";\nexport * as DnsProvider from \"./provider/provider.ts\";\nexport * as ProviderSession from \"./provider/session.ts\";\nexport * as ConnectionAuthorization from \"./plan/connection-authorization.ts\";\nexport * as Digest from \"./plan/canonical-json.ts\";\nexport * as Deletion from \"./plan/deletion.ts\";\nexport * as Provisioning from \"./plan/plan.ts\";\nexport * as DnsPlan from \"./plan/types.ts\";\nexport * as Cloudflare from \"./providers/cloudflare/index.ts\";\nexport * as Vercel from \"./providers/vercel/index.ts\";\nexport * as Transport from \"./transport.ts\";\nexport * as CloudflareDnsOverHttps from \"./verification/cloudflare-doh.ts\";\nexport * as DnsData from \"./verification/dns-data.ts\";\nexport * as DnsOverHttps from \"./verification/doh.ts\";\nexport * as GoogleDnsOverHttps from \"./verification/google-doh.ts\";\nexport * as DnsResolverPool from \"./verification/resolver-pool.ts\";\nexport * as DnsResolver from \"./verification/resolver.ts\";\nexport * as Verification from \"./verification/verify.ts\";\n"],"mappings":";;;;;;;;AAOA,MAAa,SAAS,OAAO,GAAG,8BAA8B,CAAC,CAAC,WAAW,OAIxE;CAED,OAAO,QAAO,OADSA,UAAAA,CACD,OAAO,KAAK;AACpC,CAAC;;AAGD,MAAa,SAAS,OAAO,GAAG,8BAA8B,CAAC,CAAC,WAAW,OAGxE;CAED,OAAO,QAAO,OADSA,UAAAA,CACD,OAAO,KAAK;AACpC,CAAC;;AAGD,SAAgB,WAAc,OAMwD;CACpF,OAAO,OAAO,IAAI,aAAa;EAE7B,OAAO,QAAO,OADSA,UAAAA,CACD,WAAW;GAC/B,cAAc,MAAM;GACpB,SAAS,MAAM;GACf,QAAQ,MAAM;EAChB,CAAC;CACH,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AK5BA,IAAa,UAAb,cAA6B,OAAO,YAAqB,CAAC,CAAC,WAAW;CACpE,SAAS,OAAO;CAChB,WAAW,OAAO;CAClB,OAAO,OAAO,SAAS;EAAC;EAAS;EAAqB;EAAQ;CAAS,CAAC;AAC1E,CAAC,CAAC,CAAC,CAAC;AAEJ,MAAa,0BAA0B,OAAO,OAAO;CACnD,aAAa,OAAO,YAAY,OAAO,MAAM;CAC7C,KAAK,OAAO;CACZ,OAAO,OAAO;CACd,aAAa,OAAO,YAAY,OAAO,MAAM;CAC7C,UAAU,OAAO,YAAY,OAAO,OAAO;AAC7C,CAAC;AAGD,MAAa,uBAAuB,OAAO,YAAY;CACrD,aAAa,EAAE,OAAO,OAAO,OAAO;CACpC,OAAO,EAAE,OAAO,OAAO,OAAO;CAC9B,OAAO;EACL,OAAO,OAAO;EACd,YAAY,OAAO,YAAY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AU,WAAW,OAAO,KAAK,CAAC;CACzE;CACA,cAAc;EACZ,QAAQ,UAAU,OAAO,WAAW,UAAU,aAAa,MAAM,KAAK,CAAC;EACvE,OAAO,UAAU,OAAO,WAAW,UAAU,aAAa,KAAK,KAAK,CAAC;CACvE;CACA,cAAc,EACZ,UAAU,UAAU,OAAO,WAAW,UAAU,aAAa,QAAQ,KAAK,CAAC,EAC7E;AACF;;;;AC1XA,MAAa,UAAUE"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Lifecycle.Service","S","Connection.DomainAttachment","Connection.ProviderConnection","Connection.ProviderTarget","packageJson.version"],"sources":["../src/auth/connection-lifecycle.ts","../src/auth/connection-api.ts","../src/auth/lifecycle-api.ts","../src/providers/cloudflare/index.ts","../src/providers/vercel/index.ts","../src/transport.ts","../src/index.ts"],"sourcesContent":["import { Effect } from \"effect\";\n\nimport * as Connection from \"./connection.ts\";\nimport * as Lifecycle from \"./lifecycle-repository.ts\";\nimport * as ProviderAuthorization from \"./authorization.ts\";\n\n/** Attach one exact provider target to one organization domain. */\nexport const attach = Effect.fn(\"ManagedDnsConnections.attach\")(function* (input: {\n readonly attachment: Connection.DomainAttachment;\n readonly connectionId: string;\n readonly ownerId: string;\n}) {\n const service = yield* Lifecycle.Service;\n return yield* service.attach(input);\n});\n\n/** Remove one domain attachment while retaining the organization connection. */\nexport const detach = Effect.fn(\"ManagedDnsConnections.detach\")(function* (input: {\n readonly attachmentId: string;\n readonly ownerId: string;\n}) {\n const service = yield* Lifecycle.Service;\n return yield* service.detach(input);\n});\n\n/** Disconnect one organization connection, revoking the shared authorization only when final. */\nexport function disconnect<E>(input: {\n readonly connectionId: string;\n readonly ownerId: string;\n readonly revokeAuthorization: (\n authorization: ProviderAuthorization.ProviderAuthorization,\n ) => Effect.Effect<void, E>;\n}): Effect.Effect<Lifecycle.DisconnectResult, Lifecycle.Error | E, Lifecycle.Service> {\n return Effect.gen(function* () {\n const service = yield* Lifecycle.Service;\n return yield* service.disconnect({\n connectionId: input.connectionId,\n ownerId: input.ownerId,\n revoke: input.revokeAuthorization,\n });\n });\n}\n","export {\n AuthorizationError,\n authorizationError,\n ConnectionStatus,\n decode,\n DomainAttachment,\n encode,\n ProviderConnection,\n ProviderTarget,\n ProviderTargetEvidence,\n project,\n validate,\n} from \"./connection.ts\";\nexport { attach, detach, disconnect } from \"./connection-lifecycle.ts\";\nexport type { AttachmentResult, DetachResult, DisconnectResult } from \"./lifecycle-repository.ts\";\nexport { complete, Error, Method, start, StartResult } from \"./connect.ts\";\nexport type {\n Authentication,\n AuthenticationFailure,\n BaseInput,\n CompleteInput,\n Continuation,\n ContinuationStore,\n Failure,\n InteractiveFlow,\n InteractiveStart,\n Method as ConnectionMethod,\n StartResult as ConnectionStartResult,\n} from \"./connect.ts\";\n","/** Public surface for the cohesive managed-DNS persistence capability. */\nexport { AggregateSchema, Error, Service } from \"./lifecycle-repository.ts\";\nexport * as Authorization from \"./authorization.ts\";\nexport { StoredConnection } from \"./connection.ts\";\nexport type { StoredCredential } from \"./connection.ts\";\nexport type {\n Aggregate,\n AttachmentResult,\n ConnectInput,\n DetachResult,\n DisconnectResult,\n Interface,\n} from \"./lifecycle-repository.ts\";\n","export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { discovery, make } from \"./client.ts\";\nexport type { Account, Fetch, Interface, ListZonesInput, Options, Zone } from \"./client.ts\";\n","export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { AccountContext, discovery, make } from \"./client.ts\";\nexport type { Account, Fetch, Interface, ListZonesInput, Options, Zone } from \"./client.ts\";\n","import { Context, Data, Effect, Layer, Schema as S } from \"effect\";\n\nimport * as Connection from \"./auth/connection.ts\";\nimport type * as DomainDnsRecord from \"./domain/dns-record.ts\";\n\nexport {\n DomainAttachment,\n ProviderConnection,\n ProviderTarget,\n ProviderTargetEvidence,\n} from \"./auth/connection.ts\";\n\n/** A user-presentable failure at the application transport boundary. */\nexport class Failure extends S.TaggedError<Failure>()(\"Failure\", {\n message: S.String,\n operation: S.String,\n retry: S.Literals([\"never\", \"after-user-action\", \"safe\", \"unknown\"]),\n}) {}\n\nexport const AuthenticationParameter = S.Struct({\n description: S.optionalKey(S.String),\n key: S.String,\n label: S.String,\n placeholder: S.optionalKey(S.String),\n required: S.optionalKey(S.Boolean),\n});\nexport type AuthenticationParameter = typeof AuthenticationParameter.Type;\n\nconst AuthenticationMethodSchema = S.TaggedUnion({\n Integration: { label: S.String },\n OAuth: { label: S.String },\n Token: {\n label: S.String,\n parameters: S.optionalKey(S.Array(AuthenticationParameter)),\n placeholder: S.optionalKey(S.String),\n },\n});\n\n/** Authentication method schema and constructors for trusted host transport responses. */\nexport const AuthenticationMethod = {\n Schema: AuthenticationMethodSchema,\n Integration: (input: Parameters<typeof AuthenticationMethodSchema.cases.Integration.make>[0]) =>\n AuthenticationMethodSchema.cases.Integration.make(input),\n OAuth: (input: Parameters<typeof AuthenticationMethodSchema.cases.OAuth.make>[0]) =>\n AuthenticationMethodSchema.cases.OAuth.make(input),\n Token: (input: Parameters<typeof AuthenticationMethodSchema.cases.Token.make>[0]) =>\n AuthenticationMethodSchema.cases.Token.make(input),\n};\nexport type AuthenticationMethod = typeof AuthenticationMethodSchema.Type;\n\n/** The authentication choice supplied to a connection request. */\nexport type Method = Data.TaggedEnum<{\n Integration: {};\n OAuth: {};\n Token: {\n readonly parameters?: Readonly<Record<string, string>>;\n readonly token: string;\n };\n}>;\nexport const Method = Data.taggedEnum<Method>();\n\nexport const Provider = S.Struct({\n authentication: S.Array(AuthenticationMethod.Schema),\n id: S.String,\n name: S.String,\n});\nexport type Provider = typeof Provider.Type;\n\nconst ConnectedSchema = S.TaggedStruct(\"Connected\", {\n attachment: Connection.DomainAttachment,\n connection: Connection.ProviderConnection,\n provider: Provider,\n});\n/** Constructs a connected transport snapshot from trusted host data. */\nexport function Connected(input: Parameters<typeof ConnectedSchema.make>[0]): Connected {\n return ConnectedSchema.make(input);\n}\nexport namespace Connected {\n export const Schema = ConnectedSchema;\n}\nexport type Connected = typeof ConnectedSchema.Type;\n\nexport const ReusableConnection = S.Struct({\n connection: Connection.ProviderConnection,\n targets: S.Array(Connection.ProviderTarget),\n});\nexport type ReusableConnection = typeof ReusableConnection.Type;\n\nconst DisconnectedSchema = S.TaggedStruct(\"Disconnected\", {\n domain: S.String,\n provider: Provider,\n reusableConnections: S.Array(ReusableConnection),\n});\n/** Constructs a disconnected transport snapshot from trusted host data. */\nexport function Disconnected(input: Parameters<typeof DisconnectedSchema.make>[0]): Disconnected {\n return DisconnectedSchema.make(input);\n}\nexport namespace Disconnected {\n export const Schema = DisconnectedSchema;\n}\nexport type Disconnected = typeof DisconnectedSchema.Type;\n\nconst UnsupportedSchema = S.TaggedStruct(\"Unsupported\", { domain: S.String });\n/** Constructs an unsupported transport snapshot from trusted host data. */\nexport function Unsupported(input: Parameters<typeof UnsupportedSchema.make>[0]): Unsupported {\n return UnsupportedSchema.make(input);\n}\nexport namespace Unsupported {\n export const Schema = UnsupportedSchema;\n}\nexport type Unsupported = typeof UnsupportedSchema.Type;\n\nexport const ConnectionSnapshot = S.Union([\n ConnectedSchema,\n DisconnectedSchema,\n UnsupportedSchema,\n]).pipe(S.toTaggedUnion(\"_tag\"));\nexport type ConnectionSnapshot = typeof ConnectionSnapshot.Type;\n\nconst RedirectSchema = S.TaggedStruct(\"Redirect\", { authorizationUrl: S.String });\n/** Constructs an OAuth redirect response from trusted host data. */\nexport function Redirect(input: Parameters<typeof RedirectSchema.make>[0]): Redirect {\n return RedirectSchema.make(input);\n}\nexport namespace Redirect {\n export const Schema = RedirectSchema;\n}\nexport type Redirect = typeof RedirectSchema.Type;\n\nexport const ConnectionResult = S.Union([ConnectedSchema, RedirectSchema]).pipe(\n S.toTaggedUnion(\"_tag\"),\n);\nexport type ConnectionResult = typeof ConnectionResult.Type;\n\nconst DetachResultSchema = S.TaggedStruct(\"Detached\", {\n attachment: Connection.DomainAttachment,\n connection: Connection.ProviderConnection,\n remainingAttachments: S.Int,\n});\n/** Constructs a detach response from trusted host data. */\nexport function DetachResult(input: Parameters<typeof DetachResultSchema.make>[0]): DetachResult {\n return DetachResultSchema.make(input);\n}\nexport namespace DetachResult {\n export const Schema = DetachResultSchema;\n}\nexport type DetachResult = typeof DetachResultSchema.Type;\n\n/** A presentation projection of a DNS requirement. */\nexport const DnsRecord = S.Struct({\n id: S.String,\n name: S.String,\n priority: S.optionalKey(S.Int),\n type: S.String,\n value: S.String,\n});\nexport type DnsRecord = typeof DnsRecord.Type;\n\n/** Projects DomainKit's operational record into its application transport representation. */\nexport const fromDnsRecord = (id: string, record: DomainDnsRecord.DnsRecord): DnsRecord => {\n switch (record._tag) {\n case \"A\":\n case \"AAAA\":\n return { id, name: record.name, type: record._tag, value: record.address };\n case \"CNAME\":\n case \"NS\":\n return { id, name: record.name, type: record._tag, value: record.target };\n case \"TXT\":\n return { id, name: record.name, type: record._tag, value: record.value };\n case \"MX\":\n return {\n id,\n name: record.name,\n priority: record.priority,\n type: record._tag,\n value: record.exchange,\n };\n case \"CAA\":\n return {\n id,\n name: record.name,\n type: record._tag,\n value: `${record.flags} ${record.tag} ${record.value}`,\n };\n case \"SRV\":\n return {\n id,\n name: record.name,\n priority: record.priority,\n type: record._tag,\n value: `${record.weight} ${record.port} ${record.target}`,\n };\n }\n};\n\nconst PlanOperationSchema = S.TaggedUnion({\n Conflict: { id: S.String, reason: S.String, record: DnsRecord },\n Create: { id: S.String, record: DnsRecord },\n Noop: { id: S.String, record: DnsRecord },\n});\n/** Provisioning operation schema and constructors for trusted host responses. */\nexport const PlanOperation = {\n Schema: PlanOperationSchema,\n Conflict: (input: Parameters<typeof PlanOperationSchema.cases.Conflict.make>[0]) =>\n PlanOperationSchema.cases.Conflict.make(input),\n Create: (input: Parameters<typeof PlanOperationSchema.cases.Create.make>[0]) =>\n PlanOperationSchema.cases.Create.make(input),\n Noop: (input: Parameters<typeof PlanOperationSchema.cases.Noop.make>[0]) =>\n PlanOperationSchema.cases.Noop.make(input),\n};\nexport type PlanOperation = typeof PlanOperationSchema.Type;\n\nconst ProvisioningPlanSchema = S.TaggedStruct(\"Plan\", {\n digest: S.String,\n expiresAt: S.String,\n operations: S.Array(PlanOperation.Schema),\n});\n/** Constructs a provisioning plan response from trusted host data. */\nexport function ProvisioningPlan(\n input: Parameters<typeof ProvisioningPlanSchema.make>[0],\n): ProvisioningPlan {\n return ProvisioningPlanSchema.make(input);\n}\nexport namespace ProvisioningPlan {\n export const Schema = ProvisioningPlanSchema;\n}\nexport type ProvisioningPlan = typeof ProvisioningPlanSchema.Type;\n\nconst OperationResultSchema = S.TaggedUnion({\n Applied: { operationId: S.String },\n Failed: { message: S.String, operationId: S.String },\n Unchanged: { operationId: S.String },\n});\n/** Per-operation result schema and constructors for trusted host responses. */\nexport const OperationResult = {\n Schema: OperationResultSchema,\n Applied: (input: Parameters<typeof OperationResultSchema.cases.Applied.make>[0]) =>\n OperationResultSchema.cases.Applied.make(input),\n Failed: (input: Parameters<typeof OperationResultSchema.cases.Failed.make>[0]) =>\n OperationResultSchema.cases.Failed.make(input),\n Unchanged: (input: Parameters<typeof OperationResultSchema.cases.Unchanged.make>[0]) =>\n OperationResultSchema.cases.Unchanged.make(input),\n};\nexport type OperationResult = typeof OperationResultSchema.Type;\n\nconst ApplyOutcomeFields = {\n operationId: S.String,\n receiptId: S.String,\n results: S.Array(OperationResult.Schema),\n};\nconst ApplyResultSchema = S.TaggedUnion({\n Applied: ApplyOutcomeFields,\n Partial: ApplyOutcomeFields,\n Stale: { message: S.String },\n});\n/** Apply result schema and constructors for trusted host responses. */\nexport const ApplyResult = {\n Schema: ApplyResultSchema,\n Applied: (input: Parameters<typeof ApplyResultSchema.cases.Applied.make>[0]) =>\n ApplyResultSchema.cases.Applied.make(input),\n Partial: (input: Parameters<typeof ApplyResultSchema.cases.Partial.make>[0]) =>\n ApplyResultSchema.cases.Partial.make(input),\n Stale: (input: Parameters<typeof ApplyResultSchema.cases.Stale.make>[0]) =>\n ApplyResultSchema.cases.Stale.make(input),\n};\nexport type ApplyResult = typeof ApplyResultSchema.Type;\n\nconst ObservationEvidenceSchema = S.TaggedUnion({\n Found: { recordId: S.String },\n Mismatch: { message: S.String, recordId: S.String },\n Missing: { recordId: S.String },\n Unavailable: { message: S.String, recordId: S.String },\n});\n/** DNS observation evidence schema and constructors for trusted host responses. */\nexport const ObservationEvidence = {\n Schema: ObservationEvidenceSchema,\n Found: (input: Parameters<typeof ObservationEvidenceSchema.cases.Found.make>[0]) =>\n ObservationEvidenceSchema.cases.Found.make(input),\n Mismatch: (input: Parameters<typeof ObservationEvidenceSchema.cases.Mismatch.make>[0]) =>\n ObservationEvidenceSchema.cases.Mismatch.make(input),\n Missing: (input: Parameters<typeof ObservationEvidenceSchema.cases.Missing.make>[0]) =>\n ObservationEvidenceSchema.cases.Missing.make(input),\n Unavailable: (input: Parameters<typeof ObservationEvidenceSchema.cases.Unavailable.make>[0]) =>\n ObservationEvidenceSchema.cases.Unavailable.make(input),\n};\nexport type ObservationEvidence = typeof ObservationEvidenceSchema.Type;\n\nconst ObservationSchema = S.TaggedStruct(\"Observation\", {\n provider: S.Array(ObservationEvidence.Schema),\n publicDns: S.Array(ObservationEvidence.Schema),\n});\n/** Constructs a DNS observation response from trusted host data. */\nexport function Observation(input: Parameters<typeof ObservationSchema.make>[0]): Observation {\n return ObservationSchema.make(input);\n}\nexport namespace Observation {\n export const Schema = ObservationSchema;\n}\nexport type Observation = typeof ObservationSchema.Type;\n\nconst CleanupOperationSchema = S.TaggedUnion({\n AlreadyAbsent: { id: S.String, record: DnsRecord },\n Blocked: { id: S.String, reason: S.String, record: DnsRecord },\n Delete: { id: S.String, record: DnsRecord },\n});\n/** Cleanup operation schema and constructors for trusted host responses. */\nexport const CleanupOperation = {\n Schema: CleanupOperationSchema,\n AlreadyAbsent: (input: Parameters<typeof CleanupOperationSchema.cases.AlreadyAbsent.make>[0]) =>\n CleanupOperationSchema.cases.AlreadyAbsent.make(input),\n Blocked: (input: Parameters<typeof CleanupOperationSchema.cases.Blocked.make>[0]) =>\n CleanupOperationSchema.cases.Blocked.make(input),\n Delete: (input: Parameters<typeof CleanupOperationSchema.cases.Delete.make>[0]) =>\n CleanupOperationSchema.cases.Delete.make(input),\n};\nexport type CleanupOperation = typeof CleanupOperationSchema.Type;\n\nconst CleanupPlanSchema = S.TaggedStruct(\"CleanupPlan\", {\n digest: S.String,\n expiresAt: S.String,\n operations: S.Array(CleanupOperation.Schema),\n});\n/** Constructs a cleanup plan response from trusted host data. */\nexport function CleanupPlan(input: Parameters<typeof CleanupPlanSchema.make>[0]): CleanupPlan {\n return CleanupPlanSchema.make(input);\n}\nexport namespace CleanupPlan {\n export const Schema = CleanupPlanSchema;\n}\nexport type CleanupPlan = typeof CleanupPlanSchema.Type;\n\nconst CleanupOutcomeFields = {\n operationId: S.String,\n results: S.Array(OperationResult.Schema),\n};\nconst CleanupResultSchema = S.TaggedUnion({\n Cleaned: CleanupOutcomeFields,\n Partial: CleanupOutcomeFields,\n Stale: { message: S.String },\n});\n/** Cleanup result schema and constructors for trusted host responses. */\nexport const CleanupResult = {\n Schema: CleanupResultSchema,\n Cleaned: (input: Parameters<typeof CleanupResultSchema.cases.Cleaned.make>[0]) =>\n CleanupResultSchema.cases.Cleaned.make(input),\n Partial: (input: Parameters<typeof CleanupResultSchema.cases.Partial.make>[0]) =>\n CleanupResultSchema.cases.Partial.make(input),\n Stale: (input: Parameters<typeof CleanupResultSchema.cases.Stale.make>[0]) =>\n CleanupResultSchema.cases.Stale.make(input),\n};\nexport type CleanupResult = typeof CleanupResultSchema.Type;\n\nexport interface ConnectInput {\n readonly domain: string;\n readonly method: Method;\n readonly providerId: string;\n}\n\nexport interface InspectInput {\n readonly domain: string;\n}\n\nexport interface AttachInput {\n readonly connectionId: string;\n readonly domain: string;\n readonly target: Connection.ProviderTarget;\n}\n\nexport interface DetachInput {\n readonly attachmentId: string;\n readonly preserveDns: true;\n}\n\nexport interface ProvisioningPlanInput {\n readonly attachmentId: string;\n readonly domain: string;\n readonly records: ReadonlyArray<DnsRecord>;\n}\n\nexport interface ProvisioningApplyInput {\n readonly attachmentId: string;\n readonly domain: string;\n readonly planDigest: string;\n}\n\nexport interface ObserveInput {\n readonly attachmentId?: string;\n readonly domain: string;\n readonly records: ReadonlyArray<DnsRecord>;\n readonly sources: {\n readonly provider: boolean;\n readonly publicDns: boolean;\n };\n}\n\nexport interface CleanupPlanInput {\n readonly attachmentId: string;\n readonly domain: string;\n readonly receiptId: string;\n}\n\nexport interface CleanupApplyInput extends CleanupPlanInput {\n readonly planDigest: string;\n}\n\n/** Application-facing DNS connection and provisioning capability. */\nexport interface Interface {\n readonly cleanup: {\n readonly apply: (input: CleanupApplyInput) => Effect.Effect<CleanupResult, Failure>;\n readonly plan: (input: CleanupPlanInput) => Effect.Effect<CleanupPlan, Failure>;\n };\n readonly connection: {\n readonly attach: (input: AttachInput) => Effect.Effect<Connected, Failure>;\n readonly connect: (input: ConnectInput) => Effect.Effect<ConnectionResult, Failure>;\n readonly inspect: (input: InspectInput) => Effect.Effect<ConnectionSnapshot, Failure>;\n readonly detach: (input: DetachInput) => Effect.Effect<DetachResult, Failure>;\n };\n readonly provisioning: {\n readonly apply: (input: ProvisioningApplyInput) => Effect.Effect<ApplyResult, Failure>;\n readonly plan: (input: ProvisioningPlanInput) => Effect.Effect<ProvisioningPlan, Failure>;\n };\n readonly verification: {\n readonly observe: (input: ObserveInput) => Effect.Effect<Observation, Failure>;\n };\n}\n\nexport class Service extends Context.Service<Service, Interface>()(\"@domainkit/Transport\") {}\n\n/** Promise-shaped host seam for foreign runtimes and framework actions. */\nexport interface AsyncInterface {\n readonly cleanup: {\n readonly apply: (input: CleanupApplyInput) => Promise<CleanupResult>;\n readonly plan: (input: CleanupPlanInput) => Promise<CleanupPlan>;\n };\n readonly connection: {\n readonly attach: (input: AttachInput) => Promise<Connected>;\n readonly connect: (input: ConnectInput) => Promise<ConnectionResult>;\n readonly inspect: (input: InspectInput) => Promise<ConnectionSnapshot>;\n readonly detach: (input: DetachInput) => Promise<DetachResult>;\n };\n readonly provisioning: {\n readonly apply: (input: ProvisioningApplyInput) => Promise<ApplyResult>;\n readonly plan: (input: ProvisioningPlanInput) => Promise<ProvisioningPlan>;\n };\n readonly verification: {\n readonly observe: (input: ObserveInput) => Promise<Observation>;\n };\n}\n\nexport interface AsyncOptions {\n readonly onError?: (operation: string, cause: unknown) => Failure;\n}\n\n/** Converts a Promise-shaped host implementation into the canonical Effect service. */\nexport const fromAsync = (transport: AsyncInterface, options: AsyncOptions = {}): Interface => {\n const attempt = <A>(operation: string, evaluate: () => Promise<A>) =>\n Effect.tryPromise({\n try: evaluate,\n catch: (cause) =>\n options.onError?.(operation, cause) ??\n (cause instanceof Failure\n ? cause\n : new Failure({\n message: cause instanceof globalThis.Error ? cause.message : String(cause),\n operation,\n retry: \"unknown\",\n })),\n });\n return Service.of({\n cleanup: {\n apply: (input) => attempt(\"cleanup.apply\", () => transport.cleanup.apply(input)),\n plan: (input) => attempt(\"cleanup.plan\", () => transport.cleanup.plan(input)),\n },\n connection: {\n attach: (input) => attempt(\"connection.attach\", () => transport.connection.attach(input)),\n connect: (input) => attempt(\"connection.connect\", () => transport.connection.connect(input)),\n inspect: (input) => attempt(\"connection.inspect\", () => transport.connection.inspect(input)),\n detach: (input) => attempt(\"connection.detach\", () => transport.connection.detach(input)),\n },\n provisioning: {\n apply: (input) => attempt(\"provisioning.apply\", () => transport.provisioning.apply(input)),\n plan: (input) => attempt(\"provisioning.plan\", () => transport.provisioning.plan(input)),\n },\n verification: {\n observe: (input) =>\n attempt(\"verification.observe\", () => transport.verification.observe(input)),\n },\n });\n};\n\nexport const layerFromAsync = (\n transport: AsyncInterface,\n options?: AsyncOptions,\n): Layer.Layer<Service> => Layer.succeed(Service, fromAsync(transport, options));\n\n/** Converts an environment-free Effect service into its Promise-shaped host seam. */\nexport const toAsync = (transport: Interface): AsyncInterface => ({\n cleanup: {\n apply: (input) => Effect.runPromise(transport.cleanup.apply(input)),\n plan: (input) => Effect.runPromise(transport.cleanup.plan(input)),\n },\n connection: {\n attach: (input) => Effect.runPromise(transport.connection.attach(input)),\n connect: (input) => Effect.runPromise(transport.connection.connect(input)),\n inspect: (input) => Effect.runPromise(transport.connection.inspect(input)),\n detach: (input) => Effect.runPromise(transport.connection.detach(input)),\n },\n provisioning: {\n apply: (input) => Effect.runPromise(transport.provisioning.apply(input)),\n plan: (input) => Effect.runPromise(transport.provisioning.plan(input)),\n },\n verification: {\n observe: (input) => Effect.runPromise(transport.verification.observe(input)),\n },\n});\n","import packageJson from \"../package.json\" with { type: \"json\" };\n\n/** The current package version from the package manifest. */\nexport const VERSION = packageJson.version;\n\nexport * as Connection from \"./auth/connection-api.ts\";\nexport * as ManagedDnsConnections from \"./auth/lifecycle-api.ts\";\nexport * as Diagnostic from \"./auth/diagnostic.ts\";\nexport * as ProviderAuth from \"./auth/manifest.ts\";\nexport * as ProviderContext from \"./auth/provider-context.ts\";\nexport * as Secret from \"./auth/secret.ts\";\nexport * as ProviderDiscovery from \"./discovery/selection.ts\";\nexport * as ZoneDiscovery from \"./discovery/zone-discovery.ts\";\nexport * as Zones from \"./discovery/zones.ts\";\nexport * as DnsRecord from \"./domain/dns-record.ts\";\nexport * as DomainName from \"./domain/domain-name.ts\";\nexport * as InvalidInput from \"./invalid-input.ts\";\nexport * as DnsProvider from \"./provider/provider.ts\";\nexport * as ProviderSession from \"./provider/session.ts\";\nexport * as ConnectionAuthorization from \"./plan/connection-authorization.ts\";\nexport * as Digest from \"./plan/canonical-json.ts\";\nexport * as Deletion from \"./plan/deletion.ts\";\nexport * as Provisioning from \"./plan/plan.ts\";\nexport * as DnsPlan from \"./plan/types.ts\";\nexport * as Cloudflare from \"./providers/cloudflare/index.ts\";\nexport * as Vercel from \"./providers/vercel/index.ts\";\nexport * as Transport from \"./transport.ts\";\nexport * as CloudflareDnsOverHttps from \"./verification/cloudflare-doh.ts\";\nexport * as DnsData from \"./verification/dns-data.ts\";\nexport * as DnsOverHttps from \"./verification/doh.ts\";\nexport * as GoogleDnsOverHttps from \"./verification/google-doh.ts\";\nexport * as DnsResolverPool from \"./verification/resolver-pool.ts\";\nexport * as DnsResolver from \"./verification/resolver.ts\";\nexport * as Verification from \"./verification/verify.ts\";\n"],"mappings":";;;;;;;;AAOA,MAAa,SAAS,OAAO,GAAG,8BAA8B,CAAC,CAAC,WAAW,OAIxE;CAED,OAAO,QAAO,OADSA,UAAAA,CACD,OAAO,KAAK;AACpC,CAAC;;AAGD,MAAa,SAAS,OAAO,GAAG,8BAA8B,CAAC,CAAC,WAAW,OAGxE;CAED,OAAO,QAAO,OADSA,UAAAA,CACD,OAAO,KAAK;AACpC,CAAC;;AAGD,SAAgB,WAAc,OAMwD;CACpF,OAAO,OAAO,IAAI,aAAa;EAE7B,OAAO,QAAO,OADSA,UAAAA,CACD,WAAW;GAC/B,cAAc,MAAM;GACpB,SAAS,MAAM;GACf,QAAQ,MAAM;EAChB,CAAC;CACH,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AK5BA,IAAa,UAAb,cAA6BC,OAAE,YAAqB,CAAC,CAAC,WAAW;CAC/D,SAASA,OAAE;CACX,WAAWA,OAAE;CACb,OAAOA,OAAE,SAAS;EAAC;EAAS;EAAqB;EAAQ;CAAS,CAAC;AACrE,CAAC,CAAC,CAAC,CAAC;AAEJ,MAAa,0BAA0BA,OAAE,OAAO;CAC9C,aAAaA,OAAE,YAAYA,OAAE,MAAM;CACnC,KAAKA,OAAE;CACP,OAAOA,OAAE;CACT,aAAaA,OAAE,YAAYA,OAAE,MAAM;CACnC,UAAUA,OAAE,YAAYA,OAAE,OAAO;AACnC,CAAC;AAGD,MAAM,6BAA6BA,OAAE,YAAY;CAC/C,aAAa,EAAE,OAAOA,OAAE,OAAO;CAC/B,OAAO,EAAE,OAAOA,OAAE,OAAO;CACzB,O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AQ,KAAK,KAAK,CAAC;CAClE;CACA,YAAY;EACV,SAAS,UAAU,OAAO,WAAW,UAAU,WAAW,OAAO,KAAK,CAAC;EACvE,UAAU,UAAU,OAAO,WAAW,UAAU,WAAW,QAAQ,KAAK,CAAC;EACzE,UAAU,UAAU,OAAO,WAAW,UAAU,WAAW,QAAQ,KAAK,CAAC;EACzE,SAAS,UAAU,OAAO,WAAW,UAAU,WAAW,OAAO,KAAK,CAAC;CACzE;CACA,cAAc;EACZ,QAAQ,UAAU,OAAO,WAAW,UAAU,aAAa,MAAM,KAAK,CAAC;EACvE,OAAO,UAAU,OAAO,WAAW,UAAU,aAAa,KAAK,KAAK,CAAC;CACvE;CACA,cAAc,EACZ,UAAU,UAAU,OAAO,WAAW,UAAU,aAAa,QAAQ,KAAK,CAAC,EAC7E;AACF;;;;AC/fA,MAAa,UAAUI"}
|
package/dist/promise.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as Schema$1, At as Schema$
|
|
2
|
-
import { $ as RestoreInput, A as Options$4, B as manifest$2, C as manifest$3, D as Fetch$1, E as AccountContext, F as OAuthMethodOptions, G as Interface$5, H as tokenMethod$2, I as RefreshCredentialOptions, J as Zone, K as ListZonesInput, L as SubjectResolverOptions, N as CredentialTarget, O as Interface$6, P as OAuthFlowOptions, Q as Resolution$1, R as TokenConnectionOptions, S as integrationMethod$1, T as Account$1, U as Account, V as oauthMethod$1, W as Fetch, X as Interface$4, Y as Credential, Z as ListTargetsInput, _ as ExchangeCodeOptions, b as IntegrationMethodOptions, c as Policy, f as Options$5, i as Result, j as Zone$1, k as ListZonesInput$1, m as Options$6, n as PublicDns$1, nt as selection_d_exports, o as DefaultOptions, q as Options$3, r as PublicDnsObservation, rt as diagnostic_d_exports, s as Observation, t as ProviderObservation, tt as zones_d_exports, u as Options$7, v as IntegrationCredential, w as tokenMethod$3, x as TokenConnectionOptions$1, y as IntegrationFlowOptions, z as TokenValidatorOptions } from "./verify-
|
|
3
|
-
import { A as renderManualInstructions$1, C as DiscoverCreateInput$1, E as ResolvedCreateResult, F as PlanAuthorization, H as Source$1, I as Receipt, L as Schema$
|
|
4
|
-
import { a as managed_dns_connections_d_exports, i as AsyncInterface$2, n as Method$1, r as connection_d_exports, t as InteractiveFlow } from "./connection-
|
|
1
|
+
import { $ as Schema$1, At as Schema$2, Ct as Txt, Dt as equals, J as Manifest, K as AsyncOAuthSubjectResolver, M as ProviderConnection, Mt as parse$1, N as ProviderTarget, Ot as parse, Pt as invalid_input_d_exports, St as Srv, Tt as data, W as ProviderAuthorization, X as OAuthClientConfiguration, Y as Method, Z as OAuthMethod, _ as provider_context_d_exports, _t as Ns, at as CreateResult, bt as RecordSchema, dt as Aaaa, et as TokenValidation, ft as Caa, gt as Mx, ht as Encoded, it as AsyncInterface, j as DomainAttachment, kt as DomainName, mt as DnsRecord, nt as Value, pt as Cname, rt as secret_d_exports, ut as A, vt as Observed, wt as Type, xt as RequirementMetadata, yt as Opaque } from "./connect-D-X8T9W8.mjs";
|
|
2
|
+
import { $ as RestoreInput, A as Options$4, B as manifest$2, C as manifest$3, D as Fetch$1, E as AccountContext, F as OAuthMethodOptions, G as Interface$5, H as tokenMethod$2, I as RefreshCredentialOptions, J as Zone, K as ListZonesInput, L as SubjectResolverOptions, N as CredentialTarget, O as Interface$6, P as OAuthFlowOptions, Q as Resolution$1, R as TokenConnectionOptions, S as integrationMethod$1, T as Account$1, U as Account, V as oauthMethod$1, W as Fetch, X as Interface$4, Y as Credential, Z as ListTargetsInput, _ as ExchangeCodeOptions, b as IntegrationMethodOptions, c as Policy, f as Options$5, i as Result, j as Zone$1, k as ListZonesInput$1, m as Options$6, n as PublicDns$1, nt as selection_d_exports, o as DefaultOptions, q as Options$3, r as PublicDnsObservation, rt as diagnostic_d_exports, s as Observation, t as ProviderObservation, tt as zones_d_exports, u as Options$7, v as IntegrationCredential, w as tokenMethod$3, x as TokenConnectionOptions$1, y as IntegrationFlowOptions, z as TokenValidatorOptions } from "./verify-FpunAcM7.mjs";
|
|
3
|
+
import { A as renderManualInstructions$1, C as DiscoverCreateInput$1, E as ResolvedCreateResult, F as PlanAuthorization, H as Source$1, I as Receipt, L as Schema$3, M as Authorization, N as DnsPlan, O as Target, P as Operation, R as encode, S as CreateResult$1, V as Candidate, _ as Receipt$1, d as Authorization$1, f as CreateError, g as Plan, h as PartialError, j as ApplyReceipt, m as Operation$1, n as AsyncInterface$1, o as Query, p as Error, r as AsyncResolution, t as Answer, u as ApplyError, w as ExactCreateInput$1, z as encodeReceipt } from "./resolver-xoSwyXDJ.mjs";
|
|
4
|
+
import { a as managed_dns_connections_d_exports, i as AsyncInterface$2, n as Method$1, r as connection_d_exports, t as InteractiveFlow } from "./connection-Dp6ZdSo8.mjs";
|
|
5
5
|
import { Data } from "effect";
|
|
6
6
|
declare namespace dns_provider_d_exports {
|
|
7
7
|
export { CreateResult, AsyncInterface as Interface };
|
|
@@ -105,13 +105,13 @@ declare function discover(input: {
|
|
|
105
105
|
}): Promise<Outcome>;
|
|
106
106
|
declare function toEffectSource(source: Source): Source$1;
|
|
107
107
|
declare namespace dns_record_d_exports {
|
|
108
|
-
export { A, Aaaa, Caa, Cname, DnsRecord, Encoded, Mx, Ns, Observed, Opaque, RequirementMetadata,
|
|
108
|
+
export { A, Aaaa, Caa, Cname, DnsRecord, Encoded, Mx, Ns, Observed, Opaque, RequirementMetadata, RecordSchema as Schema, Srv, Txt, Type, data, equals, parse };
|
|
109
109
|
}
|
|
110
110
|
declare namespace domain_name_d_exports {
|
|
111
|
-
export { DomainName, Schema$
|
|
111
|
+
export { DomainName, Schema$2 as Schema, parse$1 as parse };
|
|
112
112
|
}
|
|
113
113
|
declare namespace dns_plan_d_exports {
|
|
114
|
-
export { ApplyReceipt, Authorization, DnsPlan, Operation, PlanAuthorization, Receipt, Schema$
|
|
114
|
+
export { ApplyReceipt, Authorization, DnsPlan, Operation, PlanAuthorization, Receipt, Schema$3 as Schema, decode, decodeReceipt, encode, encodeReceipt };
|
|
115
115
|
}
|
|
116
116
|
declare function decode(input: unknown): Promise<DnsPlan>;
|
|
117
117
|
declare function decodeReceipt(input: unknown): Promise<ApplyReceipt>;
|
package/dist/promise.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { $ as decode$3, B as tokenConnectionMethod$2, C as integrationFlow$1, D as tokenConnectionMethod$3, E as restore$3, F as oauthFlow$1, G as make$6, H as tokenValidator$1, I as oauthMethod$1, K as authorize$2, L as refreshCredential$1, M as make$7, O as tokenMethod$3, P as manifest$2, Q as Schema$1, R as restore$2, S as exchangeCode$1, T as manifest$3, V as tokenMethod$2, X as secret_exports, Y as selection_exports, Z as Method$1, _ as toAsync$1, a as Result, c as Observation, d as defaultMake$1, f as make$8, h as toAsync$3, i as PublicDnsObservation, k as AccountContext, l as Policy, n as ProviderObservation, nt as version, o as observe$1, r as PublicDns$1, t as Provider$1, tt as diagnostic_exports, u as Service, w as integrationMethod$1, y as toAsync$2, z as subjectResolver$1 } from "./verify-
|
|
2
|
+
import { $ as decode$3, B as tokenConnectionMethod$2, C as integrationFlow$1, D as tokenConnectionMethod$3, E as restore$3, F as oauthFlow$1, G as make$6, H as tokenValidator$1, I as oauthMethod$1, K as authorize$2, L as refreshCredential$1, M as make$7, O as tokenMethod$3, P as manifest$2, Q as Schema$1, R as restore$2, S as exchangeCode$1, T as manifest$3, V as tokenMethod$2, X as secret_exports, Y as selection_exports, Z as Method$1, _ as toAsync$1, a as Result, c as Observation, d as defaultMake$1, f as make$8, h as toAsync$3, i as PublicDnsObservation, k as AccountContext, l as Policy, n as ProviderObservation, nt as version, o as observe$1, r as PublicDns$1, t as Provider$1, tt as diagnostic_exports, u as Service, w as integrationMethod$1, y as toAsync$2, z as subjectResolver$1 } from "./verify-DvGPb5C9.mjs";
|
|
3
3
|
import { C as encode, E as Schema$2, S as decode$4, T as validate, _ as ProviderTarget, f as provider_context_exports, g as ProviderConnection, h as DomainAttachment, i as webCryptoLayer, j as invalid_input_exports, k as parse, m as ConnectionStatus, p as AuthorizationError, v as ProviderTargetEvidence, x as authorizationError } from "./canonical-json-CQYKsZw7.mjs";
|
|
4
4
|
import { a as start$1, i as complete$1, n as Method$2, r as StartResult, t as Error } from "./connect-oI8hcMxc.mjs";
|
|
5
|
-
import { $ as Txt, A as Schema$
|
|
5
|
+
import { $ as Txt, A as Schema$3, C as authorize$4, D as Authorization, E as renderManualInstructions$1, G as Cname, H as A, I as Error$1, J as Observed, K as Mx, L as Service$1, M as decodeReceipt$1, N as encode$1, O as Operation, P as encodeReceipt, Q as Srv, S as apply$3, U as Aaaa, V as toAsync$4, W as Caa, X as RecordSchema, Y as Opaque, Z as RequirementMetadata, at as parse$1, c as Error$2, ct as make$9, d as Plan, dt as zones_exports, et as Type, f as Receipt$1, h as create$2, it as equals, j as decode$5, k as Receipt, l as Operation$1, m as authorize$3, n as Error$3, ot as Candidate, p as apply$2, q as Ns, s as Authorization$1, st as Service$2, t as AsyncResolution, tt as data, u as PartialError, v as CreateResult, w as create$3, x as Target, z as layerFromAsync } from "./resolver-BeGz1ukw.mjs";
|
|
6
6
|
import { n as managed_dns_connections_exports, t as layerFromAsync$1 } from "./managed-dns-connections-C3A_GBaz.mjs";
|
|
7
7
|
import { Data, Effect, Layer } from "effect";
|
|
8
8
|
//#region src/promise/connection.ts
|
|
@@ -223,7 +223,7 @@ var dns_record_exports = /* @__PURE__ */ __exportAll({
|
|
|
223
223
|
Observed: () => Observed,
|
|
224
224
|
Opaque: () => Opaque,
|
|
225
225
|
RequirementMetadata: () => RequirementMetadata,
|
|
226
|
-
Schema: () =>
|
|
226
|
+
Schema: () => RecordSchema,
|
|
227
227
|
Srv: () => Srv,
|
|
228
228
|
Txt: () => Txt,
|
|
229
229
|
Type: () => Type,
|
|
@@ -243,7 +243,7 @@ var dns_plan_exports = /* @__PURE__ */ __exportAll({
|
|
|
243
243
|
Authorization: () => Authorization,
|
|
244
244
|
Operation: () => Operation,
|
|
245
245
|
Receipt: () => Receipt,
|
|
246
|
-
Schema: () => Schema$
|
|
246
|
+
Schema: () => Schema$3,
|
|
247
247
|
decode: () => decode,
|
|
248
248
|
decodeReceipt: () => decodeReceipt,
|
|
249
249
|
encode: () => encode$1,
|