shoal-web-sdk 1.0.22 → 1.0.23
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 +85 -1
- package/dist/sdk/@tanstack/react-query.gen.js +55 -1
- package/dist/sdk/sdk.gen.d.ts +13 -1
- package/dist/sdk/sdk.gen.js +45 -0
- package/dist/sdk/types.gen.d.ts +176 -0
- package/dist/sdk/zod.gen.d.ts +101 -0
- package/dist/sdk/zod.gen.js +88 -0
- package/dist/tanstack-codegen/generated/generated.d.ts +10 -1
- package/dist/tanstack-codegen/generated/generated.js +64 -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, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteBlueprintData, DeleteBlueprintError, DeleteBlueprintResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetPublicInviteData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, 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, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateBlueprintData, UpdateBlueprintError, UpdateBlueprintResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewBlueprintsData } from '../types.gen';
|
|
3
|
+
import type { CheckSubdomainUniquenessData, CreateBlueprintData, CreateBlueprintError, CreateBlueprintResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteBlueprintData, DeleteBlueprintError, DeleteBlueprintResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetPublicInviteData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, 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, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateBlueprintData, UpdateBlueprintError, UpdateBlueprintResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewBlueprintsData } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -415,6 +415,90 @@ export declare const listUserInstallationsInfiniteOptions: (options?: Options<Li
|
|
|
415
415
|
[dataTagErrorSymbol]: import("../types.gen").ErrorResponse;
|
|
416
416
|
};
|
|
417
417
|
};
|
|
418
|
+
export declare const fetchNeonOrganizationsQueryKey: (options: Options<FetchNeonOrganizationsData>) => [Pick<Options<FetchNeonOrganizationsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
419
|
+
_id: string;
|
|
420
|
+
_infinite?: boolean;
|
|
421
|
+
tags?: ReadonlyArray<string>;
|
|
422
|
+
}];
|
|
423
|
+
/**
|
|
424
|
+
* List Neon organizations for the authenticated user.
|
|
425
|
+
*/
|
|
426
|
+
export declare const fetchNeonOrganizationsOptions: (options: Options<FetchNeonOrganizationsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").NeonOrganization[], Error, import("../types.gen").NeonOrganization[], [Pick<Options<FetchNeonOrganizationsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
427
|
+
_id: string;
|
|
428
|
+
_infinite?: boolean;
|
|
429
|
+
tags?: ReadonlyArray<string>;
|
|
430
|
+
}]>, "queryFn"> & {
|
|
431
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").NeonOrganization[], [Pick<Options<FetchNeonOrganizationsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
432
|
+
_id: string;
|
|
433
|
+
_infinite?: boolean;
|
|
434
|
+
tags?: ReadonlyArray<string>;
|
|
435
|
+
}], never> | undefined;
|
|
436
|
+
} & {
|
|
437
|
+
queryKey: [Pick<Options<FetchNeonOrganizationsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
438
|
+
_id: string;
|
|
439
|
+
_infinite?: boolean;
|
|
440
|
+
tags?: ReadonlyArray<string>;
|
|
441
|
+
}] & {
|
|
442
|
+
[dataTagSymbol]: import("../types.gen").NeonOrganization[];
|
|
443
|
+
[dataTagErrorSymbol]: Error;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
export declare const fetchNeonRegionsQueryKey: (options: Options<FetchNeonRegionsData>) => [Pick<Options<FetchNeonRegionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
447
|
+
_id: string;
|
|
448
|
+
_infinite?: boolean;
|
|
449
|
+
tags?: ReadonlyArray<string>;
|
|
450
|
+
}];
|
|
451
|
+
/**
|
|
452
|
+
* List supported Neon regions.
|
|
453
|
+
*/
|
|
454
|
+
export declare const fetchNeonRegionsOptions: (options: Options<FetchNeonRegionsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").NeonRegion[], Error, import("../types.gen").NeonRegion[], [Pick<Options<FetchNeonRegionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
455
|
+
_id: string;
|
|
456
|
+
_infinite?: boolean;
|
|
457
|
+
tags?: ReadonlyArray<string>;
|
|
458
|
+
}]>, "queryFn"> & {
|
|
459
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").NeonRegion[], [Pick<Options<FetchNeonRegionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
460
|
+
_id: string;
|
|
461
|
+
_infinite?: boolean;
|
|
462
|
+
tags?: ReadonlyArray<string>;
|
|
463
|
+
}], never> | undefined;
|
|
464
|
+
} & {
|
|
465
|
+
queryKey: [Pick<Options<FetchNeonRegionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
466
|
+
_id: string;
|
|
467
|
+
_infinite?: boolean;
|
|
468
|
+
tags?: ReadonlyArray<string>;
|
|
469
|
+
}] & {
|
|
470
|
+
[dataTagSymbol]: import("../types.gen").NeonRegion[];
|
|
471
|
+
[dataTagErrorSymbol]: Error;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
export declare const fetchNeonConnectionUriQueryKey: (options: Options<FetchNeonConnectionUriData>) => [Pick<Options<FetchNeonConnectionUriData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
475
|
+
_id: string;
|
|
476
|
+
_infinite?: boolean;
|
|
477
|
+
tags?: ReadonlyArray<string>;
|
|
478
|
+
}];
|
|
479
|
+
/**
|
|
480
|
+
* Retrieve a Neon database connection URI.
|
|
481
|
+
*/
|
|
482
|
+
export declare const fetchNeonConnectionUriOptions: (options: Options<FetchNeonConnectionUriData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").NeonConnectionUri, Error, import("../types.gen").NeonConnectionUri, [Pick<Options<FetchNeonConnectionUriData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
483
|
+
_id: string;
|
|
484
|
+
_infinite?: boolean;
|
|
485
|
+
tags?: ReadonlyArray<string>;
|
|
486
|
+
}]>, "queryFn"> & {
|
|
487
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").NeonConnectionUri, [Pick<Options<FetchNeonConnectionUriData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
488
|
+
_id: string;
|
|
489
|
+
_infinite?: boolean;
|
|
490
|
+
tags?: ReadonlyArray<string>;
|
|
491
|
+
}], never> | undefined;
|
|
492
|
+
} & {
|
|
493
|
+
queryKey: [Pick<Options<FetchNeonConnectionUriData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
494
|
+
_id: string;
|
|
495
|
+
_infinite?: boolean;
|
|
496
|
+
tags?: ReadonlyArray<string>;
|
|
497
|
+
}] & {
|
|
498
|
+
[dataTagSymbol]: import("../types.gen").NeonConnectionUri;
|
|
499
|
+
[dataTagErrorSymbol]: Error;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
418
502
|
export declare const listUserSpacesQueryKey: (options?: Options<ListUserSpacesData>) => [Pick<Options<ListUserSpacesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
419
503
|
_id: string;
|
|
420
504
|
_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, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironmentVariable, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getBlueprint, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getGraphOverview, getProjectOverview, getPublicInvite, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints } from '../sdk.gen';
|
|
4
|
+
import { checkSubdomainUniqueness, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironmentVariable, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getBillingPlan, getBillingUsage, getBlueprint, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getGraphOverview, getProjectOverview, getPublicInvite, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints } 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) {
|
|
@@ -470,6 +470,60 @@ export const listUserInstallationsInfiniteOptions = (options) => {
|
|
|
470
470
|
queryKey: listUserInstallationsInfiniteQueryKey(options)
|
|
471
471
|
});
|
|
472
472
|
};
|
|
473
|
+
export const fetchNeonOrganizationsQueryKey = (options) => createQueryKey('fetchNeonOrganizations', options);
|
|
474
|
+
/**
|
|
475
|
+
* List Neon organizations for the authenticated user.
|
|
476
|
+
*/
|
|
477
|
+
export const fetchNeonOrganizationsOptions = (options) => {
|
|
478
|
+
return queryOptions({
|
|
479
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
480
|
+
const { data } = await fetchNeonOrganizations({
|
|
481
|
+
...options,
|
|
482
|
+
...queryKey[0],
|
|
483
|
+
signal,
|
|
484
|
+
throwOnError: true
|
|
485
|
+
});
|
|
486
|
+
return data;
|
|
487
|
+
},
|
|
488
|
+
queryKey: fetchNeonOrganizationsQueryKey(options)
|
|
489
|
+
});
|
|
490
|
+
};
|
|
491
|
+
export const fetchNeonRegionsQueryKey = (options) => createQueryKey('fetchNeonRegions', options);
|
|
492
|
+
/**
|
|
493
|
+
* List supported Neon regions.
|
|
494
|
+
*/
|
|
495
|
+
export const fetchNeonRegionsOptions = (options) => {
|
|
496
|
+
return queryOptions({
|
|
497
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
498
|
+
const { data } = await fetchNeonRegions({
|
|
499
|
+
...options,
|
|
500
|
+
...queryKey[0],
|
|
501
|
+
signal,
|
|
502
|
+
throwOnError: true
|
|
503
|
+
});
|
|
504
|
+
return data;
|
|
505
|
+
},
|
|
506
|
+
queryKey: fetchNeonRegionsQueryKey(options)
|
|
507
|
+
});
|
|
508
|
+
};
|
|
509
|
+
export const fetchNeonConnectionUriQueryKey = (options) => createQueryKey('fetchNeonConnectionUri', options);
|
|
510
|
+
/**
|
|
511
|
+
* Retrieve a Neon database connection URI.
|
|
512
|
+
*/
|
|
513
|
+
export const fetchNeonConnectionUriOptions = (options) => {
|
|
514
|
+
return queryOptions({
|
|
515
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
516
|
+
const { data } = await fetchNeonConnectionUri({
|
|
517
|
+
...options,
|
|
518
|
+
...queryKey[0],
|
|
519
|
+
signal,
|
|
520
|
+
throwOnError: true
|
|
521
|
+
});
|
|
522
|
+
return data;
|
|
523
|
+
},
|
|
524
|
+
queryKey: fetchNeonConnectionUriQueryKey(options)
|
|
525
|
+
});
|
|
526
|
+
};
|
|
473
527
|
export const listUserSpacesQueryKey = (options) => createQueryKey('listUserSpaces', options);
|
|
474
528
|
/**
|
|
475
529
|
* List spaces for the authenticated user with organization details.
|
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, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteBlueprintData, DeleteBlueprintErrors, DeleteBlueprintResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetBlueprintData, GetBlueprintErrors, GetBlueprintResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesM2mData, GetEnvironmentVariablesM2mErrors, GetEnvironmentVariablesM2mResponses, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, 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, 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, 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, ViewBlueprintsResponses } from './types.gen';
|
|
2
|
+
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateBlueprintData, CreateBlueprintErrors, CreateBlueprintResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteBlueprintData, DeleteBlueprintErrors, DeleteBlueprintResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, 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, GetBlueprintResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesM2mData, GetEnvironmentVariablesM2mErrors, GetEnvironmentVariablesM2mResponses, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, 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, 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, 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, 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
|
|
@@ -84,6 +84,18 @@ export declare const listInstallationBranches: <ThrowOnError extends boolean = f
|
|
|
84
84
|
* List GitHub App installations stored for the authenticated user.
|
|
85
85
|
*/
|
|
86
86
|
export declare const listUserInstallations: <ThrowOnError extends boolean = false>(options?: Options<ListUserInstallationsData, ThrowOnError>) => import("./client").RequestResult<ListUserInstallationsResponses, ListUserInstallationsErrors, ThrowOnError, "fields">;
|
|
87
|
+
/**
|
|
88
|
+
* List Neon organizations for the authenticated user.
|
|
89
|
+
*/
|
|
90
|
+
export declare const fetchNeonOrganizations: <ThrowOnError extends boolean = false>(options: Options<FetchNeonOrganizationsData, ThrowOnError>) => import("./client").RequestResult<FetchNeonOrganizationsResponses, FetchNeonOrganizationsErrors, ThrowOnError, "fields">;
|
|
91
|
+
/**
|
|
92
|
+
* List supported Neon regions.
|
|
93
|
+
*/
|
|
94
|
+
export declare const fetchNeonRegions: <ThrowOnError extends boolean = false>(options: Options<FetchNeonRegionsData, ThrowOnError>) => import("./client").RequestResult<FetchNeonRegionsResponses, FetchNeonRegionsErrors, ThrowOnError, "fields">;
|
|
95
|
+
/**
|
|
96
|
+
* Retrieve a Neon database connection URI.
|
|
97
|
+
*/
|
|
98
|
+
export declare const fetchNeonConnectionUri: <ThrowOnError extends boolean = false>(options: Options<FetchNeonConnectionUriData, ThrowOnError>) => import("./client").RequestResult<FetchNeonConnectionUriResponses, FetchNeonConnectionUriErrors, ThrowOnError, "fields">;
|
|
87
99
|
/**
|
|
88
100
|
* List spaces for the authenticated user with organization details.
|
|
89
101
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -315,6 +315,51 @@ export const listUserInstallations = (options) => {
|
|
|
315
315
|
...options
|
|
316
316
|
});
|
|
317
317
|
};
|
|
318
|
+
/**
|
|
319
|
+
* List Neon organizations for the authenticated user.
|
|
320
|
+
*/
|
|
321
|
+
export const fetchNeonOrganizations = (options) => {
|
|
322
|
+
return (options.client ?? client).get({
|
|
323
|
+
security: [
|
|
324
|
+
{
|
|
325
|
+
scheme: 'bearer',
|
|
326
|
+
type: 'http'
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
url: '/auth/neon/organizations',
|
|
330
|
+
...options
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* List supported Neon regions.
|
|
335
|
+
*/
|
|
336
|
+
export const fetchNeonRegions = (options) => {
|
|
337
|
+
return (options.client ?? client).get({
|
|
338
|
+
security: [
|
|
339
|
+
{
|
|
340
|
+
scheme: 'bearer',
|
|
341
|
+
type: 'http'
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
url: '/auth/neon/regions',
|
|
345
|
+
...options
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Retrieve a Neon database connection URI.
|
|
350
|
+
*/
|
|
351
|
+
export const fetchNeonConnectionUri = (options) => {
|
|
352
|
+
return (options.client ?? client).get({
|
|
353
|
+
security: [
|
|
354
|
+
{
|
|
355
|
+
scheme: 'bearer',
|
|
356
|
+
type: 'http'
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
url: '/auth/neon/projects/{projectId}/connection-uri',
|
|
360
|
+
...options
|
|
361
|
+
});
|
|
362
|
+
};
|
|
318
363
|
/**
|
|
319
364
|
* List spaces for the authenticated user with organization details.
|
|
320
365
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -51,6 +51,22 @@ export type ErrorResponse = {
|
|
|
51
51
|
message: string;
|
|
52
52
|
internalCode: ErrorCode;
|
|
53
53
|
};
|
|
54
|
+
export type NeonOrganization = {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
handle: string;
|
|
58
|
+
plan: string;
|
|
59
|
+
};
|
|
60
|
+
export type NeonRegion = {
|
|
61
|
+
region_id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
default: boolean;
|
|
64
|
+
geo_lat: string;
|
|
65
|
+
geo_long: string;
|
|
66
|
+
};
|
|
67
|
+
export type NeonConnectionUri = {
|
|
68
|
+
uri: string;
|
|
69
|
+
};
|
|
54
70
|
export type CreateProject = {
|
|
55
71
|
name: PlainString;
|
|
56
72
|
handle: string;
|
|
@@ -686,6 +702,34 @@ export type UploadedFileNameUuid = string;
|
|
|
686
702
|
* A version UUID.
|
|
687
703
|
*/
|
|
688
704
|
export type VersionUuid = string;
|
|
705
|
+
/**
|
|
706
|
+
* The Neon API key for authenticating with the Neon API.
|
|
707
|
+
*/
|
|
708
|
+
export type NeonApiKey = string;
|
|
709
|
+
/**
|
|
710
|
+
* The Neon project ID.
|
|
711
|
+
*/
|
|
712
|
+
export type NeonProjectId = string;
|
|
713
|
+
/**
|
|
714
|
+
* The name of the database.
|
|
715
|
+
*/
|
|
716
|
+
export type NeonDatabaseName = string;
|
|
717
|
+
/**
|
|
718
|
+
* The role (user) name for the connection.
|
|
719
|
+
*/
|
|
720
|
+
export type NeonRoleName = string;
|
|
721
|
+
/**
|
|
722
|
+
* The branch ID to connect to.
|
|
723
|
+
*/
|
|
724
|
+
export type NeonBranchId = string;
|
|
725
|
+
/**
|
|
726
|
+
* The endpoint ID to connect to.
|
|
727
|
+
*/
|
|
728
|
+
export type NeonEndpointId = string;
|
|
729
|
+
/**
|
|
730
|
+
* Whether to use a pooled connection.
|
|
731
|
+
*/
|
|
732
|
+
export type NeonPooled = boolean;
|
|
689
733
|
/**
|
|
690
734
|
* Optional version UUID to exclude from the environment versions response.
|
|
691
735
|
*/
|
|
@@ -1529,6 +1573,138 @@ export type ListUserInstallationsResponses = {
|
|
|
1529
1573
|
200: UserGithubInstallationsResponse;
|
|
1530
1574
|
};
|
|
1531
1575
|
export type ListUserInstallationsResponse = ListUserInstallationsResponses[keyof ListUserInstallationsResponses];
|
|
1576
|
+
export type FetchNeonOrganizationsData = {
|
|
1577
|
+
body?: never;
|
|
1578
|
+
headers: {
|
|
1579
|
+
/**
|
|
1580
|
+
* The Neon API key for authenticating with the Neon API.
|
|
1581
|
+
*/
|
|
1582
|
+
'x-neon-api-key': string;
|
|
1583
|
+
};
|
|
1584
|
+
path?: never;
|
|
1585
|
+
query?: never;
|
|
1586
|
+
url: '/auth/neon/organizations';
|
|
1587
|
+
};
|
|
1588
|
+
export type FetchNeonOrganizationsErrors = {
|
|
1589
|
+
/**
|
|
1590
|
+
* Unauthorised user.
|
|
1591
|
+
*/
|
|
1592
|
+
401: ErrorResponse;
|
|
1593
|
+
/**
|
|
1594
|
+
* Invalid credentials or missing Neon API key.
|
|
1595
|
+
*/
|
|
1596
|
+
403: ErrorResponse;
|
|
1597
|
+
/**
|
|
1598
|
+
* Unexpected error.
|
|
1599
|
+
*/
|
|
1600
|
+
500: ErrorResponse;
|
|
1601
|
+
};
|
|
1602
|
+
export type FetchNeonOrganizationsError = FetchNeonOrganizationsErrors[keyof FetchNeonOrganizationsErrors];
|
|
1603
|
+
export type FetchNeonOrganizationsResponses = {
|
|
1604
|
+
/**
|
|
1605
|
+
* Organizations listed successfully.
|
|
1606
|
+
*/
|
|
1607
|
+
200: Array<NeonOrganization>;
|
|
1608
|
+
};
|
|
1609
|
+
export type FetchNeonOrganizationsResponse = FetchNeonOrganizationsResponses[keyof FetchNeonOrganizationsResponses];
|
|
1610
|
+
export type FetchNeonRegionsData = {
|
|
1611
|
+
body?: never;
|
|
1612
|
+
headers: {
|
|
1613
|
+
/**
|
|
1614
|
+
* The Neon API key for authenticating with the Neon API.
|
|
1615
|
+
*/
|
|
1616
|
+
'x-neon-api-key': string;
|
|
1617
|
+
};
|
|
1618
|
+
path?: never;
|
|
1619
|
+
query?: never;
|
|
1620
|
+
url: '/auth/neon/regions';
|
|
1621
|
+
};
|
|
1622
|
+
export type FetchNeonRegionsErrors = {
|
|
1623
|
+
/**
|
|
1624
|
+
* Unauthorised user.
|
|
1625
|
+
*/
|
|
1626
|
+
401: ErrorResponse;
|
|
1627
|
+
/**
|
|
1628
|
+
* Invalid credentials or missing Neon API key.
|
|
1629
|
+
*/
|
|
1630
|
+
403: ErrorResponse;
|
|
1631
|
+
/**
|
|
1632
|
+
* Unexpected error.
|
|
1633
|
+
*/
|
|
1634
|
+
500: ErrorResponse;
|
|
1635
|
+
};
|
|
1636
|
+
export type FetchNeonRegionsError = FetchNeonRegionsErrors[keyof FetchNeonRegionsErrors];
|
|
1637
|
+
export type FetchNeonRegionsResponses = {
|
|
1638
|
+
/**
|
|
1639
|
+
* Regions listed successfully.
|
|
1640
|
+
*/
|
|
1641
|
+
200: Array<NeonRegion>;
|
|
1642
|
+
};
|
|
1643
|
+
export type FetchNeonRegionsResponse = FetchNeonRegionsResponses[keyof FetchNeonRegionsResponses];
|
|
1644
|
+
export type FetchNeonConnectionUriData = {
|
|
1645
|
+
body?: never;
|
|
1646
|
+
headers: {
|
|
1647
|
+
/**
|
|
1648
|
+
* The Neon API key for authenticating with the Neon API.
|
|
1649
|
+
*/
|
|
1650
|
+
'x-neon-api-key': string;
|
|
1651
|
+
};
|
|
1652
|
+
path: {
|
|
1653
|
+
/**
|
|
1654
|
+
* The Neon project ID.
|
|
1655
|
+
*/
|
|
1656
|
+
projectId: string;
|
|
1657
|
+
};
|
|
1658
|
+
query: {
|
|
1659
|
+
/**
|
|
1660
|
+
* The name of the database.
|
|
1661
|
+
*/
|
|
1662
|
+
databaseName: string;
|
|
1663
|
+
/**
|
|
1664
|
+
* The role (user) name for the connection.
|
|
1665
|
+
*/
|
|
1666
|
+
roleName: string;
|
|
1667
|
+
/**
|
|
1668
|
+
* The branch ID to connect to.
|
|
1669
|
+
*/
|
|
1670
|
+
branchId?: string;
|
|
1671
|
+
/**
|
|
1672
|
+
* The endpoint ID to connect to.
|
|
1673
|
+
*/
|
|
1674
|
+
endpointId?: string;
|
|
1675
|
+
/**
|
|
1676
|
+
* Whether to use a pooled connection.
|
|
1677
|
+
*/
|
|
1678
|
+
pooled?: boolean;
|
|
1679
|
+
};
|
|
1680
|
+
url: '/auth/neon/projects/{projectId}/connection-uri';
|
|
1681
|
+
};
|
|
1682
|
+
export type FetchNeonConnectionUriErrors = {
|
|
1683
|
+
/**
|
|
1684
|
+
* Missing required query parameters.
|
|
1685
|
+
*/
|
|
1686
|
+
400: ErrorResponse;
|
|
1687
|
+
/**
|
|
1688
|
+
* Unauthorised user.
|
|
1689
|
+
*/
|
|
1690
|
+
401: ErrorResponse;
|
|
1691
|
+
/**
|
|
1692
|
+
* Invalid credentials or missing Neon API key.
|
|
1693
|
+
*/
|
|
1694
|
+
403: ErrorResponse;
|
|
1695
|
+
/**
|
|
1696
|
+
* Unexpected error.
|
|
1697
|
+
*/
|
|
1698
|
+
500: ErrorResponse;
|
|
1699
|
+
};
|
|
1700
|
+
export type FetchNeonConnectionUriError = FetchNeonConnectionUriErrors[keyof FetchNeonConnectionUriErrors];
|
|
1701
|
+
export type FetchNeonConnectionUriResponses = {
|
|
1702
|
+
/**
|
|
1703
|
+
* Connection URI retrieved successfully.
|
|
1704
|
+
*/
|
|
1705
|
+
200: NeonConnectionUri;
|
|
1706
|
+
};
|
|
1707
|
+
export type FetchNeonConnectionUriResponse = FetchNeonConnectionUriResponses[keyof FetchNeonConnectionUriResponses];
|
|
1532
1708
|
export type ListUserSpacesData = {
|
|
1533
1709
|
body?: never;
|
|
1534
1710
|
path?: never;
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -96,6 +96,22 @@ export declare const zErrorResponse: z.ZodObject<{
|
|
|
96
96
|
IDENTITY_NOT_FOUND: "IDENTITY_NOT_FOUND";
|
|
97
97
|
}>;
|
|
98
98
|
}, z.core.$strip>;
|
|
99
|
+
export declare const zNeonOrganization: z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
handle: z.ZodString;
|
|
103
|
+
plan: z.ZodString;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
export declare const zNeonRegion: z.ZodObject<{
|
|
106
|
+
region_id: z.ZodString;
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
default: z.ZodBoolean;
|
|
109
|
+
geo_lat: z.ZodString;
|
|
110
|
+
geo_long: z.ZodString;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
export declare const zNeonConnectionUri: z.ZodObject<{
|
|
113
|
+
uri: z.ZodString;
|
|
114
|
+
}, z.core.$strip>;
|
|
99
115
|
export declare const zCreateProject: z.ZodObject<{
|
|
100
116
|
name: z.ZodString;
|
|
101
117
|
handle: z.ZodString;
|
|
@@ -1439,6 +1455,34 @@ export declare const zUploadedFileNameUuid: z.ZodUUID;
|
|
|
1439
1455
|
* A version UUID.
|
|
1440
1456
|
*/
|
|
1441
1457
|
export declare const zVersionUuid: z.ZodUUID;
|
|
1458
|
+
/**
|
|
1459
|
+
* The Neon API key for authenticating with the Neon API.
|
|
1460
|
+
*/
|
|
1461
|
+
export declare const zNeonApiKey: z.ZodString;
|
|
1462
|
+
/**
|
|
1463
|
+
* The Neon project ID.
|
|
1464
|
+
*/
|
|
1465
|
+
export declare const zNeonProjectId: z.ZodString;
|
|
1466
|
+
/**
|
|
1467
|
+
* The name of the database.
|
|
1468
|
+
*/
|
|
1469
|
+
export declare const zNeonDatabaseName: z.ZodString;
|
|
1470
|
+
/**
|
|
1471
|
+
* The role (user) name for the connection.
|
|
1472
|
+
*/
|
|
1473
|
+
export declare const zNeonRoleName: z.ZodString;
|
|
1474
|
+
/**
|
|
1475
|
+
* The branch ID to connect to.
|
|
1476
|
+
*/
|
|
1477
|
+
export declare const zNeonBranchId: z.ZodString;
|
|
1478
|
+
/**
|
|
1479
|
+
* The endpoint ID to connect to.
|
|
1480
|
+
*/
|
|
1481
|
+
export declare const zNeonEndpointId: z.ZodString;
|
|
1482
|
+
/**
|
|
1483
|
+
* Whether to use a pooled connection.
|
|
1484
|
+
*/
|
|
1485
|
+
export declare const zNeonPooled: z.ZodBoolean;
|
|
1442
1486
|
/**
|
|
1443
1487
|
* Optional version UUID to exclude from the environment versions response.
|
|
1444
1488
|
*/
|
|
@@ -2543,6 +2587,63 @@ export declare const zListUserInstallationsResponse: z.ZodObject<{
|
|
|
2543
2587
|
}, z.core.$strip>>;
|
|
2544
2588
|
next_page: z.ZodOptional<z.ZodInt>;
|
|
2545
2589
|
}, z.core.$strip>;
|
|
2590
|
+
export declare const zFetchNeonOrganizationsData: z.ZodObject<{
|
|
2591
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2592
|
+
path: z.ZodOptional<z.ZodNever>;
|
|
2593
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2594
|
+
headers: z.ZodObject<{
|
|
2595
|
+
'x-neon-api-key': z.ZodString;
|
|
2596
|
+
}, z.core.$strip>;
|
|
2597
|
+
}, z.core.$strip>;
|
|
2598
|
+
/**
|
|
2599
|
+
* Organizations listed successfully.
|
|
2600
|
+
*/
|
|
2601
|
+
export declare const zFetchNeonOrganizationsResponse: z.ZodArray<z.ZodObject<{
|
|
2602
|
+
id: z.ZodString;
|
|
2603
|
+
name: z.ZodString;
|
|
2604
|
+
handle: z.ZodString;
|
|
2605
|
+
plan: z.ZodString;
|
|
2606
|
+
}, z.core.$strip>>;
|
|
2607
|
+
export declare const zFetchNeonRegionsData: z.ZodObject<{
|
|
2608
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2609
|
+
path: z.ZodOptional<z.ZodNever>;
|
|
2610
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2611
|
+
headers: z.ZodObject<{
|
|
2612
|
+
'x-neon-api-key': z.ZodString;
|
|
2613
|
+
}, z.core.$strip>;
|
|
2614
|
+
}, z.core.$strip>;
|
|
2615
|
+
/**
|
|
2616
|
+
* Regions listed successfully.
|
|
2617
|
+
*/
|
|
2618
|
+
export declare const zFetchNeonRegionsResponse: z.ZodArray<z.ZodObject<{
|
|
2619
|
+
region_id: z.ZodString;
|
|
2620
|
+
name: z.ZodString;
|
|
2621
|
+
default: z.ZodBoolean;
|
|
2622
|
+
geo_lat: z.ZodString;
|
|
2623
|
+
geo_long: z.ZodString;
|
|
2624
|
+
}, z.core.$strip>>;
|
|
2625
|
+
export declare const zFetchNeonConnectionUriData: z.ZodObject<{
|
|
2626
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2627
|
+
path: z.ZodObject<{
|
|
2628
|
+
projectId: z.ZodString;
|
|
2629
|
+
}, z.core.$strip>;
|
|
2630
|
+
query: z.ZodObject<{
|
|
2631
|
+
databaseName: z.ZodString;
|
|
2632
|
+
roleName: z.ZodString;
|
|
2633
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
2634
|
+
endpointId: z.ZodOptional<z.ZodString>;
|
|
2635
|
+
pooled: z.ZodOptional<z.ZodBoolean>;
|
|
2636
|
+
}, z.core.$strip>;
|
|
2637
|
+
headers: z.ZodObject<{
|
|
2638
|
+
'x-neon-api-key': z.ZodString;
|
|
2639
|
+
}, z.core.$strip>;
|
|
2640
|
+
}, z.core.$strip>;
|
|
2641
|
+
/**
|
|
2642
|
+
* Connection URI retrieved successfully.
|
|
2643
|
+
*/
|
|
2644
|
+
export declare const zFetchNeonConnectionUriResponse: z.ZodObject<{
|
|
2645
|
+
uri: z.ZodString;
|
|
2646
|
+
}, z.core.$strip>;
|
|
2546
2647
|
export declare const zListUserSpacesData: z.ZodObject<{
|
|
2547
2648
|
body: z.ZodOptional<z.ZodNever>;
|
|
2548
2649
|
path: z.ZodOptional<z.ZodNever>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -74,6 +74,22 @@ export const zErrorResponse = z.object({
|
|
|
74
74
|
message: z.string(),
|
|
75
75
|
internalCode: zErrorCode
|
|
76
76
|
});
|
|
77
|
+
export const zNeonOrganization = z.object({
|
|
78
|
+
id: z.string(),
|
|
79
|
+
name: z.string(),
|
|
80
|
+
handle: z.string(),
|
|
81
|
+
plan: z.string()
|
|
82
|
+
});
|
|
83
|
+
export const zNeonRegion = z.object({
|
|
84
|
+
region_id: z.string(),
|
|
85
|
+
name: z.string(),
|
|
86
|
+
default: z.boolean(),
|
|
87
|
+
geo_lat: z.string(),
|
|
88
|
+
geo_long: z.string()
|
|
89
|
+
});
|
|
90
|
+
export const zNeonConnectionUri = z.object({
|
|
91
|
+
uri: z.string()
|
|
92
|
+
});
|
|
77
93
|
export const zCreateProject = z.object({
|
|
78
94
|
name: zPlainString,
|
|
79
95
|
handle: z.string(),
|
|
@@ -670,6 +686,34 @@ export const zUploadedFileNameUuid = z.uuid();
|
|
|
670
686
|
* A version UUID.
|
|
671
687
|
*/
|
|
672
688
|
export const zVersionUuid = z.uuid();
|
|
689
|
+
/**
|
|
690
|
+
* The Neon API key for authenticating with the Neon API.
|
|
691
|
+
*/
|
|
692
|
+
export const zNeonApiKey = z.string();
|
|
693
|
+
/**
|
|
694
|
+
* The Neon project ID.
|
|
695
|
+
*/
|
|
696
|
+
export const zNeonProjectId = z.string();
|
|
697
|
+
/**
|
|
698
|
+
* The name of the database.
|
|
699
|
+
*/
|
|
700
|
+
export const zNeonDatabaseName = z.string();
|
|
701
|
+
/**
|
|
702
|
+
* The role (user) name for the connection.
|
|
703
|
+
*/
|
|
704
|
+
export const zNeonRoleName = z.string();
|
|
705
|
+
/**
|
|
706
|
+
* The branch ID to connect to.
|
|
707
|
+
*/
|
|
708
|
+
export const zNeonBranchId = z.string();
|
|
709
|
+
/**
|
|
710
|
+
* The endpoint ID to connect to.
|
|
711
|
+
*/
|
|
712
|
+
export const zNeonEndpointId = z.string();
|
|
713
|
+
/**
|
|
714
|
+
* Whether to use a pooled connection.
|
|
715
|
+
*/
|
|
716
|
+
export const zNeonPooled = z.boolean();
|
|
673
717
|
/**
|
|
674
718
|
* Optional version UUID to exclude from the environment versions response.
|
|
675
719
|
*/
|
|
@@ -968,6 +1012,50 @@ export const zListUserInstallationsData = z.object({
|
|
|
968
1012
|
* Installations for the authenticated user.
|
|
969
1013
|
*/
|
|
970
1014
|
export const zListUserInstallationsResponse = zUserGithubInstallationsResponse;
|
|
1015
|
+
export const zFetchNeonOrganizationsData = z.object({
|
|
1016
|
+
body: z.optional(z.never()),
|
|
1017
|
+
path: z.optional(z.never()),
|
|
1018
|
+
query: z.optional(z.never()),
|
|
1019
|
+
headers: z.object({
|
|
1020
|
+
'x-neon-api-key': z.string()
|
|
1021
|
+
})
|
|
1022
|
+
});
|
|
1023
|
+
/**
|
|
1024
|
+
* Organizations listed successfully.
|
|
1025
|
+
*/
|
|
1026
|
+
export const zFetchNeonOrganizationsResponse = z.array(zNeonOrganization);
|
|
1027
|
+
export const zFetchNeonRegionsData = z.object({
|
|
1028
|
+
body: z.optional(z.never()),
|
|
1029
|
+
path: z.optional(z.never()),
|
|
1030
|
+
query: z.optional(z.never()),
|
|
1031
|
+
headers: z.object({
|
|
1032
|
+
'x-neon-api-key': z.string()
|
|
1033
|
+
})
|
|
1034
|
+
});
|
|
1035
|
+
/**
|
|
1036
|
+
* Regions listed successfully.
|
|
1037
|
+
*/
|
|
1038
|
+
export const zFetchNeonRegionsResponse = z.array(zNeonRegion);
|
|
1039
|
+
export const zFetchNeonConnectionUriData = z.object({
|
|
1040
|
+
body: z.optional(z.never()),
|
|
1041
|
+
path: z.object({
|
|
1042
|
+
projectId: z.string()
|
|
1043
|
+
}),
|
|
1044
|
+
query: z.object({
|
|
1045
|
+
databaseName: z.string(),
|
|
1046
|
+
roleName: z.string(),
|
|
1047
|
+
branchId: z.optional(z.string()),
|
|
1048
|
+
endpointId: z.optional(z.string()),
|
|
1049
|
+
pooled: z.optional(z.boolean())
|
|
1050
|
+
}),
|
|
1051
|
+
headers: z.object({
|
|
1052
|
+
'x-neon-api-key': z.string()
|
|
1053
|
+
})
|
|
1054
|
+
});
|
|
1055
|
+
/**
|
|
1056
|
+
* Connection URI retrieved successfully.
|
|
1057
|
+
*/
|
|
1058
|
+
export const zFetchNeonConnectionUriResponse = zNeonConnectionUri;
|
|
971
1059
|
export const zListUserSpacesData = z.object({
|
|
972
1060
|
body: z.optional(z.never()),
|
|
973
1061
|
path: z.optional(z.never()),
|
|
@@ -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, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, 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, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, 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, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNeonConnectionUriData, 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, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, 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>;
|
|
@@ -92,6 +92,15 @@ export declare const useListInstallationBranches: (options: Omit<ListInstallatio
|
|
|
92
92
|
export declare const useListUserInstallations: (options?: Omit<ListUserInstallationsData, "url"> & {
|
|
93
93
|
enabled?: boolean;
|
|
94
94
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").UserGithubInstallationsResponse | undefined, Error>;
|
|
95
|
+
export declare const useFetchNeonOrganizations: (options: Omit<FetchNeonOrganizationsData, "url"> & {
|
|
96
|
+
enabled?: boolean;
|
|
97
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").NeonOrganization[] | undefined, Error>;
|
|
98
|
+
export declare const useFetchNeonRegions: (options: Omit<FetchNeonRegionsData, "url"> & {
|
|
99
|
+
enabled?: boolean;
|
|
100
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").NeonRegion[] | undefined, Error>;
|
|
101
|
+
export declare const useFetchNeonConnectionUri: (options: Omit<FetchNeonConnectionUriData, "url"> & {
|
|
102
|
+
enabled?: boolean;
|
|
103
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").NeonConnectionUri | undefined, Error>;
|
|
95
104
|
export declare const useListUserSpaces: (options?: Omit<ListUserSpacesData, "url"> & {
|
|
96
105
|
enabled?: boolean;
|
|
97
106
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").UserSpacesResponse | 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, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, previewBlueprint, viewBlueprints, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, 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, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, fetchNeonOrganizations, fetchNeonRegions, fetchNeonConnectionUri, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, previewBlueprint, viewBlueprints, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, 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 };
|
|
@@ -344,6 +344,69 @@ export const useListUserInstallations = (options) => {
|
|
|
344
344
|
staleTime: 600000
|
|
345
345
|
});
|
|
346
346
|
};
|
|
347
|
+
export const useFetchNeonOrganizations = (options) => {
|
|
348
|
+
const token = useToken();
|
|
349
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
350
|
+
const opts = { throwOnError: true, url: "/auth/neon/organizations" };
|
|
351
|
+
const funcer = async () => {
|
|
352
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
353
|
+
if (isPromise(token) && !token)
|
|
354
|
+
return;
|
|
355
|
+
const res = await fetchNeonOrganizations({ ...opts, ...rest, auth });
|
|
356
|
+
return res.data;
|
|
357
|
+
};
|
|
358
|
+
if (!token)
|
|
359
|
+
enabled = false;
|
|
360
|
+
return useQuery({
|
|
361
|
+
queryKey: ["neon", "organizations", options.query ?? {}],
|
|
362
|
+
queryFn: funcer,
|
|
363
|
+
enabled,
|
|
364
|
+
retry: false,
|
|
365
|
+
staleTime: 600000
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
export const useFetchNeonRegions = (options) => {
|
|
369
|
+
const token = useToken();
|
|
370
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
371
|
+
const opts = { throwOnError: true, url: "/auth/neon/regions" };
|
|
372
|
+
const funcer = async () => {
|
|
373
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
374
|
+
if (isPromise(token) && !token)
|
|
375
|
+
return;
|
|
376
|
+
const res = await fetchNeonRegions({ ...opts, ...rest, auth });
|
|
377
|
+
return res.data;
|
|
378
|
+
};
|
|
379
|
+
if (!token)
|
|
380
|
+
enabled = false;
|
|
381
|
+
return useQuery({
|
|
382
|
+
queryKey: ["neon", "regions", options.query ?? {}],
|
|
383
|
+
queryFn: funcer,
|
|
384
|
+
enabled,
|
|
385
|
+
retry: false,
|
|
386
|
+
staleTime: 600000
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
export const useFetchNeonConnectionUri = (options) => {
|
|
390
|
+
const token = useToken();
|
|
391
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
392
|
+
const opts = { throwOnError: true, url: "/auth/neon/projects/{projectId}/connection-uri" };
|
|
393
|
+
const funcer = async () => {
|
|
394
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
395
|
+
if (isPromise(token) && !token)
|
|
396
|
+
return;
|
|
397
|
+
const res = await fetchNeonConnectionUri({ ...opts, ...rest, auth });
|
|
398
|
+
return res.data;
|
|
399
|
+
};
|
|
400
|
+
if (!token)
|
|
401
|
+
enabled = false;
|
|
402
|
+
return useQuery({
|
|
403
|
+
queryKey: ["neon", "projects", options?.path?.projectId, "connection-uri", options.query ?? {}],
|
|
404
|
+
queryFn: funcer,
|
|
405
|
+
enabled,
|
|
406
|
+
retry: false,
|
|
407
|
+
staleTime: 600000
|
|
408
|
+
});
|
|
409
|
+
};
|
|
347
410
|
export const useListUserSpaces = (options) => {
|
|
348
411
|
const token = useToken();
|
|
349
412
|
let { enabled, ...rest } = options || { enabled: true };
|