@xylex-group/athena 2.14.0 → 3.0.2
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 +109 -1402
- package/dist/admin.d.cts +1 -1
- package/dist/admin.d.ts +1 -1
- package/dist/{athena-auth-url-oLux_57a.d.cts → athena-request-headers-C7Jy-c_D.d.ts} +85 -1
- package/dist/{athena-auth-url-oLux_57a.d.ts → athena-request-headers-DujFFyMU.d.cts} +85 -1
- package/dist/billing.cjs +1311 -0
- package/dist/billing.cjs.map +1 -0
- package/dist/billing.d.cts +270 -0
- package/dist/billing.d.ts +270 -0
- package/dist/billing.js +1306 -0
- package/dist/billing.js.map +1 -0
- package/dist/browser.cjs +9695 -9243
- 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 +9692 -9241
- package/dist/browser.js.map +1 -1
- package/dist/cli/index.cjs +8137 -7286
- 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 +8137 -7286
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +9718 -9260
- 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 +9711 -9258
- package/dist/index.js.map +1 -1
- package/dist/{model-form-DcH3R7WD.d.ts → model-form-Dh0sisdL.d.ts} +2 -2
- package/dist/{model-form-BE1_Bmdd.d.cts → model-form-oOAJUVd4.d.cts} +2 -2
- package/dist/{module-DFGZXCtt.d.cts → module-CB25egcO.d.cts} +18 -52
- package/dist/module-C_ab-MM1.d.cts +360 -0
- package/dist/module-C_ab-MM1.d.ts +360 -0
- package/dist/{module-Ca3_OQqR.d.ts → module-CkUM6v58.d.ts} +18 -52
- package/dist/next/client.cjs +9116 -8468
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.d.cts +24 -25
- package/dist/next/client.d.ts +24 -25
- package/dist/next/client.js +9088 -8469
- package/dist/next/client.js.map +1 -1
- package/dist/next/server.cjs +8932 -7776
- package/dist/next/server.cjs.map +1 -1
- package/dist/next/server.d.cts +62 -43
- package/dist/next/server.d.ts +62 -43
- package/dist/next/server.js +8873 -7777
- 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-B8aN2EHe.d.ts} +1 -1
- package/dist/{pipeline-CwQoD5G9.d.cts → pipeline-D4W-Cc-A.d.cts} +1 -1
- package/dist/proxy-request-headers-DGxdoyA0.d.cts +59 -0
- package/dist/proxy-request-headers-m4D2Tduy.d.ts +59 -0
- package/dist/react.cjs +118 -17
- 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 +117 -18
- package/dist/react.js.map +1 -1
- package/dist/social-providers.cjs +24 -20
- package/dist/social-providers.cjs.map +1 -1
- package/dist/social-providers.d.cts +96 -139
- package/dist/social-providers.d.ts +96 -139
- package/dist/social-providers.js +24 -20
- 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-CD6K05JQ.d.ts → types-B75PdABb.d.ts} +3 -3
- package/dist/{types-dHnjluBC.d.cts → types-BBm-kEBL.d.cts} +2 -2
- package/dist/{types-C1swabT5.d.ts → types-BaAMXCqK.d.ts} +2 -2
- 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-6H575ITc.d.cts → types-CgCv5o6R.d.cts} +3 -3
- package/dist/utils.cjs +7 -8
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +4 -145
- package/dist/utils.d.ts +4 -145
- package/dist/utils.js +7 -8
- package/dist/utils.js.map +1 -1
- package/dist/{client-wU2J9yqb.d.cts → v3-client-CWfZHcKL.d.cts} +402 -521
- package/dist/{client-uthENhaf.d.ts → v3-client-DZp2NEhK.d.ts} +402 -521
- package/package.json +15 -3
|
@@ -1108,25 +1108,25 @@ interface AthenaAuthOrganizationBindings {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
interface AthenaAuthBindings {
|
|
1110
1110
|
/** Get current session. Route: `GET /get-session`. */
|
|
1111
|
-
getSession:
|
|
1111
|
+
getSession: InternalAthenaAuthModule['getSession'];
|
|
1112
1112
|
/** Get current user as a Better Auth-style compatibility projection. Route: `GET /get-session`. */
|
|
1113
|
-
getUser:
|
|
1113
|
+
getUser: InternalAthenaAuthModule['getUser'];
|
|
1114
1114
|
/** Resolve the current session into a typed guard result. */
|
|
1115
|
-
requireSession:
|
|
1115
|
+
requireSession: InternalAthenaAuthModule['requireSession'];
|
|
1116
1116
|
/** Sign out current session. Route: `POST /sign-out`. */
|
|
1117
|
-
signOut:
|
|
1117
|
+
signOut: InternalAthenaAuthModule['signOut'];
|
|
1118
1118
|
/** Trigger password reset email flow. Route: `POST /forget-password`. */
|
|
1119
|
-
forgetPassword:
|
|
1119
|
+
forgetPassword: InternalAthenaAuthModule['forgetPassword'];
|
|
1120
1120
|
/** Reset password (`POST /reset-password`) and token resolver (`GET /reset-password/{token}`). */
|
|
1121
1121
|
resetPassword: AthenaAuthResetPasswordBinding;
|
|
1122
1122
|
/** Set password for the current authenticated user. Route: `POST /set-password`. */
|
|
1123
1123
|
setPassword: (input: AthenaSetPasswordRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
1124
1124
|
/** Verify email token. Route: `GET /verify-email`. */
|
|
1125
|
-
verifyEmail:
|
|
1125
|
+
verifyEmail: InternalAthenaAuthModule['verifyEmail'];
|
|
1126
1126
|
/** Send verification email. Route: `POST /send-verification-email`. */
|
|
1127
|
-
sendVerificationEmail:
|
|
1127
|
+
sendVerificationEmail: InternalAthenaAuthModule['sendVerificationEmail'];
|
|
1128
1128
|
/** Start change-email flow. Route: `POST /change-email`. */
|
|
1129
|
-
changeEmail:
|
|
1129
|
+
changeEmail: InternalAthenaAuthModule['changeEmail'];
|
|
1130
1130
|
/** Verify pending email change. Route: `GET /change-email/verify`. */
|
|
1131
1131
|
changeEmailVerify: (input: {
|
|
1132
1132
|
query: AthenaAuthTokenQuery;
|
|
@@ -1136,12 +1136,12 @@ interface AthenaAuthBindings {
|
|
|
1136
1136
|
query: AthenaAuthTokenQuery;
|
|
1137
1137
|
} & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthTokenVerificationResponse>>;
|
|
1138
1138
|
/** Change current user password. Route: `POST /change-password`. */
|
|
1139
|
-
changePassword:
|
|
1139
|
+
changePassword: InternalAthenaAuthModule['changePassword'];
|
|
1140
1140
|
user: {
|
|
1141
1141
|
/** Update current user profile fields. Route: `POST /update-user`. */
|
|
1142
|
-
update:
|
|
1142
|
+
update: InternalAthenaAuthModule['updateUser'];
|
|
1143
1143
|
/** Delete current user. Route: `POST /delete-user`. */
|
|
1144
|
-
delete:
|
|
1144
|
+
delete: InternalAthenaAuthModule['deleteUser'];
|
|
1145
1145
|
email: {
|
|
1146
1146
|
/**
|
|
1147
1147
|
* List email identities for current user.
|
|
@@ -1154,30 +1154,30 @@ interface AthenaAuthBindings {
|
|
|
1154
1154
|
};
|
|
1155
1155
|
session: {
|
|
1156
1156
|
/** List user sessions. Route: `GET /list-sessions`. */
|
|
1157
|
-
list:
|
|
1157
|
+
list: InternalAthenaAuthModule['listSessions'];
|
|
1158
1158
|
/** Revoke one or multiple sessions; collapses to `/revoke-session` or `/revoke-sessions` by payload shape. */
|
|
1159
1159
|
revoke: AthenaAuthSessionRevokeBinding;
|
|
1160
1160
|
/** Revoke all other sessions for current user. Route: `POST /revoke-other-sessions`. */
|
|
1161
|
-
revokeOther:
|
|
1161
|
+
revokeOther: InternalAthenaAuthModule['revokeOtherSessions'];
|
|
1162
1162
|
};
|
|
1163
1163
|
social: {
|
|
1164
1164
|
/** Link a social provider to current user. Route: `POST /link-social`. */
|
|
1165
|
-
link:
|
|
1165
|
+
link: InternalAthenaAuthModule['linkSocial'];
|
|
1166
1166
|
};
|
|
1167
1167
|
account: {
|
|
1168
1168
|
/** List linked provider accounts. Route: `GET /list-accounts`. */
|
|
1169
|
-
list:
|
|
1169
|
+
list: InternalAthenaAuthModule['listAccounts'];
|
|
1170
1170
|
/** Unlink a provider account. Route: `POST /unlink-account`. */
|
|
1171
|
-
unlink:
|
|
1171
|
+
unlink: InternalAthenaAuthModule['unlinkAccount'];
|
|
1172
1172
|
};
|
|
1173
1173
|
deleteUser: {
|
|
1174
1174
|
/** Callback endpoint for delete-user verification flows. Route: `GET /delete-user/callback`. */
|
|
1175
|
-
callback:
|
|
1175
|
+
callback: InternalAthenaAuthModule['deleteUserCallback'];
|
|
1176
1176
|
};
|
|
1177
1177
|
/** Refresh provider token. Route: `POST /refresh-token`. */
|
|
1178
|
-
refreshToken:
|
|
1178
|
+
refreshToken: InternalAthenaAuthModule['refreshToken'];
|
|
1179
1179
|
/** Get provider access token. Route: `POST /get-access-token`. */
|
|
1180
|
-
getAccessToken:
|
|
1180
|
+
getAccessToken: InternalAthenaAuthModule['getAccessToken'];
|
|
1181
1181
|
/** Auth health route. Primary `GET /health`; falls back to `GET /ok` on `404`. */
|
|
1182
1182
|
health: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthHealthResponse>>;
|
|
1183
1183
|
/** Health route passthrough. Route: `GET /ok`. */
|
|
@@ -1373,15 +1373,15 @@ interface AthenaAuthBindings {
|
|
|
1373
1373
|
};
|
|
1374
1374
|
signIn: {
|
|
1375
1375
|
/** Sign in with email and password. Route: `POST /sign-in/email`. */
|
|
1376
|
-
email:
|
|
1376
|
+
email: InternalAthenaAuthModule['signIn']['email'];
|
|
1377
1377
|
/** Sign in with username and password. Route: `POST /sign-in/username`. */
|
|
1378
|
-
username:
|
|
1378
|
+
username: InternalAthenaAuthModule['signIn']['username'];
|
|
1379
1379
|
/** Sign in with social provider. Route: `POST /sign-in/social`. */
|
|
1380
|
-
social:
|
|
1380
|
+
social: InternalAthenaAuthModule['signIn']['social'];
|
|
1381
1381
|
};
|
|
1382
1382
|
signUp: {
|
|
1383
1383
|
/** Sign up with email/password identity. Route: `POST /sign-up/email`. */
|
|
1384
|
-
email:
|
|
1384
|
+
email: InternalAthenaAuthModule['signUp']['email'];
|
|
1385
1385
|
};
|
|
1386
1386
|
/** Organization plugin helper surface. Routes: `/organization/*`. */
|
|
1387
1387
|
organization: AthenaAuthOrganizationBindings;
|
|
@@ -1390,16 +1390,8 @@ interface AthenaAuthBindings {
|
|
|
1390
1390
|
provider: (input: AthenaAuthCallbackProviderRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthCallbackProviderResponse>>;
|
|
1391
1391
|
};
|
|
1392
1392
|
}
|
|
1393
|
-
/**
|
|
1394
|
-
|
|
1395
|
-
*
|
|
1396
|
-
* Prefer the short alias {@link AuthClient} when typing React props/hooks
|
|
1397
|
-
* (same role as `AuthClient` from `@better-auth-ui/react`).
|
|
1398
|
-
*
|
|
1399
|
-
* For `createClient(...).auth` only, use {@link AthenaAuthBindings} /
|
|
1400
|
-
* {@link AuthBindings}.
|
|
1401
|
-
*/
|
|
1402
|
-
interface AthenaAuthSdkClient {
|
|
1393
|
+
/** Internal implementation surface used to assemble `createClient().auth`. */
|
|
1394
|
+
interface InternalAthenaAuthModule {
|
|
1403
1395
|
baseUrl: string;
|
|
1404
1396
|
request: <T = unknown>(input: AthenaAuthRequestInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<T>>;
|
|
1405
1397
|
signIn: {
|
|
@@ -1451,26 +1443,7 @@ interface AthenaAuthSdkClient {
|
|
|
1451
1443
|
organization: AthenaAuthOrganizationBindings;
|
|
1452
1444
|
auth: AthenaAuthBindings;
|
|
1453
1445
|
}
|
|
1454
|
-
/**
|
|
1455
|
-
* Auth client instance type — drop-in naming parity with
|
|
1456
|
-
* `import type { AuthClient } from "@better-auth-ui/react"`.
|
|
1457
|
-
*
|
|
1458
|
-
* ```ts
|
|
1459
|
-
* import type { AuthClient } from "@xylex-group/athena/react"
|
|
1460
|
-
* // or
|
|
1461
|
-
* import type { AuthClient } from "@xylex-group/athena"
|
|
1462
|
-
*
|
|
1463
|
-
* const authClient: AuthClient = createAuthClient({ baseUrl: "…" })
|
|
1464
|
-
* // also assignable from createClient(...).auth when only bindings are needed:
|
|
1465
|
-
* // use AuthBindings for that narrower surface
|
|
1466
|
-
* ```
|
|
1467
|
-
*/
|
|
1468
|
-
type AuthClient = AthenaAuthSdkClient;
|
|
1469
|
-
/**
|
|
1470
|
-
* Bindings surface of `createClient(...).auth` (no standalone `baseUrl`/`request`
|
|
1471
|
-
* wrapper). Prefer {@link AuthClient} when you hold a full `createAuthClient()`
|
|
1472
|
-
* instance.
|
|
1473
|
-
*/
|
|
1446
|
+
/** Bindings surface of `createClient(...).auth`. */
|
|
1474
1447
|
type AuthBindings = AthenaAuthBindings;
|
|
1475
1448
|
|
|
1476
|
-
export type { AthenaAuthQueryPrimitive as $, AthenaAdminEmailCreateRequest as A, AthenaAdminEmailUpdateResponse as B, AthenaAuthAdminUserSessionRevokeBinding as C, AthenaAuthBindings as D, AthenaAuthCallOptions as E, AthenaAuthClientConfig as F, AthenaAuthCredentials as G, AthenaAuthEmailChangeResponse as H, AthenaAuthEmailTemplateAttachment as I, AthenaAuthEmailTemplateBuilder as J, AthenaAuthEmailTemplateCreateFromDefinitionInput as K, AthenaAuthEmailTemplateDefinition as L, AthenaAuthEmailTemplateReactOverrides as M, AthenaAuthEmailTemplateUpdateFromDefinitionInput as N, AthenaAuthEmailTemplateVariableBinding as O, AthenaAuthEndpointPath as P, AthenaAuthErrorCode as Q, AthenaAuthErrorDetails as R, AthenaAuthGenericInput as S, AthenaAuthGenericQueryInput as T, AthenaAuthGetUserResponse as U, AthenaAuthLinkedAccount as V, AthenaAuthMethod as W, AthenaAuthOrganization as X, AthenaAuthOrganizationBindings as Y, AthenaAuthOrganizationInvitation as Z, AthenaAuthOrganizationMember as _, AthenaAdminEmailDeleteRequest as a, AthenaAuthQueryValue as a0, AthenaAuthReactEmailComponent as a1, AthenaAuthReactEmailConfig as a2, AthenaAuthReactEmailEventPhase as a3, AthenaAuthReactEmailProps as a4, AthenaAuthReactEmailRenderEvent as a5, AthenaAuthReactEmailRenderInput as a6, AthenaAuthReactEmailRenderOptions as a7, AthenaAuthRequestInput as a8, AthenaAuthResetPasswordBinding as a9,
|
|
1449
|
+
export type { AthenaAuthQueryPrimitive as $, AthenaAdminEmailCreateRequest as A, AthenaAdminEmailUpdateResponse as B, AthenaAuthAdminUserSessionRevokeBinding as C, AthenaAuthBindings as D, AthenaAuthCallOptions as E, AthenaAuthClientConfig as F, AthenaAuthCredentials as G, AthenaAuthEmailChangeResponse as H, AthenaAuthEmailTemplateAttachment as I, AthenaAuthEmailTemplateBuilder as J, AthenaAuthEmailTemplateCreateFromDefinitionInput as K, AthenaAuthEmailTemplateDefinition as L, AthenaAuthEmailTemplateReactOverrides as M, AthenaAuthEmailTemplateUpdateFromDefinitionInput as N, AthenaAuthEmailTemplateVariableBinding as O, AthenaAuthEndpointPath as P, AthenaAuthErrorCode as Q, AthenaAuthErrorDetails as R, AthenaAuthGenericInput as S, AthenaAuthGenericQueryInput as T, AthenaAuthGetUserResponse as U, AthenaAuthLinkedAccount as V, AthenaAuthMethod as W, AthenaAuthOrganization as X, AthenaAuthOrganizationBindings as Y, AthenaAuthOrganizationInvitation as Z, AthenaAuthOrganizationMember as _, AthenaAdminEmailDeleteRequest as a, AthenaAuthQueryValue as a0, AthenaAuthReactEmailComponent as a1, AthenaAuthReactEmailConfig as a2, AthenaAuthReactEmailEventPhase as a3, AthenaAuthReactEmailProps as a4, AthenaAuthReactEmailRenderEvent as a5, AthenaAuthReactEmailRenderInput as a6, AthenaAuthReactEmailRenderOptions as a7, AthenaAuthRequestInput as a8, AthenaAuthResetPasswordBinding as a9, AthenaUsernameSignInRequest as aA, AthenaVerifyEmailRequest as aB, AuthBindings as aC, AthenaAdminHasPermissionRequest as aD, AthenaAuthFetchCompatibleInput as aE, AthenaAdminListUsersFilterOperator as aF, AthenaAdminListUsersQuery as aG, AthenaAdminListUsersSearchOperator as aH, AthenaAuthFilterOperator as aI, AthenaAuthGuardFailure as aJ, AthenaAuthGuardReason as aK, AthenaAuthGuardResult as aL, AthenaAuthGuardSuccess as aM, AthenaAuthSearchOperator as aN, AthenaAuthSocialProviderExtensions as aO, AuthOAuthProvider as aP, AuthSocialProvider as aQ, AuthSocialProviderBuiltin as aR, AthenaAuthResult as aa, AthenaAuthRevokeSessionRequest as ab, AthenaAuthSession as ac, AthenaAuthSessionResponse as ad, AthenaAuthSessionRevokeBinding as ae, AthenaAuthSignInResponse as af, AthenaAuthSignOutResponse as ag, AthenaAuthSocialRedirectResponse as ah, AthenaAuthStatusResponse as ai, AthenaAuthUser as aj, AthenaChangeEmailRequest as ak, AthenaChangePasswordRequest as al, AthenaDeleteUserCallbackRequest as am, AthenaDeleteUserRequest as an, AthenaDeleteUserResponse as ao, AthenaEmailSignInRequest as ap, AthenaEmailSignUpRequest as aq, AthenaForgetPasswordRequest as ar, AthenaLinkSocialRequest as as, AthenaOAuthAccountTokenRequest as at, AthenaOAuthTokenBundle as au, AthenaResetPasswordRequest as av, AthenaSendVerificationEmailRequest as aw, AthenaSocialSignInRequest as ax, AthenaUnlinkAccountRequest as ay, AthenaUpdateUserRequest as az, AthenaAdminEmailEventTypeListResponse as b, AthenaAdminEmailEventTypeRecord as c, AthenaAdminEmailFailureCreateRequest as d, AthenaAdminEmailFailureDeleteRequest as e, AthenaAdminEmailFailureGetQuery as f, AthenaAdminEmailFailureGetResponse as g, AthenaAdminEmailFailureListQuery as h, AthenaAdminEmailFailureListResponse as i, AthenaAdminEmailFailureUpdateRequest as j, AthenaAdminEmailFailureUpdateResponse as k, AthenaAdminEmailGetQuery as l, AthenaAdminEmailGetResponse as m, AthenaAdminEmailListQuery as n, AthenaAdminEmailListResponse as o, AthenaAdminEmailTemplateCreateRequest as p, AthenaAdminEmailTemplateDeleteRequest as q, AthenaAdminEmailTemplateGetQuery as r, AthenaAdminEmailTemplateGetResponse as s, AthenaAdminEmailTemplateListQuery as t, AthenaAdminEmailTemplateListResponse as u, AthenaAdminEmailTemplateRecord as v, AthenaAdminEmailTemplateSendRequest as w, AthenaAdminEmailTemplateSendResponse as x, AthenaAdminEmailTemplateUpdateRequest as y, AthenaAdminEmailUpdateRequest as z };
|
|
@@ -1108,25 +1108,25 @@ interface AthenaAuthOrganizationBindings {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
interface AthenaAuthBindings {
|
|
1110
1110
|
/** Get current session. Route: `GET /get-session`. */
|
|
1111
|
-
getSession:
|
|
1111
|
+
getSession: InternalAthenaAuthModule['getSession'];
|
|
1112
1112
|
/** Get current user as a Better Auth-style compatibility projection. Route: `GET /get-session`. */
|
|
1113
|
-
getUser:
|
|
1113
|
+
getUser: InternalAthenaAuthModule['getUser'];
|
|
1114
1114
|
/** Resolve the current session into a typed guard result. */
|
|
1115
|
-
requireSession:
|
|
1115
|
+
requireSession: InternalAthenaAuthModule['requireSession'];
|
|
1116
1116
|
/** Sign out current session. Route: `POST /sign-out`. */
|
|
1117
|
-
signOut:
|
|
1117
|
+
signOut: InternalAthenaAuthModule['signOut'];
|
|
1118
1118
|
/** Trigger password reset email flow. Route: `POST /forget-password`. */
|
|
1119
|
-
forgetPassword:
|
|
1119
|
+
forgetPassword: InternalAthenaAuthModule['forgetPassword'];
|
|
1120
1120
|
/** Reset password (`POST /reset-password`) and token resolver (`GET /reset-password/{token}`). */
|
|
1121
1121
|
resetPassword: AthenaAuthResetPasswordBinding;
|
|
1122
1122
|
/** Set password for the current authenticated user. Route: `POST /set-password`. */
|
|
1123
1123
|
setPassword: (input: AthenaSetPasswordRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
1124
1124
|
/** Verify email token. Route: `GET /verify-email`. */
|
|
1125
|
-
verifyEmail:
|
|
1125
|
+
verifyEmail: InternalAthenaAuthModule['verifyEmail'];
|
|
1126
1126
|
/** Send verification email. Route: `POST /send-verification-email`. */
|
|
1127
|
-
sendVerificationEmail:
|
|
1127
|
+
sendVerificationEmail: InternalAthenaAuthModule['sendVerificationEmail'];
|
|
1128
1128
|
/** Start change-email flow. Route: `POST /change-email`. */
|
|
1129
|
-
changeEmail:
|
|
1129
|
+
changeEmail: InternalAthenaAuthModule['changeEmail'];
|
|
1130
1130
|
/** Verify pending email change. Route: `GET /change-email/verify`. */
|
|
1131
1131
|
changeEmailVerify: (input: {
|
|
1132
1132
|
query: AthenaAuthTokenQuery;
|
|
@@ -1136,12 +1136,12 @@ interface AthenaAuthBindings {
|
|
|
1136
1136
|
query: AthenaAuthTokenQuery;
|
|
1137
1137
|
} & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthTokenVerificationResponse>>;
|
|
1138
1138
|
/** Change current user password. Route: `POST /change-password`. */
|
|
1139
|
-
changePassword:
|
|
1139
|
+
changePassword: InternalAthenaAuthModule['changePassword'];
|
|
1140
1140
|
user: {
|
|
1141
1141
|
/** Update current user profile fields. Route: `POST /update-user`. */
|
|
1142
|
-
update:
|
|
1142
|
+
update: InternalAthenaAuthModule['updateUser'];
|
|
1143
1143
|
/** Delete current user. Route: `POST /delete-user`. */
|
|
1144
|
-
delete:
|
|
1144
|
+
delete: InternalAthenaAuthModule['deleteUser'];
|
|
1145
1145
|
email: {
|
|
1146
1146
|
/**
|
|
1147
1147
|
* List email identities for current user.
|
|
@@ -1154,30 +1154,30 @@ interface AthenaAuthBindings {
|
|
|
1154
1154
|
};
|
|
1155
1155
|
session: {
|
|
1156
1156
|
/** List user sessions. Route: `GET /list-sessions`. */
|
|
1157
|
-
list:
|
|
1157
|
+
list: InternalAthenaAuthModule['listSessions'];
|
|
1158
1158
|
/** Revoke one or multiple sessions; collapses to `/revoke-session` or `/revoke-sessions` by payload shape. */
|
|
1159
1159
|
revoke: AthenaAuthSessionRevokeBinding;
|
|
1160
1160
|
/** Revoke all other sessions for current user. Route: `POST /revoke-other-sessions`. */
|
|
1161
|
-
revokeOther:
|
|
1161
|
+
revokeOther: InternalAthenaAuthModule['revokeOtherSessions'];
|
|
1162
1162
|
};
|
|
1163
1163
|
social: {
|
|
1164
1164
|
/** Link a social provider to current user. Route: `POST /link-social`. */
|
|
1165
|
-
link:
|
|
1165
|
+
link: InternalAthenaAuthModule['linkSocial'];
|
|
1166
1166
|
};
|
|
1167
1167
|
account: {
|
|
1168
1168
|
/** List linked provider accounts. Route: `GET /list-accounts`. */
|
|
1169
|
-
list:
|
|
1169
|
+
list: InternalAthenaAuthModule['listAccounts'];
|
|
1170
1170
|
/** Unlink a provider account. Route: `POST /unlink-account`. */
|
|
1171
|
-
unlink:
|
|
1171
|
+
unlink: InternalAthenaAuthModule['unlinkAccount'];
|
|
1172
1172
|
};
|
|
1173
1173
|
deleteUser: {
|
|
1174
1174
|
/** Callback endpoint for delete-user verification flows. Route: `GET /delete-user/callback`. */
|
|
1175
|
-
callback:
|
|
1175
|
+
callback: InternalAthenaAuthModule['deleteUserCallback'];
|
|
1176
1176
|
};
|
|
1177
1177
|
/** Refresh provider token. Route: `POST /refresh-token`. */
|
|
1178
|
-
refreshToken:
|
|
1178
|
+
refreshToken: InternalAthenaAuthModule['refreshToken'];
|
|
1179
1179
|
/** Get provider access token. Route: `POST /get-access-token`. */
|
|
1180
|
-
getAccessToken:
|
|
1180
|
+
getAccessToken: InternalAthenaAuthModule['getAccessToken'];
|
|
1181
1181
|
/** Auth health route. Primary `GET /health`; falls back to `GET /ok` on `404`. */
|
|
1182
1182
|
health: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthHealthResponse>>;
|
|
1183
1183
|
/** Health route passthrough. Route: `GET /ok`. */
|
|
@@ -1373,15 +1373,15 @@ interface AthenaAuthBindings {
|
|
|
1373
1373
|
};
|
|
1374
1374
|
signIn: {
|
|
1375
1375
|
/** Sign in with email and password. Route: `POST /sign-in/email`. */
|
|
1376
|
-
email:
|
|
1376
|
+
email: InternalAthenaAuthModule['signIn']['email'];
|
|
1377
1377
|
/** Sign in with username and password. Route: `POST /sign-in/username`. */
|
|
1378
|
-
username:
|
|
1378
|
+
username: InternalAthenaAuthModule['signIn']['username'];
|
|
1379
1379
|
/** Sign in with social provider. Route: `POST /sign-in/social`. */
|
|
1380
|
-
social:
|
|
1380
|
+
social: InternalAthenaAuthModule['signIn']['social'];
|
|
1381
1381
|
};
|
|
1382
1382
|
signUp: {
|
|
1383
1383
|
/** Sign up with email/password identity. Route: `POST /sign-up/email`. */
|
|
1384
|
-
email:
|
|
1384
|
+
email: InternalAthenaAuthModule['signUp']['email'];
|
|
1385
1385
|
};
|
|
1386
1386
|
/** Organization plugin helper surface. Routes: `/organization/*`. */
|
|
1387
1387
|
organization: AthenaAuthOrganizationBindings;
|
|
@@ -1390,16 +1390,8 @@ interface AthenaAuthBindings {
|
|
|
1390
1390
|
provider: (input: AthenaAuthCallbackProviderRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthCallbackProviderResponse>>;
|
|
1391
1391
|
};
|
|
1392
1392
|
}
|
|
1393
|
-
/**
|
|
1394
|
-
|
|
1395
|
-
*
|
|
1396
|
-
* Prefer the short alias {@link AuthClient} when typing React props/hooks
|
|
1397
|
-
* (same role as `AuthClient` from `@better-auth-ui/react`).
|
|
1398
|
-
*
|
|
1399
|
-
* For `createClient(...).auth` only, use {@link AthenaAuthBindings} /
|
|
1400
|
-
* {@link AuthBindings}.
|
|
1401
|
-
*/
|
|
1402
|
-
interface AthenaAuthSdkClient {
|
|
1393
|
+
/** Internal implementation surface used to assemble `createClient().auth`. */
|
|
1394
|
+
interface InternalAthenaAuthModule {
|
|
1403
1395
|
baseUrl: string;
|
|
1404
1396
|
request: <T = unknown>(input: AthenaAuthRequestInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<T>>;
|
|
1405
1397
|
signIn: {
|
|
@@ -1451,26 +1443,7 @@ interface AthenaAuthSdkClient {
|
|
|
1451
1443
|
organization: AthenaAuthOrganizationBindings;
|
|
1452
1444
|
auth: AthenaAuthBindings;
|
|
1453
1445
|
}
|
|
1454
|
-
/**
|
|
1455
|
-
* Auth client instance type — drop-in naming parity with
|
|
1456
|
-
* `import type { AuthClient } from "@better-auth-ui/react"`.
|
|
1457
|
-
*
|
|
1458
|
-
* ```ts
|
|
1459
|
-
* import type { AuthClient } from "@xylex-group/athena/react"
|
|
1460
|
-
* // or
|
|
1461
|
-
* import type { AuthClient } from "@xylex-group/athena"
|
|
1462
|
-
*
|
|
1463
|
-
* const authClient: AuthClient = createAuthClient({ baseUrl: "…" })
|
|
1464
|
-
* // also assignable from createClient(...).auth when only bindings are needed:
|
|
1465
|
-
* // use AuthBindings for that narrower surface
|
|
1466
|
-
* ```
|
|
1467
|
-
*/
|
|
1468
|
-
type AuthClient = AthenaAuthSdkClient;
|
|
1469
|
-
/**
|
|
1470
|
-
* Bindings surface of `createClient(...).auth` (no standalone `baseUrl`/`request`
|
|
1471
|
-
* wrapper). Prefer {@link AuthClient} when you hold a full `createAuthClient()`
|
|
1472
|
-
* instance.
|
|
1473
|
-
*/
|
|
1446
|
+
/** Bindings surface of `createClient(...).auth`. */
|
|
1474
1447
|
type AuthBindings = AthenaAuthBindings;
|
|
1475
1448
|
|
|
1476
|
-
export type { AthenaAuthQueryPrimitive as $, AthenaAdminEmailCreateRequest as A, AthenaAdminEmailUpdateResponse as B, AthenaAuthAdminUserSessionRevokeBinding as C, AthenaAuthBindings as D, AthenaAuthCallOptions as E, AthenaAuthClientConfig as F, AthenaAuthCredentials as G, AthenaAuthEmailChangeResponse as H, AthenaAuthEmailTemplateAttachment as I, AthenaAuthEmailTemplateBuilder as J, AthenaAuthEmailTemplateCreateFromDefinitionInput as K, AthenaAuthEmailTemplateDefinition as L, AthenaAuthEmailTemplateReactOverrides as M, AthenaAuthEmailTemplateUpdateFromDefinitionInput as N, AthenaAuthEmailTemplateVariableBinding as O, AthenaAuthEndpointPath as P, AthenaAuthErrorCode as Q, AthenaAuthErrorDetails as R, AthenaAuthGenericInput as S, AthenaAuthGenericQueryInput as T, AthenaAuthGetUserResponse as U, AthenaAuthLinkedAccount as V, AthenaAuthMethod as W, AthenaAuthOrganization as X, AthenaAuthOrganizationBindings as Y, AthenaAuthOrganizationInvitation as Z, AthenaAuthOrganizationMember as _, AthenaAdminEmailDeleteRequest as a, AthenaAuthQueryValue as a0, AthenaAuthReactEmailComponent as a1, AthenaAuthReactEmailConfig as a2, AthenaAuthReactEmailEventPhase as a3, AthenaAuthReactEmailProps as a4, AthenaAuthReactEmailRenderEvent as a5, AthenaAuthReactEmailRenderInput as a6, AthenaAuthReactEmailRenderOptions as a7, AthenaAuthRequestInput as a8, AthenaAuthResetPasswordBinding as a9,
|
|
1449
|
+
export type { AthenaAuthQueryPrimitive as $, AthenaAdminEmailCreateRequest as A, AthenaAdminEmailUpdateResponse as B, AthenaAuthAdminUserSessionRevokeBinding as C, AthenaAuthBindings as D, AthenaAuthCallOptions as E, AthenaAuthClientConfig as F, AthenaAuthCredentials as G, AthenaAuthEmailChangeResponse as H, AthenaAuthEmailTemplateAttachment as I, AthenaAuthEmailTemplateBuilder as J, AthenaAuthEmailTemplateCreateFromDefinitionInput as K, AthenaAuthEmailTemplateDefinition as L, AthenaAuthEmailTemplateReactOverrides as M, AthenaAuthEmailTemplateUpdateFromDefinitionInput as N, AthenaAuthEmailTemplateVariableBinding as O, AthenaAuthEndpointPath as P, AthenaAuthErrorCode as Q, AthenaAuthErrorDetails as R, AthenaAuthGenericInput as S, AthenaAuthGenericQueryInput as T, AthenaAuthGetUserResponse as U, AthenaAuthLinkedAccount as V, AthenaAuthMethod as W, AthenaAuthOrganization as X, AthenaAuthOrganizationBindings as Y, AthenaAuthOrganizationInvitation as Z, AthenaAuthOrganizationMember as _, AthenaAdminEmailDeleteRequest as a, AthenaAuthQueryValue as a0, AthenaAuthReactEmailComponent as a1, AthenaAuthReactEmailConfig as a2, AthenaAuthReactEmailEventPhase as a3, AthenaAuthReactEmailProps as a4, AthenaAuthReactEmailRenderEvent as a5, AthenaAuthReactEmailRenderInput as a6, AthenaAuthReactEmailRenderOptions as a7, AthenaAuthRequestInput as a8, AthenaAuthResetPasswordBinding as a9, AthenaUsernameSignInRequest as aA, AthenaVerifyEmailRequest as aB, AuthBindings as aC, AthenaAdminHasPermissionRequest as aD, AthenaAuthFetchCompatibleInput as aE, AthenaAdminListUsersFilterOperator as aF, AthenaAdminListUsersQuery as aG, AthenaAdminListUsersSearchOperator as aH, AthenaAuthFilterOperator as aI, AthenaAuthGuardFailure as aJ, AthenaAuthGuardReason as aK, AthenaAuthGuardResult as aL, AthenaAuthGuardSuccess as aM, AthenaAuthSearchOperator as aN, AthenaAuthSocialProviderExtensions as aO, AuthOAuthProvider as aP, AuthSocialProvider as aQ, AuthSocialProviderBuiltin as aR, AthenaAuthResult as aa, AthenaAuthRevokeSessionRequest as ab, AthenaAuthSession as ac, AthenaAuthSessionResponse as ad, AthenaAuthSessionRevokeBinding as ae, AthenaAuthSignInResponse as af, AthenaAuthSignOutResponse as ag, AthenaAuthSocialRedirectResponse as ah, AthenaAuthStatusResponse as ai, AthenaAuthUser as aj, AthenaChangeEmailRequest as ak, AthenaChangePasswordRequest as al, AthenaDeleteUserCallbackRequest as am, AthenaDeleteUserRequest as an, AthenaDeleteUserResponse as ao, AthenaEmailSignInRequest as ap, AthenaEmailSignUpRequest as aq, AthenaForgetPasswordRequest as ar, AthenaLinkSocialRequest as as, AthenaOAuthAccountTokenRequest as at, AthenaOAuthTokenBundle as au, AthenaResetPasswordRequest as av, AthenaSendVerificationEmailRequest as aw, AthenaSocialSignInRequest as ax, AthenaUnlinkAccountRequest as ay, AthenaUpdateUserRequest as az, AthenaAdminEmailEventTypeListResponse as b, AthenaAdminEmailEventTypeRecord as c, AthenaAdminEmailFailureCreateRequest as d, AthenaAdminEmailFailureDeleteRequest as e, AthenaAdminEmailFailureGetQuery as f, AthenaAdminEmailFailureGetResponse as g, AthenaAdminEmailFailureListQuery as h, AthenaAdminEmailFailureListResponse as i, AthenaAdminEmailFailureUpdateRequest as j, AthenaAdminEmailFailureUpdateResponse as k, AthenaAdminEmailGetQuery as l, AthenaAdminEmailGetResponse as m, AthenaAdminEmailListQuery as n, AthenaAdminEmailListResponse as o, AthenaAdminEmailTemplateCreateRequest as p, AthenaAdminEmailTemplateDeleteRequest as q, AthenaAdminEmailTemplateGetQuery as r, AthenaAdminEmailTemplateGetResponse as s, AthenaAdminEmailTemplateListQuery as t, AthenaAdminEmailTemplateListResponse as u, AthenaAdminEmailTemplateRecord as v, AthenaAdminEmailTemplateSendRequest as w, AthenaAdminEmailTemplateSendResponse as x, AthenaAdminEmailTemplateUpdateRequest as y, AthenaAdminEmailUpdateRequest as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as BackendType } from './types-
|
|
1
|
+
import { p as BackendType } from './types-Bltx6iL6.js';
|
|
2
2
|
|
|
3
3
|
type ModelKey = string;
|
|
4
4
|
type ColumnKey = string;
|
|
@@ -103,7 +103,7 @@ type AthenaClientSchemaModels = SchemaDef<AthenaClientModelMap>;
|
|
|
103
103
|
type AthenaClientDatabaseModels = DatabaseDef<Record<string, AthenaClientSchemaModels>>;
|
|
104
104
|
type AthenaClientRegistryModels = RegistryDef<Record<string, AthenaClientDatabaseModels>>;
|
|
105
105
|
/**
|
|
106
|
-
* Additive model/registry input accepted by `createClient(
|
|
106
|
+
* Additive model/registry input accepted by `createClient({ models, ... })` for
|
|
107
107
|
* typed `from("table")` inference.
|
|
108
108
|
*/
|
|
109
109
|
type AthenaClientModelsInput = AthenaClientModelMap | AthenaClientSchemaModels | AthenaClientDatabaseModels | AthenaClientRegistryModels;
|
|
@@ -249,4 +249,4 @@ interface SchemaIntrospectionProvider {
|
|
|
249
249
|
inspect(options?: IntrospectionInspectOptions): Promise<IntrospectionSnapshot>;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
export type { AthenaModelTarget as A, DatabaseDef as D, IntrospectionSnapshot as I, ModelAt as M, RegistryDef as R, SchemaIntrospectionProvider as S, TenantContext as T, UpdateOf as U, InsertOf as a, IntrospectionColumn as b, IntrospectionInspectOptions as c, IntrospectionRelation as d, IntrospectionSchema as e, IntrospectionTable as f, IntrospectionTypeKind as g, ModelColumnKind as h, ModelColumnMetadata as i, ModelDef as j, ModelMetadata as k, ModelRelationKind as l, ModelRelationMetadata as m, RowOf as n, SchemaDef as o, TenantContextValue as p, TenantKeyMap as q,
|
|
252
|
+
export type { AthenaModelTarget as A, DatabaseDef as D, IntrospectionSnapshot as I, ModelAt as M, RegistryDef as R, SchemaIntrospectionProvider as S, TenantContext as T, UpdateOf as U, InsertOf as a, IntrospectionColumn as b, IntrospectionInspectOptions as c, IntrospectionRelation as d, IntrospectionSchema as e, IntrospectionTable as f, IntrospectionTypeKind as g, ModelColumnKind as h, ModelColumnMetadata as i, ModelDef as j, ModelMetadata as k, ModelRelationKind as l, ModelRelationMetadata as m, RowOf as n, SchemaDef as o, TenantContextValue as p, TenantKeyMap as q, AthenaClientModelsInput as r, AnyModelDef as s, AthenaClientModelForTableName as t, AthenaClientTableName as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as BackendType } from './types-
|
|
2
|
-
import { I as IntrospectionSnapshot, S as SchemaIntrospectionProvider } from './types-
|
|
1
|
+
import { p as BackendType } from './types-Bltx6iL6.cjs';
|
|
2
|
+
import { I as IntrospectionSnapshot, S as SchemaIntrospectionProvider } from './types-CgCv5o6R.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Supported case transformations for generated symbols and path token variants.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as BackendType } from './types-
|
|
2
|
-
import { I as IntrospectionSnapshot, S as SchemaIntrospectionProvider } from './types-
|
|
1
|
+
import { p as BackendType } from './types-Bltx6iL6.js';
|
|
2
|
+
import { I as IntrospectionSnapshot, S as SchemaIntrospectionProvider } from './types-B75PdABb.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Supported case transformations for generated symbols and path token variants.
|
|
@@ -87,8 +87,7 @@ interface AthenaDeletePayload {
|
|
|
87
87
|
total_pages?: number;
|
|
88
88
|
}
|
|
89
89
|
interface AthenaUpdatePayload<TUpdateBody = AthenaJsonObject> extends AthenaFetchPayload {
|
|
90
|
-
|
|
91
|
-
data?: TUpdateBody;
|
|
90
|
+
update_body: TUpdateBody;
|
|
92
91
|
}
|
|
93
92
|
type AthenaRpcFilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'ilike' | 'is' | 'in';
|
|
94
93
|
interface AthenaRpcFilter {
|
|
@@ -142,8 +141,6 @@ type BackendOption = BackendConfig | BackendType;
|
|
|
142
141
|
interface AthenaGatewayBaseOptions {
|
|
143
142
|
baseUrl?: string;
|
|
144
143
|
apiKey?: string;
|
|
145
|
-
/** Overrides the canonical `X-Athena-Key` header value. */
|
|
146
|
-
athenaKey?: string | null;
|
|
147
144
|
client?: string;
|
|
148
145
|
backend?: BackendOption;
|
|
149
146
|
publishEvent?: string;
|
|
@@ -161,6 +158,7 @@ interface AthenaGatewayBaseOptions {
|
|
|
161
158
|
}
|
|
162
159
|
type AthenaGatewayHookConfig = AthenaGatewayBaseOptions;
|
|
163
160
|
interface AthenaGatewayCallOptions extends AthenaGatewayBaseOptions {
|
|
161
|
+
signal?: AbortSignal;
|
|
164
162
|
schema?: string;
|
|
165
163
|
count?: AthenaCountOption;
|
|
166
164
|
head?: boolean;
|
|
@@ -233,4 +231,4 @@ interface AthenaGatewayHookResult {
|
|
|
233
231
|
baseUrl: string;
|
|
234
232
|
}
|
|
235
233
|
|
|
236
|
-
export { type AthenaConditionCastType as A, Backend as B, type AthenaQueryPayload as C, type AthenaGatewayBaseOptions as D, type AthenaConditionValue as E, type AthenaConditionArrayValue as F, type AthenaGatewayCondition as G, type AthenaSortBy as H, type AthenaConditionOperator as I, type AthenaGatewayCallOptions as a, type AthenaGatewayConnectionOptions as b, type AthenaGatewayConnectionResult as c, type AthenaGatewayErrorCode as d, type AthenaGatewayErrorDetails as e, type AthenaJsonArray as f, type AthenaJsonObject as g, type AthenaJsonPrimitive as h, type AthenaJsonValue as i, type AthenaRpcCallOptions as j, type AthenaRpcFilter as k, type AthenaRpcFilterOperator as l, type AthenaRpcOrder as m, type AthenaRpcPayload as n, type BackendConfig as o, type BackendType as p, type AthenaGatewayEndpointPath as q, type AthenaGatewayMethod as r, type AthenaGatewayResponse as s, type
|
|
234
|
+
export { type AthenaConditionCastType as A, Backend as B, type AthenaQueryPayload as C, type AthenaGatewayBaseOptions as D, type AthenaConditionValue as E, type AthenaConditionArrayValue as F, type AthenaGatewayCondition as G, type AthenaSortBy as H, type AthenaConditionOperator as I, type AthenaGatewayCallOptions as a, type AthenaGatewayConnectionOptions as b, type AthenaGatewayConnectionResult as c, type AthenaGatewayErrorCode as d, type AthenaGatewayErrorDetails as e, type AthenaJsonArray as f, type AthenaJsonObject as g, type AthenaJsonPrimitive as h, type AthenaJsonValue as i, type AthenaRpcCallOptions as j, type AthenaRpcFilter as k, type AthenaRpcFilterOperator as l, type AthenaRpcOrder as m, type AthenaRpcPayload as n, type BackendConfig as o, type BackendType as p, type AthenaGatewayEndpointPath as q, type AthenaGatewayMethod as r, type AthenaGatewayResponse as s, type BackendOption as t, type AthenaGatewayHookConfig as u, type AthenaGatewayHookResult as v, type AthenaDeletePayload as w, type AthenaFetchPayload as x, type AthenaInsertPayload as y, type AthenaUpdatePayload as z };
|
|
@@ -87,8 +87,7 @@ interface AthenaDeletePayload {
|
|
|
87
87
|
total_pages?: number;
|
|
88
88
|
}
|
|
89
89
|
interface AthenaUpdatePayload<TUpdateBody = AthenaJsonObject> extends AthenaFetchPayload {
|
|
90
|
-
|
|
91
|
-
data?: TUpdateBody;
|
|
90
|
+
update_body: TUpdateBody;
|
|
92
91
|
}
|
|
93
92
|
type AthenaRpcFilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'ilike' | 'is' | 'in';
|
|
94
93
|
interface AthenaRpcFilter {
|
|
@@ -142,8 +141,6 @@ type BackendOption = BackendConfig | BackendType;
|
|
|
142
141
|
interface AthenaGatewayBaseOptions {
|
|
143
142
|
baseUrl?: string;
|
|
144
143
|
apiKey?: string;
|
|
145
|
-
/** Overrides the canonical `X-Athena-Key` header value. */
|
|
146
|
-
athenaKey?: string | null;
|
|
147
144
|
client?: string;
|
|
148
145
|
backend?: BackendOption;
|
|
149
146
|
publishEvent?: string;
|
|
@@ -161,6 +158,7 @@ interface AthenaGatewayBaseOptions {
|
|
|
161
158
|
}
|
|
162
159
|
type AthenaGatewayHookConfig = AthenaGatewayBaseOptions;
|
|
163
160
|
interface AthenaGatewayCallOptions extends AthenaGatewayBaseOptions {
|
|
161
|
+
signal?: AbortSignal;
|
|
164
162
|
schema?: string;
|
|
165
163
|
count?: AthenaCountOption;
|
|
166
164
|
head?: boolean;
|
|
@@ -233,4 +231,4 @@ interface AthenaGatewayHookResult {
|
|
|
233
231
|
baseUrl: string;
|
|
234
232
|
}
|
|
235
233
|
|
|
236
|
-
export { type AthenaConditionCastType as A, Backend as B, type AthenaQueryPayload as C, type AthenaGatewayBaseOptions as D, type AthenaConditionValue as E, type AthenaConditionArrayValue as F, type AthenaGatewayCondition as G, type AthenaSortBy as H, type AthenaConditionOperator as I, type AthenaGatewayCallOptions as a, type AthenaGatewayConnectionOptions as b, type AthenaGatewayConnectionResult as c, type AthenaGatewayErrorCode as d, type AthenaGatewayErrorDetails as e, type AthenaJsonArray as f, type AthenaJsonObject as g, type AthenaJsonPrimitive as h, type AthenaJsonValue as i, type AthenaRpcCallOptions as j, type AthenaRpcFilter as k, type AthenaRpcFilterOperator as l, type AthenaRpcOrder as m, type AthenaRpcPayload as n, type BackendConfig as o, type BackendType as p, type AthenaGatewayEndpointPath as q, type AthenaGatewayMethod as r, type AthenaGatewayResponse as s, type
|
|
234
|
+
export { type AthenaConditionCastType as A, Backend as B, type AthenaQueryPayload as C, type AthenaGatewayBaseOptions as D, type AthenaConditionValue as E, type AthenaConditionArrayValue as F, type AthenaGatewayCondition as G, type AthenaSortBy as H, type AthenaConditionOperator as I, type AthenaGatewayCallOptions as a, type AthenaGatewayConnectionOptions as b, type AthenaGatewayConnectionResult as c, type AthenaGatewayErrorCode as d, type AthenaGatewayErrorDetails as e, type AthenaJsonArray as f, type AthenaJsonObject as g, type AthenaJsonPrimitive as h, type AthenaJsonValue as i, type AthenaRpcCallOptions as j, type AthenaRpcFilter as k, type AthenaRpcFilterOperator as l, type AthenaRpcOrder as m, type AthenaRpcPayload as n, type BackendConfig as o, type BackendType as p, type AthenaGatewayEndpointPath as q, type AthenaGatewayMethod as r, type AthenaGatewayResponse as s, type BackendOption as t, type AthenaGatewayHookConfig as u, type AthenaGatewayHookResult as v, type AthenaDeletePayload as w, type AthenaFetchPayload as x, type AthenaInsertPayload as y, type AthenaUpdatePayload as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as BackendType } from './types-
|
|
1
|
+
import { p as BackendType } from './types-Bltx6iL6.cjs';
|
|
2
2
|
|
|
3
3
|
type ModelKey = string;
|
|
4
4
|
type ColumnKey = string;
|
|
@@ -103,7 +103,7 @@ type AthenaClientSchemaModels = SchemaDef<AthenaClientModelMap>;
|
|
|
103
103
|
type AthenaClientDatabaseModels = DatabaseDef<Record<string, AthenaClientSchemaModels>>;
|
|
104
104
|
type AthenaClientRegistryModels = RegistryDef<Record<string, AthenaClientDatabaseModels>>;
|
|
105
105
|
/**
|
|
106
|
-
* Additive model/registry input accepted by `createClient(
|
|
106
|
+
* Additive model/registry input accepted by `createClient({ models, ... })` for
|
|
107
107
|
* typed `from("table")` inference.
|
|
108
108
|
*/
|
|
109
109
|
type AthenaClientModelsInput = AthenaClientModelMap | AthenaClientSchemaModels | AthenaClientDatabaseModels | AthenaClientRegistryModels;
|
|
@@ -249,4 +249,4 @@ interface SchemaIntrospectionProvider {
|
|
|
249
249
|
inspect(options?: IntrospectionInspectOptions): Promise<IntrospectionSnapshot>;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
export type { AthenaModelTarget as A, DatabaseDef as D, IntrospectionSnapshot as I, ModelAt as M, RegistryDef as R, SchemaIntrospectionProvider as S, TenantContext as T, UpdateOf as U, InsertOf as a, IntrospectionColumn as b, IntrospectionInspectOptions as c, IntrospectionRelation as d, IntrospectionSchema as e, IntrospectionTable as f, IntrospectionTypeKind as g, ModelColumnKind as h, ModelColumnMetadata as i, ModelDef as j, ModelMetadata as k, ModelRelationKind as l, ModelRelationMetadata as m, RowOf as n, SchemaDef as o, TenantContextValue as p, TenantKeyMap as q,
|
|
252
|
+
export type { AthenaModelTarget as A, DatabaseDef as D, IntrospectionSnapshot as I, ModelAt as M, RegistryDef as R, SchemaIntrospectionProvider as S, TenantContext as T, UpdateOf as U, InsertOf as a, IntrospectionColumn as b, IntrospectionInspectOptions as c, IntrospectionRelation as d, IntrospectionSchema as e, IntrospectionTable as f, IntrospectionTypeKind as g, ModelColumnKind as h, ModelColumnMetadata as i, ModelDef as j, ModelMetadata as k, ModelRelationKind as l, ModelRelationMetadata as m, RowOf as n, SchemaDef as o, TenantContextValue as p, TenantKeyMap as q, AthenaClientModelsInput as r, AnyModelDef as s, AthenaClientModelForTableName as t, AthenaClientTableName as u };
|
package/dist/utils.cjs
CHANGED
|
@@ -628,7 +628,7 @@ var PROFILE_RULES = {
|
|
|
628
628
|
gateway: { apiKeys: true, routing: true, authMirror: true, authBearer: false, contentType: true, stripNullsDefault: true },
|
|
629
629
|
chat: { apiKeys: true, routing: true, authMirror: true, authBearer: true, accept: true },
|
|
630
630
|
storage: { apiKeys: true, routing: true, authMirror: true, authBearer: false, contentType: true },
|
|
631
|
-
auth: { apiKeys: true, routing:
|
|
631
|
+
auth: { apiKeys: true, routing: true, authMirror: false, authBearer: true, contentType: true },
|
|
632
632
|
minimal: { apiKeys: false, routing: false, authMirror: false, authBearer: false }
|
|
633
633
|
};
|
|
634
634
|
function normalizeHeaderValue(value) {
|
|
@@ -688,7 +688,6 @@ function resolveBackendType(backend) {
|
|
|
688
688
|
function resolveRequestHeaderOverrides(config, options, defaults) {
|
|
689
689
|
return {
|
|
690
690
|
apiKey: options?.apiKey ?? config.apiKey,
|
|
691
|
-
athenaKey: options?.athenaKey ?? config.athenaKey,
|
|
692
691
|
client: options?.client ?? config.client ?? defaults?.client,
|
|
693
692
|
userId: options?.userId ?? config.userId,
|
|
694
693
|
organizationId: options?.organizationId ?? config.organizationId,
|
|
@@ -718,10 +717,10 @@ function buildServiceRequestHeaders(profile, sdkHeaderValue, config, options, ex
|
|
|
718
717
|
accept: extras?.accept ?? (rules.accept ? "application/json" : void 0)
|
|
719
718
|
});
|
|
720
719
|
}
|
|
721
|
-
function applyAthenaApiKeyHeaders(headers, apiKey
|
|
722
|
-
const
|
|
723
|
-
if (
|
|
724
|
-
headers["X-Athena-Key"] =
|
|
720
|
+
function applyAthenaApiKeyHeaders(headers, apiKey) {
|
|
721
|
+
const resolvedApiKey = normalizeHeaderValue(apiKey);
|
|
722
|
+
if (resolvedApiKey && !hasHeaderIgnoreCase(headers, "X-Athena-Key")) {
|
|
723
|
+
headers["X-Athena-Key"] = resolvedApiKey;
|
|
725
724
|
}
|
|
726
725
|
}
|
|
727
726
|
function applyAthenaAuthContextHeaders(headers, input) {
|
|
@@ -804,7 +803,7 @@ function buildAthenaRequestHeaders(input) {
|
|
|
804
803
|
const headerClient = resolveHeaderValue(mergedExtraHeaders, CLIENT_HEADER_CANDIDATES);
|
|
805
804
|
const finalClient = normalizeHeaderValue(input.client) ?? headerClient;
|
|
806
805
|
const finalApiKey = normalizeHeaderValue(input.apiKey) ?? resolveHeaderValue(mergedExtraHeaders, API_KEY_HEADER_CANDIDATES);
|
|
807
|
-
const finalAthenaKey =
|
|
806
|
+
const finalAthenaKey = resolveHeaderValue(mergedExtraHeaders, ATHENA_KEY_HEADER_CANDIDATES) ?? finalApiKey;
|
|
808
807
|
const headers = {
|
|
809
808
|
"X-Athena-Sdk": input.sdkHeaderValue
|
|
810
809
|
};
|
|
@@ -838,7 +837,7 @@ function buildAthenaRequestHeaders(input) {
|
|
|
838
837
|
}
|
|
839
838
|
}
|
|
840
839
|
if (rules.apiKeys && (finalApiKey || finalAthenaKey)) {
|
|
841
|
-
applyAthenaApiKeyHeaders(headers,
|
|
840
|
+
applyAthenaApiKeyHeaders(headers, finalAthenaKey);
|
|
842
841
|
}
|
|
843
842
|
applyAthenaAuthContextHeaders(headers, input);
|
|
844
843
|
applyAthenaPgUriHeaders(headers, input);
|