shoal-web-sdk 0.0.133 → 0.0.135
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 +41 -1
- package/dist/sdk/@tanstack/react-query.gen.js +67 -1
- package/dist/sdk/sdk.gen.d.ts +17 -1
- package/dist/sdk/sdk.gen.js +68 -0
- package/dist/sdk/types.gen.d.ts +213 -0
- package/dist/sdk/zod.gen.d.ts +139 -0
- package/dist/sdk/zod.gen.js +67 -0
- package/dist/tanstack-codegen/generated/generated.d.ts +19 -1
- package/dist/tanstack-codegen/generated/generated.js +79 -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 { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, VersionStatusData } from '../types.gen';
|
|
3
|
+
import type { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, VersionStatusData } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -772,6 +772,46 @@ export declare const getEnvironmentOverviewOptions: (options: Options<GetEnviron
|
|
|
772
772
|
[dataTagErrorSymbol]: Error;
|
|
773
773
|
};
|
|
774
774
|
};
|
|
775
|
+
/**
|
|
776
|
+
* Delete an environment variable.
|
|
777
|
+
*/
|
|
778
|
+
export declare const deleteEnvironmentVariableMutation: (options?: Partial<Options<DeleteEnvironmentVariableData>>) => UseMutationOptions<DeleteEnvironmentVariableResponse, DeleteEnvironmentVariableError, Options<DeleteEnvironmentVariableData>>;
|
|
779
|
+
export declare const getEnvironmentVariablesQueryKey: (options: Options<GetEnvironmentVariablesData>) => [Pick<Options<GetEnvironmentVariablesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
780
|
+
_id: string;
|
|
781
|
+
_infinite?: boolean;
|
|
782
|
+
tags?: ReadonlyArray<string>;
|
|
783
|
+
}];
|
|
784
|
+
/**
|
|
785
|
+
* Get the environment variables.
|
|
786
|
+
*/
|
|
787
|
+
export declare const getEnvironmentVariablesOptions: (options: Options<GetEnvironmentVariablesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").EnvironmentVariables, Error, import("../types.gen").EnvironmentVariables, [Pick<Options<GetEnvironmentVariablesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
788
|
+
_id: string;
|
|
789
|
+
_infinite?: boolean;
|
|
790
|
+
tags?: ReadonlyArray<string>;
|
|
791
|
+
}]>, "queryFn"> & {
|
|
792
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").EnvironmentVariables, [Pick<Options<GetEnvironmentVariablesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
793
|
+
_id: string;
|
|
794
|
+
_infinite?: boolean;
|
|
795
|
+
tags?: ReadonlyArray<string>;
|
|
796
|
+
}], never> | undefined;
|
|
797
|
+
} & {
|
|
798
|
+
queryKey: [Pick<Options<GetEnvironmentVariablesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
799
|
+
_id: string;
|
|
800
|
+
_infinite?: boolean;
|
|
801
|
+
tags?: ReadonlyArray<string>;
|
|
802
|
+
}] & {
|
|
803
|
+
[dataTagSymbol]: import("../types.gen").EnvironmentVariables;
|
|
804
|
+
[dataTagErrorSymbol]: Error;
|
|
805
|
+
};
|
|
806
|
+
};
|
|
807
|
+
/**
|
|
808
|
+
* Update an environment variable given the key and value in the request body.
|
|
809
|
+
*/
|
|
810
|
+
export declare const updateEnvironmentVariableMutation: (options?: Partial<Options<UpdateEnvironmentVariableData>>) => UseMutationOptions<unknown, UpdateEnvironmentVariableError, Options<UpdateEnvironmentVariableData>>;
|
|
811
|
+
/**
|
|
812
|
+
* Create an environment variable. These are globally unique per project environment.
|
|
813
|
+
*/
|
|
814
|
+
export declare const createEnvironmentVariableMutation: (options?: Partial<Options<CreateEnvironmentVariableData>>) => UseMutationOptions<unknown, CreateEnvironmentVariableError, Options<CreateEnvironmentVariableData>>;
|
|
775
815
|
export declare const getGraphOverviewQueryKey: (options: Options<GetGraphOverviewData>) => [Pick<Options<GetGraphOverviewData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
776
816
|
_id: string;
|
|
777
817
|
_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 { createEnvironment, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateGraphM2M, updateGraphState, updateUsername, updateUserProfile, versionStatus } from '../sdk.gen';
|
|
4
|
+
import { createEnvironment, createEnvironmentVariable, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteEnvironmentVariable, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateUsername, updateUserProfile, versionStatus } 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) {
|
|
@@ -843,6 +843,72 @@ export const getEnvironmentOverviewOptions = (options) => {
|
|
|
843
843
|
queryKey: getEnvironmentOverviewQueryKey(options)
|
|
844
844
|
});
|
|
845
845
|
};
|
|
846
|
+
/**
|
|
847
|
+
* Delete an environment variable.
|
|
848
|
+
*/
|
|
849
|
+
export const deleteEnvironmentVariableMutation = (options) => {
|
|
850
|
+
const mutationOptions = {
|
|
851
|
+
mutationFn: async (fnOptions) => {
|
|
852
|
+
const { data } = await deleteEnvironmentVariable({
|
|
853
|
+
...options,
|
|
854
|
+
...fnOptions,
|
|
855
|
+
throwOnError: true
|
|
856
|
+
});
|
|
857
|
+
return data;
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
return mutationOptions;
|
|
861
|
+
};
|
|
862
|
+
export const getEnvironmentVariablesQueryKey = (options) => createQueryKey('getEnvironmentVariables', options);
|
|
863
|
+
/**
|
|
864
|
+
* Get the environment variables.
|
|
865
|
+
*/
|
|
866
|
+
export const getEnvironmentVariablesOptions = (options) => {
|
|
867
|
+
return queryOptions({
|
|
868
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
869
|
+
const { data } = await getEnvironmentVariables({
|
|
870
|
+
...options,
|
|
871
|
+
...queryKey[0],
|
|
872
|
+
signal,
|
|
873
|
+
throwOnError: true
|
|
874
|
+
});
|
|
875
|
+
return data;
|
|
876
|
+
},
|
|
877
|
+
queryKey: getEnvironmentVariablesQueryKey(options)
|
|
878
|
+
});
|
|
879
|
+
};
|
|
880
|
+
/**
|
|
881
|
+
* Update an environment variable given the key and value in the request body.
|
|
882
|
+
*/
|
|
883
|
+
export const updateEnvironmentVariableMutation = (options) => {
|
|
884
|
+
const mutationOptions = {
|
|
885
|
+
mutationFn: async (fnOptions) => {
|
|
886
|
+
const { data } = await updateEnvironmentVariable({
|
|
887
|
+
...options,
|
|
888
|
+
...fnOptions,
|
|
889
|
+
throwOnError: true
|
|
890
|
+
});
|
|
891
|
+
return data;
|
|
892
|
+
}
|
|
893
|
+
};
|
|
894
|
+
return mutationOptions;
|
|
895
|
+
};
|
|
896
|
+
/**
|
|
897
|
+
* Create an environment variable. These are globally unique per project environment.
|
|
898
|
+
*/
|
|
899
|
+
export const createEnvironmentVariableMutation = (options) => {
|
|
900
|
+
const mutationOptions = {
|
|
901
|
+
mutationFn: async (fnOptions) => {
|
|
902
|
+
const { data } = await createEnvironmentVariable({
|
|
903
|
+
...options,
|
|
904
|
+
...fnOptions,
|
|
905
|
+
throwOnError: true
|
|
906
|
+
});
|
|
907
|
+
return data;
|
|
908
|
+
}
|
|
909
|
+
};
|
|
910
|
+
return mutationOptions;
|
|
911
|
+
};
|
|
846
912
|
export const getGraphOverviewQueryKey = (options) => createQueryKey('getGraphOverview', options);
|
|
847
913
|
/**
|
|
848
914
|
* Get a graph for a version inside an environment.
|
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 { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, VersionStatusData, VersionStatusErrors, VersionStatusResponses } from './types.gen';
|
|
2
|
+
import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, VersionStatusData, VersionStatusErrors, VersionStatusResponses } 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
|
|
@@ -153,6 +153,22 @@ export declare const createEnvironment: <ThrowOnError extends boolean = false>(o
|
|
|
153
153
|
* Get the environment overview.
|
|
154
154
|
*/
|
|
155
155
|
export declare const getEnvironmentOverview: <ThrowOnError extends boolean = false>(options: Options<GetEnvironmentOverviewData, ThrowOnError>) => import("./client").RequestResult<GetEnvironmentOverviewResponses, GetEnvironmentOverviewErrors, ThrowOnError, "fields">;
|
|
156
|
+
/**
|
|
157
|
+
* Delete an environment variable.
|
|
158
|
+
*/
|
|
159
|
+
export declare const deleteEnvironmentVariable: <ThrowOnError extends boolean = false>(options: Options<DeleteEnvironmentVariableData, ThrowOnError>) => import("./client").RequestResult<DeleteEnvironmentVariableResponses, DeleteEnvironmentVariableErrors, ThrowOnError, "fields">;
|
|
160
|
+
/**
|
|
161
|
+
* Get the environment variables.
|
|
162
|
+
*/
|
|
163
|
+
export declare const getEnvironmentVariables: <ThrowOnError extends boolean = false>(options: Options<GetEnvironmentVariablesData, ThrowOnError>) => import("./client").RequestResult<GetEnvironmentVariablesResponses, GetEnvironmentVariablesErrors, ThrowOnError, "fields">;
|
|
164
|
+
/**
|
|
165
|
+
* Update an environment variable given the key and value in the request body.
|
|
166
|
+
*/
|
|
167
|
+
export declare const updateEnvironmentVariable: <ThrowOnError extends boolean = false>(options: Options<UpdateEnvironmentVariableData, ThrowOnError>) => import("./client").RequestResult<UpdateEnvironmentVariableResponses, UpdateEnvironmentVariableErrors, ThrowOnError, "fields">;
|
|
168
|
+
/**
|
|
169
|
+
* Create an environment variable. These are globally unique per project environment.
|
|
170
|
+
*/
|
|
171
|
+
export declare const createEnvironmentVariable: <ThrowOnError extends boolean = false>(options: Options<CreateEnvironmentVariableData, ThrowOnError>) => import("./client").RequestResult<CreateEnvironmentVariableResponses, CreateEnvironmentVariableErrors, ThrowOnError, "fields">;
|
|
156
172
|
/**
|
|
157
173
|
* Get a graph for a version inside an environment.
|
|
158
174
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -561,6 +561,74 @@ export const getEnvironmentOverview = (options) => {
|
|
|
561
561
|
...options
|
|
562
562
|
});
|
|
563
563
|
};
|
|
564
|
+
/**
|
|
565
|
+
* Delete an environment variable.
|
|
566
|
+
*/
|
|
567
|
+
export const deleteEnvironmentVariable = (options) => {
|
|
568
|
+
return (options.client ?? client).delete({
|
|
569
|
+
security: [
|
|
570
|
+
{
|
|
571
|
+
scheme: 'bearer',
|
|
572
|
+
type: 'http'
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables',
|
|
576
|
+
...options
|
|
577
|
+
});
|
|
578
|
+
};
|
|
579
|
+
/**
|
|
580
|
+
* Get the environment variables.
|
|
581
|
+
*/
|
|
582
|
+
export const getEnvironmentVariables = (options) => {
|
|
583
|
+
return (options.client ?? client).get({
|
|
584
|
+
security: [
|
|
585
|
+
{
|
|
586
|
+
scheme: 'bearer',
|
|
587
|
+
type: 'http'
|
|
588
|
+
}
|
|
589
|
+
],
|
|
590
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables',
|
|
591
|
+
...options
|
|
592
|
+
});
|
|
593
|
+
};
|
|
594
|
+
/**
|
|
595
|
+
* Update an environment variable given the key and value in the request body.
|
|
596
|
+
*/
|
|
597
|
+
export const updateEnvironmentVariable = (options) => {
|
|
598
|
+
return (options.client ?? client).patch({
|
|
599
|
+
security: [
|
|
600
|
+
{
|
|
601
|
+
scheme: 'bearer',
|
|
602
|
+
type: 'http'
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables',
|
|
606
|
+
...options,
|
|
607
|
+
headers: {
|
|
608
|
+
'Content-Type': 'application/json',
|
|
609
|
+
...options.headers
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Create an environment variable. These are globally unique per project environment.
|
|
615
|
+
*/
|
|
616
|
+
export const createEnvironmentVariable = (options) => {
|
|
617
|
+
return (options.client ?? client).post({
|
|
618
|
+
security: [
|
|
619
|
+
{
|
|
620
|
+
scheme: 'bearer',
|
|
621
|
+
type: 'http'
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables',
|
|
625
|
+
...options,
|
|
626
|
+
headers: {
|
|
627
|
+
'Content-Type': 'application/json',
|
|
628
|
+
...options.headers
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
};
|
|
564
632
|
/**
|
|
565
633
|
* Get a graph for a version inside an environment.
|
|
566
634
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export type ClientOptions = {
|
|
2
2
|
baseUrl: 'http://localhost:8080/core-service' | 'https://api-dev.shoalstack.com/core-service' | (string & {});
|
|
3
3
|
};
|
|
4
|
+
export type EnvironmentVariables = {
|
|
5
|
+
vars: Array<EnvironmentVariable>;
|
|
6
|
+
};
|
|
7
|
+
export type EnvironmentVariable = {
|
|
8
|
+
key: string;
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
4
11
|
export type VersionStatus = 'pending' | 'queued' | 'building' | 'deploying' | 'post-deploy-steps' | 'succeeded' | 'failed' | 'cancelled';
|
|
5
12
|
export type VersionStatusInfo = {
|
|
6
13
|
status: VersionStatus;
|
|
@@ -86,11 +93,14 @@ export type SpaceOverview = {
|
|
|
86
93
|
export type SpaceOrgCodeResponse = {
|
|
87
94
|
orgCode: string;
|
|
88
95
|
};
|
|
96
|
+
export type EnvironmentStatus = 'idle' | 'deploying';
|
|
89
97
|
export type EnvironmentOverview = {
|
|
90
98
|
id: string;
|
|
91
99
|
name: string;
|
|
92
100
|
handle: string;
|
|
93
101
|
description: string;
|
|
102
|
+
deployingVersionID?: string;
|
|
103
|
+
status: EnvironmentStatus;
|
|
94
104
|
createdAt: string;
|
|
95
105
|
updatedAt: string;
|
|
96
106
|
versions: number;
|
|
@@ -500,6 +510,10 @@ export type PlanPriceResponse = {
|
|
|
500
510
|
*/
|
|
501
511
|
interval: string;
|
|
502
512
|
};
|
|
513
|
+
/**
|
|
514
|
+
* Environment variable name.
|
|
515
|
+
*/
|
|
516
|
+
export type EnvironmentVariableKey = string;
|
|
503
517
|
/**
|
|
504
518
|
* Expiry query.
|
|
505
519
|
*/
|
|
@@ -1942,6 +1956,205 @@ export type GetEnvironmentOverviewResponses = {
|
|
|
1942
1956
|
200: EnvironmentOverview;
|
|
1943
1957
|
};
|
|
1944
1958
|
export type GetEnvironmentOverviewResponse = GetEnvironmentOverviewResponses[keyof GetEnvironmentOverviewResponses];
|
|
1959
|
+
export type DeleteEnvironmentVariableData = {
|
|
1960
|
+
body?: never;
|
|
1961
|
+
path: {
|
|
1962
|
+
/**
|
|
1963
|
+
* The space handle. This must be globally unique.
|
|
1964
|
+
*/
|
|
1965
|
+
spaceHandle: string;
|
|
1966
|
+
/**
|
|
1967
|
+
* A project name. This must be unique to a space.
|
|
1968
|
+
*/
|
|
1969
|
+
projectHandle: string;
|
|
1970
|
+
/**
|
|
1971
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
1972
|
+
*/
|
|
1973
|
+
environmentHandle: string;
|
|
1974
|
+
/**
|
|
1975
|
+
* A version number with in an environment.
|
|
1976
|
+
*/
|
|
1977
|
+
version: string;
|
|
1978
|
+
};
|
|
1979
|
+
query: {
|
|
1980
|
+
/**
|
|
1981
|
+
* Environment variable name.
|
|
1982
|
+
*/
|
|
1983
|
+
key: string;
|
|
1984
|
+
};
|
|
1985
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables';
|
|
1986
|
+
};
|
|
1987
|
+
export type DeleteEnvironmentVariableErrors = {
|
|
1988
|
+
/**
|
|
1989
|
+
* Unauthorised user.
|
|
1990
|
+
*/
|
|
1991
|
+
401: ErrorResponse;
|
|
1992
|
+
/**
|
|
1993
|
+
* Invalid credentials.
|
|
1994
|
+
*/
|
|
1995
|
+
403: ErrorResponse;
|
|
1996
|
+
/**
|
|
1997
|
+
* Related content not found.
|
|
1998
|
+
*/
|
|
1999
|
+
404: ErrorResponse;
|
|
2000
|
+
/**
|
|
2001
|
+
* Unexpected error.
|
|
2002
|
+
*/
|
|
2003
|
+
500: ErrorResponse;
|
|
2004
|
+
};
|
|
2005
|
+
export type DeleteEnvironmentVariableError = DeleteEnvironmentVariableErrors[keyof DeleteEnvironmentVariableErrors];
|
|
2006
|
+
export type DeleteEnvironmentVariableResponses = {
|
|
2007
|
+
/**
|
|
2008
|
+
* Deletion successful.
|
|
2009
|
+
*/
|
|
2010
|
+
204: EnvironmentVariables;
|
|
2011
|
+
};
|
|
2012
|
+
export type DeleteEnvironmentVariableResponse = DeleteEnvironmentVariableResponses[keyof DeleteEnvironmentVariableResponses];
|
|
2013
|
+
export type GetEnvironmentVariablesData = {
|
|
2014
|
+
body?: never;
|
|
2015
|
+
path: {
|
|
2016
|
+
/**
|
|
2017
|
+
* The space handle. This must be globally unique.
|
|
2018
|
+
*/
|
|
2019
|
+
spaceHandle: string;
|
|
2020
|
+
/**
|
|
2021
|
+
* A project name. This must be unique to a space.
|
|
2022
|
+
*/
|
|
2023
|
+
projectHandle: string;
|
|
2024
|
+
/**
|
|
2025
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2026
|
+
*/
|
|
2027
|
+
environmentHandle: string;
|
|
2028
|
+
/**
|
|
2029
|
+
* A version number with in an environment.
|
|
2030
|
+
*/
|
|
2031
|
+
version: string;
|
|
2032
|
+
};
|
|
2033
|
+
query?: never;
|
|
2034
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables';
|
|
2035
|
+
};
|
|
2036
|
+
export type GetEnvironmentVariablesErrors = {
|
|
2037
|
+
/**
|
|
2038
|
+
* Unauthorised user.
|
|
2039
|
+
*/
|
|
2040
|
+
401: ErrorResponse;
|
|
2041
|
+
/**
|
|
2042
|
+
* Invalid credentials.
|
|
2043
|
+
*/
|
|
2044
|
+
403: ErrorResponse;
|
|
2045
|
+
/**
|
|
2046
|
+
* Related content not found.
|
|
2047
|
+
*/
|
|
2048
|
+
404: ErrorResponse;
|
|
2049
|
+
/**
|
|
2050
|
+
* Unexpected error.
|
|
2051
|
+
*/
|
|
2052
|
+
500: ErrorResponse;
|
|
2053
|
+
};
|
|
2054
|
+
export type GetEnvironmentVariablesError = GetEnvironmentVariablesErrors[keyof GetEnvironmentVariablesErrors];
|
|
2055
|
+
export type GetEnvironmentVariablesResponses = {
|
|
2056
|
+
/**
|
|
2057
|
+
* Environment variables.
|
|
2058
|
+
*/
|
|
2059
|
+
200: EnvironmentVariables;
|
|
2060
|
+
};
|
|
2061
|
+
export type GetEnvironmentVariablesResponse = GetEnvironmentVariablesResponses[keyof GetEnvironmentVariablesResponses];
|
|
2062
|
+
export type UpdateEnvironmentVariableData = {
|
|
2063
|
+
body: EnvironmentVariable;
|
|
2064
|
+
path: {
|
|
2065
|
+
/**
|
|
2066
|
+
* The space handle. This must be globally unique.
|
|
2067
|
+
*/
|
|
2068
|
+
spaceHandle: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* A project name. This must be unique to a space.
|
|
2071
|
+
*/
|
|
2072
|
+
projectHandle: string;
|
|
2073
|
+
/**
|
|
2074
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2075
|
+
*/
|
|
2076
|
+
environmentHandle: string;
|
|
2077
|
+
/**
|
|
2078
|
+
* A version number with in an environment.
|
|
2079
|
+
*/
|
|
2080
|
+
version: string;
|
|
2081
|
+
};
|
|
2082
|
+
query?: never;
|
|
2083
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables';
|
|
2084
|
+
};
|
|
2085
|
+
export type UpdateEnvironmentVariableErrors = {
|
|
2086
|
+
/**
|
|
2087
|
+
* Unauthorised user.
|
|
2088
|
+
*/
|
|
2089
|
+
401: ErrorResponse;
|
|
2090
|
+
/**
|
|
2091
|
+
* Invalid credentials.
|
|
2092
|
+
*/
|
|
2093
|
+
403: ErrorResponse;
|
|
2094
|
+
/**
|
|
2095
|
+
* Related content not found.
|
|
2096
|
+
*/
|
|
2097
|
+
404: ErrorResponse;
|
|
2098
|
+
/**
|
|
2099
|
+
* Unexpected error.
|
|
2100
|
+
*/
|
|
2101
|
+
500: ErrorResponse;
|
|
2102
|
+
};
|
|
2103
|
+
export type UpdateEnvironmentVariableError = UpdateEnvironmentVariableErrors[keyof UpdateEnvironmentVariableErrors];
|
|
2104
|
+
export type UpdateEnvironmentVariableResponses = {
|
|
2105
|
+
/**
|
|
2106
|
+
* Update successful.
|
|
2107
|
+
*/
|
|
2108
|
+
202: unknown;
|
|
2109
|
+
};
|
|
2110
|
+
export type CreateEnvironmentVariableData = {
|
|
2111
|
+
body: EnvironmentVariable;
|
|
2112
|
+
path: {
|
|
2113
|
+
/**
|
|
2114
|
+
* The space handle. This must be globally unique.
|
|
2115
|
+
*/
|
|
2116
|
+
spaceHandle: string;
|
|
2117
|
+
/**
|
|
2118
|
+
* A project name. This must be unique to a space.
|
|
2119
|
+
*/
|
|
2120
|
+
projectHandle: string;
|
|
2121
|
+
/**
|
|
2122
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2123
|
+
*/
|
|
2124
|
+
environmentHandle: string;
|
|
2125
|
+
/**
|
|
2126
|
+
* A version number with in an environment.
|
|
2127
|
+
*/
|
|
2128
|
+
version: string;
|
|
2129
|
+
};
|
|
2130
|
+
query?: never;
|
|
2131
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables';
|
|
2132
|
+
};
|
|
2133
|
+
export type CreateEnvironmentVariableErrors = {
|
|
2134
|
+
/**
|
|
2135
|
+
* Unauthorised user.
|
|
2136
|
+
*/
|
|
2137
|
+
401: ErrorResponse;
|
|
2138
|
+
/**
|
|
2139
|
+
* Invalid credentials.
|
|
2140
|
+
*/
|
|
2141
|
+
403: ErrorResponse;
|
|
2142
|
+
/**
|
|
2143
|
+
* Related content not found.
|
|
2144
|
+
*/
|
|
2145
|
+
404: ErrorResponse;
|
|
2146
|
+
/**
|
|
2147
|
+
* Unexpected error.
|
|
2148
|
+
*/
|
|
2149
|
+
500: ErrorResponse;
|
|
2150
|
+
};
|
|
2151
|
+
export type CreateEnvironmentVariableError = CreateEnvironmentVariableErrors[keyof CreateEnvironmentVariableErrors];
|
|
2152
|
+
export type CreateEnvironmentVariableResponses = {
|
|
2153
|
+
/**
|
|
2154
|
+
* Creation successful.
|
|
2155
|
+
*/
|
|
2156
|
+
201: unknown;
|
|
2157
|
+
};
|
|
1945
2158
|
export type GetGraphOverviewData = {
|
|
1946
2159
|
body?: never;
|
|
1947
2160
|
path: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const zEnvironmentVariable: z.ZodObject<{
|
|
3
|
+
key: z.ZodString;
|
|
4
|
+
value: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const zEnvironmentVariables: z.ZodObject<{
|
|
7
|
+
vars: z.ZodArray<z.ZodObject<{
|
|
8
|
+
key: z.ZodString;
|
|
9
|
+
value: z.ZodString;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
2
12
|
export declare const zVersionStatus: z.ZodEnum<{
|
|
3
13
|
pending: "pending";
|
|
4
14
|
queued: "queued";
|
|
@@ -123,11 +133,20 @@ export declare const zOnboardingAnalytics: z.ZodObject<{
|
|
|
123
133
|
export declare const zSpaceOrgCodeResponse: z.ZodObject<{
|
|
124
134
|
orgCode: z.ZodString;
|
|
125
135
|
}, z.core.$strip>;
|
|
136
|
+
export declare const zEnvironmentStatus: z.ZodEnum<{
|
|
137
|
+
deploying: "deploying";
|
|
138
|
+
idle: "idle";
|
|
139
|
+
}>;
|
|
126
140
|
export declare const zEnvironmentOverview: z.ZodObject<{
|
|
127
141
|
id: z.ZodUUID;
|
|
128
142
|
name: z.ZodString;
|
|
129
143
|
handle: z.ZodString;
|
|
130
144
|
description: z.ZodString;
|
|
145
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
146
|
+
status: z.ZodEnum<{
|
|
147
|
+
deploying: "deploying";
|
|
148
|
+
idle: "idle";
|
|
149
|
+
}>;
|
|
131
150
|
createdAt: z.ZodISODateTime;
|
|
132
151
|
updatedAt: z.ZodISODateTime;
|
|
133
152
|
versions: z.ZodInt;
|
|
@@ -145,6 +164,11 @@ export declare const zProjectOverview: z.ZodObject<{
|
|
|
145
164
|
name: z.ZodString;
|
|
146
165
|
handle: z.ZodString;
|
|
147
166
|
description: z.ZodString;
|
|
167
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
168
|
+
status: z.ZodEnum<{
|
|
169
|
+
deploying: "deploying";
|
|
170
|
+
idle: "idle";
|
|
171
|
+
}>;
|
|
148
172
|
createdAt: z.ZodISODateTime;
|
|
149
173
|
updatedAt: z.ZodISODateTime;
|
|
150
174
|
versions: z.ZodInt;
|
|
@@ -167,6 +191,11 @@ export declare const zSpaceOverview: z.ZodObject<{
|
|
|
167
191
|
name: z.ZodString;
|
|
168
192
|
handle: z.ZodString;
|
|
169
193
|
description: z.ZodString;
|
|
194
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
195
|
+
status: z.ZodEnum<{
|
|
196
|
+
deploying: "deploying";
|
|
197
|
+
idle: "idle";
|
|
198
|
+
}>;
|
|
170
199
|
createdAt: z.ZodISODateTime;
|
|
171
200
|
updatedAt: z.ZodISODateTime;
|
|
172
201
|
versions: z.ZodInt;
|
|
@@ -381,6 +410,11 @@ export declare const zUserSpacesResponse: z.ZodObject<{
|
|
|
381
410
|
name: z.ZodString;
|
|
382
411
|
handle: z.ZodString;
|
|
383
412
|
description: z.ZodString;
|
|
413
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
414
|
+
status: z.ZodEnum<{
|
|
415
|
+
deploying: "deploying";
|
|
416
|
+
idle: "idle";
|
|
417
|
+
}>;
|
|
384
418
|
createdAt: z.ZodISODateTime;
|
|
385
419
|
updatedAt: z.ZodISODateTime;
|
|
386
420
|
versions: z.ZodInt;
|
|
@@ -1182,6 +1216,10 @@ export declare const zPlanPriceResponse: z.ZodObject<{
|
|
|
1182
1216
|
currency: z.ZodString;
|
|
1183
1217
|
interval: z.ZodString;
|
|
1184
1218
|
}, z.core.$strip>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Environment variable name.
|
|
1221
|
+
*/
|
|
1222
|
+
export declare const zEnvironmentVariableKey: z.ZodString;
|
|
1185
1223
|
/**
|
|
1186
1224
|
* Expiry query.
|
|
1187
1225
|
*/
|
|
@@ -1987,6 +2025,11 @@ export declare const zListUserSpacesResponse: z.ZodObject<{
|
|
|
1987
2025
|
name: z.ZodString;
|
|
1988
2026
|
handle: z.ZodString;
|
|
1989
2027
|
description: z.ZodString;
|
|
2028
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
2029
|
+
status: z.ZodEnum<{
|
|
2030
|
+
deploying: "deploying";
|
|
2031
|
+
idle: "idle";
|
|
2032
|
+
}>;
|
|
1990
2033
|
createdAt: z.ZodISODateTime;
|
|
1991
2034
|
updatedAt: z.ZodISODateTime;
|
|
1992
2035
|
versions: z.ZodInt;
|
|
@@ -2033,6 +2076,11 @@ export declare const zCreateSpaceResponse: z.ZodObject<{
|
|
|
2033
2076
|
name: z.ZodString;
|
|
2034
2077
|
handle: z.ZodString;
|
|
2035
2078
|
description: z.ZodString;
|
|
2079
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
2080
|
+
status: z.ZodEnum<{
|
|
2081
|
+
deploying: "deploying";
|
|
2082
|
+
idle: "idle";
|
|
2083
|
+
}>;
|
|
2036
2084
|
createdAt: z.ZodISODateTime;
|
|
2037
2085
|
updatedAt: z.ZodISODateTime;
|
|
2038
2086
|
versions: z.ZodInt;
|
|
@@ -2111,6 +2159,11 @@ export declare const zGetSpaceOverviewResponse: z.ZodObject<{
|
|
|
2111
2159
|
name: z.ZodString;
|
|
2112
2160
|
handle: z.ZodString;
|
|
2113
2161
|
description: z.ZodString;
|
|
2162
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
2163
|
+
status: z.ZodEnum<{
|
|
2164
|
+
deploying: "deploying";
|
|
2165
|
+
idle: "idle";
|
|
2166
|
+
}>;
|
|
2114
2167
|
createdAt: z.ZodISODateTime;
|
|
2115
2168
|
updatedAt: z.ZodISODateTime;
|
|
2116
2169
|
versions: z.ZodInt;
|
|
@@ -2281,6 +2334,11 @@ export declare const zCreateProjectResponse: z.ZodObject<{
|
|
|
2281
2334
|
name: z.ZodString;
|
|
2282
2335
|
handle: z.ZodString;
|
|
2283
2336
|
description: z.ZodString;
|
|
2337
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
2338
|
+
status: z.ZodEnum<{
|
|
2339
|
+
deploying: "deploying";
|
|
2340
|
+
idle: "idle";
|
|
2341
|
+
}>;
|
|
2284
2342
|
createdAt: z.ZodISODateTime;
|
|
2285
2343
|
updatedAt: z.ZodISODateTime;
|
|
2286
2344
|
versions: z.ZodInt;
|
|
@@ -2310,6 +2368,11 @@ export declare const zGetProjectOverviewResponse: z.ZodObject<{
|
|
|
2310
2368
|
name: z.ZodString;
|
|
2311
2369
|
handle: z.ZodString;
|
|
2312
2370
|
description: z.ZodString;
|
|
2371
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
2372
|
+
status: z.ZodEnum<{
|
|
2373
|
+
deploying: "deploying";
|
|
2374
|
+
idle: "idle";
|
|
2375
|
+
}>;
|
|
2313
2376
|
createdAt: z.ZodISODateTime;
|
|
2314
2377
|
updatedAt: z.ZodISODateTime;
|
|
2315
2378
|
versions: z.ZodInt;
|
|
@@ -2335,6 +2398,11 @@ export declare const zCreateEnvironmentResponse: z.ZodObject<{
|
|
|
2335
2398
|
name: z.ZodString;
|
|
2336
2399
|
handle: z.ZodString;
|
|
2337
2400
|
description: z.ZodString;
|
|
2401
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
2402
|
+
status: z.ZodEnum<{
|
|
2403
|
+
deploying: "deploying";
|
|
2404
|
+
idle: "idle";
|
|
2405
|
+
}>;
|
|
2338
2406
|
createdAt: z.ZodISODateTime;
|
|
2339
2407
|
updatedAt: z.ZodISODateTime;
|
|
2340
2408
|
versions: z.ZodInt;
|
|
@@ -2356,10 +2424,81 @@ export declare const zGetEnvironmentOverviewResponse: z.ZodObject<{
|
|
|
2356
2424
|
name: z.ZodString;
|
|
2357
2425
|
handle: z.ZodString;
|
|
2358
2426
|
description: z.ZodString;
|
|
2427
|
+
deployingVersionID: z.ZodOptional<z.ZodUUID>;
|
|
2428
|
+
status: z.ZodEnum<{
|
|
2429
|
+
deploying: "deploying";
|
|
2430
|
+
idle: "idle";
|
|
2431
|
+
}>;
|
|
2359
2432
|
createdAt: z.ZodISODateTime;
|
|
2360
2433
|
updatedAt: z.ZodISODateTime;
|
|
2361
2434
|
versions: z.ZodInt;
|
|
2362
2435
|
}, z.core.$strip>;
|
|
2436
|
+
export declare const zDeleteEnvironmentVariableData: z.ZodObject<{
|
|
2437
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2438
|
+
path: z.ZodObject<{
|
|
2439
|
+
spaceHandle: z.ZodString;
|
|
2440
|
+
projectHandle: z.ZodString;
|
|
2441
|
+
environmentHandle: z.ZodString;
|
|
2442
|
+
version: z.ZodString;
|
|
2443
|
+
}, z.core.$strip>;
|
|
2444
|
+
query: z.ZodObject<{
|
|
2445
|
+
key: z.ZodString;
|
|
2446
|
+
}, z.core.$strip>;
|
|
2447
|
+
}, z.core.$strip>;
|
|
2448
|
+
/**
|
|
2449
|
+
* Deletion successful.
|
|
2450
|
+
*/
|
|
2451
|
+
export declare const zDeleteEnvironmentVariableResponse: z.ZodObject<{
|
|
2452
|
+
vars: z.ZodArray<z.ZodObject<{
|
|
2453
|
+
key: z.ZodString;
|
|
2454
|
+
value: z.ZodString;
|
|
2455
|
+
}, z.core.$strip>>;
|
|
2456
|
+
}, z.core.$strip>;
|
|
2457
|
+
export declare const zGetEnvironmentVariablesData: z.ZodObject<{
|
|
2458
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2459
|
+
path: z.ZodObject<{
|
|
2460
|
+
spaceHandle: z.ZodString;
|
|
2461
|
+
projectHandle: z.ZodString;
|
|
2462
|
+
environmentHandle: z.ZodString;
|
|
2463
|
+
version: z.ZodString;
|
|
2464
|
+
}, z.core.$strip>;
|
|
2465
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2466
|
+
}, z.core.$strip>;
|
|
2467
|
+
/**
|
|
2468
|
+
* Environment variables.
|
|
2469
|
+
*/
|
|
2470
|
+
export declare const zGetEnvironmentVariablesResponse: z.ZodObject<{
|
|
2471
|
+
vars: z.ZodArray<z.ZodObject<{
|
|
2472
|
+
key: z.ZodString;
|
|
2473
|
+
value: z.ZodString;
|
|
2474
|
+
}, z.core.$strip>>;
|
|
2475
|
+
}, z.core.$strip>;
|
|
2476
|
+
export declare const zUpdateEnvironmentVariableData: z.ZodObject<{
|
|
2477
|
+
body: z.ZodObject<{
|
|
2478
|
+
key: z.ZodString;
|
|
2479
|
+
value: z.ZodString;
|
|
2480
|
+
}, z.core.$strip>;
|
|
2481
|
+
path: z.ZodObject<{
|
|
2482
|
+
spaceHandle: z.ZodString;
|
|
2483
|
+
projectHandle: z.ZodString;
|
|
2484
|
+
environmentHandle: z.ZodString;
|
|
2485
|
+
version: z.ZodString;
|
|
2486
|
+
}, z.core.$strip>;
|
|
2487
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2488
|
+
}, z.core.$strip>;
|
|
2489
|
+
export declare const zCreateEnvironmentVariableData: z.ZodObject<{
|
|
2490
|
+
body: z.ZodObject<{
|
|
2491
|
+
key: z.ZodString;
|
|
2492
|
+
value: z.ZodString;
|
|
2493
|
+
}, z.core.$strip>;
|
|
2494
|
+
path: z.ZodObject<{
|
|
2495
|
+
spaceHandle: z.ZodString;
|
|
2496
|
+
projectHandle: z.ZodString;
|
|
2497
|
+
environmentHandle: z.ZodString;
|
|
2498
|
+
version: z.ZodString;
|
|
2499
|
+
}, z.core.$strip>;
|
|
2500
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2501
|
+
}, z.core.$strip>;
|
|
2363
2502
|
export declare const zGetGraphOverviewData: z.ZodObject<{
|
|
2364
2503
|
body: z.ZodOptional<z.ZodNever>;
|
|
2365
2504
|
path: z.ZodObject<{
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
export const zEnvironmentVariable = z.object({
|
|
4
|
+
key: z.string(),
|
|
5
|
+
value: z.string()
|
|
6
|
+
});
|
|
7
|
+
export const zEnvironmentVariables = z.object({
|
|
8
|
+
vars: z.array(zEnvironmentVariable)
|
|
9
|
+
});
|
|
3
10
|
export const zVersionStatus = z.enum([
|
|
4
11
|
'pending',
|
|
5
12
|
'queued',
|
|
@@ -93,11 +100,17 @@ export const zOnboardingAnalytics = z.object({
|
|
|
93
100
|
export const zSpaceOrgCodeResponse = z.object({
|
|
94
101
|
orgCode: z.string()
|
|
95
102
|
});
|
|
103
|
+
export const zEnvironmentStatus = z.enum([
|
|
104
|
+
'idle',
|
|
105
|
+
'deploying'
|
|
106
|
+
]);
|
|
96
107
|
export const zEnvironmentOverview = z.object({
|
|
97
108
|
id: z.uuid(),
|
|
98
109
|
name: z.string(),
|
|
99
110
|
handle: z.string(),
|
|
100
111
|
description: z.string(),
|
|
112
|
+
deployingVersionID: z.optional(z.uuid()),
|
|
113
|
+
status: zEnvironmentStatus,
|
|
101
114
|
createdAt: z.iso.datetime(),
|
|
102
115
|
updatedAt: z.iso.datetime(),
|
|
103
116
|
versions: z.int()
|
|
@@ -530,6 +543,10 @@ export const zPlanPriceResponse = z.object({
|
|
|
530
543
|
currency: z.string(),
|
|
531
544
|
interval: z.string()
|
|
532
545
|
});
|
|
546
|
+
/**
|
|
547
|
+
* Environment variable name.
|
|
548
|
+
*/
|
|
549
|
+
export const zEnvironmentVariableKey = z.string();
|
|
533
550
|
/**
|
|
534
551
|
* Expiry query.
|
|
535
552
|
*/
|
|
@@ -978,6 +995,56 @@ export const zGetEnvironmentOverviewData = z.object({
|
|
|
978
995
|
* Environment overview.
|
|
979
996
|
*/
|
|
980
997
|
export const zGetEnvironmentOverviewResponse = zEnvironmentOverview;
|
|
998
|
+
export const zDeleteEnvironmentVariableData = z.object({
|
|
999
|
+
body: z.optional(z.never()),
|
|
1000
|
+
path: z.object({
|
|
1001
|
+
spaceHandle: z.string(),
|
|
1002
|
+
projectHandle: z.string(),
|
|
1003
|
+
environmentHandle: z.string(),
|
|
1004
|
+
version: z.string()
|
|
1005
|
+
}),
|
|
1006
|
+
query: z.object({
|
|
1007
|
+
key: z.string()
|
|
1008
|
+
})
|
|
1009
|
+
});
|
|
1010
|
+
/**
|
|
1011
|
+
* Deletion successful.
|
|
1012
|
+
*/
|
|
1013
|
+
export const zDeleteEnvironmentVariableResponse = zEnvironmentVariables;
|
|
1014
|
+
export const zGetEnvironmentVariablesData = z.object({
|
|
1015
|
+
body: z.optional(z.never()),
|
|
1016
|
+
path: z.object({
|
|
1017
|
+
spaceHandle: z.string(),
|
|
1018
|
+
projectHandle: z.string(),
|
|
1019
|
+
environmentHandle: z.string(),
|
|
1020
|
+
version: z.string()
|
|
1021
|
+
}),
|
|
1022
|
+
query: z.optional(z.never())
|
|
1023
|
+
});
|
|
1024
|
+
/**
|
|
1025
|
+
* Environment variables.
|
|
1026
|
+
*/
|
|
1027
|
+
export const zGetEnvironmentVariablesResponse = zEnvironmentVariables;
|
|
1028
|
+
export const zUpdateEnvironmentVariableData = z.object({
|
|
1029
|
+
body: zEnvironmentVariable,
|
|
1030
|
+
path: z.object({
|
|
1031
|
+
spaceHandle: z.string(),
|
|
1032
|
+
projectHandle: z.string(),
|
|
1033
|
+
environmentHandle: z.string(),
|
|
1034
|
+
version: z.string()
|
|
1035
|
+
}),
|
|
1036
|
+
query: z.optional(z.never())
|
|
1037
|
+
});
|
|
1038
|
+
export const zCreateEnvironmentVariableData = z.object({
|
|
1039
|
+
body: zEnvironmentVariable,
|
|
1040
|
+
path: z.object({
|
|
1041
|
+
spaceHandle: z.string(),
|
|
1042
|
+
projectHandle: z.string(),
|
|
1043
|
+
environmentHandle: z.string(),
|
|
1044
|
+
version: z.string()
|
|
1045
|
+
}),
|
|
1046
|
+
query: z.optional(z.never())
|
|
1047
|
+
});
|
|
981
1048
|
export const zGetGraphOverviewData = z.object({
|
|
982
1049
|
body: z.optional(z.never()),
|
|
983
1050
|
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, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, VersionStatusData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData } from "../../sdk/types.gen";
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, VersionStatusData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData } 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>;
|
|
@@ -138,6 +138,24 @@ export declare const useCreateEnvironment: (config?: {
|
|
|
138
138
|
export declare const useGetEnvironmentOverview: (options: Omit<GetEnvironmentOverviewData, "url"> & {
|
|
139
139
|
enabled?: boolean;
|
|
140
140
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").EnvironmentOverview | undefined, Error>;
|
|
141
|
+
export declare const useDeleteEnvironmentVariable: (config?: {
|
|
142
|
+
onSuccess?: (data: GetSuccessResponse<DeleteEnvironmentVariableResponses>) => void;
|
|
143
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
144
|
+
retry?: boolean;
|
|
145
|
+
}) => import("@tanstack/react-query").UseMutationResult<import("../../sdk/types.gen").EnvironmentVariables | undefined, unknown, Omit<DeleteEnvironmentVariableData, "url">, unknown>;
|
|
146
|
+
export declare const useGetEnvironmentVariables: (options: Omit<GetEnvironmentVariablesData, "url"> & {
|
|
147
|
+
enabled?: boolean;
|
|
148
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").EnvironmentVariables | undefined, Error>;
|
|
149
|
+
export declare const useUpdateEnvironmentVariable: (config?: {
|
|
150
|
+
onSuccess?: (data: GetSuccessResponse<UpdateEnvironmentVariableResponses>) => void;
|
|
151
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
152
|
+
retry?: boolean;
|
|
153
|
+
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<UpdateEnvironmentVariableData, "url">, unknown>;
|
|
154
|
+
export declare const useCreateEnvironmentVariable: (config?: {
|
|
155
|
+
onSuccess?: (data: GetSuccessResponse<CreateEnvironmentVariableResponses>) => void;
|
|
156
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
157
|
+
retry?: boolean;
|
|
158
|
+
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<CreateEnvironmentVariableData, "url">, unknown>;
|
|
141
159
|
export declare const useGetGraphOverview: (options: Omit<GetGraphOverviewData, "url"> & {
|
|
142
160
|
enabled?: boolean;
|
|
143
161
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Graph | 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, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, recordOnboardingAnalytics, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, versionStatus, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, recordOnboardingAnalytics, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, getGraphOverview, updateGraphState, deployVersion, versionStatus, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -706,6 +706,84 @@ export const useGetEnvironmentOverview = (options) => {
|
|
|
706
706
|
staleTime: 600000
|
|
707
707
|
});
|
|
708
708
|
};
|
|
709
|
+
export const useDeleteEnvironmentVariable = (config) => {
|
|
710
|
+
const token = useToken();
|
|
711
|
+
const queryClient = useQueryClient();
|
|
712
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables" };
|
|
713
|
+
const funcer = async (options) => {
|
|
714
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
715
|
+
const res = await deleteEnvironmentVariable({ ...opts, ...options, auth });
|
|
716
|
+
return res?.data;
|
|
717
|
+
};
|
|
718
|
+
return useMutation({
|
|
719
|
+
mutationFn: funcer,
|
|
720
|
+
onSuccess: (res, options, c, ctx) => {
|
|
721
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "variables"] });
|
|
722
|
+
config?.onSuccess && config.onSuccess(res);
|
|
723
|
+
},
|
|
724
|
+
onError: config?.onError,
|
|
725
|
+
retry: config?.retry
|
|
726
|
+
});
|
|
727
|
+
};
|
|
728
|
+
export const useGetEnvironmentVariables = (options) => {
|
|
729
|
+
const token = useToken();
|
|
730
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
731
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables" };
|
|
732
|
+
const funcer = async () => {
|
|
733
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
734
|
+
if (isPromise(token) && !token)
|
|
735
|
+
return;
|
|
736
|
+
const res = await getEnvironmentVariables({ ...opts, ...rest, auth });
|
|
737
|
+
return res.data;
|
|
738
|
+
};
|
|
739
|
+
if (!token)
|
|
740
|
+
enabled = false;
|
|
741
|
+
return useQuery({
|
|
742
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "variables", options.query ?? {}],
|
|
743
|
+
queryFn: funcer,
|
|
744
|
+
enabled,
|
|
745
|
+
retry: false,
|
|
746
|
+
staleTime: 600000
|
|
747
|
+
});
|
|
748
|
+
};
|
|
749
|
+
export const useUpdateEnvironmentVariable = (config) => {
|
|
750
|
+
const token = useToken();
|
|
751
|
+
const queryClient = useQueryClient();
|
|
752
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables" };
|
|
753
|
+
const funcer = async (options) => {
|
|
754
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
755
|
+
const res = await updateEnvironmentVariable({ ...opts, ...options, auth });
|
|
756
|
+
return res?.data;
|
|
757
|
+
};
|
|
758
|
+
return useMutation({
|
|
759
|
+
mutationFn: funcer,
|
|
760
|
+
onSuccess: (res, options, c, ctx) => {
|
|
761
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "variables"] });
|
|
762
|
+
config?.onSuccess && config.onSuccess(res);
|
|
763
|
+
},
|
|
764
|
+
onError: config?.onError,
|
|
765
|
+
retry: config?.retry
|
|
766
|
+
});
|
|
767
|
+
};
|
|
768
|
+
export const useCreateEnvironmentVariable = (config) => {
|
|
769
|
+
const token = useToken();
|
|
770
|
+
const queryClient = useQueryClient();
|
|
771
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables" };
|
|
772
|
+
const funcer = async (options) => {
|
|
773
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
774
|
+
const res = await createEnvironmentVariable({ ...opts, ...options, auth });
|
|
775
|
+
return res?.data;
|
|
776
|
+
};
|
|
777
|
+
return useMutation({
|
|
778
|
+
mutationFn: funcer,
|
|
779
|
+
onSuccess: (res, options, c, ctx) => {
|
|
780
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "variables"] });
|
|
781
|
+
config?.onSuccess && config.onSuccess(res);
|
|
782
|
+
},
|
|
783
|
+
onError: config?.onError,
|
|
784
|
+
retry: config?.retry
|
|
785
|
+
});
|
|
786
|
+
};
|
|
709
787
|
export const useGetGraphOverview = (options) => {
|
|
710
788
|
const token = useToken();
|
|
711
789
|
let { enabled, ...rest } = options || { enabled: true };
|