shoal-web-sdk 1.0.68 → 1.0.70

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.
@@ -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, optionally filtered by status, 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, optionally filtered by status, 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, optionally filtered by status, 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, optionally filtered by status, 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
  */
@@ -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, optionally filtered by status, 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
  */
@@ -1353,6 +1353,25 @@ export const getProjectOverview = (options) => {
1353
1353
  ...options
1354
1354
  });
1355
1355
  };
1356
+ /**
1357
+ * Get paginated environments for a project, optionally filtered by status, 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
  */
@@ -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 either way.
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,14 @@ 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;
343
+ /**
344
+ * When this environment is due to be purged. Only present while softDelete is true.
345
+ */
346
+ scheduleDeleteAt?: string;
329
347
  };
330
348
  export type AccountIdentity = {
331
349
  id: string;
@@ -900,6 +918,10 @@ export type PlanPriceResponse = {
900
918
  */
901
919
  interval: string;
902
920
  };
921
+ /**
922
+ * The lifecycle state of an environment. `active` covers environments that are not soft deleted, `inactive` covers soft deleted environments pending purge, and `all` covers both.
923
+ */
924
+ export type EnvironmentStatus = 'active' | 'inactive' | 'all';
903
925
  export type DeploymentStatus = 'pending' | 'prebuilding' | 'building' | 'deploying' | 'configuring' | 'succeeded' | 'failed';
904
926
  export type DeploymentStatusInformation = {
905
927
  status?: DeploymentStatus;
@@ -1137,6 +1159,10 @@ export type Search = string;
1137
1159
  * The order results will appear in.
1138
1160
  */
1139
1161
  export type Order = 'asc' | 'desc';
1162
+ /**
1163
+ * Filter environments by lifecycle state.
1164
+ */
1165
+ export type EnvironmentStatusQuery = EnvironmentStatus;
1140
1166
  /**
1141
1167
  * Page number (1-based).
1142
1168
  */
@@ -3956,6 +3982,60 @@ export type GetProjectOverviewResponses = {
3956
3982
  200: ProjectOverview;
3957
3983
  };
3958
3984
  export type GetProjectOverviewResponse = GetProjectOverviewResponses[keyof GetProjectOverviewResponses];
3985
+ export type GetProjectEnvironmentsData = {
3986
+ body?: never;
3987
+ path: {
3988
+ /**
3989
+ * The space handle. This must be globally unique.
3990
+ */
3991
+ spaceHandle: string;
3992
+ /**
3993
+ * A project name. This must be unique to a space.
3994
+ */
3995
+ projectHandle: string;
3996
+ };
3997
+ query?: {
3998
+ /**
3999
+ * Filter environments by lifecycle state.
4000
+ */
4001
+ status?: EnvironmentStatus;
4002
+ /**
4003
+ * Page number (1-based).
4004
+ */
4005
+ page?: number;
4006
+ /**
4007
+ * Page size (max 100).
4008
+ */
4009
+ limit?: number;
4010
+ };
4011
+ url: '/auth/{spaceHandle}/{projectHandle}/environments/view';
4012
+ };
4013
+ export type GetProjectEnvironmentsErrors = {
4014
+ /**
4015
+ * Unauthorised user.
4016
+ */
4017
+ 401: ErrorResponse;
4018
+ /**
4019
+ * Invalid credentials.
4020
+ */
4021
+ 403: ErrorResponse;
4022
+ /**
4023
+ * Project not found.
4024
+ */
4025
+ 404: ErrorResponse;
4026
+ /**
4027
+ * Unexpected error.
4028
+ */
4029
+ 500: ErrorResponse;
4030
+ };
4031
+ export type GetProjectEnvironmentsError = GetProjectEnvironmentsErrors[keyof GetProjectEnvironmentsErrors];
4032
+ export type GetProjectEnvironmentsResponses = {
4033
+ /**
4034
+ * Project environments.
4035
+ */
4036
+ 200: PaginatedEnvironments;
4037
+ };
4038
+ export type GetProjectEnvironmentsResponse = GetProjectEnvironmentsResponses[keyof GetProjectEnvironmentsResponses];
3959
4039
  export type CreateEnvironmentData = {
3960
4040
  body: CreateEnvironment;
3961
4041
  path: {
@@ -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,14 @@ 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>;
387
+ scheduleDeleteAt: z.ZodOptional<z.ZodISODateTime>;
361
388
  }, z.core.$strip>;
362
- export declare const zProjectOverview: z.ZodObject<{
363
- id: z.ZodUUID;
364
- orgCode: z.ZodString;
365
- name: z.ZodString;
366
- handle: z.ZodString;
367
- description: z.ZodString;
368
- createdAt: z.ZodISODateTime;
369
- updatedAt: z.ZodISODateTime;
389
+ export declare const zPaginatedEnvironments: z.ZodIntersection<z.ZodObject<{
390
+ page: z.ZodInt;
391
+ limit: z.ZodInt;
392
+ total: z.ZodInt;
393
+ }, z.core.$strip>, z.ZodObject<{
370
394
  environments: z.ZodArray<z.ZodObject<{
371
395
  id: z.ZodUUID;
372
396
  name: z.ZodString;
@@ -376,32 +400,10 @@ export declare const zProjectOverview: z.ZodObject<{
376
400
  updatedAt: z.ZodISODateTime;
377
401
  versions: z.ZodInt;
378
402
  blueprintId: z.ZodOptional<z.ZodUUID>;
403
+ softDelete: z.ZodOptional<z.ZodBoolean>;
404
+ scheduleDeleteAt: z.ZodOptional<z.ZodISODateTime>;
379
405
  }, 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>;
406
+ }, z.core.$strip>>;
405
407
  export declare const zAccountIdentity: z.ZodObject<{
406
408
  id: z.ZodString;
407
409
  type: z.ZodString;
@@ -605,16 +607,6 @@ export declare const zUserSpacesResponse: z.ZodObject<{
605
607
  description: z.ZodString;
606
608
  createdAt: z.ZodISODateTime;
607
609
  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
610
  }, z.core.$strip>>;
619
611
  }, z.core.$strip>>;
620
612
  next_page: z.ZodOptional<z.ZodInt>;
@@ -2035,6 +2027,14 @@ export declare const zPlanPriceResponse: z.ZodObject<{
2035
2027
  currency: z.ZodString;
2036
2028
  interval: z.ZodString;
2037
2029
  }, z.core.$strip>;
2030
+ /**
2031
+ * The lifecycle state of an environment. `active` covers environments that are not soft deleted, `inactive` covers soft deleted environments pending purge, and `all` covers both.
2032
+ */
2033
+ export declare const zEnvironmentStatus: z.ZodEnum<{
2034
+ active: "active";
2035
+ inactive: "inactive";
2036
+ all: "all";
2037
+ }>;
2038
2038
  export declare const zDeploymentStatus: z.ZodEnum<{
2039
2039
  pending: "pending";
2040
2040
  prebuilding: "prebuilding";
@@ -2410,6 +2410,14 @@ export declare const zOrder: z.ZodEnum<{
2410
2410
  asc: "asc";
2411
2411
  desc: "desc";
2412
2412
  }>;
2413
+ /**
2414
+ * Filter environments by lifecycle state.
2415
+ */
2416
+ export declare const zEnvironmentStatusQuery: z.ZodEnum<{
2417
+ active: "active";
2418
+ inactive: "inactive";
2419
+ all: "all";
2420
+ }>;
2413
2421
  /**
2414
2422
  * Page number (1-based).
2415
2423
  */
@@ -4438,16 +4446,6 @@ export declare const zListUserSpacesResponse: z.ZodObject<{
4438
4446
  description: z.ZodString;
4439
4447
  createdAt: z.ZodISODateTime;
4440
4448
  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
4449
  }, z.core.$strip>>;
4452
4450
  }, z.core.$strip>>;
4453
4451
  next_page: z.ZodOptional<z.ZodInt>;
@@ -4824,16 +4822,6 @@ export declare const zCreateSpaceResponse: z.ZodObject<{
4824
4822
  description: z.ZodString;
4825
4823
  createdAt: z.ZodISODateTime;
4826
4824
  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
4825
  }, z.core.$strip>>;
4838
4826
  }, z.core.$strip>;
4839
4827
  export declare const zGetPublicInviteData: z.ZodObject<{
@@ -4921,16 +4909,6 @@ export declare const zGetSpaceOverviewResponse: z.ZodObject<{
4921
4909
  description: z.ZodString;
4922
4910
  createdAt: z.ZodISODateTime;
4923
4911
  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
4912
  }, z.core.$strip>>;
4935
4913
  }, z.core.$strip>;
4936
4914
  export declare const zGetSpaceOrgCodeData: z.ZodObject<{
@@ -5170,16 +5148,6 @@ export declare const zCreateProjectResponse: z.ZodObject<{
5170
5148
  description: z.ZodString;
5171
5149
  createdAt: z.ZodISODateTime;
5172
5150
  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
5151
  }, z.core.$strip>;
5184
5152
  export declare const zGetProjectOverviewData: z.ZodObject<{
5185
5153
  body: z.ZodOptional<z.ZodNever>;
@@ -5200,6 +5168,31 @@ export declare const zGetProjectOverviewResponse: z.ZodObject<{
5200
5168
  description: z.ZodString;
5201
5169
  createdAt: z.ZodISODateTime;
5202
5170
  updatedAt: z.ZodISODateTime;
5171
+ }, z.core.$strip>;
5172
+ export declare const zGetProjectEnvironmentsData: z.ZodObject<{
5173
+ body: z.ZodOptional<z.ZodNever>;
5174
+ path: z.ZodObject<{
5175
+ spaceHandle: z.ZodString;
5176
+ projectHandle: z.ZodString;
5177
+ }, z.core.$strip>;
5178
+ query: z.ZodOptional<z.ZodObject<{
5179
+ status: z.ZodOptional<z.ZodEnum<{
5180
+ active: "active";
5181
+ inactive: "inactive";
5182
+ all: "all";
5183
+ }>>;
5184
+ page: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
5185
+ limit: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
5186
+ }, z.core.$strip>>;
5187
+ }, z.core.$strip>;
5188
+ /**
5189
+ * Project environments.
5190
+ */
5191
+ export declare const zGetProjectEnvironmentsResponse: z.ZodIntersection<z.ZodObject<{
5192
+ page: z.ZodInt;
5193
+ limit: z.ZodInt;
5194
+ total: z.ZodInt;
5195
+ }, z.core.$strip>, z.ZodObject<{
5203
5196
  environments: z.ZodArray<z.ZodObject<{
5204
5197
  id: z.ZodUUID;
5205
5198
  name: z.ZodString;
@@ -5209,13 +5202,16 @@ export declare const zGetProjectOverviewResponse: z.ZodObject<{
5209
5202
  updatedAt: z.ZodISODateTime;
5210
5203
  versions: z.ZodInt;
5211
5204
  blueprintId: z.ZodOptional<z.ZodUUID>;
5205
+ softDelete: z.ZodOptional<z.ZodBoolean>;
5206
+ scheduleDeleteAt: z.ZodOptional<z.ZodISODateTime>;
5212
5207
  }, z.core.$strip>>;
5213
- }, z.core.$strip>;
5208
+ }, z.core.$strip>>;
5214
5209
  export declare const zCreateEnvironmentData: z.ZodObject<{
5215
5210
  body: z.ZodObject<{
5216
5211
  name: z.ZodString;
5217
5212
  handle: z.ZodString;
5218
5213
  description: z.ZodOptional<z.ZodString>;
5214
+ keepVersions: z.ZodOptional<z.ZodBoolean>;
5219
5215
  }, z.core.$strip>;
5220
5216
  path: z.ZodObject<{
5221
5217
  spaceHandle: z.ZodString;
@@ -5235,6 +5231,8 @@ export declare const zCreateEnvironmentResponse: z.ZodObject<{
5235
5231
  updatedAt: z.ZodISODateTime;
5236
5232
  versions: z.ZodInt;
5237
5233
  blueprintId: z.ZodOptional<z.ZodUUID>;
5234
+ softDelete: z.ZodOptional<z.ZodBoolean>;
5235
+ scheduleDeleteAt: z.ZodOptional<z.ZodISODateTime>;
5238
5236
  }, z.core.$strip>;
5239
5237
  export declare const zCreateSecretData: z.ZodObject<{
5240
5238
  body: z.ZodObject<{
@@ -5308,6 +5306,8 @@ export declare const zGetEnvironmentOverviewResponse: z.ZodObject<{
5308
5306
  updatedAt: z.ZodISODateTime;
5309
5307
  versions: z.ZodInt;
5310
5308
  blueprintId: z.ZodOptional<z.ZodUUID>;
5309
+ softDelete: z.ZodOptional<z.ZodBoolean>;
5310
+ scheduleDeleteAt: z.ZodOptional<z.ZodISODateTime>;
5311
5311
  }, z.core.$strip>;
5312
5312
  export declare const zGetEnvironmentVersionsData: z.ZodObject<{
5313
5313
  body: z.ZodOptional<z.ZodNever>;
@@ -5581,6 +5581,7 @@ export declare const zCloneEnvironmentData: z.ZodObject<{
5581
5581
  isExported: z.ZodBoolean;
5582
5582
  }, z.core.$strip>>;
5583
5583
  cloneDbSettings: z.ZodOptional<z.ZodBoolean>;
5584
+ keepVersions: z.ZodOptional<z.ZodBoolean>;
5584
5585
  }, z.core.$strip>;
5585
5586
  path: z.ZodObject<{
5586
5587
  spaceHandle: z.ZodString;
@@ -5602,6 +5603,8 @@ export declare const zCloneEnvironmentResponse: z.ZodObject<{
5602
5603
  updatedAt: z.ZodISODateTime;
5603
5604
  versions: z.ZodInt;
5604
5605
  blueprintId: z.ZodOptional<z.ZodUUID>;
5606
+ softDelete: z.ZodOptional<z.ZodBoolean>;
5607
+ scheduleDeleteAt: z.ZodOptional<z.ZodISODateTime>;
5605
5608
  }, z.core.$strip>;
5606
5609
  export declare const zGetGraphOverviewData: z.ZodObject<{
5607
5610
  body: z.ZodOptional<z.ZodNever>;
@@ -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,13 @@ 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()),
289
+ scheduleDeleteAt: z.optional(z.iso.datetime())
271
290
  });
272
- export const zProjectOverview = z.object({
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(),
291
+ export const zPaginatedEnvironments = zPagination.and(z.object({
280
292
  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
- });
293
+ }));
288
294
  export const zAccountIdentity = z.object({
289
295
  id: z.string(),
290
296
  type: z.string(),
@@ -825,6 +831,14 @@ export const zPlanPriceResponse = z.object({
825
831
  currency: z.string(),
826
832
  interval: z.string()
827
833
  });
834
+ /**
835
+ * The lifecycle state of an environment. `active` covers environments that are not soft deleted, `inactive` covers soft deleted environments pending purge, and `all` covers both.
836
+ */
837
+ export const zEnvironmentStatus = z.enum([
838
+ 'active',
839
+ 'inactive',
840
+ 'all'
841
+ ]);
828
842
  export const zDeploymentStatus = z.enum([
829
843
  'pending',
830
844
  'prebuilding',
@@ -1096,6 +1110,10 @@ export const zOrder = z.enum([
1096
1110
  'asc',
1097
1111
  'desc'
1098
1112
  ]);
1113
+ /**
1114
+ * Filter environments by lifecycle state.
1115
+ */
1116
+ export const zEnvironmentStatusQuery = zEnvironmentStatus;
1099
1117
  /**
1100
1118
  * Page number (1-based).
1101
1119
  */
@@ -1950,6 +1968,22 @@ export const zGetProjectOverviewData = z.object({
1950
1968
  * Project overview.
1951
1969
  */
1952
1970
  export const zGetProjectOverviewResponse = zProjectOverview;
1971
+ export const zGetProjectEnvironmentsData = z.object({
1972
+ body: z.optional(z.never()),
1973
+ path: z.object({
1974
+ spaceHandle: z.string(),
1975
+ projectHandle: z.string()
1976
+ }),
1977
+ query: z.optional(z.object({
1978
+ status: z.optional(zEnvironmentStatus),
1979
+ page: z.optional(z.int().gte(1)).default(1),
1980
+ limit: z.optional(z.int().gte(1).lte(100)).default(10)
1981
+ }))
1982
+ });
1983
+ /**
1984
+ * Project environments.
1985
+ */
1986
+ export const zGetProjectEnvironmentsResponse = zPaginatedEnvironments;
1953
1987
  export const zCreateEnvironmentData = z.object({
1954
1988
  body: zCreateEnvironment,
1955
1989
  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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shoal-web-sdk",
3
- "version": "1.0.68",
3
+ "version": "1.0.70",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build-hooks": "npx tsx tanstack-codegen/generator.ts",