shoal-web-sdk 0.0.118 → 0.0.120
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 +85 -1
- package/dist/sdk/@tanstack/react-query.gen.js +55 -1
- package/dist/sdk/sdk.gen.d.ts +13 -1
- package/dist/sdk/sdk.gen.js +45 -0
- package/dist/sdk/types.gen.d.ts +228 -1
- package/dist/sdk/zod.gen.d.ts +279 -18
- package/dist/sdk/zod.gen.js +94 -2
- package/dist/tanstack-codegen/generated/generated.d.ts +10 -1
- package/dist/tanstack-codegen/generated/generated.js +64 -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, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, 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 { 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';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -68,6 +68,34 @@ export declare const fetchGraphM2mOptions: (options: Options<FetchGraphM2mData>)
|
|
|
68
68
|
* Update a graph by version ID for M2M.
|
|
69
69
|
*/
|
|
70
70
|
export declare const updateGraphM2mMutation: (options?: Partial<Options<UpdateGraphM2mData>>) => UseMutationOptions<unknown, UpdateGraphM2mError, Options<UpdateGraphM2mData>>;
|
|
71
|
+
export declare const fetchNodeM2mQueryKey: (options: Options<FetchNodeM2mData>) => [Pick<Options<FetchNodeM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
72
|
+
_id: string;
|
|
73
|
+
_infinite?: boolean;
|
|
74
|
+
tags?: ReadonlyArray<string>;
|
|
75
|
+
}];
|
|
76
|
+
/**
|
|
77
|
+
* Fetch a node by id with its props for M2M.
|
|
78
|
+
*/
|
|
79
|
+
export declare const fetchNodeM2mOptions: (options: Options<FetchNodeM2mData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").Node, Error, import("../types.gen").Node, [Pick<Options<FetchNodeM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
80
|
+
_id: string;
|
|
81
|
+
_infinite?: boolean;
|
|
82
|
+
tags?: ReadonlyArray<string>;
|
|
83
|
+
}]>, "queryFn"> & {
|
|
84
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").Node, [Pick<Options<FetchNodeM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
85
|
+
_id: string;
|
|
86
|
+
_infinite?: boolean;
|
|
87
|
+
tags?: ReadonlyArray<string>;
|
|
88
|
+
}], never> | undefined;
|
|
89
|
+
} & {
|
|
90
|
+
queryKey: [Pick<Options<FetchNodeM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
91
|
+
_id: string;
|
|
92
|
+
_infinite?: boolean;
|
|
93
|
+
tags?: ReadonlyArray<string>;
|
|
94
|
+
}] & {
|
|
95
|
+
[dataTagSymbol]: import("../types.gen").Node;
|
|
96
|
+
[dataTagErrorSymbol]: Error;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
71
99
|
/**
|
|
72
100
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
73
101
|
*/
|
|
@@ -708,6 +736,34 @@ export declare const getProjectOverviewOptions: (options: Options<GetProjectOver
|
|
|
708
736
|
[dataTagErrorSymbol]: Error;
|
|
709
737
|
};
|
|
710
738
|
};
|
|
739
|
+
export declare const fetchLogsQueryKey: (options: Options<FetchLogsData>) => [Pick<Options<FetchLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
740
|
+
_id: string;
|
|
741
|
+
_infinite?: boolean;
|
|
742
|
+
tags?: ReadonlyArray<string>;
|
|
743
|
+
}];
|
|
744
|
+
/**
|
|
745
|
+
* Fetch a series of paginated log entries.
|
|
746
|
+
*/
|
|
747
|
+
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"> & {
|
|
748
|
+
_id: string;
|
|
749
|
+
_infinite?: boolean;
|
|
750
|
+
tags?: ReadonlyArray<string>;
|
|
751
|
+
}]>, "queryFn"> & {
|
|
752
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").Logs, [Pick<Options<FetchLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
753
|
+
_id: string;
|
|
754
|
+
_infinite?: boolean;
|
|
755
|
+
tags?: ReadonlyArray<string>;
|
|
756
|
+
}], never> | undefined;
|
|
757
|
+
} & {
|
|
758
|
+
queryKey: [Pick<Options<FetchLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
759
|
+
_id: string;
|
|
760
|
+
_infinite?: boolean;
|
|
761
|
+
tags?: ReadonlyArray<string>;
|
|
762
|
+
}] & {
|
|
763
|
+
[dataTagSymbol]: import("../types.gen").Logs;
|
|
764
|
+
[dataTagErrorSymbol]: Error;
|
|
765
|
+
};
|
|
766
|
+
};
|
|
711
767
|
/**
|
|
712
768
|
* Create an environment inside a project.
|
|
713
769
|
*/
|
|
@@ -912,3 +968,31 @@ export declare const fetchBillingPricesOptions: (options: Options<FetchBillingPr
|
|
|
912
968
|
[dataTagErrorSymbol]: Error;
|
|
913
969
|
};
|
|
914
970
|
};
|
|
971
|
+
export declare const listBillingInvoicesQueryKey: (options: Options<ListBillingInvoicesData>) => [Pick<Options<ListBillingInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
972
|
+
_id: string;
|
|
973
|
+
_infinite?: boolean;
|
|
974
|
+
tags?: ReadonlyArray<string>;
|
|
975
|
+
}];
|
|
976
|
+
/**
|
|
977
|
+
* List past invoices for the space, newest first.
|
|
978
|
+
*/
|
|
979
|
+
export declare const listBillingInvoicesOptions: (options: Options<ListBillingInvoicesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").InvoicesResponse, Error, import("../types.gen").InvoicesResponse, [Pick<Options<ListBillingInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
980
|
+
_id: string;
|
|
981
|
+
_infinite?: boolean;
|
|
982
|
+
tags?: ReadonlyArray<string>;
|
|
983
|
+
}]>, "queryFn"> & {
|
|
984
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").InvoicesResponse, [Pick<Options<ListBillingInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
985
|
+
_id: string;
|
|
986
|
+
_infinite?: boolean;
|
|
987
|
+
tags?: ReadonlyArray<string>;
|
|
988
|
+
}], never> | undefined;
|
|
989
|
+
} & {
|
|
990
|
+
queryKey: [Pick<Options<ListBillingInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
991
|
+
_id: string;
|
|
992
|
+
_infinite?: boolean;
|
|
993
|
+
tags?: ReadonlyArray<string>;
|
|
994
|
+
}] & {
|
|
995
|
+
[dataTagSymbol]: import("../types.gen").InvoicesResponse;
|
|
996
|
+
[dataTagErrorSymbol]: Error;
|
|
997
|
+
};
|
|
998
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { createEnvironment, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, 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 { 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';
|
|
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) {
|
|
@@ -78,6 +78,24 @@ export const updateGraphM2mMutation = (options) => {
|
|
|
78
78
|
};
|
|
79
79
|
return mutationOptions;
|
|
80
80
|
};
|
|
81
|
+
export const fetchNodeM2mQueryKey = (options) => createQueryKey('fetchNodeM2M', options);
|
|
82
|
+
/**
|
|
83
|
+
* Fetch a node by id with its props for M2M.
|
|
84
|
+
*/
|
|
85
|
+
export const fetchNodeM2mOptions = (options) => {
|
|
86
|
+
return queryOptions({
|
|
87
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
88
|
+
const { data } = await fetchNodeM2M({
|
|
89
|
+
...options,
|
|
90
|
+
...queryKey[0],
|
|
91
|
+
signal,
|
|
92
|
+
throwOnError: true
|
|
93
|
+
});
|
|
94
|
+
return data;
|
|
95
|
+
},
|
|
96
|
+
queryKey: fetchNodeM2mQueryKey(options)
|
|
97
|
+
});
|
|
98
|
+
};
|
|
81
99
|
/**
|
|
82
100
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
83
101
|
*/
|
|
@@ -775,6 +793,24 @@ export const getProjectOverviewOptions = (options) => {
|
|
|
775
793
|
queryKey: getProjectOverviewQueryKey(options)
|
|
776
794
|
});
|
|
777
795
|
};
|
|
796
|
+
export const fetchLogsQueryKey = (options) => createQueryKey('fetchLogs', options);
|
|
797
|
+
/**
|
|
798
|
+
* Fetch a series of paginated log entries.
|
|
799
|
+
*/
|
|
800
|
+
export const fetchLogsOptions = (options) => {
|
|
801
|
+
return queryOptions({
|
|
802
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
803
|
+
const { data } = await fetchLogs({
|
|
804
|
+
...options,
|
|
805
|
+
...queryKey[0],
|
|
806
|
+
signal,
|
|
807
|
+
throwOnError: true
|
|
808
|
+
});
|
|
809
|
+
return data;
|
|
810
|
+
},
|
|
811
|
+
queryKey: fetchLogsQueryKey(options)
|
|
812
|
+
});
|
|
813
|
+
};
|
|
778
814
|
/**
|
|
779
815
|
* Create an environment inside a project.
|
|
780
816
|
*/
|
|
@@ -1027,3 +1063,21 @@ export const fetchBillingPricesOptions = (options) => {
|
|
|
1027
1063
|
queryKey: fetchBillingPricesQueryKey(options)
|
|
1028
1064
|
});
|
|
1029
1065
|
};
|
|
1066
|
+
export const listBillingInvoicesQueryKey = (options) => createQueryKey('listBillingInvoices', options);
|
|
1067
|
+
/**
|
|
1068
|
+
* List past invoices for the space, newest first.
|
|
1069
|
+
*/
|
|
1070
|
+
export const listBillingInvoicesOptions = (options) => {
|
|
1071
|
+
return queryOptions({
|
|
1072
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1073
|
+
const { data } = await listBillingInvoices({
|
|
1074
|
+
...options,
|
|
1075
|
+
...queryKey[0],
|
|
1076
|
+
signal,
|
|
1077
|
+
throwOnError: true
|
|
1078
|
+
});
|
|
1079
|
+
return data;
|
|
1080
|
+
},
|
|
1081
|
+
queryKey: listBillingInvoicesQueryKey(options)
|
|
1082
|
+
});
|
|
1083
|
+
};
|
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, 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, 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, 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 { 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';
|
|
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
|
|
@@ -25,6 +25,10 @@ export declare const fetchGraphM2M: <ThrowOnError extends boolean = false>(optio
|
|
|
25
25
|
* Update a graph by version ID for M2M.
|
|
26
26
|
*/
|
|
27
27
|
export declare const updateGraphM2M: <ThrowOnError extends boolean = false>(options: Options<UpdateGraphM2mData, ThrowOnError>) => import("./client").RequestResult<UpdateGraphM2mResponses, UpdateGraphM2mErrors, ThrowOnError, "fields">;
|
|
28
|
+
/**
|
|
29
|
+
* Fetch a node by id with its props for M2M.
|
|
30
|
+
*/
|
|
31
|
+
export declare const fetchNodeM2M: <ThrowOnError extends boolean = false>(options: Options<FetchNodeM2mData, ThrowOnError>) => import("./client").RequestResult<FetchNodeM2mResponses, FetchNodeM2mErrors, ThrowOnError, "fields">;
|
|
28
32
|
/**
|
|
29
33
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
30
34
|
*/
|
|
@@ -137,6 +141,10 @@ export declare const createProject: <ThrowOnError extends boolean = false>(optio
|
|
|
137
141
|
* Get the project overview.
|
|
138
142
|
*/
|
|
139
143
|
export declare const getProjectOverview: <ThrowOnError extends boolean = false>(options: Options<GetProjectOverviewData, ThrowOnError>) => import("./client").RequestResult<GetProjectOverviewResponses, GetProjectOverviewErrors, ThrowOnError, "fields">;
|
|
144
|
+
/**
|
|
145
|
+
* Fetch a series of paginated log entries.
|
|
146
|
+
*/
|
|
147
|
+
export declare const fetchLogs: <ThrowOnError extends boolean = false>(options: Options<FetchLogsData, ThrowOnError>) => import("./client").RequestResult<FetchLogsResponses, FetchLogsErrors, ThrowOnError, "fields">;
|
|
140
148
|
/**
|
|
141
149
|
* Create an environment inside a project.
|
|
142
150
|
*/
|
|
@@ -197,3 +205,7 @@ export declare const getBillingUsage: <ThrowOnError extends boolean = false>(opt
|
|
|
197
205
|
* Fetch live unit prices for all paid plans from Stripe.
|
|
198
206
|
*/
|
|
199
207
|
export declare const fetchBillingPrices: <ThrowOnError extends boolean = false>(options: Options<FetchBillingPricesData, ThrowOnError>) => import("./client").RequestResult<FetchBillingPricesResponses, FetchBillingPricesErrors, ThrowOnError, "fields">;
|
|
208
|
+
/**
|
|
209
|
+
* List past invoices for the space, newest first.
|
|
210
|
+
*/
|
|
211
|
+
export declare const listBillingInvoices: <ThrowOnError extends boolean = false>(options: Options<ListBillingInvoicesData, ThrowOnError>) => import("./client").RequestResult<ListBillingInvoicesResponses, ListBillingInvoicesErrors, ThrowOnError, "fields">;
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -49,6 +49,21 @@ export const updateGraphM2M = (options) => {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Fetch a node by id with its props for M2M.
|
|
54
|
+
*/
|
|
55
|
+
export const fetchNodeM2M = (options) => {
|
|
56
|
+
return (options.client ?? client).get({
|
|
57
|
+
security: [
|
|
58
|
+
{
|
|
59
|
+
scheme: 'bearer',
|
|
60
|
+
type: 'http'
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
url: '/m2m/graph/{versionUUID}/nodes/{nodeUUID}',
|
|
64
|
+
...options
|
|
65
|
+
});
|
|
66
|
+
};
|
|
52
67
|
/**
|
|
53
68
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
54
69
|
*/
|
|
@@ -493,6 +508,21 @@ export const getProjectOverview = (options) => {
|
|
|
493
508
|
...options
|
|
494
509
|
});
|
|
495
510
|
};
|
|
511
|
+
/**
|
|
512
|
+
* Fetch a series of paginated log entries.
|
|
513
|
+
*/
|
|
514
|
+
export const fetchLogs = (options) => {
|
|
515
|
+
return (options.client ?? client).get({
|
|
516
|
+
security: [
|
|
517
|
+
{
|
|
518
|
+
scheme: 'bearer',
|
|
519
|
+
type: 'http'
|
|
520
|
+
}
|
|
521
|
+
],
|
|
522
|
+
url: '/auth/{spaceHandle}/{projectHandle}/logs',
|
|
523
|
+
...options
|
|
524
|
+
});
|
|
525
|
+
};
|
|
496
526
|
/**
|
|
497
527
|
* Create an environment inside a project.
|
|
498
528
|
*/
|
|
@@ -734,3 +764,18 @@ export const fetchBillingPrices = (options) => {
|
|
|
734
764
|
...options
|
|
735
765
|
});
|
|
736
766
|
};
|
|
767
|
+
/**
|
|
768
|
+
* List past invoices for the space, newest first.
|
|
769
|
+
*/
|
|
770
|
+
export const listBillingInvoices = (options) => {
|
|
771
|
+
return (options.client ?? client).get({
|
|
772
|
+
security: [
|
|
773
|
+
{
|
|
774
|
+
scheme: 'bearer',
|
|
775
|
+
type: 'http'
|
|
776
|
+
}
|
|
777
|
+
],
|
|
778
|
+
url: '/auth/{spaceHandle}/billing/invoices',
|
|
779
|
+
...options
|
|
780
|
+
});
|
|
781
|
+
};
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
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;
|
|
16
|
+
};
|
|
4
17
|
export type PlatformTier = 'free' | 'hobby' | 'pro';
|
|
5
18
|
export type BillingInterval = 'monthly' | 'annual';
|
|
6
19
|
export type BillingPlanLookupKey = 'free-monthly' | 'hobby-monthly' | 'hobby-annual' | 'pro-monthly' | 'pro-annual';
|
|
@@ -330,7 +343,7 @@ export type ContainerNodeProps = {
|
|
|
330
343
|
};
|
|
331
344
|
export type Region = 'africa-south1' | 'asia-east1' | 'asia-east2' | 'asia-northeast1' | 'asia-northeast2' | 'asia-northeast3' | 'asia-south1' | 'asia-southeast1' | 'asia-southeast2' | 'australia-southeast1' | 'europe-north1' | 'europe-west1' | 'europe-west2' | 'europe-west3' | 'europe-west4' | 'europe-west6' | 'northamerica-northeast1' | 'northamerica-northeast2' | 'southamerica-east1' | 'southamerica-west1' | 'us-central1' | 'us-east1' | 'us-east4' | 'us-west1' | 'us-west2' | 'us-west3' | 'us-west4';
|
|
332
345
|
export type Cpu = '1' | '2' | '4' | '6' | '8' | '16' | '32';
|
|
333
|
-
export type Memory = '
|
|
346
|
+
export type Memory = '512Mi' | '1Gi' | '2Gi' | '4Gi' | '8Gi' | '16Gi' | '32Gi';
|
|
334
347
|
export type Ingress = 'INGRESS_TRAFFIC_ALL' | 'INGRESS_TRAFFIC_INTERNAL_ONLY' | 'INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER';
|
|
335
348
|
export type CronJobNodeProps = {
|
|
336
349
|
cronTab?: string;
|
|
@@ -402,6 +415,59 @@ export type RecordUsageRequest = {
|
|
|
402
415
|
*/
|
|
403
416
|
timestamp?: number;
|
|
404
417
|
};
|
|
418
|
+
export type Invoice = {
|
|
419
|
+
/**
|
|
420
|
+
* Stripe invoice ID.
|
|
421
|
+
*/
|
|
422
|
+
id: string;
|
|
423
|
+
/**
|
|
424
|
+
* Human-readable invoice number (e.g. "INV-0001").
|
|
425
|
+
*/
|
|
426
|
+
number: string;
|
|
427
|
+
/**
|
|
428
|
+
* Invoice status (paid, open, void, draft, uncollectible).
|
|
429
|
+
*/
|
|
430
|
+
status: string;
|
|
431
|
+
/**
|
|
432
|
+
* Total amount due in the smallest currency unit (e.g. cents).
|
|
433
|
+
*/
|
|
434
|
+
amountDue: number;
|
|
435
|
+
/**
|
|
436
|
+
* Amount already paid in the smallest currency unit.
|
|
437
|
+
*/
|
|
438
|
+
amountPaid: number;
|
|
439
|
+
/**
|
|
440
|
+
* ISO 4217 currency code (e.g. "usd").
|
|
441
|
+
*/
|
|
442
|
+
currency: string;
|
|
443
|
+
/**
|
|
444
|
+
* Start of the billing period this invoice covers.
|
|
445
|
+
*/
|
|
446
|
+
periodStart: string;
|
|
447
|
+
/**
|
|
448
|
+
* End of the billing period this invoice covers.
|
|
449
|
+
*/
|
|
450
|
+
periodEnd: string;
|
|
451
|
+
/**
|
|
452
|
+
* When the invoice was created.
|
|
453
|
+
*/
|
|
454
|
+
created: string;
|
|
455
|
+
/**
|
|
456
|
+
* URL to download the invoice PDF.
|
|
457
|
+
*/
|
|
458
|
+
invoicePdfUrl: string;
|
|
459
|
+
/**
|
|
460
|
+
* URL to the Stripe-hosted invoice page.
|
|
461
|
+
*/
|
|
462
|
+
hostedInvoiceUrl: string;
|
|
463
|
+
};
|
|
464
|
+
export type InvoicesResponse = {
|
|
465
|
+
invoices: Array<Invoice>;
|
|
466
|
+
/**
|
|
467
|
+
* Pass this as `starting_after` in the next request to fetch the next page. Absent when there are no more pages.
|
|
468
|
+
*/
|
|
469
|
+
nextPageToken?: string;
|
|
470
|
+
};
|
|
405
471
|
export type PlanPriceResponse = {
|
|
406
472
|
/**
|
|
407
473
|
* Plan code (e.g. "hobby-monthly", "pro-annual").
|
|
@@ -420,6 +486,14 @@ export type PlanPriceResponse = {
|
|
|
420
486
|
*/
|
|
421
487
|
interval: string;
|
|
422
488
|
};
|
|
489
|
+
/**
|
|
490
|
+
* The from time to start querying logs from.
|
|
491
|
+
*/
|
|
492
|
+
export type FromTime = string;
|
|
493
|
+
/**
|
|
494
|
+
* The to time to start querying logs to.
|
|
495
|
+
*/
|
|
496
|
+
export type ToTime = string;
|
|
423
497
|
/**
|
|
424
498
|
* Expiry query.
|
|
425
499
|
*/
|
|
@@ -432,6 +506,14 @@ export type NodeUuid = string;
|
|
|
432
506
|
* An invite UUID.
|
|
433
507
|
*/
|
|
434
508
|
export type InviteUuid = string;
|
|
509
|
+
/**
|
|
510
|
+
* The environment UUID.
|
|
511
|
+
*/
|
|
512
|
+
export type EnvironmentId = string;
|
|
513
|
+
/**
|
|
514
|
+
* The node UUID.
|
|
515
|
+
*/
|
|
516
|
+
export type NodeId = string;
|
|
435
517
|
/**
|
|
436
518
|
* A version UUID.
|
|
437
519
|
*/
|
|
@@ -472,6 +554,10 @@ export type Page = number;
|
|
|
472
554
|
* Page size (max 100).
|
|
473
555
|
*/
|
|
474
556
|
export type Limit = number;
|
|
557
|
+
/**
|
|
558
|
+
* The next page token for paginated results from the log service.
|
|
559
|
+
*/
|
|
560
|
+
export type LogServiceNextPageToken = string;
|
|
475
561
|
/**
|
|
476
562
|
* Opaque pagination token returned by the previous response.
|
|
477
563
|
*/
|
|
@@ -582,6 +668,51 @@ export type UpdateGraphM2mResponses = {
|
|
|
582
668
|
*/
|
|
583
669
|
202: unknown;
|
|
584
670
|
};
|
|
671
|
+
export type FetchNodeM2mData = {
|
|
672
|
+
body?: never;
|
|
673
|
+
path: {
|
|
674
|
+
/**
|
|
675
|
+
* A version UUID.
|
|
676
|
+
*/
|
|
677
|
+
versionUUID: string;
|
|
678
|
+
/**
|
|
679
|
+
* The node ID this source ZIP is associated with.
|
|
680
|
+
*/
|
|
681
|
+
nodeUUID: string;
|
|
682
|
+
};
|
|
683
|
+
query?: never;
|
|
684
|
+
url: '/m2m/graph/{versionUUID}/nodes/{nodeUUID}';
|
|
685
|
+
};
|
|
686
|
+
export type FetchNodeM2mErrors = {
|
|
687
|
+
/**
|
|
688
|
+
* Invalid request parameters.
|
|
689
|
+
*/
|
|
690
|
+
400: ErrorResponse;
|
|
691
|
+
/**
|
|
692
|
+
* Unauthorised user.
|
|
693
|
+
*/
|
|
694
|
+
401: ErrorResponse;
|
|
695
|
+
/**
|
|
696
|
+
* Invalid credentials.
|
|
697
|
+
*/
|
|
698
|
+
403: ErrorResponse;
|
|
699
|
+
/**
|
|
700
|
+
* Related content not found.
|
|
701
|
+
*/
|
|
702
|
+
404: ErrorResponse;
|
|
703
|
+
/**
|
|
704
|
+
* Unexpected error.
|
|
705
|
+
*/
|
|
706
|
+
500: ErrorResponse;
|
|
707
|
+
};
|
|
708
|
+
export type FetchNodeM2mError = FetchNodeM2mErrors[keyof FetchNodeM2mErrors];
|
|
709
|
+
export type FetchNodeM2mResponses = {
|
|
710
|
+
/**
|
|
711
|
+
* Node fetched successfully.
|
|
712
|
+
*/
|
|
713
|
+
200: Node;
|
|
714
|
+
};
|
|
715
|
+
export type FetchNodeM2mResponse = FetchNodeM2mResponses[keyof FetchNodeM2mResponses];
|
|
585
716
|
export type RequestAccountPasswordResetData = {
|
|
586
717
|
body?: never;
|
|
587
718
|
path?: never;
|
|
@@ -1684,6 +1815,64 @@ export type GetProjectOverviewResponses = {
|
|
|
1684
1815
|
200: ProjectOverview;
|
|
1685
1816
|
};
|
|
1686
1817
|
export type GetProjectOverviewResponse = GetProjectOverviewResponses[keyof GetProjectOverviewResponses];
|
|
1818
|
+
export type FetchLogsData = {
|
|
1819
|
+
body?: never;
|
|
1820
|
+
path: {
|
|
1821
|
+
/**
|
|
1822
|
+
* The space handle. This must be globally unique.
|
|
1823
|
+
*/
|
|
1824
|
+
spaceHandle: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* A project name. This must be unique to a space.
|
|
1827
|
+
*/
|
|
1828
|
+
projectHandle: string;
|
|
1829
|
+
};
|
|
1830
|
+
query: {
|
|
1831
|
+
/**
|
|
1832
|
+
* The environment UUID.
|
|
1833
|
+
*/
|
|
1834
|
+
environment: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* The node UUID.
|
|
1837
|
+
*/
|
|
1838
|
+
node: string;
|
|
1839
|
+
/**
|
|
1840
|
+
* The from time to start querying logs from.
|
|
1841
|
+
*/
|
|
1842
|
+
from?: string;
|
|
1843
|
+
/**
|
|
1844
|
+
* The to time to start querying logs to.
|
|
1845
|
+
*/
|
|
1846
|
+
to?: string;
|
|
1847
|
+
/**
|
|
1848
|
+
* Page size (max 100).
|
|
1849
|
+
*/
|
|
1850
|
+
limit?: number;
|
|
1851
|
+
/**
|
|
1852
|
+
* The next page token for paginated results from the log service.
|
|
1853
|
+
*/
|
|
1854
|
+
token?: string;
|
|
1855
|
+
};
|
|
1856
|
+
url: '/auth/{spaceHandle}/{projectHandle}/logs';
|
|
1857
|
+
};
|
|
1858
|
+
export type FetchLogsErrors = {
|
|
1859
|
+
/**
|
|
1860
|
+
* Bad request.
|
|
1861
|
+
*/
|
|
1862
|
+
400: ErrorResponse;
|
|
1863
|
+
/**
|
|
1864
|
+
* Unexpected error.
|
|
1865
|
+
*/
|
|
1866
|
+
500: ErrorResponse;
|
|
1867
|
+
};
|
|
1868
|
+
export type FetchLogsError = FetchLogsErrors[keyof FetchLogsErrors];
|
|
1869
|
+
export type FetchLogsResponses = {
|
|
1870
|
+
/**
|
|
1871
|
+
* Paginated log entries matching query
|
|
1872
|
+
*/
|
|
1873
|
+
200: Logs;
|
|
1874
|
+
};
|
|
1875
|
+
export type FetchLogsResponse = FetchLogsResponses[keyof FetchLogsResponses];
|
|
1687
1876
|
export type CreateEnvironmentData = {
|
|
1688
1877
|
body: CreateEnvironment;
|
|
1689
1878
|
path: {
|
|
@@ -2282,3 +2471,41 @@ export type FetchBillingPricesResponses = {
|
|
|
2282
2471
|
200: Array<PlanPriceResponse>;
|
|
2283
2472
|
};
|
|
2284
2473
|
export type FetchBillingPricesResponse = FetchBillingPricesResponses[keyof FetchBillingPricesResponses];
|
|
2474
|
+
export type ListBillingInvoicesData = {
|
|
2475
|
+
body?: never;
|
|
2476
|
+
path: {
|
|
2477
|
+
/**
|
|
2478
|
+
* The space handle. This must be globally unique.
|
|
2479
|
+
*/
|
|
2480
|
+
spaceHandle: string;
|
|
2481
|
+
};
|
|
2482
|
+
query?: {
|
|
2483
|
+
/**
|
|
2484
|
+
* Invoice ID to start after (cursor for next page, taken from `next_page_token`).
|
|
2485
|
+
*/
|
|
2486
|
+
starting_after?: string;
|
|
2487
|
+
};
|
|
2488
|
+
url: '/auth/{spaceHandle}/billing/invoices';
|
|
2489
|
+
};
|
|
2490
|
+
export type ListBillingInvoicesErrors = {
|
|
2491
|
+
/**
|
|
2492
|
+
* Unauthorised user.
|
|
2493
|
+
*/
|
|
2494
|
+
401: ErrorResponse;
|
|
2495
|
+
/**
|
|
2496
|
+
* Invalid credentials.
|
|
2497
|
+
*/
|
|
2498
|
+
403: ErrorResponse;
|
|
2499
|
+
/**
|
|
2500
|
+
* Unexpected error.
|
|
2501
|
+
*/
|
|
2502
|
+
500: ErrorResponse;
|
|
2503
|
+
};
|
|
2504
|
+
export type ListBillingInvoicesError = ListBillingInvoicesErrors[keyof ListBillingInvoicesErrors];
|
|
2505
|
+
export type ListBillingInvoicesResponses = {
|
|
2506
|
+
/**
|
|
2507
|
+
* A page of invoices.
|
|
2508
|
+
*/
|
|
2509
|
+
200: InvoicesResponse;
|
|
2510
|
+
};
|
|
2511
|
+
export type ListBillingInvoicesResponse = ListBillingInvoicesResponses[keyof ListBillingInvoicesResponses];
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
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;
|
|
21
|
+
}, z.core.$strip>;
|
|
2
22
|
export declare const zPlatformTier: z.ZodEnum<{
|
|
3
23
|
free: "free";
|
|
4
24
|
hobby: "hobby";
|
|
@@ -495,8 +515,6 @@ export declare const zCpu: z.ZodEnum<{
|
|
|
495
515
|
32: "32";
|
|
496
516
|
}>;
|
|
497
517
|
export declare const zMemory: z.ZodEnum<{
|
|
498
|
-
"128Mi": "128Mi";
|
|
499
|
-
"256Mi": "256Mi";
|
|
500
518
|
"512Mi": "512Mi";
|
|
501
519
|
"1Gi": "1Gi";
|
|
502
520
|
"2Gi": "2Gi";
|
|
@@ -551,8 +569,6 @@ export declare const zContainerNodeProps: z.ZodObject<{
|
|
|
551
569
|
32: "32";
|
|
552
570
|
}>;
|
|
553
571
|
memory: z.ZodEnum<{
|
|
554
|
-
"128Mi": "128Mi";
|
|
555
|
-
"256Mi": "256Mi";
|
|
556
572
|
"512Mi": "512Mi";
|
|
557
573
|
"1Gi": "1Gi";
|
|
558
574
|
"2Gi": "2Gi";
|
|
@@ -682,8 +698,6 @@ export declare const zNode: z.ZodObject<{
|
|
|
682
698
|
32: "32";
|
|
683
699
|
}>;
|
|
684
700
|
memory: z.ZodEnum<{
|
|
685
|
-
"128Mi": "128Mi";
|
|
686
|
-
"256Mi": "256Mi";
|
|
687
701
|
"512Mi": "512Mi";
|
|
688
702
|
"1Gi": "1Gi";
|
|
689
703
|
"2Gi": "2Gi";
|
|
@@ -826,8 +840,6 @@ export declare const zNodes: z.ZodObject<{
|
|
|
826
840
|
32: "32";
|
|
827
841
|
}>;
|
|
828
842
|
memory: z.ZodEnum<{
|
|
829
|
-
"128Mi": "128Mi";
|
|
830
|
-
"256Mi": "256Mi";
|
|
831
843
|
"512Mi": "512Mi";
|
|
832
844
|
"1Gi": "1Gi";
|
|
833
845
|
"2Gi": "2Gi";
|
|
@@ -972,8 +984,6 @@ export declare const zGraph: z.ZodObject<{
|
|
|
972
984
|
32: "32";
|
|
973
985
|
}>;
|
|
974
986
|
memory: z.ZodEnum<{
|
|
975
|
-
"128Mi": "128Mi";
|
|
976
|
-
"256Mi": "256Mi";
|
|
977
987
|
"512Mi": "512Mi";
|
|
978
988
|
"1Gi": "1Gi";
|
|
979
989
|
"2Gi": "2Gi";
|
|
@@ -1073,12 +1083,49 @@ export declare const zRecordUsageRequest: z.ZodObject<{
|
|
|
1073
1083
|
quantity: z.ZodCoercedBigInt<unknown>;
|
|
1074
1084
|
timestamp: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
|
|
1075
1085
|
}, z.core.$strip>;
|
|
1086
|
+
export declare const zInvoice: z.ZodObject<{
|
|
1087
|
+
id: z.ZodString;
|
|
1088
|
+
number: z.ZodString;
|
|
1089
|
+
status: z.ZodString;
|
|
1090
|
+
amountDue: z.ZodCoercedBigInt<unknown>;
|
|
1091
|
+
amountPaid: z.ZodCoercedBigInt<unknown>;
|
|
1092
|
+
currency: z.ZodString;
|
|
1093
|
+
periodStart: z.ZodISODateTime;
|
|
1094
|
+
periodEnd: z.ZodISODateTime;
|
|
1095
|
+
created: z.ZodISODateTime;
|
|
1096
|
+
invoicePdfUrl: z.ZodString;
|
|
1097
|
+
hostedInvoiceUrl: z.ZodString;
|
|
1098
|
+
}, z.core.$strip>;
|
|
1099
|
+
export declare const zInvoicesResponse: z.ZodObject<{
|
|
1100
|
+
invoices: z.ZodArray<z.ZodObject<{
|
|
1101
|
+
id: z.ZodString;
|
|
1102
|
+
number: z.ZodString;
|
|
1103
|
+
status: z.ZodString;
|
|
1104
|
+
amountDue: z.ZodCoercedBigInt<unknown>;
|
|
1105
|
+
amountPaid: z.ZodCoercedBigInt<unknown>;
|
|
1106
|
+
currency: z.ZodString;
|
|
1107
|
+
periodStart: z.ZodISODateTime;
|
|
1108
|
+
periodEnd: z.ZodISODateTime;
|
|
1109
|
+
created: z.ZodISODateTime;
|
|
1110
|
+
invoicePdfUrl: z.ZodString;
|
|
1111
|
+
hostedInvoiceUrl: z.ZodString;
|
|
1112
|
+
}, z.core.$strip>>;
|
|
1113
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
1114
|
+
}, z.core.$strip>;
|
|
1076
1115
|
export declare const zPlanPriceResponse: z.ZodObject<{
|
|
1077
1116
|
code: z.ZodString;
|
|
1078
1117
|
unit_amount_cents: z.ZodCoercedBigInt<unknown>;
|
|
1079
1118
|
currency: z.ZodString;
|
|
1080
1119
|
interval: z.ZodString;
|
|
1081
1120
|
}, z.core.$strip>;
|
|
1121
|
+
/**
|
|
1122
|
+
* The from time to start querying logs from.
|
|
1123
|
+
*/
|
|
1124
|
+
export declare const zFromTime: z.ZodISODateTime;
|
|
1125
|
+
/**
|
|
1126
|
+
* The to time to start querying logs to.
|
|
1127
|
+
*/
|
|
1128
|
+
export declare const zToTime: z.ZodISODateTime;
|
|
1082
1129
|
/**
|
|
1083
1130
|
* Expiry query.
|
|
1084
1131
|
*/
|
|
@@ -1091,6 +1138,14 @@ export declare const zNodeUuid: z.ZodUUID;
|
|
|
1091
1138
|
* An invite UUID.
|
|
1092
1139
|
*/
|
|
1093
1140
|
export declare const zInviteUuid: z.ZodUUID;
|
|
1141
|
+
/**
|
|
1142
|
+
* The environment UUID.
|
|
1143
|
+
*/
|
|
1144
|
+
export declare const zEnvironmentId: z.ZodUUID;
|
|
1145
|
+
/**
|
|
1146
|
+
* The node UUID.
|
|
1147
|
+
*/
|
|
1148
|
+
export declare const zNodeId: z.ZodUUID;
|
|
1094
1149
|
/**
|
|
1095
1150
|
* A version UUID.
|
|
1096
1151
|
*/
|
|
@@ -1131,6 +1186,10 @@ export declare const zPage: z.ZodDefault<z.ZodInt>;
|
|
|
1131
1186
|
* Page size (max 100).
|
|
1132
1187
|
*/
|
|
1133
1188
|
export declare const zLimit: z.ZodDefault<z.ZodInt>;
|
|
1189
|
+
/**
|
|
1190
|
+
* The next page token for paginated results from the log service.
|
|
1191
|
+
*/
|
|
1192
|
+
export declare const zLogServiceNextPageToken: z.ZodString;
|
|
1134
1193
|
/**
|
|
1135
1194
|
* Opaque pagination token returned by the previous response.
|
|
1136
1195
|
*/
|
|
@@ -1269,8 +1328,6 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
|
1269
1328
|
32: "32";
|
|
1270
1329
|
}>;
|
|
1271
1330
|
memory: z.ZodEnum<{
|
|
1272
|
-
"128Mi": "128Mi";
|
|
1273
|
-
"256Mi": "256Mi";
|
|
1274
1331
|
"512Mi": "512Mi";
|
|
1275
1332
|
"1Gi": "1Gi";
|
|
1276
1333
|
"2Gi": "2Gi";
|
|
@@ -1415,8 +1472,6 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
1415
1472
|
32: "32";
|
|
1416
1473
|
}>;
|
|
1417
1474
|
memory: z.ZodEnum<{
|
|
1418
|
-
"128Mi": "128Mi";
|
|
1419
|
-
"256Mi": "256Mi";
|
|
1420
1475
|
"512Mi": "512Mi";
|
|
1421
1476
|
"1Gi": "1Gi";
|
|
1422
1477
|
"2Gi": "2Gi";
|
|
@@ -1475,6 +1530,158 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
1475
1530
|
}, z.core.$strip>;
|
|
1476
1531
|
query: z.ZodOptional<z.ZodNever>;
|
|
1477
1532
|
}, z.core.$strip>;
|
|
1533
|
+
export declare const zFetchNodeM2mData: z.ZodObject<{
|
|
1534
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
1535
|
+
path: z.ZodObject<{
|
|
1536
|
+
versionUUID: z.ZodUUID;
|
|
1537
|
+
nodeUUID: z.ZodUUID;
|
|
1538
|
+
}, z.core.$strip>;
|
|
1539
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
1540
|
+
}, z.core.$strip>;
|
|
1541
|
+
/**
|
|
1542
|
+
* Node fetched successfully.
|
|
1543
|
+
*/
|
|
1544
|
+
export declare const zFetchNodeM2mResponse: z.ZodObject<{
|
|
1545
|
+
id: z.ZodUUID;
|
|
1546
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1547
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1548
|
+
x: z.ZodNumber;
|
|
1549
|
+
y: z.ZodNumber;
|
|
1550
|
+
width: z.ZodInt;
|
|
1551
|
+
height: z.ZodInt;
|
|
1552
|
+
edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1553
|
+
id: z.ZodUUID;
|
|
1554
|
+
src: z.ZodUUID;
|
|
1555
|
+
dst: z.ZodUUID;
|
|
1556
|
+
typ: z.ZodEnum<{
|
|
1557
|
+
network: "network";
|
|
1558
|
+
route: "route";
|
|
1559
|
+
}>;
|
|
1560
|
+
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
1561
|
+
typ: z.ZodLiteral<"comment">;
|
|
1562
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1563
|
+
a: z.ZodOptional<z.ZodString>;
|
|
1564
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1565
|
+
typ: z.ZodLiteral<"cache">;
|
|
1566
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1567
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
1568
|
+
}, z.core.$strip>>]>>;
|
|
1569
|
+
}, z.core.$strip>>>;
|
|
1570
|
+
typ: z.ZodEnum<{
|
|
1571
|
+
function: "function";
|
|
1572
|
+
cache: "cache";
|
|
1573
|
+
comment: "comment";
|
|
1574
|
+
container: "container";
|
|
1575
|
+
cronjob: "cronjob";
|
|
1576
|
+
database: "database";
|
|
1577
|
+
queue: "queue";
|
|
1578
|
+
proxy: "proxy";
|
|
1579
|
+
vm: "vm";
|
|
1580
|
+
scheduler: "scheduler";
|
|
1581
|
+
}>;
|
|
1582
|
+
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
1583
|
+
typ: z.ZodLiteral<"comment">;
|
|
1584
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1585
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
1586
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1587
|
+
typ: z.ZodLiteral<"cache">;
|
|
1588
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1589
|
+
size: z.ZodOptional<z.ZodInt>;
|
|
1590
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1591
|
+
typ: z.ZodLiteral<"container">;
|
|
1592
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1593
|
+
region: z.ZodEnum<{
|
|
1594
|
+
"africa-south1": "africa-south1";
|
|
1595
|
+
"asia-east1": "asia-east1";
|
|
1596
|
+
"asia-east2": "asia-east2";
|
|
1597
|
+
"asia-northeast1": "asia-northeast1";
|
|
1598
|
+
"asia-northeast2": "asia-northeast2";
|
|
1599
|
+
"asia-northeast3": "asia-northeast3";
|
|
1600
|
+
"asia-south1": "asia-south1";
|
|
1601
|
+
"asia-southeast1": "asia-southeast1";
|
|
1602
|
+
"asia-southeast2": "asia-southeast2";
|
|
1603
|
+
"australia-southeast1": "australia-southeast1";
|
|
1604
|
+
"europe-north1": "europe-north1";
|
|
1605
|
+
"europe-west1": "europe-west1";
|
|
1606
|
+
"europe-west2": "europe-west2";
|
|
1607
|
+
"europe-west3": "europe-west3";
|
|
1608
|
+
"europe-west4": "europe-west4";
|
|
1609
|
+
"europe-west6": "europe-west6";
|
|
1610
|
+
"northamerica-northeast1": "northamerica-northeast1";
|
|
1611
|
+
"northamerica-northeast2": "northamerica-northeast2";
|
|
1612
|
+
"southamerica-east1": "southamerica-east1";
|
|
1613
|
+
"southamerica-west1": "southamerica-west1";
|
|
1614
|
+
"us-central1": "us-central1";
|
|
1615
|
+
"us-east1": "us-east1";
|
|
1616
|
+
"us-east4": "us-east4";
|
|
1617
|
+
"us-west1": "us-west1";
|
|
1618
|
+
"us-west2": "us-west2";
|
|
1619
|
+
"us-west3": "us-west3";
|
|
1620
|
+
"us-west4": "us-west4";
|
|
1621
|
+
}>;
|
|
1622
|
+
port: z.ZodInt;
|
|
1623
|
+
cpu: z.ZodEnum<{
|
|
1624
|
+
1: "1";
|
|
1625
|
+
2: "2";
|
|
1626
|
+
4: "4";
|
|
1627
|
+
6: "6";
|
|
1628
|
+
8: "8";
|
|
1629
|
+
16: "16";
|
|
1630
|
+
32: "32";
|
|
1631
|
+
}>;
|
|
1632
|
+
memory: z.ZodEnum<{
|
|
1633
|
+
"512Mi": "512Mi";
|
|
1634
|
+
"1Gi": "1Gi";
|
|
1635
|
+
"2Gi": "2Gi";
|
|
1636
|
+
"4Gi": "4Gi";
|
|
1637
|
+
"8Gi": "8Gi";
|
|
1638
|
+
"16Gi": "16Gi";
|
|
1639
|
+
"32Gi": "32Gi";
|
|
1640
|
+
}>;
|
|
1641
|
+
ingress: z.ZodEnum<{
|
|
1642
|
+
INGRESS_TRAFFIC_ALL: "INGRESS_TRAFFIC_ALL";
|
|
1643
|
+
INGRESS_TRAFFIC_INTERNAL_ONLY: "INGRESS_TRAFFIC_INTERNAL_ONLY";
|
|
1644
|
+
INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER";
|
|
1645
|
+
}>;
|
|
1646
|
+
timeoutSeconds: z.ZodOptional<z.ZodInt>;
|
|
1647
|
+
maxInstances: z.ZodOptional<z.ZodInt>;
|
|
1648
|
+
minInstances: z.ZodOptional<z.ZodInt>;
|
|
1649
|
+
concurrency: z.ZodOptional<z.ZodInt>;
|
|
1650
|
+
allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
|
|
1651
|
+
uri: z.ZodString;
|
|
1652
|
+
installationId: z.ZodOptional<z.ZodString>;
|
|
1653
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1654
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1655
|
+
typ: z.ZodLiteral<"cronjob">;
|
|
1656
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1657
|
+
cronTab: z.ZodOptional<z.ZodString>;
|
|
1658
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1659
|
+
typ: z.ZodLiteral<"database">;
|
|
1660
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1661
|
+
space: z.ZodOptional<z.ZodInt>;
|
|
1662
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1663
|
+
typ: z.ZodLiteral<"function">;
|
|
1664
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1665
|
+
cpus: z.ZodOptional<z.ZodInt>;
|
|
1666
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1667
|
+
typ: z.ZodLiteral<"queue">;
|
|
1668
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1669
|
+
foobar: z.ZodOptional<z.ZodString>;
|
|
1670
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1671
|
+
typ: z.ZodLiteral<"proxy">;
|
|
1672
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1673
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
1674
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1675
|
+
typ: z.ZodLiteral<"vm">;
|
|
1676
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1677
|
+
os: z.ZodOptional<z.ZodString>;
|
|
1678
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1679
|
+
typ: z.ZodLiteral<"scheduler">;
|
|
1680
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1681
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1682
|
+
expression: z.ZodOptional<z.ZodString>;
|
|
1683
|
+
}, z.core.$strip>>]>>;
|
|
1684
|
+
}, z.core.$strip>;
|
|
1478
1685
|
export declare const zRequestAccountPasswordResetData: z.ZodObject<{
|
|
1479
1686
|
body: z.ZodOptional<z.ZodNever>;
|
|
1480
1687
|
path: z.ZodOptional<z.ZodNever>;
|
|
@@ -2006,6 +2213,36 @@ export declare const zGetProjectOverviewResponse: z.ZodObject<{
|
|
|
2006
2213
|
versions: z.ZodInt;
|
|
2007
2214
|
}, z.core.$strip>>;
|
|
2008
2215
|
}, z.core.$strip>;
|
|
2216
|
+
export declare const zFetchLogsData: z.ZodObject<{
|
|
2217
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2218
|
+
path: z.ZodObject<{
|
|
2219
|
+
spaceHandle: z.ZodString;
|
|
2220
|
+
projectHandle: z.ZodString;
|
|
2221
|
+
}, z.core.$strip>;
|
|
2222
|
+
query: z.ZodObject<{
|
|
2223
|
+
environment: z.ZodUUID;
|
|
2224
|
+
node: z.ZodUUID;
|
|
2225
|
+
from: z.ZodOptional<z.ZodISODateTime>;
|
|
2226
|
+
to: z.ZodOptional<z.ZodISODateTime>;
|
|
2227
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
2228
|
+
token: z.ZodOptional<z.ZodString>;
|
|
2229
|
+
}, z.core.$strip>;
|
|
2230
|
+
}, z.core.$strip>;
|
|
2231
|
+
/**
|
|
2232
|
+
* Paginated log entries matching query
|
|
2233
|
+
*/
|
|
2234
|
+
export declare const zFetchLogsResponse: z.ZodObject<{
|
|
2235
|
+
logs: z.ZodArray<z.ZodObject<{
|
|
2236
|
+
id: z.ZodString;
|
|
2237
|
+
timestamp: z.ZodISODateTime;
|
|
2238
|
+
projectID: z.ZodString;
|
|
2239
|
+
environmentID: z.ZodString;
|
|
2240
|
+
nodeID: z.ZodString;
|
|
2241
|
+
payload: z.ZodUnknown;
|
|
2242
|
+
}, z.core.$strip>>;
|
|
2243
|
+
nextPage: z.ZodOptional<z.ZodString>;
|
|
2244
|
+
limit: z.ZodUnknown;
|
|
2245
|
+
}, z.core.$strip>;
|
|
2009
2246
|
export declare const zCreateEnvironmentData: z.ZodObject<{
|
|
2010
2247
|
body: z.ZodObject<{
|
|
2011
2248
|
name: z.ZodString;
|
|
@@ -2155,8 +2392,6 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
|
2155
2392
|
32: "32";
|
|
2156
2393
|
}>;
|
|
2157
2394
|
memory: z.ZodEnum<{
|
|
2158
|
-
"128Mi": "128Mi";
|
|
2159
|
-
"256Mi": "256Mi";
|
|
2160
2395
|
"512Mi": "512Mi";
|
|
2161
2396
|
"1Gi": "1Gi";
|
|
2162
2397
|
"2Gi": "2Gi";
|
|
@@ -2301,8 +2536,6 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
2301
2536
|
32: "32";
|
|
2302
2537
|
}>;
|
|
2303
2538
|
memory: z.ZodEnum<{
|
|
2304
|
-
"128Mi": "128Mi";
|
|
2305
|
-
"256Mi": "256Mi";
|
|
2306
2539
|
"512Mi": "512Mi";
|
|
2307
2540
|
"1Gi": "1Gi";
|
|
2308
2541
|
"2Gi": "2Gi";
|
|
@@ -2524,3 +2757,31 @@ export declare const zFetchBillingPricesResponse: z.ZodArray<z.ZodObject<{
|
|
|
2524
2757
|
currency: z.ZodString;
|
|
2525
2758
|
interval: z.ZodString;
|
|
2526
2759
|
}, z.core.$strip>>;
|
|
2760
|
+
export declare const zListBillingInvoicesData: z.ZodObject<{
|
|
2761
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
2762
|
+
path: z.ZodObject<{
|
|
2763
|
+
spaceHandle: z.ZodString;
|
|
2764
|
+
}, z.core.$strip>;
|
|
2765
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
2766
|
+
starting_after: z.ZodOptional<z.ZodString>;
|
|
2767
|
+
}, z.core.$strip>>;
|
|
2768
|
+
}, z.core.$strip>;
|
|
2769
|
+
/**
|
|
2770
|
+
* A page of invoices.
|
|
2771
|
+
*/
|
|
2772
|
+
export declare const zListBillingInvoicesResponse: z.ZodObject<{
|
|
2773
|
+
invoices: z.ZodArray<z.ZodObject<{
|
|
2774
|
+
id: z.ZodString;
|
|
2775
|
+
number: z.ZodString;
|
|
2776
|
+
status: z.ZodString;
|
|
2777
|
+
amountDue: z.ZodCoercedBigInt<unknown>;
|
|
2778
|
+
amountPaid: z.ZodCoercedBigInt<unknown>;
|
|
2779
|
+
currency: z.ZodString;
|
|
2780
|
+
periodStart: z.ZodISODateTime;
|
|
2781
|
+
periodEnd: z.ZodISODateTime;
|
|
2782
|
+
created: z.ZodISODateTime;
|
|
2783
|
+
invoicePdfUrl: z.ZodString;
|
|
2784
|
+
hostedInvoiceUrl: z.ZodString;
|
|
2785
|
+
}, z.core.$strip>>;
|
|
2786
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
2787
|
+
}, z.core.$strip>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
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()
|
|
15
|
+
});
|
|
3
16
|
export const zPlatformTier = z.enum([
|
|
4
17
|
'free',
|
|
5
18
|
'hobby',
|
|
@@ -345,8 +358,6 @@ export const zCpu = z.enum([
|
|
|
345
358
|
'32'
|
|
346
359
|
]);
|
|
347
360
|
export const zMemory = z.enum([
|
|
348
|
-
'128Mi',
|
|
349
|
-
'256Mi',
|
|
350
361
|
'512Mi',
|
|
351
362
|
'1Gi',
|
|
352
363
|
'2Gi',
|
|
@@ -478,12 +489,37 @@ export const zRecordUsageRequest = z.object({
|
|
|
478
489
|
quantity: z.coerce.bigint(),
|
|
479
490
|
timestamp: z.optional(z.coerce.bigint())
|
|
480
491
|
});
|
|
492
|
+
export const zInvoice = z.object({
|
|
493
|
+
id: z.string(),
|
|
494
|
+
number: z.string(),
|
|
495
|
+
status: z.string(),
|
|
496
|
+
amountDue: z.coerce.bigint(),
|
|
497
|
+
amountPaid: z.coerce.bigint(),
|
|
498
|
+
currency: z.string(),
|
|
499
|
+
periodStart: z.iso.datetime(),
|
|
500
|
+
periodEnd: z.iso.datetime(),
|
|
501
|
+
created: z.iso.datetime(),
|
|
502
|
+
invoicePdfUrl: z.string(),
|
|
503
|
+
hostedInvoiceUrl: z.string()
|
|
504
|
+
});
|
|
505
|
+
export const zInvoicesResponse = z.object({
|
|
506
|
+
invoices: z.array(zInvoice),
|
|
507
|
+
nextPageToken: z.optional(z.string())
|
|
508
|
+
});
|
|
481
509
|
export const zPlanPriceResponse = z.object({
|
|
482
510
|
code: z.string(),
|
|
483
511
|
unit_amount_cents: z.coerce.bigint(),
|
|
484
512
|
currency: z.string(),
|
|
485
513
|
interval: z.string()
|
|
486
514
|
});
|
|
515
|
+
/**
|
|
516
|
+
* The from time to start querying logs from.
|
|
517
|
+
*/
|
|
518
|
+
export const zFromTime = z.iso.datetime();
|
|
519
|
+
/**
|
|
520
|
+
* The to time to start querying logs to.
|
|
521
|
+
*/
|
|
522
|
+
export const zToTime = z.iso.datetime();
|
|
487
523
|
/**
|
|
488
524
|
* Expiry query.
|
|
489
525
|
*/
|
|
@@ -496,6 +532,14 @@ export const zNodeUuid = z.uuid();
|
|
|
496
532
|
* An invite UUID.
|
|
497
533
|
*/
|
|
498
534
|
export const zInviteUuid = z.uuid();
|
|
535
|
+
/**
|
|
536
|
+
* The environment UUID.
|
|
537
|
+
*/
|
|
538
|
+
export const zEnvironmentId = z.uuid();
|
|
539
|
+
/**
|
|
540
|
+
* The node UUID.
|
|
541
|
+
*/
|
|
542
|
+
export const zNodeId = z.uuid();
|
|
499
543
|
/**
|
|
500
544
|
* A version UUID.
|
|
501
545
|
*/
|
|
@@ -536,6 +580,10 @@ export const zPage = z.int().gte(1).default(1);
|
|
|
536
580
|
* Page size (max 100).
|
|
537
581
|
*/
|
|
538
582
|
export const zLimit = z.int().gte(1).lte(100).default(10);
|
|
583
|
+
/**
|
|
584
|
+
* The next page token for paginated results from the log service.
|
|
585
|
+
*/
|
|
586
|
+
export const zLogServiceNextPageToken = z.string();
|
|
539
587
|
/**
|
|
540
588
|
* Opaque pagination token returned by the previous response.
|
|
541
589
|
*/
|
|
@@ -589,6 +637,18 @@ export const zUpdateGraphM2mData = z.object({
|
|
|
589
637
|
}),
|
|
590
638
|
query: z.optional(z.never())
|
|
591
639
|
});
|
|
640
|
+
export const zFetchNodeM2mData = z.object({
|
|
641
|
+
body: z.optional(z.never()),
|
|
642
|
+
path: z.object({
|
|
643
|
+
versionUUID: z.uuid(),
|
|
644
|
+
nodeUUID: z.uuid()
|
|
645
|
+
}),
|
|
646
|
+
query: z.optional(z.never())
|
|
647
|
+
});
|
|
648
|
+
/**
|
|
649
|
+
* Node fetched successfully.
|
|
650
|
+
*/
|
|
651
|
+
export const zFetchNodeM2mResponse = zNode;
|
|
592
652
|
export const zRequestAccountPasswordResetData = z.object({
|
|
593
653
|
body: z.optional(z.never()),
|
|
594
654
|
path: z.optional(z.never()),
|
|
@@ -877,6 +937,25 @@ export const zGetProjectOverviewData = z.object({
|
|
|
877
937
|
* Project overview.
|
|
878
938
|
*/
|
|
879
939
|
export const zGetProjectOverviewResponse = zProjectOverview;
|
|
940
|
+
export const zFetchLogsData = z.object({
|
|
941
|
+
body: z.optional(z.never()),
|
|
942
|
+
path: z.object({
|
|
943
|
+
spaceHandle: z.string(),
|
|
944
|
+
projectHandle: z.string()
|
|
945
|
+
}),
|
|
946
|
+
query: z.object({
|
|
947
|
+
environment: z.uuid(),
|
|
948
|
+
node: z.uuid(),
|
|
949
|
+
from: z.optional(z.iso.datetime()),
|
|
950
|
+
to: z.optional(z.iso.datetime()),
|
|
951
|
+
limit: z.optional(z.int().gte(1).lte(100)).default(10),
|
|
952
|
+
token: z.optional(z.string())
|
|
953
|
+
})
|
|
954
|
+
});
|
|
955
|
+
/**
|
|
956
|
+
* Paginated log entries matching query
|
|
957
|
+
*/
|
|
958
|
+
export const zFetchLogsResponse = zLogs;
|
|
880
959
|
export const zCreateEnvironmentData = z.object({
|
|
881
960
|
body: zCreateEnvironment,
|
|
882
961
|
path: z.object({
|
|
@@ -1042,3 +1121,16 @@ export const zFetchBillingPricesData = z.object({
|
|
|
1042
1121
|
* A list of plan prices.
|
|
1043
1122
|
*/
|
|
1044
1123
|
export const zFetchBillingPricesResponse = z.array(zPlanPriceResponse);
|
|
1124
|
+
export const zListBillingInvoicesData = z.object({
|
|
1125
|
+
body: z.optional(z.never()),
|
|
1126
|
+
path: z.object({
|
|
1127
|
+
spaceHandle: z.string()
|
|
1128
|
+
}),
|
|
1129
|
+
query: z.optional(z.object({
|
|
1130
|
+
starting_after: z.optional(z.string())
|
|
1131
|
+
}))
|
|
1132
|
+
});
|
|
1133
|
+
/**
|
|
1134
|
+
* A page of invoices.
|
|
1135
|
+
*/
|
|
1136
|
+
export const zListBillingInvoicesResponse = zInvoicesResponse;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData } 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, 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";
|
|
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>;
|
|
@@ -12,6 +12,9 @@ export declare const useUpdateGraphM2M: (config?: {
|
|
|
12
12
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
13
13
|
retry?: boolean;
|
|
14
14
|
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<UpdateGraphM2mData, "url">, unknown>;
|
|
15
|
+
export declare const useFetchNodeM2M: (options: Omit<FetchNodeM2mData, "url"> & {
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Node | undefined, Error>;
|
|
15
18
|
export declare const useRequestAccountPasswordReset: (config?: {
|
|
16
19
|
onSuccess?: (data: GetSuccessResponse<RequestAccountPasswordResetResponses>) => void;
|
|
17
20
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -122,6 +125,9 @@ export declare const useCreateProject: (config?: {
|
|
|
122
125
|
export declare const useGetProjectOverview: (options: Omit<GetProjectOverviewData, "url"> & {
|
|
123
126
|
enabled?: boolean;
|
|
124
127
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").ProjectOverview | undefined, Error>;
|
|
128
|
+
export declare const useFetchLogs: (options: Omit<FetchLogsData, "url"> & {
|
|
129
|
+
enabled?: boolean;
|
|
130
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Logs | undefined, Error>;
|
|
125
131
|
export declare const useCreateEnvironment: (config?: {
|
|
126
132
|
onSuccess?: (data: GetSuccessResponse<CreateEnvironmentResponses>) => void;
|
|
127
133
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -185,3 +191,6 @@ export declare const useGetBillingUsage: (options: Omit<GetBillingUsageData, "ur
|
|
|
185
191
|
export declare const useFetchBillingPrices: (options: Omit<FetchBillingPricesData, "url"> & {
|
|
186
192
|
enabled?: boolean;
|
|
187
193
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").PlanPriceResponse[] | undefined, Error>;
|
|
194
|
+
export declare const useListBillingInvoices: (options: Omit<ListBillingInvoicesData, "url"> & {
|
|
195
|
+
enabled?: boolean;
|
|
196
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").InvoicesResponse | undefined, Error>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices } from "../../sdk/sdk.gen";
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, 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";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -64,6 +64,27 @@ export const useUpdateGraphM2M = (config) => {
|
|
|
64
64
|
retry: config?.retry
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
+
export const useFetchNodeM2M = (options) => {
|
|
68
|
+
const token = useToken();
|
|
69
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
70
|
+
const opts = { throwOnError: true, url: "/m2m/graph/{versionUUID}/nodes/{nodeUUID}" };
|
|
71
|
+
const funcer = async () => {
|
|
72
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
73
|
+
if (isPromise(token) && !token)
|
|
74
|
+
return;
|
|
75
|
+
const res = await fetchNodeM2M({ ...opts, ...rest, auth });
|
|
76
|
+
return res.data;
|
|
77
|
+
};
|
|
78
|
+
if (!token)
|
|
79
|
+
enabled = false;
|
|
80
|
+
return useQuery({
|
|
81
|
+
queryKey: ["m2m", "graph", options?.path?.versionUUID, "nodes", options?.path?.nodeUUID, options.query ?? {}],
|
|
82
|
+
queryFn: funcer,
|
|
83
|
+
enabled,
|
|
84
|
+
retry: false,
|
|
85
|
+
staleTime: 600000
|
|
86
|
+
});
|
|
87
|
+
};
|
|
67
88
|
export const useRequestAccountPasswordReset = (config) => {
|
|
68
89
|
const token = useToken();
|
|
69
90
|
const queryClient = useQueryClient();
|
|
@@ -626,6 +647,27 @@ export const useGetProjectOverview = (options) => {
|
|
|
626
647
|
staleTime: 600000
|
|
627
648
|
});
|
|
628
649
|
};
|
|
650
|
+
export const useFetchLogs = (options) => {
|
|
651
|
+
const token = useToken();
|
|
652
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
653
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/logs" };
|
|
654
|
+
const funcer = async () => {
|
|
655
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
656
|
+
if (isPromise(token) && !token)
|
|
657
|
+
return;
|
|
658
|
+
const res = await fetchLogs({ ...opts, ...rest, auth });
|
|
659
|
+
return res.data;
|
|
660
|
+
};
|
|
661
|
+
if (!token)
|
|
662
|
+
enabled = false;
|
|
663
|
+
return useQuery({
|
|
664
|
+
queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, "logs", options.query ?? {}],
|
|
665
|
+
queryFn: funcer,
|
|
666
|
+
enabled,
|
|
667
|
+
retry: false,
|
|
668
|
+
staleTime: 600000
|
|
669
|
+
});
|
|
670
|
+
};
|
|
629
671
|
export const useCreateEnvironment = (config) => {
|
|
630
672
|
const token = useToken();
|
|
631
673
|
const queryClient = useQueryClient();
|
|
@@ -923,3 +965,24 @@ export const useFetchBillingPrices = (options) => {
|
|
|
923
965
|
staleTime: 600000
|
|
924
966
|
});
|
|
925
967
|
};
|
|
968
|
+
export const useListBillingInvoices = (options) => {
|
|
969
|
+
const token = useToken();
|
|
970
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
971
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing/invoices" };
|
|
972
|
+
const funcer = async () => {
|
|
973
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
974
|
+
if (isPromise(token) && !token)
|
|
975
|
+
return;
|
|
976
|
+
const res = await listBillingInvoices({ ...opts, ...rest, auth });
|
|
977
|
+
return res.data;
|
|
978
|
+
};
|
|
979
|
+
if (!token)
|
|
980
|
+
enabled = false;
|
|
981
|
+
return useQuery({
|
|
982
|
+
queryKey: [options?.path?.spaceHandle, "billing", "invoices", options.query ?? {}],
|
|
983
|
+
queryFn: funcer,
|
|
984
|
+
enabled,
|
|
985
|
+
retry: false,
|
|
986
|
+
staleTime: 600000
|
|
987
|
+
});
|
|
988
|
+
};
|