shoal-web-sdk 1.0.42 → 1.0.43
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/dist/sdk/@tanstack/react-query.gen.d.ts +57 -1
- package/dist/sdk/@tanstack/react-query.gen.js +37 -1
- package/dist/sdk/sdk.gen.d.ts +9 -1
- package/dist/sdk/sdk.gen.js +30 -0
- package/dist/sdk/types.gen.d.ts +113 -0
- package/dist/sdk/zod.gen.d.ts +59 -0
- package/dist/sdk/zod.gen.js +53 -0
- package/dist/tanstack-codegen/generated/generated.d.ts +7 -1
- package/dist/tanstack-codegen/generated/generated.js +43 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InfiniteData, type UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import { type Options } from '../sdk.gen';
|
|
3
|
-
import type { CheckSubdomainUniquenessData, CreateBlueprintData, CreateBlueprintError, CreateBlueprintResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateNeonBranchData, CreateNeonBranchError, CreateNeonBranchResponse, CreateNeonDatabaseData, CreateNeonDatabaseError, CreateNeonDatabaseResponse, CreateNeonProjectData, CreateNeonProjectError, CreateNeonProjectM2mData, CreateNeonProjectM2mError, CreateNeonProjectM2mResponse, CreateNeonProjectResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSecretData, CreateSecretError, CreateSecretM2mData, CreateSecretM2mError, CreateSecretM2mResponse, CreateSecretResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteBlueprintData, DeleteBlueprintError, DeleteBlueprintResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteNeonDatabaseData, DeleteNeonDatabaseError, DeleteNeonDatabaseResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetBlueprintM2mData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectOverviewData, GetPublicInviteData, GetSecretValueData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, PreviewBlueprintData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdError, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateBlueprintData, UpdateBlueprintError, UpdateBlueprintResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewBlueprintsData, ViewBlueprintsM2mData } from '../types.gen';
|
|
3
|
+
import type { CheckSubdomainUniquenessData, CreateBlueprintData, CreateBlueprintError, CreateBlueprintResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateNeonBranchData, CreateNeonBranchError, CreateNeonBranchResponse, CreateNeonDatabaseData, CreateNeonDatabaseError, CreateNeonDatabaseResponse, CreateNeonProjectData, CreateNeonProjectError, CreateNeonProjectM2mData, CreateNeonProjectM2mError, CreateNeonProjectM2mResponse, CreateNeonProjectResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSecretData, CreateSecretError, CreateSecretM2mData, CreateSecretM2mError, CreateSecretM2mResponse, CreateSecretResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteBlueprintData, DeleteBlueprintError, DeleteBlueprintResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteNeonDatabaseData, DeleteNeonDatabaseError, DeleteNeonDatabaseResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchMongoOrganizationsData, FetchMongoRegionsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetBlueprintM2mData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectOverviewData, GetPublicInviteData, GetSecretValueData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, PreviewBlueprintData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdError, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateBlueprintData, UpdateBlueprintError, UpdateBlueprintResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewBlueprintsData, ViewBlueprintsM2mData } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -560,6 +560,62 @@ export declare const fetchNeonRegionsOptions: (options: Options<FetchNeonRegions
|
|
|
560
560
|
[dataTagErrorSymbol]: Error;
|
|
561
561
|
};
|
|
562
562
|
};
|
|
563
|
+
export declare const fetchMongoOrganizationsQueryKey: (options: Options<FetchMongoOrganizationsData>) => [Pick<Options<FetchMongoOrganizationsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
564
|
+
_id: string;
|
|
565
|
+
_infinite?: boolean;
|
|
566
|
+
tags?: ReadonlyArray<string>;
|
|
567
|
+
}];
|
|
568
|
+
/**
|
|
569
|
+
* List MongoDB Atlas organizations for the authenticated service account.
|
|
570
|
+
*/
|
|
571
|
+
export declare const fetchMongoOrganizationsOptions: (options: Options<FetchMongoOrganizationsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").MongoOrganization[], Error, import("../types.gen").MongoOrganization[], [Pick<Options<FetchMongoOrganizationsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
572
|
+
_id: string;
|
|
573
|
+
_infinite?: boolean;
|
|
574
|
+
tags?: ReadonlyArray<string>;
|
|
575
|
+
}]>, "queryFn"> & {
|
|
576
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").MongoOrganization[], [Pick<Options<FetchMongoOrganizationsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
577
|
+
_id: string;
|
|
578
|
+
_infinite?: boolean;
|
|
579
|
+
tags?: ReadonlyArray<string>;
|
|
580
|
+
}], never> | undefined;
|
|
581
|
+
} & {
|
|
582
|
+
queryKey: [Pick<Options<FetchMongoOrganizationsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
583
|
+
_id: string;
|
|
584
|
+
_infinite?: boolean;
|
|
585
|
+
tags?: ReadonlyArray<string>;
|
|
586
|
+
}] & {
|
|
587
|
+
[dataTagSymbol]: import("../types.gen").MongoOrganization[];
|
|
588
|
+
[dataTagErrorSymbol]: Error;
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
export declare const fetchMongoRegionsQueryKey: (options: Options<FetchMongoRegionsData>) => [Pick<Options<FetchMongoRegionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
592
|
+
_id: string;
|
|
593
|
+
_infinite?: boolean;
|
|
594
|
+
tags?: ReadonlyArray<string>;
|
|
595
|
+
}];
|
|
596
|
+
/**
|
|
597
|
+
* List supported MongoDB Atlas regions for a cloud provider.
|
|
598
|
+
*/
|
|
599
|
+
export declare const fetchMongoRegionsOptions: (options: Options<FetchMongoRegionsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").MongoRegion[], Error, import("../types.gen").MongoRegion[], [Pick<Options<FetchMongoRegionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
600
|
+
_id: string;
|
|
601
|
+
_infinite?: boolean;
|
|
602
|
+
tags?: ReadonlyArray<string>;
|
|
603
|
+
}]>, "queryFn"> & {
|
|
604
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").MongoRegion[], [Pick<Options<FetchMongoRegionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
605
|
+
_id: string;
|
|
606
|
+
_infinite?: boolean;
|
|
607
|
+
tags?: ReadonlyArray<string>;
|
|
608
|
+
}], never> | undefined;
|
|
609
|
+
} & {
|
|
610
|
+
queryKey: [Pick<Options<FetchMongoRegionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
611
|
+
_id: string;
|
|
612
|
+
_infinite?: boolean;
|
|
613
|
+
tags?: ReadonlyArray<string>;
|
|
614
|
+
}] & {
|
|
615
|
+
[dataTagSymbol]: import("../types.gen").MongoRegion[];
|
|
616
|
+
[dataTagErrorSymbol]: Error;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
563
619
|
export declare const fetchNeonConnectionUriQueryKey: (options: Options<FetchNeonConnectionUriData>) => [Pick<Options<FetchNeonConnectionUriData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
564
620
|
_id: string;
|
|
565
621
|
_infinite?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { checkSubdomainUniqueness, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createNeonProjectM2M, createProject, createSecret, createSecretM2M, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getBillingPlan, getBillingUsage, getBlueprint, getBlueprintM2M, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getGraphOverview, getNodeEnvironmentVariables, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listNeonBranches, listNeonDatabases, listNeonProjects, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, setEnvironmentGcpProjectId, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints, viewBlueprintsM2M } from '../sdk.gen';
|
|
4
|
+
import { checkSubdomainUniqueness, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createNeonProjectM2M, createProject, createSecret, createSecretM2M, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchMongoOrganizations, fetchMongoRegions, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getBillingPlan, getBillingUsage, getBlueprint, getBlueprintM2M, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getGraphOverview, getNodeEnvironmentVariables, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listNeonBranches, listNeonDatabases, listNeonProjects, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, setEnvironmentGcpProjectId, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints, viewBlueprintsM2M } from '../sdk.gen';
|
|
5
5
|
const createQueryKey = (id, options, infinite, tags) => {
|
|
6
6
|
const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
|
|
7
7
|
if (infinite) {
|
|
@@ -614,6 +614,42 @@ export const fetchNeonRegionsOptions = (options) => {
|
|
|
614
614
|
queryKey: fetchNeonRegionsQueryKey(options)
|
|
615
615
|
});
|
|
616
616
|
};
|
|
617
|
+
export const fetchMongoOrganizationsQueryKey = (options) => createQueryKey('fetchMongoOrganizations', options);
|
|
618
|
+
/**
|
|
619
|
+
* List MongoDB Atlas organizations for the authenticated service account.
|
|
620
|
+
*/
|
|
621
|
+
export const fetchMongoOrganizationsOptions = (options) => {
|
|
622
|
+
return queryOptions({
|
|
623
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
624
|
+
const { data } = await fetchMongoOrganizations({
|
|
625
|
+
...options,
|
|
626
|
+
...queryKey[0],
|
|
627
|
+
signal,
|
|
628
|
+
throwOnError: true
|
|
629
|
+
});
|
|
630
|
+
return data;
|
|
631
|
+
},
|
|
632
|
+
queryKey: fetchMongoOrganizationsQueryKey(options)
|
|
633
|
+
});
|
|
634
|
+
};
|
|
635
|
+
export const fetchMongoRegionsQueryKey = (options) => createQueryKey('fetchMongoRegions', options);
|
|
636
|
+
/**
|
|
637
|
+
* List supported MongoDB Atlas regions for a cloud provider.
|
|
638
|
+
*/
|
|
639
|
+
export const fetchMongoRegionsOptions = (options) => {
|
|
640
|
+
return queryOptions({
|
|
641
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
642
|
+
const { data } = await fetchMongoRegions({
|
|
643
|
+
...options,
|
|
644
|
+
...queryKey[0],
|
|
645
|
+
signal,
|
|
646
|
+
throwOnError: true
|
|
647
|
+
});
|
|
648
|
+
return data;
|
|
649
|
+
},
|
|
650
|
+
queryKey: fetchMongoRegionsQueryKey(options)
|
|
651
|
+
});
|
|
652
|
+
};
|
|
617
653
|
export const fetchNeonConnectionUriQueryKey = (options) => createQueryKey('fetchNeonConnectionUri', options);
|
|
618
654
|
/**
|
|
619
655
|
* Retrieve a Neon database connection URI.
|
package/dist/sdk/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateBlueprintData, CreateBlueprintErrors, CreateBlueprintResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateNeonBranchData, CreateNeonBranchErrors, CreateNeonBranchResponses, CreateNeonDatabaseData, CreateNeonDatabaseErrors, CreateNeonDatabaseResponses, CreateNeonProjectData, CreateNeonProjectErrors, CreateNeonProjectM2mData, CreateNeonProjectM2mErrors, CreateNeonProjectM2mResponses, CreateNeonProjectResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSecretData, CreateSecretErrors, CreateSecretM2mData, CreateSecretM2mErrors, CreateSecretM2mResponses, CreateSecretResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteBlueprintData, DeleteBlueprintErrors, DeleteBlueprintResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseErrors, DeleteNeonDatabaseResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNeonConnectionUriData, FetchNeonConnectionUriErrors, FetchNeonConnectionUriResponses, FetchNeonOrganizationsData, FetchNeonOrganizationsErrors, FetchNeonOrganizationsResponses, FetchNeonRegionsData, FetchNeonRegionsErrors, FetchNeonRegionsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetBlueprintData, GetBlueprintErrors, GetBlueprintM2mData, GetBlueprintM2mErrors, GetBlueprintM2mResponses, GetBlueprintResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesM2mData, GetEnvironmentVariablesM2mErrors, GetEnvironmentVariablesM2mResponses, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetNodeEnvironmentVariablesData, GetNodeEnvironmentVariablesErrors, GetNodeEnvironmentVariablesResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, GetSecretValueData, GetSecretValueErrors, GetSecretValueResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpacePropertiesData, GetSpacePropertiesErrors, GetSpacePropertiesResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, GetVersionData, GetVersionErrors, GetVersionM2mData, GetVersionM2mErrors, GetVersionM2mResponses, GetVersionResponses, ImportBlueprintData, ImportBlueprintErrors, ImportBlueprintResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListNeonBranchesData, ListNeonBranchesErrors, ListNeonBranchesResponses, ListNeonDatabasesData, ListNeonDatabasesErrors, ListNeonDatabasesResponses, ListNeonProjectsData, ListNeonProjectsErrors, ListNeonProjectsResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, PreviewBlueprintData, PreviewBlueprintErrors, PreviewBlueprintResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdErrors, SetEnvironmentGcpProjectIdResponses, SetSpacePropertyData, SetSpacePropertyErrors, SetSpacePropertyResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateBlueprintData, UpdateBlueprintErrors, UpdateBlueprintResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mErrors, UpdateDeploymentStatusM2mResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateNodeM2mData, UpdateNodeM2mErrors, UpdateNodeM2mResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, ViewBlueprintsData, ViewBlueprintsErrors, ViewBlueprintsM2mData, ViewBlueprintsM2mErrors, ViewBlueprintsM2mResponses, ViewBlueprintsResponses } from './types.gen';
|
|
2
|
+
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateBlueprintData, CreateBlueprintErrors, CreateBlueprintResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateNeonBranchData, CreateNeonBranchErrors, CreateNeonBranchResponses, CreateNeonDatabaseData, CreateNeonDatabaseErrors, CreateNeonDatabaseResponses, CreateNeonProjectData, CreateNeonProjectErrors, CreateNeonProjectM2mData, CreateNeonProjectM2mErrors, CreateNeonProjectM2mResponses, CreateNeonProjectResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSecretData, CreateSecretErrors, CreateSecretM2mData, CreateSecretM2mErrors, CreateSecretM2mResponses, CreateSecretResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteBlueprintData, DeleteBlueprintErrors, DeleteBlueprintResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseErrors, DeleteNeonDatabaseResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchMongoOrganizationsData, FetchMongoOrganizationsErrors, FetchMongoOrganizationsResponses, FetchMongoRegionsData, FetchMongoRegionsErrors, FetchMongoRegionsResponses, FetchNeonConnectionUriData, FetchNeonConnectionUriErrors, FetchNeonConnectionUriResponses, FetchNeonOrganizationsData, FetchNeonOrganizationsErrors, FetchNeonOrganizationsResponses, FetchNeonRegionsData, FetchNeonRegionsErrors, FetchNeonRegionsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetBlueprintData, GetBlueprintErrors, GetBlueprintM2mData, GetBlueprintM2mErrors, GetBlueprintM2mResponses, GetBlueprintResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesM2mData, GetEnvironmentVariablesM2mErrors, GetEnvironmentVariablesM2mResponses, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetNodeEnvironmentVariablesData, GetNodeEnvironmentVariablesErrors, GetNodeEnvironmentVariablesResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, GetSecretValueData, GetSecretValueErrors, GetSecretValueResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpacePropertiesData, GetSpacePropertiesErrors, GetSpacePropertiesResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, GetVersionData, GetVersionErrors, GetVersionM2mData, GetVersionM2mErrors, GetVersionM2mResponses, GetVersionResponses, ImportBlueprintData, ImportBlueprintErrors, ImportBlueprintResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListNeonBranchesData, ListNeonBranchesErrors, ListNeonBranchesResponses, ListNeonDatabasesData, ListNeonDatabasesErrors, ListNeonDatabasesResponses, ListNeonProjectsData, ListNeonProjectsErrors, ListNeonProjectsResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, PreviewBlueprintData, PreviewBlueprintErrors, PreviewBlueprintResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdErrors, SetEnvironmentGcpProjectIdResponses, SetSpacePropertyData, SetSpacePropertyErrors, SetSpacePropertyResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateBlueprintData, UpdateBlueprintErrors, UpdateBlueprintResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mErrors, UpdateDeploymentStatusM2mResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateNodeM2mData, UpdateNodeM2mErrors, UpdateNodeM2mResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, ViewBlueprintsData, ViewBlueprintsErrors, ViewBlueprintsM2mData, ViewBlueprintsM2mErrors, ViewBlueprintsM2mResponses, ViewBlueprintsResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -109,6 +109,14 @@ export declare const fetchNeonOrganizations: <ThrowOnError extends boolean = fal
|
|
|
109
109
|
* List supported Neon regions.
|
|
110
110
|
*/
|
|
111
111
|
export declare const fetchNeonRegions: <ThrowOnError extends boolean = false>(options: Options<FetchNeonRegionsData, ThrowOnError>) => import("./client").RequestResult<FetchNeonRegionsResponses, FetchNeonRegionsErrors, ThrowOnError, "fields">;
|
|
112
|
+
/**
|
|
113
|
+
* List MongoDB Atlas organizations for the authenticated service account.
|
|
114
|
+
*/
|
|
115
|
+
export declare const fetchMongoOrganizations: <ThrowOnError extends boolean = false>(options: Options<FetchMongoOrganizationsData, ThrowOnError>) => import("./client").RequestResult<FetchMongoOrganizationsResponses, FetchMongoOrganizationsErrors, ThrowOnError, "fields">;
|
|
116
|
+
/**
|
|
117
|
+
* List supported MongoDB Atlas regions for a cloud provider.
|
|
118
|
+
*/
|
|
119
|
+
export declare const fetchMongoRegions: <ThrowOnError extends boolean = false>(options: Options<FetchMongoRegionsData, ThrowOnError>) => import("./client").RequestResult<FetchMongoRegionsResponses, FetchMongoRegionsErrors, ThrowOnError, "fields">;
|
|
112
120
|
/**
|
|
113
121
|
* Retrieve a Neon database connection URI.
|
|
114
122
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -429,6 +429,36 @@ export const fetchNeonRegions = (options) => {
|
|
|
429
429
|
...options
|
|
430
430
|
});
|
|
431
431
|
};
|
|
432
|
+
/**
|
|
433
|
+
* List MongoDB Atlas organizations for the authenticated service account.
|
|
434
|
+
*/
|
|
435
|
+
export const fetchMongoOrganizations = (options) => {
|
|
436
|
+
return (options.client ?? client).get({
|
|
437
|
+
security: [
|
|
438
|
+
{
|
|
439
|
+
scheme: 'bearer',
|
|
440
|
+
type: 'http'
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
url: '/auth/mongo/organizations',
|
|
444
|
+
...options
|
|
445
|
+
});
|
|
446
|
+
};
|
|
447
|
+
/**
|
|
448
|
+
* List supported MongoDB Atlas regions for a cloud provider.
|
|
449
|
+
*/
|
|
450
|
+
export const fetchMongoRegions = (options) => {
|
|
451
|
+
return (options.client ?? client).get({
|
|
452
|
+
security: [
|
|
453
|
+
{
|
|
454
|
+
scheme: 'bearer',
|
|
455
|
+
type: 'http'
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
url: '/auth/mongo/regions',
|
|
459
|
+
...options
|
|
460
|
+
});
|
|
461
|
+
};
|
|
432
462
|
/**
|
|
433
463
|
* Retrieve a Neon database connection URI.
|
|
434
464
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -89,6 +89,14 @@ export type NeonRegion = {
|
|
|
89
89
|
geo_lat: string;
|
|
90
90
|
geo_long: string;
|
|
91
91
|
};
|
|
92
|
+
export type MongoOrganization = {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
};
|
|
96
|
+
export type MongoRegion = {
|
|
97
|
+
name: string;
|
|
98
|
+
default: boolean;
|
|
99
|
+
};
|
|
92
100
|
export type NeonConnectionUri = {
|
|
93
101
|
uri: string;
|
|
94
102
|
};
|
|
@@ -883,6 +891,22 @@ export type NeonEndpointId = string;
|
|
|
883
891
|
* Whether to use a pooled connection.
|
|
884
892
|
*/
|
|
885
893
|
export type NeonPooled = boolean;
|
|
894
|
+
/**
|
|
895
|
+
* The MongoDB Atlas service account client ID.
|
|
896
|
+
*/
|
|
897
|
+
export type MongoClientId = string;
|
|
898
|
+
/**
|
|
899
|
+
* The MongoDB Atlas service account client secret.
|
|
900
|
+
*/
|
|
901
|
+
export type MongoClientSecret = string;
|
|
902
|
+
/**
|
|
903
|
+
* The MongoDB Atlas project (group) ID.
|
|
904
|
+
*/
|
|
905
|
+
export type MongoProjectId = string;
|
|
906
|
+
/**
|
|
907
|
+
* The cloud provider to list regions for.
|
|
908
|
+
*/
|
|
909
|
+
export type MongoCloudProvider = string;
|
|
886
910
|
/**
|
|
887
911
|
* Optional version UUID to exclude from the environment versions response.
|
|
888
912
|
*/
|
|
@@ -1986,6 +2010,95 @@ export type FetchNeonRegionsResponses = {
|
|
|
1986
2010
|
200: Array<NeonRegion>;
|
|
1987
2011
|
};
|
|
1988
2012
|
export type FetchNeonRegionsResponse = FetchNeonRegionsResponses[keyof FetchNeonRegionsResponses];
|
|
2013
|
+
export type FetchMongoOrganizationsData = {
|
|
2014
|
+
body?: never;
|
|
2015
|
+
headers: {
|
|
2016
|
+
/**
|
|
2017
|
+
* The MongoDB Atlas service account client ID.
|
|
2018
|
+
*/
|
|
2019
|
+
'x-mongo-client-id': string;
|
|
2020
|
+
/**
|
|
2021
|
+
* The MongoDB Atlas service account client secret.
|
|
2022
|
+
*/
|
|
2023
|
+
'x-mongo-client-secret': string;
|
|
2024
|
+
};
|
|
2025
|
+
path?: never;
|
|
2026
|
+
query?: never;
|
|
2027
|
+
url: '/auth/mongo/organizations';
|
|
2028
|
+
};
|
|
2029
|
+
export type FetchMongoOrganizationsErrors = {
|
|
2030
|
+
/**
|
|
2031
|
+
* Unauthorised user.
|
|
2032
|
+
*/
|
|
2033
|
+
401: ErrorResponse;
|
|
2034
|
+
/**
|
|
2035
|
+
* Invalid credentials or missing MongoDB Atlas credentials.
|
|
2036
|
+
*/
|
|
2037
|
+
403: ErrorResponse;
|
|
2038
|
+
/**
|
|
2039
|
+
* Unexpected error.
|
|
2040
|
+
*/
|
|
2041
|
+
500: ErrorResponse;
|
|
2042
|
+
};
|
|
2043
|
+
export type FetchMongoOrganizationsError = FetchMongoOrganizationsErrors[keyof FetchMongoOrganizationsErrors];
|
|
2044
|
+
export type FetchMongoOrganizationsResponses = {
|
|
2045
|
+
/**
|
|
2046
|
+
* Organizations listed successfully.
|
|
2047
|
+
*/
|
|
2048
|
+
200: Array<MongoOrganization>;
|
|
2049
|
+
};
|
|
2050
|
+
export type FetchMongoOrganizationsResponse = FetchMongoOrganizationsResponses[keyof FetchMongoOrganizationsResponses];
|
|
2051
|
+
export type FetchMongoRegionsData = {
|
|
2052
|
+
body?: never;
|
|
2053
|
+
headers: {
|
|
2054
|
+
/**
|
|
2055
|
+
* The MongoDB Atlas service account client ID.
|
|
2056
|
+
*/
|
|
2057
|
+
'x-mongo-client-id': string;
|
|
2058
|
+
/**
|
|
2059
|
+
* The MongoDB Atlas service account client secret.
|
|
2060
|
+
*/
|
|
2061
|
+
'x-mongo-client-secret': string;
|
|
2062
|
+
};
|
|
2063
|
+
path?: never;
|
|
2064
|
+
query: {
|
|
2065
|
+
/**
|
|
2066
|
+
* The MongoDB Atlas project (group) ID.
|
|
2067
|
+
*/
|
|
2068
|
+
projectId: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* The cloud provider to list regions for.
|
|
2071
|
+
*/
|
|
2072
|
+
cloudProvider: string;
|
|
2073
|
+
};
|
|
2074
|
+
url: '/auth/mongo/regions';
|
|
2075
|
+
};
|
|
2076
|
+
export type FetchMongoRegionsErrors = {
|
|
2077
|
+
/**
|
|
2078
|
+
* Invalid query parameters.
|
|
2079
|
+
*/
|
|
2080
|
+
400: ErrorResponse;
|
|
2081
|
+
/**
|
|
2082
|
+
* Unauthorised user.
|
|
2083
|
+
*/
|
|
2084
|
+
401: ErrorResponse;
|
|
2085
|
+
/**
|
|
2086
|
+
* Invalid credentials or missing MongoDB Atlas credentials.
|
|
2087
|
+
*/
|
|
2088
|
+
403: ErrorResponse;
|
|
2089
|
+
/**
|
|
2090
|
+
* Unexpected error.
|
|
2091
|
+
*/
|
|
2092
|
+
500: ErrorResponse;
|
|
2093
|
+
};
|
|
2094
|
+
export type FetchMongoRegionsError = FetchMongoRegionsErrors[keyof FetchMongoRegionsErrors];
|
|
2095
|
+
export type FetchMongoRegionsResponses = {
|
|
2096
|
+
/**
|
|
2097
|
+
* Regions listed successfully.
|
|
2098
|
+
*/
|
|
2099
|
+
200: Array<MongoRegion>;
|
|
2100
|
+
};
|
|
2101
|
+
export type FetchMongoRegionsResponse = FetchMongoRegionsResponses[keyof FetchMongoRegionsResponses];
|
|
1989
2102
|
export type FetchNeonConnectionUriData = {
|
|
1990
2103
|
body?: never;
|
|
1991
2104
|
headers: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -120,6 +120,14 @@ export declare const zNeonRegion: z.ZodObject<{
|
|
|
120
120
|
geo_lat: z.ZodString;
|
|
121
121
|
geo_long: z.ZodString;
|
|
122
122
|
}, z.core.$strip>;
|
|
123
|
+
export declare const zMongoOrganization: z.ZodObject<{
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
export declare const zMongoRegion: z.ZodObject<{
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
default: z.ZodBoolean;
|
|
130
|
+
}, z.core.$strip>;
|
|
123
131
|
export declare const zNeonConnectionUri: z.ZodObject<{
|
|
124
132
|
uri: z.ZodString;
|
|
125
133
|
}, z.core.$strip>;
|
|
@@ -1886,6 +1894,22 @@ export declare const zNeonEndpointId: z.ZodString;
|
|
|
1886
1894
|
* Whether to use a pooled connection.
|
|
1887
1895
|
*/
|
|
1888
1896
|
export declare const zNeonPooled: z.ZodBoolean;
|
|
1897
|
+
/**
|
|
1898
|
+
* The MongoDB Atlas service account client ID.
|
|
1899
|
+
*/
|
|
1900
|
+
export declare const zMongoClientId: z.ZodString;
|
|
1901
|
+
/**
|
|
1902
|
+
* The MongoDB Atlas service account client secret.
|
|
1903
|
+
*/
|
|
1904
|
+
export declare const zMongoClientSecret: z.ZodString;
|
|
1905
|
+
/**
|
|
1906
|
+
* The MongoDB Atlas project (group) ID.
|
|
1907
|
+
*/
|
|
1908
|
+
export declare const zMongoProjectId: z.ZodString;
|
|
1909
|
+
/**
|
|
1910
|
+
* The cloud provider to list regions for.
|
|
1911
|
+
*/
|
|
1912
|
+
export declare const zMongoCloudProvider: z.ZodString;
|
|
1889
1913
|
/**
|
|
1890
1914
|
* Optional version UUID to exclude from the environment versions response.
|
|
1891
1915
|
*/
|
|
@@ -3419,6 +3443,41 @@ export declare const zFetchNeonRegionsResponse: z.ZodArray<z.ZodObject<{
|
|
|
3419
3443
|
geo_lat: z.ZodString;
|
|
3420
3444
|
geo_long: z.ZodString;
|
|
3421
3445
|
}, z.core.$strip>>;
|
|
3446
|
+
export declare const zFetchMongoOrganizationsData: z.ZodObject<{
|
|
3447
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
3448
|
+
path: z.ZodOptional<z.ZodNever>;
|
|
3449
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
3450
|
+
headers: z.ZodObject<{
|
|
3451
|
+
'x-mongo-client-id': z.ZodString;
|
|
3452
|
+
'x-mongo-client-secret': z.ZodString;
|
|
3453
|
+
}, z.core.$strip>;
|
|
3454
|
+
}, z.core.$strip>;
|
|
3455
|
+
/**
|
|
3456
|
+
* Organizations listed successfully.
|
|
3457
|
+
*/
|
|
3458
|
+
export declare const zFetchMongoOrganizationsResponse: z.ZodArray<z.ZodObject<{
|
|
3459
|
+
id: z.ZodString;
|
|
3460
|
+
name: z.ZodString;
|
|
3461
|
+
}, z.core.$strip>>;
|
|
3462
|
+
export declare const zFetchMongoRegionsData: z.ZodObject<{
|
|
3463
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
3464
|
+
path: z.ZodOptional<z.ZodNever>;
|
|
3465
|
+
query: z.ZodObject<{
|
|
3466
|
+
projectId: z.ZodString;
|
|
3467
|
+
cloudProvider: z.ZodString;
|
|
3468
|
+
}, z.core.$strip>;
|
|
3469
|
+
headers: z.ZodObject<{
|
|
3470
|
+
'x-mongo-client-id': z.ZodString;
|
|
3471
|
+
'x-mongo-client-secret': z.ZodString;
|
|
3472
|
+
}, z.core.$strip>;
|
|
3473
|
+
}, z.core.$strip>;
|
|
3474
|
+
/**
|
|
3475
|
+
* Regions listed successfully.
|
|
3476
|
+
*/
|
|
3477
|
+
export declare const zFetchMongoRegionsResponse: z.ZodArray<z.ZodObject<{
|
|
3478
|
+
name: z.ZodString;
|
|
3479
|
+
default: z.ZodBoolean;
|
|
3480
|
+
}, z.core.$strip>>;
|
|
3422
3481
|
export declare const zFetchNeonConnectionUriData: z.ZodObject<{
|
|
3423
3482
|
body: z.ZodOptional<z.ZodNever>;
|
|
3424
3483
|
path: z.ZodObject<{
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -100,6 +100,14 @@ export const zNeonRegion = z.object({
|
|
|
100
100
|
geo_lat: z.string(),
|
|
101
101
|
geo_long: z.string()
|
|
102
102
|
});
|
|
103
|
+
export const zMongoOrganization = z.object({
|
|
104
|
+
id: z.string(),
|
|
105
|
+
name: z.string()
|
|
106
|
+
});
|
|
107
|
+
export const zMongoRegion = z.object({
|
|
108
|
+
name: z.string(),
|
|
109
|
+
default: z.boolean()
|
|
110
|
+
});
|
|
103
111
|
export const zNeonConnectionUri = z.object({
|
|
104
112
|
uri: z.string()
|
|
105
113
|
});
|
|
@@ -837,6 +845,22 @@ export const zNeonEndpointId = z.string();
|
|
|
837
845
|
* Whether to use a pooled connection.
|
|
838
846
|
*/
|
|
839
847
|
export const zNeonPooled = z.boolean();
|
|
848
|
+
/**
|
|
849
|
+
* The MongoDB Atlas service account client ID.
|
|
850
|
+
*/
|
|
851
|
+
export const zMongoClientId = z.string();
|
|
852
|
+
/**
|
|
853
|
+
* The MongoDB Atlas service account client secret.
|
|
854
|
+
*/
|
|
855
|
+
export const zMongoClientSecret = z.string();
|
|
856
|
+
/**
|
|
857
|
+
* The MongoDB Atlas project (group) ID.
|
|
858
|
+
*/
|
|
859
|
+
export const zMongoProjectId = z.string();
|
|
860
|
+
/**
|
|
861
|
+
* The cloud provider to list regions for.
|
|
862
|
+
*/
|
|
863
|
+
export const zMongoCloudProvider = z.string();
|
|
840
864
|
/**
|
|
841
865
|
* Optional version UUID to exclude from the environment versions response.
|
|
842
866
|
*/
|
|
@@ -1227,6 +1251,35 @@ export const zFetchNeonRegionsData = z.object({
|
|
|
1227
1251
|
* Regions listed successfully.
|
|
1228
1252
|
*/
|
|
1229
1253
|
export const zFetchNeonRegionsResponse = z.array(zNeonRegion);
|
|
1254
|
+
export const zFetchMongoOrganizationsData = z.object({
|
|
1255
|
+
body: z.optional(z.never()),
|
|
1256
|
+
path: z.optional(z.never()),
|
|
1257
|
+
query: z.optional(z.never()),
|
|
1258
|
+
headers: z.object({
|
|
1259
|
+
'x-mongo-client-id': z.string(),
|
|
1260
|
+
'x-mongo-client-secret': z.string()
|
|
1261
|
+
})
|
|
1262
|
+
});
|
|
1263
|
+
/**
|
|
1264
|
+
* Organizations listed successfully.
|
|
1265
|
+
*/
|
|
1266
|
+
export const zFetchMongoOrganizationsResponse = z.array(zMongoOrganization);
|
|
1267
|
+
export const zFetchMongoRegionsData = z.object({
|
|
1268
|
+
body: z.optional(z.never()),
|
|
1269
|
+
path: z.optional(z.never()),
|
|
1270
|
+
query: z.object({
|
|
1271
|
+
projectId: z.string(),
|
|
1272
|
+
cloudProvider: z.string()
|
|
1273
|
+
}),
|
|
1274
|
+
headers: z.object({
|
|
1275
|
+
'x-mongo-client-id': z.string(),
|
|
1276
|
+
'x-mongo-client-secret': z.string()
|
|
1277
|
+
})
|
|
1278
|
+
});
|
|
1279
|
+
/**
|
|
1280
|
+
* Regions listed successfully.
|
|
1281
|
+
*/
|
|
1282
|
+
export const zFetchMongoRegionsResponse = z.array(zMongoRegion);
|
|
1230
1283
|
export const zFetchNeonConnectionUriData = z.object({
|
|
1231
1284
|
body: z.optional(z.never()),
|
|
1232
1285
|
path: z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, ViewBlueprintsM2mData, CreateSecretM2mData, CreateSecretM2mResponses, GetBlueprintM2mData, CreateNeonProjectM2mData, CreateNeonProjectM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNeonConnectionUriData, ListNeonProjectsData, CreateNeonProjectData, CreateNeonProjectResponses, ListNeonBranchesData, CreateNeonBranchData, CreateNeonBranchResponses, ListNeonDatabasesData, CreateNeonDatabaseData, CreateNeonDatabaseResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseResponses, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, PreviewBlueprintData, ViewBlueprintsData, GetBlueprintData, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, CreateSecretData, CreateSecretResponses, GetSecretValueData, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, GetNodeEnvironmentVariablesData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData, GetSpacePropertiesData, SetSpacePropertyData, SetSpacePropertyResponses } from "../../sdk/types.gen";
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, ViewBlueprintsM2mData, CreateSecretM2mData, CreateSecretM2mResponses, GetBlueprintM2mData, CreateNeonProjectM2mData, CreateNeonProjectM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchMongoOrganizationsData, FetchMongoRegionsData, FetchNeonConnectionUriData, ListNeonProjectsData, CreateNeonProjectData, CreateNeonProjectResponses, ListNeonBranchesData, CreateNeonBranchData, CreateNeonBranchResponses, ListNeonDatabasesData, CreateNeonDatabaseData, CreateNeonDatabaseResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseResponses, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, PreviewBlueprintData, ViewBlueprintsData, GetBlueprintData, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, CreateSecretData, CreateSecretResponses, GetSecretValueData, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, GetNodeEnvironmentVariablesData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData, GetSpacePropertiesData, SetSpacePropertyData, SetSpacePropertyResponses } from "../../sdk/types.gen";
|
|
4
4
|
export declare const useGetServiceHealth: (options?: Omit<GetServiceHealthData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").HealthResponse | undefined, Error>;
|
|
@@ -120,6 +120,12 @@ export declare const useFetchNeonOrganizations: (options: Omit<FetchNeonOrganiza
|
|
|
120
120
|
export declare const useFetchNeonRegions: (options: Omit<FetchNeonRegionsData, "url"> & {
|
|
121
121
|
enabled?: boolean;
|
|
122
122
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").NeonRegion[] | undefined, Error>;
|
|
123
|
+
export declare const useFetchMongoOrganizations: (options: Omit<FetchMongoOrganizationsData, "url"> & {
|
|
124
|
+
enabled?: boolean;
|
|
125
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").MongoOrganization[] | undefined, Error>;
|
|
126
|
+
export declare const useFetchMongoRegions: (options: Omit<FetchMongoRegionsData, "url"> & {
|
|
127
|
+
enabled?: boolean;
|
|
128
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").MongoRegion[] | undefined, Error>;
|
|
123
129
|
export declare const useFetchNeonConnectionUri: (options: Omit<FetchNeonConnectionUriData, "url"> & {
|
|
124
130
|
enabled?: boolean;
|
|
125
131
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").NeonConnectionUri | undefined, Error>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, viewBlueprintsM2M, createSecretM2M, getBlueprintM2M, createNeonProjectM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, fetchNeonOrganizations, fetchNeonRegions, fetchNeonConnectionUri, listNeonProjects, createNeonProject, listNeonBranches, createNeonBranch, listNeonDatabases, createNeonDatabase, deleteNeonDatabase, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, previewBlueprint, viewBlueprints, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, createSecret, getSecretValue, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, getNodeEnvironmentVariables, requestSignedUploadUrl, checkSubdomainUniqueness, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices, getSpaceProperties, setSpaceProperty } from "../../sdk/sdk.gen";
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, viewBlueprintsM2M, createSecretM2M, getBlueprintM2M, createNeonProjectM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, fetchNeonOrganizations, fetchNeonRegions, fetchMongoOrganizations, fetchMongoRegions, fetchNeonConnectionUri, listNeonProjects, createNeonProject, listNeonBranches, createNeonBranch, listNeonDatabases, createNeonDatabase, deleteNeonDatabase, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, previewBlueprint, viewBlueprints, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, createSecret, getSecretValue, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, getNodeEnvironmentVariables, requestSignedUploadUrl, checkSubdomainUniqueness, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices, getSpaceProperties, setSpaceProperty } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -466,6 +466,48 @@ export const useFetchNeonRegions = (options) => {
|
|
|
466
466
|
staleTime: 600000
|
|
467
467
|
});
|
|
468
468
|
};
|
|
469
|
+
export const useFetchMongoOrganizations = (options) => {
|
|
470
|
+
const token = useToken();
|
|
471
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
472
|
+
const opts = { throwOnError: true, url: "/auth/mongo/organizations" };
|
|
473
|
+
const funcer = async () => {
|
|
474
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
475
|
+
if (isPromise(token) && !token)
|
|
476
|
+
return;
|
|
477
|
+
const res = await fetchMongoOrganizations({ ...opts, ...rest, auth });
|
|
478
|
+
return res.data;
|
|
479
|
+
};
|
|
480
|
+
if (!token)
|
|
481
|
+
enabled = false;
|
|
482
|
+
return useQuery({
|
|
483
|
+
queryKey: ["mongo", "organizations", options.query ?? {}],
|
|
484
|
+
queryFn: funcer,
|
|
485
|
+
enabled,
|
|
486
|
+
retry: false,
|
|
487
|
+
staleTime: 600000
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
export const useFetchMongoRegions = (options) => {
|
|
491
|
+
const token = useToken();
|
|
492
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
493
|
+
const opts = { throwOnError: true, url: "/auth/mongo/regions" };
|
|
494
|
+
const funcer = async () => {
|
|
495
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
496
|
+
if (isPromise(token) && !token)
|
|
497
|
+
return;
|
|
498
|
+
const res = await fetchMongoRegions({ ...opts, ...rest, auth });
|
|
499
|
+
return res.data;
|
|
500
|
+
};
|
|
501
|
+
if (!token)
|
|
502
|
+
enabled = false;
|
|
503
|
+
return useQuery({
|
|
504
|
+
queryKey: ["mongo", "regions", options.query ?? {}],
|
|
505
|
+
queryFn: funcer,
|
|
506
|
+
enabled,
|
|
507
|
+
retry: false,
|
|
508
|
+
staleTime: 600000
|
|
509
|
+
});
|
|
510
|
+
};
|
|
469
511
|
export const useFetchNeonConnectionUri = (options) => {
|
|
470
512
|
const token = useToken();
|
|
471
513
|
let { enabled, ...rest } = options || { enabled: true };
|