@robosystems/client 0.2.10 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sdk.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, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshAuthSessionData, RefreshAuthSessionResponses, RefreshAuthSessionErrors, ResendVerificationEmailData, ResendVerificationEmailResponses, ResendVerificationEmailErrors, VerifyEmailData, VerifyEmailResponses, VerifyEmailErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ForgotPasswordData, ForgotPasswordResponses, ForgotPasswordErrors, ValidateResetTokenData, ValidateResetTokenResponses, ValidateResetTokenErrors, ResetPasswordData, ResetPasswordResponses, ResetPasswordErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, UpdateUserData, UpdateUserResponses, UpdateUserErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, ListAgentsData, ListAgentsResponses, ListAgentsErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, RecommendAgentData, RecommendAgentResponses, RecommendAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsResponses, GetGraphUsageAnalyticsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaData, GetGraphSchemaResponses, GetGraphSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, GetGraphLimitsData, GetGraphLimitsResponses, GetGraphLimitsErrors, ListSubgraphsData, ListSubgraphsResponses, ListSubgraphsErrors, CreateSubgraphData, CreateSubgraphResponses, CreateSubgraphErrors, DeleteSubgraphData, DeleteSubgraphResponses, DeleteSubgraphErrors, GetSubgraphInfoData, GetSubgraphInfoResponses, GetSubgraphInfoErrors, GetSubgraphQuotaData, GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, CancelSubscriptionData, CancelSubscriptionResponses, CancelSubscriptionErrors, GetGraphSubscriptionData, GetGraphSubscriptionResponses, GetGraphSubscriptionErrors, CreateRepositorySubscriptionData, CreateRepositorySubscriptionResponses, CreateRepositorySubscriptionErrors, UpgradeSubscriptionData, UpgradeSubscriptionResponses, UpgradeSubscriptionErrors, ListTablesData, ListTablesResponses, ListTablesErrors, ListTableFilesData, ListTableFilesResponses, ListTableFilesErrors, GetUploadUrlData, GetUploadUrlResponses, GetUploadUrlErrors, DeleteFileData, DeleteFileResponses, DeleteFileErrors, GetFileInfoData, GetFileInfoResponses, GetFileInfoErrors, UpdateFileStatusData, UpdateFileStatusResponses, UpdateFileStatusErrors, IngestTablesData, IngestTablesResponses, IngestTablesErrors, QueryTablesData, QueryTablesResponses, QueryTablesErrors, GetGraphsData, GetGraphsResponses, GetGraphsErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetAvailableExtensionsErrors, GetAvailableGraphTiersData, GetAvailableGraphTiersResponses, GetAvailableGraphTiersErrors, SelectGraphData, SelectGraphResponses, SelectGraphErrors, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors, CreateCheckoutSessionData, CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, GetCheckoutStatusData, GetCheckoutStatusResponses, GetCheckoutStatusErrors, GetBillingCustomerData, GetBillingCustomerResponses, UpdatePaymentMethodData, UpdatePaymentMethodResponses, UpdatePaymentMethodErrors, ListInvoicesData, ListInvoicesResponses, ListInvoicesErrors, GetUpcomingInvoiceData, GetUpcomingInvoiceResponses, ListSubscriptionsData, ListSubscriptionsResponses, GetSubscriptionData, GetSubscriptionResponses, GetSubscriptionErrors, CancelSubscription2Data, CancelSubscription2Responses, CancelSubscription2Errors } from './types.gen';
4
+ import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshAuthSessionData, RefreshAuthSessionResponses, RefreshAuthSessionErrors, ResendVerificationEmailData, ResendVerificationEmailResponses, ResendVerificationEmailErrors, VerifyEmailData, VerifyEmailResponses, VerifyEmailErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ForgotPasswordData, ForgotPasswordResponses, ForgotPasswordErrors, ValidateResetTokenData, ValidateResetTokenResponses, ValidateResetTokenErrors, ResetPasswordData, ResetPasswordResponses, ResetPasswordErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, UpdateUserData, UpdateUserResponses, UpdateUserErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, ListUserOrgsData, ListUserOrgsResponses, CreateOrgData, CreateOrgResponses, CreateOrgErrors, GetOrgData, GetOrgResponses, GetOrgErrors, UpdateOrgData, UpdateOrgResponses, UpdateOrgErrors, ListOrgGraphsData, ListOrgGraphsResponses, ListOrgGraphsErrors, ListOrgMembersData, ListOrgMembersResponses, ListOrgMembersErrors, InviteOrgMemberData, InviteOrgMemberResponses, InviteOrgMemberErrors, RemoveOrgMemberData, RemoveOrgMemberResponses, RemoveOrgMemberErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleResponses, UpdateOrgMemberRoleErrors, GetOrgLimitsData, GetOrgLimitsResponses, GetOrgLimitsErrors, GetOrgUsageData, GetOrgUsageResponses, GetOrgUsageErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, ListAgentsData, ListAgentsResponses, ListAgentsErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, RecommendAgentData, RecommendAgentResponses, RecommendAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsResponses, GetGraphUsageAnalyticsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaData, GetGraphSchemaResponses, GetGraphSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, GetGraphLimitsData, GetGraphLimitsResponses, GetGraphLimitsErrors, ListSubgraphsData, ListSubgraphsResponses, ListSubgraphsErrors, CreateSubgraphData, CreateSubgraphResponses, CreateSubgraphErrors, DeleteSubgraphData, DeleteSubgraphResponses, DeleteSubgraphErrors, GetSubgraphInfoData, GetSubgraphInfoResponses, GetSubgraphInfoErrors, GetSubgraphQuotaData, GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, CancelSubscriptionData, CancelSubscriptionResponses, CancelSubscriptionErrors, GetGraphSubscriptionData, GetGraphSubscriptionResponses, GetGraphSubscriptionErrors, CreateRepositorySubscriptionData, CreateRepositorySubscriptionResponses, CreateRepositorySubscriptionErrors, UpgradeSubscriptionData, UpgradeSubscriptionResponses, UpgradeSubscriptionErrors, ListTablesData, ListTablesResponses, ListTablesErrors, ListTableFilesData, ListTableFilesResponses, ListTableFilesErrors, GetUploadUrlData, GetUploadUrlResponses, GetUploadUrlErrors, DeleteFileData, DeleteFileResponses, DeleteFileErrors, GetFileInfoData, GetFileInfoResponses, GetFileInfoErrors, UpdateFileStatusData, UpdateFileStatusResponses, UpdateFileStatusErrors, IngestTablesData, IngestTablesResponses, IngestTablesErrors, QueryTablesData, QueryTablesResponses, QueryTablesErrors, GetGraphsData, GetGraphsResponses, GetGraphsErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetAvailableExtensionsErrors, GetAvailableGraphTiersData, GetAvailableGraphTiersResponses, GetAvailableGraphTiersErrors, SelectGraphData, SelectGraphResponses, SelectGraphErrors, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors, GetOrgBillingCustomerData, GetOrgBillingCustomerResponses, GetOrgBillingCustomerErrors, UpdateOrgPaymentMethodData, UpdateOrgPaymentMethodResponses, UpdateOrgPaymentMethodErrors, ListOrgSubscriptionsData, ListOrgSubscriptionsResponses, ListOrgSubscriptionsErrors, GetOrgSubscriptionData, GetOrgSubscriptionResponses, GetOrgSubscriptionErrors, CancelOrgSubscriptionData, CancelOrgSubscriptionResponses, CancelOrgSubscriptionErrors, ListOrgInvoicesData, ListOrgInvoicesResponses, ListOrgInvoicesErrors, GetOrgUpcomingInvoiceData, GetOrgUpcomingInvoiceResponses, GetOrgUpcomingInvoiceErrors, CreateCheckoutSessionData, CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, GetCheckoutStatusData, GetCheckoutStatusResponses, GetCheckoutStatusErrors } 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> & {
@@ -20,7 +20,11 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
20
20
 
21
21
  /**
22
22
  * Register New User
23
- * Register a new user account with email and password. Security controls vary by environment: CAPTCHA and email verification are disabled in development for API testing, but required in production.
23
+ * Register a new user account with email and password.
24
+ *
25
+ * **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.
26
+ *
27
+ * **Security Controls**: CAPTCHA and email verification are disabled in development for API testing, but required in production.
24
28
  */
25
29
  export const registerUser = <ThrowOnError extends boolean = false>(options: Options<RegisterUserData, ThrowOnError>) => {
26
30
  return (options.client ?? _heyApiClient).post<RegisterUserResponses, RegisterUserErrors, ThrowOnError>({
@@ -401,11 +405,103 @@ export const updateUserApiKey = <ThrowOnError extends boolean = false>(options:
401
405
  };
402
406
 
403
407
  /**
404
- * Get user limits and usage
405
- * Retrieve current limits and usage statistics for the authenticated user (simple safety valve for graph creation)
408
+ * List User's Organizations
409
+ * Get all organizations the current user belongs to, with their role in each.
410
+ */
411
+ export const listUserOrgs = <ThrowOnError extends boolean = false>(options?: Options<ListUserOrgsData, ThrowOnError>) => {
412
+ return (options?.client ?? _heyApiClient).get<ListUserOrgsResponses, unknown, ThrowOnError>({
413
+ security: [
414
+ {
415
+ name: 'X-API-Key',
416
+ type: 'apiKey'
417
+ },
418
+ {
419
+ scheme: 'bearer',
420
+ type: 'http'
421
+ }
422
+ ],
423
+ url: '/v1/orgs',
424
+ ...options
425
+ });
426
+ };
427
+
428
+ /**
429
+ * Create Organization
430
+ * Create a new organization. The creating user becomes the owner.
431
+ */
432
+ export const createOrg = <ThrowOnError extends boolean = false>(options: Options<CreateOrgData, ThrowOnError>) => {
433
+ return (options.client ?? _heyApiClient).post<CreateOrgResponses, CreateOrgErrors, ThrowOnError>({
434
+ security: [
435
+ {
436
+ name: 'X-API-Key',
437
+ type: 'apiKey'
438
+ },
439
+ {
440
+ scheme: 'bearer',
441
+ type: 'http'
442
+ }
443
+ ],
444
+ url: '/v1/orgs',
445
+ ...options,
446
+ headers: {
447
+ 'Content-Type': 'application/json',
448
+ ...options.headers
449
+ }
450
+ });
451
+ };
452
+
453
+ /**
454
+ * Get Organization
455
+ * Get detailed information about an organization.
456
+ */
457
+ export const getOrg = <ThrowOnError extends boolean = false>(options: Options<GetOrgData, ThrowOnError>) => {
458
+ return (options.client ?? _heyApiClient).get<GetOrgResponses, GetOrgErrors, ThrowOnError>({
459
+ security: [
460
+ {
461
+ name: 'X-API-Key',
462
+ type: 'apiKey'
463
+ },
464
+ {
465
+ scheme: 'bearer',
466
+ type: 'http'
467
+ }
468
+ ],
469
+ url: '/v1/orgs/{org_id}',
470
+ ...options
471
+ });
472
+ };
473
+
474
+ /**
475
+ * Update Organization
476
+ * Update organization information. Requires admin or owner role.
477
+ */
478
+ export const updateOrg = <ThrowOnError extends boolean = false>(options: Options<UpdateOrgData, ThrowOnError>) => {
479
+ return (options.client ?? _heyApiClient).put<UpdateOrgResponses, UpdateOrgErrors, ThrowOnError>({
480
+ security: [
481
+ {
482
+ name: 'X-API-Key',
483
+ type: 'apiKey'
484
+ },
485
+ {
486
+ scheme: 'bearer',
487
+ type: 'http'
488
+ }
489
+ ],
490
+ url: '/v1/orgs/{org_id}',
491
+ ...options,
492
+ headers: {
493
+ 'Content-Type': 'application/json',
494
+ ...options.headers
495
+ }
496
+ });
497
+ };
498
+
499
+ /**
500
+ * List Organization Graphs
501
+ * Get all graphs belonging to an organization.
406
502
  */
407
- export const getUserLimits = <ThrowOnError extends boolean = false>(options?: Options<GetUserLimitsData, ThrowOnError>) => {
408
- return (options?.client ?? _heyApiClient).get<GetUserLimitsResponses, unknown, ThrowOnError>({
503
+ export const listOrgGraphs = <ThrowOnError extends boolean = false>(options: Options<ListOrgGraphsData, ThrowOnError>) => {
504
+ return (options.client ?? _heyApiClient).get<ListOrgGraphsResponses, ListOrgGraphsErrors, ThrowOnError>({
409
505
  security: [
410
506
  {
411
507
  name: 'X-API-Key',
@@ -416,7 +512,144 @@ export const getUserLimits = <ThrowOnError extends boolean = false>(options?: Op
416
512
  type: 'http'
417
513
  }
418
514
  ],
419
- url: '/v1/user/limits',
515
+ url: '/v1/orgs/{org_id}/graphs',
516
+ ...options
517
+ });
518
+ };
519
+
520
+ /**
521
+ * List Organization Members
522
+ * Get all members of an organization with their roles.
523
+ */
524
+ export const listOrgMembers = <ThrowOnError extends boolean = false>(options: Options<ListOrgMembersData, ThrowOnError>) => {
525
+ return (options.client ?? _heyApiClient).get<ListOrgMembersResponses, ListOrgMembersErrors, ThrowOnError>({
526
+ security: [
527
+ {
528
+ name: 'X-API-Key',
529
+ type: 'apiKey'
530
+ },
531
+ {
532
+ scheme: 'bearer',
533
+ type: 'http'
534
+ }
535
+ ],
536
+ url: '/v1/orgs/{org_id}/members',
537
+ ...options
538
+ });
539
+ };
540
+
541
+ /**
542
+ * Invite Member
543
+ * Invite a user to join the organization. Requires admin or owner role.
544
+ *
545
+ * **⚠️ FEATURE NOT READY**: This endpoint is disabled by default (ORG_MEMBER_INVITATIONS_ENABLED=false).
546
+ * Returns 501 NOT IMPLEMENTED when disabled. See endpoint implementation for TODO list before enabling.
547
+ */
548
+ export const inviteOrgMember = <ThrowOnError extends boolean = false>(options: Options<InviteOrgMemberData, ThrowOnError>) => {
549
+ return (options.client ?? _heyApiClient).post<InviteOrgMemberResponses, InviteOrgMemberErrors, ThrowOnError>({
550
+ security: [
551
+ {
552
+ name: 'X-API-Key',
553
+ type: 'apiKey'
554
+ },
555
+ {
556
+ scheme: 'bearer',
557
+ type: 'http'
558
+ }
559
+ ],
560
+ url: '/v1/orgs/{org_id}/members',
561
+ ...options,
562
+ headers: {
563
+ 'Content-Type': 'application/json',
564
+ ...options.headers
565
+ }
566
+ });
567
+ };
568
+
569
+ /**
570
+ * Remove Member
571
+ * Remove a member from the organization. Requires admin or owner role.
572
+ */
573
+ export const removeOrgMember = <ThrowOnError extends boolean = false>(options: Options<RemoveOrgMemberData, ThrowOnError>) => {
574
+ return (options.client ?? _heyApiClient).delete<RemoveOrgMemberResponses, RemoveOrgMemberErrors, ThrowOnError>({
575
+ security: [
576
+ {
577
+ name: 'X-API-Key',
578
+ type: 'apiKey'
579
+ },
580
+ {
581
+ scheme: 'bearer',
582
+ type: 'http'
583
+ }
584
+ ],
585
+ url: '/v1/orgs/{org_id}/members/{user_id}',
586
+ ...options
587
+ });
588
+ };
589
+
590
+ /**
591
+ * Update Member Role
592
+ * Update a member's role in the organization. Requires admin or owner role.
593
+ */
594
+ export const updateOrgMemberRole = <ThrowOnError extends boolean = false>(options: Options<UpdateOrgMemberRoleData, ThrowOnError>) => {
595
+ return (options.client ?? _heyApiClient).put<UpdateOrgMemberRoleResponses, UpdateOrgMemberRoleErrors, ThrowOnError>({
596
+ security: [
597
+ {
598
+ name: 'X-API-Key',
599
+ type: 'apiKey'
600
+ },
601
+ {
602
+ scheme: 'bearer',
603
+ type: 'http'
604
+ }
605
+ ],
606
+ url: '/v1/orgs/{org_id}/members/{user_id}',
607
+ ...options,
608
+ headers: {
609
+ 'Content-Type': 'application/json',
610
+ ...options.headers
611
+ }
612
+ });
613
+ };
614
+
615
+ /**
616
+ * Get Organization Limits
617
+ * Get the current limits and quotas for an organization.
618
+ */
619
+ export const getOrgLimits = <ThrowOnError extends boolean = false>(options: Options<GetOrgLimitsData, ThrowOnError>) => {
620
+ return (options.client ?? _heyApiClient).get<GetOrgLimitsResponses, GetOrgLimitsErrors, ThrowOnError>({
621
+ security: [
622
+ {
623
+ name: 'X-API-Key',
624
+ type: 'apiKey'
625
+ },
626
+ {
627
+ scheme: 'bearer',
628
+ type: 'http'
629
+ }
630
+ ],
631
+ url: '/v1/orgs/{org_id}/limits',
632
+ ...options
633
+ });
634
+ };
635
+
636
+ /**
637
+ * Get Organization Usage
638
+ * Get detailed usage statistics for an organization aggregated across all graphs.
639
+ */
640
+ export const getOrgUsage = <ThrowOnError extends boolean = false>(options: Options<GetOrgUsageData, ThrowOnError>) => {
641
+ return (options.client ?? _heyApiClient).get<GetOrgUsageResponses, GetOrgUsageErrors, ThrowOnError>({
642
+ security: [
643
+ {
644
+ name: 'X-API-Key',
645
+ type: 'apiKey'
646
+ },
647
+ {
648
+ scheme: 'bearer',
649
+ type: 'http'
650
+ }
651
+ ],
652
+ url: '/v1/orgs/{org_id}/usage',
420
653
  ...options
421
654
  });
422
655
  };
@@ -1406,7 +1639,7 @@ export const getGraphMetrics = <ThrowOnError extends boolean = false>(options: O
1406
1639
 
1407
1640
  /**
1408
1641
  * Get Graph Usage Analytics
1409
- * Get comprehensive usage analytics tracked by the GraphUsageTracking model.
1642
+ * Get comprehensive usage analytics tracked by the GraphUsage model.
1410
1643
  *
1411
1644
  * Provides temporal usage patterns including:
1412
1645
  * - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
@@ -3029,9 +3262,15 @@ export const selectGraph = <ThrowOnError extends boolean = false>(options: Optio
3029
3262
  * and shared repository subscriptions. This is the primary endpoint for frontend
3030
3263
  * applications to display subscription options.
3031
3264
  *
3265
+ * **Pricing Model:**
3266
+ * - Graph subscriptions are **per-graph** with infrastructure-based pricing
3267
+ * - Each graph you create has its own monthly subscription
3268
+ * - Organizations can have multiple graphs with different infrastructure tiers
3269
+ * - Credits are allocated per-graph, not shared across organization
3270
+ *
3032
3271
  * Includes:
3033
- * - Graph subscription tiers (standard, enterprise, premium)
3034
- * - Shared repository subscriptions (SEC, industry, economic data)
3272
+ * - Graph infrastructure tiers (kuzu-standard, kuzu-large, kuzu-xlarge) - per-graph pricing
3273
+ * - Shared repository subscriptions (SEC, industry, economic data) - org-level
3035
3274
  * - Operation costs and credit information
3036
3275
  * - Features and capabilities for each tier
3037
3276
  * - Enabled/disabled status for repositories
@@ -3177,25 +3416,17 @@ export const cancelOperation = <ThrowOnError extends boolean = false>(options: O
3177
3416
  };
3178
3417
 
3179
3418
  /**
3180
- * Create Payment Checkout Session
3181
- * Create a Stripe checkout session for collecting payment method.
3419
+ * Get Organization Customer Info
3420
+ * Get billing customer information for an organization including payment methods on file.
3182
3421
  *
3183
- * This endpoint is used when a user needs to add a payment method before
3184
- * provisioning resources. It creates a pending subscription and redirects
3185
- * the user to Stripe Checkout to collect payment details.
3186
- *
3187
- * **Flow:**
3188
- * 1. User tries to create a graph but has no payment method
3189
- * 2. Frontend calls this endpoint with graph configuration
3190
- * 3. Backend creates a subscription in PENDING_PAYMENT status
3191
- * 4. Returns Stripe Checkout URL
3192
- * 5. User completes payment on Stripe
3193
- * 6. Webhook activates subscription and provisions resource
3422
+ * Returns customer details, payment methods, and whether invoice billing is enabled.
3194
3423
  *
3195
- * **Enterprise customers** (with invoice_billing_enabled) should not call this endpoint.
3424
+ * **Requirements:**
3425
+ * - User must be a member of the organization
3426
+ * - Sensitive payment details are only visible to owners
3196
3427
  */
3197
- export const createCheckoutSession = <ThrowOnError extends boolean = false>(options: Options<CreateCheckoutSessionData, ThrowOnError>) => {
3198
- return (options.client ?? _heyApiClient).post<CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, ThrowOnError>({
3428
+ export const getOrgBillingCustomer = <ThrowOnError extends boolean = false>(options: Options<GetOrgBillingCustomerData, ThrowOnError>) => {
3429
+ return (options.client ?? _heyApiClient).get<GetOrgBillingCustomerResponses, GetOrgBillingCustomerErrors, ThrowOnError>({
3199
3430
  security: [
3200
3431
  {
3201
3432
  name: 'X-API-Key',
@@ -3206,34 +3437,22 @@ export const createCheckoutSession = <ThrowOnError extends boolean = false>(opti
3206
3437
  type: 'http'
3207
3438
  }
3208
3439
  ],
3209
- url: '/v1/billing/checkout',
3210
- ...options,
3211
- headers: {
3212
- 'Content-Type': 'application/json',
3213
- ...options.headers
3214
- }
3440
+ url: '/v1/billing/customer/{org_id}',
3441
+ ...options
3215
3442
  });
3216
3443
  };
3217
3444
 
3218
3445
  /**
3219
- * Get Checkout Session Status
3220
- * Poll the status of a checkout session.
3446
+ * Update Organization Default Payment Method
3447
+ * Update the default payment method for the organization.
3221
3448
  *
3222
- * Frontend should poll this endpoint after user returns from Stripe Checkout
3223
- * to determine when the resource is ready.
3224
- *
3225
- * **Status Values:**
3226
- * - `pending_payment`: Waiting for payment to complete
3227
- * - `provisioning`: Payment confirmed, resource being created
3228
- * - `completed`: Resource is ready (resource_id will be set)
3229
- * - `failed`: Something went wrong (error field will be set)
3449
+ * This changes which payment method will be used for future subscription charges.
3230
3450
  *
3231
- * **When status is 'completed':**
3232
- * - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress
3233
- * - For repositories: `resource_id` will be the repository name and access is immediately available
3451
+ * **Requirements:**
3452
+ * - User must be an OWNER of the organization
3234
3453
  */
3235
- export const getCheckoutStatus = <ThrowOnError extends boolean = false>(options: Options<GetCheckoutStatusData, ThrowOnError>) => {
3236
- return (options.client ?? _heyApiClient).get<GetCheckoutStatusResponses, GetCheckoutStatusErrors, ThrowOnError>({
3454
+ export const updateOrgPaymentMethod = <ThrowOnError extends boolean = false>(options: Options<UpdateOrgPaymentMethodData, ThrowOnError>) => {
3455
+ return (options.client ?? _heyApiClient).post<UpdateOrgPaymentMethodResponses, UpdateOrgPaymentMethodErrors, ThrowOnError>({
3237
3456
  security: [
3238
3457
  {
3239
3458
  name: 'X-API-Key',
@@ -3244,19 +3463,26 @@ export const getCheckoutStatus = <ThrowOnError extends boolean = false>(options:
3244
3463
  type: 'http'
3245
3464
  }
3246
3465
  ],
3247
- url: '/v1/billing/checkout/{session_id}/status',
3248
- ...options
3466
+ url: '/v1/billing/customer/{org_id}/payment-method',
3467
+ ...options,
3468
+ headers: {
3469
+ 'Content-Type': 'application/json',
3470
+ ...options.headers
3471
+ }
3249
3472
  });
3250
3473
  };
3251
3474
 
3252
3475
  /**
3253
- * Get Customer Info
3254
- * Get billing customer information including payment methods on file.
3476
+ * List Organization Subscriptions
3477
+ * List all active and past subscriptions for an organization.
3255
3478
  *
3256
- * Returns customer details, payment methods, and whether invoice billing is enabled.
3479
+ * Includes both graph and repository subscriptions with their status, pricing, and billing information.
3480
+ *
3481
+ * **Requirements:**
3482
+ * - User must be a member of the organization
3257
3483
  */
3258
- export const getBillingCustomer = <ThrowOnError extends boolean = false>(options?: Options<GetBillingCustomerData, ThrowOnError>) => {
3259
- return (options?.client ?? _heyApiClient).get<GetBillingCustomerResponses, unknown, ThrowOnError>({
3484
+ export const listOrgSubscriptions = <ThrowOnError extends boolean = false>(options: Options<ListOrgSubscriptionsData, ThrowOnError>) => {
3485
+ return (options.client ?? _heyApiClient).get<ListOrgSubscriptionsResponses, ListOrgSubscriptionsErrors, ThrowOnError>({
3260
3486
  security: [
3261
3487
  {
3262
3488
  name: 'X-API-Key',
@@ -3267,19 +3493,20 @@ export const getBillingCustomer = <ThrowOnError extends boolean = false>(options
3267
3493
  type: 'http'
3268
3494
  }
3269
3495
  ],
3270
- url: '/v1/billing/customer',
3496
+ url: '/v1/billing/subscriptions/{org_id}',
3271
3497
  ...options
3272
3498
  });
3273
3499
  };
3274
3500
 
3275
3501
  /**
3276
- * Update Default Payment Method
3277
- * Update the default payment method for the customer.
3502
+ * Get Organization Subscription Details
3503
+ * Get detailed information about a specific subscription.
3278
3504
  *
3279
- * This changes which payment method will be used for future subscription charges.
3505
+ * **Requirements:**
3506
+ * - User must be a member of the organization
3280
3507
  */
3281
- export const updatePaymentMethod = <ThrowOnError extends boolean = false>(options: Options<UpdatePaymentMethodData, ThrowOnError>) => {
3282
- return (options.client ?? _heyApiClient).post<UpdatePaymentMethodResponses, UpdatePaymentMethodErrors, ThrowOnError>({
3508
+ export const getOrgSubscription = <ThrowOnError extends boolean = false>(options: Options<GetOrgSubscriptionData, ThrowOnError>) => {
3509
+ return (options.client ?? _heyApiClient).get<GetOrgSubscriptionResponses, GetOrgSubscriptionErrors, ThrowOnError>({
3283
3510
  security: [
3284
3511
  {
3285
3512
  name: 'X-API-Key',
@@ -3290,23 +3517,22 @@ export const updatePaymentMethod = <ThrowOnError extends boolean = false>(option
3290
3517
  type: 'http'
3291
3518
  }
3292
3519
  ],
3293
- url: '/v1/billing/customer/payment-method',
3294
- ...options,
3295
- headers: {
3296
- 'Content-Type': 'application/json',
3297
- ...options.headers
3298
- }
3520
+ url: '/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}',
3521
+ ...options
3299
3522
  });
3300
3523
  };
3301
3524
 
3302
3525
  /**
3303
- * List Invoices
3304
- * List payment history and invoices.
3526
+ * Cancel Organization Subscription
3527
+ * Cancel an organization subscription.
3305
3528
  *
3306
- * Returns past invoices with payment status, amounts, and line items.
3529
+ * The subscription will remain active until the end of the current billing period.
3530
+ *
3531
+ * **Requirements:**
3532
+ * - User must be an OWNER of the organization
3307
3533
  */
3308
- export const listInvoices = <ThrowOnError extends boolean = false>(options?: Options<ListInvoicesData, ThrowOnError>) => {
3309
- return (options?.client ?? _heyApiClient).get<ListInvoicesResponses, ListInvoicesErrors, ThrowOnError>({
3534
+ export const cancelOrgSubscription = <ThrowOnError extends boolean = false>(options: Options<CancelOrgSubscriptionData, ThrowOnError>) => {
3535
+ return (options.client ?? _heyApiClient).post<CancelOrgSubscriptionResponses, CancelOrgSubscriptionErrors, ThrowOnError>({
3310
3536
  security: [
3311
3537
  {
3312
3538
  name: 'X-API-Key',
@@ -3317,19 +3543,23 @@ export const listInvoices = <ThrowOnError extends boolean = false>(options?: Opt
3317
3543
  type: 'http'
3318
3544
  }
3319
3545
  ],
3320
- url: '/v1/billing/invoices',
3546
+ url: '/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancel',
3321
3547
  ...options
3322
3548
  });
3323
3549
  };
3324
3550
 
3325
3551
  /**
3326
- * Get Upcoming Invoice
3327
- * Get preview of the next invoice.
3552
+ * List Organization Invoices
3553
+ * List payment history and invoices for an organization.
3328
3554
  *
3329
- * Returns estimated charges for the next billing period.
3555
+ * Returns past invoices with payment status, amounts, and line items.
3556
+ *
3557
+ * **Requirements:**
3558
+ * - User must be a member of the organization
3559
+ * - Full invoice details are only visible to owners and admins
3330
3560
  */
3331
- export const getUpcomingInvoice = <ThrowOnError extends boolean = false>(options?: Options<GetUpcomingInvoiceData, ThrowOnError>) => {
3332
- return (options?.client ?? _heyApiClient).get<GetUpcomingInvoiceResponses, unknown, ThrowOnError>({
3561
+ export const listOrgInvoices = <ThrowOnError extends boolean = false>(options: Options<ListOrgInvoicesData, ThrowOnError>) => {
3562
+ return (options.client ?? _heyApiClient).get<ListOrgInvoicesResponses, ListOrgInvoicesErrors, ThrowOnError>({
3333
3563
  security: [
3334
3564
  {
3335
3565
  name: 'X-API-Key',
@@ -3340,19 +3570,23 @@ export const getUpcomingInvoice = <ThrowOnError extends boolean = false>(options
3340
3570
  type: 'http'
3341
3571
  }
3342
3572
  ],
3343
- url: '/v1/billing/invoices/upcoming',
3573
+ url: '/v1/billing/invoices/{org_id}',
3344
3574
  ...options
3345
3575
  });
3346
3576
  };
3347
3577
 
3348
3578
  /**
3349
- * List All Subscriptions
3350
- * List all active and past subscriptions for the user.
3579
+ * Get Organization Upcoming Invoice
3580
+ * Get preview of the next invoice for an organization.
3351
3581
  *
3352
- * Includes both graph and repository subscriptions with their status, pricing, and billing information.
3582
+ * Returns estimated charges for the next billing period.
3583
+ *
3584
+ * **Requirements:**
3585
+ * - User must be a member of the organization
3586
+ * - Full invoice details are only visible to owners and admins
3353
3587
  */
3354
- export const listSubscriptions = <ThrowOnError extends boolean = false>(options?: Options<ListSubscriptionsData, ThrowOnError>) => {
3355
- return (options?.client ?? _heyApiClient).get<ListSubscriptionsResponses, unknown, ThrowOnError>({
3588
+ export const getOrgUpcomingInvoice = <ThrowOnError extends boolean = false>(options: Options<GetOrgUpcomingInvoiceData, ThrowOnError>) => {
3589
+ return (options.client ?? _heyApiClient).get<GetOrgUpcomingInvoiceResponses, GetOrgUpcomingInvoiceErrors, ThrowOnError>({
3356
3590
  security: [
3357
3591
  {
3358
3592
  name: 'X-API-Key',
@@ -3363,17 +3597,33 @@ export const listSubscriptions = <ThrowOnError extends boolean = false>(options?
3363
3597
  type: 'http'
3364
3598
  }
3365
3599
  ],
3366
- url: '/v1/billing/subscriptions',
3600
+ url: '/v1/billing/invoices/{org_id}/upcoming',
3367
3601
  ...options
3368
3602
  });
3369
3603
  };
3370
3604
 
3371
3605
  /**
3372
- * Get Subscription Details
3373
- * Get detailed information about a specific subscription.
3606
+ * Create Payment Checkout Session
3607
+ * Create a Stripe checkout session for collecting payment method.
3608
+ *
3609
+ * This endpoint is used when an organization owner needs to add a payment method before
3610
+ * provisioning resources. It creates a pending subscription and redirects
3611
+ * to Stripe Checkout to collect payment details.
3612
+ *
3613
+ * **Flow:**
3614
+ * 1. Owner tries to create a graph but org has no payment method
3615
+ * 2. Frontend calls this endpoint with graph configuration
3616
+ * 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
3617
+ * 4. Returns Stripe Checkout URL
3618
+ * 5. User completes payment on Stripe
3619
+ * 6. Webhook activates subscription and provisions resource
3620
+ *
3621
+ * **Requirements:**
3622
+ * - User must be an OWNER of their organization
3623
+ * - Enterprise customers (with invoice_billing_enabled) should not call this endpoint.
3374
3624
  */
3375
- export const getSubscription = <ThrowOnError extends boolean = false>(options: Options<GetSubscriptionData, ThrowOnError>) => {
3376
- return (options.client ?? _heyApiClient).get<GetSubscriptionResponses, GetSubscriptionErrors, ThrowOnError>({
3625
+ export const createCheckoutSession = <ThrowOnError extends boolean = false>(options: Options<CreateCheckoutSessionData, ThrowOnError>) => {
3626
+ return (options.client ?? _heyApiClient).post<CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, ThrowOnError>({
3377
3627
  security: [
3378
3628
  {
3379
3629
  name: 'X-API-Key',
@@ -3384,19 +3634,34 @@ export const getSubscription = <ThrowOnError extends boolean = false>(options: O
3384
3634
  type: 'http'
3385
3635
  }
3386
3636
  ],
3387
- url: '/v1/billing/subscriptions/{subscription_id}',
3388
- ...options
3637
+ url: '/v1/billing/checkout',
3638
+ ...options,
3639
+ headers: {
3640
+ 'Content-Type': 'application/json',
3641
+ ...options.headers
3642
+ }
3389
3643
  });
3390
3644
  };
3391
3645
 
3392
3646
  /**
3393
- * Cancel Subscription
3394
- * Cancel a subscription.
3647
+ * Get Checkout Session Status
3648
+ * Poll the status of a checkout session.
3395
3649
  *
3396
- * The subscription will remain active until the end of the current billing period.
3650
+ * Frontend should poll this endpoint after user returns from Stripe Checkout
3651
+ * to determine when the resource is ready.
3652
+ *
3653
+ * **Status Values:**
3654
+ * - `pending_payment`: Waiting for payment to complete
3655
+ * - `provisioning`: Payment confirmed, resource being created
3656
+ * - `completed`: Resource is ready (resource_id will be set)
3657
+ * - `failed`: Something went wrong (error field will be set)
3658
+ *
3659
+ * **When status is 'completed':**
3660
+ * - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress
3661
+ * - For repositories: `resource_id` will be the repository name and access is immediately available
3397
3662
  */
3398
- export const cancelSubscription2 = <ThrowOnError extends boolean = false>(options: Options<CancelSubscription2Data, ThrowOnError>) => {
3399
- return (options.client ?? _heyApiClient).post<CancelSubscription2Responses, CancelSubscription2Errors, ThrowOnError>({
3663
+ export const getCheckoutStatus = <ThrowOnError extends boolean = false>(options: Options<GetCheckoutStatusData, ThrowOnError>) => {
3664
+ return (options.client ?? _heyApiClient).get<GetCheckoutStatusResponses, GetCheckoutStatusErrors, ThrowOnError>({
3400
3665
  security: [
3401
3666
  {
3402
3667
  name: 'X-API-Key',
@@ -3407,7 +3672,7 @@ export const cancelSubscription2 = <ThrowOnError extends boolean = false>(option
3407
3672
  type: 'http'
3408
3673
  }
3409
3674
  ],
3410
- url: '/v1/billing/subscriptions/{subscription_id}/cancel',
3675
+ url: '/v1/billing/checkout/{session_id}/status',
3411
3676
  ...options
3412
3677
  });
3413
3678
  };