shoal-web-sdk 0.0.134 → 0.0.136
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 +69 -1
- package/dist/sdk/@tanstack/react-query.gen.js +85 -1
- package/dist/sdk/sdk.gen.d.ts +21 -1
- package/dist/sdk/sdk.gen.js +83 -0
- package/dist/sdk/types.gen.d.ts +244 -0
- package/dist/sdk/zod.gen.d.ts +115 -0
- package/dist/sdk/zod.gen.js +85 -0
- package/dist/tanstack-codegen/generated/generated.d.ts +22 -1
- package/dist/tanstack-codegen/generated/generated.js +100 -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, GetEnvironmentVersionsData, 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,74 @@ export declare const getEnvironmentOverviewOptions: (options: Options<GetEnviron
|
|
|
772
772
|
[dataTagErrorSymbol]: Error;
|
|
773
773
|
};
|
|
774
774
|
};
|
|
775
|
+
export declare const getEnvironmentVersionsQueryKey: (options: Options<GetEnvironmentVersionsData>) => [Pick<Options<GetEnvironmentVersionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
776
|
+
_id: string;
|
|
777
|
+
_infinite?: boolean;
|
|
778
|
+
tags?: ReadonlyArray<string>;
|
|
779
|
+
}];
|
|
780
|
+
/**
|
|
781
|
+
* Get all the environment versions.
|
|
782
|
+
*/
|
|
783
|
+
export declare const getEnvironmentVersionsOptions: (options: Options<GetEnvironmentVersionsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").EnvironmentVersion[], Error, import("../types.gen").EnvironmentVersion[], [Pick<Options<GetEnvironmentVersionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
784
|
+
_id: string;
|
|
785
|
+
_infinite?: boolean;
|
|
786
|
+
tags?: ReadonlyArray<string>;
|
|
787
|
+
}]>, "queryFn"> & {
|
|
788
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").EnvironmentVersion[], [Pick<Options<GetEnvironmentVersionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
789
|
+
_id: string;
|
|
790
|
+
_infinite?: boolean;
|
|
791
|
+
tags?: ReadonlyArray<string>;
|
|
792
|
+
}], never> | undefined;
|
|
793
|
+
} & {
|
|
794
|
+
queryKey: [Pick<Options<GetEnvironmentVersionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
795
|
+
_id: string;
|
|
796
|
+
_infinite?: boolean;
|
|
797
|
+
tags?: ReadonlyArray<string>;
|
|
798
|
+
}] & {
|
|
799
|
+
[dataTagSymbol]: import("../types.gen").EnvironmentVersion[];
|
|
800
|
+
[dataTagErrorSymbol]: Error;
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
/**
|
|
804
|
+
* Delete an environment variable.
|
|
805
|
+
*/
|
|
806
|
+
export declare const deleteEnvironmentVariableMutation: (options?: Partial<Options<DeleteEnvironmentVariableData>>) => UseMutationOptions<DeleteEnvironmentVariableResponse, DeleteEnvironmentVariableError, Options<DeleteEnvironmentVariableData>>;
|
|
807
|
+
export declare const getEnvironmentVariablesQueryKey: (options: Options<GetEnvironmentVariablesData>) => [Pick<Options<GetEnvironmentVariablesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
808
|
+
_id: string;
|
|
809
|
+
_infinite?: boolean;
|
|
810
|
+
tags?: ReadonlyArray<string>;
|
|
811
|
+
}];
|
|
812
|
+
/**
|
|
813
|
+
* Get the environment variables.
|
|
814
|
+
*/
|
|
815
|
+
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"> & {
|
|
816
|
+
_id: string;
|
|
817
|
+
_infinite?: boolean;
|
|
818
|
+
tags?: ReadonlyArray<string>;
|
|
819
|
+
}]>, "queryFn"> & {
|
|
820
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").EnvironmentVariables, [Pick<Options<GetEnvironmentVariablesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
821
|
+
_id: string;
|
|
822
|
+
_infinite?: boolean;
|
|
823
|
+
tags?: ReadonlyArray<string>;
|
|
824
|
+
}], never> | undefined;
|
|
825
|
+
} & {
|
|
826
|
+
queryKey: [Pick<Options<GetEnvironmentVariablesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
827
|
+
_id: string;
|
|
828
|
+
_infinite?: boolean;
|
|
829
|
+
tags?: ReadonlyArray<string>;
|
|
830
|
+
}] & {
|
|
831
|
+
[dataTagSymbol]: import("../types.gen").EnvironmentVariables;
|
|
832
|
+
[dataTagErrorSymbol]: Error;
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
/**
|
|
836
|
+
* Update an environment variable given the key and value in the request body.
|
|
837
|
+
*/
|
|
838
|
+
export declare const updateEnvironmentVariableMutation: (options?: Partial<Options<UpdateEnvironmentVariableData>>) => UseMutationOptions<unknown, UpdateEnvironmentVariableError, Options<UpdateEnvironmentVariableData>>;
|
|
839
|
+
/**
|
|
840
|
+
* Create an environment variable. These are globally unique per project environment.
|
|
841
|
+
*/
|
|
842
|
+
export declare const createEnvironmentVariableMutation: (options?: Partial<Options<CreateEnvironmentVariableData>>) => UseMutationOptions<unknown, CreateEnvironmentVariableError, Options<CreateEnvironmentVariableData>>;
|
|
775
843
|
export declare const getGraphOverviewQueryKey: (options: Options<GetGraphOverviewData>) => [Pick<Options<GetGraphOverviewData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
776
844
|
_id: string;
|
|
777
845
|
_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, getEnvironmentVersions, 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,90 @@ export const getEnvironmentOverviewOptions = (options) => {
|
|
|
843
843
|
queryKey: getEnvironmentOverviewQueryKey(options)
|
|
844
844
|
});
|
|
845
845
|
};
|
|
846
|
+
export const getEnvironmentVersionsQueryKey = (options) => createQueryKey('getEnvironmentVersions', options);
|
|
847
|
+
/**
|
|
848
|
+
* Get all the environment versions.
|
|
849
|
+
*/
|
|
850
|
+
export const getEnvironmentVersionsOptions = (options) => {
|
|
851
|
+
return queryOptions({
|
|
852
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
853
|
+
const { data } = await getEnvironmentVersions({
|
|
854
|
+
...options,
|
|
855
|
+
...queryKey[0],
|
|
856
|
+
signal,
|
|
857
|
+
throwOnError: true
|
|
858
|
+
});
|
|
859
|
+
return data;
|
|
860
|
+
},
|
|
861
|
+
queryKey: getEnvironmentVersionsQueryKey(options)
|
|
862
|
+
});
|
|
863
|
+
};
|
|
864
|
+
/**
|
|
865
|
+
* Delete an environment variable.
|
|
866
|
+
*/
|
|
867
|
+
export const deleteEnvironmentVariableMutation = (options) => {
|
|
868
|
+
const mutationOptions = {
|
|
869
|
+
mutationFn: async (fnOptions) => {
|
|
870
|
+
const { data } = await deleteEnvironmentVariable({
|
|
871
|
+
...options,
|
|
872
|
+
...fnOptions,
|
|
873
|
+
throwOnError: true
|
|
874
|
+
});
|
|
875
|
+
return data;
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
return mutationOptions;
|
|
879
|
+
};
|
|
880
|
+
export const getEnvironmentVariablesQueryKey = (options) => createQueryKey('getEnvironmentVariables', options);
|
|
881
|
+
/**
|
|
882
|
+
* Get the environment variables.
|
|
883
|
+
*/
|
|
884
|
+
export const getEnvironmentVariablesOptions = (options) => {
|
|
885
|
+
return queryOptions({
|
|
886
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
887
|
+
const { data } = await getEnvironmentVariables({
|
|
888
|
+
...options,
|
|
889
|
+
...queryKey[0],
|
|
890
|
+
signal,
|
|
891
|
+
throwOnError: true
|
|
892
|
+
});
|
|
893
|
+
return data;
|
|
894
|
+
},
|
|
895
|
+
queryKey: getEnvironmentVariablesQueryKey(options)
|
|
896
|
+
});
|
|
897
|
+
};
|
|
898
|
+
/**
|
|
899
|
+
* Update an environment variable given the key and value in the request body.
|
|
900
|
+
*/
|
|
901
|
+
export const updateEnvironmentVariableMutation = (options) => {
|
|
902
|
+
const mutationOptions = {
|
|
903
|
+
mutationFn: async (fnOptions) => {
|
|
904
|
+
const { data } = await updateEnvironmentVariable({
|
|
905
|
+
...options,
|
|
906
|
+
...fnOptions,
|
|
907
|
+
throwOnError: true
|
|
908
|
+
});
|
|
909
|
+
return data;
|
|
910
|
+
}
|
|
911
|
+
};
|
|
912
|
+
return mutationOptions;
|
|
913
|
+
};
|
|
914
|
+
/**
|
|
915
|
+
* Create an environment variable. These are globally unique per project environment.
|
|
916
|
+
*/
|
|
917
|
+
export const createEnvironmentVariableMutation = (options) => {
|
|
918
|
+
const mutationOptions = {
|
|
919
|
+
mutationFn: async (fnOptions) => {
|
|
920
|
+
const { data } = await createEnvironmentVariable({
|
|
921
|
+
...options,
|
|
922
|
+
...fnOptions,
|
|
923
|
+
throwOnError: true
|
|
924
|
+
});
|
|
925
|
+
return data;
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
return mutationOptions;
|
|
929
|
+
};
|
|
846
930
|
export const getGraphOverviewQueryKey = (options) => createQueryKey('getGraphOverview', options);
|
|
847
931
|
/**
|
|
848
932
|
* 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, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, 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,26 @@ 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
|
+
* Get all the environment versions.
|
|
158
|
+
*/
|
|
159
|
+
export declare const getEnvironmentVersions: <ThrowOnError extends boolean = false>(options: Options<GetEnvironmentVersionsData, ThrowOnError>) => import("./client").RequestResult<GetEnvironmentVersionsResponses, unknown, ThrowOnError, "fields">;
|
|
160
|
+
/**
|
|
161
|
+
* Delete an environment variable.
|
|
162
|
+
*/
|
|
163
|
+
export declare const deleteEnvironmentVariable: <ThrowOnError extends boolean = false>(options: Options<DeleteEnvironmentVariableData, ThrowOnError>) => import("./client").RequestResult<DeleteEnvironmentVariableResponses, DeleteEnvironmentVariableErrors, ThrowOnError, "fields">;
|
|
164
|
+
/**
|
|
165
|
+
* Get the environment variables.
|
|
166
|
+
*/
|
|
167
|
+
export declare const getEnvironmentVariables: <ThrowOnError extends boolean = false>(options: Options<GetEnvironmentVariablesData, ThrowOnError>) => import("./client").RequestResult<GetEnvironmentVariablesResponses, GetEnvironmentVariablesErrors, ThrowOnError, "fields">;
|
|
168
|
+
/**
|
|
169
|
+
* Update an environment variable given the key and value in the request body.
|
|
170
|
+
*/
|
|
171
|
+
export declare const updateEnvironmentVariable: <ThrowOnError extends boolean = false>(options: Options<UpdateEnvironmentVariableData, ThrowOnError>) => import("./client").RequestResult<UpdateEnvironmentVariableResponses, UpdateEnvironmentVariableErrors, ThrowOnError, "fields">;
|
|
172
|
+
/**
|
|
173
|
+
* Create an environment variable. These are globally unique per project environment.
|
|
174
|
+
*/
|
|
175
|
+
export declare const createEnvironmentVariable: <ThrowOnError extends boolean = false>(options: Options<CreateEnvironmentVariableData, ThrowOnError>) => import("./client").RequestResult<CreateEnvironmentVariableResponses, CreateEnvironmentVariableErrors, ThrowOnError, "fields">;
|
|
156
176
|
/**
|
|
157
177
|
* Get a graph for a version inside an environment.
|
|
158
178
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -561,6 +561,89 @@ export const getEnvironmentOverview = (options) => {
|
|
|
561
561
|
...options
|
|
562
562
|
});
|
|
563
563
|
};
|
|
564
|
+
/**
|
|
565
|
+
* Get all the environment versions.
|
|
566
|
+
*/
|
|
567
|
+
export const getEnvironmentVersions = (options) => {
|
|
568
|
+
return (options.client ?? client).get({
|
|
569
|
+
security: [
|
|
570
|
+
{
|
|
571
|
+
scheme: 'bearer',
|
|
572
|
+
type: 'http'
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/versions',
|
|
576
|
+
...options
|
|
577
|
+
});
|
|
578
|
+
};
|
|
579
|
+
/**
|
|
580
|
+
* Delete an environment variable.
|
|
581
|
+
*/
|
|
582
|
+
export const deleteEnvironmentVariable = (options) => {
|
|
583
|
+
return (options.client ?? client).delete({
|
|
584
|
+
security: [
|
|
585
|
+
{
|
|
586
|
+
scheme: 'bearer',
|
|
587
|
+
type: 'http'
|
|
588
|
+
}
|
|
589
|
+
],
|
|
590
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables',
|
|
591
|
+
...options
|
|
592
|
+
});
|
|
593
|
+
};
|
|
594
|
+
/**
|
|
595
|
+
* Get the environment variables.
|
|
596
|
+
*/
|
|
597
|
+
export const getEnvironmentVariables = (options) => {
|
|
598
|
+
return (options.client ?? client).get({
|
|
599
|
+
security: [
|
|
600
|
+
{
|
|
601
|
+
scheme: 'bearer',
|
|
602
|
+
type: 'http'
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables',
|
|
606
|
+
...options
|
|
607
|
+
});
|
|
608
|
+
};
|
|
609
|
+
/**
|
|
610
|
+
* Update an environment variable given the key and value in the request body.
|
|
611
|
+
*/
|
|
612
|
+
export const updateEnvironmentVariable = (options) => {
|
|
613
|
+
return (options.client ?? client).patch({
|
|
614
|
+
security: [
|
|
615
|
+
{
|
|
616
|
+
scheme: 'bearer',
|
|
617
|
+
type: 'http'
|
|
618
|
+
}
|
|
619
|
+
],
|
|
620
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables',
|
|
621
|
+
...options,
|
|
622
|
+
headers: {
|
|
623
|
+
'Content-Type': 'application/json',
|
|
624
|
+
...options.headers
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
};
|
|
628
|
+
/**
|
|
629
|
+
* Create an environment variable. These are globally unique per project environment.
|
|
630
|
+
*/
|
|
631
|
+
export const createEnvironmentVariable = (options) => {
|
|
632
|
+
return (options.client ?? client).post({
|
|
633
|
+
security: [
|
|
634
|
+
{
|
|
635
|
+
scheme: 'bearer',
|
|
636
|
+
type: 'http'
|
|
637
|
+
}
|
|
638
|
+
],
|
|
639
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables',
|
|
640
|
+
...options,
|
|
641
|
+
headers: {
|
|
642
|
+
'Content-Type': 'application/json',
|
|
643
|
+
...options.headers
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
};
|
|
564
647
|
/**
|
|
565
648
|
* Get a graph for a version inside an environment.
|
|
566
649
|
*/
|
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;
|
|
@@ -269,6 +276,18 @@ export type Nodes = {
|
|
|
269
276
|
export type Uuids = {
|
|
270
277
|
ids: Array<string>;
|
|
271
278
|
};
|
|
279
|
+
export type EnvironmentVersion = {
|
|
280
|
+
id?: string;
|
|
281
|
+
created_at?: string;
|
|
282
|
+
last_updated_at?: string;
|
|
283
|
+
deployment_id?: string;
|
|
284
|
+
deployment_name?: string;
|
|
285
|
+
status?: string;
|
|
286
|
+
deployment_started_at?: string;
|
|
287
|
+
deployment_completed_at?: string;
|
|
288
|
+
message?: string;
|
|
289
|
+
retries?: number;
|
|
290
|
+
};
|
|
272
291
|
export type Graph = {
|
|
273
292
|
versionUUID: string;
|
|
274
293
|
nodes: Array<Node>;
|
|
@@ -503,6 +522,10 @@ export type PlanPriceResponse = {
|
|
|
503
522
|
*/
|
|
504
523
|
interval: string;
|
|
505
524
|
};
|
|
525
|
+
/**
|
|
526
|
+
* Environment variable name.
|
|
527
|
+
*/
|
|
528
|
+
export type EnvironmentVariableKey = string;
|
|
506
529
|
/**
|
|
507
530
|
* Expiry query.
|
|
508
531
|
*/
|
|
@@ -1945,6 +1968,227 @@ export type GetEnvironmentOverviewResponses = {
|
|
|
1945
1968
|
200: EnvironmentOverview;
|
|
1946
1969
|
};
|
|
1947
1970
|
export type GetEnvironmentOverviewResponse = GetEnvironmentOverviewResponses[keyof GetEnvironmentOverviewResponses];
|
|
1971
|
+
export type GetEnvironmentVersionsData = {
|
|
1972
|
+
body?: never;
|
|
1973
|
+
path: {
|
|
1974
|
+
/**
|
|
1975
|
+
* The space handle. This must be globally unique.
|
|
1976
|
+
*/
|
|
1977
|
+
spaceHandle: string;
|
|
1978
|
+
/**
|
|
1979
|
+
* A project name. This must be unique to a space.
|
|
1980
|
+
*/
|
|
1981
|
+
projectHandle: string;
|
|
1982
|
+
/**
|
|
1983
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
1984
|
+
*/
|
|
1985
|
+
environmentHandle: string;
|
|
1986
|
+
};
|
|
1987
|
+
query?: never;
|
|
1988
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/versions';
|
|
1989
|
+
};
|
|
1990
|
+
export type GetEnvironmentVersionsResponses = {
|
|
1991
|
+
/**
|
|
1992
|
+
* Environment versions.
|
|
1993
|
+
*/
|
|
1994
|
+
200: Array<EnvironmentVersion>;
|
|
1995
|
+
};
|
|
1996
|
+
export type GetEnvironmentVersionsResponse = GetEnvironmentVersionsResponses[keyof GetEnvironmentVersionsResponses];
|
|
1997
|
+
export type DeleteEnvironmentVariableData = {
|
|
1998
|
+
body?: never;
|
|
1999
|
+
path: {
|
|
2000
|
+
/**
|
|
2001
|
+
* The space handle. This must be globally unique.
|
|
2002
|
+
*/
|
|
2003
|
+
spaceHandle: string;
|
|
2004
|
+
/**
|
|
2005
|
+
* A project name. This must be unique to a space.
|
|
2006
|
+
*/
|
|
2007
|
+
projectHandle: string;
|
|
2008
|
+
/**
|
|
2009
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2010
|
+
*/
|
|
2011
|
+
environmentHandle: string;
|
|
2012
|
+
/**
|
|
2013
|
+
* A version number with in an environment.
|
|
2014
|
+
*/
|
|
2015
|
+
version: string;
|
|
2016
|
+
};
|
|
2017
|
+
query: {
|
|
2018
|
+
/**
|
|
2019
|
+
* Environment variable name.
|
|
2020
|
+
*/
|
|
2021
|
+
key: string;
|
|
2022
|
+
};
|
|
2023
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables';
|
|
2024
|
+
};
|
|
2025
|
+
export type DeleteEnvironmentVariableErrors = {
|
|
2026
|
+
/**
|
|
2027
|
+
* Unauthorised user.
|
|
2028
|
+
*/
|
|
2029
|
+
401: ErrorResponse;
|
|
2030
|
+
/**
|
|
2031
|
+
* Invalid credentials.
|
|
2032
|
+
*/
|
|
2033
|
+
403: ErrorResponse;
|
|
2034
|
+
/**
|
|
2035
|
+
* Related content not found.
|
|
2036
|
+
*/
|
|
2037
|
+
404: ErrorResponse;
|
|
2038
|
+
/**
|
|
2039
|
+
* Unexpected error.
|
|
2040
|
+
*/
|
|
2041
|
+
500: ErrorResponse;
|
|
2042
|
+
};
|
|
2043
|
+
export type DeleteEnvironmentVariableError = DeleteEnvironmentVariableErrors[keyof DeleteEnvironmentVariableErrors];
|
|
2044
|
+
export type DeleteEnvironmentVariableResponses = {
|
|
2045
|
+
/**
|
|
2046
|
+
* Deletion successful.
|
|
2047
|
+
*/
|
|
2048
|
+
204: EnvironmentVariables;
|
|
2049
|
+
};
|
|
2050
|
+
export type DeleteEnvironmentVariableResponse = DeleteEnvironmentVariableResponses[keyof DeleteEnvironmentVariableResponses];
|
|
2051
|
+
export type GetEnvironmentVariablesData = {
|
|
2052
|
+
body?: never;
|
|
2053
|
+
path: {
|
|
2054
|
+
/**
|
|
2055
|
+
* The space handle. This must be globally unique.
|
|
2056
|
+
*/
|
|
2057
|
+
spaceHandle: string;
|
|
2058
|
+
/**
|
|
2059
|
+
* A project name. This must be unique to a space.
|
|
2060
|
+
*/
|
|
2061
|
+
projectHandle: string;
|
|
2062
|
+
/**
|
|
2063
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2064
|
+
*/
|
|
2065
|
+
environmentHandle: string;
|
|
2066
|
+
};
|
|
2067
|
+
query?: never;
|
|
2068
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables';
|
|
2069
|
+
};
|
|
2070
|
+
export type GetEnvironmentVariablesErrors = {
|
|
2071
|
+
/**
|
|
2072
|
+
* Unauthorised user.
|
|
2073
|
+
*/
|
|
2074
|
+
401: ErrorResponse;
|
|
2075
|
+
/**
|
|
2076
|
+
* Invalid credentials.
|
|
2077
|
+
*/
|
|
2078
|
+
403: ErrorResponse;
|
|
2079
|
+
/**
|
|
2080
|
+
* Related content not found.
|
|
2081
|
+
*/
|
|
2082
|
+
404: ErrorResponse;
|
|
2083
|
+
/**
|
|
2084
|
+
* Unexpected error.
|
|
2085
|
+
*/
|
|
2086
|
+
500: ErrorResponse;
|
|
2087
|
+
};
|
|
2088
|
+
export type GetEnvironmentVariablesError = GetEnvironmentVariablesErrors[keyof GetEnvironmentVariablesErrors];
|
|
2089
|
+
export type GetEnvironmentVariablesResponses = {
|
|
2090
|
+
/**
|
|
2091
|
+
* Environment variables.
|
|
2092
|
+
*/
|
|
2093
|
+
200: EnvironmentVariables;
|
|
2094
|
+
};
|
|
2095
|
+
export type GetEnvironmentVariablesResponse = GetEnvironmentVariablesResponses[keyof GetEnvironmentVariablesResponses];
|
|
2096
|
+
export type UpdateEnvironmentVariableData = {
|
|
2097
|
+
body: EnvironmentVariable;
|
|
2098
|
+
path: {
|
|
2099
|
+
/**
|
|
2100
|
+
* The space handle. This must be globally unique.
|
|
2101
|
+
*/
|
|
2102
|
+
spaceHandle: string;
|
|
2103
|
+
/**
|
|
2104
|
+
* A project name. This must be unique to a space.
|
|
2105
|
+
*/
|
|
2106
|
+
projectHandle: string;
|
|
2107
|
+
/**
|
|
2108
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2109
|
+
*/
|
|
2110
|
+
environmentHandle: string;
|
|
2111
|
+
/**
|
|
2112
|
+
* A version number with in an environment.
|
|
2113
|
+
*/
|
|
2114
|
+
version: string;
|
|
2115
|
+
};
|
|
2116
|
+
query?: never;
|
|
2117
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables';
|
|
2118
|
+
};
|
|
2119
|
+
export type UpdateEnvironmentVariableErrors = {
|
|
2120
|
+
/**
|
|
2121
|
+
* Unauthorised user.
|
|
2122
|
+
*/
|
|
2123
|
+
401: ErrorResponse;
|
|
2124
|
+
/**
|
|
2125
|
+
* Invalid credentials.
|
|
2126
|
+
*/
|
|
2127
|
+
403: ErrorResponse;
|
|
2128
|
+
/**
|
|
2129
|
+
* Related content not found.
|
|
2130
|
+
*/
|
|
2131
|
+
404: ErrorResponse;
|
|
2132
|
+
/**
|
|
2133
|
+
* Unexpected error.
|
|
2134
|
+
*/
|
|
2135
|
+
500: ErrorResponse;
|
|
2136
|
+
};
|
|
2137
|
+
export type UpdateEnvironmentVariableError = UpdateEnvironmentVariableErrors[keyof UpdateEnvironmentVariableErrors];
|
|
2138
|
+
export type UpdateEnvironmentVariableResponses = {
|
|
2139
|
+
/**
|
|
2140
|
+
* Update successful.
|
|
2141
|
+
*/
|
|
2142
|
+
202: unknown;
|
|
2143
|
+
};
|
|
2144
|
+
export type CreateEnvironmentVariableData = {
|
|
2145
|
+
body: EnvironmentVariable;
|
|
2146
|
+
path: {
|
|
2147
|
+
/**
|
|
2148
|
+
* The space handle. This must be globally unique.
|
|
2149
|
+
*/
|
|
2150
|
+
spaceHandle: string;
|
|
2151
|
+
/**
|
|
2152
|
+
* A project name. This must be unique to a space.
|
|
2153
|
+
*/
|
|
2154
|
+
projectHandle: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2157
|
+
*/
|
|
2158
|
+
environmentHandle: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* A version number with in an environment.
|
|
2161
|
+
*/
|
|
2162
|
+
version: string;
|
|
2163
|
+
};
|
|
2164
|
+
query?: never;
|
|
2165
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables';
|
|
2166
|
+
};
|
|
2167
|
+
export type CreateEnvironmentVariableErrors = {
|
|
2168
|
+
/**
|
|
2169
|
+
* Unauthorised user.
|
|
2170
|
+
*/
|
|
2171
|
+
401: ErrorResponse;
|
|
2172
|
+
/**
|
|
2173
|
+
* Invalid credentials.
|
|
2174
|
+
*/
|
|
2175
|
+
403: ErrorResponse;
|
|
2176
|
+
/**
|
|
2177
|
+
* Related content not found.
|
|
2178
|
+
*/
|
|
2179
|
+
404: ErrorResponse;
|
|
2180
|
+
/**
|
|
2181
|
+
* Unexpected error.
|
|
2182
|
+
*/
|
|
2183
|
+
500: ErrorResponse;
|
|
2184
|
+
};
|
|
2185
|
+
export type CreateEnvironmentVariableError = CreateEnvironmentVariableErrors[keyof CreateEnvironmentVariableErrors];
|
|
2186
|
+
export type CreateEnvironmentVariableResponses = {
|
|
2187
|
+
/**
|
|
2188
|
+
* Creation successful.
|
|
2189
|
+
*/
|
|
2190
|
+
201: unknown;
|
|
2191
|
+
};
|
|
1948
2192
|
export type GetGraphOverviewData = {
|
|
1949
2193
|
body?: never;
|
|
1950
2194
|
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";
|
|
@@ -457,6 +467,18 @@ export declare const zKindeOrganisationBillingAgreement: z.ZodObject<{
|
|
|
457
467
|
export declare const zUuids: z.ZodObject<{
|
|
458
468
|
ids: z.ZodArray<z.ZodUUID>;
|
|
459
469
|
}, z.core.$strip>;
|
|
470
|
+
export declare const zEnvironmentVersion: z.ZodObject<{
|
|
471
|
+
id: z.ZodOptional<z.ZodUUID>;
|
|
472
|
+
created_at: z.ZodOptional<z.ZodISODateTime>;
|
|
473
|
+
last_updated_at: z.ZodOptional<z.ZodISODateTime>;
|
|
474
|
+
deployment_id: z.ZodOptional<z.ZodUUID>;
|
|
475
|
+
deployment_name: z.ZodOptional<z.ZodString>;
|
|
476
|
+
status: z.ZodOptional<z.ZodString>;
|
|
477
|
+
deployment_started_at: z.ZodOptional<z.ZodISODateTime>;
|
|
478
|
+
deployment_completed_at: z.ZodOptional<z.ZodISODateTime>;
|
|
479
|
+
message: z.ZodOptional<z.ZodString>;
|
|
480
|
+
retries: z.ZodOptional<z.ZodInt>;
|
|
481
|
+
}, z.core.$strip>;
|
|
460
482
|
export declare const zNetworkEdgeProps: z.ZodObject<{
|
|
461
483
|
a: z.ZodOptional<z.ZodString>;
|
|
462
484
|
}, z.core.$strip>;
|
|
@@ -1206,6 +1228,10 @@ export declare const zPlanPriceResponse: z.ZodObject<{
|
|
|
1206
1228
|
currency: z.ZodString;
|
|
1207
1229
|
interval: z.ZodString;
|
|
1208
1230
|
}, z.core.$strip>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Environment variable name.
|
|
1233
|
+
*/
|
|
1234
|
+
export declare const zEnvironmentVariableKey: z.ZodString;
|
|
1209
1235
|
/**
|
|
1210
1236
|
* Expiry query.
|
|
1211
1237
|
*/
|
|
@@ -2419,6 +2445,95 @@ export declare const zGetEnvironmentOverviewResponse: z.ZodObject<{
|
|
|
2419
2445
|
updatedAt: z.ZodISODateTime;
|
|
2420
2446
|
versions: z.ZodInt;
|
|
2421
2447
|
}, z.core.$strip>;
|
|
2448
|
+
export declare const zGetEnvironmentVersionsData: z.ZodObject<{
|
|
2449
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2450
|
+
path: z.ZodObject<{
|
|
2451
|
+
spaceHandle: z.ZodString;
|
|
2452
|
+
projectHandle: z.ZodString;
|
|
2453
|
+
environmentHandle: z.ZodString;
|
|
2454
|
+
}, z.core.$strip>;
|
|
2455
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2456
|
+
}, z.core.$strip>;
|
|
2457
|
+
/**
|
|
2458
|
+
* Environment versions.
|
|
2459
|
+
*/
|
|
2460
|
+
export declare const zGetEnvironmentVersionsResponse: z.ZodArray<z.ZodObject<{
|
|
2461
|
+
id: z.ZodOptional<z.ZodUUID>;
|
|
2462
|
+
created_at: z.ZodOptional<z.ZodISODateTime>;
|
|
2463
|
+
last_updated_at: z.ZodOptional<z.ZodISODateTime>;
|
|
2464
|
+
deployment_id: z.ZodOptional<z.ZodUUID>;
|
|
2465
|
+
deployment_name: z.ZodOptional<z.ZodString>;
|
|
2466
|
+
status: z.ZodOptional<z.ZodString>;
|
|
2467
|
+
deployment_started_at: z.ZodOptional<z.ZodISODateTime>;
|
|
2468
|
+
deployment_completed_at: z.ZodOptional<z.ZodISODateTime>;
|
|
2469
|
+
message: z.ZodOptional<z.ZodString>;
|
|
2470
|
+
retries: z.ZodOptional<z.ZodInt>;
|
|
2471
|
+
}, z.core.$strip>>;
|
|
2472
|
+
export declare const zDeleteEnvironmentVariableData: z.ZodObject<{
|
|
2473
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2474
|
+
path: z.ZodObject<{
|
|
2475
|
+
spaceHandle: z.ZodString;
|
|
2476
|
+
projectHandle: z.ZodString;
|
|
2477
|
+
environmentHandle: z.ZodString;
|
|
2478
|
+
version: z.ZodString;
|
|
2479
|
+
}, z.core.$strip>;
|
|
2480
|
+
query: z.ZodObject<{
|
|
2481
|
+
key: z.ZodString;
|
|
2482
|
+
}, z.core.$strip>;
|
|
2483
|
+
}, z.core.$strip>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Deletion successful.
|
|
2486
|
+
*/
|
|
2487
|
+
export declare const zDeleteEnvironmentVariableResponse: z.ZodObject<{
|
|
2488
|
+
vars: z.ZodArray<z.ZodObject<{
|
|
2489
|
+
key: z.ZodString;
|
|
2490
|
+
value: z.ZodString;
|
|
2491
|
+
}, z.core.$strip>>;
|
|
2492
|
+
}, z.core.$strip>;
|
|
2493
|
+
export declare const zGetEnvironmentVariablesData: z.ZodObject<{
|
|
2494
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2495
|
+
path: z.ZodObject<{
|
|
2496
|
+
spaceHandle: z.ZodString;
|
|
2497
|
+
projectHandle: z.ZodString;
|
|
2498
|
+
environmentHandle: z.ZodString;
|
|
2499
|
+
}, z.core.$strip>;
|
|
2500
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2501
|
+
}, z.core.$strip>;
|
|
2502
|
+
/**
|
|
2503
|
+
* Environment variables.
|
|
2504
|
+
*/
|
|
2505
|
+
export declare const zGetEnvironmentVariablesResponse: z.ZodObject<{
|
|
2506
|
+
vars: z.ZodArray<z.ZodObject<{
|
|
2507
|
+
key: z.ZodString;
|
|
2508
|
+
value: z.ZodString;
|
|
2509
|
+
}, z.core.$strip>>;
|
|
2510
|
+
}, z.core.$strip>;
|
|
2511
|
+
export declare const zUpdateEnvironmentVariableData: z.ZodObject<{
|
|
2512
|
+
body: z.ZodObject<{
|
|
2513
|
+
key: z.ZodString;
|
|
2514
|
+
value: z.ZodString;
|
|
2515
|
+
}, z.core.$strip>;
|
|
2516
|
+
path: z.ZodObject<{
|
|
2517
|
+
spaceHandle: z.ZodString;
|
|
2518
|
+
projectHandle: z.ZodString;
|
|
2519
|
+
environmentHandle: z.ZodString;
|
|
2520
|
+
version: z.ZodString;
|
|
2521
|
+
}, z.core.$strip>;
|
|
2522
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2523
|
+
}, z.core.$strip>;
|
|
2524
|
+
export declare const zCreateEnvironmentVariableData: z.ZodObject<{
|
|
2525
|
+
body: z.ZodObject<{
|
|
2526
|
+
key: z.ZodString;
|
|
2527
|
+
value: z.ZodString;
|
|
2528
|
+
}, z.core.$strip>;
|
|
2529
|
+
path: z.ZodObject<{
|
|
2530
|
+
spaceHandle: z.ZodString;
|
|
2531
|
+
projectHandle: z.ZodString;
|
|
2532
|
+
environmentHandle: z.ZodString;
|
|
2533
|
+
version: z.ZodString;
|
|
2534
|
+
}, z.core.$strip>;
|
|
2535
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2536
|
+
}, z.core.$strip>;
|
|
2422
2537
|
export declare const zGetGraphOverviewData: z.ZodObject<{
|
|
2423
2538
|
body: z.ZodOptional<z.ZodNever>;
|
|
2424
2539
|
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',
|
|
@@ -284,6 +291,18 @@ export const zKindeOrganisationBillingAgreement = z.object({
|
|
|
284
291
|
export const zUuids = z.object({
|
|
285
292
|
ids: z.array(z.uuid())
|
|
286
293
|
});
|
|
294
|
+
export const zEnvironmentVersion = z.object({
|
|
295
|
+
id: z.optional(z.uuid()),
|
|
296
|
+
created_at: z.optional(z.iso.datetime()),
|
|
297
|
+
last_updated_at: z.optional(z.iso.datetime()),
|
|
298
|
+
deployment_id: z.optional(z.uuid()),
|
|
299
|
+
deployment_name: z.optional(z.string()),
|
|
300
|
+
status: z.optional(z.string()),
|
|
301
|
+
deployment_started_at: z.optional(z.iso.datetime()),
|
|
302
|
+
deployment_completed_at: z.optional(z.iso.datetime()),
|
|
303
|
+
message: z.optional(z.string()),
|
|
304
|
+
retries: z.optional(z.int())
|
|
305
|
+
});
|
|
287
306
|
export const zNetworkEdgeProps = z.object({
|
|
288
307
|
a: z.optional(z.string())
|
|
289
308
|
});
|
|
@@ -536,6 +555,10 @@ export const zPlanPriceResponse = z.object({
|
|
|
536
555
|
currency: z.string(),
|
|
537
556
|
interval: z.string()
|
|
538
557
|
});
|
|
558
|
+
/**
|
|
559
|
+
* Environment variable name.
|
|
560
|
+
*/
|
|
561
|
+
export const zEnvironmentVariableKey = z.string();
|
|
539
562
|
/**
|
|
540
563
|
* Expiry query.
|
|
541
564
|
*/
|
|
@@ -984,6 +1007,68 @@ export const zGetEnvironmentOverviewData = z.object({
|
|
|
984
1007
|
* Environment overview.
|
|
985
1008
|
*/
|
|
986
1009
|
export const zGetEnvironmentOverviewResponse = zEnvironmentOverview;
|
|
1010
|
+
export const zGetEnvironmentVersionsData = z.object({
|
|
1011
|
+
body: z.optional(z.never()),
|
|
1012
|
+
path: z.object({
|
|
1013
|
+
spaceHandle: z.string(),
|
|
1014
|
+
projectHandle: z.string(),
|
|
1015
|
+
environmentHandle: z.string()
|
|
1016
|
+
}),
|
|
1017
|
+
query: z.optional(z.never())
|
|
1018
|
+
});
|
|
1019
|
+
/**
|
|
1020
|
+
* Environment versions.
|
|
1021
|
+
*/
|
|
1022
|
+
export const zGetEnvironmentVersionsResponse = z.array(zEnvironmentVersion);
|
|
1023
|
+
export const zDeleteEnvironmentVariableData = z.object({
|
|
1024
|
+
body: z.optional(z.never()),
|
|
1025
|
+
path: z.object({
|
|
1026
|
+
spaceHandle: z.string(),
|
|
1027
|
+
projectHandle: z.string(),
|
|
1028
|
+
environmentHandle: z.string(),
|
|
1029
|
+
version: z.string()
|
|
1030
|
+
}),
|
|
1031
|
+
query: z.object({
|
|
1032
|
+
key: z.string()
|
|
1033
|
+
})
|
|
1034
|
+
});
|
|
1035
|
+
/**
|
|
1036
|
+
* Deletion successful.
|
|
1037
|
+
*/
|
|
1038
|
+
export const zDeleteEnvironmentVariableResponse = zEnvironmentVariables;
|
|
1039
|
+
export const zGetEnvironmentVariablesData = z.object({
|
|
1040
|
+
body: z.optional(z.never()),
|
|
1041
|
+
path: z.object({
|
|
1042
|
+
spaceHandle: z.string(),
|
|
1043
|
+
projectHandle: z.string(),
|
|
1044
|
+
environmentHandle: z.string()
|
|
1045
|
+
}),
|
|
1046
|
+
query: z.optional(z.never())
|
|
1047
|
+
});
|
|
1048
|
+
/**
|
|
1049
|
+
* Environment variables.
|
|
1050
|
+
*/
|
|
1051
|
+
export const zGetEnvironmentVariablesResponse = zEnvironmentVariables;
|
|
1052
|
+
export const zUpdateEnvironmentVariableData = z.object({
|
|
1053
|
+
body: zEnvironmentVariable,
|
|
1054
|
+
path: z.object({
|
|
1055
|
+
spaceHandle: z.string(),
|
|
1056
|
+
projectHandle: z.string(),
|
|
1057
|
+
environmentHandle: z.string(),
|
|
1058
|
+
version: z.string()
|
|
1059
|
+
}),
|
|
1060
|
+
query: z.optional(z.never())
|
|
1061
|
+
});
|
|
1062
|
+
export const zCreateEnvironmentVariableData = z.object({
|
|
1063
|
+
body: zEnvironmentVariable,
|
|
1064
|
+
path: z.object({
|
|
1065
|
+
spaceHandle: z.string(),
|
|
1066
|
+
projectHandle: z.string(),
|
|
1067
|
+
environmentHandle: z.string(),
|
|
1068
|
+
version: z.string()
|
|
1069
|
+
}),
|
|
1070
|
+
query: z.optional(z.never())
|
|
1071
|
+
});
|
|
987
1072
|
export const zGetGraphOverviewData = z.object({
|
|
988
1073
|
body: z.optional(z.never()),
|
|
989
1074
|
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, GetEnvironmentVersionsData, 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,27 @@ 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 useGetEnvironmentVersions: (options: Omit<GetEnvironmentVersionsData, "url"> & {
|
|
142
|
+
enabled?: boolean;
|
|
143
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").EnvironmentVersion[] | undefined, Error>;
|
|
144
|
+
export declare const useDeleteEnvironmentVariable: (config?: {
|
|
145
|
+
onSuccess?: (data: GetSuccessResponse<DeleteEnvironmentVariableResponses>) => void;
|
|
146
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
147
|
+
retry?: boolean;
|
|
148
|
+
}) => import("@tanstack/react-query").UseMutationResult<import("../../sdk/types.gen").EnvironmentVariables | undefined, unknown, Omit<DeleteEnvironmentVariableData, "url">, unknown>;
|
|
149
|
+
export declare const useGetEnvironmentVariables: (options: Omit<GetEnvironmentVariablesData, "url"> & {
|
|
150
|
+
enabled?: boolean;
|
|
151
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").EnvironmentVariables | undefined, Error>;
|
|
152
|
+
export declare const useUpdateEnvironmentVariable: (config?: {
|
|
153
|
+
onSuccess?: (data: GetSuccessResponse<UpdateEnvironmentVariableResponses>) => void;
|
|
154
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
155
|
+
retry?: boolean;
|
|
156
|
+
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<UpdateEnvironmentVariableData, "url">, unknown>;
|
|
157
|
+
export declare const useCreateEnvironmentVariable: (config?: {
|
|
158
|
+
onSuccess?: (data: GetSuccessResponse<CreateEnvironmentVariableResponses>) => void;
|
|
159
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
160
|
+
retry?: boolean;
|
|
161
|
+
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<CreateEnvironmentVariableData, "url">, unknown>;
|
|
141
162
|
export declare const useGetGraphOverview: (options: Omit<GetGraphOverviewData, "url"> & {
|
|
142
163
|
enabled?: boolean;
|
|
143
164
|
}) => 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, getEnvironmentVersions, 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,105 @@ export const useGetEnvironmentOverview = (options) => {
|
|
|
706
706
|
staleTime: 600000
|
|
707
707
|
});
|
|
708
708
|
};
|
|
709
|
+
export const useGetEnvironmentVersions = (options) => {
|
|
710
|
+
const token = useToken();
|
|
711
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
712
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/versions" };
|
|
713
|
+
const funcer = async () => {
|
|
714
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
715
|
+
if (isPromise(token) && !token)
|
|
716
|
+
return;
|
|
717
|
+
const res = await getEnvironmentVersions({ ...opts, ...rest, auth });
|
|
718
|
+
return res.data;
|
|
719
|
+
};
|
|
720
|
+
if (!token)
|
|
721
|
+
enabled = false;
|
|
722
|
+
return useQuery({
|
|
723
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "versions", options.query ?? {}],
|
|
724
|
+
queryFn: funcer,
|
|
725
|
+
enabled,
|
|
726
|
+
retry: false,
|
|
727
|
+
staleTime: 600000
|
|
728
|
+
});
|
|
729
|
+
};
|
|
730
|
+
export const useDeleteEnvironmentVariable = (config) => {
|
|
731
|
+
const token = useToken();
|
|
732
|
+
const queryClient = useQueryClient();
|
|
733
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables" };
|
|
734
|
+
const funcer = async (options) => {
|
|
735
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
736
|
+
const res = await deleteEnvironmentVariable({ ...opts, ...options, auth });
|
|
737
|
+
return res?.data;
|
|
738
|
+
};
|
|
739
|
+
return useMutation({
|
|
740
|
+
mutationFn: funcer,
|
|
741
|
+
onSuccess: (res, options, c, ctx) => {
|
|
742
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "variables"] });
|
|
743
|
+
config?.onSuccess && config.onSuccess(res);
|
|
744
|
+
},
|
|
745
|
+
onError: config?.onError,
|
|
746
|
+
retry: config?.retry
|
|
747
|
+
});
|
|
748
|
+
};
|
|
749
|
+
export const useGetEnvironmentVariables = (options) => {
|
|
750
|
+
const token = useToken();
|
|
751
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
752
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables" };
|
|
753
|
+
const funcer = async () => {
|
|
754
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
755
|
+
if (isPromise(token) && !token)
|
|
756
|
+
return;
|
|
757
|
+
const res = await getEnvironmentVariables({ ...opts, ...rest, auth });
|
|
758
|
+
return res.data;
|
|
759
|
+
};
|
|
760
|
+
if (!token)
|
|
761
|
+
enabled = false;
|
|
762
|
+
return useQuery({
|
|
763
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "variables", options.query ?? {}],
|
|
764
|
+
queryFn: funcer,
|
|
765
|
+
enabled,
|
|
766
|
+
retry: false,
|
|
767
|
+
staleTime: 600000
|
|
768
|
+
});
|
|
769
|
+
};
|
|
770
|
+
export const useUpdateEnvironmentVariable = (config) => {
|
|
771
|
+
const token = useToken();
|
|
772
|
+
const queryClient = useQueryClient();
|
|
773
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables" };
|
|
774
|
+
const funcer = async (options) => {
|
|
775
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
776
|
+
const res = await updateEnvironmentVariable({ ...opts, ...options, auth });
|
|
777
|
+
return res?.data;
|
|
778
|
+
};
|
|
779
|
+
return useMutation({
|
|
780
|
+
mutationFn: funcer,
|
|
781
|
+
onSuccess: (res, options, c, ctx) => {
|
|
782
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "variables"] });
|
|
783
|
+
config?.onSuccess && config.onSuccess(res);
|
|
784
|
+
},
|
|
785
|
+
onError: config?.onError,
|
|
786
|
+
retry: config?.retry
|
|
787
|
+
});
|
|
788
|
+
};
|
|
789
|
+
export const useCreateEnvironmentVariable = (config) => {
|
|
790
|
+
const token = useToken();
|
|
791
|
+
const queryClient = useQueryClient();
|
|
792
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/variables" };
|
|
793
|
+
const funcer = async (options) => {
|
|
794
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
795
|
+
const res = await createEnvironmentVariable({ ...opts, ...options, auth });
|
|
796
|
+
return res?.data;
|
|
797
|
+
};
|
|
798
|
+
return useMutation({
|
|
799
|
+
mutationFn: funcer,
|
|
800
|
+
onSuccess: (res, options, c, ctx) => {
|
|
801
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "variables"] });
|
|
802
|
+
config?.onSuccess && config.onSuccess(res);
|
|
803
|
+
},
|
|
804
|
+
onError: config?.onError,
|
|
805
|
+
retry: config?.retry
|
|
806
|
+
});
|
|
807
|
+
};
|
|
709
808
|
export const useGetGraphOverview = (options) => {
|
|
710
809
|
const token = useToken();
|
|
711
810
|
let { enabled, ...rest } = options || { enabled: true };
|