@robosystems/client 0.3.6 → 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/index.ts +1 -1
- package/package.json +1 -1
- package/sdk/index.d.ts +1 -1
- package/sdk/index.ts +1 -1
- package/sdk/sdk.gen.d.ts +118 -1478
- package/sdk/sdk.gen.js +111 -1471
- package/sdk/sdk.gen.ts +117 -1477
- package/sdk/types.gen.d.ts +2457 -791
- package/sdk/types.gen.ts +2471 -791
- package/sdk.gen.d.ts +118 -1478
- package/sdk.gen.js +111 -1471
- package/sdk.gen.ts +117 -1477
- package/types.gen.d.ts +2457 -791
- package/types.gen.ts +2471 -791
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, 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';
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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,
|
|
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
|
-
*
|
|
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,
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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,
|
|
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
|
-
*
|
|
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,
|
|
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
|
-
*
|
|
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,
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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,
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
1465
|
-
*
|
|
1466
|
-
* Get subscription details for a graph or shared repository.
|
|
769
|
+
* Get Graph Subscription
|
|
1467
770
|
*
|
|
1468
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
917
|
+
* Bulk Upload Documents
|
|
1736
918
|
*
|
|
1737
|
-
* Upload
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
*/
|
|
@@ -1820,7 +999,7 @@ export const opRestoreBackup = <ThrowOnError extends boolean = false>(options: O
|
|
|
1820
999
|
/**
|
|
1821
1000
|
* Change Tier
|
|
1822
1001
|
*
|
|
1823
|
-
*
|
|
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
|
*/
|
|
@@ -1837,7 +1016,7 @@ export const opChangeTier = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
1837
1016
|
/**
|
|
1838
1017
|
* Materialize Graph
|
|
1839
1018
|
*
|
|
1840
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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,66 +1105,7 @@ export const getGraphs = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
2117
1105
|
/**
|
|
2118
1106
|
* Create New Graph Database
|
|
2119
1107
|
*
|
|
2120
|
-
*
|
|
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** (`initial_entity` required, `custom_schema` omitted):
|
|
2128
|
-
* - Creates graph structure with entity schema extensions
|
|
2129
|
-
* - `initial_entity` is required — entity graphs must have an entity
|
|
2130
|
-
* - Set `create_entity=False` to defer entity population (e.g. file-based ingestion)
|
|
2131
|
-
* - Example: Creating a company graph with the company pre-populated
|
|
2132
|
-
*
|
|
2133
|
-
* 2. **Custom Graph** (`custom_schema` provided, no `initial_entity`):
|
|
2134
|
-
* - Creates a generic graph with a fully custom schema
|
|
2135
|
-
* - `initial_entity` is not used
|
|
2136
|
-
* - Example: Analytics graphs, custom data models
|
|
2137
|
-
*
|
|
2138
|
-
* **Required Fields:**
|
|
2139
|
-
* - `metadata.graph_name`: Unique name for the graph
|
|
2140
|
-
* - `instance_tier`: Resource tier (ladybug-standard, ladybug-large, ladybug-xlarge)
|
|
2141
|
-
* - `initial_entity`: Entity data — required for entity graphs (omit only when providing `custom_schema`)
|
|
2142
|
-
*
|
|
2143
|
-
* **Optional Fields:**
|
|
2144
|
-
* - `metadata.description`: Human-readable description of the graph's purpose
|
|
2145
|
-
* - `metadata.schema_extensions`: List of schema extensions (roboledger, roboinvestor, etc.)
|
|
2146
|
-
* - `tags`: Organizational tags (max 10)
|
|
2147
|
-
* - `create_entity`: Whether to populate entity data on creation (default: true)
|
|
2148
|
-
*
|
|
2149
|
-
* **Monitoring Progress:**
|
|
2150
|
-
* Use the returned `operation_id` to connect to the SSE stream:
|
|
2151
|
-
* ```javascript
|
|
2152
|
-
* const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
2153
|
-
* eventSource.onmessage = (event) => {
|
|
2154
|
-
* const data = JSON.parse(event.data);
|
|
2155
|
-
* console.log('Progress:', data.progress_percent + '%');
|
|
2156
|
-
* };
|
|
2157
|
-
* ```
|
|
2158
|
-
*
|
|
2159
|
-
* **SSE Connection Limits:**
|
|
2160
|
-
* - Maximum 5 concurrent SSE connections per user
|
|
2161
|
-
* - Rate limited to 10 new connections per minute
|
|
2162
|
-
* - Automatic circuit breaker for Redis failures
|
|
2163
|
-
* - Graceful degradation if event system unavailable
|
|
2164
|
-
*
|
|
2165
|
-
* **Events Emitted:**
|
|
2166
|
-
* - `operation_started`: Graph creation begins
|
|
2167
|
-
* - `operation_progress`: Schema loading, database setup, etc.
|
|
2168
|
-
* - `operation_completed`: Graph ready with connection details
|
|
2169
|
-
* - `operation_error`: Creation failed with error details
|
|
2170
|
-
*
|
|
2171
|
-
* **Error Handling:**
|
|
2172
|
-
* - `429 Too Many Requests`: SSE connection limit exceeded
|
|
2173
|
-
* - `503 Service Unavailable`: SSE system temporarily disabled
|
|
2174
|
-
* - Clients should implement exponential backoff on errors
|
|
2175
|
-
*
|
|
2176
|
-
* **Response includes:**
|
|
2177
|
-
* - `operation_id`: Unique identifier for monitoring
|
|
2178
|
-
* - `_links.stream`: SSE endpoint for real-time updates
|
|
2179
|
-
* - `_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.
|
|
2180
1109
|
*/
|
|
2181
1110
|
export const createGraph = <ThrowOnError extends boolean = false>(options: Options<CreateGraphData, ThrowOnError>) => (options.client ?? client).post<CreateGraphResponses, CreateGraphErrors, ThrowOnError>({
|
|
2182
1111
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2190,35 +1119,6 @@ export const createGraph = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
2190
1119
|
|
|
2191
1120
|
/**
|
|
2192
1121
|
* Get Available Schema Extensions
|
|
2193
|
-
*
|
|
2194
|
-
* List all available schema extensions for graph creation.
|
|
2195
|
-
*
|
|
2196
|
-
* Schema extensions provide pre-built industry-specific data models that extend
|
|
2197
|
-
* the base graph schema with specialized nodes, relationships, and properties.
|
|
2198
|
-
*
|
|
2199
|
-
* **Available Extensions:**
|
|
2200
|
-
* - **RoboLedger**: Complete accounting system with XBRL reporting, general ledger, and financial statements
|
|
2201
|
-
* - **RoboInvestor**: Investment portfolio management with securities tracking, trade execution, and risk analysis
|
|
2202
|
-
* - **RoboSCM**: Supply chain management and logistics
|
|
2203
|
-
* - **RoboFO**: Front office operations and CRM
|
|
2204
|
-
* - **RoboHRM**: Human resources management
|
|
2205
|
-
* - **RoboEPM**: Enterprise performance management
|
|
2206
|
-
* - **RoboReport**: Business intelligence and reporting
|
|
2207
|
-
*
|
|
2208
|
-
* **Extension Information:**
|
|
2209
|
-
* Each extension includes:
|
|
2210
|
-
* - Display name and description
|
|
2211
|
-
* - Node and relationship counts
|
|
2212
|
-
* - Context-aware capabilities (e.g., SEC repositories get different features than entity graphs)
|
|
2213
|
-
*
|
|
2214
|
-
* **Use Cases:**
|
|
2215
|
-
* - Browse available extensions before creating a graph
|
|
2216
|
-
* - Understand extension capabilities and data models
|
|
2217
|
-
* - Plan graph schema based on business requirements
|
|
2218
|
-
* - Combine multiple extensions for comprehensive data modeling
|
|
2219
|
-
*
|
|
2220
|
-
* **Note:**
|
|
2221
|
-
* Extension listing is included - no credit consumption required.
|
|
2222
1122
|
*/
|
|
2223
1123
|
export const getAvailableExtensions = <ThrowOnError extends boolean = false>(options?: Options<GetAvailableExtensionsData, ThrowOnError>) => (options?.client ?? client).get<GetAvailableExtensionsResponses, GetAvailableExtensionsErrors, ThrowOnError>({
|
|
2224
1124
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2228,32 +1128,6 @@ export const getAvailableExtensions = <ThrowOnError extends boolean = false>(opt
|
|
|
2228
1128
|
|
|
2229
1129
|
/**
|
|
2230
1130
|
* Get Available Graph Tiers
|
|
2231
|
-
*
|
|
2232
|
-
* List all available graph database tier configurations.
|
|
2233
|
-
*
|
|
2234
|
-
* This endpoint provides comprehensive technical specifications for each available
|
|
2235
|
-
* graph database tier, including instance types, resource limits, and features.
|
|
2236
|
-
*
|
|
2237
|
-
* **Tier Information:**
|
|
2238
|
-
* Each tier includes:
|
|
2239
|
-
* - Technical specifications (instance type, memory, storage)
|
|
2240
|
-
* - Resource limits (subgraphs, credits, rate limits)
|
|
2241
|
-
* - Feature list with capabilities
|
|
2242
|
-
* - Availability status
|
|
2243
|
-
*
|
|
2244
|
-
* **Available Tiers:**
|
|
2245
|
-
* - **ladybug-standard**: Dedicated entry-level tier
|
|
2246
|
-
* - **ladybug-large**: Dedicated professional tier with subgraph support
|
|
2247
|
-
* - **ladybug-xlarge**: Enterprise tier with maximum resources
|
|
2248
|
-
*
|
|
2249
|
-
* **Use Cases:**
|
|
2250
|
-
* - Display tier options in graph creation UI
|
|
2251
|
-
* - Show technical specifications for tier selection
|
|
2252
|
-
* - Validate tier availability before graph creation
|
|
2253
|
-
* - Display feature comparisons
|
|
2254
|
-
*
|
|
2255
|
-
* **Note:**
|
|
2256
|
-
* Tier listing is included - no credit consumption required.
|
|
2257
1131
|
*/
|
|
2258
1132
|
export const getAvailableGraphTiers = <ThrowOnError extends boolean = false>(options?: Options<GetAvailableGraphTiersData, ThrowOnError>) => (options?.client ?? client).get<GetAvailableGraphTiersResponses, GetAvailableGraphTiersErrors, ThrowOnError>({
|
|
2259
1133
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2264,26 +1138,7 @@ export const getAvailableGraphTiers = <ThrowOnError extends boolean = false>(opt
|
|
|
2264
1138
|
/**
|
|
2265
1139
|
* Get Graph Tier Capacity
|
|
2266
1140
|
*
|
|
2267
|
-
*
|
|
2268
|
-
*
|
|
2269
|
-
* Returns a status per tier indicating whether instances are immediately available,
|
|
2270
|
-
* can be provisioned on demand, or are at capacity.
|
|
2271
|
-
*
|
|
2272
|
-
* **Status Values:**
|
|
2273
|
-
* - `ready` — An instance slot is available; graph creation will succeed immediately
|
|
2274
|
-
* - `scalable` — No slots right now, but a new instance can be provisioned (3-5 min)
|
|
2275
|
-
* - `at_capacity` — Tier is full and cannot auto-scale; contact support
|
|
2276
|
-
*
|
|
2277
|
-
* **Use Cases:**
|
|
2278
|
-
* - Pre-flight check before entering the graph creation wizard
|
|
2279
|
-
* - Show availability badges on tier selection cards
|
|
2280
|
-
* - Gate tier selection and show contact form for at-capacity tiers
|
|
2281
|
-
*
|
|
2282
|
-
* **Caching:**
|
|
2283
|
-
* Results are cached for 60 seconds to avoid excessive infrastructure queries.
|
|
2284
|
-
*
|
|
2285
|
-
* **Note:**
|
|
2286
|
-
* 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.
|
|
2287
1142
|
*/
|
|
2288
1143
|
export const getGraphCapacity = <ThrowOnError extends boolean = false>(options?: Options<GetGraphCapacityData, ThrowOnError>) => (options?.client ?? client).get<GetGraphCapacityResponses, GetGraphCapacityErrors, ThrowOnError>({
|
|
2289
1144
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2293,36 +1148,6 @@ export const getGraphCapacity = <ThrowOnError extends boolean = false>(options?:
|
|
|
2293
1148
|
|
|
2294
1149
|
/**
|
|
2295
1150
|
* Select Graph
|
|
2296
|
-
*
|
|
2297
|
-
* Select a specific graph as the active workspace for the user.
|
|
2298
|
-
*
|
|
2299
|
-
* The selected graph becomes the default context for operations in client applications
|
|
2300
|
-
* and can be used to maintain user workspace preferences across sessions.
|
|
2301
|
-
*
|
|
2302
|
-
* **Functionality:**
|
|
2303
|
-
* - Sets the specified graph as the user's currently selected graph
|
|
2304
|
-
* - Deselects any previously selected graph (only one can be selected at a time)
|
|
2305
|
-
* - Persists selection across sessions until changed
|
|
2306
|
-
* - Returns confirmation with the selected graph ID
|
|
2307
|
-
*
|
|
2308
|
-
* **Requirements:**
|
|
2309
|
-
* - User must have access to the graph (as admin or member)
|
|
2310
|
-
* - Graph must exist and not be deleted
|
|
2311
|
-
* - User can only select graphs they have permission to access
|
|
2312
|
-
*
|
|
2313
|
-
* **Use Cases:**
|
|
2314
|
-
* - Switch between multiple graphs in a multi-graph environment
|
|
2315
|
-
* - Set default workspace after creating a new graph
|
|
2316
|
-
* - Restore user's preferred workspace on login
|
|
2317
|
-
* - Support graph context switching in client applications
|
|
2318
|
-
*
|
|
2319
|
-
* **Client Integration:**
|
|
2320
|
-
* Many client operations can default to the selected graph, simplifying API calls
|
|
2321
|
-
* by eliminating the need to specify graph_id repeatedly. Check the selected
|
|
2322
|
-
* graph with `GET /v1/graphs` which returns `selectedGraphId`.
|
|
2323
|
-
*
|
|
2324
|
-
* **Note:**
|
|
2325
|
-
* Graph selection is included - no credit consumption required.
|
|
2326
1151
|
*/
|
|
2327
1152
|
export const selectGraph = <ThrowOnError extends boolean = false>(options: Options<SelectGraphData, ThrowOnError>) => (options.client ?? client).post<SelectGraphResponses, SelectGraphErrors, ThrowOnError>({
|
|
2328
1153
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2333,81 +1158,14 @@ export const selectGraph = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
2333
1158
|
/**
|
|
2334
1159
|
* Get Service Offerings
|
|
2335
1160
|
*
|
|
2336
|
-
*
|
|
2337
|
-
*
|
|
2338
|
-
* This endpoint provides complete information about both graph database subscriptions
|
|
2339
|
-
* and shared repository subscriptions. This is the primary endpoint for frontend
|
|
2340
|
-
* applications to display subscription options.
|
|
2341
|
-
*
|
|
2342
|
-
* **Pricing Model:**
|
|
2343
|
-
* - Graph subscriptions are **per-graph** with infrastructure-based pricing
|
|
2344
|
-
* - Each graph you create has its own monthly subscription
|
|
2345
|
-
* - Organizations can have multiple graphs with different infrastructure tiers
|
|
2346
|
-
* - Credits are allocated per-graph, not shared across organization
|
|
2347
|
-
*
|
|
2348
|
-
* Includes:
|
|
2349
|
-
* - Graph infrastructure tiers (ladybug-standard, ladybug-large, ladybug-xlarge) - per-graph pricing
|
|
2350
|
-
* - Shared repository subscriptions - org-level
|
|
2351
|
-
* - Operation costs and credit information
|
|
2352
|
-
* - Features and capabilities for each tier
|
|
2353
|
-
* - Enabled/disabled status for repositories
|
|
2354
|
-
*
|
|
2355
|
-
* All data comes from the config-based systems to ensure accuracy with backend behavior.
|
|
2356
|
-
*
|
|
2357
|
-
* No authentication required - this is public service information.
|
|
1161
|
+
* Returns all subscription tiers, shared repository plans, and AI credit costs. No authentication required.
|
|
2358
1162
|
*/
|
|
2359
1163
|
export const getServiceOfferings = <ThrowOnError extends boolean = false>(options?: Options<GetServiceOfferingsData, ThrowOnError>) => (options?.client ?? client).get<GetServiceOfferingsResponses, GetServiceOfferingsErrors, ThrowOnError>({ url: '/v1/offering', ...options });
|
|
2360
1164
|
|
|
2361
1165
|
/**
|
|
2362
1166
|
* Stream Operation Events
|
|
2363
1167
|
*
|
|
2364
|
-
*
|
|
2365
|
-
*
|
|
2366
|
-
* This endpoint provides real-time monitoring for all non-immediate operations including:
|
|
2367
|
-
* - Graph creation and management
|
|
2368
|
-
* - Agent analysis processing
|
|
2369
|
-
* - Database backups and restores
|
|
2370
|
-
* - Data synchronization tasks
|
|
2371
|
-
*
|
|
2372
|
-
* **Event Types:**
|
|
2373
|
-
* - `operation_started`: Operation began execution
|
|
2374
|
-
* - `operation_progress`: Progress update with details
|
|
2375
|
-
* - `operation_completed`: Operation finished successfully
|
|
2376
|
-
* - `operation_error`: Operation failed with error details
|
|
2377
|
-
* - `operation_cancelled`: Operation was cancelled
|
|
2378
|
-
*
|
|
2379
|
-
* **Features:**
|
|
2380
|
-
* - **Event Replay**: Use `from_sequence` parameter to replay missed events
|
|
2381
|
-
* - **Automatic Reconnection**: Client can reconnect and resume from last seen event
|
|
2382
|
-
* - **Real-time Updates**: Live progress updates during execution
|
|
2383
|
-
* - **Timeout Handling**: 30-second keepalive messages prevent connection timeouts
|
|
2384
|
-
* - **Graceful Degradation**: Automatic fallback if Redis is unavailable
|
|
2385
|
-
*
|
|
2386
|
-
* **Connection Limits:**
|
|
2387
|
-
* - Maximum 5 concurrent SSE connections per user
|
|
2388
|
-
* - Rate limited to 10 new connections per minute
|
|
2389
|
-
* - Automatic cleanup of stale connections
|
|
2390
|
-
* - Circuit breaker protection for Redis failures
|
|
2391
|
-
*
|
|
2392
|
-
* **Client Usage:**
|
|
2393
|
-
* ```javascript
|
|
2394
|
-
* const eventSource = new EventSource('/v1/operations/abc123/stream');
|
|
2395
|
-
* eventSource.onmessage = (event) => {
|
|
2396
|
-
* const data = JSON.parse(event.data);
|
|
2397
|
-
* console.log('Progress:', data);
|
|
2398
|
-
* };
|
|
2399
|
-
* eventSource.onerror = (error) => {
|
|
2400
|
-
* // Handle connection errors or rate limits
|
|
2401
|
-
* console.error('SSE Error:', error);
|
|
2402
|
-
* };
|
|
2403
|
-
* ```
|
|
2404
|
-
*
|
|
2405
|
-
* **Error Handling:**
|
|
2406
|
-
* - `429 Too Many Requests`: Connection limit or rate limit exceeded
|
|
2407
|
-
* - `503 Service Unavailable`: SSE system temporarily disabled
|
|
2408
|
-
* - Clients should implement exponential backoff on errors
|
|
2409
|
-
*
|
|
2410
|
-
* **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.
|
|
2411
1169
|
*/
|
|
2412
1170
|
export const streamOperationEvents = <ThrowOnError extends boolean = false>(options: Options<StreamOperationEventsData, ThrowOnError>) => (options.client ?? client).get<StreamOperationEventsResponses, StreamOperationEventsErrors, ThrowOnError>({
|
|
2413
1171
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2418,19 +1176,7 @@ export const streamOperationEvents = <ThrowOnError extends boolean = false>(opti
|
|
|
2418
1176
|
/**
|
|
2419
1177
|
* Get Operation Status
|
|
2420
1178
|
*
|
|
2421
|
-
*
|
|
2422
|
-
*
|
|
2423
|
-
* Returns detailed information including:
|
|
2424
|
-
* - Current status (pending, running, completed, failed, cancelled)
|
|
2425
|
-
* - Creation and update timestamps
|
|
2426
|
-
* - Operation type and associated graph
|
|
2427
|
-
* - Result data (for completed operations)
|
|
2428
|
-
* - Error details (for failed operations)
|
|
2429
|
-
*
|
|
2430
|
-
* This endpoint provides a point-in-time status check, while the `/stream` endpoint
|
|
2431
|
-
* provides real-time updates. Use this for polling or initial status checks.
|
|
2432
|
-
*
|
|
2433
|
-
* **No credits are consumed for status checks.**
|
|
1179
|
+
* Point-in-time status check. Use `/stream` for real-time updates. Consumes no credits.
|
|
2434
1180
|
*/
|
|
2435
1181
|
export const getOperationStatus = <ThrowOnError extends boolean = false>(options: Options<GetOperationStatusData, ThrowOnError>) => (options.client ?? client).get<GetOperationStatusResponses, GetOperationStatusErrors, ThrowOnError>({
|
|
2436
1182
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2441,15 +1187,7 @@ export const getOperationStatus = <ThrowOnError extends boolean = false>(options
|
|
|
2441
1187
|
/**
|
|
2442
1188
|
* Cancel Operation
|
|
2443
1189
|
*
|
|
2444
|
-
*
|
|
2445
|
-
*
|
|
2446
|
-
* Cancels the specified operation if it's still in progress. Once cancelled,
|
|
2447
|
-
* the operation cannot be resumed and will emit a cancellation event to any
|
|
2448
|
-
* active SSE connections.
|
|
2449
|
-
*
|
|
2450
|
-
* **Note**: Completed or already failed operations cannot be cancelled.
|
|
2451
|
-
*
|
|
2452
|
-
* **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.
|
|
2453
1191
|
*/
|
|
2454
1192
|
export const cancelOperation = <ThrowOnError extends boolean = false>(options: Options<CancelOperationData, ThrowOnError>) => (options.client ?? client).delete<CancelOperationResponses, CancelOperationErrors, ThrowOnError>({
|
|
2455
1193
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2460,13 +1198,7 @@ export const cancelOperation = <ThrowOnError extends boolean = false>(options: O
|
|
|
2460
1198
|
/**
|
|
2461
1199
|
* Get Organization Customer Info
|
|
2462
1200
|
*
|
|
2463
|
-
*
|
|
2464
|
-
*
|
|
2465
|
-
* Returns customer details, payment methods, and whether invoice billing is enabled.
|
|
2466
|
-
*
|
|
2467
|
-
* **Requirements:**
|
|
2468
|
-
* - User must be a member of the organization
|
|
2469
|
-
* - Sensitive payment details are only visible to owners
|
|
1201
|
+
* Payment method details are only visible to org owners.
|
|
2470
1202
|
*/
|
|
2471
1203
|
export const getOrgBillingCustomer = <ThrowOnError extends boolean = false>(options: Options<GetOrgBillingCustomerData, ThrowOnError>) => (options.client ?? client).get<GetOrgBillingCustomerResponses, GetOrgBillingCustomerErrors, ThrowOnError>({
|
|
2472
1204
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2477,19 +1209,7 @@ export const getOrgBillingCustomer = <ThrowOnError extends boolean = false>(opti
|
|
|
2477
1209
|
/**
|
|
2478
1210
|
* Create Customer Portal Session
|
|
2479
1211
|
*
|
|
2480
|
-
*
|
|
2481
|
-
*
|
|
2482
|
-
* The portal allows users to:
|
|
2483
|
-
* - Add new payment methods
|
|
2484
|
-
* - Remove existing payment methods
|
|
2485
|
-
* - Update default payment method
|
|
2486
|
-
* - View billing history
|
|
2487
|
-
*
|
|
2488
|
-
* The user will be redirected to Stripe's hosted portal page and returned to the billing page when done.
|
|
2489
|
-
*
|
|
2490
|
-
* **Requirements:**
|
|
2491
|
-
* - User must be an OWNER of the organization
|
|
2492
|
-
* - 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.
|
|
2493
1213
|
*/
|
|
2494
1214
|
export const createPortalSession = <ThrowOnError extends boolean = false>(options: Options<CreatePortalSessionData, ThrowOnError>) => (options.client ?? client).post<CreatePortalSessionResponses, CreatePortalSessionErrors, ThrowOnError>({
|
|
2495
1215
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2499,13 +1219,6 @@ export const createPortalSession = <ThrowOnError extends boolean = false>(option
|
|
|
2499
1219
|
|
|
2500
1220
|
/**
|
|
2501
1221
|
* List Organization Subscriptions
|
|
2502
|
-
*
|
|
2503
|
-
* List all active and past subscriptions for an organization.
|
|
2504
|
-
*
|
|
2505
|
-
* Includes both graph and repository subscriptions with their status, pricing, and billing information.
|
|
2506
|
-
*
|
|
2507
|
-
* **Requirements:**
|
|
2508
|
-
* - User must be a member of the organization
|
|
2509
1222
|
*/
|
|
2510
1223
|
export const listOrgSubscriptions = <ThrowOnError extends boolean = false>(options: Options<ListOrgSubscriptionsData, ThrowOnError>) => (options.client ?? client).get<ListOrgSubscriptionsResponses, ListOrgSubscriptionsErrors, ThrowOnError>({
|
|
2511
1224
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2515,11 +1228,6 @@ export const listOrgSubscriptions = <ThrowOnError extends boolean = false>(optio
|
|
|
2515
1228
|
|
|
2516
1229
|
/**
|
|
2517
1230
|
* Get Organization Subscription Details
|
|
2518
|
-
*
|
|
2519
|
-
* Get detailed information about a specific subscription.
|
|
2520
|
-
*
|
|
2521
|
-
* **Requirements:**
|
|
2522
|
-
* - User must be a member of the organization
|
|
2523
1231
|
*/
|
|
2524
1232
|
export const getOrgSubscription = <ThrowOnError extends boolean = false>(options: Options<GetOrgSubscriptionData, ThrowOnError>) => (options.client ?? client).get<GetOrgSubscriptionResponses, GetOrgSubscriptionErrors, ThrowOnError>({
|
|
2525
1233
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2530,12 +1238,7 @@ export const getOrgSubscription = <ThrowOnError extends boolean = false>(options
|
|
|
2530
1238
|
/**
|
|
2531
1239
|
* Cancel Organization Subscription
|
|
2532
1240
|
*
|
|
2533
|
-
*
|
|
2534
|
-
*
|
|
2535
|
-
* The subscription will remain active until the end of the current billing period.
|
|
2536
|
-
*
|
|
2537
|
-
* **Requirements:**
|
|
2538
|
-
* - 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.
|
|
2539
1242
|
*/
|
|
2540
1243
|
export const cancelOrgSubscription = <ThrowOnError extends boolean = false>(options: Options<CancelOrgSubscriptionData, ThrowOnError>) => (options.client ?? client).post<CancelOrgSubscriptionResponses, CancelOrgSubscriptionErrors, ThrowOnError>({
|
|
2541
1244
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2546,13 +1249,7 @@ export const cancelOrgSubscription = <ThrowOnError extends boolean = false>(opti
|
|
|
2546
1249
|
/**
|
|
2547
1250
|
* List Organization Invoices
|
|
2548
1251
|
*
|
|
2549
|
-
*
|
|
2550
|
-
*
|
|
2551
|
-
* Returns past invoices with payment status, amounts, and line items.
|
|
2552
|
-
*
|
|
2553
|
-
* **Requirements:**
|
|
2554
|
-
* - User must be a member of the organization
|
|
2555
|
-
* - Full invoice details are only visible to owners and admins
|
|
1252
|
+
* Requires admin or owner role.
|
|
2556
1253
|
*/
|
|
2557
1254
|
export const listOrgInvoices = <ThrowOnError extends boolean = false>(options: Options<ListOrgInvoicesData, ThrowOnError>) => (options.client ?? client).get<ListOrgInvoicesResponses, ListOrgInvoicesErrors, ThrowOnError>({
|
|
2558
1255
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2563,13 +1260,7 @@ export const listOrgInvoices = <ThrowOnError extends boolean = false>(options: O
|
|
|
2563
1260
|
/**
|
|
2564
1261
|
* Get Organization Upcoming Invoice
|
|
2565
1262
|
*
|
|
2566
|
-
*
|
|
2567
|
-
*
|
|
2568
|
-
* Returns estimated charges for the next billing period.
|
|
2569
|
-
*
|
|
2570
|
-
* **Requirements:**
|
|
2571
|
-
* - User must be a member of the organization
|
|
2572
|
-
* - Full invoice details are only visible to owners and admins
|
|
1263
|
+
* Requires admin or owner role. Returns null if no billing activity yet.
|
|
2573
1264
|
*/
|
|
2574
1265
|
export const getOrgUpcomingInvoice = <ThrowOnError extends boolean = false>(options: Options<GetOrgUpcomingInvoiceData, ThrowOnError>) => (options.client ?? client).get<GetOrgUpcomingInvoiceResponses, GetOrgUpcomingInvoiceErrors, ThrowOnError>({
|
|
2575
1266
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2580,23 +1271,7 @@ export const getOrgUpcomingInvoice = <ThrowOnError extends boolean = false>(opti
|
|
|
2580
1271
|
/**
|
|
2581
1272
|
* Create Payment Checkout Session
|
|
2582
1273
|
*
|
|
2583
|
-
*
|
|
2584
|
-
*
|
|
2585
|
-
* This endpoint is used when an organization owner needs to add a payment method before
|
|
2586
|
-
* provisioning resources. It creates a pending subscription and redirects
|
|
2587
|
-
* to Stripe Checkout to collect payment details.
|
|
2588
|
-
*
|
|
2589
|
-
* **Flow:**
|
|
2590
|
-
* 1. Owner tries to create a graph but org has no payment method
|
|
2591
|
-
* 2. Frontend calls this endpoint with graph configuration
|
|
2592
|
-
* 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
|
|
2593
|
-
* 4. Returns Stripe Checkout URL
|
|
2594
|
-
* 5. User completes payment on Stripe
|
|
2595
|
-
* 6. Webhook activates subscription and provisions resource
|
|
2596
|
-
*
|
|
2597
|
-
* **Requirements:**
|
|
2598
|
-
* - User must be an OWNER of their organization
|
|
2599
|
-
* - 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.
|
|
2600
1275
|
*/
|
|
2601
1276
|
export const createCheckoutSession = <ThrowOnError extends boolean = false>(options: Options<CreateCheckoutSessionData, ThrowOnError>) => (options.client ?? client).post<CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, ThrowOnError>({
|
|
2602
1277
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2611,21 +1286,7 @@ export const createCheckoutSession = <ThrowOnError extends boolean = false>(opti
|
|
|
2611
1286
|
/**
|
|
2612
1287
|
* Get Checkout Session Status
|
|
2613
1288
|
*
|
|
2614
|
-
* Poll
|
|
2615
|
-
*
|
|
2616
|
-
* Frontend should poll this endpoint after user returns from Stripe Checkout
|
|
2617
|
-
* to determine when the resource is ready.
|
|
2618
|
-
*
|
|
2619
|
-
* **Status Values:**
|
|
2620
|
-
* - `pending_payment`: Waiting for payment to complete
|
|
2621
|
-
* - `provisioning`: Payment confirmed, resource being created
|
|
2622
|
-
* - `active`: Resource is ready (resource_id will be set)
|
|
2623
|
-
* - `failed`: Something went wrong (error field will be set)
|
|
2624
|
-
* - `canceled`: Payment was canceled
|
|
2625
|
-
*
|
|
2626
|
-
* **When status is 'active':**
|
|
2627
|
-
* - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress
|
|
2628
|
-
* - 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.
|
|
2629
1290
|
*/
|
|
2630
1291
|
export const getCheckoutStatus = <ThrowOnError extends boolean = false>(options: Options<GetCheckoutStatusData, ThrowOnError>) => (options.client ?? client).get<GetCheckoutStatusResponses, GetCheckoutStatusErrors, ThrowOnError>({
|
|
2631
1292
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2666,7 +1327,7 @@ export const handleHttpPostExtensionsGraphIdGraphqlPost = <ThrowOnError extends
|
|
|
2666
1327
|
/**
|
|
2667
1328
|
* Update Entity
|
|
2668
1329
|
*
|
|
2669
|
-
*
|
|
1330
|
+
* Only provided (non-null) fields are updated.
|
|
2670
1331
|
*
|
|
2671
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.
|
|
2672
1333
|
*/
|
|
@@ -2683,7 +1344,7 @@ export const opUpdateEntity = <ThrowOnError extends boolean = false>(options: Op
|
|
|
2683
1344
|
/**
|
|
2684
1345
|
* Initialize Ledger
|
|
2685
1346
|
*
|
|
2686
|
-
* One-time
|
|
1347
|
+
* One-time setup: creates the fiscal calendar and seeds periods. Returns 409 if already initialized.
|
|
2687
1348
|
*
|
|
2688
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.
|
|
2689
1350
|
*/
|
|
@@ -2700,7 +1361,7 @@ export const opInitializeLedger = <ThrowOnError extends boolean = false>(options
|
|
|
2700
1361
|
/**
|
|
2701
1362
|
* Set Close Target
|
|
2702
1363
|
*
|
|
2703
|
-
*
|
|
1364
|
+
* Period format: YYYY-MM. The close target is the user-controlled goal date, distinct from `closed_through` (what's actually closed).
|
|
2704
1365
|
*
|
|
2705
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.
|
|
2706
1367
|
*/
|
|
@@ -2717,7 +1378,7 @@ export const opSetCloseTarget = <ThrowOnError extends boolean = false>(options:
|
|
|
2717
1378
|
/**
|
|
2718
1379
|
* Close Fiscal Period
|
|
2719
1380
|
*
|
|
2720
|
-
*
|
|
1381
|
+
*
|
|
2721
1382
|
*
|
|
2722
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.
|
|
2723
1384
|
*/
|
|
@@ -2734,7 +1395,7 @@ export const opClosePeriod = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
2734
1395
|
/**
|
|
2735
1396
|
* Reopen Fiscal Period
|
|
2736
1397
|
*
|
|
2737
|
-
*
|
|
1398
|
+
* Decrements `closed_through` by one — only the most recently closed period can be reopened.
|
|
2738
1399
|
*
|
|
2739
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.
|
|
2740
1401
|
*/
|
|
@@ -2751,7 +1412,7 @@ export const opReopenPeriod = <ThrowOnError extends boolean = false>(options: Op
|
|
|
2751
1412
|
/**
|
|
2752
1413
|
* Create Schedule
|
|
2753
1414
|
*
|
|
2754
|
-
*
|
|
1415
|
+
* Creates a schedule and pre-generates monthly amortization facts spanning the period range.
|
|
2755
1416
|
*
|
|
2756
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.
|
|
2757
1418
|
*/
|
|
@@ -2768,7 +1429,7 @@ export const opCreateSchedule = <ThrowOnError extends boolean = false>(options:
|
|
|
2768
1429
|
/**
|
|
2769
1430
|
* Truncate Schedule (End Early)
|
|
2770
1431
|
*
|
|
2771
|
-
*
|
|
1432
|
+
* Ends a schedule early by deleting forward facts and any stale draft closing entries past the cutoff.
|
|
2772
1433
|
*
|
|
2773
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.
|
|
2774
1435
|
*/
|
|
@@ -2785,7 +1446,7 @@ export const opTruncateSchedule = <ThrowOnError extends boolean = false>(options
|
|
|
2785
1446
|
/**
|
|
2786
1447
|
* Create Closing Entry
|
|
2787
1448
|
*
|
|
2788
|
-
*
|
|
1449
|
+
* Creates a draft closing entry pre-populated from a schedule's facts for the given period.
|
|
2789
1450
|
*
|
|
2790
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.
|
|
2791
1452
|
*/
|
|
@@ -2802,7 +1463,7 @@ export const opCreateClosingEntry = <ThrowOnError extends boolean = false>(optio
|
|
|
2802
1463
|
/**
|
|
2803
1464
|
* Create Manual Closing Entry
|
|
2804
1465
|
*
|
|
2805
|
-
*
|
|
1466
|
+
* Creates a draft closing entry with manually specified amounts — not tied to a schedule.
|
|
2806
1467
|
*
|
|
2807
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.
|
|
2808
1469
|
*/
|
|
@@ -2819,7 +1480,7 @@ export const opCreateManualClosingEntry = <ThrowOnError extends boolean = false>
|
|
|
2819
1480
|
/**
|
|
2820
1481
|
* Create Taxonomy
|
|
2821
1482
|
*
|
|
2822
|
-
*
|
|
1483
|
+
*
|
|
2823
1484
|
*
|
|
2824
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.
|
|
2825
1486
|
*/
|
|
@@ -2836,7 +1497,7 @@ export const opCreateTaxonomy = <ThrowOnError extends boolean = false>(options:
|
|
|
2836
1497
|
/**
|
|
2837
1498
|
* Create Structure
|
|
2838
1499
|
*
|
|
2839
|
-
*
|
|
1500
|
+
* Structures organize elements within a taxonomy. Types: `statement`, `mapping`, `schedule`, `presentation`, `calculation`.
|
|
2840
1501
|
*
|
|
2841
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.
|
|
2842
1503
|
*/
|
|
@@ -2853,7 +1514,7 @@ export const opCreateStructure = <ThrowOnError extends boolean = false>(options:
|
|
|
2853
1514
|
/**
|
|
2854
1515
|
* Create Mapping Association
|
|
2855
1516
|
*
|
|
2856
|
-
*
|
|
1517
|
+
* Links a chart-of-accounts element to a reporting concept (CoA element → US GAAP concept).
|
|
2857
1518
|
*
|
|
2858
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.
|
|
2859
1520
|
*/
|
|
@@ -2870,7 +1531,7 @@ export const opCreateMappingAssociation = <ThrowOnError extends boolean = false>
|
|
|
2870
1531
|
/**
|
|
2871
1532
|
* Delete Mapping Association
|
|
2872
1533
|
*
|
|
2873
|
-
*
|
|
1534
|
+
*
|
|
2874
1535
|
*
|
|
2875
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.
|
|
2876
1537
|
*/
|
|
@@ -3193,18 +1854,7 @@ export const opDeleteSchedule = <ThrowOnError extends boolean = false>(options:
|
|
|
3193
1854
|
/**
|
|
3194
1855
|
* Auto-Map Elements via AI (async)
|
|
3195
1856
|
*
|
|
3196
|
-
*
|
|
3197
|
-
*
|
|
3198
|
-
* This is the only async/Dagster-dispatched ledger operation. Instead
|
|
3199
|
-
* of running synchronously, it enqueues a `MappingAgent` task and
|
|
3200
|
-
* returns a `pending` envelope with the worker-issued operation_id —
|
|
3201
|
-
* callers subscribe via `/v1/operations/{operation_id}/stream` for SSE
|
|
3202
|
-
* progress events.
|
|
3203
|
-
*
|
|
3204
|
-
* Confidence thresholds (in the agent):
|
|
3205
|
-
* - ≥0.90: auto-approved mapping
|
|
3206
|
-
* - 0.70-0.89: flagged for review
|
|
3207
|
-
* - <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.
|
|
3208
1858
|
*
|
|
3209
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.
|
|
3210
1860
|
*/
|
|
@@ -3221,7 +1871,7 @@ export const opAutoMapElements = <ThrowOnError extends boolean = false>(options:
|
|
|
3221
1871
|
/**
|
|
3222
1872
|
* Create Report
|
|
3223
1873
|
*
|
|
3224
|
-
*
|
|
1874
|
+
* Generates report facts from the ledger and marks the report as published.
|
|
3225
1875
|
*
|
|
3226
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.
|
|
3227
1877
|
*/
|
|
@@ -3238,7 +1888,7 @@ export const opCreateReport = <ThrowOnError extends boolean = false>(options: Op
|
|
|
3238
1888
|
/**
|
|
3239
1889
|
* Regenerate Report
|
|
3240
1890
|
*
|
|
3241
|
-
*
|
|
1891
|
+
*
|
|
3242
1892
|
*
|
|
3243
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.
|
|
3244
1894
|
*/
|
|
@@ -3255,7 +1905,7 @@ export const opRegenerateReport = <ThrowOnError extends boolean = false>(options
|
|
|
3255
1905
|
/**
|
|
3256
1906
|
* Delete Report
|
|
3257
1907
|
*
|
|
3258
|
-
*
|
|
1908
|
+
* Deletes the report definition and all generated facts.
|
|
3259
1909
|
*
|
|
3260
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.
|
|
3261
1911
|
*/
|
|
@@ -3272,7 +1922,7 @@ export const opDeleteReport = <ThrowOnError extends boolean = false>(options: Op
|
|
|
3272
1922
|
/**
|
|
3273
1923
|
* Share Report
|
|
3274
1924
|
*
|
|
3275
|
-
*
|
|
1925
|
+
* Only published reports can be shared. Sends the report to all members of the target publish list.
|
|
3276
1926
|
*
|
|
3277
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.
|
|
3278
1928
|
*/
|
|
@@ -3289,7 +1939,7 @@ export const opShareReport = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
3289
1939
|
/**
|
|
3290
1940
|
* Create Publish List
|
|
3291
1941
|
*
|
|
3292
|
-
*
|
|
1942
|
+
*
|
|
3293
1943
|
*
|
|
3294
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.
|
|
3295
1945
|
*/
|
|
@@ -3306,7 +1956,7 @@ export const opCreatePublishList = <ThrowOnError extends boolean = false>(option
|
|
|
3306
1956
|
/**
|
|
3307
1957
|
* Update Publish List
|
|
3308
1958
|
*
|
|
3309
|
-
*
|
|
1959
|
+
* Updates the publish list's `name` and/or `description`. Membership is managed via add/remove-member operations.
|
|
3310
1960
|
*
|
|
3311
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.
|
|
3312
1962
|
*/
|
|
@@ -3323,7 +1973,7 @@ export const opUpdatePublishList = <ThrowOnError extends boolean = false>(option
|
|
|
3323
1973
|
/**
|
|
3324
1974
|
* Delete Publish List
|
|
3325
1975
|
*
|
|
3326
|
-
*
|
|
1976
|
+
*
|
|
3327
1977
|
*
|
|
3328
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.
|
|
3329
1979
|
*/
|
|
@@ -3340,7 +1990,7 @@ export const opDeletePublishList = <ThrowOnError extends boolean = false>(option
|
|
|
3340
1990
|
/**
|
|
3341
1991
|
* Add Members to Publish List
|
|
3342
1992
|
*
|
|
3343
|
-
*
|
|
1993
|
+
*
|
|
3344
1994
|
*
|
|
3345
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.
|
|
3346
1996
|
*/
|
|
@@ -3357,7 +2007,7 @@ export const opAddPublishListMembers = <ThrowOnError extends boolean = false>(op
|
|
|
3357
2007
|
/**
|
|
3358
2008
|
* Remove Member from Publish List
|
|
3359
2009
|
*
|
|
3360
|
-
*
|
|
2010
|
+
*
|
|
3361
2011
|
*
|
|
3362
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.
|
|
3363
2013
|
*/
|
|
@@ -3374,17 +2024,7 @@ export const opRemovePublishListMember = <ThrowOnError extends boolean = false>(
|
|
|
3374
2024
|
/**
|
|
3375
2025
|
* Build Fact Grid
|
|
3376
2026
|
*
|
|
3377
|
-
*
|
|
3378
|
-
*
|
|
3379
|
-
* Queries `Fact` nodes by element qnames or canonical concepts with
|
|
3380
|
-
* optional filters for periods, entities, filing form, fiscal context,
|
|
3381
|
-
* and period type. Returns a deduplicated pivot table plus optional
|
|
3382
|
-
* summary statistics.
|
|
3383
|
-
*
|
|
3384
|
-
* This is a graph-database read — the query runs against LadybugDB,
|
|
3385
|
-
* not the extensions OLTP database. The same operation works for
|
|
3386
|
-
* roboledger tenant graphs (post-materialization) and the SEC shared
|
|
3387
|
-
* 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.
|
|
3388
2028
|
*
|
|
3389
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.
|
|
3390
2030
|
*/
|
|
@@ -3435,7 +2075,7 @@ export const opUpdatePortfolio = <ThrowOnError extends boolean = false>(options:
|
|
|
3435
2075
|
/**
|
|
3436
2076
|
* Delete Portfolio
|
|
3437
2077
|
*
|
|
3438
|
-
*
|
|
2078
|
+
* Returns 409 if the portfolio has active positions — dispose them first.
|
|
3439
2079
|
*
|
|
3440
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.
|
|
3441
2081
|
*/
|
|
@@ -3486,7 +2126,7 @@ export const opUpdateSecurity = <ThrowOnError extends boolean = false>(options:
|
|
|
3486
2126
|
/**
|
|
3487
2127
|
* Delete Security
|
|
3488
2128
|
*
|
|
3489
|
-
*
|
|
2129
|
+
* Soft-deletes the security (`is_active=false`). Historical positions referencing it remain valid.
|
|
3490
2130
|
*
|
|
3491
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.
|
|
3492
2132
|
*/
|
|
@@ -3503,7 +2143,7 @@ export const opDeleteSecurity = <ThrowOnError extends boolean = false>(options:
|
|
|
3503
2143
|
/**
|
|
3504
2144
|
* Create Position
|
|
3505
2145
|
*
|
|
3506
|
-
*
|
|
2146
|
+
* Returns 409 if an active position for this security already exists in the portfolio.
|
|
3507
2147
|
*
|
|
3508
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.
|
|
3509
2149
|
*/
|
|
@@ -3537,7 +2177,7 @@ export const opUpdatePosition = <ThrowOnError extends boolean = false>(options:
|
|
|
3537
2177
|
/**
|
|
3538
2178
|
* Delete Position
|
|
3539
2179
|
*
|
|
3540
|
-
*
|
|
2180
|
+
* Soft-deletes the position (`is_active=false`). Historical holding records referencing it remain valid.
|
|
3541
2181
|
*
|
|
3542
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.
|
|
3543
2183
|
*/
|