@robosystems/client 0.1.15 → 0.1.16

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.
Files changed (66) hide show
  1. package/package.json +48 -6
  2. package/sdk/client/client.gen.d.ts +2 -0
  3. package/sdk/client/client.gen.js +153 -0
  4. package/sdk/client/client.gen.ts +200 -0
  5. package/sdk/client/index.d.ts +7 -0
  6. package/sdk/client/index.js +15 -0
  7. package/sdk/client/index.ts +25 -0
  8. package/sdk/client/types.gen.d.ts +122 -0
  9. package/sdk/client/types.gen.js +4 -0
  10. package/sdk/client/types.gen.ts +233 -0
  11. package/sdk/client/utils.gen.d.ts +45 -0
  12. package/sdk/client/utils.gen.js +296 -0
  13. package/sdk/client/utils.gen.ts +419 -0
  14. package/sdk/client.gen.d.ts +12 -0
  15. package/sdk/client.gen.js +8 -0
  16. package/sdk/client.gen.ts +18 -0
  17. package/sdk/core/auth.gen.d.ts +18 -0
  18. package/sdk/core/auth.gen.js +18 -0
  19. package/sdk/core/auth.gen.ts +42 -0
  20. package/sdk/core/bodySerializer.gen.d.ts +17 -0
  21. package/sdk/core/bodySerializer.gen.js +57 -0
  22. package/sdk/core/bodySerializer.gen.ts +90 -0
  23. package/sdk/core/params.gen.d.ts +33 -0
  24. package/sdk/core/params.gen.js +92 -0
  25. package/sdk/core/params.gen.ts +153 -0
  26. package/sdk/core/pathSerializer.gen.d.ts +33 -0
  27. package/sdk/core/pathSerializer.gen.js +123 -0
  28. package/sdk/core/pathSerializer.gen.ts +181 -0
  29. package/sdk/core/types.gen.d.ts +78 -0
  30. package/sdk/core/types.gen.js +4 -0
  31. package/sdk/core/types.gen.ts +121 -0
  32. package/sdk/index.d.ts +2 -0
  33. package/sdk/index.js +19 -0
  34. package/sdk/index.ts +3 -0
  35. package/sdk/sdk.gen.d.ts +1269 -0
  36. package/sdk/sdk.gen.js +2664 -0
  37. package/sdk/sdk.gen.ts +2677 -0
  38. package/sdk/types.gen.d.ts +6265 -0
  39. package/sdk/types.gen.js +3 -0
  40. package/sdk/types.gen.ts +6784 -0
  41. package/sdk-extensions/OperationClient.d.ts +64 -0
  42. package/sdk-extensions/OperationClient.js +251 -0
  43. package/sdk-extensions/OperationClient.ts +322 -0
  44. package/sdk-extensions/QueryClient.d.ts +50 -0
  45. package/sdk-extensions/QueryClient.js +190 -0
  46. package/sdk-extensions/QueryClient.ts +283 -0
  47. package/sdk-extensions/README.md +672 -0
  48. package/sdk-extensions/SSEClient.d.ts +48 -0
  49. package/sdk-extensions/SSEClient.js +148 -0
  50. package/sdk-extensions/SSEClient.ts +189 -0
  51. package/sdk-extensions/config.d.ts +32 -0
  52. package/sdk-extensions/config.js +74 -0
  53. package/sdk-extensions/config.ts +91 -0
  54. package/sdk-extensions/hooks.d.ts +110 -0
  55. package/sdk-extensions/hooks.js +371 -0
  56. package/sdk-extensions/hooks.ts +438 -0
  57. package/sdk-extensions/index.d.ts +46 -0
  58. package/sdk-extensions/index.js +110 -0
  59. package/sdk-extensions/index.ts +123 -0
  60. package/sdk.gen.d.ts +128 -2
  61. package/sdk.gen.js +216 -2
  62. package/sdk.gen.ts +216 -2
  63. package/types.gen.d.ts +573 -4
  64. package/types.gen.ts +606 -4
  65. package/openapi-ts.config.js +0 -9
  66. package/prepare.js +0 -220
package/sdk.gen.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
3
  import type { Options as ClientOptions, TDataShape, Client } from './client';
4
- import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshSessionData, RefreshSessionResponses, RefreshSessionErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoLoginData, SsoLoginResponses, SsoLoginErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, GetUserGraphsData, GetUserGraphsResponses, GetUserGraphsErrors, SelectUserGraphData, SelectUserGraphResponses, SelectUserGraphErrors, GetAllCreditSummariesData, GetAllCreditSummariesResponses, GetAllCreditSummariesErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, ListUserApiKeysErrors, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, GetUserLimitsErrors, GetUserUsageData, GetUserUsageResponses, GetUserUsageErrors, GetSharedRepositoryLimitsData, GetSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsErrors, GetAllSharedRepositoryLimitsData, GetAllSharedRepositoryLimitsResponses, GetAllSharedRepositoryLimitsErrors, GetUserUsageOverviewData, GetUserUsageOverviewResponses, GetUserUsageOverviewErrors, GetDetailedUserAnalyticsData, GetDetailedUserAnalyticsResponses, GetDetailedUserAnalyticsErrors, GetUserSharedSubscriptionsData, GetUserSharedSubscriptionsResponses, GetUserSharedSubscriptionsErrors, SubscribeToSharedRepositoryData, SubscribeToSharedRepositoryResponses, SubscribeToSharedRepositoryErrors, UpgradeSharedRepositorySubscriptionData, UpgradeSharedRepositorySubscriptionResponses, UpgradeSharedRepositorySubscriptionErrors, CancelSharedRepositorySubscriptionData, CancelSharedRepositorySubscriptionResponses, CancelSharedRepositorySubscriptionErrors, GetSharedRepositoryCreditsData, GetSharedRepositoryCreditsResponses, GetSharedRepositoryCreditsErrors, GetRepositoryCreditsData, GetRepositoryCreditsResponses, GetRepositoryCreditsErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, QueryFinancialAgentData, QueryFinancialAgentResponses, QueryFinancialAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, ExportBackupData, ExportBackupResponses, ExportBackupErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, KuzuBackupHealthData, KuzuBackupHealthResponses, KuzuBackupHealthErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageStatsData, GetGraphUsageStatsResponses, GetGraphUsageStatsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaInfoData, GetGraphSchemaInfoResponses, GetGraphSchemaInfoErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ListSchemaExtensionsData, ListSchemaExtensionsResponses, ListSchemaExtensionsErrors, GetCurrentGraphBillData, GetCurrentGraphBillResponses, GetCurrentGraphBillErrors, GetGraphMonthlyBillData, GetGraphMonthlyBillResponses, GetGraphMonthlyBillErrors, GetGraphBillingHistoryData, GetGraphBillingHistoryResponses, GetGraphBillingHistoryErrors, GetGraphUsageDetailsData, GetGraphUsageDetailsResponses, GetGraphUsageDetailsErrors, GetGraphPricingInfoV1GraphIdBillingPricingGetData, GetGraphPricingInfoV1GraphIdBillingPricingGetResponses, GetGraphPricingInfoV1GraphIdBillingPricingGetErrors, UpgradeGraphSubscriptionV1GraphIdBillingSubscriptionUpgradePostData, UpgradeGraphSubscriptionV1GraphIdBillingSubscriptionUpgradePostResponses, UpgradeGraphSubscriptionV1GraphIdBillingSubscriptionUpgradePostErrors, GetGraphSubscriptionV1GraphIdBillingSubscriptionGetData, GetGraphSubscriptionV1GraphIdBillingSubscriptionGetResponses, GetGraphSubscriptionV1GraphIdBillingSubscriptionGetErrors, GetAvailableSubscriptionPlansV1GraphIdBillingAvailablePlansGetData, GetAvailableSubscriptionPlansV1GraphIdBillingAvailablePlansGetResponses, GetAvailableSubscriptionPlansV1GraphIdBillingAvailablePlansGetErrors, GetCreditBillingInfoV1GraphIdBillingCreditsGetData, GetCreditBillingInfoV1GraphIdBillingCreditsGetResponses, GetCreditBillingInfoV1GraphIdBillingCreditsGetErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } from './types.gen';
4
+ import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshSessionData, RefreshSessionResponses, RefreshSessionErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoLoginData, SsoLoginResponses, SsoLoginErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, GetUserGraphsData, GetUserGraphsResponses, GetUserGraphsErrors, SelectUserGraphData, SelectUserGraphResponses, SelectUserGraphErrors, GetAllCreditSummariesData, GetAllCreditSummariesResponses, GetAllCreditSummariesErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, ListUserApiKeysErrors, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, GetUserLimitsErrors, GetUserUsageData, GetUserUsageResponses, GetUserUsageErrors, GetSharedRepositoryLimitsData, GetSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsErrors, GetAllSharedRepositoryLimitsData, GetAllSharedRepositoryLimitsResponses, GetAllSharedRepositoryLimitsErrors, GetUserUsageOverviewData, GetUserUsageOverviewResponses, GetUserUsageOverviewErrors, GetDetailedUserAnalyticsData, GetDetailedUserAnalyticsResponses, GetDetailedUserAnalyticsErrors, GetUserSharedSubscriptionsData, GetUserSharedSubscriptionsResponses, GetUserSharedSubscriptionsErrors, SubscribeToSharedRepositoryData, SubscribeToSharedRepositoryResponses, SubscribeToSharedRepositoryErrors, UpgradeSharedRepositorySubscriptionData, UpgradeSharedRepositorySubscriptionResponses, UpgradeSharedRepositorySubscriptionErrors, CancelSharedRepositorySubscriptionData, CancelSharedRepositorySubscriptionResponses, CancelSharedRepositorySubscriptionErrors, GetSharedRepositoryCreditsData, GetSharedRepositoryCreditsResponses, GetSharedRepositoryCreditsErrors, GetRepositoryCreditsData, GetRepositoryCreditsResponses, GetRepositoryCreditsErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, QueryFinancialAgentData, QueryFinancialAgentResponses, QueryFinancialAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, ExportBackupData, ExportBackupResponses, ExportBackupErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, KuzuBackupHealthData, KuzuBackupHealthResponses, KuzuBackupHealthErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageStatsData, GetGraphUsageStatsResponses, GetGraphUsageStatsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaInfoData, GetGraphSchemaInfoResponses, GetGraphSchemaInfoErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ListSchemaExtensionsData, ListSchemaExtensionsResponses, ListSchemaExtensionsErrors, GetCurrentGraphBillData, GetCurrentGraphBillResponses, GetCurrentGraphBillErrors, GetGraphMonthlyBillData, GetGraphMonthlyBillResponses, GetGraphMonthlyBillErrors, GetGraphBillingHistoryData, GetGraphBillingHistoryResponses, GetGraphBillingHistoryErrors, GetGraphUsageDetailsData, GetGraphUsageDetailsResponses, GetGraphUsageDetailsErrors, GetGraphPricingInfoV1GraphIdBillingPricingGetData, GetGraphPricingInfoV1GraphIdBillingPricingGetResponses, GetGraphPricingInfoV1GraphIdBillingPricingGetErrors, UpgradeGraphSubscriptionV1GraphIdBillingSubscriptionUpgradePostData, UpgradeGraphSubscriptionV1GraphIdBillingSubscriptionUpgradePostResponses, UpgradeGraphSubscriptionV1GraphIdBillingSubscriptionUpgradePostErrors, GetGraphSubscriptionV1GraphIdBillingSubscriptionGetData, GetGraphSubscriptionV1GraphIdBillingSubscriptionGetResponses, GetGraphSubscriptionV1GraphIdBillingSubscriptionGetErrors, GetAvailableSubscriptionPlansV1GraphIdBillingAvailablePlansGetData, GetAvailableSubscriptionPlansV1GraphIdBillingAvailablePlansGetResponses, GetAvailableSubscriptionPlansV1GraphIdBillingAvailablePlansGetErrors, GetCreditBillingInfoV1GraphIdBillingCreditsGetData, GetCreditBillingInfoV1GraphIdBillingCreditsGetResponses, GetCreditBillingInfoV1GraphIdBillingCreditsGetErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, ListSubgraphsData, ListSubgraphsResponses, ListSubgraphsErrors, CreateSubgraphData, CreateSubgraphResponses, CreateSubgraphErrors, DeleteSubgraphData, DeleteSubgraphResponses, DeleteSubgraphErrors, GetSubgraphQuotaData, GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, GetSubgraphInfoData, GetSubgraphInfoResponses, GetSubgraphInfoErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } from './types.gen';
5
5
  import { client as _heyApiClient } from './client.gen';
6
6
 
7
7
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
@@ -1110,7 +1110,7 @@ export const oauthCallback = <ThrowOnError extends boolean = false>(options: Opt
1110
1110
  *
1111
1111
  * **Credit Consumption:**
1112
1112
  * - AI operations consume credits based on actual token usage
1113
- * - Claude 4 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens
1113
+ * - Claude 4/4.1 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens
1114
1114
  * - Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens
1115
1115
  * - Credits are consumed after operation completes based on actual usage
1116
1116
  *
@@ -2222,6 +2222,220 @@ export const getDatabaseInfo = <ThrowOnError extends boolean = false>(options: O
2222
2222
  });
2223
2223
  };
2224
2224
 
2225
+ /**
2226
+ * List Subgraphs
2227
+ * List all subgraphs for a parent graph.
2228
+ *
2229
+ * **Requirements:**
2230
+ * - User must have at least read access to parent graph
2231
+ *
2232
+ * **Response includes:**
2233
+ * - List of all subgraphs with metadata
2234
+ * - Current usage vs limits
2235
+ * - Size and statistics per subgraph
2236
+ * - Creation timestamps
2237
+ *
2238
+ * **Filtering:**
2239
+ * Currently returns all subgraphs. Future versions will support:
2240
+ * - Filtering by status
2241
+ * - Filtering by creation date
2242
+ * - Pagination for large lists
2243
+ */
2244
+ export const listSubgraphs = <ThrowOnError extends boolean = false>(options: Options<ListSubgraphsData, ThrowOnError>) => {
2245
+ return (options.client ?? _heyApiClient).get<ListSubgraphsResponses, ListSubgraphsErrors, ThrowOnError>({
2246
+ security: [
2247
+ {
2248
+ name: 'X-API-Key',
2249
+ type: 'apiKey'
2250
+ },
2251
+ {
2252
+ scheme: 'bearer',
2253
+ type: 'http'
2254
+ }
2255
+ ],
2256
+ url: '/v1/{graph_id}/subgraphs',
2257
+ ...options
2258
+ });
2259
+ };
2260
+
2261
+ /**
2262
+ * Create New Subgraph
2263
+ * Create a new subgraph database under an Enterprise or Premium parent graph.
2264
+ *
2265
+ * **Requirements:**
2266
+ * - Parent graph must be Enterprise or Premium tier
2267
+ * - User must have admin access to parent graph
2268
+ * - Subgraph name must be unique within parent
2269
+ * - Subgraph name must be alphanumeric (1-20 chars)
2270
+ *
2271
+ * **Subgraph Benefits:**
2272
+ * - Shares parent's infrastructure (no additional cost)
2273
+ * - Inherits parent's credit pool
2274
+ * - Isolated database on same instance
2275
+ * - Full Kuzu database capabilities
2276
+ *
2277
+ * **Use Cases:**
2278
+ * - Separate environments (dev/staging/prod)
2279
+ * - Department-specific data isolation
2280
+ * - Multi-tenant applications
2281
+ * - Testing and experimentation
2282
+ *
2283
+ * **Schema Inheritance:**
2284
+ * - Subgraphs can use parent's schema or custom extensions
2285
+ * - Extensions are additive only
2286
+ * - Base schema always included
2287
+ *
2288
+ * **Limits:**
2289
+ * - Standard: Not supported (0 subgraphs)
2290
+ * - Enterprise: Configurable limit (default: 10 subgraphs)
2291
+ * - Premium: Unlimited subgraphs
2292
+ * - Limits are defined in deployment configuration
2293
+ *
2294
+ * **Response includes:**
2295
+ * - `graph_id`: Full subgraph identifier
2296
+ * - `parent_graph_id`: Parent graph ID
2297
+ * - `subgraph_name`: Short name within parent
2298
+ * - `status`: Creation status
2299
+ */
2300
+ export const createSubgraph = <ThrowOnError extends boolean = false>(options: Options<CreateSubgraphData, ThrowOnError>) => {
2301
+ return (options.client ?? _heyApiClient).post<CreateSubgraphResponses, CreateSubgraphErrors, ThrowOnError>({
2302
+ security: [
2303
+ {
2304
+ name: 'X-API-Key',
2305
+ type: 'apiKey'
2306
+ },
2307
+ {
2308
+ scheme: 'bearer',
2309
+ type: 'http'
2310
+ }
2311
+ ],
2312
+ url: '/v1/{graph_id}/subgraphs',
2313
+ ...options,
2314
+ headers: {
2315
+ 'Content-Type': 'application/json',
2316
+ ...options.headers
2317
+ }
2318
+ });
2319
+ };
2320
+
2321
+ /**
2322
+ * Delete Subgraph
2323
+ * Delete a subgraph database.
2324
+ *
2325
+ * **Requirements:**
2326
+ * - Must be a valid subgraph (not parent graph)
2327
+ * - User must have admin access to parent graph
2328
+ * - Optional backup before deletion
2329
+ *
2330
+ * **Deletion Options:**
2331
+ * - `force`: Delete even if contains data
2332
+ * - `backup_first`: Create backup before deletion
2333
+ *
2334
+ * **Warning:**
2335
+ * Deletion is permanent unless backup is created.
2336
+ * All data in the subgraph will be lost.
2337
+ *
2338
+ * **Backup Location:**
2339
+ * If backup requested, stored in S3 at:
2340
+ * `s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup`
2341
+ */
2342
+ export const deleteSubgraph = <ThrowOnError extends boolean = false>(options: Options<DeleteSubgraphData, ThrowOnError>) => {
2343
+ return (options.client ?? _heyApiClient).delete<DeleteSubgraphResponses, DeleteSubgraphErrors, ThrowOnError>({
2344
+ security: [
2345
+ {
2346
+ name: 'X-API-Key',
2347
+ type: 'apiKey'
2348
+ },
2349
+ {
2350
+ scheme: 'bearer',
2351
+ type: 'http'
2352
+ }
2353
+ ],
2354
+ url: '/v1/{graph_id}/subgraphs/{subgraph_name}',
2355
+ ...options,
2356
+ headers: {
2357
+ 'Content-Type': 'application/json',
2358
+ ...options.headers
2359
+ }
2360
+ });
2361
+ };
2362
+
2363
+ /**
2364
+ * Get Subgraph Quota
2365
+ * Get subgraph quota and usage information for a parent graph.
2366
+ *
2367
+ * **Shows:**
2368
+ * - Current subgraph count
2369
+ * - Maximum allowed subgraphs per tier
2370
+ * - Remaining capacity
2371
+ * - Total size usage across all subgraphs
2372
+ *
2373
+ * **Tier Limits:**
2374
+ * - Standard: 0 subgraphs (not supported)
2375
+ * - Enterprise: Configurable limit (default: 10 subgraphs)
2376
+ * - Premium: Unlimited subgraphs
2377
+ * - Limits are defined in deployment configuration
2378
+ *
2379
+ * **Size Tracking:**
2380
+ * Provides aggregate size metrics when available.
2381
+ * Individual subgraph sizes shown in list endpoint.
2382
+ */
2383
+ export const getSubgraphQuota = <ThrowOnError extends boolean = false>(options: Options<GetSubgraphQuotaData, ThrowOnError>) => {
2384
+ return (options.client ?? _heyApiClient).get<GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, ThrowOnError>({
2385
+ security: [
2386
+ {
2387
+ name: 'X-API-Key',
2388
+ type: 'apiKey'
2389
+ },
2390
+ {
2391
+ scheme: 'bearer',
2392
+ type: 'http'
2393
+ }
2394
+ ],
2395
+ url: '/v1/{graph_id}/subgraphs/quota',
2396
+ ...options
2397
+ });
2398
+ };
2399
+
2400
+ /**
2401
+ * Get Subgraph Details
2402
+ * Get detailed information about a specific subgraph.
2403
+ *
2404
+ * **Requirements:**
2405
+ * - User must have read access to parent graph
2406
+ *
2407
+ * **Response includes:**
2408
+ * - Full subgraph metadata
2409
+ * - Database statistics (nodes, edges)
2410
+ * - Size information
2411
+ * - Schema configuration
2412
+ * - Creation/modification timestamps
2413
+ * - Last access time (when available)
2414
+ *
2415
+ * **Statistics:**
2416
+ * Real-time statistics queried from Kuzu:
2417
+ * - Node count
2418
+ * - Edge count
2419
+ * - Database size on disk
2420
+ * - Schema information
2421
+ */
2422
+ export const getSubgraphInfo = <ThrowOnError extends boolean = false>(options: Options<GetSubgraphInfoData, ThrowOnError>) => {
2423
+ return (options.client ?? _heyApiClient).get<GetSubgraphInfoResponses, GetSubgraphInfoErrors, ThrowOnError>({
2424
+ security: [
2425
+ {
2426
+ name: 'X-API-Key',
2427
+ type: 'apiKey'
2428
+ },
2429
+ {
2430
+ scheme: 'bearer',
2431
+ type: 'http'
2432
+ }
2433
+ ],
2434
+ url: '/v1/{graph_id}/subgraphs/{subgraph_name}/info',
2435
+ ...options
2436
+ });
2437
+ };
2438
+
2225
2439
  /**
2226
2440
  * Create New Graph Database
2227
2441
  * Create a new graph database with specified schema and optionally an initial entity.