shoal-web-sdk 0.0.141 → 0.0.143
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 -1
- package/dist/sdk/@tanstack/react-query.gen.js +19 -1
- package/dist/sdk/sdk.gen.d.ts +5 -1
- package/dist/sdk/sdk.gen.js +15 -0
- package/dist/sdk/types.gen.d.ts +45 -2
- package/dist/sdk/zod.gen.d.ts +36 -18
- package/dist/sdk/zod.gen.js +17 -2
- package/dist/tanstack-codegen/generated/generated.d.ts +4 -1
- package/dist/tanstack-codegen/generated/generated.js +22 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InfiniteData, type UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import { type Options } from '../sdk.gen';
|
|
3
|
-
import type { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, VersionStatusData } from '../types.gen';
|
|
3
|
+
import type { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, VersionStatusData } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -536,6 +536,34 @@ export declare const getSpaceOrgCodeOptions: (options: Options<GetSpaceOrgCodeDa
|
|
|
536
536
|
[dataTagErrorSymbol]: Error;
|
|
537
537
|
};
|
|
538
538
|
};
|
|
539
|
+
export declare const getSpaceStatsQueryKey: (options: Options<GetSpaceStatsData>) => [Pick<Options<GetSpaceStatsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
540
|
+
_id: string;
|
|
541
|
+
_infinite?: boolean;
|
|
542
|
+
tags?: ReadonlyArray<string>;
|
|
543
|
+
}];
|
|
544
|
+
/**
|
|
545
|
+
* Stats for a space.
|
|
546
|
+
*/
|
|
547
|
+
export declare const getSpaceStatsOptions: (options: Options<GetSpaceStatsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").SpaceStats, Error, import("../types.gen").SpaceStats, [Pick<Options<GetSpaceStatsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
548
|
+
_id: string;
|
|
549
|
+
_infinite?: boolean;
|
|
550
|
+
tags?: ReadonlyArray<string>;
|
|
551
|
+
}]>, "queryFn"> & {
|
|
552
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").SpaceStats, [Pick<Options<GetSpaceStatsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
553
|
+
_id: string;
|
|
554
|
+
_infinite?: boolean;
|
|
555
|
+
tags?: ReadonlyArray<string>;
|
|
556
|
+
}], never> | undefined;
|
|
557
|
+
} & {
|
|
558
|
+
queryKey: [Pick<Options<GetSpaceStatsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
559
|
+
_id: string;
|
|
560
|
+
_infinite?: boolean;
|
|
561
|
+
tags?: ReadonlyArray<string>;
|
|
562
|
+
}] & {
|
|
563
|
+
[dataTagSymbol]: import("../types.gen").SpaceStats;
|
|
564
|
+
[dataTagErrorSymbol]: Error;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
539
567
|
export declare const fetchKindeOrganisationBillingAgreementsQueryKey: (options: Options<FetchKindeOrganisationBillingAgreementsData>) => [Pick<Options<FetchKindeOrganisationBillingAgreementsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
540
568
|
_id: string;
|
|
541
569
|
_infinite?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { createEnvironment, createEnvironmentVariable, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteEnvironmentVariable, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVersions, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateUsername, updateUserProfile, versionStatus } from '../sdk.gen';
|
|
4
|
+
import { createEnvironment, createEnvironmentVariable, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteEnvironmentVariable, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVersions, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateUsername, updateUserProfile, versionStatus } from '../sdk.gen';
|
|
5
5
|
const createQueryKey = (id, options, infinite, tags) => {
|
|
6
6
|
const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
|
|
7
7
|
if (infinite) {
|
|
@@ -601,6 +601,24 @@ export const getSpaceOrgCodeOptions = (options) => {
|
|
|
601
601
|
queryKey: getSpaceOrgCodeQueryKey(options)
|
|
602
602
|
});
|
|
603
603
|
};
|
|
604
|
+
export const getSpaceStatsQueryKey = (options) => createQueryKey('getSpaceStats', options);
|
|
605
|
+
/**
|
|
606
|
+
* Stats for a space.
|
|
607
|
+
*/
|
|
608
|
+
export const getSpaceStatsOptions = (options) => {
|
|
609
|
+
return queryOptions({
|
|
610
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
611
|
+
const { data } = await getSpaceStats({
|
|
612
|
+
...options,
|
|
613
|
+
...queryKey[0],
|
|
614
|
+
signal,
|
|
615
|
+
throwOnError: true
|
|
616
|
+
});
|
|
617
|
+
return data;
|
|
618
|
+
},
|
|
619
|
+
queryKey: getSpaceStatsQueryKey(options)
|
|
620
|
+
});
|
|
621
|
+
};
|
|
604
622
|
export const fetchKindeOrganisationBillingAgreementsQueryKey = (options) => createQueryKey('fetchKindeOrganisationBillingAgreements', options);
|
|
605
623
|
/**
|
|
606
624
|
* The space billing agreements.
|
package/dist/sdk/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, VersionStatusData, VersionStatusErrors, VersionStatusResponses } from './types.gen';
|
|
2
|
+
import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, VersionStatusData, VersionStatusErrors, VersionStatusResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -109,6 +109,10 @@ export declare const getSpaceOverview: <ThrowOnError extends boolean = false>(op
|
|
|
109
109
|
* The space organisation code.
|
|
110
110
|
*/
|
|
111
111
|
export declare const getSpaceOrgCode: <ThrowOnError extends boolean = false>(options: Options<GetSpaceOrgCodeData, ThrowOnError>) => import("./client").RequestResult<GetSpaceOrgCodeResponses, GetSpaceOrgCodeErrors, ThrowOnError, "fields">;
|
|
112
|
+
/**
|
|
113
|
+
* Stats for a space.
|
|
114
|
+
*/
|
|
115
|
+
export declare const getSpaceStats: <ThrowOnError extends boolean = false>(options: Options<GetSpaceStatsData, ThrowOnError>) => import("./client").RequestResult<GetSpaceStatsResponses, GetSpaceStatsErrors, ThrowOnError, "fields">;
|
|
112
116
|
/**
|
|
113
117
|
* The space billing agreements.
|
|
114
118
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -384,6 +384,21 @@ export const getSpaceOrgCode = (options) => {
|
|
|
384
384
|
...options
|
|
385
385
|
});
|
|
386
386
|
};
|
|
387
|
+
/**
|
|
388
|
+
* Stats for a space.
|
|
389
|
+
*/
|
|
390
|
+
export const getSpaceStats = (options) => {
|
|
391
|
+
return (options.client ?? client).get({
|
|
392
|
+
security: [
|
|
393
|
+
{
|
|
394
|
+
scheme: 'bearer',
|
|
395
|
+
type: 'http'
|
|
396
|
+
}
|
|
397
|
+
],
|
|
398
|
+
url: '/auth/{spaceHandle}/stats',
|
|
399
|
+
...options
|
|
400
|
+
});
|
|
401
|
+
};
|
|
387
402
|
/**
|
|
388
403
|
* The space billing agreements.
|
|
389
404
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -98,6 +98,16 @@ export type SpaceOverview = {
|
|
|
98
98
|
export type SpaceOrgCodeResponse = {
|
|
99
99
|
orgCode: string;
|
|
100
100
|
};
|
|
101
|
+
export type SpaceStats = {
|
|
102
|
+
/**
|
|
103
|
+
* Total node count across the latest version of every environment in the space.
|
|
104
|
+
*/
|
|
105
|
+
active_services: number;
|
|
106
|
+
/**
|
|
107
|
+
* Count of all deployment attempts across all projects and environments in the current calendar month.
|
|
108
|
+
*/
|
|
109
|
+
deployments_this_month: number;
|
|
110
|
+
};
|
|
101
111
|
export type EnvironmentOverview = {
|
|
102
112
|
id: string;
|
|
103
113
|
name: string;
|
|
@@ -301,9 +311,9 @@ export type Edge = {
|
|
|
301
311
|
dst: string;
|
|
302
312
|
typ: EdgeType;
|
|
303
313
|
props?: ({
|
|
304
|
-
typ: '
|
|
314
|
+
typ: 'network';
|
|
305
315
|
} & NetworkEdgeProps) | ({
|
|
306
|
-
typ: '
|
|
316
|
+
typ: 'route';
|
|
307
317
|
} & RouteEdgeProps);
|
|
308
318
|
};
|
|
309
319
|
export type NetworkEdgeProps = {
|
|
@@ -1512,6 +1522,39 @@ export type GetSpaceOrgCodeResponses = {
|
|
|
1512
1522
|
200: SpaceOrgCodeResponse;
|
|
1513
1523
|
};
|
|
1514
1524
|
export type GetSpaceOrgCodeResponse = GetSpaceOrgCodeResponses[keyof GetSpaceOrgCodeResponses];
|
|
1525
|
+
export type GetSpaceStatsData = {
|
|
1526
|
+
body?: never;
|
|
1527
|
+
path: {
|
|
1528
|
+
/**
|
|
1529
|
+
* The space handle. This must be globally unique.
|
|
1530
|
+
*/
|
|
1531
|
+
spaceHandle: string;
|
|
1532
|
+
};
|
|
1533
|
+
query?: never;
|
|
1534
|
+
url: '/auth/{spaceHandle}/stats';
|
|
1535
|
+
};
|
|
1536
|
+
export type GetSpaceStatsErrors = {
|
|
1537
|
+
/**
|
|
1538
|
+
* Unauthorised user.
|
|
1539
|
+
*/
|
|
1540
|
+
401: ErrorResponse;
|
|
1541
|
+
/**
|
|
1542
|
+
* Invalid credentials.
|
|
1543
|
+
*/
|
|
1544
|
+
403: ErrorResponse;
|
|
1545
|
+
/**
|
|
1546
|
+
* Unexpected error.
|
|
1547
|
+
*/
|
|
1548
|
+
500: ErrorResponse;
|
|
1549
|
+
};
|
|
1550
|
+
export type GetSpaceStatsError = GetSpaceStatsErrors[keyof GetSpaceStatsErrors];
|
|
1551
|
+
export type GetSpaceStatsResponses = {
|
|
1552
|
+
/**
|
|
1553
|
+
* Active service count and deployment count for the current month.
|
|
1554
|
+
*/
|
|
1555
|
+
200: SpaceStats;
|
|
1556
|
+
};
|
|
1557
|
+
export type GetSpaceStatsResponse = GetSpaceStatsResponses[keyof GetSpaceStatsResponses];
|
|
1515
1558
|
export type FetchKindeOrganisationBillingAgreementsData = {
|
|
1516
1559
|
body?: never;
|
|
1517
1560
|
path: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -139,6 +139,10 @@ export declare const zOnboardingAnalytics: z.ZodObject<{
|
|
|
139
139
|
export declare const zSpaceOrgCodeResponse: z.ZodObject<{
|
|
140
140
|
orgCode: z.ZodString;
|
|
141
141
|
}, z.core.$strip>;
|
|
142
|
+
export declare const zSpaceStats: z.ZodObject<{
|
|
143
|
+
active_services: z.ZodInt;
|
|
144
|
+
deployments_this_month: z.ZodInt;
|
|
145
|
+
}, z.core.$strip>;
|
|
142
146
|
export declare const zEnvironmentOverview: z.ZodObject<{
|
|
143
147
|
id: z.ZodUUID;
|
|
144
148
|
name: z.ZodString;
|
|
@@ -500,11 +504,11 @@ export declare const zEdge: z.ZodObject<{
|
|
|
500
504
|
route: "route";
|
|
501
505
|
}>;
|
|
502
506
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
503
|
-
typ: z.ZodLiteral<"
|
|
507
|
+
typ: z.ZodLiteral<"network">;
|
|
504
508
|
}, z.core.$strip>, z.ZodObject<{
|
|
505
509
|
a: z.ZodOptional<z.ZodString>;
|
|
506
510
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
507
|
-
typ: z.ZodLiteral<"
|
|
511
|
+
typ: z.ZodLiteral<"route">;
|
|
508
512
|
}, z.core.$strip>, z.ZodObject<{
|
|
509
513
|
path: z.ZodOptional<z.ZodString>;
|
|
510
514
|
}, z.core.$strip>>]>>;
|
|
@@ -632,11 +636,11 @@ export declare const zNode: z.ZodObject<{
|
|
|
632
636
|
route: "route";
|
|
633
637
|
}>;
|
|
634
638
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
635
|
-
typ: z.ZodLiteral<"
|
|
639
|
+
typ: z.ZodLiteral<"network">;
|
|
636
640
|
}, z.core.$strip>, z.ZodObject<{
|
|
637
641
|
a: z.ZodOptional<z.ZodString>;
|
|
638
642
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
639
|
-
typ: z.ZodLiteral<"
|
|
643
|
+
typ: z.ZodLiteral<"route">;
|
|
640
644
|
}, z.core.$strip>, z.ZodObject<{
|
|
641
645
|
path: z.ZodOptional<z.ZodString>;
|
|
642
646
|
}, z.core.$strip>>]>>;
|
|
@@ -751,11 +755,11 @@ export declare const zNodes: z.ZodObject<{
|
|
|
751
755
|
route: "route";
|
|
752
756
|
}>;
|
|
753
757
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
754
|
-
typ: z.ZodLiteral<"
|
|
758
|
+
typ: z.ZodLiteral<"network">;
|
|
755
759
|
}, z.core.$strip>, z.ZodObject<{
|
|
756
760
|
a: z.ZodOptional<z.ZodString>;
|
|
757
761
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
758
|
-
typ: z.ZodLiteral<"
|
|
762
|
+
typ: z.ZodLiteral<"route">;
|
|
759
763
|
}, z.core.$strip>, z.ZodObject<{
|
|
760
764
|
path: z.ZodOptional<z.ZodString>;
|
|
761
765
|
}, z.core.$strip>>]>>;
|
|
@@ -872,11 +876,11 @@ export declare const zGraph: z.ZodObject<{
|
|
|
872
876
|
route: "route";
|
|
873
877
|
}>;
|
|
874
878
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
875
|
-
typ: z.ZodLiteral<"
|
|
879
|
+
typ: z.ZodLiteral<"network">;
|
|
876
880
|
}, z.core.$strip>, z.ZodObject<{
|
|
877
881
|
a: z.ZodOptional<z.ZodString>;
|
|
878
882
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
879
|
-
typ: z.ZodLiteral<"
|
|
883
|
+
typ: z.ZodLiteral<"route">;
|
|
880
884
|
}, z.core.$strip>, z.ZodObject<{
|
|
881
885
|
path: z.ZodOptional<z.ZodString>;
|
|
882
886
|
}, z.core.$strip>>]>>;
|
|
@@ -1206,11 +1210,11 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
|
1206
1210
|
route: "route";
|
|
1207
1211
|
}>;
|
|
1208
1212
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
1209
|
-
typ: z.ZodLiteral<"
|
|
1213
|
+
typ: z.ZodLiteral<"network">;
|
|
1210
1214
|
}, z.core.$strip>, z.ZodObject<{
|
|
1211
1215
|
a: z.ZodOptional<z.ZodString>;
|
|
1212
1216
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1213
|
-
typ: z.ZodLiteral<"
|
|
1217
|
+
typ: z.ZodLiteral<"route">;
|
|
1214
1218
|
}, z.core.$strip>, z.ZodObject<{
|
|
1215
1219
|
path: z.ZodOptional<z.ZodString>;
|
|
1216
1220
|
}, z.core.$strip>>]>>;
|
|
@@ -1327,11 +1331,11 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
1327
1331
|
route: "route";
|
|
1328
1332
|
}>;
|
|
1329
1333
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
1330
|
-
typ: z.ZodLiteral<"
|
|
1334
|
+
typ: z.ZodLiteral<"network">;
|
|
1331
1335
|
}, z.core.$strip>, z.ZodObject<{
|
|
1332
1336
|
a: z.ZodOptional<z.ZodString>;
|
|
1333
1337
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1334
|
-
typ: z.ZodLiteral<"
|
|
1338
|
+
typ: z.ZodLiteral<"route">;
|
|
1335
1339
|
}, z.core.$strip>, z.ZodObject<{
|
|
1336
1340
|
path: z.ZodOptional<z.ZodString>;
|
|
1337
1341
|
}, z.core.$strip>>]>>;
|
|
@@ -1462,11 +1466,11 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
|
|
|
1462
1466
|
route: "route";
|
|
1463
1467
|
}>;
|
|
1464
1468
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
1465
|
-
typ: z.ZodLiteral<"
|
|
1469
|
+
typ: z.ZodLiteral<"network">;
|
|
1466
1470
|
}, z.core.$strip>, z.ZodObject<{
|
|
1467
1471
|
a: z.ZodOptional<z.ZodString>;
|
|
1468
1472
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1469
|
-
typ: z.ZodLiteral<"
|
|
1473
|
+
typ: z.ZodLiteral<"route">;
|
|
1470
1474
|
}, z.core.$strip>, z.ZodObject<{
|
|
1471
1475
|
path: z.ZodOptional<z.ZodString>;
|
|
1472
1476
|
}, z.core.$strip>>]>>;
|
|
@@ -1920,6 +1924,20 @@ export declare const zGetSpaceOrgCodeData: z.ZodObject<{
|
|
|
1920
1924
|
export declare const zGetSpaceOrgCodeResponse: z.ZodObject<{
|
|
1921
1925
|
orgCode: z.ZodString;
|
|
1922
1926
|
}, z.core.$strip>;
|
|
1927
|
+
export declare const zGetSpaceStatsData: z.ZodObject<{
|
|
1928
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
1929
|
+
path: z.ZodObject<{
|
|
1930
|
+
spaceHandle: z.ZodString;
|
|
1931
|
+
}, z.core.$strip>;
|
|
1932
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
1933
|
+
}, z.core.$strip>;
|
|
1934
|
+
/**
|
|
1935
|
+
* Active service count and deployment count for the current month.
|
|
1936
|
+
*/
|
|
1937
|
+
export declare const zGetSpaceStatsResponse: z.ZodObject<{
|
|
1938
|
+
active_services: z.ZodInt;
|
|
1939
|
+
deployments_this_month: z.ZodInt;
|
|
1940
|
+
}, z.core.$strip>;
|
|
1923
1941
|
export declare const zFetchKindeOrganisationBillingAgreementsData: z.ZodObject<{
|
|
1924
1942
|
body: z.ZodOptional<z.ZodNever>;
|
|
1925
1943
|
path: z.ZodObject<{
|
|
@@ -2293,11 +2311,11 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
|
2293
2311
|
route: "route";
|
|
2294
2312
|
}>;
|
|
2295
2313
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
2296
|
-
typ: z.ZodLiteral<"
|
|
2314
|
+
typ: z.ZodLiteral<"network">;
|
|
2297
2315
|
}, z.core.$strip>, z.ZodObject<{
|
|
2298
2316
|
a: z.ZodOptional<z.ZodString>;
|
|
2299
2317
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2300
|
-
typ: z.ZodLiteral<"
|
|
2318
|
+
typ: z.ZodLiteral<"route">;
|
|
2301
2319
|
}, z.core.$strip>, z.ZodObject<{
|
|
2302
2320
|
path: z.ZodOptional<z.ZodString>;
|
|
2303
2321
|
}, z.core.$strip>>]>>;
|
|
@@ -2414,11 +2432,11 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
2414
2432
|
route: "route";
|
|
2415
2433
|
}>;
|
|
2416
2434
|
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
2417
|
-
typ: z.ZodLiteral<"
|
|
2435
|
+
typ: z.ZodLiteral<"network">;
|
|
2418
2436
|
}, z.core.$strip>, z.ZodObject<{
|
|
2419
2437
|
a: z.ZodOptional<z.ZodString>;
|
|
2420
2438
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2421
|
-
typ: z.ZodLiteral<"
|
|
2439
|
+
typ: z.ZodLiteral<"route">;
|
|
2422
2440
|
}, z.core.$strip>, z.ZodObject<{
|
|
2423
2441
|
path: z.ZodOptional<z.ZodString>;
|
|
2424
2442
|
}, z.core.$strip>>]>>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -102,6 +102,10 @@ export const zOnboardingAnalytics = z.object({
|
|
|
102
102
|
export const zSpaceOrgCodeResponse = z.object({
|
|
103
103
|
orgCode: z.string()
|
|
104
104
|
});
|
|
105
|
+
export const zSpaceStats = z.object({
|
|
106
|
+
active_services: z.int(),
|
|
107
|
+
deployments_this_month: z.int()
|
|
108
|
+
});
|
|
105
109
|
export const zEnvironmentOverview = z.object({
|
|
106
110
|
id: z.uuid(),
|
|
107
111
|
name: z.string(),
|
|
@@ -320,10 +324,10 @@ export const zEdge = z.object({
|
|
|
320
324
|
typ: zEdgeType,
|
|
321
325
|
props: z.optional(z.union([
|
|
322
326
|
z.object({
|
|
323
|
-
typ: z.literal('
|
|
327
|
+
typ: z.literal('network')
|
|
324
328
|
}).and(zNetworkEdgeProps),
|
|
325
329
|
z.object({
|
|
326
|
-
typ: z.literal('
|
|
330
|
+
typ: z.literal('route')
|
|
327
331
|
}).and(zRouteEdgeProps)
|
|
328
332
|
]))
|
|
329
333
|
});
|
|
@@ -854,6 +858,17 @@ export const zGetSpaceOrgCodeData = z.object({
|
|
|
854
858
|
* The organisation code for this space.
|
|
855
859
|
*/
|
|
856
860
|
export const zGetSpaceOrgCodeResponse = zSpaceOrgCodeResponse;
|
|
861
|
+
export const zGetSpaceStatsData = z.object({
|
|
862
|
+
body: z.optional(z.never()),
|
|
863
|
+
path: z.object({
|
|
864
|
+
spaceHandle: z.string()
|
|
865
|
+
}),
|
|
866
|
+
query: z.optional(z.never())
|
|
867
|
+
});
|
|
868
|
+
/**
|
|
869
|
+
* Active service count and deployment count for the current month.
|
|
870
|
+
*/
|
|
871
|
+
export const zGetSpaceStatsResponse = zSpaceStats;
|
|
857
872
|
export const zFetchKindeOrganisationBillingAgreementsData = z.object({
|
|
858
873
|
body: z.optional(z.never()),
|
|
859
874
|
path: z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, VersionStatusData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData } from "../../sdk/types.gen";
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, 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>;
|
|
@@ -95,6 +95,9 @@ export declare const useGetSpaceOverview: (options: Omit<GetSpaceOverviewData, "
|
|
|
95
95
|
export declare const useGetSpaceOrgCode: (options: Omit<GetSpaceOrgCodeData, "url"> & {
|
|
96
96
|
enabled?: boolean;
|
|
97
97
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").SpaceOrgCodeResponse | undefined, Error>;
|
|
98
|
+
export declare const useGetSpaceStats: (options: Omit<GetSpaceStatsData, "url"> & {
|
|
99
|
+
enabled?: boolean;
|
|
100
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").SpaceStats | undefined, Error>;
|
|
98
101
|
export declare const useFetchKindeOrganisationBillingAgreements: (options: Omit<FetchKindeOrganisationBillingAgreementsData, "url"> & {
|
|
99
102
|
enabled?: boolean;
|
|
100
103
|
}) => import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, recordOnboardingAnalytics, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, getGraphOverview, updateGraphState, deployVersion, versionStatus, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, recordOnboardingAnalytics, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, getGraphOverview, updateGraphState, deployVersion, versionStatus, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -485,6 +485,27 @@ export const useGetSpaceOrgCode = (options) => {
|
|
|
485
485
|
staleTime: 600000
|
|
486
486
|
});
|
|
487
487
|
};
|
|
488
|
+
export const useGetSpaceStats = (options) => {
|
|
489
|
+
const token = useToken();
|
|
490
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
491
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/stats" };
|
|
492
|
+
const funcer = async () => {
|
|
493
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
494
|
+
if (isPromise(token) && !token)
|
|
495
|
+
return;
|
|
496
|
+
const res = await getSpaceStats({ ...opts, ...rest, auth });
|
|
497
|
+
return res.data;
|
|
498
|
+
};
|
|
499
|
+
if (!token)
|
|
500
|
+
enabled = false;
|
|
501
|
+
return useQuery({
|
|
502
|
+
queryKey: [options?.path?.spaceHandle, "stats", options.query ?? {}],
|
|
503
|
+
queryFn: funcer,
|
|
504
|
+
enabled,
|
|
505
|
+
retry: false,
|
|
506
|
+
staleTime: 600000
|
|
507
|
+
});
|
|
508
|
+
};
|
|
488
509
|
export const useFetchKindeOrganisationBillingAgreements = (options) => {
|
|
489
510
|
const token = useToken();
|
|
490
511
|
let { enabled, ...rest } = options || { enabled: true };
|