shoal-web-sdk 1.0.33 → 1.0.34
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 +33 -1
- package/dist/sdk/@tanstack/react-query.gen.js +35 -1
- package/dist/sdk/sdk.gen.d.ts +9 -1
- package/dist/sdk/sdk.gen.js +34 -0
- package/dist/sdk/types.gen.d.ts +129 -0
- package/dist/sdk/zod.gen.d.ts +60 -0
- package/dist/sdk/zod.gen.js +49 -0
- package/dist/tanstack-codegen/generated/generated.d.ts +12 -1
- package/dist/tanstack-codegen/generated/generated.js +41 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InfiniteData, type UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import { type Options } from '../sdk.gen';
|
|
3
|
-
import type { CheckSubdomainUniquenessData, CreateBlueprintData, CreateBlueprintError, CreateBlueprintResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateNeonBranchData, CreateNeonBranchError, CreateNeonBranchResponse, CreateNeonDatabaseData, CreateNeonDatabaseError, CreateNeonDatabaseResponse, CreateNeonProjectData, CreateNeonProjectError, CreateNeonProjectResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteBlueprintData, DeleteBlueprintError, DeleteBlueprintResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteNeonDatabaseData, DeleteNeonDatabaseError, DeleteNeonDatabaseResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectOverviewData, GetPublicInviteData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, PreviewBlueprintData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateBlueprintData, UpdateBlueprintError, UpdateBlueprintResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewBlueprintsData } from '../types.gen';
|
|
3
|
+
import type { CheckSubdomainUniquenessData, CreateBlueprintData, CreateBlueprintError, CreateBlueprintResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateNeonBranchData, CreateNeonBranchError, CreateNeonBranchResponse, CreateNeonDatabaseData, CreateNeonDatabaseError, CreateNeonDatabaseResponse, CreateNeonProjectData, CreateNeonProjectError, CreateNeonProjectResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSecretData, CreateSecretError, CreateSecretResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteBlueprintData, DeleteBlueprintError, DeleteBlueprintResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteNeonDatabaseData, DeleteNeonDatabaseError, DeleteNeonDatabaseResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectOverviewData, GetPublicInviteData, GetSecretValueData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, PreviewBlueprintData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateBlueprintData, UpdateBlueprintError, UpdateBlueprintResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewBlueprintsData } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -1151,6 +1151,38 @@ export declare const getProjectOverviewOptions: (options: Options<GetProjectOver
|
|
|
1151
1151
|
* Create an environment inside a project.
|
|
1152
1152
|
*/
|
|
1153
1153
|
export declare const createEnvironmentMutation: (options?: Partial<Options<CreateEnvironmentData>>) => UseMutationOptions<CreateEnvironmentResponse, CreateEnvironmentError, Options<CreateEnvironmentData>>;
|
|
1154
|
+
/**
|
|
1155
|
+
* Save a reference to a GCP secret that has already been created in Secret Manager.
|
|
1156
|
+
*/
|
|
1157
|
+
export declare const createSecretMutation: (options?: Partial<Options<CreateSecretData>>) => UseMutationOptions<CreateSecretResponse, CreateSecretError, Options<CreateSecretData>>;
|
|
1158
|
+
export declare const getSecretValueQueryKey: (options: Options<GetSecretValueData>) => [Pick<Options<GetSecretValueData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1159
|
+
_id: string;
|
|
1160
|
+
_infinite?: boolean;
|
|
1161
|
+
tags?: ReadonlyArray<string>;
|
|
1162
|
+
}];
|
|
1163
|
+
/**
|
|
1164
|
+
* Access a secret's value from GCP Secret Manager. Defaults to the "latest" version.
|
|
1165
|
+
*/
|
|
1166
|
+
export declare const getSecretValueOptions: (options: Options<GetSecretValueData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").SecretValue, Error, import("../types.gen").SecretValue, [Pick<Options<GetSecretValueData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1167
|
+
_id: string;
|
|
1168
|
+
_infinite?: boolean;
|
|
1169
|
+
tags?: ReadonlyArray<string>;
|
|
1170
|
+
}]>, "queryFn"> & {
|
|
1171
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").SecretValue, [Pick<Options<GetSecretValueData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1172
|
+
_id: string;
|
|
1173
|
+
_infinite?: boolean;
|
|
1174
|
+
tags?: ReadonlyArray<string>;
|
|
1175
|
+
}], never> | undefined;
|
|
1176
|
+
} & {
|
|
1177
|
+
queryKey: [Pick<Options<GetSecretValueData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1178
|
+
_id: string;
|
|
1179
|
+
_infinite?: boolean;
|
|
1180
|
+
tags?: ReadonlyArray<string>;
|
|
1181
|
+
}] & {
|
|
1182
|
+
[dataTagSymbol]: import("../types.gen").SecretValue;
|
|
1183
|
+
[dataTagErrorSymbol]: Error;
|
|
1184
|
+
};
|
|
1185
|
+
};
|
|
1154
1186
|
export declare const getEnvironmentOverviewQueryKey: (options: Options<GetEnvironmentOverviewData>) => [Pick<Options<GetEnvironmentOverviewData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1155
1187
|
_id: string;
|
|
1156
1188
|
_infinite?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { checkSubdomainUniqueness, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getBillingPlan, getBillingUsage, getBlueprint, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getGraphOverview, getNodeEnvironmentVariables, getProjectOverview, getPublicInvite, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listNeonBranches, listNeonDatabases, listNeonProjects, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints } from '../sdk.gen';
|
|
4
|
+
import { checkSubdomainUniqueness, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createProject, createSecret, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getBillingPlan, getBillingUsage, getBlueprint, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getGraphOverview, getNodeEnvironmentVariables, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listNeonBranches, listNeonDatabases, listNeonProjects, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints } from '../sdk.gen';
|
|
5
5
|
const createQueryKey = (id, options, infinite, tags) => {
|
|
6
6
|
const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
|
|
7
7
|
if (infinite) {
|
|
@@ -1189,6 +1189,40 @@ export const createEnvironmentMutation = (options) => {
|
|
|
1189
1189
|
};
|
|
1190
1190
|
return mutationOptions;
|
|
1191
1191
|
};
|
|
1192
|
+
/**
|
|
1193
|
+
* Save a reference to a GCP secret that has already been created in Secret Manager.
|
|
1194
|
+
*/
|
|
1195
|
+
export const createSecretMutation = (options) => {
|
|
1196
|
+
const mutationOptions = {
|
|
1197
|
+
mutationFn: async (fnOptions) => {
|
|
1198
|
+
const { data } = await createSecret({
|
|
1199
|
+
...options,
|
|
1200
|
+
...fnOptions,
|
|
1201
|
+
throwOnError: true
|
|
1202
|
+
});
|
|
1203
|
+
return data;
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
return mutationOptions;
|
|
1207
|
+
};
|
|
1208
|
+
export const getSecretValueQueryKey = (options) => createQueryKey('getSecretValue', options);
|
|
1209
|
+
/**
|
|
1210
|
+
* Access a secret's value from GCP Secret Manager. Defaults to the "latest" version.
|
|
1211
|
+
*/
|
|
1212
|
+
export const getSecretValueOptions = (options) => {
|
|
1213
|
+
return queryOptions({
|
|
1214
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1215
|
+
const { data } = await getSecretValue({
|
|
1216
|
+
...options,
|
|
1217
|
+
...queryKey[0],
|
|
1218
|
+
signal,
|
|
1219
|
+
throwOnError: true
|
|
1220
|
+
});
|
|
1221
|
+
return data;
|
|
1222
|
+
},
|
|
1223
|
+
queryKey: getSecretValueQueryKey(options)
|
|
1224
|
+
});
|
|
1225
|
+
};
|
|
1192
1226
|
export const getEnvironmentOverviewQueryKey = (options) => createQueryKey('getEnvironmentOverview', options);
|
|
1193
1227
|
/**
|
|
1194
1228
|
* Get the environment overview.
|
package/dist/sdk/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateBlueprintData, CreateBlueprintErrors, CreateBlueprintResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateNeonBranchData, CreateNeonBranchErrors, CreateNeonBranchResponses, CreateNeonDatabaseData, CreateNeonDatabaseErrors, CreateNeonDatabaseResponses, CreateNeonProjectData, CreateNeonProjectErrors, CreateNeonProjectResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteBlueprintData, DeleteBlueprintErrors, DeleteBlueprintResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseErrors, DeleteNeonDatabaseResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNeonConnectionUriData, FetchNeonConnectionUriErrors, FetchNeonConnectionUriResponses, FetchNeonOrganizationsData, FetchNeonOrganizationsErrors, FetchNeonOrganizationsResponses, FetchNeonRegionsData, FetchNeonRegionsErrors, FetchNeonRegionsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetBlueprintData, GetBlueprintErrors, GetBlueprintResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesM2mData, GetEnvironmentVariablesM2mErrors, GetEnvironmentVariablesM2mResponses, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetNodeEnvironmentVariablesData, GetNodeEnvironmentVariablesErrors, GetNodeEnvironmentVariablesResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpacePropertiesData, GetSpacePropertiesErrors, GetSpacePropertiesResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, GetVersionData, GetVersionErrors, GetVersionM2mData, GetVersionM2mErrors, GetVersionM2mResponses, GetVersionResponses, ImportBlueprintData, ImportBlueprintErrors, ImportBlueprintResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListNeonBranchesData, ListNeonBranchesErrors, ListNeonBranchesResponses, ListNeonDatabasesData, ListNeonDatabasesErrors, ListNeonDatabasesResponses, ListNeonProjectsData, ListNeonProjectsErrors, ListNeonProjectsResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, PreviewBlueprintData, PreviewBlueprintErrors, PreviewBlueprintResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, SetSpacePropertyData, SetSpacePropertyErrors, SetSpacePropertyResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateBlueprintData, UpdateBlueprintErrors, UpdateBlueprintResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mErrors, UpdateDeploymentStatusM2mResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateNodeM2mData, UpdateNodeM2mErrors, UpdateNodeM2mResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, ViewBlueprintsData, ViewBlueprintsErrors, ViewBlueprintsResponses } from './types.gen';
|
|
2
|
+
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateBlueprintData, CreateBlueprintErrors, CreateBlueprintResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateNeonBranchData, CreateNeonBranchErrors, CreateNeonBranchResponses, CreateNeonDatabaseData, CreateNeonDatabaseErrors, CreateNeonDatabaseResponses, CreateNeonProjectData, CreateNeonProjectErrors, CreateNeonProjectResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSecretData, CreateSecretErrors, CreateSecretResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteBlueprintData, DeleteBlueprintErrors, DeleteBlueprintResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseErrors, DeleteNeonDatabaseResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNeonConnectionUriData, FetchNeonConnectionUriErrors, FetchNeonConnectionUriResponses, FetchNeonOrganizationsData, FetchNeonOrganizationsErrors, FetchNeonOrganizationsResponses, FetchNeonRegionsData, FetchNeonRegionsErrors, FetchNeonRegionsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetBlueprintData, GetBlueprintErrors, GetBlueprintResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesM2mData, GetEnvironmentVariablesM2mErrors, GetEnvironmentVariablesM2mResponses, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetNodeEnvironmentVariablesData, GetNodeEnvironmentVariablesErrors, GetNodeEnvironmentVariablesResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, GetSecretValueData, GetSecretValueErrors, GetSecretValueResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpacePropertiesData, GetSpacePropertiesErrors, GetSpacePropertiesResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, GetVersionData, GetVersionErrors, GetVersionM2mData, GetVersionM2mErrors, GetVersionM2mResponses, GetVersionResponses, ImportBlueprintData, ImportBlueprintErrors, ImportBlueprintResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListNeonBranchesData, ListNeonBranchesErrors, ListNeonBranchesResponses, ListNeonDatabasesData, ListNeonDatabasesErrors, ListNeonDatabasesResponses, ListNeonProjectsData, ListNeonProjectsErrors, ListNeonProjectsResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, PreviewBlueprintData, PreviewBlueprintErrors, PreviewBlueprintResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, SetSpacePropertyData, SetSpacePropertyErrors, SetSpacePropertyResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateBlueprintData, UpdateBlueprintErrors, UpdateBlueprintResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mErrors, UpdateDeploymentStatusM2mResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateNodeM2mData, UpdateNodeM2mErrors, UpdateNodeM2mResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, ViewBlueprintsData, ViewBlueprintsErrors, ViewBlueprintsResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -220,6 +220,14 @@ export declare const getProjectOverview: <ThrowOnError extends boolean = false>(
|
|
|
220
220
|
* Create an environment inside a project.
|
|
221
221
|
*/
|
|
222
222
|
export declare const createEnvironment: <ThrowOnError extends boolean = false>(options: Options<CreateEnvironmentData, ThrowOnError>) => import("./client").RequestResult<CreateEnvironmentResponses, CreateEnvironmentErrors, ThrowOnError, "fields">;
|
|
223
|
+
/**
|
|
224
|
+
* Save a reference to a GCP secret that has already been created in Secret Manager.
|
|
225
|
+
*/
|
|
226
|
+
export declare const createSecret: <ThrowOnError extends boolean = false>(options: Options<CreateSecretData, ThrowOnError>) => import("./client").RequestResult<CreateSecretResponses, CreateSecretErrors, ThrowOnError, "fields">;
|
|
227
|
+
/**
|
|
228
|
+
* Access a secret's value from GCP Secret Manager. Defaults to the "latest" version.
|
|
229
|
+
*/
|
|
230
|
+
export declare const getSecretValue: <ThrowOnError extends boolean = false>(options: Options<GetSecretValueData, ThrowOnError>) => import("./client").RequestResult<GetSecretValueResponses, GetSecretValueErrors, ThrowOnError, "fields">;
|
|
223
231
|
/**
|
|
224
232
|
* Get the environment overview.
|
|
225
233
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -843,6 +843,40 @@ export const createEnvironment = (options) => {
|
|
|
843
843
|
}
|
|
844
844
|
});
|
|
845
845
|
};
|
|
846
|
+
/**
|
|
847
|
+
* Save a reference to a GCP secret that has already been created in Secret Manager.
|
|
848
|
+
*/
|
|
849
|
+
export const createSecret = (options) => {
|
|
850
|
+
return (options.client ?? client).post({
|
|
851
|
+
security: [
|
|
852
|
+
{
|
|
853
|
+
scheme: 'bearer',
|
|
854
|
+
type: 'http'
|
|
855
|
+
}
|
|
856
|
+
],
|
|
857
|
+
url: '/auth/{spaceHandle}/{projectHandle}/secrets/create',
|
|
858
|
+
...options,
|
|
859
|
+
headers: {
|
|
860
|
+
'Content-Type': 'application/json',
|
|
861
|
+
...options.headers
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* Access a secret's value from GCP Secret Manager. Defaults to the "latest" version.
|
|
867
|
+
*/
|
|
868
|
+
export const getSecretValue = (options) => {
|
|
869
|
+
return (options.client ?? client).get({
|
|
870
|
+
security: [
|
|
871
|
+
{
|
|
872
|
+
scheme: 'bearer',
|
|
873
|
+
type: 'http'
|
|
874
|
+
}
|
|
875
|
+
],
|
|
876
|
+
url: '/auth/{spaceHandle}/{projectHandle}/secrets/{secretUUID}/value',
|
|
877
|
+
...options
|
|
878
|
+
});
|
|
879
|
+
};
|
|
846
880
|
/**
|
|
847
881
|
* Get the environment overview.
|
|
848
882
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -42,6 +42,32 @@ export type BillingPlanLookupKey = 'free-monthly' | 'pro-monthly' | 'pro-annual'
|
|
|
42
42
|
export type HealthResponse = {
|
|
43
43
|
status: string;
|
|
44
44
|
};
|
|
45
|
+
export type CreateSecret = {
|
|
46
|
+
/**
|
|
47
|
+
* GCP secret id reference.
|
|
48
|
+
*/
|
|
49
|
+
secretId: string;
|
|
50
|
+
/**
|
|
51
|
+
* Client GCP project id.
|
|
52
|
+
*/
|
|
53
|
+
projectId: string;
|
|
54
|
+
};
|
|
55
|
+
export type Secret = {
|
|
56
|
+
id: string;
|
|
57
|
+
/**
|
|
58
|
+
* GCP secret id reference.
|
|
59
|
+
*/
|
|
60
|
+
secretId: string;
|
|
61
|
+
/**
|
|
62
|
+
* Client GCP project id.
|
|
63
|
+
*/
|
|
64
|
+
projectId: string;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
};
|
|
67
|
+
export type SecretValue = {
|
|
68
|
+
value: string;
|
|
69
|
+
version: string;
|
|
70
|
+
};
|
|
45
71
|
export type ErrorCode = 'UNKNOWN_ERROR' | 'AUTHORISATION_ERROR' | 'CONTENT_NOT_FOUND' | 'INVALID_PAGINATION' | 'INVALID_REQUEST_BODY' | 'INVALID_PATH_PARAM' | 'MISSING_CONTEXT_VALUE' | 'CONSTRAINT_ERROR' | 'PROJECT_CREATION_ERROR' | 'INVALID_QUERY_PARAM' | 'EXPIRED' | 'IDENTITY_NOT_FOUND';
|
|
46
72
|
export type ErrorResponse = {
|
|
47
73
|
message: string;
|
|
@@ -881,6 +907,14 @@ export type AppKeyRefCode = 'github-app';
|
|
|
881
907
|
* GitHub OAuth access token for the authenticated Kinde user.
|
|
882
908
|
*/
|
|
883
909
|
export type GitHubTokenHeader = string;
|
|
910
|
+
/**
|
|
911
|
+
* Secret row UUID.
|
|
912
|
+
*/
|
|
913
|
+
export type SecretUuid = string;
|
|
914
|
+
/**
|
|
915
|
+
* Secret version to access (e.g. a version number or "latest"). Defaults to "latest".
|
|
916
|
+
*/
|
|
917
|
+
export type SecretVersion = string;
|
|
884
918
|
export type GetServiceHealthData = {
|
|
885
919
|
body?: never;
|
|
886
920
|
path?: never;
|
|
@@ -3002,6 +3036,101 @@ export type CreateEnvironmentResponses = {
|
|
|
3002
3036
|
201: EnvironmentOverview;
|
|
3003
3037
|
};
|
|
3004
3038
|
export type CreateEnvironmentResponse = CreateEnvironmentResponses[keyof CreateEnvironmentResponses];
|
|
3039
|
+
export type CreateSecretData = {
|
|
3040
|
+
body: CreateSecret;
|
|
3041
|
+
path: {
|
|
3042
|
+
/**
|
|
3043
|
+
* The space handle. This must be globally unique.
|
|
3044
|
+
*/
|
|
3045
|
+
spaceHandle: string;
|
|
3046
|
+
/**
|
|
3047
|
+
* A project name. This must be unique to a space.
|
|
3048
|
+
*/
|
|
3049
|
+
projectHandle: string;
|
|
3050
|
+
};
|
|
3051
|
+
query?: never;
|
|
3052
|
+
url: '/auth/{spaceHandle}/{projectHandle}/secrets/create';
|
|
3053
|
+
};
|
|
3054
|
+
export type CreateSecretErrors = {
|
|
3055
|
+
/**
|
|
3056
|
+
* Bad request.
|
|
3057
|
+
*/
|
|
3058
|
+
400: ErrorResponse;
|
|
3059
|
+
/**
|
|
3060
|
+
* Unauthorised user.
|
|
3061
|
+
*/
|
|
3062
|
+
401: ErrorResponse;
|
|
3063
|
+
/**
|
|
3064
|
+
* Invalid credentials.
|
|
3065
|
+
*/
|
|
3066
|
+
403: ErrorResponse;
|
|
3067
|
+
/**
|
|
3068
|
+
* Secret reference already exists.
|
|
3069
|
+
*/
|
|
3070
|
+
409: ErrorResponse;
|
|
3071
|
+
/**
|
|
3072
|
+
* Unexpected error.
|
|
3073
|
+
*/
|
|
3074
|
+
500: ErrorResponse;
|
|
3075
|
+
};
|
|
3076
|
+
export type CreateSecretError = CreateSecretErrors[keyof CreateSecretErrors];
|
|
3077
|
+
export type CreateSecretResponses = {
|
|
3078
|
+
/**
|
|
3079
|
+
* Secret reference created.
|
|
3080
|
+
*/
|
|
3081
|
+
201: Secret;
|
|
3082
|
+
};
|
|
3083
|
+
export type CreateSecretResponse = CreateSecretResponses[keyof CreateSecretResponses];
|
|
3084
|
+
export type GetSecretValueData = {
|
|
3085
|
+
body?: never;
|
|
3086
|
+
path: {
|
|
3087
|
+
/**
|
|
3088
|
+
* The space handle. This must be globally unique.
|
|
3089
|
+
*/
|
|
3090
|
+
spaceHandle: string;
|
|
3091
|
+
/**
|
|
3092
|
+
* A project name. This must be unique to a space.
|
|
3093
|
+
*/
|
|
3094
|
+
projectHandle: string;
|
|
3095
|
+
/**
|
|
3096
|
+
* Secret row UUID.
|
|
3097
|
+
*/
|
|
3098
|
+
secretUUID: string;
|
|
3099
|
+
};
|
|
3100
|
+
query?: {
|
|
3101
|
+
/**
|
|
3102
|
+
* Secret version to access (e.g. a version number or "latest"). Defaults to "latest".
|
|
3103
|
+
*/
|
|
3104
|
+
version?: string;
|
|
3105
|
+
};
|
|
3106
|
+
url: '/auth/{spaceHandle}/{projectHandle}/secrets/{secretUUID}/value';
|
|
3107
|
+
};
|
|
3108
|
+
export type GetSecretValueErrors = {
|
|
3109
|
+
/**
|
|
3110
|
+
* Unauthorised user.
|
|
3111
|
+
*/
|
|
3112
|
+
401: ErrorResponse;
|
|
3113
|
+
/**
|
|
3114
|
+
* Invalid credentials.
|
|
3115
|
+
*/
|
|
3116
|
+
403: ErrorResponse;
|
|
3117
|
+
/**
|
|
3118
|
+
* Related content not found.
|
|
3119
|
+
*/
|
|
3120
|
+
404: ErrorResponse;
|
|
3121
|
+
/**
|
|
3122
|
+
* Unexpected error.
|
|
3123
|
+
*/
|
|
3124
|
+
500: ErrorResponse;
|
|
3125
|
+
};
|
|
3126
|
+
export type GetSecretValueError = GetSecretValueErrors[keyof GetSecretValueErrors];
|
|
3127
|
+
export type GetSecretValueResponses = {
|
|
3128
|
+
/**
|
|
3129
|
+
* Secret value.
|
|
3130
|
+
*/
|
|
3131
|
+
200: SecretValue;
|
|
3132
|
+
};
|
|
3133
|
+
export type GetSecretValueResponse = GetSecretValueResponses[keyof GetSecretValueResponses];
|
|
3005
3134
|
export type GetEnvironmentOverviewData = {
|
|
3006
3135
|
body?: never;
|
|
3007
3136
|
path: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -61,6 +61,20 @@ export declare const zBillingPlanLookupKey: z.ZodEnum<{
|
|
|
61
61
|
export declare const zHealthResponse: z.ZodObject<{
|
|
62
62
|
status: z.ZodString;
|
|
63
63
|
}, z.core.$strip>;
|
|
64
|
+
export declare const zCreateSecret: z.ZodObject<{
|
|
65
|
+
secretId: z.ZodString;
|
|
66
|
+
projectId: z.ZodString;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export declare const zSecret: z.ZodObject<{
|
|
69
|
+
id: z.ZodUUID;
|
|
70
|
+
secretId: z.ZodString;
|
|
71
|
+
projectId: z.ZodString;
|
|
72
|
+
createdAt: z.ZodISODateTime;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export declare const zSecretValue: z.ZodObject<{
|
|
75
|
+
value: z.ZodString;
|
|
76
|
+
version: z.ZodString;
|
|
77
|
+
}, z.core.$strip>;
|
|
64
78
|
export declare const zErrorCode: z.ZodEnum<{
|
|
65
79
|
UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
66
80
|
AUTHORISATION_ERROR: "AUTHORISATION_ERROR";
|
|
@@ -1674,6 +1688,14 @@ export declare const zAppKeyRefCode: z.ZodEnum<{
|
|
|
1674
1688
|
* GitHub OAuth access token for the authenticated Kinde user.
|
|
1675
1689
|
*/
|
|
1676
1690
|
export declare const zGitHubTokenHeader: z.ZodString;
|
|
1691
|
+
/**
|
|
1692
|
+
* Secret row UUID.
|
|
1693
|
+
*/
|
|
1694
|
+
export declare const zSecretUuid: z.ZodUUID;
|
|
1695
|
+
/**
|
|
1696
|
+
* Secret version to access (e.g. a version number or "latest"). Defaults to "latest".
|
|
1697
|
+
*/
|
|
1698
|
+
export declare const zSecretVersion: z.ZodString;
|
|
1677
1699
|
export declare const zGetServiceHealthData: z.ZodObject<{
|
|
1678
1700
|
body: z.ZodOptional<z.ZodNever>;
|
|
1679
1701
|
path: z.ZodOptional<z.ZodNever>;
|
|
@@ -3559,6 +3581,44 @@ export declare const zCreateEnvironmentResponse: z.ZodObject<{
|
|
|
3559
3581
|
versions: z.ZodInt;
|
|
3560
3582
|
blueprintId: z.ZodOptional<z.ZodUUID>;
|
|
3561
3583
|
}, z.core.$strip>;
|
|
3584
|
+
export declare const zCreateSecretData: z.ZodObject<{
|
|
3585
|
+
body: z.ZodObject<{
|
|
3586
|
+
secretId: z.ZodString;
|
|
3587
|
+
projectId: z.ZodString;
|
|
3588
|
+
}, z.core.$strip>;
|
|
3589
|
+
path: z.ZodObject<{
|
|
3590
|
+
spaceHandle: z.ZodString;
|
|
3591
|
+
projectHandle: z.ZodString;
|
|
3592
|
+
}, z.core.$strip>;
|
|
3593
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
3594
|
+
}, z.core.$strip>;
|
|
3595
|
+
/**
|
|
3596
|
+
* Secret reference created.
|
|
3597
|
+
*/
|
|
3598
|
+
export declare const zCreateSecretResponse: z.ZodObject<{
|
|
3599
|
+
id: z.ZodUUID;
|
|
3600
|
+
secretId: z.ZodString;
|
|
3601
|
+
projectId: z.ZodString;
|
|
3602
|
+
createdAt: z.ZodISODateTime;
|
|
3603
|
+
}, z.core.$strip>;
|
|
3604
|
+
export declare const zGetSecretValueData: z.ZodObject<{
|
|
3605
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
3606
|
+
path: z.ZodObject<{
|
|
3607
|
+
spaceHandle: z.ZodString;
|
|
3608
|
+
projectHandle: z.ZodString;
|
|
3609
|
+
secretUUID: z.ZodUUID;
|
|
3610
|
+
}, z.core.$strip>;
|
|
3611
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
3612
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3613
|
+
}, z.core.$strip>>;
|
|
3614
|
+
}, z.core.$strip>;
|
|
3615
|
+
/**
|
|
3616
|
+
* Secret value.
|
|
3617
|
+
*/
|
|
3618
|
+
export declare const zGetSecretValueResponse: z.ZodObject<{
|
|
3619
|
+
value: z.ZodString;
|
|
3620
|
+
version: z.ZodString;
|
|
3621
|
+
}, z.core.$strip>;
|
|
3562
3622
|
export declare const zGetEnvironmentOverviewData: z.ZodObject<{
|
|
3563
3623
|
body: z.ZodOptional<z.ZodNever>;
|
|
3564
3624
|
path: z.ZodObject<{
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -52,6 +52,20 @@ export const zBillingPlanLookupKey = z.enum([
|
|
|
52
52
|
export const zHealthResponse = z.object({
|
|
53
53
|
status: z.string()
|
|
54
54
|
});
|
|
55
|
+
export const zCreateSecret = z.object({
|
|
56
|
+
secretId: z.string(),
|
|
57
|
+
projectId: z.string()
|
|
58
|
+
});
|
|
59
|
+
export const zSecret = z.object({
|
|
60
|
+
id: z.uuid(),
|
|
61
|
+
secretId: z.string(),
|
|
62
|
+
projectId: z.string(),
|
|
63
|
+
createdAt: z.iso.datetime()
|
|
64
|
+
});
|
|
65
|
+
export const zSecretValue = z.object({
|
|
66
|
+
value: z.string(),
|
|
67
|
+
version: z.string()
|
|
68
|
+
});
|
|
55
69
|
export const zErrorCode = z.enum([
|
|
56
70
|
'UNKNOWN_ERROR',
|
|
57
71
|
'AUTHORISATION_ERROR',
|
|
@@ -874,6 +888,14 @@ export const zAppKeyRefCode = z.enum([
|
|
|
874
888
|
* GitHub OAuth access token for the authenticated Kinde user.
|
|
875
889
|
*/
|
|
876
890
|
export const zGitHubTokenHeader = z.string();
|
|
891
|
+
/**
|
|
892
|
+
* Secret row UUID.
|
|
893
|
+
*/
|
|
894
|
+
export const zSecretUuid = z.uuid();
|
|
895
|
+
/**
|
|
896
|
+
* Secret version to access (e.g. a version number or "latest"). Defaults to "latest".
|
|
897
|
+
*/
|
|
898
|
+
export const zSecretVersion = z.string();
|
|
877
899
|
export const zGetServiceHealthData = z.object({
|
|
878
900
|
body: z.optional(z.never()),
|
|
879
901
|
path: z.optional(z.never()),
|
|
@@ -1469,6 +1491,33 @@ export const zCreateEnvironmentData = z.object({
|
|
|
1469
1491
|
* Successfully created an environment inside a project.
|
|
1470
1492
|
*/
|
|
1471
1493
|
export const zCreateEnvironmentResponse = zEnvironmentOverview;
|
|
1494
|
+
export const zCreateSecretData = z.object({
|
|
1495
|
+
body: zCreateSecret,
|
|
1496
|
+
path: z.object({
|
|
1497
|
+
spaceHandle: z.string(),
|
|
1498
|
+
projectHandle: z.string()
|
|
1499
|
+
}),
|
|
1500
|
+
query: z.optional(z.never())
|
|
1501
|
+
});
|
|
1502
|
+
/**
|
|
1503
|
+
* Secret reference created.
|
|
1504
|
+
*/
|
|
1505
|
+
export const zCreateSecretResponse = zSecret;
|
|
1506
|
+
export const zGetSecretValueData = z.object({
|
|
1507
|
+
body: z.optional(z.never()),
|
|
1508
|
+
path: z.object({
|
|
1509
|
+
spaceHandle: z.string(),
|
|
1510
|
+
projectHandle: z.string(),
|
|
1511
|
+
secretUUID: z.uuid()
|
|
1512
|
+
}),
|
|
1513
|
+
query: z.optional(z.object({
|
|
1514
|
+
version: z.optional(z.string())
|
|
1515
|
+
}))
|
|
1516
|
+
});
|
|
1517
|
+
/**
|
|
1518
|
+
* Secret value.
|
|
1519
|
+
*/
|
|
1520
|
+
export const zGetSecretValueResponse = zSecretValue;
|
|
1472
1521
|
export const zGetEnvironmentOverviewData = z.object({
|
|
1473
1522
|
body: z.optional(z.never()),
|
|
1474
1523
|
path: z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNeonConnectionUriData, ListNeonProjectsData, CreateNeonProjectData, CreateNeonProjectResponses, ListNeonBranchesData, CreateNeonBranchData, CreateNeonBranchResponses, ListNeonDatabasesData, CreateNeonDatabaseData, CreateNeonDatabaseResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseResponses, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, PreviewBlueprintData, ViewBlueprintsData, GetBlueprintData, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, GetNodeEnvironmentVariablesData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData, GetSpacePropertiesData, SetSpacePropertyData, SetSpacePropertyResponses } from "../../sdk/types.gen";
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNeonConnectionUriData, ListNeonProjectsData, CreateNeonProjectData, CreateNeonProjectResponses, ListNeonBranchesData, CreateNeonBranchData, CreateNeonBranchResponses, ListNeonDatabasesData, CreateNeonDatabaseData, CreateNeonDatabaseResponses, DeleteNeonDatabaseData, DeleteNeonDatabaseResponses, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, PreviewBlueprintData, ViewBlueprintsData, GetBlueprintData, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, CreateSecretData, CreateSecretResponses, GetSecretValueData, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, GetNodeEnvironmentVariablesData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData, GetSpacePropertiesData, SetSpacePropertyData, SetSpacePropertyResponses } from "../../sdk/types.gen";
|
|
4
4
|
export declare const useGetServiceHealth: (options?: Omit<GetServiceHealthData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").HealthResponse | undefined, Error>;
|
|
@@ -264,6 +264,17 @@ export declare const useCreateEnvironment: (config?: {
|
|
|
264
264
|
data: import("../../sdk/types.gen").EnvironmentOverview | undefined;
|
|
265
265
|
headers: Headers;
|
|
266
266
|
}, unknown, Omit<CreateEnvironmentData, "url">, unknown>;
|
|
267
|
+
export declare const useCreateSecret: (config?: {
|
|
268
|
+
onSuccess?: (data: GetSuccessResponse<CreateSecretResponses>, headers: Headers) => void;
|
|
269
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
270
|
+
retry?: boolean;
|
|
271
|
+
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
272
|
+
data: import("../../sdk/types.gen").Secret | undefined;
|
|
273
|
+
headers: Headers;
|
|
274
|
+
}, unknown, Omit<CreateSecretData, "url">, unknown>;
|
|
275
|
+
export declare const useGetSecretValue: (options: Omit<GetSecretValueData, "url"> & {
|
|
276
|
+
enabled?: boolean;
|
|
277
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").SecretValue | undefined, Error>;
|
|
267
278
|
export declare const useGetEnvironmentOverview: (options: Omit<GetEnvironmentOverviewData, "url"> & {
|
|
268
279
|
enabled?: boolean;
|
|
269
280
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").EnvironmentOverview | undefined, Error>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, fetchNeonOrganizations, fetchNeonRegions, fetchNeonConnectionUri, listNeonProjects, createNeonProject, listNeonBranches, createNeonBranch, listNeonDatabases, createNeonDatabase, deleteNeonDatabase, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, previewBlueprint, viewBlueprints, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, getNodeEnvironmentVariables, requestSignedUploadUrl, checkSubdomainUniqueness, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices, getSpaceProperties, setSpaceProperty } from "../../sdk/sdk.gen";
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, fetchNeonOrganizations, fetchNeonRegions, fetchNeonConnectionUri, listNeonProjects, createNeonProject, listNeonBranches, createNeonBranch, listNeonDatabases, createNeonDatabase, deleteNeonDatabase, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, previewBlueprint, viewBlueprints, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, createSecret, getSecretValue, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, getNodeEnvironmentVariables, requestSignedUploadUrl, checkSubdomainUniqueness, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices, getSpaceProperties, setSpaceProperty } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -1012,6 +1012,46 @@ export const useCreateEnvironment = (config) => {
|
|
|
1012
1012
|
retry: config?.retry
|
|
1013
1013
|
});
|
|
1014
1014
|
};
|
|
1015
|
+
export const useCreateSecret = (config) => {
|
|
1016
|
+
const token = useToken();
|
|
1017
|
+
const queryClient = useQueryClient();
|
|
1018
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/secrets/create" };
|
|
1019
|
+
const funcer = async (options) => {
|
|
1020
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
1021
|
+
const res = await createSecret({ ...opts, ...options, auth });
|
|
1022
|
+
return { data: res.data, headers: res.response.headers };
|
|
1023
|
+
};
|
|
1024
|
+
return useMutation({
|
|
1025
|
+
mutationFn: funcer,
|
|
1026
|
+
onSuccess: (res, options, c, ctx) => {
|
|
1027
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, "secrets", "create"] });
|
|
1028
|
+
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
1029
|
+
},
|
|
1030
|
+
onError: config?.onError,
|
|
1031
|
+
retry: config?.retry
|
|
1032
|
+
});
|
|
1033
|
+
};
|
|
1034
|
+
export const useGetSecretValue = (options) => {
|
|
1035
|
+
const token = useToken();
|
|
1036
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
1037
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/secrets/{secretUUID}/value" };
|
|
1038
|
+
const funcer = async () => {
|
|
1039
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
1040
|
+
if (isPromise(token) && !token)
|
|
1041
|
+
return;
|
|
1042
|
+
const res = await getSecretValue({ ...opts, ...rest, auth });
|
|
1043
|
+
return res.data;
|
|
1044
|
+
};
|
|
1045
|
+
if (!token)
|
|
1046
|
+
enabled = false;
|
|
1047
|
+
return useQuery({
|
|
1048
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, "secrets", options?.path?.secretUUID, "value", options.query ?? {}],
|
|
1049
|
+
queryFn: funcer,
|
|
1050
|
+
enabled,
|
|
1051
|
+
retry: false,
|
|
1052
|
+
staleTime: 600000
|
|
1053
|
+
});
|
|
1054
|
+
};
|
|
1015
1055
|
export const useGetEnvironmentOverview = (options) => {
|
|
1016
1056
|
const token = useToken();
|
|
1017
1057
|
let { enabled, ...rest } = options || { enabled: true };
|