domainkit 0.1.0-beta.0 → 0.1.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/dist/{auth-Df9BuC25.mjs → auth-Vi-hhXbV.mjs} +24 -9
- package/dist/auth-Vi-hhXbV.mjs.map +1 -0
- package/dist/{client-DvXfJx_E.mjs → client-BnD7QLRF.mjs} +54 -21
- package/dist/client-BnD7QLRF.mjs.map +1 -0
- package/dist/{cloudflare-C_ixZsJo.mjs → cloudflare-C6ryPlCZ.mjs} +4 -2
- package/dist/{cloudflare-C_ixZsJo.mjs.map → cloudflare-C6ryPlCZ.mjs.map} +1 -1
- package/dist/{cloudflare-DClWuAm8.d.mts → cloudflare-tdjNS8vE.d.mts} +3 -3
- package/dist/cloudflare.d.mts +2 -2
- package/dist/cloudflare.mjs +1 -1
- package/dist/{dns-record-Dzo4flM5.mjs → dns-record-C_KwGPLf.mjs} +11 -1
- package/dist/dns-record-C_KwGPLf.mjs.map +1 -0
- package/dist/effect-cloudflare.d.mts +1 -1
- package/dist/effect-cloudflare.mjs +1 -1
- package/dist/effect-vercel.d.mts +1 -1
- package/dist/effect-vercel.mjs +1 -1
- package/dist/effect.d.mts +33 -23
- package/dist/effect.mjs +7 -7
- package/dist/effect.mjs.map +1 -1
- package/dist/{index-DQAjUrZu.d.mts → index-CEzk2gbZ.d.mts} +2 -2
- package/dist/{index-D1KtyjuI.d.mts → index-CS9Rl5LQ.d.mts} +2 -2
- package/dist/index.d.mts +72 -27
- package/dist/index.mjs +88 -25
- package/dist/index.mjs.map +1 -1
- package/dist/{manifest-DjH3BVB9.d.mts → manifest-CP85ePFn.d.mts} +5 -1
- package/dist/{receipt-C7PjnibZ.mjs → receipt-CGSnfZQ6.mjs} +2 -2
- package/dist/{receipt-C7PjnibZ.mjs.map → receipt-CGSnfZQ6.mjs.map} +1 -1
- package/dist/{resolver-BjZwN2JE.d.mts → resolver-BHPsADzE.d.mts} +115 -55
- package/dist/{resolver-D5nVrR10.mjs → resolver-tEXpKxmH.mjs} +69 -22
- package/dist/resolver-tEXpKxmH.mjs.map +1 -0
- package/dist/testing.d.mts +24 -18
- package/dist/testing.mjs +72 -24
- package/dist/testing.mjs.map +1 -1
- package/dist/{vercel-Vc_K_87s.d.mts → vercel-D-E2aqb1.d.mts} +3 -3
- package/dist/{vercel-BWz_9Y1v.mjs → vercel-DD89DCqH.mjs} +4 -2
- package/dist/{vercel-BWz_9Y1v.mjs.map → vercel-DD89DCqH.mjs.map} +1 -1
- package/dist/vercel.d.mts +2 -2
- package/dist/vercel.mjs +1 -1
- package/dist/{verify-DPB1OfZ5.d.mts → verify-B80xCBh2.d.mts} +457 -29
- package/dist/{verify-CeMW6XtK.mjs → verify-BjrR_4NF.mjs} +426 -134
- package/dist/verify-BjrR_4NF.mjs.map +1 -0
- package/package.json +4 -2
- package/dist/auth-Df9BuC25.mjs.map +0 -1
- package/dist/client-DvXfJx_E.mjs.map +0 -1
- package/dist/dns-record-Dzo4flM5.mjs.map +0 -1
- package/dist/resolver-D5nVrR10.mjs.map +0 -1
- package/dist/verify-CeMW6XtK.mjs.map +0 -1
|
@@ -1,7 +1,45 @@
|
|
|
1
|
-
import { C as DnsRecord, H as Error, R as DomainName, _ as Service, a as OAuthClientConfiguration, d as Value, h as Error$
|
|
2
|
-
import { A as Service$3, B as
|
|
1
|
+
import { C as DnsRecord, H as Error$2, R as DomainName, _ as Service, a as OAuthClientConfiguration, d as Value, h as Error$3, o as OAuthMethod, w as Encoded } from "./manifest-CP85ePFn.mjs";
|
|
2
|
+
import { A as Service$3, B as Error$4, E as Service$4, H as AuthorizationError$1, P as Service$2, Q as ProviderAuthorization, R as Service$1, U as Connection, W as Grant, a as Interface, c as Service$5, g as DnsPlan, m as ApplyReceipt, n as AsyncInterface, v as PlanAuthorization } from "./resolver-BHPsADzE.mjs";
|
|
3
3
|
import { Cause, Crypto, Effect, Layer, Schema } from "effect";
|
|
4
4
|
import * as oauth from "oauth4webapi";
|
|
5
|
+
declare namespace connection_lifecycle_d_exports {
|
|
6
|
+
export { DetachResult, Error$1 as Error, Requirements$1 as Requirements, detach, updateGrant };
|
|
7
|
+
}
|
|
8
|
+
declare const Error_base$1: Schema.Class<Error$1, Schema.TaggedStruct<"ConnectionLifecycleError", {
|
|
9
|
+
readonly message: Schema.String;
|
|
10
|
+
}>, import("effect/Cause").YieldableError>;
|
|
11
|
+
declare class Error$1 extends Error_base$1 {}
|
|
12
|
+
interface DetachResult {
|
|
13
|
+
readonly connection: Connection;
|
|
14
|
+
readonly remainingBindings: number;
|
|
15
|
+
readonly revokedAuthorization: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Replace the grant on an owner binding after the host has obtained explicit consent. */
|
|
18
|
+
declare const updateGrant: (input: {
|
|
19
|
+
readonly connection: Connection;
|
|
20
|
+
readonly grant: Grant;
|
|
21
|
+
}) => Effect.Effect<{
|
|
22
|
+
readonly authorizationId: string;
|
|
23
|
+
readonly createdAt: Date;
|
|
24
|
+
readonly grant: {
|
|
25
|
+
readonly _tag: "account";
|
|
26
|
+
} | {
|
|
27
|
+
readonly _tag: "domains";
|
|
28
|
+
readonly domains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
|
|
29
|
+
};
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly ownerId: string;
|
|
32
|
+
}, Error$2 | Error$4, Service$1>;
|
|
33
|
+
/**
|
|
34
|
+
* Detach one owner binding. The final binding invokes provider revocation before deleting local
|
|
35
|
+
* credential and authorization state. The callback keeps provider-specific revocation outside the
|
|
36
|
+
* portable authorization model.
|
|
37
|
+
*/
|
|
38
|
+
declare function detach<E, R>(input: {
|
|
39
|
+
readonly connectionId: string;
|
|
40
|
+
readonly revokeAuthorization: (authorization: ProviderAuthorization) => Effect.Effect<void, E, R>;
|
|
41
|
+
}): Effect.Effect<DetachResult, Error$1 | Error$4 | E, R | Requirements$1>;
|
|
42
|
+
type Requirements$1 = Service$1 | Service$2 | Service$3;
|
|
5
43
|
declare namespace canonical_json_d_exports {
|
|
6
44
|
export { CryptoError, Json, sha256Encoded, sha256Json, sha256Text, stringify, webCryptoLayer };
|
|
7
45
|
}
|
|
@@ -27,6 +65,7 @@ interface BeginInput {
|
|
|
27
65
|
readonly client: OAuthClientConfiguration;
|
|
28
66
|
readonly grant: Grant;
|
|
29
67
|
readonly method: OAuthMethod;
|
|
68
|
+
readonly ownerId: string;
|
|
30
69
|
readonly redirectUri: string;
|
|
31
70
|
readonly subjectId: string;
|
|
32
71
|
readonly ttlMs?: number;
|
|
@@ -35,36 +74,39 @@ interface OAuthSubjectResolver {
|
|
|
35
74
|
(tokens: oauth.TokenEndpointResponse, accessToken: Value): Effect.Effect<{
|
|
36
75
|
readonly accountId: string;
|
|
37
76
|
readonly expiresAt: Date | null;
|
|
38
|
-
}, Error | Error$
|
|
77
|
+
}, Error$2 | Error$3>;
|
|
39
78
|
}
|
|
40
|
-
type OAuthError = AuthorizationError$1 | CryptoError | Error | Error$
|
|
79
|
+
type OAuthError = AuthorizationError$1 | CryptoError | Error$2 | Error$3 | Error$4;
|
|
41
80
|
declare const begin: (input: BeginInput) => Effect.Effect<{
|
|
42
81
|
readonly authorizationUrl: URL;
|
|
43
|
-
}, CryptoError | Error$
|
|
82
|
+
}, CryptoError | Error$4, Crypto.Crypto | Service$4>;
|
|
44
83
|
declare const complete: (input: {
|
|
45
84
|
readonly callbackUrl: URL;
|
|
46
85
|
readonly client: OAuthClientConfiguration;
|
|
47
86
|
readonly fetch?: Fetch$1;
|
|
48
87
|
readonly providerId: string;
|
|
49
88
|
readonly resolveSubject: OAuthSubjectResolver;
|
|
50
|
-
}) => Effect.Effect<
|
|
89
|
+
}) => Effect.Effect<{
|
|
90
|
+
readonly authorization: ProviderAuthorization;
|
|
91
|
+
readonly connection: Connection;
|
|
92
|
+
}, OAuthError, Crypto.Crypto | Service$1 | Service$2 | Service$3 | Service$4>;
|
|
51
93
|
declare const refresh: (input: {
|
|
52
94
|
readonly client: OAuthClientConfiguration;
|
|
53
|
-
readonly
|
|
95
|
+
readonly authorization: ProviderAuthorization;
|
|
54
96
|
readonly fetch?: Fetch$1;
|
|
55
97
|
readonly method: OAuthMethod;
|
|
56
|
-
}) => Effect.Effect<void, OAuthError, Service$
|
|
98
|
+
}) => Effect.Effect<void, OAuthError, Service$2>;
|
|
57
99
|
declare const revoke: (input: {
|
|
58
100
|
readonly client: OAuthClientConfiguration;
|
|
59
|
-
readonly
|
|
101
|
+
readonly authorization: ProviderAuthorization;
|
|
60
102
|
readonly fetch?: Fetch$1;
|
|
61
103
|
readonly method: OAuthMethod;
|
|
62
|
-
}) => Effect.Effect<void, OAuthError, Service$
|
|
104
|
+
}) => Effect.Effect<void, OAuthError, Service$2>;
|
|
63
105
|
declare namespace selection_d_exports {
|
|
64
106
|
export { ConnectedZone, Evidence, Selection, select };
|
|
65
107
|
}
|
|
66
108
|
interface ConnectedZone {
|
|
67
|
-
readonly
|
|
109
|
+
readonly authorization: ProviderAuthorization;
|
|
68
110
|
readonly connection: Connection;
|
|
69
111
|
readonly nameservers: ReadonlyArray<string>;
|
|
70
112
|
readonly providerId: string;
|
|
@@ -128,7 +170,7 @@ declare namespace zones_d_exports {
|
|
|
128
170
|
}
|
|
129
171
|
declare function candidates(input: string): ReadonlyArray<DomainName>;
|
|
130
172
|
declare namespace plan_d_exports {
|
|
131
|
-
export { ApplyError, ApplyInput, AuthorizationError, AuthorizeError, ConflictError, CreateError, CreateInput, PartialApplyError, StaleError, apply, authorize, create, renderManualInstructions };
|
|
173
|
+
export { ApplyError$1 as ApplyError, ApplyInput, AuthorizationError, AuthorizeError, ConflictError, CreateError$1 as CreateError, CreateInput$1 as CreateInput, PartialApplyError, StaleError, apply$1 as apply, authorize$1 as authorize, create$1 as create, renderManualInstructions, validate$1 as validate };
|
|
132
174
|
}
|
|
133
175
|
declare const ConflictError_base: Schema.Class<ConflictError, Schema.TaggedStruct<"PlanConflictError", {
|
|
134
176
|
readonly operationIds: Schema.$Array<Schema.String>;
|
|
@@ -161,7 +203,7 @@ declare const PartialApplyError_base: Schema.Class<PartialApplyError, Schema.Tag
|
|
|
161
203
|
}>;
|
|
162
204
|
}>, Cause.YieldableError>;
|
|
163
205
|
declare class PartialApplyError extends PartialApplyError_base {}
|
|
164
|
-
interface CreateInput {
|
|
206
|
+
interface CreateInput$1 {
|
|
165
207
|
readonly requirements: ReadonlyArray<Encoded | DnsRecord>;
|
|
166
208
|
readonly zone: string;
|
|
167
209
|
}
|
|
@@ -169,19 +211,14 @@ interface ApplyInput {
|
|
|
169
211
|
readonly authorization: PlanAuthorization;
|
|
170
212
|
readonly plan: DnsPlan;
|
|
171
213
|
}
|
|
172
|
-
type CreateError = Error | Error$
|
|
214
|
+
type CreateError$1 = Error$2 | Error$3 | CryptoError;
|
|
173
215
|
type AuthorizeError = AuthorizationError | CryptoError;
|
|
174
|
-
type ApplyError = Error | Error$
|
|
216
|
+
type ApplyError$1 = Error$2 | Error$3 | CryptoError | AuthorizationError | ConflictError | StaleError | PartialApplyError;
|
|
175
217
|
/** Builds a deterministic DNS plan through the provider in the Effect environment. */
|
|
176
|
-
declare const create: (input: CreateInput) => Effect.Effect<{
|
|
218
|
+
declare const create$1: (input: CreateInput$1) => Effect.Effect<{
|
|
177
219
|
operations: readonly ({
|
|
178
220
|
readonly _tag: "conflict";
|
|
179
221
|
readonly existing: readonly ({
|
|
180
|
-
readonly _tag: "Opaque";
|
|
181
|
-
readonly name: string;
|
|
182
|
-
readonly providerRecordId: string | null;
|
|
183
|
-
readonly providerType: string;
|
|
184
|
-
} | {
|
|
185
222
|
readonly _tag: "A";
|
|
186
223
|
readonly metadata: {
|
|
187
224
|
readonly ownership: string;
|
|
@@ -275,6 +312,11 @@ declare const create: (input: CreateInput) => Effect.Effect<{
|
|
|
275
312
|
readonly policy: "append" | "exclusive";
|
|
276
313
|
readonly ttl: number | null;
|
|
277
314
|
readonly value: string;
|
|
315
|
+
} | {
|
|
316
|
+
readonly _tag: "Opaque";
|
|
317
|
+
readonly name: string;
|
|
318
|
+
readonly providerRecordId: string | null;
|
|
319
|
+
readonly providerType: string;
|
|
278
320
|
})[];
|
|
279
321
|
readonly id: string;
|
|
280
322
|
readonly reason: string;
|
|
@@ -575,9 +617,9 @@ declare const create: (input: CreateInput) => Effect.Effect<{
|
|
|
575
617
|
version: "domainkit.dns-plan.v1";
|
|
576
618
|
zone: string & import("effect/Brand").Brand<"DomainName">;
|
|
577
619
|
digest: string;
|
|
578
|
-
}, CryptoError | Error | Error$
|
|
620
|
+
}, CryptoError | Error$2 | Error$3, Crypto.Crypto | Service>;
|
|
579
621
|
/** Authorizes all or a selected subset of create operations in a digest-bound plan. */
|
|
580
|
-
declare const authorize: (plan: DnsPlan, operationIds?: readonly string[] | undefined, options?: {
|
|
622
|
+
declare const authorize$1: (plan: DnsPlan, operationIds?: readonly string[] | undefined, options?: {
|
|
581
623
|
readonly allowPartial?: boolean;
|
|
582
624
|
} | undefined) => Effect.Effect<{
|
|
583
625
|
allowPartial: boolean;
|
|
@@ -586,8 +628,394 @@ declare const authorize: (plan: DnsPlan, operationIds?: readonly string[] | unde
|
|
|
586
628
|
version: "domainkit.plan-authorization.v1";
|
|
587
629
|
}, AuthorizeError, Crypto.Crypto>;
|
|
588
630
|
/** Applies approved creates sequentially after full and per-operation revalidation. */
|
|
589
|
-
declare const apply: (input: ApplyInput) => Effect.Effect<ApplyReceipt, AuthorizationError | ConflictError | CryptoError | Error | Error$
|
|
631
|
+
declare const apply$1: (input: ApplyInput) => Effect.Effect<ApplyReceipt, AuthorizationError | ConflictError | CryptoError | Error$2 | Error$3 | PartialApplyError | StaleError, Crypto.Crypto | Service>;
|
|
590
632
|
declare function renderManualInstructions(plan: DnsPlan): ReadonlyArray<string>;
|
|
633
|
+
declare function validate$1(plan: DnsPlan): Effect.Effect<void, AuthorizeError, Crypto.Crypto>;
|
|
634
|
+
declare namespace deletion_d_exports {
|
|
635
|
+
export { ApplyError, Authorization, CreateError, CreateInput, Error, Operation, PartialError, Plan, Receipt, Requirements, apply, authorize, create, validate };
|
|
636
|
+
}
|
|
637
|
+
declare const Operation: Schema.Struct<{
|
|
638
|
+
readonly id: Schema.String;
|
|
639
|
+
readonly providerRecordId: Schema.String;
|
|
640
|
+
readonly record: Schema.TaggedUnion<{
|
|
641
|
+
readonly A: Schema.TaggedStruct<"A", {
|
|
642
|
+
readonly metadata: Schema.Struct<{
|
|
643
|
+
readonly ownership: Schema.String;
|
|
644
|
+
readonly provenance: Schema.String;
|
|
645
|
+
readonly purpose: Schema.String;
|
|
646
|
+
}>;
|
|
647
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
648
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
649
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
650
|
+
readonly address: Schema.String;
|
|
651
|
+
}>;
|
|
652
|
+
readonly AAAA: Schema.TaggedStruct<"AAAA", {
|
|
653
|
+
readonly metadata: Schema.Struct<{
|
|
654
|
+
readonly ownership: Schema.String;
|
|
655
|
+
readonly provenance: Schema.String;
|
|
656
|
+
readonly purpose: Schema.String;
|
|
657
|
+
}>;
|
|
658
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
659
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
660
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
661
|
+
readonly address: Schema.String;
|
|
662
|
+
}>;
|
|
663
|
+
readonly CAA: Schema.TaggedStruct<"CAA", {
|
|
664
|
+
readonly metadata: Schema.Struct<{
|
|
665
|
+
readonly ownership: Schema.String;
|
|
666
|
+
readonly provenance: Schema.String;
|
|
667
|
+
readonly purpose: Schema.String;
|
|
668
|
+
}>;
|
|
669
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
670
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
671
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
672
|
+
readonly flags: Schema.Int;
|
|
673
|
+
readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
|
|
674
|
+
readonly value: Schema.String;
|
|
675
|
+
}>;
|
|
676
|
+
readonly CNAME: Schema.TaggedStruct<"CNAME", {
|
|
677
|
+
readonly metadata: Schema.Struct<{
|
|
678
|
+
readonly ownership: Schema.String;
|
|
679
|
+
readonly provenance: Schema.String;
|
|
680
|
+
readonly purpose: Schema.String;
|
|
681
|
+
}>;
|
|
682
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
683
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
684
|
+
readonly policy: Schema.Literal<"exclusive">;
|
|
685
|
+
readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
686
|
+
}>;
|
|
687
|
+
readonly MX: Schema.TaggedStruct<"MX", {
|
|
688
|
+
readonly metadata: Schema.Struct<{
|
|
689
|
+
readonly ownership: Schema.String;
|
|
690
|
+
readonly provenance: Schema.String;
|
|
691
|
+
readonly purpose: Schema.String;
|
|
692
|
+
}>;
|
|
693
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
694
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
695
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
696
|
+
readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
697
|
+
readonly priority: Schema.Int;
|
|
698
|
+
}>;
|
|
699
|
+
readonly NS: Schema.TaggedStruct<"NS", {
|
|
700
|
+
readonly metadata: Schema.Struct<{
|
|
701
|
+
readonly ownership: Schema.String;
|
|
702
|
+
readonly provenance: Schema.String;
|
|
703
|
+
readonly purpose: Schema.String;
|
|
704
|
+
}>;
|
|
705
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
706
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
707
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
708
|
+
readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
709
|
+
}>;
|
|
710
|
+
readonly SRV: Schema.TaggedStruct<"SRV", {
|
|
711
|
+
readonly metadata: Schema.Struct<{
|
|
712
|
+
readonly ownership: Schema.String;
|
|
713
|
+
readonly provenance: Schema.String;
|
|
714
|
+
readonly purpose: Schema.String;
|
|
715
|
+
}>;
|
|
716
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
717
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
718
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
719
|
+
readonly port: Schema.Int;
|
|
720
|
+
readonly priority: Schema.Int;
|
|
721
|
+
readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
722
|
+
readonly weight: Schema.Int;
|
|
723
|
+
}>;
|
|
724
|
+
readonly TXT: Schema.TaggedStruct<"TXT", {
|
|
725
|
+
readonly metadata: Schema.Struct<{
|
|
726
|
+
readonly ownership: Schema.String;
|
|
727
|
+
readonly provenance: Schema.String;
|
|
728
|
+
readonly purpose: Schema.String;
|
|
729
|
+
}>;
|
|
730
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
731
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
732
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
733
|
+
readonly value: Schema.String;
|
|
734
|
+
}>;
|
|
735
|
+
}>;
|
|
736
|
+
}>;
|
|
737
|
+
interface Operation extends Schema.Schema.Type<typeof Operation> {}
|
|
738
|
+
declare const Plan: Schema.Struct<{
|
|
739
|
+
readonly createdAt: Schema.DateFromString;
|
|
740
|
+
readonly expiresAt: Schema.DateFromString;
|
|
741
|
+
readonly operations: Schema.$Array<Schema.Struct<{
|
|
742
|
+
readonly id: Schema.String;
|
|
743
|
+
readonly providerRecordId: Schema.String;
|
|
744
|
+
readonly record: Schema.TaggedUnion<{
|
|
745
|
+
readonly A: Schema.TaggedStruct<"A", {
|
|
746
|
+
readonly metadata: Schema.Struct<{
|
|
747
|
+
readonly ownership: Schema.String;
|
|
748
|
+
readonly provenance: Schema.String;
|
|
749
|
+
readonly purpose: Schema.String;
|
|
750
|
+
}>;
|
|
751
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
752
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
753
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
754
|
+
readonly address: Schema.String;
|
|
755
|
+
}>;
|
|
756
|
+
readonly AAAA: Schema.TaggedStruct<"AAAA", {
|
|
757
|
+
readonly metadata: Schema.Struct<{
|
|
758
|
+
readonly ownership: Schema.String;
|
|
759
|
+
readonly provenance: Schema.String;
|
|
760
|
+
readonly purpose: Schema.String;
|
|
761
|
+
}>;
|
|
762
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
763
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
764
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
765
|
+
readonly address: Schema.String;
|
|
766
|
+
}>;
|
|
767
|
+
readonly CAA: Schema.TaggedStruct<"CAA", {
|
|
768
|
+
readonly metadata: Schema.Struct<{
|
|
769
|
+
readonly ownership: Schema.String;
|
|
770
|
+
readonly provenance: Schema.String;
|
|
771
|
+
readonly purpose: Schema.String;
|
|
772
|
+
}>;
|
|
773
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
774
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
775
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
776
|
+
readonly flags: Schema.Int;
|
|
777
|
+
readonly tag: Schema.Literals<readonly ["issue", "issuewild", "iodef"]>;
|
|
778
|
+
readonly value: Schema.String;
|
|
779
|
+
}>;
|
|
780
|
+
readonly CNAME: Schema.TaggedStruct<"CNAME", {
|
|
781
|
+
readonly metadata: Schema.Struct<{
|
|
782
|
+
readonly ownership: Schema.String;
|
|
783
|
+
readonly provenance: Schema.String;
|
|
784
|
+
readonly purpose: Schema.String;
|
|
785
|
+
}>;
|
|
786
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
787
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
788
|
+
readonly policy: Schema.Literal<"exclusive">;
|
|
789
|
+
readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
790
|
+
}>;
|
|
791
|
+
readonly MX: Schema.TaggedStruct<"MX", {
|
|
792
|
+
readonly metadata: Schema.Struct<{
|
|
793
|
+
readonly ownership: Schema.String;
|
|
794
|
+
readonly provenance: Schema.String;
|
|
795
|
+
readonly purpose: Schema.String;
|
|
796
|
+
}>;
|
|
797
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
798
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
799
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
800
|
+
readonly exchange: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
801
|
+
readonly priority: Schema.Int;
|
|
802
|
+
}>;
|
|
803
|
+
readonly NS: Schema.TaggedStruct<"NS", {
|
|
804
|
+
readonly metadata: Schema.Struct<{
|
|
805
|
+
readonly ownership: Schema.String;
|
|
806
|
+
readonly provenance: Schema.String;
|
|
807
|
+
readonly purpose: Schema.String;
|
|
808
|
+
}>;
|
|
809
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
810
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
811
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
812
|
+
readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
813
|
+
}>;
|
|
814
|
+
readonly SRV: Schema.TaggedStruct<"SRV", {
|
|
815
|
+
readonly metadata: Schema.Struct<{
|
|
816
|
+
readonly ownership: Schema.String;
|
|
817
|
+
readonly provenance: Schema.String;
|
|
818
|
+
readonly purpose: Schema.String;
|
|
819
|
+
}>;
|
|
820
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
821
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
822
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
823
|
+
readonly port: Schema.Int;
|
|
824
|
+
readonly priority: Schema.Int;
|
|
825
|
+
readonly target: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
826
|
+
readonly weight: Schema.Int;
|
|
827
|
+
}>;
|
|
828
|
+
readonly TXT: Schema.TaggedStruct<"TXT", {
|
|
829
|
+
readonly metadata: Schema.Struct<{
|
|
830
|
+
readonly ownership: Schema.String;
|
|
831
|
+
readonly provenance: Schema.String;
|
|
832
|
+
readonly purpose: Schema.String;
|
|
833
|
+
}>;
|
|
834
|
+
readonly name: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
835
|
+
readonly policy: Schema.Literals<readonly ["exclusive", "append"]>;
|
|
836
|
+
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
837
|
+
readonly value: Schema.String;
|
|
838
|
+
}>;
|
|
839
|
+
}>;
|
|
840
|
+
}>>;
|
|
841
|
+
readonly providerId: Schema.String;
|
|
842
|
+
readonly sourcePlanDigest: Schema.String;
|
|
843
|
+
readonly version: Schema.Literal<"domainkit.deletion-plan.v1">;
|
|
844
|
+
readonly zone: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
845
|
+
readonly digest: Schema.String;
|
|
846
|
+
}>;
|
|
847
|
+
interface Plan extends Schema.Schema.Type<typeof Plan> {}
|
|
848
|
+
declare const Authorization: Schema.Struct<{
|
|
849
|
+
readonly operationIds: Schema.$Array<Schema.String>;
|
|
850
|
+
readonly planDigest: Schema.String;
|
|
851
|
+
readonly version: Schema.Literal<"domainkit.deletion-authorization.v1">;
|
|
852
|
+
}>;
|
|
853
|
+
interface Authorization extends Schema.Schema.Type<typeof Authorization> {}
|
|
854
|
+
declare const Receipt: Schema.Struct<{
|
|
855
|
+
readonly deletedAt: Schema.DateFromString;
|
|
856
|
+
readonly operations: Schema.$Array<Schema.Struct<{
|
|
857
|
+
readonly operationId: Schema.String;
|
|
858
|
+
readonly providerRecordId: Schema.String;
|
|
859
|
+
}>>;
|
|
860
|
+
readonly planDigest: Schema.String;
|
|
861
|
+
readonly providerId: Schema.String;
|
|
862
|
+
readonly status: Schema.Literals<readonly ["complete", "partial"]>;
|
|
863
|
+
readonly version: Schema.Literal<"domainkit.deletion-receipt.v1">;
|
|
864
|
+
readonly zone: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
865
|
+
}>;
|
|
866
|
+
interface Receipt extends Schema.Schema.Type<typeof Receipt> {}
|
|
867
|
+
declare const Error_base: Schema.Class<Error, Schema.TaggedStruct<"UnsafeDeletionError", {
|
|
868
|
+
readonly message: Schema.String;
|
|
869
|
+
readonly operationId: Schema.optionalKey<Schema.String>;
|
|
870
|
+
}>, import("effect/Cause").YieldableError>;
|
|
871
|
+
declare class Error extends Error_base {}
|
|
872
|
+
declare const PartialError_base: Schema.Class<PartialError, Schema.TaggedStruct<"PartialDeletionError", {
|
|
873
|
+
readonly failedOperationId: Schema.String;
|
|
874
|
+
readonly message: Schema.String;
|
|
875
|
+
readonly receipt: Schema.Struct<{
|
|
876
|
+
readonly deletedAt: Schema.DateFromString;
|
|
877
|
+
readonly operations: Schema.$Array<Schema.Struct<{
|
|
878
|
+
readonly operationId: Schema.String;
|
|
879
|
+
readonly providerRecordId: Schema.String;
|
|
880
|
+
}>>;
|
|
881
|
+
readonly planDigest: Schema.String;
|
|
882
|
+
readonly providerId: Schema.String;
|
|
883
|
+
readonly status: Schema.Literals<readonly ["complete", "partial"]>;
|
|
884
|
+
readonly version: Schema.Literal<"domainkit.deletion-receipt.v1">;
|
|
885
|
+
readonly zone: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
886
|
+
}>;
|
|
887
|
+
}>, import("effect/Cause").YieldableError>;
|
|
888
|
+
declare class PartialError extends PartialError_base {}
|
|
889
|
+
interface CreateInput {
|
|
890
|
+
readonly plan: DnsPlan;
|
|
891
|
+
readonly receipt: ApplyReceipt;
|
|
892
|
+
readonly ttlMs?: number;
|
|
893
|
+
}
|
|
894
|
+
/** Build a fresh deletion plan only from records proven by a prior create receipt. */
|
|
895
|
+
declare const create: (input: CreateInput) => Effect.Effect<{
|
|
896
|
+
createdAt: Date;
|
|
897
|
+
expiresAt: Date;
|
|
898
|
+
operations: readonly {
|
|
899
|
+
readonly id: string;
|
|
900
|
+
readonly providerRecordId: string;
|
|
901
|
+
readonly record: {
|
|
902
|
+
readonly _tag: "A";
|
|
903
|
+
readonly metadata: {
|
|
904
|
+
readonly ownership: string;
|
|
905
|
+
readonly provenance: string;
|
|
906
|
+
readonly purpose: string;
|
|
907
|
+
};
|
|
908
|
+
readonly name: string & import("effect/Brand").Brand<"DomainName">;
|
|
909
|
+
readonly policy: "append" | "exclusive";
|
|
910
|
+
readonly ttl: number | null;
|
|
911
|
+
readonly address: string;
|
|
912
|
+
} | {
|
|
913
|
+
readonly _tag: "AAAA";
|
|
914
|
+
readonly metadata: {
|
|
915
|
+
readonly ownership: string;
|
|
916
|
+
readonly provenance: string;
|
|
917
|
+
readonly purpose: string;
|
|
918
|
+
};
|
|
919
|
+
readonly name: string & import("effect/Brand").Brand<"DomainName">;
|
|
920
|
+
readonly policy: "append" | "exclusive";
|
|
921
|
+
readonly ttl: number | null;
|
|
922
|
+
readonly address: string;
|
|
923
|
+
} | {
|
|
924
|
+
readonly _tag: "CAA";
|
|
925
|
+
readonly metadata: {
|
|
926
|
+
readonly ownership: string;
|
|
927
|
+
readonly provenance: string;
|
|
928
|
+
readonly purpose: string;
|
|
929
|
+
};
|
|
930
|
+
readonly name: string & import("effect/Brand").Brand<"DomainName">;
|
|
931
|
+
readonly policy: "append" | "exclusive";
|
|
932
|
+
readonly ttl: number | null;
|
|
933
|
+
readonly flags: number;
|
|
934
|
+
readonly tag: "iodef" | "issue" | "issuewild";
|
|
935
|
+
readonly value: string;
|
|
936
|
+
} | {
|
|
937
|
+
readonly _tag: "CNAME";
|
|
938
|
+
readonly metadata: {
|
|
939
|
+
readonly ownership: string;
|
|
940
|
+
readonly provenance: string;
|
|
941
|
+
readonly purpose: string;
|
|
942
|
+
};
|
|
943
|
+
readonly name: string & import("effect/Brand").Brand<"DomainName">;
|
|
944
|
+
readonly ttl: number | null;
|
|
945
|
+
readonly policy: "exclusive";
|
|
946
|
+
readonly target: string & import("effect/Brand").Brand<"DomainName">;
|
|
947
|
+
} | {
|
|
948
|
+
readonly _tag: "MX";
|
|
949
|
+
readonly metadata: {
|
|
950
|
+
readonly ownership: string;
|
|
951
|
+
readonly provenance: string;
|
|
952
|
+
readonly purpose: string;
|
|
953
|
+
};
|
|
954
|
+
readonly name: string & import("effect/Brand").Brand<"DomainName">;
|
|
955
|
+
readonly policy: "append" | "exclusive";
|
|
956
|
+
readonly ttl: number | null;
|
|
957
|
+
readonly exchange: string & import("effect/Brand").Brand<"DomainName">;
|
|
958
|
+
readonly priority: number;
|
|
959
|
+
} | {
|
|
960
|
+
readonly _tag: "NS";
|
|
961
|
+
readonly metadata: {
|
|
962
|
+
readonly ownership: string;
|
|
963
|
+
readonly provenance: string;
|
|
964
|
+
readonly purpose: string;
|
|
965
|
+
};
|
|
966
|
+
readonly name: string & import("effect/Brand").Brand<"DomainName">;
|
|
967
|
+
readonly policy: "append" | "exclusive";
|
|
968
|
+
readonly ttl: number | null;
|
|
969
|
+
readonly target: string & import("effect/Brand").Brand<"DomainName">;
|
|
970
|
+
} | {
|
|
971
|
+
readonly _tag: "SRV";
|
|
972
|
+
readonly metadata: {
|
|
973
|
+
readonly ownership: string;
|
|
974
|
+
readonly provenance: string;
|
|
975
|
+
readonly purpose: string;
|
|
976
|
+
};
|
|
977
|
+
readonly name: string & import("effect/Brand").Brand<"DomainName">;
|
|
978
|
+
readonly policy: "append" | "exclusive";
|
|
979
|
+
readonly ttl: number | null;
|
|
980
|
+
readonly port: number;
|
|
981
|
+
readonly priority: number;
|
|
982
|
+
readonly target: string & import("effect/Brand").Brand<"DomainName">;
|
|
983
|
+
readonly weight: number;
|
|
984
|
+
} | {
|
|
985
|
+
readonly _tag: "TXT";
|
|
986
|
+
readonly metadata: {
|
|
987
|
+
readonly ownership: string;
|
|
988
|
+
readonly provenance: string;
|
|
989
|
+
readonly purpose: string;
|
|
990
|
+
};
|
|
991
|
+
readonly name: string & import("effect/Brand").Brand<"DomainName">;
|
|
992
|
+
readonly policy: "append" | "exclusive";
|
|
993
|
+
readonly ttl: number | null;
|
|
994
|
+
readonly value: string;
|
|
995
|
+
};
|
|
996
|
+
}[];
|
|
997
|
+
providerId: string;
|
|
998
|
+
sourcePlanDigest: string;
|
|
999
|
+
version: "domainkit.deletion-plan.v1";
|
|
1000
|
+
zone: string & import("effect/Brand").Brand<"DomainName">;
|
|
1001
|
+
digest: string;
|
|
1002
|
+
}, Error$3 | Error | AuthorizeError, Crypto.Crypto | Service>;
|
|
1003
|
+
/** Produce a separate digest-bound consent artifact for destructive operations. */
|
|
1004
|
+
declare const authorize: (plan: Plan, operationIds?: readonly string[] | undefined) => Effect.Effect<{
|
|
1005
|
+
operationIds: string[];
|
|
1006
|
+
planDigest: string;
|
|
1007
|
+
version: "domainkit.deletion-authorization.v1";
|
|
1008
|
+
}, CryptoError | Error, Crypto.Crypto>;
|
|
1009
|
+
/** Re-read every approved record before the first delete, then delete by provider record ID. */
|
|
1010
|
+
declare const apply: (input: {
|
|
1011
|
+
readonly authorization: Authorization;
|
|
1012
|
+
readonly plan: Plan;
|
|
1013
|
+
readonly priorReceipt?: Receipt;
|
|
1014
|
+
}) => Effect.Effect<Receipt, CryptoError | Error$3 | Error | PartialError, Crypto.Crypto | Service>;
|
|
1015
|
+
declare function validate(plan: Plan): Effect.Effect<void, Error | CryptoError, Crypto.Crypto>;
|
|
1016
|
+
type CreateError = Error | Error$2 | AuthorizationError | Error$3 | CryptoError;
|
|
1017
|
+
type ApplyError = Error | PartialError | Error$3 | CryptoError;
|
|
1018
|
+
type Requirements = Service | Crypto.Crypto;
|
|
591
1019
|
declare namespace doh_d_exports {
|
|
592
1020
|
export { Fetch, Options$1 as Options, layer$1 as layer, make$1 as make, toAsync$1 as toAsync };
|
|
593
1021
|
}
|
|
@@ -598,7 +1026,7 @@ interface Options$1 {
|
|
|
598
1026
|
readonly timeoutMs?: number;
|
|
599
1027
|
}
|
|
600
1028
|
declare function make$1(options: Options$1): Interface;
|
|
601
|
-
declare const layer$1: (options: Options$1) => Layer.Layer<Service$
|
|
1029
|
+
declare const layer$1: (options: Options$1) => Layer.Layer<Service$5>;
|
|
602
1030
|
declare const toAsync$1: (options: Options$1) => AsyncInterface;
|
|
603
1031
|
declare namespace cloudflare_doh_d_exports {
|
|
604
1032
|
export { Options, layer, make, toAsync };
|
|
@@ -607,7 +1035,7 @@ interface Options extends Omit<Options$1, "endpoint"> {
|
|
|
607
1035
|
readonly endpoint?: string;
|
|
608
1036
|
}
|
|
609
1037
|
declare function make(options?: Options): Interface;
|
|
610
|
-
declare const layer: (options?: Options) => Layer.Layer<Service$
|
|
1038
|
+
declare const layer: (options?: Options) => Layer.Layer<Service$5>;
|
|
611
1039
|
declare const toAsync: (options?: Options) => AsyncInterface;
|
|
612
1040
|
declare namespace verify_d_exports {
|
|
613
1041
|
export { ProviderObservation, PublicDnsObservation, Result, record };
|
|
@@ -973,7 +1401,7 @@ declare const record: (input: {
|
|
|
973
1401
|
readonly _tag: "timeout";
|
|
974
1402
|
};
|
|
975
1403
|
status: "mismatch" | "pending" | "unavailable" | "verified";
|
|
976
|
-
}, never, Service | Service$
|
|
1404
|
+
}, never, Service | Service$5>;
|
|
977
1405
|
//#endregion
|
|
978
|
-
export { canonical_json_d_exports as _, Options$1 as a,
|
|
979
|
-
//# sourceMappingURL=verify-
|
|
1406
|
+
export { updateGrant as A, Fetch$1 as C, DetachResult as D, canonical_json_d_exports as E, Error$1 as O, BeginInput as S, CryptoError as T, CreateInput$1 as _, Options$1 as a, zones_d_exports as b, Authorization as c, Operation as d, PartialError as f, AuthorizeError as g, deletion_d_exports as h, cloudflare_doh_d_exports as i, connection_lifecycle_d_exports as k, CreateError as l, Receipt as m, verify_d_exports as n, doh_d_exports as o, Plan as p, Options as r, ApplyError as s, Result as t, Error as u, plan_d_exports as v, oauth_d_exports as w, selection_d_exports as x, renderManualInstructions as y };
|
|
1407
|
+
//# sourceMappingURL=verify-B80xCBh2.d.mts.map
|