shoal-web-sdk 0.0.125 → 0.0.127
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 +29 -29
- package/dist/sdk/@tanstack/react-query.gen.js +19 -19
- package/dist/sdk/sdk.gen.d.ts +5 -5
- package/dist/sdk/sdk.gen.js +15 -15
- package/dist/sdk/types.gen.d.ts +67 -84
- package/dist/sdk/zod.gen.d.ts +185 -79
- package/dist/sdk/zod.gen.js +43 -45
- package/dist/tanstack-codegen/generated/generated.d.ts +4 -4
- package/dist/tanstack-codegen/generated/generated.js +22 -22
- 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 { BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceError, BootstrapOnboardingWorkspaceResponse2, 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,
|
|
3
|
+
import type { BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceError, BootstrapOnboardingWorkspaceResponse2, 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, 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';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -740,34 +740,6 @@ export declare const getProjectOverviewOptions: (options: Options<GetProjectOver
|
|
|
740
740
|
[dataTagErrorSymbol]: Error;
|
|
741
741
|
};
|
|
742
742
|
};
|
|
743
|
-
export declare const fetchLogsQueryKey: (options: Options<FetchLogsData>) => [Pick<Options<FetchLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
744
|
-
_id: string;
|
|
745
|
-
_infinite?: boolean;
|
|
746
|
-
tags?: ReadonlyArray<string>;
|
|
747
|
-
}];
|
|
748
|
-
/**
|
|
749
|
-
* Fetch a series of paginated log entries.
|
|
750
|
-
*/
|
|
751
|
-
export declare const fetchLogsOptions: (options: Options<FetchLogsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").Logs, Error, import("../types.gen").Logs, [Pick<Options<FetchLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
752
|
-
_id: string;
|
|
753
|
-
_infinite?: boolean;
|
|
754
|
-
tags?: ReadonlyArray<string>;
|
|
755
|
-
}]>, "queryFn"> & {
|
|
756
|
-
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").Logs, [Pick<Options<FetchLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
757
|
-
_id: string;
|
|
758
|
-
_infinite?: boolean;
|
|
759
|
-
tags?: ReadonlyArray<string>;
|
|
760
|
-
}], never> | undefined;
|
|
761
|
-
} & {
|
|
762
|
-
queryKey: [Pick<Options<FetchLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
763
|
-
_id: string;
|
|
764
|
-
_infinite?: boolean;
|
|
765
|
-
tags?: ReadonlyArray<string>;
|
|
766
|
-
}] & {
|
|
767
|
-
[dataTagSymbol]: import("../types.gen").Logs;
|
|
768
|
-
[dataTagErrorSymbol]: Error;
|
|
769
|
-
};
|
|
770
|
-
};
|
|
771
743
|
/**
|
|
772
744
|
* Create an environment inside a project.
|
|
773
745
|
*/
|
|
@@ -836,6 +808,34 @@ export declare const updateGraphStateMutation: (options?: Partial<Options<Update
|
|
|
836
808
|
* Trigger a deployment for a version inside an environment.
|
|
837
809
|
*/
|
|
838
810
|
export declare const deployVersionMutation: (options?: Partial<Options<DeployVersionData>>) => UseMutationOptions<unknown, DeployVersionError, Options<DeployVersionData>>;
|
|
811
|
+
export declare const versionStatusQueryKey: (options: Options<VersionStatusData>) => [Pick<Options<VersionStatusData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
812
|
+
_id: string;
|
|
813
|
+
_infinite?: boolean;
|
|
814
|
+
tags?: ReadonlyArray<string>;
|
|
815
|
+
}];
|
|
816
|
+
/**
|
|
817
|
+
* Fetches the status of the current version.
|
|
818
|
+
*/
|
|
819
|
+
export declare const versionStatusOptions: (options: Options<VersionStatusData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").VersionStatusInfo, Error, import("../types.gen").VersionStatusInfo, [Pick<Options<VersionStatusData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
820
|
+
_id: string;
|
|
821
|
+
_infinite?: boolean;
|
|
822
|
+
tags?: ReadonlyArray<string>;
|
|
823
|
+
}]>, "queryFn"> & {
|
|
824
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").VersionStatusInfo, [Pick<Options<VersionStatusData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
825
|
+
_id: string;
|
|
826
|
+
_infinite?: boolean;
|
|
827
|
+
tags?: ReadonlyArray<string>;
|
|
828
|
+
}], never> | undefined;
|
|
829
|
+
} & {
|
|
830
|
+
queryKey: [Pick<Options<VersionStatusData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
831
|
+
_id: string;
|
|
832
|
+
_infinite?: boolean;
|
|
833
|
+
tags?: ReadonlyArray<string>;
|
|
834
|
+
}] & {
|
|
835
|
+
[dataTagSymbol]: import("../types.gen").VersionStatusInfo;
|
|
836
|
+
[dataTagErrorSymbol]: Error;
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
839
|
/**
|
|
840
840
|
* Request a signed upload URL to upload source code zip files.
|
|
841
841
|
*/
|
|
@@ -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 { bootstrapOnboardingWorkspace, createEnvironment, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements,
|
|
4
|
+
import { bootstrapOnboardingWorkspace, 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, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, 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) {
|
|
@@ -809,24 +809,6 @@ export const getProjectOverviewOptions = (options) => {
|
|
|
809
809
|
queryKey: getProjectOverviewQueryKey(options)
|
|
810
810
|
});
|
|
811
811
|
};
|
|
812
|
-
export const fetchLogsQueryKey = (options) => createQueryKey('fetchLogs', options);
|
|
813
|
-
/**
|
|
814
|
-
* Fetch a series of paginated log entries.
|
|
815
|
-
*/
|
|
816
|
-
export const fetchLogsOptions = (options) => {
|
|
817
|
-
return queryOptions({
|
|
818
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
819
|
-
const { data } = await fetchLogs({
|
|
820
|
-
...options,
|
|
821
|
-
...queryKey[0],
|
|
822
|
-
signal,
|
|
823
|
-
throwOnError: true
|
|
824
|
-
});
|
|
825
|
-
return data;
|
|
826
|
-
},
|
|
827
|
-
queryKey: fetchLogsQueryKey(options)
|
|
828
|
-
});
|
|
829
|
-
};
|
|
830
812
|
/**
|
|
831
813
|
* Create an environment inside a project.
|
|
832
814
|
*/
|
|
@@ -911,6 +893,24 @@ export const deployVersionMutation = (options) => {
|
|
|
911
893
|
};
|
|
912
894
|
return mutationOptions;
|
|
913
895
|
};
|
|
896
|
+
export const versionStatusQueryKey = (options) => createQueryKey('versionStatus', options);
|
|
897
|
+
/**
|
|
898
|
+
* Fetches the status of the current version.
|
|
899
|
+
*/
|
|
900
|
+
export const versionStatusOptions = (options) => {
|
|
901
|
+
return queryOptions({
|
|
902
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
903
|
+
const { data } = await versionStatus({
|
|
904
|
+
...options,
|
|
905
|
+
...queryKey[0],
|
|
906
|
+
signal,
|
|
907
|
+
throwOnError: true
|
|
908
|
+
});
|
|
909
|
+
return data;
|
|
910
|
+
},
|
|
911
|
+
queryKey: versionStatusQueryKey(options)
|
|
912
|
+
});
|
|
913
|
+
};
|
|
914
914
|
/**
|
|
915
915
|
* Request a signed upload URL to upload source code zip files.
|
|
916
916
|
*/
|
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 { BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceErrors, BootstrapOnboardingWorkspaceResponses, 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,
|
|
2
|
+
import type { BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceErrors, BootstrapOnboardingWorkspaceResponses, 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, 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';
|
|
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
|
|
@@ -145,10 +145,6 @@ export declare const createProject: <ThrowOnError extends boolean = false>(optio
|
|
|
145
145
|
* Get the project overview.
|
|
146
146
|
*/
|
|
147
147
|
export declare const getProjectOverview: <ThrowOnError extends boolean = false>(options: Options<GetProjectOverviewData, ThrowOnError>) => import("./client").RequestResult<GetProjectOverviewResponses, GetProjectOverviewErrors, ThrowOnError, "fields">;
|
|
148
|
-
/**
|
|
149
|
-
* Fetch a series of paginated log entries.
|
|
150
|
-
*/
|
|
151
|
-
export declare const fetchLogs: <ThrowOnError extends boolean = false>(options: Options<FetchLogsData, ThrowOnError>) => import("./client").RequestResult<FetchLogsResponses, FetchLogsErrors, ThrowOnError, "fields">;
|
|
152
148
|
/**
|
|
153
149
|
* Create an environment inside a project.
|
|
154
150
|
*/
|
|
@@ -169,6 +165,10 @@ export declare const updateGraphState: <ThrowOnError extends boolean = false>(op
|
|
|
169
165
|
* Trigger a deployment for a version inside an environment.
|
|
170
166
|
*/
|
|
171
167
|
export declare const deployVersion: <ThrowOnError extends boolean = false>(options: Options<DeployVersionData, ThrowOnError>) => import("./client").RequestResult<DeployVersionResponses, DeployVersionErrors, ThrowOnError, "fields">;
|
|
168
|
+
/**
|
|
169
|
+
* Fetches the status of the current version.
|
|
170
|
+
*/
|
|
171
|
+
export declare const versionStatus: <ThrowOnError extends boolean = false>(options: Options<VersionStatusData, ThrowOnError>) => import("./client").RequestResult<VersionStatusResponses, VersionStatusErrors, ThrowOnError, "fields">;
|
|
172
172
|
/**
|
|
173
173
|
* Request a signed upload URL to upload source code zip files.
|
|
174
174
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -527,21 +527,6 @@ export const getProjectOverview = (options) => {
|
|
|
527
527
|
...options
|
|
528
528
|
});
|
|
529
529
|
};
|
|
530
|
-
/**
|
|
531
|
-
* Fetch a series of paginated log entries.
|
|
532
|
-
*/
|
|
533
|
-
export const fetchLogs = (options) => {
|
|
534
|
-
return (options.client ?? client).get({
|
|
535
|
-
security: [
|
|
536
|
-
{
|
|
537
|
-
scheme: 'bearer',
|
|
538
|
-
type: 'http'
|
|
539
|
-
}
|
|
540
|
-
],
|
|
541
|
-
url: '/auth/{spaceHandle}/{projectHandle}/logs',
|
|
542
|
-
...options
|
|
543
|
-
});
|
|
544
|
-
};
|
|
545
530
|
/**
|
|
546
531
|
* Create an environment inside a project.
|
|
547
532
|
*/
|
|
@@ -625,6 +610,21 @@ export const deployVersion = (options) => {
|
|
|
625
610
|
...options
|
|
626
611
|
});
|
|
627
612
|
};
|
|
613
|
+
/**
|
|
614
|
+
* Fetches the status of the current version.
|
|
615
|
+
*/
|
|
616
|
+
export const versionStatus = (options) => {
|
|
617
|
+
return (options.client ?? client).get({
|
|
618
|
+
security: [
|
|
619
|
+
{
|
|
620
|
+
scheme: 'bearer',
|
|
621
|
+
type: 'http'
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/status',
|
|
625
|
+
...options
|
|
626
|
+
});
|
|
627
|
+
};
|
|
628
628
|
/**
|
|
629
629
|
* Request a signed upload URL to upload source code zip files.
|
|
630
630
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
nodeID: string;
|
|
10
|
-
payload: unknown;
|
|
11
|
-
};
|
|
12
|
-
export type Logs = {
|
|
13
|
-
logs: Array<LogEntry>;
|
|
14
|
-
nextPage?: string;
|
|
15
|
-
limit: unknown;
|
|
4
|
+
export type VersionStatus = 'pending' | 'queued' | 'building' | 'deploying' | 'post-deploy-steps' | 'succeeded' | 'failed' | 'cancelled';
|
|
5
|
+
export type VersionStatusInfo = {
|
|
6
|
+
status: VersionStatus;
|
|
7
|
+
lastUpdated: string;
|
|
8
|
+
message?: string;
|
|
16
9
|
};
|
|
17
10
|
export type PlatformTier = 'free' | 'pro' | 'enterprise';
|
|
18
11
|
export type BillingInterval = 'monthly' | 'annual';
|
|
@@ -330,6 +323,7 @@ export type Node = {
|
|
|
330
323
|
};
|
|
331
324
|
export type EdgeType = 'network' | 'route';
|
|
332
325
|
export type NodeType = 'cache' | 'comment' | 'container' | 'cronjob' | 'database' | 'function' | 'queue' | 'proxy' | 'vm' | 'scheduler';
|
|
326
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
333
327
|
export type CommentNodeProps = {
|
|
334
328
|
comment?: string;
|
|
335
329
|
};
|
|
@@ -337,8 +331,14 @@ export type CacheNodeProps = {
|
|
|
337
331
|
size?: number;
|
|
338
332
|
};
|
|
339
333
|
export type SchedulerNodeProps = {
|
|
340
|
-
|
|
341
|
-
|
|
334
|
+
expression: string;
|
|
335
|
+
timezone: string;
|
|
336
|
+
requestMethod: HttpMethod;
|
|
337
|
+
requestPayload?: string;
|
|
338
|
+
requestHeaders?: {
|
|
339
|
+
[key: string]: string;
|
|
340
|
+
};
|
|
341
|
+
paused?: boolean;
|
|
342
342
|
};
|
|
343
343
|
export type ContainerNodeProps = {
|
|
344
344
|
region: Region;
|
|
@@ -502,14 +502,6 @@ export type PlanPriceResponse = {
|
|
|
502
502
|
*/
|
|
503
503
|
interval: string;
|
|
504
504
|
};
|
|
505
|
-
/**
|
|
506
|
-
* The from time to start querying logs from.
|
|
507
|
-
*/
|
|
508
|
-
export type FromTime = string;
|
|
509
|
-
/**
|
|
510
|
-
* The to time to start querying logs to.
|
|
511
|
-
*/
|
|
512
|
-
export type ToTime = string;
|
|
513
505
|
/**
|
|
514
506
|
* Expiry query.
|
|
515
507
|
*/
|
|
@@ -570,10 +562,6 @@ export type Page = number;
|
|
|
570
562
|
* Page size (max 100).
|
|
571
563
|
*/
|
|
572
564
|
export type Limit = number;
|
|
573
|
-
/**
|
|
574
|
-
* The next page token for paginated results from the log service.
|
|
575
|
-
*/
|
|
576
|
-
export type LogServiceNextPageToken = string;
|
|
577
565
|
/**
|
|
578
566
|
* Opaque pagination token returned by the previous response.
|
|
579
567
|
*/
|
|
@@ -1875,64 +1863,6 @@ export type GetProjectOverviewResponses = {
|
|
|
1875
1863
|
200: ProjectOverview;
|
|
1876
1864
|
};
|
|
1877
1865
|
export type GetProjectOverviewResponse = GetProjectOverviewResponses[keyof GetProjectOverviewResponses];
|
|
1878
|
-
export type FetchLogsData = {
|
|
1879
|
-
body?: never;
|
|
1880
|
-
path: {
|
|
1881
|
-
/**
|
|
1882
|
-
* The space handle. This must be globally unique.
|
|
1883
|
-
*/
|
|
1884
|
-
spaceHandle: string;
|
|
1885
|
-
/**
|
|
1886
|
-
* A project name. This must be unique to a space.
|
|
1887
|
-
*/
|
|
1888
|
-
projectHandle: string;
|
|
1889
|
-
};
|
|
1890
|
-
query: {
|
|
1891
|
-
/**
|
|
1892
|
-
* The environment UUID.
|
|
1893
|
-
*/
|
|
1894
|
-
environment: string;
|
|
1895
|
-
/**
|
|
1896
|
-
* The node UUID.
|
|
1897
|
-
*/
|
|
1898
|
-
node: string;
|
|
1899
|
-
/**
|
|
1900
|
-
* The from time to start querying logs from.
|
|
1901
|
-
*/
|
|
1902
|
-
from?: string;
|
|
1903
|
-
/**
|
|
1904
|
-
* The to time to start querying logs to.
|
|
1905
|
-
*/
|
|
1906
|
-
to?: string;
|
|
1907
|
-
/**
|
|
1908
|
-
* Page size (max 100).
|
|
1909
|
-
*/
|
|
1910
|
-
limit?: number;
|
|
1911
|
-
/**
|
|
1912
|
-
* The next page token for paginated results from the log service.
|
|
1913
|
-
*/
|
|
1914
|
-
token?: string;
|
|
1915
|
-
};
|
|
1916
|
-
url: '/auth/{spaceHandle}/{projectHandle}/logs';
|
|
1917
|
-
};
|
|
1918
|
-
export type FetchLogsErrors = {
|
|
1919
|
-
/**
|
|
1920
|
-
* Bad request.
|
|
1921
|
-
*/
|
|
1922
|
-
400: ErrorResponse;
|
|
1923
|
-
/**
|
|
1924
|
-
* Unexpected error.
|
|
1925
|
-
*/
|
|
1926
|
-
500: ErrorResponse;
|
|
1927
|
-
};
|
|
1928
|
-
export type FetchLogsError = FetchLogsErrors[keyof FetchLogsErrors];
|
|
1929
|
-
export type FetchLogsResponses = {
|
|
1930
|
-
/**
|
|
1931
|
-
* Paginated log entries matching query
|
|
1932
|
-
*/
|
|
1933
|
-
200: Logs;
|
|
1934
|
-
};
|
|
1935
|
-
export type FetchLogsResponse = FetchLogsResponses[keyof FetchLogsResponses];
|
|
1936
1866
|
export type CreateEnvironmentData = {
|
|
1937
1867
|
body: CreateEnvironment;
|
|
1938
1868
|
path: {
|
|
@@ -2172,6 +2102,59 @@ export type DeployVersionResponses = {
|
|
|
2172
2102
|
*/
|
|
2173
2103
|
202: unknown;
|
|
2174
2104
|
};
|
|
2105
|
+
export type VersionStatusData = {
|
|
2106
|
+
body?: never;
|
|
2107
|
+
path: {
|
|
2108
|
+
/**
|
|
2109
|
+
* The space handle. This must be globally unique.
|
|
2110
|
+
*/
|
|
2111
|
+
spaceHandle: string;
|
|
2112
|
+
/**
|
|
2113
|
+
* A project name. This must be unique to a space.
|
|
2114
|
+
*/
|
|
2115
|
+
projectHandle: string;
|
|
2116
|
+
/**
|
|
2117
|
+
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2118
|
+
*/
|
|
2119
|
+
environmentHandle: string;
|
|
2120
|
+
/**
|
|
2121
|
+
* A version number with in an environment.
|
|
2122
|
+
*/
|
|
2123
|
+
version: string;
|
|
2124
|
+
};
|
|
2125
|
+
query?: never;
|
|
2126
|
+
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/status';
|
|
2127
|
+
};
|
|
2128
|
+
export type VersionStatusErrors = {
|
|
2129
|
+
/**
|
|
2130
|
+
* Unauthorised user.
|
|
2131
|
+
*/
|
|
2132
|
+
401: ErrorResponse;
|
|
2133
|
+
/**
|
|
2134
|
+
* Invalid credentials.
|
|
2135
|
+
*/
|
|
2136
|
+
403: ErrorResponse;
|
|
2137
|
+
/**
|
|
2138
|
+
* Related content not found.
|
|
2139
|
+
*/
|
|
2140
|
+
404: ErrorResponse;
|
|
2141
|
+
/**
|
|
2142
|
+
* Unprocessable entity.
|
|
2143
|
+
*/
|
|
2144
|
+
422: ErrorResponse;
|
|
2145
|
+
/**
|
|
2146
|
+
* Unexpected error.
|
|
2147
|
+
*/
|
|
2148
|
+
500: ErrorResponse;
|
|
2149
|
+
};
|
|
2150
|
+
export type VersionStatusError = VersionStatusErrors[keyof VersionStatusErrors];
|
|
2151
|
+
export type VersionStatusResponses = {
|
|
2152
|
+
/**
|
|
2153
|
+
* Status fetched successfully
|
|
2154
|
+
*/
|
|
2155
|
+
200: VersionStatusInfo;
|
|
2156
|
+
};
|
|
2157
|
+
export type VersionStatusResponse = VersionStatusResponses[keyof VersionStatusResponses];
|
|
2175
2158
|
export type RequestSignedUploadUrlData = {
|
|
2176
2159
|
body?: never;
|
|
2177
2160
|
path: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
export declare const zVersionStatus: z.ZodEnum<{
|
|
3
|
+
pending: "pending";
|
|
4
|
+
queued: "queued";
|
|
5
|
+
building: "building";
|
|
6
|
+
deploying: "deploying";
|
|
7
|
+
"post-deploy-steps": "post-deploy-steps";
|
|
8
|
+
succeeded: "succeeded";
|
|
9
|
+
failed: "failed";
|
|
10
|
+
cancelled: "cancelled";
|
|
11
|
+
}>;
|
|
12
|
+
export declare const zVersionStatusInfo: z.ZodObject<{
|
|
13
|
+
status: z.ZodEnum<{
|
|
14
|
+
pending: "pending";
|
|
15
|
+
queued: "queued";
|
|
16
|
+
building: "building";
|
|
17
|
+
deploying: "deploying";
|
|
18
|
+
"post-deploy-steps": "post-deploy-steps";
|
|
19
|
+
succeeded: "succeeded";
|
|
20
|
+
failed: "failed";
|
|
21
|
+
cancelled: "cancelled";
|
|
22
|
+
}>;
|
|
23
|
+
lastUpdated: z.ZodISODateTime;
|
|
24
|
+
message: z.ZodOptional<z.ZodString>;
|
|
21
25
|
}, z.core.$strip>;
|
|
22
26
|
export declare const zPlatformTier: z.ZodEnum<{
|
|
23
27
|
free: "free";
|
|
@@ -489,6 +493,15 @@ export declare const zNodeType: z.ZodEnum<{
|
|
|
489
493
|
vm: "vm";
|
|
490
494
|
scheduler: "scheduler";
|
|
491
495
|
}>;
|
|
496
|
+
export declare const zHttpMethod: z.ZodEnum<{
|
|
497
|
+
DELETE: "DELETE";
|
|
498
|
+
GET: "GET";
|
|
499
|
+
HEAD: "HEAD";
|
|
500
|
+
OPTIONS: "OPTIONS";
|
|
501
|
+
PATCH: "PATCH";
|
|
502
|
+
POST: "POST";
|
|
503
|
+
PUT: "PUT";
|
|
504
|
+
}>;
|
|
492
505
|
export declare const zCommentNodeProps: z.ZodObject<{
|
|
493
506
|
comment: z.ZodOptional<z.ZodString>;
|
|
494
507
|
}, z.core.$strip>;
|
|
@@ -496,8 +509,20 @@ export declare const zCacheNodeProps: z.ZodObject<{
|
|
|
496
509
|
size: z.ZodOptional<z.ZodInt>;
|
|
497
510
|
}, z.core.$strip>;
|
|
498
511
|
export declare const zSchedulerNodeProps: z.ZodObject<{
|
|
499
|
-
|
|
500
|
-
|
|
512
|
+
expression: z.ZodString;
|
|
513
|
+
timezone: z.ZodString;
|
|
514
|
+
requestMethod: z.ZodEnum<{
|
|
515
|
+
DELETE: "DELETE";
|
|
516
|
+
GET: "GET";
|
|
517
|
+
HEAD: "HEAD";
|
|
518
|
+
OPTIONS: "OPTIONS";
|
|
519
|
+
PATCH: "PATCH";
|
|
520
|
+
POST: "POST";
|
|
521
|
+
PUT: "PUT";
|
|
522
|
+
}>;
|
|
523
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
524
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
525
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
501
526
|
}, z.core.$strip>;
|
|
502
527
|
export declare const zRegion: z.ZodEnum<{
|
|
503
528
|
"africa-south1": "africa-south1";
|
|
@@ -769,8 +794,20 @@ export declare const zNode: z.ZodObject<{
|
|
|
769
794
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
770
795
|
typ: z.ZodLiteral<"scheduler">;
|
|
771
796
|
}, z.core.$strip>, z.ZodObject<{
|
|
772
|
-
|
|
773
|
-
|
|
797
|
+
expression: z.ZodString;
|
|
798
|
+
timezone: z.ZodString;
|
|
799
|
+
requestMethod: z.ZodEnum<{
|
|
800
|
+
DELETE: "DELETE";
|
|
801
|
+
GET: "GET";
|
|
802
|
+
HEAD: "HEAD";
|
|
803
|
+
OPTIONS: "OPTIONS";
|
|
804
|
+
PATCH: "PATCH";
|
|
805
|
+
POST: "POST";
|
|
806
|
+
PUT: "PUT";
|
|
807
|
+
}>;
|
|
808
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
809
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
810
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
774
811
|
}, z.core.$strip>>]>>;
|
|
775
812
|
}, z.core.$strip>;
|
|
776
813
|
export declare const zNodes: z.ZodObject<{
|
|
@@ -911,8 +948,20 @@ export declare const zNodes: z.ZodObject<{
|
|
|
911
948
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
912
949
|
typ: z.ZodLiteral<"scheduler">;
|
|
913
950
|
}, z.core.$strip>, z.ZodObject<{
|
|
914
|
-
|
|
915
|
-
|
|
951
|
+
expression: z.ZodString;
|
|
952
|
+
timezone: z.ZodString;
|
|
953
|
+
requestMethod: z.ZodEnum<{
|
|
954
|
+
DELETE: "DELETE";
|
|
955
|
+
GET: "GET";
|
|
956
|
+
HEAD: "HEAD";
|
|
957
|
+
OPTIONS: "OPTIONS";
|
|
958
|
+
PATCH: "PATCH";
|
|
959
|
+
POST: "POST";
|
|
960
|
+
PUT: "PUT";
|
|
961
|
+
}>;
|
|
962
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
963
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
964
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
916
965
|
}, z.core.$strip>>]>>;
|
|
917
966
|
}, z.core.$strip>>;
|
|
918
967
|
}, z.core.$strip>;
|
|
@@ -1055,8 +1104,20 @@ export declare const zGraph: z.ZodObject<{
|
|
|
1055
1104
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1056
1105
|
typ: z.ZodLiteral<"scheduler">;
|
|
1057
1106
|
}, z.core.$strip>, z.ZodObject<{
|
|
1058
|
-
|
|
1059
|
-
|
|
1107
|
+
expression: z.ZodString;
|
|
1108
|
+
timezone: z.ZodString;
|
|
1109
|
+
requestMethod: z.ZodEnum<{
|
|
1110
|
+
DELETE: "DELETE";
|
|
1111
|
+
GET: "GET";
|
|
1112
|
+
HEAD: "HEAD";
|
|
1113
|
+
OPTIONS: "OPTIONS";
|
|
1114
|
+
PATCH: "PATCH";
|
|
1115
|
+
POST: "POST";
|
|
1116
|
+
PUT: "PUT";
|
|
1117
|
+
}>;
|
|
1118
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
1119
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1120
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
1060
1121
|
}, z.core.$strip>>]>>;
|
|
1061
1122
|
}, z.core.$strip>>;
|
|
1062
1123
|
}, z.core.$strip>;
|
|
@@ -1141,14 +1202,6 @@ export declare const zPlanPriceResponse: z.ZodObject<{
|
|
|
1141
1202
|
currency: z.ZodString;
|
|
1142
1203
|
interval: z.ZodString;
|
|
1143
1204
|
}, z.core.$strip>;
|
|
1144
|
-
/**
|
|
1145
|
-
* The from time to start querying logs from.
|
|
1146
|
-
*/
|
|
1147
|
-
export declare const zFromTime: z.ZodISODateTime;
|
|
1148
|
-
/**
|
|
1149
|
-
* The to time to start querying logs to.
|
|
1150
|
-
*/
|
|
1151
|
-
export declare const zToTime: z.ZodISODateTime;
|
|
1152
1205
|
/**
|
|
1153
1206
|
* Expiry query.
|
|
1154
1207
|
*/
|
|
@@ -1209,10 +1262,6 @@ export declare const zPage: z.ZodDefault<z.ZodInt>;
|
|
|
1209
1262
|
* Page size (max 100).
|
|
1210
1263
|
*/
|
|
1211
1264
|
export declare const zLimit: z.ZodDefault<z.ZodInt>;
|
|
1212
|
-
/**
|
|
1213
|
-
* The next page token for paginated results from the log service.
|
|
1214
|
-
*/
|
|
1215
|
-
export declare const zLogServiceNextPageToken: z.ZodString;
|
|
1216
1265
|
/**
|
|
1217
1266
|
* Opaque pagination token returned by the previous response.
|
|
1218
1267
|
*/
|
|
@@ -1403,8 +1452,20 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
|
1403
1452
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1404
1453
|
typ: z.ZodLiteral<"scheduler">;
|
|
1405
1454
|
}, z.core.$strip>, z.ZodObject<{
|
|
1406
|
-
|
|
1407
|
-
|
|
1455
|
+
expression: z.ZodString;
|
|
1456
|
+
timezone: z.ZodString;
|
|
1457
|
+
requestMethod: z.ZodEnum<{
|
|
1458
|
+
DELETE: "DELETE";
|
|
1459
|
+
GET: "GET";
|
|
1460
|
+
HEAD: "HEAD";
|
|
1461
|
+
OPTIONS: "OPTIONS";
|
|
1462
|
+
PATCH: "PATCH";
|
|
1463
|
+
POST: "POST";
|
|
1464
|
+
PUT: "PUT";
|
|
1465
|
+
}>;
|
|
1466
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
1467
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1468
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
1408
1469
|
}, z.core.$strip>>]>>;
|
|
1409
1470
|
}, z.core.$strip>>;
|
|
1410
1471
|
}, z.core.$strip>;
|
|
@@ -1547,8 +1608,20 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
1547
1608
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1548
1609
|
typ: z.ZodLiteral<"scheduler">;
|
|
1549
1610
|
}, z.core.$strip>, z.ZodObject<{
|
|
1550
|
-
|
|
1551
|
-
|
|
1611
|
+
expression: z.ZodString;
|
|
1612
|
+
timezone: z.ZodString;
|
|
1613
|
+
requestMethod: z.ZodEnum<{
|
|
1614
|
+
DELETE: "DELETE";
|
|
1615
|
+
GET: "GET";
|
|
1616
|
+
HEAD: "HEAD";
|
|
1617
|
+
OPTIONS: "OPTIONS";
|
|
1618
|
+
PATCH: "PATCH";
|
|
1619
|
+
POST: "POST";
|
|
1620
|
+
PUT: "PUT";
|
|
1621
|
+
}>;
|
|
1622
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
1623
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1624
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
1552
1625
|
}, z.core.$strip>>]>>;
|
|
1553
1626
|
}, z.core.$strip>>;
|
|
1554
1627
|
}, z.core.$strip>;
|
|
@@ -1705,8 +1778,20 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
|
|
|
1705
1778
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1706
1779
|
typ: z.ZodLiteral<"scheduler">;
|
|
1707
1780
|
}, z.core.$strip>, z.ZodObject<{
|
|
1708
|
-
|
|
1709
|
-
|
|
1781
|
+
expression: z.ZodString;
|
|
1782
|
+
timezone: z.ZodString;
|
|
1783
|
+
requestMethod: z.ZodEnum<{
|
|
1784
|
+
DELETE: "DELETE";
|
|
1785
|
+
GET: "GET";
|
|
1786
|
+
HEAD: "HEAD";
|
|
1787
|
+
OPTIONS: "OPTIONS";
|
|
1788
|
+
PATCH: "PATCH";
|
|
1789
|
+
POST: "POST";
|
|
1790
|
+
PUT: "PUT";
|
|
1791
|
+
}>;
|
|
1792
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
1793
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1794
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
1710
1795
|
}, z.core.$strip>>]>>;
|
|
1711
1796
|
}, z.core.$strip>;
|
|
1712
1797
|
export declare const zRequestAccountPasswordResetData: z.ZodObject<{
|
|
@@ -2268,36 +2353,6 @@ export declare const zGetProjectOverviewResponse: z.ZodObject<{
|
|
|
2268
2353
|
versions: z.ZodInt;
|
|
2269
2354
|
}, z.core.$strip>>;
|
|
2270
2355
|
}, z.core.$strip>;
|
|
2271
|
-
export declare const zFetchLogsData: z.ZodObject<{
|
|
2272
|
-
body: z.ZodOptional<z.ZodNever>;
|
|
2273
|
-
path: z.ZodObject<{
|
|
2274
|
-
spaceHandle: z.ZodString;
|
|
2275
|
-
projectHandle: z.ZodString;
|
|
2276
|
-
}, z.core.$strip>;
|
|
2277
|
-
query: z.ZodObject<{
|
|
2278
|
-
environment: z.ZodUUID;
|
|
2279
|
-
node: z.ZodUUID;
|
|
2280
|
-
from: z.ZodOptional<z.ZodISODateTime>;
|
|
2281
|
-
to: z.ZodOptional<z.ZodISODateTime>;
|
|
2282
|
-
limit: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
2283
|
-
token: z.ZodOptional<z.ZodString>;
|
|
2284
|
-
}, z.core.$strip>;
|
|
2285
|
-
}, z.core.$strip>;
|
|
2286
|
-
/**
|
|
2287
|
-
* Paginated log entries matching query
|
|
2288
|
-
*/
|
|
2289
|
-
export declare const zFetchLogsResponse: z.ZodObject<{
|
|
2290
|
-
logs: z.ZodArray<z.ZodObject<{
|
|
2291
|
-
id: z.ZodString;
|
|
2292
|
-
timestamp: z.ZodISODateTime;
|
|
2293
|
-
projectID: z.ZodString;
|
|
2294
|
-
environmentID: z.ZodString;
|
|
2295
|
-
nodeID: z.ZodString;
|
|
2296
|
-
payload: z.ZodUnknown;
|
|
2297
|
-
}, z.core.$strip>>;
|
|
2298
|
-
nextPage: z.ZodOptional<z.ZodString>;
|
|
2299
|
-
limit: z.ZodUnknown;
|
|
2300
|
-
}, z.core.$strip>;
|
|
2301
2356
|
export declare const zCreateEnvironmentData: z.ZodObject<{
|
|
2302
2357
|
body: z.ZodObject<{
|
|
2303
2358
|
name: z.ZodString;
|
|
@@ -2495,8 +2550,20 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
|
2495
2550
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2496
2551
|
typ: z.ZodLiteral<"scheduler">;
|
|
2497
2552
|
}, z.core.$strip>, z.ZodObject<{
|
|
2498
|
-
|
|
2499
|
-
|
|
2553
|
+
expression: z.ZodString;
|
|
2554
|
+
timezone: z.ZodString;
|
|
2555
|
+
requestMethod: z.ZodEnum<{
|
|
2556
|
+
DELETE: "DELETE";
|
|
2557
|
+
GET: "GET";
|
|
2558
|
+
HEAD: "HEAD";
|
|
2559
|
+
OPTIONS: "OPTIONS";
|
|
2560
|
+
PATCH: "PATCH";
|
|
2561
|
+
POST: "POST";
|
|
2562
|
+
PUT: "PUT";
|
|
2563
|
+
}>;
|
|
2564
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
2565
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2566
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
2500
2567
|
}, z.core.$strip>>]>>;
|
|
2501
2568
|
}, z.core.$strip>>;
|
|
2502
2569
|
}, z.core.$strip>;
|
|
@@ -2639,8 +2706,20 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
2639
2706
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2640
2707
|
typ: z.ZodLiteral<"scheduler">;
|
|
2641
2708
|
}, z.core.$strip>, z.ZodObject<{
|
|
2642
|
-
|
|
2643
|
-
|
|
2709
|
+
expression: z.ZodString;
|
|
2710
|
+
timezone: z.ZodString;
|
|
2711
|
+
requestMethod: z.ZodEnum<{
|
|
2712
|
+
DELETE: "DELETE";
|
|
2713
|
+
GET: "GET";
|
|
2714
|
+
HEAD: "HEAD";
|
|
2715
|
+
OPTIONS: "OPTIONS";
|
|
2716
|
+
PATCH: "PATCH";
|
|
2717
|
+
POST: "POST";
|
|
2718
|
+
PUT: "PUT";
|
|
2719
|
+
}>;
|
|
2720
|
+
requestPayload: z.ZodOptional<z.ZodString>;
|
|
2721
|
+
requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2722
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
2644
2723
|
}, z.core.$strip>>]>>;
|
|
2645
2724
|
}, z.core.$strip>>;
|
|
2646
2725
|
}, z.core.$strip>;
|
|
@@ -2662,6 +2741,33 @@ export declare const zDeployVersionData: z.ZodObject<{
|
|
|
2662
2741
|
}, z.core.$strip>;
|
|
2663
2742
|
query: z.ZodOptional<z.ZodNever>;
|
|
2664
2743
|
}, z.core.$strip>;
|
|
2744
|
+
export declare const zVersionStatusData: z.ZodObject<{
|
|
2745
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2746
|
+
path: z.ZodObject<{
|
|
2747
|
+
spaceHandle: z.ZodString;
|
|
2748
|
+
projectHandle: z.ZodString;
|
|
2749
|
+
environmentHandle: z.ZodString;
|
|
2750
|
+
version: z.ZodString;
|
|
2751
|
+
}, z.core.$strip>;
|
|
2752
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
2753
|
+
}, z.core.$strip>;
|
|
2754
|
+
/**
|
|
2755
|
+
* Status fetched successfully
|
|
2756
|
+
*/
|
|
2757
|
+
export declare const zVersionStatusResponse: z.ZodObject<{
|
|
2758
|
+
status: z.ZodEnum<{
|
|
2759
|
+
pending: "pending";
|
|
2760
|
+
queued: "queued";
|
|
2761
|
+
building: "building";
|
|
2762
|
+
deploying: "deploying";
|
|
2763
|
+
"post-deploy-steps": "post-deploy-steps";
|
|
2764
|
+
succeeded: "succeeded";
|
|
2765
|
+
failed: "failed";
|
|
2766
|
+
cancelled: "cancelled";
|
|
2767
|
+
}>;
|
|
2768
|
+
lastUpdated: z.ZodISODateTime;
|
|
2769
|
+
message: z.ZodOptional<z.ZodString>;
|
|
2770
|
+
}, z.core.$strip>;
|
|
2665
2771
|
export declare const zRequestSignedUploadUrlData: z.ZodObject<{
|
|
2666
2772
|
body: z.ZodOptional<z.ZodNever>;
|
|
2667
2773
|
path: z.ZodObject<{
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
export const zVersionStatus = z.enum([
|
|
4
|
+
'pending',
|
|
5
|
+
'queued',
|
|
6
|
+
'building',
|
|
7
|
+
'deploying',
|
|
8
|
+
'post-deploy-steps',
|
|
9
|
+
'succeeded',
|
|
10
|
+
'failed',
|
|
11
|
+
'cancelled'
|
|
12
|
+
]);
|
|
13
|
+
export const zVersionStatusInfo = z.object({
|
|
14
|
+
status: zVersionStatus,
|
|
15
|
+
lastUpdated: z.iso.datetime(),
|
|
16
|
+
message: z.optional(z.string())
|
|
15
17
|
});
|
|
16
18
|
export const zPlatformTier = z.enum([
|
|
17
19
|
'free',
|
|
@@ -320,6 +322,15 @@ export const zNodeType = z.enum([
|
|
|
320
322
|
'vm',
|
|
321
323
|
'scheduler'
|
|
322
324
|
]);
|
|
325
|
+
export const zHttpMethod = z.enum([
|
|
326
|
+
'GET',
|
|
327
|
+
'POST',
|
|
328
|
+
'PUT',
|
|
329
|
+
'PATCH',
|
|
330
|
+
'DELETE',
|
|
331
|
+
'HEAD',
|
|
332
|
+
'OPTIONS'
|
|
333
|
+
]);
|
|
323
334
|
export const zCommentNodeProps = z.object({
|
|
324
335
|
comment: z.optional(z.string())
|
|
325
336
|
});
|
|
@@ -327,8 +338,12 @@ export const zCacheNodeProps = z.object({
|
|
|
327
338
|
size: z.optional(z.int())
|
|
328
339
|
});
|
|
329
340
|
export const zSchedulerNodeProps = z.object({
|
|
330
|
-
|
|
331
|
-
|
|
341
|
+
expression: z.string(),
|
|
342
|
+
timezone: z.string(),
|
|
343
|
+
requestMethod: zHttpMethod,
|
|
344
|
+
requestPayload: z.optional(z.string()),
|
|
345
|
+
requestHeaders: z.optional(z.record(z.string(), z.string())),
|
|
346
|
+
paused: z.optional(z.boolean())
|
|
332
347
|
});
|
|
333
348
|
export const zRegion = z.enum([
|
|
334
349
|
'africa-south1',
|
|
@@ -523,14 +538,6 @@ export const zPlanPriceResponse = z.object({
|
|
|
523
538
|
currency: z.string(),
|
|
524
539
|
interval: z.string()
|
|
525
540
|
});
|
|
526
|
-
/**
|
|
527
|
-
* The from time to start querying logs from.
|
|
528
|
-
*/
|
|
529
|
-
export const zFromTime = z.iso.datetime();
|
|
530
|
-
/**
|
|
531
|
-
* The to time to start querying logs to.
|
|
532
|
-
*/
|
|
533
|
-
export const zToTime = z.iso.datetime();
|
|
534
541
|
/**
|
|
535
542
|
* Expiry query.
|
|
536
543
|
*/
|
|
@@ -591,10 +598,6 @@ export const zPage = z.int().gte(1).default(1);
|
|
|
591
598
|
* Page size (max 100).
|
|
592
599
|
*/
|
|
593
600
|
export const zLimit = z.int().gte(1).lte(100).default(10);
|
|
594
|
-
/**
|
|
595
|
-
* The next page token for paginated results from the log service.
|
|
596
|
-
*/
|
|
597
|
-
export const zLogServiceNextPageToken = z.string();
|
|
598
601
|
/**
|
|
599
602
|
* Opaque pagination token returned by the previous response.
|
|
600
603
|
*/
|
|
@@ -962,25 +965,6 @@ export const zGetProjectOverviewData = z.object({
|
|
|
962
965
|
* Project overview.
|
|
963
966
|
*/
|
|
964
967
|
export const zGetProjectOverviewResponse = zProjectOverview;
|
|
965
|
-
export const zFetchLogsData = z.object({
|
|
966
|
-
body: z.optional(z.never()),
|
|
967
|
-
path: z.object({
|
|
968
|
-
spaceHandle: z.string(),
|
|
969
|
-
projectHandle: z.string()
|
|
970
|
-
}),
|
|
971
|
-
query: z.object({
|
|
972
|
-
environment: z.uuid(),
|
|
973
|
-
node: z.uuid(),
|
|
974
|
-
from: z.optional(z.iso.datetime()),
|
|
975
|
-
to: z.optional(z.iso.datetime()),
|
|
976
|
-
limit: z.optional(z.int().gte(1).lte(100)).default(10),
|
|
977
|
-
token: z.optional(z.string())
|
|
978
|
-
})
|
|
979
|
-
});
|
|
980
|
-
/**
|
|
981
|
-
* Paginated log entries matching query
|
|
982
|
-
*/
|
|
983
|
-
export const zFetchLogsResponse = zLogs;
|
|
984
968
|
export const zCreateEnvironmentData = z.object({
|
|
985
969
|
body: zCreateEnvironment,
|
|
986
970
|
path: z.object({
|
|
@@ -1040,6 +1024,20 @@ export const zDeployVersionData = z.object({
|
|
|
1040
1024
|
}),
|
|
1041
1025
|
query: z.optional(z.never())
|
|
1042
1026
|
});
|
|
1027
|
+
export const zVersionStatusData = z.object({
|
|
1028
|
+
body: z.optional(z.never()),
|
|
1029
|
+
path: z.object({
|
|
1030
|
+
spaceHandle: z.string(),
|
|
1031
|
+
projectHandle: z.string(),
|
|
1032
|
+
environmentHandle: z.string(),
|
|
1033
|
+
version: z.string()
|
|
1034
|
+
}),
|
|
1035
|
+
query: z.optional(z.never())
|
|
1036
|
+
});
|
|
1037
|
+
/**
|
|
1038
|
+
* Status fetched successfully
|
|
1039
|
+
*/
|
|
1040
|
+
export const zVersionStatusResponse = zVersionStatusInfo;
|
|
1043
1041
|
export const zRequestSignedUploadUrlData = z.object({
|
|
1044
1042
|
body: z.optional(z.never()),
|
|
1045
1043
|
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, BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData,
|
|
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, BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceResponses, 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";
|
|
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>;
|
|
@@ -130,9 +130,6 @@ export declare const useCreateProject: (config?: {
|
|
|
130
130
|
export declare const useGetProjectOverview: (options: Omit<GetProjectOverviewData, "url"> & {
|
|
131
131
|
enabled?: boolean;
|
|
132
132
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").ProjectOverview | undefined, Error>;
|
|
133
|
-
export declare const useFetchLogs: (options: Omit<FetchLogsData, "url"> & {
|
|
134
|
-
enabled?: boolean;
|
|
135
|
-
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Logs | undefined, Error>;
|
|
136
133
|
export declare const useCreateEnvironment: (config?: {
|
|
137
134
|
onSuccess?: (data: GetSuccessResponse<CreateEnvironmentResponses>) => void;
|
|
138
135
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -154,6 +151,9 @@ export declare const useDeployVersion: (config?: {
|
|
|
154
151
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
155
152
|
retry?: boolean;
|
|
156
153
|
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<DeployVersionData, "url">, unknown>;
|
|
154
|
+
export declare const useVersionStatus: (options: Omit<VersionStatusData, "url"> & {
|
|
155
|
+
enabled?: boolean;
|
|
156
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").VersionStatusInfo | undefined, Error>;
|
|
157
157
|
export declare const useRequestSignedUploadUrl: (config?: {
|
|
158
158
|
onSuccess?: (data: GetSuccessResponse<RequestSignedUploadUrlResponses>) => void;
|
|
159
159
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -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, bootstrapOnboardingWorkspace, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview,
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, bootstrapOnboardingWorkspace, 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";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -666,27 +666,6 @@ export const useGetProjectOverview = (options) => {
|
|
|
666
666
|
staleTime: 600000
|
|
667
667
|
});
|
|
668
668
|
};
|
|
669
|
-
export const useFetchLogs = (options) => {
|
|
670
|
-
const token = useToken();
|
|
671
|
-
let { enabled, ...rest } = options || { enabled: true };
|
|
672
|
-
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/logs" };
|
|
673
|
-
const funcer = async () => {
|
|
674
|
-
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
675
|
-
if (isPromise(token) && !token)
|
|
676
|
-
return;
|
|
677
|
-
const res = await fetchLogs({ ...opts, ...rest, auth });
|
|
678
|
-
return res.data;
|
|
679
|
-
};
|
|
680
|
-
if (!token)
|
|
681
|
-
enabled = false;
|
|
682
|
-
return useQuery({
|
|
683
|
-
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, "logs", options.query ?? {}],
|
|
684
|
-
queryFn: funcer,
|
|
685
|
-
enabled,
|
|
686
|
-
retry: false,
|
|
687
|
-
staleTime: 600000
|
|
688
|
-
});
|
|
689
|
-
};
|
|
690
669
|
export const useCreateEnvironment = (config) => {
|
|
691
670
|
const token = useToken();
|
|
692
671
|
const queryClient = useQueryClient();
|
|
@@ -786,6 +765,27 @@ export const useDeployVersion = (config) => {
|
|
|
786
765
|
retry: config?.retry
|
|
787
766
|
});
|
|
788
767
|
};
|
|
768
|
+
export const useVersionStatus = (options) => {
|
|
769
|
+
const token = useToken();
|
|
770
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
771
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{version}/status" };
|
|
772
|
+
const funcer = async () => {
|
|
773
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
774
|
+
if (isPromise(token) && !token)
|
|
775
|
+
return;
|
|
776
|
+
const res = await versionStatus({ ...opts, ...rest, auth });
|
|
777
|
+
return res.data;
|
|
778
|
+
};
|
|
779
|
+
if (!token)
|
|
780
|
+
enabled = false;
|
|
781
|
+
return useQuery({
|
|
782
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, options?.path?.version, "status", options.query ?? {}],
|
|
783
|
+
queryFn: funcer,
|
|
784
|
+
enabled,
|
|
785
|
+
retry: false,
|
|
786
|
+
staleTime: 600000
|
|
787
|
+
});
|
|
788
|
+
};
|
|
789
789
|
export const useRequestSignedUploadUrl = (config) => {
|
|
790
790
|
const token = useToken();
|
|
791
791
|
const queryClient = useQueryClient();
|