@fluxbase/sdk 0.0.1-rc.115 → 0.0.1-rc.116
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/dist/index.cjs +53 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -1
- package/dist/index.d.ts +58 -1
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -631,6 +631,30 @@ interface OAuthUrlResponse {
|
|
|
631
631
|
url: string;
|
|
632
632
|
provider: string;
|
|
633
633
|
}
|
|
634
|
+
/**
|
|
635
|
+
* Options for OAuth logout
|
|
636
|
+
*/
|
|
637
|
+
interface OAuthLogoutOptions {
|
|
638
|
+
/** URL to redirect to after logout completes */
|
|
639
|
+
redirect_url?: string;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Response from OAuth logout endpoint
|
|
643
|
+
*/
|
|
644
|
+
interface OAuthLogoutResponse {
|
|
645
|
+
/** OAuth provider name */
|
|
646
|
+
provider: string;
|
|
647
|
+
/** Whether local JWT tokens were revoked */
|
|
648
|
+
local_tokens_revoked: boolean;
|
|
649
|
+
/** Whether the token was revoked at the OAuth provider */
|
|
650
|
+
provider_token_revoked: boolean;
|
|
651
|
+
/** Whether the user should be redirected to the provider's logout page */
|
|
652
|
+
requires_redirect?: boolean;
|
|
653
|
+
/** URL to redirect to for OIDC logout (if requires_redirect is true) */
|
|
654
|
+
redirect_url?: string;
|
|
655
|
+
/** Warning message if something failed but logout still proceeded */
|
|
656
|
+
warning?: string;
|
|
657
|
+
}
|
|
634
658
|
/**
|
|
635
659
|
* SAML Identity Provider configuration
|
|
636
660
|
*/
|
|
@@ -3833,6 +3857,39 @@ declare class FluxbaseAuth {
|
|
|
3833
3857
|
provider: string;
|
|
3834
3858
|
url: string;
|
|
3835
3859
|
}>>;
|
|
3860
|
+
/**
|
|
3861
|
+
* Get OAuth logout URL for a provider
|
|
3862
|
+
* Use this to get the logout URL without automatically redirecting
|
|
3863
|
+
* @param provider - OAuth provider name (e.g., 'google', 'github')
|
|
3864
|
+
* @param options - Optional logout configuration
|
|
3865
|
+
* @returns Promise with OAuth logout response including redirect URL if applicable
|
|
3866
|
+
*
|
|
3867
|
+
* @example
|
|
3868
|
+
* ```typescript
|
|
3869
|
+
* const { data, error } = await client.auth.getOAuthLogoutUrl('google')
|
|
3870
|
+
* if (!error && data.redirect_url) {
|
|
3871
|
+
* // Redirect user to complete logout at provider
|
|
3872
|
+
* window.location.href = data.redirect_url
|
|
3873
|
+
* }
|
|
3874
|
+
* ```
|
|
3875
|
+
*/
|
|
3876
|
+
getOAuthLogoutUrl(provider: string, options?: OAuthLogoutOptions): Promise<DataResponse<OAuthLogoutResponse>>;
|
|
3877
|
+
/**
|
|
3878
|
+
* Sign out with OAuth provider logout
|
|
3879
|
+
* Revokes tokens at the OAuth provider and optionally redirects for OIDC logout
|
|
3880
|
+
* @param provider - OAuth provider name (e.g., 'google', 'github')
|
|
3881
|
+
* @param options - Optional logout configuration
|
|
3882
|
+
* @returns Promise with OAuth logout response
|
|
3883
|
+
*
|
|
3884
|
+
* @example
|
|
3885
|
+
* ```typescript
|
|
3886
|
+
* // This will revoke tokens and redirect to provider's logout page if supported
|
|
3887
|
+
* await client.auth.signOutWithOAuth('google', {
|
|
3888
|
+
* redirect_url: 'https://myapp.com/logged-out'
|
|
3889
|
+
* })
|
|
3890
|
+
* ```
|
|
3891
|
+
*/
|
|
3892
|
+
signOutWithOAuth(provider: string, options?: OAuthLogoutOptions): Promise<DataResponse<OAuthLogoutResponse>>;
|
|
3836
3893
|
/**
|
|
3837
3894
|
* Sign in with OTP (One-Time Password) - Supabase-compatible
|
|
3838
3895
|
* Sends a one-time password via email or SMS for passwordless authentication
|
|
@@ -11325,4 +11382,4 @@ declare function isBoolean(value: unknown): value is boolean;
|
|
|
11325
11382
|
*/
|
|
11326
11383
|
declare function assertType<T>(value: unknown, validator: (v: unknown) => v is T, errorMessage?: string): asserts value is T;
|
|
11327
11384
|
|
|
11328
|
-
export { type AIChatClientMessage, type AIChatEvent, type AIChatEventType, type AIChatMessageRole, type AIChatOptions, type AIChatServerMessage, type AIChatbot, type AIChatbotSummary, type AIConversation, type AIConversationMessage, type AIProvider, type AIProviderType, type AIUsageStats, type AIUserConversationDetail, type AIUserConversationSummary, type AIUserMessage, type AIUserQueryResult, type AIUserUsageStats, type APIKey, APIKeysManager, type AcceptInvitationRequest, type AcceptInvitationResponse, type AdminAuthResponse, type AdminBucket, type AdminListBucketsResponse, type AdminListObjectsResponse, type AdminLoginRequest, type AdminMeResponse, type AdminRefreshRequest, type AdminRefreshResponse, type AdminSetupRequest, type AdminSetupStatusResponse, type AdminStorageObject, type AdminUser, type AppSettings, AppSettingsManager, type ApplyMigrationRequest, type ApplyPendingRequest, type AuthResponse, type AuthResponseData, type AuthSession, type AuthSettings, AuthSettingsManager, type AuthenticationSettings, type Branch, type BranchActivity, type BranchPoolStats, type BranchStatus, type BranchType, type BroadcastCallback, type BroadcastMessage, type BundleOptions, type BundleResult, type CaptchaConfig, type CaptchaProvider, type ChatbotSpec, type ChunkedUploadSession, type ClientKey, ClientKeysManager, type Column, type CreateAIProviderRequest, type CreateAPIKeyRequest, type CreateAPIKeyResponse, type CreateBranchOptions, type CreateClientKeyRequest, type CreateClientKeyResponse, type CreateColumnRequest, type CreateFunctionRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateMigrationRequest, type CreateOAuthProviderRequest, type CreateOAuthProviderResponse, type CreateSchemaRequest, type CreateSchemaResponse, type CreateTableRequest, type CreateTableResponse, type CreateWebhookRequest, DDLManager, type DataCloneMode, type DataResponse, type DeleteAPIKeyResponse, type DeleteClientKeyResponse, type DeleteOAuthProviderResponse, type DeleteTableResponse, type DeleteUserResponse, type DeleteWebhookResponse, type DownloadOptions, type DownloadProgress, type EdgeFunction, type EdgeFunctionExecution, type EmailProviderSettings, type EmailSettingOverride, type EmailSettings, EmailSettingsManager, type EmailTemplate, EmailTemplateManager, type EmailTemplateType, type EmbedRequest, type EmbedResponse, type EnrichedUser, type ExecutionLog, type ExecutionLogCallback, type ExecutionLogConfig, type ExecutionLogEvent, type ExecutionLogLevel, ExecutionLogsChannel, type ExecutionType, type FeatureSettings, type FileObject, type FilterOperator, FluxbaseAI, FluxbaseAIChat, FluxbaseAdmin, FluxbaseAdminAI, FluxbaseAdminFunctions, FluxbaseAdminJobs, FluxbaseAdminMigrations, FluxbaseAdminRPC, FluxbaseAdminStorage, FluxbaseAuth, type FluxbaseAuthResponse, FluxbaseBranching, FluxbaseClient, type FluxbaseClientOptions, type FluxbaseError, FluxbaseFetch, FluxbaseFunctions, FluxbaseGraphQL, FluxbaseJobs, FluxbaseManagement, FluxbaseOAuth, FluxbaseRPC, FluxbaseRealtime, type FluxbaseResponse, FluxbaseSettings, FluxbaseStorage, FluxbaseVector, type FunctionInvokeOptions, type FunctionSpec, type GetImpersonationResponse, type GraphQLError, type GraphQLErrorLocation, type GraphQLRequestOptions, type GraphQLResponse, type HealthResponse, type HttpMethod, type ImageFitMode, type ImageFormat, type ImpersonateAnonRequest, type ImpersonateServiceRequest, type ImpersonateUserRequest, ImpersonationManager, type ImpersonationSession, type ImpersonationTargetUser, type ImpersonationType, type IntrospectionDirective, type IntrospectionEnumValue, type IntrospectionField, type IntrospectionInputValue, type IntrospectionSchema, type IntrospectionType, type IntrospectionTypeRef, type Invitation, InvitationsManager, type InviteUserRequest, type InviteUserResponse, type ListAPIKeysResponse, type ListBranchesOptions, type ListBranchesResponse, type ListClientKeysResponse, type ListConversationsOptions, type ListConversationsResult, type ListEmailTemplatesResponse, type ListImpersonationSessionsOptions, type ListImpersonationSessionsResponse, type ListInvitationsOptions, type ListInvitationsResponse, type ListOAuthProvidersResponse, type ListOptions, type ListSchemasResponse, type ListSystemSettingsResponse, type ListTablesResponse, type ListUsersOptions, type ListUsersResponse, type ListWebhookDeliveriesResponse, type ListWebhooksResponse, type MailgunSettings, type Migration, type MigrationExecution, type OAuthProvider, OAuthProviderManager, type OrderBy, type OrderDirection, type PostgresChangesConfig, type PostgrestError, type PostgrestResponse, type PresenceCallback, type PresenceState, QueryBuilder, type QueryFilter, type RPCExecution, type RPCExecutionFilters, type RPCExecutionLog, type RPCExecutionStatus, type RPCInvokeResponse, type RPCProcedure, type RPCProcedureSpec, type RPCProcedureSummary, type RealtimeBroadcastPayload, type RealtimeCallback, type RealtimeChangePayload, RealtimeChannel, type RealtimeChannelConfig, type RealtimeMessage, type RealtimePostgresChangesPayload, type RealtimePresencePayload, type RequestOptions, type ResetUserPasswordResponse, type ResumableDownloadData, type ResumableDownloadOptions, type ResumableUploadOptions, type ResumableUploadProgress, type RevokeAPIKeyResponse, type RevokeClientKeyResponse, type RevokeInvitationResponse, type RollbackMigrationRequest, type SAMLLoginOptions, type SAMLLoginResponse, type SAMLProvider, type SAMLProvidersResponse, type SAMLSession, type SESSettings, type SMTPSettings, type Schema, SchemaQueryBuilder, type SecuritySettings, type SendEmailRequest, type SendGridSettings, type SessionResponse, SettingsClient, type SignInCredentials, type SignInWith2FAResponse, type SignUpCredentials, type SignedUrlOptions, type SignedUrlResponse, type StartImpersonationResponse, type StopImpersonationResponse, StorageBucket, type StorageObject, type StreamDownloadData, type StreamUploadOptions, type SupabaseAuthResponse, type SupabaseResponse, type SyncChatbotsOptions, type SyncChatbotsResult, type SyncError, type SyncFunctionsOptions, type SyncFunctionsResult, type SyncMigrationsOptions, type SyncMigrationsResult, type SyncRPCOptions, type SyncRPCResult, type SystemSetting, SystemSettingsManager, type Table, type TestEmailSettingsResponse, type TestEmailTemplateRequest, type TestWebhookResponse, type TransformOptions, type TwoFactorEnableResponse, type TwoFactorSetupResponse, type TwoFactorStatusResponse, type TwoFactorVerifyRequest, type UpdateAIProviderRequest, type UpdateAPIKeyRequest, type UpdateAppSettingsRequest, type UpdateAuthSettingsRequest, type UpdateAuthSettingsResponse, type UpdateClientKeyRequest, type UpdateConversationOptions, type UpdateEmailProviderSettingsRequest, type UpdateEmailTemplateRequest, type UpdateFunctionRequest, type UpdateMigrationRequest, type UpdateOAuthProviderRequest, type UpdateOAuthProviderResponse, type UpdateRPCProcedureRequest, type UpdateSystemSettingRequest, type UpdateUserAttributes, type UpdateUserRoleRequest, type UpdateWebhookRequest, type UploadOptions, type UploadProgress, type UpsertOptions, type User, type UserResponse, type ValidateInvitationResponse, type VectorMetric, type VectorOrderOptions, type VectorSearchOptions, type VectorSearchResult, type VoidResponse, type WeakPassword, type Webhook, type WebhookDelivery, WebhooksManager, assertType, bundleCode, createClient, denoExternalPlugin, hasPostgrestError, isArray, isAuthError, isAuthSuccess, isBoolean, isFluxbaseError, isFluxbaseSuccess, isNumber, isObject, isPostgrestSuccess, isString, loadImportMap };
|
|
11385
|
+
export { type AIChatClientMessage, type AIChatEvent, type AIChatEventType, type AIChatMessageRole, type AIChatOptions, type AIChatServerMessage, type AIChatbot, type AIChatbotSummary, type AIConversation, type AIConversationMessage, type AIProvider, type AIProviderType, type AIUsageStats, type AIUserConversationDetail, type AIUserConversationSummary, type AIUserMessage, type AIUserQueryResult, type AIUserUsageStats, type APIKey, APIKeysManager, type AcceptInvitationRequest, type AcceptInvitationResponse, type AdminAuthResponse, type AdminBucket, type AdminListBucketsResponse, type AdminListObjectsResponse, type AdminLoginRequest, type AdminMeResponse, type AdminRefreshRequest, type AdminRefreshResponse, type AdminSetupRequest, type AdminSetupStatusResponse, type AdminStorageObject, type AdminUser, type AppSettings, AppSettingsManager, type ApplyMigrationRequest, type ApplyPendingRequest, type AuthResponse, type AuthResponseData, type AuthSession, type AuthSettings, AuthSettingsManager, type AuthenticationSettings, type Branch, type BranchActivity, type BranchPoolStats, type BranchStatus, type BranchType, type BroadcastCallback, type BroadcastMessage, type BundleOptions, type BundleResult, type CaptchaConfig, type CaptchaProvider, type ChatbotSpec, type ChunkedUploadSession, type ClientKey, ClientKeysManager, type Column, type CreateAIProviderRequest, type CreateAPIKeyRequest, type CreateAPIKeyResponse, type CreateBranchOptions, type CreateClientKeyRequest, type CreateClientKeyResponse, type CreateColumnRequest, type CreateFunctionRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateMigrationRequest, type CreateOAuthProviderRequest, type CreateOAuthProviderResponse, type CreateSchemaRequest, type CreateSchemaResponse, type CreateTableRequest, type CreateTableResponse, type CreateWebhookRequest, DDLManager, type DataCloneMode, type DataResponse, type DeleteAPIKeyResponse, type DeleteClientKeyResponse, type DeleteOAuthProviderResponse, type DeleteTableResponse, type DeleteUserResponse, type DeleteWebhookResponse, type DownloadOptions, type DownloadProgress, type EdgeFunction, type EdgeFunctionExecution, type EmailProviderSettings, type EmailSettingOverride, type EmailSettings, EmailSettingsManager, type EmailTemplate, EmailTemplateManager, type EmailTemplateType, type EmbedRequest, type EmbedResponse, type EnrichedUser, type ExecutionLog, type ExecutionLogCallback, type ExecutionLogConfig, type ExecutionLogEvent, type ExecutionLogLevel, ExecutionLogsChannel, type ExecutionType, type FeatureSettings, type FileObject, type FilterOperator, FluxbaseAI, FluxbaseAIChat, FluxbaseAdmin, FluxbaseAdminAI, FluxbaseAdminFunctions, FluxbaseAdminJobs, FluxbaseAdminMigrations, FluxbaseAdminRPC, FluxbaseAdminStorage, FluxbaseAuth, type FluxbaseAuthResponse, FluxbaseBranching, FluxbaseClient, type FluxbaseClientOptions, type FluxbaseError, FluxbaseFetch, FluxbaseFunctions, FluxbaseGraphQL, FluxbaseJobs, FluxbaseManagement, FluxbaseOAuth, FluxbaseRPC, FluxbaseRealtime, type FluxbaseResponse, FluxbaseSettings, FluxbaseStorage, FluxbaseVector, type FunctionInvokeOptions, type FunctionSpec, type GetImpersonationResponse, type GraphQLError, type GraphQLErrorLocation, type GraphQLRequestOptions, type GraphQLResponse, type HealthResponse, type HttpMethod, type ImageFitMode, type ImageFormat, type ImpersonateAnonRequest, type ImpersonateServiceRequest, type ImpersonateUserRequest, ImpersonationManager, type ImpersonationSession, type ImpersonationTargetUser, type ImpersonationType, type IntrospectionDirective, type IntrospectionEnumValue, type IntrospectionField, type IntrospectionInputValue, type IntrospectionSchema, type IntrospectionType, type IntrospectionTypeRef, type Invitation, InvitationsManager, type InviteUserRequest, type InviteUserResponse, type ListAPIKeysResponse, type ListBranchesOptions, type ListBranchesResponse, type ListClientKeysResponse, type ListConversationsOptions, type ListConversationsResult, type ListEmailTemplatesResponse, type ListImpersonationSessionsOptions, type ListImpersonationSessionsResponse, type ListInvitationsOptions, type ListInvitationsResponse, type ListOAuthProvidersResponse, type ListOptions, type ListSchemasResponse, type ListSystemSettingsResponse, type ListTablesResponse, type ListUsersOptions, type ListUsersResponse, type ListWebhookDeliveriesResponse, type ListWebhooksResponse, type MailgunSettings, type Migration, type MigrationExecution, type OAuthLogoutOptions, type OAuthLogoutResponse, type OAuthProvider, OAuthProviderManager, type OrderBy, type OrderDirection, type PostgresChangesConfig, type PostgrestError, type PostgrestResponse, type PresenceCallback, type PresenceState, QueryBuilder, type QueryFilter, type RPCExecution, type RPCExecutionFilters, type RPCExecutionLog, type RPCExecutionStatus, type RPCInvokeResponse, type RPCProcedure, type RPCProcedureSpec, type RPCProcedureSummary, type RealtimeBroadcastPayload, type RealtimeCallback, type RealtimeChangePayload, RealtimeChannel, type RealtimeChannelConfig, type RealtimeMessage, type RealtimePostgresChangesPayload, type RealtimePresencePayload, type RequestOptions, type ResetUserPasswordResponse, type ResumableDownloadData, type ResumableDownloadOptions, type ResumableUploadOptions, type ResumableUploadProgress, type RevokeAPIKeyResponse, type RevokeClientKeyResponse, type RevokeInvitationResponse, type RollbackMigrationRequest, type SAMLLoginOptions, type SAMLLoginResponse, type SAMLProvider, type SAMLProvidersResponse, type SAMLSession, type SESSettings, type SMTPSettings, type Schema, SchemaQueryBuilder, type SecuritySettings, type SendEmailRequest, type SendGridSettings, type SessionResponse, SettingsClient, type SignInCredentials, type SignInWith2FAResponse, type SignUpCredentials, type SignedUrlOptions, type SignedUrlResponse, type StartImpersonationResponse, type StopImpersonationResponse, StorageBucket, type StorageObject, type StreamDownloadData, type StreamUploadOptions, type SupabaseAuthResponse, type SupabaseResponse, type SyncChatbotsOptions, type SyncChatbotsResult, type SyncError, type SyncFunctionsOptions, type SyncFunctionsResult, type SyncMigrationsOptions, type SyncMigrationsResult, type SyncRPCOptions, type SyncRPCResult, type SystemSetting, SystemSettingsManager, type Table, type TestEmailSettingsResponse, type TestEmailTemplateRequest, type TestWebhookResponse, type TransformOptions, type TwoFactorEnableResponse, type TwoFactorSetupResponse, type TwoFactorStatusResponse, type TwoFactorVerifyRequest, type UpdateAIProviderRequest, type UpdateAPIKeyRequest, type UpdateAppSettingsRequest, type UpdateAuthSettingsRequest, type UpdateAuthSettingsResponse, type UpdateClientKeyRequest, type UpdateConversationOptions, type UpdateEmailProviderSettingsRequest, type UpdateEmailTemplateRequest, type UpdateFunctionRequest, type UpdateMigrationRequest, type UpdateOAuthProviderRequest, type UpdateOAuthProviderResponse, type UpdateRPCProcedureRequest, type UpdateSystemSettingRequest, type UpdateUserAttributes, type UpdateUserRoleRequest, type UpdateWebhookRequest, type UploadOptions, type UploadProgress, type UpsertOptions, type User, type UserResponse, type ValidateInvitationResponse, type VectorMetric, type VectorOrderOptions, type VectorSearchOptions, type VectorSearchResult, type VoidResponse, type WeakPassword, type Webhook, type WebhookDelivery, WebhooksManager, assertType, bundleCode, createClient, denoExternalPlugin, hasPostgrestError, isArray, isAuthError, isAuthSuccess, isBoolean, isFluxbaseError, isFluxbaseSuccess, isNumber, isObject, isPostgrestSuccess, isString, loadImportMap };
|
package/dist/index.d.ts
CHANGED
|
@@ -631,6 +631,30 @@ interface OAuthUrlResponse {
|
|
|
631
631
|
url: string;
|
|
632
632
|
provider: string;
|
|
633
633
|
}
|
|
634
|
+
/**
|
|
635
|
+
* Options for OAuth logout
|
|
636
|
+
*/
|
|
637
|
+
interface OAuthLogoutOptions {
|
|
638
|
+
/** URL to redirect to after logout completes */
|
|
639
|
+
redirect_url?: string;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Response from OAuth logout endpoint
|
|
643
|
+
*/
|
|
644
|
+
interface OAuthLogoutResponse {
|
|
645
|
+
/** OAuth provider name */
|
|
646
|
+
provider: string;
|
|
647
|
+
/** Whether local JWT tokens were revoked */
|
|
648
|
+
local_tokens_revoked: boolean;
|
|
649
|
+
/** Whether the token was revoked at the OAuth provider */
|
|
650
|
+
provider_token_revoked: boolean;
|
|
651
|
+
/** Whether the user should be redirected to the provider's logout page */
|
|
652
|
+
requires_redirect?: boolean;
|
|
653
|
+
/** URL to redirect to for OIDC logout (if requires_redirect is true) */
|
|
654
|
+
redirect_url?: string;
|
|
655
|
+
/** Warning message if something failed but logout still proceeded */
|
|
656
|
+
warning?: string;
|
|
657
|
+
}
|
|
634
658
|
/**
|
|
635
659
|
* SAML Identity Provider configuration
|
|
636
660
|
*/
|
|
@@ -3833,6 +3857,39 @@ declare class FluxbaseAuth {
|
|
|
3833
3857
|
provider: string;
|
|
3834
3858
|
url: string;
|
|
3835
3859
|
}>>;
|
|
3860
|
+
/**
|
|
3861
|
+
* Get OAuth logout URL for a provider
|
|
3862
|
+
* Use this to get the logout URL without automatically redirecting
|
|
3863
|
+
* @param provider - OAuth provider name (e.g., 'google', 'github')
|
|
3864
|
+
* @param options - Optional logout configuration
|
|
3865
|
+
* @returns Promise with OAuth logout response including redirect URL if applicable
|
|
3866
|
+
*
|
|
3867
|
+
* @example
|
|
3868
|
+
* ```typescript
|
|
3869
|
+
* const { data, error } = await client.auth.getOAuthLogoutUrl('google')
|
|
3870
|
+
* if (!error && data.redirect_url) {
|
|
3871
|
+
* // Redirect user to complete logout at provider
|
|
3872
|
+
* window.location.href = data.redirect_url
|
|
3873
|
+
* }
|
|
3874
|
+
* ```
|
|
3875
|
+
*/
|
|
3876
|
+
getOAuthLogoutUrl(provider: string, options?: OAuthLogoutOptions): Promise<DataResponse<OAuthLogoutResponse>>;
|
|
3877
|
+
/**
|
|
3878
|
+
* Sign out with OAuth provider logout
|
|
3879
|
+
* Revokes tokens at the OAuth provider and optionally redirects for OIDC logout
|
|
3880
|
+
* @param provider - OAuth provider name (e.g., 'google', 'github')
|
|
3881
|
+
* @param options - Optional logout configuration
|
|
3882
|
+
* @returns Promise with OAuth logout response
|
|
3883
|
+
*
|
|
3884
|
+
* @example
|
|
3885
|
+
* ```typescript
|
|
3886
|
+
* // This will revoke tokens and redirect to provider's logout page if supported
|
|
3887
|
+
* await client.auth.signOutWithOAuth('google', {
|
|
3888
|
+
* redirect_url: 'https://myapp.com/logged-out'
|
|
3889
|
+
* })
|
|
3890
|
+
* ```
|
|
3891
|
+
*/
|
|
3892
|
+
signOutWithOAuth(provider: string, options?: OAuthLogoutOptions): Promise<DataResponse<OAuthLogoutResponse>>;
|
|
3836
3893
|
/**
|
|
3837
3894
|
* Sign in with OTP (One-Time Password) - Supabase-compatible
|
|
3838
3895
|
* Sends a one-time password via email or SMS for passwordless authentication
|
|
@@ -11325,4 +11382,4 @@ declare function isBoolean(value: unknown): value is boolean;
|
|
|
11325
11382
|
*/
|
|
11326
11383
|
declare function assertType<T>(value: unknown, validator: (v: unknown) => v is T, errorMessage?: string): asserts value is T;
|
|
11327
11384
|
|
|
11328
|
-
export { type AIChatClientMessage, type AIChatEvent, type AIChatEventType, type AIChatMessageRole, type AIChatOptions, type AIChatServerMessage, type AIChatbot, type AIChatbotSummary, type AIConversation, type AIConversationMessage, type AIProvider, type AIProviderType, type AIUsageStats, type AIUserConversationDetail, type AIUserConversationSummary, type AIUserMessage, type AIUserQueryResult, type AIUserUsageStats, type APIKey, APIKeysManager, type AcceptInvitationRequest, type AcceptInvitationResponse, type AdminAuthResponse, type AdminBucket, type AdminListBucketsResponse, type AdminListObjectsResponse, type AdminLoginRequest, type AdminMeResponse, type AdminRefreshRequest, type AdminRefreshResponse, type AdminSetupRequest, type AdminSetupStatusResponse, type AdminStorageObject, type AdminUser, type AppSettings, AppSettingsManager, type ApplyMigrationRequest, type ApplyPendingRequest, type AuthResponse, type AuthResponseData, type AuthSession, type AuthSettings, AuthSettingsManager, type AuthenticationSettings, type Branch, type BranchActivity, type BranchPoolStats, type BranchStatus, type BranchType, type BroadcastCallback, type BroadcastMessage, type BundleOptions, type BundleResult, type CaptchaConfig, type CaptchaProvider, type ChatbotSpec, type ChunkedUploadSession, type ClientKey, ClientKeysManager, type Column, type CreateAIProviderRequest, type CreateAPIKeyRequest, type CreateAPIKeyResponse, type CreateBranchOptions, type CreateClientKeyRequest, type CreateClientKeyResponse, type CreateColumnRequest, type CreateFunctionRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateMigrationRequest, type CreateOAuthProviderRequest, type CreateOAuthProviderResponse, type CreateSchemaRequest, type CreateSchemaResponse, type CreateTableRequest, type CreateTableResponse, type CreateWebhookRequest, DDLManager, type DataCloneMode, type DataResponse, type DeleteAPIKeyResponse, type DeleteClientKeyResponse, type DeleteOAuthProviderResponse, type DeleteTableResponse, type DeleteUserResponse, type DeleteWebhookResponse, type DownloadOptions, type DownloadProgress, type EdgeFunction, type EdgeFunctionExecution, type EmailProviderSettings, type EmailSettingOverride, type EmailSettings, EmailSettingsManager, type EmailTemplate, EmailTemplateManager, type EmailTemplateType, type EmbedRequest, type EmbedResponse, type EnrichedUser, type ExecutionLog, type ExecutionLogCallback, type ExecutionLogConfig, type ExecutionLogEvent, type ExecutionLogLevel, ExecutionLogsChannel, type ExecutionType, type FeatureSettings, type FileObject, type FilterOperator, FluxbaseAI, FluxbaseAIChat, FluxbaseAdmin, FluxbaseAdminAI, FluxbaseAdminFunctions, FluxbaseAdminJobs, FluxbaseAdminMigrations, FluxbaseAdminRPC, FluxbaseAdminStorage, FluxbaseAuth, type FluxbaseAuthResponse, FluxbaseBranching, FluxbaseClient, type FluxbaseClientOptions, type FluxbaseError, FluxbaseFetch, FluxbaseFunctions, FluxbaseGraphQL, FluxbaseJobs, FluxbaseManagement, FluxbaseOAuth, FluxbaseRPC, FluxbaseRealtime, type FluxbaseResponse, FluxbaseSettings, FluxbaseStorage, FluxbaseVector, type FunctionInvokeOptions, type FunctionSpec, type GetImpersonationResponse, type GraphQLError, type GraphQLErrorLocation, type GraphQLRequestOptions, type GraphQLResponse, type HealthResponse, type HttpMethod, type ImageFitMode, type ImageFormat, type ImpersonateAnonRequest, type ImpersonateServiceRequest, type ImpersonateUserRequest, ImpersonationManager, type ImpersonationSession, type ImpersonationTargetUser, type ImpersonationType, type IntrospectionDirective, type IntrospectionEnumValue, type IntrospectionField, type IntrospectionInputValue, type IntrospectionSchema, type IntrospectionType, type IntrospectionTypeRef, type Invitation, InvitationsManager, type InviteUserRequest, type InviteUserResponse, type ListAPIKeysResponse, type ListBranchesOptions, type ListBranchesResponse, type ListClientKeysResponse, type ListConversationsOptions, type ListConversationsResult, type ListEmailTemplatesResponse, type ListImpersonationSessionsOptions, type ListImpersonationSessionsResponse, type ListInvitationsOptions, type ListInvitationsResponse, type ListOAuthProvidersResponse, type ListOptions, type ListSchemasResponse, type ListSystemSettingsResponse, type ListTablesResponse, type ListUsersOptions, type ListUsersResponse, type ListWebhookDeliveriesResponse, type ListWebhooksResponse, type MailgunSettings, type Migration, type MigrationExecution, type OAuthProvider, OAuthProviderManager, type OrderBy, type OrderDirection, type PostgresChangesConfig, type PostgrestError, type PostgrestResponse, type PresenceCallback, type PresenceState, QueryBuilder, type QueryFilter, type RPCExecution, type RPCExecutionFilters, type RPCExecutionLog, type RPCExecutionStatus, type RPCInvokeResponse, type RPCProcedure, type RPCProcedureSpec, type RPCProcedureSummary, type RealtimeBroadcastPayload, type RealtimeCallback, type RealtimeChangePayload, RealtimeChannel, type RealtimeChannelConfig, type RealtimeMessage, type RealtimePostgresChangesPayload, type RealtimePresencePayload, type RequestOptions, type ResetUserPasswordResponse, type ResumableDownloadData, type ResumableDownloadOptions, type ResumableUploadOptions, type ResumableUploadProgress, type RevokeAPIKeyResponse, type RevokeClientKeyResponse, type RevokeInvitationResponse, type RollbackMigrationRequest, type SAMLLoginOptions, type SAMLLoginResponse, type SAMLProvider, type SAMLProvidersResponse, type SAMLSession, type SESSettings, type SMTPSettings, type Schema, SchemaQueryBuilder, type SecuritySettings, type SendEmailRequest, type SendGridSettings, type SessionResponse, SettingsClient, type SignInCredentials, type SignInWith2FAResponse, type SignUpCredentials, type SignedUrlOptions, type SignedUrlResponse, type StartImpersonationResponse, type StopImpersonationResponse, StorageBucket, type StorageObject, type StreamDownloadData, type StreamUploadOptions, type SupabaseAuthResponse, type SupabaseResponse, type SyncChatbotsOptions, type SyncChatbotsResult, type SyncError, type SyncFunctionsOptions, type SyncFunctionsResult, type SyncMigrationsOptions, type SyncMigrationsResult, type SyncRPCOptions, type SyncRPCResult, type SystemSetting, SystemSettingsManager, type Table, type TestEmailSettingsResponse, type TestEmailTemplateRequest, type TestWebhookResponse, type TransformOptions, type TwoFactorEnableResponse, type TwoFactorSetupResponse, type TwoFactorStatusResponse, type TwoFactorVerifyRequest, type UpdateAIProviderRequest, type UpdateAPIKeyRequest, type UpdateAppSettingsRequest, type UpdateAuthSettingsRequest, type UpdateAuthSettingsResponse, type UpdateClientKeyRequest, type UpdateConversationOptions, type UpdateEmailProviderSettingsRequest, type UpdateEmailTemplateRequest, type UpdateFunctionRequest, type UpdateMigrationRequest, type UpdateOAuthProviderRequest, type UpdateOAuthProviderResponse, type UpdateRPCProcedureRequest, type UpdateSystemSettingRequest, type UpdateUserAttributes, type UpdateUserRoleRequest, type UpdateWebhookRequest, type UploadOptions, type UploadProgress, type UpsertOptions, type User, type UserResponse, type ValidateInvitationResponse, type VectorMetric, type VectorOrderOptions, type VectorSearchOptions, type VectorSearchResult, type VoidResponse, type WeakPassword, type Webhook, type WebhookDelivery, WebhooksManager, assertType, bundleCode, createClient, denoExternalPlugin, hasPostgrestError, isArray, isAuthError, isAuthSuccess, isBoolean, isFluxbaseError, isFluxbaseSuccess, isNumber, isObject, isPostgrestSuccess, isString, loadImportMap };
|
|
11385
|
+
export { type AIChatClientMessage, type AIChatEvent, type AIChatEventType, type AIChatMessageRole, type AIChatOptions, type AIChatServerMessage, type AIChatbot, type AIChatbotSummary, type AIConversation, type AIConversationMessage, type AIProvider, type AIProviderType, type AIUsageStats, type AIUserConversationDetail, type AIUserConversationSummary, type AIUserMessage, type AIUserQueryResult, type AIUserUsageStats, type APIKey, APIKeysManager, type AcceptInvitationRequest, type AcceptInvitationResponse, type AdminAuthResponse, type AdminBucket, type AdminListBucketsResponse, type AdminListObjectsResponse, type AdminLoginRequest, type AdminMeResponse, type AdminRefreshRequest, type AdminRefreshResponse, type AdminSetupRequest, type AdminSetupStatusResponse, type AdminStorageObject, type AdminUser, type AppSettings, AppSettingsManager, type ApplyMigrationRequest, type ApplyPendingRequest, type AuthResponse, type AuthResponseData, type AuthSession, type AuthSettings, AuthSettingsManager, type AuthenticationSettings, type Branch, type BranchActivity, type BranchPoolStats, type BranchStatus, type BranchType, type BroadcastCallback, type BroadcastMessage, type BundleOptions, type BundleResult, type CaptchaConfig, type CaptchaProvider, type ChatbotSpec, type ChunkedUploadSession, type ClientKey, ClientKeysManager, type Column, type CreateAIProviderRequest, type CreateAPIKeyRequest, type CreateAPIKeyResponse, type CreateBranchOptions, type CreateClientKeyRequest, type CreateClientKeyResponse, type CreateColumnRequest, type CreateFunctionRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateMigrationRequest, type CreateOAuthProviderRequest, type CreateOAuthProviderResponse, type CreateSchemaRequest, type CreateSchemaResponse, type CreateTableRequest, type CreateTableResponse, type CreateWebhookRequest, DDLManager, type DataCloneMode, type DataResponse, type DeleteAPIKeyResponse, type DeleteClientKeyResponse, type DeleteOAuthProviderResponse, type DeleteTableResponse, type DeleteUserResponse, type DeleteWebhookResponse, type DownloadOptions, type DownloadProgress, type EdgeFunction, type EdgeFunctionExecution, type EmailProviderSettings, type EmailSettingOverride, type EmailSettings, EmailSettingsManager, type EmailTemplate, EmailTemplateManager, type EmailTemplateType, type EmbedRequest, type EmbedResponse, type EnrichedUser, type ExecutionLog, type ExecutionLogCallback, type ExecutionLogConfig, type ExecutionLogEvent, type ExecutionLogLevel, ExecutionLogsChannel, type ExecutionType, type FeatureSettings, type FileObject, type FilterOperator, FluxbaseAI, FluxbaseAIChat, FluxbaseAdmin, FluxbaseAdminAI, FluxbaseAdminFunctions, FluxbaseAdminJobs, FluxbaseAdminMigrations, FluxbaseAdminRPC, FluxbaseAdminStorage, FluxbaseAuth, type FluxbaseAuthResponse, FluxbaseBranching, FluxbaseClient, type FluxbaseClientOptions, type FluxbaseError, FluxbaseFetch, FluxbaseFunctions, FluxbaseGraphQL, FluxbaseJobs, FluxbaseManagement, FluxbaseOAuth, FluxbaseRPC, FluxbaseRealtime, type FluxbaseResponse, FluxbaseSettings, FluxbaseStorage, FluxbaseVector, type FunctionInvokeOptions, type FunctionSpec, type GetImpersonationResponse, type GraphQLError, type GraphQLErrorLocation, type GraphQLRequestOptions, type GraphQLResponse, type HealthResponse, type HttpMethod, type ImageFitMode, type ImageFormat, type ImpersonateAnonRequest, type ImpersonateServiceRequest, type ImpersonateUserRequest, ImpersonationManager, type ImpersonationSession, type ImpersonationTargetUser, type ImpersonationType, type IntrospectionDirective, type IntrospectionEnumValue, type IntrospectionField, type IntrospectionInputValue, type IntrospectionSchema, type IntrospectionType, type IntrospectionTypeRef, type Invitation, InvitationsManager, type InviteUserRequest, type InviteUserResponse, type ListAPIKeysResponse, type ListBranchesOptions, type ListBranchesResponse, type ListClientKeysResponse, type ListConversationsOptions, type ListConversationsResult, type ListEmailTemplatesResponse, type ListImpersonationSessionsOptions, type ListImpersonationSessionsResponse, type ListInvitationsOptions, type ListInvitationsResponse, type ListOAuthProvidersResponse, type ListOptions, type ListSchemasResponse, type ListSystemSettingsResponse, type ListTablesResponse, type ListUsersOptions, type ListUsersResponse, type ListWebhookDeliveriesResponse, type ListWebhooksResponse, type MailgunSettings, type Migration, type MigrationExecution, type OAuthLogoutOptions, type OAuthLogoutResponse, type OAuthProvider, OAuthProviderManager, type OrderBy, type OrderDirection, type PostgresChangesConfig, type PostgrestError, type PostgrestResponse, type PresenceCallback, type PresenceState, QueryBuilder, type QueryFilter, type RPCExecution, type RPCExecutionFilters, type RPCExecutionLog, type RPCExecutionStatus, type RPCInvokeResponse, type RPCProcedure, type RPCProcedureSpec, type RPCProcedureSummary, type RealtimeBroadcastPayload, type RealtimeCallback, type RealtimeChangePayload, RealtimeChannel, type RealtimeChannelConfig, type RealtimeMessage, type RealtimePostgresChangesPayload, type RealtimePresencePayload, type RequestOptions, type ResetUserPasswordResponse, type ResumableDownloadData, type ResumableDownloadOptions, type ResumableUploadOptions, type ResumableUploadProgress, type RevokeAPIKeyResponse, type RevokeClientKeyResponse, type RevokeInvitationResponse, type RollbackMigrationRequest, type SAMLLoginOptions, type SAMLLoginResponse, type SAMLProvider, type SAMLProvidersResponse, type SAMLSession, type SESSettings, type SMTPSettings, type Schema, SchemaQueryBuilder, type SecuritySettings, type SendEmailRequest, type SendGridSettings, type SessionResponse, SettingsClient, type SignInCredentials, type SignInWith2FAResponse, type SignUpCredentials, type SignedUrlOptions, type SignedUrlResponse, type StartImpersonationResponse, type StopImpersonationResponse, StorageBucket, type StorageObject, type StreamDownloadData, type StreamUploadOptions, type SupabaseAuthResponse, type SupabaseResponse, type SyncChatbotsOptions, type SyncChatbotsResult, type SyncError, type SyncFunctionsOptions, type SyncFunctionsResult, type SyncMigrationsOptions, type SyncMigrationsResult, type SyncRPCOptions, type SyncRPCResult, type SystemSetting, SystemSettingsManager, type Table, type TestEmailSettingsResponse, type TestEmailTemplateRequest, type TestWebhookResponse, type TransformOptions, type TwoFactorEnableResponse, type TwoFactorSetupResponse, type TwoFactorStatusResponse, type TwoFactorVerifyRequest, type UpdateAIProviderRequest, type UpdateAPIKeyRequest, type UpdateAppSettingsRequest, type UpdateAuthSettingsRequest, type UpdateAuthSettingsResponse, type UpdateClientKeyRequest, type UpdateConversationOptions, type UpdateEmailProviderSettingsRequest, type UpdateEmailTemplateRequest, type UpdateFunctionRequest, type UpdateMigrationRequest, type UpdateOAuthProviderRequest, type UpdateOAuthProviderResponse, type UpdateRPCProcedureRequest, type UpdateSystemSettingRequest, type UpdateUserAttributes, type UpdateUserRoleRequest, type UpdateWebhookRequest, type UploadOptions, type UploadProgress, type UpsertOptions, type User, type UserResponse, type ValidateInvitationResponse, type VectorMetric, type VectorOrderOptions, type VectorSearchOptions, type VectorSearchResult, type VoidResponse, type WeakPassword, type Webhook, type WebhookDelivery, WebhooksManager, assertType, bundleCode, createClient, denoExternalPlugin, hasPostgrestError, isArray, isAuthError, isAuthSuccess, isBoolean, isFluxbaseError, isFluxbaseSuccess, isNumber, isObject, isPostgrestSuccess, isString, loadImportMap };
|
package/dist/index.js
CHANGED
|
@@ -946,6 +946,59 @@ var FluxbaseAuth = class {
|
|
|
946
946
|
return { provider, url };
|
|
947
947
|
});
|
|
948
948
|
}
|
|
949
|
+
/**
|
|
950
|
+
* Get OAuth logout URL for a provider
|
|
951
|
+
* Use this to get the logout URL without automatically redirecting
|
|
952
|
+
* @param provider - OAuth provider name (e.g., 'google', 'github')
|
|
953
|
+
* @param options - Optional logout configuration
|
|
954
|
+
* @returns Promise with OAuth logout response including redirect URL if applicable
|
|
955
|
+
*
|
|
956
|
+
* @example
|
|
957
|
+
* ```typescript
|
|
958
|
+
* const { data, error } = await client.auth.getOAuthLogoutUrl('google')
|
|
959
|
+
* if (!error && data.redirect_url) {
|
|
960
|
+
* // Redirect user to complete logout at provider
|
|
961
|
+
* window.location.href = data.redirect_url
|
|
962
|
+
* }
|
|
963
|
+
* ```
|
|
964
|
+
*/
|
|
965
|
+
async getOAuthLogoutUrl(provider, options) {
|
|
966
|
+
return wrapAsync(async () => {
|
|
967
|
+
const response = await this.fetch.post(
|
|
968
|
+
`/api/v1/auth/oauth/${provider}/logout`,
|
|
969
|
+
options || {}
|
|
970
|
+
);
|
|
971
|
+
this.clearSession();
|
|
972
|
+
return response;
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* Sign out with OAuth provider logout
|
|
977
|
+
* Revokes tokens at the OAuth provider and optionally redirects for OIDC logout
|
|
978
|
+
* @param provider - OAuth provider name (e.g., 'google', 'github')
|
|
979
|
+
* @param options - Optional logout configuration
|
|
980
|
+
* @returns Promise with OAuth logout response
|
|
981
|
+
*
|
|
982
|
+
* @example
|
|
983
|
+
* ```typescript
|
|
984
|
+
* // This will revoke tokens and redirect to provider's logout page if supported
|
|
985
|
+
* await client.auth.signOutWithOAuth('google', {
|
|
986
|
+
* redirect_url: 'https://myapp.com/logged-out'
|
|
987
|
+
* })
|
|
988
|
+
* ```
|
|
989
|
+
*/
|
|
990
|
+
async signOutWithOAuth(provider, options) {
|
|
991
|
+
return wrapAsync(async () => {
|
|
992
|
+
const result = await this.getOAuthLogoutUrl(provider, options);
|
|
993
|
+
if (result.error) {
|
|
994
|
+
throw result.error;
|
|
995
|
+
}
|
|
996
|
+
if (result.data.requires_redirect && result.data.redirect_url && typeof window !== "undefined") {
|
|
997
|
+
window.location.href = result.data.redirect_url;
|
|
998
|
+
}
|
|
999
|
+
return result.data;
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
949
1002
|
/**
|
|
950
1003
|
* Sign in with OTP (One-Time Password) - Supabase-compatible
|
|
951
1004
|
* Sends a one-time password via email or SMS for passwordless authentication
|