shoal-web-sdk 1.0.68 → 1.0.69
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 +53 -1
- package/dist/sdk/@tanstack/react-query.gen.js +46 -1
- package/dist/sdk/sdk.gen.d.ts +5 -1
- package/dist/sdk/sdk.gen.js +19 -0
- package/dist/sdk/types.gen.d.ts +66 -2
- package/dist/sdk/zod.gen.d.ts +60 -84
- package/dist/sdk/zod.gen.js +38 -18
- package/dist/tanstack-codegen/generated/generated.d.ts +4 -1
- package/dist/tanstack-codegen/generated/generated.js +22 -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, CloneEnvironmentData, CloneEnvironmentError, CloneEnvironmentResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse2, 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, DeleteEnvironmentData, DeleteEnvironmentError, DeleteEnvironmentM2mData, DeleteEnvironmentM2mError, DeleteEnvironmentM2mResponse, DeleteEnvironmentResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteNeonDatabaseData, DeleteNeonDatabaseError, DeleteNeonDatabaseResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchMongoOrganizationsData, FetchMongoOrganizationTierData, FetchMongoRegionsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetApiKeysData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetBlueprintM2mData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetFeatureFlagsData, 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, ListMongoClustersData, ListMongoProjectsData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListNeonRolesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, LookupApiKeyData, PingNodeData, PreviewBlueprintData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeApiKeyData, RevokeApiKeyError, RevokeApiKeyResponse, 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, CloneEnvironmentData, CloneEnvironmentError, CloneEnvironmentResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse2, 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, DeleteEnvironmentData, DeleteEnvironmentError, DeleteEnvironmentM2mData, DeleteEnvironmentM2mError, DeleteEnvironmentM2mResponse, DeleteEnvironmentResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteNeonDatabaseData, DeleteNeonDatabaseError, DeleteNeonDatabaseResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchMongoOrganizationsData, FetchMongoOrganizationTierData, FetchMongoRegionsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetApiKeysData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetBlueprintM2mData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetFeatureFlagsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectEnvironmentsData, GetProjectOverviewData, GetPublicInviteData, GetSecretValueData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListMongoClustersData, ListMongoProjectsData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListNeonRolesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, LookupApiKeyData, PingNodeData, PreviewBlueprintData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeApiKeyData, RevokeApiKeyError, RevokeApiKeyResponse, 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;
|
|
@@ -1521,6 +1521,58 @@ export declare const getProjectOverviewOptions: (options: Options<GetProjectOver
|
|
|
1521
1521
|
[dataTagErrorSymbol]: Error;
|
|
1522
1522
|
};
|
|
1523
1523
|
};
|
|
1524
|
+
export declare const getProjectEnvironmentsQueryKey: (options: Options<GetProjectEnvironmentsData>) => [Pick<Options<GetProjectEnvironmentsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1525
|
+
_id: string;
|
|
1526
|
+
_infinite?: boolean;
|
|
1527
|
+
tags?: ReadonlyArray<string>;
|
|
1528
|
+
}];
|
|
1529
|
+
/**
|
|
1530
|
+
* Get paginated environments for a project, ordered with active environments first and soft deleted environments last.
|
|
1531
|
+
*/
|
|
1532
|
+
export declare const getProjectEnvironmentsOptions: (options: Options<GetProjectEnvironmentsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").PaginatedEnvironments, Error, import("../types.gen").PaginatedEnvironments, [Pick<Options<GetProjectEnvironmentsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1533
|
+
_id: string;
|
|
1534
|
+
_infinite?: boolean;
|
|
1535
|
+
tags?: ReadonlyArray<string>;
|
|
1536
|
+
}]>, "queryFn"> & {
|
|
1537
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").PaginatedEnvironments, [Pick<Options<GetProjectEnvironmentsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1538
|
+
_id: string;
|
|
1539
|
+
_infinite?: boolean;
|
|
1540
|
+
tags?: ReadonlyArray<string>;
|
|
1541
|
+
}], never> | undefined;
|
|
1542
|
+
} & {
|
|
1543
|
+
queryKey: [Pick<Options<GetProjectEnvironmentsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1544
|
+
_id: string;
|
|
1545
|
+
_infinite?: boolean;
|
|
1546
|
+
tags?: ReadonlyArray<string>;
|
|
1547
|
+
}] & {
|
|
1548
|
+
[dataTagSymbol]: import("../types.gen").PaginatedEnvironments;
|
|
1549
|
+
[dataTagErrorSymbol]: Error;
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
export declare const getProjectEnvironmentsInfiniteQueryKey: (options: Options<GetProjectEnvironmentsData>) => QueryKey<Options<GetProjectEnvironmentsData>>;
|
|
1553
|
+
/**
|
|
1554
|
+
* Get paginated environments for a project, ordered with active environments first and soft deleted environments last.
|
|
1555
|
+
*/
|
|
1556
|
+
export declare const getProjectEnvironmentsInfiniteOptions: (options: Options<GetProjectEnvironmentsData>) => import("@tanstack/react-query").UseInfiniteQueryOptions<import("../types.gen").PaginatedEnvironments, import("../types.gen").ErrorResponse, InfiniteData<import("../types.gen").PaginatedEnvironments, unknown>, QueryKey<Options<GetProjectEnvironmentsData>>, number | Pick<Pick<Options<GetProjectEnvironmentsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1557
|
+
_id: string;
|
|
1558
|
+
_infinite?: boolean;
|
|
1559
|
+
tags?: ReadonlyArray<string>;
|
|
1560
|
+
}, "query" | "body" | "headers" | "path">> & {
|
|
1561
|
+
initialData: InfiniteData<import("../types.gen").PaginatedEnvironments, number | Pick<Pick<Options<GetProjectEnvironmentsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1562
|
+
_id: string;
|
|
1563
|
+
_infinite?: boolean;
|
|
1564
|
+
tags?: ReadonlyArray<string>;
|
|
1565
|
+
}, "query" | "body" | "headers" | "path">> | (() => InfiniteData<import("../types.gen").PaginatedEnvironments, number | Pick<Pick<Options<GetProjectEnvironmentsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1566
|
+
_id: string;
|
|
1567
|
+
_infinite?: boolean;
|
|
1568
|
+
tags?: ReadonlyArray<string>;
|
|
1569
|
+
}, "query" | "body" | "headers" | "path">>) | undefined;
|
|
1570
|
+
} & {
|
|
1571
|
+
queryKey: QueryKey<Options<GetProjectEnvironmentsData>> & {
|
|
1572
|
+
[dataTagSymbol]: InfiniteData<import("../types.gen").PaginatedEnvironments, unknown>;
|
|
1573
|
+
[dataTagErrorSymbol]: import("../types.gen").ErrorResponse;
|
|
1574
|
+
};
|
|
1575
|
+
};
|
|
1524
1576
|
/**
|
|
1525
1577
|
* Create an environment inside a project.
|
|
1526
1578
|
*/
|
|
@@ -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, cloneEnvironment, createApiKey, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createNeonProjectM2M, createProject, createSecret, createSecretM2M, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironment, deleteEnvironmentM2M, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchMongoOrganizations, fetchMongoOrganizationTier, fetchMongoRegions, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getApiKeys, getBillingPlan, getBillingUsage, getBlueprint, getBlueprintM2M, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getFeatureFlags, getGraphOverview, getNodeEnvironmentVariables, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listMongoClusters, listMongoProjects, listNeonBranches, listNeonDatabases, listNeonProjects, listNeonRoles, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, lookupApiKey, pingNode, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeApiKey, revokeSpaceInvite, setDefaultPaymentMethod, setEnvironmentGcpProjectId, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints, viewBlueprintsM2M } from '../sdk.gen';
|
|
4
|
+
import { checkSubdomainUniqueness, cloneEnvironment, createApiKey, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createNeonProjectM2M, createProject, createSecret, createSecretM2M, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironment, deleteEnvironmentM2M, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchMongoOrganizations, fetchMongoOrganizationTier, fetchMongoRegions, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getApiKeys, getBillingPlan, getBillingUsage, getBlueprint, getBlueprintM2M, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getFeatureFlags, getGraphOverview, getNodeEnvironmentVariables, getProjectEnvironments, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listMongoClusters, listMongoProjects, listNeonBranches, listNeonDatabases, listNeonProjects, listNeonRoles, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, lookupApiKey, pingNode, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeApiKey, 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) {
|
|
@@ -1515,6 +1515,51 @@ export const getProjectOverviewOptions = (options) => {
|
|
|
1515
1515
|
queryKey: getProjectOverviewQueryKey(options)
|
|
1516
1516
|
});
|
|
1517
1517
|
};
|
|
1518
|
+
export const getProjectEnvironmentsQueryKey = (options) => createQueryKey('getProjectEnvironments', options);
|
|
1519
|
+
/**
|
|
1520
|
+
* Get paginated environments for a project, ordered with active environments first and soft deleted environments last.
|
|
1521
|
+
*/
|
|
1522
|
+
export const getProjectEnvironmentsOptions = (options) => {
|
|
1523
|
+
return queryOptions({
|
|
1524
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1525
|
+
const { data } = await getProjectEnvironments({
|
|
1526
|
+
...options,
|
|
1527
|
+
...queryKey[0],
|
|
1528
|
+
signal,
|
|
1529
|
+
throwOnError: true
|
|
1530
|
+
});
|
|
1531
|
+
return data;
|
|
1532
|
+
},
|
|
1533
|
+
queryKey: getProjectEnvironmentsQueryKey(options)
|
|
1534
|
+
});
|
|
1535
|
+
};
|
|
1536
|
+
export const getProjectEnvironmentsInfiniteQueryKey = (options) => createQueryKey('getProjectEnvironments', options, true);
|
|
1537
|
+
/**
|
|
1538
|
+
* Get paginated environments for a project, ordered with active environments first and soft deleted environments last.
|
|
1539
|
+
*/
|
|
1540
|
+
export const getProjectEnvironmentsInfiniteOptions = (options) => {
|
|
1541
|
+
return infiniteQueryOptions(
|
|
1542
|
+
// @ts-ignore
|
|
1543
|
+
{
|
|
1544
|
+
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
1545
|
+
// @ts-ignore
|
|
1546
|
+
const page = typeof pageParam === 'object' ? pageParam : {
|
|
1547
|
+
query: {
|
|
1548
|
+
page: pageParam
|
|
1549
|
+
}
|
|
1550
|
+
};
|
|
1551
|
+
const params = createInfiniteParams(queryKey, page);
|
|
1552
|
+
const { data } = await getProjectEnvironments({
|
|
1553
|
+
...options,
|
|
1554
|
+
...params,
|
|
1555
|
+
signal,
|
|
1556
|
+
throwOnError: true
|
|
1557
|
+
});
|
|
1558
|
+
return data;
|
|
1559
|
+
},
|
|
1560
|
+
queryKey: getProjectEnvironmentsInfiniteQueryKey(options)
|
|
1561
|
+
});
|
|
1562
|
+
};
|
|
1518
1563
|
/**
|
|
1519
1564
|
* Create an environment inside a project.
|
|
1520
1565
|
*/
|
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, CloneEnvironmentData, CloneEnvironmentErrors, CloneEnvironmentResponses, CreateApiKeyData, CreateApiKeyErrors, CreateApiKeyResponses, 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, DeleteEnvironmentData, DeleteEnvironmentErrors, DeleteEnvironmentM2mData, DeleteEnvironmentM2mErrors, DeleteEnvironmentM2mResponses, DeleteEnvironmentResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseErrors, DeleteNeonDatabaseResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchMongoOrganizationsData, FetchMongoOrganizationsErrors, FetchMongoOrganizationsResponses, FetchMongoOrganizationTierData, FetchMongoOrganizationTierErrors, FetchMongoOrganizationTierResponses, FetchMongoRegionsData, FetchMongoRegionsErrors, FetchMongoRegionsResponses, FetchNeonConnectionUriData, FetchNeonConnectionUriErrors, FetchNeonConnectionUriResponses, FetchNeonOrganizationsData, FetchNeonOrganizationsErrors, FetchNeonOrganizationsResponses, FetchNeonRegionsData, FetchNeonRegionsErrors, FetchNeonRegionsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetApiKeysData, GetApiKeysErrors, GetApiKeysResponses, 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, GetFeatureFlagsData, GetFeatureFlagsErrors, GetFeatureFlagsResponses, 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, ListMongoClustersData, ListMongoClustersErrors, ListMongoClustersResponses, ListMongoProjectsData, ListMongoProjectsErrors, ListMongoProjectsResponses, ListNeonBranchesData, ListNeonBranchesErrors, ListNeonBranchesResponses, ListNeonDatabasesData, ListNeonDatabasesErrors, ListNeonDatabasesResponses, ListNeonProjectsData, ListNeonProjectsErrors, ListNeonProjectsResponses, ListNeonRolesData, ListNeonRolesErrors, ListNeonRolesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, LookupApiKeyData, LookupApiKeyErrors, LookupApiKeyResponses, PingNodeData, PingNodeErrors, PingNodeResponses, PreviewBlueprintData, PreviewBlueprintErrors, PreviewBlueprintResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, 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, CloneEnvironmentData, CloneEnvironmentErrors, CloneEnvironmentResponses, CreateApiKeyData, CreateApiKeyErrors, CreateApiKeyResponses, 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, DeleteEnvironmentData, DeleteEnvironmentErrors, DeleteEnvironmentM2mData, DeleteEnvironmentM2mErrors, DeleteEnvironmentM2mResponses, DeleteEnvironmentResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseErrors, DeleteNeonDatabaseResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchMongoOrganizationsData, FetchMongoOrganizationsErrors, FetchMongoOrganizationsResponses, FetchMongoOrganizationTierData, FetchMongoOrganizationTierErrors, FetchMongoOrganizationTierResponses, FetchMongoRegionsData, FetchMongoRegionsErrors, FetchMongoRegionsResponses, FetchNeonConnectionUriData, FetchNeonConnectionUriErrors, FetchNeonConnectionUriResponses, FetchNeonOrganizationsData, FetchNeonOrganizationsErrors, FetchNeonOrganizationsResponses, FetchNeonRegionsData, FetchNeonRegionsErrors, FetchNeonRegionsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetApiKeysData, GetApiKeysErrors, GetApiKeysResponses, 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, GetFeatureFlagsData, GetFeatureFlagsErrors, GetFeatureFlagsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetNodeEnvironmentVariablesData, GetNodeEnvironmentVariablesErrors, GetNodeEnvironmentVariablesResponses, GetProjectEnvironmentsData, GetProjectEnvironmentsErrors, GetProjectEnvironmentsResponses, 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, ListMongoClustersData, ListMongoClustersErrors, ListMongoClustersResponses, ListMongoProjectsData, ListMongoProjectsErrors, ListMongoProjectsResponses, ListNeonBranchesData, ListNeonBranchesErrors, ListNeonBranchesResponses, ListNeonDatabasesData, ListNeonDatabasesErrors, ListNeonDatabasesResponses, ListNeonProjectsData, ListNeonProjectsErrors, ListNeonProjectsResponses, ListNeonRolesData, ListNeonRolesErrors, ListNeonRolesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, LookupApiKeyData, LookupApiKeyErrors, LookupApiKeyResponses, PingNodeData, PingNodeErrors, PingNodeResponses, PreviewBlueprintData, PreviewBlueprintErrors, PreviewBlueprintResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, 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
|
|
@@ -278,6 +278,10 @@ export declare const createProject: <ThrowOnError extends boolean = false>(optio
|
|
|
278
278
|
* Get the project overview.
|
|
279
279
|
*/
|
|
280
280
|
export declare const getProjectOverview: <ThrowOnError extends boolean = false>(options: Options<GetProjectOverviewData, ThrowOnError>) => import("./client").RequestResult<GetProjectOverviewResponses, GetProjectOverviewErrors, ThrowOnError, "fields">;
|
|
281
|
+
/**
|
|
282
|
+
* Get paginated environments for a project, ordered with active environments first and soft deleted environments last.
|
|
283
|
+
*/
|
|
284
|
+
export declare const getProjectEnvironments: <ThrowOnError extends boolean = false>(options: Options<GetProjectEnvironmentsData, ThrowOnError>) => import("./client").RequestResult<GetProjectEnvironmentsResponses, GetProjectEnvironmentsErrors, ThrowOnError, "fields">;
|
|
281
285
|
/**
|
|
282
286
|
* Create an environment inside a project.
|
|
283
287
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -1353,6 +1353,25 @@ export const getProjectOverview = (options) => {
|
|
|
1353
1353
|
...options
|
|
1354
1354
|
});
|
|
1355
1355
|
};
|
|
1356
|
+
/**
|
|
1357
|
+
* Get paginated environments for a project, ordered with active environments first and soft deleted environments last.
|
|
1358
|
+
*/
|
|
1359
|
+
export const getProjectEnvironments = (options) => {
|
|
1360
|
+
return (options.client ?? client).get({
|
|
1361
|
+
security: [
|
|
1362
|
+
{
|
|
1363
|
+
scheme: 'bearer',
|
|
1364
|
+
type: 'http'
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
name: 'X-Api-Key',
|
|
1368
|
+
type: 'apiKey'
|
|
1369
|
+
}
|
|
1370
|
+
],
|
|
1371
|
+
url: '/auth/{spaceHandle}/{projectHandle}/environments/view',
|
|
1372
|
+
...options
|
|
1373
|
+
});
|
|
1374
|
+
};
|
|
1356
1375
|
/**
|
|
1357
1376
|
* Create an environment inside a project.
|
|
1358
1377
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -168,7 +168,6 @@ export type ProjectOverview = {
|
|
|
168
168
|
description: string;
|
|
169
169
|
createdAt: string;
|
|
170
170
|
updatedAt: string;
|
|
171
|
-
environments: Array<EnvironmentOverview>;
|
|
172
171
|
};
|
|
173
172
|
export type Pagination = {
|
|
174
173
|
page: number;
|
|
@@ -211,6 +210,9 @@ export type PaginatedInvites = Pagination & {
|
|
|
211
210
|
export type PaginatedEnvironmentVersions = Pagination & {
|
|
212
211
|
versions: Array<Version>;
|
|
213
212
|
};
|
|
213
|
+
export type PaginatedEnvironments = Pagination & {
|
|
214
|
+
environments: Array<EnvironmentOverview>;
|
|
215
|
+
};
|
|
214
216
|
export type Invite = {
|
|
215
217
|
id: string;
|
|
216
218
|
spaceName: string;
|
|
@@ -259,6 +261,10 @@ export type CreateEnvironment = {
|
|
|
259
261
|
name: PlainString;
|
|
260
262
|
handle: string;
|
|
261
263
|
description?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Only meaningful when the handle belongs to an environment that was deleted and is still pending purge. When true that environment is brought back with its versions, nodes and variables intact. When false or omitted those are cleared and it is reused as an empty environment. Has no effect when the handle is free.
|
|
266
|
+
*/
|
|
267
|
+
keepVersions?: boolean;
|
|
262
268
|
};
|
|
263
269
|
export type CloneEnvironment = {
|
|
264
270
|
name: PlainString;
|
|
@@ -269,9 +275,13 @@ export type CloneEnvironment = {
|
|
|
269
275
|
*/
|
|
270
276
|
variables: Array<EnvironmentVariable>;
|
|
271
277
|
/**
|
|
272
|
-
* When true the clone keeps the database settings of the source's Neon and MongoDB nodes, so both environments point at the same database. When false or omitted those settings are reset and the cloned environment provisions its own databases on deploy. No other node type is affected
|
|
278
|
+
* When true the clone keeps the database settings of the source's Neon and MongoDB nodes, so both environments point at the same database. When false or omitted those settings are reset and the cloned environment provisions its own databases on deploy. The connection secret is never carried over either way: a secret belongs to one node, so the clone takes its own on deploy. No other node type is affected.
|
|
273
279
|
*/
|
|
274
280
|
cloneDbSettings?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Only meaningful when the handle belongs to an environment that was deleted and is still pending purge. When true that environment is brought back with its existing versions intact and the clone is added on top as a new version. When false or omitted those are cleared and the clone becomes its first version. Has no effect when the handle is free.
|
|
283
|
+
*/
|
|
284
|
+
keepVersions?: boolean;
|
|
275
285
|
};
|
|
276
286
|
export type OnboardingAnalytics = {
|
|
277
287
|
/**
|
|
@@ -326,6 +336,10 @@ export type EnvironmentOverview = {
|
|
|
326
336
|
updatedAt: string;
|
|
327
337
|
versions: number;
|
|
328
338
|
blueprintId?: string;
|
|
339
|
+
/**
|
|
340
|
+
* True when this environment has been deleted and is pending purge. It keeps its handle while in this state, so creating or cloning onto the handle must either restore it or destroy it first.
|
|
341
|
+
*/
|
|
342
|
+
softDelete?: boolean;
|
|
329
343
|
};
|
|
330
344
|
export type AccountIdentity = {
|
|
331
345
|
id: string;
|
|
@@ -3956,6 +3970,56 @@ export type GetProjectOverviewResponses = {
|
|
|
3956
3970
|
200: ProjectOverview;
|
|
3957
3971
|
};
|
|
3958
3972
|
export type GetProjectOverviewResponse = GetProjectOverviewResponses[keyof GetProjectOverviewResponses];
|
|
3973
|
+
export type GetProjectEnvironmentsData = {
|
|
3974
|
+
body?: never;
|
|
3975
|
+
path: {
|
|
3976
|
+
/**
|
|
3977
|
+
* The space handle. This must be globally unique.
|
|
3978
|
+
*/
|
|
3979
|
+
spaceHandle: string;
|
|
3980
|
+
/**
|
|
3981
|
+
* A project name. This must be unique to a space.
|
|
3982
|
+
*/
|
|
3983
|
+
projectHandle: string;
|
|
3984
|
+
};
|
|
3985
|
+
query?: {
|
|
3986
|
+
/**
|
|
3987
|
+
* Page number (1-based).
|
|
3988
|
+
*/
|
|
3989
|
+
page?: number;
|
|
3990
|
+
/**
|
|
3991
|
+
* Page size (max 100).
|
|
3992
|
+
*/
|
|
3993
|
+
limit?: number;
|
|
3994
|
+
};
|
|
3995
|
+
url: '/auth/{spaceHandle}/{projectHandle}/environments/view';
|
|
3996
|
+
};
|
|
3997
|
+
export type GetProjectEnvironmentsErrors = {
|
|
3998
|
+
/**
|
|
3999
|
+
* Unauthorised user.
|
|
4000
|
+
*/
|
|
4001
|
+
401: ErrorResponse;
|
|
4002
|
+
/**
|
|
4003
|
+
* Invalid credentials.
|
|
4004
|
+
*/
|
|
4005
|
+
403: ErrorResponse;
|
|
4006
|
+
/**
|
|
4007
|
+
* Project not found.
|
|
4008
|
+
*/
|
|
4009
|
+
404: ErrorResponse;
|
|
4010
|
+
/**
|
|
4011
|
+
* Unexpected error.
|
|
4012
|
+
*/
|
|
4013
|
+
500: ErrorResponse;
|
|
4014
|
+
};
|
|
4015
|
+
export type GetProjectEnvironmentsError = GetProjectEnvironmentsErrors[keyof GetProjectEnvironmentsErrors];
|
|
4016
|
+
export type GetProjectEnvironmentsResponses = {
|
|
4017
|
+
/**
|
|
4018
|
+
* Project environments.
|
|
4019
|
+
*/
|
|
4020
|
+
200: PaginatedEnvironments;
|
|
4021
|
+
};
|
|
4022
|
+
export type GetProjectEnvironmentsResponse = GetProjectEnvironmentsResponses[keyof GetProjectEnvironmentsResponses];
|
|
3959
4023
|
export type CreateEnvironmentData = {
|
|
3960
4024
|
body: CreateEnvironment;
|
|
3961
4025
|
path: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -179,6 +179,15 @@ export declare const zCreateProject: z.ZodObject<{
|
|
|
179
179
|
handle: z.ZodString;
|
|
180
180
|
description: z.ZodOptional<z.ZodString>;
|
|
181
181
|
}, z.core.$strip>;
|
|
182
|
+
export declare const zProjectOverview: z.ZodObject<{
|
|
183
|
+
id: z.ZodUUID;
|
|
184
|
+
orgCode: z.ZodString;
|
|
185
|
+
name: z.ZodString;
|
|
186
|
+
handle: z.ZodString;
|
|
187
|
+
description: z.ZodString;
|
|
188
|
+
createdAt: z.ZodISODateTime;
|
|
189
|
+
updatedAt: z.ZodISODateTime;
|
|
190
|
+
}, z.core.$strip>;
|
|
182
191
|
export declare const zPagination: z.ZodObject<{
|
|
183
192
|
page: z.ZodInt;
|
|
184
193
|
limit: z.ZodInt;
|
|
@@ -320,6 +329,7 @@ export declare const zCreateEnvironment: z.ZodObject<{
|
|
|
320
329
|
name: z.ZodString;
|
|
321
330
|
handle: z.ZodString;
|
|
322
331
|
description: z.ZodOptional<z.ZodString>;
|
|
332
|
+
keepVersions: z.ZodOptional<z.ZodBoolean>;
|
|
323
333
|
}, z.core.$strip>;
|
|
324
334
|
export declare const zCloneEnvironment: z.ZodObject<{
|
|
325
335
|
name: z.ZodString;
|
|
@@ -331,6 +341,7 @@ export declare const zCloneEnvironment: z.ZodObject<{
|
|
|
331
341
|
isExported: z.ZodBoolean;
|
|
332
342
|
}, z.core.$strip>>;
|
|
333
343
|
cloneDbSettings: z.ZodOptional<z.ZodBoolean>;
|
|
344
|
+
keepVersions: z.ZodOptional<z.ZodBoolean>;
|
|
334
345
|
}, z.core.$strip>;
|
|
335
346
|
export declare const zOnboardingAnalytics: z.ZodObject<{
|
|
336
347
|
occupation: z.ZodOptional<z.ZodString>;
|
|
@@ -341,6 +352,20 @@ export declare const zOnboardingAnalytics: z.ZodObject<{
|
|
|
341
352
|
export declare const zCreateFeatureRequest: z.ZodObject<{
|
|
342
353
|
feature: z.ZodString;
|
|
343
354
|
}, z.core.$strip>;
|
|
355
|
+
export declare const zSpaceOverview: z.ZodObject<{
|
|
356
|
+
id: z.ZodString;
|
|
357
|
+
name: z.ZodString;
|
|
358
|
+
handle: z.ZodString;
|
|
359
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
360
|
+
id: z.ZodUUID;
|
|
361
|
+
orgCode: z.ZodString;
|
|
362
|
+
name: z.ZodString;
|
|
363
|
+
handle: z.ZodString;
|
|
364
|
+
description: z.ZodString;
|
|
365
|
+
createdAt: z.ZodISODateTime;
|
|
366
|
+
updatedAt: z.ZodISODateTime;
|
|
367
|
+
}, z.core.$strip>>;
|
|
368
|
+
}, z.core.$strip>;
|
|
344
369
|
export declare const zSpaceOrgCodeResponse: z.ZodObject<{
|
|
345
370
|
orgCode: z.ZodString;
|
|
346
371
|
handle: z.ZodString;
|
|
@@ -358,15 +383,13 @@ export declare const zEnvironmentOverview: z.ZodObject<{
|
|
|
358
383
|
updatedAt: z.ZodISODateTime;
|
|
359
384
|
versions: z.ZodInt;
|
|
360
385
|
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
386
|
+
softDelete: z.ZodOptional<z.ZodBoolean>;
|
|
361
387
|
}, z.core.$strip>;
|
|
362
|
-
export declare const
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
description: z.ZodString;
|
|
368
|
-
createdAt: z.ZodISODateTime;
|
|
369
|
-
updatedAt: z.ZodISODateTime;
|
|
388
|
+
export declare const zPaginatedEnvironments: z.ZodIntersection<z.ZodObject<{
|
|
389
|
+
page: z.ZodInt;
|
|
390
|
+
limit: z.ZodInt;
|
|
391
|
+
total: z.ZodInt;
|
|
392
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
370
393
|
environments: z.ZodArray<z.ZodObject<{
|
|
371
394
|
id: z.ZodUUID;
|
|
372
395
|
name: z.ZodString;
|
|
@@ -376,32 +399,9 @@ export declare const zProjectOverview: z.ZodObject<{
|
|
|
376
399
|
updatedAt: z.ZodISODateTime;
|
|
377
400
|
versions: z.ZodInt;
|
|
378
401
|
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
402
|
+
softDelete: z.ZodOptional<z.ZodBoolean>;
|
|
379
403
|
}, z.core.$strip>>;
|
|
380
|
-
}, z.core.$strip
|
|
381
|
-
export declare const zSpaceOverview: z.ZodObject<{
|
|
382
|
-
id: z.ZodString;
|
|
383
|
-
name: z.ZodString;
|
|
384
|
-
handle: z.ZodString;
|
|
385
|
-
projects: z.ZodArray<z.ZodObject<{
|
|
386
|
-
id: z.ZodUUID;
|
|
387
|
-
orgCode: z.ZodString;
|
|
388
|
-
name: z.ZodString;
|
|
389
|
-
handle: z.ZodString;
|
|
390
|
-
description: z.ZodString;
|
|
391
|
-
createdAt: z.ZodISODateTime;
|
|
392
|
-
updatedAt: z.ZodISODateTime;
|
|
393
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
394
|
-
id: z.ZodUUID;
|
|
395
|
-
name: z.ZodString;
|
|
396
|
-
handle: z.ZodString;
|
|
397
|
-
description: z.ZodString;
|
|
398
|
-
createdAt: z.ZodISODateTime;
|
|
399
|
-
updatedAt: z.ZodISODateTime;
|
|
400
|
-
versions: z.ZodInt;
|
|
401
|
-
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
402
|
-
}, z.core.$strip>>;
|
|
403
|
-
}, z.core.$strip>>;
|
|
404
|
-
}, z.core.$strip>;
|
|
404
|
+
}, z.core.$strip>>;
|
|
405
405
|
export declare const zAccountIdentity: z.ZodObject<{
|
|
406
406
|
id: z.ZodString;
|
|
407
407
|
type: z.ZodString;
|
|
@@ -605,16 +605,6 @@ export declare const zUserSpacesResponse: z.ZodObject<{
|
|
|
605
605
|
description: z.ZodString;
|
|
606
606
|
createdAt: z.ZodISODateTime;
|
|
607
607
|
updatedAt: z.ZodISODateTime;
|
|
608
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
609
|
-
id: z.ZodUUID;
|
|
610
|
-
name: z.ZodString;
|
|
611
|
-
handle: z.ZodString;
|
|
612
|
-
description: z.ZodString;
|
|
613
|
-
createdAt: z.ZodISODateTime;
|
|
614
|
-
updatedAt: z.ZodISODateTime;
|
|
615
|
-
versions: z.ZodInt;
|
|
616
|
-
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
617
|
-
}, z.core.$strip>>;
|
|
618
608
|
}, z.core.$strip>>;
|
|
619
609
|
}, z.core.$strip>>;
|
|
620
610
|
next_page: z.ZodOptional<z.ZodInt>;
|
|
@@ -4438,16 +4428,6 @@ export declare const zListUserSpacesResponse: z.ZodObject<{
|
|
|
4438
4428
|
description: z.ZodString;
|
|
4439
4429
|
createdAt: z.ZodISODateTime;
|
|
4440
4430
|
updatedAt: z.ZodISODateTime;
|
|
4441
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
4442
|
-
id: z.ZodUUID;
|
|
4443
|
-
name: z.ZodString;
|
|
4444
|
-
handle: z.ZodString;
|
|
4445
|
-
description: z.ZodString;
|
|
4446
|
-
createdAt: z.ZodISODateTime;
|
|
4447
|
-
updatedAt: z.ZodISODateTime;
|
|
4448
|
-
versions: z.ZodInt;
|
|
4449
|
-
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
4450
|
-
}, z.core.$strip>>;
|
|
4451
4431
|
}, z.core.$strip>>;
|
|
4452
4432
|
}, z.core.$strip>>;
|
|
4453
4433
|
next_page: z.ZodOptional<z.ZodInt>;
|
|
@@ -4824,16 +4804,6 @@ export declare const zCreateSpaceResponse: z.ZodObject<{
|
|
|
4824
4804
|
description: z.ZodString;
|
|
4825
4805
|
createdAt: z.ZodISODateTime;
|
|
4826
4806
|
updatedAt: z.ZodISODateTime;
|
|
4827
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
4828
|
-
id: z.ZodUUID;
|
|
4829
|
-
name: z.ZodString;
|
|
4830
|
-
handle: z.ZodString;
|
|
4831
|
-
description: z.ZodString;
|
|
4832
|
-
createdAt: z.ZodISODateTime;
|
|
4833
|
-
updatedAt: z.ZodISODateTime;
|
|
4834
|
-
versions: z.ZodInt;
|
|
4835
|
-
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
4836
|
-
}, z.core.$strip>>;
|
|
4837
4807
|
}, z.core.$strip>>;
|
|
4838
4808
|
}, z.core.$strip>;
|
|
4839
4809
|
export declare const zGetPublicInviteData: z.ZodObject<{
|
|
@@ -4921,16 +4891,6 @@ export declare const zGetSpaceOverviewResponse: z.ZodObject<{
|
|
|
4921
4891
|
description: z.ZodString;
|
|
4922
4892
|
createdAt: z.ZodISODateTime;
|
|
4923
4893
|
updatedAt: z.ZodISODateTime;
|
|
4924
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
4925
|
-
id: z.ZodUUID;
|
|
4926
|
-
name: z.ZodString;
|
|
4927
|
-
handle: z.ZodString;
|
|
4928
|
-
description: z.ZodString;
|
|
4929
|
-
createdAt: z.ZodISODateTime;
|
|
4930
|
-
updatedAt: z.ZodISODateTime;
|
|
4931
|
-
versions: z.ZodInt;
|
|
4932
|
-
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
4933
|
-
}, z.core.$strip>>;
|
|
4934
4894
|
}, z.core.$strip>>;
|
|
4935
4895
|
}, z.core.$strip>;
|
|
4936
4896
|
export declare const zGetSpaceOrgCodeData: z.ZodObject<{
|
|
@@ -5170,16 +5130,6 @@ export declare const zCreateProjectResponse: z.ZodObject<{
|
|
|
5170
5130
|
description: z.ZodString;
|
|
5171
5131
|
createdAt: z.ZodISODateTime;
|
|
5172
5132
|
updatedAt: z.ZodISODateTime;
|
|
5173
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
5174
|
-
id: z.ZodUUID;
|
|
5175
|
-
name: z.ZodString;
|
|
5176
|
-
handle: z.ZodString;
|
|
5177
|
-
description: z.ZodString;
|
|
5178
|
-
createdAt: z.ZodISODateTime;
|
|
5179
|
-
updatedAt: z.ZodISODateTime;
|
|
5180
|
-
versions: z.ZodInt;
|
|
5181
|
-
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
5182
|
-
}, z.core.$strip>>;
|
|
5183
5133
|
}, z.core.$strip>;
|
|
5184
5134
|
export declare const zGetProjectOverviewData: z.ZodObject<{
|
|
5185
5135
|
body: z.ZodOptional<z.ZodNever>;
|
|
@@ -5200,6 +5150,26 @@ export declare const zGetProjectOverviewResponse: z.ZodObject<{
|
|
|
5200
5150
|
description: z.ZodString;
|
|
5201
5151
|
createdAt: z.ZodISODateTime;
|
|
5202
5152
|
updatedAt: z.ZodISODateTime;
|
|
5153
|
+
}, z.core.$strip>;
|
|
5154
|
+
export declare const zGetProjectEnvironmentsData: z.ZodObject<{
|
|
5155
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
5156
|
+
path: z.ZodObject<{
|
|
5157
|
+
spaceHandle: z.ZodString;
|
|
5158
|
+
projectHandle: z.ZodString;
|
|
5159
|
+
}, z.core.$strip>;
|
|
5160
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
5161
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
5162
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
5163
|
+
}, z.core.$strip>>;
|
|
5164
|
+
}, z.core.$strip>;
|
|
5165
|
+
/**
|
|
5166
|
+
* Project environments.
|
|
5167
|
+
*/
|
|
5168
|
+
export declare const zGetProjectEnvironmentsResponse: z.ZodIntersection<z.ZodObject<{
|
|
5169
|
+
page: z.ZodInt;
|
|
5170
|
+
limit: z.ZodInt;
|
|
5171
|
+
total: z.ZodInt;
|
|
5172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5203
5173
|
environments: z.ZodArray<z.ZodObject<{
|
|
5204
5174
|
id: z.ZodUUID;
|
|
5205
5175
|
name: z.ZodString;
|
|
@@ -5209,13 +5179,15 @@ export declare const zGetProjectOverviewResponse: z.ZodObject<{
|
|
|
5209
5179
|
updatedAt: z.ZodISODateTime;
|
|
5210
5180
|
versions: z.ZodInt;
|
|
5211
5181
|
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
5182
|
+
softDelete: z.ZodOptional<z.ZodBoolean>;
|
|
5212
5183
|
}, z.core.$strip>>;
|
|
5213
|
-
}, z.core.$strip
|
|
5184
|
+
}, z.core.$strip>>;
|
|
5214
5185
|
export declare const zCreateEnvironmentData: z.ZodObject<{
|
|
5215
5186
|
body: z.ZodObject<{
|
|
5216
5187
|
name: z.ZodString;
|
|
5217
5188
|
handle: z.ZodString;
|
|
5218
5189
|
description: z.ZodOptional<z.ZodString>;
|
|
5190
|
+
keepVersions: z.ZodOptional<z.ZodBoolean>;
|
|
5219
5191
|
}, z.core.$strip>;
|
|
5220
5192
|
path: z.ZodObject<{
|
|
5221
5193
|
spaceHandle: z.ZodString;
|
|
@@ -5235,6 +5207,7 @@ export declare const zCreateEnvironmentResponse: z.ZodObject<{
|
|
|
5235
5207
|
updatedAt: z.ZodISODateTime;
|
|
5236
5208
|
versions: z.ZodInt;
|
|
5237
5209
|
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
5210
|
+
softDelete: z.ZodOptional<z.ZodBoolean>;
|
|
5238
5211
|
}, z.core.$strip>;
|
|
5239
5212
|
export declare const zCreateSecretData: z.ZodObject<{
|
|
5240
5213
|
body: z.ZodObject<{
|
|
@@ -5308,6 +5281,7 @@ export declare const zGetEnvironmentOverviewResponse: z.ZodObject<{
|
|
|
5308
5281
|
updatedAt: z.ZodISODateTime;
|
|
5309
5282
|
versions: z.ZodInt;
|
|
5310
5283
|
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
5284
|
+
softDelete: z.ZodOptional<z.ZodBoolean>;
|
|
5311
5285
|
}, z.core.$strip>;
|
|
5312
5286
|
export declare const zGetEnvironmentVersionsData: z.ZodObject<{
|
|
5313
5287
|
body: z.ZodOptional<z.ZodNever>;
|
|
@@ -5581,6 +5555,7 @@ export declare const zCloneEnvironmentData: z.ZodObject<{
|
|
|
5581
5555
|
isExported: z.ZodBoolean;
|
|
5582
5556
|
}, z.core.$strip>>;
|
|
5583
5557
|
cloneDbSettings: z.ZodOptional<z.ZodBoolean>;
|
|
5558
|
+
keepVersions: z.ZodOptional<z.ZodBoolean>;
|
|
5584
5559
|
}, z.core.$strip>;
|
|
5585
5560
|
path: z.ZodObject<{
|
|
5586
5561
|
spaceHandle: z.ZodString;
|
|
@@ -5602,6 +5577,7 @@ export declare const zCloneEnvironmentResponse: z.ZodObject<{
|
|
|
5602
5577
|
updatedAt: z.ZodISODateTime;
|
|
5603
5578
|
versions: z.ZodInt;
|
|
5604
5579
|
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
5580
|
+
softDelete: z.ZodOptional<z.ZodBoolean>;
|
|
5605
5581
|
}, z.core.$strip>;
|
|
5606
5582
|
export declare const zGetGraphOverviewData: z.ZodObject<{
|
|
5607
5583
|
body: z.ZodOptional<z.ZodNever>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -155,6 +155,15 @@ export const zCreateProject = z.object({
|
|
|
155
155
|
handle: z.string(),
|
|
156
156
|
description: z.optional(z.string())
|
|
157
157
|
});
|
|
158
|
+
export const zProjectOverview = z.object({
|
|
159
|
+
id: z.uuid(),
|
|
160
|
+
orgCode: z.string(),
|
|
161
|
+
name: z.string(),
|
|
162
|
+
handle: z.string(),
|
|
163
|
+
description: z.string(),
|
|
164
|
+
createdAt: z.iso.datetime(),
|
|
165
|
+
updatedAt: z.iso.datetime()
|
|
166
|
+
});
|
|
158
167
|
export const zPagination = z.object({
|
|
159
168
|
page: z.int(),
|
|
160
169
|
limit: z.int(),
|
|
@@ -233,14 +242,16 @@ export const zCreateSpace = z.object({
|
|
|
233
242
|
export const zCreateEnvironment = z.object({
|
|
234
243
|
name: zPlainString,
|
|
235
244
|
handle: z.string(),
|
|
236
|
-
description: z.optional(z.string())
|
|
245
|
+
description: z.optional(z.string()),
|
|
246
|
+
keepVersions: z.optional(z.boolean())
|
|
237
247
|
});
|
|
238
248
|
export const zCloneEnvironment = z.object({
|
|
239
249
|
name: zPlainString,
|
|
240
250
|
handle: z.string(),
|
|
241
251
|
description: z.optional(z.string()),
|
|
242
252
|
variables: z.array(zEnvironmentVariable),
|
|
243
|
-
cloneDbSettings: z.optional(z.boolean())
|
|
253
|
+
cloneDbSettings: z.optional(z.boolean()),
|
|
254
|
+
keepVersions: z.optional(z.boolean())
|
|
244
255
|
});
|
|
245
256
|
export const zOnboardingAnalytics = z.object({
|
|
246
257
|
occupation: z.optional(z.string()),
|
|
@@ -251,6 +262,12 @@ export const zOnboardingAnalytics = z.object({
|
|
|
251
262
|
export const zCreateFeatureRequest = z.object({
|
|
252
263
|
feature: z.string()
|
|
253
264
|
});
|
|
265
|
+
export const zSpaceOverview = z.object({
|
|
266
|
+
id: z.string(),
|
|
267
|
+
name: z.string(),
|
|
268
|
+
handle: z.string(),
|
|
269
|
+
projects: z.array(zProjectOverview)
|
|
270
|
+
});
|
|
254
271
|
export const zSpaceOrgCodeResponse = z.object({
|
|
255
272
|
orgCode: z.string(),
|
|
256
273
|
handle: z.string()
|
|
@@ -267,24 +284,12 @@ export const zEnvironmentOverview = z.object({
|
|
|
267
284
|
createdAt: z.iso.datetime(),
|
|
268
285
|
updatedAt: z.iso.datetime(),
|
|
269
286
|
versions: z.int(),
|
|
270
|
-
blueprintId: z.optional(z.uuid())
|
|
287
|
+
blueprintId: z.optional(z.uuid()),
|
|
288
|
+
softDelete: z.optional(z.boolean())
|
|
271
289
|
});
|
|
272
|
-
export const
|
|
273
|
-
id: z.uuid(),
|
|
274
|
-
orgCode: z.string(),
|
|
275
|
-
name: z.string(),
|
|
276
|
-
handle: z.string(),
|
|
277
|
-
description: z.string(),
|
|
278
|
-
createdAt: z.iso.datetime(),
|
|
279
|
-
updatedAt: z.iso.datetime(),
|
|
290
|
+
export const zPaginatedEnvironments = zPagination.and(z.object({
|
|
280
291
|
environments: z.array(zEnvironmentOverview)
|
|
281
|
-
});
|
|
282
|
-
export const zSpaceOverview = z.object({
|
|
283
|
-
id: z.string(),
|
|
284
|
-
name: z.string(),
|
|
285
|
-
handle: z.string(),
|
|
286
|
-
projects: z.array(zProjectOverview)
|
|
287
|
-
});
|
|
292
|
+
}));
|
|
288
293
|
export const zAccountIdentity = z.object({
|
|
289
294
|
id: z.string(),
|
|
290
295
|
type: z.string(),
|
|
@@ -1950,6 +1955,21 @@ export const zGetProjectOverviewData = z.object({
|
|
|
1950
1955
|
* Project overview.
|
|
1951
1956
|
*/
|
|
1952
1957
|
export const zGetProjectOverviewResponse = zProjectOverview;
|
|
1958
|
+
export const zGetProjectEnvironmentsData = z.object({
|
|
1959
|
+
body: z.optional(z.never()),
|
|
1960
|
+
path: z.object({
|
|
1961
|
+
spaceHandle: z.string(),
|
|
1962
|
+
projectHandle: z.string()
|
|
1963
|
+
}),
|
|
1964
|
+
query: z.optional(z.object({
|
|
1965
|
+
page: z.optional(z.int().gte(1)).default(1),
|
|
1966
|
+
limit: z.optional(z.int().gte(1).lte(100)).default(10)
|
|
1967
|
+
}))
|
|
1968
|
+
});
|
|
1969
|
+
/**
|
|
1970
|
+
* Project environments.
|
|
1971
|
+
*/
|
|
1972
|
+
export const zGetProjectEnvironmentsResponse = zPaginatedEnvironments;
|
|
1953
1973
|
export const zCreateEnvironmentData = z.object({
|
|
1954
1974
|
body: zCreateEnvironment,
|
|
1955
1975
|
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, FetchMongoOrganizationsData, FetchMongoRegionsData, ListMongoProjectsData, ListMongoClustersData, FetchMongoOrganizationTierData, FetchNeonConnectionUriData, ListNeonProjectsData, CreateNeonProjectData, CreateNeonProjectResponses, ListNeonBranchesData, CreateNeonBranchData, CreateNeonBranchResponses, ListNeonDatabasesData, CreateNeonDatabaseData, CreateNeonDatabaseResponses, ListNeonRolesData, DeleteNeonDatabaseData, DeleteNeonDatabaseResponses, ListUserSpacesData, GetFeatureFlagsData, LookupApiKeyData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, PreviewBlueprintData, ViewBlueprintsData, GetBlueprintData, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, GetApiKeysData, CreateApiKeyData, CreateApiKeyResponses, RevokeApiKeyData, RevokeApiKeyResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, CreateSecretData, CreateSecretResponses, GetSecretValueData, DeleteEnvironmentData, DeleteEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, CloneEnvironmentData, CloneEnvironmentResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, GetNodeEnvironmentVariablesData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, PingNodeData, 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, ListMongoProjectsData, ListMongoClustersData, FetchMongoOrganizationTierData, FetchNeonConnectionUriData, ListNeonProjectsData, CreateNeonProjectData, CreateNeonProjectResponses, ListNeonBranchesData, CreateNeonBranchData, CreateNeonBranchResponses, ListNeonDatabasesData, CreateNeonDatabaseData, CreateNeonDatabaseResponses, ListNeonRolesData, DeleteNeonDatabaseData, DeleteNeonDatabaseResponses, ListUserSpacesData, GetFeatureFlagsData, LookupApiKeyData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, PreviewBlueprintData, ViewBlueprintsData, GetBlueprintData, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, GetApiKeysData, CreateApiKeyData, CreateApiKeyResponses, RevokeApiKeyData, RevokeApiKeyResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, GetProjectEnvironmentsData, CreateEnvironmentData, CreateEnvironmentResponses, CreateSecretData, CreateSecretResponses, GetSecretValueData, DeleteEnvironmentData, DeleteEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, CloneEnvironmentData, CloneEnvironmentResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, GetNodeEnvironmentVariablesData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, PingNodeData, 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>;
|
|
@@ -321,6 +321,9 @@ export declare const useCreateProject: (config?: {
|
|
|
321
321
|
export declare const useGetProjectOverview: (options: Omit<GetProjectOverviewData, "url"> & {
|
|
322
322
|
enabled?: boolean;
|
|
323
323
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").ProjectOverview | undefined, Error>;
|
|
324
|
+
export declare const useGetProjectEnvironments: (options: Omit<GetProjectEnvironmentsData, "url"> & {
|
|
325
|
+
enabled?: boolean;
|
|
326
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").PaginatedEnvironments | undefined, Error>;
|
|
324
327
|
export declare const useCreateEnvironment: (config?: {
|
|
325
328
|
onSuccess?: (data: GetSuccessResponse<CreateEnvironmentResponses>, headers: Headers) => void;
|
|
326
329
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -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, fetchMongoOrganizations, fetchMongoRegions, listMongoProjects, listMongoClusters, fetchMongoOrganizationTier, fetchNeonConnectionUri, listNeonProjects, createNeonProject, listNeonBranches, createNeonBranch, listNeonDatabases, createNeonDatabase, listNeonRoles, deleteNeonDatabase, listUserSpaces, getFeatureFlags, lookupApiKey, createFeatureRequest, recordOnboardingAnalytics, previewBlueprint, viewBlueprints, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, getApiKeys, createApiKey, revokeApiKey, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, createSecret, getSecretValue, deleteEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, cloneEnvironment, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, getNodeEnvironmentVariables, requestSignedUploadUrl, checkSubdomainUniqueness, pingNode, 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, listMongoProjects, listMongoClusters, fetchMongoOrganizationTier, fetchNeonConnectionUri, listNeonProjects, createNeonProject, listNeonBranches, createNeonBranch, listNeonDatabases, createNeonDatabase, listNeonRoles, deleteNeonDatabase, listUserSpaces, getFeatureFlags, lookupApiKey, createFeatureRequest, recordOnboardingAnalytics, previewBlueprint, viewBlueprints, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, getApiKeys, createApiKey, revokeApiKey, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, getProjectEnvironments, createEnvironment, createSecret, getSecretValue, deleteEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, cloneEnvironment, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, getNodeEnvironmentVariables, requestSignedUploadUrl, checkSubdomainUniqueness, pingNode, 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 };
|
|
@@ -1300,6 +1300,27 @@ export const useGetProjectOverview = (options) => {
|
|
|
1300
1300
|
staleTime: 600000
|
|
1301
1301
|
});
|
|
1302
1302
|
};
|
|
1303
|
+
export const useGetProjectEnvironments = (options) => {
|
|
1304
|
+
const token = useToken();
|
|
1305
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
1306
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/environments/view" };
|
|
1307
|
+
const funcer = async () => {
|
|
1308
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
1309
|
+
if (isPromise(token) && !token)
|
|
1310
|
+
return;
|
|
1311
|
+
const res = await getProjectEnvironments({ ...opts, ...rest, auth });
|
|
1312
|
+
return res.data;
|
|
1313
|
+
};
|
|
1314
|
+
if (!token)
|
|
1315
|
+
enabled = false;
|
|
1316
|
+
return useQuery({
|
|
1317
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, "environments", "view", options.query ?? {}],
|
|
1318
|
+
queryFn: funcer,
|
|
1319
|
+
enabled,
|
|
1320
|
+
retry: false,
|
|
1321
|
+
staleTime: 600000
|
|
1322
|
+
});
|
|
1323
|
+
};
|
|
1303
1324
|
export const useCreateEnvironment = (config) => {
|
|
1304
1325
|
const token = useToken();
|
|
1305
1326
|
const queryClient = useQueryClient();
|