@xylex-group/athena 1.9.0 → 2.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 +40 -43
- package/bin/athena-js.js +0 -0
- package/dist/cli/index.cjs +1151 -67
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +1151 -67
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +1592 -1000
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -254
- package/dist/index.d.ts +21 -254
- package/dist/index.js +1592 -1001
- package/dist/index.js.map +1 -1
- package/dist/model-form-CVOtC8jq.d.ts +1284 -0
- package/dist/model-form-hXkvHS_3.d.cts +1284 -0
- package/dist/react.cjs +93 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +36 -2
- package/dist/react.d.ts +36 -2
- package/dist/react.js +93 -1
- package/dist/react.js.map +1 -1
- package/package.json +16 -17
- package/dist/model-form-Bm_kqCn2.d.ts +0 -92
- package/dist/model-form-DkS48fsh.d.cts +0 -92
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { B as BackendConfig, a as BackendType, A as AthenaJsonValue, b as AthenaConditionValue, c as AthenaConditionCastType, d as AthenaConditionArrayValue, e as AthenaConditionOperator, f as AthenaGatewayCallOptions, g as AthenaGatewayErrorDetails, h as AthenaJsonObject, i as AthenaRpcCallOptions, S as SchemaDef, j as AnyModelDef, D as DatabaseDef, M as ModelMetadata, k as ModelDef, R as RegistryDef, T as TenantKeyMap, l as TenantContext, m as RowOf, n as ModelAt, I as InsertOf, U as UpdateOf, o as SchemaIntrospectionProvider, p as IntrospectionSnapshot, q as IntrospectionColumn } from './types-BnzoaNRC.cjs';
|
|
2
2
|
export { r as AthenaGatewayErrorCode, s as AthenaJsonArray, t as AthenaJsonPrimitive, u as AthenaRpcFilter, v as AthenaRpcFilterOperator, w as AthenaRpcOrder, x as AthenaRpcPayload, y as Backend, z as IntrospectionInspectOptions, C as IntrospectionRelation, E as IntrospectionSchema, F as IntrospectionTable, G as IntrospectionTypeKind, H as ModelRelationKind, J as ModelRelationMetadata, K as TenantContextValue } from './types-BnzoaNRC.cjs';
|
|
3
|
-
|
|
3
|
+
import { A as AthenaAuthBindings, a as AthenaAuthClientConfig, b as AthenaAuthSdkClient } from './model-form-hXkvHS_3.cjs';
|
|
4
|
+
export { c as AthenaAuthAdminUserSessionRevokeBinding, d as AthenaAuthCallOptions, e as AthenaAuthCredentials, f as AthenaAuthEmailChangeResponse, g as AthenaAuthEndpointPath, h as AthenaAuthErrorCode, i as AthenaAuthErrorDetails, j as AthenaAuthGenericInput, k as AthenaAuthGenericQueryInput, l as AthenaAuthLinkedAccount, m as AthenaAuthMethod, n as AthenaAuthOrganization, o as AthenaAuthOrganizationBindings, p as AthenaAuthOrganizationInvitation, q as AthenaAuthOrganizationMember, r as AthenaAuthQueryPrimitive, s as AthenaAuthQueryValue, t as AthenaAuthRequestInput, u as AthenaAuthResetPasswordBinding, v as AthenaAuthResult, w as AthenaAuthRevokeSessionRequest, x as AthenaAuthSession, y as AthenaAuthSessionResponse, z as AthenaAuthSessionRevokeBinding, B as AthenaAuthSignInResponse, C as AthenaAuthSignOutResponse, D as AthenaAuthSocialRedirectResponse, E as AthenaAuthStatusResponse, F as AthenaAuthUser, G as AthenaChangeEmailRequest, H as AthenaChangePasswordRequest, I as AthenaDeleteUserCallbackRequest, J as AthenaDeleteUserRequest, K as AthenaDeleteUserResponse, L as AthenaEmailSignInRequest, M as AthenaEmailSignUpRequest, N as AthenaForgetPasswordRequest, O as AthenaGatewayError, P as AthenaLinkSocialRequest, Q as AthenaOAuthAccountTokenRequest, R as AthenaOAuthTokenBundle, S as AthenaResetPasswordRequest, T as AthenaSendVerificationEmailRequest, U as AthenaSocialSignInRequest, V as AthenaUnlinkAccountRequest, W as AthenaUpdateUserRequest, X as AthenaUsernameSignInRequest, Y as AthenaVerifyEmailRequest, Z as ModelFormAdapter, _ as ModelFormDefaults, $ as ModelFormNullishMode, a0 as ModelFormValues, a1 as ToModelFormDefaultsOptions, a2 as ToModelPayloadOptions, a3 as createModelFormAdapter, a4 as isAthenaGatewayError, a5 as toModelFormDefaults, a6 as toModelPayload } from './model-form-hXkvHS_3.cjs';
|
|
4
5
|
import { A as AthenaGeneratorConfig, L as LoadGeneratorConfigOptions, a as LoadedGeneratorConfig, N as NormalizedAthenaGeneratorConfig, G as GeneratedArtifacts, b as GeneratorProviderConfig, c as GeneratorExperimentalFlags, d as GeneratorSchemaSelection } from './pipeline-C-cN0ACi.cjs';
|
|
5
6
|
export { e as GeneratedArtifact, f as GeneratorArtifactKind, g as GeneratorFeatureFlags, h as GeneratorNamingConfig, i as GeneratorOutputConfig, j as GeneratorOutputTargets, k as NamingStyle, R as RunGeneratorOptions, l as RunGeneratorResult, r as runSchemaGenerator } from './pipeline-C-cN0ACi.cjs';
|
|
6
7
|
|
|
@@ -112,6 +113,9 @@ interface AthenaSdkClient {
|
|
|
112
113
|
rpc<Row = unknown, Args extends AthenaJsonObject = AthenaJsonObject>(fn: string, args?: Args, options?: AthenaRpcCallOptions): RpcQueryBuilder<Row>;
|
|
113
114
|
query<Row = unknown>(query: string, options?: AthenaGatewayCallOptions): Promise<AthenaResult<Row[]>>;
|
|
114
115
|
}
|
|
116
|
+
interface AthenaSdkClientWithAuth extends AthenaSdkClient {
|
|
117
|
+
auth: AthenaAuthBindings;
|
|
118
|
+
}
|
|
115
119
|
interface AthenaClientBuilder {
|
|
116
120
|
/** Set the gateway base URL. */
|
|
117
121
|
url(url: string): AthenaClientBuilder;
|
|
@@ -126,17 +130,20 @@ interface AthenaClientBuilder {
|
|
|
126
130
|
/** Enable or disable health tracking metadata. */
|
|
127
131
|
healthTracking(enabled: boolean): AthenaClientBuilder;
|
|
128
132
|
/** Build the immutable Athena SDK client. */
|
|
129
|
-
build():
|
|
133
|
+
build(): AthenaSdkClientWithAuth;
|
|
130
134
|
}
|
|
131
135
|
/** Canonical Athena client factory with builder-based configuration. */
|
|
132
136
|
declare class AthenaClient {
|
|
133
137
|
/** Create a fluent builder for a strongly-typed Athena SDK client. */
|
|
134
138
|
static builder(): AthenaClientBuilder;
|
|
135
139
|
/** Build a client from process environment variables. */
|
|
136
|
-
static fromEnvironment():
|
|
140
|
+
static fromEnvironment(): AthenaSdkClientWithAuth;
|
|
141
|
+
}
|
|
142
|
+
interface AthenaCreateClientOptions extends Pick<AthenaGatewayCallOptions, 'client' | 'headers' | 'backend'> {
|
|
143
|
+
auth?: AthenaAuthClientConfig;
|
|
137
144
|
}
|
|
138
145
|
/** Create client (convenience wrapper; use AthenaClient.builder() for full control) */
|
|
139
|
-
declare function createClient(url: string, apiKey: string, options?:
|
|
146
|
+
declare function createClient(url: string, apiKey: string, options?: AthenaCreateClientOptions): AthenaSdkClientWithAuth;
|
|
140
147
|
|
|
141
148
|
type AthenaErrorKind = 'unique_violation' | 'not_found' | 'validation' | 'auth' | 'rate_limit' | 'transient' | 'unknown';
|
|
142
149
|
declare const AthenaErrorKind: {
|
|
@@ -221,6 +228,12 @@ interface RetryConfig {
|
|
|
221
228
|
interface RequireAffectedOptions {
|
|
222
229
|
min?: number;
|
|
223
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Parses a string-based boolean flag with a deterministic fallback.
|
|
233
|
+
*
|
|
234
|
+
* Accepts common truthy/falsey token variants used by env vars and CLI flags.
|
|
235
|
+
*/
|
|
236
|
+
declare function parseBooleanFlag(rawValue: string | undefined, fallback: boolean): boolean;
|
|
224
237
|
declare class AthenaError extends Error {
|
|
225
238
|
readonly code: AthenaErrorCode;
|
|
226
239
|
readonly kind: AthenaErrorKind;
|
|
@@ -412,255 +425,9 @@ declare function normalizeSchemaSelection(input: GeneratorSchemaSelection | unde
|
|
|
412
425
|
*/
|
|
413
426
|
declare function resolveProviderSchemas(providerConfig: GeneratorProviderConfig): string[];
|
|
414
427
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
type AthenaAuthQueryValue = AthenaAuthQueryPrimitive | AthenaAuthQueryPrimitive[] | null | undefined;
|
|
419
|
-
type AthenaAuthEndpointPath = '/sign-in/social' | '/sign-in/email' | '/sign-in/username' | '/sign-up/email' | '/get-session' | '/sign-out' | '/forget-password' | '/reset-password' | '/verify-email' | '/send-verification-email' | '/change-email' | '/change-password' | '/update-user' | '/delete-user' | '/delete-user/callback' | '/list-sessions' | '/revoke-session' | '/revoke-sessions' | '/revoke-other-sessions' | '/link-social' | '/list-accounts' | '/unlink-account' | '/refresh-token' | '/get-access-token' | '/ok' | '/error' | `/reset-password/${string}`;
|
|
420
|
-
type AthenaAuthErrorCode = 'NETWORK_ERROR' | 'HTTP_ERROR' | 'INVALID_JSON' | 'UNKNOWN_ERROR';
|
|
421
|
-
interface AthenaAuthErrorDetails {
|
|
422
|
-
code: AthenaAuthErrorCode;
|
|
423
|
-
message: string;
|
|
424
|
-
status: number;
|
|
425
|
-
endpoint?: AthenaAuthEndpointPath;
|
|
426
|
-
method?: AthenaAuthMethod;
|
|
427
|
-
requestId?: string;
|
|
428
|
-
hint?: string;
|
|
429
|
-
cause?: string;
|
|
430
|
-
}
|
|
431
|
-
interface AthenaAuthResult<T = unknown> {
|
|
432
|
-
ok: boolean;
|
|
433
|
-
status: number;
|
|
434
|
-
data: T | null;
|
|
435
|
-
error: string | null;
|
|
436
|
-
errorDetails?: AthenaAuthErrorDetails | null;
|
|
437
|
-
raw: unknown;
|
|
438
|
-
}
|
|
439
|
-
interface AthenaAuthUser {
|
|
440
|
-
id: string;
|
|
441
|
-
email: string;
|
|
442
|
-
name?: string | null;
|
|
443
|
-
image?: string | null;
|
|
444
|
-
emailVerified?: boolean;
|
|
445
|
-
createdAt?: string;
|
|
446
|
-
updatedAt?: string;
|
|
447
|
-
username?: string | null;
|
|
448
|
-
displayUsername?: string | null;
|
|
449
|
-
twoFactorEnabled?: boolean;
|
|
450
|
-
role?: string | null;
|
|
451
|
-
banned?: boolean;
|
|
452
|
-
banReason?: string | null;
|
|
453
|
-
banExpires?: string | null;
|
|
454
|
-
}
|
|
455
|
-
interface AthenaAuthSession {
|
|
456
|
-
id: string;
|
|
457
|
-
expiresAt?: string;
|
|
458
|
-
token?: string;
|
|
459
|
-
createdAt?: string;
|
|
460
|
-
updatedAt?: string;
|
|
461
|
-
ipAddress?: string | null;
|
|
462
|
-
userAgent?: string | null;
|
|
463
|
-
userId?: string;
|
|
464
|
-
impersonatedBy?: string | null;
|
|
465
|
-
activeOrganizationId?: string | null;
|
|
466
|
-
}
|
|
467
|
-
interface AthenaAuthSessionResponse {
|
|
468
|
-
session: AthenaAuthSession;
|
|
469
|
-
user: AthenaAuthUser;
|
|
470
|
-
}
|
|
471
|
-
interface AthenaEmailSignInRequest {
|
|
472
|
-
email: string;
|
|
473
|
-
password: string;
|
|
474
|
-
callbackURL?: string;
|
|
475
|
-
rememberMe?: boolean;
|
|
476
|
-
}
|
|
477
|
-
interface AthenaUsernameSignInRequest {
|
|
478
|
-
username: string;
|
|
479
|
-
password: string;
|
|
480
|
-
rememberMe?: boolean;
|
|
481
|
-
}
|
|
482
|
-
interface AthenaSocialSignInRequest {
|
|
483
|
-
provider: string;
|
|
484
|
-
callbackURL?: string;
|
|
485
|
-
newUserCallbackURL?: string;
|
|
486
|
-
errorCallbackURL?: string;
|
|
487
|
-
disableRedirect?: boolean;
|
|
488
|
-
idToken?: string;
|
|
489
|
-
scopes?: string[] | string;
|
|
490
|
-
requestSignUp?: boolean;
|
|
491
|
-
loginHint?: string;
|
|
492
|
-
}
|
|
493
|
-
interface AthenaEmailSignUpRequest {
|
|
494
|
-
name: string;
|
|
495
|
-
email: string;
|
|
496
|
-
password: string;
|
|
497
|
-
callbackURL?: string;
|
|
498
|
-
}
|
|
499
|
-
interface AthenaAuthSignInResponse {
|
|
500
|
-
redirect: false;
|
|
501
|
-
token: string;
|
|
502
|
-
url?: string | null;
|
|
503
|
-
user: AthenaAuthUser;
|
|
504
|
-
}
|
|
505
|
-
interface AthenaAuthSocialRedirectResponse {
|
|
506
|
-
url: string;
|
|
507
|
-
redirect: boolean;
|
|
508
|
-
}
|
|
509
|
-
interface AthenaAuthSignOutResponse {
|
|
510
|
-
success: boolean;
|
|
511
|
-
}
|
|
512
|
-
interface AthenaAuthStatusResponse {
|
|
513
|
-
status: boolean;
|
|
514
|
-
}
|
|
515
|
-
interface AthenaAuthRevokeSessionRequest {
|
|
516
|
-
token: string;
|
|
517
|
-
}
|
|
518
|
-
interface AthenaForgetPasswordRequest {
|
|
519
|
-
email: string;
|
|
520
|
-
redirectTo?: string;
|
|
521
|
-
}
|
|
522
|
-
interface AthenaResetPasswordRequest {
|
|
523
|
-
newPassword: string;
|
|
524
|
-
token?: string;
|
|
525
|
-
}
|
|
526
|
-
interface AthenaVerifyEmailRequest {
|
|
527
|
-
token: string;
|
|
528
|
-
callbackURL?: string;
|
|
529
|
-
}
|
|
530
|
-
interface AthenaSendVerificationEmailRequest {
|
|
531
|
-
email: string;
|
|
532
|
-
callbackURL?: string;
|
|
533
|
-
}
|
|
534
|
-
interface AthenaChangeEmailRequest {
|
|
535
|
-
newEmail: string;
|
|
536
|
-
callbackURL?: string;
|
|
537
|
-
}
|
|
538
|
-
interface AthenaChangePasswordRequest {
|
|
539
|
-
newPassword: string;
|
|
540
|
-
currentPassword: string;
|
|
541
|
-
revokeOtherSessions?: boolean;
|
|
542
|
-
}
|
|
543
|
-
interface AthenaUpdateUserRequest {
|
|
544
|
-
name?: string;
|
|
545
|
-
image?: string;
|
|
546
|
-
}
|
|
547
|
-
interface AthenaDeleteUserRequest {
|
|
548
|
-
callbackURL?: string;
|
|
549
|
-
password?: string;
|
|
550
|
-
token?: string;
|
|
551
|
-
}
|
|
552
|
-
interface AthenaDeleteUserCallbackRequest {
|
|
553
|
-
token?: string;
|
|
554
|
-
callbackURL?: string;
|
|
555
|
-
}
|
|
556
|
-
interface AthenaDeleteUserResponse {
|
|
557
|
-
success: boolean;
|
|
558
|
-
message?: string;
|
|
559
|
-
}
|
|
560
|
-
interface AthenaAuthEmailChangeResponse {
|
|
561
|
-
status: boolean;
|
|
562
|
-
message?: string | null;
|
|
563
|
-
}
|
|
564
|
-
interface AthenaLinkSocialRequest {
|
|
565
|
-
provider: string;
|
|
566
|
-
callbackURL?: string;
|
|
567
|
-
scopes?: string[] | string;
|
|
568
|
-
}
|
|
569
|
-
interface AthenaUnlinkAccountRequest {
|
|
570
|
-
providerId: string;
|
|
571
|
-
accountId?: string;
|
|
572
|
-
}
|
|
573
|
-
interface AthenaOAuthAccountTokenRequest {
|
|
574
|
-
providerId: string;
|
|
575
|
-
accountId?: string;
|
|
576
|
-
userId?: string;
|
|
577
|
-
}
|
|
578
|
-
interface AthenaOAuthTokenBundle {
|
|
579
|
-
tokenType?: string;
|
|
580
|
-
idToken?: string;
|
|
581
|
-
accessToken?: string;
|
|
582
|
-
refreshToken?: string;
|
|
583
|
-
accessTokenExpiresAt?: string;
|
|
584
|
-
refreshTokenExpiresAt?: string;
|
|
585
|
-
}
|
|
586
|
-
interface AthenaAuthLinkedAccount {
|
|
587
|
-
id: string;
|
|
588
|
-
provider?: string;
|
|
589
|
-
accountId?: string;
|
|
590
|
-
scopes?: string[];
|
|
591
|
-
createdAt?: string;
|
|
592
|
-
updatedAt?: string;
|
|
593
|
-
}
|
|
594
|
-
interface AthenaAuthRequestInput {
|
|
595
|
-
endpoint: AthenaAuthEndpointPath;
|
|
596
|
-
method?: AthenaAuthMethod;
|
|
597
|
-
body?: unknown;
|
|
598
|
-
query?: Record<string, AthenaAuthQueryValue>;
|
|
599
|
-
fetchOptions?: AthenaAuthCallOptions;
|
|
600
|
-
}
|
|
601
|
-
interface AthenaAuthCallOptions {
|
|
602
|
-
baseUrl?: string;
|
|
603
|
-
apiKey?: string;
|
|
604
|
-
bearerToken?: string;
|
|
605
|
-
headers?: Record<string, string>;
|
|
606
|
-
credentials?: AthenaAuthCredentials;
|
|
607
|
-
signal?: AbortSignal;
|
|
608
|
-
}
|
|
609
|
-
interface AthenaAuthFetchCompatibleInput {
|
|
610
|
-
fetchOptions?: AthenaAuthCallOptions;
|
|
611
|
-
}
|
|
612
|
-
interface AthenaAuthClientConfig extends AthenaAuthCallOptions {
|
|
613
|
-
fetch?: typeof fetch;
|
|
614
|
-
}
|
|
615
|
-
interface AthenaAuthSdkClient {
|
|
616
|
-
baseUrl: string;
|
|
617
|
-
request: <T = unknown>(input: AthenaAuthRequestInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<T>>;
|
|
618
|
-
signIn: {
|
|
619
|
-
email: (input: AthenaEmailSignInRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignInResponse>>;
|
|
620
|
-
username: (input: AthenaUsernameSignInRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignInResponse>>;
|
|
621
|
-
social: (input: AthenaSocialSignInRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSocialRedirectResponse | AthenaAuthSignInResponse>>;
|
|
622
|
-
};
|
|
623
|
-
signUp: {
|
|
624
|
-
email: (input: AthenaEmailSignUpRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignInResponse>>;
|
|
625
|
-
};
|
|
626
|
-
signOut: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignOutResponse>>;
|
|
627
|
-
logout: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignOutResponse>>;
|
|
628
|
-
getSession: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSessionResponse>>;
|
|
629
|
-
listSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSession[]>>;
|
|
630
|
-
revokeSession: (input: AthenaAuthRevokeSessionRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
631
|
-
clearSession: (input: AthenaAuthRevokeSessionRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
632
|
-
revokeSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
633
|
-
clearSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
634
|
-
revokeOtherSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
635
|
-
clearOtherSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
636
|
-
forgetPassword: (input: AthenaForgetPasswordRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
637
|
-
resetPassword: (input: AthenaResetPasswordRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
638
|
-
resolveResetPasswordToken: (input: {
|
|
639
|
-
token: string;
|
|
640
|
-
callbackURL?: string;
|
|
641
|
-
} & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<{
|
|
642
|
-
token?: string;
|
|
643
|
-
}>>;
|
|
644
|
-
verifyEmail: (input: AthenaVerifyEmailRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<{
|
|
645
|
-
user: AthenaAuthUser;
|
|
646
|
-
status: boolean;
|
|
647
|
-
}>>;
|
|
648
|
-
sendVerificationEmail: (input: AthenaSendVerificationEmailRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
649
|
-
changeEmail: (input: AthenaChangeEmailRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthEmailChangeResponse>>;
|
|
650
|
-
changePassword: (input: AthenaChangePasswordRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<{
|
|
651
|
-
token?: string | null;
|
|
652
|
-
user: AthenaAuthUser;
|
|
653
|
-
}>>;
|
|
654
|
-
updateUser: (input: AthenaUpdateUserRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
655
|
-
deleteUser: (input?: AthenaDeleteUserRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaDeleteUserResponse>>;
|
|
656
|
-
deleteUserCallback: (input?: AthenaDeleteUserCallbackRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaDeleteUserResponse>>;
|
|
657
|
-
linkSocial: (input: AthenaLinkSocialRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSocialRedirectResponse>>;
|
|
658
|
-
listAccounts: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthLinkedAccount[]>>;
|
|
659
|
-
unlinkAccount: (input: AthenaUnlinkAccountRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
660
|
-
refreshToken: (input: AthenaOAuthAccountTokenRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaOAuthTokenBundle>>;
|
|
661
|
-
getAccessToken: (input: AthenaOAuthAccountTokenRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaOAuthTokenBundle>>;
|
|
662
|
-
}
|
|
663
|
-
|
|
428
|
+
/**
|
|
429
|
+
* @deprecated Prefer `createClient(...).auth` from `@xylex-group/athena`.
|
|
430
|
+
*/
|
|
664
431
|
declare function createAuthClient(config?: AthenaAuthClientConfig): AthenaAuthSdkClient;
|
|
665
432
|
|
|
666
|
-
export {
|
|
433
|
+
export { AthenaAuthBindings, AthenaAuthClientConfig, AthenaAuthSdkClient, AthenaClient, AthenaConditionCastType, type AthenaCreateClientOptions, AthenaError, AthenaErrorCategory, AthenaErrorCode, type AthenaErrorInput, AthenaErrorKind, AthenaGatewayCallOptions, AthenaGatewayErrorDetails, AthenaGeneratorConfig, AthenaJsonObject, AthenaJsonValue, type AthenaOperationContext, type AthenaResult, AthenaRpcCallOptions, type AthenaSdkClient, type AthenaSdkClientWithAuth, BackendConfig, BackendType, DEFAULT_POSTGRES_SCHEMAS, DatabaseDef, GeneratedArtifacts, GeneratorExperimentalFlags, GeneratorProviderConfig, GeneratorSchemaSelection, InsertOf, type IntCoercionOptions, IntrospectionColumn, IntrospectionSnapshot, LoadGeneratorConfigOptions, LoadedGeneratorConfig, ModelAt, ModelDef, ModelMetadata, type NormalizedAthenaError, NormalizedAthenaGeneratorConfig, type PostgresIntrospectionProviderOptions, RegistryDef, type RequireAffectedOptions, type RetryBackoffStrategy, type RetryConfig, RowOf, type RpcOrderOptions, type RpcQueryBuilder, SchemaDef, SchemaIntrospectionProvider, type TableQueryBuilder, TenantContext, TenantKeyMap, type TypedAthenaClient, type TypedClientOptions, type UnwrapOneOptions, type UnwrapOptions, UpdateOf, assertInt, coerceInt, createAuthClient, createClient, createPostgresIntrospectionProvider, createTypedClient, defineDatabase, defineGeneratorConfig, defineModel, defineRegistry, defineSchema, findGeneratorConfigPath, generateArtifactsFromSnapshot, identifier, isOk, loadGeneratorConfig, normalizeAthenaError, normalizeGeneratorConfig, normalizeSchemaSelection, parseBooleanFlag, requireAffected, requireSuccess, resolveGeneratorProvider, resolvePostgresColumnType, resolveProviderSchemas, unwrap, unwrapOne, unwrapRows, withRetry };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { B as BackendConfig, a as BackendType, A as AthenaJsonValue, b as AthenaConditionValue, c as AthenaConditionCastType, d as AthenaConditionArrayValue, e as AthenaConditionOperator, f as AthenaGatewayCallOptions, g as AthenaGatewayErrorDetails, h as AthenaJsonObject, i as AthenaRpcCallOptions, S as SchemaDef, j as AnyModelDef, D as DatabaseDef, M as ModelMetadata, k as ModelDef, R as RegistryDef, T as TenantKeyMap, l as TenantContext, m as RowOf, n as ModelAt, I as InsertOf, U as UpdateOf, o as SchemaIntrospectionProvider, p as IntrospectionSnapshot, q as IntrospectionColumn } from './types-BnzoaNRC.js';
|
|
2
2
|
export { r as AthenaGatewayErrorCode, s as AthenaJsonArray, t as AthenaJsonPrimitive, u as AthenaRpcFilter, v as AthenaRpcFilterOperator, w as AthenaRpcOrder, x as AthenaRpcPayload, y as Backend, z as IntrospectionInspectOptions, C as IntrospectionRelation, E as IntrospectionSchema, F as IntrospectionTable, G as IntrospectionTypeKind, H as ModelRelationKind, J as ModelRelationMetadata, K as TenantContextValue } from './types-BnzoaNRC.js';
|
|
3
|
-
|
|
3
|
+
import { A as AthenaAuthBindings, a as AthenaAuthClientConfig, b as AthenaAuthSdkClient } from './model-form-CVOtC8jq.js';
|
|
4
|
+
export { c as AthenaAuthAdminUserSessionRevokeBinding, d as AthenaAuthCallOptions, e as AthenaAuthCredentials, f as AthenaAuthEmailChangeResponse, g as AthenaAuthEndpointPath, h as AthenaAuthErrorCode, i as AthenaAuthErrorDetails, j as AthenaAuthGenericInput, k as AthenaAuthGenericQueryInput, l as AthenaAuthLinkedAccount, m as AthenaAuthMethod, n as AthenaAuthOrganization, o as AthenaAuthOrganizationBindings, p as AthenaAuthOrganizationInvitation, q as AthenaAuthOrganizationMember, r as AthenaAuthQueryPrimitive, s as AthenaAuthQueryValue, t as AthenaAuthRequestInput, u as AthenaAuthResetPasswordBinding, v as AthenaAuthResult, w as AthenaAuthRevokeSessionRequest, x as AthenaAuthSession, y as AthenaAuthSessionResponse, z as AthenaAuthSessionRevokeBinding, B as AthenaAuthSignInResponse, C as AthenaAuthSignOutResponse, D as AthenaAuthSocialRedirectResponse, E as AthenaAuthStatusResponse, F as AthenaAuthUser, G as AthenaChangeEmailRequest, H as AthenaChangePasswordRequest, I as AthenaDeleteUserCallbackRequest, J as AthenaDeleteUserRequest, K as AthenaDeleteUserResponse, L as AthenaEmailSignInRequest, M as AthenaEmailSignUpRequest, N as AthenaForgetPasswordRequest, O as AthenaGatewayError, P as AthenaLinkSocialRequest, Q as AthenaOAuthAccountTokenRequest, R as AthenaOAuthTokenBundle, S as AthenaResetPasswordRequest, T as AthenaSendVerificationEmailRequest, U as AthenaSocialSignInRequest, V as AthenaUnlinkAccountRequest, W as AthenaUpdateUserRequest, X as AthenaUsernameSignInRequest, Y as AthenaVerifyEmailRequest, Z as ModelFormAdapter, _ as ModelFormDefaults, $ as ModelFormNullishMode, a0 as ModelFormValues, a1 as ToModelFormDefaultsOptions, a2 as ToModelPayloadOptions, a3 as createModelFormAdapter, a4 as isAthenaGatewayError, a5 as toModelFormDefaults, a6 as toModelPayload } from './model-form-CVOtC8jq.js';
|
|
4
5
|
import { A as AthenaGeneratorConfig, L as LoadGeneratorConfigOptions, a as LoadedGeneratorConfig, N as NormalizedAthenaGeneratorConfig, G as GeneratedArtifacts, b as GeneratorProviderConfig, c as GeneratorExperimentalFlags, d as GeneratorSchemaSelection } from './pipeline-CQgV-Yfo.js';
|
|
5
6
|
export { e as GeneratedArtifact, f as GeneratorArtifactKind, g as GeneratorFeatureFlags, h as GeneratorNamingConfig, i as GeneratorOutputConfig, j as GeneratorOutputTargets, k as NamingStyle, R as RunGeneratorOptions, l as RunGeneratorResult, r as runSchemaGenerator } from './pipeline-CQgV-Yfo.js';
|
|
6
7
|
|
|
@@ -112,6 +113,9 @@ interface AthenaSdkClient {
|
|
|
112
113
|
rpc<Row = unknown, Args extends AthenaJsonObject = AthenaJsonObject>(fn: string, args?: Args, options?: AthenaRpcCallOptions): RpcQueryBuilder<Row>;
|
|
113
114
|
query<Row = unknown>(query: string, options?: AthenaGatewayCallOptions): Promise<AthenaResult<Row[]>>;
|
|
114
115
|
}
|
|
116
|
+
interface AthenaSdkClientWithAuth extends AthenaSdkClient {
|
|
117
|
+
auth: AthenaAuthBindings;
|
|
118
|
+
}
|
|
115
119
|
interface AthenaClientBuilder {
|
|
116
120
|
/** Set the gateway base URL. */
|
|
117
121
|
url(url: string): AthenaClientBuilder;
|
|
@@ -126,17 +130,20 @@ interface AthenaClientBuilder {
|
|
|
126
130
|
/** Enable or disable health tracking metadata. */
|
|
127
131
|
healthTracking(enabled: boolean): AthenaClientBuilder;
|
|
128
132
|
/** Build the immutable Athena SDK client. */
|
|
129
|
-
build():
|
|
133
|
+
build(): AthenaSdkClientWithAuth;
|
|
130
134
|
}
|
|
131
135
|
/** Canonical Athena client factory with builder-based configuration. */
|
|
132
136
|
declare class AthenaClient {
|
|
133
137
|
/** Create a fluent builder for a strongly-typed Athena SDK client. */
|
|
134
138
|
static builder(): AthenaClientBuilder;
|
|
135
139
|
/** Build a client from process environment variables. */
|
|
136
|
-
static fromEnvironment():
|
|
140
|
+
static fromEnvironment(): AthenaSdkClientWithAuth;
|
|
141
|
+
}
|
|
142
|
+
interface AthenaCreateClientOptions extends Pick<AthenaGatewayCallOptions, 'client' | 'headers' | 'backend'> {
|
|
143
|
+
auth?: AthenaAuthClientConfig;
|
|
137
144
|
}
|
|
138
145
|
/** Create client (convenience wrapper; use AthenaClient.builder() for full control) */
|
|
139
|
-
declare function createClient(url: string, apiKey: string, options?:
|
|
146
|
+
declare function createClient(url: string, apiKey: string, options?: AthenaCreateClientOptions): AthenaSdkClientWithAuth;
|
|
140
147
|
|
|
141
148
|
type AthenaErrorKind = 'unique_violation' | 'not_found' | 'validation' | 'auth' | 'rate_limit' | 'transient' | 'unknown';
|
|
142
149
|
declare const AthenaErrorKind: {
|
|
@@ -221,6 +228,12 @@ interface RetryConfig {
|
|
|
221
228
|
interface RequireAffectedOptions {
|
|
222
229
|
min?: number;
|
|
223
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Parses a string-based boolean flag with a deterministic fallback.
|
|
233
|
+
*
|
|
234
|
+
* Accepts common truthy/falsey token variants used by env vars and CLI flags.
|
|
235
|
+
*/
|
|
236
|
+
declare function parseBooleanFlag(rawValue: string | undefined, fallback: boolean): boolean;
|
|
224
237
|
declare class AthenaError extends Error {
|
|
225
238
|
readonly code: AthenaErrorCode;
|
|
226
239
|
readonly kind: AthenaErrorKind;
|
|
@@ -412,255 +425,9 @@ declare function normalizeSchemaSelection(input: GeneratorSchemaSelection | unde
|
|
|
412
425
|
*/
|
|
413
426
|
declare function resolveProviderSchemas(providerConfig: GeneratorProviderConfig): string[];
|
|
414
427
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
type AthenaAuthQueryValue = AthenaAuthQueryPrimitive | AthenaAuthQueryPrimitive[] | null | undefined;
|
|
419
|
-
type AthenaAuthEndpointPath = '/sign-in/social' | '/sign-in/email' | '/sign-in/username' | '/sign-up/email' | '/get-session' | '/sign-out' | '/forget-password' | '/reset-password' | '/verify-email' | '/send-verification-email' | '/change-email' | '/change-password' | '/update-user' | '/delete-user' | '/delete-user/callback' | '/list-sessions' | '/revoke-session' | '/revoke-sessions' | '/revoke-other-sessions' | '/link-social' | '/list-accounts' | '/unlink-account' | '/refresh-token' | '/get-access-token' | '/ok' | '/error' | `/reset-password/${string}`;
|
|
420
|
-
type AthenaAuthErrorCode = 'NETWORK_ERROR' | 'HTTP_ERROR' | 'INVALID_JSON' | 'UNKNOWN_ERROR';
|
|
421
|
-
interface AthenaAuthErrorDetails {
|
|
422
|
-
code: AthenaAuthErrorCode;
|
|
423
|
-
message: string;
|
|
424
|
-
status: number;
|
|
425
|
-
endpoint?: AthenaAuthEndpointPath;
|
|
426
|
-
method?: AthenaAuthMethod;
|
|
427
|
-
requestId?: string;
|
|
428
|
-
hint?: string;
|
|
429
|
-
cause?: string;
|
|
430
|
-
}
|
|
431
|
-
interface AthenaAuthResult<T = unknown> {
|
|
432
|
-
ok: boolean;
|
|
433
|
-
status: number;
|
|
434
|
-
data: T | null;
|
|
435
|
-
error: string | null;
|
|
436
|
-
errorDetails?: AthenaAuthErrorDetails | null;
|
|
437
|
-
raw: unknown;
|
|
438
|
-
}
|
|
439
|
-
interface AthenaAuthUser {
|
|
440
|
-
id: string;
|
|
441
|
-
email: string;
|
|
442
|
-
name?: string | null;
|
|
443
|
-
image?: string | null;
|
|
444
|
-
emailVerified?: boolean;
|
|
445
|
-
createdAt?: string;
|
|
446
|
-
updatedAt?: string;
|
|
447
|
-
username?: string | null;
|
|
448
|
-
displayUsername?: string | null;
|
|
449
|
-
twoFactorEnabled?: boolean;
|
|
450
|
-
role?: string | null;
|
|
451
|
-
banned?: boolean;
|
|
452
|
-
banReason?: string | null;
|
|
453
|
-
banExpires?: string | null;
|
|
454
|
-
}
|
|
455
|
-
interface AthenaAuthSession {
|
|
456
|
-
id: string;
|
|
457
|
-
expiresAt?: string;
|
|
458
|
-
token?: string;
|
|
459
|
-
createdAt?: string;
|
|
460
|
-
updatedAt?: string;
|
|
461
|
-
ipAddress?: string | null;
|
|
462
|
-
userAgent?: string | null;
|
|
463
|
-
userId?: string;
|
|
464
|
-
impersonatedBy?: string | null;
|
|
465
|
-
activeOrganizationId?: string | null;
|
|
466
|
-
}
|
|
467
|
-
interface AthenaAuthSessionResponse {
|
|
468
|
-
session: AthenaAuthSession;
|
|
469
|
-
user: AthenaAuthUser;
|
|
470
|
-
}
|
|
471
|
-
interface AthenaEmailSignInRequest {
|
|
472
|
-
email: string;
|
|
473
|
-
password: string;
|
|
474
|
-
callbackURL?: string;
|
|
475
|
-
rememberMe?: boolean;
|
|
476
|
-
}
|
|
477
|
-
interface AthenaUsernameSignInRequest {
|
|
478
|
-
username: string;
|
|
479
|
-
password: string;
|
|
480
|
-
rememberMe?: boolean;
|
|
481
|
-
}
|
|
482
|
-
interface AthenaSocialSignInRequest {
|
|
483
|
-
provider: string;
|
|
484
|
-
callbackURL?: string;
|
|
485
|
-
newUserCallbackURL?: string;
|
|
486
|
-
errorCallbackURL?: string;
|
|
487
|
-
disableRedirect?: boolean;
|
|
488
|
-
idToken?: string;
|
|
489
|
-
scopes?: string[] | string;
|
|
490
|
-
requestSignUp?: boolean;
|
|
491
|
-
loginHint?: string;
|
|
492
|
-
}
|
|
493
|
-
interface AthenaEmailSignUpRequest {
|
|
494
|
-
name: string;
|
|
495
|
-
email: string;
|
|
496
|
-
password: string;
|
|
497
|
-
callbackURL?: string;
|
|
498
|
-
}
|
|
499
|
-
interface AthenaAuthSignInResponse {
|
|
500
|
-
redirect: false;
|
|
501
|
-
token: string;
|
|
502
|
-
url?: string | null;
|
|
503
|
-
user: AthenaAuthUser;
|
|
504
|
-
}
|
|
505
|
-
interface AthenaAuthSocialRedirectResponse {
|
|
506
|
-
url: string;
|
|
507
|
-
redirect: boolean;
|
|
508
|
-
}
|
|
509
|
-
interface AthenaAuthSignOutResponse {
|
|
510
|
-
success: boolean;
|
|
511
|
-
}
|
|
512
|
-
interface AthenaAuthStatusResponse {
|
|
513
|
-
status: boolean;
|
|
514
|
-
}
|
|
515
|
-
interface AthenaAuthRevokeSessionRequest {
|
|
516
|
-
token: string;
|
|
517
|
-
}
|
|
518
|
-
interface AthenaForgetPasswordRequest {
|
|
519
|
-
email: string;
|
|
520
|
-
redirectTo?: string;
|
|
521
|
-
}
|
|
522
|
-
interface AthenaResetPasswordRequest {
|
|
523
|
-
newPassword: string;
|
|
524
|
-
token?: string;
|
|
525
|
-
}
|
|
526
|
-
interface AthenaVerifyEmailRequest {
|
|
527
|
-
token: string;
|
|
528
|
-
callbackURL?: string;
|
|
529
|
-
}
|
|
530
|
-
interface AthenaSendVerificationEmailRequest {
|
|
531
|
-
email: string;
|
|
532
|
-
callbackURL?: string;
|
|
533
|
-
}
|
|
534
|
-
interface AthenaChangeEmailRequest {
|
|
535
|
-
newEmail: string;
|
|
536
|
-
callbackURL?: string;
|
|
537
|
-
}
|
|
538
|
-
interface AthenaChangePasswordRequest {
|
|
539
|
-
newPassword: string;
|
|
540
|
-
currentPassword: string;
|
|
541
|
-
revokeOtherSessions?: boolean;
|
|
542
|
-
}
|
|
543
|
-
interface AthenaUpdateUserRequest {
|
|
544
|
-
name?: string;
|
|
545
|
-
image?: string;
|
|
546
|
-
}
|
|
547
|
-
interface AthenaDeleteUserRequest {
|
|
548
|
-
callbackURL?: string;
|
|
549
|
-
password?: string;
|
|
550
|
-
token?: string;
|
|
551
|
-
}
|
|
552
|
-
interface AthenaDeleteUserCallbackRequest {
|
|
553
|
-
token?: string;
|
|
554
|
-
callbackURL?: string;
|
|
555
|
-
}
|
|
556
|
-
interface AthenaDeleteUserResponse {
|
|
557
|
-
success: boolean;
|
|
558
|
-
message?: string;
|
|
559
|
-
}
|
|
560
|
-
interface AthenaAuthEmailChangeResponse {
|
|
561
|
-
status: boolean;
|
|
562
|
-
message?: string | null;
|
|
563
|
-
}
|
|
564
|
-
interface AthenaLinkSocialRequest {
|
|
565
|
-
provider: string;
|
|
566
|
-
callbackURL?: string;
|
|
567
|
-
scopes?: string[] | string;
|
|
568
|
-
}
|
|
569
|
-
interface AthenaUnlinkAccountRequest {
|
|
570
|
-
providerId: string;
|
|
571
|
-
accountId?: string;
|
|
572
|
-
}
|
|
573
|
-
interface AthenaOAuthAccountTokenRequest {
|
|
574
|
-
providerId: string;
|
|
575
|
-
accountId?: string;
|
|
576
|
-
userId?: string;
|
|
577
|
-
}
|
|
578
|
-
interface AthenaOAuthTokenBundle {
|
|
579
|
-
tokenType?: string;
|
|
580
|
-
idToken?: string;
|
|
581
|
-
accessToken?: string;
|
|
582
|
-
refreshToken?: string;
|
|
583
|
-
accessTokenExpiresAt?: string;
|
|
584
|
-
refreshTokenExpiresAt?: string;
|
|
585
|
-
}
|
|
586
|
-
interface AthenaAuthLinkedAccount {
|
|
587
|
-
id: string;
|
|
588
|
-
provider?: string;
|
|
589
|
-
accountId?: string;
|
|
590
|
-
scopes?: string[];
|
|
591
|
-
createdAt?: string;
|
|
592
|
-
updatedAt?: string;
|
|
593
|
-
}
|
|
594
|
-
interface AthenaAuthRequestInput {
|
|
595
|
-
endpoint: AthenaAuthEndpointPath;
|
|
596
|
-
method?: AthenaAuthMethod;
|
|
597
|
-
body?: unknown;
|
|
598
|
-
query?: Record<string, AthenaAuthQueryValue>;
|
|
599
|
-
fetchOptions?: AthenaAuthCallOptions;
|
|
600
|
-
}
|
|
601
|
-
interface AthenaAuthCallOptions {
|
|
602
|
-
baseUrl?: string;
|
|
603
|
-
apiKey?: string;
|
|
604
|
-
bearerToken?: string;
|
|
605
|
-
headers?: Record<string, string>;
|
|
606
|
-
credentials?: AthenaAuthCredentials;
|
|
607
|
-
signal?: AbortSignal;
|
|
608
|
-
}
|
|
609
|
-
interface AthenaAuthFetchCompatibleInput {
|
|
610
|
-
fetchOptions?: AthenaAuthCallOptions;
|
|
611
|
-
}
|
|
612
|
-
interface AthenaAuthClientConfig extends AthenaAuthCallOptions {
|
|
613
|
-
fetch?: typeof fetch;
|
|
614
|
-
}
|
|
615
|
-
interface AthenaAuthSdkClient {
|
|
616
|
-
baseUrl: string;
|
|
617
|
-
request: <T = unknown>(input: AthenaAuthRequestInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<T>>;
|
|
618
|
-
signIn: {
|
|
619
|
-
email: (input: AthenaEmailSignInRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignInResponse>>;
|
|
620
|
-
username: (input: AthenaUsernameSignInRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignInResponse>>;
|
|
621
|
-
social: (input: AthenaSocialSignInRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSocialRedirectResponse | AthenaAuthSignInResponse>>;
|
|
622
|
-
};
|
|
623
|
-
signUp: {
|
|
624
|
-
email: (input: AthenaEmailSignUpRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignInResponse>>;
|
|
625
|
-
};
|
|
626
|
-
signOut: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignOutResponse>>;
|
|
627
|
-
logout: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSignOutResponse>>;
|
|
628
|
-
getSession: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSessionResponse>>;
|
|
629
|
-
listSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSession[]>>;
|
|
630
|
-
revokeSession: (input: AthenaAuthRevokeSessionRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
631
|
-
clearSession: (input: AthenaAuthRevokeSessionRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
632
|
-
revokeSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
633
|
-
clearSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
634
|
-
revokeOtherSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
635
|
-
clearOtherSessions: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
636
|
-
forgetPassword: (input: AthenaForgetPasswordRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
637
|
-
resetPassword: (input: AthenaResetPasswordRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
638
|
-
resolveResetPasswordToken: (input: {
|
|
639
|
-
token: string;
|
|
640
|
-
callbackURL?: string;
|
|
641
|
-
} & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<{
|
|
642
|
-
token?: string;
|
|
643
|
-
}>>;
|
|
644
|
-
verifyEmail: (input: AthenaVerifyEmailRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<{
|
|
645
|
-
user: AthenaAuthUser;
|
|
646
|
-
status: boolean;
|
|
647
|
-
}>>;
|
|
648
|
-
sendVerificationEmail: (input: AthenaSendVerificationEmailRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
649
|
-
changeEmail: (input: AthenaChangeEmailRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthEmailChangeResponse>>;
|
|
650
|
-
changePassword: (input: AthenaChangePasswordRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<{
|
|
651
|
-
token?: string | null;
|
|
652
|
-
user: AthenaAuthUser;
|
|
653
|
-
}>>;
|
|
654
|
-
updateUser: (input: AthenaUpdateUserRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
655
|
-
deleteUser: (input?: AthenaDeleteUserRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaDeleteUserResponse>>;
|
|
656
|
-
deleteUserCallback: (input?: AthenaDeleteUserCallbackRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaDeleteUserResponse>>;
|
|
657
|
-
linkSocial: (input: AthenaLinkSocialRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthSocialRedirectResponse>>;
|
|
658
|
-
listAccounts: (input?: AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthLinkedAccount[]>>;
|
|
659
|
-
unlinkAccount: (input: AthenaUnlinkAccountRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaAuthStatusResponse>>;
|
|
660
|
-
refreshToken: (input: AthenaOAuthAccountTokenRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaOAuthTokenBundle>>;
|
|
661
|
-
getAccessToken: (input: AthenaOAuthAccountTokenRequest & AthenaAuthFetchCompatibleInput, options?: AthenaAuthCallOptions) => Promise<AthenaAuthResult<AthenaOAuthTokenBundle>>;
|
|
662
|
-
}
|
|
663
|
-
|
|
428
|
+
/**
|
|
429
|
+
* @deprecated Prefer `createClient(...).auth` from `@xylex-group/athena`.
|
|
430
|
+
*/
|
|
664
431
|
declare function createAuthClient(config?: AthenaAuthClientConfig): AthenaAuthSdkClient;
|
|
665
432
|
|
|
666
|
-
export {
|
|
433
|
+
export { AthenaAuthBindings, AthenaAuthClientConfig, AthenaAuthSdkClient, AthenaClient, AthenaConditionCastType, type AthenaCreateClientOptions, AthenaError, AthenaErrorCategory, AthenaErrorCode, type AthenaErrorInput, AthenaErrorKind, AthenaGatewayCallOptions, AthenaGatewayErrorDetails, AthenaGeneratorConfig, AthenaJsonObject, AthenaJsonValue, type AthenaOperationContext, type AthenaResult, AthenaRpcCallOptions, type AthenaSdkClient, type AthenaSdkClientWithAuth, BackendConfig, BackendType, DEFAULT_POSTGRES_SCHEMAS, DatabaseDef, GeneratedArtifacts, GeneratorExperimentalFlags, GeneratorProviderConfig, GeneratorSchemaSelection, InsertOf, type IntCoercionOptions, IntrospectionColumn, IntrospectionSnapshot, LoadGeneratorConfigOptions, LoadedGeneratorConfig, ModelAt, ModelDef, ModelMetadata, type NormalizedAthenaError, NormalizedAthenaGeneratorConfig, type PostgresIntrospectionProviderOptions, RegistryDef, type RequireAffectedOptions, type RetryBackoffStrategy, type RetryConfig, RowOf, type RpcOrderOptions, type RpcQueryBuilder, SchemaDef, SchemaIntrospectionProvider, type TableQueryBuilder, TenantContext, TenantKeyMap, type TypedAthenaClient, type TypedClientOptions, type UnwrapOneOptions, type UnwrapOptions, UpdateOf, assertInt, coerceInt, createAuthClient, createClient, createPostgresIntrospectionProvider, createTypedClient, defineDatabase, defineGeneratorConfig, defineModel, defineRegistry, defineSchema, findGeneratorConfigPath, generateArtifactsFromSnapshot, identifier, isOk, loadGeneratorConfig, normalizeAthenaError, normalizeGeneratorConfig, normalizeSchemaSelection, parseBooleanFlag, requireAffected, requireSuccess, resolveGeneratorProvider, resolvePostgresColumnType, resolveProviderSchemas, unwrap, unwrapOne, unwrapRows, withRetry };
|