domainkit 0.4.0 → 0.5.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/index.d.mts +262 -42
- package/dist/index.mjs +56 -26
- package/dist/index.mjs.map +1 -1
- package/dist/promise.d.mts +99 -66
- package/dist/promise.mjs +154 -111
- package/dist/promise.mjs.map +1 -1
- package/dist/{resolver-uqe1h5Vz.d.mts → resolver-BGBLnPjJ.d.mts} +208 -477
- package/dist/{resolver-CvK7JoJM.mjs → resolver-tZU6gEVq.mjs} +122 -12
- package/dist/resolver-tZU6gEVq.mjs.map +1 -0
- package/dist/testing.d.mts +2 -2
- package/dist/testing.mjs +121 -60
- package/dist/testing.mjs.map +1 -1
- package/dist/{verify-CkgVrwyl.d.mts → verify-6xK05pwL.d.mts} +185 -44
- package/dist/{verify-BUB4N5zs.mjs → verify-B2fPyjde.mjs} +555 -394
- package/dist/verify-B2fPyjde.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/resolver-CvK7JoJM.mjs.map +0 -1
- package/dist/verify-BUB4N5zs.mjs.map +0 -1
|
@@ -8,30 +8,17 @@ declare const Error_base$5: Schema.Class<Error$5, Schema.TaggedStruct<"InvalidIn
|
|
|
8
8
|
}>, import("effect/Cause").YieldableError>;
|
|
9
9
|
declare class Error$5 extends Error_base$5 {}
|
|
10
10
|
declare namespace domain_name_d_exports {
|
|
11
|
-
export { DomainName, Schema$
|
|
11
|
+
export { DomainName, Schema$5 as Schema, decode$5 as decode, parse$1 as parse };
|
|
12
12
|
}
|
|
13
13
|
declare const Type$1: Schema.brand<Schema.String, "DomainName">;
|
|
14
14
|
/** A lower-case, fully qualified DNS name without a trailing dot. */
|
|
15
15
|
type DomainName = typeof Type$1.Type;
|
|
16
16
|
/** Decodes user and wire strings into canonical domain names. */
|
|
17
|
-
declare const Schema$
|
|
18
|
-
declare const decode$
|
|
17
|
+
declare const Schema$5: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
18
|
+
declare const decode$5: (input: unknown) => Effect.Effect<string & import("effect/Brand").Brand<"DomainName">, Error$5, never>;
|
|
19
19
|
declare function parse$1(input: unknown): DomainName;
|
|
20
|
-
declare namespace secret_d_exports {
|
|
21
|
-
export { Value, make$1 as make };
|
|
22
|
-
}
|
|
23
|
-
/** A deliberately non-serializable credential value. */
|
|
24
|
-
declare class Value {
|
|
25
|
-
#private;
|
|
26
|
-
private constructor();
|
|
27
|
-
static from(value: string): Value;
|
|
28
|
-
expose(): string;
|
|
29
|
-
toJSON(): string;
|
|
30
|
-
toString(): string;
|
|
31
|
-
}
|
|
32
|
-
declare const make$1: typeof Value.from;
|
|
33
20
|
declare namespace dns_record_d_exports {
|
|
34
|
-
export { A, Aaaa, Caa, Cname, DnsRecord, Encoded, Mx, Ns, Observed, Opaque, RequirementMetadata, Schema$
|
|
21
|
+
export { A, Aaaa, Caa, Cname, DnsRecord, Encoded, Mx, Ns, Observed, Opaque, RequirementMetadata, Schema$4 as Schema, Srv, Txt, Type, data, decode$4 as decode, equals, parse };
|
|
35
22
|
}
|
|
36
23
|
declare const Type: Schema.Literals<readonly ["A", "AAAA", "CNAME", "TXT", "MX", "CAA", "NS", "SRV"]>;
|
|
37
24
|
type Type = typeof Type.Type;
|
|
@@ -41,7 +28,7 @@ declare const RequirementMetadata: Schema.Struct<{
|
|
|
41
28
|
readonly purpose: Schema.String;
|
|
42
29
|
}>;
|
|
43
30
|
interface RequirementMetadata extends Schema.Schema.Type<typeof RequirementMetadata> {}
|
|
44
|
-
declare const Schema$
|
|
31
|
+
declare const Schema$4: Schema.TaggedUnion<{
|
|
45
32
|
readonly A: Schema.TaggedStruct<"A", {
|
|
46
33
|
readonly metadata: Schema.Struct<{
|
|
47
34
|
readonly ownership: Schema.String;
|
|
@@ -224,8 +211,8 @@ declare const A: Schema.TaggedStruct<"A", {
|
|
|
224
211
|
readonly ttl: Schema.NullOr<Schema.Int>;
|
|
225
212
|
readonly value: Schema.String;
|
|
226
213
|
}>;
|
|
227
|
-
type DnsRecord = typeof Schema$
|
|
228
|
-
type Encoded = typeof Schema$
|
|
214
|
+
type DnsRecord = typeof Schema$4.Type;
|
|
215
|
+
type Encoded = typeof Schema$4.Encoded;
|
|
229
216
|
/** Provider state that DomainKit cannot create but must retain for safe reconciliation. */
|
|
230
217
|
declare const Opaque: Schema.Struct<{
|
|
231
218
|
readonly _tag: Schema.Literal<"Opaque">;
|
|
@@ -337,7 +324,7 @@ declare const Observed: Schema.Union<readonly [Schema.TaggedUnion<{
|
|
|
337
324
|
readonly providerType: Schema.String;
|
|
338
325
|
}>]>;
|
|
339
326
|
type Observed = typeof Observed.Type;
|
|
340
|
-
declare const decode$
|
|
327
|
+
declare const decode$4: (input: unknown) => Effect.Effect<{
|
|
341
328
|
readonly _tag: "A";
|
|
342
329
|
readonly metadata: {
|
|
343
330
|
readonly ownership: string;
|
|
@@ -475,8 +462,21 @@ interface AsyncInterface$1 {
|
|
|
475
462
|
declare const fromAsync: (provider: AsyncInterface$1) => Interface$3;
|
|
476
463
|
declare const layerFromAsync$1: (provider: AsyncInterface$1) => Layer.Layer<Service$3>;
|
|
477
464
|
declare const toAsync$1: (provider: Interface$3) => AsyncInterface$1;
|
|
465
|
+
declare namespace secret_d_exports {
|
|
466
|
+
export { Value, make$1 as make };
|
|
467
|
+
}
|
|
468
|
+
/** A deliberately non-serializable credential value. */
|
|
469
|
+
declare class Value {
|
|
470
|
+
#private;
|
|
471
|
+
private constructor();
|
|
472
|
+
static from(value: string): Value;
|
|
473
|
+
expose(): string;
|
|
474
|
+
toJSON(): string;
|
|
475
|
+
toString(): string;
|
|
476
|
+
}
|
|
477
|
+
declare const make$1: typeof Value.from;
|
|
478
478
|
declare namespace manifest_d_exports {
|
|
479
|
-
export { AsyncOAuthSubjectResolver, IntegrationMethod, Manifest, Method$1 as Method, OAuthClientConfiguration, OAuthMethod, OAuthSubjectResolver, Schema$
|
|
479
|
+
export { AsyncOAuthSubjectResolver, IntegrationMethod, Manifest, Method$1 as Method, OAuthClientConfiguration, OAuthMethod, OAuthSubjectResolver, Schema$3 as Schema, TokenValidation, decode$3 as decode };
|
|
480
480
|
}
|
|
481
481
|
declare const Method$1: Schema.TaggedUnion<{
|
|
482
482
|
readonly integration: Schema.TaggedStruct<"integration", {
|
|
@@ -500,7 +500,7 @@ declare const Method$1: Schema.TaggedUnion<{
|
|
|
500
500
|
readonly instructionsUrl: Schema.String;
|
|
501
501
|
}>;
|
|
502
502
|
}>;
|
|
503
|
-
declare const Schema$
|
|
503
|
+
declare const Schema$3: Schema.Struct<{
|
|
504
504
|
readonly methods: Schema.$Array<Schema.TaggedUnion<{
|
|
505
505
|
readonly integration: Schema.TaggedStruct<"integration", {
|
|
506
506
|
readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
|
|
@@ -525,7 +525,7 @@ declare const Schema$4: Schema.Struct<{
|
|
|
525
525
|
}>>;
|
|
526
526
|
readonly providerId: Schema.String;
|
|
527
527
|
}>;
|
|
528
|
-
interface Manifest extends Schema.Schema.Type<typeof Schema$
|
|
528
|
+
interface Manifest extends Schema.Schema.Type<typeof Schema$3> {}
|
|
529
529
|
type OAuthMethod = Extract<Manifest["methods"][number], {
|
|
530
530
|
readonly _tag: "oauth2";
|
|
531
531
|
}>;
|
|
@@ -533,7 +533,7 @@ type OAuthMethod = Extract<Manifest["methods"][number], {
|
|
|
533
533
|
type IntegrationMethod = Extract<Manifest["methods"][number], {
|
|
534
534
|
readonly _tag: "integration";
|
|
535
535
|
}>;
|
|
536
|
-
declare const decode$
|
|
536
|
+
declare const decode$3: (input: unknown) => Effect.Effect<{
|
|
537
537
|
readonly methods: readonly ({
|
|
538
538
|
readonly _tag: "integration";
|
|
539
539
|
readonly capabilities: readonly ("dns:read" | "dns:write")[];
|
|
@@ -579,97 +579,10 @@ interface AsyncOAuthSubjectResolver {
|
|
|
579
579
|
readonly expiresAt: Date | null;
|
|
580
580
|
}>;
|
|
581
581
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region src/auth/authorization.d.ts
|
|
585
584
|
declare const Capability: Schema.Literals<readonly ["dns:read", "dns:write"]>;
|
|
586
585
|
type Capability = typeof Capability.Type;
|
|
587
|
-
type Evidence = Data.TaggedEnum<{
|
|
588
|
-
Declared: {};
|
|
589
|
-
Exercised: {
|
|
590
|
-
readonly observedAt: Date;
|
|
591
|
-
};
|
|
592
|
-
Introspected: {
|
|
593
|
-
readonly observedAt: Date;
|
|
594
|
-
};
|
|
595
|
-
}>;
|
|
596
|
-
declare const Evidence: {
|
|
597
|
-
readonly $is: <Tag extends "Declared" | "Exercised" | "Introspected">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
598
|
-
readonly _tag: "Declared";
|
|
599
|
-
}, {
|
|
600
|
-
readonly _tag: Tag;
|
|
601
|
-
}> | Extract<{
|
|
602
|
-
readonly _tag: "Exercised";
|
|
603
|
-
readonly observedAt: Date;
|
|
604
|
-
}, {
|
|
605
|
-
readonly _tag: Tag;
|
|
606
|
-
}> | Extract<{
|
|
607
|
-
readonly _tag: "Introspected";
|
|
608
|
-
readonly observedAt: Date;
|
|
609
|
-
}, {
|
|
610
|
-
readonly _tag: Tag;
|
|
611
|
-
}>;
|
|
612
|
-
readonly $match: {
|
|
613
|
-
<Cases extends { readonly [Tag in "Declared" | "Exercised" | "Introspected"]: (args: Extract<{
|
|
614
|
-
readonly _tag: "Declared";
|
|
615
|
-
} | {
|
|
616
|
-
readonly _tag: "Exercised";
|
|
617
|
-
readonly observedAt: Date;
|
|
618
|
-
} | {
|
|
619
|
-
readonly _tag: "Introspected";
|
|
620
|
-
readonly observedAt: Date;
|
|
621
|
-
}, {
|
|
622
|
-
readonly _tag: Tag;
|
|
623
|
-
}>) => any; }>(cases: Cases): (value: {
|
|
624
|
-
readonly _tag: "Declared";
|
|
625
|
-
} | {
|
|
626
|
-
readonly _tag: "Exercised";
|
|
627
|
-
readonly observedAt: Date;
|
|
628
|
-
} | {
|
|
629
|
-
readonly _tag: "Introspected";
|
|
630
|
-
readonly observedAt: Date;
|
|
631
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["Declared" | "Exercised" | "Introspected"]>>;
|
|
632
|
-
<Cases extends { readonly [Tag in "Declared" | "Exercised" | "Introspected"]: (args: Extract<{
|
|
633
|
-
readonly _tag: "Declared";
|
|
634
|
-
} | {
|
|
635
|
-
readonly _tag: "Exercised";
|
|
636
|
-
readonly observedAt: Date;
|
|
637
|
-
} | {
|
|
638
|
-
readonly _tag: "Introspected";
|
|
639
|
-
readonly observedAt: Date;
|
|
640
|
-
}, {
|
|
641
|
-
readonly _tag: Tag;
|
|
642
|
-
}>) => any; }>(value: {
|
|
643
|
-
readonly _tag: "Declared";
|
|
644
|
-
} | {
|
|
645
|
-
readonly _tag: "Exercised";
|
|
646
|
-
readonly observedAt: Date;
|
|
647
|
-
} | {
|
|
648
|
-
readonly _tag: "Introspected";
|
|
649
|
-
readonly observedAt: Date;
|
|
650
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Declared" | "Exercised" | "Introspected"]>>;
|
|
651
|
-
};
|
|
652
|
-
readonly Declared: Data.TaggedEnum.ConstructorFrom<{
|
|
653
|
-
readonly _tag: "Declared";
|
|
654
|
-
}, "_tag">;
|
|
655
|
-
readonly Exercised: Data.TaggedEnum.ConstructorFrom<{
|
|
656
|
-
readonly _tag: "Exercised";
|
|
657
|
-
readonly observedAt: Date;
|
|
658
|
-
}, "_tag">;
|
|
659
|
-
readonly Introspected: Data.TaggedEnum.ConstructorFrom<{
|
|
660
|
-
readonly _tag: "Introspected";
|
|
661
|
-
readonly observedAt: Date;
|
|
662
|
-
}, "_tag">;
|
|
663
|
-
};
|
|
664
|
-
declare const EvidenceSchema: Schema.TaggedUnion<{
|
|
665
|
-
readonly Declared: Schema.TaggedStruct<"Declared", {}>;
|
|
666
|
-
readonly Exercised: Schema.TaggedStruct<"Exercised", {
|
|
667
|
-
readonly observedAt: Schema.DateFromString;
|
|
668
|
-
}>;
|
|
669
|
-
readonly Introspected: Schema.TaggedStruct<"Introspected", {
|
|
670
|
-
readonly observedAt: Schema.DateFromString;
|
|
671
|
-
}>;
|
|
672
|
-
}>;
|
|
673
586
|
declare const CapabilityEvidence: Schema.Struct<{
|
|
674
587
|
readonly capability: Schema.Literals<readonly ["dns:read", "dns:write"]>;
|
|
675
588
|
readonly evidence: Schema.TaggedUnion<{
|
|
@@ -683,15 +596,8 @@ declare const CapabilityEvidence: Schema.Struct<{
|
|
|
683
596
|
}>;
|
|
684
597
|
}>;
|
|
685
598
|
interface CapabilityEvidence extends Schema.Schema.Type<typeof CapabilityEvidence> {}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
readonly Pending: Schema.TaggedStruct<"Pending", {
|
|
689
|
-
readonly requestedAt: Schema.DateFromString;
|
|
690
|
-
}>;
|
|
691
|
-
}>;
|
|
692
|
-
type Revocation = typeof Revocation.Type;
|
|
693
|
-
/** A provider credential authorization shared by one or more owner connections. */
|
|
694
|
-
declare const Schema$3: Schema.Struct<{
|
|
599
|
+
/** A provider credential authorization shared by one or more organization connections. */
|
|
600
|
+
declare const Schema$2: Schema.Struct<{
|
|
695
601
|
readonly authorizedById: Schema.String;
|
|
696
602
|
readonly capabilityEvidence: Schema.$Array<Schema.Struct<{
|
|
697
603
|
readonly capability: Schema.Literals<readonly ["dns:read", "dns:write"]>;
|
|
@@ -709,7 +615,6 @@ declare const Schema$3: Schema.Struct<{
|
|
|
709
615
|
readonly expiresAt: Schema.NullOr<Schema.DateFromString>;
|
|
710
616
|
readonly id: Schema.String;
|
|
711
617
|
readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
|
|
712
|
-
readonly providerAccountId: Schema.String;
|
|
713
618
|
readonly providerContext: Schema.Struct<{
|
|
714
619
|
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
715
620
|
readonly version: Schema.String;
|
|
@@ -724,317 +629,222 @@ declare const Schema$3: Schema.Struct<{
|
|
|
724
629
|
}>;
|
|
725
630
|
readonly scopes: Schema.$Array<Schema.String>;
|
|
726
631
|
}>;
|
|
727
|
-
interface ProviderAuthorization extends Schema.Schema.Type<typeof Schema$
|
|
728
|
-
declare const decode$3: (input: unknown) => Effect.Effect<{
|
|
729
|
-
readonly authorizedById: string;
|
|
730
|
-
readonly capabilityEvidence: readonly {
|
|
731
|
-
readonly capability: "dns:read" | "dns:write";
|
|
732
|
-
readonly evidence: {
|
|
733
|
-
readonly _tag: "Declared";
|
|
734
|
-
} | {
|
|
735
|
-
readonly _tag: "Exercised";
|
|
736
|
-
readonly observedAt: Date;
|
|
737
|
-
} | {
|
|
738
|
-
readonly _tag: "Introspected";
|
|
739
|
-
readonly observedAt: Date;
|
|
740
|
-
};
|
|
741
|
-
}[];
|
|
742
|
-
readonly createdAt: Date;
|
|
743
|
-
readonly expiresAt: Date | null;
|
|
744
|
-
readonly id: string;
|
|
745
|
-
readonly method: "integration" | "oauth2" | "token";
|
|
746
|
-
readonly providerAccountId: string;
|
|
747
|
-
readonly providerContext: {
|
|
748
|
-
readonly value: Schema.Json;
|
|
749
|
-
readonly version: string;
|
|
750
|
-
};
|
|
751
|
-
readonly providerId: string;
|
|
752
|
-
readonly requiredCapabilities: readonly ("dns:read" | "dns:write")[];
|
|
753
|
-
readonly revocation: {
|
|
754
|
-
readonly _tag: "Active";
|
|
755
|
-
} | {
|
|
756
|
-
readonly _tag: "Pending";
|
|
757
|
-
readonly requestedAt: Date;
|
|
758
|
-
};
|
|
759
|
-
readonly scopes: readonly string[];
|
|
760
|
-
}, Error$5, never>;
|
|
761
|
-
declare const validate$3: (input: unknown) => Effect.Effect<{
|
|
762
|
-
readonly authorizedById: string;
|
|
763
|
-
readonly capabilityEvidence: readonly {
|
|
764
|
-
readonly capability: "dns:read" | "dns:write";
|
|
765
|
-
readonly evidence: {
|
|
766
|
-
readonly _tag: "Declared";
|
|
767
|
-
} | {
|
|
768
|
-
readonly _tag: "Exercised";
|
|
769
|
-
readonly observedAt: Date;
|
|
770
|
-
} | {
|
|
771
|
-
readonly _tag: "Introspected";
|
|
772
|
-
readonly observedAt: Date;
|
|
773
|
-
};
|
|
774
|
-
}[];
|
|
775
|
-
readonly createdAt: Date;
|
|
776
|
-
readonly expiresAt: Date | null;
|
|
777
|
-
readonly id: string;
|
|
778
|
-
readonly method: "integration" | "oauth2" | "token";
|
|
779
|
-
readonly providerAccountId: string;
|
|
780
|
-
readonly providerContext: {
|
|
781
|
-
readonly value: Schema.Json;
|
|
782
|
-
readonly version: string;
|
|
783
|
-
};
|
|
784
|
-
readonly providerId: string;
|
|
785
|
-
readonly requiredCapabilities: readonly ("dns:read" | "dns:write")[];
|
|
786
|
-
readonly revocation: {
|
|
787
|
-
readonly _tag: "Active";
|
|
788
|
-
} | {
|
|
789
|
-
readonly _tag: "Pending";
|
|
790
|
-
readonly requestedAt: Date;
|
|
791
|
-
};
|
|
792
|
-
readonly scopes: readonly string[];
|
|
793
|
-
}, Error$5, never>;
|
|
794
|
-
declare const encode$3: (input: {
|
|
795
|
-
readonly authorizedById: string;
|
|
796
|
-
readonly capabilityEvidence: readonly {
|
|
797
|
-
readonly capability: "dns:read" | "dns:write";
|
|
798
|
-
readonly evidence: {
|
|
799
|
-
readonly _tag: "Declared";
|
|
800
|
-
} | {
|
|
801
|
-
readonly _tag: "Exercised";
|
|
802
|
-
readonly observedAt: Date;
|
|
803
|
-
} | {
|
|
804
|
-
readonly _tag: "Introspected";
|
|
805
|
-
readonly observedAt: Date;
|
|
806
|
-
};
|
|
807
|
-
}[];
|
|
808
|
-
readonly createdAt: Date;
|
|
809
|
-
readonly expiresAt: Date | null;
|
|
810
|
-
readonly id: string;
|
|
811
|
-
readonly method: "integration" | "oauth2" | "token";
|
|
812
|
-
readonly providerAccountId: string;
|
|
813
|
-
readonly providerContext: {
|
|
814
|
-
readonly value: Schema.Json;
|
|
815
|
-
readonly version: string;
|
|
816
|
-
};
|
|
817
|
-
readonly providerId: string;
|
|
818
|
-
readonly requiredCapabilities: readonly ("dns:read" | "dns:write")[];
|
|
819
|
-
readonly revocation: {
|
|
820
|
-
readonly _tag: "Active";
|
|
821
|
-
} | {
|
|
822
|
-
readonly _tag: "Pending";
|
|
823
|
-
readonly requestedAt: Date;
|
|
824
|
-
};
|
|
825
|
-
readonly scopes: readonly string[];
|
|
826
|
-
}, options?: import("effect/SchemaAST").ParseOptions) => {
|
|
827
|
-
readonly authorizedById: string;
|
|
828
|
-
readonly capabilityEvidence: readonly {
|
|
829
|
-
readonly capability: "dns:read" | "dns:write";
|
|
830
|
-
readonly evidence: {
|
|
831
|
-
readonly _tag: "Declared";
|
|
832
|
-
} | {
|
|
833
|
-
readonly _tag: "Exercised";
|
|
834
|
-
readonly observedAt: string;
|
|
835
|
-
} | {
|
|
836
|
-
readonly _tag: "Introspected";
|
|
837
|
-
readonly observedAt: string;
|
|
838
|
-
};
|
|
839
|
-
}[];
|
|
840
|
-
readonly createdAt: string;
|
|
841
|
-
readonly expiresAt: string | null;
|
|
842
|
-
readonly id: string;
|
|
843
|
-
readonly method: "integration" | "oauth2" | "token";
|
|
844
|
-
readonly providerAccountId: string;
|
|
845
|
-
readonly providerContext: {
|
|
846
|
-
readonly value: Schema.Json;
|
|
847
|
-
readonly version: string;
|
|
848
|
-
};
|
|
849
|
-
readonly providerId: string;
|
|
850
|
-
readonly requiredCapabilities: readonly ("dns:read" | "dns:write")[];
|
|
851
|
-
readonly revocation: {
|
|
852
|
-
readonly _tag: "Active";
|
|
853
|
-
} | {
|
|
854
|
-
readonly _tag: "Pending";
|
|
855
|
-
readonly requestedAt: string;
|
|
856
|
-
};
|
|
857
|
-
readonly scopes: readonly string[];
|
|
858
|
-
};
|
|
859
|
-
declare function evidenceFor(authorization: ProviderAuthorization, capability: Capability): Evidence | undefined;
|
|
632
|
+
interface ProviderAuthorization extends Schema.Schema.Type<typeof Schema$2> {}
|
|
860
633
|
//#endregion
|
|
861
634
|
//#region src/auth/connection.d.ts
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
635
|
+
/** A provider account and authoritative zone selected for one domain attachment. */
|
|
636
|
+
declare const ProviderTargetEvidence: Schema.Struct<{
|
|
637
|
+
/** The account display name observed during discovery, when the provider exposes one. */
|
|
638
|
+
readonly accountName: Schema.optionalKey<Schema.String>;
|
|
639
|
+
/** Nameserver and provider-state evidence observed during discovery. */
|
|
640
|
+
readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
|
|
641
|
+
readonly status: Schema.String;
|
|
642
|
+
/** Provider-specific authoritative-zone type, such as Cloudflare's `full` or Vercel's `external`. */
|
|
643
|
+
readonly zoneType: Schema.String;
|
|
644
|
+
}>;
|
|
645
|
+
interface ProviderTargetEvidence extends Schema.Schema.Type<typeof ProviderTargetEvidence> {}
|
|
646
|
+
declare const ProviderTarget: Schema.Struct<{
|
|
647
|
+
readonly accountId: Schema.String;
|
|
648
|
+
readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
|
|
649
|
+
readonly evidence: Schema.optionalKey<Schema.Struct<{
|
|
650
|
+
/** The account display name observed during discovery, when the provider exposes one. */
|
|
651
|
+
readonly accountName: Schema.optionalKey<Schema.String>;
|
|
652
|
+
/** Nameserver and provider-state evidence observed during discovery. */
|
|
653
|
+
readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
|
|
654
|
+
readonly status: Schema.String;
|
|
655
|
+
/** Provider-specific authoritative-zone type, such as Cloudflare's `full` or Vercel's `external`. */
|
|
656
|
+
readonly zoneType: Schema.String;
|
|
657
|
+
}>>;
|
|
658
|
+
readonly zoneId: Schema.String;
|
|
659
|
+
readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
660
|
+
}>;
|
|
661
|
+
interface ProviderTarget extends Schema.Schema.Type<typeof ProviderTarget> {}
|
|
662
|
+
/** The lifecycle state visible to a host for an organization connection. */
|
|
663
|
+
declare const ConnectionStatus: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
|
|
664
|
+
type ConnectionStatus = typeof ConnectionStatus.Type;
|
|
665
|
+
/** An organization-scoped provider connection. */
|
|
666
|
+
declare const ProviderConnection: Schema.Struct<{
|
|
667
|
+
readonly createdAt: Schema.DateFromString;
|
|
668
|
+
readonly id: Schema.String;
|
|
669
|
+
readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
|
|
670
|
+
readonly ownerId: Schema.String;
|
|
671
|
+
readonly providerId: Schema.String;
|
|
672
|
+
readonly status: Schema.Literals<readonly ["active", "expired", "revocation-pending"]>;
|
|
673
|
+
}>;
|
|
674
|
+
interface ProviderConnection extends Schema.Schema.Type<typeof ProviderConnection> {}
|
|
675
|
+
/** An exact provider target attached to one organization domain. */
|
|
676
|
+
declare const DomainAttachment: Schema.Struct<{
|
|
677
|
+
readonly connectionId: Schema.String;
|
|
678
|
+
readonly createdAt: Schema.DateFromString;
|
|
679
|
+
readonly domain: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
680
|
+
readonly id: Schema.String;
|
|
681
|
+
readonly target: Schema.Struct<{
|
|
682
|
+
readonly accountId: Schema.String;
|
|
683
|
+
readonly accountKind: Schema.NullOr<Schema.Literals<readonly ["account", "personal", "team"]>>;
|
|
684
|
+
readonly evidence: Schema.optionalKey<Schema.Struct<{
|
|
685
|
+
/** The account display name observed during discovery, when the provider exposes one. */
|
|
686
|
+
readonly accountName: Schema.optionalKey<Schema.String>;
|
|
687
|
+
/** Nameserver and provider-state evidence observed during discovery. */
|
|
688
|
+
readonly nameservers: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
|
|
689
|
+
readonly status: Schema.String;
|
|
690
|
+
/** Provider-specific authoritative-zone type, such as Cloudflare's `full` or Vercel's `external`. */
|
|
691
|
+
readonly zoneType: Schema.String;
|
|
692
|
+
}>>;
|
|
693
|
+
readonly zoneId: Schema.String;
|
|
694
|
+
readonly zoneName: Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>;
|
|
868
695
|
}>;
|
|
869
696
|
}>;
|
|
870
|
-
|
|
871
|
-
/**
|
|
872
|
-
declare const
|
|
873
|
-
/** Expands a grant to include the requested domains. */
|
|
874
|
-
declare const includeDomains: (current: Grant | undefined, requested: Grant) => Grant;
|
|
875
|
-
/** Contracts a grant so it no longer includes one parsed domain. */
|
|
876
|
-
declare const removeDomain$1: (grant: Grant, domain: DomainName) => Grant;
|
|
877
|
-
/** An owner-scoped grant bound to one provider authorization. */
|
|
878
|
-
declare const Schema$2: Schema.Struct<{
|
|
697
|
+
interface DomainAttachment extends Schema.Schema.Type<typeof DomainAttachment> {}
|
|
698
|
+
/** Internal connection row; the authorization id is intentionally not part of the public shape. */
|
|
699
|
+
declare const StoredConnection: Schema.Struct<{
|
|
879
700
|
readonly authorizationId: Schema.String;
|
|
880
701
|
readonly createdAt: Schema.DateFromString;
|
|
881
|
-
readonly grant: Schema.TaggedUnion<{
|
|
882
|
-
readonly account: Schema.TaggedStruct<"account", {
|
|
883
|
-
readonly excludedDomains: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
|
|
884
|
-
}>;
|
|
885
|
-
readonly domains: Schema.TaggedStruct<"domains", {
|
|
886
|
-
readonly domains: Schema.$Array<Schema.decodeTo<Schema.brand<Schema.String, "DomainName">, Schema.String, never, never>>;
|
|
887
|
-
}>;
|
|
888
|
-
}>;
|
|
889
702
|
readonly id: Schema.String;
|
|
703
|
+
readonly method: Schema.Literals<readonly ["integration", "oauth2", "token"]>;
|
|
890
704
|
readonly ownerId: Schema.String;
|
|
705
|
+
readonly providerId: Schema.String;
|
|
891
706
|
}>;
|
|
892
|
-
interface
|
|
707
|
+
interface StoredConnection extends Schema.Schema.Type<typeof StoredConnection> {}
|
|
708
|
+
/** Internal credential material retained by the host's persistence implementation. */
|
|
709
|
+
interface StoredCredential {
|
|
710
|
+
readonly accessToken: Value;
|
|
711
|
+
readonly refreshToken: Value | null;
|
|
712
|
+
readonly tokenType: string;
|
|
713
|
+
}
|
|
714
|
+
declare const AuthorizationError_base$1: Schema.Class<AuthorizationError$1, Schema.TaggedStruct<"AuthorizationError", {
|
|
715
|
+
readonly category: Schema.Literal<"authorization">;
|
|
716
|
+
readonly message: Schema.String;
|
|
717
|
+
readonly operation: Schema.String;
|
|
718
|
+
readonly retry: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
|
|
719
|
+
}>, import("effect/Cause").YieldableError>;
|
|
720
|
+
declare class AuthorizationError$1 extends AuthorizationError_base$1 {}
|
|
721
|
+
declare const authorizationError: (message: string, operation: string) => AuthorizationError$1;
|
|
722
|
+
/** Decode a public connection snapshot returned by a host. */
|
|
893
723
|
declare const decode$2: (input: unknown) => Effect.Effect<{
|
|
894
|
-
readonly authorizationId: string;
|
|
895
724
|
readonly createdAt: Date;
|
|
896
|
-
readonly grant: {
|
|
897
|
-
readonly _tag: "account";
|
|
898
|
-
readonly excludedDomains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
|
|
899
|
-
} | {
|
|
900
|
-
readonly _tag: "domains";
|
|
901
|
-
readonly domains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
|
|
902
|
-
};
|
|
903
725
|
readonly id: string;
|
|
726
|
+
readonly method: "integration" | "oauth2" | "token";
|
|
904
727
|
readonly ownerId: string;
|
|
728
|
+
readonly providerId: string;
|
|
729
|
+
readonly status: "active" | "expired" | "revocation-pending";
|
|
905
730
|
}, Error$5, never>;
|
|
906
731
|
declare const validate$2: (input: unknown) => Effect.Effect<{
|
|
907
|
-
readonly authorizationId: string;
|
|
908
732
|
readonly createdAt: Date;
|
|
909
|
-
readonly grant: {
|
|
910
|
-
readonly _tag: "account";
|
|
911
|
-
readonly excludedDomains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
|
|
912
|
-
} | {
|
|
913
|
-
readonly _tag: "domains";
|
|
914
|
-
readonly domains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
|
|
915
|
-
};
|
|
916
733
|
readonly id: string;
|
|
734
|
+
readonly method: "integration" | "oauth2" | "token";
|
|
917
735
|
readonly ownerId: string;
|
|
736
|
+
readonly providerId: string;
|
|
737
|
+
readonly status: "active" | "expired" | "revocation-pending";
|
|
918
738
|
}, Error$5, never>;
|
|
919
739
|
declare const encode$2: (input: {
|
|
920
|
-
readonly authorizationId: string;
|
|
921
740
|
readonly createdAt: Date;
|
|
922
|
-
readonly grant: {
|
|
923
|
-
readonly _tag: "account";
|
|
924
|
-
readonly excludedDomains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
|
|
925
|
-
} | {
|
|
926
|
-
readonly _tag: "domains";
|
|
927
|
-
readonly domains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
|
|
928
|
-
};
|
|
929
741
|
readonly id: string;
|
|
742
|
+
readonly method: "integration" | "oauth2" | "token";
|
|
930
743
|
readonly ownerId: string;
|
|
744
|
+
readonly providerId: string;
|
|
745
|
+
readonly status: "active" | "expired" | "revocation-pending";
|
|
931
746
|
}, options?: import("effect/SchemaAST").ParseOptions) => {
|
|
932
|
-
readonly authorizationId: string;
|
|
933
747
|
readonly createdAt: string;
|
|
934
|
-
readonly grant: {
|
|
935
|
-
readonly _tag: "account";
|
|
936
|
-
readonly excludedDomains: readonly string[];
|
|
937
|
-
} | {
|
|
938
|
-
readonly _tag: "domains";
|
|
939
|
-
readonly domains: readonly string[];
|
|
940
|
-
};
|
|
941
748
|
readonly id: string;
|
|
749
|
+
readonly method: "integration" | "oauth2" | "token";
|
|
942
750
|
readonly ownerId: string;
|
|
943
|
-
};
|
|
944
|
-
interface OAuthContinuation {
|
|
945
|
-
readonly clientId: string;
|
|
946
|
-
readonly codeVerifier: Value;
|
|
947
|
-
readonly expiresAt: Date;
|
|
948
|
-
readonly grant: Grant;
|
|
949
|
-
readonly method: OAuthMethod;
|
|
950
|
-
readonly ownerId: string;
|
|
951
|
-
readonly redirectUri: string;
|
|
952
|
-
readonly stateHash: string;
|
|
953
|
-
readonly authorizedById: string;
|
|
954
|
-
}
|
|
955
|
-
interface StoredCredential {
|
|
956
|
-
readonly accessToken: Value;
|
|
957
|
-
readonly refreshToken: Value | null;
|
|
958
|
-
readonly tokenType: string;
|
|
959
|
-
}
|
|
960
|
-
declare const AuthorizationError_base$1: Schema.Class<AuthorizationError$1, Schema.TaggedStruct<"AuthorizationError", {
|
|
961
|
-
readonly category: Schema.Literal<"authorization">;
|
|
962
|
-
readonly message: Schema.String;
|
|
963
|
-
readonly operation: Schema.String;
|
|
964
|
-
readonly retry: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
|
|
965
|
-
}>, import("effect/Cause").YieldableError>;
|
|
966
|
-
declare class AuthorizationError$1 extends AuthorizationError_base$1 {}
|
|
967
|
-
declare const authorizationError: (message: string, operation: string) => AuthorizationError$1;
|
|
968
|
-
declare function assertGrant(connection: Connection, authorization: ProviderAuthorization, request: {
|
|
969
|
-
readonly capability: Capability;
|
|
970
|
-
readonly domain: string;
|
|
971
|
-
readonly now?: Date;
|
|
972
751
|
readonly providerId: string;
|
|
973
|
-
|
|
974
|
-
declare namespace canonical_json_d_exports {
|
|
975
|
-
export { CryptoError, Json, sha256Encoded, sha256Json, sha256Text, stringify, webCryptoLayer };
|
|
976
|
-
}
|
|
977
|
-
declare const CryptoError_base: Schema.Class<CryptoError, Schema.TaggedStruct<"CryptoError", {
|
|
978
|
-
readonly message: Schema.String;
|
|
979
|
-
}>, import("effect/Cause").YieldableError>;
|
|
980
|
-
declare class CryptoError extends CryptoError_base {}
|
|
981
|
-
type Json = null | boolean | number | string | ReadonlyArray<Json> | {
|
|
982
|
-
readonly [key: string]: Json;
|
|
752
|
+
readonly status: "active" | "expired" | "revocation-pending";
|
|
983
753
|
};
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
declare const sha256Json: (value: Json) => Effect.Effect<string, CryptoError, Crypto.Crypto>;
|
|
988
|
-
declare const sha256Encoded: <S extends Schema.Constraint>(schema: S, value: S["Type"]) => Effect.Effect<string, CryptoError, Crypto.Crypto | S["EncodingServices"]>;
|
|
989
|
-
/** Portable Web Crypto implementation for hosts that want a ready-made Layer. */
|
|
990
|
-
declare const webCryptoLayer: Layer.Layer<Crypto.Crypto>;
|
|
991
|
-
declare namespace lifecycle_repository_d_exports {
|
|
992
|
-
export { Aggregate, BindingModification, DetachResult, Error$3 as Error, Interface$2 as Interface, Service$2 as Service };
|
|
993
|
-
}
|
|
754
|
+
//#endregion
|
|
755
|
+
//#region src/auth/lifecycle-repository.d.ts
|
|
756
|
+
/** Private aggregate owned by the managed-DNS persistence capability. */
|
|
994
757
|
interface Aggregate {
|
|
995
758
|
readonly authorization: ProviderAuthorization;
|
|
996
|
-
readonly
|
|
759
|
+
readonly connections: ReadonlyArray<StoredConnection>;
|
|
760
|
+
readonly attachments: ReadonlyArray<DomainAttachment>;
|
|
761
|
+
readonly credential: StoredCredential;
|
|
762
|
+
}
|
|
763
|
+
interface ConnectInput {
|
|
764
|
+
readonly authorization: ProviderAuthorization;
|
|
765
|
+
readonly connection: StoredConnection;
|
|
997
766
|
readonly credential: StoredCredential;
|
|
767
|
+
/** The authorization id observed before building a reuse update, if any. */
|
|
768
|
+
readonly expectedAuthorizationId?: string;
|
|
769
|
+
/** The owner connection id observed before building a reuse update, if any. */
|
|
770
|
+
readonly expectedConnectionId?: string;
|
|
771
|
+
}
|
|
772
|
+
interface AttachmentResult {
|
|
773
|
+
readonly attachment: DomainAttachment;
|
|
774
|
+
readonly connection: ProviderConnection;
|
|
998
775
|
}
|
|
999
776
|
interface DetachResult {
|
|
1000
|
-
readonly
|
|
1001
|
-
readonly
|
|
1002
|
-
readonly
|
|
777
|
+
readonly attachment: DomainAttachment;
|
|
778
|
+
readonly connection: ProviderConnection;
|
|
779
|
+
readonly remainingAttachments: number;
|
|
1003
780
|
}
|
|
1004
|
-
interface
|
|
1005
|
-
readonly
|
|
1006
|
-
readonly
|
|
781
|
+
interface DisconnectResult {
|
|
782
|
+
readonly connection: ProviderConnection;
|
|
783
|
+
readonly remainingConnections: number;
|
|
784
|
+
readonly revokedAuthorization: boolean;
|
|
1007
785
|
}
|
|
1008
|
-
declare const Error_base$3: Schema.Class<Error$3, Schema.TaggedStruct<"
|
|
786
|
+
declare const Error_base$3: Schema.Class<Error$3, Schema.TaggedStruct<"ManagedDnsLifecycleError", {
|
|
1009
787
|
readonly category: Schema.Literal<"storage">;
|
|
1010
788
|
readonly message: Schema.String;
|
|
1011
789
|
readonly operation: Schema.String;
|
|
1012
790
|
readonly retry: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
|
|
1013
791
|
}>, import("effect/Cause").YieldableError>;
|
|
1014
792
|
declare class Error$3 extends Error_base$3 {}
|
|
793
|
+
/**
|
|
794
|
+
* Persistence capability for the managed-DNS model.
|
|
795
|
+
*
|
|
796
|
+
* Implementations own the atomic aggregate containing one provider credential authorization,
|
|
797
|
+
* organization connections, and exact domain attachments. Provider authorization is deliberately
|
|
798
|
+
* an implementation detail of the capability; public callers operate on the projections returned
|
|
799
|
+
* by the connection and attachment methods.
|
|
800
|
+
*/
|
|
1015
801
|
interface Interface$2 {
|
|
1016
|
-
readonly
|
|
1017
|
-
|
|
1018
|
-
readonly detach: <E>(input: {
|
|
802
|
+
readonly attach: (input: {
|
|
803
|
+
readonly attachment: DomainAttachment;
|
|
1019
804
|
readonly connectionId: string;
|
|
1020
|
-
readonly
|
|
1021
|
-
}) => Effect.Effect<
|
|
1022
|
-
readonly
|
|
805
|
+
readonly ownerId: string;
|
|
806
|
+
}) => Effect.Effect<AttachmentResult, Error$3>;
|
|
807
|
+
readonly connect: (input: ConnectInput) => Effect.Effect<Aggregate, Error$3>;
|
|
808
|
+
readonly detach: (input: {
|
|
809
|
+
readonly attachmentId: string;
|
|
810
|
+
readonly ownerId: string;
|
|
811
|
+
}) => Effect.Effect<DetachResult, Error$3>;
|
|
812
|
+
readonly disconnect: <E>(input: {
|
|
813
|
+
readonly connectionId: string;
|
|
814
|
+
readonly ownerId: string;
|
|
815
|
+
readonly revoke: (authorization: ProviderAuthorization) => Effect.Effect<void, E>;
|
|
816
|
+
}) => Effect.Effect<DisconnectResult, Error$3 | E>;
|
|
817
|
+
readonly findConnection: (ownerId: string, authorizationId: string) => Effect.Effect<StoredConnection | null, Error$3>;
|
|
1023
818
|
readonly get: (authorizationId: string) => Effect.Effect<Aggregate | null, Error$3>;
|
|
819
|
+
readonly getAttachment: (attachmentId: string) => Effect.Effect<DomainAttachment | null, Error$3>;
|
|
1024
820
|
readonly getByConnectionId: (connectionId: string) => Effect.Effect<Aggregate | null, Error$3>;
|
|
1025
|
-
readonly
|
|
1026
|
-
readonly binding: Connection;
|
|
1027
|
-
readonly value: A;
|
|
1028
|
-
}) => Effect.Effect<BindingModification<A>, Error$3>;
|
|
821
|
+
readonly listAttachments: (connectionId: string, ownerId: string) => Effect.Effect<ReadonlyArray<DomainAttachment>, Error$3>;
|
|
1029
822
|
readonly promoteEvidence: (authorizationId: string, evidence: ReadonlyArray<CapabilityEvidence>) => Effect.Effect<Aggregate, Error$3>;
|
|
1030
823
|
readonly recover: <E>(input: {
|
|
1031
824
|
readonly authorizationId: string;
|
|
1032
|
-
readonly revoke: (
|
|
1033
|
-
}) => Effect.Effect<
|
|
825
|
+
readonly revoke: (authorization: ProviderAuthorization) => Effect.Effect<void, E>;
|
|
826
|
+
}) => Effect.Effect<DisconnectResult, Error$3 | E>;
|
|
1034
827
|
readonly rotate: (authorizationId: string, credential: StoredCredential, expiresAt: Date | null) => Effect.Effect<Aggregate, Error$3>;
|
|
1035
828
|
}
|
|
1036
|
-
declare const Service_base$2: Context.ServiceClass<Service$2, "@domainkit/
|
|
829
|
+
declare const Service_base$2: Context.ServiceClass<Service$2, "@domainkit/ManagedDnsConnections", Interface$2>;
|
|
1037
830
|
declare class Service$2 extends Service_base$2 {}
|
|
831
|
+
declare namespace canonical_json_d_exports {
|
|
832
|
+
export { CryptoError, Json, sha256Encoded, sha256Json, sha256Text, stringify, webCryptoLayer };
|
|
833
|
+
}
|
|
834
|
+
declare const CryptoError_base: Schema.Class<CryptoError, Schema.TaggedStruct<"CryptoError", {
|
|
835
|
+
readonly message: Schema.String;
|
|
836
|
+
}>, import("effect/Cause").YieldableError>;
|
|
837
|
+
declare class CryptoError extends CryptoError_base {}
|
|
838
|
+
type Json = null | boolean | number | string | ReadonlyArray<Json> | {
|
|
839
|
+
readonly [key: string]: Json;
|
|
840
|
+
};
|
|
841
|
+
/** Deterministic JSON serialization for already schema-encoded protocol values. */
|
|
842
|
+
declare function stringify(value: Json): string;
|
|
843
|
+
declare const sha256Text: (value: string) => Effect.Effect<string, CryptoError, Crypto.Crypto>;
|
|
844
|
+
declare const sha256Json: (value: Json) => Effect.Effect<string, CryptoError, Crypto.Crypto>;
|
|
845
|
+
declare const sha256Encoded: <S extends Schema.Constraint>(schema: S, value: S["Type"]) => Effect.Effect<string, CryptoError, Crypto.Crypto | S["EncodingServices"]>;
|
|
846
|
+
/** Portable Web Crypto implementation for hosts that want a ready-made Layer. */
|
|
847
|
+
declare const webCryptoLayer: Layer.Layer<Crypto.Crypto>;
|
|
1038
848
|
declare namespace provider_context_d_exports {
|
|
1039
849
|
export { Codec, Envelope, codec, decode$1 as decode, encode$1 as encode };
|
|
1040
850
|
}
|
|
@@ -1068,6 +878,7 @@ interface Authentication {
|
|
|
1068
878
|
readonly capabilityEvidence: ReadonlyArray<CapabilityEvidence>;
|
|
1069
879
|
readonly credential: StoredCredential;
|
|
1070
880
|
readonly expiresAt: Date | null;
|
|
881
|
+
/** Provider-specific subject identity used only during authentication; targets are selected later. */
|
|
1071
882
|
readonly providerAccountId: string;
|
|
1072
883
|
readonly providerContext: Envelope;
|
|
1073
884
|
readonly scopes: ReadonlyArray<string>;
|
|
@@ -1194,7 +1005,7 @@ declare const Method: {
|
|
|
1194
1005
|
};
|
|
1195
1006
|
type StartResult = Data.TaggedEnum<{
|
|
1196
1007
|
Connected: {
|
|
1197
|
-
readonly
|
|
1008
|
+
readonly connection: ProviderConnection;
|
|
1198
1009
|
};
|
|
1199
1010
|
Redirect: {
|
|
1200
1011
|
readonly authorizationUrl: URL;
|
|
@@ -1204,7 +1015,7 @@ type StartResult = Data.TaggedEnum<{
|
|
|
1204
1015
|
declare const StartResult: {
|
|
1205
1016
|
readonly $is: <Tag extends "Connected" | "Redirect">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
1206
1017
|
readonly _tag: "Connected";
|
|
1207
|
-
readonly
|
|
1018
|
+
readonly connection: ProviderConnection;
|
|
1208
1019
|
}, {
|
|
1209
1020
|
readonly _tag: Tag;
|
|
1210
1021
|
}> | Extract<{
|
|
@@ -1217,7 +1028,7 @@ declare const StartResult: {
|
|
|
1217
1028
|
readonly $match: {
|
|
1218
1029
|
<Cases extends { readonly [Tag in "Connected" | "Redirect"]: (args: Extract<{
|
|
1219
1030
|
readonly _tag: "Connected";
|
|
1220
|
-
readonly
|
|
1031
|
+
readonly connection: ProviderConnection;
|
|
1221
1032
|
} | {
|
|
1222
1033
|
readonly _tag: "Redirect";
|
|
1223
1034
|
readonly authorizationUrl: URL;
|
|
@@ -1226,7 +1037,7 @@ declare const StartResult: {
|
|
|
1226
1037
|
readonly _tag: Tag;
|
|
1227
1038
|
}>) => any; }>(cases: Cases): (value: {
|
|
1228
1039
|
readonly _tag: "Connected";
|
|
1229
|
-
readonly
|
|
1040
|
+
readonly connection: ProviderConnection;
|
|
1230
1041
|
} | {
|
|
1231
1042
|
readonly _tag: "Redirect";
|
|
1232
1043
|
readonly authorizationUrl: URL;
|
|
@@ -1234,7 +1045,7 @@ declare const StartResult: {
|
|
|
1234
1045
|
}) => import("effect/Unify").Unify<ReturnType<Cases["Connected" | "Redirect"]>>;
|
|
1235
1046
|
<Cases extends { readonly [Tag in "Connected" | "Redirect"]: (args: Extract<{
|
|
1236
1047
|
readonly _tag: "Connected";
|
|
1237
|
-
readonly
|
|
1048
|
+
readonly connection: ProviderConnection;
|
|
1238
1049
|
} | {
|
|
1239
1050
|
readonly _tag: "Redirect";
|
|
1240
1051
|
readonly authorizationUrl: URL;
|
|
@@ -1243,7 +1054,7 @@ declare const StartResult: {
|
|
|
1243
1054
|
readonly _tag: Tag;
|
|
1244
1055
|
}>) => any; }>(value: {
|
|
1245
1056
|
readonly _tag: "Connected";
|
|
1246
|
-
readonly
|
|
1057
|
+
readonly connection: ProviderConnection;
|
|
1247
1058
|
} | {
|
|
1248
1059
|
readonly _tag: "Redirect";
|
|
1249
1060
|
readonly authorizationUrl: URL;
|
|
@@ -1252,7 +1063,7 @@ declare const StartResult: {
|
|
|
1252
1063
|
};
|
|
1253
1064
|
readonly Connected: Data.TaggedEnum.ConstructorFrom<{
|
|
1254
1065
|
readonly _tag: "Connected";
|
|
1255
|
-
readonly
|
|
1066
|
+
readonly connection: ProviderConnection;
|
|
1256
1067
|
}, "_tag">;
|
|
1257
1068
|
readonly Redirect: Data.TaggedEnum.ConstructorFrom<{
|
|
1258
1069
|
readonly _tag: "Redirect";
|
|
@@ -1267,9 +1078,11 @@ declare const Error_base$2: Schema.Class<Error$2, Schema.TaggedStruct<"Connectio
|
|
|
1267
1078
|
readonly retry: Schema.Literals<readonly ["never", "after-user-action", "safe", "unknown"]>;
|
|
1268
1079
|
}>, import("effect/Cause").YieldableError>;
|
|
1269
1080
|
declare class Error$2 extends Error_base$2 {}
|
|
1081
|
+
/** Inputs shared by token and interactive connection flows. */
|
|
1270
1082
|
interface BaseInput {
|
|
1271
1083
|
readonly authorizedById: string;
|
|
1272
|
-
|
|
1084
|
+
/** Existing authorization may be supplied only after the host completed fresh provider proof. */
|
|
1085
|
+
readonly authorizationId?: string;
|
|
1273
1086
|
readonly ownerId: string;
|
|
1274
1087
|
}
|
|
1275
1088
|
interface CompleteInput {
|
|
@@ -1278,99 +1091,17 @@ interface CompleteInput {
|
|
|
1278
1091
|
readonly continuations: ContinuationStore;
|
|
1279
1092
|
readonly flow: InteractiveFlow;
|
|
1280
1093
|
}
|
|
1281
|
-
interface ExtendInput {
|
|
1282
|
-
readonly connectionId: string;
|
|
1283
|
-
readonly grant: Grant;
|
|
1284
|
-
readonly ownerId: string;
|
|
1285
|
-
}
|
|
1286
|
-
interface RemoveDomainInput {
|
|
1287
|
-
readonly connectionId: string;
|
|
1288
|
-
readonly domain: string;
|
|
1289
|
-
readonly ownerId: string;
|
|
1290
|
-
}
|
|
1291
|
-
type RemoveDomainResult = Data.TaggedEnum<{
|
|
1292
|
-
AlreadyRemoved: {
|
|
1293
|
-
readonly aggregate: Aggregate;
|
|
1294
|
-
};
|
|
1295
|
-
Removed: {
|
|
1296
|
-
readonly aggregate: Aggregate;
|
|
1297
|
-
};
|
|
1298
|
-
}>;
|
|
1299
|
-
declare const RemoveDomainResult: {
|
|
1300
|
-
readonly $is: <Tag extends "AlreadyRemoved" | "Removed">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
1301
|
-
readonly _tag: "AlreadyRemoved";
|
|
1302
|
-
readonly aggregate: Aggregate;
|
|
1303
|
-
}, {
|
|
1304
|
-
readonly _tag: Tag;
|
|
1305
|
-
}> | Extract<{
|
|
1306
|
-
readonly _tag: "Removed";
|
|
1307
|
-
readonly aggregate: Aggregate;
|
|
1308
|
-
}, {
|
|
1309
|
-
readonly _tag: Tag;
|
|
1310
|
-
}>;
|
|
1311
|
-
readonly $match: {
|
|
1312
|
-
<Cases extends { readonly [Tag in "AlreadyRemoved" | "Removed"]: (args: Extract<{
|
|
1313
|
-
readonly _tag: "AlreadyRemoved";
|
|
1314
|
-
readonly aggregate: Aggregate;
|
|
1315
|
-
} | {
|
|
1316
|
-
readonly _tag: "Removed";
|
|
1317
|
-
readonly aggregate: Aggregate;
|
|
1318
|
-
}, {
|
|
1319
|
-
readonly _tag: Tag;
|
|
1320
|
-
}>) => any; }>(cases: Cases): (value: {
|
|
1321
|
-
readonly _tag: "AlreadyRemoved";
|
|
1322
|
-
readonly aggregate: Aggregate;
|
|
1323
|
-
} | {
|
|
1324
|
-
readonly _tag: "Removed";
|
|
1325
|
-
readonly aggregate: Aggregate;
|
|
1326
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["AlreadyRemoved" | "Removed"]>>;
|
|
1327
|
-
<Cases extends { readonly [Tag in "AlreadyRemoved" | "Removed"]: (args: Extract<{
|
|
1328
|
-
readonly _tag: "AlreadyRemoved";
|
|
1329
|
-
readonly aggregate: Aggregate;
|
|
1330
|
-
} | {
|
|
1331
|
-
readonly _tag: "Removed";
|
|
1332
|
-
readonly aggregate: Aggregate;
|
|
1333
|
-
}, {
|
|
1334
|
-
readonly _tag: Tag;
|
|
1335
|
-
}>) => any; }>(value: {
|
|
1336
|
-
readonly _tag: "AlreadyRemoved";
|
|
1337
|
-
readonly aggregate: Aggregate;
|
|
1338
|
-
} | {
|
|
1339
|
-
readonly _tag: "Removed";
|
|
1340
|
-
readonly aggregate: Aggregate;
|
|
1341
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["AlreadyRemoved" | "Removed"]>>;
|
|
1342
|
-
};
|
|
1343
|
-
readonly AlreadyRemoved: Data.TaggedEnum.ConstructorFrom<{
|
|
1344
|
-
readonly _tag: "AlreadyRemoved";
|
|
1345
|
-
readonly aggregate: Aggregate;
|
|
1346
|
-
}, "_tag">;
|
|
1347
|
-
readonly Removed: Data.TaggedEnum.ConstructorFrom<{
|
|
1348
|
-
readonly _tag: "Removed";
|
|
1349
|
-
readonly aggregate: Aggregate;
|
|
1350
|
-
}, "_tag">;
|
|
1351
|
-
};
|
|
1352
1094
|
declare const start: (input: BaseInput & {
|
|
1353
1095
|
readonly method: Method;
|
|
1354
1096
|
}) => Effect.Effect<{
|
|
1355
1097
|
readonly _tag: "Connected";
|
|
1356
|
-
readonly
|
|
1098
|
+
readonly connection: ProviderConnection;
|
|
1357
1099
|
} | {
|
|
1358
1100
|
readonly _tag: "Redirect";
|
|
1359
1101
|
readonly authorizationUrl: URL;
|
|
1360
1102
|
readonly continuationId: string;
|
|
1361
1103
|
}, Error$3 | AuthenticationFailure, Crypto.Crypto | Service$2>;
|
|
1362
|
-
declare const complete: (input: CompleteInput) => Effect.Effect<
|
|
1363
|
-
/** Extends one owner binding without repeating provider authentication. */
|
|
1364
|
-
declare const extend: (input: ExtendInput) => Effect.Effect<Aggregate, Error$3 | Error$2, Service$2>;
|
|
1365
|
-
/** Removes one domain from an owner binding without revoking provider authorization. */
|
|
1366
|
-
declare const removeDomain: (input: RemoveDomainInput) => Effect.Effect<{
|
|
1367
|
-
readonly _tag: "AlreadyRemoved";
|
|
1368
|
-
readonly aggregate: Aggregate;
|
|
1369
|
-
} | {
|
|
1370
|
-
readonly _tag: "Removed";
|
|
1371
|
-
readonly aggregate: Aggregate;
|
|
1372
|
-
}, Error$3 | Error$2, Service$2>;
|
|
1373
|
-
type Requirements$1 = Service$2 | Crypto.Crypto;
|
|
1104
|
+
declare const complete: (input: CompleteInput) => Effect.Effect<ProviderConnection, Error$3 | AuthenticationFailure, Crypto.Crypto | Service$2>;
|
|
1374
1105
|
type Failure = AuthenticationFailure | Error$3 | CryptoError;
|
|
1375
1106
|
declare namespace zone_discovery_d_exports {
|
|
1376
1107
|
export { Candidate, Interface$1 as Interface, Outcome, Service$1 as Service, Source, make };
|
|
@@ -4228,5 +3959,5 @@ interface AsyncInterface {
|
|
|
4228
3959
|
declare const layerFromAsync: (resolver: AsyncInterface) => Layer.Layer<Service>;
|
|
4229
3960
|
declare const toAsync: (resolver: Interface) => AsyncInterface;
|
|
4230
3961
|
//#endregion
|
|
4231
|
-
export {
|
|
4232
|
-
//# sourceMappingURL=resolver-
|
|
3962
|
+
export { InteractiveStart as $, Cname as $t, renderManualInstructions as A, CapabilityEvidence as At, types_d_exports as B, TokenValidation as Bt, DiscoverCreateInput as C, StoredConnection as Ct, StaleError as D, encode$2 as Dt, ResolvedCreateResult as E, decode$2 as Et, PlanAuthorization as F, Method$1 as Ft, AuthenticationFailure as G, CreateResult$1 as Gt, Source as H, Value as Ht, Receipt$1 as I, OAuthClientConfiguration as It, Continuation as J, Service$3 as Jt, BaseInput as K, Error$4 as Kt, Schema$1 as L, OAuthMethod as Lt, Authorization$1 as M, AsyncOAuthSubjectResolver as Mt, DnsPlan as N, IntegrationMethod as Nt, Target as O, validate$2 as Ot, Operation$1 as P, Manifest as Pt, InteractiveFlow as Q, Caa as Qt, encode as R, OAuthSubjectResolver as Rt, CreateResult as S, ProviderTargetEvidence as St, PartialApplyError as T, authorizationError as Tt, zone_discovery_d_exports as U, secret_d_exports as Ut, Candidate as V, manifest_d_exports as Vt, Authentication as W, AsyncInterface$1 as Wt, Error$2 as X, A as Xt, ContinuationStore as Y, provider_d_exports as Yt, Failure as Z, Aaaa as Zt, Receipt as _, domain_name_d_exports as _n, AuthorizationError$1 as _t, Interface as a, Opaque as an, Envelope as at, AuthorizeError as b, invalid_input_d_exports as bn, ProviderConnection as bt, Service as c, Srv as cn, canonical_json_d_exports as ct, Authorization as d, data as dn, ConnectInput as dt, DnsRecord as en, Method as et, CreateError as f, dns_record_d_exports as fn, DetachResult as ft, Plan as g, Schema$5 as gn, Service$2 as gt, PartialError as h, DomainName as hn, Interface$2 as ht, Error as i, Observed as in, Codec as it, ApplyReceipt as j, ProviderAuthorization as jt, plan_d_exports as k, Capability as kt, resolver_d_exports as l, Txt as ln, Aggregate as lt, Operation as m, parse as mn, Error$3 as mt, AsyncInterface as n, Mx as nn, complete as nt, Query as o, RequirementMetadata as on, provider_context_d_exports as ot, Error$1 as p, equals as pn, DisconnectResult as pt, CompleteInput as q, Interface$3 as qt, AsyncResolution as r, Ns as rn, start as rt, Resolution as s, Schema$4 as sn, CryptoError as st, Answer as t, Encoded as tn, StartResult as tt, ApplyError as u, Type as un, AttachmentResult as ut, deletion_d_exports as v, parse$1 as vn, ConnectionStatus as vt, ExactCreateInput as w, StoredCredential as wt, ConflictError as x, ProviderTarget as xt, AuthorizationError as y, Error$5 as yn, DomainAttachment as yt, encodeReceipt as z, Schema$3 as zt };
|
|
3963
|
+
//# sourceMappingURL=resolver-BGBLnPjJ.d.mts.map
|