domainkit 0.0.1 → 0.1.0-beta.1
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/LICENSE +21 -0
- package/README.md +115 -1
- package/dist/auth-Vi-hhXbV.mjs +475 -0
- package/dist/auth-Vi-hhXbV.mjs.map +1 -0
- package/dist/client-BnD7QLRF.mjs +567 -0
- package/dist/client-BnD7QLRF.mjs.map +1 -0
- package/dist/cloudflare-C6ryPlCZ.mjs +48 -0
- package/dist/cloudflare-C6ryPlCZ.mjs.map +1 -0
- package/dist/cloudflare-tdjNS8vE.d.mts +23 -0
- package/dist/cloudflare.d.mts +3 -0
- package/dist/cloudflare.mjs +2 -0
- package/dist/dns-record-C_KwGPLf.mjs +269 -0
- package/dist/dns-record-C_KwGPLf.mjs.map +1 -0
- package/dist/effect-cloudflare.d.mts +2 -0
- package/dist/effect-cloudflare.mjs +2 -0
- package/dist/effect-vercel.d.mts +2 -0
- package/dist/effect-vercel.mjs +2 -0
- package/dist/effect.d.mts +73 -0
- package/dist/effect.mjs +28 -0
- package/dist/effect.mjs.map +1 -0
- package/dist/index-CEzk2gbZ.d.mts +94 -0
- package/dist/index-CS9Rl5LQ.d.mts +71 -0
- package/dist/index.d.mts +173 -0
- package/dist/index.mjs +261 -0
- package/dist/index.mjs.map +1 -0
- package/dist/manifest-CP85ePFn.d.mts +583 -0
- package/dist/receipt-CGSnfZQ6.mjs +28 -0
- package/dist/receipt-CGSnfZQ6.mjs.map +1 -0
- package/dist/resolver-BHPsADzE.d.mts +2387 -0
- package/dist/resolver-tEXpKxmH.mjs +200 -0
- package/dist/resolver-tEXpKxmH.mjs.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/testing.d.mts +53 -0
- package/dist/testing.mjs +165 -0
- package/dist/testing.mjs.map +1 -0
- package/dist/vercel-D-E2aqb1.d.mts +22 -0
- package/dist/vercel-DD89DCqH.mjs +40 -0
- package/dist/vercel-DD89DCqH.mjs.map +1 -0
- package/dist/vercel.d.mts +3 -0
- package/dist/vercel.mjs +2 -0
- package/dist/verify-B80xCBh2.d.mts +1407 -0
- package/dist/verify-Dvc-9Kgp.mjs +1401 -0
- package/dist/verify-Dvc-9Kgp.mjs.map +1 -0
- package/package.json +96 -6
- package/bun.lock +0 -66
- package/index.ts +0 -1
- package/tsconfig.json +0 -30
package/dist/effect.mjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
+
import { E as domain_name_exports, S as provider_exports, g as dns_record_exports, k as invalid_input_exports } from "./dns-record-C_KwGPLf.mjs";
|
|
3
|
+
import { o as client_exports, s as make, t as auth_exports } from "./auth-Vi-hhXbV.mjs";
|
|
4
|
+
import { C as plan_exports, F as zones_exports, L as token_exports, N as types_exports, P as selection_exports, V as manifest_exports, W as oauth_exports, Z as authorization_exports, _ as deletion_exports, a as doh_exports, ct as connection_exports, dt as version, n as verify_exports, q as canonical_json_exports, r as cloudflare_doh_exports, s as dns_data_exports, tt as connection_lifecycle_exports, y as connection_authorization_exports } from "./verify-Dvc-9Kgp.mjs";
|
|
5
|
+
import { S as error_exports, c as oauth_state_exports, d as authorization_exports$1, h as credential_exports, i as resolver_exports, y as connection_exports$1 } from "./resolver-tEXpKxmH.mjs";
|
|
6
|
+
import { l as secret_exports, n as make$1, r as auth_exports$1, t as client_exports$1 } from "./client-BnD7QLRF.mjs";
|
|
7
|
+
import { n as receipt_exports } from "./receipt-CGSnfZQ6.mjs";
|
|
8
|
+
//#region src/providers/cloudflare/index.ts
|
|
9
|
+
var cloudflare_exports = /* @__PURE__ */ __exportAll({
|
|
10
|
+
Auth: () => auth_exports,
|
|
11
|
+
Client: () => client_exports,
|
|
12
|
+
make: () => make
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/providers/vercel/index.ts
|
|
16
|
+
var vercel_exports = /* @__PURE__ */ __exportAll({
|
|
17
|
+
Auth: () => auth_exports$1,
|
|
18
|
+
Client: () => client_exports$1,
|
|
19
|
+
make: () => make$1
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/effect.ts
|
|
23
|
+
/** The current package version from the package manifest. */
|
|
24
|
+
const VERSION = version;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { cloudflare_exports as Cloudflare, cloudflare_doh_exports as CloudflareDnsOverHttps, connection_exports as Connection, connection_authorization_exports as ConnectionAuthorization, connection_lifecycle_exports as ConnectionLifecycle, connection_exports$1 as ConnectionStore, credential_exports as CredentialStore, deletion_exports as Deletion, canonical_json_exports as Digest, dns_data_exports as DnsData, doh_exports as DnsOverHttps, types_exports as DnsPlan, provider_exports as DnsProvider, dns_record_exports as DnsRecord, resolver_exports as DnsResolver, domain_name_exports as DomainName, invalid_input_exports as InvalidInput, oauth_exports as OAuth, oauth_state_exports as OAuthStateStore, manifest_exports as ProviderAuth, authorization_exports as ProviderAuthorization, authorization_exports$1 as ProviderAuthorizationStore, selection_exports as ProviderDiscovery, plan_exports as Provisioning, receipt_exports as ReceiptStore, secret_exports as Secret, error_exports as Storage, token_exports as TokenConnection, VERSION, vercel_exports as Vercel, verify_exports as Verification, zones_exports as Zones };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=effect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect.mjs","names":["packageJson.version"],"sources":["../src/providers/cloudflare/index.ts","../src/providers/vercel/index.ts","../src/effect.ts"],"sourcesContent":["export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { 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 { 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 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.ts\";\nexport * as ConnectionLifecycle from \"./auth/connection-lifecycle.ts\";\nexport * as ProviderAuthorization from \"./auth/authorization.ts\";\nexport * as OAuth from \"./auth/oauth.ts\";\nexport * as ProviderAuth from \"./auth/manifest.ts\";\nexport * as Secret from \"./auth/secret.ts\";\nexport * as TokenConnection from \"./auth/token.ts\";\nexport * as ProviderDiscovery from \"./discovery/selection.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 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 DnsProvider from \"./provider/provider.ts\";\nexport * as Cloudflare from \"./providers/cloudflare/index.ts\";\nexport * as Vercel from \"./providers/vercel/index.ts\";\nexport * as ConnectionStore from \"./stores/connection.ts\";\nexport * as ProviderAuthorizationStore from \"./stores/authorization.ts\";\nexport * as CredentialStore from \"./stores/credential.ts\";\nexport * as OAuthStateStore from \"./stores/oauth-state.ts\";\nexport * as ReceiptStore from \"./stores/receipt.ts\";\nexport * as Storage from \"./stores/error.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 DnsResolver from \"./verification/resolver.ts\";\nexport * as Verification from \"./verification/verify.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AEGA,MAAa,UAAUA"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { R as DomainName, d as Value, g as Interface$1, h as Error, l as TokenValidation, n as IntegrationMethod, r as Manifest } from "./manifest-CP85ePFn.mjs";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
declare namespace client_d_exports {
|
|
4
|
+
export { Account, AccountContext, Fetch, Interface, ListZonesInput, Options, Zone, make };
|
|
5
|
+
}
|
|
6
|
+
type Fetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
7
|
+
/** Selects whether Vercel requests operate on a personal account or a team. */
|
|
8
|
+
type AccountContext = {
|
|
9
|
+
readonly _tag: "personal";
|
|
10
|
+
} | {
|
|
11
|
+
readonly _tag: "team";
|
|
12
|
+
readonly teamId: string;
|
|
13
|
+
};
|
|
14
|
+
/** Configuration for an Effect-native Vercel authoritative-DNS client. */
|
|
15
|
+
interface Options {
|
|
16
|
+
readonly baseUrl?: string;
|
|
17
|
+
/** Capabilities the host required when issuing or authorizing this credential. */
|
|
18
|
+
readonly capabilities: TokenValidation["capabilities"];
|
|
19
|
+
readonly context: AccountContext;
|
|
20
|
+
readonly fetch?: Fetch;
|
|
21
|
+
readonly token: Value;
|
|
22
|
+
}
|
|
23
|
+
interface ListZonesInput {
|
|
24
|
+
readonly name?: DomainName;
|
|
25
|
+
}
|
|
26
|
+
/** A Vercel account visible to the supplied credential. */
|
|
27
|
+
interface Account {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly type: "personal" | "team";
|
|
31
|
+
}
|
|
32
|
+
/** A Vercel-managed authoritative zone with normalized nameserver evidence. */
|
|
33
|
+
interface Zone {
|
|
34
|
+
readonly accountId: string;
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly name: DomainName;
|
|
37
|
+
readonly nameservers: ReadonlyArray<DomainName>;
|
|
38
|
+
readonly status: "active" | "pending";
|
|
39
|
+
}
|
|
40
|
+
interface Interface extends Interface$1 {
|
|
41
|
+
readonly listAccounts: () => Effect.Effect<ReadonlyArray<Account>, Error>;
|
|
42
|
+
readonly listZones: (input?: ListZonesInput) => Effect.Effect<ReadonlyArray<Zone>, Error>;
|
|
43
|
+
readonly validateToken: () => Effect.Effect<TokenValidation, Error>;
|
|
44
|
+
}
|
|
45
|
+
/** Creates an Effect-native Vercel client without owning the credential lifecycle. */
|
|
46
|
+
declare function make(options: Options): Interface;
|
|
47
|
+
declare namespace auth_d_exports {
|
|
48
|
+
export { ExchangeCodeOptions, IntegrationCredential, IntegrationMethodOptions, exchangeCode, integrationMethod, manifest, tokenMethod };
|
|
49
|
+
}
|
|
50
|
+
/** Describes Vercel's caller-created personal access-token method. */
|
|
51
|
+
declare function tokenMethod(capabilities: TokenValidation["capabilities"]): Extract<Manifest["methods"][number], {
|
|
52
|
+
readonly _tag: "token";
|
|
53
|
+
}>;
|
|
54
|
+
interface IntegrationMethodOptions {
|
|
55
|
+
readonly capabilities: TokenValidation["capabilities"];
|
|
56
|
+
readonly slug: string;
|
|
57
|
+
}
|
|
58
|
+
/** Describes Vercel's provider-specific integration installation flow. */
|
|
59
|
+
declare function integrationMethod(options: IntegrationMethodOptions): IntegrationMethod;
|
|
60
|
+
/** Creates the Vercel token and integration authorization manifest. */
|
|
61
|
+
declare function manifest(options: IntegrationMethodOptions): Manifest;
|
|
62
|
+
interface ExchangeCodeOptions {
|
|
63
|
+
readonly baseUrl?: string;
|
|
64
|
+
readonly clientId: string;
|
|
65
|
+
readonly clientSecret: Value;
|
|
66
|
+
readonly code: Value;
|
|
67
|
+
readonly fetch?: Fetch;
|
|
68
|
+
readonly redirectUri: string;
|
|
69
|
+
}
|
|
70
|
+
interface IntegrationCredential {
|
|
71
|
+
readonly accessToken: Value;
|
|
72
|
+
readonly context: AccountContext;
|
|
73
|
+
readonly installationId: string | null;
|
|
74
|
+
readonly userId: string;
|
|
75
|
+
}
|
|
76
|
+
/** Exchanges Vercel's one-time integration code and preserves its account context. */
|
|
77
|
+
declare const exchangeCode: (options: ExchangeCodeOptions) => Effect.Effect<{
|
|
78
|
+
accessToken: Value;
|
|
79
|
+
context: {
|
|
80
|
+
readonly _tag: "personal";
|
|
81
|
+
readonly teamId?: never;
|
|
82
|
+
} | {
|
|
83
|
+
readonly _tag: "team";
|
|
84
|
+
readonly teamId: string;
|
|
85
|
+
};
|
|
86
|
+
installationId: string | null;
|
|
87
|
+
userId: string;
|
|
88
|
+
}, Error, never>;
|
|
89
|
+
declare namespace index_d_exports {
|
|
90
|
+
export { Account, AccountContext, auth_d_exports as Auth, client_d_exports as Client, Fetch, Interface, ListZonesInput, Options, Zone, make };
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { make as _, auth_d_exports as a, tokenMethod as c, Fetch as d, Interface as f, client_d_exports as g, Zone as h, IntegrationMethodOptions as i, Account as l, Options as m, ExchangeCodeOptions as n, integrationMethod as o, ListZonesInput as p, IntegrationCredential as r, manifest as s, index_d_exports as t, AccountContext as u };
|
|
94
|
+
//# sourceMappingURL=index-CEzk2gbZ.d.mts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { R as DomainName, d as Value, g as Interface$1, h as Error, l as TokenValidation, o as OAuthMethod, r as Manifest, s as OAuthSubjectResolver } from "./manifest-CP85ePFn.mjs";
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
//#region src/providers/cloudflare/protocol.d.ts
|
|
4
|
+
declare const Account$1: Schema.Struct<{
|
|
5
|
+
readonly id: Schema.String;
|
|
6
|
+
readonly name: Schema.String;
|
|
7
|
+
}>;
|
|
8
|
+
interface Account$1 extends Schema.Schema.Type<typeof Account$1> {}
|
|
9
|
+
declare namespace client_d_exports {
|
|
10
|
+
export { Account, Fetch, Interface, ListZonesInput, Options, Zone, make };
|
|
11
|
+
}
|
|
12
|
+
type Fetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
13
|
+
/** Configuration for an Effect-native Cloudflare authoritative-DNS client. */
|
|
14
|
+
interface Options {
|
|
15
|
+
readonly accountId: string;
|
|
16
|
+
readonly baseUrl?: string;
|
|
17
|
+
/** Capabilities the host required when issuing or authorizing this credential. */
|
|
18
|
+
readonly capabilities: TokenValidation["capabilities"];
|
|
19
|
+
readonly fetch?: Fetch;
|
|
20
|
+
readonly token: Value;
|
|
21
|
+
readonly tokenKind?: "account" | "user";
|
|
22
|
+
}
|
|
23
|
+
interface ListZonesInput {
|
|
24
|
+
readonly accountId?: string;
|
|
25
|
+
readonly name?: DomainName;
|
|
26
|
+
}
|
|
27
|
+
type Account = Account$1;
|
|
28
|
+
/** A portable Cloudflare authoritative zone with normalized nameserver evidence. */
|
|
29
|
+
interface Zone {
|
|
30
|
+
readonly accountId: string;
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly name: DomainName;
|
|
33
|
+
readonly nameservers: ReadonlyArray<DomainName>;
|
|
34
|
+
readonly status: string | null;
|
|
35
|
+
}
|
|
36
|
+
interface Interface extends Interface$1 {
|
|
37
|
+
readonly listAccounts: () => Effect.Effect<ReadonlyArray<Account>, Error>;
|
|
38
|
+
readonly listZones: (input?: ListZonesInput) => Effect.Effect<ReadonlyArray<Zone>, Error>;
|
|
39
|
+
readonly validateToken: () => Effect.Effect<TokenValidation, Error>;
|
|
40
|
+
}
|
|
41
|
+
/** Creates an Effect-native Cloudflare client without owning the credential lifecycle. */
|
|
42
|
+
declare function make(options: Options): Interface;
|
|
43
|
+
declare namespace auth_d_exports {
|
|
44
|
+
export { OAuthMethodOptions, SubjectResolverOptions, manifest, oauthMethod, subjectResolver, tokenMethod, tokenValidator };
|
|
45
|
+
}
|
|
46
|
+
/** Describes Cloudflare's caller-created API-token authorization method. */
|
|
47
|
+
declare function tokenMethod(capabilities: TokenValidation["capabilities"]): Extract<Manifest["methods"][number], {
|
|
48
|
+
readonly _tag: "token";
|
|
49
|
+
}>;
|
|
50
|
+
interface OAuthMethodOptions {
|
|
51
|
+
/** Scope IDs assigned to the OAuth client by Cloudflare. */
|
|
52
|
+
readonly scopes: ReadonlyArray<string>;
|
|
53
|
+
/** Capabilities represented by those assigned scope IDs. */
|
|
54
|
+
readonly capabilities: TokenValidation["capabilities"];
|
|
55
|
+
readonly clientAuth: OAuthMethod["clientAuth"];
|
|
56
|
+
}
|
|
57
|
+
/** Describes a registered Cloudflare OAuth client and its assigned scope IDs. */
|
|
58
|
+
declare function oauthMethod(options: OAuthMethodOptions): OAuthMethod;
|
|
59
|
+
/** Creates the Cloudflare token and OAuth authorization manifest. */
|
|
60
|
+
declare function manifest(options: OAuthMethodOptions): Manifest;
|
|
61
|
+
interface SubjectResolverOptions extends Omit<Options, "token" | "tokenKind"> {}
|
|
62
|
+
/** Resolves the Cloudflare account selected by a completed OAuth grant. */
|
|
63
|
+
declare function subjectResolver(options: SubjectResolverOptions): OAuthSubjectResolver;
|
|
64
|
+
/** Creates a host callback that validates a Cloudflare API token. */
|
|
65
|
+
declare function tokenValidator(options: Omit<Options, "token">): (token: Value) => ReturnType<Interface["validateToken"]>;
|
|
66
|
+
declare namespace index_d_exports {
|
|
67
|
+
export { Account, auth_d_exports as Auth, client_d_exports as Client, Fetch, Interface, ListZonesInput, Options, Zone, make };
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { manifest as a, Account as c, ListZonesInput as d, Options as f, make as h, auth_d_exports as i, Fetch as l, client_d_exports as m, OAuthMethodOptions as n, oauthMethod as o, Zone as p, SubjectResolverOptions as r, tokenMethod as s, index_d_exports as t, Interface as u };
|
|
71
|
+
//# sourceMappingURL=index-CS9Rl5LQ.d.mts.map
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { A as Schema$1, C as DnsRecord, D as Observed, E as Ns, I as equals, L as parse, M as Txt, N as Type, O as Opaque, P as data, R as DomainName, S as Cname, T as Mx, U as invalid_input_d_exports, V as parse$1, a as OAuthClientConfiguration, b as Aaaa, c as Schema, d as Value, f as secret_d_exports, i as Method, j as Srv, k as RequirementMetadata, l as TokenValidation, m as CreateResult, o as OAuthMethod, p as AsyncInterface, r as Manifest, t as AsyncOAuthSubjectResolver, w as Encoded, x as Caa, y as A, z as Schema$2 } from "./manifest-CP85ePFn.mjs";
|
|
2
|
+
import { n as cloudflare_d_exports } from "./cloudflare-tdjNS8vE.mjs";
|
|
3
|
+
import { $ as Schema$4, G as OAuthContinuation, H as AuthorizationError, I as AsyncInterface$1, J as assertGrant, K as Schema$3, M as AsyncInterface$3, O as AsyncInterface$2, Q as ProviderAuthorization, S as encodeReceipt, U as Connection, W as Grant, X as encode, Z as Capability, _ as Operation, b as Schema$5, g as DnsPlan, h as Authorization, m as ApplyReceipt, n as AsyncInterface$4, o as Query, q as StoredCredential, r as AsyncResolution, t as Answer, tt as encode$1, u as AsyncInterface$6, v as PlanAuthorization, w as AsyncInterface$5, x as encode$2, y as Receipt } from "./resolver-BHPsADzE.mjs";
|
|
4
|
+
import { A as updateGrant$1, C as Fetch$1, D as DetachResult, O as Error, S as BeginInput$1, _ as CreateInput$1, a as Options$3, b as zones_d_exports, c as Authorization$1, d as Operation$1, f as PartialError, l as CreateError, m as Receipt$1, p as Plan, r as Options$2, s as ApplyError, t as Result, u as Error$1, x as selection_d_exports, y as renderManualInstructions$1 } from "./verify-B80xCBh2.mjs";
|
|
5
|
+
import { r as vercel_d_exports } from "./vercel-D-E2aqb1.mjs";
|
|
6
|
+
declare namespace connection_d_exports {
|
|
7
|
+
export { AuthorizationError, Connection, Grant, OAuthContinuation, Schema$3 as Schema, StoredCredential, assertGrant, decode$3 as decode, encode };
|
|
8
|
+
}
|
|
9
|
+
declare function decode$3(input: unknown): Promise<Connection>;
|
|
10
|
+
declare namespace connection_lifecycle_d_exports {
|
|
11
|
+
export { DetachResult, Error, detach, updateGrant };
|
|
12
|
+
}
|
|
13
|
+
declare function updateGrant(input: {
|
|
14
|
+
readonly connection: Parameters<typeof updateGrant$1>[0]["connection"];
|
|
15
|
+
readonly connectionStore: AsyncInterface$1;
|
|
16
|
+
readonly grant: Parameters<typeof updateGrant$1>[0]["grant"];
|
|
17
|
+
}): Promise<Connection>;
|
|
18
|
+
declare function detach(input: {
|
|
19
|
+
readonly authorizationStore: AsyncInterface$2;
|
|
20
|
+
readonly connectionId: string;
|
|
21
|
+
readonly connectionStore: AsyncInterface$1;
|
|
22
|
+
readonly credentialStore: AsyncInterface$3;
|
|
23
|
+
readonly revokeAuthorization: (authorization: ProviderAuthorization) => Promise<void>;
|
|
24
|
+
}): Promise<DetachResult>;
|
|
25
|
+
declare namespace provider_authorization_d_exports {
|
|
26
|
+
export { Capability, ProviderAuthorization, Schema$4 as Schema, decode$2 as decode, encode$1 as encode };
|
|
27
|
+
}
|
|
28
|
+
declare function decode$2(input: unknown): Promise<ProviderAuthorization>;
|
|
29
|
+
declare namespace provider_auth_d_exports {
|
|
30
|
+
export { Manifest, Method, OAuthClientConfiguration, OAuthMethod, AsyncOAuthSubjectResolver as OAuthSubjectResolver, Schema, TokenValidation, decode$1 as decode };
|
|
31
|
+
}
|
|
32
|
+
declare function decode$1(input: unknown): Promise<Manifest>;
|
|
33
|
+
declare namespace dns_record_d_exports {
|
|
34
|
+
export { A, Aaaa, Caa, Cname, DnsRecord, Encoded, Mx, Ns, Observed, Opaque, RequirementMetadata, Schema$1 as Schema, Srv, Txt, Type, data, equals, parse };
|
|
35
|
+
}
|
|
36
|
+
declare namespace domain_name_d_exports {
|
|
37
|
+
export { DomainName, Schema$2 as Schema, parse$1 as parse };
|
|
38
|
+
}
|
|
39
|
+
declare namespace dns_plan_d_exports {
|
|
40
|
+
export { ApplyReceipt, Authorization, DnsPlan, Operation, PlanAuthorization, Receipt, Schema$5 as Schema, decode, decodeReceipt, encode$2 as encode, encodeReceipt };
|
|
41
|
+
}
|
|
42
|
+
declare function decode(input: unknown): Promise<DnsPlan>;
|
|
43
|
+
declare function decodeReceipt(input: unknown): Promise<ApplyReceipt>;
|
|
44
|
+
declare namespace deletion_d_exports {
|
|
45
|
+
export { ApplyError, Authorization$1 as Authorization, CreateError, Authorization$1 as DeletionAuthorization, Operation$1 as DeletionOperation, Plan as DeletionPlan, Receipt$1 as DeletionReceipt, Error$1 as Error, Operation$1 as Operation, PartialError, Plan, Receipt$1 as Receipt, apply$1 as apply, authorize$1 as authorize, create$1 as create };
|
|
46
|
+
}
|
|
47
|
+
declare function create$1(input: {
|
|
48
|
+
readonly plan: DnsPlan;
|
|
49
|
+
readonly provider: AsyncInterface;
|
|
50
|
+
readonly receipt: ApplyReceipt;
|
|
51
|
+
readonly ttlMs?: number;
|
|
52
|
+
}): Promise<Plan>;
|
|
53
|
+
declare function authorize$1(plan: Plan, operationIds?: ReadonlyArray<string>): Promise<Authorization$1>;
|
|
54
|
+
declare function apply$1(input: {
|
|
55
|
+
readonly authorization: Authorization$1;
|
|
56
|
+
readonly plan: Plan;
|
|
57
|
+
readonly priorReceipt?: Receipt$1;
|
|
58
|
+
readonly provider: AsyncInterface;
|
|
59
|
+
}): Promise<Receipt$1>;
|
|
60
|
+
declare namespace dns_provider_d_exports {
|
|
61
|
+
export { CreateResult, AsyncInterface as Interface };
|
|
62
|
+
}
|
|
63
|
+
declare namespace dns_resolver_d_exports {
|
|
64
|
+
export { Answer, AsyncInterface$4 as Interface, Query, AsyncResolution as Resolution };
|
|
65
|
+
}
|
|
66
|
+
declare namespace oauth_d_exports {
|
|
67
|
+
export { BeginInput, Fetch, begin, complete, refresh, revoke };
|
|
68
|
+
}
|
|
69
|
+
interface BeginInput extends BeginInput$1 {
|
|
70
|
+
readonly stateStore: AsyncInterface$5;
|
|
71
|
+
}
|
|
72
|
+
declare function begin(input: BeginInput): Promise<{
|
|
73
|
+
readonly authorizationUrl: URL;
|
|
74
|
+
}>;
|
|
75
|
+
declare function complete(input: {
|
|
76
|
+
readonly callbackUrl: URL;
|
|
77
|
+
readonly client: OAuthClientConfiguration;
|
|
78
|
+
readonly connectionStore: AsyncInterface$1;
|
|
79
|
+
readonly credentialStore: AsyncInterface$3;
|
|
80
|
+
readonly authorizationStore: AsyncInterface$2;
|
|
81
|
+
readonly fetch?: Fetch$1;
|
|
82
|
+
readonly providerId: string;
|
|
83
|
+
readonly resolveSubject: AsyncOAuthSubjectResolver;
|
|
84
|
+
readonly stateStore: AsyncInterface$5;
|
|
85
|
+
}): Promise<{
|
|
86
|
+
readonly authorization: ProviderAuthorization;
|
|
87
|
+
readonly connection: Connection;
|
|
88
|
+
}>;
|
|
89
|
+
declare function refresh(input: {
|
|
90
|
+
readonly authorization: ProviderAuthorization;
|
|
91
|
+
readonly client: OAuthClientConfiguration;
|
|
92
|
+
readonly credentialStore: AsyncInterface$3;
|
|
93
|
+
readonly fetch?: Fetch$1;
|
|
94
|
+
readonly method: OAuthMethod;
|
|
95
|
+
}): Promise<void>;
|
|
96
|
+
declare function revoke(input: {
|
|
97
|
+
readonly authorization: ProviderAuthorization;
|
|
98
|
+
readonly client: OAuthClientConfiguration;
|
|
99
|
+
readonly credentialStore: AsyncInterface$3;
|
|
100
|
+
readonly fetch?: Fetch$1;
|
|
101
|
+
readonly method: OAuthMethod;
|
|
102
|
+
}): Promise<void>;
|
|
103
|
+
type Fetch = Fetch$1;
|
|
104
|
+
declare namespace provisioning_d_exports {
|
|
105
|
+
export { CreateInput, apply, authorize, authorizeForConnection, create, renderManualInstructions };
|
|
106
|
+
}
|
|
107
|
+
interface CreateInput extends CreateInput$1 {
|
|
108
|
+
readonly provider: AsyncInterface;
|
|
109
|
+
}
|
|
110
|
+
declare function create(input: CreateInput): Promise<DnsPlan>;
|
|
111
|
+
declare function authorize(plan: DnsPlan, operationIds?: ReadonlyArray<string>, options?: {
|
|
112
|
+
readonly allowPartial?: boolean;
|
|
113
|
+
}): Promise<PlanAuthorization>;
|
|
114
|
+
declare function apply(input: {
|
|
115
|
+
readonly authorization: PlanAuthorization;
|
|
116
|
+
readonly plan: DnsPlan;
|
|
117
|
+
readonly provider: AsyncInterface;
|
|
118
|
+
}): Promise<ApplyReceipt>;
|
|
119
|
+
declare function authorizeForConnection(input: {
|
|
120
|
+
readonly allowPartial?: boolean;
|
|
121
|
+
readonly authorization: ProviderAuthorization;
|
|
122
|
+
readonly connection: Connection;
|
|
123
|
+
readonly domain: string;
|
|
124
|
+
readonly operationIds?: ReadonlyArray<string>;
|
|
125
|
+
readonly plan: DnsPlan;
|
|
126
|
+
}): Promise<PlanAuthorization>;
|
|
127
|
+
declare const renderManualInstructions: typeof renderManualInstructions$1;
|
|
128
|
+
declare namespace stores_d_exports {
|
|
129
|
+
export { AsyncInterface$1 as Connection, AsyncInterface$3 as Credential, AsyncInterface$5 as OAuthState, AsyncInterface$2 as ProviderAuthorization, AsyncInterface$6 as Receipt };
|
|
130
|
+
}
|
|
131
|
+
declare namespace token_d_exports {
|
|
132
|
+
export { connect };
|
|
133
|
+
}
|
|
134
|
+
declare function connect(input: {
|
|
135
|
+
readonly connectionStore: AsyncInterface$1;
|
|
136
|
+
readonly credentialStore: AsyncInterface$3;
|
|
137
|
+
readonly authorizationStore: AsyncInterface$2;
|
|
138
|
+
readonly grant: Grant;
|
|
139
|
+
readonly ownerId: string;
|
|
140
|
+
readonly providerId: string;
|
|
141
|
+
readonly subjectId: string;
|
|
142
|
+
readonly token: Value;
|
|
143
|
+
readonly validate: (token: Value) => Promise<TokenValidation>;
|
|
144
|
+
}): Promise<{
|
|
145
|
+
readonly authorization: ProviderAuthorization;
|
|
146
|
+
readonly connection: Connection;
|
|
147
|
+
}>;
|
|
148
|
+
declare namespace verification_d_exports {
|
|
149
|
+
export { record };
|
|
150
|
+
}
|
|
151
|
+
declare function record(input: {
|
|
152
|
+
readonly provider: AsyncInterface;
|
|
153
|
+
readonly record: DnsRecord;
|
|
154
|
+
readonly resolver: AsyncInterface$4;
|
|
155
|
+
readonly zone: DomainName;
|
|
156
|
+
}): Promise<Result>;
|
|
157
|
+
declare namespace cloudflare_doh_d_exports {
|
|
158
|
+
export { Options$1 as Options, make$1 as make };
|
|
159
|
+
}
|
|
160
|
+
type Options$1 = Options$2;
|
|
161
|
+
declare function make$1(options?: Options$1): AsyncInterface$4;
|
|
162
|
+
declare namespace doh_d_exports {
|
|
163
|
+
export { Options, make };
|
|
164
|
+
}
|
|
165
|
+
type Options = Options$3;
|
|
166
|
+
declare function make(options: Options): AsyncInterface$4;
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/index.d.ts
|
|
169
|
+
/** The current package version from the package manifest. */
|
|
170
|
+
declare const VERSION: string;
|
|
171
|
+
//#endregion
|
|
172
|
+
export { cloudflare_d_exports as Cloudflare, cloudflare_doh_d_exports as CloudflareDnsOverHttps, connection_d_exports as Connection, connection_lifecycle_d_exports as ConnectionLifecycle, deletion_d_exports as Deletion, 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, domain_name_d_exports as DomainName, invalid_input_d_exports as InvalidInput, oauth_d_exports as OAuth, provider_auth_d_exports as ProviderAuth, provider_authorization_d_exports as ProviderAuthorization, selection_d_exports as ProviderDiscovery, provisioning_d_exports as Provisioning, secret_d_exports as Secret, type stores_d_exports as Stores, token_d_exports as TokenConnection, VERSION, vercel_d_exports as Vercel, verification_d_exports as Verification, zones_d_exports as Zones };
|
|
173
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
+
import { D as parse$1, O as Error$1, _ as equals, a as Mx, c as Opaque, d as Srv, f as Txt, i as Cname, k as invalid_input_exports, l as RequirementMetadata, m as data, n as Aaaa, o as Ns, p as Type, r as Caa, s as Observed, t as A, u as Schema$1, v as parse, w as Schema$2, x as layerFromAsync, y as Error$2 } from "./dns-record-C_KwGPLf.mjs";
|
|
3
|
+
import { t as cloudflare_exports } from "./cloudflare-C6ryPlCZ.mjs";
|
|
4
|
+
import { $ as encode$1, A as decodeReceipt$1, B as decode$6, D as Receipt, E as Operation, F as zones_exports, G as refresh$1, H as begin$1, I as connect$1, J as webCryptoLayer, K as revoke$1, M as encodeReceipt, O as Schema$6, P as selection_exports, Q as decode$5, R as Method, S as create$3, T as Authorization, U as complete$1, X as Schema$4, Y as Capability, at as Grant, b as apply$3, c as Authorization$1, d as PartialError, dt as version, et as Error$3, f as Plan, g as create$2, h as authorize$2, i as toAsync, it as AuthorizationError, j as encode$2, k as decode$7, l as Error$4, lt as decode$4, m as apply$2, nt as detach$1, o as toAsync$1, ot as Schema$3, p as Receipt$1, rt as updateGrant$1, st as assertGrant, t as record$1, u as Operation$1, ut as encode, v as authorize$4, w as renderManualInstructions$1, x as authorize$3, z as Schema$5 } from "./verify-Dvc-9Kgp.mjs";
|
|
5
|
+
import { b as layerFromAsync$1, f as layerFromAsync$2, g as layerFromAsync$3, r as layerFromAsync$5, s as layerFromAsync$4 } from "./resolver-tEXpKxmH.mjs";
|
|
6
|
+
import { l as secret_exports } from "./client-BnD7QLRF.mjs";
|
|
7
|
+
import { n as vercel_exports } from "./vercel-DD89DCqH.mjs";
|
|
8
|
+
import { Effect, Layer } from "effect";
|
|
9
|
+
//#region src/promise/connection.ts
|
|
10
|
+
var connection_exports = /* @__PURE__ */ __exportAll({
|
|
11
|
+
AuthorizationError: () => AuthorizationError,
|
|
12
|
+
Grant: () => Grant,
|
|
13
|
+
Schema: () => Schema$3,
|
|
14
|
+
assertGrant: () => assertGrant,
|
|
15
|
+
decode: () => decode$3,
|
|
16
|
+
encode: () => encode
|
|
17
|
+
});
|
|
18
|
+
function decode$3(input) {
|
|
19
|
+
return Effect.runPromise(decode$4(input));
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/promise/connection-lifecycle.ts
|
|
23
|
+
var connection_lifecycle_exports = /* @__PURE__ */ __exportAll({
|
|
24
|
+
Error: () => Error$3,
|
|
25
|
+
detach: () => detach,
|
|
26
|
+
updateGrant: () => updateGrant
|
|
27
|
+
});
|
|
28
|
+
function updateGrant(input) {
|
|
29
|
+
return Effect.runPromise(updateGrant$1({
|
|
30
|
+
connection: input.connection,
|
|
31
|
+
grant: input.grant
|
|
32
|
+
}).pipe(Effect.provide(layerFromAsync$1(input.connectionStore))));
|
|
33
|
+
}
|
|
34
|
+
function detach(input) {
|
|
35
|
+
return Effect.runPromise(detach$1({
|
|
36
|
+
connectionId: input.connectionId,
|
|
37
|
+
revokeAuthorization: (authorization) => Effect.tryPromise({
|
|
38
|
+
try: () => input.revokeAuthorization(authorization),
|
|
39
|
+
catch: (cause) => new Error$3({ message: cause instanceof globalThis.Error ? cause.message : String(cause) })
|
|
40
|
+
})
|
|
41
|
+
}).pipe(Effect.provide(Layer.mergeAll(layerFromAsync$2(input.authorizationStore), layerFromAsync$1(input.connectionStore), layerFromAsync$3(input.credentialStore)))));
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/promise/provider-authorization.ts
|
|
45
|
+
var provider_authorization_exports = /* @__PURE__ */ __exportAll({
|
|
46
|
+
Capability: () => Capability,
|
|
47
|
+
Schema: () => Schema$4,
|
|
48
|
+
decode: () => decode$2,
|
|
49
|
+
encode: () => encode$1
|
|
50
|
+
});
|
|
51
|
+
function decode$2(input) {
|
|
52
|
+
return Effect.runPromise(decode$5(input));
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/promise/provider-auth.ts
|
|
56
|
+
var provider_auth_exports = /* @__PURE__ */ __exportAll({
|
|
57
|
+
Method: () => Method,
|
|
58
|
+
Schema: () => Schema$5,
|
|
59
|
+
decode: () => decode$1
|
|
60
|
+
});
|
|
61
|
+
function decode$1(input) {
|
|
62
|
+
return Effect.runPromise(decode$6(input));
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/promise/dns-record.ts
|
|
66
|
+
var dns_record_exports = /* @__PURE__ */ __exportAll({
|
|
67
|
+
A: () => A,
|
|
68
|
+
Aaaa: () => Aaaa,
|
|
69
|
+
Caa: () => Caa,
|
|
70
|
+
Cname: () => Cname,
|
|
71
|
+
Mx: () => Mx,
|
|
72
|
+
Ns: () => Ns,
|
|
73
|
+
Observed: () => Observed,
|
|
74
|
+
Opaque: () => Opaque,
|
|
75
|
+
RequirementMetadata: () => RequirementMetadata,
|
|
76
|
+
Schema: () => Schema$1,
|
|
77
|
+
Srv: () => Srv,
|
|
78
|
+
Txt: () => Txt,
|
|
79
|
+
Type: () => Type,
|
|
80
|
+
data: () => data,
|
|
81
|
+
equals: () => equals,
|
|
82
|
+
parse: () => parse
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/promise/domain-name.ts
|
|
86
|
+
var domain_name_exports = /* @__PURE__ */ __exportAll({
|
|
87
|
+
Schema: () => Schema$2,
|
|
88
|
+
parse: () => parse$1
|
|
89
|
+
});
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/promise/dns-plan.ts
|
|
92
|
+
var dns_plan_exports = /* @__PURE__ */ __exportAll({
|
|
93
|
+
Authorization: () => Authorization,
|
|
94
|
+
Operation: () => Operation,
|
|
95
|
+
Receipt: () => Receipt,
|
|
96
|
+
Schema: () => Schema$6,
|
|
97
|
+
decode: () => decode,
|
|
98
|
+
decodeReceipt: () => decodeReceipt,
|
|
99
|
+
encode: () => encode$2,
|
|
100
|
+
encodeReceipt: () => encodeReceipt
|
|
101
|
+
});
|
|
102
|
+
function decode(input) {
|
|
103
|
+
return Effect.runPromise(decode$7(input));
|
|
104
|
+
}
|
|
105
|
+
function decodeReceipt(input) {
|
|
106
|
+
return Effect.runPromise(decodeReceipt$1(input));
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/promise/deletion.ts
|
|
110
|
+
var deletion_exports = /* @__PURE__ */ __exportAll({
|
|
111
|
+
Authorization: () => Authorization$1,
|
|
112
|
+
Error: () => Error$4,
|
|
113
|
+
Operation: () => Operation$1,
|
|
114
|
+
PartialError: () => PartialError,
|
|
115
|
+
Plan: () => Plan,
|
|
116
|
+
Receipt: () => Receipt$1,
|
|
117
|
+
apply: () => apply$1,
|
|
118
|
+
authorize: () => authorize$1,
|
|
119
|
+
create: () => create$1
|
|
120
|
+
});
|
|
121
|
+
function create$1(input) {
|
|
122
|
+
return Effect.runPromise(create$2({
|
|
123
|
+
plan: input.plan,
|
|
124
|
+
receipt: input.receipt,
|
|
125
|
+
...input.ttlMs === void 0 ? {} : { ttlMs: input.ttlMs }
|
|
126
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
127
|
+
}
|
|
128
|
+
function authorize$1(plan, operationIds) {
|
|
129
|
+
return Effect.runPromise(authorize$2(plan, operationIds).pipe(Effect.provide(webCryptoLayer)));
|
|
130
|
+
}
|
|
131
|
+
function apply$1(input) {
|
|
132
|
+
return Effect.runPromise(apply$2({
|
|
133
|
+
authorization: input.authorization,
|
|
134
|
+
plan: input.plan,
|
|
135
|
+
...input.priorReceipt === void 0 ? {} : { priorReceipt: input.priorReceipt }
|
|
136
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/promise/oauth.ts
|
|
140
|
+
var oauth_exports = /* @__PURE__ */ __exportAll({
|
|
141
|
+
begin: () => begin,
|
|
142
|
+
complete: () => complete,
|
|
143
|
+
refresh: () => refresh,
|
|
144
|
+
revoke: () => revoke
|
|
145
|
+
});
|
|
146
|
+
function begin(input) {
|
|
147
|
+
const { stateStore, ...programInput } = input;
|
|
148
|
+
return Effect.runPromise(begin$1(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync$4(stateStore), webCryptoLayer))));
|
|
149
|
+
}
|
|
150
|
+
function complete(input) {
|
|
151
|
+
return Effect.runPromise(complete$1({
|
|
152
|
+
callbackUrl: input.callbackUrl,
|
|
153
|
+
client: input.client,
|
|
154
|
+
...input.fetch === void 0 ? {} : { fetch: input.fetch },
|
|
155
|
+
providerId: input.providerId,
|
|
156
|
+
resolveSubject: (tokens, accessToken) => Effect.tryPromise({
|
|
157
|
+
try: () => input.resolveSubject(tokens, accessToken),
|
|
158
|
+
catch: (cause) => providerFailure(input.providerId, "resolveSubject", cause)
|
|
159
|
+
})
|
|
160
|
+
}).pipe(Effect.provide(Layer.mergeAll(layerFromAsync$4(input.stateStore), layerFromAsync$2(input.authorizationStore), layerFromAsync$1(input.connectionStore), layerFromAsync$3(input.credentialStore), webCryptoLayer))));
|
|
161
|
+
}
|
|
162
|
+
function refresh(input) {
|
|
163
|
+
return Effect.runPromise(refresh$1({
|
|
164
|
+
client: input.client,
|
|
165
|
+
authorization: input.authorization,
|
|
166
|
+
...input.fetch === void 0 ? {} : { fetch: input.fetch },
|
|
167
|
+
method: input.method
|
|
168
|
+
}).pipe(Effect.provide(layerFromAsync$3(input.credentialStore))));
|
|
169
|
+
}
|
|
170
|
+
function revoke(input) {
|
|
171
|
+
return Effect.runPromise(revoke$1({
|
|
172
|
+
client: input.client,
|
|
173
|
+
authorization: input.authorization,
|
|
174
|
+
...input.fetch === void 0 ? {} : { fetch: input.fetch },
|
|
175
|
+
method: input.method
|
|
176
|
+
}).pipe(Effect.provide(layerFromAsync$3(input.credentialStore))));
|
|
177
|
+
}
|
|
178
|
+
function providerFailure(providerId, operation, cause) {
|
|
179
|
+
return cause instanceof Error$1 || cause instanceof Error$2 ? cause : new Error$2({
|
|
180
|
+
cause,
|
|
181
|
+
message: cause instanceof Error ? cause.message : "Provider callback failed",
|
|
182
|
+
operation,
|
|
183
|
+
providerId
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/promise/provisioning.ts
|
|
188
|
+
var provisioning_exports = /* @__PURE__ */ __exportAll({
|
|
189
|
+
apply: () => apply,
|
|
190
|
+
authorize: () => authorize,
|
|
191
|
+
authorizeForConnection: () => authorizeForConnection,
|
|
192
|
+
create: () => create,
|
|
193
|
+
renderManualInstructions: () => renderManualInstructions
|
|
194
|
+
});
|
|
195
|
+
function create(input) {
|
|
196
|
+
const { provider, ...programInput } = input;
|
|
197
|
+
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync(provider), webCryptoLayer))));
|
|
198
|
+
}
|
|
199
|
+
function authorize(plan, operationIds, options = {}) {
|
|
200
|
+
return Effect.runPromise(authorize$3(plan, operationIds, options).pipe(Effect.provide(webCryptoLayer)));
|
|
201
|
+
}
|
|
202
|
+
function apply(input) {
|
|
203
|
+
return Effect.runPromise(apply$3({
|
|
204
|
+
authorization: input.authorization,
|
|
205
|
+
plan: input.plan
|
|
206
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
207
|
+
}
|
|
208
|
+
function authorizeForConnection(input) {
|
|
209
|
+
return Effect.runPromise(authorize$4(input).pipe(Effect.provide(webCryptoLayer)));
|
|
210
|
+
}
|
|
211
|
+
const renderManualInstructions = renderManualInstructions$1;
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/promise/token.ts
|
|
214
|
+
var token_exports = /* @__PURE__ */ __exportAll({ connect: () => connect });
|
|
215
|
+
function connect(input) {
|
|
216
|
+
return Effect.runPromise(connect$1({
|
|
217
|
+
grant: input.grant,
|
|
218
|
+
ownerId: input.ownerId,
|
|
219
|
+
providerId: input.providerId,
|
|
220
|
+
subjectId: input.subjectId,
|
|
221
|
+
token: input.token,
|
|
222
|
+
validate: (token) => Effect.tryPromise({
|
|
223
|
+
try: () => input.validate(token),
|
|
224
|
+
catch: (cause) => cause instanceof Error$1 || cause instanceof Error$2 ? cause : new Error$2({
|
|
225
|
+
cause,
|
|
226
|
+
message: cause instanceof Error ? cause.message : "Token validation failed",
|
|
227
|
+
operation: "validateToken",
|
|
228
|
+
providerId: input.providerId
|
|
229
|
+
})
|
|
230
|
+
})
|
|
231
|
+
}).pipe(Effect.provide(Layer.mergeAll(layerFromAsync$1(input.connectionStore), layerFromAsync$2(input.authorizationStore), layerFromAsync$3(input.credentialStore), webCryptoLayer))));
|
|
232
|
+
}
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/promise/verification.ts
|
|
235
|
+
var verification_exports = /* @__PURE__ */ __exportAll({ record: () => record });
|
|
236
|
+
function record(input) {
|
|
237
|
+
return Effect.runPromise(record$1({
|
|
238
|
+
record: input.record,
|
|
239
|
+
zone: input.zone
|
|
240
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), layerFromAsync$5(input.resolver)))));
|
|
241
|
+
}
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region src/promise/cloudflare-doh.ts
|
|
244
|
+
var cloudflare_doh_exports = /* @__PURE__ */ __exportAll({ make: () => make$1 });
|
|
245
|
+
function make$1(options = {}) {
|
|
246
|
+
return toAsync(options);
|
|
247
|
+
}
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/promise/doh.ts
|
|
250
|
+
var doh_exports = /* @__PURE__ */ __exportAll({ make: () => make });
|
|
251
|
+
function make(options) {
|
|
252
|
+
return toAsync$1(options);
|
|
253
|
+
}
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/index.ts
|
|
256
|
+
/** The current package version from the package manifest. */
|
|
257
|
+
const VERSION = version;
|
|
258
|
+
//#endregion
|
|
259
|
+
export { cloudflare_exports as Cloudflare, cloudflare_doh_exports as CloudflareDnsOverHttps, connection_exports as Connection, connection_lifecycle_exports as ConnectionLifecycle, deletion_exports as Deletion, doh_exports as DnsOverHttps, dns_plan_exports as DnsPlan, dns_record_exports as DnsRecord, domain_name_exports as DomainName, invalid_input_exports as InvalidInput, oauth_exports as OAuth, provider_auth_exports as ProviderAuth, provider_authorization_exports as ProviderAuthorization, selection_exports as ProviderDiscovery, provisioning_exports as Provisioning, secret_exports as Secret, token_exports as TokenConnection, VERSION, vercel_exports as Vercel, verification_exports as Verification, zones_exports as Zones };
|
|
260
|
+
|
|
261
|
+
//# sourceMappingURL=index.mjs.map
|