@robosystems/client 0.2.9 → 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/package.json +1 -1
- package/sdk/sdk.gen.d.ts +181 -8
- package/sdk/sdk.gen.js +513 -11
- package/sdk/sdk.gen.ts +511 -10
- package/sdk/types.gen.d.ts +1320 -209
- package/sdk/types.gen.ts +1412 -183
- package/sdk.gen.d.ts +181 -8
- package/sdk.gen.js +513 -11
- package/sdk.gen.ts +511 -10
- package/types.gen.d.ts +1320 -209
- package/types.gen.ts +1412 -183
package/sdk/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,
|
|
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.
|
|
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,240 @@ export const updateUserApiKey = <ThrowOnError extends boolean = false>(options:
|
|
|
401
405
|
};
|
|
402
406
|
|
|
403
407
|
/**
|
|
404
|
-
*
|
|
405
|
-
*
|
|
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.
|
|
502
|
+
*/
|
|
503
|
+
export const listOrgGraphs = <ThrowOnError extends boolean = false>(options: Options<ListOrgGraphsData, ThrowOnError>) => {
|
|
504
|
+
return (options.client ?? _heyApiClient).get<ListOrgGraphsResponses, ListOrgGraphsErrors, ThrowOnError>({
|
|
505
|
+
security: [
|
|
506
|
+
{
|
|
507
|
+
name: 'X-API-Key',
|
|
508
|
+
type: 'apiKey'
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
scheme: 'bearer',
|
|
512
|
+
type: 'http'
|
|
513
|
+
}
|
|
514
|
+
],
|
|
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.
|
|
406
639
|
*/
|
|
407
|
-
export const
|
|
408
|
-
return (options
|
|
640
|
+
export const getOrgUsage = <ThrowOnError extends boolean = false>(options: Options<GetOrgUsageData, ThrowOnError>) => {
|
|
641
|
+
return (options.client ?? _heyApiClient).get<GetOrgUsageResponses, GetOrgUsageErrors, ThrowOnError>({
|
|
409
642
|
security: [
|
|
410
643
|
{
|
|
411
644
|
name: 'X-API-Key',
|
|
@@ -416,7 +649,7 @@ export const getUserLimits = <ThrowOnError extends boolean = false>(options?: Op
|
|
|
416
649
|
type: 'http'
|
|
417
650
|
}
|
|
418
651
|
],
|
|
419
|
-
url: '/v1/
|
|
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
|
|
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
|
|
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
|
|
@@ -3174,4 +3413,266 @@ export const cancelOperation = <ThrowOnError extends boolean = false>(options: O
|
|
|
3174
3413
|
url: '/v1/operations/{operation_id}',
|
|
3175
3414
|
...options
|
|
3176
3415
|
});
|
|
3416
|
+
};
|
|
3417
|
+
|
|
3418
|
+
/**
|
|
3419
|
+
* Get Organization Customer Info
|
|
3420
|
+
* Get billing customer information for an organization including payment methods on file.
|
|
3421
|
+
*
|
|
3422
|
+
* Returns customer details, payment methods, and whether invoice billing is enabled.
|
|
3423
|
+
*
|
|
3424
|
+
* **Requirements:**
|
|
3425
|
+
* - User must be a member of the organization
|
|
3426
|
+
* - Sensitive payment details are only visible to owners
|
|
3427
|
+
*/
|
|
3428
|
+
export const getOrgBillingCustomer = <ThrowOnError extends boolean = false>(options: Options<GetOrgBillingCustomerData, ThrowOnError>) => {
|
|
3429
|
+
return (options.client ?? _heyApiClient).get<GetOrgBillingCustomerResponses, GetOrgBillingCustomerErrors, ThrowOnError>({
|
|
3430
|
+
security: [
|
|
3431
|
+
{
|
|
3432
|
+
name: 'X-API-Key',
|
|
3433
|
+
type: 'apiKey'
|
|
3434
|
+
},
|
|
3435
|
+
{
|
|
3436
|
+
scheme: 'bearer',
|
|
3437
|
+
type: 'http'
|
|
3438
|
+
}
|
|
3439
|
+
],
|
|
3440
|
+
url: '/v1/billing/customer/{org_id}',
|
|
3441
|
+
...options
|
|
3442
|
+
});
|
|
3443
|
+
};
|
|
3444
|
+
|
|
3445
|
+
/**
|
|
3446
|
+
* Update Organization Default Payment Method
|
|
3447
|
+
* Update the default payment method for the organization.
|
|
3448
|
+
*
|
|
3449
|
+
* This changes which payment method will be used for future subscription charges.
|
|
3450
|
+
*
|
|
3451
|
+
* **Requirements:**
|
|
3452
|
+
* - User must be an OWNER of the organization
|
|
3453
|
+
*/
|
|
3454
|
+
export const updateOrgPaymentMethod = <ThrowOnError extends boolean = false>(options: Options<UpdateOrgPaymentMethodData, ThrowOnError>) => {
|
|
3455
|
+
return (options.client ?? _heyApiClient).post<UpdateOrgPaymentMethodResponses, UpdateOrgPaymentMethodErrors, ThrowOnError>({
|
|
3456
|
+
security: [
|
|
3457
|
+
{
|
|
3458
|
+
name: 'X-API-Key',
|
|
3459
|
+
type: 'apiKey'
|
|
3460
|
+
},
|
|
3461
|
+
{
|
|
3462
|
+
scheme: 'bearer',
|
|
3463
|
+
type: 'http'
|
|
3464
|
+
}
|
|
3465
|
+
],
|
|
3466
|
+
url: '/v1/billing/customer/{org_id}/payment-method',
|
|
3467
|
+
...options,
|
|
3468
|
+
headers: {
|
|
3469
|
+
'Content-Type': 'application/json',
|
|
3470
|
+
...options.headers
|
|
3471
|
+
}
|
|
3472
|
+
});
|
|
3473
|
+
};
|
|
3474
|
+
|
|
3475
|
+
/**
|
|
3476
|
+
* List Organization Subscriptions
|
|
3477
|
+
* List all active and past subscriptions for an organization.
|
|
3478
|
+
*
|
|
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
|
|
3483
|
+
*/
|
|
3484
|
+
export const listOrgSubscriptions = <ThrowOnError extends boolean = false>(options: Options<ListOrgSubscriptionsData, ThrowOnError>) => {
|
|
3485
|
+
return (options.client ?? _heyApiClient).get<ListOrgSubscriptionsResponses, ListOrgSubscriptionsErrors, ThrowOnError>({
|
|
3486
|
+
security: [
|
|
3487
|
+
{
|
|
3488
|
+
name: 'X-API-Key',
|
|
3489
|
+
type: 'apiKey'
|
|
3490
|
+
},
|
|
3491
|
+
{
|
|
3492
|
+
scheme: 'bearer',
|
|
3493
|
+
type: 'http'
|
|
3494
|
+
}
|
|
3495
|
+
],
|
|
3496
|
+
url: '/v1/billing/subscriptions/{org_id}',
|
|
3497
|
+
...options
|
|
3498
|
+
});
|
|
3499
|
+
};
|
|
3500
|
+
|
|
3501
|
+
/**
|
|
3502
|
+
* Get Organization Subscription Details
|
|
3503
|
+
* Get detailed information about a specific subscription.
|
|
3504
|
+
*
|
|
3505
|
+
* **Requirements:**
|
|
3506
|
+
* - User must be a member of the organization
|
|
3507
|
+
*/
|
|
3508
|
+
export const getOrgSubscription = <ThrowOnError extends boolean = false>(options: Options<GetOrgSubscriptionData, ThrowOnError>) => {
|
|
3509
|
+
return (options.client ?? _heyApiClient).get<GetOrgSubscriptionResponses, GetOrgSubscriptionErrors, ThrowOnError>({
|
|
3510
|
+
security: [
|
|
3511
|
+
{
|
|
3512
|
+
name: 'X-API-Key',
|
|
3513
|
+
type: 'apiKey'
|
|
3514
|
+
},
|
|
3515
|
+
{
|
|
3516
|
+
scheme: 'bearer',
|
|
3517
|
+
type: 'http'
|
|
3518
|
+
}
|
|
3519
|
+
],
|
|
3520
|
+
url: '/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}',
|
|
3521
|
+
...options
|
|
3522
|
+
});
|
|
3523
|
+
};
|
|
3524
|
+
|
|
3525
|
+
/**
|
|
3526
|
+
* Cancel Organization Subscription
|
|
3527
|
+
* Cancel an organization subscription.
|
|
3528
|
+
*
|
|
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
|
|
3533
|
+
*/
|
|
3534
|
+
export const cancelOrgSubscription = <ThrowOnError extends boolean = false>(options: Options<CancelOrgSubscriptionData, ThrowOnError>) => {
|
|
3535
|
+
return (options.client ?? _heyApiClient).post<CancelOrgSubscriptionResponses, CancelOrgSubscriptionErrors, ThrowOnError>({
|
|
3536
|
+
security: [
|
|
3537
|
+
{
|
|
3538
|
+
name: 'X-API-Key',
|
|
3539
|
+
type: 'apiKey'
|
|
3540
|
+
},
|
|
3541
|
+
{
|
|
3542
|
+
scheme: 'bearer',
|
|
3543
|
+
type: 'http'
|
|
3544
|
+
}
|
|
3545
|
+
],
|
|
3546
|
+
url: '/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancel',
|
|
3547
|
+
...options
|
|
3548
|
+
});
|
|
3549
|
+
};
|
|
3550
|
+
|
|
3551
|
+
/**
|
|
3552
|
+
* List Organization Invoices
|
|
3553
|
+
* List payment history and invoices for an organization.
|
|
3554
|
+
*
|
|
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
|
|
3560
|
+
*/
|
|
3561
|
+
export const listOrgInvoices = <ThrowOnError extends boolean = false>(options: Options<ListOrgInvoicesData, ThrowOnError>) => {
|
|
3562
|
+
return (options.client ?? _heyApiClient).get<ListOrgInvoicesResponses, ListOrgInvoicesErrors, ThrowOnError>({
|
|
3563
|
+
security: [
|
|
3564
|
+
{
|
|
3565
|
+
name: 'X-API-Key',
|
|
3566
|
+
type: 'apiKey'
|
|
3567
|
+
},
|
|
3568
|
+
{
|
|
3569
|
+
scheme: 'bearer',
|
|
3570
|
+
type: 'http'
|
|
3571
|
+
}
|
|
3572
|
+
],
|
|
3573
|
+
url: '/v1/billing/invoices/{org_id}',
|
|
3574
|
+
...options
|
|
3575
|
+
});
|
|
3576
|
+
};
|
|
3577
|
+
|
|
3578
|
+
/**
|
|
3579
|
+
* Get Organization Upcoming Invoice
|
|
3580
|
+
* Get preview of the next invoice for an organization.
|
|
3581
|
+
*
|
|
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
|
|
3587
|
+
*/
|
|
3588
|
+
export const getOrgUpcomingInvoice = <ThrowOnError extends boolean = false>(options: Options<GetOrgUpcomingInvoiceData, ThrowOnError>) => {
|
|
3589
|
+
return (options.client ?? _heyApiClient).get<GetOrgUpcomingInvoiceResponses, GetOrgUpcomingInvoiceErrors, ThrowOnError>({
|
|
3590
|
+
security: [
|
|
3591
|
+
{
|
|
3592
|
+
name: 'X-API-Key',
|
|
3593
|
+
type: 'apiKey'
|
|
3594
|
+
},
|
|
3595
|
+
{
|
|
3596
|
+
scheme: 'bearer',
|
|
3597
|
+
type: 'http'
|
|
3598
|
+
}
|
|
3599
|
+
],
|
|
3600
|
+
url: '/v1/billing/invoices/{org_id}/upcoming',
|
|
3601
|
+
...options
|
|
3602
|
+
});
|
|
3603
|
+
};
|
|
3604
|
+
|
|
3605
|
+
/**
|
|
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.
|
|
3624
|
+
*/
|
|
3625
|
+
export const createCheckoutSession = <ThrowOnError extends boolean = false>(options: Options<CreateCheckoutSessionData, ThrowOnError>) => {
|
|
3626
|
+
return (options.client ?? _heyApiClient).post<CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, ThrowOnError>({
|
|
3627
|
+
security: [
|
|
3628
|
+
{
|
|
3629
|
+
name: 'X-API-Key',
|
|
3630
|
+
type: 'apiKey'
|
|
3631
|
+
},
|
|
3632
|
+
{
|
|
3633
|
+
scheme: 'bearer',
|
|
3634
|
+
type: 'http'
|
|
3635
|
+
}
|
|
3636
|
+
],
|
|
3637
|
+
url: '/v1/billing/checkout',
|
|
3638
|
+
...options,
|
|
3639
|
+
headers: {
|
|
3640
|
+
'Content-Type': 'application/json',
|
|
3641
|
+
...options.headers
|
|
3642
|
+
}
|
|
3643
|
+
});
|
|
3644
|
+
};
|
|
3645
|
+
|
|
3646
|
+
/**
|
|
3647
|
+
* Get Checkout Session Status
|
|
3648
|
+
* Poll the status of a checkout session.
|
|
3649
|
+
*
|
|
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
|
|
3662
|
+
*/
|
|
3663
|
+
export const getCheckoutStatus = <ThrowOnError extends boolean = false>(options: Options<GetCheckoutStatusData, ThrowOnError>) => {
|
|
3664
|
+
return (options.client ?? _heyApiClient).get<GetCheckoutStatusResponses, GetCheckoutStatusErrors, ThrowOnError>({
|
|
3665
|
+
security: [
|
|
3666
|
+
{
|
|
3667
|
+
name: 'X-API-Key',
|
|
3668
|
+
type: 'apiKey'
|
|
3669
|
+
},
|
|
3670
|
+
{
|
|
3671
|
+
scheme: 'bearer',
|
|
3672
|
+
type: 'http'
|
|
3673
|
+
}
|
|
3674
|
+
],
|
|
3675
|
+
url: '/v1/billing/checkout/{session_id}/status',
|
|
3676
|
+
...options
|
|
3677
|
+
});
|
|
3177
3678
|
};
|