@xylex-group/athena 2.14.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -1398
- package/dist/admin.d.cts +1 -1
- package/dist/admin.d.ts +1 -1
- package/dist/billing.cjs +1199 -0
- package/dist/billing.cjs.map +1 -0
- package/dist/billing.d.cts +230 -0
- package/dist/billing.d.ts +230 -0
- package/dist/billing.js +1194 -0
- package/dist/billing.js.map +1 -0
- package/dist/browser.cjs +8892 -8533
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +11 -10
- package/dist/browser.d.ts +11 -10
- package/dist/browser.js +8889 -8531
- package/dist/browser.js.map +1 -1
- package/dist/cli/index.cjs +8294 -7528
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +4 -4
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.js +8294 -7528
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +8869 -8504
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -10
- package/dist/index.d.ts +11 -10
- package/dist/index.js +8862 -8502
- package/dist/index.js.map +1 -1
- package/dist/{model-form-BE1_Bmdd.d.cts → model-form-BEfCGB5b.d.cts} +2 -2
- package/dist/{model-form-DcH3R7WD.d.ts → model-form-BKetpu6Q.d.ts} +2 -2
- package/dist/module-8dSMcy0K.d.cts +326 -0
- package/dist/module-8dSMcy0K.d.ts +326 -0
- package/dist/{module-Ca3_OQqR.d.ts → module-Bef_MAPO.d.ts} +6 -52
- package/dist/{module-DFGZXCtt.d.cts → module-CrrSmpML.d.cts} +6 -52
- package/dist/next/client.cjs +2 -9168
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.d.cts +1 -27
- package/dist/next/client.d.ts +1 -27
- package/dist/next/client.js +3 -9168
- package/dist/next/client.js.map +1 -1
- package/dist/next/server.cjs +79 -9279
- package/dist/next/server.cjs.map +1 -1
- package/dist/next/server.d.cts +30 -46
- package/dist/next/server.d.ts +30 -46
- package/dist/next/server.js +79 -9279
- package/dist/next/server.js.map +1 -1
- package/dist/{payload-BbSCmILD.d.ts → payload-DWI1rw-e.d.cts} +1 -35
- package/dist/{payload-zXIwKTQf.d.cts → payload-DWI1rw-e.d.ts} +1 -35
- package/dist/{pipeline-DqwehoQV.d.ts → pipeline-BXFQbsUW.d.ts} +1 -1
- package/dist/{pipeline-CwQoD5G9.d.cts → pipeline-Dfsed4VD.d.cts} +1 -1
- package/dist/react.cjs +114 -13
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +46 -16
- package/dist/react.d.ts +46 -16
- package/dist/react.js +113 -14
- package/dist/react.js.map +1 -1
- package/dist/social-providers.cjs +9 -9
- package/dist/social-providers.cjs.map +1 -1
- package/dist/social-providers.d.cts +79 -82
- package/dist/social-providers.d.ts +79 -82
- package/dist/social-providers.js +9 -9
- package/dist/social-providers.js.map +1 -1
- package/dist/{types-eAKAh71s.d.cts → types-AOY-GLu8.d.cts} +27 -54
- package/dist/{types-eAKAh71s.d.ts → types-AOY-GLu8.d.ts} +27 -54
- package/dist/{types-YQUR7wu0.d.cts → types-Bltx6iL6.d.cts} +3 -5
- package/dist/{types-YQUR7wu0.d.ts → types-Bltx6iL6.d.ts} +3 -5
- package/dist/{types-C1swabT5.d.ts → types-CK7cBQbC.d.ts} +2 -2
- package/dist/{types-dHnjluBC.d.cts → types-Z3-rsiM3.d.cts} +2 -2
- package/dist/{types-CD6K05JQ.d.ts → types-jClgDy1J.d.ts} +2 -2
- package/dist/{types-6H575ITc.d.cts → types-kO_Ut5wU.d.cts} +2 -2
- package/dist/utils.cjs +7 -8
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -5
- package/dist/utils.d.ts +2 -5
- package/dist/utils.js +7 -8
- package/dist/utils.js.map +1 -1
- package/dist/{client-uthENhaf.d.ts → v3-client-CuCNy-JJ.d.ts} +380 -515
- package/dist/{client-wU2J9yqb.d.cts → v3-client-G8JMOilK.d.cts} +380 -515
- package/package.json +10 -1
package/dist/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EnvLike } from './athena-auth-url-oLux_57a.js';
|
|
2
2
|
export { A as ATHENA_AUTH_COOKIE_PREFIXES, o as ATHENA_AUTH_DISABLE_COOKIE_CACHE_QUERY_PARAM, p as ATHENA_AUTH_DISABLE_COOKIE_CACHE_QUERY_VALUE, q as ATHENA_AUTH_GET_SESSION_ABSOLUTE_PATH, t as ATHENA_AUTH_GET_SESSION_PATH, a as ATHENA_AUTH_PATH, b as ATHENA_AUTH_UPSTREAM_ENV_KEYS, c as ATHENA_AUTH_UPSTREAM_URL_ENV_NAMES, u as ATHENA_AUTH_VERIFY_EMAIL_PATH, v as ATHENA_SESSION_DATA_HEADER, w as AUTHENTICATED_REDIRECT_MODE_SET, x as AUTHENTICATED_REDIRECT_VIEW_SET, d as AUTH_DEFAULT_VIEW, y as AUTH_MODE_REDIRECTS, z as AUTH_MODE_SET, e as AUTH_ROUTES, B as AUTH_SESSION_PATH, F as AUTH_TWO_FACTOR_SEGMENT, f as AUTH_VIEW_BY_SEGMENT, G as AthenaAuthClientBaseUrlOptions, H as AthenaAuthUpstreamEnv, I as AthenaAuthUpstreamEnvKey, J as AuthMode, K as AuthModeRedirects, L as AuthRoutes, g as AuthView, C as ClearAuthCookiesOptions, D as DEFAULT_ATHENA_AUTH_ORIGIN, M as DEFAULT_ATHENA_AUTH_UPSTREAM_URL, N as DEFAULT_AUTH_COOKIE_PREFIXES, O as DISABLE_COOKIE_CACHE_QUERY_PARAM, P as DISABLE_COOKIE_CACHE_QUERY_VALUE, Q as LOCAL_DEV_ORIGIN, S as SESSION_DATA_HEADER, h as clearAuthCookies, R as createAuthModeRedirects, T as createAuthRoutes, U as createFreshSessionLookupUrl, i as isAbsoluteUrl, V as isAuthMode, n as normalizeAthenaAuthBaseUrl, W as readAthenaAuthUpstreamUrlFromEnv, r as resolveAthenaAuthClientBaseUrl, j as resolveAthenaAuthRequestUrl, k as resolveAthenaAuthUpstreamUrl, X as resolveAuthModeRedirect, l as resolveAuthViewFromSegment, m as resolveEmailVerificationCallbackUrl, Y as shouldRedirectAuthenticatedAuthMode, s as shouldRedirectAuthenticatedAuthView } from './athena-auth-url-oLux_57a.js';
|
|
3
3
|
export { S as SESSION_COOKIE_PATTERNS, h as hasAuthSessionCookie } from './session-cookie-detection-BqOp9mO6.js';
|
|
4
|
-
import {
|
|
4
|
+
import { t as BackendOption } from './types-Bltx6iL6.js';
|
|
5
5
|
|
|
6
6
|
declare function slugify(input: string): string;
|
|
7
7
|
|
|
@@ -90,8 +90,6 @@ interface BuildAthenaRequestHeadersInput {
|
|
|
90
90
|
profile: AthenaRequestHeaderProfile;
|
|
91
91
|
sdkHeaderValue: string;
|
|
92
92
|
apiKey?: string | null;
|
|
93
|
-
/** Overrides the canonical `X-Athena-Key` header value. */
|
|
94
|
-
athenaKey?: string | null;
|
|
95
93
|
client?: string | null;
|
|
96
94
|
userId?: string | null;
|
|
97
95
|
organizationId?: string | null;
|
|
@@ -112,7 +110,6 @@ interface BuildAthenaRequestHeadersInput {
|
|
|
112
110
|
/** Shared config/call fields consumed by gateway, chat, auth, and `client.request(...)`. */
|
|
113
111
|
interface AthenaRequestHeaderOverrideFields {
|
|
114
112
|
apiKey?: string | null;
|
|
115
|
-
athenaKey?: string | null;
|
|
116
113
|
client?: string | null;
|
|
117
114
|
userId?: string | null;
|
|
118
115
|
organizationId?: string | null;
|
|
@@ -135,7 +132,7 @@ declare function buildServiceRequestHeaders(profile: Exclude<AthenaRequestHeader
|
|
|
135
132
|
client?: string | null;
|
|
136
133
|
stripNulls?: boolean;
|
|
137
134
|
}): Record<string, string>;
|
|
138
|
-
declare function applyAthenaApiKeyHeaders(headers: Record<string, string>, apiKey?: string | null
|
|
135
|
+
declare function applyAthenaApiKeyHeaders(headers: Record<string, string>, apiKey?: string | null): void;
|
|
139
136
|
declare function applyAthenaAuthContextHeaders(headers: Record<string, string>, input: Pick<BuildAthenaRequestHeadersInput, 'bearerToken' | 'cookie' | 'sessionToken' | 'profile' | 'configHeaders' | 'callHeaders'>): void;
|
|
140
137
|
declare function applyAthenaPgUriHeaders(headers: Record<string, string>, input: Pick<BuildAthenaRequestHeadersInput, 'pgUri' | 'jdbcUrl' | 'configHeaders' | 'callHeaders'>): void;
|
|
141
138
|
/**
|
package/dist/utils.js
CHANGED
|
@@ -626,7 +626,7 @@ var PROFILE_RULES = {
|
|
|
626
626
|
gateway: { apiKeys: true, routing: true, authMirror: true, authBearer: false, contentType: true, stripNullsDefault: true },
|
|
627
627
|
chat: { apiKeys: true, routing: true, authMirror: true, authBearer: true, accept: true },
|
|
628
628
|
storage: { apiKeys: true, routing: true, authMirror: true, authBearer: false, contentType: true },
|
|
629
|
-
auth: { apiKeys: true, routing:
|
|
629
|
+
auth: { apiKeys: true, routing: true, authMirror: false, authBearer: true, contentType: true },
|
|
630
630
|
minimal: { apiKeys: false, routing: false, authMirror: false, authBearer: false }
|
|
631
631
|
};
|
|
632
632
|
function normalizeHeaderValue(value) {
|
|
@@ -686,7 +686,6 @@ function resolveBackendType(backend) {
|
|
|
686
686
|
function resolveRequestHeaderOverrides(config, options, defaults) {
|
|
687
687
|
return {
|
|
688
688
|
apiKey: options?.apiKey ?? config.apiKey,
|
|
689
|
-
athenaKey: options?.athenaKey ?? config.athenaKey,
|
|
690
689
|
client: options?.client ?? config.client ?? defaults?.client,
|
|
691
690
|
userId: options?.userId ?? config.userId,
|
|
692
691
|
organizationId: options?.organizationId ?? config.organizationId,
|
|
@@ -716,10 +715,10 @@ function buildServiceRequestHeaders(profile, sdkHeaderValue, config, options, ex
|
|
|
716
715
|
accept: extras?.accept ?? (rules.accept ? "application/json" : void 0)
|
|
717
716
|
});
|
|
718
717
|
}
|
|
719
|
-
function applyAthenaApiKeyHeaders(headers, apiKey
|
|
720
|
-
const
|
|
721
|
-
if (
|
|
722
|
-
headers["X-Athena-Key"] =
|
|
718
|
+
function applyAthenaApiKeyHeaders(headers, apiKey) {
|
|
719
|
+
const resolvedApiKey = normalizeHeaderValue(apiKey);
|
|
720
|
+
if (resolvedApiKey && !hasHeaderIgnoreCase(headers, "X-Athena-Key")) {
|
|
721
|
+
headers["X-Athena-Key"] = resolvedApiKey;
|
|
723
722
|
}
|
|
724
723
|
}
|
|
725
724
|
function applyAthenaAuthContextHeaders(headers, input) {
|
|
@@ -802,7 +801,7 @@ function buildAthenaRequestHeaders(input) {
|
|
|
802
801
|
const headerClient = resolveHeaderValue(mergedExtraHeaders, CLIENT_HEADER_CANDIDATES);
|
|
803
802
|
const finalClient = normalizeHeaderValue(input.client) ?? headerClient;
|
|
804
803
|
const finalApiKey = normalizeHeaderValue(input.apiKey) ?? resolveHeaderValue(mergedExtraHeaders, API_KEY_HEADER_CANDIDATES);
|
|
805
|
-
const finalAthenaKey =
|
|
804
|
+
const finalAthenaKey = resolveHeaderValue(mergedExtraHeaders, ATHENA_KEY_HEADER_CANDIDATES) ?? finalApiKey;
|
|
806
805
|
const headers = {
|
|
807
806
|
"X-Athena-Sdk": input.sdkHeaderValue
|
|
808
807
|
};
|
|
@@ -836,7 +835,7 @@ function buildAthenaRequestHeaders(input) {
|
|
|
836
835
|
}
|
|
837
836
|
}
|
|
838
837
|
if (rules.apiKeys && (finalApiKey || finalAthenaKey)) {
|
|
839
|
-
applyAthenaApiKeyHeaders(headers,
|
|
838
|
+
applyAthenaApiKeyHeaders(headers, finalAthenaKey);
|
|
840
839
|
}
|
|
841
840
|
applyAthenaAuthContextHeaders(headers, input);
|
|
842
841
|
applyAthenaPgUriHeaders(headers, input);
|