shoal-web-sdk 0.0.126 → 0.0.128

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.
@@ -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, FetchLogsData, 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 } from '../types.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, 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, fetchLogs, 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 } from '../sdk.gen';
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
  */
@@ -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, FetchLogsData, FetchLogsErrors, FetchLogsResponses, 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 } from './types.gen';
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
  */
@@ -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
  */
@@ -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 LogEntry = {
5
- id: string;
6
- timestamp: string;
7
- projectID: string;
8
- environmentID: string;
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';
@@ -338,7 +331,6 @@ export type CacheNodeProps = {
338
331
  size?: number;
339
332
  };
340
333
  export type SchedulerNodeProps = {
341
- url: string;
342
334
  expression: string;
343
335
  timezone: string;
344
336
  requestMethod: HttpMethod;
@@ -510,14 +502,6 @@ export type PlanPriceResponse = {
510
502
  */
511
503
  interval: string;
512
504
  };
513
- /**
514
- * The from time to start querying logs from.
515
- */
516
- export type FromTime = string;
517
- /**
518
- * The to time to start querying logs to.
519
- */
520
- export type ToTime = string;
521
505
  /**
522
506
  * Expiry query.
523
507
  */
@@ -578,10 +562,6 @@ export type Page = number;
578
562
  * Page size (max 100).
579
563
  */
580
564
  export type Limit = number;
581
- /**
582
- * The next page token for paginated results from the log service.
583
- */
584
- export type LogServiceNextPageToken = string;
585
565
  /**
586
566
  * Opaque pagination token returned by the previous response.
587
567
  */
@@ -1883,64 +1863,6 @@ export type GetProjectOverviewResponses = {
1883
1863
  200: ProjectOverview;
1884
1864
  };
1885
1865
  export type GetProjectOverviewResponse = GetProjectOverviewResponses[keyof GetProjectOverviewResponses];
1886
- export type FetchLogsData = {
1887
- body?: never;
1888
- path: {
1889
- /**
1890
- * The space handle. This must be globally unique.
1891
- */
1892
- spaceHandle: string;
1893
- /**
1894
- * A project name. This must be unique to a space.
1895
- */
1896
- projectHandle: string;
1897
- };
1898
- query: {
1899
- /**
1900
- * The environment UUID.
1901
- */
1902
- environment: string;
1903
- /**
1904
- * The node UUID.
1905
- */
1906
- node: string;
1907
- /**
1908
- * The from time to start querying logs from.
1909
- */
1910
- from?: string;
1911
- /**
1912
- * The to time to start querying logs to.
1913
- */
1914
- to?: string;
1915
- /**
1916
- * Page size (max 100).
1917
- */
1918
- limit?: number;
1919
- /**
1920
- * The next page token for paginated results from the log service.
1921
- */
1922
- token?: string;
1923
- };
1924
- url: '/auth/{spaceHandle}/{projectHandle}/logs';
1925
- };
1926
- export type FetchLogsErrors = {
1927
- /**
1928
- * Bad request.
1929
- */
1930
- 400: ErrorResponse;
1931
- /**
1932
- * Unexpected error.
1933
- */
1934
- 500: ErrorResponse;
1935
- };
1936
- export type FetchLogsError = FetchLogsErrors[keyof FetchLogsErrors];
1937
- export type FetchLogsResponses = {
1938
- /**
1939
- * Paginated log entries matching query
1940
- */
1941
- 200: Logs;
1942
- };
1943
- export type FetchLogsResponse = FetchLogsResponses[keyof FetchLogsResponses];
1944
1866
  export type CreateEnvironmentData = {
1945
1867
  body: CreateEnvironment;
1946
1868
  path: {
@@ -2180,6 +2102,59 @@ export type DeployVersionResponses = {
2180
2102
  */
2181
2103
  202: unknown;
2182
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];
2183
2158
  export type RequestSignedUploadUrlData = {
2184
2159
  body?: never;
2185
2160
  path: {
@@ -1,23 +1,27 @@
1
1
  import { z } from 'zod';
2
- export declare const zLogEntry: z.ZodObject<{
3
- id: z.ZodString;
4
- timestamp: z.ZodISODateTime;
5
- projectID: z.ZodString;
6
- environmentID: z.ZodString;
7
- nodeID: z.ZodString;
8
- payload: z.ZodUnknown;
9
- }, z.core.$strip>;
10
- export declare const zLogs: z.ZodObject<{
11
- logs: z.ZodArray<z.ZodObject<{
12
- id: z.ZodString;
13
- timestamp: z.ZodISODateTime;
14
- projectID: z.ZodString;
15
- environmentID: z.ZodString;
16
- nodeID: z.ZodString;
17
- payload: z.ZodUnknown;
18
- }, z.core.$strip>>;
19
- nextPage: z.ZodOptional<z.ZodString>;
20
- limit: z.ZodUnknown;
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";
@@ -505,7 +509,6 @@ export declare const zCacheNodeProps: z.ZodObject<{
505
509
  size: z.ZodOptional<z.ZodInt>;
506
510
  }, z.core.$strip>;
507
511
  export declare const zSchedulerNodeProps: z.ZodObject<{
508
- url: z.ZodString;
509
512
  expression: z.ZodString;
510
513
  timezone: z.ZodString;
511
514
  requestMethod: z.ZodEnum<{
@@ -791,7 +794,6 @@ export declare const zNode: z.ZodObject<{
791
794
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
792
795
  typ: z.ZodLiteral<"scheduler">;
793
796
  }, z.core.$strip>, z.ZodObject<{
794
- url: z.ZodString;
795
797
  expression: z.ZodString;
796
798
  timezone: z.ZodString;
797
799
  requestMethod: z.ZodEnum<{
@@ -946,7 +948,6 @@ export declare const zNodes: z.ZodObject<{
946
948
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
947
949
  typ: z.ZodLiteral<"scheduler">;
948
950
  }, z.core.$strip>, z.ZodObject<{
949
- url: z.ZodString;
950
951
  expression: z.ZodString;
951
952
  timezone: z.ZodString;
952
953
  requestMethod: z.ZodEnum<{
@@ -1103,7 +1104,6 @@ export declare const zGraph: z.ZodObject<{
1103
1104
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1104
1105
  typ: z.ZodLiteral<"scheduler">;
1105
1106
  }, z.core.$strip>, z.ZodObject<{
1106
- url: z.ZodString;
1107
1107
  expression: z.ZodString;
1108
1108
  timezone: z.ZodString;
1109
1109
  requestMethod: z.ZodEnum<{
@@ -1202,14 +1202,6 @@ export declare const zPlanPriceResponse: z.ZodObject<{
1202
1202
  currency: z.ZodString;
1203
1203
  interval: z.ZodString;
1204
1204
  }, z.core.$strip>;
1205
- /**
1206
- * The from time to start querying logs from.
1207
- */
1208
- export declare const zFromTime: z.ZodISODateTime;
1209
- /**
1210
- * The to time to start querying logs to.
1211
- */
1212
- export declare const zToTime: z.ZodISODateTime;
1213
1205
  /**
1214
1206
  * Expiry query.
1215
1207
  */
@@ -1270,10 +1262,6 @@ export declare const zPage: z.ZodDefault<z.ZodInt>;
1270
1262
  * Page size (max 100).
1271
1263
  */
1272
1264
  export declare const zLimit: z.ZodDefault<z.ZodInt>;
1273
- /**
1274
- * The next page token for paginated results from the log service.
1275
- */
1276
- export declare const zLogServiceNextPageToken: z.ZodString;
1277
1265
  /**
1278
1266
  * Opaque pagination token returned by the previous response.
1279
1267
  */
@@ -1464,7 +1452,6 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
1464
1452
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1465
1453
  typ: z.ZodLiteral<"scheduler">;
1466
1454
  }, z.core.$strip>, z.ZodObject<{
1467
- url: z.ZodString;
1468
1455
  expression: z.ZodString;
1469
1456
  timezone: z.ZodString;
1470
1457
  requestMethod: z.ZodEnum<{
@@ -1621,7 +1608,6 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
1621
1608
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1622
1609
  typ: z.ZodLiteral<"scheduler">;
1623
1610
  }, z.core.$strip>, z.ZodObject<{
1624
- url: z.ZodString;
1625
1611
  expression: z.ZodString;
1626
1612
  timezone: z.ZodString;
1627
1613
  requestMethod: z.ZodEnum<{
@@ -1792,7 +1778,6 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
1792
1778
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1793
1779
  typ: z.ZodLiteral<"scheduler">;
1794
1780
  }, z.core.$strip>, z.ZodObject<{
1795
- url: z.ZodString;
1796
1781
  expression: z.ZodString;
1797
1782
  timezone: z.ZodString;
1798
1783
  requestMethod: z.ZodEnum<{
@@ -2368,36 +2353,6 @@ export declare const zGetProjectOverviewResponse: z.ZodObject<{
2368
2353
  versions: z.ZodInt;
2369
2354
  }, z.core.$strip>>;
2370
2355
  }, z.core.$strip>;
2371
- export declare const zFetchLogsData: z.ZodObject<{
2372
- body: z.ZodOptional<z.ZodNever>;
2373
- path: z.ZodObject<{
2374
- spaceHandle: z.ZodString;
2375
- projectHandle: z.ZodString;
2376
- }, z.core.$strip>;
2377
- query: z.ZodObject<{
2378
- environment: z.ZodUUID;
2379
- node: z.ZodUUID;
2380
- from: z.ZodOptional<z.ZodISODateTime>;
2381
- to: z.ZodOptional<z.ZodISODateTime>;
2382
- limit: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
2383
- token: z.ZodOptional<z.ZodString>;
2384
- }, z.core.$strip>;
2385
- }, z.core.$strip>;
2386
- /**
2387
- * Paginated log entries matching query
2388
- */
2389
- export declare const zFetchLogsResponse: z.ZodObject<{
2390
- logs: z.ZodArray<z.ZodObject<{
2391
- id: z.ZodString;
2392
- timestamp: z.ZodISODateTime;
2393
- projectID: z.ZodString;
2394
- environmentID: z.ZodString;
2395
- nodeID: z.ZodString;
2396
- payload: z.ZodUnknown;
2397
- }, z.core.$strip>>;
2398
- nextPage: z.ZodOptional<z.ZodString>;
2399
- limit: z.ZodUnknown;
2400
- }, z.core.$strip>;
2401
2356
  export declare const zCreateEnvironmentData: z.ZodObject<{
2402
2357
  body: z.ZodObject<{
2403
2358
  name: z.ZodString;
@@ -2595,7 +2550,6 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
2595
2550
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
2596
2551
  typ: z.ZodLiteral<"scheduler">;
2597
2552
  }, z.core.$strip>, z.ZodObject<{
2598
- url: z.ZodString;
2599
2553
  expression: z.ZodString;
2600
2554
  timezone: z.ZodString;
2601
2555
  requestMethod: z.ZodEnum<{
@@ -2752,7 +2706,6 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
2752
2706
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
2753
2707
  typ: z.ZodLiteral<"scheduler">;
2754
2708
  }, z.core.$strip>, z.ZodObject<{
2755
- url: z.ZodString;
2756
2709
  expression: z.ZodString;
2757
2710
  timezone: z.ZodString;
2758
2711
  requestMethod: z.ZodEnum<{
@@ -2788,6 +2741,33 @@ export declare const zDeployVersionData: z.ZodObject<{
2788
2741
  }, z.core.$strip>;
2789
2742
  query: z.ZodOptional<z.ZodNever>;
2790
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>;
2791
2771
  export declare const zRequestSignedUploadUrlData: z.ZodObject<{
2792
2772
  body: z.ZodOptional<z.ZodNever>;
2793
2773
  path: z.ZodObject<{
@@ -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 zLogEntry = z.object({
4
- id: z.string(),
5
- timestamp: z.iso.datetime(),
6
- projectID: z.string(),
7
- environmentID: z.string(),
8
- nodeID: z.string(),
9
- payload: z.unknown()
10
- });
11
- export const zLogs = z.object({
12
- logs: z.array(zLogEntry),
13
- nextPage: z.optional(z.string()),
14
- limit: z.unknown()
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',
@@ -336,9 +338,8 @@ export const zCacheNodeProps = z.object({
336
338
  size: z.optional(z.int())
337
339
  });
338
340
  export const zSchedulerNodeProps = z.object({
339
- url: z.string(),
340
- expression: z.string(),
341
- timezone: z.string(),
341
+ expression: z.string().min(9).regex(/^(\*|[0-9*\/,\-]+)\s+(\*|[0-9*\/,\-]+)\s+(\*|[0-9*\/,\-]+)\s+(\*|[0-9*\/,\-]+)\s+(\*|[0-9*\/,\-]+)$/),
342
+ timezone: z.string().min(1),
342
343
  requestMethod: zHttpMethod,
343
344
  requestPayload: z.optional(z.string()),
344
345
  requestHeaders: z.optional(z.record(z.string(), z.string())),
@@ -537,14 +538,6 @@ export const zPlanPriceResponse = z.object({
537
538
  currency: z.string(),
538
539
  interval: z.string()
539
540
  });
540
- /**
541
- * The from time to start querying logs from.
542
- */
543
- export const zFromTime = z.iso.datetime();
544
- /**
545
- * The to time to start querying logs to.
546
- */
547
- export const zToTime = z.iso.datetime();
548
541
  /**
549
542
  * Expiry query.
550
543
  */
@@ -605,10 +598,6 @@ export const zPage = z.int().gte(1).default(1);
605
598
  * Page size (max 100).
606
599
  */
607
600
  export const zLimit = z.int().gte(1).lte(100).default(10);
608
- /**
609
- * The next page token for paginated results from the log service.
610
- */
611
- export const zLogServiceNextPageToken = z.string();
612
601
  /**
613
602
  * Opaque pagination token returned by the previous response.
614
603
  */
@@ -976,25 +965,6 @@ export const zGetProjectOverviewData = z.object({
976
965
  * Project overview.
977
966
  */
978
967
  export const zGetProjectOverviewResponse = zProjectOverview;
979
- export const zFetchLogsData = z.object({
980
- body: z.optional(z.never()),
981
- path: z.object({
982
- spaceHandle: z.string(),
983
- projectHandle: z.string()
984
- }),
985
- query: z.object({
986
- environment: z.uuid(),
987
- node: z.uuid(),
988
- from: z.optional(z.iso.datetime()),
989
- to: z.optional(z.iso.datetime()),
990
- limit: z.optional(z.int().gte(1).lte(100)).default(10),
991
- token: z.optional(z.string())
992
- })
993
- });
994
- /**
995
- * Paginated log entries matching query
996
- */
997
- export const zFetchLogsResponse = zLogs;
998
968
  export const zCreateEnvironmentData = z.object({
999
969
  body: zCreateEnvironment,
1000
970
  path: z.object({
@@ -1054,6 +1024,20 @@ export const zDeployVersionData = z.object({
1054
1024
  }),
1055
1025
  query: z.optional(z.never())
1056
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;
1057
1041
  export const zRequestSignedUploadUrlData = z.object({
1058
1042
  body: z.optional(z.never()),
1059
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, FetchLogsData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData } from "../../sdk/types.gen";
3
+ import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, 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, fetchLogs, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
5
+ import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, 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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shoal-web-sdk",
3
- "version": "0.0.126",
3
+ "version": "0.0.128",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build-hooks": "npx tsx tanstack-codegen/generator.ts",