@robosystems/client 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +2 -2
- package/package.json +1 -1
- package/sdk/index.d.ts +2 -2
- package/sdk/index.js +3 -3
- package/sdk/index.ts +2 -2
- package/sdk/sdk.gen.d.ts +120 -1486
- package/sdk/sdk.gen.js +116 -1482
- package/sdk/sdk.gen.ts +120 -1486
- package/sdk/types.gen.d.ts +2488 -822
- package/sdk/types.gen.ts +2511 -831
- package/sdk.gen.d.ts +120 -1486
- package/sdk.gen.js +116 -1482
- package/sdk.gen.ts +120 -1486
- package/types.gen.d.ts +2488 -822
- package/types.gen.ts +2511 -831
package/sdk/sdk.gen.js
CHANGED
|
@@ -2,18 +2,14 @@
|
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.callMcpTool = exports.listMcpTools = exports.recommendAgent = exports.batchProcessQueries = exports.executeSpecificAgent = exports.getAgentMetadata = exports.autoSelectAgent = exports.listAgents = exports.syncConnection = exports.getConnection = exports.deleteConnection = exports.oauthCallback = exports.initOAuth = exports.getConnectionOptions = exports.createConnection = exports.listConnections = exports.getOrgUsage = exports.getOrgLimits = exports.updateOrgMemberRole = exports.removeOrgMember = exports.inviteOrgMember = exports.listOrgMembers = exports.listOrgGraphs = exports.updateOrg = exports.getOrg = exports.listUserOrgs = exports.updateUserApiKey = exports.revokeUserApiKey = exports.createUserApiKey = exports.listUserApiKeys = exports.updateUserPassword = exports.updateUser = exports.getCurrentUser = exports.getServiceStatus = exports.getCaptchaConfig = exports.completeSsoAuth = exports.ssoTokenExchange = exports.generateSsoToken = exports.resetPassword = exports.validateResetToken = exports.forgotPassword = exports.checkPasswordStrength = exports.getPasswordPolicy = exports.verifyEmail = exports.resendVerificationEmail = exports.refreshAuthSession = exports.getCurrentAuthUser = exports.logoutUser = exports.loginUser = exports.registerUser = void 0;
|
|
5
|
-
exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.selectGraph = exports.getGraphCapacity = exports.getAvailableGraphTiers = exports.getAvailableExtensions = exports.createGraph = exports.getGraphs = exports.updateFile = exports.getFile = exports.deleteFile = exports.createFileUpload = exports.listFiles = exports.opMaterialize = exports.
|
|
5
|
+
exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.selectGraph = exports.getGraphCapacity = exports.getAvailableGraphTiers = exports.getAvailableExtensions = exports.createGraph = exports.getGraphs = exports.updateFile = exports.getFile = exports.deleteFile = exports.createFileUpload = exports.listFiles = exports.opMaterialize = exports.opChangeTier = exports.opRestoreBackup = exports.opCreateBackup = exports.opDeleteSubgraph = exports.opCreateSubgraph = exports.uploadDocumentsBulk = exports.updateDocument = exports.getDocument = exports.deleteDocument = exports.uploadDocument = exports.listDocuments = exports.getDocumentSection = exports.searchDocuments = exports.queryTables = exports.listTables = exports.createRepositorySubscription = exports.changeSubscriptionPlan = exports.getGraphSubscription = exports.getSubgraphQuota = exports.getSubgraphInfo = exports.listSubgraphs = exports.getGraphLimits = exports.getDatabaseInfo = exports.getDatabaseHealth = exports.listCreditTransactions = exports.getCreditSummary = exports.validateSchema = exports.exportGraphSchema = exports.getGraphSchema = exports.executeCypherQuery = exports.getGraphUsageAnalytics = exports.getGraphMetrics = exports.getBackupStats = exports.getBackupDownloadUrl = exports.listBackups = void 0;
|
|
6
6
|
exports.opUpdatePublishList = exports.opCreatePublishList = exports.opShareReport = exports.opDeleteReport = exports.opRegenerateReport = exports.opCreateReport = exports.opAutoMapElements = exports.opDeleteSchedule = exports.opUpdateSchedule = exports.opReverseJournalEntry = exports.opDeleteJournalEntry = exports.opUpdateJournalEntry = exports.opCreateJournalEntry = exports.opCreateTransaction = exports.opDeleteAssociation = exports.opUpdateAssociation = exports.opCreateAssociations = exports.opDeleteElement = exports.opUpdateElement = exports.opCreateElement = exports.opDeleteStructure = exports.opUpdateStructure = exports.opLinkEntityTaxonomy = exports.opDeleteTaxonomy = exports.opUpdateTaxonomy = exports.opDeleteMappingAssociation = exports.opCreateMappingAssociation = exports.opCreateStructure = exports.opCreateTaxonomy = exports.opCreateManualClosingEntry = exports.opCreateClosingEntry = exports.opTruncateSchedule = exports.opCreateSchedule = exports.opReopenPeriod = exports.opClosePeriod = exports.opSetCloseTarget = exports.opInitializeLedger = exports.opUpdateEntity = exports.handleHttpPostExtensionsGraphIdGraphqlPost = exports.handleHttpGetExtensionsGraphIdGraphqlGet = exports.getCheckoutStatus = exports.createCheckoutSession = exports.getOrgUpcomingInvoice = exports.listOrgInvoices = exports.cancelOrgSubscription = exports.getOrgSubscription = exports.listOrgSubscriptions = exports.createPortalSession = exports.getOrgBillingCustomer = exports.cancelOperation = void 0;
|
|
7
7
|
exports.opDeletePosition = exports.opUpdatePosition = exports.opCreatePosition = exports.opDeleteSecurity = exports.opUpdateSecurity = exports.opCreateSecurity = exports.opDeletePortfolio = exports.opUpdatePortfolio = exports.opCreatePortfolio = exports.opBuildFactGrid = exports.opRemovePublishListMember = exports.opAddPublishListMembers = exports.opDeletePublishList = void 0;
|
|
8
8
|
const client_gen_1 = require("./client.gen");
|
|
9
9
|
/**
|
|
10
10
|
* Register New User
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* **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.
|
|
15
|
-
*
|
|
16
|
-
* **Security Controls**: CAPTCHA and email verification are disabled in development for API testing, but required in production.
|
|
12
|
+
* Creates the user and a personal organization. CAPTCHA required in production. Sends verification email when email verification is enabled.
|
|
17
13
|
*/
|
|
18
14
|
const registerUser = (options) => (options.client ?? client_gen_1.client).post({
|
|
19
15
|
url: '/v1/auth/register',
|
|
@@ -27,7 +23,7 @@ exports.registerUser = registerUser;
|
|
|
27
23
|
/**
|
|
28
24
|
* User Login
|
|
29
25
|
*
|
|
30
|
-
*
|
|
26
|
+
* Returns a JWT token on success. IP-based progressive delays apply after repeated failures.
|
|
31
27
|
*/
|
|
32
28
|
const loginUser = (options) => (options.client ?? client_gen_1.client).post({
|
|
33
29
|
url: '/v1/auth/login',
|
|
@@ -40,22 +36,18 @@ const loginUser = (options) => (options.client ?? client_gen_1.client).post({
|
|
|
40
36
|
exports.loginUser = loginUser;
|
|
41
37
|
/**
|
|
42
38
|
* User Logout
|
|
43
|
-
*
|
|
44
|
-
* Logout user and invalidate session.
|
|
45
39
|
*/
|
|
46
40
|
const logoutUser = (options) => (options?.client ?? client_gen_1.client).post({ url: '/v1/auth/logout', ...options });
|
|
47
41
|
exports.logoutUser = logoutUser;
|
|
48
42
|
/**
|
|
49
43
|
* Get Current User
|
|
50
|
-
*
|
|
51
|
-
* Get the currently authenticated user.
|
|
52
44
|
*/
|
|
53
45
|
const getCurrentAuthUser = (options) => (options?.client ?? client_gen_1.client).get({ url: '/v1/auth/me', ...options });
|
|
54
46
|
exports.getCurrentAuthUser = getCurrentAuthUser;
|
|
55
47
|
/**
|
|
56
48
|
* Refresh Session
|
|
57
49
|
*
|
|
58
|
-
*
|
|
50
|
+
* Revokes the current token and issues a new one. Accepts recently-expired tokens within the grace period.
|
|
59
51
|
*/
|
|
60
52
|
const refreshAuthSession = (options) => (options?.client ?? client_gen_1.client).post({ url: '/v1/auth/refresh', ...options });
|
|
61
53
|
exports.refreshAuthSession = refreshAuthSession;
|
|
@@ -82,15 +74,11 @@ const verifyEmail = (options) => (options.client ?? client_gen_1.client).post({
|
|
|
82
74
|
exports.verifyEmail = verifyEmail;
|
|
83
75
|
/**
|
|
84
76
|
* Get Password Policy
|
|
85
|
-
*
|
|
86
|
-
* Get current password policy requirements for frontend validation
|
|
87
77
|
*/
|
|
88
78
|
const getPasswordPolicy = (options) => (options?.client ?? client_gen_1.client).get({ url: '/v1/auth/password/policy', ...options });
|
|
89
79
|
exports.getPasswordPolicy = getPasswordPolicy;
|
|
90
80
|
/**
|
|
91
81
|
* Check Password Strength
|
|
92
|
-
*
|
|
93
|
-
* Check password strength and get validation feedback
|
|
94
82
|
*/
|
|
95
83
|
const checkPasswordStrength = (options) => (options.client ?? client_gen_1.client).post({
|
|
96
84
|
url: '/v1/auth/password/check',
|
|
@@ -118,14 +106,14 @@ exports.forgotPassword = forgotPassword;
|
|
|
118
106
|
/**
|
|
119
107
|
* Validate Reset Token
|
|
120
108
|
*
|
|
121
|
-
* Check if a password reset token is valid without consuming it.
|
|
109
|
+
* Check if a password reset token is valid without consuming it. Returns masked email on success.
|
|
122
110
|
*/
|
|
123
111
|
const validateResetToken = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/auth/password/reset/validate', ...options });
|
|
124
112
|
exports.validateResetToken = validateResetToken;
|
|
125
113
|
/**
|
|
126
114
|
* Reset Password
|
|
127
115
|
*
|
|
128
|
-
* Reset password with token from email. Returns JWT for auto-login.
|
|
116
|
+
* Reset password with token from email. Invalidates all existing sessions. Returns JWT for auto-login.
|
|
129
117
|
*/
|
|
130
118
|
const resetPassword = (options) => (options.client ?? client_gen_1.client).post({
|
|
131
119
|
url: '/v1/auth/password/reset',
|
|
@@ -139,14 +127,14 @@ exports.resetPassword = resetPassword;
|
|
|
139
127
|
/**
|
|
140
128
|
* Generate SSO Token
|
|
141
129
|
*
|
|
142
|
-
*
|
|
130
|
+
* Step 1 of 3 in the cross-app SSO flow. Issues a single-use token (60s TTL) for handoff to a target application.
|
|
143
131
|
*/
|
|
144
132
|
const generateSsoToken = (options) => (options?.client ?? client_gen_1.client).post({ url: '/v1/auth/sso-token', ...options });
|
|
145
133
|
exports.generateSsoToken = generateSsoToken;
|
|
146
134
|
/**
|
|
147
135
|
* SSO Token Exchange
|
|
148
136
|
*
|
|
149
|
-
*
|
|
137
|
+
* Step 2 of 3. Exchanges the SSO token for a short-lived session ID. Avoids passing tokens in redirect URLs.
|
|
150
138
|
*/
|
|
151
139
|
const ssoTokenExchange = (options) => (options.client ?? client_gen_1.client).post({
|
|
152
140
|
url: '/v1/auth/sso-exchange',
|
|
@@ -160,7 +148,7 @@ exports.ssoTokenExchange = ssoTokenExchange;
|
|
|
160
148
|
/**
|
|
161
149
|
* Complete SSO Authentication
|
|
162
150
|
*
|
|
163
|
-
*
|
|
151
|
+
* Step 3 of 3. Exchanges the session ID for a full JWT token. Called by the target app after redirect.
|
|
164
152
|
*/
|
|
165
153
|
const completeSsoAuth = (options) => (options.client ?? client_gen_1.client).post({
|
|
166
154
|
url: '/v1/auth/sso-complete',
|
|
@@ -174,21 +162,19 @@ exports.completeSsoAuth = completeSsoAuth;
|
|
|
174
162
|
/**
|
|
175
163
|
* Get CAPTCHA Configuration
|
|
176
164
|
*
|
|
177
|
-
*
|
|
165
|
+
* Returns site key and whether CAPTCHA is required. Site key is null when CAPTCHA is disabled.
|
|
178
166
|
*/
|
|
179
167
|
const getCaptchaConfig = (options) => (options?.client ?? client_gen_1.client).get({ url: '/v1/auth/captcha/config', ...options });
|
|
180
168
|
exports.getCaptchaConfig = getCaptchaConfig;
|
|
181
169
|
/**
|
|
182
170
|
* Health Check
|
|
183
171
|
*
|
|
184
|
-
*
|
|
172
|
+
* Unprotected — used by load balancers and monitoring. No authentication required.
|
|
185
173
|
*/
|
|
186
174
|
const getServiceStatus = (options) => (options?.client ?? client_gen_1.client).get({ url: '/v1/status', ...options });
|
|
187
175
|
exports.getServiceStatus = getServiceStatus;
|
|
188
176
|
/**
|
|
189
177
|
* Get Current User
|
|
190
|
-
*
|
|
191
|
-
* Returns information about the currently authenticated user.
|
|
192
178
|
*/
|
|
193
179
|
const getCurrentUser = (options) => (options?.client ?? client_gen_1.client).get({
|
|
194
180
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -198,8 +184,6 @@ const getCurrentUser = (options) => (options?.client ?? client_gen_1.client).get
|
|
|
198
184
|
exports.getCurrentUser = getCurrentUser;
|
|
199
185
|
/**
|
|
200
186
|
* Update User Profile
|
|
201
|
-
*
|
|
202
|
-
* Update the current user's profile information.
|
|
203
187
|
*/
|
|
204
188
|
const updateUser = (options) => (options.client ?? client_gen_1.client).put({
|
|
205
189
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -214,7 +198,7 @@ exports.updateUser = updateUser;
|
|
|
214
198
|
/**
|
|
215
199
|
* Update Password
|
|
216
200
|
*
|
|
217
|
-
*
|
|
201
|
+
* Requires current password verification. Not available for SSO-only accounts.
|
|
218
202
|
*/
|
|
219
203
|
const updateUserPassword = (options) => (options.client ?? client_gen_1.client).put({
|
|
220
204
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -228,8 +212,6 @@ const updateUserPassword = (options) => (options.client ?? client_gen_1.client).
|
|
|
228
212
|
exports.updateUserPassword = updateUserPassword;
|
|
229
213
|
/**
|
|
230
214
|
* List API Keys
|
|
231
|
-
*
|
|
232
|
-
* Get all API keys for the current user.
|
|
233
215
|
*/
|
|
234
216
|
const listUserApiKeys = (options) => (options?.client ?? client_gen_1.client).get({
|
|
235
217
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -240,7 +222,7 @@ exports.listUserApiKeys = listUserApiKeys;
|
|
|
240
222
|
/**
|
|
241
223
|
* Create API Key
|
|
242
224
|
*
|
|
243
|
-
*
|
|
225
|
+
* The raw key value is only returned once at creation time and cannot be retrieved again.
|
|
244
226
|
*/
|
|
245
227
|
const createUserApiKey = (options) => (options.client ?? client_gen_1.client).post({
|
|
246
228
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -255,7 +237,7 @@ exports.createUserApiKey = createUserApiKey;
|
|
|
255
237
|
/**
|
|
256
238
|
* Revoke API Key
|
|
257
239
|
*
|
|
258
|
-
*
|
|
240
|
+
* Deactivates the key immediately. Requests using the revoked key will fail with 401.
|
|
259
241
|
*/
|
|
260
242
|
const revokeUserApiKey = (options) => (options.client ?? client_gen_1.client).delete({
|
|
261
243
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -265,8 +247,6 @@ const revokeUserApiKey = (options) => (options.client ?? client_gen_1.client).de
|
|
|
265
247
|
exports.revokeUserApiKey = revokeUserApiKey;
|
|
266
248
|
/**
|
|
267
249
|
* Update API Key
|
|
268
|
-
*
|
|
269
|
-
* Update an API key's name or description.
|
|
270
250
|
*/
|
|
271
251
|
const updateUserApiKey = (options) => (options.client ?? client_gen_1.client).put({
|
|
272
252
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -280,8 +260,6 @@ const updateUserApiKey = (options) => (options.client ?? client_gen_1.client).pu
|
|
|
280
260
|
exports.updateUserApiKey = updateUserApiKey;
|
|
281
261
|
/**
|
|
282
262
|
* List User's Organizations
|
|
283
|
-
*
|
|
284
|
-
* Get all organizations the current user belongs to, with their role in each.
|
|
285
263
|
*/
|
|
286
264
|
const listUserOrgs = (options) => (options?.client ?? client_gen_1.client).get({
|
|
287
265
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -291,8 +269,6 @@ const listUserOrgs = (options) => (options?.client ?? client_gen_1.client).get({
|
|
|
291
269
|
exports.listUserOrgs = listUserOrgs;
|
|
292
270
|
/**
|
|
293
271
|
* Get Organization
|
|
294
|
-
*
|
|
295
|
-
* Get detailed information about an organization.
|
|
296
272
|
*/
|
|
297
273
|
const getOrg = (options) => (options.client ?? client_gen_1.client).get({
|
|
298
274
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -303,7 +279,7 @@ exports.getOrg = getOrg;
|
|
|
303
279
|
/**
|
|
304
280
|
* Update Organization
|
|
305
281
|
*
|
|
306
|
-
*
|
|
282
|
+
* Requires admin or owner role. Only owners can change the org type.
|
|
307
283
|
*/
|
|
308
284
|
const updateOrg = (options) => (options.client ?? client_gen_1.client).put({
|
|
309
285
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -317,8 +293,6 @@ const updateOrg = (options) => (options.client ?? client_gen_1.client).put({
|
|
|
317
293
|
exports.updateOrg = updateOrg;
|
|
318
294
|
/**
|
|
319
295
|
* List Organization Graphs
|
|
320
|
-
*
|
|
321
|
-
* Get all graphs belonging to an organization.
|
|
322
296
|
*/
|
|
323
297
|
const listOrgGraphs = (options) => (options.client ?? client_gen_1.client).get({
|
|
324
298
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -328,8 +302,6 @@ const listOrgGraphs = (options) => (options.client ?? client_gen_1.client).get({
|
|
|
328
302
|
exports.listOrgGraphs = listOrgGraphs;
|
|
329
303
|
/**
|
|
330
304
|
* List Organization Members
|
|
331
|
-
*
|
|
332
|
-
* Get all members of an organization with their roles.
|
|
333
305
|
*/
|
|
334
306
|
const listOrgMembers = (options) => (options.client ?? client_gen_1.client).get({
|
|
335
307
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -340,10 +312,7 @@ exports.listOrgMembers = listOrgMembers;
|
|
|
340
312
|
/**
|
|
341
313
|
* Invite Member
|
|
342
314
|
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
* **⚠️ FEATURE NOT READY**: This endpoint is disabled by default (ORG_MEMBER_INVITATIONS_ENABLED=false).
|
|
346
|
-
* Returns 501 NOT IMPLEMENTED when disabled. See endpoint implementation for TODO list before enabling.
|
|
315
|
+
* Disabled by default (ORG_MEMBER_INVITATIONS_ENABLED=false). Returns 501 when disabled. Requires admin or owner role.
|
|
347
316
|
*/
|
|
348
317
|
const inviteOrgMember = (options) => (options.client ?? client_gen_1.client).post({
|
|
349
318
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -358,7 +327,7 @@ exports.inviteOrgMember = inviteOrgMember;
|
|
|
358
327
|
/**
|
|
359
328
|
* Remove Member
|
|
360
329
|
*
|
|
361
|
-
*
|
|
330
|
+
* Requires admin or owner role. Members may remove themselves.
|
|
362
331
|
*/
|
|
363
332
|
const removeOrgMember = (options) => (options.client ?? client_gen_1.client).delete({
|
|
364
333
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -369,7 +338,7 @@ exports.removeOrgMember = removeOrgMember;
|
|
|
369
338
|
/**
|
|
370
339
|
* Update Member Role
|
|
371
340
|
*
|
|
372
|
-
*
|
|
341
|
+
* Requires admin or owner role. Owner promotion/demotion requires a dedicated ownership transfer workflow.
|
|
373
342
|
*/
|
|
374
343
|
const updateOrgMemberRole = (options) => (options.client ?? client_gen_1.client).put({
|
|
375
344
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -383,8 +352,6 @@ const updateOrgMemberRole = (options) => (options.client ?? client_gen_1.client)
|
|
|
383
352
|
exports.updateOrgMemberRole = updateOrgMemberRole;
|
|
384
353
|
/**
|
|
385
354
|
* Get Organization Limits
|
|
386
|
-
*
|
|
387
|
-
* Get the current limits and quotas for an organization.
|
|
388
355
|
*/
|
|
389
356
|
const getOrgLimits = (options) => (options.client ?? client_gen_1.client).get({
|
|
390
357
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -395,7 +362,7 @@ exports.getOrgLimits = getOrgLimits;
|
|
|
395
362
|
/**
|
|
396
363
|
* Get Organization Usage
|
|
397
364
|
*
|
|
398
|
-
*
|
|
365
|
+
* Aggregated across all graphs in the org. Use the `days` query param to control the lookback window (default 30).
|
|
399
366
|
*/
|
|
400
367
|
const getOrgUsage = (options) => (options.client ?? client_gen_1.client).get({
|
|
401
368
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -405,21 +372,6 @@ const getOrgUsage = (options) => (options.client ?? client_gen_1.client).get({
|
|
|
405
372
|
exports.getOrgUsage = getOrgUsage;
|
|
406
373
|
/**
|
|
407
374
|
* List Connections
|
|
408
|
-
*
|
|
409
|
-
* List all data connections in the graph.
|
|
410
|
-
*
|
|
411
|
-
* Returns active and inactive connections with their current status.
|
|
412
|
-
* Connections can be filtered by:
|
|
413
|
-
* - **Entity**: Show connections for a specific entity
|
|
414
|
-
* - **Provider**: Filter by connection type (sec, quickbooks)
|
|
415
|
-
*
|
|
416
|
-
* Each connection shows:
|
|
417
|
-
* - Current sync status and health
|
|
418
|
-
* - Last successful sync timestamp
|
|
419
|
-
* - Configuration metadata
|
|
420
|
-
* - Error messages if any
|
|
421
|
-
*
|
|
422
|
-
* No credits are consumed for listing connections.
|
|
423
375
|
*/
|
|
424
376
|
const listConnections = (options) => (options.client ?? client_gen_1.client).get({
|
|
425
377
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -430,22 +382,7 @@ exports.listConnections = listConnections;
|
|
|
430
382
|
/**
|
|
431
383
|
* Create Connection
|
|
432
384
|
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
* This endpoint initiates connections to external data sources:
|
|
436
|
-
*
|
|
437
|
-
* **SEC Connections**:
|
|
438
|
-
* - Provide entity CIK for automatic filing retrieval
|
|
439
|
-
* - No authentication needed
|
|
440
|
-
* - Begins immediate data sync
|
|
441
|
-
*
|
|
442
|
-
* **QuickBooks Connections**:
|
|
443
|
-
* - Returns OAuth URL for authorization
|
|
444
|
-
* - Requires admin permissions in QuickBooks
|
|
445
|
-
* - Complete with OAuth callback
|
|
446
|
-
*
|
|
447
|
-
* Note:
|
|
448
|
-
* This operation is included - no credit consumption required.
|
|
385
|
+
* SEC: provide entity CIK, no auth needed. QuickBooks: returns an OAuth URL — complete the flow to activate. One connection allowed per provider per graph.
|
|
449
386
|
*/
|
|
450
387
|
const createConnection = (options) => (options.client ?? client_gen_1.client).post({
|
|
451
388
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -460,21 +397,7 @@ exports.createConnection = createConnection;
|
|
|
460
397
|
/**
|
|
461
398
|
* List Connection Options
|
|
462
399
|
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* This endpoint returns comprehensive information about each supported provider:
|
|
466
|
-
*
|
|
467
|
-
* **SEC EDGAR**: Public entity financial filings
|
|
468
|
-
* - No authentication required (public data)
|
|
469
|
-
* - 10-K, 10-Q, 8-K reports with XBRL data
|
|
470
|
-
* - Historical and real-time filing access
|
|
471
|
-
*
|
|
472
|
-
* **QuickBooks Online**: Full accounting system integration
|
|
473
|
-
* - OAuth 2.0 authentication
|
|
474
|
-
* - Chart of accounts, transactions, trial balance
|
|
475
|
-
* - Real-time sync capabilities
|
|
476
|
-
*
|
|
477
|
-
* No credits are consumed for viewing connection options.
|
|
400
|
+
* Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). SEC requires no auth; QuickBooks requires OAuth 2.0.
|
|
478
401
|
*/
|
|
479
402
|
const getConnectionOptions = (options) => (options.client ?? client_gen_1.client).get({
|
|
480
403
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -483,12 +406,7 @@ const getConnectionOptions = (options) => (options.client ?? client_gen_1.client
|
|
|
483
406
|
});
|
|
484
407
|
exports.getConnectionOptions = getConnectionOptions;
|
|
485
408
|
/**
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
* Initialize OAuth flow for a connection.
|
|
489
|
-
*
|
|
490
|
-
* This generates an authorization URL that the frontend should redirect the user to.
|
|
491
|
-
* Currently supports: QuickBooks
|
|
409
|
+
* Initialize OAuth Flow
|
|
492
410
|
*/
|
|
493
411
|
const initOAuth = (options) => (options.client ?? client_gen_1.client).post({
|
|
494
412
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -503,25 +421,7 @@ exports.initOAuth = initOAuth;
|
|
|
503
421
|
/**
|
|
504
422
|
* OAuth Callback
|
|
505
423
|
*
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
* This endpoint completes the OAuth flow:
|
|
509
|
-
* 1. Validates the OAuth state parameter
|
|
510
|
-
* 2. Exchanges authorization code for access tokens
|
|
511
|
-
* 3. Stores tokens securely
|
|
512
|
-
* 4. Updates connection status
|
|
513
|
-
* 5. Optionally triggers initial sync
|
|
514
|
-
*
|
|
515
|
-
* Supported providers:
|
|
516
|
-
* - **QuickBooks**: Accounting data integration
|
|
517
|
-
*
|
|
518
|
-
* Security measures:
|
|
519
|
-
* - State validation prevents session hijacking
|
|
520
|
-
* - User context is verified
|
|
521
|
-
* - Tokens are encrypted before storage
|
|
522
|
-
* - Full audit trail is maintained
|
|
523
|
-
*
|
|
524
|
-
* No credits are consumed for OAuth callbacks.
|
|
424
|
+
* 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.
|
|
525
425
|
*/
|
|
526
426
|
const oauthCallback = (options) => (options.client ?? client_gen_1.client).post({
|
|
527
427
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -536,18 +436,7 @@ exports.oauthCallback = oauthCallback;
|
|
|
536
436
|
/**
|
|
537
437
|
* Delete Connection
|
|
538
438
|
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
* This operation:
|
|
542
|
-
* - Removes the connection configuration
|
|
543
|
-
* - Preserves any imported data in the graph
|
|
544
|
-
* - Performs provider-specific cleanup
|
|
545
|
-
* - Revokes stored credentials
|
|
546
|
-
*
|
|
547
|
-
* Note:
|
|
548
|
-
* This operation is included - no credit consumption required.
|
|
549
|
-
*
|
|
550
|
-
* Only users with admin role can delete connections.
|
|
439
|
+
* Removes the connection and revokes credentials. Imported data is preserved in the graph. Requires admin role.
|
|
551
440
|
*/
|
|
552
441
|
const deleteConnection = (options) => (options.client ?? client_gen_1.client).delete({
|
|
553
442
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -557,17 +446,6 @@ const deleteConnection = (options) => (options.client ?? client_gen_1.client).de
|
|
|
557
446
|
exports.deleteConnection = deleteConnection;
|
|
558
447
|
/**
|
|
559
448
|
* Get Connection
|
|
560
|
-
*
|
|
561
|
-
* Get detailed information about a specific connection.
|
|
562
|
-
*
|
|
563
|
-
* Returns comprehensive connection details including:
|
|
564
|
-
* - Current status and health indicators
|
|
565
|
-
* - Authentication state
|
|
566
|
-
* - Sync history and statistics
|
|
567
|
-
* - Error details if any
|
|
568
|
-
* - Provider-specific metadata
|
|
569
|
-
*
|
|
570
|
-
* No credits are consumed for viewing connection details.
|
|
571
449
|
*/
|
|
572
450
|
const getConnection = (options) => (options.client ?? client_gen_1.client).get({
|
|
573
451
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -578,26 +456,7 @@ exports.getConnection = getConnection;
|
|
|
578
456
|
/**
|
|
579
457
|
* Sync Connection
|
|
580
458
|
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* Initiates data sync based on provider type:
|
|
584
|
-
*
|
|
585
|
-
* **SEC Sync**:
|
|
586
|
-
* - Downloads latest filings from EDGAR
|
|
587
|
-
* - Parses XBRL data and updates graph
|
|
588
|
-
* - Typically completes in 5-10 minutes
|
|
589
|
-
*
|
|
590
|
-
* **QuickBooks Sync**:
|
|
591
|
-
* - Fetches latest transactions and balances
|
|
592
|
-
* - Updates chart of accounts
|
|
593
|
-
* - Generates fresh trial balance
|
|
594
|
-
* - Duration depends on data volume
|
|
595
|
-
*
|
|
596
|
-
* Note:
|
|
597
|
-
* This operation is included - no credit consumption required.
|
|
598
|
-
*
|
|
599
|
-
* Returns an `OperationEnvelope` with an `operationId` for tracking sync progress.
|
|
600
|
-
* Supports `Idempotency-Key` header to safely retry without triggering duplicate syncs.
|
|
459
|
+
* 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`.
|
|
601
460
|
*/
|
|
602
461
|
const syncConnection = (options) => (options.client ?? client_gen_1.client).post({
|
|
603
462
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -610,17 +469,9 @@ const syncConnection = (options) => (options.client ?? client_gen_1.client).post
|
|
|
610
469
|
});
|
|
611
470
|
exports.syncConnection = syncConnection;
|
|
612
471
|
/**
|
|
613
|
-
* List
|
|
614
|
-
*
|
|
615
|
-
* Get a comprehensive list of all available agents with their metadata.
|
|
472
|
+
* List Available Agents
|
|
616
473
|
*
|
|
617
|
-
*
|
|
618
|
-
* - Agent types and names
|
|
619
|
-
* - Capabilities and supported modes
|
|
620
|
-
* - Version information
|
|
621
|
-
* - Credit requirements
|
|
622
|
-
*
|
|
623
|
-
* Use the optional `capability` filter to find agents with specific capabilities.
|
|
474
|
+
* Filter by capability using the `capability` query param (e.g., `financial_analysis`, `rag_search`).
|
|
624
475
|
*/
|
|
625
476
|
const listAgents = (options) => (options.client ?? client_gen_1.client).get({
|
|
626
477
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -629,66 +480,9 @@ const listAgents = (options) => (options.client ?? client_gen_1.client).get({
|
|
|
629
480
|
});
|
|
630
481
|
exports.listAgents = listAgents;
|
|
631
482
|
/**
|
|
632
|
-
* Auto-select
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
* **Agent Selection Process:**
|
|
637
|
-
*
|
|
638
|
-
* The orchestrator intelligently routes your query by:
|
|
639
|
-
* 1. Analyzing query intent and complexity
|
|
640
|
-
* 2. Enriching context with RAG if enabled
|
|
641
|
-
* 3. Evaluating all available agents against selection criteria
|
|
642
|
-
* 4. Selecting the best match based on confidence scores
|
|
643
|
-
* 5. Choosing execution strategy (sync/SSE/async) based on expected time
|
|
644
|
-
* 6. Executing the query with the selected agent
|
|
645
|
-
*
|
|
646
|
-
* **Available Agent Types:**
|
|
647
|
-
* - `financial`: Financial analysis, SEC filings, company metrics
|
|
648
|
-
* - `research`: General research, data exploration, trend analysis
|
|
649
|
-
* - `rag`: Knowledge base search using RAG enrichment
|
|
650
|
-
*
|
|
651
|
-
* **Execution Modes:**
|
|
652
|
-
* - `quick`: Fast responses (~2-5s), suitable for simple queries
|
|
653
|
-
* - `standard`: Balanced approach (~5-15s), default mode
|
|
654
|
-
* - `extended`: Comprehensive analysis (~15-60s), deep research
|
|
655
|
-
* - `streaming`: Real-time response streaming
|
|
656
|
-
*
|
|
657
|
-
* **Execution Strategies (automatic):**
|
|
658
|
-
* - Fast operations (<5s): Immediate synchronous response
|
|
659
|
-
* - Medium operations (5-30s): SSE streaming with progress updates
|
|
660
|
-
* - Long operations (>30s): Background queue with operation tracking
|
|
661
|
-
*
|
|
662
|
-
* **Response Mode Override:**
|
|
663
|
-
* Use query parameter `?mode=sync|async` to override automatic strategy selection.
|
|
664
|
-
*
|
|
665
|
-
* **Confidence Score Interpretation:**
|
|
666
|
-
* - `0.9-1.0`: High confidence, agent is ideal match
|
|
667
|
-
* - `0.7-0.9`: Good confidence, agent is suitable
|
|
668
|
-
* - `0.5-0.7`: Moderate confidence, agent can handle but may not be optimal
|
|
669
|
-
* - `0.3-0.5`: Low confidence, fallback agent used
|
|
670
|
-
* - `<0.3`: Very low confidence, consider using specific agent endpoint
|
|
671
|
-
*
|
|
672
|
-
* **Credit Costs:**
|
|
673
|
-
* - Quick mode: 5-10 credits per query
|
|
674
|
-
* - Standard mode: 15-25 credits per query
|
|
675
|
-
* - Extended mode: 30-75 credits per query
|
|
676
|
-
* - RAG enrichment: +5-15 credits (if enabled)
|
|
677
|
-
*
|
|
678
|
-
* **Use Cases:**
|
|
679
|
-
* - Ask questions without specifying agent type
|
|
680
|
-
* - Get intelligent routing for complex multi-domain queries
|
|
681
|
-
* - Leverage conversation history for contextual understanding
|
|
682
|
-
* - Enable RAG for knowledge base enrichment
|
|
683
|
-
*
|
|
684
|
-
* **Subgraph Support:**
|
|
685
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
686
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
687
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
688
|
-
* Agents operate on the specified graph/subgraph's data independently. RAG enrichment
|
|
689
|
-
* and knowledge base search are scoped to the specific graph/subgraph.
|
|
690
|
-
*
|
|
691
|
-
* See request/response examples in the "Examples" dropdown below.
|
|
483
|
+
* Auto-select Agent for Query
|
|
484
|
+
*
|
|
485
|
+
* 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`.
|
|
692
486
|
*/
|
|
693
487
|
const autoSelectAgent = (options) => (options.client ?? client_gen_1.client).post({
|
|
694
488
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -701,19 +495,7 @@ const autoSelectAgent = (options) => (options.client ?? client_gen_1.client).pos
|
|
|
701
495
|
});
|
|
702
496
|
exports.autoSelectAgent = autoSelectAgent;
|
|
703
497
|
/**
|
|
704
|
-
* Get
|
|
705
|
-
*
|
|
706
|
-
* Get comprehensive metadata for a specific agent type.
|
|
707
|
-
*
|
|
708
|
-
* **Returns:**
|
|
709
|
-
* - Agent name and description
|
|
710
|
-
* - Version information
|
|
711
|
-
* - Supported capabilities and modes
|
|
712
|
-
* - Credit requirements
|
|
713
|
-
* - Author and tags
|
|
714
|
-
* - Configuration options
|
|
715
|
-
*
|
|
716
|
-
* Use this to understand agent capabilities before execution.
|
|
498
|
+
* Get Agent Metadata
|
|
717
499
|
*/
|
|
718
500
|
const getAgentMetadata = (options) => (options.client ?? client_gen_1.client).get({
|
|
719
501
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -722,24 +504,9 @@ const getAgentMetadata = (options) => (options.client ?? client_gen_1.client).ge
|
|
|
722
504
|
});
|
|
723
505
|
exports.getAgentMetadata = getAgentMetadata;
|
|
724
506
|
/**
|
|
725
|
-
* Execute
|
|
726
|
-
*
|
|
727
|
-
* Execute a specific agent type directly with intelligent execution strategy.
|
|
507
|
+
* Execute Specific Agent
|
|
728
508
|
*
|
|
729
|
-
* Available
|
|
730
|
-
* - **financial**: Financial analysis, SEC filings, accounting data
|
|
731
|
-
* - **research**: Deep research and comprehensive analysis
|
|
732
|
-
* - **rag**: Fast retrieval without AI (no credits required)
|
|
733
|
-
*
|
|
734
|
-
* **Execution Strategies (automatic):**
|
|
735
|
-
* - Fast operations (<5s): Immediate synchronous response
|
|
736
|
-
* - Medium operations (5-30s): SSE streaming with progress updates
|
|
737
|
-
* - Long operations (>30s): Background queue with operation tracking
|
|
738
|
-
*
|
|
739
|
-
* **Response Mode Override:**
|
|
740
|
-
* Use query parameter `?mode=sync|async` to override automatic strategy selection.
|
|
741
|
-
*
|
|
742
|
-
* Use this endpoint when you know which agent you want to use.
|
|
509
|
+
* Available: `financial` (SEC filings, accounting), `research` (deep analysis), `rag` (retrieval, no credits). Execution strategy auto-selected; override with `?mode=sync|async`.
|
|
743
510
|
*/
|
|
744
511
|
const executeSpecificAgent = (options) => (options.client ?? client_gen_1.client).post({
|
|
745
512
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -752,22 +519,9 @@ const executeSpecificAgent = (options) => (options.client ?? client_gen_1.client
|
|
|
752
519
|
});
|
|
753
520
|
exports.executeSpecificAgent = executeSpecificAgent;
|
|
754
521
|
/**
|
|
755
|
-
* Batch
|
|
756
|
-
*
|
|
757
|
-
* Process multiple queries either sequentially or in parallel.
|
|
522
|
+
* Batch Process Queries
|
|
758
523
|
*
|
|
759
|
-
*
|
|
760
|
-
* - Process up to 10 queries in a single request
|
|
761
|
-
* - Sequential or parallel execution modes
|
|
762
|
-
* - Automatic error handling per query
|
|
763
|
-
* - Credit checking before execution
|
|
764
|
-
*
|
|
765
|
-
* **Use Cases:**
|
|
766
|
-
* - Bulk analysis of multiple entities
|
|
767
|
-
* - Comparative analysis across queries
|
|
768
|
-
* - Automated report generation
|
|
769
|
-
*
|
|
770
|
-
* Returns individual results for each query with execution metrics.
|
|
524
|
+
* Process up to 10 queries sequentially or in parallel. Partial failure is supported — each result has individual error handling.
|
|
771
525
|
*/
|
|
772
526
|
const batchProcessQueries = (options) => (options.client ?? client_gen_1.client).post({
|
|
773
527
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -780,22 +534,9 @@ const batchProcessQueries = (options) => (options.client ?? client_gen_1.client)
|
|
|
780
534
|
});
|
|
781
535
|
exports.batchProcessQueries = batchProcessQueries;
|
|
782
536
|
/**
|
|
783
|
-
* Get
|
|
784
|
-
*
|
|
785
|
-
* Get intelligent agent recommendations for a specific query.
|
|
786
|
-
*
|
|
787
|
-
* **How it works:**
|
|
788
|
-
* 1. Analyzes query content and structure
|
|
789
|
-
* 2. Evaluates agent capabilities
|
|
790
|
-
* 3. Calculates confidence scores
|
|
791
|
-
* 4. Returns ranked recommendations
|
|
537
|
+
* Get Agent Recommendations
|
|
792
538
|
*
|
|
793
|
-
*
|
|
794
|
-
* - Unsure which agent to use
|
|
795
|
-
* - Need to understand agent suitability
|
|
796
|
-
* - Want confidence scores for decision making
|
|
797
|
-
*
|
|
798
|
-
* Returns top agents ranked by confidence with explanations.
|
|
539
|
+
* Returns agents ranked by confidence score for a query, with explanations. Use before execution when unsure which agent to pick.
|
|
799
540
|
*/
|
|
800
541
|
const recommendAgent = (options) => (options.client ?? client_gen_1.client).post({
|
|
801
542
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -810,27 +551,7 @@ exports.recommendAgent = recommendAgent;
|
|
|
810
551
|
/**
|
|
811
552
|
* List MCP Tools
|
|
812
553
|
*
|
|
813
|
-
*
|
|
814
|
-
*
|
|
815
|
-
* This endpoint returns a comprehensive list of MCP tools optimized for AI agents:
|
|
816
|
-
* - Tool schemas with detailed parameter documentation
|
|
817
|
-
* - Context-aware descriptions based on graph type
|
|
818
|
-
* - Capability indicators for streaming and progress
|
|
819
|
-
*
|
|
820
|
-
* The tool list is customized based on:
|
|
821
|
-
* - Graph type (shared repository vs user graph)
|
|
822
|
-
* - User permissions and subscription tier
|
|
823
|
-
* - Available graph capabilities for the selected graph
|
|
824
|
-
*
|
|
825
|
-
* **Subgraph Support:**
|
|
826
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
827
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
828
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
829
|
-
* The returned tool list is identical for parent graphs and subgraphs, as all
|
|
830
|
-
* MCP tools work uniformly across graph boundaries.
|
|
831
|
-
*
|
|
832
|
-
* **Note:**
|
|
833
|
-
* MCP tool listing is included - no credit consumption required.
|
|
554
|
+
* 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.
|
|
834
555
|
*/
|
|
835
556
|
const listMcpTools = (options) => (options.client ?? client_gen_1.client).get({
|
|
836
557
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -841,50 +562,7 @@ exports.listMcpTools = listMcpTools;
|
|
|
841
562
|
/**
|
|
842
563
|
* Execute MCP Tool
|
|
843
564
|
*
|
|
844
|
-
*
|
|
845
|
-
*
|
|
846
|
-
* This endpoint automatically selects the best execution strategy based on:
|
|
847
|
-
* - Tool type and estimated complexity
|
|
848
|
-
* - Client capabilities (AI agent detection)
|
|
849
|
-
* - System load and queue status
|
|
850
|
-
* - Graph type (shared repository vs user graph)
|
|
851
|
-
*
|
|
852
|
-
* **Response Formats:**
|
|
853
|
-
* - **JSON**: Direct response for small/fast operations
|
|
854
|
-
* - **SSE**: Server-Sent Events for progress monitoring
|
|
855
|
-
* - **NDJSON**: Newline-delimited JSON for streaming
|
|
856
|
-
* - **Queued**: Asynchronous execution with status monitoring
|
|
857
|
-
*
|
|
858
|
-
* **SSE Streaming Support:**
|
|
859
|
-
* - Maximum 5 concurrent SSE connections per user
|
|
860
|
-
* - Rate limited to 10 new connections per minute
|
|
861
|
-
* - Automatic circuit breaker for Redis failures
|
|
862
|
-
* - Graceful degradation to direct response if SSE unavailable
|
|
863
|
-
* - Progress events for long-running operations
|
|
864
|
-
*
|
|
865
|
-
* **AI Agent Optimization:**
|
|
866
|
-
* The Node.js MCP client transparently handles all response formats,
|
|
867
|
-
* presenting a unified interface to AI agents. Streaming responses are
|
|
868
|
-
* automatically aggregated for seamless consumption.
|
|
869
|
-
*
|
|
870
|
-
* **Error Handling:**
|
|
871
|
-
* - `429 Too Many Requests`: Connection limit or rate limit exceeded
|
|
872
|
-
* - `503 Service Unavailable`: SSE system temporarily disabled
|
|
873
|
-
* - `408 Request Timeout`: Tool execution exceeded timeout
|
|
874
|
-
* - Clients should implement exponential backoff on errors
|
|
875
|
-
*
|
|
876
|
-
* **Subgraph Support:**
|
|
877
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
878
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
879
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
880
|
-
* MCP tools operate on the specified graph/subgraph independently. Each subgraph
|
|
881
|
-
* has its own schema, data, and can be queried separately via MCP.
|
|
882
|
-
*
|
|
883
|
-
* **Credit Model:**
|
|
884
|
-
* MCP tool execution is included - no credit consumption required. Database
|
|
885
|
-
* operations (queries, schema inspection, analytics) are completely free.
|
|
886
|
-
* Only AI operations that invoke Claude or other LLM APIs consume credits,
|
|
887
|
-
* which happens at the AI agent layer, not the MCP tool layer.
|
|
565
|
+
* 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.
|
|
888
566
|
*/
|
|
889
567
|
const callMcpTool = (options) => (options.client ?? client_gen_1.client).post({
|
|
890
568
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -898,8 +576,6 @@ const callMcpTool = (options) => (options.client ?? client_gen_1.client).post({
|
|
|
898
576
|
exports.callMcpTool = callMcpTool;
|
|
899
577
|
/**
|
|
900
578
|
* List graph database backups
|
|
901
|
-
*
|
|
902
|
-
* List all backups for the specified graph database
|
|
903
579
|
*/
|
|
904
580
|
const listBackups = (options) => (options.client ?? client_gen_1.client).get({
|
|
905
581
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -920,8 +596,6 @@ const getBackupDownloadUrl = (options) => (options.client ?? client_gen_1.client
|
|
|
920
596
|
exports.getBackupDownloadUrl = getBackupDownloadUrl;
|
|
921
597
|
/**
|
|
922
598
|
* Get backup statistics
|
|
923
|
-
*
|
|
924
|
-
* Get comprehensive backup statistics for the specified graph database
|
|
925
599
|
*/
|
|
926
600
|
const getBackupStats = (options) => (options.client ?? client_gen_1.client).get({
|
|
927
601
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -931,24 +605,6 @@ const getBackupStats = (options) => (options.client ?? client_gen_1.client).get(
|
|
|
931
605
|
exports.getBackupStats = getBackupStats;
|
|
932
606
|
/**
|
|
933
607
|
* Get Graph Metrics
|
|
934
|
-
*
|
|
935
|
-
* Get comprehensive metrics for the graph database.
|
|
936
|
-
*
|
|
937
|
-
* Provides detailed analytics including:
|
|
938
|
-
* - **Node Statistics**: Counts by type (Entity, Report, Account, Transaction)
|
|
939
|
-
* - **Relationship Metrics**: Connection counts and patterns
|
|
940
|
-
* - **Data Quality**: Completeness scores and validation results
|
|
941
|
-
* - **Performance Metrics**: Query response times and database health
|
|
942
|
-
* - **Storage Analytics**: Database size and growth trends
|
|
943
|
-
*
|
|
944
|
-
* This data helps with:
|
|
945
|
-
* - Monitoring data completeness
|
|
946
|
-
* - Identifying data quality issues
|
|
947
|
-
* - Capacity planning
|
|
948
|
-
* - Performance optimization
|
|
949
|
-
*
|
|
950
|
-
* Note:
|
|
951
|
-
* This operation is included - no credit consumption required.
|
|
952
608
|
*/
|
|
953
609
|
const getGraphMetrics = (options) => (options.client ?? client_gen_1.client).get({
|
|
954
610
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -959,35 +615,7 @@ exports.getGraphMetrics = getGraphMetrics;
|
|
|
959
615
|
/**
|
|
960
616
|
* Get Graph Usage Analytics
|
|
961
617
|
*
|
|
962
|
-
*
|
|
963
|
-
*
|
|
964
|
-
* Provides temporal usage patterns including:
|
|
965
|
-
* - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
|
|
966
|
-
* - **Credit Analytics**: Consumption patterns, operation breakdown, cached vs billable
|
|
967
|
-
* - **Performance Insights**: Operation stats, slow queries, performance scoring
|
|
968
|
-
* - **Recent Events**: Latest usage events with full details
|
|
969
|
-
*
|
|
970
|
-
* Time ranges available:
|
|
971
|
-
* - `24h` - Last 24 hours (hourly breakdown)
|
|
972
|
-
* - `7d` - Last 7 days (daily breakdown)
|
|
973
|
-
* - `30d` - Last 30 days (daily breakdown)
|
|
974
|
-
* - `current_month` - Current billing month
|
|
975
|
-
* - `last_month` - Previous billing month
|
|
976
|
-
*
|
|
977
|
-
* Include options:
|
|
978
|
-
* - `storage` - Storage usage summary (GB-hours, averages, peaks)
|
|
979
|
-
* - `credits` - Credit consumption analytics
|
|
980
|
-
* - `performance` - Performance insights and optimization opportunities
|
|
981
|
-
* - `events` - Recent usage events (last 50)
|
|
982
|
-
*
|
|
983
|
-
* Useful for:
|
|
984
|
-
* - Billing and cost analysis
|
|
985
|
-
* - Capacity planning
|
|
986
|
-
* - Performance optimization
|
|
987
|
-
* - Usage trend analysis
|
|
988
|
-
*
|
|
989
|
-
* Note:
|
|
990
|
-
* This operation is included - no credit consumption required.
|
|
618
|
+
* Time ranges: 24h, 7d, 30d, current_month, last_month. Toggle storage, credits, performance, and events sections via query params.
|
|
991
619
|
*/
|
|
992
620
|
const getGraphUsageAnalytics = (options) => (options.client ?? client_gen_1.client).get({
|
|
993
621
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -998,74 +626,7 @@ exports.getGraphUsageAnalytics = getGraphUsageAnalytics;
|
|
|
998
626
|
/**
|
|
999
627
|
* Execute Cypher Query
|
|
1000
628
|
*
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
1003
|
-
* **IMPORTANT: Write operations depend on graph type:**
|
|
1004
|
-
* - **Main Graphs**: READ-ONLY. Write operations (CREATE, MERGE, SET, DELETE) are not allowed.
|
|
1005
|
-
* - **Subgraphs**: WRITE-ENABLED. Full Cypher write operations are supported for development and report creation.
|
|
1006
|
-
*
|
|
1007
|
-
* To load data into main graphs, use the staging pipeline:
|
|
1008
|
-
* 1. Create file upload: `POST /v1/graphs/{graph_id}/tables/{table_name}/files`
|
|
1009
|
-
* 2. Ingest to graph: `POST /v1/graphs/{graph_id}/tables/ingest`
|
|
1010
|
-
*
|
|
1011
|
-
* **Security Best Practice - Use Parameterized Queries:**
|
|
1012
|
-
* ALWAYS use query parameters instead of string interpolation to prevent injection attacks:
|
|
1013
|
-
* - ✅ SAFE: `MATCH (n:Entity {type: $entity_type}) RETURN n` with `parameters: {"entity_type": "Company"}`
|
|
1014
|
-
* - ❌ UNSAFE: `MATCH (n:Entity {type: "Company"}) RETURN n` with user input concatenated into query string
|
|
1015
|
-
*
|
|
1016
|
-
* Query parameters provide automatic escaping and type safety. All examples in this API use parameterized queries.
|
|
1017
|
-
*
|
|
1018
|
-
* This endpoint automatically selects the best execution strategy based on:
|
|
1019
|
-
* - Query characteristics (size, complexity)
|
|
1020
|
-
* - Client capabilities (SSE, NDJSON, JSON)
|
|
1021
|
-
* - System load (queue status, concurrent queries)
|
|
1022
|
-
* - User preferences (mode parameter, headers)
|
|
1023
|
-
*
|
|
1024
|
-
* **Response Modes:**
|
|
1025
|
-
* - `auto` (default): Intelligent automatic selection
|
|
1026
|
-
* - `sync`: Force synchronous JSON response (best for testing)
|
|
1027
|
-
* - `async`: Force queued response with SSE monitoring endpoints (no polling needed)
|
|
1028
|
-
* - `stream`: Force streaming response (SSE or NDJSON)
|
|
1029
|
-
*
|
|
1030
|
-
* **Client Detection:**
|
|
1031
|
-
* - Automatically detects testing tools (Postman, Swagger UI)
|
|
1032
|
-
* - Adjusts behavior for better interactive experience
|
|
1033
|
-
* - Respects Accept and Prefer headers for capabilities
|
|
1034
|
-
*
|
|
1035
|
-
* **Streaming Support (SSE):**
|
|
1036
|
-
* - Real-time events with progress updates
|
|
1037
|
-
* - Maximum 5 concurrent SSE connections per user
|
|
1038
|
-
* - Rate limited to 10 new connections per minute
|
|
1039
|
-
* - Automatic circuit breaker for Redis failures
|
|
1040
|
-
* - Graceful degradation if event system unavailable
|
|
1041
|
-
* - 30-second keepalive to prevent timeouts
|
|
1042
|
-
*
|
|
1043
|
-
* **Streaming Support (NDJSON):**
|
|
1044
|
-
* - Efficient line-delimited JSON for large results
|
|
1045
|
-
* - Automatic chunking (configurable 10-10000 rows)
|
|
1046
|
-
* - No connection limits (stateless streaming)
|
|
1047
|
-
*
|
|
1048
|
-
* **Queue Management:**
|
|
1049
|
-
* - Automatic queuing under high load
|
|
1050
|
-
* - Real-time monitoring via SSE events (no polling needed)
|
|
1051
|
-
* - Priority based on subscription tier
|
|
1052
|
-
* - Queue position and progress updates pushed via SSE
|
|
1053
|
-
* - Connect to returned `/v1/operations/{id}/stream` endpoint for updates
|
|
1054
|
-
*
|
|
1055
|
-
* **Error Handling:**
|
|
1056
|
-
* - `429 Too Many Requests`: Rate limit or connection limit exceeded
|
|
1057
|
-
* - `503 Service Unavailable`: Circuit breaker open or SSE disabled
|
|
1058
|
-
* - Clients should implement exponential backoff
|
|
1059
|
-
*
|
|
1060
|
-
* **Subgraph Support:**
|
|
1061
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1062
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1063
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1064
|
-
* Subgraphs share the same instance as their parent graph and have independent data.
|
|
1065
|
-
*
|
|
1066
|
-
* **Note:**
|
|
1067
|
-
* Query operations are included - no credit consumption required.
|
|
1068
|
-
* Queue position is based on subscription tier for priority.
|
|
629
|
+
* 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`.
|
|
1069
630
|
*/
|
|
1070
631
|
const executeCypherQuery = (options) => (options.client ?? client_gen_1.client).post({
|
|
1071
632
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1080,50 +641,7 @@ exports.executeCypherQuery = executeCypherQuery;
|
|
|
1080
641
|
/**
|
|
1081
642
|
* Get Runtime Graph Schema
|
|
1082
643
|
*
|
|
1083
|
-
*
|
|
1084
|
-
*
|
|
1085
|
-
* ## What This Returns
|
|
1086
|
-
*
|
|
1087
|
-
* This endpoint inspects the **actual current state** of the graph database and returns:
|
|
1088
|
-
* - **Node Labels**: All node types currently in the database
|
|
1089
|
-
* - **Relationship Types**: All relationship types currently in the database
|
|
1090
|
-
* - **Node Properties**: Properties discovered from actual data (up to 10 properties per node type)
|
|
1091
|
-
*
|
|
1092
|
-
* ## Runtime vs Declared Schema
|
|
1093
|
-
*
|
|
1094
|
-
* **Use this endpoint** (`/schema`) when you need to know:
|
|
1095
|
-
* - What data is ACTUALLY in the database right now
|
|
1096
|
-
* - What properties exist on real nodes
|
|
1097
|
-
* - What relationships have been created
|
|
1098
|
-
* - Current database structure for querying
|
|
1099
|
-
*
|
|
1100
|
-
* **Use `/schema/export` instead** when you need:
|
|
1101
|
-
* - The original schema definition used to create the graph
|
|
1102
|
-
* - Schema in a specific format (JSON, YAML, Cypher DDL)
|
|
1103
|
-
* - Schema for documentation or version control
|
|
1104
|
-
* - Schema to replicate in another graph
|
|
1105
|
-
*
|
|
1106
|
-
* ## Example Use Cases
|
|
1107
|
-
*
|
|
1108
|
-
* - **Building queries**: See what node labels and properties exist to write accurate Cypher
|
|
1109
|
-
* - **Data exploration**: Discover what's in an unfamiliar graph
|
|
1110
|
-
* - **Schema drift detection**: Compare runtime vs declared schema
|
|
1111
|
-
* - **API integration**: Dynamically adapt to current graph structure
|
|
1112
|
-
*
|
|
1113
|
-
* ## Performance Note
|
|
1114
|
-
*
|
|
1115
|
-
* Property discovery is limited to 10 properties per node type for performance.
|
|
1116
|
-
* For complete schema definitions, use `/schema/export`.
|
|
1117
|
-
*
|
|
1118
|
-
* ## Subgraph Support
|
|
1119
|
-
*
|
|
1120
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1121
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1122
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1123
|
-
* Each subgraph has independent schema and data. The returned schema reflects
|
|
1124
|
-
* only the specified graph/subgraph's actual structure.
|
|
1125
|
-
*
|
|
1126
|
-
* This operation is included - no credit consumption required.
|
|
644
|
+
* 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`.
|
|
1127
645
|
*/
|
|
1128
646
|
const getGraphSchema = (options) => (options.client ?? client_gen_1.client).get({
|
|
1129
647
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1134,53 +652,7 @@ exports.getGraphSchema = getGraphSchema;
|
|
|
1134
652
|
/**
|
|
1135
653
|
* Export Declared Graph Schema
|
|
1136
654
|
*
|
|
1137
|
-
*
|
|
1138
|
-
*
|
|
1139
|
-
* ## What This Returns
|
|
1140
|
-
*
|
|
1141
|
-
* This endpoint returns the **original schema definition** that was used to create the graph:
|
|
1142
|
-
* - The schema as it was **declared** during graph creation
|
|
1143
|
-
* - Complete node and relationship definitions
|
|
1144
|
-
* - Property types and constraints
|
|
1145
|
-
* - Schema metadata (name, version, type)
|
|
1146
|
-
*
|
|
1147
|
-
* ## Runtime vs Declared Schema
|
|
1148
|
-
*
|
|
1149
|
-
* **Use this endpoint** (`/schema/export`) when you need:
|
|
1150
|
-
* - The original schema definition used to create the graph
|
|
1151
|
-
* - Schema in a specific format (JSON, YAML, Cypher DDL)
|
|
1152
|
-
* - Schema for documentation or version control
|
|
1153
|
-
* - Schema to replicate in another graph
|
|
1154
|
-
*
|
|
1155
|
-
* **Use `/schema` instead** when you need:
|
|
1156
|
-
* - What data is ACTUALLY in the database right now
|
|
1157
|
-
* - What properties exist on real nodes (discovered from data)
|
|
1158
|
-
* - Current runtime database structure for querying
|
|
1159
|
-
*
|
|
1160
|
-
* ## Export Formats
|
|
1161
|
-
*
|
|
1162
|
-
* ### JSON Format (`format=json`)
|
|
1163
|
-
* Returns structured JSON with nodes, relationships, and properties.
|
|
1164
|
-
* Best for programmatic access and API integration.
|
|
1165
|
-
*
|
|
1166
|
-
* ### YAML Format (`format=yaml`)
|
|
1167
|
-
* Returns human-readable YAML with comments.
|
|
1168
|
-
* Best for documentation and configuration management.
|
|
1169
|
-
*
|
|
1170
|
-
* ### Cypher DDL Format (`format=cypher`)
|
|
1171
|
-
* Returns Cypher CREATE statements for recreating the schema.
|
|
1172
|
-
* Best for database migration and replication.
|
|
1173
|
-
*
|
|
1174
|
-
* ## Data Statistics
|
|
1175
|
-
*
|
|
1176
|
-
* Set `include_data_stats=true` to include:
|
|
1177
|
-
* - Node counts by label
|
|
1178
|
-
* - Relationship counts by type
|
|
1179
|
-
* - Total nodes and relationships
|
|
1180
|
-
*
|
|
1181
|
-
* This combines declared schema with runtime statistics.
|
|
1182
|
-
*
|
|
1183
|
-
* This operation is included - no credit consumption required.
|
|
655
|
+
* 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.
|
|
1184
656
|
*/
|
|
1185
657
|
const exportGraphSchema = (options) => (options.client ?? client_gen_1.client).get({
|
|
1186
658
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1191,35 +663,7 @@ exports.exportGraphSchema = exportGraphSchema;
|
|
|
1191
663
|
/**
|
|
1192
664
|
* Validate Schema
|
|
1193
665
|
*
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1196
|
-
* This endpoint performs comprehensive validation including:
|
|
1197
|
-
* - **Structure Validation**: Ensures proper JSON/YAML format
|
|
1198
|
-
* - **Type Checking**: Validates data types (STRING, INT, DOUBLE, etc.)
|
|
1199
|
-
* - **Constraint Verification**: Checks primary keys and unique constraints
|
|
1200
|
-
* - **Relationship Integrity**: Validates node references in relationships
|
|
1201
|
-
* - **Naming Conventions**: Ensures valid identifiers
|
|
1202
|
-
* - **Compatibility**: Checks against existing extensions if specified
|
|
1203
|
-
*
|
|
1204
|
-
* Supported formats:
|
|
1205
|
-
* - JSON schema definitions
|
|
1206
|
-
* - YAML schema definitions
|
|
1207
|
-
* - Direct dictionary format
|
|
1208
|
-
*
|
|
1209
|
-
* Validation helps prevent:
|
|
1210
|
-
* - Schema deployment failures
|
|
1211
|
-
* - Data integrity issues
|
|
1212
|
-
* - Performance problems
|
|
1213
|
-
* - Naming conflicts
|
|
1214
|
-
*
|
|
1215
|
-
* **Subgraph Support:**
|
|
1216
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1217
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1218
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1219
|
-
* Schema validation is performed against the specified graph/subgraph's current
|
|
1220
|
-
* schema and data structure.
|
|
1221
|
-
*
|
|
1222
|
-
* This operation is included - no credit consumption required.
|
|
666
|
+
* 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.
|
|
1223
667
|
*/
|
|
1224
668
|
const validateSchema = (options) => (options.client ?? client_gen_1.client).post({
|
|
1225
669
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1233,16 +677,6 @@ const validateSchema = (options) => (options.client ?? client_gen_1.client).post
|
|
|
1233
677
|
exports.validateSchema = validateSchema;
|
|
1234
678
|
/**
|
|
1235
679
|
* Get Credit Summary
|
|
1236
|
-
*
|
|
1237
|
-
* Retrieve comprehensive credit usage summary for the specified graph.
|
|
1238
|
-
*
|
|
1239
|
-
* This endpoint provides:
|
|
1240
|
-
* - Current credit balance and monthly allocation
|
|
1241
|
-
* - Credit consumption metrics for the current month
|
|
1242
|
-
* - Graph tier and credit multiplier information
|
|
1243
|
-
* - Usage percentage to help monitor credit consumption
|
|
1244
|
-
*
|
|
1245
|
-
* No credits are consumed for checking credit status.
|
|
1246
680
|
*/
|
|
1247
681
|
const getCreditSummary = (options) => (options.client ?? client_gen_1.client).get({
|
|
1248
682
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1252,22 +686,6 @@ const getCreditSummary = (options) => (options.client ?? client_gen_1.client).ge
|
|
|
1252
686
|
exports.getCreditSummary = getCreditSummary;
|
|
1253
687
|
/**
|
|
1254
688
|
* List Credit Transactions
|
|
1255
|
-
*
|
|
1256
|
-
* Retrieve detailed credit transaction history for the specified graph.
|
|
1257
|
-
*
|
|
1258
|
-
* This enhanced endpoint provides:
|
|
1259
|
-
* - Detailed transaction records with idempotency information
|
|
1260
|
-
* - Summary by operation type to identify high-consumption operations
|
|
1261
|
-
* - Date range filtering for analysis
|
|
1262
|
-
* - Metadata search capabilities
|
|
1263
|
-
*
|
|
1264
|
-
* Transaction types include:
|
|
1265
|
-
* - ALLOCATION: Monthly credit allocations
|
|
1266
|
-
* - CONSUMPTION: Credit usage for operations
|
|
1267
|
-
* - BONUS: Bonus credits added by admins
|
|
1268
|
-
* - REFUND: Credit refunds
|
|
1269
|
-
*
|
|
1270
|
-
* No credits are consumed for viewing transaction history.
|
|
1271
689
|
*/
|
|
1272
690
|
const listCreditTransactions = (options) => (options.client ?? client_gen_1.client).get({
|
|
1273
691
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1277,31 +695,6 @@ const listCreditTransactions = (options) => (options.client ?? client_gen_1.clie
|
|
|
1277
695
|
exports.listCreditTransactions = listCreditTransactions;
|
|
1278
696
|
/**
|
|
1279
697
|
* Database Health Check
|
|
1280
|
-
*
|
|
1281
|
-
* Get comprehensive health information for the graph database.
|
|
1282
|
-
*
|
|
1283
|
-
* Returns detailed health metrics including:
|
|
1284
|
-
* - **Connection Status**: Database connectivity and responsiveness
|
|
1285
|
-
* - **Performance Metrics**: Query execution times and throughput
|
|
1286
|
-
* - **Resource Usage**: Memory and storage utilization
|
|
1287
|
-
* - **Error Monitoring**: Recent error rates and patterns
|
|
1288
|
-
* - **Uptime Statistics**: Service availability metrics
|
|
1289
|
-
*
|
|
1290
|
-
* Health indicators:
|
|
1291
|
-
* - **Status**: healthy, degraded, or unhealthy
|
|
1292
|
-
* - **Query Performance**: Average execution times
|
|
1293
|
-
* - **Error Rates**: Recent failure percentages
|
|
1294
|
-
* - **Resource Usage**: Memory and storage consumption
|
|
1295
|
-
* - **Alerts**: Active warnings or issues
|
|
1296
|
-
*
|
|
1297
|
-
* **Subgraph Support:**
|
|
1298
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1299
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1300
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1301
|
-
* Health metrics are specific to the requested graph/subgraph. Subgraphs share the
|
|
1302
|
-
* same physical instance as their parent but have independent health indicators.
|
|
1303
|
-
*
|
|
1304
|
-
* This endpoint provides essential monitoring data for operational visibility.
|
|
1305
698
|
*/
|
|
1306
699
|
const getDatabaseHealth = (options) => (options.client ?? client_gen_1.client).get({
|
|
1307
700
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1311,32 +704,6 @@ const getDatabaseHealth = (options) => (options.client ?? client_gen_1.client).g
|
|
|
1311
704
|
exports.getDatabaseHealth = getDatabaseHealth;
|
|
1312
705
|
/**
|
|
1313
706
|
* Database Information
|
|
1314
|
-
*
|
|
1315
|
-
* Get comprehensive database information and statistics.
|
|
1316
|
-
*
|
|
1317
|
-
* Returns detailed database metrics including:
|
|
1318
|
-
* - **Database Metadata**: Name, path, size, and timestamps
|
|
1319
|
-
* - **Schema Information**: Node labels, relationship types, and counts
|
|
1320
|
-
* - **Storage Statistics**: Database size and usage metrics
|
|
1321
|
-
* - **Data Composition**: Node and relationship counts
|
|
1322
|
-
* - **Backup Information**: Available backups and last backup date
|
|
1323
|
-
* - **Configuration**: Read-only status and schema version
|
|
1324
|
-
*
|
|
1325
|
-
* Database statistics:
|
|
1326
|
-
* - **Size**: Storage usage in bytes and MB
|
|
1327
|
-
* - **Content**: Node and relationship counts
|
|
1328
|
-
* - **Schema**: Available labels and relationship types
|
|
1329
|
-
* - **Backup Status**: Backup availability and recency
|
|
1330
|
-
* - **Timestamps**: Creation and modification dates
|
|
1331
|
-
*
|
|
1332
|
-
* **Subgraph Support:**
|
|
1333
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1334
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1335
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1336
|
-
* Returned metrics are specific to the requested graph/subgraph. Subgraphs have
|
|
1337
|
-
* independent size, node/relationship counts, and backup status.
|
|
1338
|
-
*
|
|
1339
|
-
* This endpoint provides essential database information for capacity planning and monitoring.
|
|
1340
707
|
*/
|
|
1341
708
|
const getDatabaseInfo = (options) => (options.client ?? client_gen_1.client).get({
|
|
1342
709
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1347,19 +714,7 @@ exports.getDatabaseInfo = getDatabaseInfo;
|
|
|
1347
714
|
/**
|
|
1348
715
|
* Get Graph Operational Limits
|
|
1349
716
|
*
|
|
1350
|
-
*
|
|
1351
|
-
*
|
|
1352
|
-
* Returns all operational limits that apply to this graph including:
|
|
1353
|
-
* - **Storage Limits**: Maximum storage size and current usage
|
|
1354
|
-
* - **Query Limits**: Timeouts, complexity, row limits
|
|
1355
|
-
* - **Copy/Ingestion Limits**: File sizes, timeouts, concurrent operations
|
|
1356
|
-
* - **Backup Limits**: Frequency, retention, size limits
|
|
1357
|
-
* - **Rate Limits**: Requests per minute/hour based on tier
|
|
1358
|
-
* - **Credit Limits**: AI operation credits (if applicable)
|
|
1359
|
-
* - **Content Limits**: Per-operation materialization limits (if applicable)
|
|
1360
|
-
* - **Instance Usage**: Aggregate storage across parent + subgraphs (user graphs only)
|
|
1361
|
-
*
|
|
1362
|
-
* **Note**: Limits vary based on subscription tier (ladybug-standard, ladybug-large, ladybug-xlarge).
|
|
717
|
+
* Limits vary by subscription tier (ladybug-standard, ladybug-large, ladybug-xlarge). Includes storage, query, backup, rate, credit, and instance usage limits.
|
|
1363
718
|
*/
|
|
1364
719
|
const getGraphLimits = (options) => (options.client ?? client_gen_1.client).get({
|
|
1365
720
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1369,17 +724,6 @@ const getGraphLimits = (options) => (options.client ?? client_gen_1.client).get(
|
|
|
1369
724
|
exports.getGraphLimits = getGraphLimits;
|
|
1370
725
|
/**
|
|
1371
726
|
* List Subgraphs
|
|
1372
|
-
*
|
|
1373
|
-
* List all subgraphs for a parent graph.
|
|
1374
|
-
*
|
|
1375
|
-
* **Requirements:**
|
|
1376
|
-
* - Valid authentication
|
|
1377
|
-
* - Parent graph must exist and be accessible to the user
|
|
1378
|
-
* - User must have at least 'read' permission on the parent graph
|
|
1379
|
-
*
|
|
1380
|
-
* **Returns:**
|
|
1381
|
-
* - List of all subgraphs for the parent graph
|
|
1382
|
-
* - Each subgraph includes its ID, name, description, type, status, and creation date
|
|
1383
727
|
*/
|
|
1384
728
|
const listSubgraphs = (options) => (options.client ?? client_gen_1.client).get({
|
|
1385
729
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1390,30 +734,7 @@ exports.listSubgraphs = listSubgraphs;
|
|
|
1390
734
|
/**
|
|
1391
735
|
* Get Subgraph Details
|
|
1392
736
|
*
|
|
1393
|
-
*
|
|
1394
|
-
*
|
|
1395
|
-
* **Requirements:**
|
|
1396
|
-
* - User must have read access to parent graph
|
|
1397
|
-
* - Subgraph name must be alphanumeric (1-20 characters)
|
|
1398
|
-
*
|
|
1399
|
-
* **Response includes:**
|
|
1400
|
-
* - Full subgraph metadata
|
|
1401
|
-
* - Database statistics (nodes, edges)
|
|
1402
|
-
* - Size information
|
|
1403
|
-
* - Schema configuration
|
|
1404
|
-
* - Creation/modification timestamps
|
|
1405
|
-
* - Last access time (when available)
|
|
1406
|
-
*
|
|
1407
|
-
* **Statistics:**
|
|
1408
|
-
* Real-time statistics queried from LadybugDB:
|
|
1409
|
-
* - Node count
|
|
1410
|
-
* - Edge count
|
|
1411
|
-
* - Database size on disk
|
|
1412
|
-
* - Schema information
|
|
1413
|
-
*
|
|
1414
|
-
* **Note:**
|
|
1415
|
-
* Use the subgraph name (e.g., 'dev', 'staging') not the full subgraph ID.
|
|
1416
|
-
* The full ID is returned in the response (e.g., 'kg0123456789abcdef_dev').
|
|
737
|
+
* Pass the subgraph name (e.g., `dev`) not the full subgraph ID (e.g., `kg0123_dev`).
|
|
1417
738
|
*/
|
|
1418
739
|
const getSubgraphInfo = (options) => (options.client ?? client_gen_1.client).get({
|
|
1419
740
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1424,23 +745,7 @@ exports.getSubgraphInfo = getSubgraphInfo;
|
|
|
1424
745
|
/**
|
|
1425
746
|
* Get Subgraph Quota
|
|
1426
747
|
*
|
|
1427
|
-
*
|
|
1428
|
-
*
|
|
1429
|
-
* **Shows:**
|
|
1430
|
-
* - Current subgraph count
|
|
1431
|
-
* - Maximum allowed subgraphs per tier
|
|
1432
|
-
* - Remaining capacity
|
|
1433
|
-
* - Total size usage across all subgraphs
|
|
1434
|
-
*
|
|
1435
|
-
* **Tier Limits:**
|
|
1436
|
-
* - Standard: Up to 3 subgraphs (dedicated m7g.large instance)
|
|
1437
|
-
* - Large: Up to 10 subgraphs (dedicated r7g.large instance)
|
|
1438
|
-
* - XLarge: Up to 25 subgraphs (dedicated r7g.xlarge instance)
|
|
1439
|
-
* - Limits are defined in graph.yml deployment configuration
|
|
1440
|
-
*
|
|
1441
|
-
* **Size Tracking:**
|
|
1442
|
-
* Provides aggregate size metrics when available.
|
|
1443
|
-
* Individual subgraph sizes shown in list endpoint.
|
|
748
|
+
* Tier capacity: Standard 3, Large 10, XLarge 25 subgraphs. Use the list endpoint for per-subgraph sizes.
|
|
1444
749
|
*/
|
|
1445
750
|
const getSubgraphQuota = (options) => (options.client ?? client_gen_1.client).get({
|
|
1446
751
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1449,14 +754,9 @@ const getSubgraphQuota = (options) => (options.client ?? client_gen_1.client).ge
|
|
|
1449
754
|
});
|
|
1450
755
|
exports.getSubgraphQuota = getSubgraphQuota;
|
|
1451
756
|
/**
|
|
1452
|
-
* Get Graph
|
|
1453
|
-
*
|
|
1454
|
-
* Get subscription details for a graph or shared repository.
|
|
757
|
+
* Get Graph Subscription
|
|
1455
758
|
*
|
|
1456
|
-
*
|
|
1457
|
-
* For shared repositories (sec, industry, etc.): Returns user's personal subscription to that repository
|
|
1458
|
-
*
|
|
1459
|
-
* This unified endpoint automatically detects the resource type and returns the appropriate subscription.
|
|
759
|
+
* Detects resource type automatically: user graphs (kg*) return the graph's subscription; shared repositories return the user's personal subscription to that repo.
|
|
1460
760
|
*/
|
|
1461
761
|
const getGraphSubscription = (options) => (options.client ?? client_gen_1.client).get({
|
|
1462
762
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1467,24 +767,7 @@ exports.getGraphSubscription = getGraphSubscription;
|
|
|
1467
767
|
/**
|
|
1468
768
|
* Change Subscription Plan
|
|
1469
769
|
*
|
|
1470
|
-
*
|
|
1471
|
-
*
|
|
1472
|
-
* **For shared repositories** (sec, industry, etc.): Changes access tier (e.g., starter -> advanced).
|
|
1473
|
-
* Synchronous — takes effect immediately.
|
|
1474
|
-
*
|
|
1475
|
-
* **For user graphs** (kg*): Changes infrastructure tier (e.g., ladybug-standard -> ladybug-large).
|
|
1476
|
-
* Asynchronous — returns an `operation_id` for tracking the EBS volume migration via SSE.
|
|
1477
|
-
*
|
|
1478
|
-
* Stripe handles proration automatically for both types.
|
|
1479
|
-
*
|
|
1480
|
-
* **Requirements:**
|
|
1481
|
-
* - User must be an OWNER of their organization
|
|
1482
|
-
* - Subscription must be active
|
|
1483
|
-
* - New plan must be valid for the resource type
|
|
1484
|
-
*
|
|
1485
|
-
* **Downgrade restrictions (graphs only):**
|
|
1486
|
-
* - Subgraph count must fit the target tier's limit
|
|
1487
|
-
* - Storage usage must fit the target tier's limit
|
|
770
|
+
* 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.
|
|
1488
771
|
*/
|
|
1489
772
|
const changeSubscriptionPlan = (options) => (options.client ?? client_gen_1.client).patch({
|
|
1490
773
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1499,12 +782,7 @@ exports.changeSubscriptionPlan = changeSubscriptionPlan;
|
|
|
1499
782
|
/**
|
|
1500
783
|
* Create Repository Subscription
|
|
1501
784
|
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1504
|
-
* This endpoint is ONLY for shared repositories (sec, industry, economic).
|
|
1505
|
-
* User graph subscriptions are created automatically when the graph is provisioned.
|
|
1506
|
-
*
|
|
1507
|
-
* The subscription will be created in ACTIVE status immediately and credits will be allocated.
|
|
785
|
+
* For shared repositories only (sec, industry, etc.). User graph subscriptions are created automatically during provisioning.
|
|
1508
786
|
*/
|
|
1509
787
|
const createRepositorySubscription = (options) => (options.client ?? client_gen_1.client).post({
|
|
1510
788
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1519,40 +797,7 @@ exports.createRepositorySubscription = createRepositorySubscription;
|
|
|
1519
797
|
/**
|
|
1520
798
|
* List Staging Tables
|
|
1521
799
|
*
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1524
|
-
* Get a complete inventory of all staging tables for a graph, including
|
|
1525
|
-
* file counts, storage sizes, and row estimates. Essential for monitoring
|
|
1526
|
-
* the data pipeline and determining which tables are ready for ingestion.
|
|
1527
|
-
*
|
|
1528
|
-
* **Returned Metrics:**
|
|
1529
|
-
* - Table name and type (node/relationship)
|
|
1530
|
-
* - File count per table
|
|
1531
|
-
* - Total storage size in bytes
|
|
1532
|
-
* - Estimated row count
|
|
1533
|
-
* - S3 location pattern
|
|
1534
|
-
* - Ready-for-ingestion status
|
|
1535
|
-
*
|
|
1536
|
-
* **Use Cases:**
|
|
1537
|
-
* - Monitor data upload progress
|
|
1538
|
-
* - Check which tables have files ready
|
|
1539
|
-
* - Track storage consumption
|
|
1540
|
-
* - Validate pipeline before ingestion
|
|
1541
|
-
* - Capacity planning
|
|
1542
|
-
*
|
|
1543
|
-
* **Workflow:**
|
|
1544
|
-
* 1. List tables to see current state
|
|
1545
|
-
* 2. Upload files to empty tables
|
|
1546
|
-
* 3. Re-list to verify uploads
|
|
1547
|
-
* 4. Check file counts and sizes
|
|
1548
|
-
* 5. Ingest when ready
|
|
1549
|
-
*
|
|
1550
|
-
* **Important Notes:**
|
|
1551
|
-
* - Tables with `file_count > 0` have data ready
|
|
1552
|
-
* - Check `total_size_bytes` for storage monitoring
|
|
1553
|
-
* - Use `s3_location` to verify upload paths
|
|
1554
|
-
* - Empty tables (file_count=0) are skipped during ingestion
|
|
1555
|
-
* - Table queries are included - no credit consumption
|
|
800
|
+
* Returns file count, storage size, row count, and S3 location per table. Tables with `file_count=0` are skipped during ingestion.
|
|
1556
801
|
*/
|
|
1557
802
|
const listTables = (options) => (options.client ?? client_gen_1.client).get({
|
|
1558
803
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1563,62 +808,7 @@ exports.listTables = listTables;
|
|
|
1563
808
|
/**
|
|
1564
809
|
* Query Staging Tables with SQL
|
|
1565
810
|
*
|
|
1566
|
-
* Execute SQL
|
|
1567
|
-
*
|
|
1568
|
-
* Query raw staging data directly with SQL before ingestion into the graph database.
|
|
1569
|
-
* Useful for data quality checks, validation, and exploratory analysis.
|
|
1570
|
-
*
|
|
1571
|
-
* **Security Best Practice - Use Parameterized Queries:**
|
|
1572
|
-
* ALWAYS use query parameters instead of string concatenation to prevent SQL injection:
|
|
1573
|
-
* - ✅ SAFE: `SELECT * FROM Entity WHERE type = ? LIMIT ?` with `parameters: ["Company", 100]`
|
|
1574
|
-
* - ❌ UNSAFE: `SELECT * FROM Entity WHERE type = 'Company' LIMIT 100` with user input concatenated into SQL string
|
|
1575
|
-
*
|
|
1576
|
-
* Query parameters provide automatic escaping and type safety. Use `?` placeholders with parameters array.
|
|
1577
|
-
*
|
|
1578
|
-
* **Use Cases:**
|
|
1579
|
-
* - Validate data quality before graph ingestion
|
|
1580
|
-
* - Inspect row-level data for debugging
|
|
1581
|
-
* - Run analytics on staging tables
|
|
1582
|
-
* - Check for duplicates, nulls, or data issues
|
|
1583
|
-
* - Preview data transformations
|
|
1584
|
-
*
|
|
1585
|
-
* **Workflow:**
|
|
1586
|
-
* 1. Upload data files via `POST /tables/{table_name}/files`
|
|
1587
|
-
* 2. Query staging tables to validate: `POST /tables/query`
|
|
1588
|
-
* 3. Fix any data issues by re-uploading
|
|
1589
|
-
* 4. Ingest validated data: `POST /tables/ingest`
|
|
1590
|
-
*
|
|
1591
|
-
* **Supported SQL:**
|
|
1592
|
-
* - Full DuckDB SQL syntax
|
|
1593
|
-
* - SELECT, JOIN, WHERE, GROUP BY, ORDER BY
|
|
1594
|
-
* - Aggregations, window functions, CTEs
|
|
1595
|
-
* - Multiple table joins across staging area
|
|
1596
|
-
*
|
|
1597
|
-
* **Common Operations:**
|
|
1598
|
-
* - Count rows: `SELECT COUNT(*) FROM Entity`
|
|
1599
|
-
* - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: ["Company", 100]`
|
|
1600
|
-
* - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10`
|
|
1601
|
-
* - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING COUNT(*) > 1`
|
|
1602
|
-
* - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: [1000, "2024-01-01"]`
|
|
1603
|
-
*
|
|
1604
|
-
* **Limits:**
|
|
1605
|
-
* - Query timeout: 30 seconds
|
|
1606
|
-
* - Result limit: 10,000 rows (use LIMIT clause)
|
|
1607
|
-
* - Read-only: No INSERT, UPDATE, DELETE
|
|
1608
|
-
* - User's tables only: Cannot query other users' data
|
|
1609
|
-
*
|
|
1610
|
-
* **Subgraph Support:**
|
|
1611
|
-
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1612
|
-
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1613
|
-
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1614
|
-
* Each subgraph has its own independent staging tables.
|
|
1615
|
-
*
|
|
1616
|
-
* **Shared Repositories:**
|
|
1617
|
-
* Shared repositories (SEC, etc.) do not allow direct SQL queries.
|
|
1618
|
-
* Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query`
|
|
1619
|
-
*
|
|
1620
|
-
* **Note:**
|
|
1621
|
-
* Staging table queries are included - no credit consumption
|
|
811
|
+
* 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.
|
|
1622
812
|
*/
|
|
1623
813
|
const queryTables = (options) => (options.client ?? client_gen_1.client).post({
|
|
1624
814
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1631,9 +821,9 @@ const queryTables = (options) => (options.client ?? client_gen_1.client).post({
|
|
|
1631
821
|
});
|
|
1632
822
|
exports.queryTables = queryTables;
|
|
1633
823
|
/**
|
|
1634
|
-
* Search Documents
|
|
824
|
+
* Search Graph Documents
|
|
1635
825
|
*
|
|
1636
|
-
*
|
|
826
|
+
* Shared repositories require a subscription; subscription plan determines search rate limits.
|
|
1637
827
|
*/
|
|
1638
828
|
const searchDocuments = (options) => (options.client ?? client_gen_1.client).post({
|
|
1639
829
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1647,8 +837,6 @@ const searchDocuments = (options) => (options.client ?? client_gen_1.client).pos
|
|
|
1647
837
|
exports.searchDocuments = searchDocuments;
|
|
1648
838
|
/**
|
|
1649
839
|
* Get Document Section
|
|
1650
|
-
*
|
|
1651
|
-
* Retrieve the full text of a document section by ID.
|
|
1652
840
|
*/
|
|
1653
841
|
const getDocumentSection = (options) => (options.client ?? client_gen_1.client).get({
|
|
1654
842
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1658,8 +846,6 @@ const getDocumentSection = (options) => (options.client ?? client_gen_1.client).
|
|
|
1658
846
|
exports.getDocumentSection = getDocumentSection;
|
|
1659
847
|
/**
|
|
1660
848
|
* List Documents
|
|
1661
|
-
*
|
|
1662
|
-
* List documents for a graph from PostgreSQL.
|
|
1663
849
|
*/
|
|
1664
850
|
const listDocuments = (options) => (options.client ?? client_gen_1.client).get({
|
|
1665
851
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1670,7 +856,7 @@ exports.listDocuments = listDocuments;
|
|
|
1670
856
|
/**
|
|
1671
857
|
* Upload Document
|
|
1672
858
|
*
|
|
1673
|
-
*
|
|
859
|
+
* Stored in PostgreSQL, synced to OpenSearch for search. Not allowed on shared repositories.
|
|
1674
860
|
*/
|
|
1675
861
|
const uploadDocument = (options) => (options.client ?? client_gen_1.client).post({
|
|
1676
862
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1684,8 +870,6 @@ const uploadDocument = (options) => (options.client ?? client_gen_1.client).post
|
|
|
1684
870
|
exports.uploadDocument = uploadDocument;
|
|
1685
871
|
/**
|
|
1686
872
|
* Delete Document
|
|
1687
|
-
*
|
|
1688
|
-
* Delete a document from PostgreSQL and OpenSearch.
|
|
1689
873
|
*/
|
|
1690
874
|
const deleteDocument = (options) => (options.client ?? client_gen_1.client).delete({
|
|
1691
875
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1695,8 +879,6 @@ const deleteDocument = (options) => (options.client ?? client_gen_1.client).dele
|
|
|
1695
879
|
exports.deleteDocument = deleteDocument;
|
|
1696
880
|
/**
|
|
1697
881
|
* Get Document
|
|
1698
|
-
*
|
|
1699
|
-
* Get a document with full content from PostgreSQL.
|
|
1700
882
|
*/
|
|
1701
883
|
const getDocument = (options) => (options.client ?? client_gen_1.client).get({
|
|
1702
884
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1707,7 +889,7 @@ exports.getDocument = getDocument;
|
|
|
1707
889
|
/**
|
|
1708
890
|
* Update Document
|
|
1709
891
|
*
|
|
1710
|
-
*
|
|
892
|
+
* Updates content and/or metadata. Re-syncs to OpenSearch.
|
|
1711
893
|
*/
|
|
1712
894
|
const updateDocument = (options) => (options.client ?? client_gen_1.client).put({
|
|
1713
895
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1720,9 +902,9 @@ const updateDocument = (options) => (options.client ?? client_gen_1.client).put(
|
|
|
1720
902
|
});
|
|
1721
903
|
exports.updateDocument = updateDocument;
|
|
1722
904
|
/**
|
|
1723
|
-
* Upload Documents
|
|
905
|
+
* Bulk Upload Documents
|
|
1724
906
|
*
|
|
1725
|
-
* Upload
|
|
907
|
+
* Upload up to 50 documents at once. Partial success is supported — check the errors array in the response.
|
|
1726
908
|
*/
|
|
1727
909
|
const uploadDocumentsBulk = (options) => (options.client ?? client_gen_1.client).post({
|
|
1728
910
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1737,7 +919,7 @@ exports.uploadDocumentsBulk = uploadDocumentsBulk;
|
|
|
1737
919
|
/**
|
|
1738
920
|
* Create Subgraph
|
|
1739
921
|
*
|
|
1740
|
-
*
|
|
922
|
+
* 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.
|
|
1741
923
|
*
|
|
1742
924
|
* **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.
|
|
1743
925
|
*/
|
|
@@ -1754,7 +936,7 @@ exports.opCreateSubgraph = opCreateSubgraph;
|
|
|
1754
936
|
/**
|
|
1755
937
|
* Delete Subgraph
|
|
1756
938
|
*
|
|
1757
|
-
*
|
|
939
|
+
* Set `backup_first=true` to create a safety backup before deletion. Requires admin role on the parent graph.
|
|
1758
940
|
*
|
|
1759
941
|
* **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.
|
|
1760
942
|
*/
|
|
@@ -1771,7 +953,7 @@ exports.opDeleteSubgraph = opDeleteSubgraph;
|
|
|
1771
953
|
/**
|
|
1772
954
|
* Create Backup
|
|
1773
955
|
*
|
|
1774
|
-
*
|
|
956
|
+
* 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`.
|
|
1775
957
|
*
|
|
1776
958
|
* **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.
|
|
1777
959
|
*/
|
|
@@ -1788,10 +970,7 @@ exports.opCreateBackup = opCreateBackup;
|
|
|
1788
970
|
/**
|
|
1789
971
|
* Restore Backup
|
|
1790
972
|
*
|
|
1791
|
-
*
|
|
1792
|
-
*
|
|
1793
|
-
* Blocked for entity graphs — OLTP is the source of truth, use
|
|
1794
|
-
* the materialize operation instead.
|
|
973
|
+
* Only encrypted backups can be restored. Not allowed on entity graphs (use `materialize` instead) or shared repositories.
|
|
1795
974
|
*
|
|
1796
975
|
* **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.
|
|
1797
976
|
*/
|
|
@@ -1806,26 +985,26 @@ const opRestoreBackup = (options) => (options.client ?? client_gen_1.client).pos
|
|
|
1806
985
|
});
|
|
1807
986
|
exports.opRestoreBackup = opRestoreBackup;
|
|
1808
987
|
/**
|
|
1809
|
-
*
|
|
988
|
+
* Change Tier
|
|
1810
989
|
*
|
|
1811
|
-
*
|
|
990
|
+
* Async EBS migration (3-5 min). Valid tiers: `ladybug-standard`, `ladybug-large`, `ladybug-xlarge`.
|
|
1812
991
|
*
|
|
1813
992
|
* **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.
|
|
1814
993
|
*/
|
|
1815
|
-
const
|
|
994
|
+
const opChangeTier = (options) => (options.client ?? client_gen_1.client).post({
|
|
1816
995
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
1817
|
-
url: '/v1/graphs/{graph_id}/operations/
|
|
996
|
+
url: '/v1/graphs/{graph_id}/operations/change-tier',
|
|
1818
997
|
...options,
|
|
1819
998
|
headers: {
|
|
1820
999
|
'Content-Type': 'application/json',
|
|
1821
1000
|
...options.headers
|
|
1822
1001
|
}
|
|
1823
1002
|
});
|
|
1824
|
-
exports.
|
|
1003
|
+
exports.opChangeTier = opChangeTier;
|
|
1825
1004
|
/**
|
|
1826
1005
|
* Materialize Graph
|
|
1827
1006
|
*
|
|
1828
|
-
*
|
|
1007
|
+
* Rebuilds LadybugDB from staging tables (file uploads) or extensions OLTP data. Set `dry_run=true` to preview without changes.
|
|
1829
1008
|
*
|
|
1830
1009
|
* **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.
|
|
1831
1010
|
*/
|
|
@@ -1842,37 +1021,7 @@ exports.opMaterialize = opMaterialize;
|
|
|
1842
1021
|
/**
|
|
1843
1022
|
* List Files in Graph
|
|
1844
1023
|
*
|
|
1845
|
-
*
|
|
1846
|
-
*
|
|
1847
|
-
* Get a complete inventory of files across all tables or filtered by table name,
|
|
1848
|
-
* status, or other criteria. Files are first-class resources with independent lifecycle.
|
|
1849
|
-
*
|
|
1850
|
-
* **Query Parameters:**
|
|
1851
|
-
* - `table_name` (optional): Filter by table name
|
|
1852
|
-
* - `status` (optional): Filter by upload status (uploaded, pending, failed, etc.)
|
|
1853
|
-
*
|
|
1854
|
-
* **Use Cases:**
|
|
1855
|
-
* - Monitor file upload progress across all tables
|
|
1856
|
-
* - Verify files are ready for ingestion
|
|
1857
|
-
* - Check file metadata and sizes
|
|
1858
|
-
* - Track storage usage per graph
|
|
1859
|
-
* - Identify failed or incomplete uploads
|
|
1860
|
-
* - Audit file provenance
|
|
1861
|
-
*
|
|
1862
|
-
* **Returned Metadata:**
|
|
1863
|
-
* - File ID, name, and format (parquet, csv, json)
|
|
1864
|
-
* - Size in bytes and row count (if available)
|
|
1865
|
-
* - Upload status and timestamps
|
|
1866
|
-
* - DuckDB and graph ingestion status
|
|
1867
|
-
* - Table association
|
|
1868
|
-
*
|
|
1869
|
-
* **File Lifecycle Tracking:**
|
|
1870
|
-
* Multi-layer status across S3 → DuckDB → Graph pipeline
|
|
1871
|
-
*
|
|
1872
|
-
* **Important Notes:**
|
|
1873
|
-
* - Files are graph-scoped, not table-scoped
|
|
1874
|
-
* - Use table_name parameter to filter by table
|
|
1875
|
-
* - File listing is included - no credit consumption
|
|
1024
|
+
* Filter by `table_name` or upload `status`. Files are graph-scoped resources with S3 → DuckDB → Graph lifecycle tracking.
|
|
1876
1025
|
*/
|
|
1877
1026
|
const listFiles = (options) => (options.client ?? client_gen_1.client).get({
|
|
1878
1027
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1883,33 +1032,7 @@ exports.listFiles = listFiles;
|
|
|
1883
1032
|
/**
|
|
1884
1033
|
* Create File Upload
|
|
1885
1034
|
*
|
|
1886
|
-
*
|
|
1887
|
-
*
|
|
1888
|
-
* Initiate file upload by generating a secure, time-limited presigned S3 URL.
|
|
1889
|
-
* Files are first-class resources uploaded directly to S3.
|
|
1890
|
-
*
|
|
1891
|
-
* **Request Body:**
|
|
1892
|
-
* - `file_name`: Name of the file (1-255 characters)
|
|
1893
|
-
* - `file_format`: Format (parquet, csv, json)
|
|
1894
|
-
* - `table_name`: Table to associate file with
|
|
1895
|
-
*
|
|
1896
|
-
* **Upload Workflow:**
|
|
1897
|
-
* 1. Call this endpoint to get presigned URL
|
|
1898
|
-
* 2. PUT file directly to S3 URL
|
|
1899
|
-
* 3. Call PATCH /files/{file_id} with status='uploaded'
|
|
1900
|
-
* 4. Backend validates and stages in DuckDB immediately
|
|
1901
|
-
* 5. Background task ingests to graph
|
|
1902
|
-
*
|
|
1903
|
-
* **Supported Formats:**
|
|
1904
|
-
* - Parquet, CSV, JSON
|
|
1905
|
-
*
|
|
1906
|
-
* **Auto-Table Creation:**
|
|
1907
|
-
* Tables are automatically created if they don't exist.
|
|
1908
|
-
*
|
|
1909
|
-
* **Important Notes:**
|
|
1910
|
-
* - Presigned URLs expire (default: 1 hour)
|
|
1911
|
-
* - Files are graph-scoped, independent resources
|
|
1912
|
-
* - Upload URL generation is included - no credit consumption
|
|
1035
|
+
* 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.
|
|
1913
1036
|
*/
|
|
1914
1037
|
const createFileUpload = (options) => (options.client ?? client_gen_1.client).post({
|
|
1915
1038
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1924,41 +1047,7 @@ exports.createFileUpload = createFileUpload;
|
|
|
1924
1047
|
/**
|
|
1925
1048
|
* Delete File
|
|
1926
1049
|
*
|
|
1927
|
-
*
|
|
1928
|
-
*
|
|
1929
|
-
* Remove file from S3, database tracking, and optionally from DuckDB and graph.
|
|
1930
|
-
* Files are deleted by file_id, independent of table context.
|
|
1931
|
-
*
|
|
1932
|
-
* **Query Parameters:**
|
|
1933
|
-
* - `cascade` (optional, default=false): Delete from all layers including DuckDB
|
|
1934
|
-
*
|
|
1935
|
-
* **What Happens (cascade=false):**
|
|
1936
|
-
* 1. File deleted from S3
|
|
1937
|
-
* 2. Database record removed
|
|
1938
|
-
* 3. Table statistics updated
|
|
1939
|
-
*
|
|
1940
|
-
* **What Happens (cascade=true):**
|
|
1941
|
-
* 1. File data deleted from all DuckDB tables (by file_id)
|
|
1942
|
-
* 2. Graph marked as stale
|
|
1943
|
-
* 3. File deleted from S3
|
|
1944
|
-
* 4. Database record removed
|
|
1945
|
-
* 5. Table statistics updated
|
|
1946
|
-
*
|
|
1947
|
-
* **Use Cases:**
|
|
1948
|
-
* - Remove incorrect or duplicate files
|
|
1949
|
-
* - Clean up failed uploads
|
|
1950
|
-
* - Delete files before graph ingestion
|
|
1951
|
-
* - Surgical data removal with cascade
|
|
1952
|
-
*
|
|
1953
|
-
* **Security:**
|
|
1954
|
-
* - Write access required
|
|
1955
|
-
* - Shared repositories block deletions
|
|
1956
|
-
* - Full audit trail
|
|
1957
|
-
*
|
|
1958
|
-
* **Important:**
|
|
1959
|
-
* - Use cascade=true for immediate DuckDB cleanup
|
|
1960
|
-
* - Graph rebuild recommended after cascade deletion
|
|
1961
|
-
* - File deletion is included - no credit consumption
|
|
1050
|
+
* 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.
|
|
1962
1051
|
*/
|
|
1963
1052
|
const deleteFile = (options) => (options.client ?? client_gen_1.client).delete({
|
|
1964
1053
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1969,41 +1058,7 @@ exports.deleteFile = deleteFile;
|
|
|
1969
1058
|
/**
|
|
1970
1059
|
* Get File Information
|
|
1971
1060
|
*
|
|
1972
|
-
*
|
|
1973
|
-
*
|
|
1974
|
-
* Retrieve comprehensive metadata for a single file by file_id, independent of
|
|
1975
|
-
* table context. Files are first-class resources with complete lifecycle tracking.
|
|
1976
|
-
*
|
|
1977
|
-
* **Returned Information:**
|
|
1978
|
-
* - File ID, name, format, size
|
|
1979
|
-
* - Upload status and timestamps
|
|
1980
|
-
* - **Enhanced Multi-Layer Status** (new in this version):
|
|
1981
|
-
* - S3 layer: upload_status, uploaded_at, size_bytes, row_count
|
|
1982
|
-
* - DuckDB layer: duckdb_status, duckdb_staged_at, duckdb_row_count
|
|
1983
|
-
* - Graph layer: graph_status, graph_ingested_at
|
|
1984
|
-
* - Table association
|
|
1985
|
-
* - S3 location
|
|
1986
|
-
*
|
|
1987
|
-
* **Multi-Layer Pipeline Visibility:**
|
|
1988
|
-
* The `layers` object provides independent status tracking across the three-tier
|
|
1989
|
-
* data pipeline:
|
|
1990
|
-
* - **S3 (Immutable Source)**: File upload and validation
|
|
1991
|
-
* - **DuckDB (Mutable Staging)**: Immediate queryability with file provenance
|
|
1992
|
-
* - **Graph (Immutable View)**: Optional graph database materialization
|
|
1993
|
-
*
|
|
1994
|
-
* Each layer shows its own status, timestamp, and row count (where applicable),
|
|
1995
|
-
* enabling precise debugging and monitoring of the data ingestion flow.
|
|
1996
|
-
*
|
|
1997
|
-
* **Use Cases:**
|
|
1998
|
-
* - Validate file upload completion
|
|
1999
|
-
* - Monitor multi-layer ingestion progress in real-time
|
|
2000
|
-
* - Debug upload or staging issues at specific layers
|
|
2001
|
-
* - Verify file metadata and row counts
|
|
2002
|
-
* - Track file provenance through the pipeline
|
|
2003
|
-
* - Identify bottlenecks in the ingestion process
|
|
2004
|
-
*
|
|
2005
|
-
* **Note:**
|
|
2006
|
-
* File info retrieval is included - no credit consumption
|
|
1061
|
+
* Returns per-layer status (`layers.s3`, `layers.duckdb`, `layers.graph`) for pipeline debugging.
|
|
2007
1062
|
*/
|
|
2008
1063
|
const getFile = (options) => (options.client ?? client_gen_1.client).get({
|
|
2009
1064
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2014,32 +1069,7 @@ exports.getFile = getFile;
|
|
|
2014
1069
|
/**
|
|
2015
1070
|
* Update File Status
|
|
2016
1071
|
*
|
|
2017
|
-
*
|
|
2018
|
-
*
|
|
2019
|
-
* Update file status after upload completion. Setting status='uploaded' triggers
|
|
2020
|
-
* immediate DuckDB staging and optional graph ingestion.
|
|
2021
|
-
*
|
|
2022
|
-
* **Request Body:**
|
|
2023
|
-
* - `status`: New status (uploaded, disabled, failed)
|
|
2024
|
-
* - `ingest_to_graph` (optional): If true, auto-ingest to graph after DuckDB staging
|
|
2025
|
-
*
|
|
2026
|
-
* **What Happens (status='uploaded'):**
|
|
2027
|
-
* 1. File validated in S3
|
|
2028
|
-
* 2. Row count calculated
|
|
2029
|
-
* 3. DuckDB staging triggered immediately (background task)
|
|
2030
|
-
* 4. If ingest_to_graph=true, graph ingestion queued
|
|
2031
|
-
* 5. File queryable in DuckDB within seconds
|
|
2032
|
-
*
|
|
2033
|
-
* **Use Cases:**
|
|
2034
|
-
* - Signal upload completion
|
|
2035
|
-
* - Trigger immediate DuckDB staging
|
|
2036
|
-
* - Enable/disable files
|
|
2037
|
-
* - Mark failed uploads
|
|
2038
|
-
*
|
|
2039
|
-
* **Important:**
|
|
2040
|
-
* - Files must exist in S3 before marking uploaded
|
|
2041
|
-
* - DuckDB staging happens asynchronously
|
|
2042
|
-
* - Graph ingestion is optional (ingest_to_graph flag)
|
|
1072
|
+
* 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.
|
|
2043
1073
|
*/
|
|
2044
1074
|
const updateFile = (options) => (options.client ?? client_gen_1.client).patch({
|
|
2045
1075
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2052,49 +1082,7 @@ const updateFile = (options) => (options.client ?? client_gen_1.client).patch({
|
|
|
2052
1082
|
});
|
|
2053
1083
|
exports.updateFile = updateFile;
|
|
2054
1084
|
/**
|
|
2055
|
-
*
|
|
2056
|
-
*
|
|
2057
|
-
* List all graph databases and shared repositories accessible to the current user.
|
|
2058
|
-
*
|
|
2059
|
-
* Returns a unified list of both user-created graphs and shared repositories (like SEC data)
|
|
2060
|
-
* that the user has access to, including their role/access level and selection status.
|
|
2061
|
-
*
|
|
2062
|
-
* **Returned Information:**
|
|
2063
|
-
* - Graph/Repository ID and display name
|
|
2064
|
-
* - User's role/access level (admin/member for graphs, read/write/admin for repositories)
|
|
2065
|
-
* - Selection status (only user graphs can be selected)
|
|
2066
|
-
* - Creation timestamp
|
|
2067
|
-
* - Repository type indicator (isRepository: true for shared repositories)
|
|
2068
|
-
*
|
|
2069
|
-
* **User Graphs (isRepository: false):**
|
|
2070
|
-
* - Collaborative workspaces that can be shared with other users
|
|
2071
|
-
* - Roles: `admin` (full access, can invite users) or `member` (read/write access)
|
|
2072
|
-
* - Can be selected as active workspace
|
|
2073
|
-
* - Graphs you create or have been invited to
|
|
2074
|
-
*
|
|
2075
|
-
* **Shared Repositories (isRepository: true):**
|
|
2076
|
-
* - Read-only data repositories (e.g., SEC filings)
|
|
2077
|
-
* - Access levels: `read`, `write` (for data contributions), `admin`
|
|
2078
|
-
* - Cannot be selected (each has separate subscription)
|
|
2079
|
-
* - Require separate subscriptions (personal, cannot be shared)
|
|
2080
|
-
*
|
|
2081
|
-
* **Selected Graph Concept:**
|
|
2082
|
-
* The "selected" graph is the user's currently active workspace (user graphs only).
|
|
2083
|
-
* Many API operations default to the selected graph if no graph_id is provided.
|
|
2084
|
-
* Users can change their selected graph via `POST /v1/graphs/{graph_id}/select`.
|
|
2085
|
-
*
|
|
2086
|
-
* **Use Cases:**
|
|
2087
|
-
* - Display unified graph/repository selector in UI
|
|
2088
|
-
* - Show all accessible data sources (both owned graphs and subscribed repositories)
|
|
2089
|
-
* - Identify currently active workspace
|
|
2090
|
-
* - Filter by type (user graphs vs repositories)
|
|
2091
|
-
*
|
|
2092
|
-
* **Empty Response:**
|
|
2093
|
-
* New users receive an empty list with `selectedGraphId: null`. Users should create
|
|
2094
|
-
* a graph or subscribe to a repository.
|
|
2095
|
-
*
|
|
2096
|
-
* **Note:**
|
|
2097
|
-
* Graph listing is included - no credit consumption required.
|
|
1085
|
+
* List User Graphs and Repositories
|
|
2098
1086
|
*/
|
|
2099
1087
|
const getGraphs = (options) => (options?.client ?? client_gen_1.client).get({
|
|
2100
1088
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2105,72 +1093,7 @@ exports.getGraphs = getGraphs;
|
|
|
2105
1093
|
/**
|
|
2106
1094
|
* Create New Graph Database
|
|
2107
1095
|
*
|
|
2108
|
-
*
|
|
2109
|
-
*
|
|
2110
|
-
* This endpoint starts an asynchronous graph creation operation and returns
|
|
2111
|
-
* connection details for monitoring progress via Server-Sent Events (SSE).
|
|
2112
|
-
*
|
|
2113
|
-
* **Graph Creation Options:**
|
|
2114
|
-
*
|
|
2115
|
-
* 1. **Entity Graph with Initial Entity** (`initial_entity` provided, `create_entity=True`):
|
|
2116
|
-
* - Creates graph structure with entity schema extensions
|
|
2117
|
-
* - Populates an initial entity node with provided data
|
|
2118
|
-
* - Useful when you want a pre-configured entity to start with
|
|
2119
|
-
* - Example: Creating a company graph with the company already populated
|
|
2120
|
-
*
|
|
2121
|
-
* 2. **Entity Graph without Initial Entity** (`initial_entity=None`, `create_entity=False`):
|
|
2122
|
-
* - Creates graph structure with entity schema extensions
|
|
2123
|
-
* - Graph starts empty, ready for data import
|
|
2124
|
-
* - Useful for bulk data imports or custom workflows
|
|
2125
|
-
* - Example: Creating a graph structure before importing from CSV/API
|
|
2126
|
-
*
|
|
2127
|
-
* 3. **Generic Graph** (no `initial_entity` provided):
|
|
2128
|
-
* - Creates empty graph with custom schema extensions
|
|
2129
|
-
* - General-purpose knowledge graph
|
|
2130
|
-
* - Example: Analytics graphs, custom data models
|
|
2131
|
-
*
|
|
2132
|
-
* **Required Fields:**
|
|
2133
|
-
* - `metadata.graph_name`: Unique name for the graph
|
|
2134
|
-
* - `instance_tier`: Resource tier (ladybug-standard, ladybug-large, ladybug-xlarge)
|
|
2135
|
-
*
|
|
2136
|
-
* **Optional Fields:**
|
|
2137
|
-
* - `metadata.description`: Human-readable description of the graph's purpose
|
|
2138
|
-
* - `metadata.schema_extensions`: List of schema extensions (roboledger, roboinvestor, etc.)
|
|
2139
|
-
* - `tags`: Organizational tags (max 10)
|
|
2140
|
-
* - `initial_entity`: Entity data (required for entity graphs with initial data)
|
|
2141
|
-
* - `create_entity`: Whether to populate initial entity (default: true when initial_entity provided)
|
|
2142
|
-
*
|
|
2143
|
-
* **Monitoring Progress:**
|
|
2144
|
-
* Use the returned `operation_id` to connect to the SSE stream:
|
|
2145
|
-
* ```javascript
|
|
2146
|
-
* const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
2147
|
-
* eventSource.onmessage = (event) => {
|
|
2148
|
-
* const data = JSON.parse(event.data);
|
|
2149
|
-
* console.log('Progress:', data.progress_percent + '%');
|
|
2150
|
-
* };
|
|
2151
|
-
* ```
|
|
2152
|
-
*
|
|
2153
|
-
* **SSE Connection Limits:**
|
|
2154
|
-
* - Maximum 5 concurrent SSE connections per user
|
|
2155
|
-
* - Rate limited to 10 new connections per minute
|
|
2156
|
-
* - Automatic circuit breaker for Redis failures
|
|
2157
|
-
* - Graceful degradation if event system unavailable
|
|
2158
|
-
*
|
|
2159
|
-
* **Events Emitted:**
|
|
2160
|
-
* - `operation_started`: Graph creation begins
|
|
2161
|
-
* - `operation_progress`: Schema loading, database setup, etc.
|
|
2162
|
-
* - `operation_completed`: Graph ready with connection details
|
|
2163
|
-
* - `operation_error`: Creation failed with error details
|
|
2164
|
-
*
|
|
2165
|
-
* **Error Handling:**
|
|
2166
|
-
* - `429 Too Many Requests`: SSE connection limit exceeded
|
|
2167
|
-
* - `503 Service Unavailable`: SSE system temporarily disabled
|
|
2168
|
-
* - Clients should implement exponential backoff on errors
|
|
2169
|
-
*
|
|
2170
|
-
* **Response includes:**
|
|
2171
|
-
* - `operation_id`: Unique identifier for monitoring
|
|
2172
|
-
* - `_links.stream`: SSE endpoint for real-time updates
|
|
2173
|
-
* - `_links.status`: Point-in-time status check endpoint
|
|
1096
|
+
* 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.
|
|
2174
1097
|
*/
|
|
2175
1098
|
const createGraph = (options) => (options.client ?? client_gen_1.client).post({
|
|
2176
1099
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2184,35 +1107,6 @@ const createGraph = (options) => (options.client ?? client_gen_1.client).post({
|
|
|
2184
1107
|
exports.createGraph = createGraph;
|
|
2185
1108
|
/**
|
|
2186
1109
|
* Get Available Schema Extensions
|
|
2187
|
-
*
|
|
2188
|
-
* List all available schema extensions for graph creation.
|
|
2189
|
-
*
|
|
2190
|
-
* Schema extensions provide pre-built industry-specific data models that extend
|
|
2191
|
-
* the base graph schema with specialized nodes, relationships, and properties.
|
|
2192
|
-
*
|
|
2193
|
-
* **Available Extensions:**
|
|
2194
|
-
* - **RoboLedger**: Complete accounting system with XBRL reporting, general ledger, and financial statements
|
|
2195
|
-
* - **RoboInvestor**: Investment portfolio management with securities tracking, trade execution, and risk analysis
|
|
2196
|
-
* - **RoboSCM**: Supply chain management and logistics
|
|
2197
|
-
* - **RoboFO**: Front office operations and CRM
|
|
2198
|
-
* - **RoboHRM**: Human resources management
|
|
2199
|
-
* - **RoboEPM**: Enterprise performance management
|
|
2200
|
-
* - **RoboReport**: Business intelligence and reporting
|
|
2201
|
-
*
|
|
2202
|
-
* **Extension Information:**
|
|
2203
|
-
* Each extension includes:
|
|
2204
|
-
* - Display name and description
|
|
2205
|
-
* - Node and relationship counts
|
|
2206
|
-
* - Context-aware capabilities (e.g., SEC repositories get different features than entity graphs)
|
|
2207
|
-
*
|
|
2208
|
-
* **Use Cases:**
|
|
2209
|
-
* - Browse available extensions before creating a graph
|
|
2210
|
-
* - Understand extension capabilities and data models
|
|
2211
|
-
* - Plan graph schema based on business requirements
|
|
2212
|
-
* - Combine multiple extensions for comprehensive data modeling
|
|
2213
|
-
*
|
|
2214
|
-
* **Note:**
|
|
2215
|
-
* Extension listing is included - no credit consumption required.
|
|
2216
1110
|
*/
|
|
2217
1111
|
const getAvailableExtensions = (options) => (options?.client ?? client_gen_1.client).get({
|
|
2218
1112
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2222,32 +1116,6 @@ const getAvailableExtensions = (options) => (options?.client ?? client_gen_1.cli
|
|
|
2222
1116
|
exports.getAvailableExtensions = getAvailableExtensions;
|
|
2223
1117
|
/**
|
|
2224
1118
|
* Get Available Graph Tiers
|
|
2225
|
-
*
|
|
2226
|
-
* List all available graph database tier configurations.
|
|
2227
|
-
*
|
|
2228
|
-
* This endpoint provides comprehensive technical specifications for each available
|
|
2229
|
-
* graph database tier, including instance types, resource limits, and features.
|
|
2230
|
-
*
|
|
2231
|
-
* **Tier Information:**
|
|
2232
|
-
* Each tier includes:
|
|
2233
|
-
* - Technical specifications (instance type, memory, storage)
|
|
2234
|
-
* - Resource limits (subgraphs, credits, rate limits)
|
|
2235
|
-
* - Feature list with capabilities
|
|
2236
|
-
* - Availability status
|
|
2237
|
-
*
|
|
2238
|
-
* **Available Tiers:**
|
|
2239
|
-
* - **ladybug-standard**: Dedicated entry-level tier
|
|
2240
|
-
* - **ladybug-large**: Dedicated professional tier with subgraph support
|
|
2241
|
-
* - **ladybug-xlarge**: Enterprise tier with maximum resources
|
|
2242
|
-
*
|
|
2243
|
-
* **Use Cases:**
|
|
2244
|
-
* - Display tier options in graph creation UI
|
|
2245
|
-
* - Show technical specifications for tier selection
|
|
2246
|
-
* - Validate tier availability before graph creation
|
|
2247
|
-
* - Display feature comparisons
|
|
2248
|
-
*
|
|
2249
|
-
* **Note:**
|
|
2250
|
-
* Tier listing is included - no credit consumption required.
|
|
2251
1119
|
*/
|
|
2252
1120
|
const getAvailableGraphTiers = (options) => (options?.client ?? client_gen_1.client).get({
|
|
2253
1121
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2258,26 +1126,7 @@ exports.getAvailableGraphTiers = getAvailableGraphTiers;
|
|
|
2258
1126
|
/**
|
|
2259
1127
|
* Get Graph Tier Capacity
|
|
2260
1128
|
*
|
|
2261
|
-
*
|
|
2262
|
-
*
|
|
2263
|
-
* Returns a status per tier indicating whether instances are immediately available,
|
|
2264
|
-
* can be provisioned on demand, or are at capacity.
|
|
2265
|
-
*
|
|
2266
|
-
* **Status Values:**
|
|
2267
|
-
* - `ready` — An instance slot is available; graph creation will succeed immediately
|
|
2268
|
-
* - `scalable` — No slots right now, but a new instance can be provisioned (3-5 min)
|
|
2269
|
-
* - `at_capacity` — Tier is full and cannot auto-scale; contact support
|
|
2270
|
-
*
|
|
2271
|
-
* **Use Cases:**
|
|
2272
|
-
* - Pre-flight check before entering the graph creation wizard
|
|
2273
|
-
* - Show availability badges on tier selection cards
|
|
2274
|
-
* - Gate tier selection and show contact form for at-capacity tiers
|
|
2275
|
-
*
|
|
2276
|
-
* **Caching:**
|
|
2277
|
-
* Results are cached for 60 seconds to avoid excessive infrastructure queries.
|
|
2278
|
-
*
|
|
2279
|
-
* **Note:**
|
|
2280
|
-
* No credit consumption required. Does not expose instance counts or IPs.
|
|
1129
|
+
* Status per tier: `ready` (slot available), `scalable` (can provision, 3-5 min), `at_capacity` (contact support). Cached 60s.
|
|
2281
1130
|
*/
|
|
2282
1131
|
const getGraphCapacity = (options) => (options?.client ?? client_gen_1.client).get({
|
|
2283
1132
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2287,36 +1136,6 @@ const getGraphCapacity = (options) => (options?.client ?? client_gen_1.client).g
|
|
|
2287
1136
|
exports.getGraphCapacity = getGraphCapacity;
|
|
2288
1137
|
/**
|
|
2289
1138
|
* Select Graph
|
|
2290
|
-
*
|
|
2291
|
-
* Select a specific graph as the active workspace for the user.
|
|
2292
|
-
*
|
|
2293
|
-
* The selected graph becomes the default context for operations in client applications
|
|
2294
|
-
* and can be used to maintain user workspace preferences across sessions.
|
|
2295
|
-
*
|
|
2296
|
-
* **Functionality:**
|
|
2297
|
-
* - Sets the specified graph as the user's currently selected graph
|
|
2298
|
-
* - Deselects any previously selected graph (only one can be selected at a time)
|
|
2299
|
-
* - Persists selection across sessions until changed
|
|
2300
|
-
* - Returns confirmation with the selected graph ID
|
|
2301
|
-
*
|
|
2302
|
-
* **Requirements:**
|
|
2303
|
-
* - User must have access to the graph (as admin or member)
|
|
2304
|
-
* - Graph must exist and not be deleted
|
|
2305
|
-
* - User can only select graphs they have permission to access
|
|
2306
|
-
*
|
|
2307
|
-
* **Use Cases:**
|
|
2308
|
-
* - Switch between multiple graphs in a multi-graph environment
|
|
2309
|
-
* - Set default workspace after creating a new graph
|
|
2310
|
-
* - Restore user's preferred workspace on login
|
|
2311
|
-
* - Support graph context switching in client applications
|
|
2312
|
-
*
|
|
2313
|
-
* **Client Integration:**
|
|
2314
|
-
* Many client operations can default to the selected graph, simplifying API calls
|
|
2315
|
-
* by eliminating the need to specify graph_id repeatedly. Check the selected
|
|
2316
|
-
* graph with `GET /v1/graphs` which returns `selectedGraphId`.
|
|
2317
|
-
*
|
|
2318
|
-
* **Note:**
|
|
2319
|
-
* Graph selection is included - no credit consumption required.
|
|
2320
1139
|
*/
|
|
2321
1140
|
const selectGraph = (options) => (options.client ?? client_gen_1.client).post({
|
|
2322
1141
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2327,81 +1146,14 @@ exports.selectGraph = selectGraph;
|
|
|
2327
1146
|
/**
|
|
2328
1147
|
* Get Service Offerings
|
|
2329
1148
|
*
|
|
2330
|
-
*
|
|
2331
|
-
*
|
|
2332
|
-
* This endpoint provides complete information about both graph database subscriptions
|
|
2333
|
-
* and shared repository subscriptions. This is the primary endpoint for frontend
|
|
2334
|
-
* applications to display subscription options.
|
|
2335
|
-
*
|
|
2336
|
-
* **Pricing Model:**
|
|
2337
|
-
* - Graph subscriptions are **per-graph** with infrastructure-based pricing
|
|
2338
|
-
* - Each graph you create has its own monthly subscription
|
|
2339
|
-
* - Organizations can have multiple graphs with different infrastructure tiers
|
|
2340
|
-
* - Credits are allocated per-graph, not shared across organization
|
|
2341
|
-
*
|
|
2342
|
-
* Includes:
|
|
2343
|
-
* - Graph infrastructure tiers (ladybug-standard, ladybug-large, ladybug-xlarge) - per-graph pricing
|
|
2344
|
-
* - Shared repository subscriptions - org-level
|
|
2345
|
-
* - Operation costs and credit information
|
|
2346
|
-
* - Features and capabilities for each tier
|
|
2347
|
-
* - Enabled/disabled status for repositories
|
|
2348
|
-
*
|
|
2349
|
-
* All data comes from the config-based systems to ensure accuracy with backend behavior.
|
|
2350
|
-
*
|
|
2351
|
-
* No authentication required - this is public service information.
|
|
1149
|
+
* Returns all subscription tiers, shared repository plans, and AI credit costs. No authentication required.
|
|
2352
1150
|
*/
|
|
2353
1151
|
const getServiceOfferings = (options) => (options?.client ?? client_gen_1.client).get({ url: '/v1/offering', ...options });
|
|
2354
1152
|
exports.getServiceOfferings = getServiceOfferings;
|
|
2355
1153
|
/**
|
|
2356
1154
|
* Stream Operation Events
|
|
2357
1155
|
*
|
|
2358
|
-
*
|
|
2359
|
-
*
|
|
2360
|
-
* This endpoint provides real-time monitoring for all non-immediate operations including:
|
|
2361
|
-
* - Graph creation and management
|
|
2362
|
-
* - Agent analysis processing
|
|
2363
|
-
* - Database backups and restores
|
|
2364
|
-
* - Data synchronization tasks
|
|
2365
|
-
*
|
|
2366
|
-
* **Event Types:**
|
|
2367
|
-
* - `operation_started`: Operation began execution
|
|
2368
|
-
* - `operation_progress`: Progress update with details
|
|
2369
|
-
* - `operation_completed`: Operation finished successfully
|
|
2370
|
-
* - `operation_error`: Operation failed with error details
|
|
2371
|
-
* - `operation_cancelled`: Operation was cancelled
|
|
2372
|
-
*
|
|
2373
|
-
* **Features:**
|
|
2374
|
-
* - **Event Replay**: Use `from_sequence` parameter to replay missed events
|
|
2375
|
-
* - **Automatic Reconnection**: Client can reconnect and resume from last seen event
|
|
2376
|
-
* - **Real-time Updates**: Live progress updates during execution
|
|
2377
|
-
* - **Timeout Handling**: 30-second keepalive messages prevent connection timeouts
|
|
2378
|
-
* - **Graceful Degradation**: Automatic fallback if Redis is unavailable
|
|
2379
|
-
*
|
|
2380
|
-
* **Connection Limits:**
|
|
2381
|
-
* - Maximum 5 concurrent SSE connections per user
|
|
2382
|
-
* - Rate limited to 10 new connections per minute
|
|
2383
|
-
* - Automatic cleanup of stale connections
|
|
2384
|
-
* - Circuit breaker protection for Redis failures
|
|
2385
|
-
*
|
|
2386
|
-
* **Client Usage:**
|
|
2387
|
-
* ```javascript
|
|
2388
|
-
* const eventSource = new EventSource('/v1/operations/abc123/stream');
|
|
2389
|
-
* eventSource.onmessage = (event) => {
|
|
2390
|
-
* const data = JSON.parse(event.data);
|
|
2391
|
-
* console.log('Progress:', data);
|
|
2392
|
-
* };
|
|
2393
|
-
* eventSource.onerror = (error) => {
|
|
2394
|
-
* // Handle connection errors or rate limits
|
|
2395
|
-
* console.error('SSE Error:', error);
|
|
2396
|
-
* };
|
|
2397
|
-
* ```
|
|
2398
|
-
*
|
|
2399
|
-
* **Error Handling:**
|
|
2400
|
-
* - `429 Too Many Requests`: Connection limit or rate limit exceeded
|
|
2401
|
-
* - `503 Service Unavailable`: SSE system temporarily disabled
|
|
2402
|
-
* - Clients should implement exponential backoff on errors
|
|
2403
|
-
*
|
|
2404
|
-
* **No credits are consumed for SSE connections.**
|
|
1156
|
+
* 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.
|
|
2405
1157
|
*/
|
|
2406
1158
|
const streamOperationEvents = (options) => (options.client ?? client_gen_1.client).get({
|
|
2407
1159
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2412,19 +1164,7 @@ exports.streamOperationEvents = streamOperationEvents;
|
|
|
2412
1164
|
/**
|
|
2413
1165
|
* Get Operation Status
|
|
2414
1166
|
*
|
|
2415
|
-
*
|
|
2416
|
-
*
|
|
2417
|
-
* Returns detailed information including:
|
|
2418
|
-
* - Current status (pending, running, completed, failed, cancelled)
|
|
2419
|
-
* - Creation and update timestamps
|
|
2420
|
-
* - Operation type and associated graph
|
|
2421
|
-
* - Result data (for completed operations)
|
|
2422
|
-
* - Error details (for failed operations)
|
|
2423
|
-
*
|
|
2424
|
-
* This endpoint provides a point-in-time status check, while the `/stream` endpoint
|
|
2425
|
-
* provides real-time updates. Use this for polling or initial status checks.
|
|
2426
|
-
*
|
|
2427
|
-
* **No credits are consumed for status checks.**
|
|
1167
|
+
* Point-in-time status check. Use `/stream` for real-time updates. Consumes no credits.
|
|
2428
1168
|
*/
|
|
2429
1169
|
const getOperationStatus = (options) => (options.client ?? client_gen_1.client).get({
|
|
2430
1170
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2435,15 +1175,7 @@ exports.getOperationStatus = getOperationStatus;
|
|
|
2435
1175
|
/**
|
|
2436
1176
|
* Cancel Operation
|
|
2437
1177
|
*
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
2440
|
-
* Cancels the specified operation if it's still in progress. Once cancelled,
|
|
2441
|
-
* the operation cannot be resumed and will emit a cancellation event to any
|
|
2442
|
-
* active SSE connections.
|
|
2443
|
-
*
|
|
2444
|
-
* **Note**: Completed or already failed operations cannot be cancelled.
|
|
2445
|
-
*
|
|
2446
|
-
* **No credits are consumed for cancellation requests.**
|
|
1178
|
+
* Cancels a pending or running operation. Emits a cancellation event to any active SSE connections. Cannot cancel completed or failed operations.
|
|
2447
1179
|
*/
|
|
2448
1180
|
const cancelOperation = (options) => (options.client ?? client_gen_1.client).delete({
|
|
2449
1181
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2454,13 +1186,7 @@ exports.cancelOperation = cancelOperation;
|
|
|
2454
1186
|
/**
|
|
2455
1187
|
* Get Organization Customer Info
|
|
2456
1188
|
*
|
|
2457
|
-
*
|
|
2458
|
-
*
|
|
2459
|
-
* Returns customer details, payment methods, and whether invoice billing is enabled.
|
|
2460
|
-
*
|
|
2461
|
-
* **Requirements:**
|
|
2462
|
-
* - User must be a member of the organization
|
|
2463
|
-
* - Sensitive payment details are only visible to owners
|
|
1189
|
+
* Payment method details are only visible to org owners.
|
|
2464
1190
|
*/
|
|
2465
1191
|
const getOrgBillingCustomer = (options) => (options.client ?? client_gen_1.client).get({
|
|
2466
1192
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2471,19 +1197,7 @@ exports.getOrgBillingCustomer = getOrgBillingCustomer;
|
|
|
2471
1197
|
/**
|
|
2472
1198
|
* Create Customer Portal Session
|
|
2473
1199
|
*
|
|
2474
|
-
*
|
|
2475
|
-
*
|
|
2476
|
-
* The portal allows users to:
|
|
2477
|
-
* - Add new payment methods
|
|
2478
|
-
* - Remove existing payment methods
|
|
2479
|
-
* - Update default payment method
|
|
2480
|
-
* - View billing history
|
|
2481
|
-
*
|
|
2482
|
-
* The user will be redirected to Stripe's hosted portal page and returned to the billing page when done.
|
|
2483
|
-
*
|
|
2484
|
-
* **Requirements:**
|
|
2485
|
-
* - User must be an OWNER of the organization
|
|
2486
|
-
* - Organization must have a Stripe customer ID (i.e., has gone through checkout at least once)
|
|
1200
|
+
* Returns a Stripe Customer Portal URL for managing payment methods and billing history. Requires org owner role.
|
|
2487
1201
|
*/
|
|
2488
1202
|
const createPortalSession = (options) => (options.client ?? client_gen_1.client).post({
|
|
2489
1203
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2493,13 +1207,6 @@ const createPortalSession = (options) => (options.client ?? client_gen_1.client)
|
|
|
2493
1207
|
exports.createPortalSession = createPortalSession;
|
|
2494
1208
|
/**
|
|
2495
1209
|
* List Organization Subscriptions
|
|
2496
|
-
*
|
|
2497
|
-
* List all active and past subscriptions for an organization.
|
|
2498
|
-
*
|
|
2499
|
-
* Includes both graph and repository subscriptions with their status, pricing, and billing information.
|
|
2500
|
-
*
|
|
2501
|
-
* **Requirements:**
|
|
2502
|
-
* - User must be a member of the organization
|
|
2503
1210
|
*/
|
|
2504
1211
|
const listOrgSubscriptions = (options) => (options.client ?? client_gen_1.client).get({
|
|
2505
1212
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2509,11 +1216,6 @@ const listOrgSubscriptions = (options) => (options.client ?? client_gen_1.client
|
|
|
2509
1216
|
exports.listOrgSubscriptions = listOrgSubscriptions;
|
|
2510
1217
|
/**
|
|
2511
1218
|
* Get Organization Subscription Details
|
|
2512
|
-
*
|
|
2513
|
-
* Get detailed information about a specific subscription.
|
|
2514
|
-
*
|
|
2515
|
-
* **Requirements:**
|
|
2516
|
-
* - User must be a member of the organization
|
|
2517
1219
|
*/
|
|
2518
1220
|
const getOrgSubscription = (options) => (options.client ?? client_gen_1.client).get({
|
|
2519
1221
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2524,12 +1226,7 @@ exports.getOrgSubscription = getOrgSubscription;
|
|
|
2524
1226
|
/**
|
|
2525
1227
|
* Cancel Organization Subscription
|
|
2526
1228
|
*
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2529
|
-
* The subscription will remain active until the end of the current billing period.
|
|
2530
|
-
*
|
|
2531
|
-
* **Requirements:**
|
|
2532
|
-
* - User must be an OWNER of the organization
|
|
1229
|
+
* Cancels at period end — subscription remains active through the current billing cycle. Requires org owner role.
|
|
2533
1230
|
*/
|
|
2534
1231
|
const cancelOrgSubscription = (options) => (options.client ?? client_gen_1.client).post({
|
|
2535
1232
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2540,13 +1237,7 @@ exports.cancelOrgSubscription = cancelOrgSubscription;
|
|
|
2540
1237
|
/**
|
|
2541
1238
|
* List Organization Invoices
|
|
2542
1239
|
*
|
|
2543
|
-
*
|
|
2544
|
-
*
|
|
2545
|
-
* Returns past invoices with payment status, amounts, and line items.
|
|
2546
|
-
*
|
|
2547
|
-
* **Requirements:**
|
|
2548
|
-
* - User must be a member of the organization
|
|
2549
|
-
* - Full invoice details are only visible to owners and admins
|
|
1240
|
+
* Requires admin or owner role.
|
|
2550
1241
|
*/
|
|
2551
1242
|
const listOrgInvoices = (options) => (options.client ?? client_gen_1.client).get({
|
|
2552
1243
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2557,13 +1248,7 @@ exports.listOrgInvoices = listOrgInvoices;
|
|
|
2557
1248
|
/**
|
|
2558
1249
|
* Get Organization Upcoming Invoice
|
|
2559
1250
|
*
|
|
2560
|
-
*
|
|
2561
|
-
*
|
|
2562
|
-
* Returns estimated charges for the next billing period.
|
|
2563
|
-
*
|
|
2564
|
-
* **Requirements:**
|
|
2565
|
-
* - User must be a member of the organization
|
|
2566
|
-
* - Full invoice details are only visible to owners and admins
|
|
1251
|
+
* Requires admin or owner role. Returns null if no billing activity yet.
|
|
2567
1252
|
*/
|
|
2568
1253
|
const getOrgUpcomingInvoice = (options) => (options.client ?? client_gen_1.client).get({
|
|
2569
1254
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2574,23 +1259,7 @@ exports.getOrgUpcomingInvoice = getOrgUpcomingInvoice;
|
|
|
2574
1259
|
/**
|
|
2575
1260
|
* Create Payment Checkout Session
|
|
2576
1261
|
*
|
|
2577
|
-
*
|
|
2578
|
-
*
|
|
2579
|
-
* This endpoint is used when an organization owner needs to add a payment method before
|
|
2580
|
-
* provisioning resources. It creates a pending subscription and redirects
|
|
2581
|
-
* to Stripe Checkout to collect payment details.
|
|
2582
|
-
*
|
|
2583
|
-
* **Flow:**
|
|
2584
|
-
* 1. Owner tries to create a graph but org has no payment method
|
|
2585
|
-
* 2. Frontend calls this endpoint with graph configuration
|
|
2586
|
-
* 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
|
|
2587
|
-
* 4. Returns Stripe Checkout URL
|
|
2588
|
-
* 5. User completes payment on Stripe
|
|
2589
|
-
* 6. Webhook activates subscription and provisions resource
|
|
2590
|
-
*
|
|
2591
|
-
* **Requirements:**
|
|
2592
|
-
* - User must be an OWNER of their organization
|
|
2593
|
-
* - Enterprise customers (with invoice_billing_enabled) should not call this endpoint.
|
|
1262
|
+
* 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.
|
|
2594
1263
|
*/
|
|
2595
1264
|
const createCheckoutSession = (options) => (options.client ?? client_gen_1.client).post({
|
|
2596
1265
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2605,21 +1274,7 @@ exports.createCheckoutSession = createCheckoutSession;
|
|
|
2605
1274
|
/**
|
|
2606
1275
|
* Get Checkout Session Status
|
|
2607
1276
|
*
|
|
2608
|
-
* Poll
|
|
2609
|
-
*
|
|
2610
|
-
* Frontend should poll this endpoint after user returns from Stripe Checkout
|
|
2611
|
-
* to determine when the resource is ready.
|
|
2612
|
-
*
|
|
2613
|
-
* **Status Values:**
|
|
2614
|
-
* - `pending_payment`: Waiting for payment to complete
|
|
2615
|
-
* - `provisioning`: Payment confirmed, resource being created
|
|
2616
|
-
* - `active`: Resource is ready (resource_id will be set)
|
|
2617
|
-
* - `failed`: Something went wrong (error field will be set)
|
|
2618
|
-
* - `canceled`: Payment was canceled
|
|
2619
|
-
*
|
|
2620
|
-
* **When status is 'active':**
|
|
2621
|
-
* - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress
|
|
2622
|
-
* - For repositories: `resource_id` will be the repository name and access is immediately available
|
|
1277
|
+
* 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.
|
|
2623
1278
|
*/
|
|
2624
1279
|
const getCheckoutStatus = (options) => (options.client ?? client_gen_1.client).get({
|
|
2625
1280
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -2660,7 +1315,7 @@ exports.handleHttpPostExtensionsGraphIdGraphqlPost = handleHttpPostExtensionsGra
|
|
|
2660
1315
|
/**
|
|
2661
1316
|
* Update Entity
|
|
2662
1317
|
*
|
|
2663
|
-
*
|
|
1318
|
+
* Only provided (non-null) fields are updated.
|
|
2664
1319
|
*
|
|
2665
1320
|
* **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.
|
|
2666
1321
|
*/
|
|
@@ -2677,7 +1332,7 @@ exports.opUpdateEntity = opUpdateEntity;
|
|
|
2677
1332
|
/**
|
|
2678
1333
|
* Initialize Ledger
|
|
2679
1334
|
*
|
|
2680
|
-
* One-time
|
|
1335
|
+
* One-time setup: creates the fiscal calendar and seeds periods. Returns 409 if already initialized.
|
|
2681
1336
|
*
|
|
2682
1337
|
* **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.
|
|
2683
1338
|
*/
|
|
@@ -2694,7 +1349,7 @@ exports.opInitializeLedger = opInitializeLedger;
|
|
|
2694
1349
|
/**
|
|
2695
1350
|
* Set Close Target
|
|
2696
1351
|
*
|
|
2697
|
-
*
|
|
1352
|
+
* Period format: YYYY-MM. The close target is the user-controlled goal date, distinct from `closed_through` (what's actually closed).
|
|
2698
1353
|
*
|
|
2699
1354
|
* **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.
|
|
2700
1355
|
*/
|
|
@@ -2711,7 +1366,7 @@ exports.opSetCloseTarget = opSetCloseTarget;
|
|
|
2711
1366
|
/**
|
|
2712
1367
|
* Close Fiscal Period
|
|
2713
1368
|
*
|
|
2714
|
-
*
|
|
1369
|
+
*
|
|
2715
1370
|
*
|
|
2716
1371
|
* **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.
|
|
2717
1372
|
*/
|
|
@@ -2728,7 +1383,7 @@ exports.opClosePeriod = opClosePeriod;
|
|
|
2728
1383
|
/**
|
|
2729
1384
|
* Reopen Fiscal Period
|
|
2730
1385
|
*
|
|
2731
|
-
*
|
|
1386
|
+
* Decrements `closed_through` by one — only the most recently closed period can be reopened.
|
|
2732
1387
|
*
|
|
2733
1388
|
* **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.
|
|
2734
1389
|
*/
|
|
@@ -2745,7 +1400,7 @@ exports.opReopenPeriod = opReopenPeriod;
|
|
|
2745
1400
|
/**
|
|
2746
1401
|
* Create Schedule
|
|
2747
1402
|
*
|
|
2748
|
-
*
|
|
1403
|
+
* Creates a schedule and pre-generates monthly amortization facts spanning the period range.
|
|
2749
1404
|
*
|
|
2750
1405
|
* **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.
|
|
2751
1406
|
*/
|
|
@@ -2762,7 +1417,7 @@ exports.opCreateSchedule = opCreateSchedule;
|
|
|
2762
1417
|
/**
|
|
2763
1418
|
* Truncate Schedule (End Early)
|
|
2764
1419
|
*
|
|
2765
|
-
*
|
|
1420
|
+
* Ends a schedule early by deleting forward facts and any stale draft closing entries past the cutoff.
|
|
2766
1421
|
*
|
|
2767
1422
|
* **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.
|
|
2768
1423
|
*/
|
|
@@ -2779,7 +1434,7 @@ exports.opTruncateSchedule = opTruncateSchedule;
|
|
|
2779
1434
|
/**
|
|
2780
1435
|
* Create Closing Entry
|
|
2781
1436
|
*
|
|
2782
|
-
*
|
|
1437
|
+
* Creates a draft closing entry pre-populated from a schedule's facts for the given period.
|
|
2783
1438
|
*
|
|
2784
1439
|
* **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.
|
|
2785
1440
|
*/
|
|
@@ -2796,7 +1451,7 @@ exports.opCreateClosingEntry = opCreateClosingEntry;
|
|
|
2796
1451
|
/**
|
|
2797
1452
|
* Create Manual Closing Entry
|
|
2798
1453
|
*
|
|
2799
|
-
*
|
|
1454
|
+
* Creates a draft closing entry with manually specified amounts — not tied to a schedule.
|
|
2800
1455
|
*
|
|
2801
1456
|
* **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.
|
|
2802
1457
|
*/
|
|
@@ -2813,7 +1468,7 @@ exports.opCreateManualClosingEntry = opCreateManualClosingEntry;
|
|
|
2813
1468
|
/**
|
|
2814
1469
|
* Create Taxonomy
|
|
2815
1470
|
*
|
|
2816
|
-
*
|
|
1471
|
+
*
|
|
2817
1472
|
*
|
|
2818
1473
|
* **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.
|
|
2819
1474
|
*/
|
|
@@ -2830,7 +1485,7 @@ exports.opCreateTaxonomy = opCreateTaxonomy;
|
|
|
2830
1485
|
/**
|
|
2831
1486
|
* Create Structure
|
|
2832
1487
|
*
|
|
2833
|
-
*
|
|
1488
|
+
* Structures organize elements within a taxonomy. Types: `statement`, `mapping`, `schedule`, `presentation`, `calculation`.
|
|
2834
1489
|
*
|
|
2835
1490
|
* **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.
|
|
2836
1491
|
*/
|
|
@@ -2847,7 +1502,7 @@ exports.opCreateStructure = opCreateStructure;
|
|
|
2847
1502
|
/**
|
|
2848
1503
|
* Create Mapping Association
|
|
2849
1504
|
*
|
|
2850
|
-
*
|
|
1505
|
+
* Links a chart-of-accounts element to a reporting concept (CoA element → US GAAP concept).
|
|
2851
1506
|
*
|
|
2852
1507
|
* **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.
|
|
2853
1508
|
*/
|
|
@@ -2864,7 +1519,7 @@ exports.opCreateMappingAssociation = opCreateMappingAssociation;
|
|
|
2864
1519
|
/**
|
|
2865
1520
|
* Delete Mapping Association
|
|
2866
1521
|
*
|
|
2867
|
-
*
|
|
1522
|
+
*
|
|
2868
1523
|
*
|
|
2869
1524
|
* **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.
|
|
2870
1525
|
*/
|
|
@@ -3187,18 +1842,7 @@ exports.opDeleteSchedule = opDeleteSchedule;
|
|
|
3187
1842
|
/**
|
|
3188
1843
|
* Auto-Map Elements via AI (async)
|
|
3189
1844
|
*
|
|
3190
|
-
*
|
|
3191
|
-
*
|
|
3192
|
-
* This is the only async/Dagster-dispatched ledger operation. Instead
|
|
3193
|
-
* of running synchronously, it enqueues a `MappingAgent` task and
|
|
3194
|
-
* returns a `pending` envelope with the worker-issued operation_id —
|
|
3195
|
-
* callers subscribe via `/v1/operations/{operation_id}/stream` for SSE
|
|
3196
|
-
* progress events.
|
|
3197
|
-
*
|
|
3198
|
-
* Confidence thresholds (in the agent):
|
|
3199
|
-
* - ≥0.90: auto-approved mapping
|
|
3200
|
-
* - 0.70-0.89: flagged for review
|
|
3201
|
-
* - <0.70: skipped (left unmapped)
|
|
1845
|
+
* 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.
|
|
3202
1846
|
*
|
|
3203
1847
|
* **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.
|
|
3204
1848
|
*/
|
|
@@ -3215,7 +1859,7 @@ exports.opAutoMapElements = opAutoMapElements;
|
|
|
3215
1859
|
/**
|
|
3216
1860
|
* Create Report
|
|
3217
1861
|
*
|
|
3218
|
-
*
|
|
1862
|
+
* Generates report facts from the ledger and marks the report as published.
|
|
3219
1863
|
*
|
|
3220
1864
|
* **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.
|
|
3221
1865
|
*/
|
|
@@ -3232,7 +1876,7 @@ exports.opCreateReport = opCreateReport;
|
|
|
3232
1876
|
/**
|
|
3233
1877
|
* Regenerate Report
|
|
3234
1878
|
*
|
|
3235
|
-
*
|
|
1879
|
+
*
|
|
3236
1880
|
*
|
|
3237
1881
|
* **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.
|
|
3238
1882
|
*/
|
|
@@ -3249,7 +1893,7 @@ exports.opRegenerateReport = opRegenerateReport;
|
|
|
3249
1893
|
/**
|
|
3250
1894
|
* Delete Report
|
|
3251
1895
|
*
|
|
3252
|
-
*
|
|
1896
|
+
* Deletes the report definition and all generated facts.
|
|
3253
1897
|
*
|
|
3254
1898
|
* **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.
|
|
3255
1899
|
*/
|
|
@@ -3266,7 +1910,7 @@ exports.opDeleteReport = opDeleteReport;
|
|
|
3266
1910
|
/**
|
|
3267
1911
|
* Share Report
|
|
3268
1912
|
*
|
|
3269
|
-
*
|
|
1913
|
+
* Only published reports can be shared. Sends the report to all members of the target publish list.
|
|
3270
1914
|
*
|
|
3271
1915
|
* **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.
|
|
3272
1916
|
*/
|
|
@@ -3283,7 +1927,7 @@ exports.opShareReport = opShareReport;
|
|
|
3283
1927
|
/**
|
|
3284
1928
|
* Create Publish List
|
|
3285
1929
|
*
|
|
3286
|
-
*
|
|
1930
|
+
*
|
|
3287
1931
|
*
|
|
3288
1932
|
* **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.
|
|
3289
1933
|
*/
|
|
@@ -3300,7 +1944,7 @@ exports.opCreatePublishList = opCreatePublishList;
|
|
|
3300
1944
|
/**
|
|
3301
1945
|
* Update Publish List
|
|
3302
1946
|
*
|
|
3303
|
-
*
|
|
1947
|
+
* Updates the publish list's `name` and/or `description`. Membership is managed via add/remove-member operations.
|
|
3304
1948
|
*
|
|
3305
1949
|
* **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.
|
|
3306
1950
|
*/
|
|
@@ -3317,7 +1961,7 @@ exports.opUpdatePublishList = opUpdatePublishList;
|
|
|
3317
1961
|
/**
|
|
3318
1962
|
* Delete Publish List
|
|
3319
1963
|
*
|
|
3320
|
-
*
|
|
1964
|
+
*
|
|
3321
1965
|
*
|
|
3322
1966
|
* **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.
|
|
3323
1967
|
*/
|
|
@@ -3334,7 +1978,7 @@ exports.opDeletePublishList = opDeletePublishList;
|
|
|
3334
1978
|
/**
|
|
3335
1979
|
* Add Members to Publish List
|
|
3336
1980
|
*
|
|
3337
|
-
*
|
|
1981
|
+
*
|
|
3338
1982
|
*
|
|
3339
1983
|
* **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.
|
|
3340
1984
|
*/
|
|
@@ -3351,7 +1995,7 @@ exports.opAddPublishListMembers = opAddPublishListMembers;
|
|
|
3351
1995
|
/**
|
|
3352
1996
|
* Remove Member from Publish List
|
|
3353
1997
|
*
|
|
3354
|
-
*
|
|
1998
|
+
*
|
|
3355
1999
|
*
|
|
3356
2000
|
* **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.
|
|
3357
2001
|
*/
|
|
@@ -3368,17 +2012,7 @@ exports.opRemovePublishListMember = opRemovePublishListMember;
|
|
|
3368
2012
|
/**
|
|
3369
2013
|
* Build Fact Grid
|
|
3370
2014
|
*
|
|
3371
|
-
*
|
|
3372
|
-
*
|
|
3373
|
-
* Queries `Fact` nodes by element qnames or canonical concepts with
|
|
3374
|
-
* optional filters for periods, entities, filing form, fiscal context,
|
|
3375
|
-
* and period type. Returns a deduplicated pivot table plus optional
|
|
3376
|
-
* summary statistics.
|
|
3377
|
-
*
|
|
3378
|
-
* This is a graph-database read — the query runs against LadybugDB,
|
|
3379
|
-
* not the extensions OLTP database. The same operation works for
|
|
3380
|
-
* roboledger tenant graphs (post-materialization) and the SEC shared
|
|
3381
|
-
* repository (which uses the same XBRL hypercube schema).
|
|
2015
|
+
* 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.
|
|
3382
2016
|
*
|
|
3383
2017
|
* **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.
|
|
3384
2018
|
*/
|
|
@@ -3429,7 +2063,7 @@ exports.opUpdatePortfolio = opUpdatePortfolio;
|
|
|
3429
2063
|
/**
|
|
3430
2064
|
* Delete Portfolio
|
|
3431
2065
|
*
|
|
3432
|
-
*
|
|
2066
|
+
* Returns 409 if the portfolio has active positions — dispose them first.
|
|
3433
2067
|
*
|
|
3434
2068
|
* **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.
|
|
3435
2069
|
*/
|
|
@@ -3480,7 +2114,7 @@ exports.opUpdateSecurity = opUpdateSecurity;
|
|
|
3480
2114
|
/**
|
|
3481
2115
|
* Delete Security
|
|
3482
2116
|
*
|
|
3483
|
-
*
|
|
2117
|
+
* Soft-deletes the security (`is_active=false`). Historical positions referencing it remain valid.
|
|
3484
2118
|
*
|
|
3485
2119
|
* **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.
|
|
3486
2120
|
*/
|
|
@@ -3497,7 +2131,7 @@ exports.opDeleteSecurity = opDeleteSecurity;
|
|
|
3497
2131
|
/**
|
|
3498
2132
|
* Create Position
|
|
3499
2133
|
*
|
|
3500
|
-
*
|
|
2134
|
+
* Returns 409 if an active position for this security already exists in the portfolio.
|
|
3501
2135
|
*
|
|
3502
2136
|
* **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.
|
|
3503
2137
|
*/
|
|
@@ -3531,7 +2165,7 @@ exports.opUpdatePosition = opUpdatePosition;
|
|
|
3531
2165
|
/**
|
|
3532
2166
|
* Delete Position
|
|
3533
2167
|
*
|
|
3534
|
-
*
|
|
2168
|
+
* Soft-deletes the position (`is_active=false`). Historical holding records referencing it remain valid.
|
|
3535
2169
|
*
|
|
3536
2170
|
* **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.
|
|
3537
2171
|
*/
|