shoal-web-sdk 1.0.126 → 1.0.128
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 +29 -1
- package/dist/sdk/@tanstack/react-query.gen.js +19 -1
- package/dist/sdk/billing/@tanstack/react-query.gen.d.ts +8 -1
- package/dist/sdk/billing/@tanstack/react-query.gen.js +20 -1
- package/dist/sdk/billing/sdk.gen.d.ts +8 -1
- package/dist/sdk/billing/sdk.gen.js +22 -0
- package/dist/sdk/billing/types.gen.d.ts +53 -0
- package/dist/sdk/billing/zod.gen.d.ts +55 -0
- package/dist/sdk/billing/zod.gen.js +22 -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 +120 -0
- package/dist/sdk/zod.gen.d.ts +92 -0
- package/dist/sdk/zod.gen.js +44 -0
- package/dist/tanstack-codegen/generated/billing.d.ts +9 -1
- package/dist/tanstack-codegen/generated/billing.js +20 -1
- package/dist/tanstack-codegen/generated/generated.d.ts +208 -1
- package/dist/tanstack-codegen/generated/generated.js +23 -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, CreateBugReportData, CreateBugReportError, CreateBugReportResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateNeonBranchData, CreateNeonBranchError, CreateNeonBranchResponse, CreateNeonDatabaseData, CreateNeonDatabaseError, CreateNeonDatabaseResponse, CreateNeonProjectData, CreateNeonProjectError, CreateNeonProjectM2mData, CreateNeonProjectM2mError, CreateNeonProjectM2mResponse, CreateNeonProjectResponse, CreateNodeCredentialData, CreateNodeCredentialError, CreateNodeCredentialResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSecretData, CreateSecretError, CreateSecretM2mData, CreateSecretM2mError, CreateSecretM2mResponse, CreateSecretResponse, 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, FetchGraphM2mData, FetchMongoOrganizationsData, FetchMongoOrganizationTierData, FetchMongoRegionsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetApiKeysData, GetBlueprintData, GetBlueprintM2mData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetFeatureFlagsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectEnvironmentsData, GetProjectOverviewData, GetPublicInviteData, GetSecretValueData, GetServiceHealthData, GetSoftDeletedEnvironmentsM2mData, GetSpaceInvitesData, GetSpaceM2mData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, KickSpaceMemberData, KickSpaceMemberError, LeaveSpaceData, LeaveSpaceError, ListInstallationBranchesData, ListInstallationRepositoriesData, ListMongoClustersData, ListMongoProjectsData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListNeonRolesData, ListSpaceMemberRolesData, ListSpaceMembersData, ListSubdomainsData, ListUserInstallationsData, ListUserSpacesData, LookupApiKeyData, NukeEnvironmentM2mData, NukeEnvironmentM2mError, NukeEnvironmentM2mResponse, PingNodeData, PreviewBlueprintData, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RegisterCustomerDomainData, RegisterCustomerDomainError, RegisterCustomerDomainResponse, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemoveCustomerDomainData, RemoveCustomerDomainError, RemoveCustomerDomainResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RestoreEnvironmentM2mData, RestoreEnvironmentM2mError, RestoreEnvironmentM2mResponse, RevokeApiKeyData, RevokeApiKeyError, RevokeApiKeyResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdError, SetSpacePropertyData, SetSpacePropertyError, 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 { CheckNodePortsData, CheckSubdomainUniquenessData, CloneEnvironmentData, CloneEnvironmentError, CloneEnvironmentResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse2, CreateBlueprintData, CreateBlueprintError, CreateBlueprintResponse, CreateBugReportData, CreateBugReportError, CreateBugReportResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateNeonBranchData, CreateNeonBranchError, CreateNeonBranchResponse, CreateNeonDatabaseData, CreateNeonDatabaseError, CreateNeonDatabaseResponse, CreateNeonProjectData, CreateNeonProjectError, CreateNeonProjectM2mData, CreateNeonProjectM2mError, CreateNeonProjectM2mResponse, CreateNeonProjectResponse, CreateNodeCredentialData, CreateNodeCredentialError, CreateNodeCredentialResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSecretData, CreateSecretError, CreateSecretM2mData, CreateSecretM2mError, CreateSecretM2mResponse, CreateSecretResponse, 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, FetchGraphM2mData, FetchMongoOrganizationsData, FetchMongoOrganizationTierData, FetchMongoRegionsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetApiKeysData, GetBlueprintData, GetBlueprintM2mData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetFeatureFlagsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectEnvironmentsData, GetProjectOverviewData, GetPublicInviteData, GetSecretValueData, GetServiceHealthData, GetSoftDeletedEnvironmentsM2mData, GetSpaceInvitesData, GetSpaceM2mData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, KickSpaceMemberData, KickSpaceMemberError, LeaveSpaceData, LeaveSpaceError, ListInstallationBranchesData, ListInstallationRepositoriesData, ListMongoClustersData, ListMongoProjectsData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListNeonRolesData, ListSpaceMemberRolesData, ListSpaceMembersData, ListSubdomainsData, ListUserInstallationsData, ListUserSpacesData, LookupApiKeyData, NukeEnvironmentM2mData, NukeEnvironmentM2mError, NukeEnvironmentM2mResponse, PingNodeData, PreviewBlueprintData, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RegisterCustomerDomainData, RegisterCustomerDomainError, RegisterCustomerDomainResponse, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemoveCustomerDomainData, RemoveCustomerDomainError, RemoveCustomerDomainResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RestoreEnvironmentM2mData, RestoreEnvironmentM2mError, RestoreEnvironmentM2mResponse, RevokeApiKeyData, RevokeApiKeyError, RevokeApiKeyResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdError, SetSpacePropertyData, SetSpacePropertyError, 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;
|
|
@@ -1994,6 +1994,34 @@ export declare const pingNodeOptions: (options: Options<PingNodeData>) => import
|
|
|
1994
1994
|
[dataTagErrorSymbol]: Error;
|
|
1995
1995
|
};
|
|
1996
1996
|
};
|
|
1997
|
+
export declare const checkNodePortsQueryKey: (options: Options<CheckNodePortsData>) => [Pick<Options<CheckNodePortsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1998
|
+
_id: string;
|
|
1999
|
+
_infinite?: boolean;
|
|
2000
|
+
tags?: ReadonlyArray<string>;
|
|
2001
|
+
}];
|
|
2002
|
+
/**
|
|
2003
|
+
* Download a container node's uploaded source code and statically check that it listens on the node's configured port, alongside pre-build problems.
|
|
2004
|
+
*/
|
|
2005
|
+
export declare const checkNodePortsOptions: (options: Options<CheckNodePortsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").NodePortCheckResponse, Error, import("../types.gen").NodePortCheckResponse, [Pick<Options<CheckNodePortsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
2006
|
+
_id: string;
|
|
2007
|
+
_infinite?: boolean;
|
|
2008
|
+
tags?: ReadonlyArray<string>;
|
|
2009
|
+
}]>, "queryFn"> & {
|
|
2010
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").NodePortCheckResponse, [Pick<Options<CheckNodePortsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
2011
|
+
_id: string;
|
|
2012
|
+
_infinite?: boolean;
|
|
2013
|
+
tags?: ReadonlyArray<string>;
|
|
2014
|
+
}], never> | undefined;
|
|
2015
|
+
} & {
|
|
2016
|
+
queryKey: [Pick<Options<CheckNodePortsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
2017
|
+
_id: string;
|
|
2018
|
+
_infinite?: boolean;
|
|
2019
|
+
tags?: ReadonlyArray<string>;
|
|
2020
|
+
}] & {
|
|
2021
|
+
[dataTagSymbol]: import("../types.gen").NodePortCheckResponse;
|
|
2022
|
+
[dataTagErrorSymbol]: Error;
|
|
2023
|
+
};
|
|
2024
|
+
};
|
|
1997
2025
|
/**
|
|
1998
2026
|
* Generate a service account key file scoped to a node's own resources, for local development against them.
|
|
1999
2027
|
*/
|
|
@@ -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, createBugReport, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createNeonProjectM2M, createNodeCredential, createProject, createSecret, createSecretM2M, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironment, deleteEnvironmentM2M, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchGraphM2M, fetchMongoOrganizations, fetchMongoOrganizationTier, fetchMongoRegions, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getApiKeys, getBlueprint, getBlueprintM2M, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getFeatureFlags, getGraphOverview, getNodeEnvironmentVariables, getProjectEnvironments, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSoftDeletedEnvironmentsM2M, getSpaceInvites, getSpaceM2M, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, kickSpaceMember, leaveSpace, listInstallationBranches, listInstallationRepositories, listMongoClusters, listMongoProjects, listNeonBranches, listNeonDatabases, listNeonProjects, listNeonRoles, listSpaceMemberRoles, listSpaceMembers, listSubdomains, listUserInstallations, listUserSpaces, lookupApiKey, nukeEnvironmentM2M, pingNode, previewBlueprint, recordOnboardingAnalytics, registerCustomerDomain, rejectSpaceInvite, removeCustomerDomain, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, restoreEnvironmentM2M, revokeApiKey, revokeSpaceInvite, setEnvironmentGcpProjectId, setSpaceProperty, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints, viewBlueprintsM2M } from '../sdk.gen';
|
|
4
|
+
import { checkNodePorts, checkSubdomainUniqueness, cloneEnvironment, createApiKey, createBlueprint, createBugReport, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createNeonProjectM2M, createNodeCredential, createProject, createSecret, createSecretM2M, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironment, deleteEnvironmentM2M, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchGraphM2M, fetchMongoOrganizations, fetchMongoOrganizationTier, fetchMongoRegions, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getApiKeys, getBlueprint, getBlueprintM2M, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getFeatureFlags, getGraphOverview, getNodeEnvironmentVariables, getProjectEnvironments, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSoftDeletedEnvironmentsM2M, getSpaceInvites, getSpaceM2M, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, kickSpaceMember, leaveSpace, listInstallationBranches, listInstallationRepositories, listMongoClusters, listMongoProjects, listNeonBranches, listNeonDatabases, listNeonProjects, listNeonRoles, listSpaceMemberRoles, listSpaceMembers, listSubdomains, listUserInstallations, listUserSpaces, lookupApiKey, nukeEnvironmentM2M, pingNode, previewBlueprint, recordOnboardingAnalytics, registerCustomerDomain, rejectSpaceInvite, removeCustomerDomain, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, restoreEnvironmentM2M, revokeApiKey, revokeSpaceInvite, setEnvironmentGcpProjectId, setSpaceProperty, 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) {
|
|
@@ -2081,6 +2081,24 @@ export const pingNodeOptions = (options) => {
|
|
|
2081
2081
|
queryKey: pingNodeQueryKey(options)
|
|
2082
2082
|
});
|
|
2083
2083
|
};
|
|
2084
|
+
export const checkNodePortsQueryKey = (options) => createQueryKey('checkNodePorts', options);
|
|
2085
|
+
/**
|
|
2086
|
+
* Download a container node's uploaded source code and statically check that it listens on the node's configured port, alongside pre-build problems.
|
|
2087
|
+
*/
|
|
2088
|
+
export const checkNodePortsOptions = (options) => {
|
|
2089
|
+
return queryOptions({
|
|
2090
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2091
|
+
const { data } = await checkNodePorts({
|
|
2092
|
+
...options,
|
|
2093
|
+
...queryKey[0],
|
|
2094
|
+
signal,
|
|
2095
|
+
throwOnError: true
|
|
2096
|
+
});
|
|
2097
|
+
return data;
|
|
2098
|
+
},
|
|
2099
|
+
queryKey: checkNodePortsQueryKey(options)
|
|
2100
|
+
});
|
|
2101
|
+
};
|
|
2084
2102
|
/**
|
|
2085
2103
|
* Generate a service account key file scoped to a node's own resources, for local development against them.
|
|
2086
2104
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import { type Options } from '../sdk.gen';
|
|
3
|
-
import type { CancelSubscriptionData, CancelSubscriptionError, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSubscriptionData, CreateSubscriptionError, CreateSubscriptionResponse, DeletePaymentMethodData, DeletePaymentMethodError, DeletePaymentMethodResponse, GetCustomerData, GetInvoicesData, GetPlansData, GetUsageData, M2mCreateCustomerData, M2mCreateCustomerError, M2mGetCustomerData, M2mUpdatePlanData, M2mUpdatePlanError, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodError, UpdateDefaultPaymentMethodResponse, UpdatePlanData, UpdatePlanError } from '../types.gen';
|
|
3
|
+
import type { CancelSubscriptionData, CancelSubscriptionError, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSubscriptionData, CreateSubscriptionError, CreateSubscriptionResponse, DeletePaymentMethodData, DeletePaymentMethodError, DeletePaymentMethodResponse, GetCustomerData, GetInvoicesData, GetPlansData, GetUsageData, M2mCreateCustomerData, M2mCreateCustomerError, M2mGetCustomerData, M2mUpdatePlanData, M2mUpdatePlanError, UpdateBillingAddressData, UpdateBillingAddressError, UpdateBillingAddressResponse, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodError, UpdateDefaultPaymentMethodResponse, UpdatePlanData, UpdatePlanError } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -110,6 +110,13 @@ export declare const cancelSubscriptionMutation: (options?: Partial<Options<Canc
|
|
|
110
110
|
*
|
|
111
111
|
*/
|
|
112
112
|
export declare const createSubscriptionMutation: (options?: Partial<Options<CreateSubscriptionData>>) => UseMutationOptions<CreateSubscriptionResponse, CreateSubscriptionError, Options<CreateSubscriptionData>>;
|
|
113
|
+
/**
|
|
114
|
+
* Sets the billing address on the Stripe customer.
|
|
115
|
+
*
|
|
116
|
+
* Stripe Tax uses the customer's address to work out their tax location. The address is validated immediately, so an address Stripe cannot use for tax is rejected instead of leaving the customer with an unknown tax location.
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
export declare const updateBillingAddressMutation: (options?: Partial<Options<UpdateBillingAddressData>>) => UseMutationOptions<UpdateBillingAddressResponse, UpdateBillingAddressError, Options<UpdateBillingAddressData>>;
|
|
113
120
|
/**
|
|
114
121
|
* Creates a Stripe SetupIntent.
|
|
115
122
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { cancelSubscription, createSetupIntent, createSubscription, deletePaymentMethod, getCustomer, getInvoices, getPlans, getUsage, m2mCreateCustomer, m2mGetCustomer, m2mUpdatePlan, updateDefaultPaymentMethod, updatePlan } from '../sdk.gen';
|
|
4
|
+
import { cancelSubscription, createSetupIntent, createSubscription, deletePaymentMethod, getCustomer, getInvoices, getPlans, getUsage, m2mCreateCustomer, m2mGetCustomer, m2mUpdatePlan, updateBillingAddress, updateDefaultPaymentMethod, updatePlan } 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) {
|
|
@@ -134,6 +134,25 @@ export const createSubscriptionMutation = (options) => {
|
|
|
134
134
|
};
|
|
135
135
|
return mutationOptions;
|
|
136
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* Sets the billing address on the Stripe customer.
|
|
139
|
+
*
|
|
140
|
+
* Stripe Tax uses the customer's address to work out their tax location. The address is validated immediately, so an address Stripe cannot use for tax is rejected instead of leaving the customer with an unknown tax location.
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
export const updateBillingAddressMutation = (options) => {
|
|
144
|
+
const mutationOptions = {
|
|
145
|
+
mutationFn: async (fnOptions) => {
|
|
146
|
+
const { data } = await updateBillingAddress({
|
|
147
|
+
...options,
|
|
148
|
+
...fnOptions,
|
|
149
|
+
throwOnError: true
|
|
150
|
+
});
|
|
151
|
+
return data;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return mutationOptions;
|
|
155
|
+
};
|
|
137
156
|
/**
|
|
138
157
|
* Creates a Stripe SetupIntent.
|
|
139
158
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { CancelSubscriptionData, CancelSubscriptionErrors, CancelSubscriptionResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSubscriptionData, CreateSubscriptionErrors, CreateSubscriptionResponses, DeletePaymentMethodData, DeletePaymentMethodErrors, DeletePaymentMethodResponses, GetCustomerData, GetCustomerErrors, GetCustomerResponses, GetInvoicesData, GetInvoicesErrors, GetInvoicesResponses, GetPlansData, GetPlansErrors, GetPlansResponses, GetUsageData, GetUsageErrors, GetUsageResponses, M2mCreateCustomerData, M2mCreateCustomerErrors, M2mCreateCustomerResponses, M2mGetCustomerData, M2mGetCustomerErrors, M2mGetCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanErrors, M2mUpdatePlanResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodErrors, UpdateDefaultPaymentMethodResponses, UpdatePlanData, UpdatePlanErrors, UpdatePlanResponses } from './types.gen';
|
|
2
|
+
import type { CancelSubscriptionData, CancelSubscriptionErrors, CancelSubscriptionResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSubscriptionData, CreateSubscriptionErrors, CreateSubscriptionResponses, DeletePaymentMethodData, DeletePaymentMethodErrors, DeletePaymentMethodResponses, GetCustomerData, GetCustomerErrors, GetCustomerResponses, GetInvoicesData, GetInvoicesErrors, GetInvoicesResponses, GetPlansData, GetPlansErrors, GetPlansResponses, GetUsageData, GetUsageErrors, GetUsageResponses, M2mCreateCustomerData, M2mCreateCustomerErrors, M2mCreateCustomerResponses, M2mGetCustomerData, M2mGetCustomerErrors, M2mGetCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanErrors, M2mUpdatePlanResponses, UpdateBillingAddressData, UpdateBillingAddressErrors, UpdateBillingAddressResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodErrors, UpdateDefaultPaymentMethodResponses, UpdatePlanData, UpdatePlanErrors, UpdatePlanResponses } 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
|
|
@@ -43,6 +43,13 @@ export declare const cancelSubscription: <ThrowOnError extends boolean = false>(
|
|
|
43
43
|
*
|
|
44
44
|
*/
|
|
45
45
|
export declare const createSubscription: <ThrowOnError extends boolean = false>(options: Options<CreateSubscriptionData, ThrowOnError>) => import("./client").RequestResult<CreateSubscriptionResponses, CreateSubscriptionErrors, ThrowOnError, "fields">;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the billing address on the Stripe customer.
|
|
48
|
+
*
|
|
49
|
+
* Stripe Tax uses the customer's address to work out their tax location. The address is validated immediately, so an address Stripe cannot use for tax is rejected instead of leaving the customer with an unknown tax location.
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
export declare const updateBillingAddress: <ThrowOnError extends boolean = false>(options: Options<UpdateBillingAddressData, ThrowOnError>) => import("./client").RequestResult<UpdateBillingAddressResponses, UpdateBillingAddressErrors, ThrowOnError, "fields">;
|
|
46
53
|
/**
|
|
47
54
|
* Creates a Stripe SetupIntent.
|
|
48
55
|
*
|
|
@@ -104,6 +104,28 @@ export const createSubscription = (options) => {
|
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* Sets the billing address on the Stripe customer.
|
|
109
|
+
*
|
|
110
|
+
* Stripe Tax uses the customer's address to work out their tax location. The address is validated immediately, so an address Stripe cannot use for tax is rejected instead of leaving the customer with an unknown tax location.
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
export const updateBillingAddress = (options) => {
|
|
114
|
+
return (options.client ?? client).put({
|
|
115
|
+
security: [
|
|
116
|
+
{
|
|
117
|
+
scheme: 'bearer',
|
|
118
|
+
type: 'http'
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
url: '/api/v1/billing-address/{org}',
|
|
122
|
+
...options,
|
|
123
|
+
headers: {
|
|
124
|
+
'Content-Type': 'application/json',
|
|
125
|
+
...options.headers
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
};
|
|
107
129
|
/**
|
|
108
130
|
* Creates a Stripe SetupIntent.
|
|
109
131
|
*
|
|
@@ -96,6 +96,18 @@ export type CreateSubscriptionRequest = {
|
|
|
96
96
|
plan: string;
|
|
97
97
|
billingInterval: BillingInterval;
|
|
98
98
|
};
|
|
99
|
+
export type BillingAddress = {
|
|
100
|
+
name: string;
|
|
101
|
+
line1: string;
|
|
102
|
+
line2?: string;
|
|
103
|
+
city: string;
|
|
104
|
+
state: string;
|
|
105
|
+
postalCode: string;
|
|
106
|
+
/**
|
|
107
|
+
* Two-letter ISO 3166-1 country code.
|
|
108
|
+
*/
|
|
109
|
+
country: string;
|
|
110
|
+
};
|
|
99
111
|
export type SetupIntentResponse = {
|
|
100
112
|
readonly clientSecret: string;
|
|
101
113
|
};
|
|
@@ -156,6 +168,10 @@ export type CustomerResponse = {
|
|
|
156
168
|
readonly paymentMethods: Array<PaymentMethodSummary>;
|
|
157
169
|
readonly estimatedCreditBalanceUSD: unknown;
|
|
158
170
|
readonly upcomingInvoiceTotalCents?: number;
|
|
171
|
+
/**
|
|
172
|
+
* The address Stripe Tax uses for the customer's tax location. Null when none is set.
|
|
173
|
+
*/
|
|
174
|
+
billingAddress?: BillingAddress;
|
|
159
175
|
};
|
|
160
176
|
export type UsageInfoResponse = {
|
|
161
177
|
meters: {
|
|
@@ -478,6 +494,43 @@ export type CreateSubscriptionResponses = {
|
|
|
478
494
|
201: SubscriptionResponse;
|
|
479
495
|
};
|
|
480
496
|
export type CreateSubscriptionResponse = CreateSubscriptionResponses[keyof CreateSubscriptionResponses];
|
|
497
|
+
export type UpdateBillingAddressData = {
|
|
498
|
+
body: BillingAddress;
|
|
499
|
+
path: {
|
|
500
|
+
/**
|
|
501
|
+
* Kinde organisation id.
|
|
502
|
+
*/
|
|
503
|
+
org: string;
|
|
504
|
+
};
|
|
505
|
+
query?: never;
|
|
506
|
+
url: '/api/v1/billing-address/{org}';
|
|
507
|
+
};
|
|
508
|
+
export type UpdateBillingAddressErrors = {
|
|
509
|
+
/**
|
|
510
|
+
* Invalid request body, or Stripe could not use the address as a tax location
|
|
511
|
+
*/
|
|
512
|
+
400: _Error;
|
|
513
|
+
/**
|
|
514
|
+
* Unauthorised user
|
|
515
|
+
*/
|
|
516
|
+
401: _Error;
|
|
517
|
+
/**
|
|
518
|
+
* Account not found
|
|
519
|
+
*/
|
|
520
|
+
404: _Error;
|
|
521
|
+
/**
|
|
522
|
+
* Internal error
|
|
523
|
+
*/
|
|
524
|
+
500: _Error;
|
|
525
|
+
};
|
|
526
|
+
export type UpdateBillingAddressError = UpdateBillingAddressErrors[keyof UpdateBillingAddressErrors];
|
|
527
|
+
export type UpdateBillingAddressResponses = {
|
|
528
|
+
/**
|
|
529
|
+
* The billing address was updated
|
|
530
|
+
*/
|
|
531
|
+
204: void;
|
|
532
|
+
};
|
|
533
|
+
export type UpdateBillingAddressResponse = UpdateBillingAddressResponses[keyof UpdateBillingAddressResponses];
|
|
481
534
|
export type CreateSetupIntentData = {
|
|
482
535
|
body?: never;
|
|
483
536
|
path: {
|
|
@@ -1959,6 +1959,15 @@ export declare const zCreateSubscriptionRequest: z.ZodObject<{
|
|
|
1959
1959
|
annual: "annual";
|
|
1960
1960
|
}>;
|
|
1961
1961
|
}, z.core.$strip>;
|
|
1962
|
+
export declare const zBillingAddress: z.ZodObject<{
|
|
1963
|
+
name: z.ZodString;
|
|
1964
|
+
line1: z.ZodString;
|
|
1965
|
+
line2: z.ZodOptional<z.ZodString>;
|
|
1966
|
+
city: z.ZodString;
|
|
1967
|
+
state: z.ZodString;
|
|
1968
|
+
postalCode: z.ZodString;
|
|
1969
|
+
country: z.ZodString;
|
|
1970
|
+
}, z.core.$strip>;
|
|
1962
1971
|
export declare const zSetupIntentResponse: z.ZodObject<{
|
|
1963
1972
|
clientSecret: z.ZodReadonly<z.ZodString>;
|
|
1964
1973
|
}, z.core.$strip>;
|
|
@@ -2919,6 +2928,15 @@ export declare const zCustomerResponse: z.ZodObject<{
|
|
|
2919
2928
|
}, z.core.$strip>>>;
|
|
2920
2929
|
estimatedCreditBalanceUSD: z.ZodReadonly<z.ZodUnknown>;
|
|
2921
2930
|
upcomingInvoiceTotalCents: z.ZodOptional<z.ZodReadonly<z.ZodInt>>;
|
|
2931
|
+
billingAddress: z.ZodOptional<z.ZodObject<{
|
|
2932
|
+
name: z.ZodString;
|
|
2933
|
+
line1: z.ZodString;
|
|
2934
|
+
line2: z.ZodOptional<z.ZodString>;
|
|
2935
|
+
city: z.ZodString;
|
|
2936
|
+
state: z.ZodString;
|
|
2937
|
+
postalCode: z.ZodString;
|
|
2938
|
+
country: z.ZodString;
|
|
2939
|
+
}, z.core.$strip>>;
|
|
2922
2940
|
}, z.core.$strip>;
|
|
2923
2941
|
export declare const zUsagePoint: z.ZodObject<{
|
|
2924
2942
|
date: z.ZodISODateTime;
|
|
@@ -5249,6 +5267,15 @@ export declare const zGetCustomerResponse: z.ZodObject<{
|
|
|
5249
5267
|
}, z.core.$strip>>>;
|
|
5250
5268
|
estimatedCreditBalanceUSD: z.ZodReadonly<z.ZodUnknown>;
|
|
5251
5269
|
upcomingInvoiceTotalCents: z.ZodOptional<z.ZodReadonly<z.ZodInt>>;
|
|
5270
|
+
billingAddress: z.ZodOptional<z.ZodObject<{
|
|
5271
|
+
name: z.ZodString;
|
|
5272
|
+
line1: z.ZodString;
|
|
5273
|
+
line2: z.ZodOptional<z.ZodString>;
|
|
5274
|
+
city: z.ZodString;
|
|
5275
|
+
state: z.ZodString;
|
|
5276
|
+
postalCode: z.ZodString;
|
|
5277
|
+
country: z.ZodString;
|
|
5278
|
+
}, z.core.$strip>>;
|
|
5252
5279
|
}, z.core.$strip>;
|
|
5253
5280
|
export declare const zGetUsageData: z.ZodObject<{
|
|
5254
5281
|
body: z.ZodOptional<z.ZodNever>;
|
|
@@ -6555,6 +6582,25 @@ export declare const zCreateSubscriptionResponse: z.ZodObject<{
|
|
|
6555
6582
|
status: z.ZodReadonly<z.ZodString>;
|
|
6556
6583
|
clientSecret: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
6557
6584
|
}, z.core.$strip>;
|
|
6585
|
+
export declare const zUpdateBillingAddressData: z.ZodObject<{
|
|
6586
|
+
body: z.ZodObject<{
|
|
6587
|
+
name: z.ZodString;
|
|
6588
|
+
line1: z.ZodString;
|
|
6589
|
+
line2: z.ZodOptional<z.ZodString>;
|
|
6590
|
+
city: z.ZodString;
|
|
6591
|
+
state: z.ZodString;
|
|
6592
|
+
postalCode: z.ZodString;
|
|
6593
|
+
country: z.ZodString;
|
|
6594
|
+
}, z.core.$strip>;
|
|
6595
|
+
path: z.ZodObject<{
|
|
6596
|
+
org: z.ZodString;
|
|
6597
|
+
}, z.core.$strip>;
|
|
6598
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
6599
|
+
}, z.core.$strip>;
|
|
6600
|
+
/**
|
|
6601
|
+
* The billing address was updated
|
|
6602
|
+
*/
|
|
6603
|
+
export declare const zUpdateBillingAddressResponse: z.ZodVoid;
|
|
6558
6604
|
export declare const zCreateSetupIntentData: z.ZodObject<{
|
|
6559
6605
|
body: z.ZodOptional<z.ZodNever>;
|
|
6560
6606
|
path: z.ZodObject<{
|
|
@@ -7242,6 +7288,15 @@ export declare const zM2mGetCustomerResponse: z.ZodObject<{
|
|
|
7242
7288
|
}, z.core.$strip>>>;
|
|
7243
7289
|
estimatedCreditBalanceUSD: z.ZodReadonly<z.ZodUnknown>;
|
|
7244
7290
|
upcomingInvoiceTotalCents: z.ZodOptional<z.ZodReadonly<z.ZodInt>>;
|
|
7291
|
+
billingAddress: z.ZodOptional<z.ZodObject<{
|
|
7292
|
+
name: z.ZodString;
|
|
7293
|
+
line1: z.ZodString;
|
|
7294
|
+
line2: z.ZodOptional<z.ZodString>;
|
|
7295
|
+
city: z.ZodString;
|
|
7296
|
+
state: z.ZodString;
|
|
7297
|
+
postalCode: z.ZodString;
|
|
7298
|
+
country: z.ZodString;
|
|
7299
|
+
}, z.core.$strip>>;
|
|
7245
7300
|
}, z.core.$strip>;
|
|
7246
7301
|
export declare const zM2mCreateCustomerData: z.ZodObject<{
|
|
7247
7302
|
body: z.ZodObject<{
|
|
@@ -121,6 +121,15 @@ export const zCreateSubscriptionRequest = z.object({
|
|
|
121
121
|
plan: z.string(),
|
|
122
122
|
billingInterval: zBillingInterval
|
|
123
123
|
});
|
|
124
|
+
export const zBillingAddress = z.object({
|
|
125
|
+
name: z.string(),
|
|
126
|
+
line1: z.string(),
|
|
127
|
+
line2: z.optional(z.string()),
|
|
128
|
+
city: z.string(),
|
|
129
|
+
state: z.string(),
|
|
130
|
+
postalCode: z.string(),
|
|
131
|
+
country: z.string()
|
|
132
|
+
});
|
|
124
133
|
export const zSetupIntentResponse = z.object({
|
|
125
134
|
clientSecret: z.string().readonly()
|
|
126
135
|
});
|
|
@@ -186,7 +195,8 @@ export const zCustomerResponse = z.object({
|
|
|
186
195
|
seats: z.int().readonly(),
|
|
187
196
|
paymentMethods: z.array(zPaymentMethodSummary).readonly(),
|
|
188
197
|
estimatedCreditBalanceUSD: z.unknown().readonly(),
|
|
189
|
-
upcomingInvoiceTotalCents: z.optional(z.int().readonly())
|
|
198
|
+
upcomingInvoiceTotalCents: z.optional(z.int().readonly()),
|
|
199
|
+
billingAddress: z.optional(zBillingAddress)
|
|
190
200
|
});
|
|
191
201
|
export const zUsagePoint = z.object({
|
|
192
202
|
date: z.iso.datetime(),
|
|
@@ -349,6 +359,17 @@ export const zCreateSubscriptionData = z.object({
|
|
|
349
359
|
* The subscription was created
|
|
350
360
|
*/
|
|
351
361
|
export const zCreateSubscriptionResponse = zSubscriptionResponse;
|
|
362
|
+
export const zUpdateBillingAddressData = z.object({
|
|
363
|
+
body: zBillingAddress,
|
|
364
|
+
path: z.object({
|
|
365
|
+
org: z.string()
|
|
366
|
+
}),
|
|
367
|
+
query: z.optional(z.never())
|
|
368
|
+
});
|
|
369
|
+
/**
|
|
370
|
+
* The billing address was updated
|
|
371
|
+
*/
|
|
372
|
+
export const zUpdateBillingAddressResponse = z.void();
|
|
352
373
|
export const zCreateSetupIntentData = z.object({
|
|
353
374
|
body: z.optional(z.never()),
|
|
354
375
|
path: z.object({
|
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, CreateBugReportData, CreateBugReportErrors, CreateBugReportResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateNeonBranchData, CreateNeonBranchErrors, CreateNeonBranchResponses, CreateNeonDatabaseData, CreateNeonDatabaseErrors, CreateNeonDatabaseResponses, CreateNeonProjectData, CreateNeonProjectErrors, CreateNeonProjectM2mData, CreateNeonProjectM2mErrors, CreateNeonProjectM2mResponses, CreateNeonProjectResponses, CreateNodeCredentialData, CreateNodeCredentialErrors, CreateNodeCredentialResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSecretData, CreateSecretErrors, CreateSecretM2mData, CreateSecretM2mErrors, CreateSecretM2mResponses, CreateSecretResponses, 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, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchMongoOrganizationsData, FetchMongoOrganizationsErrors, FetchMongoOrganizationsResponses, FetchMongoOrganizationTierData, FetchMongoOrganizationTierErrors, FetchMongoOrganizationTierResponses, FetchMongoRegionsData, FetchMongoRegionsErrors, FetchMongoRegionsResponses, FetchNeonConnectionUriData, FetchNeonConnectionUriErrors, FetchNeonConnectionUriResponses, FetchNeonOrganizationsData, FetchNeonOrganizationsErrors, FetchNeonOrganizationsResponses, FetchNeonRegionsData, FetchNeonRegionsErrors, FetchNeonRegionsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetApiKeysData, GetApiKeysErrors, GetApiKeysResponses, 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, GetSoftDeletedEnvironmentsM2mData, GetSoftDeletedEnvironmentsM2mErrors, GetSoftDeletedEnvironmentsM2mResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceM2mData, GetSpaceM2mErrors, GetSpaceM2mResponses, 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, KickSpaceMemberData, KickSpaceMemberErrors, KickSpaceMemberResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListMongoClustersData, ListMongoClustersErrors, ListMongoClustersResponses, ListMongoProjectsData, ListMongoProjectsErrors, ListMongoProjectsResponses, ListNeonBranchesData, ListNeonBranchesErrors, ListNeonBranchesResponses, ListNeonDatabasesData, ListNeonDatabasesErrors, ListNeonDatabasesResponses, ListNeonProjectsData, ListNeonProjectsErrors, ListNeonProjectsResponses, ListNeonRolesData, ListNeonRolesErrors, ListNeonRolesResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListSubdomainsData, ListSubdomainsErrors, ListSubdomainsResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, LookupApiKeyData, LookupApiKeyErrors, LookupApiKeyResponses, NukeEnvironmentM2mData, NukeEnvironmentM2mErrors, NukeEnvironmentM2mResponses, PingNodeData, PingNodeErrors, PingNodeResponses, PreviewBlueprintData, PreviewBlueprintErrors, PreviewBlueprintResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RegisterCustomerDomainData, RegisterCustomerDomainErrors, RegisterCustomerDomainResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemoveCustomerDomainData, RemoveCustomerDomainErrors, RemoveCustomerDomainResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RestoreEnvironmentM2mData, RestoreEnvironmentM2mErrors, RestoreEnvironmentM2mResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdErrors, SetEnvironmentGcpProjectIdResponses, SetSpacePropertyData, SetSpacePropertyErrors, SetSpacePropertyResponses, 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 { CheckNodePortsData, CheckNodePortsErrors, CheckNodePortsResponses, CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CloneEnvironmentData, CloneEnvironmentErrors, CloneEnvironmentResponses, CreateApiKeyData, CreateApiKeyErrors, CreateApiKeyResponses, CreateBlueprintData, CreateBlueprintErrors, CreateBlueprintResponses, CreateBugReportData, CreateBugReportErrors, CreateBugReportResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateNeonBranchData, CreateNeonBranchErrors, CreateNeonBranchResponses, CreateNeonDatabaseData, CreateNeonDatabaseErrors, CreateNeonDatabaseResponses, CreateNeonProjectData, CreateNeonProjectErrors, CreateNeonProjectM2mData, CreateNeonProjectM2mErrors, CreateNeonProjectM2mResponses, CreateNeonProjectResponses, CreateNodeCredentialData, CreateNodeCredentialErrors, CreateNodeCredentialResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSecretData, CreateSecretErrors, CreateSecretM2mData, CreateSecretM2mErrors, CreateSecretM2mResponses, CreateSecretResponses, 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, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchMongoOrganizationsData, FetchMongoOrganizationsErrors, FetchMongoOrganizationsResponses, FetchMongoOrganizationTierData, FetchMongoOrganizationTierErrors, FetchMongoOrganizationTierResponses, FetchMongoRegionsData, FetchMongoRegionsErrors, FetchMongoRegionsResponses, FetchNeonConnectionUriData, FetchNeonConnectionUriErrors, FetchNeonConnectionUriResponses, FetchNeonOrganizationsData, FetchNeonOrganizationsErrors, FetchNeonOrganizationsResponses, FetchNeonRegionsData, FetchNeonRegionsErrors, FetchNeonRegionsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetApiKeysData, GetApiKeysErrors, GetApiKeysResponses, 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, GetSoftDeletedEnvironmentsM2mData, GetSoftDeletedEnvironmentsM2mErrors, GetSoftDeletedEnvironmentsM2mResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceM2mData, GetSpaceM2mErrors, GetSpaceM2mResponses, 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, KickSpaceMemberData, KickSpaceMemberErrors, KickSpaceMemberResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListMongoClustersData, ListMongoClustersErrors, ListMongoClustersResponses, ListMongoProjectsData, ListMongoProjectsErrors, ListMongoProjectsResponses, ListNeonBranchesData, ListNeonBranchesErrors, ListNeonBranchesResponses, ListNeonDatabasesData, ListNeonDatabasesErrors, ListNeonDatabasesResponses, ListNeonProjectsData, ListNeonProjectsErrors, ListNeonProjectsResponses, ListNeonRolesData, ListNeonRolesErrors, ListNeonRolesResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListSubdomainsData, ListSubdomainsErrors, ListSubdomainsResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, LookupApiKeyData, LookupApiKeyErrors, LookupApiKeyResponses, NukeEnvironmentM2mData, NukeEnvironmentM2mErrors, NukeEnvironmentM2mResponses, PingNodeData, PingNodeErrors, PingNodeResponses, PreviewBlueprintData, PreviewBlueprintErrors, PreviewBlueprintResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RegisterCustomerDomainData, RegisterCustomerDomainErrors, RegisterCustomerDomainResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemoveCustomerDomainData, RemoveCustomerDomainErrors, RemoveCustomerDomainResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RestoreEnvironmentM2mData, RestoreEnvironmentM2mErrors, RestoreEnvironmentM2mResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdErrors, SetEnvironmentGcpProjectIdResponses, SetSpacePropertyData, SetSpacePropertyErrors, SetSpacePropertyResponses, 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
|
|
@@ -391,6 +391,10 @@ export declare const checkSubdomainUniqueness: <ThrowOnError extends boolean = f
|
|
|
391
391
|
* Ping check a node's underlying provider resource depending on its type (e.g. Neon database, Mongo Atlas cluster).
|
|
392
392
|
*/
|
|
393
393
|
export declare const pingNode: <ThrowOnError extends boolean = false>(options: Options<PingNodeData, ThrowOnError>) => import("./client").RequestResult<PingNodeResponses, PingNodeErrors, ThrowOnError, "fields">;
|
|
394
|
+
/**
|
|
395
|
+
* Download a container node's uploaded source code and statically check that it listens on the node's configured port, alongside pre-build problems.
|
|
396
|
+
*/
|
|
397
|
+
export declare const checkNodePorts: <ThrowOnError extends boolean = false>(options: Options<CheckNodePortsData, ThrowOnError>) => import("./client").RequestResult<CheckNodePortsResponses, CheckNodePortsErrors, ThrowOnError, "fields">;
|
|
394
398
|
/**
|
|
395
399
|
* Generate a service account key file scoped to a node's own resources, for local development against them.
|
|
396
400
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -1933,6 +1933,25 @@ export const pingNode = (options) => {
|
|
|
1933
1933
|
...options
|
|
1934
1934
|
});
|
|
1935
1935
|
};
|
|
1936
|
+
/**
|
|
1937
|
+
* Download a container node's uploaded source code and statically check that it listens on the node's configured port, alongside pre-build problems.
|
|
1938
|
+
*/
|
|
1939
|
+
export const checkNodePorts = (options) => {
|
|
1940
|
+
return (options.client ?? client).get({
|
|
1941
|
+
security: [
|
|
1942
|
+
{
|
|
1943
|
+
scheme: 'bearer',
|
|
1944
|
+
type: 'http'
|
|
1945
|
+
},
|
|
1946
|
+
{
|
|
1947
|
+
name: 'X-Api-Key',
|
|
1948
|
+
type: 'apiKey'
|
|
1949
|
+
}
|
|
1950
|
+
],
|
|
1951
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/{nodeUUID}/port-check',
|
|
1952
|
+
...options
|
|
1953
|
+
});
|
|
1954
|
+
};
|
|
1936
1955
|
/**
|
|
1937
1956
|
* Generate a service account key file scoped to a node's own resources, for local development against them.
|
|
1938
1957
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -839,6 +839,65 @@ export type NodePingResponse = {
|
|
|
839
839
|
*/
|
|
840
840
|
message?: string;
|
|
841
841
|
};
|
|
842
|
+
export type NodePortCheckResponse = {
|
|
843
|
+
/**
|
|
844
|
+
* Folder inside the source that was treated as the project.
|
|
845
|
+
*/
|
|
846
|
+
dir: string;
|
|
847
|
+
/**
|
|
848
|
+
* Port the platform routes traffic to.
|
|
849
|
+
*/
|
|
850
|
+
expected: number;
|
|
851
|
+
filesScanned: number;
|
|
852
|
+
/**
|
|
853
|
+
* Whether scanning stopped early because the file limit was reached.
|
|
854
|
+
*/
|
|
855
|
+
truncated: boolean;
|
|
856
|
+
/**
|
|
857
|
+
* Whether the app reads the $PORT environment variable.
|
|
858
|
+
*/
|
|
859
|
+
readsPort: boolean;
|
|
860
|
+
/**
|
|
861
|
+
* Whether the app uses the expected port directly.
|
|
862
|
+
*/
|
|
863
|
+
usesExpected: boolean;
|
|
864
|
+
serverFound: boolean;
|
|
865
|
+
prodServer: boolean;
|
|
866
|
+
/**
|
|
867
|
+
* Whether the build is expected to fail, e.g. no start command.
|
|
868
|
+
*/
|
|
869
|
+
fatal: boolean;
|
|
870
|
+
/**
|
|
871
|
+
* Human readable summary of what the app listens on (e.g. "$PORT", "3000").
|
|
872
|
+
*/
|
|
873
|
+
listen: string;
|
|
874
|
+
defaults: Array<PortCheckDefault>;
|
|
875
|
+
/**
|
|
876
|
+
* Port related warnings.
|
|
877
|
+
*/
|
|
878
|
+
findings: Array<PortCheckFinding>;
|
|
879
|
+
/**
|
|
880
|
+
* Pre-build problems such as missing manifests, lockfiles or undeclared imports.
|
|
881
|
+
*/
|
|
882
|
+
prebuild: Array<PortCheckFinding>;
|
|
883
|
+
};
|
|
884
|
+
export type PortCheckFinding = {
|
|
885
|
+
file?: string;
|
|
886
|
+
line?: number;
|
|
887
|
+
checker: string;
|
|
888
|
+
message: string;
|
|
889
|
+
};
|
|
890
|
+
export type PortCheckDefault = {
|
|
891
|
+
port: number;
|
|
892
|
+
file: string;
|
|
893
|
+
line?: number;
|
|
894
|
+
checker: string;
|
|
895
|
+
reason: string;
|
|
896
|
+
/**
|
|
897
|
+
* Whether the default comes from a base image rather than the app code.
|
|
898
|
+
*/
|
|
899
|
+
image?: boolean;
|
|
900
|
+
};
|
|
842
901
|
export type NodeCredentialRequest = {
|
|
843
902
|
/**
|
|
844
903
|
* How long the generated key stays valid, in hours. Defaults to 24 and is capped at 720 (30 days).
|
|
@@ -5577,6 +5636,67 @@ export type PingNodeResponses = {
|
|
|
5577
5636
|
200: NodePingResponse;
|
|
5578
5637
|
};
|
|
5579
5638
|
export type PingNodeResponse = PingNodeResponses[keyof PingNodeResponses];
|
|
5639
|
+
export type CheckNodePortsData = {
|
|
5640
|
+
body?: never;
|
|
5641
|
+
path: {
|
|
5642
|
+
/**
|
|
5643
|
+
* The space handle. This must be globally unique.
|
|
5644
|
+
*/
|
|
5645
|
+
spaceHandle: string;
|
|
5646
|
+
/**
|
|
5647
|
+
* A project name. This must be unique to a space.
|
|
5648
|
+
*/
|
|
5649
|
+
projectHandle: string;
|
|
5650
|
+
/**
|
|
5651
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
5652
|
+
*/
|
|
5653
|
+
environmentHandle: string;
|
|
5654
|
+
/**
|
|
5655
|
+
* A version number with in an environment.
|
|
5656
|
+
*/
|
|
5657
|
+
version: string;
|
|
5658
|
+
/**
|
|
5659
|
+
* The node ID this source ZIP is associated with.
|
|
5660
|
+
*/
|
|
5661
|
+
nodeUUID: string;
|
|
5662
|
+
};
|
|
5663
|
+
query?: never;
|
|
5664
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/{nodeUUID}/port-check';
|
|
5665
|
+
};
|
|
5666
|
+
export type CheckNodePortsErrors = {
|
|
5667
|
+
/**
|
|
5668
|
+
* Invalid request parameters.
|
|
5669
|
+
*/
|
|
5670
|
+
400: ErrorResponse;
|
|
5671
|
+
/**
|
|
5672
|
+
* Unauthorised user.
|
|
5673
|
+
*/
|
|
5674
|
+
401: ErrorResponse;
|
|
5675
|
+
/**
|
|
5676
|
+
* Invalid credentials.
|
|
5677
|
+
*/
|
|
5678
|
+
403: ErrorResponse;
|
|
5679
|
+
/**
|
|
5680
|
+
* Node or its source code not found.
|
|
5681
|
+
*/
|
|
5682
|
+
404: ErrorResponse;
|
|
5683
|
+
/**
|
|
5684
|
+
* Node type or source does not support port checks, or the source is not a valid zip.
|
|
5685
|
+
*/
|
|
5686
|
+
422: ErrorResponse;
|
|
5687
|
+
/**
|
|
5688
|
+
* Unexpected error.
|
|
5689
|
+
*/
|
|
5690
|
+
500: ErrorResponse;
|
|
5691
|
+
};
|
|
5692
|
+
export type CheckNodePortsError = CheckNodePortsErrors[keyof CheckNodePortsErrors];
|
|
5693
|
+
export type CheckNodePortsResponses = {
|
|
5694
|
+
/**
|
|
5695
|
+
* The result of the port check.
|
|
5696
|
+
*/
|
|
5697
|
+
200: NodePortCheckResponse;
|
|
5698
|
+
};
|
|
5699
|
+
export type CheckNodePortsResponse = CheckNodePortsResponses[keyof CheckNodePortsResponses];
|
|
5580
5700
|
export type CreateNodeCredentialData = {
|
|
5581
5701
|
body?: NodeCredentialRequest;
|
|
5582
5702
|
path: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -1006,6 +1006,52 @@ export declare const zNodePingResponse: z.ZodObject<{
|
|
|
1006
1006
|
status: z.ZodOptional<z.ZodString>;
|
|
1007
1007
|
message: z.ZodOptional<z.ZodString>;
|
|
1008
1008
|
}, z.core.$strip>;
|
|
1009
|
+
export declare const zPortCheckFinding: z.ZodObject<{
|
|
1010
|
+
file: z.ZodOptional<z.ZodString>;
|
|
1011
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
1012
|
+
checker: z.ZodString;
|
|
1013
|
+
message: z.ZodString;
|
|
1014
|
+
}, z.core.$strip>;
|
|
1015
|
+
export declare const zPortCheckDefault: z.ZodObject<{
|
|
1016
|
+
port: z.ZodInt;
|
|
1017
|
+
file: z.ZodString;
|
|
1018
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
1019
|
+
checker: z.ZodString;
|
|
1020
|
+
reason: z.ZodString;
|
|
1021
|
+
image: z.ZodOptional<z.ZodBoolean>;
|
|
1022
|
+
}, z.core.$strip>;
|
|
1023
|
+
export declare const zNodePortCheckResponse: z.ZodObject<{
|
|
1024
|
+
dir: z.ZodString;
|
|
1025
|
+
expected: z.ZodInt;
|
|
1026
|
+
filesScanned: z.ZodInt;
|
|
1027
|
+
truncated: z.ZodBoolean;
|
|
1028
|
+
readsPort: z.ZodBoolean;
|
|
1029
|
+
usesExpected: z.ZodBoolean;
|
|
1030
|
+
serverFound: z.ZodBoolean;
|
|
1031
|
+
prodServer: z.ZodBoolean;
|
|
1032
|
+
fatal: z.ZodBoolean;
|
|
1033
|
+
listen: z.ZodString;
|
|
1034
|
+
defaults: z.ZodArray<z.ZodObject<{
|
|
1035
|
+
port: z.ZodInt;
|
|
1036
|
+
file: z.ZodString;
|
|
1037
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
1038
|
+
checker: z.ZodString;
|
|
1039
|
+
reason: z.ZodString;
|
|
1040
|
+
image: z.ZodOptional<z.ZodBoolean>;
|
|
1041
|
+
}, z.core.$strip>>;
|
|
1042
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
1043
|
+
file: z.ZodOptional<z.ZodString>;
|
|
1044
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
1045
|
+
checker: z.ZodString;
|
|
1046
|
+
message: z.ZodString;
|
|
1047
|
+
}, z.core.$strip>>;
|
|
1048
|
+
prebuild: z.ZodArray<z.ZodObject<{
|
|
1049
|
+
file: z.ZodOptional<z.ZodString>;
|
|
1050
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
1051
|
+
checker: z.ZodString;
|
|
1052
|
+
message: z.ZodString;
|
|
1053
|
+
}, z.core.$strip>>;
|
|
1054
|
+
}, z.core.$strip>;
|
|
1009
1055
|
export declare const zNodeCredentialRequest: z.ZodObject<{
|
|
1010
1056
|
ttlHours: z.ZodOptional<z.ZodInt>;
|
|
1011
1057
|
}, z.core.$strip>;
|
|
@@ -8082,6 +8128,52 @@ export declare const zPingNodeResponse: z.ZodObject<{
|
|
|
8082
8128
|
status: z.ZodOptional<z.ZodString>;
|
|
8083
8129
|
message: z.ZodOptional<z.ZodString>;
|
|
8084
8130
|
}, z.core.$strip>;
|
|
8131
|
+
export declare const zCheckNodePortsData: z.ZodObject<{
|
|
8132
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
8133
|
+
path: z.ZodObject<{
|
|
8134
|
+
spaceHandle: z.ZodString;
|
|
8135
|
+
projectHandle: z.ZodString;
|
|
8136
|
+
environmentHandle: z.ZodString;
|
|
8137
|
+
version: z.ZodString;
|
|
8138
|
+
nodeUUID: z.ZodUUID;
|
|
8139
|
+
}, z.core.$strip>;
|
|
8140
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
8141
|
+
}, z.core.$strip>;
|
|
8142
|
+
/**
|
|
8143
|
+
* The result of the port check.
|
|
8144
|
+
*/
|
|
8145
|
+
export declare const zCheckNodePortsResponse: z.ZodObject<{
|
|
8146
|
+
dir: z.ZodString;
|
|
8147
|
+
expected: z.ZodInt;
|
|
8148
|
+
filesScanned: z.ZodInt;
|
|
8149
|
+
truncated: z.ZodBoolean;
|
|
8150
|
+
readsPort: z.ZodBoolean;
|
|
8151
|
+
usesExpected: z.ZodBoolean;
|
|
8152
|
+
serverFound: z.ZodBoolean;
|
|
8153
|
+
prodServer: z.ZodBoolean;
|
|
8154
|
+
fatal: z.ZodBoolean;
|
|
8155
|
+
listen: z.ZodString;
|
|
8156
|
+
defaults: z.ZodArray<z.ZodObject<{
|
|
8157
|
+
port: z.ZodInt;
|
|
8158
|
+
file: z.ZodString;
|
|
8159
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
8160
|
+
checker: z.ZodString;
|
|
8161
|
+
reason: z.ZodString;
|
|
8162
|
+
image: z.ZodOptional<z.ZodBoolean>;
|
|
8163
|
+
}, z.core.$strip>>;
|
|
8164
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
8165
|
+
file: z.ZodOptional<z.ZodString>;
|
|
8166
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
8167
|
+
checker: z.ZodString;
|
|
8168
|
+
message: z.ZodString;
|
|
8169
|
+
}, z.core.$strip>>;
|
|
8170
|
+
prebuild: z.ZodArray<z.ZodObject<{
|
|
8171
|
+
file: z.ZodOptional<z.ZodString>;
|
|
8172
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
8173
|
+
checker: z.ZodString;
|
|
8174
|
+
message: z.ZodString;
|
|
8175
|
+
}, z.core.$strip>>;
|
|
8176
|
+
}, z.core.$strip>;
|
|
8085
8177
|
export declare const zCreateNodeCredentialData: z.ZodObject<{
|
|
8086
8178
|
body: z.ZodOptional<z.ZodObject<{
|
|
8087
8179
|
ttlHours: z.ZodOptional<z.ZodInt>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -730,6 +730,35 @@ export const zNodePingResponse = z.object({
|
|
|
730
730
|
status: z.optional(z.string()),
|
|
731
731
|
message: z.optional(z.string())
|
|
732
732
|
});
|
|
733
|
+
export const zPortCheckFinding = z.object({
|
|
734
|
+
file: z.optional(z.string()),
|
|
735
|
+
line: z.optional(z.int()),
|
|
736
|
+
checker: z.string(),
|
|
737
|
+
message: z.string()
|
|
738
|
+
});
|
|
739
|
+
export const zPortCheckDefault = z.object({
|
|
740
|
+
port: z.int(),
|
|
741
|
+
file: z.string(),
|
|
742
|
+
line: z.optional(z.int()),
|
|
743
|
+
checker: z.string(),
|
|
744
|
+
reason: z.string(),
|
|
745
|
+
image: z.optional(z.boolean())
|
|
746
|
+
});
|
|
747
|
+
export const zNodePortCheckResponse = z.object({
|
|
748
|
+
dir: z.string(),
|
|
749
|
+
expected: z.int(),
|
|
750
|
+
filesScanned: z.int(),
|
|
751
|
+
truncated: z.boolean(),
|
|
752
|
+
readsPort: z.boolean(),
|
|
753
|
+
usesExpected: z.boolean(),
|
|
754
|
+
serverFound: z.boolean(),
|
|
755
|
+
prodServer: z.boolean(),
|
|
756
|
+
fatal: z.boolean(),
|
|
757
|
+
listen: z.string(),
|
|
758
|
+
defaults: z.array(zPortCheckDefault),
|
|
759
|
+
findings: z.array(zPortCheckFinding),
|
|
760
|
+
prebuild: z.array(zPortCheckFinding)
|
|
761
|
+
});
|
|
733
762
|
export const zNodeCredentialRequest = z.object({
|
|
734
763
|
ttlHours: z.optional(z.int())
|
|
735
764
|
});
|
|
@@ -2550,6 +2579,21 @@ export const zPingNodeData = z.object({
|
|
|
2550
2579
|
* The result of the ping check.
|
|
2551
2580
|
*/
|
|
2552
2581
|
export const zPingNodeResponse = zNodePingResponse;
|
|
2582
|
+
export const zCheckNodePortsData = z.object({
|
|
2583
|
+
body: z.optional(z.never()),
|
|
2584
|
+
path: z.object({
|
|
2585
|
+
spaceHandle: z.string(),
|
|
2586
|
+
projectHandle: z.string(),
|
|
2587
|
+
environmentHandle: z.string(),
|
|
2588
|
+
version: z.string(),
|
|
2589
|
+
nodeUUID: z.uuid()
|
|
2590
|
+
}),
|
|
2591
|
+
query: z.optional(z.never())
|
|
2592
|
+
});
|
|
2593
|
+
/**
|
|
2594
|
+
* The result of the port check.
|
|
2595
|
+
*/
|
|
2596
|
+
export const zCheckNodePortsResponse = zNodePortCheckResponse;
|
|
2553
2597
|
export const zCreateNodeCredentialData = z.object({
|
|
2554
2598
|
body: z.optional(zNodeCredentialRequest),
|
|
2555
2599
|
path: z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetCustomerData, GetUsageData, GetPlansData, UpdatePlanData, UpdatePlanResponses, CancelSubscriptionData, CancelSubscriptionResponses, CreateSubscriptionData, CreateSubscriptionResponses, CreateSetupIntentData, CreateSetupIntentResponses, DeletePaymentMethodData, DeletePaymentMethodResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodResponses, GetInvoicesData, M2mGetCustomerData, M2mCreateCustomerData, M2mCreateCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanResponses } from "../../sdk/billing/types.gen";
|
|
3
|
+
import { GetCustomerData, GetUsageData, GetPlansData, UpdatePlanData, UpdatePlanResponses, CancelSubscriptionData, CancelSubscriptionResponses, CreateSubscriptionData, CreateSubscriptionResponses, UpdateBillingAddressData, UpdateBillingAddressResponses, CreateSetupIntentData, CreateSetupIntentResponses, DeletePaymentMethodData, DeletePaymentMethodResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodResponses, GetInvoicesData, M2mGetCustomerData, M2mCreateCustomerData, M2mCreateCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanResponses } from "../../sdk/billing/types.gen";
|
|
4
4
|
export declare const useGetCustomer: (options: Omit<GetCustomerData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => {
|
|
@@ -646,6 +646,14 @@ export declare const useCreateSubscription: (config?: {
|
|
|
646
646
|
data: import("../../sdk/billing/types.gen").SubscriptionResponse | undefined;
|
|
647
647
|
headers: Record<string, string>;
|
|
648
648
|
}, unknown, Omit<CreateSubscriptionData, "url">, unknown>;
|
|
649
|
+
export declare const useUpdateBillingAddress: (config?: {
|
|
650
|
+
onSuccess?: (data: GetSuccessResponse<UpdateBillingAddressResponses>, headers: Record<string, string>) => void;
|
|
651
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
652
|
+
retry?: boolean;
|
|
653
|
+
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
654
|
+
data: void | undefined;
|
|
655
|
+
headers: Record<string, string>;
|
|
656
|
+
}, unknown, Omit<UpdateBillingAddressData, "url">, unknown>;
|
|
649
657
|
export declare const useCreateSetupIntent: (config?: {
|
|
650
658
|
onSuccess?: (data: GetSuccessResponse<CreateSetupIntentResponses>, headers: Record<string, string>) => void;
|
|
651
659
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise, headersToObject } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getCustomer, getUsage, getPlans, updatePlan, cancelSubscription, createSubscription, createSetupIntent, deletePaymentMethod, updateDefaultPaymentMethod, getInvoices, m2mGetCustomer, m2mCreateCustomer, m2mUpdatePlan } from "../../sdk/billing/sdk.gen";
|
|
5
|
+
import { getCustomer, getUsage, getPlans, updatePlan, cancelSubscription, createSubscription, updateBillingAddress, createSetupIntent, deletePaymentMethod, updateDefaultPaymentMethod, getInvoices, m2mGetCustomer, m2mCreateCustomer, m2mUpdatePlan } from "../../sdk/billing/sdk.gen";
|
|
6
6
|
export const useGetCustomer = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -126,6 +126,25 @@ export const useCreateSubscription = (config) => {
|
|
|
126
126
|
retry: config?.retry
|
|
127
127
|
});
|
|
128
128
|
};
|
|
129
|
+
export const useUpdateBillingAddress = (config) => {
|
|
130
|
+
const token = useToken();
|
|
131
|
+
const queryClient = useQueryClient();
|
|
132
|
+
const opts = { throwOnError: true, url: "/api/v1/billing-address/{org}" };
|
|
133
|
+
const funcer = async (options) => {
|
|
134
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
135
|
+
const res = await updateBillingAddress({ ...opts, ...options, auth });
|
|
136
|
+
return { data: res.data, headers: headersToObject(res.response.headers) };
|
|
137
|
+
};
|
|
138
|
+
return useMutation({
|
|
139
|
+
mutationFn: funcer,
|
|
140
|
+
onSuccess: (res, options, c, ctx) => {
|
|
141
|
+
queryClient.invalidateQueries({ queryKey: ["api", "v1", "billing-address", options?.path?.org] });
|
|
142
|
+
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
143
|
+
},
|
|
144
|
+
onError: config?.onError,
|
|
145
|
+
retry: config?.retry
|
|
146
|
+
});
|
|
147
|
+
};
|
|
129
148
|
export const useCreateSetupIntent = (config) => {
|
|
130
149
|
const token = useToken();
|
|
131
150
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, GetSoftDeletedEnvironmentsM2mData, RestoreEnvironmentM2mData, RestoreEnvironmentM2mResponses, NukeEnvironmentM2mData, NukeEnvironmentM2mResponses, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchGraphM2mData, 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, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, GetApiKeysData, CreateApiKeyData, CreateApiKeyResponses, RevokeApiKeyData, RevokeApiKeyResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, KickSpaceMemberData, KickSpaceMemberResponses, 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, CreateNodeCredentialData, CreateNodeCredentialResponses, CreateBugReportData, CreateBugReportResponses, GetSpacePropertiesData, SetSpacePropertyData, SetSpacePropertyResponses, ListSubdomainsData, RegisterCustomerDomainData, RegisterCustomerDomainResponses, RemoveCustomerDomainData, RemoveCustomerDomainResponses } from "../../sdk/types.gen";
|
|
3
|
+
import { GetServiceHealthData, GetSoftDeletedEnvironmentsM2mData, RestoreEnvironmentM2mData, RestoreEnvironmentM2mResponses, NukeEnvironmentM2mData, NukeEnvironmentM2mResponses, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchGraphM2mData, 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, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, GetApiKeysData, CreateApiKeyData, CreateApiKeyResponses, RevokeApiKeyData, RevokeApiKeyResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, KickSpaceMemberData, KickSpaceMemberResponses, 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, CheckNodePortsData, CreateNodeCredentialData, CreateNodeCredentialResponses, CreateBugReportData, CreateBugReportResponses, GetSpacePropertiesData, SetSpacePropertyData, SetSpacePropertyResponses, ListSubdomainsData, RegisterCustomerDomainData, RegisterCustomerDomainResponses, RemoveCustomerDomainData, RemoveCustomerDomainResponses } from "../../sdk/types.gen";
|
|
4
4
|
export declare const useGetServiceHealth: (options?: Omit<GetServiceHealthData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => {
|
|
@@ -10894,6 +10894,213 @@ export declare const usePingNode: (options: Omit<PingNodeData, "url"> & {
|
|
|
10894
10894
|
headers: Record<string, string>;
|
|
10895
10895
|
} | undefined>;
|
|
10896
10896
|
};
|
|
10897
|
+
export declare const useCheckNodePorts: (options: Omit<CheckNodePortsData, "url"> & {
|
|
10898
|
+
enabled?: boolean;
|
|
10899
|
+
}) => {
|
|
10900
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10901
|
+
headers: Record<string, string> | undefined;
|
|
10902
|
+
error: Error;
|
|
10903
|
+
isError: true;
|
|
10904
|
+
isPending: false;
|
|
10905
|
+
isLoading: false;
|
|
10906
|
+
isLoadingError: false;
|
|
10907
|
+
isRefetchError: true;
|
|
10908
|
+
isSuccess: false;
|
|
10909
|
+
isPlaceholderData: false;
|
|
10910
|
+
status: "error";
|
|
10911
|
+
dataUpdatedAt: number;
|
|
10912
|
+
errorUpdatedAt: number;
|
|
10913
|
+
failureCount: number;
|
|
10914
|
+
failureReason: Error | null;
|
|
10915
|
+
errorUpdateCount: number;
|
|
10916
|
+
isFetched: boolean;
|
|
10917
|
+
isFetchedAfterMount: boolean;
|
|
10918
|
+
isFetching: boolean;
|
|
10919
|
+
isInitialLoading: boolean;
|
|
10920
|
+
isPaused: boolean;
|
|
10921
|
+
isRefetching: boolean;
|
|
10922
|
+
isStale: boolean;
|
|
10923
|
+
isEnabled: boolean;
|
|
10924
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
10925
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10926
|
+
headers: Record<string, string>;
|
|
10927
|
+
} | undefined, Error>>;
|
|
10928
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
10929
|
+
promise: Promise<{
|
|
10930
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10931
|
+
headers: Record<string, string>;
|
|
10932
|
+
} | undefined>;
|
|
10933
|
+
} | {
|
|
10934
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10935
|
+
headers: Record<string, string> | undefined;
|
|
10936
|
+
error: null;
|
|
10937
|
+
isError: false;
|
|
10938
|
+
isPending: false;
|
|
10939
|
+
isLoading: false;
|
|
10940
|
+
isLoadingError: false;
|
|
10941
|
+
isRefetchError: false;
|
|
10942
|
+
isSuccess: true;
|
|
10943
|
+
isPlaceholderData: false;
|
|
10944
|
+
status: "success";
|
|
10945
|
+
dataUpdatedAt: number;
|
|
10946
|
+
errorUpdatedAt: number;
|
|
10947
|
+
failureCount: number;
|
|
10948
|
+
failureReason: Error | null;
|
|
10949
|
+
errorUpdateCount: number;
|
|
10950
|
+
isFetched: boolean;
|
|
10951
|
+
isFetchedAfterMount: boolean;
|
|
10952
|
+
isFetching: boolean;
|
|
10953
|
+
isInitialLoading: boolean;
|
|
10954
|
+
isPaused: boolean;
|
|
10955
|
+
isRefetching: boolean;
|
|
10956
|
+
isStale: boolean;
|
|
10957
|
+
isEnabled: boolean;
|
|
10958
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
10959
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10960
|
+
headers: Record<string, string>;
|
|
10961
|
+
} | undefined, Error>>;
|
|
10962
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
10963
|
+
promise: Promise<{
|
|
10964
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10965
|
+
headers: Record<string, string>;
|
|
10966
|
+
} | undefined>;
|
|
10967
|
+
} | {
|
|
10968
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10969
|
+
headers: Record<string, string> | undefined;
|
|
10970
|
+
error: Error;
|
|
10971
|
+
isError: true;
|
|
10972
|
+
isPending: false;
|
|
10973
|
+
isLoading: false;
|
|
10974
|
+
isLoadingError: true;
|
|
10975
|
+
isRefetchError: false;
|
|
10976
|
+
isSuccess: false;
|
|
10977
|
+
isPlaceholderData: false;
|
|
10978
|
+
status: "error";
|
|
10979
|
+
dataUpdatedAt: number;
|
|
10980
|
+
errorUpdatedAt: number;
|
|
10981
|
+
failureCount: number;
|
|
10982
|
+
failureReason: Error | null;
|
|
10983
|
+
errorUpdateCount: number;
|
|
10984
|
+
isFetched: boolean;
|
|
10985
|
+
isFetchedAfterMount: boolean;
|
|
10986
|
+
isFetching: boolean;
|
|
10987
|
+
isInitialLoading: boolean;
|
|
10988
|
+
isPaused: boolean;
|
|
10989
|
+
isRefetching: boolean;
|
|
10990
|
+
isStale: boolean;
|
|
10991
|
+
isEnabled: boolean;
|
|
10992
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
10993
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10994
|
+
headers: Record<string, string>;
|
|
10995
|
+
} | undefined, Error>>;
|
|
10996
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
10997
|
+
promise: Promise<{
|
|
10998
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
10999
|
+
headers: Record<string, string>;
|
|
11000
|
+
} | undefined>;
|
|
11001
|
+
} | {
|
|
11002
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11003
|
+
headers: Record<string, string> | undefined;
|
|
11004
|
+
error: null;
|
|
11005
|
+
isError: false;
|
|
11006
|
+
isPending: true;
|
|
11007
|
+
isLoading: true;
|
|
11008
|
+
isLoadingError: false;
|
|
11009
|
+
isRefetchError: false;
|
|
11010
|
+
isSuccess: false;
|
|
11011
|
+
isPlaceholderData: false;
|
|
11012
|
+
status: "pending";
|
|
11013
|
+
dataUpdatedAt: number;
|
|
11014
|
+
errorUpdatedAt: number;
|
|
11015
|
+
failureCount: number;
|
|
11016
|
+
failureReason: Error | null;
|
|
11017
|
+
errorUpdateCount: number;
|
|
11018
|
+
isFetched: boolean;
|
|
11019
|
+
isFetchedAfterMount: boolean;
|
|
11020
|
+
isFetching: boolean;
|
|
11021
|
+
isInitialLoading: boolean;
|
|
11022
|
+
isPaused: boolean;
|
|
11023
|
+
isRefetching: boolean;
|
|
11024
|
+
isStale: boolean;
|
|
11025
|
+
isEnabled: boolean;
|
|
11026
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
11027
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11028
|
+
headers: Record<string, string>;
|
|
11029
|
+
} | undefined, Error>>;
|
|
11030
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
11031
|
+
promise: Promise<{
|
|
11032
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11033
|
+
headers: Record<string, string>;
|
|
11034
|
+
} | undefined>;
|
|
11035
|
+
} | {
|
|
11036
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11037
|
+
headers: Record<string, string> | undefined;
|
|
11038
|
+
error: null;
|
|
11039
|
+
isError: false;
|
|
11040
|
+
isPending: true;
|
|
11041
|
+
isLoadingError: false;
|
|
11042
|
+
isRefetchError: false;
|
|
11043
|
+
isSuccess: false;
|
|
11044
|
+
isPlaceholderData: false;
|
|
11045
|
+
status: "pending";
|
|
11046
|
+
dataUpdatedAt: number;
|
|
11047
|
+
errorUpdatedAt: number;
|
|
11048
|
+
failureCount: number;
|
|
11049
|
+
failureReason: Error | null;
|
|
11050
|
+
errorUpdateCount: number;
|
|
11051
|
+
isFetched: boolean;
|
|
11052
|
+
isFetchedAfterMount: boolean;
|
|
11053
|
+
isFetching: boolean;
|
|
11054
|
+
isLoading: boolean;
|
|
11055
|
+
isInitialLoading: boolean;
|
|
11056
|
+
isPaused: boolean;
|
|
11057
|
+
isRefetching: boolean;
|
|
11058
|
+
isStale: boolean;
|
|
11059
|
+
isEnabled: boolean;
|
|
11060
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
11061
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11062
|
+
headers: Record<string, string>;
|
|
11063
|
+
} | undefined, Error>>;
|
|
11064
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
11065
|
+
promise: Promise<{
|
|
11066
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11067
|
+
headers: Record<string, string>;
|
|
11068
|
+
} | undefined>;
|
|
11069
|
+
} | {
|
|
11070
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11071
|
+
headers: Record<string, string> | undefined;
|
|
11072
|
+
isError: false;
|
|
11073
|
+
error: null;
|
|
11074
|
+
isPending: false;
|
|
11075
|
+
isLoading: false;
|
|
11076
|
+
isLoadingError: false;
|
|
11077
|
+
isRefetchError: false;
|
|
11078
|
+
isSuccess: true;
|
|
11079
|
+
isPlaceholderData: true;
|
|
11080
|
+
status: "success";
|
|
11081
|
+
dataUpdatedAt: number;
|
|
11082
|
+
errorUpdatedAt: number;
|
|
11083
|
+
failureCount: number;
|
|
11084
|
+
failureReason: Error | null;
|
|
11085
|
+
errorUpdateCount: number;
|
|
11086
|
+
isFetched: boolean;
|
|
11087
|
+
isFetchedAfterMount: boolean;
|
|
11088
|
+
isFetching: boolean;
|
|
11089
|
+
isInitialLoading: boolean;
|
|
11090
|
+
isPaused: boolean;
|
|
11091
|
+
isRefetching: boolean;
|
|
11092
|
+
isStale: boolean;
|
|
11093
|
+
isEnabled: boolean;
|
|
11094
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
11095
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11096
|
+
headers: Record<string, string>;
|
|
11097
|
+
} | undefined, Error>>;
|
|
11098
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
11099
|
+
promise: Promise<{
|
|
11100
|
+
data: import("../../sdk/types.gen").NodePortCheckResponse | undefined;
|
|
11101
|
+
headers: Record<string, string>;
|
|
11102
|
+
} | undefined>;
|
|
11103
|
+
};
|
|
10897
11104
|
export declare const useCreateNodeCredential: (config?: {
|
|
10898
11105
|
onSuccess?: (data: GetSuccessResponse<CreateNodeCredentialResponses>, headers: Record<string, string>) => void;
|
|
10899
11106
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise, headersToObject } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getServiceHealth, getSoftDeletedEnvironmentsM2M, restoreEnvironmentM2M, nukeEnvironmentM2M, updateGraphM2M, fetchGraphM2M, 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, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, getApiKeys, createApiKey, revokeApiKey, listSpaceMembers, listSpaceMemberRoles, leaveSpace, kickSpaceMember, 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, createNodeCredential, createBugReport, getSpaceProperties, setSpaceProperty, listSubdomains, registerCustomerDomain, removeCustomerDomain } from "../../sdk/sdk.gen";
|
|
5
|
+
import { getServiceHealth, getSoftDeletedEnvironmentsM2M, restoreEnvironmentM2M, nukeEnvironmentM2M, updateGraphM2M, fetchGraphM2M, 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, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, getApiKeys, createApiKey, revokeApiKey, listSpaceMembers, listSpaceMemberRoles, leaveSpace, kickSpaceMember, 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, checkNodePorts, createNodeCredential, createBugReport, getSpaceProperties, setSpaceProperty, listSubdomains, registerCustomerDomain, removeCustomerDomain } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -1905,6 +1905,28 @@ export const usePingNode = (options) => {
|
|
|
1905
1905
|
});
|
|
1906
1906
|
return { ...query, data: query.data?.data, headers: query.data?.headers };
|
|
1907
1907
|
};
|
|
1908
|
+
export const useCheckNodePorts = (options) => {
|
|
1909
|
+
const token = useToken();
|
|
1910
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
1911
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/{nodeUUID}/port-check" };
|
|
1912
|
+
const funcer = async () => {
|
|
1913
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
1914
|
+
if (isPromise(token) && !token)
|
|
1915
|
+
return;
|
|
1916
|
+
const res = await checkNodePorts({ ...opts, ...rest, auth });
|
|
1917
|
+
return { data: res.data, headers: headersToObject(res.response.headers) };
|
|
1918
|
+
};
|
|
1919
|
+
if (!token)
|
|
1920
|
+
enabled = false;
|
|
1921
|
+
const query = useQuery({
|
|
1922
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, options?.path?.version, "graph", options?.path?.nodeUUID, "port-check", options.query ?? {}],
|
|
1923
|
+
queryFn: funcer,
|
|
1924
|
+
enabled,
|
|
1925
|
+
retry: false,
|
|
1926
|
+
staleTime: 600000
|
|
1927
|
+
});
|
|
1928
|
+
return { ...query, data: query.data?.data, headers: query.data?.headers };
|
|
1929
|
+
};
|
|
1908
1930
|
export const useCreateNodeCredential = (config) => {
|
|
1909
1931
|
const token = useToken();
|
|
1910
1932
|
const queryClient = useQueryClient();
|