shoal-web-sdk 1.0.12 → 1.0.13
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 +55 -26
- package/dist/sdk/@tanstack/react-query.gen.js +67 -36
- package/dist/sdk/sdk.gen.d.ts +17 -12
- package/dist/sdk/sdk.gen.js +51 -24
- package/dist/sdk/types.gen.d.ts +183 -72
- package/dist/sdk/zod.gen.d.ts +263 -49
- package/dist/sdk/zod.gen.js +68 -33
- package/dist/tanstack-codegen/generated/generated.d.ts +26 -18
- package/dist/tanstack-codegen/generated/generated.js +51 -32
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses,
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, GetBlueprintData, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteBlueprintData, DeleteBlueprintResponses, UpdateBlueprintData, UpdateBlueprintResponses, CreateBlueprintData, CreateBlueprintResponses, GetVersionData, ImportBlueprintData, ImportBlueprintResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData, GetSpacePropertiesData, SetSpacePropertyData, SetSpacePropertyResponses } from "../../sdk/types.gen";
|
|
4
4
|
export declare const useGetServiceHealth: (options?: Omit<GetServiceHealthData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").HealthResponse | undefined, Error>;
|
|
@@ -111,17 +111,9 @@ export declare const useRecordOnboardingAnalytics: (config?: {
|
|
|
111
111
|
data: unknown;
|
|
112
112
|
headers: Headers;
|
|
113
113
|
}, unknown, Omit<RecordOnboardingAnalyticsData, "url">, unknown>;
|
|
114
|
-
export declare const
|
|
114
|
+
export declare const useGetBlueprint: (options: Omit<GetBlueprintData, "url"> & {
|
|
115
115
|
enabled?: boolean;
|
|
116
|
-
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").
|
|
117
|
-
export declare const useUpdateTemplate: (config?: {
|
|
118
|
-
onSuccess?: (data: GetSuccessResponse<UpdateTemplateResponses>, headers: Headers) => void;
|
|
119
|
-
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
120
|
-
retry?: boolean;
|
|
121
|
-
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
122
|
-
data: import("../../sdk/types.gen").Template | undefined;
|
|
123
|
-
headers: Headers;
|
|
124
|
-
}, unknown, Omit<UpdateTemplateData, "url">, unknown>;
|
|
116
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Blueprint | undefined, Error>;
|
|
125
117
|
export declare const useCreateSpace: (config?: {
|
|
126
118
|
onSuccess?: (data: GetSuccessResponse<CreateSpaceResponses>, headers: Headers) => void;
|
|
127
119
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -249,25 +241,41 @@ export declare const useCreateEnvironmentVariable: (config?: {
|
|
|
249
241
|
data: unknown;
|
|
250
242
|
headers: Headers;
|
|
251
243
|
}, unknown, Omit<CreateEnvironmentVariableData, "url">, unknown>;
|
|
252
|
-
export declare const
|
|
253
|
-
onSuccess?: (data: GetSuccessResponse<
|
|
244
|
+
export declare const useDeleteBlueprint: (config?: {
|
|
245
|
+
onSuccess?: (data: GetSuccessResponse<DeleteBlueprintResponses>, headers: Headers) => void;
|
|
254
246
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
255
247
|
retry?: boolean;
|
|
256
248
|
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
257
249
|
data: void | undefined;
|
|
258
250
|
headers: Headers;
|
|
259
|
-
}, unknown, Omit<
|
|
260
|
-
export declare const
|
|
261
|
-
onSuccess?: (data: GetSuccessResponse<
|
|
251
|
+
}, unknown, Omit<DeleteBlueprintData, "url">, unknown>;
|
|
252
|
+
export declare const useUpdateBlueprint: (config?: {
|
|
253
|
+
onSuccess?: (data: GetSuccessResponse<UpdateBlueprintResponses>, headers: Headers) => void;
|
|
262
254
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
263
255
|
retry?: boolean;
|
|
264
256
|
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
265
|
-
data: import("../../sdk/types.gen").
|
|
257
|
+
data: import("../../sdk/types.gen").Blueprint | undefined;
|
|
266
258
|
headers: Headers;
|
|
267
|
-
}, unknown, Omit<
|
|
259
|
+
}, unknown, Omit<UpdateBlueprintData, "url">, unknown>;
|
|
260
|
+
export declare const useCreateBlueprint: (config?: {
|
|
261
|
+
onSuccess?: (data: GetSuccessResponse<CreateBlueprintResponses>, headers: Headers) => void;
|
|
262
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
263
|
+
retry?: boolean;
|
|
264
|
+
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
265
|
+
data: import("../../sdk/types.gen").Blueprint | undefined;
|
|
266
|
+
headers: Headers;
|
|
267
|
+
}, unknown, Omit<CreateBlueprintData, "url">, unknown>;
|
|
268
268
|
export declare const useGetVersion: (options: Omit<GetVersionData, "url"> & {
|
|
269
269
|
enabled?: boolean;
|
|
270
270
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Version | undefined, Error>;
|
|
271
|
+
export declare const useImportBlueprint: (config?: {
|
|
272
|
+
onSuccess?: (data: GetSuccessResponse<ImportBlueprintResponses>, headers: Headers) => void;
|
|
273
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
274
|
+
retry?: boolean;
|
|
275
|
+
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
276
|
+
data: unknown;
|
|
277
|
+
headers: Headers;
|
|
278
|
+
}, unknown, Omit<ImportBlueprintData, "url">, unknown>;
|
|
271
279
|
export declare const useGetGraphOverview: (options: Omit<GetGraphOverviewData, "url"> & {
|
|
272
280
|
enabled?: boolean;
|
|
273
281
|
}) => 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, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics,
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, getBlueprint, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteBlueprint, updateBlueprint, createBlueprint, getVersion, importBlueprint, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, requestSignedUploadUrl, checkSubdomainUniqueness, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices, getSpaceProperties, setSpaceProperty } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -403,46 +403,27 @@ export const useRecordOnboardingAnalytics = (config) => {
|
|
|
403
403
|
retry: config?.retry
|
|
404
404
|
});
|
|
405
405
|
};
|
|
406
|
-
export const
|
|
406
|
+
export const useGetBlueprint = (options) => {
|
|
407
407
|
const token = useToken();
|
|
408
408
|
let { enabled, ...rest } = options || { enabled: true };
|
|
409
|
-
const opts = { throwOnError: true, url: "/
|
|
409
|
+
const opts = { throwOnError: true, url: "/blueprints/{blueprint}" };
|
|
410
410
|
const funcer = async () => {
|
|
411
411
|
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
412
412
|
if (isPromise(token) && !token)
|
|
413
413
|
return;
|
|
414
|
-
const res = await
|
|
414
|
+
const res = await getBlueprint({ ...opts, ...rest, auth });
|
|
415
415
|
return res.data;
|
|
416
416
|
};
|
|
417
417
|
if (!token)
|
|
418
418
|
enabled = false;
|
|
419
419
|
return useQuery({
|
|
420
|
-
queryKey: ["
|
|
420
|
+
queryKey: ["blueprints", options?.path?.blueprint, options.query ?? {}],
|
|
421
421
|
queryFn: funcer,
|
|
422
422
|
enabled,
|
|
423
423
|
retry: false,
|
|
424
424
|
staleTime: 600000
|
|
425
425
|
});
|
|
426
426
|
};
|
|
427
|
-
export const useUpdateTemplate = (config) => {
|
|
428
|
-
const token = useToken();
|
|
429
|
-
const queryClient = useQueryClient();
|
|
430
|
-
const opts = { throwOnError: true, url: "/templates/{template}" };
|
|
431
|
-
const funcer = async (options) => {
|
|
432
|
-
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
433
|
-
const res = await updateTemplate({ ...opts, ...options, auth });
|
|
434
|
-
return { data: res.data, headers: res.response.headers };
|
|
435
|
-
};
|
|
436
|
-
return useMutation({
|
|
437
|
-
mutationFn: funcer,
|
|
438
|
-
onSuccess: (res, options, c, ctx) => {
|
|
439
|
-
queryClient.invalidateQueries({ queryKey: ["templates", options?.path?.template] });
|
|
440
|
-
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
441
|
-
},
|
|
442
|
-
onError: config?.onError,
|
|
443
|
-
retry: config?.retry
|
|
444
|
-
});
|
|
445
|
-
};
|
|
446
427
|
export const useCreateSpace = (config) => {
|
|
447
428
|
const token = useToken();
|
|
448
429
|
const queryClient = useQueryClient();
|
|
@@ -925,38 +906,57 @@ export const useCreateEnvironmentVariable = (config) => {
|
|
|
925
906
|
retry: config?.retry
|
|
926
907
|
});
|
|
927
908
|
};
|
|
928
|
-
export const
|
|
909
|
+
export const useDeleteBlueprint = (config) => {
|
|
929
910
|
const token = useToken();
|
|
930
911
|
const queryClient = useQueryClient();
|
|
931
|
-
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{
|
|
912
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{blueprint}" };
|
|
932
913
|
const funcer = async (options) => {
|
|
933
914
|
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
934
|
-
const res = await
|
|
915
|
+
const res = await deleteBlueprint({ ...opts, ...options, auth });
|
|
935
916
|
return { data: res.data, headers: res.response.headers };
|
|
936
917
|
};
|
|
937
918
|
return useMutation({
|
|
938
919
|
mutationFn: funcer,
|
|
939
920
|
onSuccess: (res, options, c, ctx) => {
|
|
940
|
-
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, options?.path?.
|
|
921
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, options?.path?.blueprint] });
|
|
941
922
|
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
942
923
|
},
|
|
943
924
|
onError: config?.onError,
|
|
944
925
|
retry: config?.retry
|
|
945
926
|
});
|
|
946
927
|
};
|
|
947
|
-
export const
|
|
928
|
+
export const useUpdateBlueprint = (config) => {
|
|
948
929
|
const token = useToken();
|
|
949
930
|
const queryClient = useQueryClient();
|
|
950
|
-
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/
|
|
931
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{blueprint}" };
|
|
951
932
|
const funcer = async (options) => {
|
|
952
933
|
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
953
|
-
const res = await
|
|
934
|
+
const res = await updateBlueprint({ ...opts, ...options, auth });
|
|
954
935
|
return { data: res.data, headers: res.response.headers };
|
|
955
936
|
};
|
|
956
937
|
return useMutation({
|
|
957
938
|
mutationFn: funcer,
|
|
958
939
|
onSuccess: (res, options, c, ctx) => {
|
|
959
|
-
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle,
|
|
940
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, options?.path?.blueprint] });
|
|
941
|
+
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
942
|
+
},
|
|
943
|
+
onError: config?.onError,
|
|
944
|
+
retry: config?.retry
|
|
945
|
+
});
|
|
946
|
+
};
|
|
947
|
+
export const useCreateBlueprint = (config) => {
|
|
948
|
+
const token = useToken();
|
|
949
|
+
const queryClient = useQueryClient();
|
|
950
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/blueprints/create" };
|
|
951
|
+
const funcer = async (options) => {
|
|
952
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
953
|
+
const res = await createBlueprint({ ...opts, ...options, auth });
|
|
954
|
+
return { data: res.data, headers: res.response.headers };
|
|
955
|
+
};
|
|
956
|
+
return useMutation({
|
|
957
|
+
mutationFn: funcer,
|
|
958
|
+
onSuccess: (res, options, c, ctx) => {
|
|
959
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "blueprints", "create"] });
|
|
960
960
|
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
961
961
|
},
|
|
962
962
|
onError: config?.onError,
|
|
@@ -984,6 +984,25 @@ export const useGetVersion = (options) => {
|
|
|
984
984
|
staleTime: 600000
|
|
985
985
|
});
|
|
986
986
|
};
|
|
987
|
+
export const useImportBlueprint = (config) => {
|
|
988
|
+
const token = useToken();
|
|
989
|
+
const queryClient = useQueryClient();
|
|
990
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/import" };
|
|
991
|
+
const funcer = async (options) => {
|
|
992
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
993
|
+
const res = await importBlueprint({ ...opts, ...options, auth });
|
|
994
|
+
return { data: res.data, headers: res.response.headers };
|
|
995
|
+
};
|
|
996
|
+
return useMutation({
|
|
997
|
+
mutationFn: funcer,
|
|
998
|
+
onSuccess: (res, options, c, ctx) => {
|
|
999
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, options?.path?.version, "import"] });
|
|
1000
|
+
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
1001
|
+
},
|
|
1002
|
+
onError: config?.onError,
|
|
1003
|
+
retry: config?.retry
|
|
1004
|
+
});
|
|
1005
|
+
};
|
|
987
1006
|
export const useGetGraphOverview = (options) => {
|
|
988
1007
|
const token = useToken();
|
|
989
1008
|
let { enabled, ...rest } = options || { enabled: true };
|