@robosystems/client 0.1.20 → 0.1.22
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/LICENSE +1 -1
- package/README.md +10 -423
- package/bin/create-feature +7 -17
- package/extensions/CopyClient.d.ts +1 -0
- package/extensions/CopyClient.js +3 -0
- package/extensions/CopyClient.ts +5 -0
- package/extensions/OperationClient.d.ts +1 -0
- package/extensions/OperationClient.ts +2 -0
- package/extensions/QueryClient.d.ts +1 -0
- package/extensions/QueryClient.js +1 -0
- package/extensions/QueryClient.ts +3 -0
- package/extensions/SSEClient.d.ts +14 -0
- package/extensions/SSEClient.js +7 -1
- package/extensions/SSEClient.ts +22 -1
- package/extensions/config.d.ts +25 -0
- package/extensions/config.js +78 -0
- package/extensions/config.ts +84 -0
- package/extensions/hooks.js +16 -0
- package/extensions/hooks.ts +27 -1
- package/extensions/index.d.ts +2 -0
- package/extensions/index.js +14 -0
- package/extensions/index.ts +28 -1
- package/package.json +2 -2
- package/sdk/sdk.gen.d.ts +40 -15
- package/sdk/sdk.gen.js +100 -33
- package/sdk/sdk.gen.ts +99 -32
- package/sdk/types.gen.d.ts +748 -100
- package/sdk/types.gen.ts +785 -108
- package/sdk-extensions/CopyClient.d.ts +1 -0
- package/sdk-extensions/CopyClient.js +3 -0
- package/sdk-extensions/CopyClient.ts +5 -0
- package/sdk-extensions/OperationClient.d.ts +1 -0
- package/sdk-extensions/OperationClient.ts +2 -0
- package/sdk-extensions/QueryClient.d.ts +1 -0
- package/sdk-extensions/QueryClient.js +1 -0
- package/sdk-extensions/QueryClient.ts +3 -0
- package/sdk-extensions/SSEClient.d.ts +14 -0
- package/sdk-extensions/SSEClient.js +7 -1
- package/sdk-extensions/SSEClient.ts +22 -1
- package/sdk-extensions/config.d.ts +25 -0
- package/sdk-extensions/config.js +78 -0
- package/sdk-extensions/config.ts +84 -0
- package/sdk-extensions/hooks.js +16 -0
- package/sdk-extensions/hooks.ts +27 -1
- package/sdk-extensions/index.d.ts +2 -0
- package/sdk-extensions/index.js +14 -0
- package/sdk-extensions/index.ts +28 -1
- package/sdk.gen.d.ts +40 -15
- package/sdk.gen.js +100 -33
- package/sdk.gen.ts +99 -32
- package/types.gen.d.ts +748 -100
- package/types.gen.ts +785 -108
package/sdk-extensions/index.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { client } from '../sdk/client.gen'
|
|
7
|
+
import { extractTokenFromSDKClient } from './config'
|
|
7
8
|
import { CopyClient } from './CopyClient'
|
|
8
9
|
import { OperationClient } from './OperationClient'
|
|
9
10
|
import { QueryClient } from './QueryClient'
|
|
@@ -12,23 +13,40 @@ import { SSEClient } from './SSEClient'
|
|
|
12
13
|
export interface RoboSystemsExtensionConfig {
|
|
13
14
|
baseUrl?: string
|
|
14
15
|
credentials?: 'include' | 'same-origin' | 'omit'
|
|
16
|
+
token?: string // JWT token for authentication
|
|
17
|
+
headers?: Record<string, string>
|
|
15
18
|
maxRetries?: number
|
|
16
19
|
retryDelay?: number
|
|
17
20
|
}
|
|
18
21
|
|
|
22
|
+
// Properly typed configuration interface
|
|
23
|
+
interface ResolvedConfig {
|
|
24
|
+
baseUrl: string
|
|
25
|
+
credentials: 'include' | 'same-origin' | 'omit'
|
|
26
|
+
token?: string
|
|
27
|
+
headers?: Record<string, string>
|
|
28
|
+
maxRetries: number
|
|
29
|
+
retryDelay: number
|
|
30
|
+
}
|
|
31
|
+
|
|
19
32
|
export class RoboSystemsExtensions {
|
|
20
33
|
public readonly copy: CopyClient
|
|
21
34
|
public readonly query: QueryClient
|
|
22
35
|
public readonly operations: OperationClient
|
|
23
|
-
private config:
|
|
36
|
+
private config: ResolvedConfig
|
|
24
37
|
|
|
25
38
|
constructor(config: RoboSystemsExtensionConfig = {}) {
|
|
26
39
|
// Get base URL from SDK client config or use provided/default
|
|
27
40
|
const sdkConfig = client.getConfig()
|
|
28
41
|
|
|
42
|
+
// Extract JWT token using centralized logic
|
|
43
|
+
const token = config.token || extractTokenFromSDKClient()
|
|
44
|
+
|
|
29
45
|
this.config = {
|
|
30
46
|
baseUrl: config.baseUrl || sdkConfig.baseUrl || 'http://localhost:8000',
|
|
31
47
|
credentials: config.credentials || 'include',
|
|
48
|
+
token,
|
|
49
|
+
headers: config.headers,
|
|
32
50
|
maxRetries: config.maxRetries || 5,
|
|
33
51
|
retryDelay: config.retryDelay || 1000,
|
|
34
52
|
}
|
|
@@ -36,16 +54,23 @@ export class RoboSystemsExtensions {
|
|
|
36
54
|
this.copy = new CopyClient({
|
|
37
55
|
baseUrl: this.config.baseUrl,
|
|
38
56
|
credentials: this.config.credentials,
|
|
57
|
+
token: this.config.token,
|
|
58
|
+
headers: this.config.headers,
|
|
39
59
|
})
|
|
40
60
|
|
|
41
61
|
this.query = new QueryClient({
|
|
42
62
|
baseUrl: this.config.baseUrl,
|
|
43
63
|
credentials: this.config.credentials,
|
|
64
|
+
token: this.config.token,
|
|
65
|
+
headers: this.config.headers,
|
|
44
66
|
})
|
|
45
67
|
|
|
46
68
|
this.operations = new OperationClient({
|
|
47
69
|
baseUrl: this.config.baseUrl,
|
|
48
70
|
credentials: this.config.credentials,
|
|
71
|
+
token: this.config.token,
|
|
72
|
+
maxRetries: this.config.maxRetries,
|
|
73
|
+
retryDelay: this.config.retryDelay,
|
|
49
74
|
})
|
|
50
75
|
}
|
|
51
76
|
|
|
@@ -63,6 +88,8 @@ export class RoboSystemsExtensions {
|
|
|
63
88
|
return new SSEClient({
|
|
64
89
|
baseUrl: this.config.baseUrl,
|
|
65
90
|
credentials: this.config.credentials,
|
|
91
|
+
token: this.config.token,
|
|
92
|
+
headers: this.config.headers,
|
|
66
93
|
maxRetries: this.config.maxRetries,
|
|
67
94
|
retryDelay: this.config.retryDelay,
|
|
68
95
|
})
|
package/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from './client';
|
|
2
|
-
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors,
|
|
2
|
+
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshAuthSessionData, RefreshAuthSessionResponses, RefreshAuthSessionErrors, ResendVerificationEmailData, ResendVerificationEmailResponses, ResendVerificationEmailErrors, VerifyEmailData, VerifyEmailResponses, VerifyEmailErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ForgotPasswordData, ForgotPasswordResponses, ForgotPasswordErrors, ValidateResetTokenData, ValidateResetTokenResponses, ValidateResetTokenErrors, ResetPasswordData, ResetPasswordResponses, ResetPasswordErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoLoginData, SsoLoginResponses, SsoLoginErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, GetUserGraphsData, GetUserGraphsResponses, GetUserGraphsErrors, SelectUserGraphData, SelectUserGraphResponses, SelectUserGraphErrors, GetAllCreditSummariesData, GetAllCreditSummariesResponses, GetAllCreditSummariesErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, ListUserApiKeysErrors, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, GetUserLimitsErrors, GetUserUsageData, GetUserUsageResponses, GetUserUsageErrors, GetAllSharedRepositoryLimitsData, GetAllSharedRepositoryLimitsResponses, GetAllSharedRepositoryLimitsErrors, GetSharedRepositoryLimitsData, GetSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsErrors, GetUserUsageOverviewData, GetUserUsageOverviewResponses, GetUserUsageOverviewErrors, GetDetailedUserAnalyticsData, GetDetailedUserAnalyticsResponses, GetDetailedUserAnalyticsErrors, GetUserSharedSubscriptionsData, GetUserSharedSubscriptionsResponses, GetUserSharedSubscriptionsErrors, SubscribeToSharedRepositoryData, SubscribeToSharedRepositoryResponses, SubscribeToSharedRepositoryErrors, UpgradeSharedRepositorySubscriptionData, UpgradeSharedRepositorySubscriptionResponses, UpgradeSharedRepositorySubscriptionErrors, CancelSharedRepositorySubscriptionData, CancelSharedRepositorySubscriptionResponses, CancelSharedRepositorySubscriptionErrors, GetSharedRepositoryCreditsData, GetSharedRepositoryCreditsResponses, GetSharedRepositoryCreditsErrors, GetRepositoryCreditsData, GetRepositoryCreditsResponses, GetRepositoryCreditsErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, ListAgentsData, ListAgentsResponses, ListAgentsErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, RecommendAgentData, RecommendAgentResponses, RecommendAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, ExportBackupData, ExportBackupResponses, ExportBackupErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageStatsData, GetGraphUsageStatsResponses, GetGraphUsageStatsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaInfoData, GetGraphSchemaInfoResponses, GetGraphSchemaInfoErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ListSchemaExtensionsData, ListSchemaExtensionsResponses, ListSchemaExtensionsErrors, GetCurrentGraphBillData, GetCurrentGraphBillResponses, GetCurrentGraphBillErrors, GetGraphUsageDetailsData, GetGraphUsageDetailsResponses, GetGraphUsageDetailsErrors, GetGraphBillingHistoryData, GetGraphBillingHistoryResponses, GetGraphBillingHistoryErrors, GetGraphMonthlyBillData, GetGraphMonthlyBillResponses, GetGraphMonthlyBillErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, GetGraphLimitsData, GetGraphLimitsResponses, GetGraphLimitsErrors, ListSubgraphsData, ListSubgraphsResponses, ListSubgraphsErrors, CreateSubgraphData, CreateSubgraphResponses, CreateSubgraphErrors, DeleteSubgraphData, DeleteSubgraphResponses, DeleteSubgraphErrors, GetSubgraphInfoData, GetSubgraphInfoResponses, GetSubgraphInfoErrors, GetSubgraphQuotaData, GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, CopyDataToGraphData, CopyDataToGraphResponses, CopyDataToGraphErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -30,14 +30,49 @@ export declare const loginUser: <ThrowOnError extends boolean = false>(options:
|
|
|
30
30
|
export declare const logoutUser: <ThrowOnError extends boolean = false>(options?: Options<LogoutUserData, ThrowOnError>) => import("./client").RequestResult<LogoutUserResponses, LogoutUserErrors, ThrowOnError, "fields">;
|
|
31
31
|
/**
|
|
32
32
|
* Get Current User
|
|
33
|
-
* Get
|
|
33
|
+
* Get the currently authenticated user.
|
|
34
34
|
*/
|
|
35
35
|
export declare const getCurrentAuthUser: <ThrowOnError extends boolean = false>(options?: Options<GetCurrentAuthUserData, ThrowOnError>) => import("./client").RequestResult<GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, ThrowOnError, "fields">;
|
|
36
36
|
/**
|
|
37
37
|
* Refresh Session
|
|
38
|
-
* Refresh
|
|
38
|
+
* Refresh authentication session with a new JWT token.
|
|
39
39
|
*/
|
|
40
|
-
export declare const
|
|
40
|
+
export declare const refreshAuthSession: <ThrowOnError extends boolean = false>(options?: Options<RefreshAuthSessionData, ThrowOnError>) => import("./client").RequestResult<RefreshAuthSessionResponses, RefreshAuthSessionErrors, ThrowOnError, "fields">;
|
|
41
|
+
/**
|
|
42
|
+
* Resend Email Verification
|
|
43
|
+
* Resend verification email to the authenticated user. Rate limited to 3 per hour.
|
|
44
|
+
*/
|
|
45
|
+
export declare const resendVerificationEmail: <ThrowOnError extends boolean = false>(options?: Options<ResendVerificationEmailData, ThrowOnError>) => import("./client").RequestResult<ResendVerificationEmailResponses, ResendVerificationEmailErrors, ThrowOnError, "fields">;
|
|
46
|
+
/**
|
|
47
|
+
* Verify Email
|
|
48
|
+
* Verify email address with token from email link. Returns JWT for auto-login.
|
|
49
|
+
*/
|
|
50
|
+
export declare const verifyEmail: <ThrowOnError extends boolean = false>(options: Options<VerifyEmailData, ThrowOnError>) => import("./client").RequestResult<VerifyEmailResponses, VerifyEmailErrors, ThrowOnError, "fields">;
|
|
51
|
+
/**
|
|
52
|
+
* Get Password Policy
|
|
53
|
+
* Get current password policy requirements for frontend validation
|
|
54
|
+
*/
|
|
55
|
+
export declare const getPasswordPolicy: <ThrowOnError extends boolean = false>(options?: Options<GetPasswordPolicyData, ThrowOnError>) => import("./client").RequestResult<GetPasswordPolicyResponses, unknown, ThrowOnError, "fields">;
|
|
56
|
+
/**
|
|
57
|
+
* Check Password Strength
|
|
58
|
+
* Check password strength and get validation feedback
|
|
59
|
+
*/
|
|
60
|
+
export declare const checkPasswordStrength: <ThrowOnError extends boolean = false>(options: Options<CheckPasswordStrengthData, ThrowOnError>) => import("./client").RequestResult<CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ThrowOnError, "fields">;
|
|
61
|
+
/**
|
|
62
|
+
* Forgot Password
|
|
63
|
+
* Request password reset email. Always returns success to prevent email enumeration.
|
|
64
|
+
*/
|
|
65
|
+
export declare const forgotPassword: <ThrowOnError extends boolean = false>(options: Options<ForgotPasswordData, ThrowOnError>) => import("./client").RequestResult<ForgotPasswordResponses, ForgotPasswordErrors, ThrowOnError, "fields">;
|
|
66
|
+
/**
|
|
67
|
+
* Validate Reset Token
|
|
68
|
+
* Check if a password reset token is valid without consuming it.
|
|
69
|
+
*/
|
|
70
|
+
export declare const validateResetToken: <ThrowOnError extends boolean = false>(options: Options<ValidateResetTokenData, ThrowOnError>) => import("./client").RequestResult<ValidateResetTokenResponses, ValidateResetTokenErrors, ThrowOnError, "fields">;
|
|
71
|
+
/**
|
|
72
|
+
* Reset Password
|
|
73
|
+
* Reset password with token from email. Returns JWT for auto-login.
|
|
74
|
+
*/
|
|
75
|
+
export declare const resetPassword: <ThrowOnError extends boolean = false>(options: Options<ResetPasswordData, ThrowOnError>) => import("./client").RequestResult<ResetPasswordResponses, ResetPasswordErrors, ThrowOnError, "fields">;
|
|
41
76
|
/**
|
|
42
77
|
* Generate SSO Token
|
|
43
78
|
* Generate a temporary SSO token for cross-app authentication.
|
|
@@ -58,16 +93,6 @@ export declare const ssoTokenExchange: <ThrowOnError extends boolean = false>(op
|
|
|
58
93
|
* Complete SSO authentication using session ID from secure handoff.
|
|
59
94
|
*/
|
|
60
95
|
export declare const completeSsoAuth: <ThrowOnError extends boolean = false>(options: Options<CompleteSsoAuthData, ThrowOnError>) => import("./client").RequestResult<CompleteSsoAuthResponses, CompleteSsoAuthErrors, ThrowOnError, "fields">;
|
|
61
|
-
/**
|
|
62
|
-
* Get Password Policy
|
|
63
|
-
* Get current password policy requirements for frontend validation
|
|
64
|
-
*/
|
|
65
|
-
export declare const getPasswordPolicy: <ThrowOnError extends boolean = false>(options?: Options<GetPasswordPolicyData, ThrowOnError>) => import("./client").RequestResult<GetPasswordPolicyResponses, unknown, ThrowOnError, "fields">;
|
|
66
|
-
/**
|
|
67
|
-
* Check Password Strength
|
|
68
|
-
* Check password strength and get validation feedback
|
|
69
|
-
*/
|
|
70
|
-
export declare const checkPasswordStrength: <ThrowOnError extends boolean = false>(options: Options<CheckPasswordStrengthData, ThrowOnError>) => import("./client").RequestResult<CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ThrowOnError, "fields">;
|
|
71
96
|
/**
|
|
72
97
|
* Get CAPTCHA Configuration
|
|
73
98
|
* Get CAPTCHA configuration including site key and whether CAPTCHA is required.
|
|
@@ -318,7 +343,7 @@ export declare const initOAuth: <ThrowOnError extends boolean = false>(options:
|
|
|
318
343
|
* - **QuickBooks**: Accounting data integration
|
|
319
344
|
*
|
|
320
345
|
* Security measures:
|
|
321
|
-
* - State validation prevents
|
|
346
|
+
* - State validation prevents session hijacking
|
|
322
347
|
* - User context is verified
|
|
323
348
|
* - Tokens are encrypted before storage
|
|
324
349
|
* - Full audit trail is maintained
|
package/sdk.gen.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.cancelOperation = exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.getAvailableExtensions = exports.createGraph = exports.copyDataToGraph = exports.getSubgraphQuota = exports.getSubgraphInfo = exports.deleteSubgraph = exports.createSubgraph = exports.listSubgraphs = exports.getGraphLimits = exports.getDatabaseInfo = exports.getDatabaseHealth = exports.checkStorageLimits = exports.getStorageUsage = exports.checkCreditBalance = exports.listCreditTransactions = exports.getCreditSummary = exports.getGraphMonthlyBill = exports.getGraphBillingHistory = exports.getGraphUsageDetails = exports.getCurrentGraphBill = exports.listSchemaExtensions = exports.exportGraphSchema = exports.validateSchema = exports.getGraphSchemaInfo = exports.executeCypherQuery = exports.getGraphUsageStats = exports.getGraphMetrics = exports.getBackupStats = exports.restoreBackup = exports.getBackupDownloadUrl = exports.exportBackup = exports.createBackup = exports.listBackups = exports.callMcpTool = exports.listMcpTools = exports.recommendAgent = void 0;
|
|
4
|
+
exports.getConnection = exports.deleteConnection = exports.createConnection = exports.listConnections = exports.oauthCallback = exports.initOAuth = exports.exchangeLinkToken = exports.createLinkToken = exports.syncConnection = exports.getConnectionOptions = exports.getRepositoryCredits = exports.getSharedRepositoryCredits = exports.cancelSharedRepositorySubscription = exports.upgradeSharedRepositorySubscription = exports.subscribeToSharedRepository = exports.getUserSharedSubscriptions = exports.getDetailedUserAnalytics = exports.getUserUsageOverview = exports.getSharedRepositoryLimits = exports.getAllSharedRepositoryLimits = exports.getUserUsage = exports.getUserLimits = exports.updateUserApiKey = exports.revokeUserApiKey = exports.createUserApiKey = exports.listUserApiKeys = exports.updateUserPassword = exports.getAllCreditSummaries = exports.selectUserGraph = exports.getUserGraphs = exports.updateUser = exports.getCurrentUser = exports.getServiceStatus = exports.getCaptchaConfig = exports.completeSsoAuth = exports.ssoTokenExchange = exports.ssoLogin = exports.generateSsoToken = exports.resetPassword = exports.validateResetToken = exports.forgotPassword = exports.checkPasswordStrength = exports.getPasswordPolicy = exports.verifyEmail = exports.resendVerificationEmail = exports.refreshAuthSession = exports.getCurrentAuthUser = exports.logoutUser = exports.loginUser = exports.registerUser = void 0;
|
|
5
|
+
exports.cancelOperation = exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.getAvailableExtensions = exports.createGraph = exports.copyDataToGraph = exports.getSubgraphQuota = exports.getSubgraphInfo = exports.deleteSubgraph = exports.createSubgraph = exports.listSubgraphs = exports.getGraphLimits = exports.getDatabaseInfo = exports.getDatabaseHealth = exports.checkStorageLimits = exports.getStorageUsage = exports.checkCreditBalance = exports.listCreditTransactions = exports.getCreditSummary = exports.getGraphMonthlyBill = exports.getGraphBillingHistory = exports.getGraphUsageDetails = exports.getCurrentGraphBill = exports.listSchemaExtensions = exports.exportGraphSchema = exports.validateSchema = exports.getGraphSchemaInfo = exports.executeCypherQuery = exports.getGraphUsageStats = exports.getGraphMetrics = exports.getBackupStats = exports.restoreBackup = exports.getBackupDownloadUrl = exports.exportBackup = exports.createBackup = exports.listBackups = exports.callMcpTool = exports.listMcpTools = exports.recommendAgent = exports.getAgentMetadata = exports.listAgents = exports.batchProcessQueries = exports.executeSpecificAgent = exports.autoSelectAgent = void 0;
|
|
6
6
|
const client_gen_1 = require("./client.gen");
|
|
7
7
|
/**
|
|
8
8
|
* Register New User
|
|
@@ -47,7 +47,7 @@ const logoutUser = (options) => {
|
|
|
47
47
|
exports.logoutUser = logoutUser;
|
|
48
48
|
/**
|
|
49
49
|
* Get Current User
|
|
50
|
-
* Get
|
|
50
|
+
* Get the currently authenticated user.
|
|
51
51
|
*/
|
|
52
52
|
const getCurrentAuthUser = (options) => {
|
|
53
53
|
return (options?.client ?? client_gen_1.client).get({
|
|
@@ -58,15 +58,108 @@ const getCurrentAuthUser = (options) => {
|
|
|
58
58
|
exports.getCurrentAuthUser = getCurrentAuthUser;
|
|
59
59
|
/**
|
|
60
60
|
* Refresh Session
|
|
61
|
-
* Refresh
|
|
61
|
+
* Refresh authentication session with a new JWT token.
|
|
62
62
|
*/
|
|
63
|
-
const
|
|
63
|
+
const refreshAuthSession = (options) => {
|
|
64
64
|
return (options?.client ?? client_gen_1.client).post({
|
|
65
65
|
url: '/v1/auth/refresh',
|
|
66
66
|
...options
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
-
exports.
|
|
69
|
+
exports.refreshAuthSession = refreshAuthSession;
|
|
70
|
+
/**
|
|
71
|
+
* Resend Email Verification
|
|
72
|
+
* Resend verification email to the authenticated user. Rate limited to 3 per hour.
|
|
73
|
+
*/
|
|
74
|
+
const resendVerificationEmail = (options) => {
|
|
75
|
+
return (options?.client ?? client_gen_1.client).post({
|
|
76
|
+
url: '/v1/auth/email/resend',
|
|
77
|
+
...options
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
exports.resendVerificationEmail = resendVerificationEmail;
|
|
81
|
+
/**
|
|
82
|
+
* Verify Email
|
|
83
|
+
* Verify email address with token from email link. Returns JWT for auto-login.
|
|
84
|
+
*/
|
|
85
|
+
const verifyEmail = (options) => {
|
|
86
|
+
return (options.client ?? client_gen_1.client).post({
|
|
87
|
+
url: '/v1/auth/email/verify',
|
|
88
|
+
...options,
|
|
89
|
+
headers: {
|
|
90
|
+
'Content-Type': 'application/json',
|
|
91
|
+
...options.headers
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
exports.verifyEmail = verifyEmail;
|
|
96
|
+
/**
|
|
97
|
+
* Get Password Policy
|
|
98
|
+
* Get current password policy requirements for frontend validation
|
|
99
|
+
*/
|
|
100
|
+
const getPasswordPolicy = (options) => {
|
|
101
|
+
return (options?.client ?? client_gen_1.client).get({
|
|
102
|
+
url: '/v1/auth/password/policy',
|
|
103
|
+
...options
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
exports.getPasswordPolicy = getPasswordPolicy;
|
|
107
|
+
/**
|
|
108
|
+
* Check Password Strength
|
|
109
|
+
* Check password strength and get validation feedback
|
|
110
|
+
*/
|
|
111
|
+
const checkPasswordStrength = (options) => {
|
|
112
|
+
return (options.client ?? client_gen_1.client).post({
|
|
113
|
+
url: '/v1/auth/password/check',
|
|
114
|
+
...options,
|
|
115
|
+
headers: {
|
|
116
|
+
'Content-Type': 'application/json',
|
|
117
|
+
...options.headers
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
exports.checkPasswordStrength = checkPasswordStrength;
|
|
122
|
+
/**
|
|
123
|
+
* Forgot Password
|
|
124
|
+
* Request password reset email. Always returns success to prevent email enumeration.
|
|
125
|
+
*/
|
|
126
|
+
const forgotPassword = (options) => {
|
|
127
|
+
return (options.client ?? client_gen_1.client).post({
|
|
128
|
+
url: '/v1/auth/password/forgot',
|
|
129
|
+
...options,
|
|
130
|
+
headers: {
|
|
131
|
+
'Content-Type': 'application/json',
|
|
132
|
+
...options.headers
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
exports.forgotPassword = forgotPassword;
|
|
137
|
+
/**
|
|
138
|
+
* Validate Reset Token
|
|
139
|
+
* Check if a password reset token is valid without consuming it.
|
|
140
|
+
*/
|
|
141
|
+
const validateResetToken = (options) => {
|
|
142
|
+
return (options.client ?? client_gen_1.client).get({
|
|
143
|
+
url: '/v1/auth/password/reset/validate',
|
|
144
|
+
...options
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
exports.validateResetToken = validateResetToken;
|
|
148
|
+
/**
|
|
149
|
+
* Reset Password
|
|
150
|
+
* Reset password with token from email. Returns JWT for auto-login.
|
|
151
|
+
*/
|
|
152
|
+
const resetPassword = (options) => {
|
|
153
|
+
return (options.client ?? client_gen_1.client).post({
|
|
154
|
+
url: '/v1/auth/password/reset',
|
|
155
|
+
...options,
|
|
156
|
+
headers: {
|
|
157
|
+
'Content-Type': 'application/json',
|
|
158
|
+
...options.headers
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
exports.resetPassword = resetPassword;
|
|
70
163
|
/**
|
|
71
164
|
* Generate SSO Token
|
|
72
165
|
* Generate a temporary SSO token for cross-app authentication.
|
|
@@ -123,32 +216,6 @@ const completeSsoAuth = (options) => {
|
|
|
123
216
|
});
|
|
124
217
|
};
|
|
125
218
|
exports.completeSsoAuth = completeSsoAuth;
|
|
126
|
-
/**
|
|
127
|
-
* Get Password Policy
|
|
128
|
-
* Get current password policy requirements for frontend validation
|
|
129
|
-
*/
|
|
130
|
-
const getPasswordPolicy = (options) => {
|
|
131
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
132
|
-
url: '/v1/auth/password/policy',
|
|
133
|
-
...options
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
exports.getPasswordPolicy = getPasswordPolicy;
|
|
137
|
-
/**
|
|
138
|
-
* Check Password Strength
|
|
139
|
-
* Check password strength and get validation feedback
|
|
140
|
-
*/
|
|
141
|
-
const checkPasswordStrength = (options) => {
|
|
142
|
-
return (options.client ?? client_gen_1.client).post({
|
|
143
|
-
url: '/v1/auth/password/check',
|
|
144
|
-
...options,
|
|
145
|
-
headers: {
|
|
146
|
-
'Content-Type': 'application/json',
|
|
147
|
-
...options.headers
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
exports.checkPasswordStrength = checkPasswordStrength;
|
|
152
219
|
/**
|
|
153
220
|
* Get CAPTCHA Configuration
|
|
154
221
|
* Get CAPTCHA configuration including site key and whether CAPTCHA is required.
|
|
@@ -883,7 +950,7 @@ exports.initOAuth = initOAuth;
|
|
|
883
950
|
* - **QuickBooks**: Accounting data integration
|
|
884
951
|
*
|
|
885
952
|
* Security measures:
|
|
886
|
-
* - State validation prevents
|
|
953
|
+
* - State validation prevents session hijacking
|
|
887
954
|
* - User context is verified
|
|
888
955
|
* - Tokens are encrypted before storage
|
|
889
956
|
* - Full audit trail is maintained
|
package/sdk.gen.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
3
|
import type { Options as ClientOptions, TDataShape, Client } from './client';
|
|
4
|
-
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors,
|
|
4
|
+
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshAuthSessionData, RefreshAuthSessionResponses, RefreshAuthSessionErrors, ResendVerificationEmailData, ResendVerificationEmailResponses, ResendVerificationEmailErrors, VerifyEmailData, VerifyEmailResponses, VerifyEmailErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ForgotPasswordData, ForgotPasswordResponses, ForgotPasswordErrors, ValidateResetTokenData, ValidateResetTokenResponses, ValidateResetTokenErrors, ResetPasswordData, ResetPasswordResponses, ResetPasswordErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoLoginData, SsoLoginResponses, SsoLoginErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, GetUserGraphsData, GetUserGraphsResponses, GetUserGraphsErrors, SelectUserGraphData, SelectUserGraphResponses, SelectUserGraphErrors, GetAllCreditSummariesData, GetAllCreditSummariesResponses, GetAllCreditSummariesErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, ListUserApiKeysErrors, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, GetUserLimitsErrors, GetUserUsageData, GetUserUsageResponses, GetUserUsageErrors, GetAllSharedRepositoryLimitsData, GetAllSharedRepositoryLimitsResponses, GetAllSharedRepositoryLimitsErrors, GetSharedRepositoryLimitsData, GetSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsErrors, GetUserUsageOverviewData, GetUserUsageOverviewResponses, GetUserUsageOverviewErrors, GetDetailedUserAnalyticsData, GetDetailedUserAnalyticsResponses, GetDetailedUserAnalyticsErrors, GetUserSharedSubscriptionsData, GetUserSharedSubscriptionsResponses, GetUserSharedSubscriptionsErrors, SubscribeToSharedRepositoryData, SubscribeToSharedRepositoryResponses, SubscribeToSharedRepositoryErrors, UpgradeSharedRepositorySubscriptionData, UpgradeSharedRepositorySubscriptionResponses, UpgradeSharedRepositorySubscriptionErrors, CancelSharedRepositorySubscriptionData, CancelSharedRepositorySubscriptionResponses, CancelSharedRepositorySubscriptionErrors, GetSharedRepositoryCreditsData, GetSharedRepositoryCreditsResponses, GetSharedRepositoryCreditsErrors, GetRepositoryCreditsData, GetRepositoryCreditsResponses, GetRepositoryCreditsErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, ListAgentsData, ListAgentsResponses, ListAgentsErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, RecommendAgentData, RecommendAgentResponses, RecommendAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, ExportBackupData, ExportBackupResponses, ExportBackupErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageStatsData, GetGraphUsageStatsResponses, GetGraphUsageStatsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaInfoData, GetGraphSchemaInfoResponses, GetGraphSchemaInfoErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ListSchemaExtensionsData, ListSchemaExtensionsResponses, ListSchemaExtensionsErrors, GetCurrentGraphBillData, GetCurrentGraphBillResponses, GetCurrentGraphBillErrors, GetGraphUsageDetailsData, GetGraphUsageDetailsResponses, GetGraphUsageDetailsErrors, GetGraphBillingHistoryData, GetGraphBillingHistoryResponses, GetGraphBillingHistoryErrors, GetGraphMonthlyBillData, GetGraphMonthlyBillResponses, GetGraphMonthlyBillErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, GetGraphLimitsData, GetGraphLimitsResponses, GetGraphLimitsErrors, ListSubgraphsData, ListSubgraphsResponses, ListSubgraphsErrors, CreateSubgraphData, CreateSubgraphResponses, CreateSubgraphErrors, DeleteSubgraphData, DeleteSubgraphResponses, DeleteSubgraphErrors, GetSubgraphInfoData, GetSubgraphInfoResponses, GetSubgraphInfoErrors, GetSubgraphQuotaData, GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, CopyDataToGraphData, CopyDataToGraphResponses, CopyDataToGraphErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } from './types.gen';
|
|
5
5
|
import { client as _heyApiClient } from './client.gen';
|
|
6
6
|
|
|
7
7
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
@@ -61,7 +61,7 @@ export const logoutUser = <ThrowOnError extends boolean = false>(options?: Optio
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Get Current User
|
|
64
|
-
* Get
|
|
64
|
+
* Get the currently authenticated user.
|
|
65
65
|
*/
|
|
66
66
|
export const getCurrentAuthUser = <ThrowOnError extends boolean = false>(options?: Options<GetCurrentAuthUserData, ThrowOnError>) => {
|
|
67
67
|
return (options?.client ?? _heyApiClient).get<GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, ThrowOnError>({
|
|
@@ -72,15 +72,108 @@ export const getCurrentAuthUser = <ThrowOnError extends boolean = false>(options
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Refresh Session
|
|
75
|
-
* Refresh
|
|
75
|
+
* Refresh authentication session with a new JWT token.
|
|
76
76
|
*/
|
|
77
|
-
export const
|
|
78
|
-
return (options?.client ?? _heyApiClient).post<
|
|
77
|
+
export const refreshAuthSession = <ThrowOnError extends boolean = false>(options?: Options<RefreshAuthSessionData, ThrowOnError>) => {
|
|
78
|
+
return (options?.client ?? _heyApiClient).post<RefreshAuthSessionResponses, RefreshAuthSessionErrors, ThrowOnError>({
|
|
79
79
|
url: '/v1/auth/refresh',
|
|
80
80
|
...options
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Resend Email Verification
|
|
86
|
+
* Resend verification email to the authenticated user. Rate limited to 3 per hour.
|
|
87
|
+
*/
|
|
88
|
+
export const resendVerificationEmail = <ThrowOnError extends boolean = false>(options?: Options<ResendVerificationEmailData, ThrowOnError>) => {
|
|
89
|
+
return (options?.client ?? _heyApiClient).post<ResendVerificationEmailResponses, ResendVerificationEmailErrors, ThrowOnError>({
|
|
90
|
+
url: '/v1/auth/email/resend',
|
|
91
|
+
...options
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Verify Email
|
|
97
|
+
* Verify email address with token from email link. Returns JWT for auto-login.
|
|
98
|
+
*/
|
|
99
|
+
export const verifyEmail = <ThrowOnError extends boolean = false>(options: Options<VerifyEmailData, ThrowOnError>) => {
|
|
100
|
+
return (options.client ?? _heyApiClient).post<VerifyEmailResponses, VerifyEmailErrors, ThrowOnError>({
|
|
101
|
+
url: '/v1/auth/email/verify',
|
|
102
|
+
...options,
|
|
103
|
+
headers: {
|
|
104
|
+
'Content-Type': 'application/json',
|
|
105
|
+
...options.headers
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Get Password Policy
|
|
112
|
+
* Get current password policy requirements for frontend validation
|
|
113
|
+
*/
|
|
114
|
+
export const getPasswordPolicy = <ThrowOnError extends boolean = false>(options?: Options<GetPasswordPolicyData, ThrowOnError>) => {
|
|
115
|
+
return (options?.client ?? _heyApiClient).get<GetPasswordPolicyResponses, unknown, ThrowOnError>({
|
|
116
|
+
url: '/v1/auth/password/policy',
|
|
117
|
+
...options
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Check Password Strength
|
|
123
|
+
* Check password strength and get validation feedback
|
|
124
|
+
*/
|
|
125
|
+
export const checkPasswordStrength = <ThrowOnError extends boolean = false>(options: Options<CheckPasswordStrengthData, ThrowOnError>) => {
|
|
126
|
+
return (options.client ?? _heyApiClient).post<CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ThrowOnError>({
|
|
127
|
+
url: '/v1/auth/password/check',
|
|
128
|
+
...options,
|
|
129
|
+
headers: {
|
|
130
|
+
'Content-Type': 'application/json',
|
|
131
|
+
...options.headers
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Forgot Password
|
|
138
|
+
* Request password reset email. Always returns success to prevent email enumeration.
|
|
139
|
+
*/
|
|
140
|
+
export const forgotPassword = <ThrowOnError extends boolean = false>(options: Options<ForgotPasswordData, ThrowOnError>) => {
|
|
141
|
+
return (options.client ?? _heyApiClient).post<ForgotPasswordResponses, ForgotPasswordErrors, ThrowOnError>({
|
|
142
|
+
url: '/v1/auth/password/forgot',
|
|
143
|
+
...options,
|
|
144
|
+
headers: {
|
|
145
|
+
'Content-Type': 'application/json',
|
|
146
|
+
...options.headers
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Validate Reset Token
|
|
153
|
+
* Check if a password reset token is valid without consuming it.
|
|
154
|
+
*/
|
|
155
|
+
export const validateResetToken = <ThrowOnError extends boolean = false>(options: Options<ValidateResetTokenData, ThrowOnError>) => {
|
|
156
|
+
return (options.client ?? _heyApiClient).get<ValidateResetTokenResponses, ValidateResetTokenErrors, ThrowOnError>({
|
|
157
|
+
url: '/v1/auth/password/reset/validate',
|
|
158
|
+
...options
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Reset Password
|
|
164
|
+
* Reset password with token from email. Returns JWT for auto-login.
|
|
165
|
+
*/
|
|
166
|
+
export const resetPassword = <ThrowOnError extends boolean = false>(options: Options<ResetPasswordData, ThrowOnError>) => {
|
|
167
|
+
return (options.client ?? _heyApiClient).post<ResetPasswordResponses, ResetPasswordErrors, ThrowOnError>({
|
|
168
|
+
url: '/v1/auth/password/reset',
|
|
169
|
+
...options,
|
|
170
|
+
headers: {
|
|
171
|
+
'Content-Type': 'application/json',
|
|
172
|
+
...options.headers
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
|
|
84
177
|
/**
|
|
85
178
|
* Generate SSO Token
|
|
86
179
|
* Generate a temporary SSO token for cross-app authentication.
|
|
@@ -137,32 +230,6 @@ export const completeSsoAuth = <ThrowOnError extends boolean = false>(options: O
|
|
|
137
230
|
});
|
|
138
231
|
};
|
|
139
232
|
|
|
140
|
-
/**
|
|
141
|
-
* Get Password Policy
|
|
142
|
-
* Get current password policy requirements for frontend validation
|
|
143
|
-
*/
|
|
144
|
-
export const getPasswordPolicy = <ThrowOnError extends boolean = false>(options?: Options<GetPasswordPolicyData, ThrowOnError>) => {
|
|
145
|
-
return (options?.client ?? _heyApiClient).get<GetPasswordPolicyResponses, unknown, ThrowOnError>({
|
|
146
|
-
url: '/v1/auth/password/policy',
|
|
147
|
-
...options
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Check Password Strength
|
|
153
|
-
* Check password strength and get validation feedback
|
|
154
|
-
*/
|
|
155
|
-
export const checkPasswordStrength = <ThrowOnError extends boolean = false>(options: Options<CheckPasswordStrengthData, ThrowOnError>) => {
|
|
156
|
-
return (options.client ?? _heyApiClient).post<CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ThrowOnError>({
|
|
157
|
-
url: '/v1/auth/password/check',
|
|
158
|
-
...options,
|
|
159
|
-
headers: {
|
|
160
|
-
'Content-Type': 'application/json',
|
|
161
|
-
...options.headers
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
};
|
|
165
|
-
|
|
166
233
|
/**
|
|
167
234
|
* Get CAPTCHA Configuration
|
|
168
235
|
* Get CAPTCHA configuration including site key and whether CAPTCHA is required.
|
|
@@ -897,7 +964,7 @@ export const initOAuth = <ThrowOnError extends boolean = false>(options: Options
|
|
|
897
964
|
* - **QuickBooks**: Accounting data integration
|
|
898
965
|
*
|
|
899
966
|
* Security measures:
|
|
900
|
-
* - State validation prevents
|
|
967
|
+
* - State validation prevents session hijacking
|
|
901
968
|
* - User context is verified
|
|
902
969
|
* - Tokens are encrypted before storage
|
|
903
970
|
* - Full audit trail is maintained
|