shoal-web-sdk 0.0.101 → 0.0.103
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 +27 -6
- package/dist/sdk/@tanstack/react-query.gen.js +12 -13
- package/dist/sdk/sdk.gen.d.ts +4 -7
- package/dist/sdk/sdk.gen.js +5 -14
- package/dist/sdk/types.gen.d.ts +18 -34
- package/dist/sdk/zod.gen.d.ts +21 -23
- package/dist/sdk/zod.gen.js +12 -12
- package/dist/tanstack-codegen/generated/generated.d.ts +4 -6
- package/dist/tanstack-codegen/generated/generated.js +17 -15
- 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, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError
|
|
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, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedUploadUrlData, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -744,13 +744,34 @@ export declare const updateGraphStateMutation: (options?: Partial<Options<Update
|
|
|
744
744
|
* Trigger a deployment for a version inside an environment.
|
|
745
745
|
*/
|
|
746
746
|
export declare const deployVersionMutation: (options?: Partial<Options<DeployVersionData>>) => UseMutationOptions<unknown, DeployVersionError, Options<DeployVersionData>>;
|
|
747
|
+
export declare const requestSignedUploadUrlQueryKey: (options: Options<RequestSignedUploadUrlData>) => [Pick<Options<RequestSignedUploadUrlData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
748
|
+
_id: string;
|
|
749
|
+
_infinite?: boolean;
|
|
750
|
+
tags?: ReadonlyArray<string>;
|
|
751
|
+
}];
|
|
747
752
|
/**
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
* Uploads a single ZIP file (max 5 MB, .zip only) associated with a node in a project/env/version.
|
|
751
|
-
*
|
|
753
|
+
* Request a signed upload URL to upload source code zip files.
|
|
752
754
|
*/
|
|
753
|
-
export declare const
|
|
755
|
+
export declare const requestSignedUploadUrlOptions: (options: Options<RequestSignedUploadUrlData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").SignedUrlUploadResponse, Error, import("../types.gen").SignedUrlUploadResponse, [Pick<Options<RequestSignedUploadUrlData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
756
|
+
_id: string;
|
|
757
|
+
_infinite?: boolean;
|
|
758
|
+
tags?: ReadonlyArray<string>;
|
|
759
|
+
}]>, "queryFn"> & {
|
|
760
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").SignedUrlUploadResponse, [Pick<Options<RequestSignedUploadUrlData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
761
|
+
_id: string;
|
|
762
|
+
_infinite?: boolean;
|
|
763
|
+
tags?: ReadonlyArray<string>;
|
|
764
|
+
}], never> | undefined;
|
|
765
|
+
} & {
|
|
766
|
+
queryKey: [Pick<Options<RequestSignedUploadUrlData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
767
|
+
_id: string;
|
|
768
|
+
_infinite?: boolean;
|
|
769
|
+
tags?: ReadonlyArray<string>;
|
|
770
|
+
}] & {
|
|
771
|
+
[dataTagSymbol]: import("../types.gen").SignedUrlUploadResponse;
|
|
772
|
+
[dataTagErrorSymbol]: Error;
|
|
773
|
+
};
|
|
774
|
+
};
|
|
754
775
|
export declare const getBillingPlanQueryKey: (options: Options<GetBillingPlanData>) => [Pick<Options<GetBillingPlanData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
755
776
|
_id: string;
|
|
756
777
|
_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, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateGraphState, updateUsername, updateUserProfile
|
|
4
|
+
import { createEnvironment, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateGraphState, updateUsername, updateUserProfile } 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) {
|
|
@@ -825,24 +825,23 @@ export const deployVersionMutation = (options) => {
|
|
|
825
825
|
};
|
|
826
826
|
return mutationOptions;
|
|
827
827
|
};
|
|
828
|
+
export const requestSignedUploadUrlQueryKey = (options) => createQueryKey('requestSignedUploadUrl', options);
|
|
828
829
|
/**
|
|
829
|
-
*
|
|
830
|
-
*
|
|
831
|
-
* Uploads a single ZIP file (max 5 MB, .zip only) associated with a node in a project/env/version.
|
|
832
|
-
*
|
|
830
|
+
* Request a signed upload URL to upload source code zip files.
|
|
833
831
|
*/
|
|
834
|
-
export const
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
const { data } = await
|
|
832
|
+
export const requestSignedUploadUrlOptions = (options) => {
|
|
833
|
+
return queryOptions({
|
|
834
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
835
|
+
const { data } = await requestSignedUploadUrl({
|
|
838
836
|
...options,
|
|
839
|
-
...
|
|
837
|
+
...queryKey[0],
|
|
838
|
+
signal,
|
|
840
839
|
throwOnError: true
|
|
841
840
|
});
|
|
842
841
|
return data;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
|
|
842
|
+
},
|
|
843
|
+
queryKey: requestSignedUploadUrlQueryKey(options)
|
|
844
|
+
});
|
|
846
845
|
};
|
|
847
846
|
export const getBillingPlanQueryKey = (options) => createQueryKey('getBillingPlan', options);
|
|
848
847
|
/**
|
package/dist/sdk/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses
|
|
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, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses } 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
|
|
@@ -150,12 +150,9 @@ export declare const updateGraphState: <ThrowOnError extends boolean = false>(op
|
|
|
150
150
|
*/
|
|
151
151
|
export declare const deployVersion: <ThrowOnError extends boolean = false>(options: Options<DeployVersionData, ThrowOnError>) => import("./client").RequestResult<DeployVersionResponses, DeployVersionErrors, ThrowOnError, "fields">;
|
|
152
152
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* Uploads a single ZIP file (max 5 MB, .zip only) associated with a node in a project/env/version.
|
|
156
|
-
*
|
|
153
|
+
* Request a signed upload URL to upload source code zip files.
|
|
157
154
|
*/
|
|
158
|
-
export declare const
|
|
155
|
+
export declare const requestSignedUploadUrl: <ThrowOnError extends boolean = false>(options: Options<RequestSignedUploadUrlData, ThrowOnError>) => import("./client").RequestResult<RequestSignedUploadUrlResponses, RequestSignedUploadUrlErrors, ThrowOnError, "fields">;
|
|
159
156
|
/**
|
|
160
157
|
* Get the current billing plan for a space.
|
|
161
158
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { formDataBodySerializer } from './client';
|
|
3
2
|
import { client } from './client.gen';
|
|
4
3
|
/**
|
|
5
4
|
* Get service health.
|
|
@@ -544,26 +543,18 @@ export const deployVersion = (options) => {
|
|
|
544
543
|
});
|
|
545
544
|
};
|
|
546
545
|
/**
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
* Uploads a single ZIP file (max 5 MB, .zip only) associated with a node in a project/env/version.
|
|
550
|
-
*
|
|
546
|
+
* Request a signed upload URL to upload source code zip files.
|
|
551
547
|
*/
|
|
552
|
-
export const
|
|
553
|
-
return (options.client ?? client).
|
|
554
|
-
...formDataBodySerializer,
|
|
548
|
+
export const requestSignedUploadUrl = (options) => {
|
|
549
|
+
return (options.client ?? client).get({
|
|
555
550
|
security: [
|
|
556
551
|
{
|
|
557
552
|
scheme: 'bearer',
|
|
558
553
|
type: 'http'
|
|
559
554
|
}
|
|
560
555
|
],
|
|
561
|
-
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/nodes/{nodeUUID}/
|
|
562
|
-
...options
|
|
563
|
-
headers: {
|
|
564
|
-
'Content-Type': null,
|
|
565
|
-
...options.headers
|
|
566
|
-
}
|
|
556
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/nodes/{nodeUUID}/signed-upload-url',
|
|
557
|
+
...options
|
|
567
558
|
});
|
|
568
559
|
};
|
|
569
560
|
/**
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -259,7 +259,7 @@ export type NetworkEdgeProps = {
|
|
|
259
259
|
a?: string;
|
|
260
260
|
};
|
|
261
261
|
export type RouteEdgeProps = {
|
|
262
|
-
|
|
262
|
+
subdomain?: string;
|
|
263
263
|
};
|
|
264
264
|
export type Node = {
|
|
265
265
|
id: string;
|
|
@@ -343,20 +343,9 @@ export type ProxyNodeProps = {
|
|
|
343
343
|
export type VmNodeProps = {
|
|
344
344
|
os?: string;
|
|
345
345
|
};
|
|
346
|
-
export type
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
* File size in bytes.
|
|
350
|
-
*/
|
|
351
|
-
size: number;
|
|
352
|
-
/**
|
|
353
|
-
* The GCS path within the bucket.
|
|
354
|
-
*/
|
|
355
|
-
bucketPath: string;
|
|
356
|
-
/**
|
|
357
|
-
* The MIME type of the file.
|
|
358
|
-
*/
|
|
359
|
-
contentType?: string;
|
|
346
|
+
export type SignedUrlUploadResponse = {
|
|
347
|
+
signedUrl: string;
|
|
348
|
+
expiration: string;
|
|
360
349
|
};
|
|
361
350
|
export type BillingPlan = {
|
|
362
351
|
tier: 'free' | 'hobby' | 'pro';
|
|
@@ -387,6 +376,10 @@ export type BillingUsage = {
|
|
|
387
376
|
* Expiry query.
|
|
388
377
|
*/
|
|
389
378
|
export type Expired = boolean;
|
|
379
|
+
/**
|
|
380
|
+
* The node ID this source ZIP is associated with.
|
|
381
|
+
*/
|
|
382
|
+
export type NodeUuid = string;
|
|
390
383
|
/**
|
|
391
384
|
* An invite UUID.
|
|
392
385
|
*/
|
|
@@ -1797,13 +1790,8 @@ export type DeployVersionResponses = {
|
|
|
1797
1790
|
*/
|
|
1798
1791
|
202: unknown;
|
|
1799
1792
|
};
|
|
1800
|
-
export type
|
|
1801
|
-
body
|
|
1802
|
-
/**
|
|
1803
|
-
* The ZIP file to upload (max 5 MB, .zip only).
|
|
1804
|
-
*/
|
|
1805
|
-
file: Blob | File;
|
|
1806
|
-
};
|
|
1793
|
+
export type RequestSignedUploadUrlData = {
|
|
1794
|
+
body?: never;
|
|
1807
1795
|
path: {
|
|
1808
1796
|
/**
|
|
1809
1797
|
* The space handle. This must be globally unique.
|
|
@@ -1827,11 +1815,11 @@ export type UploadNodeSourceZipData = {
|
|
|
1827
1815
|
nodeUUID: string;
|
|
1828
1816
|
};
|
|
1829
1817
|
query?: never;
|
|
1830
|
-
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/nodes/{nodeUUID}/
|
|
1818
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/nodes/{nodeUUID}/signed-upload-url';
|
|
1831
1819
|
};
|
|
1832
|
-
export type
|
|
1820
|
+
export type RequestSignedUploadUrlErrors = {
|
|
1833
1821
|
/**
|
|
1834
|
-
* Invalid request parameters
|
|
1822
|
+
* Invalid request parameters.
|
|
1835
1823
|
*/
|
|
1836
1824
|
400: ErrorResponse;
|
|
1837
1825
|
/**
|
|
@@ -1842,23 +1830,19 @@ export type UploadNodeSourceZipErrors = {
|
|
|
1842
1830
|
* Invalid credentials.
|
|
1843
1831
|
*/
|
|
1844
1832
|
403: ErrorResponse;
|
|
1845
|
-
/**
|
|
1846
|
-
* Uploaded file is too large.
|
|
1847
|
-
*/
|
|
1848
|
-
413: ErrorResponse;
|
|
1849
1833
|
/**
|
|
1850
1834
|
* Unexpected error.
|
|
1851
1835
|
*/
|
|
1852
1836
|
500: ErrorResponse;
|
|
1853
1837
|
};
|
|
1854
|
-
export type
|
|
1855
|
-
export type
|
|
1838
|
+
export type RequestSignedUploadUrlError = RequestSignedUploadUrlErrors[keyof RequestSignedUploadUrlErrors];
|
|
1839
|
+
export type RequestSignedUploadUrlResponses = {
|
|
1856
1840
|
/**
|
|
1857
|
-
*
|
|
1841
|
+
* A successfully generated signed url.
|
|
1858
1842
|
*/
|
|
1859
|
-
|
|
1843
|
+
200: SignedUrlUploadResponse;
|
|
1860
1844
|
};
|
|
1861
|
-
export type
|
|
1845
|
+
export type RequestSignedUploadUrlResponse = RequestSignedUploadUrlResponses[keyof RequestSignedUploadUrlResponses];
|
|
1862
1846
|
export type GetBillingPlanData = {
|
|
1863
1847
|
body?: never;
|
|
1864
1848
|
path: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -391,7 +391,7 @@ export declare const zNetworkEdgeProps: z.ZodObject<{
|
|
|
391
391
|
a: z.ZodOptional<z.ZodString>;
|
|
392
392
|
}, z.core.$strip>;
|
|
393
393
|
export declare const zRouteEdgeProps: z.ZodObject<{
|
|
394
|
-
|
|
394
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
395
395
|
}, z.core.$strip>;
|
|
396
396
|
export declare const zEdgeType: z.ZodEnum<{
|
|
397
397
|
network: "network";
|
|
@@ -412,7 +412,7 @@ export declare const zEdge: z.ZodObject<{
|
|
|
412
412
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
413
413
|
typ: z.ZodLiteral<"cache">;
|
|
414
414
|
}, z.core.$strip>, z.ZodObject<{
|
|
415
|
-
|
|
415
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
416
416
|
}, z.core.$strip>>]>>;
|
|
417
417
|
}, z.core.$strip>;
|
|
418
418
|
export declare const zNodeType: z.ZodEnum<{
|
|
@@ -596,7 +596,7 @@ export declare const zNode: z.ZodObject<{
|
|
|
596
596
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
597
597
|
typ: z.ZodLiteral<"cache">;
|
|
598
598
|
}, z.core.$strip>, z.ZodObject<{
|
|
599
|
-
|
|
599
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
600
600
|
}, z.core.$strip>>]>>;
|
|
601
601
|
}, z.core.$strip>>>;
|
|
602
602
|
typ: z.ZodEnum<{
|
|
@@ -739,7 +739,7 @@ export declare const zNodes: z.ZodObject<{
|
|
|
739
739
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
740
740
|
typ: z.ZodLiteral<"cache">;
|
|
741
741
|
}, z.core.$strip>, z.ZodObject<{
|
|
742
|
-
|
|
742
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
743
743
|
}, z.core.$strip>>]>>;
|
|
744
744
|
}, z.core.$strip>>>;
|
|
745
745
|
typ: z.ZodEnum<{
|
|
@@ -884,7 +884,7 @@ export declare const zGraph: z.ZodObject<{
|
|
|
884
884
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
885
885
|
typ: z.ZodLiteral<"cache">;
|
|
886
886
|
}, z.core.$strip>, z.ZodObject<{
|
|
887
|
-
|
|
887
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
888
888
|
}, z.core.$strip>>]>>;
|
|
889
889
|
}, z.core.$strip>>>;
|
|
890
890
|
typ: z.ZodEnum<{
|
|
@@ -1004,11 +1004,9 @@ export declare const zGraph: z.ZodObject<{
|
|
|
1004
1004
|
}, z.core.$strip>>]>>;
|
|
1005
1005
|
}, z.core.$strip>>;
|
|
1006
1006
|
}, z.core.$strip>;
|
|
1007
|
-
export declare const
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
bucketPath: z.ZodString;
|
|
1011
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
export declare const zSignedUrlUploadResponse: z.ZodObject<{
|
|
1008
|
+
signedUrl: z.ZodString;
|
|
1009
|
+
expiration: z.ZodISODateTime;
|
|
1012
1010
|
}, z.core.$strip>;
|
|
1013
1011
|
export declare const zBillingPlan: z.ZodObject<{
|
|
1014
1012
|
tier: z.ZodEnum<{
|
|
@@ -1050,6 +1048,10 @@ export declare const zBillingUsage: z.ZodObject<{
|
|
|
1050
1048
|
* Expiry query.
|
|
1051
1049
|
*/
|
|
1052
1050
|
export declare const zExpired: z.ZodBoolean;
|
|
1051
|
+
/**
|
|
1052
|
+
* The node ID this source ZIP is associated with.
|
|
1053
|
+
*/
|
|
1054
|
+
export declare const zNodeUuid: z.ZodUUID;
|
|
1053
1055
|
/**
|
|
1054
1056
|
* An invite UUID.
|
|
1055
1057
|
*/
|
|
@@ -1166,7 +1168,7 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
|
1166
1168
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1167
1169
|
typ: z.ZodLiteral<"cache">;
|
|
1168
1170
|
}, z.core.$strip>, z.ZodObject<{
|
|
1169
|
-
|
|
1171
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
1170
1172
|
}, z.core.$strip>>]>>;
|
|
1171
1173
|
}, z.core.$strip>>>;
|
|
1172
1174
|
typ: z.ZodEnum<{
|
|
@@ -1887,7 +1889,7 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
|
1887
1889
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1888
1890
|
typ: z.ZodLiteral<"cache">;
|
|
1889
1891
|
}, z.core.$strip>, z.ZodObject<{
|
|
1890
|
-
|
|
1892
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
1891
1893
|
}, z.core.$strip>>]>>;
|
|
1892
1894
|
}, z.core.$strip>>>;
|
|
1893
1895
|
typ: z.ZodEnum<{
|
|
@@ -2032,7 +2034,7 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
2032
2034
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2033
2035
|
typ: z.ZodLiteral<"cache">;
|
|
2034
2036
|
}, z.core.$strip>, z.ZodObject<{
|
|
2035
|
-
|
|
2037
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
2036
2038
|
}, z.core.$strip>>]>>;
|
|
2037
2039
|
}, z.core.$strip>>>;
|
|
2038
2040
|
typ: z.ZodEnum<{
|
|
@@ -2170,10 +2172,8 @@ export declare const zDeployVersionData: z.ZodObject<{
|
|
|
2170
2172
|
}, z.core.$strip>;
|
|
2171
2173
|
query: z.ZodOptional<z.ZodNever>;
|
|
2172
2174
|
}, z.core.$strip>;
|
|
2173
|
-
export declare const
|
|
2174
|
-
body: z.
|
|
2175
|
-
file: z.ZodString;
|
|
2176
|
-
}, z.core.$strip>;
|
|
2175
|
+
export declare const zRequestSignedUploadUrlData: z.ZodObject<{
|
|
2176
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2177
2177
|
path: z.ZodObject<{
|
|
2178
2178
|
spaceHandle: z.ZodString;
|
|
2179
2179
|
projectHandle: z.ZodString;
|
|
@@ -2184,13 +2184,11 @@ export declare const zUploadNodeSourceZipData: z.ZodObject<{
|
|
|
2184
2184
|
query: z.ZodOptional<z.ZodNever>;
|
|
2185
2185
|
}, z.core.$strip>;
|
|
2186
2186
|
/**
|
|
2187
|
-
*
|
|
2187
|
+
* A successfully generated signed url.
|
|
2188
2188
|
*/
|
|
2189
|
-
export declare const
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
bucketPath: z.ZodString;
|
|
2193
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
2189
|
+
export declare const zRequestSignedUploadUrlResponse: z.ZodObject<{
|
|
2190
|
+
signedUrl: z.ZodString;
|
|
2191
|
+
expiration: z.ZodISODateTime;
|
|
2194
2192
|
}, z.core.$strip>;
|
|
2195
2193
|
export declare const zGetBillingPlanData: z.ZodObject<{
|
|
2196
2194
|
body: z.ZodOptional<z.ZodNever>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -245,7 +245,7 @@ export const zNetworkEdgeProps = z.object({
|
|
|
245
245
|
a: z.optional(z.string())
|
|
246
246
|
});
|
|
247
247
|
export const zRouteEdgeProps = z.object({
|
|
248
|
-
|
|
248
|
+
subdomain: z.optional(z.string())
|
|
249
249
|
});
|
|
250
250
|
export const zEdgeType = z.enum([
|
|
251
251
|
'network',
|
|
@@ -423,11 +423,9 @@ export const zGraph = z.object({
|
|
|
423
423
|
versionUUID: z.uuid(),
|
|
424
424
|
nodes: z.array(zNode)
|
|
425
425
|
});
|
|
426
|
-
export const
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
bucketPath: z.string(),
|
|
430
|
-
contentType: z.optional(z.string())
|
|
426
|
+
export const zSignedUrlUploadResponse = z.object({
|
|
427
|
+
signedUrl: z.string(),
|
|
428
|
+
expiration: z.iso.datetime()
|
|
431
429
|
});
|
|
432
430
|
export const zBillingPlan = z.object({
|
|
433
431
|
tier: z.enum([
|
|
@@ -469,6 +467,10 @@ export const zBillingUsage = z.object({
|
|
|
469
467
|
* Expiry query.
|
|
470
468
|
*/
|
|
471
469
|
export const zExpired = z.boolean();
|
|
470
|
+
/**
|
|
471
|
+
* The node ID this source ZIP is associated with.
|
|
472
|
+
*/
|
|
473
|
+
export const zNodeUuid = z.uuid();
|
|
472
474
|
/**
|
|
473
475
|
* An invite UUID.
|
|
474
476
|
*/
|
|
@@ -895,10 +897,8 @@ export const zDeployVersionData = z.object({
|
|
|
895
897
|
}),
|
|
896
898
|
query: z.optional(z.never())
|
|
897
899
|
});
|
|
898
|
-
export const
|
|
899
|
-
body: z.
|
|
900
|
-
file: z.string()
|
|
901
|
-
}),
|
|
900
|
+
export const zRequestSignedUploadUrlData = z.object({
|
|
901
|
+
body: z.optional(z.never()),
|
|
902
902
|
path: z.object({
|
|
903
903
|
spaceHandle: z.string(),
|
|
904
904
|
projectHandle: z.string(),
|
|
@@ -909,9 +909,9 @@ export const zUploadNodeSourceZipData = z.object({
|
|
|
909
909
|
query: z.optional(z.never())
|
|
910
910
|
});
|
|
911
911
|
/**
|
|
912
|
-
*
|
|
912
|
+
* A successfully generated signed url.
|
|
913
913
|
*/
|
|
914
|
-
export const
|
|
914
|
+
export const zRequestSignedUploadUrlResponse = zSignedUrlUploadResponse;
|
|
915
915
|
export const zGetBillingPlanData = z.object({
|
|
916
916
|
body: z.optional(z.never()),
|
|
917
917
|
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, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses,
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedUploadUrlData, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData } 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>;
|
|
@@ -135,11 +135,9 @@ export declare const useDeployVersion: (config?: {
|
|
|
135
135
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
136
136
|
retry?: boolean;
|
|
137
137
|
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<DeployVersionData, "url">, unknown>;
|
|
138
|
-
export declare const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
retry?: boolean;
|
|
142
|
-
}) => import("@tanstack/react-query").UseMutationResult<import("../../sdk/types.gen").NodeSourceUploadResponse | undefined, unknown, Omit<UploadNodeSourceZipData, "url">, unknown>;
|
|
138
|
+
export declare const useRequestSignedUploadUrl: (options: Omit<RequestSignedUploadUrlData, "url"> & {
|
|
139
|
+
enabled?: boolean;
|
|
140
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").SignedUrlUploadResponse | undefined, Error>;
|
|
143
141
|
export declare const useGetBillingPlan: (options: Omit<GetBillingPlanData, "url"> & {
|
|
144
142
|
enabled?: boolean;
|
|
145
143
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").BillingPlan | 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, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion,
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, requestSignedUploadUrl, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -685,23 +685,25 @@ export const useDeployVersion = (config) => {
|
|
|
685
685
|
retry: config?.retry
|
|
686
686
|
});
|
|
687
687
|
};
|
|
688
|
-
export const
|
|
688
|
+
export const useRequestSignedUploadUrl = (options) => {
|
|
689
689
|
const token = useToken();
|
|
690
|
-
|
|
691
|
-
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/nodes/{nodeUUID}/
|
|
692
|
-
const funcer = async (
|
|
690
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
691
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/graph/nodes/{nodeUUID}/signed-upload-url" };
|
|
692
|
+
const funcer = async () => {
|
|
693
693
|
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
694
|
-
|
|
695
|
-
|
|
694
|
+
if (isPromise(token) && !token)
|
|
695
|
+
return;
|
|
696
|
+
const res = await requestSignedUploadUrl({ ...opts, ...rest, auth });
|
|
697
|
+
return res.data;
|
|
696
698
|
};
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
699
|
+
if (!token)
|
|
700
|
+
enabled = false;
|
|
701
|
+
return useQuery({
|
|
702
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, options?.path?.version, "graph", "nodes", options?.path?.nodeUUID, "signed-upload-url", options.query ?? {}],
|
|
703
|
+
queryFn: funcer,
|
|
704
|
+
enabled,
|
|
705
|
+
retry: false,
|
|
706
|
+
staleTime: 600000
|
|
705
707
|
});
|
|
706
708
|
};
|
|
707
709
|
export const useGetBillingPlan = (options) => {
|