@robosystems/client 0.3.5 → 0.3.7

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/sdk/sdk.gen.ts CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { Client, Options as Options2, TDataShape } from './client';
4
4
  import { client } from './client.gen';
5
- import type { AutoSelectAgentData, AutoSelectAgentErrors, AutoSelectAgentResponses, BatchProcessQueriesData, BatchProcessQueriesErrors, BatchProcessQueriesResponses, CallMcpToolData, CallMcpToolErrors, CallMcpToolResponses, CancelOperationData, CancelOperationErrors, CancelOperationResponses, CancelOrgSubscriptionData, CancelOrgSubscriptionErrors, CancelOrgSubscriptionResponses, ChangeSubscriptionPlanData, ChangeSubscriptionPlanErrors, ChangeSubscriptionPlanResponses, CheckPasswordStrengthData, CheckPasswordStrengthErrors, CheckPasswordStrengthResponses, CompleteSsoAuthData, CompleteSsoAuthErrors, CompleteSsoAuthResponses, CreateCheckoutSessionData, CreateCheckoutSessionErrors, CreateCheckoutSessionResponses, CreateConnectionData, CreateConnectionErrors, CreateConnectionResponses, CreateFileUploadData, CreateFileUploadErrors, CreateFileUploadResponses, CreateGraphData, CreateGraphErrors, CreateGraphResponses, CreatePortalSessionData, CreatePortalSessionErrors, CreatePortalSessionResponses, CreateRepositorySubscriptionData, CreateRepositorySubscriptionErrors, CreateRepositorySubscriptionResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, DeleteConnectionData, DeleteConnectionErrors, DeleteConnectionResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteFileData, DeleteFileErrors, DeleteFileResponses, ExecuteCypherQueryData, ExecuteCypherQueryErrors, ExecuteCypherQueryResponses, ExecuteSpecificAgentData, ExecuteSpecificAgentErrors, ExecuteSpecificAgentResponses, ExportGraphSchemaData, ExportGraphSchemaErrors, ExportGraphSchemaResponses, ForgotPasswordData, ForgotPasswordErrors, ForgotPasswordResponses, GenerateSsoTokenData, GenerateSsoTokenErrors, GenerateSsoTokenResponses, GetAgentMetadataData, GetAgentMetadataErrors, GetAgentMetadataResponses, GetAvailableExtensionsData, GetAvailableExtensionsErrors, GetAvailableExtensionsResponses, GetAvailableGraphTiersData, GetAvailableGraphTiersErrors, GetAvailableGraphTiersResponses, GetBackupDownloadUrlData, GetBackupDownloadUrlErrors, GetBackupDownloadUrlResponses, GetBackupStatsData, GetBackupStatsErrors, GetBackupStatsResponses, GetCaptchaConfigData, GetCaptchaConfigResponses, GetCheckoutStatusData, GetCheckoutStatusErrors, GetCheckoutStatusResponses, GetConnectionData, GetConnectionErrors, GetConnectionOptionsData, GetConnectionOptionsErrors, GetConnectionOptionsResponses, GetConnectionResponses, GetCreditSummaryData, GetCreditSummaryErrors, GetCreditSummaryResponses, GetCurrentAuthUserData, GetCurrentAuthUserErrors, GetCurrentAuthUserResponses, GetCurrentUserData, GetCurrentUserResponses, GetDatabaseHealthData, GetDatabaseHealthErrors, GetDatabaseHealthResponses, GetDatabaseInfoData, GetDatabaseInfoErrors, GetDatabaseInfoResponses, GetDocumentData, GetDocumentErrors, GetDocumentResponses, GetDocumentSectionData, GetDocumentSectionErrors, GetDocumentSectionResponses, GetFileData, GetFileErrors, GetFileResponses, GetGraphCapacityData, GetGraphCapacityErrors, GetGraphCapacityResponses, GetGraphLimitsData, GetGraphLimitsErrors, GetGraphLimitsResponses, GetGraphMetricsData, GetGraphMetricsErrors, GetGraphMetricsResponses, GetGraphSchemaData, GetGraphSchemaErrors, GetGraphSchemaResponses, GetGraphsData, GetGraphsErrors, GetGraphsResponses, GetGraphSubscriptionData, GetGraphSubscriptionErrors, GetGraphSubscriptionResponses, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsErrors, GetGraphUsageAnalyticsResponses, GetOperationStatusData, GetOperationStatusErrors, GetOperationStatusResponses, GetOrgBillingCustomerData, GetOrgBillingCustomerErrors, GetOrgBillingCustomerResponses, GetOrgData, GetOrgErrors, GetOrgLimitsData, GetOrgLimitsErrors, GetOrgLimitsResponses, GetOrgResponses, GetOrgSubscriptionData, GetOrgSubscriptionErrors, GetOrgSubscriptionResponses, GetOrgUpcomingInvoiceData, GetOrgUpcomingInvoiceErrors, GetOrgUpcomingInvoiceResponses, GetOrgUsageData, GetOrgUsageErrors, GetOrgUsageResponses, GetPasswordPolicyData, GetPasswordPolicyResponses, GetServiceOfferingsData, GetServiceOfferingsErrors, GetServiceOfferingsResponses, GetServiceStatusData, GetServiceStatusResponses, GetSubgraphInfoData, GetSubgraphInfoErrors, GetSubgraphInfoResponses, GetSubgraphQuotaData, GetSubgraphQuotaErrors, GetSubgraphQuotaResponses, HandleHttpGetExtensionsGraphIdGraphqlGetData, HandleHttpGetExtensionsGraphIdGraphqlGetErrors, HandleHttpGetExtensionsGraphIdGraphqlGetResponses, HandleHttpPostExtensionsGraphIdGraphqlPostData, HandleHttpPostExtensionsGraphIdGraphqlPostErrors, HandleHttpPostExtensionsGraphIdGraphqlPostResponses, InitOAuthData, InitOAuthErrors, InitOAuthResponses, InviteOrgMemberData, InviteOrgMemberErrors, InviteOrgMemberResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBackupsData, ListBackupsErrors, ListBackupsResponses, ListConnectionsData, ListConnectionsErrors, ListConnectionsResponses, ListCreditTransactionsData, ListCreditTransactionsErrors, ListCreditTransactionsResponses, ListDocumentsData, ListDocumentsErrors, ListDocumentsResponses, ListFilesData, ListFilesErrors, ListFilesResponses, ListMcpToolsData, ListMcpToolsErrors, ListMcpToolsResponses, ListOrgGraphsData, ListOrgGraphsErrors, ListOrgGraphsResponses, ListOrgInvoicesData, ListOrgInvoicesErrors, ListOrgInvoicesResponses, ListOrgMembersData, ListOrgMembersErrors, ListOrgMembersResponses, ListOrgSubscriptionsData, ListOrgSubscriptionsErrors, ListOrgSubscriptionsResponses, ListSubgraphsData, ListSubgraphsErrors, ListSubgraphsResponses, ListTablesData, ListTablesErrors, ListTablesResponses, ListUserApiKeysData, ListUserApiKeysResponses, ListUserOrgsData, ListUserOrgsResponses, LoginUserData, LoginUserErrors, LoginUserResponses, LogoutUserData, LogoutUserResponses, OauthCallbackData, OauthCallbackErrors, OauthCallbackResponses, OpAddPublishListMembersData, OpAddPublishListMembersErrors, OpAddPublishListMembersResponses, OpAutoMapElementsData, OpAutoMapElementsErrors, OpAutoMapElementsResponses, OpBuildFactGridData, OpBuildFactGridErrors, OpBuildFactGridResponses, OpClosePeriodData, OpClosePeriodErrors, OpClosePeriodResponses, OpCreateAssociationsData, OpCreateAssociationsErrors, OpCreateAssociationsResponses, OpCreateBackupData, OpCreateBackupErrors, OpCreateBackupResponses, OpCreateClosingEntryData, OpCreateClosingEntryErrors, OpCreateClosingEntryResponses, OpCreateElementData, OpCreateElementErrors, OpCreateElementResponses, OpCreateJournalEntryData, OpCreateJournalEntryErrors, OpCreateJournalEntryResponses, OpCreateManualClosingEntryData, OpCreateManualClosingEntryErrors, OpCreateManualClosingEntryResponses, OpCreateMappingAssociationData, OpCreateMappingAssociationErrors, OpCreateMappingAssociationResponses, OpCreatePortfolioData, OpCreatePortfolioErrors, OpCreatePortfolioResponses, OpCreatePositionData, OpCreatePositionErrors, OpCreatePositionResponses, OpCreatePublishListData, OpCreatePublishListErrors, OpCreatePublishListResponses, OpCreateReportData, OpCreateReportErrors, OpCreateReportResponses, OpCreateScheduleData, OpCreateScheduleErrors, OpCreateScheduleResponses, OpCreateSecurityData, OpCreateSecurityErrors, OpCreateSecurityResponses, OpCreateStructureData, OpCreateStructureErrors, OpCreateStructureResponses, OpCreateSubgraphData, OpCreateSubgraphErrors, OpCreateSubgraphResponses, OpCreateTaxonomyData, OpCreateTaxonomyErrors, OpCreateTaxonomyResponses, OpCreateTransactionData, OpCreateTransactionErrors, OpCreateTransactionResponses, OpDeleteAssociationData, OpDeleteAssociationErrors, OpDeleteAssociationResponses, OpDeleteElementData, OpDeleteElementErrors, OpDeleteElementResponses, OpDeleteJournalEntryData, OpDeleteJournalEntryErrors, OpDeleteJournalEntryResponses, OpDeleteMappingAssociationData, OpDeleteMappingAssociationErrors, OpDeleteMappingAssociationResponses, OpDeletePortfolioData, OpDeletePortfolioErrors, OpDeletePortfolioResponses, OpDeletePositionData, OpDeletePositionErrors, OpDeletePositionResponses, OpDeletePublishListData, OpDeletePublishListErrors, OpDeletePublishListResponses, OpDeleteReportData, OpDeleteReportErrors, OpDeleteReportResponses, OpDeleteScheduleData, OpDeleteScheduleErrors, OpDeleteScheduleResponses, OpDeleteSecurityData, OpDeleteSecurityErrors, OpDeleteSecurityResponses, OpDeleteStructureData, OpDeleteStructureErrors, OpDeleteStructureResponses, OpDeleteSubgraphData, OpDeleteSubgraphErrors, OpDeleteSubgraphResponses, OpDeleteTaxonomyData, OpDeleteTaxonomyErrors, OpDeleteTaxonomyResponses, OpInitializeLedgerData, OpInitializeLedgerErrors, OpInitializeLedgerResponses, OpLinkEntityTaxonomyData, OpLinkEntityTaxonomyErrors, OpLinkEntityTaxonomyResponses, OpMaterializeData, OpMaterializeErrors, OpMaterializeResponses, OpRegenerateReportData, OpRegenerateReportErrors, OpRegenerateReportResponses, OpRemovePublishListMemberData, OpRemovePublishListMemberErrors, OpRemovePublishListMemberResponses, OpReopenPeriodData, OpReopenPeriodErrors, OpReopenPeriodResponses, OpRestoreBackupData, OpRestoreBackupErrors, OpRestoreBackupResponses, OpReverseJournalEntryData, OpReverseJournalEntryErrors, OpReverseJournalEntryResponses, OpSetCloseTargetData, OpSetCloseTargetErrors, OpSetCloseTargetResponses, OpShareReportData, OpShareReportErrors, OpShareReportResponses, OpTruncateScheduleData, OpTruncateScheduleErrors, OpTruncateScheduleResponses, OpUpdateAssociationData, OpUpdateAssociationErrors, OpUpdateAssociationResponses, OpUpdateElementData, OpUpdateElementErrors, OpUpdateElementResponses, OpUpdateEntityData, OpUpdateEntityErrors, OpUpdateEntityResponses, OpUpdateJournalEntryData, OpUpdateJournalEntryErrors, OpUpdateJournalEntryResponses, OpUpdatePortfolioData, OpUpdatePortfolioErrors, OpUpdatePortfolioResponses, OpUpdatePositionData, OpUpdatePositionErrors, OpUpdatePositionResponses, OpUpdatePublishListData, OpUpdatePublishListErrors, OpUpdatePublishListResponses, OpUpdateScheduleData, OpUpdateScheduleErrors, OpUpdateScheduleResponses, OpUpdateSecurityData, OpUpdateSecurityErrors, OpUpdateSecurityResponses, OpUpdateStructureData, OpUpdateStructureErrors, OpUpdateStructureResponses, OpUpdateTaxonomyData, OpUpdateTaxonomyErrors, OpUpdateTaxonomyResponses, OpUpgradeTierData, OpUpgradeTierErrors, OpUpgradeTierResponses, QueryTablesData, QueryTablesErrors, QueryTablesResponses, RecommendAgentData, RecommendAgentErrors, RecommendAgentResponses, RefreshAuthSessionData, RefreshAuthSessionErrors, RefreshAuthSessionResponses, RegisterUserData, RegisterUserErrors, RegisterUserResponses, RemoveOrgMemberData, RemoveOrgMemberErrors, RemoveOrgMemberResponses, ResendVerificationEmailData, ResendVerificationEmailErrors, ResendVerificationEmailResponses, ResetPasswordData, ResetPasswordErrors, ResetPasswordResponses, RevokeUserApiKeyData, RevokeUserApiKeyErrors, RevokeUserApiKeyResponses, SearchDocumentsData, SearchDocumentsErrors, SearchDocumentsResponses, SelectGraphData, SelectGraphErrors, SelectGraphResponses, SsoTokenExchangeData, SsoTokenExchangeErrors, SsoTokenExchangeResponses, StreamOperationEventsData, StreamOperationEventsErrors, StreamOperationEventsResponses, SyncConnectionData, SyncConnectionErrors, SyncConnectionResponses, UpdateDocumentData, UpdateDocumentErrors, UpdateDocumentResponses, UpdateFileData, UpdateFileErrors, UpdateFileResponses, UpdateOrgData, UpdateOrgErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleErrors, UpdateOrgMemberRoleResponses, UpdateOrgResponses, UpdateUserApiKeyData, UpdateUserApiKeyErrors, UpdateUserApiKeyResponses, UpdateUserData, UpdateUserErrors, UpdateUserPasswordData, UpdateUserPasswordErrors, UpdateUserPasswordResponses, UpdateUserResponses, UploadDocumentData, UploadDocumentErrors, UploadDocumentResponses, UploadDocumentsBulkData, UploadDocumentsBulkErrors, UploadDocumentsBulkResponses, ValidateResetTokenData, ValidateResetTokenErrors, ValidateResetTokenResponses, ValidateSchemaData, ValidateSchemaErrors, ValidateSchemaResponses, VerifyEmailData, VerifyEmailErrors, VerifyEmailResponses } from './types.gen';
5
+ import type { AutoSelectAgentData, AutoSelectAgentErrors, AutoSelectAgentResponses, BatchProcessQueriesData, BatchProcessQueriesErrors, BatchProcessQueriesResponses, CallMcpToolData, CallMcpToolErrors, CallMcpToolResponses, CancelOperationData, CancelOperationErrors, CancelOperationResponses, CancelOrgSubscriptionData, CancelOrgSubscriptionErrors, CancelOrgSubscriptionResponses, ChangeSubscriptionPlanData, ChangeSubscriptionPlanErrors, ChangeSubscriptionPlanResponses, CheckPasswordStrengthData, CheckPasswordStrengthErrors, CheckPasswordStrengthResponses, CompleteSsoAuthData, CompleteSsoAuthErrors, CompleteSsoAuthResponses, CreateCheckoutSessionData, CreateCheckoutSessionErrors, CreateCheckoutSessionResponses, CreateConnectionData, CreateConnectionErrors, CreateConnectionResponses, CreateFileUploadData, CreateFileUploadErrors, CreateFileUploadResponses, CreateGraphData, CreateGraphErrors, CreateGraphResponses, CreatePortalSessionData, CreatePortalSessionErrors, CreatePortalSessionResponses, CreateRepositorySubscriptionData, CreateRepositorySubscriptionErrors, CreateRepositorySubscriptionResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, DeleteConnectionData, DeleteConnectionErrors, DeleteConnectionResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteFileData, DeleteFileErrors, DeleteFileResponses, ExecuteCypherQueryData, ExecuteCypherQueryErrors, ExecuteCypherQueryResponses, ExecuteSpecificAgentData, ExecuteSpecificAgentErrors, ExecuteSpecificAgentResponses, ExportGraphSchemaData, ExportGraphSchemaErrors, ExportGraphSchemaResponses, ForgotPasswordData, ForgotPasswordErrors, ForgotPasswordResponses, GenerateSsoTokenData, GenerateSsoTokenErrors, GenerateSsoTokenResponses, GetAgentMetadataData, GetAgentMetadataErrors, GetAgentMetadataResponses, GetAvailableExtensionsData, GetAvailableExtensionsErrors, GetAvailableExtensionsResponses, GetAvailableGraphTiersData, GetAvailableGraphTiersErrors, GetAvailableGraphTiersResponses, GetBackupDownloadUrlData, GetBackupDownloadUrlErrors, GetBackupDownloadUrlResponses, GetBackupStatsData, GetBackupStatsErrors, GetBackupStatsResponses, GetCaptchaConfigData, GetCaptchaConfigErrors, GetCaptchaConfigResponses, GetCheckoutStatusData, GetCheckoutStatusErrors, GetCheckoutStatusResponses, GetConnectionData, GetConnectionErrors, GetConnectionOptionsData, GetConnectionOptionsErrors, GetConnectionOptionsResponses, GetConnectionResponses, GetCreditSummaryData, GetCreditSummaryErrors, GetCreditSummaryResponses, GetCurrentAuthUserData, GetCurrentAuthUserErrors, GetCurrentAuthUserResponses, GetCurrentUserData, GetCurrentUserErrors, GetCurrentUserResponses, GetDatabaseHealthData, GetDatabaseHealthErrors, GetDatabaseHealthResponses, GetDatabaseInfoData, GetDatabaseInfoErrors, GetDatabaseInfoResponses, GetDocumentData, GetDocumentErrors, GetDocumentResponses, GetDocumentSectionData, GetDocumentSectionErrors, GetDocumentSectionResponses, GetFileData, GetFileErrors, GetFileResponses, GetGraphCapacityData, GetGraphCapacityErrors, GetGraphCapacityResponses, GetGraphLimitsData, GetGraphLimitsErrors, GetGraphLimitsResponses, GetGraphMetricsData, GetGraphMetricsErrors, GetGraphMetricsResponses, GetGraphSchemaData, GetGraphSchemaErrors, GetGraphSchemaResponses, GetGraphsData, GetGraphsErrors, GetGraphsResponses, GetGraphSubscriptionData, GetGraphSubscriptionErrors, GetGraphSubscriptionResponses, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsErrors, GetGraphUsageAnalyticsResponses, GetOperationStatusData, GetOperationStatusErrors, GetOperationStatusResponses, GetOrgBillingCustomerData, GetOrgBillingCustomerErrors, GetOrgBillingCustomerResponses, GetOrgData, GetOrgErrors, GetOrgLimitsData, GetOrgLimitsErrors, GetOrgLimitsResponses, GetOrgResponses, GetOrgSubscriptionData, GetOrgSubscriptionErrors, GetOrgSubscriptionResponses, GetOrgUpcomingInvoiceData, GetOrgUpcomingInvoiceErrors, GetOrgUpcomingInvoiceResponses, GetOrgUsageData, GetOrgUsageErrors, GetOrgUsageResponses, GetPasswordPolicyData, GetPasswordPolicyErrors, GetPasswordPolicyResponses, GetServiceOfferingsData, GetServiceOfferingsErrors, GetServiceOfferingsResponses, GetServiceStatusData, GetServiceStatusResponses, GetSubgraphInfoData, GetSubgraphInfoErrors, GetSubgraphInfoResponses, GetSubgraphQuotaData, GetSubgraphQuotaErrors, GetSubgraphQuotaResponses, HandleHttpGetExtensionsGraphIdGraphqlGetData, HandleHttpGetExtensionsGraphIdGraphqlGetErrors, HandleHttpGetExtensionsGraphIdGraphqlGetResponses, HandleHttpPostExtensionsGraphIdGraphqlPostData, HandleHttpPostExtensionsGraphIdGraphqlPostErrors, HandleHttpPostExtensionsGraphIdGraphqlPostResponses, InitOAuthData, InitOAuthErrors, InitOAuthResponses, InviteOrgMemberData, InviteOrgMemberErrors, InviteOrgMemberResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBackupsData, ListBackupsErrors, ListBackupsResponses, ListConnectionsData, ListConnectionsErrors, ListConnectionsResponses, ListCreditTransactionsData, ListCreditTransactionsErrors, ListCreditTransactionsResponses, ListDocumentsData, ListDocumentsErrors, ListDocumentsResponses, ListFilesData, ListFilesErrors, ListFilesResponses, ListMcpToolsData, ListMcpToolsErrors, ListMcpToolsResponses, ListOrgGraphsData, ListOrgGraphsErrors, ListOrgGraphsResponses, ListOrgInvoicesData, ListOrgInvoicesErrors, ListOrgInvoicesResponses, ListOrgMembersData, ListOrgMembersErrors, ListOrgMembersResponses, ListOrgSubscriptionsData, ListOrgSubscriptionsErrors, ListOrgSubscriptionsResponses, ListSubgraphsData, ListSubgraphsErrors, ListSubgraphsResponses, ListTablesData, ListTablesErrors, ListTablesResponses, ListUserApiKeysData, ListUserApiKeysErrors, ListUserApiKeysResponses, ListUserOrgsData, ListUserOrgsErrors, ListUserOrgsResponses, LoginUserData, LoginUserErrors, LoginUserResponses, LogoutUserData, LogoutUserErrors, LogoutUserResponses, OauthCallbackData, OauthCallbackErrors, OauthCallbackResponses, OpAddPublishListMembersData, OpAddPublishListMembersErrors, OpAddPublishListMembersResponses, OpAutoMapElementsData, OpAutoMapElementsErrors, OpAutoMapElementsResponses, OpBuildFactGridData, OpBuildFactGridErrors, OpBuildFactGridResponses, OpChangeTierData, OpChangeTierErrors, OpChangeTierResponses, OpClosePeriodData, OpClosePeriodErrors, OpClosePeriodResponses, OpCreateAssociationsData, OpCreateAssociationsErrors, OpCreateAssociationsResponses, OpCreateBackupData, OpCreateBackupErrors, OpCreateBackupResponses, OpCreateClosingEntryData, OpCreateClosingEntryErrors, OpCreateClosingEntryResponses, OpCreateElementData, OpCreateElementErrors, OpCreateElementResponses, OpCreateJournalEntryData, OpCreateJournalEntryErrors, OpCreateJournalEntryResponses, OpCreateManualClosingEntryData, OpCreateManualClosingEntryErrors, OpCreateManualClosingEntryResponses, OpCreateMappingAssociationData, OpCreateMappingAssociationErrors, OpCreateMappingAssociationResponses, OpCreatePortfolioData, OpCreatePortfolioErrors, OpCreatePortfolioResponses, OpCreatePositionData, OpCreatePositionErrors, OpCreatePositionResponses, OpCreatePublishListData, OpCreatePublishListErrors, OpCreatePublishListResponses, OpCreateReportData, OpCreateReportErrors, OpCreateReportResponses, OpCreateScheduleData, OpCreateScheduleErrors, OpCreateScheduleResponses, OpCreateSecurityData, OpCreateSecurityErrors, OpCreateSecurityResponses, OpCreateStructureData, OpCreateStructureErrors, OpCreateStructureResponses, OpCreateSubgraphData, OpCreateSubgraphErrors, OpCreateSubgraphResponses, OpCreateTaxonomyData, OpCreateTaxonomyErrors, OpCreateTaxonomyResponses, OpCreateTransactionData, OpCreateTransactionErrors, OpCreateTransactionResponses, OpDeleteAssociationData, OpDeleteAssociationErrors, OpDeleteAssociationResponses, OpDeleteElementData, OpDeleteElementErrors, OpDeleteElementResponses, OpDeleteJournalEntryData, OpDeleteJournalEntryErrors, OpDeleteJournalEntryResponses, OpDeleteMappingAssociationData, OpDeleteMappingAssociationErrors, OpDeleteMappingAssociationResponses, OpDeletePortfolioData, OpDeletePortfolioErrors, OpDeletePortfolioResponses, OpDeletePositionData, OpDeletePositionErrors, OpDeletePositionResponses, OpDeletePublishListData, OpDeletePublishListErrors, OpDeletePublishListResponses, OpDeleteReportData, OpDeleteReportErrors, OpDeleteReportResponses, OpDeleteScheduleData, OpDeleteScheduleErrors, OpDeleteScheduleResponses, OpDeleteSecurityData, OpDeleteSecurityErrors, OpDeleteSecurityResponses, OpDeleteStructureData, OpDeleteStructureErrors, OpDeleteStructureResponses, OpDeleteSubgraphData, OpDeleteSubgraphErrors, OpDeleteSubgraphResponses, OpDeleteTaxonomyData, OpDeleteTaxonomyErrors, OpDeleteTaxonomyResponses, OpInitializeLedgerData, OpInitializeLedgerErrors, OpInitializeLedgerResponses, OpLinkEntityTaxonomyData, OpLinkEntityTaxonomyErrors, OpLinkEntityTaxonomyResponses, OpMaterializeData, OpMaterializeErrors, OpMaterializeResponses, OpRegenerateReportData, OpRegenerateReportErrors, OpRegenerateReportResponses, OpRemovePublishListMemberData, OpRemovePublishListMemberErrors, OpRemovePublishListMemberResponses, OpReopenPeriodData, OpReopenPeriodErrors, OpReopenPeriodResponses, OpRestoreBackupData, OpRestoreBackupErrors, OpRestoreBackupResponses, OpReverseJournalEntryData, OpReverseJournalEntryErrors, OpReverseJournalEntryResponses, OpSetCloseTargetData, OpSetCloseTargetErrors, OpSetCloseTargetResponses, OpShareReportData, OpShareReportErrors, OpShareReportResponses, OpTruncateScheduleData, OpTruncateScheduleErrors, OpTruncateScheduleResponses, OpUpdateAssociationData, OpUpdateAssociationErrors, OpUpdateAssociationResponses, OpUpdateElementData, OpUpdateElementErrors, OpUpdateElementResponses, OpUpdateEntityData, OpUpdateEntityErrors, OpUpdateEntityResponses, OpUpdateJournalEntryData, OpUpdateJournalEntryErrors, OpUpdateJournalEntryResponses, OpUpdatePortfolioData, OpUpdatePortfolioErrors, OpUpdatePortfolioResponses, OpUpdatePositionData, OpUpdatePositionErrors, OpUpdatePositionResponses, OpUpdatePublishListData, OpUpdatePublishListErrors, OpUpdatePublishListResponses, OpUpdateScheduleData, OpUpdateScheduleErrors, OpUpdateScheduleResponses, OpUpdateSecurityData, OpUpdateSecurityErrors, OpUpdateSecurityResponses, OpUpdateStructureData, OpUpdateStructureErrors, OpUpdateStructureResponses, OpUpdateTaxonomyData, OpUpdateTaxonomyErrors, OpUpdateTaxonomyResponses, QueryTablesData, QueryTablesErrors, QueryTablesResponses, RecommendAgentData, RecommendAgentErrors, RecommendAgentResponses, RefreshAuthSessionData, RefreshAuthSessionErrors, RefreshAuthSessionResponses, RegisterUserData, RegisterUserErrors, RegisterUserResponses, RemoveOrgMemberData, RemoveOrgMemberErrors, RemoveOrgMemberResponses, ResendVerificationEmailData, ResendVerificationEmailErrors, ResendVerificationEmailResponses, ResetPasswordData, ResetPasswordErrors, ResetPasswordResponses, RevokeUserApiKeyData, RevokeUserApiKeyErrors, RevokeUserApiKeyResponses, SearchDocumentsData, SearchDocumentsErrors, SearchDocumentsResponses, SelectGraphData, SelectGraphErrors, SelectGraphResponses, SsoTokenExchangeData, SsoTokenExchangeErrors, SsoTokenExchangeResponses, StreamOperationEventsData, StreamOperationEventsErrors, StreamOperationEventsResponses, SyncConnectionData, SyncConnectionErrors, SyncConnectionResponses, UpdateDocumentData, UpdateDocumentErrors, UpdateDocumentResponses, UpdateFileData, UpdateFileErrors, UpdateFileResponses, UpdateOrgData, UpdateOrgErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleErrors, UpdateOrgMemberRoleResponses, UpdateOrgResponses, UpdateUserApiKeyData, UpdateUserApiKeyErrors, UpdateUserApiKeyResponses, UpdateUserData, UpdateUserErrors, UpdateUserPasswordData, UpdateUserPasswordErrors, UpdateUserPasswordResponses, UpdateUserResponses, UploadDocumentData, UploadDocumentErrors, UploadDocumentResponses, UploadDocumentsBulkData, UploadDocumentsBulkErrors, UploadDocumentsBulkResponses, ValidateResetTokenData, ValidateResetTokenErrors, ValidateResetTokenResponses, ValidateSchemaData, ValidateSchemaErrors, ValidateSchemaResponses, VerifyEmailData, VerifyEmailErrors, VerifyEmailResponses } from './types.gen';
6
6
 
7
7
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
8
8
  /**
@@ -21,11 +21,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
21
21
  /**
22
22
  * Register New User
23
23
  *
24
- * Register a new user account with email and password.
25
- *
26
- * **Organization Creation**: RoboSystems is an org-centric platform. When you register, a personal organization is automatically created for you. All resources (graphs, subscriptions, billing) belong to organizations, not individual users. You can later upgrade your personal org to a team or enterprise organization.
27
- *
28
- * **Security Controls**: CAPTCHA and email verification are disabled in development for API testing, but required in production.
24
+ * Creates the user and a personal organization. CAPTCHA required in production. Sends verification email when email verification is enabled.
29
25
  */
30
26
  export const registerUser = <ThrowOnError extends boolean = false>(options: Options<RegisterUserData, ThrowOnError>) => (options.client ?? client).post<RegisterUserResponses, RegisterUserErrors, ThrowOnError>({
31
27
  url: '/v1/auth/register',
@@ -39,7 +35,7 @@ export const registerUser = <ThrowOnError extends boolean = false>(options: Opti
39
35
  /**
40
36
  * User Login
41
37
  *
42
- * Authenticate user with email and password.
38
+ * Returns a JWT token on success. IP-based progressive delays apply after repeated failures.
43
39
  */
44
40
  export const loginUser = <ThrowOnError extends boolean = false>(options: Options<LoginUserData, ThrowOnError>) => (options.client ?? client).post<LoginUserResponses, LoginUserErrors, ThrowOnError>({
45
41
  url: '/v1/auth/login',
@@ -52,22 +48,18 @@ export const loginUser = <ThrowOnError extends boolean = false>(options: Options
52
48
 
53
49
  /**
54
50
  * User Logout
55
- *
56
- * Logout user and invalidate session.
57
51
  */
58
- export const logoutUser = <ThrowOnError extends boolean = false>(options?: Options<LogoutUserData, ThrowOnError>) => (options?.client ?? client).post<LogoutUserResponses, unknown, ThrowOnError>({ url: '/v1/auth/logout', ...options });
52
+ export const logoutUser = <ThrowOnError extends boolean = false>(options?: Options<LogoutUserData, ThrowOnError>) => (options?.client ?? client).post<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({ url: '/v1/auth/logout', ...options });
59
53
 
60
54
  /**
61
55
  * Get Current User
62
- *
63
- * Get the currently authenticated user.
64
56
  */
65
57
  export const getCurrentAuthUser = <ThrowOnError extends boolean = false>(options?: Options<GetCurrentAuthUserData, ThrowOnError>) => (options?.client ?? client).get<GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, ThrowOnError>({ url: '/v1/auth/me', ...options });
66
58
 
67
59
  /**
68
60
  * Refresh Session
69
61
  *
70
- * Refresh authentication session with a new JWT token.
62
+ * Revokes the current token and issues a new one. Accepts recently-expired tokens within the grace period.
71
63
  */
72
64
  export const refreshAuthSession = <ThrowOnError extends boolean = false>(options?: Options<RefreshAuthSessionData, ThrowOnError>) => (options?.client ?? client).post<RefreshAuthSessionResponses, RefreshAuthSessionErrors, ThrowOnError>({ url: '/v1/auth/refresh', ...options });
73
65
 
@@ -94,15 +86,11 @@ export const verifyEmail = <ThrowOnError extends boolean = false>(options: Optio
94
86
 
95
87
  /**
96
88
  * Get Password Policy
97
- *
98
- * Get current password policy requirements for frontend validation
99
89
  */
100
- export const getPasswordPolicy = <ThrowOnError extends boolean = false>(options?: Options<GetPasswordPolicyData, ThrowOnError>) => (options?.client ?? client).get<GetPasswordPolicyResponses, unknown, ThrowOnError>({ url: '/v1/auth/password/policy', ...options });
90
+ export const getPasswordPolicy = <ThrowOnError extends boolean = false>(options?: Options<GetPasswordPolicyData, ThrowOnError>) => (options?.client ?? client).get<GetPasswordPolicyResponses, GetPasswordPolicyErrors, ThrowOnError>({ url: '/v1/auth/password/policy', ...options });
101
91
 
102
92
  /**
103
93
  * Check Password Strength
104
- *
105
- * Check password strength and get validation feedback
106
94
  */
107
95
  export const checkPasswordStrength = <ThrowOnError extends boolean = false>(options: Options<CheckPasswordStrengthData, ThrowOnError>) => (options.client ?? client).post<CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ThrowOnError>({
108
96
  url: '/v1/auth/password/check',
@@ -130,14 +118,14 @@ export const forgotPassword = <ThrowOnError extends boolean = false>(options: Op
130
118
  /**
131
119
  * Validate Reset Token
132
120
  *
133
- * Check if a password reset token is valid without consuming it.
121
+ * Check if a password reset token is valid without consuming it. Returns masked email on success.
134
122
  */
135
123
  export const validateResetToken = <ThrowOnError extends boolean = false>(options: Options<ValidateResetTokenData, ThrowOnError>) => (options.client ?? client).get<ValidateResetTokenResponses, ValidateResetTokenErrors, ThrowOnError>({ url: '/v1/auth/password/reset/validate', ...options });
136
124
 
137
125
  /**
138
126
  * Reset Password
139
127
  *
140
- * Reset password with token from email. Returns JWT for auto-login.
128
+ * Reset password with token from email. Invalidates all existing sessions. Returns JWT for auto-login.
141
129
  */
142
130
  export const resetPassword = <ThrowOnError extends boolean = false>(options: Options<ResetPasswordData, ThrowOnError>) => (options.client ?? client).post<ResetPasswordResponses, ResetPasswordErrors, ThrowOnError>({
143
131
  url: '/v1/auth/password/reset',
@@ -151,14 +139,14 @@ export const resetPassword = <ThrowOnError extends boolean = false>(options: Opt
151
139
  /**
152
140
  * Generate SSO Token
153
141
  *
154
- * Generate a temporary SSO token for cross-app authentication.
142
+ * Step 1 of 3 in the cross-app SSO flow. Issues a single-use token (60s TTL) for handoff to a target application.
155
143
  */
156
144
  export const generateSsoToken = <ThrowOnError extends boolean = false>(options?: Options<GenerateSsoTokenData, ThrowOnError>) => (options?.client ?? client).post<GenerateSsoTokenResponses, GenerateSsoTokenErrors, ThrowOnError>({ url: '/v1/auth/sso-token', ...options });
157
145
 
158
146
  /**
159
147
  * SSO Token Exchange
160
148
  *
161
- * Exchange SSO token for secure session handoff to target application.
149
+ * Step 2 of 3. Exchanges the SSO token for a short-lived session ID. Avoids passing tokens in redirect URLs.
162
150
  */
163
151
  export const ssoTokenExchange = <ThrowOnError extends boolean = false>(options: Options<SsoTokenExchangeData, ThrowOnError>) => (options.client ?? client).post<SsoTokenExchangeResponses, SsoTokenExchangeErrors, ThrowOnError>({
164
152
  url: '/v1/auth/sso-exchange',
@@ -172,7 +160,7 @@ export const ssoTokenExchange = <ThrowOnError extends boolean = false>(options:
172
160
  /**
173
161
  * Complete SSO Authentication
174
162
  *
175
- * Complete SSO authentication using session ID from secure handoff.
163
+ * Step 3 of 3. Exchanges the session ID for a full JWT token. Called by the target app after redirect.
176
164
  */
177
165
  export const completeSsoAuth = <ThrowOnError extends boolean = false>(options: Options<CompleteSsoAuthData, ThrowOnError>) => (options.client ?? client).post<CompleteSsoAuthResponses, CompleteSsoAuthErrors, ThrowOnError>({
178
166
  url: '/v1/auth/sso-complete',
@@ -186,23 +174,21 @@ export const completeSsoAuth = <ThrowOnError extends boolean = false>(options: O
186
174
  /**
187
175
  * Get CAPTCHA Configuration
188
176
  *
189
- * Get CAPTCHA configuration including site key and whether CAPTCHA is required.
177
+ * Returns site key and whether CAPTCHA is required. Site key is null when CAPTCHA is disabled.
190
178
  */
191
- export const getCaptchaConfig = <ThrowOnError extends boolean = false>(options?: Options<GetCaptchaConfigData, ThrowOnError>) => (options?.client ?? client).get<GetCaptchaConfigResponses, unknown, ThrowOnError>({ url: '/v1/auth/captcha/config', ...options });
179
+ export const getCaptchaConfig = <ThrowOnError extends boolean = false>(options?: Options<GetCaptchaConfigData, ThrowOnError>) => (options?.client ?? client).get<GetCaptchaConfigResponses, GetCaptchaConfigErrors, ThrowOnError>({ url: '/v1/auth/captcha/config', ...options });
192
180
 
193
181
  /**
194
182
  * Health Check
195
183
  *
196
- * Service health check endpoint for monitoring and load balancers
184
+ * Unprotected used by load balancers and monitoring. No authentication required.
197
185
  */
198
186
  export const getServiceStatus = <ThrowOnError extends boolean = false>(options?: Options<GetServiceStatusData, ThrowOnError>) => (options?.client ?? client).get<GetServiceStatusResponses, unknown, ThrowOnError>({ url: '/v1/status', ...options });
199
187
 
200
188
  /**
201
189
  * Get Current User
202
- *
203
- * Returns information about the currently authenticated user.
204
190
  */
205
- export const getCurrentUser = <ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserData, ThrowOnError>) => (options?.client ?? client).get<GetCurrentUserResponses, unknown, ThrowOnError>({
191
+ export const getCurrentUser = <ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserData, ThrowOnError>) => (options?.client ?? client).get<GetCurrentUserResponses, GetCurrentUserErrors, ThrowOnError>({
206
192
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
207
193
  url: '/v1/user',
208
194
  ...options
@@ -210,8 +196,6 @@ export const getCurrentUser = <ThrowOnError extends boolean = false>(options?: O
210
196
 
211
197
  /**
212
198
  * Update User Profile
213
- *
214
- * Update the current user's profile information.
215
199
  */
216
200
  export const updateUser = <ThrowOnError extends boolean = false>(options: Options<UpdateUserData, ThrowOnError>) => (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({
217
201
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -226,7 +210,7 @@ export const updateUser = <ThrowOnError extends boolean = false>(options: Option
226
210
  /**
227
211
  * Update Password
228
212
  *
229
- * Update the current user's password.
213
+ * Requires current password verification. Not available for SSO-only accounts.
230
214
  */
231
215
  export const updateUserPassword = <ThrowOnError extends boolean = false>(options: Options<UpdateUserPasswordData, ThrowOnError>) => (options.client ?? client).put<UpdateUserPasswordResponses, UpdateUserPasswordErrors, ThrowOnError>({
232
216
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -240,10 +224,8 @@ export const updateUserPassword = <ThrowOnError extends boolean = false>(options
240
224
 
241
225
  /**
242
226
  * List API Keys
243
- *
244
- * Get all API keys for the current user.
245
227
  */
246
- export const listUserApiKeys = <ThrowOnError extends boolean = false>(options?: Options<ListUserApiKeysData, ThrowOnError>) => (options?.client ?? client).get<ListUserApiKeysResponses, unknown, ThrowOnError>({
228
+ export const listUserApiKeys = <ThrowOnError extends boolean = false>(options?: Options<ListUserApiKeysData, ThrowOnError>) => (options?.client ?? client).get<ListUserApiKeysResponses, ListUserApiKeysErrors, ThrowOnError>({
247
229
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
248
230
  url: '/v1/user/api-keys',
249
231
  ...options
@@ -252,7 +234,7 @@ export const listUserApiKeys = <ThrowOnError extends boolean = false>(options?:
252
234
  /**
253
235
  * Create API Key
254
236
  *
255
- * Create a new API key for the current user.
237
+ * The raw key value is only returned once at creation time and cannot be retrieved again.
256
238
  */
257
239
  export const createUserApiKey = <ThrowOnError extends boolean = false>(options: Options<CreateUserApiKeyData, ThrowOnError>) => (options.client ?? client).post<CreateUserApiKeyResponses, CreateUserApiKeyErrors, ThrowOnError>({
258
240
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -267,7 +249,7 @@ export const createUserApiKey = <ThrowOnError extends boolean = false>(options:
267
249
  /**
268
250
  * Revoke API Key
269
251
  *
270
- * Revoke (deactivate) an API key.
252
+ * Deactivates the key immediately. Requests using the revoked key will fail with 401.
271
253
  */
272
254
  export const revokeUserApiKey = <ThrowOnError extends boolean = false>(options: Options<RevokeUserApiKeyData, ThrowOnError>) => (options.client ?? client).delete<RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, ThrowOnError>({
273
255
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -277,8 +259,6 @@ export const revokeUserApiKey = <ThrowOnError extends boolean = false>(options:
277
259
 
278
260
  /**
279
261
  * Update API Key
280
- *
281
- * Update an API key's name or description.
282
262
  */
283
263
  export const updateUserApiKey = <ThrowOnError extends boolean = false>(options: Options<UpdateUserApiKeyData, ThrowOnError>) => (options.client ?? client).put<UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, ThrowOnError>({
284
264
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -292,10 +272,8 @@ export const updateUserApiKey = <ThrowOnError extends boolean = false>(options:
292
272
 
293
273
  /**
294
274
  * List User's Organizations
295
- *
296
- * Get all organizations the current user belongs to, with their role in each.
297
275
  */
298
- export const listUserOrgs = <ThrowOnError extends boolean = false>(options?: Options<ListUserOrgsData, ThrowOnError>) => (options?.client ?? client).get<ListUserOrgsResponses, unknown, ThrowOnError>({
276
+ export const listUserOrgs = <ThrowOnError extends boolean = false>(options?: Options<ListUserOrgsData, ThrowOnError>) => (options?.client ?? client).get<ListUserOrgsResponses, ListUserOrgsErrors, ThrowOnError>({
299
277
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
300
278
  url: '/v1/orgs',
301
279
  ...options
@@ -303,8 +281,6 @@ export const listUserOrgs = <ThrowOnError extends boolean = false>(options?: Opt
303
281
 
304
282
  /**
305
283
  * Get Organization
306
- *
307
- * Get detailed information about an organization.
308
284
  */
309
285
  export const getOrg = <ThrowOnError extends boolean = false>(options: Options<GetOrgData, ThrowOnError>) => (options.client ?? client).get<GetOrgResponses, GetOrgErrors, ThrowOnError>({
310
286
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -315,7 +291,7 @@ export const getOrg = <ThrowOnError extends boolean = false>(options: Options<Ge
315
291
  /**
316
292
  * Update Organization
317
293
  *
318
- * Update organization information. Requires admin or owner role.
294
+ * Requires admin or owner role. Only owners can change the org type.
319
295
  */
320
296
  export const updateOrg = <ThrowOnError extends boolean = false>(options: Options<UpdateOrgData, ThrowOnError>) => (options.client ?? client).put<UpdateOrgResponses, UpdateOrgErrors, ThrowOnError>({
321
297
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -329,8 +305,6 @@ export const updateOrg = <ThrowOnError extends boolean = false>(options: Options
329
305
 
330
306
  /**
331
307
  * List Organization Graphs
332
- *
333
- * Get all graphs belonging to an organization.
334
308
  */
335
309
  export const listOrgGraphs = <ThrowOnError extends boolean = false>(options: Options<ListOrgGraphsData, ThrowOnError>) => (options.client ?? client).get<ListOrgGraphsResponses, ListOrgGraphsErrors, ThrowOnError>({
336
310
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -340,8 +314,6 @@ export const listOrgGraphs = <ThrowOnError extends boolean = false>(options: Opt
340
314
 
341
315
  /**
342
316
  * List Organization Members
343
- *
344
- * Get all members of an organization with their roles.
345
317
  */
346
318
  export const listOrgMembers = <ThrowOnError extends boolean = false>(options: Options<ListOrgMembersData, ThrowOnError>) => (options.client ?? client).get<ListOrgMembersResponses, ListOrgMembersErrors, ThrowOnError>({
347
319
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -352,10 +324,7 @@ export const listOrgMembers = <ThrowOnError extends boolean = false>(options: Op
352
324
  /**
353
325
  * Invite Member
354
326
  *
355
- * Invite a user to join the organization. Requires admin or owner role.
356
- *
357
- * **⚠️ FEATURE NOT READY**: This endpoint is disabled by default (ORG_MEMBER_INVITATIONS_ENABLED=false).
358
- * Returns 501 NOT IMPLEMENTED when disabled. See endpoint implementation for TODO list before enabling.
327
+ * Disabled by default (ORG_MEMBER_INVITATIONS_ENABLED=false). Returns 501 when disabled. Requires admin or owner role.
359
328
  */
360
329
  export const inviteOrgMember = <ThrowOnError extends boolean = false>(options: Options<InviteOrgMemberData, ThrowOnError>) => (options.client ?? client).post<InviteOrgMemberResponses, InviteOrgMemberErrors, ThrowOnError>({
361
330
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -370,7 +339,7 @@ export const inviteOrgMember = <ThrowOnError extends boolean = false>(options: O
370
339
  /**
371
340
  * Remove Member
372
341
  *
373
- * Remove a member from the organization. Requires admin or owner role.
342
+ * Requires admin or owner role. Members may remove themselves.
374
343
  */
375
344
  export const removeOrgMember = <ThrowOnError extends boolean = false>(options: Options<RemoveOrgMemberData, ThrowOnError>) => (options.client ?? client).delete<RemoveOrgMemberResponses, RemoveOrgMemberErrors, ThrowOnError>({
376
345
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -381,7 +350,7 @@ export const removeOrgMember = <ThrowOnError extends boolean = false>(options: O
381
350
  /**
382
351
  * Update Member Role
383
352
  *
384
- * Update a member's role in the organization. Requires admin or owner role.
353
+ * Requires admin or owner role. Owner promotion/demotion requires a dedicated ownership transfer workflow.
385
354
  */
386
355
  export const updateOrgMemberRole = <ThrowOnError extends boolean = false>(options: Options<UpdateOrgMemberRoleData, ThrowOnError>) => (options.client ?? client).put<UpdateOrgMemberRoleResponses, UpdateOrgMemberRoleErrors, ThrowOnError>({
387
356
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -395,8 +364,6 @@ export const updateOrgMemberRole = <ThrowOnError extends boolean = false>(option
395
364
 
396
365
  /**
397
366
  * Get Organization Limits
398
- *
399
- * Get the current limits and quotas for an organization.
400
367
  */
401
368
  export const getOrgLimits = <ThrowOnError extends boolean = false>(options: Options<GetOrgLimitsData, ThrowOnError>) => (options.client ?? client).get<GetOrgLimitsResponses, GetOrgLimitsErrors, ThrowOnError>({
402
369
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -407,7 +374,7 @@ export const getOrgLimits = <ThrowOnError extends boolean = false>(options: Opti
407
374
  /**
408
375
  * Get Organization Usage
409
376
  *
410
- * Get detailed usage statistics for an organization aggregated across all graphs.
377
+ * Aggregated across all graphs in the org. Use the `days` query param to control the lookback window (default 30).
411
378
  */
412
379
  export const getOrgUsage = <ThrowOnError extends boolean = false>(options: Options<GetOrgUsageData, ThrowOnError>) => (options.client ?? client).get<GetOrgUsageResponses, GetOrgUsageErrors, ThrowOnError>({
413
380
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -417,21 +384,6 @@ export const getOrgUsage = <ThrowOnError extends boolean = false>(options: Optio
417
384
 
418
385
  /**
419
386
  * List Connections
420
- *
421
- * List all data connections in the graph.
422
- *
423
- * Returns active and inactive connections with their current status.
424
- * Connections can be filtered by:
425
- * - **Entity**: Show connections for a specific entity
426
- * - **Provider**: Filter by connection type (sec, quickbooks)
427
- *
428
- * Each connection shows:
429
- * - Current sync status and health
430
- * - Last successful sync timestamp
431
- * - Configuration metadata
432
- * - Error messages if any
433
- *
434
- * No credits are consumed for listing connections.
435
387
  */
436
388
  export const listConnections = <ThrowOnError extends boolean = false>(options: Options<ListConnectionsData, ThrowOnError>) => (options.client ?? client).get<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError>({
437
389
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -442,22 +394,7 @@ export const listConnections = <ThrowOnError extends boolean = false>(options: O
442
394
  /**
443
395
  * Create Connection
444
396
  *
445
- * Create a new data connection for external system integration.
446
- *
447
- * This endpoint initiates connections to external data sources:
448
- *
449
- * **SEC Connections**:
450
- * - Provide entity CIK for automatic filing retrieval
451
- * - No authentication needed
452
- * - Begins immediate data sync
453
- *
454
- * **QuickBooks Connections**:
455
- * - Returns OAuth URL for authorization
456
- * - Requires admin permissions in QuickBooks
457
- * - Complete with OAuth callback
458
- *
459
- * Note:
460
- * This operation is included - no credit consumption required.
397
+ * SEC: provide entity CIK, no auth needed. QuickBooks: returns an OAuth URL — complete the flow to activate. One connection allowed per provider per graph.
461
398
  */
462
399
  export const createConnection = <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>) => (options.client ?? client).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({
463
400
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -472,21 +409,7 @@ export const createConnection = <ThrowOnError extends boolean = false>(options:
472
409
  /**
473
410
  * List Connection Options
474
411
  *
475
- * Get metadata about all available data connection providers.
476
- *
477
- * This endpoint returns comprehensive information about each supported provider:
478
- *
479
- * **SEC EDGAR**: Public entity financial filings
480
- * - No authentication required (public data)
481
- * - 10-K, 10-Q, 8-K reports with XBRL data
482
- * - Historical and real-time filing access
483
- *
484
- * **QuickBooks Online**: Full accounting system integration
485
- * - OAuth 2.0 authentication
486
- * - Chart of accounts, transactions, trial balance
487
- * - Real-time sync capabilities
488
- *
489
- * No credits are consumed for viewing connection options.
412
+ * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). SEC requires no auth; QuickBooks requires OAuth 2.0.
490
413
  */
491
414
  export const getConnectionOptions = <ThrowOnError extends boolean = false>(options: Options<GetConnectionOptionsData, ThrowOnError>) => (options.client ?? client).get<GetConnectionOptionsResponses, GetConnectionOptionsErrors, ThrowOnError>({
492
415
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -495,12 +418,7 @@ export const getConnectionOptions = <ThrowOnError extends boolean = false>(optio
495
418
  });
496
419
 
497
420
  /**
498
- * Init Oauth
499
- *
500
- * Initialize OAuth flow for a connection.
501
- *
502
- * This generates an authorization URL that the frontend should redirect the user to.
503
- * Currently supports: QuickBooks
421
+ * Initialize OAuth Flow
504
422
  */
505
423
  export const initOAuth = <ThrowOnError extends boolean = false>(options: Options<InitOAuthData, ThrowOnError>) => (options.client ?? client).post<InitOAuthResponses, InitOAuthErrors, ThrowOnError>({
506
424
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -515,25 +433,7 @@ export const initOAuth = <ThrowOnError extends boolean = false>(options: Options
515
433
  /**
516
434
  * OAuth Callback
517
435
  *
518
- * Handle OAuth callback from provider after user authorization.
519
- *
520
- * This endpoint completes the OAuth flow:
521
- * 1. Validates the OAuth state parameter
522
- * 2. Exchanges authorization code for access tokens
523
- * 3. Stores tokens securely
524
- * 4. Updates connection status
525
- * 5. Optionally triggers initial sync
526
- *
527
- * Supported providers:
528
- * - **QuickBooks**: Accounting data integration
529
- *
530
- * Security measures:
531
- * - State validation prevents session hijacking
532
- * - User context is verified
533
- * - Tokens are encrypted before storage
534
- * - Full audit trail is maintained
535
- *
536
- * No credits are consumed for OAuth callbacks.
436
+ * Completes the OAuth authorization flow after provider redirect. Exchanges the authorization code for tokens, stores them, and triggers an initial sync. This is a redirect target — not typically called directly.
537
437
  */
538
438
  export const oauthCallback = <ThrowOnError extends boolean = false>(options: Options<OauthCallbackData, ThrowOnError>) => (options.client ?? client).post<OauthCallbackResponses, OauthCallbackErrors, ThrowOnError>({
539
439
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -548,18 +448,7 @@ export const oauthCallback = <ThrowOnError extends boolean = false>(options: Opt
548
448
  /**
549
449
  * Delete Connection
550
450
  *
551
- * Delete a data connection and clean up related resources.
552
- *
553
- * This operation:
554
- * - Removes the connection configuration
555
- * - Preserves any imported data in the graph
556
- * - Performs provider-specific cleanup
557
- * - Revokes stored credentials
558
- *
559
- * Note:
560
- * This operation is included - no credit consumption required.
561
- *
562
- * Only users with admin role can delete connections.
451
+ * Removes the connection and revokes credentials. Imported data is preserved in the graph. Requires admin role.
563
452
  */
564
453
  export const deleteConnection = <ThrowOnError extends boolean = false>(options: Options<DeleteConnectionData, ThrowOnError>) => (options.client ?? client).delete<DeleteConnectionResponses, DeleteConnectionErrors, ThrowOnError>({
565
454
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -569,17 +458,6 @@ export const deleteConnection = <ThrowOnError extends boolean = false>(options:
569
458
 
570
459
  /**
571
460
  * Get Connection
572
- *
573
- * Get detailed information about a specific connection.
574
- *
575
- * Returns comprehensive connection details including:
576
- * - Current status and health indicators
577
- * - Authentication state
578
- * - Sync history and statistics
579
- * - Error details if any
580
- * - Provider-specific metadata
581
- *
582
- * No credits are consumed for viewing connection details.
583
461
  */
584
462
  export const getConnection = <ThrowOnError extends boolean = false>(options: Options<GetConnectionData, ThrowOnError>) => (options.client ?? client).get<GetConnectionResponses, GetConnectionErrors, ThrowOnError>({
585
463
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -590,26 +468,7 @@ export const getConnection = <ThrowOnError extends boolean = false>(options: Opt
590
468
  /**
591
469
  * Sync Connection
592
470
  *
593
- * Trigger a data synchronization for the connection.
594
- *
595
- * Initiates data sync based on provider type:
596
- *
597
- * **SEC Sync**:
598
- * - Downloads latest filings from EDGAR
599
- * - Parses XBRL data and updates graph
600
- * - Typically completes in 5-10 minutes
601
- *
602
- * **QuickBooks Sync**:
603
- * - Fetches latest transactions and balances
604
- * - Updates chart of accounts
605
- * - Generates fresh trial balance
606
- * - Duration depends on data volume
607
- *
608
- * Note:
609
- * This operation is included - no credit consumption required.
610
- *
611
- * Returns an `OperationEnvelope` with an `operationId` for tracking sync progress.
612
- * Supports `Idempotency-Key` header to safely retry without triggering duplicate syncs.
471
+ * SEC: downloads latest EDGAR filings (5-10 min). QuickBooks: fetches transactions, balances, and chart of accounts. Returns an `OperationEnvelope` — monitor progress via SSE at `/v1/operations/{operation_id}/stream`. Supports `Idempotency-Key`.
613
472
  */
614
473
  export const syncConnection = <ThrowOnError extends boolean = false>(options: Options<SyncConnectionData, ThrowOnError>) => (options.client ?? client).post<SyncConnectionResponses, SyncConnectionErrors, ThrowOnError>({
615
474
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -622,17 +481,9 @@ export const syncConnection = <ThrowOnError extends boolean = false>(options: Op
622
481
  });
623
482
 
624
483
  /**
625
- * List available agents
626
- *
627
- * Get a comprehensive list of all available agents with their metadata.
628
- *
629
- * **Returns:**
630
- * - Agent types and names
631
- * - Capabilities and supported modes
632
- * - Version information
633
- * - Credit requirements
484
+ * List Available Agents
634
485
  *
635
- * Use the optional `capability` filter to find agents with specific capabilities.
486
+ * Filter by capability using the `capability` query param (e.g., `financial_analysis`, `rag_search`).
636
487
  */
637
488
  export const listAgents = <ThrowOnError extends boolean = false>(options: Options<ListAgentsData, ThrowOnError>) => (options.client ?? client).get<ListAgentsResponses, ListAgentsErrors, ThrowOnError>({
638
489
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -641,66 +492,9 @@ export const listAgents = <ThrowOnError extends boolean = false>(options: Option
641
492
  });
642
493
 
643
494
  /**
644
- * Auto-select agent for query
645
- *
646
- * Automatically select the best agent for your query with intelligent execution strategy.
647
- *
648
- * **Agent Selection Process:**
649
- *
650
- * The orchestrator intelligently routes your query by:
651
- * 1. Analyzing query intent and complexity
652
- * 2. Enriching context with RAG if enabled
653
- * 3. Evaluating all available agents against selection criteria
654
- * 4. Selecting the best match based on confidence scores
655
- * 5. Choosing execution strategy (sync/SSE/async) based on expected time
656
- * 6. Executing the query with the selected agent
657
- *
658
- * **Available Agent Types:**
659
- * - `financial`: Financial analysis, SEC filings, company metrics
660
- * - `research`: General research, data exploration, trend analysis
661
- * - `rag`: Knowledge base search using RAG enrichment
495
+ * Auto-select Agent for Query
662
496
  *
663
- * **Execution Modes:**
664
- * - `quick`: Fast responses (~2-5s), suitable for simple queries
665
- * - `standard`: Balanced approach (~5-15s), default mode
666
- * - `extended`: Comprehensive analysis (~15-60s), deep research
667
- * - `streaming`: Real-time response streaming
668
- *
669
- * **Execution Strategies (automatic):**
670
- * - Fast operations (<5s): Immediate synchronous response
671
- * - Medium operations (5-30s): SSE streaming with progress updates
672
- * - Long operations (>30s): Background queue with operation tracking
673
- *
674
- * **Response Mode Override:**
675
- * Use query parameter `?mode=sync|async` to override automatic strategy selection.
676
- *
677
- * **Confidence Score Interpretation:**
678
- * - `0.9-1.0`: High confidence, agent is ideal match
679
- * - `0.7-0.9`: Good confidence, agent is suitable
680
- * - `0.5-0.7`: Moderate confidence, agent can handle but may not be optimal
681
- * - `0.3-0.5`: Low confidence, fallback agent used
682
- * - `<0.3`: Very low confidence, consider using specific agent endpoint
683
- *
684
- * **Credit Costs:**
685
- * - Quick mode: 5-10 credits per query
686
- * - Standard mode: 15-25 credits per query
687
- * - Extended mode: 30-75 credits per query
688
- * - RAG enrichment: +5-15 credits (if enabled)
689
- *
690
- * **Use Cases:**
691
- * - Ask questions without specifying agent type
692
- * - Get intelligent routing for complex multi-domain queries
693
- * - Leverage conversation history for contextual understanding
694
- * - Enable RAG for knowledge base enrichment
695
- *
696
- * **Subgraph Support:**
697
- * This endpoint accepts both parent graph IDs and subgraph IDs.
698
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
699
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
700
- * Agents operate on the specified graph/subgraph's data independently. RAG enrichment
701
- * and knowledge base search are scoped to the specific graph/subgraph.
702
- *
703
- * See request/response examples in the "Examples" dropdown below.
497
+ * Routes to the best agent for your query. Agents: `financial` (SEC, accounting), `research` (deep analysis), `rag` (knowledge base, free). Credit cost by mode: `quick` 5-10, `standard` 15-25, `extended` 30-75. Execution strategy (sync/SSE/async) auto-selected; override with `?mode=sync|async`.
704
498
  */
705
499
  export const autoSelectAgent = <ThrowOnError extends boolean = false>(options: Options<AutoSelectAgentData, ThrowOnError>) => (options.client ?? client).post<AutoSelectAgentResponses, AutoSelectAgentErrors, ThrowOnError>({
706
500
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -713,19 +507,7 @@ export const autoSelectAgent = <ThrowOnError extends boolean = false>(options: O
713
507
  });
714
508
 
715
509
  /**
716
- * Get agent metadata
717
- *
718
- * Get comprehensive metadata for a specific agent type.
719
- *
720
- * **Returns:**
721
- * - Agent name and description
722
- * - Version information
723
- * - Supported capabilities and modes
724
- * - Credit requirements
725
- * - Author and tags
726
- * - Configuration options
727
- *
728
- * Use this to understand agent capabilities before execution.
510
+ * Get Agent Metadata
729
511
  */
730
512
  export const getAgentMetadata = <ThrowOnError extends boolean = false>(options: Options<GetAgentMetadataData, ThrowOnError>) => (options.client ?? client).get<GetAgentMetadataResponses, GetAgentMetadataErrors, ThrowOnError>({
731
513
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -734,24 +516,9 @@ export const getAgentMetadata = <ThrowOnError extends boolean = false>(options:
734
516
  });
735
517
 
736
518
  /**
737
- * Execute specific agent
738
- *
739
- * Execute a specific agent type directly with intelligent execution strategy.
740
- *
741
- * Available agents:
742
- * - **financial**: Financial analysis, SEC filings, accounting data
743
- * - **research**: Deep research and comprehensive analysis
744
- * - **rag**: Fast retrieval without AI (no credits required)
519
+ * Execute Specific Agent
745
520
  *
746
- * **Execution Strategies (automatic):**
747
- * - Fast operations (<5s): Immediate synchronous response
748
- * - Medium operations (5-30s): SSE streaming with progress updates
749
- * - Long operations (>30s): Background queue with operation tracking
750
- *
751
- * **Response Mode Override:**
752
- * Use query parameter `?mode=sync|async` to override automatic strategy selection.
753
- *
754
- * Use this endpoint when you know which agent you want to use.
521
+ * Available: `financial` (SEC filings, accounting), `research` (deep analysis), `rag` (retrieval, no credits). Execution strategy auto-selected; override with `?mode=sync|async`.
755
522
  */
756
523
  export const executeSpecificAgent = <ThrowOnError extends boolean = false>(options: Options<ExecuteSpecificAgentData, ThrowOnError>) => (options.client ?? client).post<ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, ThrowOnError>({
757
524
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -764,22 +531,9 @@ export const executeSpecificAgent = <ThrowOnError extends boolean = false>(optio
764
531
  });
765
532
 
766
533
  /**
767
- * Batch process multiple queries
768
- *
769
- * Process multiple queries either sequentially or in parallel.
770
- *
771
- * **Features:**
772
- * - Process up to 10 queries in a single request
773
- * - Sequential or parallel execution modes
774
- * - Automatic error handling per query
775
- * - Credit checking before execution
534
+ * Batch Process Queries
776
535
  *
777
- * **Use Cases:**
778
- * - Bulk analysis of multiple entities
779
- * - Comparative analysis across queries
780
- * - Automated report generation
781
- *
782
- * Returns individual results for each query with execution metrics.
536
+ * Process up to 10 queries sequentially or in parallel. Partial failure is supported — each result has individual error handling.
783
537
  */
784
538
  export const batchProcessQueries = <ThrowOnError extends boolean = false>(options: Options<BatchProcessQueriesData, ThrowOnError>) => (options.client ?? client).post<BatchProcessQueriesResponses, BatchProcessQueriesErrors, ThrowOnError>({
785
539
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -792,22 +546,9 @@ export const batchProcessQueries = <ThrowOnError extends boolean = false>(option
792
546
  });
793
547
 
794
548
  /**
795
- * Get agent recommendations
796
- *
797
- * Get intelligent agent recommendations for a specific query.
798
- *
799
- * **How it works:**
800
- * 1. Analyzes query content and structure
801
- * 2. Evaluates agent capabilities
802
- * 3. Calculates confidence scores
803
- * 4. Returns ranked recommendations
549
+ * Get Agent Recommendations
804
550
  *
805
- * **Use this when:**
806
- * - Unsure which agent to use
807
- * - Need to understand agent suitability
808
- * - Want confidence scores for decision making
809
- *
810
- * Returns top agents ranked by confidence with explanations.
551
+ * Returns agents ranked by confidence score for a query, with explanations. Use before execution when unsure which agent to pick.
811
552
  */
812
553
  export const recommendAgent = <ThrowOnError extends boolean = false>(options: Options<RecommendAgentData, ThrowOnError>) => (options.client ?? client).post<RecommendAgentResponses, RecommendAgentErrors, ThrowOnError>({
813
554
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -822,27 +563,7 @@ export const recommendAgent = <ThrowOnError extends boolean = false>(options: Op
822
563
  /**
823
564
  * List MCP Tools
824
565
  *
825
- * Get available Model Context Protocol tools for graph analysis.
826
- *
827
- * This endpoint returns a comprehensive list of MCP tools optimized for AI agents:
828
- * - Tool schemas with detailed parameter documentation
829
- * - Context-aware descriptions based on graph type
830
- * - Capability indicators for streaming and progress
831
- *
832
- * The tool list is customized based on:
833
- * - Graph type (shared repository vs user graph)
834
- * - User permissions and subscription tier
835
- * - Available graph capabilities for the selected graph
836
- *
837
- * **Subgraph Support:**
838
- * This endpoint accepts both parent graph IDs and subgraph IDs.
839
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
840
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
841
- * The returned tool list is identical for parent graphs and subgraphs, as all
842
- * MCP tools work uniformly across graph boundaries.
843
- *
844
- * **Note:**
845
- * MCP tool listing is included - no credit consumption required.
566
+ * Returns tool schemas with capability hints (streaming, caching, timeouts) per tool. Tool list is context-aware by graph type; identical for parent graphs and subgraphs.
846
567
  */
847
568
  export const listMcpTools = <ThrowOnError extends boolean = false>(options: Options<ListMcpToolsData, ThrowOnError>) => (options.client ?? client).get<ListMcpToolsResponses, ListMcpToolsErrors, ThrowOnError>({
848
569
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -853,50 +574,7 @@ export const listMcpTools = <ThrowOnError extends boolean = false>(options: Opti
853
574
  /**
854
575
  * Execute MCP Tool
855
576
  *
856
- * Execute an MCP tool with intelligent response optimization.
857
- *
858
- * This endpoint automatically selects the best execution strategy based on:
859
- * - Tool type and estimated complexity
860
- * - Client capabilities (AI agent detection)
861
- * - System load and queue status
862
- * - Graph type (shared repository vs user graph)
863
- *
864
- * **Response Formats:**
865
- * - **JSON**: Direct response for small/fast operations
866
- * - **SSE**: Server-Sent Events for progress monitoring
867
- * - **NDJSON**: Newline-delimited JSON for streaming
868
- * - **Queued**: Asynchronous execution with status monitoring
869
- *
870
- * **SSE Streaming Support:**
871
- * - Maximum 5 concurrent SSE connections per user
872
- * - Rate limited to 10 new connections per minute
873
- * - Automatic circuit breaker for Redis failures
874
- * - Graceful degradation to direct response if SSE unavailable
875
- * - Progress events for long-running operations
876
- *
877
- * **AI Agent Optimization:**
878
- * The Node.js MCP client transparently handles all response formats,
879
- * presenting a unified interface to AI agents. Streaming responses are
880
- * automatically aggregated for seamless consumption.
881
- *
882
- * **Error Handling:**
883
- * - `429 Too Many Requests`: Connection limit or rate limit exceeded
884
- * - `503 Service Unavailable`: SSE system temporarily disabled
885
- * - `408 Request Timeout`: Tool execution exceeded timeout
886
- * - Clients should implement exponential backoff on errors
887
- *
888
- * **Subgraph Support:**
889
- * This endpoint accepts both parent graph IDs and subgraph IDs.
890
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
891
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
892
- * MCP tools operate on the specified graph/subgraph independently. Each subgraph
893
- * has its own schema, data, and can be queried separately via MCP.
894
- *
895
- * **Credit Model:**
896
- * MCP tool execution is included - no credit consumption required. Database
897
- * operations (queries, schema inspection, analytics) are completely free.
898
- * Only AI operations that invoke Claude or other LLM APIs consume credits,
899
- * which happens at the AI agent layer, not the MCP tool layer.
577
+ * Strategy auto-selected by tool type and load: JSON for fast tools, SSE for long queries, NDJSON for large results. Database operations (Cypher, schema, info) consume no credits — only AI LLM calls cost credits.
900
578
  */
901
579
  export const callMcpTool = <ThrowOnError extends boolean = false>(options: Options<CallMcpToolData, ThrowOnError>) => (options.client ?? client).post<CallMcpToolResponses, CallMcpToolErrors, ThrowOnError>({
902
580
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -910,8 +588,6 @@ export const callMcpTool = <ThrowOnError extends boolean = false>(options: Optio
910
588
 
911
589
  /**
912
590
  * List graph database backups
913
- *
914
- * List all backups for the specified graph database
915
591
  */
916
592
  export const listBackups = <ThrowOnError extends boolean = false>(options: Options<ListBackupsData, ThrowOnError>) => (options.client ?? client).get<ListBackupsResponses, ListBackupsErrors, ThrowOnError>({
917
593
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -932,8 +608,6 @@ export const getBackupDownloadUrl = <ThrowOnError extends boolean = false>(optio
932
608
 
933
609
  /**
934
610
  * Get backup statistics
935
- *
936
- * Get comprehensive backup statistics for the specified graph database
937
611
  */
938
612
  export const getBackupStats = <ThrowOnError extends boolean = false>(options: Options<GetBackupStatsData, ThrowOnError>) => (options.client ?? client).get<GetBackupStatsResponses, GetBackupStatsErrors, ThrowOnError>({
939
613
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -943,24 +617,6 @@ export const getBackupStats = <ThrowOnError extends boolean = false>(options: Op
943
617
 
944
618
  /**
945
619
  * Get Graph Metrics
946
- *
947
- * Get comprehensive metrics for the graph database.
948
- *
949
- * Provides detailed analytics including:
950
- * - **Node Statistics**: Counts by type (Entity, Report, Account, Transaction)
951
- * - **Relationship Metrics**: Connection counts and patterns
952
- * - **Data Quality**: Completeness scores and validation results
953
- * - **Performance Metrics**: Query response times and database health
954
- * - **Storage Analytics**: Database size and growth trends
955
- *
956
- * This data helps with:
957
- * - Monitoring data completeness
958
- * - Identifying data quality issues
959
- * - Capacity planning
960
- * - Performance optimization
961
- *
962
- * Note:
963
- * This operation is included - no credit consumption required.
964
620
  */
965
621
  export const getGraphMetrics = <ThrowOnError extends boolean = false>(options: Options<GetGraphMetricsData, ThrowOnError>) => (options.client ?? client).get<GetGraphMetricsResponses, GetGraphMetricsErrors, ThrowOnError>({
966
622
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -971,35 +627,7 @@ export const getGraphMetrics = <ThrowOnError extends boolean = false>(options: O
971
627
  /**
972
628
  * Get Graph Usage Analytics
973
629
  *
974
- * Get comprehensive usage analytics tracked by the GraphUsage model.
975
- *
976
- * Provides temporal usage patterns including:
977
- * - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
978
- * - **Credit Analytics**: Consumption patterns, operation breakdown, cached vs billable
979
- * - **Performance Insights**: Operation stats, slow queries, performance scoring
980
- * - **Recent Events**: Latest usage events with full details
981
- *
982
- * Time ranges available:
983
- * - `24h` - Last 24 hours (hourly breakdown)
984
- * - `7d` - Last 7 days (daily breakdown)
985
- * - `30d` - Last 30 days (daily breakdown)
986
- * - `current_month` - Current billing month
987
- * - `last_month` - Previous billing month
988
- *
989
- * Include options:
990
- * - `storage` - Storage usage summary (GB-hours, averages, peaks)
991
- * - `credits` - Credit consumption analytics
992
- * - `performance` - Performance insights and optimization opportunities
993
- * - `events` - Recent usage events (last 50)
994
- *
995
- * Useful for:
996
- * - Billing and cost analysis
997
- * - Capacity planning
998
- * - Performance optimization
999
- * - Usage trend analysis
1000
- *
1001
- * Note:
1002
- * This operation is included - no credit consumption required.
630
+ * Time ranges: 24h, 7d, 30d, current_month, last_month. Toggle storage, credits, performance, and events sections via query params.
1003
631
  */
1004
632
  export const getGraphUsageAnalytics = <ThrowOnError extends boolean = false>(options: Options<GetGraphUsageAnalyticsData, ThrowOnError>) => (options.client ?? client).get<GetGraphUsageAnalyticsResponses, GetGraphUsageAnalyticsErrors, ThrowOnError>({
1005
633
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1010,74 +638,7 @@ export const getGraphUsageAnalytics = <ThrowOnError extends boolean = false>(opt
1010
638
  /**
1011
639
  * Execute Cypher Query
1012
640
  *
1013
- * Execute a Cypher query with intelligent response optimization.
1014
- *
1015
- * **IMPORTANT: Write operations depend on graph type:**
1016
- * - **Main Graphs**: READ-ONLY. Write operations (CREATE, MERGE, SET, DELETE) are not allowed.
1017
- * - **Subgraphs**: WRITE-ENABLED. Full Cypher write operations are supported for development and report creation.
1018
- *
1019
- * To load data into main graphs, use the staging pipeline:
1020
- * 1. Create file upload: `POST /v1/graphs/{graph_id}/tables/{table_name}/files`
1021
- * 2. Ingest to graph: `POST /v1/graphs/{graph_id}/tables/ingest`
1022
- *
1023
- * **Security Best Practice - Use Parameterized Queries:**
1024
- * ALWAYS use query parameters instead of string interpolation to prevent injection attacks:
1025
- * - ✅ SAFE: `MATCH (n:Entity {type: $entity_type}) RETURN n` with `parameters: {"entity_type": "Company"}`
1026
- * - ❌ UNSAFE: `MATCH (n:Entity {type: "Company"}) RETURN n` with user input concatenated into query string
1027
- *
1028
- * Query parameters provide automatic escaping and type safety. All examples in this API use parameterized queries.
1029
- *
1030
- * This endpoint automatically selects the best execution strategy based on:
1031
- * - Query characteristics (size, complexity)
1032
- * - Client capabilities (SSE, NDJSON, JSON)
1033
- * - System load (queue status, concurrent queries)
1034
- * - User preferences (mode parameter, headers)
1035
- *
1036
- * **Response Modes:**
1037
- * - `auto` (default): Intelligent automatic selection
1038
- * - `sync`: Force synchronous JSON response (best for testing)
1039
- * - `async`: Force queued response with SSE monitoring endpoints (no polling needed)
1040
- * - `stream`: Force streaming response (SSE or NDJSON)
1041
- *
1042
- * **Client Detection:**
1043
- * - Automatically detects testing tools (Postman, Swagger UI)
1044
- * - Adjusts behavior for better interactive experience
1045
- * - Respects Accept and Prefer headers for capabilities
1046
- *
1047
- * **Streaming Support (SSE):**
1048
- * - Real-time events with progress updates
1049
- * - Maximum 5 concurrent SSE connections per user
1050
- * - Rate limited to 10 new connections per minute
1051
- * - Automatic circuit breaker for Redis failures
1052
- * - Graceful degradation if event system unavailable
1053
- * - 30-second keepalive to prevent timeouts
1054
- *
1055
- * **Streaming Support (NDJSON):**
1056
- * - Efficient line-delimited JSON for large results
1057
- * - Automatic chunking (configurable 10-10000 rows)
1058
- * - No connection limits (stateless streaming)
1059
- *
1060
- * **Queue Management:**
1061
- * - Automatic queuing under high load
1062
- * - Real-time monitoring via SSE events (no polling needed)
1063
- * - Priority based on subscription tier
1064
- * - Queue position and progress updates pushed via SSE
1065
- * - Connect to returned `/v1/operations/{id}/stream` endpoint for updates
1066
- *
1067
- * **Error Handling:**
1068
- * - `429 Too Many Requests`: Rate limit or connection limit exceeded
1069
- * - `503 Service Unavailable`: Circuit breaker open or SSE disabled
1070
- * - Clients should implement exponential backoff
1071
- *
1072
- * **Subgraph Support:**
1073
- * This endpoint accepts both parent graph IDs and subgraph IDs.
1074
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
1075
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
1076
- * Subgraphs share the same instance as their parent graph and have independent data.
1077
- *
1078
- * **Note:**
1079
- * Query operations are included - no credit consumption required.
1080
- * Queue position is based on subscription tier for priority.
641
+ * Main graphs are **read-only** use the staging pipeline to ingest data. Subgraphs support full writes. Always use parameterized queries (`parameters: {"key": "val"}`) to prevent injection. Response modes: `auto` (default), `sync`, `async`, `stream`. Under load, queries are queued and emit an `operation_id` for SSE monitoring at `/v1/operations/{id}/stream`.
1081
642
  */
1082
643
  export const executeCypherQuery = <ThrowOnError extends boolean = false>(options: Options<ExecuteCypherQueryData, ThrowOnError>) => (options.client ?? client).post<ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, ThrowOnError>({
1083
644
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1092,50 +653,7 @@ export const executeCypherQuery = <ThrowOnError extends boolean = false>(options
1092
653
  /**
1093
654
  * Get Runtime Graph Schema
1094
655
  *
1095
- * Get runtime schema information for the specified graph database.
1096
- *
1097
- * ## What This Returns
1098
- *
1099
- * This endpoint inspects the **actual current state** of the graph database and returns:
1100
- * - **Node Labels**: All node types currently in the database
1101
- * - **Relationship Types**: All relationship types currently in the database
1102
- * - **Node Properties**: Properties discovered from actual data (up to 10 properties per node type)
1103
- *
1104
- * ## Runtime vs Declared Schema
1105
- *
1106
- * **Use this endpoint** (`/schema`) when you need to know:
1107
- * - What data is ACTUALLY in the database right now
1108
- * - What properties exist on real nodes
1109
- * - What relationships have been created
1110
- * - Current database structure for querying
1111
- *
1112
- * **Use `/schema/export` instead** when you need:
1113
- * - The original schema definition used to create the graph
1114
- * - Schema in a specific format (JSON, YAML, Cypher DDL)
1115
- * - Schema for documentation or version control
1116
- * - Schema to replicate in another graph
1117
- *
1118
- * ## Example Use Cases
1119
- *
1120
- * - **Building queries**: See what node labels and properties exist to write accurate Cypher
1121
- * - **Data exploration**: Discover what's in an unfamiliar graph
1122
- * - **Schema drift detection**: Compare runtime vs declared schema
1123
- * - **API integration**: Dynamically adapt to current graph structure
1124
- *
1125
- * ## Performance Note
1126
- *
1127
- * Property discovery is limited to 10 properties per node type for performance.
1128
- * For complete schema definitions, use `/schema/export`.
1129
- *
1130
- * ## Subgraph Support
1131
- *
1132
- * This endpoint accepts both parent graph IDs and subgraph IDs.
1133
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
1134
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
1135
- * Each subgraph has independent schema and data. The returned schema reflects
1136
- * only the specified graph/subgraph's actual structure.
1137
- *
1138
- * This operation is included - no credit consumption required.
656
+ * Runtime schema from actual graph data — node labels, relationship types, and up to 10 sample properties per node type. For the original schema definition or structured export formats, use `/schema/export`.
1139
657
  */
1140
658
  export const getGraphSchema = <ThrowOnError extends boolean = false>(options: Options<GetGraphSchemaData, ThrowOnError>) => (options.client ?? client).get<GetGraphSchemaResponses, GetGraphSchemaErrors, ThrowOnError>({
1141
659
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1146,53 +664,7 @@ export const getGraphSchema = <ThrowOnError extends boolean = false>(options: Op
1146
664
  /**
1147
665
  * Export Declared Graph Schema
1148
666
  *
1149
- * Export the declared schema definition of an existing graph.
1150
- *
1151
- * ## What This Returns
1152
- *
1153
- * This endpoint returns the **original schema definition** that was used to create the graph:
1154
- * - The schema as it was **declared** during graph creation
1155
- * - Complete node and relationship definitions
1156
- * - Property types and constraints
1157
- * - Schema metadata (name, version, type)
1158
- *
1159
- * ## Runtime vs Declared Schema
1160
- *
1161
- * **Use this endpoint** (`/schema/export`) when you need:
1162
- * - The original schema definition used to create the graph
1163
- * - Schema in a specific format (JSON, YAML, Cypher DDL)
1164
- * - Schema for documentation or version control
1165
- * - Schema to replicate in another graph
1166
- *
1167
- * **Use `/schema` instead** when you need:
1168
- * - What data is ACTUALLY in the database right now
1169
- * - What properties exist on real nodes (discovered from data)
1170
- * - Current runtime database structure for querying
1171
- *
1172
- * ## Export Formats
1173
- *
1174
- * ### JSON Format (`format=json`)
1175
- * Returns structured JSON with nodes, relationships, and properties.
1176
- * Best for programmatic access and API integration.
1177
- *
1178
- * ### YAML Format (`format=yaml`)
1179
- * Returns human-readable YAML with comments.
1180
- * Best for documentation and configuration management.
1181
- *
1182
- * ### Cypher DDL Format (`format=cypher`)
1183
- * Returns Cypher CREATE statements for recreating the schema.
1184
- * Best for database migration and replication.
1185
- *
1186
- * ## Data Statistics
1187
- *
1188
- * Set `include_data_stats=true` to include:
1189
- * - Node counts by label
1190
- * - Relationship counts by type
1191
- * - Total nodes and relationships
1192
- *
1193
- * This combines declared schema with runtime statistics.
1194
- *
1195
- * This operation is included - no credit consumption required.
667
+ * Returns the original schema definition from graph creation, not the runtime state. Set `include_data_stats=true` to add live node/relationship counts. Use `/schema` to inspect what's actually in the database.
1196
668
  */
1197
669
  export const exportGraphSchema = <ThrowOnError extends boolean = false>(options: Options<ExportGraphSchemaData, ThrowOnError>) => (options.client ?? client).get<ExportGraphSchemaResponses, ExportGraphSchemaErrors, ThrowOnError>({
1198
670
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1203,35 +675,7 @@ export const exportGraphSchema = <ThrowOnError extends boolean = false>(options:
1203
675
  /**
1204
676
  * Validate Schema
1205
677
  *
1206
- * Validate a custom schema definition before deployment.
1207
- *
1208
- * This endpoint performs comprehensive validation including:
1209
- * - **Structure Validation**: Ensures proper JSON/YAML format
1210
- * - **Type Checking**: Validates data types (STRING, INT, DOUBLE, etc.)
1211
- * - **Constraint Verification**: Checks primary keys and unique constraints
1212
- * - **Relationship Integrity**: Validates node references in relationships
1213
- * - **Naming Conventions**: Ensures valid identifiers
1214
- * - **Compatibility**: Checks against existing extensions if specified
1215
- *
1216
- * Supported formats:
1217
- * - JSON schema definitions
1218
- * - YAML schema definitions
1219
- * - Direct dictionary format
1220
- *
1221
- * Validation helps prevent:
1222
- * - Schema deployment failures
1223
- * - Data integrity issues
1224
- * - Performance problems
1225
- * - Naming conflicts
1226
- *
1227
- * **Subgraph Support:**
1228
- * This endpoint accepts both parent graph IDs and subgraph IDs.
1229
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
1230
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
1231
- * Schema validation is performed against the specified graph/subgraph's current
1232
- * schema and data structure.
1233
- *
1234
- * This operation is included - no credit consumption required.
678
+ * Validates a custom schema definition before deployment — checks structure, types, constraints, and relationship references. Returns errors and warnings without applying changes. Supports JSON, YAML, and dict formats.
1235
679
  */
1236
680
  export const validateSchema = <ThrowOnError extends boolean = false>(options: Options<ValidateSchemaData, ThrowOnError>) => (options.client ?? client).post<ValidateSchemaResponses, ValidateSchemaErrors, ThrowOnError>({
1237
681
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1245,16 +689,6 @@ export const validateSchema = <ThrowOnError extends boolean = false>(options: Op
1245
689
 
1246
690
  /**
1247
691
  * Get Credit Summary
1248
- *
1249
- * Retrieve comprehensive credit usage summary for the specified graph.
1250
- *
1251
- * This endpoint provides:
1252
- * - Current credit balance and monthly allocation
1253
- * - Credit consumption metrics for the current month
1254
- * - Graph tier and credit multiplier information
1255
- * - Usage percentage to help monitor credit consumption
1256
- *
1257
- * No credits are consumed for checking credit status.
1258
692
  */
1259
693
  export const getCreditSummary = <ThrowOnError extends boolean = false>(options: Options<GetCreditSummaryData, ThrowOnError>) => (options.client ?? client).get<GetCreditSummaryResponses, GetCreditSummaryErrors, ThrowOnError>({
1260
694
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1264,22 +698,6 @@ export const getCreditSummary = <ThrowOnError extends boolean = false>(options:
1264
698
 
1265
699
  /**
1266
700
  * List Credit Transactions
1267
- *
1268
- * Retrieve detailed credit transaction history for the specified graph.
1269
- *
1270
- * This enhanced endpoint provides:
1271
- * - Detailed transaction records with idempotency information
1272
- * - Summary by operation type to identify high-consumption operations
1273
- * - Date range filtering for analysis
1274
- * - Metadata search capabilities
1275
- *
1276
- * Transaction types include:
1277
- * - ALLOCATION: Monthly credit allocations
1278
- * - CONSUMPTION: Credit usage for operations
1279
- * - BONUS: Bonus credits added by admins
1280
- * - REFUND: Credit refunds
1281
- *
1282
- * No credits are consumed for viewing transaction history.
1283
701
  */
1284
702
  export const listCreditTransactions = <ThrowOnError extends boolean = false>(options: Options<ListCreditTransactionsData, ThrowOnError>) => (options.client ?? client).get<ListCreditTransactionsResponses, ListCreditTransactionsErrors, ThrowOnError>({
1285
703
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1289,31 +707,6 @@ export const listCreditTransactions = <ThrowOnError extends boolean = false>(opt
1289
707
 
1290
708
  /**
1291
709
  * Database Health Check
1292
- *
1293
- * Get comprehensive health information for the graph database.
1294
- *
1295
- * Returns detailed health metrics including:
1296
- * - **Connection Status**: Database connectivity and responsiveness
1297
- * - **Performance Metrics**: Query execution times and throughput
1298
- * - **Resource Usage**: Memory and storage utilization
1299
- * - **Error Monitoring**: Recent error rates and patterns
1300
- * - **Uptime Statistics**: Service availability metrics
1301
- *
1302
- * Health indicators:
1303
- * - **Status**: healthy, degraded, or unhealthy
1304
- * - **Query Performance**: Average execution times
1305
- * - **Error Rates**: Recent failure percentages
1306
- * - **Resource Usage**: Memory and storage consumption
1307
- * - **Alerts**: Active warnings or issues
1308
- *
1309
- * **Subgraph Support:**
1310
- * This endpoint accepts both parent graph IDs and subgraph IDs.
1311
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
1312
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
1313
- * Health metrics are specific to the requested graph/subgraph. Subgraphs share the
1314
- * same physical instance as their parent but have independent health indicators.
1315
- *
1316
- * This endpoint provides essential monitoring data for operational visibility.
1317
710
  */
1318
711
  export const getDatabaseHealth = <ThrowOnError extends boolean = false>(options: Options<GetDatabaseHealthData, ThrowOnError>) => (options.client ?? client).get<GetDatabaseHealthResponses, GetDatabaseHealthErrors, ThrowOnError>({
1319
712
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1323,32 +716,6 @@ export const getDatabaseHealth = <ThrowOnError extends boolean = false>(options:
1323
716
 
1324
717
  /**
1325
718
  * Database Information
1326
- *
1327
- * Get comprehensive database information and statistics.
1328
- *
1329
- * Returns detailed database metrics including:
1330
- * - **Database Metadata**: Name, path, size, and timestamps
1331
- * - **Schema Information**: Node labels, relationship types, and counts
1332
- * - **Storage Statistics**: Database size and usage metrics
1333
- * - **Data Composition**: Node and relationship counts
1334
- * - **Backup Information**: Available backups and last backup date
1335
- * - **Configuration**: Read-only status and schema version
1336
- *
1337
- * Database statistics:
1338
- * - **Size**: Storage usage in bytes and MB
1339
- * - **Content**: Node and relationship counts
1340
- * - **Schema**: Available labels and relationship types
1341
- * - **Backup Status**: Backup availability and recency
1342
- * - **Timestamps**: Creation and modification dates
1343
- *
1344
- * **Subgraph Support:**
1345
- * This endpoint accepts both parent graph IDs and subgraph IDs.
1346
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
1347
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
1348
- * Returned metrics are specific to the requested graph/subgraph. Subgraphs have
1349
- * independent size, node/relationship counts, and backup status.
1350
- *
1351
- * This endpoint provides essential database information for capacity planning and monitoring.
1352
719
  */
1353
720
  export const getDatabaseInfo = <ThrowOnError extends boolean = false>(options: Options<GetDatabaseInfoData, ThrowOnError>) => (options.client ?? client).get<GetDatabaseInfoResponses, GetDatabaseInfoErrors, ThrowOnError>({
1354
721
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1359,19 +726,7 @@ export const getDatabaseInfo = <ThrowOnError extends boolean = false>(options: O
1359
726
  /**
1360
727
  * Get Graph Operational Limits
1361
728
  *
1362
- * Get comprehensive operational limits for the graph database.
1363
- *
1364
- * Returns all operational limits that apply to this graph including:
1365
- * - **Storage Limits**: Maximum storage size and current usage
1366
- * - **Query Limits**: Timeouts, complexity, row limits
1367
- * - **Copy/Ingestion Limits**: File sizes, timeouts, concurrent operations
1368
- * - **Backup Limits**: Frequency, retention, size limits
1369
- * - **Rate Limits**: Requests per minute/hour based on tier
1370
- * - **Credit Limits**: AI operation credits (if applicable)
1371
- * - **Content Limits**: Per-operation materialization limits (if applicable)
1372
- * - **Instance Usage**: Aggregate storage across parent + subgraphs (user graphs only)
1373
- *
1374
- * **Note**: Limits vary based on subscription tier (ladybug-standard, ladybug-large, ladybug-xlarge).
729
+ * Limits vary by subscription tier (ladybug-standard, ladybug-large, ladybug-xlarge). Includes storage, query, backup, rate, credit, and instance usage limits.
1375
730
  */
1376
731
  export const getGraphLimits = <ThrowOnError extends boolean = false>(options: Options<GetGraphLimitsData, ThrowOnError>) => (options.client ?? client).get<GetGraphLimitsResponses, GetGraphLimitsErrors, ThrowOnError>({
1377
732
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1381,17 +736,6 @@ export const getGraphLimits = <ThrowOnError extends boolean = false>(options: Op
1381
736
 
1382
737
  /**
1383
738
  * List Subgraphs
1384
- *
1385
- * List all subgraphs for a parent graph.
1386
- *
1387
- * **Requirements:**
1388
- * - Valid authentication
1389
- * - Parent graph must exist and be accessible to the user
1390
- * - User must have at least 'read' permission on the parent graph
1391
- *
1392
- * **Returns:**
1393
- * - List of all subgraphs for the parent graph
1394
- * - Each subgraph includes its ID, name, description, type, status, and creation date
1395
739
  */
1396
740
  export const listSubgraphs = <ThrowOnError extends boolean = false>(options: Options<ListSubgraphsData, ThrowOnError>) => (options.client ?? client).get<ListSubgraphsResponses, ListSubgraphsErrors, ThrowOnError>({
1397
741
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1402,30 +746,7 @@ export const listSubgraphs = <ThrowOnError extends boolean = false>(options: Opt
1402
746
  /**
1403
747
  * Get Subgraph Details
1404
748
  *
1405
- * Get detailed information about a specific subgraph.
1406
- *
1407
- * **Requirements:**
1408
- * - User must have read access to parent graph
1409
- * - Subgraph name must be alphanumeric (1-20 characters)
1410
- *
1411
- * **Response includes:**
1412
- * - Full subgraph metadata
1413
- * - Database statistics (nodes, edges)
1414
- * - Size information
1415
- * - Schema configuration
1416
- * - Creation/modification timestamps
1417
- * - Last access time (when available)
1418
- *
1419
- * **Statistics:**
1420
- * Real-time statistics queried from LadybugDB:
1421
- * - Node count
1422
- * - Edge count
1423
- * - Database size on disk
1424
- * - Schema information
1425
- *
1426
- * **Note:**
1427
- * Use the subgraph name (e.g., 'dev', 'staging') not the full subgraph ID.
1428
- * The full ID is returned in the response (e.g., 'kg0123456789abcdef_dev').
749
+ * Pass the subgraph name (e.g., `dev`) not the full subgraph ID (e.g., `kg0123_dev`).
1429
750
  */
1430
751
  export const getSubgraphInfo = <ThrowOnError extends boolean = false>(options: Options<GetSubgraphInfoData, ThrowOnError>) => (options.client ?? client).get<GetSubgraphInfoResponses, GetSubgraphInfoErrors, ThrowOnError>({
1431
752
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1436,23 +757,7 @@ export const getSubgraphInfo = <ThrowOnError extends boolean = false>(options: O
1436
757
  /**
1437
758
  * Get Subgraph Quota
1438
759
  *
1439
- * Get subgraph quota and usage information for a parent graph.
1440
- *
1441
- * **Shows:**
1442
- * - Current subgraph count
1443
- * - Maximum allowed subgraphs per tier
1444
- * - Remaining capacity
1445
- * - Total size usage across all subgraphs
1446
- *
1447
- * **Tier Limits:**
1448
- * - Standard: Up to 3 subgraphs (dedicated m7g.large instance)
1449
- * - Large: Up to 10 subgraphs (dedicated r7g.large instance)
1450
- * - XLarge: Up to 25 subgraphs (dedicated r7g.xlarge instance)
1451
- * - Limits are defined in graph.yml deployment configuration
1452
- *
1453
- * **Size Tracking:**
1454
- * Provides aggregate size metrics when available.
1455
- * Individual subgraph sizes shown in list endpoint.
760
+ * Tier capacity: Standard 3, Large 10, XLarge 25 subgraphs. Use the list endpoint for per-subgraph sizes.
1456
761
  */
1457
762
  export const getSubgraphQuota = <ThrowOnError extends boolean = false>(options: Options<GetSubgraphQuotaData, ThrowOnError>) => (options.client ?? client).get<GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, ThrowOnError>({
1458
763
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1461,14 +766,9 @@ export const getSubgraphQuota = <ThrowOnError extends boolean = false>(options:
1461
766
  });
1462
767
 
1463
768
  /**
1464
- * Get Graph and Shared Repository Subscription
1465
- *
1466
- * Get subscription details for a graph or shared repository.
769
+ * Get Graph Subscription
1467
770
  *
1468
- * For user graphs (kg*): Returns the graph's subscription (owned by graph creator)
1469
- * For shared repositories (sec, industry, etc.): Returns user's personal subscription to that repository
1470
- *
1471
- * This unified endpoint automatically detects the resource type and returns the appropriate subscription.
771
+ * Detects resource type automatically: user graphs (kg*) return the graph's subscription; shared repositories return the user's personal subscription to that repo.
1472
772
  */
1473
773
  export const getGraphSubscription = <ThrowOnError extends boolean = false>(options: Options<GetGraphSubscriptionData, ThrowOnError>) => (options.client ?? client).get<GetGraphSubscriptionResponses, GetGraphSubscriptionErrors, ThrowOnError>({
1474
774
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1479,24 +779,7 @@ export const getGraphSubscription = <ThrowOnError extends boolean = false>(optio
1479
779
  /**
1480
780
  * Change Subscription Plan
1481
781
  *
1482
- * Change the plan on an existing subscription.
1483
- *
1484
- * **For shared repositories** (sec, industry, etc.): Changes access tier (e.g., starter -> advanced).
1485
- * Synchronous — takes effect immediately.
1486
- *
1487
- * **For user graphs** (kg*): Changes infrastructure tier (e.g., ladybug-standard -> ladybug-large).
1488
- * Asynchronous — returns an `operation_id` for tracking the EBS volume migration via SSE.
1489
- *
1490
- * Stripe handles proration automatically for both types.
1491
- *
1492
- * **Requirements:**
1493
- * - User must be an OWNER of their organization
1494
- * - Subscription must be active
1495
- * - New plan must be valid for the resource type
1496
- *
1497
- * **Downgrade restrictions (graphs only):**
1498
- * - Subgraph count must fit the target tier's limit
1499
- * - Storage usage must fit the target tier's limit
782
+ * For repositories: synchronous tier change. For user graphs: use `POST /v1/graphs/{graph_id}/operations/change-tier` instead — this endpoint rejects graph tier changes. Requires org owner role.
1500
783
  */
1501
784
  export const changeSubscriptionPlan = <ThrowOnError extends boolean = false>(options: Options<ChangeSubscriptionPlanData, ThrowOnError>) => (options.client ?? client).patch<ChangeSubscriptionPlanResponses, ChangeSubscriptionPlanErrors, ThrowOnError>({
1502
785
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1511,12 +794,7 @@ export const changeSubscriptionPlan = <ThrowOnError extends boolean = false>(opt
1511
794
  /**
1512
795
  * Create Repository Subscription
1513
796
  *
1514
- * Create a new subscription to a shared repository.
1515
- *
1516
- * This endpoint is ONLY for shared repositories (sec, industry, economic).
1517
- * User graph subscriptions are created automatically when the graph is provisioned.
1518
- *
1519
- * The subscription will be created in ACTIVE status immediately and credits will be allocated.
797
+ * For shared repositories only (sec, industry, etc.). User graph subscriptions are created automatically during provisioning.
1520
798
  */
1521
799
  export const createRepositorySubscription = <ThrowOnError extends boolean = false>(options: Options<CreateRepositorySubscriptionData, ThrowOnError>) => (options.client ?? client).post<CreateRepositorySubscriptionResponses, CreateRepositorySubscriptionErrors, ThrowOnError>({
1522
800
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1531,40 +809,7 @@ export const createRepositorySubscription = <ThrowOnError extends boolean = fals
1531
809
  /**
1532
810
  * List Staging Tables
1533
811
  *
1534
- * List all DuckDB staging tables with comprehensive metrics and status.
1535
- *
1536
- * Get a complete inventory of all staging tables for a graph, including
1537
- * file counts, storage sizes, and row estimates. Essential for monitoring
1538
- * the data pipeline and determining which tables are ready for ingestion.
1539
- *
1540
- * **Returned Metrics:**
1541
- * - Table name and type (node/relationship)
1542
- * - File count per table
1543
- * - Total storage size in bytes
1544
- * - Estimated row count
1545
- * - S3 location pattern
1546
- * - Ready-for-ingestion status
1547
- *
1548
- * **Use Cases:**
1549
- * - Monitor data upload progress
1550
- * - Check which tables have files ready
1551
- * - Track storage consumption
1552
- * - Validate pipeline before ingestion
1553
- * - Capacity planning
1554
- *
1555
- * **Workflow:**
1556
- * 1. List tables to see current state
1557
- * 2. Upload files to empty tables
1558
- * 3. Re-list to verify uploads
1559
- * 4. Check file counts and sizes
1560
- * 5. Ingest when ready
1561
- *
1562
- * **Important Notes:**
1563
- * - Tables with `file_count > 0` have data ready
1564
- * - Check `total_size_bytes` for storage monitoring
1565
- * - Use `s3_location` to verify upload paths
1566
- * - Empty tables (file_count=0) are skipped during ingestion
1567
- * - Table queries are included - no credit consumption
812
+ * Returns file count, storage size, row count, and S3 location per table. Tables with `file_count=0` are skipped during ingestion.
1568
813
  */
1569
814
  export const listTables = <ThrowOnError extends boolean = false>(options: Options<ListTablesData, ThrowOnError>) => (options.client ?? client).get<ListTablesResponses, ListTablesErrors, ThrowOnError>({
1570
815
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1575,62 +820,7 @@ export const listTables = <ThrowOnError extends boolean = false>(options: Option
1575
820
  /**
1576
821
  * Query Staging Tables with SQL
1577
822
  *
1578
- * Execute SQL queries on DuckDB staging tables for data inspection and validation.
1579
- *
1580
- * Query raw staging data directly with SQL before ingestion into the graph database.
1581
- * Useful for data quality checks, validation, and exploratory analysis.
1582
- *
1583
- * **Security Best Practice - Use Parameterized Queries:**
1584
- * ALWAYS use query parameters instead of string concatenation to prevent SQL injection:
1585
- * - ✅ SAFE: `SELECT * FROM Entity WHERE type = ? LIMIT ?` with `parameters: ["Company", 100]`
1586
- * - ❌ UNSAFE: `SELECT * FROM Entity WHERE type = 'Company' LIMIT 100` with user input concatenated into SQL string
1587
- *
1588
- * Query parameters provide automatic escaping and type safety. Use `?` placeholders with parameters array.
1589
- *
1590
- * **Use Cases:**
1591
- * - Validate data quality before graph ingestion
1592
- * - Inspect row-level data for debugging
1593
- * - Run analytics on staging tables
1594
- * - Check for duplicates, nulls, or data issues
1595
- * - Preview data transformations
1596
- *
1597
- * **Workflow:**
1598
- * 1. Upload data files via `POST /tables/{table_name}/files`
1599
- * 2. Query staging tables to validate: `POST /tables/query`
1600
- * 3. Fix any data issues by re-uploading
1601
- * 4. Ingest validated data: `POST /tables/ingest`
1602
- *
1603
- * **Supported SQL:**
1604
- * - Full DuckDB SQL syntax
1605
- * - SELECT, JOIN, WHERE, GROUP BY, ORDER BY
1606
- * - Aggregations, window functions, CTEs
1607
- * - Multiple table joins across staging area
1608
- *
1609
- * **Common Operations:**
1610
- * - Count rows: `SELECT COUNT(*) FROM Entity`
1611
- * - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: ["Company", 100]`
1612
- * - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10`
1613
- * - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING COUNT(*) > 1`
1614
- * - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: [1000, "2024-01-01"]`
1615
- *
1616
- * **Limits:**
1617
- * - Query timeout: 30 seconds
1618
- * - Result limit: 10,000 rows (use LIMIT clause)
1619
- * - Read-only: No INSERT, UPDATE, DELETE
1620
- * - User's tables only: Cannot query other users' data
1621
- *
1622
- * **Subgraph Support:**
1623
- * This endpoint accepts both parent graph IDs and subgraph IDs.
1624
- * - Parent graph: Use `graph_id` like `kg0123456789abcdef`
1625
- * - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
1626
- * Each subgraph has its own independent staging tables.
1627
- *
1628
- * **Shared Repositories:**
1629
- * Shared repositories (SEC, etc.) do not allow direct SQL queries.
1630
- * Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query`
1631
- *
1632
- * **Note:**
1633
- * Staging table queries are included - no credit consumption
823
+ * Execute SQL against DuckDB staging tables for pre-ingestion validation. Use `?` placeholders with the `parameters` array to prevent injection. Read-only (SELECT only), 30s timeout, 10K row limit. Not allowed on shared repositories.
1634
824
  */
1635
825
  export const queryTables = <ThrowOnError extends boolean = false>(options: Options<QueryTablesData, ThrowOnError>) => (options.client ?? client).post<QueryTablesResponses, QueryTablesErrors, ThrowOnError>({
1636
826
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1643,9 +833,9 @@ export const queryTables = <ThrowOnError extends boolean = false>(options: Optio
1643
833
  });
1644
834
 
1645
835
  /**
1646
- * Search Documents
836
+ * Search Graph Documents
1647
837
  *
1648
- * Search filing narratives and text content within a graph.
838
+ * Shared repositories require a subscription; subscription plan determines search rate limits.
1649
839
  */
1650
840
  export const searchDocuments = <ThrowOnError extends boolean = false>(options: Options<SearchDocumentsData, ThrowOnError>) => (options.client ?? client).post<SearchDocumentsResponses, SearchDocumentsErrors, ThrowOnError>({
1651
841
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1659,8 +849,6 @@ export const searchDocuments = <ThrowOnError extends boolean = false>(options: O
1659
849
 
1660
850
  /**
1661
851
  * Get Document Section
1662
- *
1663
- * Retrieve the full text of a document section by ID.
1664
852
  */
1665
853
  export const getDocumentSection = <ThrowOnError extends boolean = false>(options: Options<GetDocumentSectionData, ThrowOnError>) => (options.client ?? client).get<GetDocumentSectionResponses, GetDocumentSectionErrors, ThrowOnError>({
1666
854
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1670,8 +858,6 @@ export const getDocumentSection = <ThrowOnError extends boolean = false>(options
1670
858
 
1671
859
  /**
1672
860
  * List Documents
1673
- *
1674
- * List documents for a graph from PostgreSQL.
1675
861
  */
1676
862
  export const listDocuments = <ThrowOnError extends boolean = false>(options: Options<ListDocumentsData, ThrowOnError>) => (options.client ?? client).get<ListDocumentsResponses, ListDocumentsErrors, ThrowOnError>({
1677
863
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1682,7 +868,7 @@ export const listDocuments = <ThrowOnError extends boolean = false>(options: Opt
1682
868
  /**
1683
869
  * Upload Document
1684
870
  *
1685
- * Upload a markdown document. Stored in PostgreSQL, synced to OpenSearch.
871
+ * Stored in PostgreSQL, synced to OpenSearch for search. Not allowed on shared repositories.
1686
872
  */
1687
873
  export const uploadDocument = <ThrowOnError extends boolean = false>(options: Options<UploadDocumentData, ThrowOnError>) => (options.client ?? client).post<UploadDocumentResponses, UploadDocumentErrors, ThrowOnError>({
1688
874
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1696,8 +882,6 @@ export const uploadDocument = <ThrowOnError extends boolean = false>(options: Op
1696
882
 
1697
883
  /**
1698
884
  * Delete Document
1699
- *
1700
- * Delete a document from PostgreSQL and OpenSearch.
1701
885
  */
1702
886
  export const deleteDocument = <ThrowOnError extends boolean = false>(options: Options<DeleteDocumentData, ThrowOnError>) => (options.client ?? client).delete<DeleteDocumentResponses, DeleteDocumentErrors, ThrowOnError>({
1703
887
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1707,8 +891,6 @@ export const deleteDocument = <ThrowOnError extends boolean = false>(options: Op
1707
891
 
1708
892
  /**
1709
893
  * Get Document
1710
- *
1711
- * Get a document with full content from PostgreSQL.
1712
894
  */
1713
895
  export const getDocument = <ThrowOnError extends boolean = false>(options: Options<GetDocumentData, ThrowOnError>) => (options.client ?? client).get<GetDocumentResponses, GetDocumentErrors, ThrowOnError>({
1714
896
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1719,7 +901,7 @@ export const getDocument = <ThrowOnError extends boolean = false>(options: Optio
1719
901
  /**
1720
902
  * Update Document
1721
903
  *
1722
- * Update a document's content and/or metadata. Re-syncs to OpenSearch.
904
+ * Updates content and/or metadata. Re-syncs to OpenSearch.
1723
905
  */
1724
906
  export const updateDocument = <ThrowOnError extends boolean = false>(options: Options<UpdateDocumentData, ThrowOnError>) => (options.client ?? client).put<UpdateDocumentResponses, UpdateDocumentErrors, ThrowOnError>({
1725
907
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1732,9 +914,9 @@ export const updateDocument = <ThrowOnError extends boolean = false>(options: Op
1732
914
  });
1733
915
 
1734
916
  /**
1735
- * Upload Documents Bulk
917
+ * Bulk Upload Documents
1736
918
  *
1737
- * Upload multiple markdown documents (max 50).
919
+ * Upload up to 50 documents at once. Partial success is supported — check the errors array in the response.
1738
920
  */
1739
921
  export const uploadDocumentsBulk = <ThrowOnError extends boolean = false>(options: Options<UploadDocumentsBulkData, ThrowOnError>) => (options.client ?? client).post<UploadDocumentsBulkResponses, UploadDocumentsBulkErrors, ThrowOnError>({
1740
922
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1749,7 +931,7 @@ export const uploadDocumentsBulk = <ThrowOnError extends boolean = false>(option
1749
931
  /**
1750
932
  * Create Subgraph
1751
933
  *
1752
- * Create a new subgraph, optionally forking parent data.
934
+ * Set `fork_parent=true` to clone parent graph data into the new subgraph (async, returns a pending `OperationEnvelope`). Without `fork_parent`, creates an empty subgraph synchronously.
1753
935
  *
1754
936
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1755
937
  */
@@ -1766,7 +948,7 @@ export const opCreateSubgraph = <ThrowOnError extends boolean = false>(options:
1766
948
  /**
1767
949
  * Delete Subgraph
1768
950
  *
1769
- * Delete a subgraph database.
951
+ * Set `backup_first=true` to create a safety backup before deletion. Requires admin role on the parent graph.
1770
952
  *
1771
953
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1772
954
  */
@@ -1783,7 +965,7 @@ export const opDeleteSubgraph = <ThrowOnError extends boolean = false>(options:
1783
965
  /**
1784
966
  * Create Backup
1785
967
  *
1786
- * Create a backup of the graph database (async).
968
+ * Not allowed on shared repositories. Only `full_dump` format supported. Retention capped at tier maximum. Monitor progress via SSE at `/v1/operations/{operation_id}/stream`.
1787
969
  *
1788
970
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1789
971
  */
@@ -1800,10 +982,7 @@ export const opCreateBackup = <ThrowOnError extends boolean = false>(options: Op
1800
982
  /**
1801
983
  * Restore Backup
1802
984
  *
1803
- * Restore a graph database from an encrypted backup.
1804
- *
1805
- * Blocked for entity graphs — OLTP is the source of truth, use
1806
- * the materialize operation instead.
985
+ * Only encrypted backups can be restored. Not allowed on entity graphs (use `materialize` instead) or shared repositories.
1807
986
  *
1808
987
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1809
988
  */
@@ -1818,15 +997,15 @@ export const opRestoreBackup = <ThrowOnError extends boolean = false>(options: O
1818
997
  });
1819
998
 
1820
999
  /**
1821
- * Upgrade Tier
1000
+ * Change Tier
1822
1001
  *
1823
- * Change the infrastructure tier on a graph (async EBS migration).
1002
+ * Async EBS migration (3-5 min). Valid tiers: `ladybug-standard`, `ladybug-large`, `ladybug-xlarge`.
1824
1003
  *
1825
1004
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1826
1005
  */
1827
- export const opUpgradeTier = <ThrowOnError extends boolean = false>(options: Options<OpUpgradeTierData, ThrowOnError>) => (options.client ?? client).post<OpUpgradeTierResponses, OpUpgradeTierErrors, ThrowOnError>({
1006
+ export const opChangeTier = <ThrowOnError extends boolean = false>(options: Options<OpChangeTierData, ThrowOnError>) => (options.client ?? client).post<OpChangeTierResponses, OpChangeTierErrors, ThrowOnError>({
1828
1007
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
1829
- url: '/v1/graphs/{graph_id}/operations/upgrade-tier',
1008
+ url: '/v1/graphs/{graph_id}/operations/change-tier',
1830
1009
  ...options,
1831
1010
  headers: {
1832
1011
  'Content-Type': 'application/json',
@@ -1837,7 +1016,7 @@ export const opUpgradeTier = <ThrowOnError extends boolean = false>(options: Opt
1837
1016
  /**
1838
1017
  * Materialize Graph
1839
1018
  *
1840
- * Materialize graph from staging tables or extensions OLTP.
1019
+ * Rebuilds LadybugDB from staging tables (file uploads) or extensions OLTP data. Set `dry_run=true` to preview without changes.
1841
1020
  *
1842
1021
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1843
1022
  */
@@ -1854,37 +1033,7 @@ export const opMaterialize = <ThrowOnError extends boolean = false>(options: Opt
1854
1033
  /**
1855
1034
  * List Files in Graph
1856
1035
  *
1857
- * List all files in the graph with optional filtering.
1858
- *
1859
- * Get a complete inventory of files across all tables or filtered by table name,
1860
- * status, or other criteria. Files are first-class resources with independent lifecycle.
1861
- *
1862
- * **Query Parameters:**
1863
- * - `table_name` (optional): Filter by table name
1864
- * - `status` (optional): Filter by upload status (uploaded, pending, failed, etc.)
1865
- *
1866
- * **Use Cases:**
1867
- * - Monitor file upload progress across all tables
1868
- * - Verify files are ready for ingestion
1869
- * - Check file metadata and sizes
1870
- * - Track storage usage per graph
1871
- * - Identify failed or incomplete uploads
1872
- * - Audit file provenance
1873
- *
1874
- * **Returned Metadata:**
1875
- * - File ID, name, and format (parquet, csv, json)
1876
- * - Size in bytes and row count (if available)
1877
- * - Upload status and timestamps
1878
- * - DuckDB and graph ingestion status
1879
- * - Table association
1880
- *
1881
- * **File Lifecycle Tracking:**
1882
- * Multi-layer status across S3 → DuckDB → Graph pipeline
1883
- *
1884
- * **Important Notes:**
1885
- * - Files are graph-scoped, not table-scoped
1886
- * - Use table_name parameter to filter by table
1887
- * - File listing is included - no credit consumption
1036
+ * Filter by `table_name` or upload `status`. Files are graph-scoped resources with S3 → DuckDB → Graph lifecycle tracking.
1888
1037
  */
1889
1038
  export const listFiles = <ThrowOnError extends boolean = false>(options: Options<ListFilesData, ThrowOnError>) => (options.client ?? client).get<ListFilesResponses, ListFilesErrors, ThrowOnError>({
1890
1039
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1895,33 +1044,7 @@ export const listFiles = <ThrowOnError extends boolean = false>(options: Options
1895
1044
  /**
1896
1045
  * Create File Upload
1897
1046
  *
1898
- * Generate presigned S3 URL for file upload.
1899
- *
1900
- * Initiate file upload by generating a secure, time-limited presigned S3 URL.
1901
- * Files are first-class resources uploaded directly to S3.
1902
- *
1903
- * **Request Body:**
1904
- * - `file_name`: Name of the file (1-255 characters)
1905
- * - `file_format`: Format (parquet, csv, json)
1906
- * - `table_name`: Table to associate file with
1907
- *
1908
- * **Upload Workflow:**
1909
- * 1. Call this endpoint to get presigned URL
1910
- * 2. PUT file directly to S3 URL
1911
- * 3. Call PATCH /files/{file_id} with status='uploaded'
1912
- * 4. Backend validates and stages in DuckDB immediately
1913
- * 5. Background task ingests to graph
1914
- *
1915
- * **Supported Formats:**
1916
- * - Parquet, CSV, JSON
1917
- *
1918
- * **Auto-Table Creation:**
1919
- * Tables are automatically created if they don't exist.
1920
- *
1921
- * **Important Notes:**
1922
- * - Presigned URLs expire (default: 1 hour)
1923
- * - Files are graph-scoped, independent resources
1924
- * - Upload URL generation is included - no credit consumption
1047
+ * Returns a presigned S3 URL for direct upload. After uploading, call `PATCH /files/{file_id}` with `status=uploaded` to trigger DuckDB staging. Tables are auto-created if missing. Not allowed on entity graphs or shared repositories.
1925
1048
  */
1926
1049
  export const createFileUpload = <ThrowOnError extends boolean = false>(options: Options<CreateFileUploadData, ThrowOnError>) => (options.client ?? client).post<CreateFileUploadResponses, CreateFileUploadErrors, ThrowOnError>({
1927
1050
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1936,41 +1059,7 @@ export const createFileUpload = <ThrowOnError extends boolean = false>(options:
1936
1059
  /**
1937
1060
  * Delete File
1938
1061
  *
1939
- * Delete file from all layers.
1940
- *
1941
- * Remove file from S3, database tracking, and optionally from DuckDB and graph.
1942
- * Files are deleted by file_id, independent of table context.
1943
- *
1944
- * **Query Parameters:**
1945
- * - `cascade` (optional, default=false): Delete from all layers including DuckDB
1946
- *
1947
- * **What Happens (cascade=false):**
1948
- * 1. File deleted from S3
1949
- * 2. Database record removed
1950
- * 3. Table statistics updated
1951
- *
1952
- * **What Happens (cascade=true):**
1953
- * 1. File data deleted from all DuckDB tables (by file_id)
1954
- * 2. Graph marked as stale
1955
- * 3. File deleted from S3
1956
- * 4. Database record removed
1957
- * 5. Table statistics updated
1958
- *
1959
- * **Use Cases:**
1960
- * - Remove incorrect or duplicate files
1961
- * - Clean up failed uploads
1962
- * - Delete files before graph ingestion
1963
- * - Surgical data removal with cascade
1964
- *
1965
- * **Security:**
1966
- * - Write access required
1967
- * - Shared repositories block deletions
1968
- * - Full audit trail
1969
- *
1970
- * **Important:**
1971
- * - Use cascade=true for immediate DuckDB cleanup
1972
- * - Graph rebuild recommended after cascade deletion
1973
- * - File deletion is included - no credit consumption
1062
+ * Removes from S3 and database. `cascade=true` also deletes data from DuckDB tables and marks the graph stale (rebuild recommended). Not allowed on shared repositories.
1974
1063
  */
1975
1064
  export const deleteFile = <ThrowOnError extends boolean = false>(options: Options<DeleteFileData, ThrowOnError>) => (options.client ?? client).delete<DeleteFileResponses, DeleteFileErrors, ThrowOnError>({
1976
1065
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1981,41 +1070,7 @@ export const deleteFile = <ThrowOnError extends boolean = false>(options: Option
1981
1070
  /**
1982
1071
  * Get File Information
1983
1072
  *
1984
- * Get detailed information about a specific file.
1985
- *
1986
- * Retrieve comprehensive metadata for a single file by file_id, independent of
1987
- * table context. Files are first-class resources with complete lifecycle tracking.
1988
- *
1989
- * **Returned Information:**
1990
- * - File ID, name, format, size
1991
- * - Upload status and timestamps
1992
- * - **Enhanced Multi-Layer Status** (new in this version):
1993
- * - S3 layer: upload_status, uploaded_at, size_bytes, row_count
1994
- * - DuckDB layer: duckdb_status, duckdb_staged_at, duckdb_row_count
1995
- * - Graph layer: graph_status, graph_ingested_at
1996
- * - Table association
1997
- * - S3 location
1998
- *
1999
- * **Multi-Layer Pipeline Visibility:**
2000
- * The `layers` object provides independent status tracking across the three-tier
2001
- * data pipeline:
2002
- * - **S3 (Immutable Source)**: File upload and validation
2003
- * - **DuckDB (Mutable Staging)**: Immediate queryability with file provenance
2004
- * - **Graph (Immutable View)**: Optional graph database materialization
2005
- *
2006
- * Each layer shows its own status, timestamp, and row count (where applicable),
2007
- * enabling precise debugging and monitoring of the data ingestion flow.
2008
- *
2009
- * **Use Cases:**
2010
- * - Validate file upload completion
2011
- * - Monitor multi-layer ingestion progress in real-time
2012
- * - Debug upload or staging issues at specific layers
2013
- * - Verify file metadata and row counts
2014
- * - Track file provenance through the pipeline
2015
- * - Identify bottlenecks in the ingestion process
2016
- *
2017
- * **Note:**
2018
- * File info retrieval is included - no credit consumption
1073
+ * Returns per-layer status (`layers.s3`, `layers.duckdb`, `layers.graph`) for pipeline debugging.
2019
1074
  */
2020
1075
  export const getFile = <ThrowOnError extends boolean = false>(options: Options<GetFileData, ThrowOnError>) => (options.client ?? client).get<GetFileResponses, GetFileErrors, ThrowOnError>({
2021
1076
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2026,32 +1081,7 @@ export const getFile = <ThrowOnError extends boolean = false>(options: Options<G
2026
1081
  /**
2027
1082
  * Update File Status
2028
1083
  *
2029
- * Update file status and trigger processing.
2030
- *
2031
- * Update file status after upload completion. Setting status='uploaded' triggers
2032
- * immediate DuckDB staging and optional graph ingestion.
2033
- *
2034
- * **Request Body:**
2035
- * - `status`: New status (uploaded, disabled, failed)
2036
- * - `ingest_to_graph` (optional): If true, auto-ingest to graph after DuckDB staging
2037
- *
2038
- * **What Happens (status='uploaded'):**
2039
- * 1. File validated in S3
2040
- * 2. Row count calculated
2041
- * 3. DuckDB staging triggered immediately (background task)
2042
- * 4. If ingest_to_graph=true, graph ingestion queued
2043
- * 5. File queryable in DuckDB within seconds
2044
- *
2045
- * **Use Cases:**
2046
- * - Signal upload completion
2047
- * - Trigger immediate DuckDB staging
2048
- * - Enable/disable files
2049
- * - Mark failed uploads
2050
- *
2051
- * **Important:**
2052
- * - Files must exist in S3 before marking uploaded
2053
- * - DuckDB staging happens asynchronously
2054
- * - Graph ingestion is optional (ingest_to_graph flag)
1084
+ * Setting `status=uploaded` validates the file in S3, calculates row count, and triggers DuckDB staging. Small files use direct staging; large files use a background Dagster job with an `operation_id` for SSE monitoring. Set `ingest_to_graph=true` to auto-chain graph materialization.
2055
1085
  */
2056
1086
  export const updateFile = <ThrowOnError extends boolean = false>(options: Options<UpdateFileData, ThrowOnError>) => (options.client ?? client).patch<UpdateFileResponses, UpdateFileErrors, ThrowOnError>({
2057
1087
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2064,49 +1094,7 @@ export const updateFile = <ThrowOnError extends boolean = false>(options: Option
2064
1094
  });
2065
1095
 
2066
1096
  /**
2067
- * Get User Graphs and Repositories
2068
- *
2069
- * List all graph databases and shared repositories accessible to the current user.
2070
- *
2071
- * Returns a unified list of both user-created graphs and shared repositories (like SEC data)
2072
- * that the user has access to, including their role/access level and selection status.
2073
- *
2074
- * **Returned Information:**
2075
- * - Graph/Repository ID and display name
2076
- * - User's role/access level (admin/member for graphs, read/write/admin for repositories)
2077
- * - Selection status (only user graphs can be selected)
2078
- * - Creation timestamp
2079
- * - Repository type indicator (isRepository: true for shared repositories)
2080
- *
2081
- * **User Graphs (isRepository: false):**
2082
- * - Collaborative workspaces that can be shared with other users
2083
- * - Roles: `admin` (full access, can invite users) or `member` (read/write access)
2084
- * - Can be selected as active workspace
2085
- * - Graphs you create or have been invited to
2086
- *
2087
- * **Shared Repositories (isRepository: true):**
2088
- * - Read-only data repositories (e.g., SEC filings)
2089
- * - Access levels: `read`, `write` (for data contributions), `admin`
2090
- * - Cannot be selected (each has separate subscription)
2091
- * - Require separate subscriptions (personal, cannot be shared)
2092
- *
2093
- * **Selected Graph Concept:**
2094
- * The "selected" graph is the user's currently active workspace (user graphs only).
2095
- * Many API operations default to the selected graph if no graph_id is provided.
2096
- * Users can change their selected graph via `POST /v1/graphs/{graph_id}/select`.
2097
- *
2098
- * **Use Cases:**
2099
- * - Display unified graph/repository selector in UI
2100
- * - Show all accessible data sources (both owned graphs and subscribed repositories)
2101
- * - Identify currently active workspace
2102
- * - Filter by type (user graphs vs repositories)
2103
- *
2104
- * **Empty Response:**
2105
- * New users receive an empty list with `selectedGraphId: null`. Users should create
2106
- * a graph or subscribe to a repository.
2107
- *
2108
- * **Note:**
2109
- * Graph listing is included - no credit consumption required.
1097
+ * List User Graphs and Repositories
2110
1098
  */
2111
1099
  export const getGraphs = <ThrowOnError extends boolean = false>(options?: Options<GetGraphsData, ThrowOnError>) => (options?.client ?? client).get<GetGraphsResponses, GetGraphsErrors, ThrowOnError>({
2112
1100
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2117,72 +1105,7 @@ export const getGraphs = <ThrowOnError extends boolean = false>(options?: Option
2117
1105
  /**
2118
1106
  * Create New Graph Database
2119
1107
  *
2120
- * Create a new graph database with specified schema and optionally an initial entity.
2121
- *
2122
- * This endpoint starts an asynchronous graph creation operation and returns
2123
- * connection details for monitoring progress via Server-Sent Events (SSE).
2124
- *
2125
- * **Graph Creation Options:**
2126
- *
2127
- * 1. **Entity Graph with Initial Entity** (`initial_entity` provided, `create_entity=True`):
2128
- * - Creates graph structure with entity schema extensions
2129
- * - Populates an initial entity node with provided data
2130
- * - Useful when you want a pre-configured entity to start with
2131
- * - Example: Creating a company graph with the company already populated
2132
- *
2133
- * 2. **Entity Graph without Initial Entity** (`initial_entity=None`, `create_entity=False`):
2134
- * - Creates graph structure with entity schema extensions
2135
- * - Graph starts empty, ready for data import
2136
- * - Useful for bulk data imports or custom workflows
2137
- * - Example: Creating a graph structure before importing from CSV/API
2138
- *
2139
- * 3. **Generic Graph** (no `initial_entity` provided):
2140
- * - Creates empty graph with custom schema extensions
2141
- * - General-purpose knowledge graph
2142
- * - Example: Analytics graphs, custom data models
2143
- *
2144
- * **Required Fields:**
2145
- * - `metadata.graph_name`: Unique name for the graph
2146
- * - `instance_tier`: Resource tier (ladybug-standard, ladybug-large, ladybug-xlarge)
2147
- *
2148
- * **Optional Fields:**
2149
- * - `metadata.description`: Human-readable description of the graph's purpose
2150
- * - `metadata.schema_extensions`: List of schema extensions (roboledger, roboinvestor, etc.)
2151
- * - `tags`: Organizational tags (max 10)
2152
- * - `initial_entity`: Entity data (required for entity graphs with initial data)
2153
- * - `create_entity`: Whether to populate initial entity (default: true when initial_entity provided)
2154
- *
2155
- * **Monitoring Progress:**
2156
- * Use the returned `operation_id` to connect to the SSE stream:
2157
- * ```javascript
2158
- * const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
2159
- * eventSource.onmessage = (event) => {
2160
- * const data = JSON.parse(event.data);
2161
- * console.log('Progress:', data.progress_percent + '%');
2162
- * };
2163
- * ```
2164
- *
2165
- * **SSE Connection Limits:**
2166
- * - Maximum 5 concurrent SSE connections per user
2167
- * - Rate limited to 10 new connections per minute
2168
- * - Automatic circuit breaker for Redis failures
2169
- * - Graceful degradation if event system unavailable
2170
- *
2171
- * **Events Emitted:**
2172
- * - `operation_started`: Graph creation begins
2173
- * - `operation_progress`: Schema loading, database setup, etc.
2174
- * - `operation_completed`: Graph ready with connection details
2175
- * - `operation_error`: Creation failed with error details
2176
- *
2177
- * **Error Handling:**
2178
- * - `429 Too Many Requests`: SSE connection limit exceeded
2179
- * - `503 Service Unavailable`: SSE system temporarily disabled
2180
- * - Clients should implement exponential backoff on errors
2181
- *
2182
- * **Response includes:**
2183
- * - `operation_id`: Unique identifier for monitoring
2184
- * - `_links.stream`: SSE endpoint for real-time updates
2185
- * - `_links.status`: Point-in-time status check endpoint
1108
+ * Creates a graph asynchronously. Returns an `OperationEnvelope` with `operation_id` for SSE progress at `/v1/operations/{operation_id}/stream`. Entity graphs require `initial_entity`. Supports `Idempotency-Key` header.
2186
1109
  */
2187
1110
  export const createGraph = <ThrowOnError extends boolean = false>(options: Options<CreateGraphData, ThrowOnError>) => (options.client ?? client).post<CreateGraphResponses, CreateGraphErrors, ThrowOnError>({
2188
1111
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2196,35 +1119,6 @@ export const createGraph = <ThrowOnError extends boolean = false>(options: Optio
2196
1119
 
2197
1120
  /**
2198
1121
  * Get Available Schema Extensions
2199
- *
2200
- * List all available schema extensions for graph creation.
2201
- *
2202
- * Schema extensions provide pre-built industry-specific data models that extend
2203
- * the base graph schema with specialized nodes, relationships, and properties.
2204
- *
2205
- * **Available Extensions:**
2206
- * - **RoboLedger**: Complete accounting system with XBRL reporting, general ledger, and financial statements
2207
- * - **RoboInvestor**: Investment portfolio management with securities tracking, trade execution, and risk analysis
2208
- * - **RoboSCM**: Supply chain management and logistics
2209
- * - **RoboFO**: Front office operations and CRM
2210
- * - **RoboHRM**: Human resources management
2211
- * - **RoboEPM**: Enterprise performance management
2212
- * - **RoboReport**: Business intelligence and reporting
2213
- *
2214
- * **Extension Information:**
2215
- * Each extension includes:
2216
- * - Display name and description
2217
- * - Node and relationship counts
2218
- * - Context-aware capabilities (e.g., SEC repositories get different features than entity graphs)
2219
- *
2220
- * **Use Cases:**
2221
- * - Browse available extensions before creating a graph
2222
- * - Understand extension capabilities and data models
2223
- * - Plan graph schema based on business requirements
2224
- * - Combine multiple extensions for comprehensive data modeling
2225
- *
2226
- * **Note:**
2227
- * Extension listing is included - no credit consumption required.
2228
1122
  */
2229
1123
  export const getAvailableExtensions = <ThrowOnError extends boolean = false>(options?: Options<GetAvailableExtensionsData, ThrowOnError>) => (options?.client ?? client).get<GetAvailableExtensionsResponses, GetAvailableExtensionsErrors, ThrowOnError>({
2230
1124
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2234,32 +1128,6 @@ export const getAvailableExtensions = <ThrowOnError extends boolean = false>(opt
2234
1128
 
2235
1129
  /**
2236
1130
  * Get Available Graph Tiers
2237
- *
2238
- * List all available graph database tier configurations.
2239
- *
2240
- * This endpoint provides comprehensive technical specifications for each available
2241
- * graph database tier, including instance types, resource limits, and features.
2242
- *
2243
- * **Tier Information:**
2244
- * Each tier includes:
2245
- * - Technical specifications (instance type, memory, storage)
2246
- * - Resource limits (subgraphs, credits, rate limits)
2247
- * - Feature list with capabilities
2248
- * - Availability status
2249
- *
2250
- * **Available Tiers:**
2251
- * - **ladybug-standard**: Dedicated entry-level tier
2252
- * - **ladybug-large**: Dedicated professional tier with subgraph support
2253
- * - **ladybug-xlarge**: Enterprise tier with maximum resources
2254
- *
2255
- * **Use Cases:**
2256
- * - Display tier options in graph creation UI
2257
- * - Show technical specifications for tier selection
2258
- * - Validate tier availability before graph creation
2259
- * - Display feature comparisons
2260
- *
2261
- * **Note:**
2262
- * Tier listing is included - no credit consumption required.
2263
1131
  */
2264
1132
  export const getAvailableGraphTiers = <ThrowOnError extends boolean = false>(options?: Options<GetAvailableGraphTiersData, ThrowOnError>) => (options?.client ?? client).get<GetAvailableGraphTiersResponses, GetAvailableGraphTiersErrors, ThrowOnError>({
2265
1133
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2270,26 +1138,7 @@ export const getAvailableGraphTiers = <ThrowOnError extends boolean = false>(opt
2270
1138
  /**
2271
1139
  * Get Graph Tier Capacity
2272
1140
  *
2273
- * Check current infrastructure capacity for each graph database tier.
2274
- *
2275
- * Returns a status per tier indicating whether instances are immediately available,
2276
- * can be provisioned on demand, or are at capacity.
2277
- *
2278
- * **Status Values:**
2279
- * - `ready` — An instance slot is available; graph creation will succeed immediately
2280
- * - `scalable` — No slots right now, but a new instance can be provisioned (3-5 min)
2281
- * - `at_capacity` — Tier is full and cannot auto-scale; contact support
2282
- *
2283
- * **Use Cases:**
2284
- * - Pre-flight check before entering the graph creation wizard
2285
- * - Show availability badges on tier selection cards
2286
- * - Gate tier selection and show contact form for at-capacity tiers
2287
- *
2288
- * **Caching:**
2289
- * Results are cached for 60 seconds to avoid excessive infrastructure queries.
2290
- *
2291
- * **Note:**
2292
- * No credit consumption required. Does not expose instance counts or IPs.
1141
+ * Status per tier: `ready` (slot available), `scalable` (can provision, 3-5 min), `at_capacity` (contact support). Cached 60s.
2293
1142
  */
2294
1143
  export const getGraphCapacity = <ThrowOnError extends boolean = false>(options?: Options<GetGraphCapacityData, ThrowOnError>) => (options?.client ?? client).get<GetGraphCapacityResponses, GetGraphCapacityErrors, ThrowOnError>({
2295
1144
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2299,36 +1148,6 @@ export const getGraphCapacity = <ThrowOnError extends boolean = false>(options?:
2299
1148
 
2300
1149
  /**
2301
1150
  * Select Graph
2302
- *
2303
- * Select a specific graph as the active workspace for the user.
2304
- *
2305
- * The selected graph becomes the default context for operations in client applications
2306
- * and can be used to maintain user workspace preferences across sessions.
2307
- *
2308
- * **Functionality:**
2309
- * - Sets the specified graph as the user's currently selected graph
2310
- * - Deselects any previously selected graph (only one can be selected at a time)
2311
- * - Persists selection across sessions until changed
2312
- * - Returns confirmation with the selected graph ID
2313
- *
2314
- * **Requirements:**
2315
- * - User must have access to the graph (as admin or member)
2316
- * - Graph must exist and not be deleted
2317
- * - User can only select graphs they have permission to access
2318
- *
2319
- * **Use Cases:**
2320
- * - Switch between multiple graphs in a multi-graph environment
2321
- * - Set default workspace after creating a new graph
2322
- * - Restore user's preferred workspace on login
2323
- * - Support graph context switching in client applications
2324
- *
2325
- * **Client Integration:**
2326
- * Many client operations can default to the selected graph, simplifying API calls
2327
- * by eliminating the need to specify graph_id repeatedly. Check the selected
2328
- * graph with `GET /v1/graphs` which returns `selectedGraphId`.
2329
- *
2330
- * **Note:**
2331
- * Graph selection is included - no credit consumption required.
2332
1151
  */
2333
1152
  export const selectGraph = <ThrowOnError extends boolean = false>(options: Options<SelectGraphData, ThrowOnError>) => (options.client ?? client).post<SelectGraphResponses, SelectGraphErrors, ThrowOnError>({
2334
1153
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2339,81 +1158,14 @@ export const selectGraph = <ThrowOnError extends boolean = false>(options: Optio
2339
1158
  /**
2340
1159
  * Get Service Offerings
2341
1160
  *
2342
- * Get comprehensive information about all subscription offerings.
2343
- *
2344
- * This endpoint provides complete information about both graph database subscriptions
2345
- * and shared repository subscriptions. This is the primary endpoint for frontend
2346
- * applications to display subscription options.
2347
- *
2348
- * **Pricing Model:**
2349
- * - Graph subscriptions are **per-graph** with infrastructure-based pricing
2350
- * - Each graph you create has its own monthly subscription
2351
- * - Organizations can have multiple graphs with different infrastructure tiers
2352
- * - Credits are allocated per-graph, not shared across organization
2353
- *
2354
- * Includes:
2355
- * - Graph infrastructure tiers (ladybug-standard, ladybug-large, ladybug-xlarge) - per-graph pricing
2356
- * - Shared repository subscriptions - org-level
2357
- * - Operation costs and credit information
2358
- * - Features and capabilities for each tier
2359
- * - Enabled/disabled status for repositories
2360
- *
2361
- * All data comes from the config-based systems to ensure accuracy with backend behavior.
2362
- *
2363
- * No authentication required - this is public service information.
1161
+ * Returns all subscription tiers, shared repository plans, and AI credit costs. No authentication required.
2364
1162
  */
2365
1163
  export const getServiceOfferings = <ThrowOnError extends boolean = false>(options?: Options<GetServiceOfferingsData, ThrowOnError>) => (options?.client ?? client).get<GetServiceOfferingsResponses, GetServiceOfferingsErrors, ThrowOnError>({ url: '/v1/offering', ...options });
2366
1164
 
2367
1165
  /**
2368
1166
  * Stream Operation Events
2369
1167
  *
2370
- * Stream real-time events for an operation using Server-Sent Events (SSE).
2371
- *
2372
- * This endpoint provides real-time monitoring for all non-immediate operations including:
2373
- * - Graph creation and management
2374
- * - Agent analysis processing
2375
- * - Database backups and restores
2376
- * - Data synchronization tasks
2377
- *
2378
- * **Event Types:**
2379
- * - `operation_started`: Operation began execution
2380
- * - `operation_progress`: Progress update with details
2381
- * - `operation_completed`: Operation finished successfully
2382
- * - `operation_error`: Operation failed with error details
2383
- * - `operation_cancelled`: Operation was cancelled
2384
- *
2385
- * **Features:**
2386
- * - **Event Replay**: Use `from_sequence` parameter to replay missed events
2387
- * - **Automatic Reconnection**: Client can reconnect and resume from last seen event
2388
- * - **Real-time Updates**: Live progress updates during execution
2389
- * - **Timeout Handling**: 30-second keepalive messages prevent connection timeouts
2390
- * - **Graceful Degradation**: Automatic fallback if Redis is unavailable
2391
- *
2392
- * **Connection Limits:**
2393
- * - Maximum 5 concurrent SSE connections per user
2394
- * - Rate limited to 10 new connections per minute
2395
- * - Automatic cleanup of stale connections
2396
- * - Circuit breaker protection for Redis failures
2397
- *
2398
- * **Client Usage:**
2399
- * ```javascript
2400
- * const eventSource = new EventSource('/v1/operations/abc123/stream');
2401
- * eventSource.onmessage = (event) => {
2402
- * const data = JSON.parse(event.data);
2403
- * console.log('Progress:', data);
2404
- * };
2405
- * eventSource.onerror = (error) => {
2406
- * // Handle connection errors or rate limits
2407
- * console.error('SSE Error:', error);
2408
- * };
2409
- * ```
2410
- *
2411
- * **Error Handling:**
2412
- * - `429 Too Many Requests`: Connection limit or rate limit exceeded
2413
- * - `503 Service Unavailable`: SSE system temporarily disabled
2414
- * - Clients should implement exponential backoff on errors
2415
- *
2416
- * **No credits are consumed for SSE connections.**
1168
+ * Server-Sent Events stream for real-time operation progress. Use `from_sequence` to replay missed events on reconnect. Max 5 concurrent SSE connections per user. Consumes no credits.
2417
1169
  */
2418
1170
  export const streamOperationEvents = <ThrowOnError extends boolean = false>(options: Options<StreamOperationEventsData, ThrowOnError>) => (options.client ?? client).get<StreamOperationEventsResponses, StreamOperationEventsErrors, ThrowOnError>({
2419
1171
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2424,19 +1176,7 @@ export const streamOperationEvents = <ThrowOnError extends boolean = false>(opti
2424
1176
  /**
2425
1177
  * Get Operation Status
2426
1178
  *
2427
- * Get current status and metadata for an operation.
2428
- *
2429
- * Returns detailed information including:
2430
- * - Current status (pending, running, completed, failed, cancelled)
2431
- * - Creation and update timestamps
2432
- * - Operation type and associated graph
2433
- * - Result data (for completed operations)
2434
- * - Error details (for failed operations)
2435
- *
2436
- * This endpoint provides a point-in-time status check, while the `/stream` endpoint
2437
- * provides real-time updates. Use this for polling or initial status checks.
2438
- *
2439
- * **No credits are consumed for status checks.**
1179
+ * Point-in-time status check. Use `/stream` for real-time updates. Consumes no credits.
2440
1180
  */
2441
1181
  export const getOperationStatus = <ThrowOnError extends boolean = false>(options: Options<GetOperationStatusData, ThrowOnError>) => (options.client ?? client).get<GetOperationStatusResponses, GetOperationStatusErrors, ThrowOnError>({
2442
1182
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2447,15 +1187,7 @@ export const getOperationStatus = <ThrowOnError extends boolean = false>(options
2447
1187
  /**
2448
1188
  * Cancel Operation
2449
1189
  *
2450
- * Cancel a pending or running operation.
2451
- *
2452
- * Cancels the specified operation if it's still in progress. Once cancelled,
2453
- * the operation cannot be resumed and will emit a cancellation event to any
2454
- * active SSE connections.
2455
- *
2456
- * **Note**: Completed or already failed operations cannot be cancelled.
2457
- *
2458
- * **No credits are consumed for cancellation requests.**
1190
+ * Cancels a pending or running operation. Emits a cancellation event to any active SSE connections. Cannot cancel completed or failed operations.
2459
1191
  */
2460
1192
  export const cancelOperation = <ThrowOnError extends boolean = false>(options: Options<CancelOperationData, ThrowOnError>) => (options.client ?? client).delete<CancelOperationResponses, CancelOperationErrors, ThrowOnError>({
2461
1193
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2466,13 +1198,7 @@ export const cancelOperation = <ThrowOnError extends boolean = false>(options: O
2466
1198
  /**
2467
1199
  * Get Organization Customer Info
2468
1200
  *
2469
- * Get billing customer information for an organization including payment methods on file.
2470
- *
2471
- * Returns customer details, payment methods, and whether invoice billing is enabled.
2472
- *
2473
- * **Requirements:**
2474
- * - User must be a member of the organization
2475
- * - Sensitive payment details are only visible to owners
1201
+ * Payment method details are only visible to org owners.
2476
1202
  */
2477
1203
  export const getOrgBillingCustomer = <ThrowOnError extends boolean = false>(options: Options<GetOrgBillingCustomerData, ThrowOnError>) => (options.client ?? client).get<GetOrgBillingCustomerResponses, GetOrgBillingCustomerErrors, ThrowOnError>({
2478
1204
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2483,19 +1209,7 @@ export const getOrgBillingCustomer = <ThrowOnError extends boolean = false>(opti
2483
1209
  /**
2484
1210
  * Create Customer Portal Session
2485
1211
  *
2486
- * Create a Stripe Customer Portal session for managing payment methods.
2487
- *
2488
- * The portal allows users to:
2489
- * - Add new payment methods
2490
- * - Remove existing payment methods
2491
- * - Update default payment method
2492
- * - View billing history
2493
- *
2494
- * The user will be redirected to Stripe's hosted portal page and returned to the billing page when done.
2495
- *
2496
- * **Requirements:**
2497
- * - User must be an OWNER of the organization
2498
- * - Organization must have a Stripe customer ID (i.e., has gone through checkout at least once)
1212
+ * Returns a Stripe Customer Portal URL for managing payment methods and billing history. Requires org owner role.
2499
1213
  */
2500
1214
  export const createPortalSession = <ThrowOnError extends boolean = false>(options: Options<CreatePortalSessionData, ThrowOnError>) => (options.client ?? client).post<CreatePortalSessionResponses, CreatePortalSessionErrors, ThrowOnError>({
2501
1215
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2505,13 +1219,6 @@ export const createPortalSession = <ThrowOnError extends boolean = false>(option
2505
1219
 
2506
1220
  /**
2507
1221
  * List Organization Subscriptions
2508
- *
2509
- * List all active and past subscriptions for an organization.
2510
- *
2511
- * Includes both graph and repository subscriptions with their status, pricing, and billing information.
2512
- *
2513
- * **Requirements:**
2514
- * - User must be a member of the organization
2515
1222
  */
2516
1223
  export const listOrgSubscriptions = <ThrowOnError extends boolean = false>(options: Options<ListOrgSubscriptionsData, ThrowOnError>) => (options.client ?? client).get<ListOrgSubscriptionsResponses, ListOrgSubscriptionsErrors, ThrowOnError>({
2517
1224
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2521,11 +1228,6 @@ export const listOrgSubscriptions = <ThrowOnError extends boolean = false>(optio
2521
1228
 
2522
1229
  /**
2523
1230
  * Get Organization Subscription Details
2524
- *
2525
- * Get detailed information about a specific subscription.
2526
- *
2527
- * **Requirements:**
2528
- * - User must be a member of the organization
2529
1231
  */
2530
1232
  export const getOrgSubscription = <ThrowOnError extends boolean = false>(options: Options<GetOrgSubscriptionData, ThrowOnError>) => (options.client ?? client).get<GetOrgSubscriptionResponses, GetOrgSubscriptionErrors, ThrowOnError>({
2531
1233
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2536,12 +1238,7 @@ export const getOrgSubscription = <ThrowOnError extends boolean = false>(options
2536
1238
  /**
2537
1239
  * Cancel Organization Subscription
2538
1240
  *
2539
- * Cancel an organization subscription.
2540
- *
2541
- * The subscription will remain active until the end of the current billing period.
2542
- *
2543
- * **Requirements:**
2544
- * - User must be an OWNER of the organization
1241
+ * Cancels at period end — subscription remains active through the current billing cycle. Requires org owner role.
2545
1242
  */
2546
1243
  export const cancelOrgSubscription = <ThrowOnError extends boolean = false>(options: Options<CancelOrgSubscriptionData, ThrowOnError>) => (options.client ?? client).post<CancelOrgSubscriptionResponses, CancelOrgSubscriptionErrors, ThrowOnError>({
2547
1244
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2552,13 +1249,7 @@ export const cancelOrgSubscription = <ThrowOnError extends boolean = false>(opti
2552
1249
  /**
2553
1250
  * List Organization Invoices
2554
1251
  *
2555
- * List payment history and invoices for an organization.
2556
- *
2557
- * Returns past invoices with payment status, amounts, and line items.
2558
- *
2559
- * **Requirements:**
2560
- * - User must be a member of the organization
2561
- * - Full invoice details are only visible to owners and admins
1252
+ * Requires admin or owner role.
2562
1253
  */
2563
1254
  export const listOrgInvoices = <ThrowOnError extends boolean = false>(options: Options<ListOrgInvoicesData, ThrowOnError>) => (options.client ?? client).get<ListOrgInvoicesResponses, ListOrgInvoicesErrors, ThrowOnError>({
2564
1255
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2569,13 +1260,7 @@ export const listOrgInvoices = <ThrowOnError extends boolean = false>(options: O
2569
1260
  /**
2570
1261
  * Get Organization Upcoming Invoice
2571
1262
  *
2572
- * Get preview of the next invoice for an organization.
2573
- *
2574
- * Returns estimated charges for the next billing period.
2575
- *
2576
- * **Requirements:**
2577
- * - User must be a member of the organization
2578
- * - Full invoice details are only visible to owners and admins
1263
+ * Requires admin or owner role. Returns null if no billing activity yet.
2579
1264
  */
2580
1265
  export const getOrgUpcomingInvoice = <ThrowOnError extends boolean = false>(options: Options<GetOrgUpcomingInvoiceData, ThrowOnError>) => (options.client ?? client).get<GetOrgUpcomingInvoiceResponses, GetOrgUpcomingInvoiceErrors, ThrowOnError>({
2581
1266
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2586,23 +1271,7 @@ export const getOrgUpcomingInvoice = <ThrowOnError extends boolean = false>(opti
2586
1271
  /**
2587
1272
  * Create Payment Checkout Session
2588
1273
  *
2589
- * Create a Stripe checkout session for collecting payment method.
2590
- *
2591
- * This endpoint is used when an organization owner needs to add a payment method before
2592
- * provisioning resources. It creates a pending subscription and redirects
2593
- * to Stripe Checkout to collect payment details.
2594
- *
2595
- * **Flow:**
2596
- * 1. Owner tries to create a graph but org has no payment method
2597
- * 2. Frontend calls this endpoint with graph configuration
2598
- * 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
2599
- * 4. Returns Stripe Checkout URL
2600
- * 5. User completes payment on Stripe
2601
- * 6. Webhook activates subscription and provisions resource
2602
- *
2603
- * **Requirements:**
2604
- * - User must be an OWNER of their organization
2605
- * - Enterprise customers (with invoice_billing_enabled) should not call this endpoint.
1274
+ * Initiates a Stripe checkout session for payment collection. Creates a pending subscription; the webhook activates it and provisions the resource after payment completes. Returns billing_disabled=true with no URL when billing is off. Requires org owner role.
2606
1275
  */
2607
1276
  export const createCheckoutSession = <ThrowOnError extends boolean = false>(options: Options<CreateCheckoutSessionData, ThrowOnError>) => (options.client ?? client).post<CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, ThrowOnError>({
2608
1277
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2617,21 +1286,7 @@ export const createCheckoutSession = <ThrowOnError extends boolean = false>(opti
2617
1286
  /**
2618
1287
  * Get Checkout Session Status
2619
1288
  *
2620
- * Poll the status of a checkout session.
2621
- *
2622
- * Frontend should poll this endpoint after user returns from Stripe Checkout
2623
- * to determine when the resource is ready.
2624
- *
2625
- * **Status Values:**
2626
- * - `pending_payment`: Waiting for payment to complete
2627
- * - `provisioning`: Payment confirmed, resource being created
2628
- * - `active`: Resource is ready (resource_id will be set)
2629
- * - `failed`: Something went wrong (error field will be set)
2630
- * - `canceled`: Payment was canceled
2631
- *
2632
- * **When status is 'active':**
2633
- * - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress
2634
- * - For repositories: `resource_id` will be the repository name and access is immediately available
1289
+ * Poll after returning from Stripe Checkout. Status progresses: pending_payment → provisioning → active. When active, resource_id is populated; for graphs, operation_id tracks SSE provisioning progress.
2635
1290
  */
2636
1291
  export const getCheckoutStatus = <ThrowOnError extends boolean = false>(options: Options<GetCheckoutStatusData, ThrowOnError>) => (options.client ?? client).get<GetCheckoutStatusResponses, GetCheckoutStatusErrors, ThrowOnError>({
2637
1292
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -2672,7 +1327,7 @@ export const handleHttpPostExtensionsGraphIdGraphqlPost = <ThrowOnError extends
2672
1327
  /**
2673
1328
  * Update Entity
2674
1329
  *
2675
- * Update entity details. Only provided (non-null) fields are updated.
1330
+ * Only provided (non-null) fields are updated.
2676
1331
  *
2677
1332
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2678
1333
  */
@@ -2689,7 +1344,7 @@ export const opUpdateEntity = <ThrowOnError extends boolean = false>(options: Op
2689
1344
  /**
2690
1345
  * Initialize Ledger
2691
1346
  *
2692
- * One-time ledger initialization create fiscal calendar + seed periods.
1347
+ * One-time setup: creates the fiscal calendar and seeds periods. Returns 409 if already initialized.
2693
1348
  *
2694
1349
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2695
1350
  */
@@ -2706,7 +1361,7 @@ export const opInitializeLedger = <ThrowOnError extends boolean = false>(options
2706
1361
  /**
2707
1362
  * Set Close Target
2708
1363
  *
2709
- * Set the user-controlled close target (YYYY-MM).
1364
+ * Period format: YYYY-MM. The close target is the user-controlled goal date, distinct from `closed_through` (what's actually closed).
2710
1365
  *
2711
1366
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2712
1367
  */
@@ -2723,7 +1378,7 @@ export const opSetCloseTarget = <ThrowOnError extends boolean = false>(options:
2723
1378
  /**
2724
1379
  * Close Fiscal Period
2725
1380
  *
2726
- * Close a fiscal period — the final commit action.
1381
+ *
2727
1382
  *
2728
1383
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2729
1384
  */
@@ -2740,7 +1395,7 @@ export const opClosePeriod = <ThrowOnError extends boolean = false>(options: Opt
2740
1395
  /**
2741
1396
  * Reopen Fiscal Period
2742
1397
  *
2743
- * Reopen a closed fiscal period decrements `closed_through`.
1398
+ * Decrements `closed_through` by one — only the most recently closed period can be reopened.
2744
1399
  *
2745
1400
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2746
1401
  */
@@ -2757,7 +1412,7 @@ export const opReopenPeriod = <ThrowOnError extends boolean = false>(options: Op
2757
1412
  /**
2758
1413
  * Create Schedule
2759
1414
  *
2760
- * Create a schedule with pre-generated monthly facts.
1415
+ * Creates a schedule and pre-generates monthly amortization facts spanning the period range.
2761
1416
  *
2762
1417
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2763
1418
  */
@@ -2774,7 +1429,7 @@ export const opCreateSchedule = <ThrowOnError extends boolean = false>(options:
2774
1429
  /**
2775
1430
  * Truncate Schedule (End Early)
2776
1431
  *
2777
- * End a schedule early delete forward facts + stale drafts.
1432
+ * Ends a schedule early by deleting forward facts and any stale draft closing entries past the cutoff.
2778
1433
  *
2779
1434
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2780
1435
  */
@@ -2791,7 +1446,7 @@ export const opTruncateSchedule = <ThrowOnError extends boolean = false>(options
2791
1446
  /**
2792
1447
  * Create Closing Entry
2793
1448
  *
2794
- * Create a draft closing entry from a schedule's facts for a period.
1449
+ * Creates a draft closing entry pre-populated from a schedule's facts for the given period.
2795
1450
  *
2796
1451
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2797
1452
  */
@@ -2808,7 +1463,7 @@ export const opCreateClosingEntry = <ThrowOnError extends boolean = false>(optio
2808
1463
  /**
2809
1464
  * Create Manual Closing Entry
2810
1465
  *
2811
- * Create a manual (non-schedule) draft closing entry.
1466
+ * Creates a draft closing entry with manually specified amounts — not tied to a schedule.
2812
1467
  *
2813
1468
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2814
1469
  */
@@ -2825,7 +1480,7 @@ export const opCreateManualClosingEntry = <ThrowOnError extends boolean = false>
2825
1480
  /**
2826
1481
  * Create Taxonomy
2827
1482
  *
2828
- * Create a new taxonomy definition.
1483
+ *
2829
1484
  *
2830
1485
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2831
1486
  */
@@ -2842,7 +1497,7 @@ export const opCreateTaxonomy = <ThrowOnError extends boolean = false>(options:
2842
1497
  /**
2843
1498
  * Create Structure
2844
1499
  *
2845
- * Create a new structure (statement, mapping, schedule, etc.).
1500
+ * Structures organize elements within a taxonomy. Types: `statement`, `mapping`, `schedule`, `presentation`, `calculation`.
2846
1501
  *
2847
1502
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2848
1503
  */
@@ -2859,7 +1514,7 @@ export const opCreateStructure = <ThrowOnError extends boolean = false>(options:
2859
1514
  /**
2860
1515
  * Create Mapping Association
2861
1516
  *
2862
- * Add a mapping association (CoA element → reporting concept).
1517
+ * Links a chart-of-accounts element to a reporting concept (CoA element → US GAAP concept).
2863
1518
  *
2864
1519
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2865
1520
  */
@@ -2876,7 +1531,7 @@ export const opCreateMappingAssociation = <ThrowOnError extends boolean = false>
2876
1531
  /**
2877
1532
  * Delete Mapping Association
2878
1533
  *
2879
- * Remove a mapping association.
1534
+ *
2880
1535
  *
2881
1536
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2882
1537
  */
@@ -3199,18 +1854,7 @@ export const opDeleteSchedule = <ThrowOnError extends boolean = false>(options:
3199
1854
  /**
3200
1855
  * Auto-Map Elements via AI (async)
3201
1856
  *
3202
- * Trigger autonomous CoA US GAAP mapping via background worker.
3203
- *
3204
- * This is the only async/Dagster-dispatched ledger operation. Instead
3205
- * of running synchronously, it enqueues a `MappingAgent` task and
3206
- * returns a `pending` envelope with the worker-issued operation_id —
3207
- * callers subscribe via `/v1/operations/{operation_id}/stream` for SSE
3208
- * progress events.
3209
- *
3210
- * Confidence thresholds (in the agent):
3211
- * - ≥0.90: auto-approved mapping
3212
- * - 0.70-0.89: flagged for review
3213
- * - <0.70: skipped (left unmapped)
1857
+ * Dispatches to the background worker returns a `pending` envelope immediately. Monitor via SSE at `/v1/operations/{operation_id}/stream`. Confidence thresholds: ≥0.90 auto-approved, 0.70–0.89 flagged for review, <0.70 skipped.
3214
1858
  *
3215
1859
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3216
1860
  */
@@ -3227,7 +1871,7 @@ export const opAutoMapElements = <ThrowOnError extends boolean = false>(options:
3227
1871
  /**
3228
1872
  * Create Report
3229
1873
  *
3230
- * Create a report definition, generate facts, and mark as published.
1874
+ * Generates report facts from the ledger and marks the report as published.
3231
1875
  *
3232
1876
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3233
1877
  */
@@ -3244,7 +1888,7 @@ export const opCreateReport = <ThrowOnError extends boolean = false>(options: Op
3244
1888
  /**
3245
1889
  * Regenerate Report
3246
1890
  *
3247
- * Regenerate a report with new period dates.
1891
+ *
3248
1892
  *
3249
1893
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3250
1894
  */
@@ -3261,7 +1905,7 @@ export const opRegenerateReport = <ThrowOnError extends boolean = false>(options
3261
1905
  /**
3262
1906
  * Delete Report
3263
1907
  *
3264
- * Delete a report definition and its facts.
1908
+ * Deletes the report definition and all generated facts.
3265
1909
  *
3266
1910
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3267
1911
  */
@@ -3278,7 +1922,7 @@ export const opDeleteReport = <ThrowOnError extends boolean = false>(options: Op
3278
1922
  /**
3279
1923
  * Share Report
3280
1924
  *
3281
- * Share a published report to a publish list's members.
1925
+ * Only published reports can be shared. Sends the report to all members of the target publish list.
3282
1926
  *
3283
1927
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3284
1928
  */
@@ -3295,7 +1939,7 @@ export const opShareReport = <ThrowOnError extends boolean = false>(options: Opt
3295
1939
  /**
3296
1940
  * Create Publish List
3297
1941
  *
3298
- * Create a new publish list.
1942
+ *
3299
1943
  *
3300
1944
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3301
1945
  */
@@ -3312,7 +1956,7 @@ export const opCreatePublishList = <ThrowOnError extends boolean = false>(option
3312
1956
  /**
3313
1957
  * Update Publish List
3314
1958
  *
3315
- * Update a publish list's name / description.
1959
+ * Updates the publish list's `name` and/or `description`. Membership is managed via add/remove-member operations.
3316
1960
  *
3317
1961
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3318
1962
  */
@@ -3329,7 +1973,7 @@ export const opUpdatePublishList = <ThrowOnError extends boolean = false>(option
3329
1973
  /**
3330
1974
  * Delete Publish List
3331
1975
  *
3332
- * Delete a publish list.
1976
+ *
3333
1977
  *
3334
1978
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3335
1979
  */
@@ -3346,7 +1990,7 @@ export const opDeletePublishList = <ThrowOnError extends boolean = false>(option
3346
1990
  /**
3347
1991
  * Add Members to Publish List
3348
1992
  *
3349
- * Add target graphs as members of a publish list.
1993
+ *
3350
1994
  *
3351
1995
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3352
1996
  */
@@ -3363,7 +2007,7 @@ export const opAddPublishListMembers = <ThrowOnError extends boolean = false>(op
3363
2007
  /**
3364
2008
  * Remove Member from Publish List
3365
2009
  *
3366
- * Remove a target graph from a publish list.
2010
+ *
3367
2011
  *
3368
2012
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3369
2013
  */
@@ -3380,17 +2024,7 @@ export const opRemovePublishListMember = <ThrowOnError extends boolean = false>(
3380
2024
  /**
3381
2025
  * Build Fact Grid
3382
2026
  *
3383
- * Build a multi-dimensional fact grid against the graph schema.
3384
- *
3385
- * Queries `Fact` nodes by element qnames or canonical concepts with
3386
- * optional filters for periods, entities, filing form, fiscal context,
3387
- * and period type. Returns a deduplicated pivot table plus optional
3388
- * summary statistics.
3389
- *
3390
- * This is a graph-database read — the query runs against LadybugDB,
3391
- * not the extensions OLTP database. The same operation works for
3392
- * roboledger tenant graphs (post-materialization) and the SEC shared
3393
- * repository (which uses the same XBRL hypercube schema).
2027
+ * Queries LadybugDB `Fact` nodes by element qnames or canonical concepts, with filters for periods, entities, form, and fiscal context. Returns a deduplicated pivot table. Works on both roboledger tenant graphs (post-materialization) and the SEC shared repository.
3394
2028
  *
3395
2029
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3396
2030
  */
@@ -3441,7 +2075,7 @@ export const opUpdatePortfolio = <ThrowOnError extends boolean = false>(options:
3441
2075
  /**
3442
2076
  * Delete Portfolio
3443
2077
  *
3444
- *
2078
+ * Returns 409 if the portfolio has active positions — dispose them first.
3445
2079
  *
3446
2080
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3447
2081
  */
@@ -3492,7 +2126,7 @@ export const opUpdateSecurity = <ThrowOnError extends boolean = false>(options:
3492
2126
  /**
3493
2127
  * Delete Security
3494
2128
  *
3495
- *
2129
+ * Soft-deletes the security (`is_active=false`). Historical positions referencing it remain valid.
3496
2130
  *
3497
2131
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3498
2132
  */
@@ -3509,7 +2143,7 @@ export const opDeleteSecurity = <ThrowOnError extends boolean = false>(options:
3509
2143
  /**
3510
2144
  * Create Position
3511
2145
  *
3512
- *
2146
+ * Returns 409 if an active position for this security already exists in the portfolio.
3513
2147
  *
3514
2148
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3515
2149
  */
@@ -3543,7 +2177,7 @@ export const opUpdatePosition = <ThrowOnError extends boolean = false>(options:
3543
2177
  /**
3544
2178
  * Delete Position
3545
2179
  *
3546
- *
2180
+ * Soft-deletes the position (`is_active=false`). Historical holding records referencing it remain valid.
3547
2181
  *
3548
2182
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
3549
2183
  */