domainkit 0.2.2 → 0.3.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 +26 -26
- package/dist/index.d.mts +639 -187
- package/dist/index.mjs +301 -300
- package/dist/index.mjs.map +1 -1
- package/dist/promise.d.mts +464 -0
- package/dist/promise.mjs +636 -0
- package/dist/promise.mjs.map +1 -0
- package/dist/{resolver-CxE-VDw4.mjs → resolver-CvK7JoJM.mjs} +401 -54
- package/dist/resolver-CvK7JoJM.mjs.map +1 -0
- package/dist/{resolver-Dc0hwV-J.d.mts → resolver-uqe1h5Vz.d.mts} +1513 -25
- package/dist/testing.d.mts +4 -5
- package/dist/testing.mjs +17 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/verify-B00c81-n.mjs +2420 -0
- package/dist/verify-B00c81-n.mjs.map +1 -0
- package/dist/{verify-Dls29YC-.d.mts → verify-CkgVrwyl.d.mts} +318 -21
- package/package.json +6 -30
- package/dist/auth-BR-19zj-.mjs +0 -738
- package/dist/auth-BR-19zj-.mjs.map +0 -1
- package/dist/auth-g-waCHcz.mjs +0 -671
- package/dist/auth-g-waCHcz.mjs.map +0 -1
- package/dist/authorization-OeaSR47S.mjs +0 -284
- package/dist/authorization-OeaSR47S.mjs.map +0 -1
- package/dist/canonical-json-CpvqGMcr.mjs +0 -57
- package/dist/canonical-json-CpvqGMcr.mjs.map +0 -1
- package/dist/cloudflare-BrZPU9li.d.mts +0 -32
- package/dist/cloudflare-CGmasR8A.mjs +0 -69
- package/dist/cloudflare-CGmasR8A.mjs.map +0 -1
- package/dist/cloudflare.d.mts +0 -3
- package/dist/cloudflare.mjs +0 -2
- package/dist/connection-BfkloPZy.d.mts +0 -186
- package/dist/connection-BwtOwpH6.mjs +0 -195
- package/dist/connection-BwtOwpH6.mjs.map +0 -1
- package/dist/connection-CjNQe_E-.mjs +0 -58
- package/dist/connection-CjNQe_E-.mjs.map +0 -1
- package/dist/connection-api-DNuEZ_jR.d.mts +0 -7
- package/dist/dns-record-BLeqo56C.mjs +0 -289
- package/dist/dns-record-BLeqo56C.mjs.map +0 -1
- package/dist/effect-cloudflare.d.mts +0 -2
- package/dist/effect-cloudflare.mjs +0 -2
- package/dist/effect-vercel.d.mts +0 -2
- package/dist/effect-vercel.mjs +0 -2
- package/dist/effect.d.mts +0 -36
- package/dist/effect.mjs +0 -51
- package/dist/effect.mjs.map +0 -1
- package/dist/index-BHWRTThN.d.mts +0 -159
- package/dist/index-D3PVknwE.d.mts +0 -145
- package/dist/resolver-CxE-VDw4.mjs.map +0 -1
- package/dist/vercel-BsNDu4Np.d.mts +0 -31
- package/dist/vercel-CfoJaaCu.mjs +0 -60
- package/dist/vercel-CfoJaaCu.mjs.map +0 -1
- package/dist/vercel.d.mts +0 -3
- package/dist/vercel.mjs +0 -2
- package/dist/verify-BKbvq7IN.mjs +0 -642
- package/dist/verify-BKbvq7IN.mjs.map +0 -1
- package/dist/zone-discovery-BPnH3sLU.d.mts +0 -1397
- package/dist/zones-DKHTpX9C.mjs +0 -19
- package/dist/zones-DKHTpX9C.mjs.map +0 -1
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["decode","ProviderAuth.decode","decode","ProviderAuthorization.decode","Discovery.make","Provider.Error","DnsPlan.decode","DnsPlan.decodeReceipt","create","DeletionEffect.create","DnsProvider.layerFromAsync","authorize","DeletionEffect.authorize","apply","DeletionEffect.apply","ProvisioningEffect.create","ZoneDiscoveryEffect.Service","ZoneDiscoveryEffect.make","ZoneDiscovery.toEffectSource","DnsProvider.layerFromAsync","ProvisioningEffect.authorize","ProvisioningEffect.apply","ConnectionAuthorization.authorize","ProvisioningEffect.renderManualInstructions","VerificationEffect.PublicDns","VerificationEffect.observe","DnsProvider.layerFromAsync","DnsResolverPoolEffect.Service","DnsResolverPoolEffect.make","DnsResolver.Error","make","CloudflareDnsOverHttps.toAsync","make","DnsOverHttps.toAsync","make","GoogleDnsOverHttps.toAsync","Pool.make","Pool.defaultMake","DnsResolver.Error","packageJson.version"],"sources":["../src/promise/provider-auth.ts","../src/promise/provider-authorization.ts","../src/promise/zone-discovery.ts","../src/promise/dns-record.ts","../src/promise/domain-name.ts","../src/promise/dns-plan.ts","../src/promise/deletion.ts","../src/promise/provisioning.ts","../src/promise/verification.ts","../src/promise/cloudflare-doh.ts","../src/promise/doh.ts","../src/promise/google-doh.ts","../src/promise/resolver-pool.ts","../src/index.ts"],"sourcesContent":["import { Effect } from \"effect\";\n\nimport * as ProviderAuth from \"../auth/manifest.ts\";\n\nexport { Method, Schema } from \"../auth/manifest.ts\";\nexport type {\n AsyncOAuthSubjectResolver as OAuthSubjectResolver,\n Manifest,\n OAuthClientConfiguration,\n OAuthMethod,\n TokenValidation,\n} from \"../auth/manifest.ts\";\n\nexport function decode(input: unknown): Promise<ProviderAuth.Manifest> {\n return Effect.runPromise(ProviderAuth.decode(input));\n}\n","import { Effect } from \"effect\";\n\nimport * as ProviderAuthorization from \"../auth/authorization.ts\";\n\nexport {\n Capability,\n CapabilityEvidence,\n encode,\n Evidence,\n EvidenceSchema,\n Schema,\n} from \"../auth/authorization.ts\";\nexport type { ProviderAuthorization } from \"../auth/authorization.ts\";\n\nexport function decode(input: unknown): Promise<ProviderAuthorization.ProviderAuthorization> {\n return Effect.runPromise(ProviderAuthorization.decode(input));\n}\n","import { Effect } from \"effect\";\n\nimport type * as DomainName from \"../domain/domain-name.ts\";\nimport type * as DnsProvider from \"../provider/provider.ts\";\nimport * as Provider from \"../provider/provider.ts\";\nimport * as Discovery from \"../discovery/zone-discovery.ts\";\n\nexport interface Source {\n readonly listZones: (\n name: DomainName.DomainName,\n ) => Promise<ReadonlyArray<Omit<Discovery.Candidate, \"providerId\">>>;\n readonly provider: DnsProvider.AsyncInterface;\n}\n\nexport type Outcome =\n | { readonly _tag: \"NotFound\"; readonly domain: DomainName.DomainName }\n | { readonly _tag: \"Resolved\"; readonly candidate: Discovery.Candidate }\n | { readonly _tag: \"SelectionRequired\"; readonly candidates: ReadonlyArray<Discovery.Candidate> };\n\nexport function discover(input: {\n readonly domain: DomainName.DomainName;\n readonly sources: ReadonlyArray<Source>;\n}): Promise<Outcome> {\n return Effect.runPromise(\n Discovery.make(input.sources.map(toEffectSource))\n .discover(input.domain)\n .pipe(Effect.map(projectOutcome)),\n );\n}\n\nexport function toEffectSource(source: Source): Discovery.Source {\n return {\n listZones: (name) =>\n Effect.tryPromise({\n try: () => source.listZones(name),\n catch: (cause) =>\n new Provider.Error({\n cause,\n message: cause instanceof globalThis.Error ? cause.message : String(cause),\n operation: \"ZoneDiscovery.listZones\",\n providerId: source.provider.id,\n reason: \"transport\",\n }),\n }),\n provider: Provider.Service.of({\n id: source.provider.id,\n createRecord: (zone, record) =>\n Effect.tryPromise({\n try: () => source.provider.createRecord(zone, record),\n catch: (cause) => providerFailure(source.provider.id, \"createRecord\", cause),\n }),\n deleteRecord: (zone, providerRecordId) =>\n Effect.tryPromise({\n try: () => source.provider.deleteRecord(zone, providerRecordId),\n catch: (cause) => providerFailure(source.provider.id, \"deleteRecord\", cause),\n }),\n getRecord: (zone, providerRecordId) =>\n Effect.tryPromise({\n try: () => source.provider.getRecord(zone, providerRecordId),\n catch: (cause) => providerFailure(source.provider.id, \"getRecord\", cause),\n }),\n listRecords: (zone) =>\n Effect.tryPromise({\n try: () => source.provider.listRecords(zone),\n catch: (cause) => providerFailure(source.provider.id, \"listRecords\", cause),\n }),\n }),\n };\n}\n\nfunction projectOutcome(outcome: Discovery.Outcome): Outcome {\n switch (outcome._tag) {\n case \"NotFound\":\n return outcome;\n case \"Resolved\":\n return { _tag: \"Resolved\", candidate: outcome.candidate };\n case \"SelectionRequired\":\n return outcome;\n }\n}\n\nfunction providerFailure(providerId: string, operation: string, cause: unknown): Provider.Error {\n return cause instanceof Provider.Error\n ? cause\n : new Provider.Error({\n cause,\n message: cause instanceof globalThis.Error ? cause.message : String(cause),\n operation,\n providerId,\n });\n}\n\nexport { Candidate } from \"../discovery/zone-discovery.ts\";\n","export {\n A,\n Aaaa,\n Caa,\n Cname,\n data,\n equals,\n Mx,\n Ns,\n Opaque,\n Observed,\n parse,\n RequirementMetadata,\n Schema,\n Srv,\n Txt,\n Type,\n} from \"../domain/dns-record.ts\";\nexport type { DnsRecord, Encoded } from \"../domain/dns-record.ts\";\n","export { parse, Schema } from \"../domain/domain-name.ts\";\nexport type { DomainName } from \"../domain/domain-name.ts\";\n","import { Effect } from \"effect\";\n\nimport * as DnsPlan from \"../plan/types.ts\";\n\nexport { Authorization, encode, encodeReceipt, Operation, Receipt, Schema } from \"../plan/types.ts\";\nexport type { ApplyReceipt, DnsPlan, PlanAuthorization } from \"../plan/types.ts\";\n\nexport function decode(input: unknown): Promise<DnsPlan.DnsPlan> {\n return Effect.runPromise(DnsPlan.decode(input));\n}\n\nexport function decodeReceipt(input: unknown): Promise<DnsPlan.ApplyReceipt> {\n return Effect.runPromise(DnsPlan.decodeReceipt(input));\n}\n","import { Effect, Layer } from \"effect\";\n\nimport { webCryptoLayer } from \"../plan/canonical-json.ts\";\nimport * as DeletionEffect from \"../plan/deletion.ts\";\nimport type * as DnsPlan from \"../plan/types.ts\";\nimport * as DnsProvider from \"../provider/provider.ts\";\n\nexport function create(input: {\n readonly plan: DnsPlan.DnsPlan;\n readonly provider: DnsProvider.AsyncInterface;\n readonly receipt: DnsPlan.ApplyReceipt;\n readonly ttlMs?: number;\n}): Promise<DeletionEffect.Plan> {\n return Effect.runPromise(\n DeletionEffect.create({\n plan: input.plan,\n receipt: input.receipt,\n ...(input.ttlMs === undefined ? {} : { ttlMs: input.ttlMs }),\n }).pipe(\n Effect.provide(Layer.merge(DnsProvider.layerFromAsync(input.provider), webCryptoLayer)),\n ),\n );\n}\n\nexport function authorize(\n plan: DeletionEffect.Plan,\n operationIds?: ReadonlyArray<string>,\n): Promise<DeletionEffect.Authorization> {\n return Effect.runPromise(\n DeletionEffect.authorize(plan, operationIds).pipe(Effect.provide(webCryptoLayer)),\n );\n}\n\nexport function apply(input: {\n readonly authorization: DeletionEffect.Authorization;\n readonly plan: DeletionEffect.Plan;\n readonly priorReceipt?: DeletionEffect.Receipt;\n readonly provider: DnsProvider.AsyncInterface;\n}): Promise<DeletionEffect.Receipt> {\n return Effect.runPromise(\n DeletionEffect.apply({\n authorization: input.authorization,\n plan: input.plan,\n ...(input.priorReceipt === undefined ? {} : { priorReceipt: input.priorReceipt }),\n }).pipe(\n Effect.provide(Layer.merge(DnsProvider.layerFromAsync(input.provider), webCryptoLayer)),\n ),\n );\n}\n\nexport { Authorization, Error, Operation, PartialError, Plan, Receipt } from \"../plan/deletion.ts\";\nexport type {\n ApplyError,\n Authorization as DeletionAuthorization,\n CreateError,\n Operation as DeletionOperation,\n Plan as DeletionPlan,\n Receipt as DeletionReceipt,\n} from \"../plan/deletion.ts\";\n","import { Effect, Layer } from \"effect\";\n\nimport type * as Connection from \"../auth/connection.ts\";\nimport type * as ProviderAuthorization from \"../auth/authorization.ts\";\nimport * as ConnectionAuthorization from \"../plan/connection-authorization.ts\";\nimport { webCryptoLayer } from \"../plan/canonical-json.ts\";\nimport * as ProvisioningEffect from \"../plan/plan.ts\";\nimport type * as DnsPlan from \"../plan/types.ts\";\nimport * as DnsProvider from \"../provider/provider.ts\";\nimport * as ZoneDiscoveryEffect from \"../discovery/zone-discovery.ts\";\nimport * as ZoneDiscovery from \"./zone-discovery.ts\";\n\nexport interface ExactCreateInput extends ProvisioningEffect.ExactCreateInput {\n readonly provider: DnsProvider.AsyncInterface;\n}\n\nexport interface DiscoverCreateInput extends ProvisioningEffect.DiscoverCreateInput {\n readonly sources: ReadonlyArray<ZoneDiscovery.Source>;\n}\n\nexport function create(input: ExactCreateInput): Promise<ProvisioningEffect.ResolvedCreateResult>;\nexport function create(input: DiscoverCreateInput): Promise<ProvisioningEffect.CreateResult>;\nexport function create(\n input: ExactCreateInput | DiscoverCreateInput,\n): Promise<ProvisioningEffect.CreateResult> {\n if (\"sources\" in input) {\n const { sources, ...programInput } = input;\n return Effect.runPromise(\n ProvisioningEffect.create(programInput).pipe(\n Effect.provide(\n Layer.merge(\n Layer.succeed(\n ZoneDiscoveryEffect.Service,\n ZoneDiscoveryEffect.make(sources.map(ZoneDiscovery.toEffectSource)),\n ),\n webCryptoLayer,\n ),\n ),\n ),\n );\n }\n const { provider, ...programInput } = input;\n return Effect.runPromise(\n ProvisioningEffect.create(programInput).pipe(\n Effect.provide(Layer.merge(DnsProvider.layerFromAsync(provider), webCryptoLayer)),\n ),\n );\n}\n\nexport function authorize(\n plan: DnsPlan.DnsPlan,\n operationIds?: ReadonlyArray<string>,\n options: { readonly allowPartial?: boolean } = {},\n): Promise<DnsPlan.PlanAuthorization> {\n return Effect.runPromise(\n ProvisioningEffect.authorize(plan, operationIds, options).pipe(Effect.provide(webCryptoLayer)),\n );\n}\n\nexport function apply(input: {\n readonly authorization: DnsPlan.PlanAuthorization;\n readonly plan: DnsPlan.DnsPlan;\n readonly provider: DnsProvider.AsyncInterface;\n}): Promise<DnsPlan.ApplyReceipt> {\n return Effect.runPromise(\n ProvisioningEffect.apply({ authorization: input.authorization, plan: input.plan }).pipe(\n Effect.provide(Layer.merge(DnsProvider.layerFromAsync(input.provider), webCryptoLayer)),\n ),\n );\n}\n\nexport function authorizeForConnection(input: {\n readonly allowPartial?: boolean;\n readonly authorization: ProviderAuthorization.ProviderAuthorization;\n readonly connection: Connection.Connection;\n readonly domain: string;\n readonly operationIds?: ReadonlyArray<string>;\n readonly plan: DnsPlan.DnsPlan;\n}): Promise<DnsPlan.PlanAuthorization> {\n return Effect.runPromise(\n ConnectionAuthorization.authorize(input).pipe(Effect.provide(webCryptoLayer)),\n );\n}\n\nexport const renderManualInstructions = ProvisioningEffect.renderManualInstructions;\nexport { CreateResult, Target } from \"../plan/plan.ts\";\n","import { Data, Effect, Layer } from \"effect\";\n\nimport type * as DomainName from \"../domain/domain-name.ts\";\nimport type * as DnsRecord from \"../domain/dns-record.ts\";\nimport * as DnsProvider from \"../provider/provider.ts\";\nimport * as DnsResolver from \"../verification/resolver.ts\";\nimport * as DnsResolverPoolEffect from \"../verification/resolver-pool.ts\";\nimport * as VerificationEffect from \"../verification/verify.ts\";\nimport type * as DnsResolverPool from \"./resolver-pool.ts\";\n\nexport type PublicDns = VerificationEffect.PublicDns;\nexport const PublicDns = VerificationEffect.PublicDns;\n\nexport type Provider = Data.TaggedEnum<{\n Disabled: {};\n Enabled: {\n readonly provider: DnsProvider.AsyncInterface;\n readonly zone: DomainName.DomainName;\n };\n}>;\nexport const Provider = Data.taggedEnum<Provider>();\n\nexport interface Config {\n readonly provider?: Provider;\n readonly publicDns?: PublicDns;\n readonly record: DnsRecord.DnsRecord;\n readonly resolvers?: ReadonlyArray<DnsResolverPool.Entry>;\n}\n\nexport { ProviderObservation, PublicDnsObservation, Result } from \"../verification/verify.ts\";\n\nexport function observe(input: Config): Promise<VerificationEffect.Result> {\n const provider = input.provider ?? Provider.Disabled();\n let program =\n provider._tag === \"Enabled\"\n ? VerificationEffect.observe({\n record: input.record,\n ...(input.publicDns === undefined ? {} : { publicDns: input.publicDns }),\n provider: VerificationEffect.Provider.Enabled({ zone: provider.zone }),\n }).pipe(Effect.provide(DnsProvider.layerFromAsync(provider.provider)))\n : VerificationEffect.observe({\n record: input.record,\n ...(input.publicDns === undefined ? {} : { publicDns: input.publicDns }),\n provider: VerificationEffect.Provider.Disabled(),\n });\n if (input.resolvers !== undefined) {\n program = program.pipe(\n Effect.provide(\n Layer.succeed(\n DnsResolverPoolEffect.Service,\n DnsResolverPoolEffect.make(\n input.resolvers.map((entry) => ({\n id: entry.id,\n resolver: fromAsyncResolver(entry.resolver),\n ...(entry.timeoutMs === undefined ? {} : { timeoutMs: entry.timeoutMs }),\n })),\n ),\n ),\n ),\n );\n }\n return Effect.runPromise(program);\n}\n\nfunction fromAsyncResolver(resolver: DnsResolver.AsyncInterface): DnsResolver.Interface {\n return {\n resolve: (query) =>\n Effect.tryPromise({\n try: () => resolver.resolve(query),\n catch: (cause) =>\n new DnsResolver.Error({\n cause,\n message: cause instanceof globalThis.Error ? cause.message : String(cause),\n reason: \"transport\",\n }),\n }).pipe(\n Effect.flatMap((resolution) => {\n switch (resolution._tag) {\n case \"answer\":\n case \"nodata\":\n return Effect.succeed(resolution);\n case \"timeout\":\n return Effect.fail(\n new DnsResolver.Error({ message: \"DNS query timed out\", reason: \"timeout\" }),\n );\n case \"failure\":\n return Effect.fail(\n new DnsResolver.Error({ message: resolution.message, reason: \"transport\" }),\n );\n }\n }),\n ),\n };\n}\n","import * as CloudflareDnsOverHttps from \"../verification/cloudflare-doh.ts\";\nimport type * as DnsResolver from \"../verification/resolver.ts\";\n\nexport type Options = CloudflareDnsOverHttps.Options;\n\nexport function make(options: Options = {}): DnsResolver.AsyncInterface {\n return CloudflareDnsOverHttps.toAsync(options);\n}\n","import * as DnsOverHttps from \"../verification/doh.ts\";\nimport type * as DnsResolver from \"../verification/resolver.ts\";\n\nexport type Options = DnsOverHttps.Options;\n\nexport function make(options: Options): DnsResolver.AsyncInterface {\n return DnsOverHttps.toAsync(options);\n}\n","import * as GoogleDnsOverHttps from \"../verification/google-doh.ts\";\nimport type * as DnsResolver from \"../verification/resolver.ts\";\n\nexport type Options = GoogleDnsOverHttps.Options;\n\nexport function make(options: Options = {}): DnsResolver.AsyncInterface {\n return GoogleDnsOverHttps.toAsync(options);\n}\n","import { Effect } from \"effect\";\n\nimport * as DnsResolver from \"../verification/resolver.ts\";\nimport * as Pool from \"../verification/resolver-pool.ts\";\n\nexport interface Entry {\n readonly id: string;\n readonly resolver: DnsResolver.AsyncInterface;\n readonly timeoutMs?: number;\n}\n\nexport interface Interface {\n readonly observe: (query: DnsResolver.Query) => Promise<ReadonlyArray<Pool.Observation>>;\n}\n\nexport function make(entries: ReadonlyArray<Entry>): Interface {\n return toAsync(\n Pool.make(\n entries.map((entry) => ({\n id: entry.id,\n resolver: asyncResolver(entry.resolver),\n ...(entry.timeoutMs === undefined ? {} : { timeoutMs: entry.timeoutMs }),\n })),\n ),\n );\n}\n\nexport function defaultMake(options: Pool.DefaultOptions = {}): Interface {\n return toAsync(Pool.defaultMake(options));\n}\n\nexport { Observation, Policy } from \"../verification/resolver-pool.ts\";\n\nfunction toAsync(pool: Pool.Interface): Interface {\n return {\n observe: (query) => Effect.runPromise(pool.observe(query)),\n };\n}\n\nfunction asyncResolver(resolver: DnsResolver.AsyncInterface): DnsResolver.Interface {\n return {\n resolve: (query) =>\n Effect.tryPromise({\n try: () => resolver.resolve(query),\n catch: (cause) =>\n new DnsResolver.Error({\n cause,\n message: cause instanceof globalThis.Error ? cause.message : String(cause),\n reason: \"transport\",\n }),\n }).pipe(\n Effect.flatMap((resolution) => {\n switch (resolution._tag) {\n case \"answer\":\n case \"nodata\":\n return Effect.succeed(resolution);\n case \"timeout\":\n return Effect.fail(\n new DnsResolver.Error({ message: \"DNS query timed out\", reason: \"timeout\" }),\n );\n case \"failure\":\n return Effect.fail(\n new DnsResolver.Error({ message: resolution.message, reason: \"transport\" }),\n );\n }\n }),\n ),\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 \"./promise/connection.ts\";\nexport * as AuthorizationLifecycle from \"./promise/authorization-lifecycle.ts\";\nexport * as Diagnostic from \"./auth/diagnostic.ts\";\nexport * as ProviderContext from \"./auth/provider-context.ts\";\nexport * as Secret from \"./auth/secret.ts\";\nexport type * as DnsProvider from \"./promise/dns-provider.ts\";\nexport type * as DnsResolver from \"./promise/dns-resolver.ts\";\nexport * as ProviderAuth from \"./promise/provider-auth.ts\";\nexport * as ProviderAuthorization from \"./promise/provider-authorization.ts\";\nexport * as ProviderDiscovery from \"./discovery/selection.ts\";\nexport * as ZoneDiscovery from \"./promise/zone-discovery.ts\";\nexport * as Zones from \"./discovery/zones.ts\";\nexport * as DnsRecord from \"./promise/dns-record.ts\";\nexport * as DomainName from \"./promise/domain-name.ts\";\nexport * as InvalidInput from \"./invalid-input.ts\";\nexport * as DnsPlan from \"./promise/dns-plan.ts\";\nexport * as Deletion from \"./promise/deletion.ts\";\nexport * as Cloudflare from \"./promise/cloudflare.ts\";\nexport * as Vercel from \"./promise/vercel.ts\";\nexport * as Provisioning from \"./promise/provisioning.ts\";\nexport * as Verification from \"./promise/verification.ts\";\nexport * as CloudflareDnsOverHttps from \"./promise/cloudflare-doh.ts\";\nexport * as DnsOverHttps from \"./promise/doh.ts\";\nexport * as GoogleDnsOverHttps from \"./promise/google-doh.ts\";\nexport * as DnsResolverPool from \"./promise/resolver-pool.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAaA,SAAgBA,SAAO,OAAgD;CACrE,OAAO,OAAO,WAAWC,SAAoB,KAAK,CAAC;AACrD;;;;;;;;;;;;ACDA,SAAgBC,SAAO,OAAsE;CAC3F,OAAO,OAAO,WAAWC,SAA6B,KAAK,CAAC;AAC9D;;;;;;;;ACGA,SAAgB,SAAS,OAGJ;CACnB,OAAO,OAAO,WACZC,OAAe,MAAM,QAAQ,IAAI,cAAc,CAAC,CAAC,CAC9C,SAAS,MAAM,MAAM,CAAC,CACtB,KAAK,OAAO,IAAI,cAAc,CAAC,CACpC;AACF;AAEA,SAAgB,eAAe,QAAkC;CAC/D,OAAO;EACL,YAAY,SACV,OAAO,WAAW;GAChB,WAAW,OAAO,UAAU,IAAI;GAChC,QAAQ,UACN,IAAIC,MAAe;IACjB;IACA,SAAS,iBAAiB,WAAW,QAAQ,MAAM,UAAU,OAAO,KAAK;IACzE,WAAW;IACX,YAAY,OAAO,SAAS;IAC5B,QAAQ;GACV,CAAC;EACL,CAAC;EACH,UAAA,QAA2B,GAAG;GAC5B,IAAI,OAAO,SAAS;GACpB,eAAe,MAAM,WACnB,OAAO,WAAW;IAChB,WAAW,OAAO,SAAS,aAAa,MAAM,MAAM;IACpD,QAAQ,UAAU,gBAAgB,OAAO,SAAS,IAAI,gBAAgB,KAAK;GAC7E,CAAC;GACH,eAAe,MAAM,qBAC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O,SAAS,eAAe;EAC7B,QAAQ,WAAW,MAAnB;GACE,KAAK;GACL,KAAK,UACH,OAAO,OAAO,QAAQ,UAAU;GAClC,KAAK,WACH,OAAO,OAAO,KACZ,IAAIA,QAAkB;IAAE,SAAS;IAAuB,QAAQ;GAAU,CAAC,CAC7E;GACF,KAAK,WACH,OAAO,OAAO,KACZ,IAAIA,QAAkB;IAAE,SAAS,WAAW;IAAS,QAAQ;GAAY,CAAC,CAC5E;EACJ;CACF,CAAC,CACH,EACJ;AACF;;;;ACjEA,MAAa,UAAUC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["packageJson.version"],"sources":["../src/auth/connection-api.ts","../src/providers/cloudflare/index.ts","../src/providers/vercel/index.ts","../src/transport.ts","../src/index.ts"],"sourcesContent":["export {\n assertGrant,\n authorizationError,\n AuthorizationError,\n decode,\n encode,\n coversDomain,\n Grant,\n includeDomains,\n removeDomain as removeDomainFromGrant,\n Schema,\n validate,\n} from \"./connection.ts\";\nexport type { Connection, StoredCredential } from \"./connection.ts\";\nexport {\n complete,\n Error,\n extend,\n Method,\n removeDomain,\n RemoveDomainResult,\n start,\n StartResult,\n} from \"./connect.ts\";\nexport type {\n Authentication,\n AuthenticationFailure,\n BaseInput,\n CompleteInput,\n Continuation,\n ContinuationStore,\n Failure,\n InteractiveFlow,\n InteractiveStart,\n ExtendInput,\n Method as ConnectionMethod,\n Requirements,\n RemoveDomainInput,\n RemoveDomainResult as ConnectionRemoveDomainResult,\n StartResult as ConnectionStartResult,\n} from \"./connect.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 { discovery, make } from \"./client.ts\";\nexport type {\n Account,\n AccountContext,\n Fetch,\n Interface,\n ListZonesInput,\n Options,\n Zone,\n} from \"./client.ts\";\n","import { Context, Data, Effect, Layer, Schema } from \"effect\";\n\nimport type * as DomainDnsRecord from \"./domain/dns-record.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 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 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 connectionId: Schema.String,\n domain: Schema.String,\n provider: Provider,\n});\nexport type Connected = typeof Connected.Type;\n\nexport const ReusableConnection = Schema.Struct({\n connectionId: Schema.String,\n label: Schema.String,\n});\nexport type ReusableConnection = typeof ReusableConnection.Type;\n\nexport const Disconnected = Schema.TaggedStruct(\"Disconnected\", {\n domain: Schema.String,\n provider: Provider,\n reusableConnection: Schema.optionalKey(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 RemoveDomainResult = Schema.TaggedStruct(\"Removed\", {\n connectionId: Schema.String,\n domain: Schema.String,\n remainingDomainCount: Schema.Int,\n});\nexport type RemoveDomainResult = typeof RemoveDomainResult.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 ReuseInput {\n readonly connectionId: string;\n readonly domain: string;\n}\n\nexport interface RemoveDomainInput extends ReuseInput {\n readonly preserveDns: true;\n}\n\nexport interface ProvisioningPlanInput extends ReuseInput {\n readonly records: ReadonlyArray<DnsRecord>;\n}\n\nexport interface ProvisioningApplyInput extends ReuseInput {\n readonly planDigest: string;\n}\n\nexport interface ObserveInput {\n readonly connectionId?: 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 extends ReuseInput {\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 connect: (input: ConnectInput) => Effect.Effect<ConnectionResult, Failure>;\n readonly inspect: (input: InspectInput) => Effect.Effect<ConnectionSnapshot, Failure>;\n readonly removeDomain: (input: RemoveDomainInput) => Effect.Effect<RemoveDomainResult, Failure>;\n readonly reuse: (input: ReuseInput) => Effect.Effect<Connected, 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 connect: (input: ConnectInput) => Promise<ConnectionResult>;\n readonly inspect: (input: InspectInput) => Promise<ConnectionSnapshot>;\n readonly removeDomain: (input: RemoveDomainInput) => Promise<RemoveDomainResult>;\n readonly reuse: (input: ReuseInput) => Promise<Connected>;\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 connect: (input) => attempt(\"connection.connect\", () => transport.connection.connect(input)),\n inspect: (input) => attempt(\"connection.inspect\", () => transport.connection.inspect(input)),\n removeDomain: (input) =>\n attempt(\"connection.removeDomain\", () => transport.connection.removeDomain(input)),\n reuse: (input) => attempt(\"connection.reuse\", () => transport.connection.reuse(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 connect: (input) => Effect.runPromise(transport.connection.connect(input)),\n inspect: (input) => Effect.runPromise(transport.connection.inspect(input)),\n removeDomain: (input) => Effect.runPromise(transport.connection.removeDomain(input)),\n reuse: (input) => Effect.runPromise(transport.connection.reuse(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 AuthorizationLifecycle from \"./auth/lifecycle-repository.ts\";\nexport * as Diagnostic from \"./auth/diagnostic.ts\";\nexport * as ProviderAuth from \"./auth/manifest.ts\";\nexport * as ProviderAuthorization from \"./auth/authorization.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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGKA,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,OAAO,EAAE,OAAO,OAAO,OAAO;CAC9B,OAAO;EACL,OAAO,OAAO;EACd,YAAY,OAAO,YAAY,OAAO,MAAM,uBAAuB,CAAC;EACpE,aAAa,OAAO,YAAY,OAAO,MAAM;CAC/C;AACF,CAAC;AAWD,MAAa,SAAS,KAAK,WAAmB;AAE9C,MAAa,WAAW,OAAO,OAAO;CACpC,gBAA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AAa,KAAK,KAAK,CAAC;CACvE;CACA,cAAc,EACZ,UAAU,UAAU,OAAO,WAAW,UAAU,aAAa,QAAQ,KAAK,CAAC,EAC7E;AACF;;;;ACzWA,MAAa,UAAUA"}
|
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
import { $ as InteractiveFlow$1, A as renderManualInstructions$1, An as parse$1, At as coversDomain, Bt as ProviderAuthorization, C as DiscoverCreateInput$1, Cn as equals, Ct as Connection, Dn as DomainName, Dt as StoredCredential, E as ResolvedCreateResult, En as secret_d_exports, Et as Schema$1, F as PlanAuthorization, H as Source$1, I as Receipt, It as Capability, J as Continuation, Jt as OAuthClientConfiguration, K as BaseInput, Kt as Manifest, L as Schema$6, Lt as CapabilityEvidence, M as Authorization, Mn as invalid_input_d_exports, Mt as encode, N as DnsPlan, Nt as includeDomains, O as Target, On as Schema$5, Ot as assertGrant, P as Operation, Pt as removeDomain$1, Qt as TokenValidation, R as encode$2, Rt as Evidence, S as CreateResult$1, St as AuthorizationError, Tn as Value, Tt as OAuthContinuation, Ut as encode$1, V as Candidate, Vt as Schema$3, W as Authentication, Wt as AsyncOAuthSubjectResolver, X as Error$1, Y as ContinuationStore$1, Yt as OAuthMethod, Z as ExtendInput, Zt as Schema$2, _ as Receipt$1, _n as Schema$4, _t as Interface$3, at as StartResult, bn as Type, cn as Caa, d as Authorization$1, dn as Encoded, en as AsyncInterface, et as InteractiveStart, f as CreateError, fn as Mx, ft as provider_context_d_exports, g as Plan, gn as RequirementMetadata, gt as Error, h as PartialError, hn as Opaque, ht as DetachResult, j as ApplyReceipt, ln as Cname, m as Operation$1, mn as Observed, mt as BindingModification, n as AsyncInterface$1, nt as RemoveDomainInput, o as Query, on as A, p as Error$2, pn as Ns, pt as Aggregate, qt as Method$2, r as AsyncResolution, rt as RemoveDomainResult, sn as Aaaa, t as Answer, tn as CreateResult, tt as Method$1, u as ApplyError, un as DnsRecord, vn as Srv, vt as Service, w as ExactCreateInput$1, wn as parse, wt as Grant, xn as data, yn as Txt, z as encodeReceipt, zt as EvidenceSchema } from "./resolver-uqe1h5Vz.mjs";
|
|
2
|
+
import { A as Zone$1, B as tokenMethod$2, C as manifest$3, D as Fetch$1, E as AccountContext, F as SubjectResolverOptions, G as Zone, H as Fetch, I as TokenConnectionOptions, J as diagnostic_d_exports, K as zones_d_exports, L as TokenValidatorOptions, M as CredentialTarget, N as OAuthFlowOptions, O as ListZonesInput$1, P as OAuthMethodOptions, R as manifest$2, S as integrationMethod$1, T as Account$1, U as ListZonesInput, V as Account, W as Options$3, _ as ExchangeCodeOptions, b as IntegrationMethodOptions, c as Policy, f as Options$5, i as Result, k as Options$4, m as Options$6, n as PublicDns$1, o as DefaultOptions, q as selection_d_exports, r as PublicDnsObservation, s as Observation, t as ProviderObservation, u as Options$7, v as IntegrationCredential, w as tokenMethod$3, x as TokenConnectionOptions$1, y as IntegrationFlowOptions, z as oauthMethod$1 } from "./verify-CkgVrwyl.mjs";
|
|
3
|
+
import { Data, Layer } from "effect";
|
|
4
|
+
declare namespace authorization_lifecycle_d_exports {
|
|
5
|
+
export { Aggregate, BindingModification, DetachResult, Error, Repository, from, layerFrom, toAsync };
|
|
6
|
+
}
|
|
7
|
+
interface Repository {
|
|
8
|
+
readonly bind: (authorizationId: string, binding: Connection) => Promise<Aggregate>;
|
|
9
|
+
readonly connect: (aggregate: Aggregate) => Promise<Aggregate>;
|
|
10
|
+
readonly detach: (input: {
|
|
11
|
+
readonly connectionId: string;
|
|
12
|
+
readonly revoke: (aggregate: Aggregate) => Promise<void>;
|
|
13
|
+
}) => Promise<DetachResult>;
|
|
14
|
+
readonly findByProviderAccount: (providerId: string, providerAccountId: string) => Promise<Aggregate | null>;
|
|
15
|
+
readonly get: (authorizationId: string) => Promise<Aggregate | null>;
|
|
16
|
+
readonly getByConnectionId: (connectionId: string) => Promise<Aggregate | null>;
|
|
17
|
+
readonly modifyBinding: <A>(connectionId: string, modify: (binding: Connection) => {
|
|
18
|
+
readonly binding: Connection;
|
|
19
|
+
readonly value: A;
|
|
20
|
+
}) => Promise<BindingModification<A>>;
|
|
21
|
+
readonly promoteEvidence: (authorizationId: string, evidence: ReadonlyArray<CapabilityEvidence>) => Promise<Aggregate>;
|
|
22
|
+
readonly recover: (input: {
|
|
23
|
+
readonly authorizationId: string;
|
|
24
|
+
readonly revoke: (aggregate: Aggregate) => Promise<void>;
|
|
25
|
+
}) => Promise<DetachResult>;
|
|
26
|
+
readonly rotate: (authorizationId: string, credential: StoredCredential, expiresAt: Date | null) => Promise<Aggregate>;
|
|
27
|
+
}
|
|
28
|
+
declare const layerFrom: (repository: Repository) => Layer.Layer<Service>;
|
|
29
|
+
declare const toAsync: (repository: Interface$3) => Repository;
|
|
30
|
+
declare const from: (repository: Repository) => Repository;
|
|
31
|
+
declare namespace connection_d_exports {
|
|
32
|
+
export { Authentication, AuthorizationError, Connection, StartResult as ConnectionStartResult, ContinuationStore, Error$1 as Error, ExtendInput, Grant, InteractiveFlow, Method, OAuthContinuation, RemoveDomainInput, RemoveDomainResult, Schema$1 as Schema, StartResult, StoredCredential, assertGrant, complete, coversDomain, decode$3 as decode, encode, extend, fromEffectFlow, fromEffectTokenMethod, includeDomains, removeDomain, removeDomain$1 as removeDomainFromGrant, start, toAsyncContinuations };
|
|
33
|
+
}
|
|
34
|
+
declare function decode$3(input: unknown): Promise<Connection>;
|
|
35
|
+
type Method = Data.TaggedEnum<{
|
|
36
|
+
Interactive: {
|
|
37
|
+
readonly continuations: ContinuationStore;
|
|
38
|
+
readonly flow: InteractiveFlow;
|
|
39
|
+
readonly ttlMs?: number;
|
|
40
|
+
};
|
|
41
|
+
Token: {
|
|
42
|
+
readonly authenticate: (token: Value) => Promise<Authentication>;
|
|
43
|
+
readonly providerId: string;
|
|
44
|
+
readonly requiredCapabilities: ReadonlyArray<Capability>;
|
|
45
|
+
readonly token: Value;
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
declare const Method: {
|
|
49
|
+
readonly $is: <Tag extends "Interactive" | "Token">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
50
|
+
readonly _tag: "Interactive";
|
|
51
|
+
readonly continuations: ContinuationStore;
|
|
52
|
+
readonly flow: InteractiveFlow;
|
|
53
|
+
readonly ttlMs?: number;
|
|
54
|
+
}, {
|
|
55
|
+
readonly _tag: Tag;
|
|
56
|
+
}> | Extract<{
|
|
57
|
+
readonly _tag: "Token";
|
|
58
|
+
readonly authenticate: (token: Value) => Promise<Authentication>;
|
|
59
|
+
readonly providerId: string;
|
|
60
|
+
readonly requiredCapabilities: ReadonlyArray<Capability>;
|
|
61
|
+
readonly token: Value;
|
|
62
|
+
}, {
|
|
63
|
+
readonly _tag: Tag;
|
|
64
|
+
}>;
|
|
65
|
+
readonly $match: {
|
|
66
|
+
<Cases extends { readonly [Tag in "Interactive" | "Token"]: (args: Extract<{
|
|
67
|
+
readonly _tag: "Interactive";
|
|
68
|
+
readonly continuations: ContinuationStore;
|
|
69
|
+
readonly flow: InteractiveFlow;
|
|
70
|
+
readonly ttlMs?: number;
|
|
71
|
+
} | {
|
|
72
|
+
readonly _tag: "Token";
|
|
73
|
+
readonly authenticate: (token: Value) => Promise<Authentication>;
|
|
74
|
+
readonly providerId: string;
|
|
75
|
+
readonly requiredCapabilities: ReadonlyArray<Capability>;
|
|
76
|
+
readonly token: Value;
|
|
77
|
+
}, {
|
|
78
|
+
readonly _tag: Tag;
|
|
79
|
+
}>) => any; }>(cases: Cases): (value: {
|
|
80
|
+
readonly _tag: "Interactive";
|
|
81
|
+
readonly continuations: ContinuationStore;
|
|
82
|
+
readonly flow: InteractiveFlow;
|
|
83
|
+
readonly ttlMs?: number;
|
|
84
|
+
} | {
|
|
85
|
+
readonly _tag: "Token";
|
|
86
|
+
readonly authenticate: (token: Value) => Promise<Authentication>;
|
|
87
|
+
readonly providerId: string;
|
|
88
|
+
readonly requiredCapabilities: ReadonlyArray<Capability>;
|
|
89
|
+
readonly token: Value;
|
|
90
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Interactive" | "Token"]>>;
|
|
91
|
+
<Cases extends { readonly [Tag in "Interactive" | "Token"]: (args: Extract<{
|
|
92
|
+
readonly _tag: "Interactive";
|
|
93
|
+
readonly continuations: ContinuationStore;
|
|
94
|
+
readonly flow: InteractiveFlow;
|
|
95
|
+
readonly ttlMs?: number;
|
|
96
|
+
} | {
|
|
97
|
+
readonly _tag: "Token";
|
|
98
|
+
readonly authenticate: (token: Value) => Promise<Authentication>;
|
|
99
|
+
readonly providerId: string;
|
|
100
|
+
readonly requiredCapabilities: ReadonlyArray<Capability>;
|
|
101
|
+
readonly token: Value;
|
|
102
|
+
}, {
|
|
103
|
+
readonly _tag: Tag;
|
|
104
|
+
}>) => any; }>(value: {
|
|
105
|
+
readonly _tag: "Interactive";
|
|
106
|
+
readonly continuations: ContinuationStore;
|
|
107
|
+
readonly flow: InteractiveFlow;
|
|
108
|
+
readonly ttlMs?: number;
|
|
109
|
+
} | {
|
|
110
|
+
readonly _tag: "Token";
|
|
111
|
+
readonly authenticate: (token: Value) => Promise<Authentication>;
|
|
112
|
+
readonly providerId: string;
|
|
113
|
+
readonly requiredCapabilities: ReadonlyArray<Capability>;
|
|
114
|
+
readonly token: Value;
|
|
115
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Interactive" | "Token"]>>;
|
|
116
|
+
};
|
|
117
|
+
readonly Interactive: Data.TaggedEnum.ConstructorFrom<{
|
|
118
|
+
readonly _tag: "Interactive";
|
|
119
|
+
readonly continuations: ContinuationStore;
|
|
120
|
+
readonly flow: InteractiveFlow;
|
|
121
|
+
readonly ttlMs?: number;
|
|
122
|
+
}, "_tag">;
|
|
123
|
+
readonly Token: Data.TaggedEnum.ConstructorFrom<{
|
|
124
|
+
readonly _tag: "Token";
|
|
125
|
+
readonly authenticate: (token: Value) => Promise<Authentication>;
|
|
126
|
+
readonly providerId: string;
|
|
127
|
+
readonly requiredCapabilities: ReadonlyArray<Capability>;
|
|
128
|
+
readonly token: Value;
|
|
129
|
+
}, "_tag">;
|
|
130
|
+
};
|
|
131
|
+
interface ContinuationStore {
|
|
132
|
+
readonly consume: (id: string, now: Date) => Promise<Continuation | null>;
|
|
133
|
+
readonly put: (continuation: Continuation) => Promise<void>;
|
|
134
|
+
}
|
|
135
|
+
interface InteractiveFlow {
|
|
136
|
+
readonly complete: (payload: Value, callbackUrl: URL) => Promise<Authentication>;
|
|
137
|
+
readonly method: "integration" | "oauth2";
|
|
138
|
+
readonly providerId: string;
|
|
139
|
+
readonly requiredCapabilities: ReadonlyArray<Capability>;
|
|
140
|
+
readonly start: (continuationId: string) => Promise<InteractiveStart>;
|
|
141
|
+
}
|
|
142
|
+
declare const toAsyncContinuations: (store: ContinuationStore$1) => ContinuationStore;
|
|
143
|
+
/** Adapts an Effect-native provider flow to the Promise facade. */
|
|
144
|
+
declare const fromEffectFlow: (flow: InteractiveFlow$1) => InteractiveFlow;
|
|
145
|
+
/** Adapts an Effect-native token method to the Promise facade. */
|
|
146
|
+
declare function fromEffectTokenMethod(method: Extract<Method$1, {
|
|
147
|
+
readonly _tag: "Token";
|
|
148
|
+
}>): Extract<Method, {
|
|
149
|
+
readonly _tag: "Token";
|
|
150
|
+
}>;
|
|
151
|
+
declare function start(input: BaseInput & {
|
|
152
|
+
readonly method: Method;
|
|
153
|
+
readonly repository: Repository;
|
|
154
|
+
}): Promise<StartResult>;
|
|
155
|
+
declare function complete(input: {
|
|
156
|
+
readonly callbackUrl: URL;
|
|
157
|
+
readonly continuationId: string;
|
|
158
|
+
readonly continuations: ContinuationStore;
|
|
159
|
+
readonly flow: InteractiveFlow;
|
|
160
|
+
readonly repository: Repository;
|
|
161
|
+
}): Promise<Aggregate>;
|
|
162
|
+
/** Extends one owner binding without repeating provider authentication. */
|
|
163
|
+
declare function extend(input: ExtendInput & {
|
|
164
|
+
readonly repository: Repository;
|
|
165
|
+
}): Promise<Aggregate>;
|
|
166
|
+
/** Removes one domain from an owner binding without revoking provider authorization. */
|
|
167
|
+
declare function removeDomain(input: RemoveDomainInput & {
|
|
168
|
+
readonly repository: Repository;
|
|
169
|
+
}): Promise<RemoveDomainResult>;
|
|
170
|
+
declare namespace dns_provider_d_exports {
|
|
171
|
+
export { CreateResult, AsyncInterface as Interface };
|
|
172
|
+
}
|
|
173
|
+
declare namespace dns_resolver_d_exports {
|
|
174
|
+
export { Answer, AsyncInterface$1 as Interface, Query, AsyncResolution as Resolution };
|
|
175
|
+
}
|
|
176
|
+
declare namespace provider_auth_d_exports {
|
|
177
|
+
export { Manifest, Method$2 as Method, OAuthClientConfiguration, OAuthMethod, AsyncOAuthSubjectResolver as OAuthSubjectResolver, Schema$2 as Schema, TokenValidation, decode$2 as decode };
|
|
178
|
+
}
|
|
179
|
+
declare function decode$2(input: unknown): Promise<Manifest>;
|
|
180
|
+
declare namespace provider_authorization_d_exports {
|
|
181
|
+
export { Capability, CapabilityEvidence, Evidence, EvidenceSchema, ProviderAuthorization, Schema$3 as Schema, decode$1 as decode, encode$1 as encode };
|
|
182
|
+
}
|
|
183
|
+
declare function decode$1(input: unknown): Promise<ProviderAuthorization>;
|
|
184
|
+
declare namespace zone_discovery_d_exports {
|
|
185
|
+
export { Candidate, Outcome, Source, discover, toEffectSource };
|
|
186
|
+
}
|
|
187
|
+
interface Source {
|
|
188
|
+
readonly listZones: (name: DomainName) => Promise<ReadonlyArray<Omit<Candidate, "providerId">>>;
|
|
189
|
+
readonly provider: AsyncInterface;
|
|
190
|
+
}
|
|
191
|
+
type Outcome = {
|
|
192
|
+
readonly _tag: "NotFound";
|
|
193
|
+
readonly domain: DomainName;
|
|
194
|
+
} | {
|
|
195
|
+
readonly _tag: "Resolved";
|
|
196
|
+
readonly candidate: Candidate;
|
|
197
|
+
} | {
|
|
198
|
+
readonly _tag: "SelectionRequired";
|
|
199
|
+
readonly candidates: ReadonlyArray<Candidate>;
|
|
200
|
+
};
|
|
201
|
+
declare function discover(input: {
|
|
202
|
+
readonly domain: DomainName;
|
|
203
|
+
readonly sources: ReadonlyArray<Source>;
|
|
204
|
+
}): Promise<Outcome>;
|
|
205
|
+
declare function toEffectSource(source: Source): Source$1;
|
|
206
|
+
declare namespace dns_record_d_exports {
|
|
207
|
+
export { A, Aaaa, Caa, Cname, DnsRecord, Encoded, Mx, Ns, Observed, Opaque, RequirementMetadata, Schema$4 as Schema, Srv, Txt, Type, data, equals, parse };
|
|
208
|
+
}
|
|
209
|
+
declare namespace domain_name_d_exports {
|
|
210
|
+
export { DomainName, Schema$5 as Schema, parse$1 as parse };
|
|
211
|
+
}
|
|
212
|
+
declare namespace dns_plan_d_exports {
|
|
213
|
+
export { ApplyReceipt, Authorization, DnsPlan, Operation, PlanAuthorization, Receipt, Schema$6 as Schema, decode, decodeReceipt, encode$2 as encode, encodeReceipt };
|
|
214
|
+
}
|
|
215
|
+
declare function decode(input: unknown): Promise<DnsPlan>;
|
|
216
|
+
declare function decodeReceipt(input: unknown): Promise<ApplyReceipt>;
|
|
217
|
+
declare namespace deletion_d_exports {
|
|
218
|
+
export { ApplyError, Authorization$1 as Authorization, CreateError, Authorization$1 as DeletionAuthorization, Operation$1 as DeletionOperation, Plan as DeletionPlan, Receipt$1 as DeletionReceipt, Error$2 as Error, Operation$1 as Operation, PartialError, Plan, Receipt$1 as Receipt, apply$1 as apply, authorize$1 as authorize, create$1 as create };
|
|
219
|
+
}
|
|
220
|
+
declare function create$1(input: {
|
|
221
|
+
readonly plan: DnsPlan;
|
|
222
|
+
readonly provider: AsyncInterface;
|
|
223
|
+
readonly receipt: ApplyReceipt;
|
|
224
|
+
readonly ttlMs?: number;
|
|
225
|
+
}): Promise<Plan>;
|
|
226
|
+
declare function authorize$1(plan: Plan, operationIds?: ReadonlyArray<string>): Promise<Authorization$1>;
|
|
227
|
+
declare function apply$1(input: {
|
|
228
|
+
readonly authorization: Authorization$1;
|
|
229
|
+
readonly plan: Plan;
|
|
230
|
+
readonly priorReceipt?: Receipt$1;
|
|
231
|
+
readonly provider: AsyncInterface;
|
|
232
|
+
}): Promise<Receipt$1>;
|
|
233
|
+
declare namespace cloudflare_auth_d_exports {
|
|
234
|
+
export { CredentialTarget, OAuthFlowOptions, OAuthMethodOptions, SubjectResolverOptions, TokenValidatorOptions, manifest$1 as manifest, oauthFlow, oauthMethod, subjectResolver, tokenConnectionMethod$1 as tokenConnectionMethod, tokenMethod$1 as tokenMethod, tokenValidator };
|
|
235
|
+
}
|
|
236
|
+
declare const manifest$1: typeof manifest$2;
|
|
237
|
+
declare const oauthMethod: typeof oauthMethod$1;
|
|
238
|
+
declare const tokenMethod$1: typeof tokenMethod$2;
|
|
239
|
+
declare function subjectResolver(options: SubjectResolverOptions): AsyncOAuthSubjectResolver;
|
|
240
|
+
/** Creates Cloudflare's OAuth implementation for the Promise connection facade. */
|
|
241
|
+
declare function oauthFlow(options: OAuthFlowOptions): InteractiveFlow;
|
|
242
|
+
/** Creates a Cloudflare token method for the Promise connection facade. */
|
|
243
|
+
declare function tokenConnectionMethod$1(options: TokenConnectionOptions): Extract<Method, {
|
|
244
|
+
readonly _tag: "Token";
|
|
245
|
+
}>;
|
|
246
|
+
declare function tokenValidator(options: TokenValidatorOptions): (token: Value) => Promise<TokenValidation>;
|
|
247
|
+
declare namespace cloudflare_d_exports {
|
|
248
|
+
export { Account, cloudflare_auth_d_exports as Auth, Fetch, Interface$2 as Interface, ListZonesInput, Options$3 as Options, Zone, discovery$1 as discovery, make$5 as make };
|
|
249
|
+
}
|
|
250
|
+
interface Interface$2 extends AsyncInterface {
|
|
251
|
+
readonly listAccounts: () => Promise<ReadonlyArray<Account>>;
|
|
252
|
+
readonly listZones: (input?: ListZonesInput) => Promise<ReadonlyArray<Zone>>;
|
|
253
|
+
readonly validateToken: () => Promise<TokenValidation>;
|
|
254
|
+
}
|
|
255
|
+
/** Creates a Promise-compatible facade over the Effect-native Cloudflare client. */
|
|
256
|
+
declare function make$5(options: Options$3): Interface$2;
|
|
257
|
+
/** Creates the optional Cloudflare discovery source for Promise consumers. */
|
|
258
|
+
declare function discovery$1(options: Options$3): Source;
|
|
259
|
+
declare namespace vercel_auth_d_exports {
|
|
260
|
+
export { ExchangeCodeOptions, IntegrationCredential, IntegrationFlowOptions, IntegrationMethodOptions, exchangeCode, integrationFlow, integrationMethod, manifest, tokenConnectionMethod, tokenMethod };
|
|
261
|
+
}
|
|
262
|
+
declare const integrationMethod: typeof integrationMethod$1;
|
|
263
|
+
declare const manifest: typeof manifest$3;
|
|
264
|
+
declare const tokenMethod: typeof tokenMethod$3;
|
|
265
|
+
declare function exchangeCode(options: ExchangeCodeOptions): Promise<IntegrationCredential>;
|
|
266
|
+
/** Creates Vercel Integration's implementation for the Promise connection facade. */
|
|
267
|
+
declare function integrationFlow(options: IntegrationFlowOptions): InteractiveFlow;
|
|
268
|
+
/** Creates a Vercel token method for the Promise connection facade. */
|
|
269
|
+
declare function tokenConnectionMethod(options: TokenConnectionOptions$1): Extract<Method, {
|
|
270
|
+
readonly _tag: "Token";
|
|
271
|
+
}>;
|
|
272
|
+
declare namespace vercel_d_exports {
|
|
273
|
+
export { Account$1 as Account, AccountContext, vercel_auth_d_exports as Auth, Fetch$1 as Fetch, Interface$1 as Interface, ListZonesInput$1 as ListZonesInput, Options$4 as Options, Zone$1 as Zone, discovery, make$4 as make };
|
|
274
|
+
}
|
|
275
|
+
interface Interface$1 extends AsyncInterface {
|
|
276
|
+
readonly listAccounts: () => Promise<ReadonlyArray<Account$1>>;
|
|
277
|
+
readonly listZones: (input?: ListZonesInput$1) => Promise<ReadonlyArray<Zone$1>>;
|
|
278
|
+
readonly validateToken: () => Promise<TokenValidation>;
|
|
279
|
+
}
|
|
280
|
+
/** Creates a Promise-compatible facade over the Effect-native Vercel client. */
|
|
281
|
+
declare function make$4(options: Options$4): Interface$1;
|
|
282
|
+
/** Creates the optional Vercel discovery source for Promise consumers. */
|
|
283
|
+
declare function discovery(options: Options$4): Source;
|
|
284
|
+
declare namespace provisioning_d_exports {
|
|
285
|
+
export { CreateResult$1 as CreateResult, DiscoverCreateInput, ExactCreateInput, Target, apply, authorize, authorizeForConnection, create, renderManualInstructions };
|
|
286
|
+
}
|
|
287
|
+
interface ExactCreateInput extends ExactCreateInput$1 {
|
|
288
|
+
readonly provider: AsyncInterface;
|
|
289
|
+
}
|
|
290
|
+
interface DiscoverCreateInput extends DiscoverCreateInput$1 {
|
|
291
|
+
readonly sources: ReadonlyArray<Source>;
|
|
292
|
+
}
|
|
293
|
+
declare function create(input: ExactCreateInput): Promise<ResolvedCreateResult>;
|
|
294
|
+
declare function create(input: DiscoverCreateInput): Promise<CreateResult$1>;
|
|
295
|
+
declare function authorize(plan: DnsPlan, operationIds?: ReadonlyArray<string>, options?: {
|
|
296
|
+
readonly allowPartial?: boolean;
|
|
297
|
+
}): Promise<PlanAuthorization>;
|
|
298
|
+
declare function apply(input: {
|
|
299
|
+
readonly authorization: PlanAuthorization;
|
|
300
|
+
readonly plan: DnsPlan;
|
|
301
|
+
readonly provider: AsyncInterface;
|
|
302
|
+
}): Promise<ApplyReceipt>;
|
|
303
|
+
declare function authorizeForConnection(input: {
|
|
304
|
+
readonly allowPartial?: boolean;
|
|
305
|
+
readonly authorization: ProviderAuthorization;
|
|
306
|
+
readonly connection: Connection;
|
|
307
|
+
readonly domain: string;
|
|
308
|
+
readonly operationIds?: ReadonlyArray<string>;
|
|
309
|
+
readonly plan: DnsPlan;
|
|
310
|
+
}): Promise<PlanAuthorization>;
|
|
311
|
+
declare const renderManualInstructions: typeof renderManualInstructions$1;
|
|
312
|
+
declare namespace resolver_pool_d_exports {
|
|
313
|
+
export { Entry, Interface, Observation, Policy, defaultMake, make$3 as make };
|
|
314
|
+
}
|
|
315
|
+
interface Entry {
|
|
316
|
+
readonly id: string;
|
|
317
|
+
readonly resolver: AsyncInterface$1;
|
|
318
|
+
readonly timeoutMs?: number;
|
|
319
|
+
}
|
|
320
|
+
interface Interface {
|
|
321
|
+
readonly observe: (query: Query) => Promise<ReadonlyArray<Observation>>;
|
|
322
|
+
}
|
|
323
|
+
declare function make$3(entries: ReadonlyArray<Entry>): Interface;
|
|
324
|
+
declare function defaultMake(options?: DefaultOptions): Interface;
|
|
325
|
+
declare namespace verification_d_exports {
|
|
326
|
+
export { Config, Provider, ProviderObservation, PublicDns, PublicDnsObservation, Result, observe };
|
|
327
|
+
}
|
|
328
|
+
type PublicDns = PublicDns$1;
|
|
329
|
+
declare const PublicDns: {
|
|
330
|
+
readonly $is: <Tag extends "Disabled" | "Enabled">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
331
|
+
readonly _tag: "Disabled";
|
|
332
|
+
}, {
|
|
333
|
+
readonly _tag: Tag;
|
|
334
|
+
}> | Extract<{
|
|
335
|
+
readonly _tag: "Enabled";
|
|
336
|
+
readonly policy?: Policy;
|
|
337
|
+
}, {
|
|
338
|
+
readonly _tag: Tag;
|
|
339
|
+
}>;
|
|
340
|
+
readonly $match: {
|
|
341
|
+
<Cases extends { readonly [Tag in "Disabled" | "Enabled"]: (args: Extract<{
|
|
342
|
+
readonly _tag: "Disabled";
|
|
343
|
+
} | {
|
|
344
|
+
readonly _tag: "Enabled";
|
|
345
|
+
readonly policy?: Policy;
|
|
346
|
+
}, {
|
|
347
|
+
readonly _tag: Tag;
|
|
348
|
+
}>) => any; }>(cases: Cases): (value: {
|
|
349
|
+
readonly _tag: "Disabled";
|
|
350
|
+
} | {
|
|
351
|
+
readonly _tag: "Enabled";
|
|
352
|
+
readonly policy?: Policy;
|
|
353
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Disabled" | "Enabled"]>>;
|
|
354
|
+
<Cases extends { readonly [Tag in "Disabled" | "Enabled"]: (args: Extract<{
|
|
355
|
+
readonly _tag: "Disabled";
|
|
356
|
+
} | {
|
|
357
|
+
readonly _tag: "Enabled";
|
|
358
|
+
readonly policy?: Policy;
|
|
359
|
+
}, {
|
|
360
|
+
readonly _tag: Tag;
|
|
361
|
+
}>) => any; }>(value: {
|
|
362
|
+
readonly _tag: "Disabled";
|
|
363
|
+
} | {
|
|
364
|
+
readonly _tag: "Enabled";
|
|
365
|
+
readonly policy?: Policy;
|
|
366
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Disabled" | "Enabled"]>>;
|
|
367
|
+
};
|
|
368
|
+
readonly Disabled: Data.TaggedEnum.ConstructorFrom<{
|
|
369
|
+
readonly _tag: "Disabled";
|
|
370
|
+
}, "_tag">;
|
|
371
|
+
readonly Enabled: Data.TaggedEnum.ConstructorFrom<{
|
|
372
|
+
readonly _tag: "Enabled";
|
|
373
|
+
readonly policy?: Policy;
|
|
374
|
+
}, "_tag">;
|
|
375
|
+
};
|
|
376
|
+
type Provider = Data.TaggedEnum<{
|
|
377
|
+
Disabled: {};
|
|
378
|
+
Enabled: {
|
|
379
|
+
readonly provider: AsyncInterface;
|
|
380
|
+
readonly zone: DomainName;
|
|
381
|
+
};
|
|
382
|
+
}>;
|
|
383
|
+
declare const Provider: {
|
|
384
|
+
readonly $is: <Tag extends "Disabled" | "Enabled">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
385
|
+
readonly _tag: "Disabled";
|
|
386
|
+
}, {
|
|
387
|
+
readonly _tag: Tag;
|
|
388
|
+
}> | Extract<{
|
|
389
|
+
readonly _tag: "Enabled";
|
|
390
|
+
readonly provider: AsyncInterface;
|
|
391
|
+
readonly zone: DomainName;
|
|
392
|
+
}, {
|
|
393
|
+
readonly _tag: Tag;
|
|
394
|
+
}>;
|
|
395
|
+
readonly $match: {
|
|
396
|
+
<Cases extends { readonly [Tag in "Disabled" | "Enabled"]: (args: Extract<{
|
|
397
|
+
readonly _tag: "Disabled";
|
|
398
|
+
} | {
|
|
399
|
+
readonly _tag: "Enabled";
|
|
400
|
+
readonly provider: AsyncInterface;
|
|
401
|
+
readonly zone: DomainName;
|
|
402
|
+
}, {
|
|
403
|
+
readonly _tag: Tag;
|
|
404
|
+
}>) => any; }>(cases: Cases): (value: {
|
|
405
|
+
readonly _tag: "Disabled";
|
|
406
|
+
} | {
|
|
407
|
+
readonly _tag: "Enabled";
|
|
408
|
+
readonly provider: AsyncInterface;
|
|
409
|
+
readonly zone: DomainName;
|
|
410
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Disabled" | "Enabled"]>>;
|
|
411
|
+
<Cases extends { readonly [Tag in "Disabled" | "Enabled"]: (args: Extract<{
|
|
412
|
+
readonly _tag: "Disabled";
|
|
413
|
+
} | {
|
|
414
|
+
readonly _tag: "Enabled";
|
|
415
|
+
readonly provider: AsyncInterface;
|
|
416
|
+
readonly zone: DomainName;
|
|
417
|
+
}, {
|
|
418
|
+
readonly _tag: Tag;
|
|
419
|
+
}>) => any; }>(value: {
|
|
420
|
+
readonly _tag: "Disabled";
|
|
421
|
+
} | {
|
|
422
|
+
readonly _tag: "Enabled";
|
|
423
|
+
readonly provider: AsyncInterface;
|
|
424
|
+
readonly zone: DomainName;
|
|
425
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Disabled" | "Enabled"]>>;
|
|
426
|
+
};
|
|
427
|
+
readonly Disabled: Data.TaggedEnum.ConstructorFrom<{
|
|
428
|
+
readonly _tag: "Disabled";
|
|
429
|
+
}, "_tag">;
|
|
430
|
+
readonly Enabled: Data.TaggedEnum.ConstructorFrom<{
|
|
431
|
+
readonly _tag: "Enabled";
|
|
432
|
+
readonly provider: AsyncInterface;
|
|
433
|
+
readonly zone: DomainName;
|
|
434
|
+
}, "_tag">;
|
|
435
|
+
};
|
|
436
|
+
interface Config {
|
|
437
|
+
readonly provider?: Provider;
|
|
438
|
+
readonly publicDns?: PublicDns;
|
|
439
|
+
readonly record: DnsRecord;
|
|
440
|
+
readonly resolvers?: ReadonlyArray<Entry>;
|
|
441
|
+
}
|
|
442
|
+
declare function observe(input: Config): Promise<Result>;
|
|
443
|
+
declare namespace cloudflare_doh_d_exports {
|
|
444
|
+
export { Options$2 as Options, make$2 as make };
|
|
445
|
+
}
|
|
446
|
+
type Options$2 = Options$5;
|
|
447
|
+
declare function make$2(options?: Options$2): AsyncInterface$1;
|
|
448
|
+
declare namespace doh_d_exports {
|
|
449
|
+
export { Options$1 as Options, make$1 as make };
|
|
450
|
+
}
|
|
451
|
+
type Options$1 = Options$6;
|
|
452
|
+
declare function make$1(options: Options$1): AsyncInterface$1;
|
|
453
|
+
declare namespace google_doh_d_exports {
|
|
454
|
+
export { Options, make };
|
|
455
|
+
}
|
|
456
|
+
type Options = Options$7;
|
|
457
|
+
declare function make(options?: Options): AsyncInterface$1;
|
|
458
|
+
//#endregion
|
|
459
|
+
//#region src/promise.d.ts
|
|
460
|
+
/** The current package version from the package manifest. */
|
|
461
|
+
declare const VERSION: string;
|
|
462
|
+
//#endregion
|
|
463
|
+
export { authorization_lifecycle_d_exports as AuthorizationLifecycle, cloudflare_d_exports as Cloudflare, cloudflare_doh_d_exports as CloudflareDnsOverHttps, connection_d_exports as Connection, deletion_d_exports as Deletion, diagnostic_d_exports as Diagnostic, doh_d_exports as DnsOverHttps, dns_plan_d_exports as DnsPlan, type dns_provider_d_exports as DnsProvider, dns_record_d_exports as DnsRecord, type dns_resolver_d_exports as DnsResolver, resolver_pool_d_exports as DnsResolverPool, domain_name_d_exports as DomainName, google_doh_d_exports as GoogleDnsOverHttps, invalid_input_d_exports as InvalidInput, provider_auth_d_exports as ProviderAuth, provider_authorization_d_exports as ProviderAuthorization, provider_context_d_exports as ProviderContext, selection_d_exports as ProviderDiscovery, provisioning_d_exports as Provisioning, secret_d_exports as Secret, VERSION, vercel_d_exports as Vercel, verification_d_exports as Verification, zone_discovery_d_exports as ZoneDiscovery, zones_d_exports as Zones };
|
|
464
|
+
//# sourceMappingURL=promise.d.mts.map
|