domainkit 0.1.0-beta.0 → 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.
Files changed (46) hide show
  1. package/dist/{auth-Df9BuC25.mjs → auth-Vi-hhXbV.mjs} +24 -9
  2. package/dist/auth-Vi-hhXbV.mjs.map +1 -0
  3. package/dist/{client-DvXfJx_E.mjs → client-BnD7QLRF.mjs} +54 -21
  4. package/dist/client-BnD7QLRF.mjs.map +1 -0
  5. package/dist/{cloudflare-C_ixZsJo.mjs → cloudflare-C6ryPlCZ.mjs} +4 -2
  6. package/dist/{cloudflare-C_ixZsJo.mjs.map → cloudflare-C6ryPlCZ.mjs.map} +1 -1
  7. package/dist/{cloudflare-DClWuAm8.d.mts → cloudflare-tdjNS8vE.d.mts} +3 -3
  8. package/dist/cloudflare.d.mts +2 -2
  9. package/dist/cloudflare.mjs +1 -1
  10. package/dist/{dns-record-Dzo4flM5.mjs → dns-record-C_KwGPLf.mjs} +11 -1
  11. package/dist/dns-record-C_KwGPLf.mjs.map +1 -0
  12. package/dist/effect-cloudflare.d.mts +1 -1
  13. package/dist/effect-cloudflare.mjs +1 -1
  14. package/dist/effect-vercel.d.mts +1 -1
  15. package/dist/effect-vercel.mjs +1 -1
  16. package/dist/effect.d.mts +33 -23
  17. package/dist/effect.mjs +7 -7
  18. package/dist/effect.mjs.map +1 -1
  19. package/dist/{index-DQAjUrZu.d.mts → index-CEzk2gbZ.d.mts} +2 -2
  20. package/dist/{index-D1KtyjuI.d.mts → index-CS9Rl5LQ.d.mts} +2 -2
  21. package/dist/index.d.mts +72 -27
  22. package/dist/index.mjs +88 -25
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/{manifest-DjH3BVB9.d.mts → manifest-CP85ePFn.d.mts} +5 -1
  25. package/dist/{receipt-C7PjnibZ.mjs → receipt-CGSnfZQ6.mjs} +2 -2
  26. package/dist/{receipt-C7PjnibZ.mjs.map → receipt-CGSnfZQ6.mjs.map} +1 -1
  27. package/dist/{resolver-BjZwN2JE.d.mts → resolver-BHPsADzE.d.mts} +115 -55
  28. package/dist/{resolver-D5nVrR10.mjs → resolver-tEXpKxmH.mjs} +69 -22
  29. package/dist/resolver-tEXpKxmH.mjs.map +1 -0
  30. package/dist/testing.d.mts +24 -18
  31. package/dist/testing.mjs +72 -24
  32. package/dist/testing.mjs.map +1 -1
  33. package/dist/{vercel-Vc_K_87s.d.mts → vercel-D-E2aqb1.d.mts} +3 -3
  34. package/dist/{vercel-BWz_9Y1v.mjs → vercel-DD89DCqH.mjs} +4 -2
  35. package/dist/{vercel-BWz_9Y1v.mjs.map → vercel-DD89DCqH.mjs.map} +1 -1
  36. package/dist/vercel.d.mts +2 -2
  37. package/dist/vercel.mjs +1 -1
  38. package/dist/{verify-DPB1OfZ5.d.mts → verify-B80xCBh2.d.mts} +457 -29
  39. package/dist/{verify-CeMW6XtK.mjs → verify-Dvc-9Kgp.mjs} +426 -134
  40. package/dist/verify-Dvc-9Kgp.mjs.map +1 -0
  41. package/package.json +4 -2
  42. package/dist/auth-Df9BuC25.mjs.map +0 -1
  43. package/dist/client-DvXfJx_E.mjs.map +0 -1
  44. package/dist/dns-record-Dzo4flM5.mjs.map +0 -1
  45. package/dist/resolver-D5nVrR10.mjs.map +0 -1
  46. package/dist/verify-CeMW6XtK.mjs.map +0 -1
package/dist/effect.d.mts CHANGED
@@ -1,45 +1,55 @@
1
- import { B as domain_name_d_exports, F as dns_record_d_exports, H as Error$3, N as Type, U as invalid_input_d_exports, d as Value, f as secret_d_exports, h as Error$2, l as TokenValidation, u as manifest_d_exports, v as provider_d_exports } from "./manifest-DjH3BVB9.mjs";
2
- import { t as index_d_exports } from "./index-D1KtyjuI.mjs";
3
- import { t as index_d_exports$1 } from "./index-DQAjUrZu.mjs";
4
- import { A as Service$1, B as Connection, C as types_d_exports, D as oauth_state_d_exports, F as connection_d_exports$1, I as Error$4, K as connection_d_exports, L as error_d_exports, P as Service, R as AuthorizationError, V as Grant, g as DnsPlan, j as credential_d_exports, l as resolver_d_exports, p as receipt_d_exports } from "./resolver-BjZwN2JE.mjs";
5
- import { _ as canonical_json_d_exports, d as zones_d_exports, f as selection_d_exports, g as CryptoError, h as oauth_d_exports, i as cloudflare_doh_d_exports, l as plan_d_exports, n as verify_d_exports, o as doh_d_exports, s as AuthorizeError } from "./verify-DPB1OfZ5.mjs";
1
+ import { B as domain_name_d_exports, F as dns_record_d_exports, H as Error$3, N as Type, U as invalid_input_d_exports, d as Value, f as secret_d_exports, h as Error$2, l as TokenValidation, u as manifest_d_exports, v as provider_d_exports } from "./manifest-CP85ePFn.mjs";
2
+ import { t as index_d_exports } from "./index-CS9Rl5LQ.mjs";
3
+ import { t as index_d_exports$1 } from "./index-CEzk2gbZ.mjs";
4
+ import { A as Service$2, B as Error$4, C as types_d_exports, D as oauth_state_d_exports, F as credential_d_exports, H as AuthorizationError, P as Service$1, Q as ProviderAuthorization, R as Service, U as Connection, V as error_d_exports, W as Grant, Y as connection_d_exports, et as authorization_d_exports, g as DnsPlan, j as authorization_d_exports$1, l as resolver_d_exports, p as receipt_d_exports, z as connection_d_exports$1 } from "./resolver-BHPsADzE.mjs";
5
+ import { E as canonical_json_d_exports, T as CryptoError, b as zones_d_exports, g as AuthorizeError, h as deletion_d_exports, i as cloudflare_doh_d_exports, k as connection_lifecycle_d_exports, n as verify_d_exports, o as doh_d_exports, v as plan_d_exports, w as oauth_d_exports, x as selection_d_exports } from "./verify-B80xCBh2.mjs";
6
6
  import { Crypto, Effect } from "effect";
7
7
  declare namespace token_d_exports {
8
8
  export { Error$1 as Error, Input, Requirements$1 as Requirements, connect };
9
9
  }
10
10
  interface Input {
11
11
  readonly grant: Grant;
12
+ readonly ownerId: string;
12
13
  readonly providerId: string;
13
14
  readonly subjectId: string;
14
15
  readonly token: Value;
15
16
  readonly validate: (token: Value) => Effect.Effect<TokenValidation, Error$2 | Error$3>;
16
17
  }
17
18
  declare const connect: (input: Input) => Effect.Effect<{
18
- readonly accountId: string;
19
- readonly capabilities: readonly ("dns:read" | "dns:write")[];
20
- readonly createdAt: Date;
21
- readonly expiresAt: Date | null;
22
- readonly grant: {
23
- readonly _tag: "account";
24
- } | {
25
- readonly _tag: "domains";
26
- readonly domains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
19
+ authorization: {
20
+ readonly accountId: string;
21
+ readonly capabilities: readonly ("dns:read" | "dns:write")[];
22
+ readonly createdAt: Date;
23
+ readonly expiresAt: Date | null;
24
+ readonly id: string;
25
+ readonly kind: "oauth2" | "token";
26
+ readonly providerId: string;
27
+ readonly scopes: readonly string[];
28
+ readonly subjectId: string;
27
29
  };
28
- readonly id: string;
29
- readonly kind: "oauth2" | "token";
30
- readonly providerId: string;
31
- readonly scopes: readonly string[];
32
- readonly subjectId: string;
33
- }, CryptoError | Error$3 | Error$2 | Error$4, Crypto.Crypto | Service | Service$1>;
30
+ connection: {
31
+ readonly authorizationId: string;
32
+ readonly createdAt: Date;
33
+ readonly grant: {
34
+ readonly _tag: "account";
35
+ } | {
36
+ readonly _tag: "domains";
37
+ readonly domains: readonly (string & import("effect/Brand").Brand<"DomainName">)[];
38
+ };
39
+ readonly id: string;
40
+ readonly ownerId: string;
41
+ };
42
+ }, CryptoError | Error$3 | Error$2 | Error$4, Crypto.Crypto | Service | Service$1 | Service$2>;
34
43
  type Error$1 = Error$2 | Error$3 | CryptoError | Error$4;
35
- type Requirements$1 = Service | Service$1 | Crypto.Crypto;
44
+ type Requirements$1 = Service$2 | Service | Service$1 | Crypto.Crypto;
36
45
  declare namespace connection_authorization_d_exports {
37
46
  export { Error, Requirements, authorize };
38
47
  }
39
48
  declare const authorize: (input: {
40
- readonly accountId: string;
41
49
  readonly allowPartial?: boolean;
50
+ readonly authorization: ProviderAuthorization;
42
51
  readonly connection: Connection;
52
+ readonly domain: string;
43
53
  readonly operationIds?: ReadonlyArray<string>;
44
54
  readonly plan: DnsPlan;
45
55
  }) => Effect.Effect<{
@@ -59,5 +69,5 @@ declare function parse(type: Type, input: unknown): string;
59
69
  /** The current package version from the package manifest. */
60
70
  declare const VERSION: string;
61
71
  //#endregion
62
- export { index_d_exports as Cloudflare, cloudflare_doh_d_exports as CloudflareDnsOverHttps, connection_d_exports as Connection, connection_authorization_d_exports as ConnectionAuthorization, connection_d_exports$1 as ConnectionStore, credential_d_exports as CredentialStore, canonical_json_d_exports as Digest, dns_data_d_exports as DnsData, doh_d_exports as DnsOverHttps, types_d_exports as DnsPlan, provider_d_exports as DnsProvider, dns_record_d_exports as DnsRecord, resolver_d_exports as DnsResolver, domain_name_d_exports as DomainName, invalid_input_d_exports as InvalidInput, oauth_d_exports as OAuth, oauth_state_d_exports as OAuthStateStore, manifest_d_exports as ProviderAuth, selection_d_exports as ProviderDiscovery, plan_d_exports as Provisioning, receipt_d_exports as ReceiptStore, secret_d_exports as Secret, error_d_exports as Storage, token_d_exports as TokenConnection, VERSION, index_d_exports$1 as Vercel, verify_d_exports as Verification, zones_d_exports as Zones };
72
+ export { index_d_exports as Cloudflare, cloudflare_doh_d_exports as CloudflareDnsOverHttps, connection_d_exports as Connection, connection_authorization_d_exports as ConnectionAuthorization, connection_lifecycle_d_exports as ConnectionLifecycle, connection_d_exports$1 as ConnectionStore, credential_d_exports as CredentialStore, deletion_d_exports as Deletion, canonical_json_d_exports as Digest, dns_data_d_exports as DnsData, doh_d_exports as DnsOverHttps, types_d_exports as DnsPlan, provider_d_exports as DnsProvider, dns_record_d_exports as DnsRecord, resolver_d_exports as DnsResolver, domain_name_d_exports as DomainName, invalid_input_d_exports as InvalidInput, oauth_d_exports as OAuth, oauth_state_d_exports as OAuthStateStore, manifest_d_exports as ProviderAuth, authorization_d_exports as ProviderAuthorization, authorization_d_exports$1 as ProviderAuthorizationStore, selection_d_exports as ProviderDiscovery, plan_d_exports as Provisioning, receipt_d_exports as ReceiptStore, secret_d_exports as Secret, error_d_exports as Storage, token_d_exports as TokenConnection, VERSION, index_d_exports$1 as Vercel, verify_d_exports as Verification, zones_d_exports as Zones };
63
73
  //# sourceMappingURL=effect.d.mts.map
package/dist/effect.mjs CHANGED
@@ -1,10 +1,10 @@
1
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-Dzo4flM5.mjs";
3
- import { o as client_exports, s as make, t as auth_exports } from "./auth-Df9BuC25.mjs";
4
- import { C as types_exports, D as token_exports, L as canonical_json_exports, P as oauth_exports, T as zones_exports, W as connection_exports, a as doh_exports, j as manifest_exports, l as connection_authorization_exports, n as verify_exports, p as plan_exports, q as version, r as cloudflare_doh_exports, s as dns_data_exports, w as selection_exports } from "./verify-CeMW6XtK.mjs";
5
- import { c as oauth_state_exports, d as credential_exports, h as connection_exports$1, i as resolver_exports, v as error_exports } from "./resolver-D5nVrR10.mjs";
6
- import { l as secret_exports, n as make$1, r as auth_exports$1, t as client_exports$1 } from "./client-DvXfJx_E.mjs";
7
- import { n as receipt_exports } from "./receipt-C7PjnibZ.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
8
  //#region src/providers/cloudflare/index.ts
9
9
  var cloudflare_exports = /* @__PURE__ */ __exportAll({
10
10
  Auth: () => auth_exports,
@@ -23,6 +23,6 @@ var vercel_exports = /* @__PURE__ */ __exportAll({
23
23
  /** The current package version from the package manifest. */
24
24
  const VERSION = version;
25
25
  //#endregion
26
- export { cloudflare_exports as Cloudflare, cloudflare_doh_exports as CloudflareDnsOverHttps, connection_exports as Connection, connection_authorization_exports as ConnectionAuthorization, connection_exports$1 as ConnectionStore, credential_exports as CredentialStore, 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, 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 };
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
27
 
28
28
  //# sourceMappingURL=effect.mjs.map
@@ -1 +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 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 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 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"}
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"}
@@ -1,4 +1,4 @@
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-DjH3BVB9.mjs";
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
2
  import { Effect } from "effect";
3
3
  declare namespace client_d_exports {
4
4
  export { Account, AccountContext, Fetch, Interface, ListZonesInput, Options, Zone, make };
@@ -91,4 +91,4 @@ declare namespace index_d_exports {
91
91
  }
92
92
  //#endregion
93
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-DQAjUrZu.d.mts.map
94
+ //# sourceMappingURL=index-CEzk2gbZ.d.mts.map
@@ -1,4 +1,4 @@
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-DjH3BVB9.mjs";
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
2
  import { Effect, Schema } from "effect";
3
3
  //#region src/providers/cloudflare/protocol.d.ts
4
4
  declare const Account$1: Schema.Struct<{
@@ -68,4 +68,4 @@ declare namespace index_d_exports {
68
68
  }
69
69
  //#endregion
70
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-D1KtyjuI.d.mts.map
71
+ //# sourceMappingURL=index-CS9Rl5LQ.d.mts.map
package/dist/index.d.mts CHANGED
@@ -1,12 +1,31 @@
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-DjH3BVB9.mjs";
2
- import { n as cloudflare_d_exports } from "./cloudflare-DClWuAm8.mjs";
3
- import { B as Connection, G as assertGrant, H as OAuthContinuation, M as AsyncInterface$3, O as AsyncInterface$4, R as AuthorizationError, S as encodeReceipt, U as Schema$3, V as Grant, W as StoredCredential, _ as Operation, b as Schema$4, g as DnsPlan, h as Authorization, m as ApplyReceipt, n as AsyncInterface$1, o as Query, q as encode, r as AsyncResolution, t as Answer, u as AsyncInterface$5, v as PlanAuthorization, w as AsyncInterface$2, x as encode$1, y as Receipt, z as Capability } from "./resolver-BjZwN2JE.mjs";
4
- import { a as Options$3, c as CreateInput$1, d as zones_d_exports, f as selection_d_exports, m as Fetch$1, p as BeginInput$1, r as Options$2, t as Result, u as renderManualInstructions$1 } from "./verify-DPB1OfZ5.mjs";
5
- import { r as vercel_d_exports } from "./vercel-Vc_K_87s.mjs";
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
6
  declare namespace connection_d_exports {
7
- export { AuthorizationError, Capability, Connection, Grant, OAuthContinuation, Schema$3 as Schema, StoredCredential, assertGrant, decode$2 as decode, encode };
7
+ export { AuthorizationError, Connection, Grant, OAuthContinuation, Schema$3 as Schema, StoredCredential, assertGrant, decode$3 as decode, encode };
8
8
  }
9
- declare function decode$2(input: unknown): Promise<Connection>;
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>;
10
29
  declare namespace provider_auth_d_exports {
11
30
  export { Manifest, Method, OAuthClientConfiguration, OAuthMethod, AsyncOAuthSubjectResolver as OAuthSubjectResolver, Schema, TokenValidation, decode$1 as decode };
12
31
  }
@@ -18,21 +37,37 @@ declare namespace domain_name_d_exports {
18
37
  export { DomainName, Schema$2 as Schema, parse$1 as parse };
19
38
  }
20
39
  declare namespace dns_plan_d_exports {
21
- export { ApplyReceipt, Authorization, DnsPlan, Operation, PlanAuthorization, Receipt, Schema$4 as Schema, decode, decodeReceipt, encode$1 as encode, encodeReceipt };
40
+ export { ApplyReceipt, Authorization, DnsPlan, Operation, PlanAuthorization, Receipt, Schema$5 as Schema, decode, decodeReceipt, encode$2 as encode, encodeReceipt };
22
41
  }
23
42
  declare function decode(input: unknown): Promise<DnsPlan>;
24
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>;
25
60
  declare namespace dns_provider_d_exports {
26
61
  export { CreateResult, AsyncInterface as Interface };
27
62
  }
28
63
  declare namespace dns_resolver_d_exports {
29
- export { Answer, AsyncInterface$1 as Interface, Query, AsyncResolution as Resolution };
64
+ export { Answer, AsyncInterface$4 as Interface, Query, AsyncResolution as Resolution };
30
65
  }
31
66
  declare namespace oauth_d_exports {
32
67
  export { BeginInput, Fetch, begin, complete, refresh, revoke };
33
68
  }
34
69
  interface BeginInput extends BeginInput$1 {
35
- readonly stateStore: AsyncInterface$2;
70
+ readonly stateStore: AsyncInterface$5;
36
71
  }
37
72
  declare function begin(input: BeginInput): Promise<{
38
73
  readonly authorizationUrl: URL;
@@ -40,24 +75,28 @@ declare function begin(input: BeginInput): Promise<{
40
75
  declare function complete(input: {
41
76
  readonly callbackUrl: URL;
42
77
  readonly client: OAuthClientConfiguration;
43
- readonly connectionStore: AsyncInterface$3;
44
- readonly credentialStore: AsyncInterface$4;
78
+ readonly connectionStore: AsyncInterface$1;
79
+ readonly credentialStore: AsyncInterface$3;
80
+ readonly authorizationStore: AsyncInterface$2;
45
81
  readonly fetch?: Fetch$1;
46
82
  readonly providerId: string;
47
83
  readonly resolveSubject: AsyncOAuthSubjectResolver;
48
- readonly stateStore: AsyncInterface$2;
49
- }): Promise<Connection>;
84
+ readonly stateStore: AsyncInterface$5;
85
+ }): Promise<{
86
+ readonly authorization: ProviderAuthorization;
87
+ readonly connection: Connection;
88
+ }>;
50
89
  declare function refresh(input: {
90
+ readonly authorization: ProviderAuthorization;
51
91
  readonly client: OAuthClientConfiguration;
52
- readonly connection: Connection;
53
- readonly credentialStore: AsyncInterface$4;
92
+ readonly credentialStore: AsyncInterface$3;
54
93
  readonly fetch?: Fetch$1;
55
94
  readonly method: OAuthMethod;
56
95
  }): Promise<void>;
57
96
  declare function revoke(input: {
97
+ readonly authorization: ProviderAuthorization;
58
98
  readonly client: OAuthClientConfiguration;
59
- readonly connection: Connection;
60
- readonly credentialStore: AsyncInterface$4;
99
+ readonly credentialStore: AsyncInterface$3;
61
100
  readonly fetch?: Fetch$1;
62
101
  readonly method: OAuthMethod;
63
102
  }): Promise<void>;
@@ -78,51 +117,57 @@ declare function apply(input: {
78
117
  readonly provider: AsyncInterface;
79
118
  }): Promise<ApplyReceipt>;
80
119
  declare function authorizeForConnection(input: {
81
- readonly accountId: string;
82
120
  readonly allowPartial?: boolean;
121
+ readonly authorization: ProviderAuthorization;
83
122
  readonly connection: Connection;
123
+ readonly domain: string;
84
124
  readonly operationIds?: ReadonlyArray<string>;
85
125
  readonly plan: DnsPlan;
86
126
  }): Promise<PlanAuthorization>;
87
127
  declare const renderManualInstructions: typeof renderManualInstructions$1;
88
128
  declare namespace stores_d_exports {
89
- export { AsyncInterface$3 as Connection, AsyncInterface$4 as Credential, AsyncInterface$2 as OAuthState, AsyncInterface$5 as Receipt };
129
+ export { AsyncInterface$1 as Connection, AsyncInterface$3 as Credential, AsyncInterface$5 as OAuthState, AsyncInterface$2 as ProviderAuthorization, AsyncInterface$6 as Receipt };
90
130
  }
91
131
  declare namespace token_d_exports {
92
132
  export { connect };
93
133
  }
94
134
  declare function connect(input: {
95
- readonly connectionStore: AsyncInterface$3;
96
- readonly credentialStore: AsyncInterface$4;
135
+ readonly connectionStore: AsyncInterface$1;
136
+ readonly credentialStore: AsyncInterface$3;
137
+ readonly authorizationStore: AsyncInterface$2;
97
138
  readonly grant: Grant;
139
+ readonly ownerId: string;
98
140
  readonly providerId: string;
99
141
  readonly subjectId: string;
100
142
  readonly token: Value;
101
143
  readonly validate: (token: Value) => Promise<TokenValidation>;
102
- }): Promise<Connection>;
144
+ }): Promise<{
145
+ readonly authorization: ProviderAuthorization;
146
+ readonly connection: Connection;
147
+ }>;
103
148
  declare namespace verification_d_exports {
104
149
  export { record };
105
150
  }
106
151
  declare function record(input: {
107
152
  readonly provider: AsyncInterface;
108
153
  readonly record: DnsRecord;
109
- readonly resolver: AsyncInterface$1;
154
+ readonly resolver: AsyncInterface$4;
110
155
  readonly zone: DomainName;
111
156
  }): Promise<Result>;
112
157
  declare namespace cloudflare_doh_d_exports {
113
158
  export { Options$1 as Options, make$1 as make };
114
159
  }
115
160
  type Options$1 = Options$2;
116
- declare function make$1(options?: Options$1): AsyncInterface$1;
161
+ declare function make$1(options?: Options$1): AsyncInterface$4;
117
162
  declare namespace doh_d_exports {
118
163
  export { Options, make };
119
164
  }
120
165
  type Options = Options$3;
121
- declare function make(options: Options): AsyncInterface$1;
166
+ declare function make(options: Options): AsyncInterface$4;
122
167
  //#endregion
123
168
  //#region src/index.d.ts
124
169
  /** The current package version from the package manifest. */
125
170
  declare const VERSION: string;
126
171
  //#endregion
127
- export { cloudflare_d_exports as Cloudflare, cloudflare_doh_d_exports as CloudflareDnsOverHttps, connection_d_exports as Connection, 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, 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 };
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 };
128
173
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,33 +1,65 @@
1
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-Dzo4flM5.mjs";
3
- import { t as cloudflare_exports } from "./cloudflare-C_ixZsJo.mjs";
4
- import { A as decode$4, B as Capability, E as connect$1, F as refresh$1, G as decode$3, H as Schema$3, I as revoke$1, K as encode, M as begin$1, N as complete$1, O as Method, R as webCryptoLayer, S as encodeReceipt, T as zones_exports, U as assertGrant, V as Grant, _ as Receipt, b as decodeReceipt$1, c as authorize$2, d as authorize$1, f as create$1, g as Operation, h as Authorization, i as toAsync, k as Schema$4, m as renderManualInstructions$1, o as toAsync$1, q as version, t as record$1, u as apply$1, v as Schema$5, w as selection_exports, x as encode$1, y as decode$5, z as AuthorizationError } from "./verify-CeMW6XtK.mjs";
5
- import { f as layerFromAsync$3, g as layerFromAsync$2, r as layerFromAsync$4, s as layerFromAsync$1 } from "./resolver-D5nVrR10.mjs";
6
- import { l as secret_exports } from "./client-DvXfJx_E.mjs";
7
- import { n as vercel_exports } from "./vercel-BWz_9Y1v.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
8
  import { Effect, Layer } from "effect";
9
9
  //#region src/promise/connection.ts
10
10
  var connection_exports = /* @__PURE__ */ __exportAll({
11
11
  AuthorizationError: () => AuthorizationError,
12
- Capability: () => Capability,
13
12
  Grant: () => Grant,
14
13
  Schema: () => Schema$3,
15
14
  assertGrant: () => assertGrant,
16
- decode: () => decode$2,
15
+ decode: () => decode$3,
17
16
  encode: () => encode
18
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
+ });
19
51
  function decode$2(input) {
20
- return Effect.runPromise(decode$3(input));
52
+ return Effect.runPromise(decode$5(input));
21
53
  }
22
54
  //#endregion
23
55
  //#region src/promise/provider-auth.ts
24
56
  var provider_auth_exports = /* @__PURE__ */ __exportAll({
25
57
  Method: () => Method,
26
- Schema: () => Schema$4,
58
+ Schema: () => Schema$5,
27
59
  decode: () => decode$1
28
60
  });
29
61
  function decode$1(input) {
30
- return Effect.runPromise(decode$4(input));
62
+ return Effect.runPromise(decode$6(input));
31
63
  }
32
64
  //#endregion
33
65
  //#region src/promise/dns-record.ts
@@ -61,19 +93,49 @@ var dns_plan_exports = /* @__PURE__ */ __exportAll({
61
93
  Authorization: () => Authorization,
62
94
  Operation: () => Operation,
63
95
  Receipt: () => Receipt,
64
- Schema: () => Schema$5,
96
+ Schema: () => Schema$6,
65
97
  decode: () => decode,
66
98
  decodeReceipt: () => decodeReceipt,
67
- encode: () => encode$1,
99
+ encode: () => encode$2,
68
100
  encodeReceipt: () => encodeReceipt
69
101
  });
70
102
  function decode(input) {
71
- return Effect.runPromise(decode$5(input));
103
+ return Effect.runPromise(decode$7(input));
72
104
  }
73
105
  function decodeReceipt(input) {
74
106
  return Effect.runPromise(decodeReceipt$1(input));
75
107
  }
76
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
77
139
  //#region src/promise/oauth.ts
78
140
  var oauth_exports = /* @__PURE__ */ __exportAll({
79
141
  begin: () => begin,
@@ -83,7 +145,7 @@ var oauth_exports = /* @__PURE__ */ __exportAll({
83
145
  });
84
146
  function begin(input) {
85
147
  const { stateStore, ...programInput } = input;
86
- return Effect.runPromise(begin$1(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync$1(stateStore), webCryptoLayer))));
148
+ return Effect.runPromise(begin$1(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync$4(stateStore), webCryptoLayer))));
87
149
  }
88
150
  function complete(input) {
89
151
  return Effect.runPromise(complete$1({
@@ -95,12 +157,12 @@ function complete(input) {
95
157
  try: () => input.resolveSubject(tokens, accessToken),
96
158
  catch: (cause) => providerFailure(input.providerId, "resolveSubject", cause)
97
159
  })
98
- }).pipe(Effect.provide(Layer.mergeAll(layerFromAsync$1(input.stateStore), layerFromAsync$2(input.connectionStore), layerFromAsync$3(input.credentialStore), webCryptoLayer))));
160
+ }).pipe(Effect.provide(Layer.mergeAll(layerFromAsync$4(input.stateStore), layerFromAsync$2(input.authorizationStore), layerFromAsync$1(input.connectionStore), layerFromAsync$3(input.credentialStore), webCryptoLayer))));
99
161
  }
100
162
  function refresh(input) {
101
163
  return Effect.runPromise(refresh$1({
102
164
  client: input.client,
103
- connection: input.connection,
165
+ authorization: input.authorization,
104
166
  ...input.fetch === void 0 ? {} : { fetch: input.fetch },
105
167
  method: input.method
106
168
  }).pipe(Effect.provide(layerFromAsync$3(input.credentialStore))));
@@ -108,7 +170,7 @@ function refresh(input) {
108
170
  function revoke(input) {
109
171
  return Effect.runPromise(revoke$1({
110
172
  client: input.client,
111
- connection: input.connection,
173
+ authorization: input.authorization,
112
174
  ...input.fetch === void 0 ? {} : { fetch: input.fetch },
113
175
  method: input.method
114
176
  }).pipe(Effect.provide(layerFromAsync$3(input.credentialStore))));
@@ -132,19 +194,19 @@ var provisioning_exports = /* @__PURE__ */ __exportAll({
132
194
  });
133
195
  function create(input) {
134
196
  const { provider, ...programInput } = input;
135
- return Effect.runPromise(create$1(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync(provider), webCryptoLayer))));
197
+ return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync(provider), webCryptoLayer))));
136
198
  }
137
199
  function authorize(plan, operationIds, options = {}) {
138
- return Effect.runPromise(authorize$1(plan, operationIds, options).pipe(Effect.provide(webCryptoLayer)));
200
+ return Effect.runPromise(authorize$3(plan, operationIds, options).pipe(Effect.provide(webCryptoLayer)));
139
201
  }
140
202
  function apply(input) {
141
- return Effect.runPromise(apply$1({
203
+ return Effect.runPromise(apply$3({
142
204
  authorization: input.authorization,
143
205
  plan: input.plan
144
206
  }).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
145
207
  }
146
208
  function authorizeForConnection(input) {
147
- return Effect.runPromise(authorize$2(input).pipe(Effect.provide(webCryptoLayer)));
209
+ return Effect.runPromise(authorize$4(input).pipe(Effect.provide(webCryptoLayer)));
148
210
  }
149
211
  const renderManualInstructions = renderManualInstructions$1;
150
212
  //#endregion
@@ -153,6 +215,7 @@ var token_exports = /* @__PURE__ */ __exportAll({ connect: () => connect });
153
215
  function connect(input) {
154
216
  return Effect.runPromise(connect$1({
155
217
  grant: input.grant,
218
+ ownerId: input.ownerId,
156
219
  providerId: input.providerId,
157
220
  subjectId: input.subjectId,
158
221
  token: input.token,
@@ -165,7 +228,7 @@ function connect(input) {
165
228
  providerId: input.providerId
166
229
  })
167
230
  })
168
- }).pipe(Effect.provide(Layer.mergeAll(layerFromAsync$2(input.connectionStore), layerFromAsync$3(input.credentialStore), webCryptoLayer))));
231
+ }).pipe(Effect.provide(Layer.mergeAll(layerFromAsync$1(input.connectionStore), layerFromAsync$2(input.authorizationStore), layerFromAsync$3(input.credentialStore), webCryptoLayer))));
169
232
  }
170
233
  //#endregion
171
234
  //#region src/promise/verification.ts
@@ -174,7 +237,7 @@ function record(input) {
174
237
  return Effect.runPromise(record$1({
175
238
  record: input.record,
176
239
  zone: input.zone
177
- }).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), layerFromAsync$4(input.resolver)))));
240
+ }).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), layerFromAsync$5(input.resolver)))));
178
241
  }
179
242
  //#endregion
180
243
  //#region src/promise/cloudflare-doh.ts
@@ -193,6 +256,6 @@ function make(options) {
193
256
  /** The current package version from the package manifest. */
194
257
  const VERSION = version;
195
258
  //#endregion
196
- export { cloudflare_exports as Cloudflare, cloudflare_doh_exports as CloudflareDnsOverHttps, connection_exports as Connection, 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, 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 };
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 };
197
260
 
198
261
  //# sourceMappingURL=index.mjs.map